self-bench 0.3.6 → 0.3.8
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/.dockerignore +11 -1
- package/Dockerfile +9 -9
- package/Dockerfile.sandbox +5 -4
- package/README.md +27 -12
- package/bun.lock +462 -95
- package/compose.yaml +64 -20
- package/dist/agent-feed.d.ts +8 -0
- package/dist/agent-feed.d.ts.map +1 -0
- package/dist/agent-feed.js +56 -0
- package/dist/agent-feed.js.map +1 -0
- package/dist/api/http.d.ts +18 -0
- package/dist/api/http.d.ts.map +1 -0
- package/dist/api/http.js +111 -0
- package/dist/api/http.js.map +1 -0
- package/dist/api/run-request.d.ts +37 -0
- package/dist/api/run-request.d.ts.map +1 -0
- package/dist/api/run-request.js +59 -0
- package/dist/api/run-request.js.map +1 -0
- package/dist/api/status.d.ts +4 -0
- package/dist/api/status.d.ts.map +1 -0
- package/dist/api/status.js +36 -0
- package/dist/api/status.js.map +1 -0
- package/dist/api/viewer-routes.d.ts +9 -0
- package/dist/api/viewer-routes.d.ts.map +1 -0
- package/dist/api/viewer-routes.js +98 -0
- package/dist/api/viewer-routes.js.map +1 -0
- package/dist/api-main.js +5 -1
- package/dist/api-main.js.map +1 -1
- package/dist/api.d.ts +7 -25
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +80 -148
- package/dist/api.js.map +1 -1
- package/dist/archive.d.ts +14 -0
- package/dist/archive.d.ts.map +1 -0
- package/dist/archive.js +114 -0
- package/dist/archive.js.map +1 -0
- package/dist/artifacts/common.d.ts +15 -0
- package/dist/artifacts/common.d.ts.map +1 -0
- package/dist/artifacts/common.js +58 -0
- package/dist/artifacts/common.js.map +1 -0
- package/dist/artifacts/gcs.d.ts +18 -0
- package/dist/artifacts/gcs.d.ts.map +1 -0
- package/dist/artifacts/gcs.js +178 -0
- package/dist/artifacts/gcs.js.map +1 -0
- package/dist/artifacts/local.d.ts +17 -0
- package/dist/artifacts/local.d.ts.map +1 -0
- package/dist/artifacts/local.js +205 -0
- package/dist/artifacts/local.js.map +1 -0
- package/dist/artifacts/types.d.ts +18 -0
- package/dist/artifacts/types.d.ts.map +1 -0
- package/dist/artifacts/types.js +2 -0
- package/dist/artifacts/types.js.map +1 -0
- package/dist/artifacts.d.ts +5 -28
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +5 -302
- package/dist/artifacts.js.map +1 -1
- package/dist/audit.d.ts.map +1 -1
- package/dist/audit.js +8 -2
- package/dist/audit.js.map +1 -1
- package/dist/auth/api-key-routes.d.ts +17 -0
- package/dist/auth/api-key-routes.d.ts.map +1 -0
- package/dist/auth/api-key-routes.js +57 -0
- package/dist/auth/api-key-routes.js.map +1 -0
- package/dist/auth/api-keys.d.ts +47 -0
- package/dist/auth/api-keys.d.ts.map +1 -0
- package/dist/auth/api-keys.js +102 -0
- package/dist/auth/api-keys.js.map +1 -0
- package/dist/auth/config.d.ts +17 -0
- package/dist/auth/config.d.ts.map +1 -0
- package/dist/auth/config.js +38 -0
- package/dist/auth/config.js.map +1 -0
- package/dist/auth/cookies.d.ts +12 -0
- package/dist/auth/cookies.d.ts.map +1 -0
- package/dist/auth/cookies.js +45 -0
- package/dist/auth/cookies.js.map +1 -0
- package/dist/auth/crypto.d.ts +19 -0
- package/dist/auth/crypto.d.ts.map +1 -0
- package/dist/auth/crypto.js +48 -0
- package/dist/auth/crypto.js.map +1 -0
- package/dist/auth/github.d.ts +37 -0
- package/dist/auth/github.d.ts.map +1 -0
- package/dist/auth/github.js +127 -0
- package/dist/auth/github.js.map +1 -0
- package/dist/auth/routes.d.ts +41 -0
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/auth/routes.js +153 -0
- package/dist/auth/routes.js.map +1 -0
- package/dist/auth/session-expired.d.ts +4 -0
- package/dist/auth/session-expired.d.ts.map +1 -0
- package/dist/auth/session-expired.js +17 -0
- package/dist/auth/session-expired.js.map +1 -0
- package/dist/auth/session.d.ts +23 -0
- package/dist/auth/session.d.ts.map +1 -0
- package/dist/auth/session.js +56 -0
- package/dist/auth/session.js.map +1 -0
- package/dist/auth/users.d.ts +49 -0
- package/dist/auth/users.d.ts.map +1 -0
- package/dist/auth/users.js +125 -0
- package/dist/auth/users.js.map +1 -0
- package/dist/build-metadata.js +1 -1
- package/dist/cli/api-client.d.ts +8 -0
- package/dist/cli/api-client.d.ts.map +1 -0
- package/dist/cli/api-client.js +71 -0
- package/dist/cli/api-client.js.map +1 -0
- package/dist/cli/associate.d.ts +2 -0
- package/dist/cli/associate.d.ts.map +1 -0
- package/dist/cli/associate.js +51 -0
- package/dist/cli/associate.js.map +1 -0
- package/dist/cli/help.d.ts +2 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +52 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +55 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/replay.d.ts +3 -0
- package/dist/cli/replay.d.ts.map +1 -0
- package/dist/cli/replay.js +59 -0
- package/dist/cli/replay.js.map +1 -0
- package/dist/cli/repository.d.ts +6 -0
- package/dist/cli/repository.d.ts.map +1 -0
- package/dist/cli/repository.js +36 -0
- package/dist/cli/repository.js.map +1 -0
- package/dist/cli/run.d.ts +2 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +93 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/stack-environment.d.ts +26 -0
- package/dist/cli/stack-environment.d.ts.map +1 -0
- package/dist/cli/stack-environment.js +86 -0
- package/dist/cli/stack-environment.js.map +1 -0
- package/dist/cli/stack.d.ts +6 -0
- package/dist/cli/stack.d.ts.map +1 -0
- package/dist/cli/stack.js +131 -0
- package/dist/cli/stack.js.map +1 -0
- package/dist/cli/values.d.ts +8 -0
- package/dist/cli/values.d.ts.map +1 -0
- package/dist/cli/values.js +30 -0
- package/dist/cli/values.js.map +1 -0
- package/dist/cli/view.d.ts +2 -0
- package/dist/cli/view.d.ts.map +1 -0
- package/dist/cli/view.js +40 -0
- package/dist/cli/view.js.map +1 -0
- package/dist/cli.js +2 -429
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +16 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +60 -22
- package/dist/config.js.map +1 -1
- package/dist/contracts/common.d.ts +22 -0
- package/dist/contracts/common.d.ts.map +1 -0
- package/dist/contracts/common.js +29 -0
- package/dist/contracts/common.js.map +1 -0
- package/dist/contracts/results.d.ts +66 -0
- package/dist/contracts/results.d.ts.map +1 -0
- package/dist/contracts/results.js +2 -0
- package/dist/contracts/results.js.map +1 -0
- package/dist/contracts/run.d.ts +145 -0
- package/dist/contracts/run.d.ts.map +1 -0
- package/dist/contracts/run.js +74 -0
- package/dist/contracts/run.js.map +1 -0
- package/dist/contracts/task.d.ts +232 -0
- package/dist/contracts/task.d.ts.map +1 -0
- package/dist/contracts/task.js +198 -0
- package/dist/contracts/task.js.map +1 -0
- package/dist/contracts/verify.d.ts +331 -0
- package/dist/contracts/verify.d.ts.map +1 -0
- package/dist/contracts/verify.js +84 -0
- package/dist/contracts/verify.js.map +1 -0
- package/dist/contracts.d.ts +5 -243
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +5 -128
- package/dist/contracts.js.map +1 -1
- package/dist/db/client.d.ts +12 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +16 -0
- package/dist/db/client.js.map +1 -0
- package/dist/db/schema.d.ts +1256 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +128 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/environment.d.ts +9 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/environment.js +101 -0
- package/dist/environment.js.map +1 -0
- package/dist/evaluation/account.d.ts +30 -0
- package/dist/evaluation/account.d.ts.map +1 -0
- package/dist/evaluation/account.js +34 -0
- package/dist/evaluation/account.js.map +1 -0
- package/dist/evaluation/activities.d.ts +9 -0
- package/dist/evaluation/activities.d.ts.map +1 -0
- package/dist/evaluation/activities.js +40 -0
- package/dist/evaluation/activities.js.map +1 -0
- package/dist/evaluation/catalog-pricing.d.ts +3 -0
- package/dist/evaluation/catalog-pricing.d.ts.map +1 -0
- package/dist/evaluation/catalog-pricing.js +37 -0
- package/dist/evaluation/catalog-pricing.js.map +1 -0
- package/dist/evaluation/catalog.d.ts +17 -0
- package/dist/evaluation/catalog.d.ts.map +1 -0
- package/dist/evaluation/catalog.js +126 -0
- package/dist/evaluation/catalog.js.map +1 -0
- package/dist/evaluation/codex-login-process.d.ts +12 -0
- package/dist/evaluation/codex-login-process.d.ts.map +1 -0
- package/dist/evaluation/codex-login-process.js +121 -0
- package/dist/evaluation/codex-login-process.js.map +1 -0
- package/dist/evaluation/codex-login-routes.d.ts +5 -0
- package/dist/evaluation/codex-login-routes.d.ts.map +1 -0
- package/dist/evaluation/codex-login-routes.js +55 -0
- package/dist/evaluation/codex-login-routes.js.map +1 -0
- package/dist/evaluation/codex-login.d.ts +42 -0
- package/dist/evaluation/codex-login.d.ts.map +1 -0
- package/dist/evaluation/codex-login.js +143 -0
- package/dist/evaluation/codex-login.js.map +1 -0
- package/dist/evaluation/comparisons.d.ts +65 -0
- package/dist/evaluation/comparisons.d.ts.map +1 -0
- package/dist/evaluation/comparisons.js +161 -0
- package/dist/evaluation/comparisons.js.map +1 -0
- package/dist/evaluation/config.d.ts +43 -0
- package/dist/evaluation/config.d.ts.map +1 -0
- package/dist/evaluation/config.js +116 -0
- package/dist/evaluation/config.js.map +1 -0
- package/dist/evaluation/cost.d.ts +3 -0
- package/dist/evaluation/cost.d.ts.map +1 -0
- package/dist/evaluation/cost.js +95 -0
- package/dist/evaluation/cost.js.map +1 -0
- package/dist/evaluation/credential-execution.d.ts +10 -0
- package/dist/evaluation/credential-execution.d.ts.map +1 -0
- package/dist/evaluation/credential-execution.js +65 -0
- package/dist/evaluation/credential-execution.js.map +1 -0
- package/dist/evaluation/credentials.d.ts +40 -0
- package/dist/evaluation/credentials.d.ts.map +1 -0
- package/dist/evaluation/credentials.js +146 -0
- package/dist/evaluation/credentials.js.map +1 -0
- package/dist/evaluation/encrypted-records.d.ts +15 -0
- package/dist/evaluation/encrypted-records.d.ts.map +1 -0
- package/dist/evaluation/encrypted-records.js +57 -0
- package/dist/evaluation/encrypted-records.js.map +1 -0
- package/dist/evaluation/gateway-execution.d.ts +18 -0
- package/dist/evaluation/gateway-execution.d.ts.map +1 -0
- package/dist/evaluation/gateway-execution.js +38 -0
- package/dist/evaluation/gateway-execution.js.map +1 -0
- package/dist/evaluation/harbor-cost.d.ts +3 -0
- package/dist/evaluation/harbor-cost.d.ts.map +1 -0
- package/dist/evaluation/harbor-cost.js +39 -0
- package/dist/evaluation/harbor-cost.js.map +1 -0
- package/dist/evaluation/harbor_e2b.py +20 -0
- package/dist/evaluation/harbor_gateway.py +22 -0
- package/dist/evaluation/harnesses.d.ts +8 -0
- package/dist/evaluation/harnesses.d.ts.map +1 -0
- package/dist/evaluation/harnesses.js +10 -0
- package/dist/evaluation/harnesses.js.map +1 -0
- package/dist/evaluation/model-options.d.ts +9 -0
- package/dist/evaluation/model-options.d.ts.map +1 -0
- package/dist/evaluation/model-options.js +81 -0
- package/dist/evaluation/model-options.js.map +1 -0
- package/dist/evaluation/org-credential-routes.d.ts +5 -0
- package/dist/evaluation/org-credential-routes.d.ts.map +1 -0
- package/dist/evaluation/org-credential-routes.js +56 -0
- package/dist/evaluation/org-credential-routes.js.map +1 -0
- package/dist/evaluation/org-records.d.ts +4 -0
- package/dist/evaluation/org-records.d.ts.map +1 -0
- package/dist/evaluation/org-records.js +14 -0
- package/dist/evaluation/org-records.js.map +1 -0
- package/dist/evaluation/output.d.ts +9 -0
- package/dist/evaluation/output.d.ts.map +1 -0
- package/dist/evaluation/output.js +171 -0
- package/dist/evaluation/output.js.map +1 -0
- package/dist/evaluation/platform-routes.d.ts +5 -0
- package/dist/evaluation/platform-routes.d.ts.map +1 -0
- package/dist/evaluation/platform-routes.js +123 -0
- package/dist/evaluation/platform-routes.js.map +1 -0
- package/dist/evaluation/profile-routes.d.ts +16 -0
- package/dist/evaluation/profile-routes.d.ts.map +1 -0
- package/dist/evaluation/profile-routes.js +47 -0
- package/dist/evaluation/profile-routes.js.map +1 -0
- package/dist/evaluation/profiles.d.ts +48 -0
- package/dist/evaluation/profiles.d.ts.map +1 -0
- package/dist/evaluation/profiles.js +134 -0
- package/dist/evaluation/profiles.js.map +1 -0
- package/dist/evaluation/providers.d.ts +11 -0
- package/dist/evaluation/providers.d.ts.map +1 -0
- package/dist/evaluation/providers.js +30 -0
- package/dist/evaluation/providers.js.map +1 -0
- package/dist/evaluation/routes.d.ts +23 -0
- package/dist/evaluation/routes.d.ts.map +1 -0
- package/dist/evaluation/routes.js +212 -0
- package/dist/evaluation/routes.js.map +1 -0
- package/dist/evaluation/runner.d.ts +16 -0
- package/dist/evaluation/runner.d.ts.map +1 -0
- package/dist/evaluation/runner.js +241 -0
- package/dist/evaluation/runner.js.map +1 -0
- package/dist/evaluation/store.d.ts +8 -0
- package/dist/evaluation/store.d.ts.map +1 -0
- package/dist/evaluation/store.js +60 -0
- package/dist/evaluation/store.js.map +1 -0
- package/dist/evaluation/types.d.ts +98 -0
- package/dist/evaluation/types.d.ts.map +1 -0
- package/dist/evaluation/types.js +2 -0
- package/dist/evaluation/types.js.map +1 -0
- package/dist/evaluation/worker-main.d.ts +2 -0
- package/dist/evaluation/worker-main.d.ts.map +1 -0
- package/dist/evaluation/worker-main.js +26 -0
- package/dist/evaluation/worker-main.js.map +1 -0
- package/dist/evaluation/worker-records.d.ts +5 -0
- package/dist/evaluation/worker-records.d.ts.map +1 -0
- package/dist/evaluation/worker-records.js +11 -0
- package/dist/evaluation/worker-records.js.map +1 -0
- package/dist/evaluation/workflow.d.ts +3 -0
- package/dist/evaluation/workflow.d.ts.map +1 -0
- package/dist/evaluation/workflow.js +20 -0
- package/dist/evaluation/workflow.js.map +1 -0
- package/dist/execution-environment.d.ts +3 -0
- package/dist/execution-environment.d.ts.map +1 -0
- package/dist/execution-environment.js +9 -0
- package/dist/execution-environment.js.map +1 -0
- package/dist/extension-authoring.bundle.js +347 -0
- package/dist/extension-verifier.bundle.js +73 -0
- package/dist/extensions/authoring.d.ts.map +1 -1
- package/dist/extensions/authoring.js +70 -59
- package/dist/extensions/authoring.js.map +1 -1
- package/dist/extensions/shared/deliverable.d.ts +33 -0
- package/dist/extensions/shared/deliverable.d.ts.map +1 -0
- package/dist/extensions/shared/deliverable.js +123 -0
- package/dist/extensions/shared/deliverable.js.map +1 -0
- package/dist/extensions/shared/mailbox.d.ts +33 -0
- package/dist/extensions/shared/mailbox.d.ts.map +1 -0
- package/dist/extensions/shared/mailbox.js +102 -0
- package/dist/extensions/shared/mailbox.js.map +1 -0
- package/dist/extensions/shared/schemas.d.ts +90 -0
- package/dist/extensions/shared/schemas.d.ts.map +1 -0
- package/dist/extensions/shared/schemas.js +71 -0
- package/dist/extensions/shared/schemas.js.map +1 -0
- package/dist/extensions/shared/static-check.d.ts +38 -0
- package/dist/extensions/shared/static-check.d.ts.map +1 -0
- package/dist/extensions/shared/static-check.js +52 -0
- package/dist/extensions/shared/static-check.js.map +1 -0
- package/dist/extensions/verifier.d.ts +4 -0
- package/dist/extensions/verifier.d.ts.map +1 -0
- package/dist/extensions/verifier.js +70 -0
- package/dist/extensions/verifier.js.map +1 -0
- package/dist/github.d.ts +1 -1
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +3 -3
- package/dist/github.js.map +1 -1
- package/dist/harbor-environment.d.ts +13 -1
- package/dist/harbor-environment.d.ts.map +1 -1
- package/dist/harbor-environment.js +37 -4
- package/dist/harbor-environment.js.map +1 -1
- package/dist/harbor-results.d.ts +2 -0
- package/dist/harbor-results.d.ts.map +1 -1
- package/dist/harbor-results.js +2 -0
- package/dist/harbor-results.js.map +1 -1
- package/dist/harbor-task/compiler.d.ts +10 -0
- package/dist/harbor-task/compiler.d.ts.map +1 -0
- package/dist/harbor-task/compiler.js +174 -0
- package/dist/harbor-task/compiler.js.map +1 -0
- package/dist/harbor-task/constants.d.ts +3 -0
- package/dist/harbor-task/constants.d.ts.map +1 -0
- package/dist/harbor-task/constants.js +3 -0
- package/dist/harbor-task/constants.js.map +1 -0
- package/dist/harbor-task/dependencies.d.ts +3 -0
- package/dist/harbor-task/dependencies.d.ts.map +1 -0
- package/dist/harbor-task/dependencies.js +20 -0
- package/dist/harbor-task/dependencies.js.map +1 -0
- package/dist/harbor-task/paths.d.ts +6 -0
- package/dist/harbor-task/paths.d.ts.map +1 -0
- package/dist/harbor-task/paths.js +37 -0
- package/dist/harbor-task/paths.js.map +1 -0
- package/dist/harbor-task/render.d.ts +11 -0
- package/dist/harbor-task/render.d.ts.map +1 -0
- package/dist/harbor-task/render.js +194 -0
- package/dist/harbor-task/render.js.map +1 -0
- package/dist/harbor-task/runtime/command.sh +26 -0
- package/dist/harbor-task/runtime/junit.py +69 -0
- package/dist/harbor-task/runtime-assets.d.ts +2 -0
- package/dist/harbor-task/runtime-assets.d.ts.map +1 -0
- package/dist/harbor-task/runtime-assets.js +8 -0
- package/dist/harbor-task/runtime-assets.js.map +1 -0
- package/dist/harbor-task/test-patch.d.ts +4 -0
- package/dist/harbor-task/test-patch.d.ts.map +1 -0
- package/dist/harbor-task/test-patch.js +15 -0
- package/dist/harbor-task/test-patch.js.map +1 -0
- package/dist/harbor-task/verifier.d.ts +4 -0
- package/dist/harbor-task/verifier.d.ts.map +1 -0
- package/dist/harbor-task/verifier.js +105 -0
- package/dist/harbor-task/verifier.js.map +1 -0
- package/dist/harbor-task.d.ts +3 -11
- package/dist/harbor-task.d.ts.map +1 -1
- package/dist/harbor-task.js +2 -463
- package/dist/harbor-task.js.map +1 -1
- package/dist/log-excerpt.d.ts +15 -0
- package/dist/log-excerpt.d.ts.map +1 -0
- package/dist/log-excerpt.js +104 -0
- package/dist/log-excerpt.js.map +1 -0
- package/dist/patch-check.d.ts +26 -0
- package/dist/patch-check.d.ts.map +1 -0
- package/dist/patch-check.js +137 -0
- package/dist/patch-check.js.map +1 -0
- package/dist/pi-event-feed.d.ts +16 -0
- package/dist/pi-event-feed.d.ts.map +1 -0
- package/dist/pi-event-feed.js +86 -0
- package/dist/pi-event-feed.js.map +1 -0
- package/dist/pi-session.d.ts +32 -0
- package/dist/pi-session.d.ts.map +1 -0
- package/dist/pi-session.js +175 -0
- package/dist/pi-session.js.map +1 -0
- package/dist/process.d.ts +5 -0
- package/dist/process.d.ts.map +1 -1
- package/dist/process.js +31 -9
- package/dist/process.js.map +1 -1
- package/dist/provenance/github.d.ts +4 -0
- package/dist/provenance/github.d.ts.map +1 -0
- package/dist/provenance/github.js +65 -0
- package/dist/provenance/github.js.map +1 -0
- package/dist/provenance/local.d.ts +4 -0
- package/dist/provenance/local.d.ts.map +1 -0
- package/dist/provenance/local.js +82 -0
- package/dist/provenance/local.js.map +1 -0
- package/dist/provenance/redact.d.ts +2 -0
- package/dist/provenance/redact.d.ts.map +1 -0
- package/dist/provenance/redact.js +28 -0
- package/dist/provenance/redact.js.map +1 -0
- package/dist/provenance/selection.d.ts +4 -0
- package/dist/provenance/selection.d.ts.map +1 -0
- package/dist/provenance/selection.js +29 -0
- package/dist/provenance/selection.js.map +1 -0
- package/dist/provenance/session.d.ts +3 -0
- package/dist/provenance/session.d.ts.map +1 -0
- package/dist/provenance/session.js +214 -0
- package/dist/provenance/session.js.map +1 -0
- package/dist/provenance/shared.d.ts +7 -0
- package/dist/provenance/shared.d.ts.map +1 -0
- package/dist/provenance/shared.js +10 -0
- package/dist/provenance/shared.js.map +1 -0
- package/dist/provenance/types.d.ts +34 -0
- package/dist/provenance/types.d.ts.map +1 -0
- package/dist/provenance/types.js +22 -0
- package/dist/provenance/types.js.map +1 -0
- package/dist/provenance-associations/apply.d.ts +3 -0
- package/dist/provenance-associations/apply.d.ts.map +1 -0
- package/dist/provenance-associations/apply.js +66 -0
- package/dist/provenance-associations/apply.js.map +1 -0
- package/dist/provenance-associations/shared.d.ts +45 -0
- package/dist/provenance-associations/shared.d.ts.map +1 -0
- package/dist/provenance-associations/shared.js +42 -0
- package/dist/provenance-associations/shared.js.map +1 -0
- package/dist/provenance-associations.d.ts +3 -30
- package/dist/provenance-associations.d.ts.map +1 -1
- package/dist/provenance-associations.js +4 -103
- package/dist/provenance-associations.js.map +1 -1
- package/dist/provenance.d.ts +7 -41
- package/dist/provenance.d.ts.map +1 -1
- package/dist/provenance.js +6 -432
- package/dist/provenance.js.map +1 -1
- package/dist/providers.d.ts +25 -2
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +23 -2
- package/dist/providers.js.map +1 -1
- package/dist/repair.d.ts +1 -6
- package/dist/repair.d.ts.map +1 -1
- package/dist/repair.js +17 -27
- package/dist/repair.js.map +1 -1
- package/dist/review/assets/index-BHHztQ9x.js +1679 -0
- package/dist/review/assets/index-KQ1eFQ0t.css +1 -0
- package/dist/review/index.html +11 -8
- package/dist/runtime/command.sh +26 -0
- package/dist/runtime/junit.py +69 -0
- package/dist/sandbox/contracts.d.ts +36 -1
- package/dist/sandbox/contracts.d.ts.map +1 -1
- package/dist/sandbox/contracts.js +3 -0
- package/dist/sandbox/contracts.js.map +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.d.ts.map +1 -1
- package/dist/sandbox/index.js +13 -2
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/live.d.ts +18 -0
- package/dist/sandbox/live.d.ts.map +1 -0
- package/dist/sandbox/live.js +55 -0
- package/dist/sandbox/live.js.map +1 -0
- package/dist/sandbox/output-retry.d.ts +16 -0
- package/dist/sandbox/output-retry.d.ts.map +1 -0
- package/dist/sandbox/output-retry.js +36 -0
- package/dist/sandbox/output-retry.js.map +1 -0
- package/dist/sandbox/programs/author.js +16 -6
- package/dist/sandbox/programs/author.js.map +1 -1
- package/dist/sandbox/programs/check.d.ts +3 -0
- package/dist/sandbox/programs/check.d.ts.map +1 -0
- package/dist/sandbox/programs/check.js +76 -0
- package/dist/sandbox/programs/check.js.map +1 -0
- package/dist/sandbox/programs/prepare-task.d.ts +12 -0
- package/dist/sandbox/programs/prepare-task.d.ts.map +1 -0
- package/dist/sandbox/programs/{prepare-repair.js → prepare-task.js} +11 -9
- package/dist/sandbox/programs/prepare-task.js.map +1 -0
- package/dist/sandbox/programs/verifier.d.ts +3 -0
- package/dist/sandbox/programs/verifier.d.ts.map +1 -0
- package/dist/sandbox/programs/verifier.js +9 -0
- package/dist/sandbox/programs/verifier.js.map +1 -0
- package/dist/sandbox/providers/docker/executor.d.ts +4 -1
- package/dist/sandbox/providers/docker/executor.d.ts.map +1 -1
- package/dist/sandbox/providers/docker/executor.js +75 -25
- package/dist/sandbox/providers/docker/executor.js.map +1 -1
- package/dist/sandbox/providers/e2b/bytes.d.ts +3 -0
- package/dist/sandbox/providers/e2b/bytes.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/bytes.js +8 -0
- package/dist/sandbox/providers/e2b/bytes.js.map +1 -0
- package/dist/sandbox/providers/e2b/cleanup.d.ts +8 -0
- package/dist/sandbox/providers/e2b/cleanup.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/cleanup.js +124 -0
- package/dist/sandbox/providers/e2b/cleanup.js.map +1 -0
- package/dist/sandbox/providers/e2b/command.d.ts +23 -0
- package/dist/sandbox/providers/e2b/command.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/command.js +160 -0
- package/dist/sandbox/providers/e2b/command.js.map +1 -0
- package/dist/sandbox/providers/e2b/config.d.ts +13 -0
- package/dist/sandbox/providers/e2b/config.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/config.js +2 -0
- package/dist/sandbox/providers/e2b/config.js.map +1 -0
- package/dist/sandbox/providers/e2b/executor.d.ts +15 -0
- package/dist/sandbox/providers/e2b/executor.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/executor.js +207 -0
- package/dist/sandbox/providers/e2b/executor.js.map +1 -0
- package/dist/sandbox/providers/e2b/lifecycle.d.ts +8 -0
- package/dist/sandbox/providers/e2b/lifecycle.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/lifecycle.js +37 -0
- package/dist/sandbox/providers/e2b/lifecycle.js.map +1 -0
- package/dist/sandbox/providers/e2b/outcome.d.ts +11 -0
- package/dist/sandbox/providers/e2b/outcome.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/outcome.js +72 -0
- package/dist/sandbox/providers/e2b/outcome.js.map +1 -0
- package/dist/sandbox/providers/e2b/stage-files.d.ts +10 -0
- package/dist/sandbox/providers/e2b/stage-files.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/stage-files.js +45 -0
- package/dist/sandbox/providers/e2b/stage-files.js.map +1 -0
- package/dist/sandbox/providers/e2b/startup.d.ts +10 -0
- package/dist/sandbox/providers/e2b/startup.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/startup.js +26 -0
- package/dist/sandbox/providers/e2b/startup.js.map +1 -0
- package/dist/sandbox/providers/e2b/types.d.ts +9 -0
- package/dist/sandbox/providers/e2b/types.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/types.js +2 -0
- package/dist/sandbox/providers/e2b/types.js.map +1 -0
- package/dist/sandbox/providers/e2b/validation.d.ts +14 -0
- package/dist/sandbox/providers/e2b/validation.d.ts.map +1 -0
- package/dist/sandbox/providers/e2b/validation.js +60 -0
- package/dist/sandbox/providers/e2b/validation.js.map +1 -0
- package/dist/{modal-auth.d.ts → sandbox/providers/modal/auth.d.ts} +1 -1
- package/dist/sandbox/providers/modal/auth.d.ts.map +1 -0
- package/dist/{modal-auth.js → sandbox/providers/modal/auth.js} +1 -1
- package/dist/sandbox/providers/modal/auth.js.map +1 -0
- package/dist/sandbox/providers/modal/executor.d.ts +4 -1
- package/dist/sandbox/providers/modal/executor.d.ts.map +1 -1
- package/dist/sandbox/providers/modal/executor.js +33 -9
- package/dist/sandbox/providers/modal/executor.js.map +1 -1
- package/dist/sandbox/providers/modal/live.d.ts +7 -0
- package/dist/sandbox/providers/modal/live.d.ts.map +1 -0
- package/dist/sandbox/providers/modal/live.js +50 -0
- package/dist/sandbox/providers/modal/live.js.map +1 -0
- package/dist/sandbox/providers/vercel/command.d.ts +6 -0
- package/dist/sandbox/providers/vercel/command.d.ts.map +1 -1
- package/dist/sandbox/providers/vercel/command.js +44 -11
- package/dist/sandbox/providers/vercel/command.js.map +1 -1
- package/dist/sandbox/providers/vercel/executor.d.ts +6 -7
- package/dist/sandbox/providers/vercel/executor.d.ts.map +1 -1
- package/dist/sandbox/providers/vercel/executor.js +21 -187
- package/dist/sandbox/providers/vercel/executor.js.map +1 -1
- package/dist/sandbox/providers/vercel/lifecycle.d.ts +13 -0
- package/dist/sandbox/providers/vercel/lifecycle.d.ts.map +1 -0
- package/dist/sandbox/providers/vercel/lifecycle.js +140 -0
- package/dist/sandbox/providers/vercel/lifecycle.js.map +1 -0
- package/dist/sandbox/providers/vercel/validation.d.ts +11 -0
- package/dist/sandbox/providers/vercel/validation.d.ts.map +1 -0
- package/dist/sandbox/providers/vercel/validation.js +30 -0
- package/dist/sandbox/providers/vercel/validation.js.map +1 -0
- package/dist/sandbox/remote-files.d.ts +11 -0
- package/dist/sandbox/remote-files.d.ts.map +1 -0
- package/dist/sandbox/remote-files.js +41 -0
- package/dist/sandbox/remote-files.js.map +1 -0
- package/dist/sandbox/request-validation.d.ts +5 -0
- package/dist/sandbox/request-validation.d.ts.map +1 -0
- package/dist/sandbox/request-validation.js +43 -0
- package/dist/sandbox/request-validation.js.map +1 -0
- package/dist/sandbox/supervisor.d.ts +42 -0
- package/dist/sandbox/supervisor.d.ts.map +1 -0
- package/dist/sandbox/supervisor.js +126 -0
- package/dist/sandbox/supervisor.js.map +1 -0
- package/dist/sandbox/timeout.d.ts +6 -1
- package/dist/sandbox/timeout.d.ts.map +1 -1
- package/dist/sandbox/timeout.js +12 -0
- package/dist/sandbox/timeout.js.map +1 -1
- package/dist/sandbox-author.bundle.js +47 -14879
- package/dist/{sandbox-validation-repair.bundle.js → sandbox-check.bundle.js} +7261 -1893
- package/dist/sandbox-verifier.bundle.js +307 -0
- package/dist/setup/e2b/build.d.ts +24 -0
- package/dist/setup/e2b/build.d.ts.map +1 -0
- package/dist/setup/e2b/build.js +46 -0
- package/dist/setup/e2b/build.js.map +1 -0
- package/dist/setup/e2b/cli.d.ts +2 -0
- package/dist/setup/e2b/cli.d.ts.map +1 -0
- package/dist/setup/e2b/cli.js +51 -0
- package/dist/setup/e2b/cli.js.map +1 -0
- package/dist/setup/e2b/index.d.ts +5 -0
- package/dist/setup/e2b/index.d.ts.map +1 -0
- package/dist/setup/e2b/index.js +4 -0
- package/dist/setup/e2b/index.js.map +1 -0
- package/dist/setup/e2b/template.d.ts +4 -0
- package/dist/setup/e2b/template.d.ts.map +1 -0
- package/dist/setup/e2b/template.js +53 -0
- package/dist/setup/e2b/template.js.map +1 -0
- package/dist/setup/vercel/cli-helpers.d.ts +22 -0
- package/dist/setup/vercel/cli-helpers.d.ts.map +1 -0
- package/dist/setup/vercel/cli-helpers.js +87 -0
- package/dist/setup/vercel/cli-helpers.js.map +1 -0
- package/dist/setup/vercel/cli-runner.d.ts +14 -0
- package/dist/setup/vercel/cli-runner.d.ts.map +1 -0
- package/dist/setup/vercel/cli-runner.js +24 -0
- package/dist/setup/vercel/cli-runner.js.map +1 -0
- package/dist/setup/vercel/cli-types.d.ts +24 -0
- package/dist/setup/vercel/cli-types.d.ts.map +1 -0
- package/dist/setup/vercel/cli-types.js +18 -0
- package/dist/setup/vercel/cli-types.js.map +1 -0
- package/dist/setup/vercel/cli.d.ts +5 -31
- package/dist/setup/vercel/cli.d.ts.map +1 -1
- package/dist/setup/vercel/cli.js +15 -125
- package/dist/setup/vercel/cli.js.map +1 -1
- package/dist/setup/vercel/profile-files.d.ts +6 -0
- package/dist/setup/vercel/profile-files.d.ts.map +1 -0
- package/dist/setup/vercel/profile-files.js +100 -0
- package/dist/setup/vercel/profile-files.js.map +1 -0
- package/dist/setup/vercel/profile-schema.d.ts +48 -0
- package/dist/setup/vercel/profile-schema.d.ts.map +1 -0
- package/dist/setup/vercel/profile-schema.js +39 -0
- package/dist/setup/vercel/profile-schema.js.map +1 -0
- package/dist/setup/vercel/profile.d.ts +3 -19
- package/dist/setup/vercel/profile.d.ts.map +1 -1
- package/dist/setup/vercel/profile.js +4 -130
- package/dist/setup/vercel/profile.js.map +1 -1
- package/dist/setup/vercel/selection.d.ts +18 -0
- package/dist/setup/vercel/selection.d.ts.map +1 -0
- package/dist/setup/vercel/selection.js +113 -0
- package/dist/setup/vercel/selection.js.map +1 -0
- package/dist/setup/vercel/setup-types.d.ts +34 -0
- package/dist/setup/vercel/setup-types.d.ts.map +1 -0
- package/dist/setup/vercel/setup-types.js +2 -0
- package/dist/setup/vercel/setup-types.js.map +1 -0
- package/dist/setup/vercel/setup.d.ts +3 -28
- package/dist/setup/vercel/setup.d.ts.map +1 -1
- package/dist/setup/vercel/setup.js +3 -111
- package/dist/setup/vercel/setup.js.map +1 -1
- package/dist/site/batch-activity.d.ts +5 -0
- package/dist/site/batch-activity.d.ts.map +1 -0
- package/dist/site/batch-activity.js +31 -0
- package/dist/site/batch-activity.js.map +1 -0
- package/dist/site/batch-progress.d.ts +16 -0
- package/dist/site/batch-progress.d.ts.map +1 -0
- package/dist/site/batch-progress.js +52 -0
- package/dist/site/batch-progress.js.map +1 -0
- package/dist/site/batch-routes.d.ts +30 -0
- package/dist/site/batch-routes.d.ts.map +1 -0
- package/dist/site/batch-routes.js +117 -0
- package/dist/site/batch-routes.js.map +1 -0
- package/dist/site/batch-start.d.ts +60 -0
- package/dist/site/batch-start.d.ts.map +1 -0
- package/dist/site/batch-start.js +39 -0
- package/dist/site/batch-start.js.map +1 -0
- package/dist/site/connected-repos.d.ts +25 -0
- package/dist/site/connected-repos.d.ts.map +1 -0
- package/dist/site/connected-repos.js +109 -0
- package/dist/site/connected-repos.js.map +1 -0
- package/dist/site/evaluation-start.d.ts +4 -0
- package/dist/site/evaluation-start.d.ts.map +1 -0
- package/dist/site/evaluation-start.js +19 -0
- package/dist/site/evaluation-start.js.map +1 -0
- package/dist/site/generation-config.d.ts +4 -0
- package/dist/site/generation-config.d.ts.map +1 -0
- package/dist/site/generation-config.js +16 -0
- package/dist/site/generation-config.js.map +1 -0
- package/dist/site/generation-credentials.d.ts +6 -0
- package/dist/site/generation-credentials.d.ts.map +1 -0
- package/dist/site/generation-credentials.js +101 -0
- package/dist/site/generation-credentials.js.map +1 -0
- package/dist/site/generation-run.d.ts +6 -0
- package/dist/site/generation-run.d.ts.map +1 -0
- package/dist/site/generation-run.js +22 -0
- package/dist/site/generation-run.js.map +1 -0
- package/dist/site/generation-settings.d.ts +80 -0
- package/dist/site/generation-settings.d.ts.map +1 -0
- package/dist/site/generation-settings.js +84 -0
- package/dist/site/generation-settings.js.map +1 -0
- package/dist/site/generation-subscription.d.ts +3 -0
- package/dist/site/generation-subscription.d.ts.map +1 -0
- package/dist/site/generation-subscription.js +38 -0
- package/dist/site/generation-subscription.js.map +1 -0
- package/dist/site/github-repos.d.ts +35 -0
- package/dist/site/github-repos.d.ts.map +1 -0
- package/dist/site/github-repos.js +121 -0
- package/dist/site/github-repos.js.map +1 -0
- package/dist/site/pr-candidate.d.ts +26 -0
- package/dist/site/pr-candidate.d.ts.map +1 -0
- package/dist/site/pr-candidate.js +101 -0
- package/dist/site/pr-candidate.js.map +1 -0
- package/dist/site/pr-list.d.ts +13 -0
- package/dist/site/pr-list.d.ts.map +1 -0
- package/dist/site/pr-list.js +24 -0
- package/dist/site/pr-list.js.map +1 -0
- package/dist/site/pr-routes.d.ts +26 -0
- package/dist/site/pr-routes.d.ts.map +1 -0
- package/dist/site/pr-routes.js +139 -0
- package/dist/site/pr-routes.js.map +1 -0
- package/dist/site/repo-store.d.ts +40 -0
- package/dist/site/repo-store.d.ts.map +1 -0
- package/dist/site/repo-store.js +74 -0
- package/dist/site/repo-store.js.map +1 -0
- package/dist/site/run-store.d.ts +17 -0
- package/dist/site/run-store.d.ts.map +1 -0
- package/dist/site/run-store.js +42 -0
- package/dist/site/run-store.js.map +1 -0
- package/dist/site/runtime.d.ts +27 -0
- package/dist/site/runtime.d.ts.map +1 -0
- package/dist/site/runtime.js +97 -0
- package/dist/site/runtime.js.map +1 -0
- package/dist/site/task-deletion.d.ts +7 -0
- package/dist/site/task-deletion.d.ts.map +1 -0
- package/dist/site/task-deletion.js +29 -0
- package/dist/site/task-deletion.js.map +1 -0
- package/dist/site/task-start-reservation.d.ts +4 -0
- package/dist/site/task-start-reservation.d.ts.map +1 -0
- package/dist/site/task-start-reservation.js +18 -0
- package/dist/site/task-start-reservation.js.map +1 -0
- package/dist/site/task-start.d.ts +33 -0
- package/dist/site/task-start.d.ts.map +1 -0
- package/dist/site/task-start.js +50 -0
- package/dist/site/task-start.js.map +1 -0
- package/dist/site/task-status.d.ts +36 -0
- package/dist/site/task-status.d.ts.map +1 -0
- package/dist/site/task-status.js +113 -0
- package/dist/site/task-status.js.map +1 -0
- package/dist/site/task-store.d.ts +78 -0
- package/dist/site/task-store.d.ts.map +1 -0
- package/dist/site/task-store.js +186 -0
- package/dist/site/task-store.js.map +1 -0
- package/dist/site/task-sync.d.ts +30 -0
- package/dist/site/task-sync.d.ts.map +1 -0
- package/dist/site/task-sync.js +121 -0
- package/dist/site/task-sync.js.map +1 -0
- package/dist/site/tasks.d.ts +47 -0
- package/dist/site/tasks.d.ts.map +1 -0
- package/dist/site/tasks.js +164 -0
- package/dist/site/tasks.js.map +1 -0
- package/dist/site/temporal-status.d.ts +8 -0
- package/dist/site/temporal-status.d.ts.map +1 -0
- package/dist/site/temporal-status.js +41 -0
- package/dist/site/temporal-status.js.map +1 -0
- package/dist/site/tenant.d.ts +4 -0
- package/dist/site/tenant.d.ts.map +1 -0
- package/dist/site/tenant.js +6 -0
- package/dist/site/tenant.js.map +1 -0
- package/dist/static-check.d.ts +38 -0
- package/dist/static-check.d.ts.map +1 -0
- package/dist/static-check.js +131 -0
- package/dist/static-check.js.map +1 -0
- package/dist/submission-hash.d.ts +18 -0
- package/dist/submission-hash.d.ts.map +1 -0
- package/dist/submission-hash.js +16 -0
- package/dist/submission-hash.js.map +1 -0
- package/dist/subscription-auth.d.ts +0 -7
- package/dist/subscription-auth.d.ts.map +1 -1
- package/dist/subscription-auth.js +3 -23
- package/dist/subscription-auth.js.map +1 -1
- package/dist/temporal/activities/agent-feed.d.ts +5 -0
- package/dist/temporal/activities/agent-feed.d.ts.map +1 -0
- package/dist/temporal/activities/agent-feed.js +41 -0
- package/dist/temporal/activities/agent-feed.js.map +1 -0
- package/dist/temporal/activities/agent-scripts.d.ts +16 -0
- package/dist/temporal/activities/agent-scripts.d.ts.map +1 -0
- package/dist/temporal/activities/agent-scripts.js +162 -0
- package/dist/temporal/activities/agent-scripts.js.map +1 -0
- package/dist/temporal/activities/authoring-round.d.ts +13 -0
- package/dist/temporal/activities/authoring-round.d.ts.map +1 -0
- package/dist/temporal/activities/authoring-round.js +160 -0
- package/dist/temporal/activities/authoring-round.js.map +1 -0
- package/dist/temporal/activities/constants.d.ts +5 -0
- package/dist/temporal/activities/constants.d.ts.map +1 -0
- package/dist/temporal/activities/constants.js +5 -0
- package/dist/temporal/activities/constants.js.map +1 -0
- package/dist/temporal/activities/discovery.d.ts +17 -0
- package/dist/temporal/activities/discovery.d.ts.map +1 -0
- package/dist/temporal/activities/discovery.js +153 -0
- package/dist/temporal/activities/discovery.js.map +1 -0
- package/dist/temporal/activities/drafts.d.ts +15 -0
- package/dist/temporal/activities/drafts.d.ts.map +1 -0
- package/dist/temporal/activities/drafts.js +51 -0
- package/dist/temporal/activities/drafts.js.map +1 -0
- package/dist/temporal/activities/excluded-source-prs.d.ts +9 -0
- package/dist/temporal/activities/excluded-source-prs.d.ts.map +1 -0
- package/dist/temporal/activities/excluded-source-prs.js +132 -0
- package/dist/temporal/activities/excluded-source-prs.js.map +1 -0
- package/dist/temporal/activities/export.d.ts +38 -0
- package/dist/temporal/activities/export.d.ts.map +1 -0
- package/dist/temporal/activities/export.js +79 -0
- package/dist/temporal/activities/export.js.map +1 -0
- package/dist/temporal/activities/factory.d.ts +5 -0
- package/dist/temporal/activities/factory.d.ts.map +1 -0
- package/dist/temporal/activities/factory.js +26 -0
- package/dist/temporal/activities/factory.js.map +1 -0
- package/dist/temporal/activities/gate-logs.d.ts +20 -0
- package/dist/temporal/activities/gate-logs.d.ts.map +1 -0
- package/dist/temporal/activities/gate-logs.js +62 -0
- package/dist/temporal/activities/gate-logs.js.map +1 -0
- package/dist/temporal/activities/generation-runtime.d.ts +6 -0
- package/dist/temporal/activities/generation-runtime.d.ts.map +1 -0
- package/dist/temporal/activities/generation-runtime.js +56 -0
- package/dist/temporal/activities/generation-runtime.js.map +1 -0
- package/dist/temporal/activities/harbor.d.ts +11 -0
- package/dist/temporal/activities/harbor.d.ts.map +1 -0
- package/dist/temporal/activities/harbor.js +112 -0
- package/dist/temporal/activities/harbor.js.map +1 -0
- package/dist/temporal/activities/modal-build-log.d.ts +12 -0
- package/dist/temporal/activities/modal-build-log.d.ts.map +1 -0
- package/dist/temporal/activities/modal-build-log.js +57 -0
- package/dist/temporal/activities/modal-build-log.js.map +1 -0
- package/dist/temporal/activities/prompts-authoring.d.ts +6 -0
- package/dist/temporal/activities/prompts-authoring.d.ts.map +1 -0
- package/dist/temporal/activities/prompts-authoring.js +87 -0
- package/dist/temporal/activities/prompts-authoring.js.map +1 -0
- package/dist/temporal/activities/prompts-verifier.d.ts +17 -0
- package/dist/temporal/activities/prompts-verifier.d.ts.map +1 -0
- package/dist/temporal/activities/prompts-verifier.js +66 -0
- package/dist/temporal/activities/prompts-verifier.js.map +1 -0
- package/dist/temporal/activities/provenance.d.ts +4 -0
- package/dist/temporal/activities/provenance.d.ts.map +1 -0
- package/dist/temporal/activities/provenance.js +18 -0
- package/dist/temporal/activities/provenance.js.map +1 -0
- package/dist/temporal/activities/replay.d.ts +20 -0
- package/dist/temporal/activities/replay.d.ts.map +1 -0
- package/dist/temporal/activities/replay.js +135 -0
- package/dist/temporal/activities/replay.js.map +1 -0
- package/dist/temporal/activities/round-outcome.d.ts +63 -0
- package/dist/temporal/activities/round-outcome.d.ts.map +1 -0
- package/dist/temporal/activities/round-outcome.js +127 -0
- package/dist/temporal/activities/round-outcome.js.map +1 -0
- package/dist/temporal/activities/runtime.d.ts +38 -0
- package/dist/temporal/activities/runtime.d.ts.map +1 -0
- package/dist/temporal/activities/runtime.js +146 -0
- package/dist/temporal/activities/runtime.js.map +1 -0
- package/dist/temporal/activities/session-verify.d.ts +45 -0
- package/dist/temporal/activities/session-verify.d.ts.map +1 -0
- package/dist/temporal/activities/session-verify.js +91 -0
- package/dist/temporal/activities/session-verify.js.map +1 -0
- package/dist/temporal/activities/submissions.d.ts +9 -0
- package/dist/temporal/activities/submissions.d.ts.map +1 -0
- package/dist/temporal/activities/submissions.js +28 -0
- package/dist/temporal/activities/submissions.js.map +1 -0
- package/dist/temporal/activities/task-compiler.d.ts +21 -0
- package/dist/temporal/activities/task-compiler.d.ts.map +1 -0
- package/dist/temporal/activities/task-compiler.js +63 -0
- package/dist/temporal/activities/task-compiler.js.map +1 -0
- package/dist/temporal/activities/types.d.ts +57 -0
- package/dist/temporal/activities/types.d.ts.map +1 -0
- package/dist/temporal/activities/types.js +2 -0
- package/dist/temporal/activities/types.js.map +1 -0
- package/dist/temporal/activities/verifier-material.d.ts +18 -0
- package/dist/temporal/activities/verifier-material.d.ts.map +1 -0
- package/dist/temporal/activities/verifier-material.js +49 -0
- package/dist/temporal/activities/verifier-material.js.map +1 -0
- package/dist/temporal/activities/verifier-outcome.d.ts +19 -0
- package/dist/temporal/activities/verifier-outcome.d.ts.map +1 -0
- package/dist/temporal/activities/verifier-outcome.js +70 -0
- package/dist/temporal/activities/verifier-outcome.js.map +1 -0
- package/dist/temporal/activities/verifier-round.d.ts +8 -0
- package/dist/temporal/activities/verifier-round.d.ts.map +1 -0
- package/dist/temporal/activities/verifier-round.js +110 -0
- package/dist/temporal/activities/verifier-round.js.map +1 -0
- package/dist/temporal/activities/verify-harbor.d.ts +15 -0
- package/dist/temporal/activities/verify-harbor.d.ts.map +1 -0
- package/dist/temporal/activities/verify-harbor.js +193 -0
- package/dist/temporal/activities/verify-harbor.js.map +1 -0
- package/dist/temporal/activities/verify.d.ts +11 -0
- package/dist/temporal/activities/verify.d.ts.map +1 -0
- package/dist/temporal/activities/verify.js +151 -0
- package/dist/temporal/activities/verify.js.map +1 -0
- package/dist/temporal/activities.d.ts +3 -51
- package/dist/temporal/activities.d.ts.map +1 -1
- package/dist/temporal/activities.js +2 -886
- package/dist/temporal/activities.js.map +1 -1
- package/dist/temporal/connection.d.ts.map +1 -1
- package/dist/temporal/connection.js +3 -2
- package/dist/temporal/connection.js.map +1 -1
- package/dist/temporal/worker-main.js +19 -3
- package/dist/temporal/worker-main.js.map +1 -1
- package/dist/temporal/workflow/activity-proxies.d.ts +3 -0
- package/dist/temporal/workflow/activity-proxies.d.ts.map +1 -0
- package/dist/temporal/workflow/activity-proxies.js +45 -0
- package/dist/temporal/workflow/activity-proxies.js.map +1 -0
- package/dist/temporal/workflow/authoring-stage.d.ts +5 -0
- package/dist/temporal/workflow/authoring-stage.d.ts.map +1 -0
- package/dist/temporal/workflow/authoring-stage.js +64 -0
- package/dist/temporal/workflow/authoring-stage.js.map +1 -0
- package/dist/temporal/workflow/candidate-tracker.d.ts +28 -0
- package/dist/temporal/workflow/candidate-tracker.d.ts.map +1 -0
- package/dist/temporal/workflow/candidate-tracker.js +85 -0
- package/dist/temporal/workflow/candidate-tracker.js.map +1 -0
- package/dist/temporal/workflow/candidate.d.ts +6 -0
- package/dist/temporal/workflow/candidate.d.ts.map +1 -0
- package/dist/temporal/workflow/candidate.js +54 -0
- package/dist/temporal/workflow/candidate.js.map +1 -0
- package/dist/temporal/workflow/discovery.d.ts +19 -0
- package/dist/temporal/workflow/discovery.d.ts.map +1 -0
- package/dist/temporal/workflow/discovery.js +137 -0
- package/dist/temporal/workflow/discovery.js.map +1 -0
- package/dist/temporal/workflow/failures.d.ts +5 -0
- package/dist/temporal/workflow/failures.d.ts.map +1 -0
- package/dist/temporal/workflow/failures.js +28 -0
- package/dist/temporal/workflow/failures.js.map +1 -0
- package/dist/temporal/workflow/run.d.ts +5 -0
- package/dist/temporal/workflow/run.d.ts.map +1 -0
- package/dist/temporal/workflow/run.js +154 -0
- package/dist/temporal/workflow/run.js.map +1 -0
- package/dist/temporal/workflow/stage.d.ts +26 -0
- package/dist/temporal/workflow/stage.d.ts.map +1 -0
- package/dist/temporal/workflow/stage.js +16 -0
- package/dist/temporal/workflow/stage.js.map +1 -0
- package/dist/temporal/workflow/verification-stage.d.ts +11 -0
- package/dist/temporal/workflow/verification-stage.d.ts.map +1 -0
- package/dist/temporal/workflow/verification-stage.js +20 -0
- package/dist/temporal/workflow/verification-stage.js.map +1 -0
- package/dist/temporal/workflow.d.ts +12 -4
- package/dist/temporal/workflow.d.ts.map +1 -1
- package/dist/temporal/workflow.js +38 -445
- package/dist/temporal/workflow.js.map +1 -1
- package/dist/verifier-fix.d.ts +20 -0
- package/dist/verifier-fix.d.ts.map +1 -0
- package/dist/verifier-fix.js +62 -0
- package/dist/verifier-fix.js.map +1 -0
- package/dist/verify-report.d.ts +9 -0
- package/dist/verify-report.d.ts.map +1 -0
- package/dist/verify-report.js +135 -0
- package/dist/verify-report.js.map +1 -0
- package/dist/viewer/archived-keys.d.ts +9 -0
- package/dist/viewer/archived-keys.d.ts.map +1 -0
- package/dist/viewer/archived-keys.js +36 -0
- package/dist/viewer/archived-keys.js.map +1 -0
- package/dist/viewer/archived.d.ts +20 -0
- package/dist/viewer/archived.d.ts.map +1 -0
- package/dist/viewer/archived.js +238 -0
- package/dist/viewer/archived.js.map +1 -0
- package/dist/viewer/artifacts.d.ts +8 -0
- package/dist/viewer/artifacts.d.ts.map +1 -0
- package/dist/viewer/artifacts.js +96 -0
- package/dist/viewer/artifacts.js.map +1 -0
- package/dist/viewer/bundle.d.ts +9 -0
- package/dist/viewer/bundle.d.ts.map +1 -0
- package/dist/viewer/bundle.js +79 -0
- package/dist/viewer/bundle.js.map +1 -0
- package/dist/viewer/candidates.d.ts +9 -0
- package/dist/viewer/candidates.d.ts.map +1 -0
- package/dist/viewer/candidates.js +137 -0
- package/dist/viewer/candidates.js.map +1 -0
- package/dist/viewer/local-server.d.ts +11 -0
- package/dist/viewer/local-server.d.ts.map +1 -0
- package/dist/viewer/local-server.js +64 -0
- package/dist/viewer/local-server.js.map +1 -0
- package/dist/viewer/task-files.d.ts +10 -0
- package/dist/viewer/task-files.d.ts.map +1 -0
- package/dist/viewer/task-files.js +120 -0
- package/dist/viewer/task-files.js.map +1 -0
- package/dist/viewer/types.d.ts +78 -0
- package/dist/viewer/types.d.ts.map +1 -0
- package/dist/viewer/types.js +36 -0
- package/dist/viewer/types.js.map +1 -0
- package/docs/api.md +168 -0
- package/docs/evaluations.md +42 -15
- package/docs/operations.md +254 -26
- package/docs/solver-evaluations.md +63 -0
- package/docs/task-construction.md +21 -11
- package/drizzle/0000_glossy_johnny_blaze.sql +97 -0
- package/drizzle/0001_evaluation_records.sql +5 -0
- package/drizzle/0002_task_deletion.sql +1 -0
- package/drizzle/0003_drop_repo_runs.sql +3 -0
- package/drizzle/0004_preserve_batch_runs.sql +8 -0
- package/drizzle/0005_api_keys.sql +15 -0
- package/drizzle/meta/0000_snapshot.json +776 -0
- package/drizzle/meta/0001_snapshot.json +807 -0
- package/drizzle/meta/0002_snapshot.json +813 -0
- package/drizzle/meta/0003_snapshot.json +726 -0
- package/drizzle/meta/0004_snapshot.json +813 -0
- package/drizzle/meta/0005_snapshot.json +919 -0
- package/drizzle/meta/_journal.json +48 -0
- package/package.json +39 -25
- package/src/extensions/authoring.ts +83 -72
- package/src/extensions/shared/deliverable.ts +153 -0
- package/src/extensions/shared/mailbox.ts +128 -0
- package/src/extensions/shared/schemas.ts +101 -0
- package/src/extensions/shared/static-check.ts +103 -0
- package/src/extensions/verifier.ts +88 -0
- package/src/skills/selfbench/SKILL.md +71 -13
- package/biome.json +0 -24
- package/dist/agent-smoke-main.d.ts +0 -3
- package/dist/agent-smoke-main.d.ts.map +0 -1
- package/dist/agent-smoke-main.js +0 -55
- package/dist/agent-smoke-main.js.map +0 -1
- package/dist/agent-smoke.d.ts +0 -18
- package/dist/agent-smoke.d.ts.map +0 -1
- package/dist/agent-smoke.js +0 -103
- package/dist/agent-smoke.js.map +0 -1
- package/dist/codex-review.d.ts +0 -41
- package/dist/codex-review.d.ts.map +0 -1
- package/dist/codex-review.js +0 -193
- package/dist/codex-review.js.map +0 -1
- package/dist/eval-main.d.ts +0 -3
- package/dist/eval-main.d.ts.map +0 -1
- package/dist/eval-main.js +0 -81
- package/dist/eval-main.js.map +0 -1
- package/dist/evaluate.d.ts +0 -25
- package/dist/evaluate.d.ts.map +0 -1
- package/dist/evaluate.js +0 -214
- package/dist/evaluate.js.map +0 -1
- package/dist/modal-auth.d.ts.map +0 -1
- package/dist/modal-auth.js.map +0 -1
- package/dist/reaudit-main.d.ts +0 -3
- package/dist/reaudit-main.d.ts.map +0 -1
- package/dist/reaudit-main.js +0 -158
- package/dist/reaudit-main.js.map +0 -1
- package/dist/repair-main.d.ts +0 -3
- package/dist/repair-main.d.ts.map +0 -1
- package/dist/repair-main.js +0 -171
- package/dist/repair-main.js.map +0 -1
- package/dist/review/assets/index-CZ3G759O.js +0 -1568
- package/dist/review/assets/index-DgSLzX8l.css +0 -1
- package/dist/sandbox/programs/prepare-repair.d.ts +0 -7
- package/dist/sandbox/programs/prepare-repair.d.ts.map +0 -1
- package/dist/sandbox/programs/prepare-repair.js.map +0 -1
- package/dist/sandbox/programs/repair.d.ts +0 -3
- package/dist/sandbox/programs/repair.d.ts.map +0 -1
- package/dist/sandbox/programs/repair.js +0 -100
- package/dist/sandbox/programs/repair.js.map +0 -1
- package/dist/sandbox/programs/review.d.ts +0 -2
- package/dist/sandbox/programs/review.d.ts.map +0 -1
- package/dist/sandbox/programs/review.js +0 -18
- package/dist/sandbox/programs/review.js.map +0 -1
- package/dist/sandbox/programs/validation-repair.d.ts +0 -3
- package/dist/sandbox/programs/validation-repair.d.ts.map +0 -1
- package/dist/sandbox/programs/validation-repair.js +0 -115
- package/dist/sandbox/programs/validation-repair.js.map +0 -1
- package/dist/sandbox-repair.bundle.js +0 -323
- package/dist/sandbox-review.bundle.js +0 -14462
- package/dist/validate-main.d.ts +0 -3
- package/dist/validate-main.d.ts.map +0 -1
- package/dist/validate-main.js +0 -143
- package/dist/validate-main.js.map +0 -1
- package/dist/validation-repair.d.ts +0 -10
- package/dist/validation-repair.d.ts.map +0 -1
- package/dist/validation-repair.js +0 -72
- package/dist/validation-repair.js.map +0 -1
- package/review/index.html +0 -14
- package/review/src/App.tsx +0 -338
- package/review/src/export-loader.test.ts +0 -57
- package/review/src/export-loader.ts +0 -151
- package/review/src/main.tsx +0 -15
- package/review/src/styles.css +0 -162
- package/review/src/types.ts +0 -47
- package/review/tsconfig.json +0 -16
- package/review/vite.config.ts +0 -20
- package/scripts/build-sandbox-programs.ts +0 -22
- package/scripts/verify-package.ts +0 -102
- package/scripts/write-build-metadata.ts +0 -27
- package/src/agent-smoke-main.ts +0 -64
- package/src/agent-smoke.ts +0 -138
- package/src/api-main.ts +0 -12
- package/src/api.ts +0 -291
- package/src/artifacts.ts +0 -357
- package/src/audit.ts +0 -106
- package/src/build-metadata.ts +0 -3
- package/src/cli.ts +0 -504
- package/src/codex-review.ts +0 -229
- package/src/config.ts +0 -239
- package/src/contracts.ts +0 -233
- package/src/coupling.ts +0 -259
- package/src/eval-main.ts +0 -93
- package/src/evaluate.ts +0 -300
- package/src/github.ts +0 -26
- package/src/harbor-environment.ts +0 -17
- package/src/harbor-results.ts +0 -144
- package/src/harbor-task.ts +0 -533
- package/src/hash.ts +0 -5
- package/src/modal-auth.ts +0 -11
- package/src/parallel.ts +0 -24
- package/src/process.ts +0 -167
- package/src/project-paths.ts +0 -15
- package/src/provenance-associations.ts +0 -311
- package/src/provenance.ts +0 -561
- package/src/providers.ts +0 -22
- package/src/reaudit-main.ts +0 -198
- package/src/repair-main.ts +0 -209
- package/src/repair.ts +0 -55
- package/src/run-wait.ts +0 -40
- package/src/sandbox/contracts.ts +0 -52
- package/src/sandbox/index.ts +0 -23
- package/src/sandbox/programs/author.ts +0 -19
- package/src/sandbox/programs/prepare-repair.ts +0 -44
- package/src/sandbox/programs/repair.ts +0 -132
- package/src/sandbox/programs/review.ts +0 -19
- package/src/sandbox/programs/validation-repair.ts +0 -153
- package/src/sandbox/providers/docker/executor.ts +0 -115
- package/src/sandbox/providers/modal/executor.ts +0 -217
- package/src/sandbox/providers/vercel/command.ts +0 -127
- package/src/sandbox/providers/vercel/executor.ts +0 -448
- package/src/sandbox/providers/vercel/fetch.ts +0 -45
- package/src/sandbox/timeout.ts +0 -56
- package/src/setup/vercel/cli.ts +0 -403
- package/src/setup/vercel/index.ts +0 -3
- package/src/setup/vercel/probe.ts +0 -232
- package/src/setup/vercel/profile.ts +0 -322
- package/src/setup/vercel/runtime-image.ts +0 -204
- package/src/setup/vercel/setup.ts +0 -419
- package/src/subscription-auth.ts +0 -80
- package/src/temporal/activities.ts +0 -1348
- package/src/temporal/connection.ts +0 -23
- package/src/temporal/worker-main.ts +0 -28
- package/src/temporal/workflow.ts +0 -568
- package/src/terminal-prompts.ts +0 -197
- package/src/terminal-reporter.ts +0 -126
- package/src/validate-main.ts +0 -177
- package/src/validation-repair.ts +0 -94
- package/tsconfig.build.json +0 -13
- package/tsconfig.json +0 -21
|
@@ -0,0 +1,1679 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-DlhNcFeZ.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/chapel-DTp_pixX.js","assets/c-BIGW1oBm.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-BMRokrvK.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-DXfck5VN.js","assets/ruby-C0TQ7zu5.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-TyuKm33G.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DqcFQ5yU.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-BWmVpMyf.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-2-FPmUDs.js","assets/haxe-CfZj7gIn.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-5Bft2YPA.js","assets/r-Cf5RLm7j.js","assets/just-Cwhn7H3k.js","assets/perl-B9cMNwum.js","assets/latex-D5pSuvFb.js","assets/tex-D96PA37w.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-D1_yUvq7.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/org-DM6o9KBp.js","assets/ini-BEwlwnbL.js","assets/make-CHLpvVh8.js","assets/php-Csjmro_R.js","assets/vb-Cu-pLBUe.js","assets/clojure-P80f7IUj.js","assets/objective-c-DXmwc3jG.js","assets/docker-BcOcwvcX.js","assets/go-C27-OAKa.js","assets/groovy-gcz8RCvz.js","assets/raku-DXvB9xmW.js","assets/rust-B1yitclQ.js","assets/scala-CqE71os6.js","assets/csharp-DSvCPggb.js","assets/dart-bE4Kk8sk.js","assets/ocaml-C0hk2d4L.js","assets/zig-VOosw3JB.js","assets/xsl-CtQFsRM5.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/rst-bs7f0vWN.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Cjom0U5J.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/ts-tags-D351s5mN.js","assets/twig-27uCiNez.js","assets/typst-BUadGCkm.js","assets/bat-CickPsom.js","assets/bibtex-CHM0blh-.js","assets/jsonc-Des-eS-w.js","assets/log-2UxHyX5q.js","assets/powershell-BmBUJMz7.js","assets/swift-C2oV4EkX.js","assets/verilog-nZwndyjY.js","assets/system-verilog-0hqHdDBg.js","assets/vue-BqiEGhQt.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var iS=e=>{throw TypeError(e)};var aS=(e,t,n)=>t.has(e)||iS("Cannot "+n);var Wt=(e,t,n)=>(aS(e,t,"read from private field"),n?n.call(e):t.get(e)),oS=(e,t,n)=>t.has(e)?iS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),sp=(e,t,n,r)=>(aS(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function yL(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();function xL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lp={exports:{}},yl={};var sS;function _L(){if(sS)return yl;sS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var l=null;if(s!==void 0&&(l=""+s),a.key!==void 0&&(l=""+a.key),"key"in a){s={};for(var d in a)d!=="key"&&(s[d]=a[d])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:s}}return yl.Fragment=t,yl.jsx=n,yl.jsxs=n,yl}var lS;function SL(){return lS||(lS=1,lp.exports=_L()),lp.exports}var h=SL(),cp={exports:{}},Ce={};var cS;function wL(){if(cS)return Ce;cS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),v=Symbol.iterator;function y(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function k(P,ee,le){this.props=P,this.context=ee,this.refs=E,this.updater=le||_}k.prototype.isReactComponent={},k.prototype.setState=function(P,ee){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,ee,"setState")},k.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function C(){}C.prototype=k.prototype;function A(P,ee,le){this.props=P,this.context=ee,this.refs=E,this.updater=le||_}var O=A.prototype=new C;O.constructor=A,S(O,k.prototype),O.isPureReactComponent=!0;var L=Array.isArray;function T(){}var D={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function B(P,ee,le){var de=le.ref;return{$$typeof:e,type:P,key:ee,ref:de!==void 0?de:null,props:le}}function Y(P,ee){return B(P.type,ee,P.props)}function F(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function $(P){var ee={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(le){return ee[le]})}var q=/\/+/g;function ne(P,ee){return typeof P=="object"&&P!==null&&P.key!=null?$(""+P.key):ee.toString(36)}function se(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(T,T):(P.status="pending",P.then(function(ee){P.status==="pending"&&(P.status="fulfilled",P.value=ee)},function(ee){P.status==="pending"&&(P.status="rejected",P.reason=ee)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function z(P,ee,le,de,ce){var fe=typeof P;(fe==="undefined"||fe==="boolean")&&(P=null);var ye=!1;if(P===null)ye=!0;else switch(fe){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(P.$$typeof){case e:case t:ye=!0;break;case g:return ye=P._init,z(ye(P._payload),ee,le,de,ce)}}if(ye)return ce=ce(P),ye=de===""?"."+ne(P,0):de,L(ce)?(le="",ye!=null&&(le=ye.replace(q,"$&/")+"/"),z(ce,ee,le,"",function(Ke){return Ke})):ce!=null&&(F(ce)&&(ce=Y(ce,le+(ce.key==null||P&&P.key===ce.key?"":(""+ce.key).replace(q,"$&/")+"/")+ye)),ee.push(ce)),1;ye=0;var Re=de===""?".":de+":";if(L(P))for(var he=0;he<P.length;he++)de=P[he],fe=Re+ne(de,he),ye+=z(de,ee,le,fe,ce);else if(he=y(P),typeof he=="function")for(P=he.call(P),he=0;!(de=P.next()).done;)de=de.value,fe=Re+ne(de,he++),ye+=z(de,ee,le,fe,ce);else if(fe==="object"){if(typeof P.then=="function")return z(se(P),ee,le,de,ce);throw ee=String(P),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.")}return ye}function G(P,ee,le){if(P==null)return P;var de=[],ce=0;return z(P,de,"","",function(fe){return ee.call(le,fe,ce++)}),de}function ie(P){if(P._status===-1){var ee=P._result;ee=ee(),ee.then(function(le){(P._status===0||P._status===-1)&&(P._status=1,P._result=le)},function(le){(P._status===0||P._status===-1)&&(P._status=2,P._result=le)}),P._status===-1&&(P._status=0,P._result=ee)}if(P._status===1)return P._result.default;throw P._result}var J=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ee=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(ee))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},Z={map:G,forEach:function(P,ee,le){G(P,function(){ee.apply(this,arguments)},le)},count:function(P){var ee=0;return G(P,function(){ee++}),ee},toArray:function(P){return G(P,function(ee){return ee})||[]},only:function(P){if(!F(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Ce.Activity=p,Ce.Children=Z,Ce.Component=k,Ce.Fragment=n,Ce.Profiler=a,Ce.PureComponent=A,Ce.StrictMode=r,Ce.Suspense=u,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(P){return D.H.useMemoCache(P)}},Ce.cache=function(P){return function(){return P.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(P,ee,le){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var de=S({},P.props),ce=P.key;if(ee!=null)for(fe in ee.key!==void 0&&(ce=""+ee.key),ee)!M.call(ee,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&ee.ref===void 0||(de[fe]=ee[fe]);var fe=arguments.length-2;if(fe===1)de.children=le;else if(1<fe){for(var ye=Array(fe),Re=0;Re<fe;Re++)ye[Re]=arguments[Re+2];de.children=ye}return B(P.type,ce,de)},Ce.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:s,_context:P},P},Ce.createElement=function(P,ee,le){var de,ce={},fe=null;if(ee!=null)for(de in ee.key!==void 0&&(fe=""+ee.key),ee)M.call(ee,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(ce[de]=ee[de]);var ye=arguments.length-2;if(ye===1)ce.children=le;else if(1<ye){for(var Re=Array(ye),he=0;he<ye;he++)Re[he]=arguments[he+2];ce.children=Re}if(P&&P.defaultProps)for(de in ye=P.defaultProps,ye)ce[de]===void 0&&(ce[de]=ye[de]);return B(P,fe,ce)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(P){return{$$typeof:d,render:P}},Ce.isValidElement=F,Ce.lazy=function(P){return{$$typeof:g,_payload:{_status:-1,_result:P},_init:ie}},Ce.memo=function(P,ee){return{$$typeof:m,type:P,compare:ee===void 0?null:ee}},Ce.startTransition=function(P){var ee=D.T,le={};D.T=le;try{var de=P(),ce=D.S;ce!==null&&ce(le,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(T,J)}catch(fe){J(fe)}finally{ee!==null&&le.types!==null&&(ee.types=le.types),D.T=ee}},Ce.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Ce.use=function(P){return D.H.use(P)},Ce.useActionState=function(P,ee,le){return D.H.useActionState(P,ee,le)},Ce.useCallback=function(P,ee){return D.H.useCallback(P,ee)},Ce.useContext=function(P){return D.H.useContext(P)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(P,ee){return D.H.useDeferredValue(P,ee)},Ce.useEffect=function(P,ee){return D.H.useEffect(P,ee)},Ce.useEffectEvent=function(P){return D.H.useEffectEvent(P)},Ce.useId=function(){return D.H.useId()},Ce.useImperativeHandle=function(P,ee,le){return D.H.useImperativeHandle(P,ee,le)},Ce.useInsertionEffect=function(P,ee){return D.H.useInsertionEffect(P,ee)},Ce.useLayoutEffect=function(P,ee){return D.H.useLayoutEffect(P,ee)},Ce.useMemo=function(P,ee){return D.H.useMemo(P,ee)},Ce.useOptimistic=function(P,ee){return D.H.useOptimistic(P,ee)},Ce.useReducer=function(P,ee,le){return D.H.useReducer(P,ee,le)},Ce.useRef=function(P){return D.H.useRef(P)},Ce.useState=function(P){return D.H.useState(P)},Ce.useSyncExternalStore=function(P,ee,le){return D.H.useSyncExternalStore(P,ee,le)},Ce.useTransition=function(){return D.H.useTransition()},Ce.version="19.2.7",Ce}var uS;function Ob(){return uS||(uS=1,cp.exports=wL()),cp.exports}var R=Ob();const U=xL(R),fs=yL({__proto__:null,default:U},[R]);var up={exports:{}},xl={},dp={exports:{}},fp={};var dS;function EL(){return dS||(dS=1,(function(e){function t(z,G){var ie=z.length;z.push(G);e:for(;0<ie;){var J=ie-1>>>1,Z=z[J];if(0<a(Z,G))z[J]=G,z[ie]=Z,ie=J;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var G=z[0],ie=z.pop();if(ie!==G){z[0]=ie;e:for(var J=0,Z=z.length,P=Z>>>1;J<P;){var ee=2*(J+1)-1,le=z[ee],de=ee+1,ce=z[de];if(0>a(le,ie))de<Z&&0>a(ce,le)?(z[J]=ce,z[de]=ie,J=de):(z[J]=le,z[ee]=ie,J=ee);else if(de<Z&&0>a(ce,ie))z[J]=ce,z[de]=ie,J=de;else break e}}return G}function a(z,G){var ie=z.sortIndex-G.sortIndex;return ie!==0?ie:z.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,d=l.now();e.unstable_now=function(){return l.now()-d}}var u=[],m=[],g=1,p=null,v=3,y=!1,_=!1,S=!1,E=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function O(z){for(var G=n(m);G!==null;){if(G.callback===null)r(m);else if(G.startTime<=z)r(m),G.sortIndex=G.expirationTime,t(u,G);else break;G=n(m)}}function L(z){if(S=!1,O(z),!_)if(n(u)!==null)_=!0,T||(T=!0,$());else{var G=n(m);G!==null&&se(L,G.startTime-z)}}var T=!1,D=-1,M=5,B=-1;function Y(){return E?!0:!(e.unstable_now()-B<M)}function F(){if(E=!1,T){var z=e.unstable_now();B=z;var G=!0;try{e:{_=!1,S&&(S=!1,C(D),D=-1),y=!0;var ie=v;try{t:{for(O(z),p=n(u);p!==null&&!(p.expirationTime>z&&Y());){var J=p.callback;if(typeof J=="function"){p.callback=null,v=p.priorityLevel;var Z=J(p.expirationTime<=z);if(z=e.unstable_now(),typeof Z=="function"){p.callback=Z,O(z),G=!0;break t}p===n(u)&&r(u),O(z)}else r(u);p=n(u)}if(p!==null)G=!0;else{var P=n(m);P!==null&&se(L,P.startTime-z),G=!1}}break e}finally{p=null,v=ie,y=!1}G=void 0}}finally{G?$():T=!1}}}var $;if(typeof A=="function")$=function(){A(F)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,ne=q.port2;q.port1.onmessage=F,$=function(){ne.postMessage(null)}}else $=function(){k(F,0)};function se(z,G){D=k(function(){z(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(z){switch(v){case 1:case 2:case 3:var G=3;break;default:G=v}var ie=v;v=G;try{return z()}finally{v=ie}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(z,G){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ie=v;v=z;try{return G()}finally{v=ie}},e.unstable_scheduleCallback=function(z,G,ie){var J=e.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?J+ie:J):ie=J,z){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=ie+Z,z={id:g++,callback:G,priorityLevel:z,startTime:ie,expirationTime:Z,sortIndex:-1},ie>J?(z.sortIndex=ie,t(m,z),n(u)===null&&z===n(m)&&(S?(C(D),D=-1):S=!0,se(L,ie-J))):(z.sortIndex=Z,t(u,z),_||y||(_=!0,T||(T=!0,$()))),z},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(z){var G=v;return function(){var ie=v;v=G;try{return z.apply(this,arguments)}finally{v=ie}}}})(fp)),fp}var fS;function CL(){return fS||(fS=1,dp.exports=EL()),dp.exports}var hp={exports:{}},Yt={};var hS;function kL(){if(hS)return Yt;hS=1;var e=Ob();function t(u){var m="https://react.dev/errors/"+u;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+u+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(u,m,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:u,containerInfo:m,implementation:g}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(u,m){if(u==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Yt.createPortal=function(u,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return s(u,m,null,g)},Yt.flushSync=function(u){var m=l.T,g=r.p;try{if(l.T=null,r.p=2,u)return u()}finally{l.T=m,r.p=g,r.d.f()}},Yt.preconnect=function(u,m){typeof u=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(u,m))},Yt.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Yt.preinit=function(u,m){if(typeof u=="string"&&m&&typeof m.as=="string"){var g=m.as,p=d(g,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,y=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?r.d.S(u,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:v,fetchPriority:y}):g==="script"&&r.d.X(u,{crossOrigin:p,integrity:v,fetchPriority:y,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Yt.preinitModule=function(u,m){if(typeof u=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=d(m.as,m.crossOrigin);r.d.M(u,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(u)},Yt.preload=function(u,m){if(typeof u=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,p=d(g,m.crossOrigin);r.d.L(u,g,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Yt.preloadModule=function(u,m){if(typeof u=="string")if(m){var g=d(m.as,m.crossOrigin);r.d.m(u,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(u)},Yt.requestFormReset=function(u){r.d.r(u)},Yt.unstable_batchedUpdates=function(u,m){return u(m)},Yt.useFormState=function(u,m,g){return l.H.useFormState(u,m,g)},Yt.useFormStatus=function(){return l.H.useHostTransitionStatus()},Yt.version="19.2.7",Yt}var mS;function ME(){if(mS)return hp.exports;mS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hp.exports=kL(),hp.exports}var pS;function RL(){if(pS)return xl;pS=1;var e=CL(),t=Ob(),n=ME();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var o=i,c=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(c=o.return),i=o.return;while(i)}return o.tag===3?c:null}function l(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function d(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function u(i){if(s(i)!==i)throw Error(r(188))}function m(i){var o=i.alternate;if(!o){if(o=s(i),o===null)throw Error(r(188));return o!==i?null:i}for(var c=i,f=o;;){var b=c.return;if(b===null)break;var x=b.alternate;if(x===null){if(f=b.return,f!==null){c=f;continue}break}if(b.child===x.child){for(x=b.child;x;){if(x===c)return u(b),i;if(x===f)return u(b),o;x=x.sibling}throw Error(r(188))}if(c.return!==f.return)c=b,f=x;else{for(var w=!1,j=b.child;j;){if(j===c){w=!0,c=b,f=x;break}if(j===f){w=!0,f=b,c=x;break}j=j.sibling}if(!w){for(j=x.child;j;){if(j===c){w=!0,c=x,f=b;break}if(j===f){w=!0,f=x,c=b;break}j=j.sibling}if(!w)throw Error(r(189))}}if(c.alternate!==f)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:o}function g(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=g(i),o!==null)return o;i=i.sibling}return null}var p=Object.assign,v=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),A=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),Y=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function $(i){return i===null||typeof i!="object"?null:(i=F&&i[F]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function ne(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case k:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case T:return"SuspenseList";case B:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case _:return"Portal";case A:return i.displayName||"Context";case C:return(i._context.displayName||"Context")+".Consumer";case O:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case D:return o=i.displayName||null,o!==null?o:ne(i.type)||"Memo";case M:o=i._payload,i=i._init;try{return ne(i(o))}catch{}}return null}var se=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},J=[],Z=-1;function P(i){return{current:i}}function ee(i){0>Z||(i.current=J[Z],J[Z]=null,Z--)}function le(i,o){Z++,J[Z]=i.current,i.current=o}var de=P(null),ce=P(null),fe=P(null),ye=P(null);function Re(i,o){switch(le(fe,o),le(ce,i),le(de,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?R_(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=R_(o),i=A_(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}ee(de),le(de,i)}function he(){ee(de),ee(ce),ee(fe)}function Ke(i){i.memoizedState!==null&&le(ye,i);var o=de.current,c=A_(o,i.type);o!==c&&(le(ce,i),le(de,c))}function Be(i){ce.current===i&&(ee(de),ee(ce)),ye.current===i&&(ee(ye),pl._currentValue=ie)}var Ot,Et;function nt(i){if(Ot===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);Ot=o&&o[1]||"",Et=-1<c.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+Ot+i+Et}var an=!1;function Ut(i,o){if(!i||an)return"";an=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(o){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(Q){var X=Q}Reflect.construct(i,[],oe)}else{try{oe.call()}catch(Q){X=Q}i.call(oe.prototype)}}else{try{throw Error()}catch(Q){X=Q}(oe=i())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(Q){if(Q&&X&&typeof Q.stack=="string")return[Q.stack,X.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=f.DetermineComponentFrameRoot(),w=x[0],j=x[1];if(w&&j){var I=w.split(`
|
|
5
|
+
`),K=j.split(`
|
|
6
|
+
`);for(b=f=0;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;for(;b<K.length&&!K[b].includes("DetermineComponentFrameRoot");)b++;if(f===I.length||b===K.length)for(f=I.length-1,b=K.length-1;1<=f&&0<=b&&I[f]!==K[b];)b--;for(;1<=f&&0<=b;f--,b--)if(I[f]!==K[b]){if(f!==1||b!==1)do if(f--,b--,0>b||I[f]!==K[b]){var te=`
|
|
7
|
+
`+I[f].replace(" at new "," at ");return i.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",i.displayName)),te}while(1<=f&&0<=b);break}}}finally{an=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?nt(c):""}function ks(i,o){switch(i.tag){case 26:case 27:case 5:return nt(i.type);case 16:return nt("Lazy");case 13:return i.child!==o&&o!==null?nt("Suspense Fallback"):nt("Suspense");case 19:return nt("SuspenseList");case 0:case 15:return Ut(i.type,!1);case 11:return Ut(i.type.render,!1);case 1:return Ut(i.type,!0);case 31:return nt("Activity");default:return""}}function Qa(i){try{var o="",c=null;do o+=ks(i,c),c=i,i=i.return;while(i);return o}catch(f){return`
|
|
8
|
+
Error generating stack: `+f.message+`
|
|
9
|
+
`+f.stack}}var qf=Object.prototype.hasOwnProperty,Zf=e.unstable_scheduleCallback,Wf=e.unstable_cancelCallback,XN=e.unstable_shouldYield,QN=e.unstable_requestPaint,vn=e.unstable_now,JN=e.unstable_getCurrentPriorityLevel,ay=e.unstable_ImmediatePriority,oy=e.unstable_UserBlockingPriority,pc=e.unstable_NormalPriority,e2=e.unstable_LowPriority,sy=e.unstable_IdlePriority,t2=e.log,n2=e.unstable_setDisableYieldValue,Rs=null,yn=null;function vi(i){if(typeof t2=="function"&&n2(i),yn&&typeof yn.setStrictMode=="function")try{yn.setStrictMode(Rs,i)}catch{}}var xn=Math.clz32?Math.clz32:a2,r2=Math.log,i2=Math.LN2;function a2(i){return i>>>=0,i===0?32:31-(r2(i)/i2|0)|0}var gc=256,bc=262144,vc=4194304;function ca(i){var o=i&42;if(o!==0)return o;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function yc(i,o,c){var f=i.pendingLanes;if(f===0)return 0;var b=0,x=i.suspendedLanes,w=i.pingedLanes;i=i.warmLanes;var j=f&134217727;return j!==0?(f=j&~x,f!==0?b=ca(f):(w&=j,w!==0?b=ca(w):c||(c=j&~i,c!==0&&(b=ca(c))))):(j=f&~x,j!==0?b=ca(j):w!==0?b=ca(w):c||(c=f&~i,c!==0&&(b=ca(c)))),b===0?0:o!==0&&o!==b&&(o&x)===0&&(x=b&-b,c=o&-o,x>=c||x===32&&(c&4194048)!==0)?o:b}function As(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function o2(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ly(){var i=vc;return vc<<=1,(vc&62914560)===0&&(vc=4194304),i}function Yf(i){for(var o=[],c=0;31>c;c++)o.push(i);return o}function Ts(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function s2(i,o,c,f,b,x){var w=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var j=i.entanglements,I=i.expirationTimes,K=i.hiddenUpdates;for(c=w&~c;0<c;){var te=31-xn(c),oe=1<<te;j[te]=0,I[te]=-1;var X=K[te];if(X!==null)for(K[te]=null,te=0;te<X.length;te++){var Q=X[te];Q!==null&&(Q.lane&=-536870913)}c&=~oe}f!==0&&cy(i,f,0),x!==0&&b===0&&i.tag!==0&&(i.suspendedLanes|=x&~(w&~o))}function cy(i,o,c){i.pendingLanes|=o,i.suspendedLanes&=~o;var f=31-xn(o);i.entangledLanes|=o,i.entanglements[f]=i.entanglements[f]|1073741824|c&261930}function uy(i,o){var c=i.entangledLanes|=o;for(i=i.entanglements;c;){var f=31-xn(c),b=1<<f;b&o|i[f]&o&&(i[f]|=o),c&=~b}}function dy(i,o){var c=o&-o;return c=(c&42)!==0?1:Kf(c),(c&(i.suspendedLanes|o))!==0?0:c}function Kf(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Xf(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function fy(){var i=G.p;return i!==0?i:(i=window.event,i===void 0?32:X_(i.type))}function hy(i,o){var c=G.p;try{return G.p=i,o()}finally{G.p=c}}var yi=Math.random().toString(36).slice(2),Ht="__reactFiber$"+yi,on="__reactProps$"+yi,Ja="__reactContainer$"+yi,Qf="__reactEvents$"+yi,l2="__reactListeners$"+yi,c2="__reactHandles$"+yi,my="__reactResources$"+yi,Ns="__reactMarker$"+yi;function Jf(i){delete i[Ht],delete i[on],delete i[Qf],delete i[l2],delete i[c2]}function eo(i){var o=i[Ht];if(o)return o;for(var c=i.parentNode;c;){if(o=c[Ja]||c[Ht]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(i=I_(i);i!==null;){if(c=i[Ht])return c;i=I_(i)}return o}i=c,c=i.parentNode}return null}function to(i){if(i=i[Ht]||i[Ja]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function js(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function no(i){var o=i[my];return o||(o=i[my]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Dt(i){i[Ns]=!0}var py=new Set,gy={};function ua(i,o){ro(i,o),ro(i+"Capture",o)}function ro(i,o){for(gy[i]=o,i=0;i<o.length;i++)py.add(o[i])}var u2=RegExp("^[: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]*$"),by={},vy={};function d2(i){return qf.call(vy,i)?!0:qf.call(by,i)?!1:u2.test(i)?vy[i]=!0:(by[i]=!0,!1)}function xc(i,o,c){if(d2(o))if(c===null)i.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var f=o.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+c)}}function _c(i,o,c){if(c===null)i.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+c)}}function Lr(i,o,c,f){if(f===null)i.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(o,c,""+f)}}function In(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function yy(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function f2(i,o,c){var f=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var b=f.get,x=f.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return b.call(this)},set:function(w){c=""+w,x.call(this,w)}}),Object.defineProperty(i,o,{enumerable:f.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function eh(i){if(!i._valueTracker){var o=yy(i)?"checked":"value";i._valueTracker=f2(i,o,""+i[o])}}function xy(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var c=o.getValue(),f="";return i&&(f=yy(i)?i.checked?"true":"false":i.value),i=f,i!==c?(o.setValue(i),!0):!1}function Sc(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var h2=/[\n"\\]/g;function Mn(i){return i.replace(h2,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function th(i,o,c,f,b,x,w,j){i.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?i.type=w:i.removeAttribute("type"),o!=null?w==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+In(o)):i.value!==""+In(o)&&(i.value=""+In(o)):w!=="submit"&&w!=="reset"||i.removeAttribute("value"),o!=null?nh(i,w,In(o)):c!=null?nh(i,w,In(c)):f!=null&&i.removeAttribute("value"),b==null&&x!=null&&(i.defaultChecked=!!x),b!=null&&(i.checked=b&&typeof b!="function"&&typeof b!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?i.name=""+In(j):i.removeAttribute("name")}function _y(i,o,c,f,b,x,w,j){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.type=x),o!=null||c!=null){if(!(x!=="submit"&&x!=="reset"||o!=null)){eh(i);return}c=c!=null?""+In(c):"",o=o!=null?""+In(o):c,j||o===i.value||(i.value=o),i.defaultValue=o}f=f??b,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=j?i.checked:!!f,i.defaultChecked=!!f,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.name=w),eh(i)}function nh(i,o,c){o==="number"&&Sc(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function io(i,o,c,f){if(i=i.options,o){o={};for(var b=0;b<c.length;b++)o["$"+c[b]]=!0;for(c=0;c<i.length;c++)b=o.hasOwnProperty("$"+i[c].value),i[c].selected!==b&&(i[c].selected=b),b&&f&&(i[c].defaultSelected=!0)}else{for(c=""+In(c),o=null,b=0;b<i.length;b++){if(i[b].value===c){i[b].selected=!0,f&&(i[b].defaultSelected=!0);return}o!==null||i[b].disabled||(o=i[b])}o!==null&&(o.selected=!0)}}function Sy(i,o,c){if(o!=null&&(o=""+In(o),o!==i.value&&(i.value=o),c==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=c!=null?""+In(c):""}function wy(i,o,c,f){if(o==null){if(f!=null){if(c!=null)throw Error(r(92));if(se(f)){if(1<f.length)throw Error(r(93));f=f[0]}c=f}c==null&&(c=""),o=c}c=In(o),i.defaultValue=c,f=i.textContent,f===c&&f!==""&&f!==null&&(i.value=f),eh(i)}function ao(i,o){if(o){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=o;return}}i.textContent=o}var m2=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ey(i,o,c){var f=o.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?f?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":f?i.setProperty(o,c):typeof c!="number"||c===0||m2.has(o)?o==="float"?i.cssFloat=c:i[o]=(""+c).trim():i[o]=c+"px"}function Cy(i,o,c){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,c!=null){for(var f in c)!c.hasOwnProperty(f)||o!=null&&o.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var b in o)f=o[b],o.hasOwnProperty(b)&&c[b]!==f&&Ey(i,b,f)}else for(var x in o)o.hasOwnProperty(x)&&Ey(i,x,o[x])}function rh(i){if(i.indexOf("-")===-1)return!1;switch(i){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 p2=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),g2=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wc(i){return g2.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Or(){}var ih=null;function ah(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var oo=null,so=null;function ky(i){var o=to(i);if(o&&(i=o.stateNode)){var c=i[on]||null;e:switch(i=o.stateNode,o.type){case"input":if(th(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),o=c.name,c.type==="radio"&&o!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Mn(""+o)+'"][type="radio"]'),o=0;o<c.length;o++){var f=c[o];if(f!==i&&f.form===i.form){var b=f[on]||null;if(!b)throw Error(r(90));th(f,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(o=0;o<c.length;o++)f=c[o],f.form===i.form&&xy(f)}break e;case"textarea":Sy(i,c.value,c.defaultValue);break e;case"select":o=c.value,o!=null&&io(i,!!c.multiple,o,!1)}}}var oh=!1;function Ry(i,o,c){if(oh)return i(o,c);oh=!0;try{var f=i(o);return f}finally{if(oh=!1,(oo!==null||so!==null)&&(uu(),oo&&(o=oo,i=so,so=oo=null,ky(o),i)))for(o=0;o<i.length;o++)ky(i[o])}}function Ls(i,o){var c=i.stateNode;if(c===null)return null;var f=c[on]||null;if(f===null)return null;c=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,o,typeof c));return c}var Dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sh=!1;if(Dr)try{var Os={};Object.defineProperty(Os,"passive",{get:function(){sh=!0}}),window.addEventListener("test",Os,Os),window.removeEventListener("test",Os,Os)}catch{sh=!1}var xi=null,lh=null,Ec=null;function Ay(){if(Ec)return Ec;var i,o=lh,c=o.length,f,b="value"in xi?xi.value:xi.textContent,x=b.length;for(i=0;i<c&&o[i]===b[i];i++);var w=c-i;for(f=1;f<=w&&o[c-f]===b[x-f];f++);return Ec=b.slice(i,1<f?1-f:void 0)}function Cc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function kc(){return!0}function Ty(){return!1}function sn(i){function o(c,f,b,x,w){this._reactName=c,this._targetInst=b,this.type=f,this.nativeEvent=x,this.target=w,this.currentTarget=null;for(var j in i)i.hasOwnProperty(j)&&(c=i[j],this[j]=c?c(x):x[j]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?kc:Ty,this.isPropagationStopped=Ty,this}return p(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=kc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=kc)},persist:function(){},isPersistent:kc}),o}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rc=sn(da),Ds=p({},da,{view:0,detail:0}),b2=sn(Ds),ch,uh,Is,Ac=p({},Ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fh,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Is&&(Is&&i.type==="mousemove"?(ch=i.screenX-Is.screenX,uh=i.screenY-Is.screenY):uh=ch=0,Is=i),ch)},movementY:function(i){return"movementY"in i?i.movementY:uh}}),Ny=sn(Ac),v2=p({},Ac,{dataTransfer:0}),y2=sn(v2),x2=p({},Ds,{relatedTarget:0}),dh=sn(x2),_2=p({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),S2=sn(_2),w2=p({},da,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),E2=sn(w2),C2=p({},da,{data:0}),jy=sn(C2),k2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R2={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"},A2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function T2(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=A2[i])?!!o[i]:!1}function fh(){return T2}var N2=p({},Ds,{key:function(i){if(i.key){var o=k2[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Cc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?R2[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fh,charCode:function(i){return i.type==="keypress"?Cc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Cc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),j2=sn(N2),L2=p({},Ac,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ly=sn(L2),O2=p({},Ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fh}),D2=sn(O2),I2=p({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),M2=sn(I2),P2=p({},Ac,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),z2=sn(P2),$2=p({},da,{newState:0,oldState:0}),U2=sn($2),H2=[9,13,27,32],hh=Dr&&"CompositionEvent"in window,Ms=null;Dr&&"documentMode"in document&&(Ms=document.documentMode);var B2=Dr&&"TextEvent"in window&&!Ms,Oy=Dr&&(!hh||Ms&&8<Ms&&11>=Ms),Dy=" ",Iy=!1;function My(i,o){switch(i){case"keyup":return H2.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Py(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var lo=!1;function V2(i,o){switch(i){case"compositionend":return Py(o);case"keypress":return o.which!==32?null:(Iy=!0,Dy);case"textInput":return i=o.data,i===Dy&&Iy?null:i;default:return null}}function F2(i,o){if(lo)return i==="compositionend"||!hh&&My(i,o)?(i=Ay(),Ec=lh=xi=null,lo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Oy&&o.locale!=="ko"?null:o.data;default:return null}}var G2={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 zy(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!G2[i.type]:o==="textarea"}function $y(i,o,c,f){oo?so?so.push(f):so=[f]:oo=f,o=bu(o,"onChange"),0<o.length&&(c=new Rc("onChange","change",null,c,f),i.push({event:c,listeners:o}))}var Ps=null,zs=null;function q2(i){__(i,0)}function Tc(i){var o=js(i);if(xy(o))return i}function Uy(i,o){if(i==="change")return o}var Hy=!1;if(Dr){var mh;if(Dr){var ph="oninput"in document;if(!ph){var By=document.createElement("div");By.setAttribute("oninput","return;"),ph=typeof By.oninput=="function"}mh=ph}else mh=!1;Hy=mh&&(!document.documentMode||9<document.documentMode)}function Vy(){Ps&&(Ps.detachEvent("onpropertychange",Fy),zs=Ps=null)}function Fy(i){if(i.propertyName==="value"&&Tc(zs)){var o=[];$y(o,zs,i,ah(i)),Ry(q2,o)}}function Z2(i,o,c){i==="focusin"?(Vy(),Ps=o,zs=c,Ps.attachEvent("onpropertychange",Fy)):i==="focusout"&&Vy()}function W2(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Tc(zs)}function Y2(i,o){if(i==="click")return Tc(o)}function K2(i,o){if(i==="input"||i==="change")return Tc(o)}function X2(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var _n=typeof Object.is=="function"?Object.is:X2;function $s(i,o){if(_n(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var c=Object.keys(i),f=Object.keys(o);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var b=c[f];if(!qf.call(o,b)||!_n(i[b],o[b]))return!1}return!0}function Gy(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function qy(i,o){var c=Gy(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=o&&f>=o)return{node:c,offset:o-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Gy(c)}}function Zy(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?Zy(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Wy(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=Sc(i.document);o instanceof i.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch{c=!1}if(c)i=o.contentWindow;else break;o=Sc(i.document)}return o}function gh(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var Q2=Dr&&"documentMode"in document&&11>=document.documentMode,co=null,bh=null,Us=null,vh=!1;function Yy(i,o,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;vh||co==null||co!==Sc(f)||(f=co,"selectionStart"in f&&gh(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Us&&$s(Us,f)||(Us=f,f=bu(bh,"onSelect"),0<f.length&&(o=new Rc("onSelect","select",null,o,c),i.push({event:o,listeners:f}),o.target=co)))}function fa(i,o){var c={};return c[i.toLowerCase()]=o.toLowerCase(),c["Webkit"+i]="webkit"+o,c["Moz"+i]="moz"+o,c}var uo={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionrun:fa("Transition","TransitionRun"),transitionstart:fa("Transition","TransitionStart"),transitioncancel:fa("Transition","TransitionCancel"),transitionend:fa("Transition","TransitionEnd")},yh={},Ky={};Dr&&(Ky=document.createElement("div").style,"AnimationEvent"in window||(delete uo.animationend.animation,delete uo.animationiteration.animation,delete uo.animationstart.animation),"TransitionEvent"in window||delete uo.transitionend.transition);function ha(i){if(yh[i])return yh[i];if(!uo[i])return i;var o=uo[i],c;for(c in o)if(o.hasOwnProperty(c)&&c in Ky)return yh[i]=o[c];return i}var Xy=ha("animationend"),Qy=ha("animationiteration"),Jy=ha("animationstart"),J2=ha("transitionrun"),ej=ha("transitionstart"),tj=ha("transitioncancel"),e0=ha("transitionend"),t0=new Map,xh="abort auxClick beforeToggle 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(" ");xh.push("scrollEnd");function tr(i,o){t0.set(i,o),ua(o,[i])}var Nc=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Pn=[],fo=0,_h=0;function jc(){for(var i=fo,o=_h=fo=0;o<i;){var c=Pn[o];Pn[o++]=null;var f=Pn[o];Pn[o++]=null;var b=Pn[o];Pn[o++]=null;var x=Pn[o];if(Pn[o++]=null,f!==null&&b!==null){var w=f.pending;w===null?b.next=b:(b.next=w.next,w.next=b),f.pending=b}x!==0&&n0(c,b,x)}}function Lc(i,o,c,f){Pn[fo++]=i,Pn[fo++]=o,Pn[fo++]=c,Pn[fo++]=f,_h|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function Sh(i,o,c,f){return Lc(i,o,c,f),Oc(i)}function ma(i,o){return Lc(i,null,null,o),Oc(i)}function n0(i,o,c){i.lanes|=c;var f=i.alternate;f!==null&&(f.lanes|=c);for(var b=!1,x=i.return;x!==null;)x.childLanes|=c,f=x.alternate,f!==null&&(f.childLanes|=c),x.tag===22&&(i=x.stateNode,i===null||i._visibility&1||(b=!0)),i=x,x=x.return;return i.tag===3?(x=i.stateNode,b&&o!==null&&(b=31-xn(c),i=x.hiddenUpdates,f=i[b],f===null?i[b]=[o]:f.push(o),o.lane=c|536870912),x):null}function Oc(i){if(50<ll)throw ll=0,jm=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var ho={};function nj(i,o,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(i,o,c,f){return new nj(i,o,c,f)}function wh(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Ir(i,o){var c=i.alternate;return c===null?(c=Sn(i.tag,o,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=o,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,o=i.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function r0(i,o){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,o=c.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function Dc(i,o,c,f,b,x){var w=0;if(f=i,typeof i=="function")wh(i)&&(w=1);else if(typeof i=="string")w=sL(i,c,de.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case B:return i=Sn(31,c,o,b),i.elementType=B,i.lanes=x,i;case S:return pa(c.children,b,x,o);case E:w=8,b|=24;break;case k:return i=Sn(12,c,o,b|2),i.elementType=k,i.lanes=x,i;case L:return i=Sn(13,c,o,b),i.elementType=L,i.lanes=x,i;case T:return i=Sn(19,c,o,b),i.elementType=T,i.lanes=x,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:w=10;break e;case C:w=9;break e;case O:w=11;break e;case D:w=14;break e;case M:w=16,f=null;break e}w=29,c=Error(r(130,i===null?"null":typeof i,"")),f=null}return o=Sn(w,c,o,b),o.elementType=i,o.type=f,o.lanes=x,o}function pa(i,o,c,f){return i=Sn(7,i,f,o),i.lanes=c,i}function Eh(i,o,c){return i=Sn(6,i,null,o),i.lanes=c,i}function i0(i){var o=Sn(18,null,null,0);return o.stateNode=i,o}function Ch(i,o,c){return o=Sn(4,i.children!==null?i.children:[],i.key,o),o.lanes=c,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var a0=new WeakMap;function zn(i,o){if(typeof i=="object"&&i!==null){var c=a0.get(i);return c!==void 0?c:(o={value:i,source:o,stack:Qa(o)},a0.set(i,o),o)}return{value:i,source:o,stack:Qa(o)}}var mo=[],po=0,Ic=null,Hs=0,$n=[],Un=0,_i=null,dr=1,fr="";function Mr(i,o){mo[po++]=Hs,mo[po++]=Ic,Ic=i,Hs=o}function o0(i,o,c){$n[Un++]=dr,$n[Un++]=fr,$n[Un++]=_i,_i=i;var f=dr;i=fr;var b=32-xn(f)-1;f&=~(1<<b),c+=1;var x=32-xn(o)+b;if(30<x){var w=b-b%5;x=(f&(1<<w)-1).toString(32),f>>=w,b-=w,dr=1<<32-xn(o)+b|c<<b|f,fr=x+i}else dr=1<<x|c<<b|f,fr=i}function kh(i){i.return!==null&&(Mr(i,1),o0(i,1,0))}function Rh(i){for(;i===Ic;)Ic=mo[--po],mo[po]=null,Hs=mo[--po],mo[po]=null;for(;i===_i;)_i=$n[--Un],$n[Un]=null,fr=$n[--Un],$n[Un]=null,dr=$n[--Un],$n[Un]=null}function s0(i,o){$n[Un++]=dr,$n[Un++]=fr,$n[Un++]=_i,dr=o.id,fr=o.overflow,_i=i}var Bt=null,rt=null,Me=!1,Si=null,Hn=!1,Ah=Error(r(519));function wi(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bs(zn(o,i)),Ah}function l0(i){var o=i.stateNode,c=i.type,f=i.memoizedProps;switch(o[Ht]=i,o[on]=f,c){case"dialog":Oe("cancel",o),Oe("close",o);break;case"iframe":case"object":case"embed":Oe("load",o);break;case"video":case"audio":for(c=0;c<ul.length;c++)Oe(ul[c],o);break;case"source":Oe("error",o);break;case"img":case"image":case"link":Oe("error",o),Oe("load",o);break;case"details":Oe("toggle",o);break;case"input":Oe("invalid",o),_y(o,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":Oe("invalid",o);break;case"textarea":Oe("invalid",o),wy(o,f.value,f.defaultValue,f.children)}c=f.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||o.textContent===""+c||f.suppressHydrationWarning===!0||C_(o.textContent,c)?(f.popover!=null&&(Oe("beforetoggle",o),Oe("toggle",o)),f.onScroll!=null&&Oe("scroll",o),f.onScrollEnd!=null&&Oe("scrollend",o),f.onClick!=null&&(o.onclick=Or),o=!0):o=!1,o||wi(i,!0)}function c0(i){for(Bt=i.return;Bt;)switch(Bt.tag){case 5:case 31:case 13:Hn=!1;return;case 27:case 3:Hn=!0;return;default:Bt=Bt.return}}function go(i){if(i!==Bt)return!1;if(!Me)return c0(i),Me=!0,!1;var o=i.tag,c;if((c=o!==3&&o!==27)&&((c=o===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||qm(i.type,i.memoizedProps)),c=!c),c&&rt&&wi(i),c0(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));rt=D_(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));rt=D_(i)}else o===27?(o=rt,Pi(i.type)?(i=Xm,Xm=null,rt=i):rt=o):rt=Bt?Vn(i.stateNode.nextSibling):null;return!0}function ga(){rt=Bt=null,Me=!1}function Th(){var i=Si;return i!==null&&(dn===null?dn=i:dn.push.apply(dn,i),Si=null),i}function Bs(i){Si===null?Si=[i]:Si.push(i)}var Nh=P(null),ba=null,Pr=null;function Ei(i,o,c){le(Nh,o._currentValue),o._currentValue=c}function zr(i){i._currentValue=Nh.current,ee(Nh)}function jh(i,o,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),i===c)break;i=i.return}}function Lh(i,o,c,f){var b=i.child;for(b!==null&&(b.return=i);b!==null;){var x=b.dependencies;if(x!==null){var w=b.child;x=x.firstContext;e:for(;x!==null;){var j=x;x=b;for(var I=0;I<o.length;I++)if(j.context===o[I]){x.lanes|=c,j=x.alternate,j!==null&&(j.lanes|=c),jh(x.return,c,i),f||(w=null);break e}x=j.next}}else if(b.tag===18){if(w=b.return,w===null)throw Error(r(341));w.lanes|=c,x=w.alternate,x!==null&&(x.lanes|=c),jh(w,c,i),w=null}else w=b.child;if(w!==null)w.return=b;else for(w=b;w!==null;){if(w===i){w=null;break}if(b=w.sibling,b!==null){b.return=w.return,w=b;break}w=w.return}b=w}}function bo(i,o,c,f){i=null;for(var b=o,x=!1;b!==null;){if(!x){if((b.flags&524288)!==0)x=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var w=b.alternate;if(w===null)throw Error(r(387));if(w=w.memoizedProps,w!==null){var j=b.type;_n(b.pendingProps.value,w.value)||(i!==null?i.push(j):i=[j])}}else if(b===ye.current){if(w=b.alternate,w===null)throw Error(r(387));w.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(i!==null?i.push(pl):i=[pl])}b=b.return}i!==null&&Lh(o,i,c,f),o.flags|=262144}function Mc(i){for(i=i.firstContext;i!==null;){if(!_n(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function va(i){ba=i,Pr=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Vt(i){return u0(ba,i)}function Pc(i,o){return ba===null&&va(i),u0(i,o)}function u0(i,o){var c=o._currentValue;if(o={context:o,memoizedValue:c,next:null},Pr===null){if(i===null)throw Error(r(308));Pr=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else Pr=Pr.next=o;return c}var rj=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(c,f){i.push(f)}};this.abort=function(){o.aborted=!0,i.forEach(function(c){return c()})}},ij=e.unstable_scheduleCallback,aj=e.unstable_NormalPriority,vt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oh(){return{controller:new rj,data:new Map,refCount:0}}function Vs(i){i.refCount--,i.refCount===0&&ij(aj,function(){i.controller.abort()})}var Fs=null,Dh=0,vo=0,yo=null;function oj(i,o){if(Fs===null){var c=Fs=[];Dh=0,vo=Pm(),yo={status:"pending",value:void 0,then:function(f){c.push(f)}}}return Dh++,o.then(d0,d0),o}function d0(){if(--Dh===0&&Fs!==null){yo!==null&&(yo.status="fulfilled");var i=Fs;Fs=null,vo=0,yo=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function sj(i,o){var c=[],f={status:"pending",value:null,reason:null,then:function(b){c.push(b)}};return i.then(function(){f.status="fulfilled",f.value=o;for(var b=0;b<c.length;b++)(0,c[b])(o)},function(b){for(f.status="rejected",f.reason=b,b=0;b<c.length;b++)(0,c[b])(void 0)}),f}var f0=z.S;z.S=function(i,o){Yx=vn(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&oj(i,o),f0!==null&&f0(i,o)};var ya=P(null);function Ih(){var i=ya.current;return i!==null?i:Xe.pooledCache}function zc(i,o){o===null?le(ya,ya.current):le(ya,o.pool)}function h0(){var i=Ih();return i===null?null:{parent:vt._currentValue,pool:i}}var xo=Error(r(460)),Mh=Error(r(474)),$c=Error(r(542)),Uc={then:function(){}};function m0(i){return i=i.status,i==="fulfilled"||i==="rejected"}function p0(i,o,c){switch(c=i[c],c===void 0?i.push(o):c!==o&&(o.then(Or,Or),o=c),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,b0(i),i;default:if(typeof o.status=="string")o.then(Or,Or);else{if(i=Xe,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(f){if(o.status==="pending"){var b=o;b.status="fulfilled",b.value=f}},function(f){if(o.status==="pending"){var b=o;b.status="rejected",b.reason=f}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,b0(i),i}throw _a=o,xo}}function xa(i){try{var o=i._init;return o(i._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(_a=c,xo):c}}var _a=null;function g0(){if(_a===null)throw Error(r(459));var i=_a;return _a=null,i}function b0(i){if(i===xo||i===$c)throw Error(r(483))}var _o=null,Gs=0;function Hc(i){var o=Gs;return Gs+=1,_o===null&&(_o=[]),p0(_o,i,o)}function qs(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Bc(i,o){throw o.$$typeof===v?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function v0(i){function o(V,H){if(i){var W=V.deletions;W===null?(V.deletions=[H],V.flags|=16):W.push(H)}}function c(V,H){if(!i)return null;for(;H!==null;)o(V,H),H=H.sibling;return null}function f(V){for(var H=new Map;V!==null;)V.key!==null?H.set(V.key,V):H.set(V.index,V),V=V.sibling;return H}function b(V,H){return V=Ir(V,H),V.index=0,V.sibling=null,V}function x(V,H,W){return V.index=W,i?(W=V.alternate,W!==null?(W=W.index,W<H?(V.flags|=67108866,H):W):(V.flags|=67108866,H)):(V.flags|=1048576,H)}function w(V){return i&&V.alternate===null&&(V.flags|=67108866),V}function j(V,H,W,re){return H===null||H.tag!==6?(H=Eh(W,V.mode,re),H.return=V,H):(H=b(H,W),H.return=V,H)}function I(V,H,W,re){var xe=W.type;return xe===S?te(V,H,W.props.children,re,W.key):H!==null&&(H.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===M&&xa(xe)===H.type)?(H=b(H,W.props),qs(H,W),H.return=V,H):(H=Dc(W.type,W.key,W.props,null,V.mode,re),qs(H,W),H.return=V,H)}function K(V,H,W,re){return H===null||H.tag!==4||H.stateNode.containerInfo!==W.containerInfo||H.stateNode.implementation!==W.implementation?(H=Ch(W,V.mode,re),H.return=V,H):(H=b(H,W.children||[]),H.return=V,H)}function te(V,H,W,re,xe){return H===null||H.tag!==7?(H=pa(W,V.mode,re,xe),H.return=V,H):(H=b(H,W),H.return=V,H)}function oe(V,H,W){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Eh(""+H,V.mode,W),H.return=V,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case y:return W=Dc(H.type,H.key,H.props,null,V.mode,W),qs(W,H),W.return=V,W;case _:return H=Ch(H,V.mode,W),H.return=V,H;case M:return H=xa(H),oe(V,H,W)}if(se(H)||$(H))return H=pa(H,V.mode,W,null),H.return=V,H;if(typeof H.then=="function")return oe(V,Hc(H),W);if(H.$$typeof===A)return oe(V,Pc(V,H),W);Bc(V,H)}return null}function X(V,H,W,re){var xe=H!==null?H.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return xe!==null?null:j(V,H,""+W,re);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return W.key===xe?I(V,H,W,re):null;case _:return W.key===xe?K(V,H,W,re):null;case M:return W=xa(W),X(V,H,W,re)}if(se(W)||$(W))return xe!==null?null:te(V,H,W,re,null);if(typeof W.then=="function")return X(V,H,Hc(W),re);if(W.$$typeof===A)return X(V,H,Pc(V,W),re);Bc(V,W)}return null}function Q(V,H,W,re,xe){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return V=V.get(W)||null,j(H,V,""+re,xe);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case y:return V=V.get(re.key===null?W:re.key)||null,I(H,V,re,xe);case _:return V=V.get(re.key===null?W:re.key)||null,K(H,V,re,xe);case M:return re=xa(re),Q(V,H,W,re,xe)}if(se(re)||$(re))return V=V.get(W)||null,te(H,V,re,xe,null);if(typeof re.then=="function")return Q(V,H,W,Hc(re),xe);if(re.$$typeof===A)return Q(V,H,W,Pc(H,re),xe);Bc(H,re)}return null}function ge(V,H,W,re){for(var xe=null,Pe=null,ve=H,Te=H=0,Ie=null;ve!==null&&Te<W.length;Te++){ve.index>Te?(Ie=ve,ve=null):Ie=ve.sibling;var ze=X(V,ve,W[Te],re);if(ze===null){ve===null&&(ve=Ie);break}i&&ve&&ze.alternate===null&&o(V,ve),H=x(ze,H,Te),Pe===null?xe=ze:Pe.sibling=ze,Pe=ze,ve=Ie}if(Te===W.length)return c(V,ve),Me&&Mr(V,Te),xe;if(ve===null){for(;Te<W.length;Te++)ve=oe(V,W[Te],re),ve!==null&&(H=x(ve,H,Te),Pe===null?xe=ve:Pe.sibling=ve,Pe=ve);return Me&&Mr(V,Te),xe}for(ve=f(ve);Te<W.length;Te++)Ie=Q(ve,V,Te,W[Te],re),Ie!==null&&(i&&Ie.alternate!==null&&ve.delete(Ie.key===null?Te:Ie.key),H=x(Ie,H,Te),Pe===null?xe=Ie:Pe.sibling=Ie,Pe=Ie);return i&&ve.forEach(function(Bi){return o(V,Bi)}),Me&&Mr(V,Te),xe}function we(V,H,W,re){if(W==null)throw Error(r(151));for(var xe=null,Pe=null,ve=H,Te=H=0,Ie=null,ze=W.next();ve!==null&&!ze.done;Te++,ze=W.next()){ve.index>Te?(Ie=ve,ve=null):Ie=ve.sibling;var Bi=X(V,ve,ze.value,re);if(Bi===null){ve===null&&(ve=Ie);break}i&&ve&&Bi.alternate===null&&o(V,ve),H=x(Bi,H,Te),Pe===null?xe=Bi:Pe.sibling=Bi,Pe=Bi,ve=Ie}if(ze.done)return c(V,ve),Me&&Mr(V,Te),xe;if(ve===null){for(;!ze.done;Te++,ze=W.next())ze=oe(V,ze.value,re),ze!==null&&(H=x(ze,H,Te),Pe===null?xe=ze:Pe.sibling=ze,Pe=ze);return Me&&Mr(V,Te),xe}for(ve=f(ve);!ze.done;Te++,ze=W.next())ze=Q(ve,V,Te,ze.value,re),ze!==null&&(i&&ze.alternate!==null&&ve.delete(ze.key===null?Te:ze.key),H=x(ze,H,Te),Pe===null?xe=ze:Pe.sibling=ze,Pe=ze);return i&&ve.forEach(function(vL){return o(V,vL)}),Me&&Mr(V,Te),xe}function Ze(V,H,W,re){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case y:e:{for(var xe=W.key;H!==null;){if(H.key===xe){if(xe=W.type,xe===S){if(H.tag===7){c(V,H.sibling),re=b(H,W.props.children),re.return=V,V=re;break e}}else if(H.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===M&&xa(xe)===H.type){c(V,H.sibling),re=b(H,W.props),qs(re,W),re.return=V,V=re;break e}c(V,H);break}else o(V,H);H=H.sibling}W.type===S?(re=pa(W.props.children,V.mode,re,W.key),re.return=V,V=re):(re=Dc(W.type,W.key,W.props,null,V.mode,re),qs(re,W),re.return=V,V=re)}return w(V);case _:e:{for(xe=W.key;H!==null;){if(H.key===xe)if(H.tag===4&&H.stateNode.containerInfo===W.containerInfo&&H.stateNode.implementation===W.implementation){c(V,H.sibling),re=b(H,W.children||[]),re.return=V,V=re;break e}else{c(V,H);break}else o(V,H);H=H.sibling}re=Ch(W,V.mode,re),re.return=V,V=re}return w(V);case M:return W=xa(W),Ze(V,H,W,re)}if(se(W))return ge(V,H,W,re);if($(W)){if(xe=$(W),typeof xe!="function")throw Error(r(150));return W=xe.call(W),we(V,H,W,re)}if(typeof W.then=="function")return Ze(V,H,Hc(W),re);if(W.$$typeof===A)return Ze(V,H,Pc(V,W),re);Bc(V,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,H!==null&&H.tag===6?(c(V,H.sibling),re=b(H,W),re.return=V,V=re):(c(V,H),re=Eh(W,V.mode,re),re.return=V,V=re),w(V)):c(V,H)}return function(V,H,W,re){try{Gs=0;var xe=Ze(V,H,W,re);return _o=null,xe}catch(ve){if(ve===xo||ve===$c)throw ve;var Pe=Sn(29,ve,null,V.mode);return Pe.lanes=re,Pe.return=V,Pe}}}var Sa=v0(!0),y0=v0(!1),Ci=!1;function Ph(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zh(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function ki(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ri(i,o,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(Ue&2)!==0){var b=f.pending;return b===null?o.next=o:(o.next=b.next,b.next=o),f.pending=o,o=Oc(i),n0(i,null,c),o}return Lc(i,f,o,c),Oc(i)}function Zs(i,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194048)!==0)){var f=o.lanes;f&=i.pendingLanes,c|=f,o.lanes=c,uy(i,c)}}function $h(i,o){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var b=null,x=null;if(c=c.firstBaseUpdate,c!==null){do{var w={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};x===null?b=x=w:x=x.next=w,c=c.next}while(c!==null);x===null?b=x=o:x=x.next=o}else b=x=o;c={baseState:f.baseState,firstBaseUpdate:b,lastBaseUpdate:x,shared:f.shared,callbacks:f.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=o:i.next=o,c.lastBaseUpdate=o}var Uh=!1;function Ws(){if(Uh){var i=yo;if(i!==null)throw i}}function Ys(i,o,c,f){Uh=!1;var b=i.updateQueue;Ci=!1;var x=b.firstBaseUpdate,w=b.lastBaseUpdate,j=b.shared.pending;if(j!==null){b.shared.pending=null;var I=j,K=I.next;I.next=null,w===null?x=K:w.next=K,w=I;var te=i.alternate;te!==null&&(te=te.updateQueue,j=te.lastBaseUpdate,j!==w&&(j===null?te.firstBaseUpdate=K:j.next=K,te.lastBaseUpdate=I))}if(x!==null){var oe=b.baseState;w=0,te=K=I=null,j=x;do{var X=j.lane&-536870913,Q=X!==j.lane;if(Q?(De&X)===X:(f&X)===X){X!==0&&X===vo&&(Uh=!0),te!==null&&(te=te.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var ge=i,we=j;X=o;var Ze=c;switch(we.tag){case 1:if(ge=we.payload,typeof ge=="function"){oe=ge.call(Ze,oe,X);break e}oe=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=we.payload,X=typeof ge=="function"?ge.call(Ze,oe,X):ge,X==null)break e;oe=p({},oe,X);break e;case 2:Ci=!0}}X=j.callback,X!==null&&(i.flags|=64,Q&&(i.flags|=8192),Q=b.callbacks,Q===null?b.callbacks=[X]:Q.push(X))}else Q={lane:X,tag:j.tag,payload:j.payload,callback:j.callback,next:null},te===null?(K=te=Q,I=oe):te=te.next=Q,w|=X;if(j=j.next,j===null){if(j=b.shared.pending,j===null)break;Q=j,j=Q.next,Q.next=null,b.lastBaseUpdate=Q,b.shared.pending=null}}while(!0);te===null&&(I=oe),b.baseState=I,b.firstBaseUpdate=K,b.lastBaseUpdate=te,x===null&&(b.shared.lanes=0),Li|=w,i.lanes=w,i.memoizedState=oe}}function x0(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function _0(i,o){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)x0(c[i],o)}var So=P(null),Vc=P(0);function S0(i,o){i=Zr,le(Vc,i),le(So,o),Zr=i|o.baseLanes}function Hh(){le(Vc,Zr),le(So,So.current)}function Bh(){Zr=Vc.current,ee(So),ee(Vc)}var wn=P(null),Bn=null;function Ai(i){var o=i.alternate;le(ht,ht.current&1),le(wn,i),Bn===null&&(o===null||So.current!==null||o.memoizedState!==null)&&(Bn=i)}function Vh(i){le(ht,ht.current),le(wn,i),Bn===null&&(Bn=i)}function w0(i){i.tag===22?(le(ht,ht.current),le(wn,i),Bn===null&&(Bn=i)):Ti()}function Ti(){le(ht,ht.current),le(wn,wn.current)}function En(i){ee(wn),Bn===i&&(Bn=null),ee(ht)}var ht=P(0);function Fc(i){for(var o=i;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||Ym(c)||Km(c)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var $r=0,Ae=null,Ge=null,yt=null,Gc=!1,wo=!1,wa=!1,qc=0,Ks=0,Eo=null,lj=0;function ut(){throw Error(r(321))}function Fh(i,o){if(o===null)return!1;for(var c=0;c<o.length&&c<i.length;c++)if(!_n(i[c],o[c]))return!1;return!0}function Gh(i,o,c,f,b,x){return $r=x,Ae=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,z.H=i===null||i.memoizedState===null?ox:om,wa=!1,x=c(f,b),wa=!1,wo&&(x=C0(o,c,f,b)),E0(i),x}function E0(i){z.H=Js;var o=Ge!==null&&Ge.next!==null;if($r=0,yt=Ge=Ae=null,Gc=!1,Ks=0,Eo=null,o)throw Error(r(300));i===null||xt||(i=i.dependencies,i!==null&&Mc(i)&&(xt=!0))}function C0(i,o,c,f){Ae=i;var b=0;do{if(wo&&(Eo=null),Ks=0,wo=!1,25<=b)throw Error(r(301));if(b+=1,yt=Ge=null,i.updateQueue!=null){var x=i.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}z.H=sx,x=o(c,f)}while(wo);return x}function cj(){var i=z.H,o=i.useState()[0];return o=typeof o.then=="function"?Xs(o):o,i=i.useState()[0],(Ge!==null?Ge.memoizedState:null)!==i&&(Ae.flags|=1024),o}function qh(){var i=qc!==0;return qc=0,i}function Zh(i,o,c){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~c}function Wh(i){if(Gc){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Gc=!1}$r=0,yt=Ge=Ae=null,wo=!1,Ks=qc=0,Eo=null}function tn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Ae.memoizedState=yt=i:yt=yt.next=i,yt}function mt(){if(Ge===null){var i=Ae.alternate;i=i!==null?i.memoizedState:null}else i=Ge.next;var o=yt===null?Ae.memoizedState:yt.next;if(o!==null)yt=o,Ge=i;else{if(i===null)throw Ae.alternate===null?Error(r(467)):Error(r(310));Ge=i,i={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},yt===null?Ae.memoizedState=yt=i:yt=yt.next=i}return yt}function Zc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xs(i){var o=Ks;return Ks+=1,Eo===null&&(Eo=[]),i=p0(Eo,i,o),o=Ae,(yt===null?o.memoizedState:yt.next)===null&&(o=o.alternate,z.H=o===null||o.memoizedState===null?ox:om),i}function Wc(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Xs(i);if(i.$$typeof===A)return Vt(i)}throw Error(r(438,String(i)))}function Yh(i){var o=null,c=Ae.updateQueue;if(c!==null&&(o=c.memoCache),o==null){var f=Ae.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(o={data:f.data.map(function(b){return b.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),c===null&&(c=Zc(),Ae.updateQueue=c),c.memoCache=o,c=o.data[o.index],c===void 0)for(c=o.data[o.index]=Array(i),f=0;f<i;f++)c[f]=Y;return o.index++,c}function Ur(i,o){return typeof o=="function"?o(i):o}function Yc(i){var o=mt();return Kh(o,Ge,i)}function Kh(i,o,c){var f=i.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=c;var b=i.baseQueue,x=f.pending;if(x!==null){if(b!==null){var w=b.next;b.next=x.next,x.next=w}o.baseQueue=b=x,f.pending=null}if(x=i.baseState,b===null)i.memoizedState=x;else{o=b.next;var j=w=null,I=null,K=o,te=!1;do{var oe=K.lane&-536870913;if(oe!==K.lane?(De&oe)===oe:($r&oe)===oe){var X=K.revertLane;if(X===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),oe===vo&&(te=!0);else if(($r&X)===X){K=K.next,X===vo&&(te=!0);continue}else oe={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},I===null?(j=I=oe,w=x):I=I.next=oe,Ae.lanes|=X,Li|=X;oe=K.action,wa&&c(x,oe),x=K.hasEagerState?K.eagerState:c(x,oe)}else X={lane:oe,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},I===null?(j=I=X,w=x):I=I.next=X,Ae.lanes|=oe,Li|=oe;K=K.next}while(K!==null&&K!==o);if(I===null?w=x:I.next=j,!_n(x,i.memoizedState)&&(xt=!0,te&&(c=yo,c!==null)))throw c;i.memoizedState=x,i.baseState=w,i.baseQueue=I,f.lastRenderedState=x}return b===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function Xh(i){var o=mt(),c=o.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var f=c.dispatch,b=c.pending,x=o.memoizedState;if(b!==null){c.pending=null;var w=b=b.next;do x=i(x,w.action),w=w.next;while(w!==b);_n(x,o.memoizedState)||(xt=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),c.lastRenderedState=x}return[x,f]}function k0(i,o,c){var f=Ae,b=mt(),x=Me;if(x){if(c===void 0)throw Error(r(407));c=c()}else c=o();var w=!_n((Ge||b).memoizedState,c);if(w&&(b.memoizedState=c,xt=!0),b=b.queue,em(T0.bind(null,f,b,i),[i]),b.getSnapshot!==o||w||yt!==null&&yt.memoizedState.tag&1){if(f.flags|=2048,Co(9,{destroy:void 0},A0.bind(null,f,b,c,o),null),Xe===null)throw Error(r(349));x||($r&127)!==0||R0(f,o,c)}return c}function R0(i,o,c){i.flags|=16384,i={getSnapshot:o,value:c},o=Ae.updateQueue,o===null?(o=Zc(),Ae.updateQueue=o,o.stores=[i]):(c=o.stores,c===null?o.stores=[i]:c.push(i))}function A0(i,o,c,f){o.value=c,o.getSnapshot=f,N0(o)&&j0(i)}function T0(i,o,c){return c(function(){N0(o)&&j0(i)})}function N0(i){var o=i.getSnapshot;i=i.value;try{var c=o();return!_n(i,c)}catch{return!0}}function j0(i){var o=ma(i,2);o!==null&&fn(o,i,2)}function Qh(i){var o=tn();if(typeof i=="function"){var c=i;if(i=c(),wa){vi(!0);try{c()}finally{vi(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:i},o}function L0(i,o,c,f){return i.baseState=c,Kh(i,Ge,typeof f=="function"?f:Ur)}function uj(i,o,c,f,b){if(Qc(i))throw Error(r(485));if(i=o.action,i!==null){var x={payload:b,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){x.listeners.push(w)}};z.T!==null?c(!0):x.isTransition=!1,f(x),c=o.pending,c===null?(x.next=o.pending=x,O0(o,x)):(x.next=c.next,o.pending=c.next=x)}}function O0(i,o){var c=o.action,f=o.payload,b=i.state;if(o.isTransition){var x=z.T,w={};z.T=w;try{var j=c(b,f),I=z.S;I!==null&&I(w,j),D0(i,o,j)}catch(K){Jh(i,o,K)}finally{x!==null&&w.types!==null&&(x.types=w.types),z.T=x}}else try{x=c(b,f),D0(i,o,x)}catch(K){Jh(i,o,K)}}function D0(i,o,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(f){I0(i,o,f)},function(f){return Jh(i,o,f)}):I0(i,o,c)}function I0(i,o,c){o.status="fulfilled",o.value=c,M0(o),i.state=c,o=i.pending,o!==null&&(c=o.next,c===o?i.pending=null:(c=c.next,o.next=c,O0(i,c)))}function Jh(i,o,c){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do o.status="rejected",o.reason=c,M0(o),o=o.next;while(o!==f)}i.action=null}function M0(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function P0(i,o){return o}function z0(i,o){if(Me){var c=Xe.formState;if(c!==null){e:{var f=Ae;if(Me){if(rt){t:{for(var b=rt,x=Hn;b.nodeType!==8;){if(!x){b=null;break t}if(b=Vn(b.nextSibling),b===null){b=null;break t}}x=b.data,b=x==="F!"||x==="F"?b:null}if(b){rt=Vn(b.nextSibling),f=b.data==="F!";break e}}wi(f)}f=!1}f&&(o=c[0])}}return c=tn(),c.memoizedState=c.baseState=o,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:P0,lastRenderedState:o},c.queue=f,c=rx.bind(null,Ae,f),f.dispatch=c,f=Qh(!1),x=am.bind(null,Ae,!1,f.queue),f=tn(),b={state:o,dispatch:null,action:i,pending:null},f.queue=b,c=uj.bind(null,Ae,b,x,c),b.dispatch=c,f.memoizedState=i,[o,c,!1]}function $0(i){var o=mt();return U0(o,Ge,i)}function U0(i,o,c){if(o=Kh(i,o,P0)[0],i=Yc(Ur)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var f=Xs(o)}catch(w){throw w===xo?$c:w}else f=o;o=mt();var b=o.queue,x=b.dispatch;return c!==o.memoizedState&&(Ae.flags|=2048,Co(9,{destroy:void 0},dj.bind(null,b,c),null)),[f,x,i]}function dj(i,o){i.action=o}function H0(i){var o=mt(),c=Ge;if(c!==null)return U0(o,c,i);mt(),o=o.memoizedState,c=mt();var f=c.queue.dispatch;return c.memoizedState=i,[o,f,!1]}function Co(i,o,c,f){return i={tag:i,create:c,deps:f,inst:o,next:null},o=Ae.updateQueue,o===null&&(o=Zc(),Ae.updateQueue=o),c=o.lastEffect,c===null?o.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,o.lastEffect=i),i}function B0(){return mt().memoizedState}function Kc(i,o,c,f){var b=tn();Ae.flags|=i,b.memoizedState=Co(1|o,{destroy:void 0},c,f===void 0?null:f)}function Xc(i,o,c,f){var b=mt();f=f===void 0?null:f;var x=b.memoizedState.inst;Ge!==null&&f!==null&&Fh(f,Ge.memoizedState.deps)?b.memoizedState=Co(o,x,c,f):(Ae.flags|=i,b.memoizedState=Co(1|o,x,c,f))}function V0(i,o){Kc(8390656,8,i,o)}function em(i,o){Xc(2048,8,i,o)}function fj(i){Ae.flags|=4;var o=Ae.updateQueue;if(o===null)o=Zc(),Ae.updateQueue=o,o.events=[i];else{var c=o.events;c===null?o.events=[i]:c.push(i)}}function F0(i){var o=mt().memoizedState;return fj({ref:o,nextImpl:i}),function(){if((Ue&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function G0(i,o){return Xc(4,2,i,o)}function q0(i,o){return Xc(4,4,i,o)}function Z0(i,o){if(typeof o=="function"){i=i();var c=o(i);return function(){typeof c=="function"?c():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function W0(i,o,c){c=c!=null?c.concat([i]):null,Xc(4,4,Z0.bind(null,o,i),c)}function tm(){}function Y0(i,o){var c=mt();o=o===void 0?null:o;var f=c.memoizedState;return o!==null&&Fh(o,f[1])?f[0]:(c.memoizedState=[i,o],i)}function K0(i,o){var c=mt();o=o===void 0?null:o;var f=c.memoizedState;if(o!==null&&Fh(o,f[1]))return f[0];if(f=i(),wa){vi(!0);try{i()}finally{vi(!1)}}return c.memoizedState=[f,o],f}function nm(i,o,c){return c===void 0||($r&1073741824)!==0&&(De&261930)===0?i.memoizedState=o:(i.memoizedState=c,i=Xx(),Ae.lanes|=i,Li|=i,c)}function X0(i,o,c,f){return _n(c,o)?c:So.current!==null?(i=nm(i,c,f),_n(i,o)||(xt=!0),i):($r&42)===0||($r&1073741824)!==0&&(De&261930)===0?(xt=!0,i.memoizedState=c):(i=Xx(),Ae.lanes|=i,Li|=i,o)}function Q0(i,o,c,f,b){var x=G.p;G.p=x!==0&&8>x?x:8;var w=z.T,j={};z.T=j,am(i,!1,o,c);try{var I=b(),K=z.S;if(K!==null&&K(j,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var te=sj(I,f);Qs(i,o,te,Rn(i))}else Qs(i,o,f,Rn(i))}catch(oe){Qs(i,o,{then:function(){},status:"rejected",reason:oe},Rn())}finally{G.p=x,w!==null&&j.types!==null&&(w.types=j.types),z.T=w}}function hj(){}function rm(i,o,c,f){if(i.tag!==5)throw Error(r(476));var b=J0(i).queue;Q0(i,b,o,ie,c===null?hj:function(){return ex(i),c(f)})}function J0(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:ie},next:null};var c={};return o.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:c},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function ex(i){var o=J0(i);o.next===null&&(o=i.alternate.memoizedState),Qs(i,o.next.queue,{},Rn())}function im(){return Vt(pl)}function tx(){return mt().memoizedState}function nx(){return mt().memoizedState}function mj(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var c=Rn();i=ki(c);var f=Ri(o,i,c);f!==null&&(fn(f,o,c),Zs(f,o,c)),o={cache:Oh()},i.payload=o;return}o=o.return}}function pj(i,o,c){var f=Rn();c={lane:f,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Qc(i)?ix(o,c):(c=Sh(i,o,c,f),c!==null&&(fn(c,i,f),ax(c,o,f)))}function rx(i,o,c){var f=Rn();Qs(i,o,c,f)}function Qs(i,o,c,f){var b={lane:f,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Qc(i))ix(o,b);else{var x=i.alternate;if(i.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var w=o.lastRenderedState,j=x(w,c);if(b.hasEagerState=!0,b.eagerState=j,_n(j,w))return Lc(i,o,b,0),Xe===null&&jc(),!1}catch{}if(c=Sh(i,o,b,f),c!==null)return fn(c,i,f),ax(c,o,f),!0}return!1}function am(i,o,c,f){if(f={lane:2,revertLane:Pm(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Qc(i)){if(o)throw Error(r(479))}else o=Sh(i,c,f,2),o!==null&&fn(o,i,2)}function Qc(i){var o=i.alternate;return i===Ae||o!==null&&o===Ae}function ix(i,o){wo=Gc=!0;var c=i.pending;c===null?o.next=o:(o.next=c.next,c.next=o),i.pending=o}function ax(i,o,c){if((c&4194048)!==0){var f=o.lanes;f&=i.pendingLanes,c|=f,o.lanes=c,uy(i,c)}}var Js={readContext:Vt,use:Wc,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};Js.useEffectEvent=ut;var ox={readContext:Vt,use:Wc,useCallback:function(i,o){return tn().memoizedState=[i,o===void 0?null:o],i},useContext:Vt,useEffect:V0,useImperativeHandle:function(i,o,c){c=c!=null?c.concat([i]):null,Kc(4194308,4,Z0.bind(null,o,i),c)},useLayoutEffect:function(i,o){return Kc(4194308,4,i,o)},useInsertionEffect:function(i,o){Kc(4,2,i,o)},useMemo:function(i,o){var c=tn();o=o===void 0?null:o;var f=i();if(wa){vi(!0);try{i()}finally{vi(!1)}}return c.memoizedState=[f,o],f},useReducer:function(i,o,c){var f=tn();if(c!==void 0){var b=c(o);if(wa){vi(!0);try{c(o)}finally{vi(!1)}}}else b=o;return f.memoizedState=f.baseState=b,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:b},f.queue=i,i=i.dispatch=pj.bind(null,Ae,i),[f.memoizedState,i]},useRef:function(i){var o=tn();return i={current:i},o.memoizedState=i},useState:function(i){i=Qh(i);var o=i.queue,c=rx.bind(null,Ae,o);return o.dispatch=c,[i.memoizedState,c]},useDebugValue:tm,useDeferredValue:function(i,o){var c=tn();return nm(c,i,o)},useTransition:function(){var i=Qh(!1);return i=Q0.bind(null,Ae,i.queue,!0,!1),tn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,c){var f=Ae,b=tn();if(Me){if(c===void 0)throw Error(r(407));c=c()}else{if(c=o(),Xe===null)throw Error(r(349));(De&127)!==0||R0(f,o,c)}b.memoizedState=c;var x={value:c,getSnapshot:o};return b.queue=x,V0(T0.bind(null,f,x,i),[i]),f.flags|=2048,Co(9,{destroy:void 0},A0.bind(null,f,x,c,o),null),c},useId:function(){var i=tn(),o=Xe.identifierPrefix;if(Me){var c=fr,f=dr;c=(f&~(1<<32-xn(f)-1)).toString(32)+c,o="_"+o+"R_"+c,c=qc++,0<c&&(o+="H"+c.toString(32)),o+="_"}else c=lj++,o="_"+o+"r_"+c.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:im,useFormState:z0,useActionState:z0,useOptimistic:function(i){var o=tn();o.memoizedState=o.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=c,o=am.bind(null,Ae,!0,c),c.dispatch=o,[i,o]},useMemoCache:Yh,useCacheRefresh:function(){return tn().memoizedState=mj.bind(null,Ae)},useEffectEvent:function(i){var o=tn(),c={impl:i};return o.memoizedState=c,function(){if((Ue&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},om={readContext:Vt,use:Wc,useCallback:Y0,useContext:Vt,useEffect:em,useImperativeHandle:W0,useInsertionEffect:G0,useLayoutEffect:q0,useMemo:K0,useReducer:Yc,useRef:B0,useState:function(){return Yc(Ur)},useDebugValue:tm,useDeferredValue:function(i,o){var c=mt();return X0(c,Ge.memoizedState,i,o)},useTransition:function(){var i=Yc(Ur)[0],o=mt().memoizedState;return[typeof i=="boolean"?i:Xs(i),o]},useSyncExternalStore:k0,useId:tx,useHostTransitionStatus:im,useFormState:$0,useActionState:$0,useOptimistic:function(i,o){var c=mt();return L0(c,Ge,i,o)},useMemoCache:Yh,useCacheRefresh:nx};om.useEffectEvent=F0;var sx={readContext:Vt,use:Wc,useCallback:Y0,useContext:Vt,useEffect:em,useImperativeHandle:W0,useInsertionEffect:G0,useLayoutEffect:q0,useMemo:K0,useReducer:Xh,useRef:B0,useState:function(){return Xh(Ur)},useDebugValue:tm,useDeferredValue:function(i,o){var c=mt();return Ge===null?nm(c,i,o):X0(c,Ge.memoizedState,i,o)},useTransition:function(){var i=Xh(Ur)[0],o=mt().memoizedState;return[typeof i=="boolean"?i:Xs(i),o]},useSyncExternalStore:k0,useId:tx,useHostTransitionStatus:im,useFormState:H0,useActionState:H0,useOptimistic:function(i,o){var c=mt();return Ge!==null?L0(c,Ge,i,o):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:Yh,useCacheRefresh:nx};sx.useEffectEvent=F0;function sm(i,o,c,f){o=i.memoizedState,c=c(f,o),c=c==null?o:p({},o,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var lm={enqueueSetState:function(i,o,c){i=i._reactInternals;var f=Rn(),b=ki(f);b.payload=o,c!=null&&(b.callback=c),o=Ri(i,b,f),o!==null&&(fn(o,i,f),Zs(o,i,f))},enqueueReplaceState:function(i,o,c){i=i._reactInternals;var f=Rn(),b=ki(f);b.tag=1,b.payload=o,c!=null&&(b.callback=c),o=Ri(i,b,f),o!==null&&(fn(o,i,f),Zs(o,i,f))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var c=Rn(),f=ki(c);f.tag=2,o!=null&&(f.callback=o),o=Ri(i,f,c),o!==null&&(fn(o,i,c),Zs(o,i,c))}};function lx(i,o,c,f,b,x,w){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,x,w):o.prototype&&o.prototype.isPureReactComponent?!$s(c,f)||!$s(b,x):!0}function cx(i,o,c,f){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,f),o.state!==i&&lm.enqueueReplaceState(o,o.state,null)}function Ea(i,o){var c=o;if("ref"in o){c={};for(var f in o)f!=="ref"&&(c[f]=o[f])}if(i=i.defaultProps){c===o&&(c=p({},c));for(var b in i)c[b]===void 0&&(c[b]=i[b])}return c}function ux(i){Nc(i)}function dx(i){console.error(i)}function fx(i){Nc(i)}function Jc(i,o){try{var c=i.onUncaughtError;c(o.value,{componentStack:o.stack})}catch(f){setTimeout(function(){throw f})}}function hx(i,o,c){try{var f=i.onCaughtError;f(c.value,{componentStack:c.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function cm(i,o,c){return c=ki(c),c.tag=3,c.payload={element:null},c.callback=function(){Jc(i,o)},c}function mx(i){return i=ki(i),i.tag=3,i}function px(i,o,c,f){var b=c.type.getDerivedStateFromError;if(typeof b=="function"){var x=f.value;i.payload=function(){return b(x)},i.callback=function(){hx(o,c,f)}}var w=c.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(i.callback=function(){hx(o,c,f),typeof b!="function"&&(Oi===null?Oi=new Set([this]):Oi.add(this));var j=f.stack;this.componentDidCatch(f.value,{componentStack:j!==null?j:""})})}function gj(i,o,c,f,b){if(c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(o=c.alternate,o!==null&&bo(o,c,b,!0),c=wn.current,c!==null){switch(c.tag){case 31:case 13:return Bn===null?du():c.alternate===null&&dt===0&&(dt=3),c.flags&=-257,c.flags|=65536,c.lanes=b,f===Uc?c.flags|=16384:(o=c.updateQueue,o===null?c.updateQueue=new Set([f]):o.add(f),Dm(i,f,b)),!1;case 22:return c.flags|=65536,f===Uc?c.flags|=16384:(o=c.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([f])},c.updateQueue=o):(c=o.retryQueue,c===null?o.retryQueue=new Set([f]):c.add(f)),Dm(i,f,b)),!1}throw Error(r(435,c.tag))}return Dm(i,f,b),du(),!1}if(Me)return o=wn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=b,f!==Ah&&(i=Error(r(422),{cause:f}),Bs(zn(i,c)))):(f!==Ah&&(o=Error(r(423),{cause:f}),Bs(zn(o,c))),i=i.current.alternate,i.flags|=65536,b&=-b,i.lanes|=b,f=zn(f,c),b=cm(i.stateNode,f,b),$h(i,b),dt!==4&&(dt=2)),!1;var x=Error(r(520),{cause:f});if(x=zn(x,c),sl===null?sl=[x]:sl.push(x),dt!==4&&(dt=2),o===null)return!0;f=zn(f,c),c=o;do{switch(c.tag){case 3:return c.flags|=65536,i=b&-b,c.lanes|=i,i=cm(c.stateNode,f,i),$h(c,i),!1;case 1:if(o=c.type,x=c.stateNode,(c.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Oi===null||!Oi.has(x))))return c.flags|=65536,b&=-b,c.lanes|=b,b=mx(b),px(b,i,c,f),$h(c,b),!1}c=c.return}while(c!==null);return!1}var um=Error(r(461)),xt=!1;function Ft(i,o,c,f){o.child=i===null?y0(o,null,c,f):Sa(o,i.child,c,f)}function gx(i,o,c,f,b){c=c.render;var x=o.ref;if("ref"in f){var w={};for(var j in f)j!=="ref"&&(w[j]=f[j])}else w=f;return va(o),f=Gh(i,o,c,w,x,b),j=qh(),i!==null&&!xt?(Zh(i,o,b),Hr(i,o,b)):(Me&&j&&kh(o),o.flags|=1,Ft(i,o,f,b),o.child)}function bx(i,o,c,f,b){if(i===null){var x=c.type;return typeof x=="function"&&!wh(x)&&x.defaultProps===void 0&&c.compare===null?(o.tag=15,o.type=x,vx(i,o,x,f,b)):(i=Dc(c.type,null,f,o,o.mode,b),i.ref=o.ref,i.return=o,o.child=i)}if(x=i.child,!vm(i,b)){var w=x.memoizedProps;if(c=c.compare,c=c!==null?c:$s,c(w,f)&&i.ref===o.ref)return Hr(i,o,b)}return o.flags|=1,i=Ir(x,f),i.ref=o.ref,i.return=o,o.child=i}function vx(i,o,c,f,b){if(i!==null){var x=i.memoizedProps;if($s(x,f)&&i.ref===o.ref)if(xt=!1,o.pendingProps=f=x,vm(i,b))(i.flags&131072)!==0&&(xt=!0);else return o.lanes=i.lanes,Hr(i,o,b)}return dm(i,o,c,f,b)}function yx(i,o,c,f){var b=f.children,x=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((o.flags&128)!==0){if(x=x!==null?x.baseLanes|c:c,i!==null){for(f=o.child=i.child,b=0;f!==null;)b=b|f.lanes|f.childLanes,f=f.sibling;f=b&~x}else f=0,o.child=null;return xx(i,o,x,c,f)}if((c&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&zc(o,x!==null?x.cachePool:null),x!==null?S0(o,x):Hh(),w0(o);else return f=o.lanes=536870912,xx(i,o,x!==null?x.baseLanes|c:c,c,f)}else x!==null?(zc(o,x.cachePool),S0(o,x),Ti(),o.memoizedState=null):(i!==null&&zc(o,null),Hh(),Ti());return Ft(i,o,b,c),o.child}function el(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function xx(i,o,c,f,b){var x=Ih();return x=x===null?null:{parent:vt._currentValue,pool:x},o.memoizedState={baseLanes:c,cachePool:x},i!==null&&zc(o,null),Hh(),w0(o),i!==null&&bo(i,o,f,!0),o.childLanes=b,null}function eu(i,o){return o=nu({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function _x(i,o,c){return Sa(o,i.child,null,c),i=eu(o,o.pendingProps),i.flags|=2,En(o),o.memoizedState=null,i}function bj(i,o,c){var f=o.pendingProps,b=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Me){if(f.mode==="hidden")return i=eu(o,f),o.lanes=536870912,el(null,i);if(Vh(o),(i=rt)?(i=O_(i,Hn),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:_i!==null?{id:dr,overflow:fr}:null,retryLane:536870912,hydrationErrors:null},c=i0(i),c.return=o,o.child=c,Bt=o,rt=null)):i=null,i===null)throw wi(o);return o.lanes=536870912,null}return eu(o,f)}var x=i.memoizedState;if(x!==null){var w=x.dehydrated;if(Vh(o),b)if(o.flags&256)o.flags&=-257,o=_x(i,o,c);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(xt||bo(i,o,c,!1),b=(c&i.childLanes)!==0,xt||b){if(f=Xe,f!==null&&(w=dy(f,c),w!==0&&w!==x.retryLane))throw x.retryLane=w,ma(i,w),fn(f,i,w),um;du(),o=_x(i,o,c)}else i=x.treeContext,rt=Vn(w.nextSibling),Bt=o,Me=!0,Si=null,Hn=!1,i!==null&&s0(o,i),o=eu(o,f),o.flags|=4096;return o}return i=Ir(i.child,{mode:f.mode,children:f.children}),i.ref=o.ref,o.child=i,i.return=o,i}function tu(i,o){var c=o.ref;if(c===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(o.flags|=4194816)}}function dm(i,o,c,f,b){return va(o),c=Gh(i,o,c,f,void 0,b),f=qh(),i!==null&&!xt?(Zh(i,o,b),Hr(i,o,b)):(Me&&f&&kh(o),o.flags|=1,Ft(i,o,c,b),o.child)}function Sx(i,o,c,f,b,x){return va(o),o.updateQueue=null,c=C0(o,f,c,b),E0(i),f=qh(),i!==null&&!xt?(Zh(i,o,x),Hr(i,o,x)):(Me&&f&&kh(o),o.flags|=1,Ft(i,o,c,x),o.child)}function wx(i,o,c,f,b){if(va(o),o.stateNode===null){var x=ho,w=c.contextType;typeof w=="object"&&w!==null&&(x=Vt(w)),x=new c(f,x),o.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=lm,o.stateNode=x,x._reactInternals=o,x=o.stateNode,x.props=f,x.state=o.memoizedState,x.refs={},Ph(o),w=c.contextType,x.context=typeof w=="object"&&w!==null?Vt(w):ho,x.state=o.memoizedState,w=c.getDerivedStateFromProps,typeof w=="function"&&(sm(o,c,w,f),x.state=o.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(w=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),w!==x.state&&lm.enqueueReplaceState(x,x.state,null),Ys(o,f,x,b),Ws(),x.state=o.memoizedState),typeof x.componentDidMount=="function"&&(o.flags|=4194308),f=!0}else if(i===null){x=o.stateNode;var j=o.memoizedProps,I=Ea(c,j);x.props=I;var K=x.context,te=c.contextType;w=ho,typeof te=="object"&&te!==null&&(w=Vt(te));var oe=c.getDerivedStateFromProps;te=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function",j=o.pendingProps!==j,te||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j||K!==w)&&cx(o,x,f,w),Ci=!1;var X=o.memoizedState;x.state=X,Ys(o,f,x,b),Ws(),K=o.memoizedState,j||X!==K||Ci?(typeof oe=="function"&&(sm(o,c,oe,f),K=o.memoizedState),(I=Ci||lx(o,c,I,f,X,K,w))?(te||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=K),x.props=f,x.state=K,x.context=w,f=I):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{x=o.stateNode,zh(i,o),w=o.memoizedProps,te=Ea(c,w),x.props=te,oe=o.pendingProps,X=x.context,K=c.contextType,I=ho,typeof K=="object"&&K!==null&&(I=Vt(K)),j=c.getDerivedStateFromProps,(K=typeof j=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(w!==oe||X!==I)&&cx(o,x,f,I),Ci=!1,X=o.memoizedState,x.state=X,Ys(o,f,x,b),Ws();var Q=o.memoizedState;w!==oe||X!==Q||Ci||i!==null&&i.dependencies!==null&&Mc(i.dependencies)?(typeof j=="function"&&(sm(o,c,j,f),Q=o.memoizedState),(te=Ci||lx(o,c,te,f,X,Q,I)||i!==null&&i.dependencies!==null&&Mc(i.dependencies))?(K||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,Q,I),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,Q,I)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||w===i.memoizedProps&&X===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||w===i.memoizedProps&&X===i.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=Q),x.props=f,x.state=Q,x.context=I,f=te):(typeof x.componentDidUpdate!="function"||w===i.memoizedProps&&X===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||w===i.memoizedProps&&X===i.memoizedState||(o.flags|=1024),f=!1)}return x=f,tu(i,o),f=(o.flags&128)!==0,x||f?(x=o.stateNode,c=f&&typeof c.getDerivedStateFromError!="function"?null:x.render(),o.flags|=1,i!==null&&f?(o.child=Sa(o,i.child,null,b),o.child=Sa(o,null,c,b)):Ft(i,o,c,b),o.memoizedState=x.state,i=o.child):i=Hr(i,o,b),i}function Ex(i,o,c,f){return ga(),o.flags|=256,Ft(i,o,c,f),o.child}var fm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hm(i){return{baseLanes:i,cachePool:h0()}}function mm(i,o,c){return i=i!==null?i.childLanes&~c:0,o&&(i|=kn),i}function Cx(i,o,c){var f=o.pendingProps,b=!1,x=(o.flags&128)!==0,w;if((w=x)||(w=i!==null&&i.memoizedState===null?!1:(ht.current&2)!==0),w&&(b=!0,o.flags&=-129),w=(o.flags&32)!==0,o.flags&=-33,i===null){if(Me){if(b?Ai(o):Ti(),(i=rt)?(i=O_(i,Hn),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:_i!==null?{id:dr,overflow:fr}:null,retryLane:536870912,hydrationErrors:null},c=i0(i),c.return=o,o.child=c,Bt=o,rt=null)):i=null,i===null)throw wi(o);return Km(i)?o.lanes=32:o.lanes=536870912,null}var j=f.children;return f=f.fallback,b?(Ti(),b=o.mode,j=nu({mode:"hidden",children:j},b),f=pa(f,b,c,null),j.return=o,f.return=o,j.sibling=f,o.child=j,f=o.child,f.memoizedState=hm(c),f.childLanes=mm(i,w,c),o.memoizedState=fm,el(null,f)):(Ai(o),pm(o,j))}var I=i.memoizedState;if(I!==null&&(j=I.dehydrated,j!==null)){if(x)o.flags&256?(Ai(o),o.flags&=-257,o=gm(i,o,c)):o.memoizedState!==null?(Ti(),o.child=i.child,o.flags|=128,o=null):(Ti(),j=f.fallback,b=o.mode,f=nu({mode:"visible",children:f.children},b),j=pa(j,b,c,null),j.flags|=2,f.return=o,j.return=o,f.sibling=j,o.child=f,Sa(o,i.child,null,c),f=o.child,f.memoizedState=hm(c),f.childLanes=mm(i,w,c),o.memoizedState=fm,o=el(null,f));else if(Ai(o),Km(j)){if(w=j.nextSibling&&j.nextSibling.dataset,w)var K=w.dgst;w=K,f=Error(r(419)),f.stack="",f.digest=w,Bs({value:f,source:null,stack:null}),o=gm(i,o,c)}else if(xt||bo(i,o,c,!1),w=(c&i.childLanes)!==0,xt||w){if(w=Xe,w!==null&&(f=dy(w,c),f!==0&&f!==I.retryLane))throw I.retryLane=f,ma(i,f),fn(w,i,f),um;Ym(j)||du(),o=gm(i,o,c)}else Ym(j)?(o.flags|=192,o.child=i.child,o=null):(i=I.treeContext,rt=Vn(j.nextSibling),Bt=o,Me=!0,Si=null,Hn=!1,i!==null&&s0(o,i),o=pm(o,f.children),o.flags|=4096);return o}return b?(Ti(),j=f.fallback,b=o.mode,I=i.child,K=I.sibling,f=Ir(I,{mode:"hidden",children:f.children}),f.subtreeFlags=I.subtreeFlags&65011712,K!==null?j=Ir(K,j):(j=pa(j,b,c,null),j.flags|=2),j.return=o,f.return=o,f.sibling=j,o.child=f,el(null,f),f=o.child,j=i.child.memoizedState,j===null?j=hm(c):(b=j.cachePool,b!==null?(I=vt._currentValue,b=b.parent!==I?{parent:I,pool:I}:b):b=h0(),j={baseLanes:j.baseLanes|c,cachePool:b}),f.memoizedState=j,f.childLanes=mm(i,w,c),o.memoizedState=fm,el(i.child,f)):(Ai(o),c=i.child,i=c.sibling,c=Ir(c,{mode:"visible",children:f.children}),c.return=o,c.sibling=null,i!==null&&(w=o.deletions,w===null?(o.deletions=[i],o.flags|=16):w.push(i)),o.child=c,o.memoizedState=null,c)}function pm(i,o){return o=nu({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function nu(i,o){return i=Sn(22,i,null,o),i.lanes=0,i}function gm(i,o,c){return Sa(o,i.child,null,c),i=pm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function kx(i,o,c){i.lanes|=o;var f=i.alternate;f!==null&&(f.lanes|=o),jh(i.return,o,c)}function bm(i,o,c,f,b,x){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:b,treeForkCount:x}:(w.isBackwards=o,w.rendering=null,w.renderingStartTime=0,w.last=f,w.tail=c,w.tailMode=b,w.treeForkCount=x)}function Rx(i,o,c){var f=o.pendingProps,b=f.revealOrder,x=f.tail;f=f.children;var w=ht.current,j=(w&2)!==0;if(j?(w=w&1|2,o.flags|=128):w&=1,le(ht,w),Ft(i,o,f,c),f=Me?Hs:0,!j&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&kx(i,c,o);else if(i.tag===19)kx(i,c,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(b){case"forwards":for(c=o.child,b=null;c!==null;)i=c.alternate,i!==null&&Fc(i)===null&&(b=c),c=c.sibling;c=b,c===null?(b=o.child,o.child=null):(b=c.sibling,c.sibling=null),bm(o,!1,b,c,x,f);break;case"backwards":case"unstable_legacy-backwards":for(c=null,b=o.child,o.child=null;b!==null;){if(i=b.alternate,i!==null&&Fc(i)===null){o.child=b;break}i=b.sibling,b.sibling=c,c=b,b=i}bm(o,!0,c,null,x,f);break;case"together":bm(o,!1,null,null,void 0,f);break;default:o.memoizedState=null}return o.child}function Hr(i,o,c){if(i!==null&&(o.dependencies=i.dependencies),Li|=o.lanes,(c&o.childLanes)===0)if(i!==null){if(bo(i,o,c,!1),(c&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,c=Ir(i,i.pendingProps),o.child=c,c.return=o;i.sibling!==null;)i=i.sibling,c=c.sibling=Ir(i,i.pendingProps),c.return=o;c.sibling=null}return o.child}function vm(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Mc(i)))}function vj(i,o,c){switch(o.tag){case 3:Re(o,o.stateNode.containerInfo),Ei(o,vt,i.memoizedState.cache),ga();break;case 27:case 5:Ke(o);break;case 4:Re(o,o.stateNode.containerInfo);break;case 10:Ei(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Vh(o),null;break;case 13:var f=o.memoizedState;if(f!==null)return f.dehydrated!==null?(Ai(o),o.flags|=128,null):(c&o.child.childLanes)!==0?Cx(i,o,c):(Ai(o),i=Hr(i,o,c),i!==null?i.sibling:null);Ai(o);break;case 19:var b=(i.flags&128)!==0;if(f=(c&o.childLanes)!==0,f||(bo(i,o,c,!1),f=(c&o.childLanes)!==0),b){if(f)return Rx(i,o,c);o.flags|=128}if(b=o.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),le(ht,ht.current),f)break;return null;case 22:return o.lanes=0,yx(i,o,c,o.pendingProps);case 24:Ei(o,vt,i.memoizedState.cache)}return Hr(i,o,c)}function Ax(i,o,c){if(i!==null)if(i.memoizedProps!==o.pendingProps)xt=!0;else{if(!vm(i,c)&&(o.flags&128)===0)return xt=!1,vj(i,o,c);xt=(i.flags&131072)!==0}else xt=!1,Me&&(o.flags&1048576)!==0&&o0(o,Hs,o.index);switch(o.lanes=0,o.tag){case 16:e:{var f=o.pendingProps;if(i=xa(o.elementType),o.type=i,typeof i=="function")wh(i)?(f=Ea(i,f),o.tag=1,o=wx(null,o,i,f,c)):(o.tag=0,o=dm(null,o,i,f,c));else{if(i!=null){var b=i.$$typeof;if(b===O){o.tag=11,o=gx(null,o,i,f,c);break e}else if(b===D){o.tag=14,o=bx(null,o,i,f,c);break e}}throw o=ne(i)||i,Error(r(306,o,""))}}return o;case 0:return dm(i,o,o.type,o.pendingProps,c);case 1:return f=o.type,b=Ea(f,o.pendingProps),wx(i,o,f,b,c);case 3:e:{if(Re(o,o.stateNode.containerInfo),i===null)throw Error(r(387));f=o.pendingProps;var x=o.memoizedState;b=x.element,zh(i,o),Ys(o,f,null,c);var w=o.memoizedState;if(f=w.cache,Ei(o,vt,f),f!==x.cache&&Lh(o,[vt],c,!0),Ws(),f=w.element,x.isDehydrated)if(x={element:f,isDehydrated:!1,cache:w.cache},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){o=Ex(i,o,f,c);break e}else if(f!==b){b=zn(Error(r(424)),o),Bs(b),o=Ex(i,o,f,c);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,rt=Vn(i.firstChild),Bt=o,Me=!0,Si=null,Hn=!0,c=y0(o,null,f,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(ga(),f===b){o=Hr(i,o,c);break e}Ft(i,o,f,c)}o=o.child}return o;case 26:return tu(i,o),i===null?(c=$_(o.type,null,o.pendingProps,null))?o.memoizedState=c:Me||(c=o.type,i=o.pendingProps,f=vu(fe.current).createElement(c),f[Ht]=o,f[on]=i,Gt(f,c,i),Dt(f),o.stateNode=f):o.memoizedState=$_(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Ke(o),i===null&&Me&&(f=o.stateNode=M_(o.type,o.pendingProps,fe.current),Bt=o,Hn=!0,b=rt,Pi(o.type)?(Xm=b,rt=Vn(f.firstChild)):rt=b),Ft(i,o,o.pendingProps.children,c),tu(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Me&&((b=f=rt)&&(f=Wj(f,o.type,o.pendingProps,Hn),f!==null?(o.stateNode=f,Bt=o,rt=Vn(f.firstChild),Hn=!1,b=!0):b=!1),b||wi(o)),Ke(o),b=o.type,x=o.pendingProps,w=i!==null?i.memoizedProps:null,f=x.children,qm(b,x)?f=null:w!==null&&qm(b,w)&&(o.flags|=32),o.memoizedState!==null&&(b=Gh(i,o,cj,null,null,c),pl._currentValue=b),tu(i,o),Ft(i,o,f,c),o.child;case 6:return i===null&&Me&&((i=c=rt)&&(c=Yj(c,o.pendingProps,Hn),c!==null?(o.stateNode=c,Bt=o,rt=null,i=!0):i=!1),i||wi(o)),null;case 13:return Cx(i,o,c);case 4:return Re(o,o.stateNode.containerInfo),f=o.pendingProps,i===null?o.child=Sa(o,null,f,c):Ft(i,o,f,c),o.child;case 11:return gx(i,o,o.type,o.pendingProps,c);case 7:return Ft(i,o,o.pendingProps,c),o.child;case 8:return Ft(i,o,o.pendingProps.children,c),o.child;case 12:return Ft(i,o,o.pendingProps.children,c),o.child;case 10:return f=o.pendingProps,Ei(o,o.type,f.value),Ft(i,o,f.children,c),o.child;case 9:return b=o.type._context,f=o.pendingProps.children,va(o),b=Vt(b),f=f(b),o.flags|=1,Ft(i,o,f,c),o.child;case 14:return bx(i,o,o.type,o.pendingProps,c);case 15:return vx(i,o,o.type,o.pendingProps,c);case 19:return Rx(i,o,c);case 31:return bj(i,o,c);case 22:return yx(i,o,c,o.pendingProps);case 24:return va(o),f=Vt(vt),i===null?(b=Ih(),b===null&&(b=Xe,x=Oh(),b.pooledCache=x,x.refCount++,x!==null&&(b.pooledCacheLanes|=c),b=x),o.memoizedState={parent:f,cache:b},Ph(o),Ei(o,vt,b)):((i.lanes&c)!==0&&(zh(i,o),Ys(o,null,null,c),Ws()),b=i.memoizedState,x=o.memoizedState,b.parent!==f?(b={parent:f,cache:f},o.memoizedState=b,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=b),Ei(o,vt,f)):(f=x.cache,Ei(o,vt,f),f!==b.cache&&Lh(o,[vt],c,!0))),Ft(i,o,o.pendingProps.children,c),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function Br(i){i.flags|=4}function ym(i,o,c,f,b){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(b&335544128)===b)if(i.stateNode.complete)i.flags|=8192;else if(t_())i.flags|=8192;else throw _a=Uc,Mh}else i.flags&=-16777217}function Tx(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!F_(o))if(t_())i.flags|=8192;else throw _a=Uc,Mh}function ru(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?ly():536870912,i.lanes|=o,To|=o)}function tl(i,o){if(!Me)switch(i.tailMode){case"hidden":o=i.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function it(i){var o=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(o)for(var b=i.child;b!==null;)c|=b.lanes|b.childLanes,f|=b.subtreeFlags&65011712,f|=b.flags&65011712,b.return=i,b=b.sibling;else for(b=i.child;b!==null;)c|=b.lanes|b.childLanes,f|=b.subtreeFlags,f|=b.flags,b.return=i,b=b.sibling;return i.subtreeFlags|=f,i.childLanes=c,o}function yj(i,o,c){var f=o.pendingProps;switch(Rh(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(o),null;case 1:return it(o),null;case 3:return c=o.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),o.memoizedState.cache!==f&&(o.flags|=2048),zr(vt),he(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(go(o)?Br(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Th())),it(o),null;case 26:var b=o.type,x=o.memoizedState;return i===null?(Br(o),x!==null?(it(o),Tx(o,x)):(it(o),ym(o,b,null,f,c))):x?x!==i.memoizedState?(Br(o),it(o),Tx(o,x)):(it(o),o.flags&=-16777217):(i=i.memoizedProps,i!==f&&Br(o),it(o),ym(o,b,i,f,c)),null;case 27:if(Be(o),c=fe.current,b=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==f&&Br(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return it(o),null}i=de.current,go(o)?l0(o):(i=M_(b,f,c),o.stateNode=i,Br(o))}return it(o),null;case 5:if(Be(o),b=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==f&&Br(o);else{if(!f){if(o.stateNode===null)throw Error(r(166));return it(o),null}if(x=de.current,go(o))l0(o);else{var w=vu(fe.current);switch(x){case 1:x=w.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:x=w.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":x=w.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":x=w.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":x=w.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof f.is=="string"?w.createElement("select",{is:f.is}):w.createElement("select"),f.multiple?x.multiple=!0:f.size&&(x.size=f.size);break;default:x=typeof f.is=="string"?w.createElement(b,{is:f.is}):w.createElement(b)}}x[Ht]=o,x[on]=f;e:for(w=o.child;w!==null;){if(w.tag===5||w.tag===6)x.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===o)break e;for(;w.sibling===null;){if(w.return===null||w.return===o)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}o.stateNode=x;e:switch(Gt(x,b,f),b){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&Br(o)}}return it(o),ym(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,c),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==f&&Br(o);else{if(typeof f!="string"&&o.stateNode===null)throw Error(r(166));if(i=fe.current,go(o)){if(i=o.stateNode,c=o.memoizedProps,f=null,b=Bt,b!==null)switch(b.tag){case 27:case 5:f=b.memoizedProps}i[Ht]=o,i=!!(i.nodeValue===c||f!==null&&f.suppressHydrationWarning===!0||C_(i.nodeValue,c)),i||wi(o,!0)}else i=vu(i).createTextNode(f),i[Ht]=o,o.stateNode=i}return it(o),null;case 31:if(c=o.memoizedState,i===null||i.memoizedState!==null){if(f=go(o),c!==null){if(i===null){if(!f)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Ht]=o}else ga(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;it(o),i=!1}else c=Th(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=c),i=!0;if(!i)return o.flags&256?(En(o),o):(En(o),null);if((o.flags&128)!==0)throw Error(r(558))}return it(o),null;case 13:if(f=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(b=go(o),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(r(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[Ht]=o}else ga(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;it(o),b=!1}else b=Th(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=b),b=!0;if(!b)return o.flags&256?(En(o),o):(En(o),null)}return En(o),(o.flags&128)!==0?(o.lanes=c,o):(c=f!==null,i=i!==null&&i.memoizedState!==null,c&&(f=o.child,b=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(b=f.alternate.memoizedState.cachePool.pool),x=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(x=f.memoizedState.cachePool.pool),x!==b&&(f.flags|=2048)),c!==i&&c&&(o.child.flags|=8192),ru(o,o.updateQueue),it(o),null);case 4:return he(),i===null&&Hm(o.stateNode.containerInfo),it(o),null;case 10:return zr(o.type),it(o),null;case 19:if(ee(ht),f=o.memoizedState,f===null)return it(o),null;if(b=(o.flags&128)!==0,x=f.rendering,x===null)if(b)tl(f,!1);else{if(dt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Fc(i),x!==null){for(o.flags|=128,tl(f,!1),i=x.updateQueue,o.updateQueue=i,ru(o,i),o.subtreeFlags=0,i=c,c=o.child;c!==null;)r0(c,i),c=c.sibling;return le(ht,ht.current&1|2),Me&&Mr(o,f.treeForkCount),o.child}i=i.sibling}f.tail!==null&&vn()>lu&&(o.flags|=128,b=!0,tl(f,!1),o.lanes=4194304)}else{if(!b)if(i=Fc(x),i!==null){if(o.flags|=128,b=!0,i=i.updateQueue,o.updateQueue=i,ru(o,i),tl(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!Me)return it(o),null}else 2*vn()-f.renderingStartTime>lu&&c!==536870912&&(o.flags|=128,b=!0,tl(f,!1),o.lanes=4194304);f.isBackwards?(x.sibling=o.child,o.child=x):(i=f.last,i!==null?i.sibling=x:o.child=x,f.last=x)}return f.tail!==null?(i=f.tail,f.rendering=i,f.tail=i.sibling,f.renderingStartTime=vn(),i.sibling=null,c=ht.current,le(ht,b?c&1|2:c&1),Me&&Mr(o,f.treeForkCount),i):(it(o),null);case 22:case 23:return En(o),Bh(),f=o.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(o.flags|=8192):f&&(o.flags|=8192),f?(c&536870912)!==0&&(o.flags&128)===0&&(it(o),o.subtreeFlags&6&&(o.flags|=8192)):it(o),c=o.updateQueue,c!==null&&ru(o,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),f=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),f!==c&&(o.flags|=2048),i!==null&&ee(ya),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),zr(vt),it(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function xj(i,o){switch(Rh(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return zr(vt),he(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return Be(o),null;case 31:if(o.memoizedState!==null){if(En(o),o.alternate===null)throw Error(r(340));ga()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(En(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));ga()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return ee(ht),null;case 4:return he(),null;case 10:return zr(o.type),null;case 22:case 23:return En(o),Bh(),i!==null&&ee(ya),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return zr(vt),null;case 25:return null;default:return null}}function Nx(i,o){switch(Rh(o),o.tag){case 3:zr(vt),he();break;case 26:case 27:case 5:Be(o);break;case 4:he();break;case 31:o.memoizedState!==null&&En(o);break;case 13:En(o);break;case 19:ee(ht);break;case 10:zr(o.type);break;case 22:case 23:En(o),Bh(),i!==null&&ee(ya);break;case 24:zr(vt)}}function nl(i,o){try{var c=o.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var b=f.next;c=b;do{if((c.tag&i)===i){f=void 0;var x=c.create,w=c.inst;f=x(),w.destroy=f}c=c.next}while(c!==b)}}catch(j){Fe(o,o.return,j)}}function Ni(i,o,c){try{var f=o.updateQueue,b=f!==null?f.lastEffect:null;if(b!==null){var x=b.next;f=x;do{if((f.tag&i)===i){var w=f.inst,j=w.destroy;if(j!==void 0){w.destroy=void 0,b=o;var I=c,K=j;try{K()}catch(te){Fe(b,I,te)}}}f=f.next}while(f!==x)}}catch(te){Fe(o,o.return,te)}}function jx(i){var o=i.updateQueue;if(o!==null){var c=i.stateNode;try{_0(o,c)}catch(f){Fe(i,i.return,f)}}}function Lx(i,o,c){c.props=Ea(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(f){Fe(i,o,f)}}function rl(i,o){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var f=i.stateNode;break;case 30:f=i.stateNode;break;default:f=i.stateNode}typeof c=="function"?i.refCleanup=c(f):c.current=f}}catch(b){Fe(i,o,b)}}function hr(i,o){var c=i.ref,f=i.refCleanup;if(c!==null)if(typeof f=="function")try{f()}catch(b){Fe(i,o,b)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(b){Fe(i,o,b)}else c.current=null}function Ox(i){var o=i.type,c=i.memoizedProps,f=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":c.autoFocus&&f.focus();break e;case"img":c.src?f.src=c.src:c.srcSet&&(f.srcset=c.srcSet)}}catch(b){Fe(i,i.return,b)}}function xm(i,o,c){try{var f=i.stateNode;Bj(f,i.type,c,o),f[on]=o}catch(b){Fe(i,i.return,b)}}function Dx(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Pi(i.type)||i.tag===4}function _m(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Dx(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Pi(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Sm(i,o,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,o):(o=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,o.appendChild(i),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=Or));else if(f!==4&&(f===27&&Pi(i.type)&&(c=i.stateNode,o=null),i=i.child,i!==null))for(Sm(i,o,c),i=i.sibling;i!==null;)Sm(i,o,c),i=i.sibling}function iu(i,o,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,o?c.insertBefore(i,o):c.appendChild(i);else if(f!==4&&(f===27&&Pi(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(iu(i,o,c),i=i.sibling;i!==null;)iu(i,o,c),i=i.sibling}function Ix(i){var o=i.stateNode,c=i.memoizedProps;try{for(var f=i.type,b=o.attributes;b.length;)o.removeAttributeNode(b[0]);Gt(o,f,c),o[Ht]=i,o[on]=c}catch(x){Fe(i,i.return,x)}}var Vr=!1,_t=!1,wm=!1,Mx=typeof WeakSet=="function"?WeakSet:Set,It=null;function _j(i,o){if(i=i.containerInfo,Fm=Cu,i=Wy(i),gh(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var b=f.anchorOffset,x=f.focusNode;f=f.focusOffset;try{c.nodeType,x.nodeType}catch{c=null;break e}var w=0,j=-1,I=-1,K=0,te=0,oe=i,X=null;t:for(;;){for(var Q;oe!==c||b!==0&&oe.nodeType!==3||(j=w+b),oe!==x||f!==0&&oe.nodeType!==3||(I=w+f),oe.nodeType===3&&(w+=oe.nodeValue.length),(Q=oe.firstChild)!==null;)X=oe,oe=Q;for(;;){if(oe===i)break t;if(X===c&&++K===b&&(j=w),X===x&&++te===f&&(I=w),(Q=oe.nextSibling)!==null)break;oe=X,X=oe.parentNode}oe=Q}c=j===-1||I===-1?null:{start:j,end:I}}else c=null}c=c||{start:0,end:0}}else c=null;for(Gm={focusedElem:i,selectionRange:c},Cu=!1,It=o;It!==null;)if(o=It,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,It=i;else for(;It!==null;){switch(o=It,x=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(c=0;c<i.length;c++)b=i[c],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&x!==null){i=void 0,c=o,b=x.memoizedProps,x=x.memoizedState,f=c.stateNode;try{var ge=Ea(c.type,b);i=f.getSnapshotBeforeUpdate(ge,x),f.__reactInternalSnapshotBeforeUpdate=i}catch(we){Fe(c,c.return,we)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,c=i.nodeType,c===9)Wm(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Wm(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,It=i;break}It=o.return}}function Px(i,o,c){var f=c.flags;switch(c.tag){case 0:case 11:case 15:Gr(i,c),f&4&&nl(5,c);break;case 1:if(Gr(i,c),f&4)if(i=c.stateNode,o===null)try{i.componentDidMount()}catch(w){Fe(c,c.return,w)}else{var b=Ea(c.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(b,o,i.__reactInternalSnapshotBeforeUpdate)}catch(w){Fe(c,c.return,w)}}f&64&&jx(c),f&512&&rl(c,c.return);break;case 3:if(Gr(i,c),f&64&&(i=c.updateQueue,i!==null)){if(o=null,c.child!==null)switch(c.child.tag){case 27:case 5:o=c.child.stateNode;break;case 1:o=c.child.stateNode}try{_0(i,o)}catch(w){Fe(c,c.return,w)}}break;case 27:o===null&&f&4&&Ix(c);case 26:case 5:Gr(i,c),o===null&&f&4&&Ox(c),f&512&&rl(c,c.return);break;case 12:Gr(i,c);break;case 31:Gr(i,c),f&4&&Ux(i,c);break;case 13:Gr(i,c),f&4&&Hx(i,c),f&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=Nj.bind(null,c),Kj(i,c))));break;case 22:if(f=c.memoizedState!==null||Vr,!f){o=o!==null&&o.memoizedState!==null||_t,b=Vr;var x=_t;Vr=f,(_t=o)&&!x?qr(i,c,(c.subtreeFlags&8772)!==0):Gr(i,c),Vr=b,_t=x}break;case 30:break;default:Gr(i,c)}}function zx(i){var o=i.alternate;o!==null&&(i.alternate=null,zx(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Jf(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var ot=null,ln=!1;function Fr(i,o,c){for(c=c.child;c!==null;)$x(i,o,c),c=c.sibling}function $x(i,o,c){if(yn&&typeof yn.onCommitFiberUnmount=="function")try{yn.onCommitFiberUnmount(Rs,c)}catch{}switch(c.tag){case 26:_t||hr(c,o),Fr(i,o,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:_t||hr(c,o);var f=ot,b=ln;Pi(c.type)&&(ot=c.stateNode,ln=!1),Fr(i,o,c),fl(c.stateNode),ot=f,ln=b;break;case 5:_t||hr(c,o);case 6:if(f=ot,b=ln,ot=null,Fr(i,o,c),ot=f,ln=b,ot!==null)if(ln)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(c.stateNode)}catch(x){Fe(c,o,x)}else try{ot.removeChild(c.stateNode)}catch(x){Fe(c,o,x)}break;case 18:ot!==null&&(ln?(i=ot,j_(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),Po(i)):j_(ot,c.stateNode));break;case 4:f=ot,b=ln,ot=c.stateNode.containerInfo,ln=!0,Fr(i,o,c),ot=f,ln=b;break;case 0:case 11:case 14:case 15:Ni(2,c,o),_t||Ni(4,c,o),Fr(i,o,c);break;case 1:_t||(hr(c,o),f=c.stateNode,typeof f.componentWillUnmount=="function"&&Lx(c,o,f)),Fr(i,o,c);break;case 21:Fr(i,o,c);break;case 22:_t=(f=_t)||c.memoizedState!==null,Fr(i,o,c),_t=f;break;default:Fr(i,o,c)}}function Ux(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Po(i)}catch(c){Fe(o,o.return,c)}}}function Hx(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Po(i)}catch(c){Fe(o,o.return,c)}}function Sj(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new Mx),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new Mx),o;default:throw Error(r(435,i.tag))}}function au(i,o){var c=Sj(i);o.forEach(function(f){if(!c.has(f)){c.add(f);var b=jj.bind(null,i,f);f.then(b,b)}})}function cn(i,o){var c=o.deletions;if(c!==null)for(var f=0;f<c.length;f++){var b=c[f],x=i,w=o,j=w;e:for(;j!==null;){switch(j.tag){case 27:if(Pi(j.type)){ot=j.stateNode,ln=!1;break e}break;case 5:ot=j.stateNode,ln=!1;break e;case 3:case 4:ot=j.stateNode.containerInfo,ln=!0;break e}j=j.return}if(ot===null)throw Error(r(160));$x(x,w,b),ot=null,ln=!1,x=b.alternate,x!==null&&(x.return=null),b.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)Bx(o,i),o=o.sibling}var nr=null;function Bx(i,o){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:cn(o,i),un(i),f&4&&(Ni(3,i,i.return),nl(3,i),Ni(5,i,i.return));break;case 1:cn(o,i),un(i),f&512&&(_t||c===null||hr(c,c.return)),f&64&&Vr&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?f:c.concat(f))));break;case 26:var b=nr;if(cn(o,i),un(i),f&512&&(_t||c===null||hr(c,c.return)),f&4){var x=c!==null?c.memoizedState:null;if(f=i.memoizedState,c===null)if(f===null)if(i.stateNode===null){e:{f=i.type,c=i.memoizedProps,b=b.ownerDocument||b;t:switch(f){case"title":x=b.getElementsByTagName("title")[0],(!x||x[Ns]||x[Ht]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=b.createElement(f),b.head.insertBefore(x,b.querySelector("head > title"))),Gt(x,f,c),x[Ht]=i,Dt(x),f=x;break e;case"link":var w=B_("link","href",b).get(f+(c.href||""));if(w){for(var j=0;j<w.length;j++)if(x=w[j],x.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&x.getAttribute("rel")===(c.rel==null?null:c.rel)&&x.getAttribute("title")===(c.title==null?null:c.title)&&x.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){w.splice(j,1);break t}}x=b.createElement(f),Gt(x,f,c),b.head.appendChild(x);break;case"meta":if(w=B_("meta","content",b).get(f+(c.content||""))){for(j=0;j<w.length;j++)if(x=w[j],x.getAttribute("content")===(c.content==null?null:""+c.content)&&x.getAttribute("name")===(c.name==null?null:c.name)&&x.getAttribute("property")===(c.property==null?null:c.property)&&x.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&x.getAttribute("charset")===(c.charSet==null?null:c.charSet)){w.splice(j,1);break t}}x=b.createElement(f),Gt(x,f,c),b.head.appendChild(x);break;default:throw Error(r(468,f))}x[Ht]=i,Dt(x),f=x}i.stateNode=f}else V_(b,i.type,i.stateNode);else i.stateNode=H_(b,f,i.memoizedProps);else x!==f?(x===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):x.count--,f===null?V_(b,i.type,i.stateNode):H_(b,f,i.memoizedProps)):f===null&&i.stateNode!==null&&xm(i,i.memoizedProps,c.memoizedProps)}break;case 27:cn(o,i),un(i),f&512&&(_t||c===null||hr(c,c.return)),c!==null&&f&4&&xm(i,i.memoizedProps,c.memoizedProps);break;case 5:if(cn(o,i),un(i),f&512&&(_t||c===null||hr(c,c.return)),i.flags&32){b=i.stateNode;try{ao(b,"")}catch(ge){Fe(i,i.return,ge)}}f&4&&i.stateNode!=null&&(b=i.memoizedProps,xm(i,b,c!==null?c.memoizedProps:b)),f&1024&&(wm=!0);break;case 6:if(cn(o,i),un(i),f&4){if(i.stateNode===null)throw Error(r(162));f=i.memoizedProps,c=i.stateNode;try{c.nodeValue=f}catch(ge){Fe(i,i.return,ge)}}break;case 3:if(_u=null,b=nr,nr=yu(o.containerInfo),cn(o,i),nr=b,un(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{Po(o.containerInfo)}catch(ge){Fe(i,i.return,ge)}wm&&(wm=!1,Vx(i));break;case 4:f=nr,nr=yu(i.stateNode.containerInfo),cn(o,i),un(i),nr=f;break;case 12:cn(o,i),un(i);break;case 31:cn(o,i),un(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,au(i,f)));break;case 13:cn(o,i),un(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(su=vn()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,au(i,f)));break;case 22:b=i.memoizedState!==null;var I=c!==null&&c.memoizedState!==null,K=Vr,te=_t;if(Vr=K||b,_t=te||I,cn(o,i),_t=te,Vr=K,un(i),f&8192)e:for(o=i.stateNode,o._visibility=b?o._visibility&-2:o._visibility|1,b&&(c===null||I||Vr||_t||Ca(i)),c=null,o=i;;){if(o.tag===5||o.tag===26){if(c===null){I=c=o;try{if(x=I.stateNode,b)w=x.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{j=I.stateNode;var oe=I.memoizedProps.style,X=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;j.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ge){Fe(I,I.return,ge)}}}else if(o.tag===6){if(c===null){I=o;try{I.stateNode.nodeValue=b?"":I.memoizedProps}catch(ge){Fe(I,I.return,ge)}}}else if(o.tag===18){if(c===null){I=o;try{var Q=I.stateNode;b?L_(Q,!0):L_(I.stateNode,!1)}catch(ge){Fe(I,I.return,ge)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;c===o&&(c=null),o=o.return}c===o&&(c=null),o.sibling.return=o.return,o=o.sibling}f&4&&(f=i.updateQueue,f!==null&&(c=f.retryQueue,c!==null&&(f.retryQueue=null,au(i,c))));break;case 19:cn(o,i),un(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,au(i,f)));break;case 30:break;case 21:break;default:cn(o,i),un(i)}}function un(i){var o=i.flags;if(o&2){try{for(var c,f=i.return;f!==null;){if(Dx(f)){c=f;break}f=f.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var b=c.stateNode,x=_m(i);iu(i,x,b);break;case 5:var w=c.stateNode;c.flags&32&&(ao(w,""),c.flags&=-33);var j=_m(i);iu(i,j,w);break;case 3:case 4:var I=c.stateNode.containerInfo,K=_m(i);Sm(i,K,I);break;default:throw Error(r(161))}}catch(te){Fe(i,i.return,te)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function Vx(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;Vx(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function Gr(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)Px(i,o.alternate,o),o=o.sibling}function Ca(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Ni(4,o,o.return),Ca(o);break;case 1:hr(o,o.return);var c=o.stateNode;typeof c.componentWillUnmount=="function"&&Lx(o,o.return,c),Ca(o);break;case 27:fl(o.stateNode);case 26:case 5:hr(o,o.return),Ca(o);break;case 22:o.memoizedState===null&&Ca(o);break;case 30:Ca(o);break;default:Ca(o)}i=i.sibling}}function qr(i,o,c){for(c=c&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var f=o.alternate,b=i,x=o,w=x.flags;switch(x.tag){case 0:case 11:case 15:qr(b,x,c),nl(4,x);break;case 1:if(qr(b,x,c),f=x,b=f.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(K){Fe(f,f.return,K)}if(f=x,b=f.updateQueue,b!==null){var j=f.stateNode;try{var I=b.shared.hiddenCallbacks;if(I!==null)for(b.shared.hiddenCallbacks=null,b=0;b<I.length;b++)x0(I[b],j)}catch(K){Fe(f,f.return,K)}}c&&w&64&&jx(x),rl(x,x.return);break;case 27:Ix(x);case 26:case 5:qr(b,x,c),c&&f===null&&w&4&&Ox(x),rl(x,x.return);break;case 12:qr(b,x,c);break;case 31:qr(b,x,c),c&&w&4&&Ux(b,x);break;case 13:qr(b,x,c),c&&w&4&&Hx(b,x);break;case 22:x.memoizedState===null&&qr(b,x,c),rl(x,x.return);break;case 30:break;default:qr(b,x,c)}o=o.sibling}}function Em(i,o){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&Vs(c))}function Cm(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Vs(i))}function rr(i,o,c,f){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Fx(i,o,c,f),o=o.sibling}function Fx(i,o,c,f){var b=o.flags;switch(o.tag){case 0:case 11:case 15:rr(i,o,c,f),b&2048&&nl(9,o);break;case 1:rr(i,o,c,f);break;case 3:rr(i,o,c,f),b&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Vs(i)));break;case 12:if(b&2048){rr(i,o,c,f),i=o.stateNode;try{var x=o.memoizedProps,w=x.id,j=x.onPostCommit;typeof j=="function"&&j(w,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(I){Fe(o,o.return,I)}}else rr(i,o,c,f);break;case 31:rr(i,o,c,f);break;case 13:rr(i,o,c,f);break;case 23:break;case 22:x=o.stateNode,w=o.alternate,o.memoizedState!==null?x._visibility&2?rr(i,o,c,f):il(i,o):x._visibility&2?rr(i,o,c,f):(x._visibility|=2,ko(i,o,c,f,(o.subtreeFlags&10256)!==0||!1)),b&2048&&Em(w,o);break;case 24:rr(i,o,c,f),b&2048&&Cm(o.alternate,o);break;default:rr(i,o,c,f)}}function ko(i,o,c,f,b){for(b=b&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var x=i,w=o,j=c,I=f,K=w.flags;switch(w.tag){case 0:case 11:case 15:ko(x,w,j,I,b),nl(8,w);break;case 23:break;case 22:var te=w.stateNode;w.memoizedState!==null?te._visibility&2?ko(x,w,j,I,b):il(x,w):(te._visibility|=2,ko(x,w,j,I,b)),b&&K&2048&&Em(w.alternate,w);break;case 24:ko(x,w,j,I,b),b&&K&2048&&Cm(w.alternate,w);break;default:ko(x,w,j,I,b)}o=o.sibling}}function il(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var c=i,f=o,b=f.flags;switch(f.tag){case 22:il(c,f),b&2048&&Em(f.alternate,f);break;case 24:il(c,f),b&2048&&Cm(f.alternate,f);break;default:il(c,f)}o=o.sibling}}var al=8192;function Ro(i,o,c){if(i.subtreeFlags&al)for(i=i.child;i!==null;)Gx(i,o,c),i=i.sibling}function Gx(i,o,c){switch(i.tag){case 26:Ro(i,o,c),i.flags&al&&i.memoizedState!==null&&lL(c,nr,i.memoizedState,i.memoizedProps);break;case 5:Ro(i,o,c);break;case 3:case 4:var f=nr;nr=yu(i.stateNode.containerInfo),Ro(i,o,c),nr=f;break;case 22:i.memoizedState===null&&(f=i.alternate,f!==null&&f.memoizedState!==null?(f=al,al=16777216,Ro(i,o,c),al=f):Ro(i,o,c));break;default:Ro(i,o,c)}}function qx(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function ol(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var f=o[c];It=f,Wx(f,i)}qx(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Zx(i),i=i.sibling}function Zx(i){switch(i.tag){case 0:case 11:case 15:ol(i),i.flags&2048&&Ni(9,i,i.return);break;case 3:ol(i);break;case 12:ol(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,ou(i)):ol(i);break;default:ol(i)}}function ou(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var f=o[c];It=f,Wx(f,i)}qx(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Ni(8,o,o.return),ou(o);break;case 22:c=o.stateNode,c._visibility&2&&(c._visibility&=-3,ou(o));break;default:ou(o)}i=i.sibling}}function Wx(i,o){for(;It!==null;){var c=It;switch(c.tag){case 0:case 11:case 15:Ni(8,c,o);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var f=c.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Vs(c.memoizedState.cache)}if(f=c.child,f!==null)f.return=c,It=f;else e:for(c=i;It!==null;){f=It;var b=f.sibling,x=f.return;if(zx(f),f===c){It=null;break e}if(b!==null){b.return=x,It=b;break e}It=x}}}var wj={getCacheForType:function(i){var o=Vt(vt),c=o.data.get(i);return c===void 0&&(c=i(),o.data.set(i,c)),c},cacheSignal:function(){return Vt(vt).controller.signal}},Ej=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Xe=null,Le=null,De=0,Ve=0,Cn=null,ji=!1,Ao=!1,km=!1,Zr=0,dt=0,Li=0,ka=0,Rm=0,kn=0,To=0,sl=null,dn=null,Am=!1,su=0,Yx=0,lu=1/0,cu=null,Oi=null,Ct=0,Di=null,No=null,Wr=0,Tm=0,Nm=null,Kx=null,ll=0,jm=null;function Rn(){return(Ue&2)!==0&&De!==0?De&-De:z.T!==null?Pm():fy()}function Xx(){if(kn===0)if((De&536870912)===0||Me){var i=bc;bc<<=1,(bc&3932160)===0&&(bc=262144),kn=i}else kn=536870912;return i=wn.current,i!==null&&(i.flags|=32),kn}function fn(i,o,c){(i===Xe&&(Ve===2||Ve===9)||i.cancelPendingCommit!==null)&&(jo(i,0),Ii(i,De,kn,!1)),Ts(i,c),((Ue&2)===0||i!==Xe)&&(i===Xe&&((Ue&2)===0&&(ka|=c),dt===4&&Ii(i,De,kn,!1)),mr(i))}function Qx(i,o,c){if((Ue&6)!==0)throw Error(r(327));var f=!c&&(o&127)===0&&(o&i.expiredLanes)===0||As(i,o),b=f?Rj(i,o):Om(i,o,!0),x=f;do{if(b===0){Ao&&!f&&Ii(i,o,0,!1);break}else{if(c=i.current.alternate,x&&!Cj(c)){b=Om(i,o,!1),x=!1;continue}if(b===2){if(x=o,i.errorRecoveryDisabledLanes&x)var w=0;else w=i.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){o=w;e:{var j=i;b=sl;var I=j.current.memoizedState.isDehydrated;if(I&&(jo(j,w).flags|=256),w=Om(j,w,!1),w!==2){if(km&&!I){j.errorRecoveryDisabledLanes|=x,ka|=x,b=4;break e}x=dn,dn=b,x!==null&&(dn===null?dn=x:dn.push.apply(dn,x))}b=w}if(x=!1,b!==2)continue}}if(b===1){jo(i,0),Ii(i,o,0,!0);break}e:{switch(f=i,x=b,x){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Ii(f,o,kn,!ji);break e;case 2:dn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(b=su+300-vn(),10<b)){if(Ii(f,o,kn,!ji),yc(f,0,!0)!==0)break e;Wr=o,f.timeoutHandle=T_(Jx.bind(null,f,c,dn,cu,Am,o,kn,ka,To,ji,x,"Throttled",-0,0),b);break e}Jx(f,c,dn,cu,Am,o,kn,ka,To,ji,x,null,-0,0)}}break}while(!0);mr(i)}function Jx(i,o,c,f,b,x,w,j,I,K,te,oe,X,Q){if(i.timeoutHandle=-1,oe=o.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Or},Gx(o,x,oe);var ge=(x&62914560)===x?su-vn():(x&4194048)===x?Yx-vn():0;if(ge=cL(oe,ge),ge!==null){Wr=x,i.cancelPendingCommit=ge(s_.bind(null,i,o,x,c,f,b,w,j,I,te,oe,null,X,Q)),Ii(i,x,w,!K);return}}s_(i,o,x,c,f,b,w,j,I)}function Cj(i){for(var o=i;;){var c=o.tag;if((c===0||c===11||c===15)&&o.flags&16384&&(c=o.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var f=0;f<c.length;f++){var b=c[f],x=b.getSnapshot;b=b.value;try{if(!_n(x(),b))return!1}catch{return!1}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Ii(i,o,c,f){o&=~Rm,o&=~ka,i.suspendedLanes|=o,i.pingedLanes&=~o,f&&(i.warmLanes|=o),f=i.expirationTimes;for(var b=o;0<b;){var x=31-xn(b),w=1<<x;f[x]=-1,b&=~w}c!==0&&cy(i,c,o)}function uu(){return(Ue&6)===0?(cl(0),!1):!0}function Lm(){if(Le!==null){if(Ve===0)var i=Le.return;else i=Le,Pr=ba=null,Wh(i),_o=null,Gs=0,i=Le;for(;i!==null;)Nx(i.alternate,i),i=i.return;Le=null}}function jo(i,o){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,Gj(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),Wr=0,Lm(),Xe=i,Le=c=Ir(i.current,null),De=o,Ve=0,Cn=null,ji=!1,Ao=As(i,o),km=!1,To=kn=Rm=ka=Li=dt=0,dn=sl=null,Am=!1,(o&8)!==0&&(o|=o&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=o;0<f;){var b=31-xn(f),x=1<<b;o|=i[b],f&=~x}return Zr=o,jc(),c}function e_(i,o){Ae=null,z.H=Js,o===xo||o===$c?(o=g0(),Ve=3):o===Mh?(o=g0(),Ve=4):Ve=o===um?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Cn=o,Le===null&&(dt=1,Jc(i,zn(o,i.current)))}function t_(){var i=wn.current;return i===null?!0:(De&4194048)===De?Bn===null:(De&62914560)===De||(De&536870912)!==0?i===Bn:!1}function n_(){var i=z.H;return z.H=Js,i===null?Js:i}function r_(){var i=z.A;return z.A=wj,i}function du(){dt=4,ji||(De&4194048)!==De&&wn.current!==null||(Ao=!0),(Li&134217727)===0&&(ka&134217727)===0||Xe===null||Ii(Xe,De,kn,!1)}function Om(i,o,c){var f=Ue;Ue|=2;var b=n_(),x=r_();(Xe!==i||De!==o)&&(cu=null,jo(i,o)),o=!1;var w=dt;e:do try{if(Ve!==0&&Le!==null){var j=Le,I=Cn;switch(Ve){case 8:Lm(),w=6;break e;case 3:case 2:case 9:case 6:wn.current===null&&(o=!0);var K=Ve;if(Ve=0,Cn=null,Lo(i,j,I,K),c&&Ao){w=0;break e}break;default:K=Ve,Ve=0,Cn=null,Lo(i,j,I,K)}}kj(),w=dt;break}catch(te){e_(i,te)}while(!0);return o&&i.shellSuspendCounter++,Pr=ba=null,Ue=f,z.H=b,z.A=x,Le===null&&(Xe=null,De=0,jc()),w}function kj(){for(;Le!==null;)i_(Le)}function Rj(i,o){var c=Ue;Ue|=2;var f=n_(),b=r_();Xe!==i||De!==o?(cu=null,lu=vn()+500,jo(i,o)):Ao=As(i,o);e:do try{if(Ve!==0&&Le!==null){o=Le;var x=Cn;t:switch(Ve){case 1:Ve=0,Cn=null,Lo(i,o,x,1);break;case 2:case 9:if(m0(x)){Ve=0,Cn=null,a_(o);break}o=function(){Ve!==2&&Ve!==9||Xe!==i||(Ve=7),mr(i)},x.then(o,o);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:m0(x)?(Ve=0,Cn=null,a_(o)):(Ve=0,Cn=null,Lo(i,o,x,7));break;case 5:var w=null;switch(Le.tag){case 26:w=Le.memoizedState;case 5:case 27:var j=Le;if(w?F_(w):j.stateNode.complete){Ve=0,Cn=null;var I=j.sibling;if(I!==null)Le=I;else{var K=j.return;K!==null?(Le=K,fu(K)):Le=null}break t}}Ve=0,Cn=null,Lo(i,o,x,5);break;case 6:Ve=0,Cn=null,Lo(i,o,x,6);break;case 8:Lm(),dt=6;break e;default:throw Error(r(462))}}Aj();break}catch(te){e_(i,te)}while(!0);return Pr=ba=null,z.H=f,z.A=b,Ue=c,Le!==null?0:(Xe=null,De=0,jc(),dt)}function Aj(){for(;Le!==null&&!XN();)i_(Le)}function i_(i){var o=Ax(i.alternate,i,Zr);i.memoizedProps=i.pendingProps,o===null?fu(i):Le=o}function a_(i){var o=i,c=o.alternate;switch(o.tag){case 15:case 0:o=Sx(c,o,o.pendingProps,o.type,void 0,De);break;case 11:o=Sx(c,o,o.pendingProps,o.type.render,o.ref,De);break;case 5:Wh(o);default:Nx(c,o),o=Le=r0(o,Zr),o=Ax(c,o,Zr)}i.memoizedProps=i.pendingProps,o===null?fu(i):Le=o}function Lo(i,o,c,f){Pr=ba=null,Wh(o),_o=null,Gs=0;var b=o.return;try{if(gj(i,b,o,c,De)){dt=1,Jc(i,zn(c,i.current)),Le=null;return}}catch(x){if(b!==null)throw Le=b,x;dt=1,Jc(i,zn(c,i.current)),Le=null;return}o.flags&32768?(Me||f===1?i=!0:Ao||(De&536870912)!==0?i=!1:(ji=i=!0,(f===2||f===9||f===3||f===6)&&(f=wn.current,f!==null&&f.tag===13&&(f.flags|=16384))),o_(o,i)):fu(o)}function fu(i){var o=i;do{if((o.flags&32768)!==0){o_(o,ji);return}i=o.return;var c=yj(o.alternate,o,Zr);if(c!==null){Le=c;return}if(o=o.sibling,o!==null){Le=o;return}Le=o=i}while(o!==null);dt===0&&(dt=5)}function o_(i,o){do{var c=xj(i.alternate,i);if(c!==null){c.flags&=32767,Le=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!o&&(i=i.sibling,i!==null)){Le=i;return}Le=i=c}while(i!==null);dt=6,Le=null}function s_(i,o,c,f,b,x,w,j,I){i.cancelPendingCommit=null;do hu();while(Ct!==0);if((Ue&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(x=o.lanes|o.childLanes,x|=_h,s2(i,c,x,w,j,I),i===Xe&&(Le=Xe=null,De=0),No=o,Di=i,Wr=c,Tm=x,Nm=b,Kx=f,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,Lj(pc,function(){return f_(),null})):(i.callbackNode=null,i.callbackPriority=0),f=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||f){f=z.T,z.T=null,b=G.p,G.p=2,w=Ue,Ue|=4;try{_j(i,o,c)}finally{Ue=w,G.p=b,z.T=f}}Ct=1,l_(),c_(),u_()}}function l_(){if(Ct===1){Ct=0;var i=Di,o=No,c=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||c){c=z.T,z.T=null;var f=G.p;G.p=2;var b=Ue;Ue|=4;try{Bx(o,i);var x=Gm,w=Wy(i.containerInfo),j=x.focusedElem,I=x.selectionRange;if(w!==j&&j&&j.ownerDocument&&Zy(j.ownerDocument.documentElement,j)){if(I!==null&&gh(j)){var K=I.start,te=I.end;if(te===void 0&&(te=K),"selectionStart"in j)j.selectionStart=K,j.selectionEnd=Math.min(te,j.value.length);else{var oe=j.ownerDocument||document,X=oe&&oe.defaultView||window;if(X.getSelection){var Q=X.getSelection(),ge=j.textContent.length,we=Math.min(I.start,ge),Ze=I.end===void 0?we:Math.min(I.end,ge);!Q.extend&&we>Ze&&(w=Ze,Ze=we,we=w);var V=qy(j,we),H=qy(j,Ze);if(V&&H&&(Q.rangeCount!==1||Q.anchorNode!==V.node||Q.anchorOffset!==V.offset||Q.focusNode!==H.node||Q.focusOffset!==H.offset)){var W=oe.createRange();W.setStart(V.node,V.offset),Q.removeAllRanges(),we>Ze?(Q.addRange(W),Q.extend(H.node,H.offset)):(W.setEnd(H.node,H.offset),Q.addRange(W))}}}}for(oe=[],Q=j;Q=Q.parentNode;)Q.nodeType===1&&oe.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<oe.length;j++){var re=oe[j];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Cu=!!Fm,Gm=Fm=null}finally{Ue=b,G.p=f,z.T=c}}i.current=o,Ct=2}}function c_(){if(Ct===2){Ct=0;var i=Di,o=No,c=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||c){c=z.T,z.T=null;var f=G.p;G.p=2;var b=Ue;Ue|=4;try{Px(i,o.alternate,o)}finally{Ue=b,G.p=f,z.T=c}}Ct=3}}function u_(){if(Ct===4||Ct===3){Ct=0,QN();var i=Di,o=No,c=Wr,f=Kx;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Ct=5:(Ct=0,No=Di=null,d_(i,i.pendingLanes));var b=i.pendingLanes;if(b===0&&(Oi=null),Xf(c),o=o.stateNode,yn&&typeof yn.onCommitFiberRoot=="function")try{yn.onCommitFiberRoot(Rs,o,void 0,(o.current.flags&128)===128)}catch{}if(f!==null){o=z.T,b=G.p,G.p=2,z.T=null;try{for(var x=i.onRecoverableError,w=0;w<f.length;w++){var j=f[w];x(j.value,{componentStack:j.stack})}}finally{z.T=o,G.p=b}}(Wr&3)!==0&&hu(),mr(i),b=i.pendingLanes,(c&261930)!==0&&(b&42)!==0?i===jm?ll++:(ll=0,jm=i):ll=0,cl(0)}}function d_(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,Vs(o)))}function hu(){return l_(),c_(),u_(),f_()}function f_(){if(Ct!==5)return!1;var i=Di,o=Tm;Tm=0;var c=Xf(Wr),f=z.T,b=G.p;try{G.p=32>c?32:c,z.T=null,c=Nm,Nm=null;var x=Di,w=Wr;if(Ct=0,No=Di=null,Wr=0,(Ue&6)!==0)throw Error(r(331));var j=Ue;if(Ue|=4,Zx(x.current),Fx(x,x.current,w,c),Ue=j,cl(0,!1),yn&&typeof yn.onPostCommitFiberRoot=="function")try{yn.onPostCommitFiberRoot(Rs,x)}catch{}return!0}finally{G.p=b,z.T=f,d_(i,o)}}function h_(i,o,c){o=zn(c,o),o=cm(i.stateNode,o,2),i=Ri(i,o,2),i!==null&&(Ts(i,2),mr(i))}function Fe(i,o,c){if(i.tag===3)h_(i,i,c);else for(;o!==null;){if(o.tag===3){h_(o,i,c);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Oi===null||!Oi.has(f))){i=zn(c,i),c=mx(2),f=Ri(o,c,2),f!==null&&(px(c,f,o,i),Ts(f,2),mr(f));break}}o=o.return}}function Dm(i,o,c){var f=i.pingCache;if(f===null){f=i.pingCache=new Ej;var b=new Set;f.set(o,b)}else b=f.get(o),b===void 0&&(b=new Set,f.set(o,b));b.has(c)||(km=!0,b.add(c),i=Tj.bind(null,i,o,c),o.then(i,i))}function Tj(i,o,c){var f=i.pingCache;f!==null&&f.delete(o),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,Xe===i&&(De&c)===c&&(dt===4||dt===3&&(De&62914560)===De&&300>vn()-su?(Ue&2)===0&&jo(i,0):Rm|=c,To===De&&(To=0)),mr(i)}function m_(i,o){o===0&&(o=ly()),i=ma(i,o),i!==null&&(Ts(i,o),mr(i))}function Nj(i){var o=i.memoizedState,c=0;o!==null&&(c=o.retryLane),m_(i,c)}function jj(i,o){var c=0;switch(i.tag){case 31:case 13:var f=i.stateNode,b=i.memoizedState;b!==null&&(c=b.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(o),m_(i,c)}function Lj(i,o){return Zf(i,o)}var mu=null,Oo=null,Im=!1,pu=!1,Mm=!1,Mi=0;function mr(i){i!==Oo&&i.next===null&&(Oo===null?mu=Oo=i:Oo=Oo.next=i),pu=!0,Im||(Im=!0,Dj())}function cl(i,o){if(!Mm&&pu){Mm=!0;do for(var c=!1,f=mu;f!==null;){if(i!==0){var b=f.pendingLanes;if(b===0)var x=0;else{var w=f.suspendedLanes,j=f.pingedLanes;x=(1<<31-xn(42|i)+1)-1,x&=b&~(w&~j),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(c=!0,v_(f,x))}else x=De,x=yc(f,f===Xe?x:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(x&3)===0||As(f,x)||(c=!0,v_(f,x));f=f.next}while(c);Mm=!1}}function Oj(){p_()}function p_(){pu=Im=!1;var i=0;Mi!==0&&Fj()&&(i=Mi);for(var o=vn(),c=null,f=mu;f!==null;){var b=f.next,x=g_(f,o);x===0?(f.next=null,c===null?mu=b:c.next=b,b===null&&(Oo=c)):(c=f,(i!==0||(x&3)!==0)&&(pu=!0)),f=b}Ct!==0&&Ct!==5||cl(i),Mi!==0&&(Mi=0)}function g_(i,o){for(var c=i.suspendedLanes,f=i.pingedLanes,b=i.expirationTimes,x=i.pendingLanes&-62914561;0<x;){var w=31-xn(x),j=1<<w,I=b[w];I===-1?((j&c)===0||(j&f)!==0)&&(b[w]=o2(j,o)):I<=o&&(i.expiredLanes|=j),x&=~j}if(o=Xe,c=De,c=yc(i,i===o?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f=i.callbackNode,c===0||i===o&&(Ve===2||Ve===9)||i.cancelPendingCommit!==null)return f!==null&&f!==null&&Wf(f),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||As(i,c)){if(o=c&-c,o===i.callbackPriority)return o;switch(f!==null&&Wf(f),Xf(c)){case 2:case 8:c=oy;break;case 32:c=pc;break;case 268435456:c=sy;break;default:c=pc}return f=b_.bind(null,i),c=Zf(c,f),i.callbackPriority=o,i.callbackNode=c,o}return f!==null&&f!==null&&Wf(f),i.callbackPriority=2,i.callbackNode=null,2}function b_(i,o){if(Ct!==0&&Ct!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(hu()&&i.callbackNode!==c)return null;var f=De;return f=yc(i,i===Xe?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f===0?null:(Qx(i,f,o),g_(i,vn()),i.callbackNode!=null&&i.callbackNode===c?b_.bind(null,i):null)}function v_(i,o){if(hu())return null;Qx(i,o,!0)}function Dj(){qj(function(){(Ue&6)!==0?Zf(ay,Oj):p_()})}function Pm(){if(Mi===0){var i=vo;i===0&&(i=gc,gc<<=1,(gc&261888)===0&&(gc=256)),Mi=i}return Mi}function y_(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:wc(""+i)}function x_(i,o){var c=o.ownerDocument.createElement("input");return c.name=o.name,c.value=o.value,i.id&&c.setAttribute("form",i.id),o.parentNode.insertBefore(c,o),i=new FormData(i),c.parentNode.removeChild(c),i}function Ij(i,o,c,f,b){if(o==="submit"&&c&&c.stateNode===b){var x=y_((b[on]||null).action),w=f.submitter;w&&(o=(o=w[on]||null)?y_(o.formAction):w.getAttribute("formAction"),o!==null&&(x=o,w=null));var j=new Rc("action","action",null,f,b);i.push({event:j,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Mi!==0){var I=w?x_(b,w):new FormData(b);rm(c,{pending:!0,data:I,method:b.method,action:x},null,I)}}else typeof x=="function"&&(j.preventDefault(),I=w?x_(b,w):new FormData(b),rm(c,{pending:!0,data:I,method:b.method,action:x},x,I))},currentTarget:b}]})}}for(var zm=0;zm<xh.length;zm++){var $m=xh[zm],Mj=$m.toLowerCase(),Pj=$m[0].toUpperCase()+$m.slice(1);tr(Mj,"on"+Pj)}tr(Xy,"onAnimationEnd"),tr(Qy,"onAnimationIteration"),tr(Jy,"onAnimationStart"),tr("dblclick","onDoubleClick"),tr("focusin","onFocus"),tr("focusout","onBlur"),tr(J2,"onTransitionRun"),tr(ej,"onTransitionStart"),tr(tj,"onTransitionCancel"),tr(e0,"onTransitionEnd"),ro("onMouseEnter",["mouseout","mouseover"]),ro("onMouseLeave",["mouseout","mouseover"]),ro("onPointerEnter",["pointerout","pointerover"]),ro("onPointerLeave",["pointerout","pointerover"]),ua("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ua("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ua("onBeforeInput",["compositionend","keypress","textInput","paste"]),ua("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ua("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ua("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ul="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(" "),zj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ul));function __(i,o){o=(o&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],b=f.event;f=f.listeners;e:{var x=void 0;if(o)for(var w=f.length-1;0<=w;w--){var j=f[w],I=j.instance,K=j.currentTarget;if(j=j.listener,I!==x&&b.isPropagationStopped())break e;x=j,b.currentTarget=K;try{x(b)}catch(te){Nc(te)}b.currentTarget=null,x=I}else for(w=0;w<f.length;w++){if(j=f[w],I=j.instance,K=j.currentTarget,j=j.listener,I!==x&&b.isPropagationStopped())break e;x=j,b.currentTarget=K;try{x(b)}catch(te){Nc(te)}b.currentTarget=null,x=I}}}}function Oe(i,o){var c=o[Qf];c===void 0&&(c=o[Qf]=new Set);var f=i+"__bubble";c.has(f)||(S_(o,i,2,!1),c.add(f))}function Um(i,o,c){var f=0;o&&(f|=4),S_(c,i,f,o)}var gu="_reactListening"+Math.random().toString(36).slice(2);function Hm(i){if(!i[gu]){i[gu]=!0,py.forEach(function(c){c!=="selectionchange"&&(zj.has(c)||Um(c,!1,i),Um(c,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[gu]||(o[gu]=!0,Um("selectionchange",!1,o))}}function S_(i,o,c,f){switch(X_(o)){case 2:var b=fL;break;case 8:b=hL;break;default:b=np}c=b.bind(null,o,c,i),b=void 0,!sh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(b=!0),f?b!==void 0?i.addEventListener(o,c,{capture:!0,passive:b}):i.addEventListener(o,c,!0):b!==void 0?i.addEventListener(o,c,{passive:b}):i.addEventListener(o,c,!1)}function Bm(i,o,c,f,b){var x=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var w=f.tag;if(w===3||w===4){var j=f.stateNode.containerInfo;if(j===b)break;if(w===4)for(w=f.return;w!==null;){var I=w.tag;if((I===3||I===4)&&w.stateNode.containerInfo===b)return;w=w.return}for(;j!==null;){if(w=eo(j),w===null)return;if(I=w.tag,I===5||I===6||I===26||I===27){f=x=w;continue e}j=j.parentNode}}f=f.return}Ry(function(){var K=x,te=ah(c),oe=[];e:{var X=t0.get(i);if(X!==void 0){var Q=Rc,ge=i;switch(i){case"keypress":if(Cc(c)===0)break e;case"keydown":case"keyup":Q=j2;break;case"focusin":ge="focus",Q=dh;break;case"focusout":ge="blur",Q=dh;break;case"beforeblur":case"afterblur":Q=dh;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=Ny;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=y2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=D2;break;case Xy:case Qy:case Jy:Q=S2;break;case e0:Q=M2;break;case"scroll":case"scrollend":Q=b2;break;case"wheel":Q=z2;break;case"copy":case"cut":case"paste":Q=E2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=Ly;break;case"toggle":case"beforetoggle":Q=U2}var we=(o&4)!==0,Ze=!we&&(i==="scroll"||i==="scrollend"),V=we?X!==null?X+"Capture":null:X;we=[];for(var H=K,W;H!==null;){var re=H;if(W=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||W===null||V===null||(re=Ls(H,V),re!=null&&we.push(dl(H,re,W))),Ze)break;H=H.return}0<we.length&&(X=new Q(X,ge,null,c,te),oe.push({event:X,listeners:we}))}}if((o&7)===0){e:{if(X=i==="mouseover"||i==="pointerover",Q=i==="mouseout"||i==="pointerout",X&&c!==ih&&(ge=c.relatedTarget||c.fromElement)&&(eo(ge)||ge[Ja]))break e;if((Q||X)&&(X=te.window===te?te:(X=te.ownerDocument)?X.defaultView||X.parentWindow:window,Q?(ge=c.relatedTarget||c.toElement,Q=K,ge=ge?eo(ge):null,ge!==null&&(Ze=s(ge),we=ge.tag,ge!==Ze||we!==5&&we!==27&&we!==6)&&(ge=null)):(Q=null,ge=K),Q!==ge)){if(we=Ny,re="onMouseLeave",V="onMouseEnter",H="mouse",(i==="pointerout"||i==="pointerover")&&(we=Ly,re="onPointerLeave",V="onPointerEnter",H="pointer"),Ze=Q==null?X:js(Q),W=ge==null?X:js(ge),X=new we(re,H+"leave",Q,c,te),X.target=Ze,X.relatedTarget=W,re=null,eo(te)===K&&(we=new we(V,H+"enter",ge,c,te),we.target=W,we.relatedTarget=Ze,re=we),Ze=re,Q&&ge)t:{for(we=$j,V=Q,H=ge,W=0,re=V;re;re=we(re))W++;re=0;for(var xe=H;xe;xe=we(xe))re++;for(;0<W-re;)V=we(V),W--;for(;0<re-W;)H=we(H),re--;for(;W--;){if(V===H||H!==null&&V===H.alternate){we=V;break t}V=we(V),H=we(H)}we=null}else we=null;Q!==null&&w_(oe,X,Q,we,!1),ge!==null&&Ze!==null&&w_(oe,Ze,ge,we,!0)}}e:{if(X=K?js(K):window,Q=X.nodeName&&X.nodeName.toLowerCase(),Q==="select"||Q==="input"&&X.type==="file")var Pe=Uy;else if(zy(X))if(Hy)Pe=K2;else{Pe=W2;var ve=Z2}else Q=X.nodeName,!Q||Q.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?K&&rh(K.elementType)&&(Pe=Uy):Pe=Y2;if(Pe&&(Pe=Pe(i,K))){$y(oe,Pe,c,te);break e}ve&&ve(i,X,K),i==="focusout"&&K&&X.type==="number"&&K.memoizedProps.value!=null&&nh(X,"number",X.value)}switch(ve=K?js(K):window,i){case"focusin":(zy(ve)||ve.contentEditable==="true")&&(co=ve,bh=K,Us=null);break;case"focusout":Us=bh=co=null;break;case"mousedown":vh=!0;break;case"contextmenu":case"mouseup":case"dragend":vh=!1,Yy(oe,c,te);break;case"selectionchange":if(Q2)break;case"keydown":case"keyup":Yy(oe,c,te)}var Te;if(hh)e:{switch(i){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else lo?My(i,c)&&(Ie="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ie="onCompositionStart");Ie&&(Oy&&c.locale!=="ko"&&(lo||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&lo&&(Te=Ay()):(xi=te,lh="value"in xi?xi.value:xi.textContent,lo=!0)),ve=bu(K,Ie),0<ve.length&&(Ie=new jy(Ie,i,null,c,te),oe.push({event:Ie,listeners:ve}),Te?Ie.data=Te:(Te=Py(c),Te!==null&&(Ie.data=Te)))),(Te=B2?V2(i,c):F2(i,c))&&(Ie=bu(K,"onBeforeInput"),0<Ie.length&&(ve=new jy("onBeforeInput","beforeinput",null,c,te),oe.push({event:ve,listeners:Ie}),ve.data=Te)),Ij(oe,i,K,c,te)}__(oe,o)})}function dl(i,o,c){return{instance:i,listener:o,currentTarget:c}}function bu(i,o){for(var c=o+"Capture",f=[];i!==null;){var b=i,x=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||x===null||(b=Ls(i,c),b!=null&&f.unshift(dl(i,b,x)),b=Ls(i,o),b!=null&&f.push(dl(i,b,x))),i.tag===3)return f;i=i.return}return[]}function $j(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function w_(i,o,c,f,b){for(var x=o._reactName,w=[];c!==null&&c!==f;){var j=c,I=j.alternate,K=j.stateNode;if(j=j.tag,I!==null&&I===f)break;j!==5&&j!==26&&j!==27||K===null||(I=K,b?(K=Ls(c,x),K!=null&&w.unshift(dl(c,K,I))):b||(K=Ls(c,x),K!=null&&w.push(dl(c,K,I)))),c=c.return}w.length!==0&&i.push({event:o,listeners:w})}var Uj=/\r\n?/g,Hj=/\u0000|\uFFFD/g;function E_(i){return(typeof i=="string"?i:""+i).replace(Uj,`
|
|
10
|
+
`).replace(Hj,"")}function C_(i,o){return o=E_(o),E_(i)===o}function qe(i,o,c,f,b,x){switch(c){case"children":typeof f=="string"?o==="body"||o==="textarea"&&f===""||ao(i,f):(typeof f=="number"||typeof f=="bigint")&&o!=="body"&&ao(i,""+f);break;case"className":_c(i,"class",f);break;case"tabIndex":_c(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":_c(i,c,f);break;case"style":Cy(i,f,x);break;case"data":if(o!=="object"){_c(i,"data",f);break}case"src":case"href":if(f===""&&(o!=="a"||c!=="href")){i.removeAttribute(c);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=wc(""+f),i.setAttribute(c,f);break;case"action":case"formAction":if(typeof f=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(c==="formAction"?(o!=="input"&&qe(i,o,"name",b.name,b,null),qe(i,o,"formEncType",b.formEncType,b,null),qe(i,o,"formMethod",b.formMethod,b,null),qe(i,o,"formTarget",b.formTarget,b,null)):(qe(i,o,"encType",b.encType,b,null),qe(i,o,"method",b.method,b,null),qe(i,o,"target",b.target,b,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=wc(""+f),i.setAttribute(c,f);break;case"onClick":f!=null&&(i.onclick=Or);break;case"onScroll":f!=null&&Oe("scroll",i);break;case"onScrollEnd":f!=null&&Oe("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}c=wc(""+f),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""+f):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":f===!0?i.setAttribute(c,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,f):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(c,f):i.removeAttribute(c);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(c):i.setAttribute(c,f);break;case"popover":Oe("beforetoggle",i),Oe("toggle",i),xc(i,"popover",f);break;case"xlinkActuate":Lr(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Lr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Lr(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Lr(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Lr(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Lr(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Lr(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Lr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Lr(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":xc(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=p2.get(c)||c,xc(i,c,f))}}function Vm(i,o,c,f,b,x){switch(c){case"style":Cy(i,f,x);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(b.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof f=="string"?ao(i,f):(typeof f=="number"||typeof f=="bigint")&&ao(i,""+f);break;case"onScroll":f!=null&&Oe("scroll",i);break;case"onScrollEnd":f!=null&&Oe("scrollend",i);break;case"onClick":f!=null&&(i.onclick=Or);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gy.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(b=c.endsWith("Capture"),o=c.slice(2,b?c.length-7:void 0),x=i[on]||null,x=x!=null?x[c]:null,typeof x=="function"&&i.removeEventListener(o,x,b),typeof f=="function")){typeof x!="function"&&x!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(o,f,b);break e}c in i?i[c]=f:f===!0?i.setAttribute(c,""):xc(i,c,f)}}}function Gt(i,o,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",i),Oe("load",i);var f=!1,b=!1,x;for(x in c)if(c.hasOwnProperty(x)){var w=c[x];if(w!=null)switch(x){case"src":f=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:qe(i,o,x,w,c,null)}}b&&qe(i,o,"srcSet",c.srcSet,c,null),f&&qe(i,o,"src",c.src,c,null);return;case"input":Oe("invalid",i);var j=x=w=b=null,I=null,K=null;for(f in c)if(c.hasOwnProperty(f)){var te=c[f];if(te!=null)switch(f){case"name":b=te;break;case"type":w=te;break;case"checked":I=te;break;case"defaultChecked":K=te;break;case"value":x=te;break;case"defaultValue":j=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,o));break;default:qe(i,o,f,te,c,null)}}_y(i,x,j,I,K,w,b,!1);return;case"select":Oe("invalid",i),f=w=x=null;for(b in c)if(c.hasOwnProperty(b)&&(j=c[b],j!=null))switch(b){case"value":x=j;break;case"defaultValue":w=j;break;case"multiple":f=j;default:qe(i,o,b,j,c,null)}o=x,c=w,i.multiple=!!f,o!=null?io(i,!!f,o,!1):c!=null&&io(i,!!f,c,!0);return;case"textarea":Oe("invalid",i),x=b=f=null;for(w in c)if(c.hasOwnProperty(w)&&(j=c[w],j!=null))switch(w){case"value":f=j;break;case"defaultValue":b=j;break;case"children":x=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:qe(i,o,w,j,c,null)}wy(i,f,b,x);return;case"option":for(I in c)c.hasOwnProperty(I)&&(f=c[I],f!=null)&&(I==="selected"?i.selected=f&&typeof f!="function"&&typeof f!="symbol":qe(i,o,I,f,c,null));return;case"dialog":Oe("beforetoggle",i),Oe("toggle",i),Oe("cancel",i),Oe("close",i);break;case"iframe":case"object":Oe("load",i);break;case"video":case"audio":for(f=0;f<ul.length;f++)Oe(ul[f],i);break;case"image":Oe("error",i),Oe("load",i);break;case"details":Oe("toggle",i);break;case"embed":case"source":case"link":Oe("error",i),Oe("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in c)if(c.hasOwnProperty(K)&&(f=c[K],f!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:qe(i,o,K,f,c,null)}return;default:if(rh(o)){for(te in c)c.hasOwnProperty(te)&&(f=c[te],f!==void 0&&Vm(i,o,te,f,c,void 0));return}}for(j in c)c.hasOwnProperty(j)&&(f=c[j],f!=null&&qe(i,o,j,f,c,null))}function Bj(i,o,c,f){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,x=null,w=null,j=null,I=null,K=null,te=null;for(Q in c){var oe=c[Q];if(c.hasOwnProperty(Q)&&oe!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":I=oe;default:f.hasOwnProperty(Q)||qe(i,o,Q,null,f,oe)}}for(var X in f){var Q=f[X];if(oe=c[X],f.hasOwnProperty(X)&&(Q!=null||oe!=null))switch(X){case"type":x=Q;break;case"name":b=Q;break;case"checked":K=Q;break;case"defaultChecked":te=Q;break;case"value":w=Q;break;case"defaultValue":j=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,o));break;default:Q!==oe&&qe(i,o,X,Q,f,oe)}}th(i,w,j,I,K,te,x,b);return;case"select":Q=w=j=X=null;for(x in c)if(I=c[x],c.hasOwnProperty(x)&&I!=null)switch(x){case"value":break;case"multiple":Q=I;default:f.hasOwnProperty(x)||qe(i,o,x,null,f,I)}for(b in f)if(x=f[b],I=c[b],f.hasOwnProperty(b)&&(x!=null||I!=null))switch(b){case"value":X=x;break;case"defaultValue":j=x;break;case"multiple":w=x;default:x!==I&&qe(i,o,b,x,f,I)}o=j,c=w,f=Q,X!=null?io(i,!!c,X,!1):!!f!=!!c&&(o!=null?io(i,!!c,o,!0):io(i,!!c,c?[]:"",!1));return;case"textarea":Q=X=null;for(j in c)if(b=c[j],c.hasOwnProperty(j)&&b!=null&&!f.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:qe(i,o,j,null,f,b)}for(w in f)if(b=f[w],x=c[w],f.hasOwnProperty(w)&&(b!=null||x!=null))switch(w){case"value":X=b;break;case"defaultValue":Q=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==x&&qe(i,o,w,b,f,x)}Sy(i,X,Q);return;case"option":for(var ge in c)X=c[ge],c.hasOwnProperty(ge)&&X!=null&&!f.hasOwnProperty(ge)&&(ge==="selected"?i.selected=!1:qe(i,o,ge,null,f,X));for(I in f)X=f[I],Q=c[I],f.hasOwnProperty(I)&&X!==Q&&(X!=null||Q!=null)&&(I==="selected"?i.selected=X&&typeof X!="function"&&typeof X!="symbol":qe(i,o,I,X,f,Q));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var we in c)X=c[we],c.hasOwnProperty(we)&&X!=null&&!f.hasOwnProperty(we)&&qe(i,o,we,null,f,X);for(K in f)if(X=f[K],Q=c[K],f.hasOwnProperty(K)&&X!==Q&&(X!=null||Q!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,o));break;default:qe(i,o,K,X,f,Q)}return;default:if(rh(o)){for(var Ze in c)X=c[Ze],c.hasOwnProperty(Ze)&&X!==void 0&&!f.hasOwnProperty(Ze)&&Vm(i,o,Ze,void 0,f,X);for(te in f)X=f[te],Q=c[te],!f.hasOwnProperty(te)||X===Q||X===void 0&&Q===void 0||Vm(i,o,te,X,f,Q);return}}for(var V in c)X=c[V],c.hasOwnProperty(V)&&X!=null&&!f.hasOwnProperty(V)&&qe(i,o,V,null,f,X);for(oe in f)X=f[oe],Q=c[oe],!f.hasOwnProperty(oe)||X===Q||X==null&&Q==null||qe(i,o,oe,X,f,Q)}function k_(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Vj(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,c=performance.getEntriesByType("resource"),f=0;f<c.length;f++){var b=c[f],x=b.transferSize,w=b.initiatorType,j=b.duration;if(x&&j&&k_(w)){for(w=0,j=b.responseEnd,f+=1;f<c.length;f++){var I=c[f],K=I.startTime;if(K>j)break;var te=I.transferSize,oe=I.initiatorType;te&&k_(oe)&&(I=I.responseEnd,w+=te*(I<j?1:(j-K)/(I-K)))}if(--f,o+=8*(x+w)/(b.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Fm=null,Gm=null;function vu(i){return i.nodeType===9?i:i.ownerDocument}function R_(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function A_(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function qm(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Zm=null;function Fj(){var i=window.event;return i&&i.type==="popstate"?i===Zm?!1:(Zm=i,!0):(Zm=null,!1)}var T_=typeof setTimeout=="function"?setTimeout:void 0,Gj=typeof clearTimeout=="function"?clearTimeout:void 0,N_=typeof Promise=="function"?Promise:void 0,qj=typeof queueMicrotask=="function"?queueMicrotask:typeof N_<"u"?function(i){return N_.resolve(null).then(i).catch(Zj)}:T_;function Zj(i){setTimeout(function(){throw i})}function Pi(i){return i==="head"}function j_(i,o){var c=o,f=0;do{var b=c.nextSibling;if(i.removeChild(c),b&&b.nodeType===8)if(c=b.data,c==="/$"||c==="/&"){if(f===0){i.removeChild(b),Po(o);return}f--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")f++;else if(c==="html")fl(i.ownerDocument.documentElement);else if(c==="head"){c=i.ownerDocument.head,fl(c);for(var x=c.firstChild;x;){var w=x.nextSibling,j=x.nodeName;x[Ns]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&x.rel.toLowerCase()==="stylesheet"||c.removeChild(x),x=w}}else c==="body"&&fl(i.ownerDocument.body);c=b}while(c);Po(o)}function L_(i,o){var c=i;i=0;do{var f=c.nextSibling;if(c.nodeType===1?o?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(o?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),f&&f.nodeType===8)if(c=f.data,c==="/$"){if(i===0)break;i--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||i++;c=f}while(c)}function Wm(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var c=o;switch(o=o.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Wm(c),Jf(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function Wj(i,o,c,f){for(;i.nodeType===1;){var b=c;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[Ns])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(x=i.getAttribute("rel"),x==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(x!==b.rel||i.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||i.getAttribute("title")!==(b.title==null?null:b.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(x=i.getAttribute("src"),(x!==(b.src==null?null:b.src)||i.getAttribute("type")!==(b.type==null?null:b.type)||i.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&x&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var x=b.name==null?null:""+b.name;if(b.type==="hidden"&&i.getAttribute("name")===x)return i}else return i;if(i=Vn(i.nextSibling),i===null)break}return null}function Yj(i,o,c){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=Vn(i.nextSibling),i===null))return null;return i}function O_(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=Vn(i.nextSibling),i===null))return null;return i}function Ym(i){return i.data==="$?"||i.data==="$~"}function Km(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function Kj(i,o){var c=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||c.readyState!=="loading")o();else{var f=function(){o(),c.removeEventListener("DOMContentLoaded",f)};c.addEventListener("DOMContentLoaded",f),i._reactRetry=f}}function Vn(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var Xm=null;function D_(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"||c==="/&"){if(o===0)return Vn(i.nextSibling);o--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||o++}i=i.nextSibling}return null}function I_(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(o===0)return i;o--}else c!=="/$"&&c!=="/&"||o++}i=i.previousSibling}return null}function M_(i,o,c){switch(o=vu(c),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function fl(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);Jf(i)}var Fn=new Map,P_=new Set;function yu(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Yr=G.d;G.d={f:Xj,r:Qj,D:Jj,C:eL,L:tL,m:nL,X:iL,S:rL,M:aL};function Xj(){var i=Yr.f(),o=uu();return i||o}function Qj(i){var o=to(i);o!==null&&o.tag===5&&o.type==="form"?ex(o):Yr.r(i)}var Do=typeof document>"u"?null:document;function z_(i,o,c){var f=Do;if(f&&typeof o=="string"&&o){var b=Mn(o);b='link[rel="'+i+'"][href="'+b+'"]',typeof c=="string"&&(b+='[crossorigin="'+c+'"]'),P_.has(b)||(P_.add(b),i={rel:i,crossOrigin:c,href:o},f.querySelector(b)===null&&(o=f.createElement("link"),Gt(o,"link",i),Dt(o),f.head.appendChild(o)))}}function Jj(i){Yr.D(i),z_("dns-prefetch",i,null)}function eL(i,o){Yr.C(i,o),z_("preconnect",i,o)}function tL(i,o,c){Yr.L(i,o,c);var f=Do;if(f&&i&&o){var b='link[rel="preload"][as="'+Mn(o)+'"]';o==="image"&&c&&c.imageSrcSet?(b+='[imagesrcset="'+Mn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(b+='[imagesizes="'+Mn(c.imageSizes)+'"]')):b+='[href="'+Mn(i)+'"]';var x=b;switch(o){case"style":x=Io(i);break;case"script":x=Mo(i)}Fn.has(x)||(i=p({rel:"preload",href:o==="image"&&c&&c.imageSrcSet?void 0:i,as:o},c),Fn.set(x,i),f.querySelector(b)!==null||o==="style"&&f.querySelector(hl(x))||o==="script"&&f.querySelector(ml(x))||(o=f.createElement("link"),Gt(o,"link",i),Dt(o),f.head.appendChild(o)))}}function nL(i,o){Yr.m(i,o);var c=Do;if(c&&i){var f=o&&typeof o.as=="string"?o.as:"script",b='link[rel="modulepreload"][as="'+Mn(f)+'"][href="'+Mn(i)+'"]',x=b;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Mo(i)}if(!Fn.has(x)&&(i=p({rel:"modulepreload",href:i},o),Fn.set(x,i),c.querySelector(b)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(ml(x)))return}f=c.createElement("link"),Gt(f,"link",i),Dt(f),c.head.appendChild(f)}}}function rL(i,o,c){Yr.S(i,o,c);var f=Do;if(f&&i){var b=no(f).hoistableStyles,x=Io(i);o=o||"default";var w=b.get(x);if(!w){var j={loading:0,preload:null};if(w=f.querySelector(hl(x)))j.loading=5;else{i=p({rel:"stylesheet",href:i,"data-precedence":o},c),(c=Fn.get(x))&&Qm(i,c);var I=w=f.createElement("link");Dt(I),Gt(I,"link",i),I._p=new Promise(function(K,te){I.onload=K,I.onerror=te}),I.addEventListener("load",function(){j.loading|=1}),I.addEventListener("error",function(){j.loading|=2}),j.loading|=4,xu(w,o,f)}w={type:"stylesheet",instance:w,count:1,state:j},b.set(x,w)}}}function iL(i,o){Yr.X(i,o);var c=Do;if(c&&i){var f=no(c).hoistableScripts,b=Mo(i),x=f.get(b);x||(x=c.querySelector(ml(b)),x||(i=p({src:i,async:!0},o),(o=Fn.get(b))&&Jm(i,o),x=c.createElement("script"),Dt(x),Gt(x,"link",i),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},f.set(b,x))}}function aL(i,o){Yr.M(i,o);var c=Do;if(c&&i){var f=no(c).hoistableScripts,b=Mo(i),x=f.get(b);x||(x=c.querySelector(ml(b)),x||(i=p({src:i,async:!0,type:"module"},o),(o=Fn.get(b))&&Jm(i,o),x=c.createElement("script"),Dt(x),Gt(x,"link",i),c.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},f.set(b,x))}}function $_(i,o,c,f){var b=(b=fe.current)?yu(b):null;if(!b)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(o=Io(c.href),c=no(b).hoistableStyles,f=c.get(o),f||(f={type:"style",instance:null,count:0,state:null},c.set(o,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=Io(c.href);var x=no(b).hoistableStyles,w=x.get(i);if(w||(b=b.ownerDocument||b,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(i,w),(x=b.querySelector(hl(i)))&&!x._p&&(w.instance=x,w.state.loading=5),Fn.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Fn.set(i,c),x||oL(b,i,c,w.state))),o&&f===null)throw Error(r(528,""));return w}if(o&&f!==null)throw Error(r(529,""));return null;case"script":return o=c.async,c=c.src,typeof c=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Mo(c),c=no(b).hoistableScripts,f=c.get(o),f||(f={type:"script",instance:null,count:0,state:null},c.set(o,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Io(i){return'href="'+Mn(i)+'"'}function hl(i){return'link[rel="stylesheet"]['+i+"]"}function U_(i){return p({},i,{"data-precedence":i.precedence,precedence:null})}function oL(i,o,c,f){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?f.loading=1:(o=i.createElement("link"),f.preload=o,o.addEventListener("load",function(){return f.loading|=1}),o.addEventListener("error",function(){return f.loading|=2}),Gt(o,"link",c),Dt(o),i.head.appendChild(o))}function Mo(i){return'[src="'+Mn(i)+'"]'}function ml(i){return"script[async]"+i}function H_(i,o,c){if(o.count++,o.instance===null)switch(o.type){case"style":var f=i.querySelector('style[data-href~="'+Mn(c.href)+'"]');if(f)return o.instance=f,Dt(f),f;var b=p({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),Dt(f),Gt(f,"style",b),xu(f,c.precedence,i),o.instance=f;case"stylesheet":b=Io(c.href);var x=i.querySelector(hl(b));if(x)return o.state.loading|=4,o.instance=x,Dt(x),x;f=U_(c),(b=Fn.get(b))&&Qm(f,b),x=(i.ownerDocument||i).createElement("link"),Dt(x);var w=x;return w._p=new Promise(function(j,I){w.onload=j,w.onerror=I}),Gt(x,"link",f),o.state.loading|=4,xu(x,c.precedence,i),o.instance=x;case"script":return x=Mo(c.src),(b=i.querySelector(ml(x)))?(o.instance=b,Dt(b),b):(f=c,(b=Fn.get(x))&&(f=p({},c),Jm(f,b)),i=i.ownerDocument||i,b=i.createElement("script"),Dt(b),Gt(b,"link",f),i.head.appendChild(b),o.instance=b);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(f=o.instance,o.state.loading|=4,xu(f,c.precedence,i));return o.instance}function xu(i,o,c){for(var f=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=f.length?f[f.length-1]:null,x=b,w=0;w<f.length;w++){var j=f[w];if(j.dataset.precedence===o)x=j;else if(x!==b)break}x?x.parentNode.insertBefore(i,x.nextSibling):(o=c.nodeType===9?c.head:c,o.insertBefore(i,o.firstChild))}function Qm(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Jm(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var _u=null;function B_(i,o,c){if(_u===null){var f=new Map,b=_u=new Map;b.set(c,f)}else b=_u,f=b.get(c),f||(f=new Map,b.set(c,f));if(f.has(i))return f;for(f.set(i,null),c=c.getElementsByTagName(i),b=0;b<c.length;b++){var x=c[b];if(!(x[Ns]||x[Ht]||i==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var w=x.getAttribute(o)||"";w=i+w;var j=f.get(w);j?j.push(x):f.set(w,[x])}}return f}function V_(i,o,c){i=i.ownerDocument||i,i.head.insertBefore(c,o==="title"?i.querySelector("head > title"):null)}function sL(i,o,c){if(c===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function F_(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function lL(i,o,c,f){if(c.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var b=Io(f.href),x=o.querySelector(hl(b));if(x){o=x._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=Su.bind(i),o.then(i,i)),c.state.loading|=4,c.instance=x,Dt(x);return}x=o.ownerDocument||o,f=U_(f),(b=Fn.get(b))&&Qm(f,b),x=x.createElement("link"),Dt(x);var w=x;w._p=new Promise(function(j,I){w.onload=j,w.onerror=I}),Gt(x,"link",f),c.instance=x}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(c,o),(o=c.state.preload)&&(c.state.loading&3)===0&&(i.count++,c=Su.bind(i),o.addEventListener("load",c),o.addEventListener("error",c))}}var ep=0;function cL(i,o){return i.stylesheets&&i.count===0&&Eu(i,i.stylesheets),0<i.count||0<i.imgCount?function(c){var f=setTimeout(function(){if(i.stylesheets&&Eu(i,i.stylesheets),i.unsuspend){var x=i.unsuspend;i.unsuspend=null,x()}},6e4+o);0<i.imgBytes&&ep===0&&(ep=62500*Vj());var b=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Eu(i,i.stylesheets),i.unsuspend)){var x=i.unsuspend;i.unsuspend=null,x()}},(i.imgBytes>ep?50:800)+o);return i.unsuspend=c,function(){i.unsuspend=null,clearTimeout(f),clearTimeout(b)}}:null}function Su(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Eu(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var wu=null;function Eu(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,wu=new Map,o.forEach(uL,i),wu=null,Su.call(i))}function uL(i,o){if(!(o.state.loading&4)){var c=wu.get(i);if(c)var f=c.get(null);else{c=new Map,wu.set(i,c);for(var b=i.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<b.length;x++){var w=b[x];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(c.set(w.dataset.precedence,w),f=w)}f&&c.set(null,f)}b=o.instance,w=b.getAttribute("data-precedence"),x=c.get(w)||f,x===f&&c.set(null,b),c.set(w,b),this.count++,f=Su.bind(this),b.addEventListener("load",f),b.addEventListener("error",f),x?x.parentNode.insertBefore(b,x.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(b,i.firstChild)),o.state.loading|=4}}var pl={$$typeof:A,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function dL(i,o,c,f,b,x,w,j,I){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Yf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yf(0),this.hiddenUpdates=Yf(null),this.identifierPrefix=f,this.onUncaughtError=b,this.onCaughtError=x,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function G_(i,o,c,f,b,x,w,j,I,K,te,oe){return i=new dL(i,o,c,w,I,K,te,oe,j),o=1,x===!0&&(o|=24),x=Sn(3,null,null,o),i.current=x,x.stateNode=i,o=Oh(),o.refCount++,i.pooledCache=o,o.refCount++,x.memoizedState={element:f,isDehydrated:c,cache:o},Ph(x),i}function q_(i){return i?(i=ho,i):ho}function Z_(i,o,c,f,b,x){b=q_(b),f.context===null?f.context=b:f.pendingContext=b,f=ki(o),f.payload={element:c},x=x===void 0?null:x,x!==null&&(f.callback=x),c=Ri(i,f,o),c!==null&&(fn(c,i,o),Zs(c,i,o))}function W_(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<o?c:o}}function tp(i,o){W_(i,o),(i=i.alternate)&&W_(i,o)}function Y_(i){if(i.tag===13||i.tag===31){var o=ma(i,67108864);o!==null&&fn(o,i,67108864),tp(i,67108864)}}function K_(i){if(i.tag===13||i.tag===31){var o=Rn();o=Kf(o);var c=ma(i,o);c!==null&&fn(c,i,o),tp(i,o)}}var Cu=!0;function fL(i,o,c,f){var b=z.T;z.T=null;var x=G.p;try{G.p=2,np(i,o,c,f)}finally{G.p=x,z.T=b}}function hL(i,o,c,f){var b=z.T;z.T=null;var x=G.p;try{G.p=8,np(i,o,c,f)}finally{G.p=x,z.T=b}}function np(i,o,c,f){if(Cu){var b=rp(f);if(b===null)Bm(i,o,f,ku,c),Q_(i,f);else if(pL(b,i,o,c,f))f.stopPropagation();else if(Q_(i,f),o&4&&-1<mL.indexOf(i)){for(;b!==null;){var x=to(b);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var w=ca(x.pendingLanes);if(w!==0){var j=x;for(j.pendingLanes|=2,j.entangledLanes|=2;w;){var I=1<<31-xn(w);j.entanglements[1]|=I,w&=~I}mr(x),(Ue&6)===0&&(lu=vn()+500,cl(0))}}break;case 31:case 13:j=ma(x,2),j!==null&&fn(j,x,2),uu(),tp(x,2)}if(x=rp(f),x===null&&Bm(i,o,f,ku,c),x===b)break;b=x}b!==null&&f.stopPropagation()}else Bm(i,o,f,null,c)}}function rp(i){return i=ah(i),ip(i)}var ku=null;function ip(i){if(ku=null,i=eo(i),i!==null){var o=s(i);if(o===null)i=null;else{var c=o.tag;if(c===13){if(i=l(o),i!==null)return i;i=null}else if(c===31){if(i=d(o),i!==null)return i;i=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return ku=i,null}function X_(i){switch(i){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(JN()){case ay:return 2;case oy:return 8;case pc:case e2:return 32;case sy:return 268435456;default:return 32}default:return 32}}var ap=!1,zi=null,$i=null,Ui=null,gl=new Map,bl=new Map,Hi=[],mL="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".split(" ");function Q_(i,o){switch(i){case"focusin":case"focusout":zi=null;break;case"dragenter":case"dragleave":$i=null;break;case"mouseover":case"mouseout":Ui=null;break;case"pointerover":case"pointerout":gl.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":bl.delete(o.pointerId)}}function vl(i,o,c,f,b,x){return i===null||i.nativeEvent!==x?(i={blockedOn:o,domEventName:c,eventSystemFlags:f,nativeEvent:x,targetContainers:[b]},o!==null&&(o=to(o),o!==null&&Y_(o)),i):(i.eventSystemFlags|=f,o=i.targetContainers,b!==null&&o.indexOf(b)===-1&&o.push(b),i)}function pL(i,o,c,f,b){switch(o){case"focusin":return zi=vl(zi,i,o,c,f,b),!0;case"dragenter":return $i=vl($i,i,o,c,f,b),!0;case"mouseover":return Ui=vl(Ui,i,o,c,f,b),!0;case"pointerover":var x=b.pointerId;return gl.set(x,vl(gl.get(x)||null,i,o,c,f,b)),!0;case"gotpointercapture":return x=b.pointerId,bl.set(x,vl(bl.get(x)||null,i,o,c,f,b)),!0}return!1}function J_(i){var o=eo(i.target);if(o!==null){var c=s(o);if(c!==null){if(o=c.tag,o===13){if(o=l(c),o!==null){i.blockedOn=o,hy(i.priority,function(){K_(c)});return}}else if(o===31){if(o=d(c),o!==null){i.blockedOn=o,hy(i.priority,function(){K_(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Ru(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var c=rp(i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);ih=f,c.target.dispatchEvent(f),ih=null}else return o=to(c),o!==null&&Y_(o),i.blockedOn=c,!1;o.shift()}return!0}function eS(i,o,c){Ru(i)&&c.delete(o)}function gL(){ap=!1,zi!==null&&Ru(zi)&&(zi=null),$i!==null&&Ru($i)&&($i=null),Ui!==null&&Ru(Ui)&&(Ui=null),gl.forEach(eS),bl.forEach(eS)}function Au(i,o){i.blockedOn===o&&(i.blockedOn=null,ap||(ap=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,gL)))}var Tu=null;function tS(i){Tu!==i&&(Tu=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Tu===i&&(Tu=null);for(var o=0;o<i.length;o+=3){var c=i[o],f=i[o+1],b=i[o+2];if(typeof f!="function"){if(ip(f||c)===null)continue;break}var x=to(c);x!==null&&(i.splice(o,3),o-=3,rm(x,{pending:!0,data:b,method:c.method,action:f},f,b))}}))}function Po(i){function o(I){return Au(I,i)}zi!==null&&Au(zi,i),$i!==null&&Au($i,i),Ui!==null&&Au(Ui,i),gl.forEach(o),bl.forEach(o);for(var c=0;c<Hi.length;c++){var f=Hi[c];f.blockedOn===i&&(f.blockedOn=null)}for(;0<Hi.length&&(c=Hi[0],c.blockedOn===null);)J_(c),c.blockedOn===null&&Hi.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(f=0;f<c.length;f+=3){var b=c[f],x=c[f+1],w=b[on]||null;if(typeof x=="function")w||tS(c);else if(w){var j=null;if(x&&x.hasAttribute("formAction")){if(b=x,w=x[on]||null)j=w.formAction;else if(ip(b)!==null)continue}else j=w.action;typeof j=="function"?c[f+1]=j:(c.splice(f,3),f-=3),tS(c)}}}function nS(){function i(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(w){return b=w})},focusReset:"manual",scroll:"manual"})}function o(){b!==null&&(b(),b=null),f||setTimeout(c,20)}function c(){if(!f&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,b=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(c,100),function(){f=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),b!==null&&(b(),b=null)}}}function op(i){this._internalRoot=i}Nu.prototype.render=op.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var c=o.current,f=Rn();Z_(c,f,i,o,null,null)},Nu.prototype.unmount=op.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Z_(i.current,2,null,i,null,null),uu(),o[Ja]=null}};function Nu(i){this._internalRoot=i}Nu.prototype.unstable_scheduleHydration=function(i){if(i){var o=fy();i={blockedOn:null,target:i,priority:o};for(var c=0;c<Hi.length&&o!==0&&o<Hi[c].priority;c++);Hi.splice(c,0,i),c===0&&J_(i)}};var rS=t.version;if(rS!=="19.2.7")throw Error(r(527,rS,"19.2.7"));G.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=m(o),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var bL={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ju.isDisabled&&ju.supportsFiber)try{Rs=ju.inject(bL),yn=ju}catch{}}return xl.createRoot=function(i,o){if(!a(i))throw Error(r(299));var c=!1,f="",b=ux,x=dx,w=fx;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(x=o.onCaughtError),o.onRecoverableError!==void 0&&(w=o.onRecoverableError)),o=G_(i,1,!1,null,null,c,f,null,b,x,w,nS),i[Ja]=o.current,Hm(i),new op(o)},xl.hydrateRoot=function(i,o,c){if(!a(i))throw Error(r(299));var f=!1,b="",x=ux,w=dx,j=fx,I=null;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onUncaughtError!==void 0&&(x=c.onUncaughtError),c.onCaughtError!==void 0&&(w=c.onCaughtError),c.onRecoverableError!==void 0&&(j=c.onRecoverableError),c.formState!==void 0&&(I=c.formState)),o=G_(i,1,!0,o,c??null,f,b,I,x,w,j,nS),o.context=q_(null),c=o.current,f=Rn(),f=Kf(f),b=ki(f),b.callback=null,Ri(c,b,f),c=f,o.current.lanes=c,Ts(o,c),mr(o),i[Ja]=o.current,Hm(i),new Nu(o)},xl.version="19.2.7",xl}var gS;function AL(){if(gS)return up.exports;gS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),up.exports=RL(),up.exports}var TL=AL();var Db=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,PE=/^[\\/]{2}/;function NL(e,t){return t+e.replace(/\\/g,"/")}var bS="popstate";function vS(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function jL(e={}){function t(r,a){let s=a.state?.masked,{pathname:l,search:d,hash:u}=s||r.location;return xg("",{pathname:l,search:d,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Ha(a)}return OL(t,n,null,e)}function st(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function LL(){return Math.random().toString(36).substring(2,10)}function yS(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function xg(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?hs(t):t,state:n,key:t&&t.key||r||LL(),mask:a}}function Ha({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function hs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function OL(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:s=!1}=r,l=a.history,d="POP",u=null,m=g();m==null&&(m=0,l.replaceState({...l.state,idx:m},""));function g(){return(l.state||{idx:null}).idx}function p(){d="POP";let E=g(),k=E==null?null:E-m;m=E,u&&u({action:d,location:S.location,delta:k})}function v(E,k){d="PUSH";let C=vS(E)?E:xg(S.location,E,k);m=g()+1;let A=yS(C,m),O=S.createHref(C.mask||C);try{l.pushState(A,"",O)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;a.location.assign(O)}s&&u&&u({action:d,location:S.location,delta:1})}function y(E,k){d="REPLACE";let C=vS(E)?E:xg(S.location,E,k);m=g();let A=yS(C,m),O=S.createHref(C.mask||C);l.replaceState(A,"",O),s&&u&&u({action:d,location:S.location,delta:0})}function _(E){return DL(a,E)}let S={get action(){return d},get location(){return e(a,l)},listen(E){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(bS,p),u=E,()=>{a.removeEventListener(bS,p),u=null}},createHref(E){return t(a,E)},createURL:_,encodeLocation(E){let k=_(E);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:v,replace:y,go(E){return l.go(E)}};return S}function DL(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),st(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ha(t);return a=a.replace(/ $/,"%20"),!n&&PE.test(a)&&(a=r+a),new URL(a,r)}function zE(e,t,n="/"){return IL(e,t,n,!1)}function IL(e,t,n,r,a){let s=typeof t=="string"?hs(t):t,l=li(s.pathname||"/",n);if(l==null)return null;let d=ML(e),u=null,m=ZL(l);for(let g=0;u==null&&g<d.length;++g)u=qL(d[g],m,r);return u}function ML(e){let t=$E(e);return PL(t),t}function $E(e,t=[],n=[],r="",a=!1){let s=(l,d,u=a,m)=>{let g={relativePath:m===void 0?l.path||"":m,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(r)&&u)return;st(g.relativePath.startsWith(r),`Absolute route path "${g.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(r.length)}let p=sr([r,g.relativePath]),v=n.concat(g);l.children&&l.children.length>0&&(st(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),$E(l.children,t,v,p,u)),!(l.path==null&&!l.index)&&t.push({path:p,score:FL(p,l.index),routesMeta:v.map((y,_)=>{let[S,E]=BE(y.relativePath,y.caseSensitive,_===v.length-1);return{...y,matcher:S,compiledParams:E}})})};return e.forEach((l,d)=>{if(l.path===""||!l.path?.includes("?"))s(l,d);else for(let u of UE(l.path))s(l,d,!0,u)}),t}function UE(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let l=UE(r.join("/")),d=[];return d.push(...l.map(u=>u===""?s:[s,u].join("/"))),a&&d.push(...l),d.map(u=>e.startsWith("/")&&u===""?"/":u)}function PL(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:GL(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var zL=/^:[\w-]+$/,$L=3,UL=2,HL=1,BL=10,VL=-2,xS=e=>e==="*";function FL(e,t){let n=e.split("/"),r=n.length;return n.some(xS)&&(r+=VL),t&&(r+=UL),n.filter(a=>!xS(a)).reduce((a,s)=>a+(zL.test(s)?$L:s===""?HL:BL),r)}function GL(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function qL(e,t,n=!1){let{routesMeta:r}=e,a={},s="/",l=[];for(let d=0;d<r.length;++d){let u=r[d],m=d===r.length-1,g=s==="/"?t:t.slice(s.length)||"/",p={path:u.relativePath,caseSensitive:u.caseSensitive,end:m},v=u.matcher&&u.compiledParams?HE(p,g,u.matcher,u.compiledParams):jd(p,g),y=u.route;if(!v&&m&&n&&!r[r.length-1].route.index&&(v=jd({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},g)),!v)return null;Object.assign(a,v.params),l.push({params:a,pathname:sr([s,v.pathname]),pathnameBase:KL(sr([s,v.pathnameBase])),route:y}),v.pathnameBase!=="/"&&(s=sr([s,v.pathnameBase]))}return l}function jd(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=BE(e.path,e.caseSensitive,e.end);return HE(e,t,n,r)}function HE(e,t,n,r){let a=t.match(n);if(!a)return null;let s=a[0],l=os(s,1),d=a.slice(1);return{params:r.reduce((m,{paramName:g,isOptional:p},v)=>{if(g==="*"){let _=d[v]||"";l=os(s.slice(0,s.length-_.length),1)}const y=d[v];return p&&!y?m[g]=void 0:m[g]=(y||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:l,pattern:e}}function BE(e,t=!1,n=!0){Xn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,d,u,m,g)=>{if(r.push({paramName:d,isOptional:u!=null}),u){let p=g.charAt(m+l.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function ZL(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Xn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function li(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function WL(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?hs(e):e,s;return n?(n=VE(n),n.startsWith("/")||n.startsWith("\\")?s=_S(n.substring(1),"/"):s=_S(n,t)):s=t,{pathname:s,search:XL(r),hash:QL(a)}}function _S(e,t){let n=os(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function mp(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function YL(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ib(e){let t=YL(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function cf(e,t,n,r=!1){let a;typeof e=="string"?a=hs(e):(a={...e},st(!a.pathname||!a.pathname.includes("?"),mp("?","pathname","search",a)),st(!a.pathname||!a.pathname.includes("#"),mp("#","pathname","hash",a)),st(!a.search||!a.search.includes("#"),mp("#","search","hash",a)));let s=e===""||a.pathname==="",l=s?"/":a.pathname,d;if(l==null)d=n;else{let p=t.length-1;if(!r&&l.startsWith("..")){let v=l.split("/");for(;v[0]==="..";)v.shift(),p-=1;a.pathname=v.join("/")}d=p>=0?t[p]:"/"}let u=WL(a,d),m=l&&l!=="/"&&l.endsWith("/"),g=(s||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(m||g)&&(u.pathname+="/"),u}var VE=e=>e.replace(/[\\/]{2,}/g,"/"),sr=e=>VE(e.join("/"));function os(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var KL=e=>os(e).replace(/^\/*/,"/"),XL=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,QL=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,JL=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function eO(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function tO(e){let t=e.map(n=>n.route.path).filter(Boolean);return sr(t)||"/"}var FE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function GE(e,t){let n=e;if(typeof n!="string"||!Db.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(FE)try{let s=new URL(window.location.href),l=PE.test(n)?new URL(NL(n,s.protocol)):new URL(n),d=li(l.pathname,t);l.origin===s.origin&&d!=null?n=d+l.search+l.hash:a=!0}catch{Xn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var SS=new URL("http://localhost");function Mb(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),SS)}catch{return SS}}function pp(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function nO(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===""||e.slice(n.length).startsWith("//"):!1}function Pb(e,t,n,r){let a=null;try{a=e==null?null:new URL(e,n)}catch{}let s=new URL(t,n),l=a!=null&&!pp(a,n),d=!pp(s,n);if(r==="reject"){if(l||d)throw new Error("External navigation is not allowed")}else if(d&&(a==null||!nO(e,a)||!pp(a,s)))throw new Error("External navigation is not allowed")}var qE=["POST","PUT","PATCH","DELETE"];new Set(qE);var rO=["GET",...qE];new Set(rO);var iO=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function aO(e){try{return iO.includes(new URL(e).protocol)}catch{return!1}}var ms=R.createContext(null);ms.displayName="DataRouter";var uf=R.createContext(null);uf.displayName="DataRouterState";var ZE=R.createContext(!1);function oO(){return R.useContext(ZE)}var WE=R.createContext({isTransitioning:!1});WE.displayName="ViewTransition";var sO=R.createContext(new Map);sO.displayName="Fetchers";var lO=R.createContext(null);lO.displayName="Await";var On=R.createContext(null);On.displayName="Navigation";var oc=R.createContext(null);oc.displayName="Location";var Qn=R.createContext({outlet:null,matches:[],isDataRoute:!1});Qn.displayName="Route";var zb=R.createContext(null);zb.displayName="RouteError";var YE="REACT_ROUTER_ERROR",cO="REDIRECT",uO="ROUTE_ERROR_RESPONSE";function dO(e){if(e.startsWith(`${YE}:${cO}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function fO(e){if(e.startsWith(`${YE}:${uO}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new JL(t.status,t.statusText,t.data)}catch{}}function hO(e,{relative:t}={}){st(ps(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=R.useContext(On),{hash:a,pathname:s,search:l}=sc(e,{relative:t}),d=s;return n!=="/"&&(d=s==="/"?n:sr([n,s])),r.createHref({pathname:d,search:l,hash:a})}function ps(){return R.useContext(oc)!=null}function pn(){return st(ps(),"useLocation() may be used only in the context of a <Router> component."),R.useContext(oc).location}var KE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function XE(e){R.useContext(On).static||R.useLayoutEffect(e)}function ta(){let{isDataRoute:e}=R.useContext(Qn);return e?AO():mO()}function mO(){st(ps(),"useNavigate() may be used only in the context of a <Router> component.");let e=R.useContext(ms),{basename:t,navigator:n}=R.useContext(On),{matches:r}=R.useContext(Qn),{pathname:a}=pn(),s=JSON.stringify(Ib(r)),l=R.useRef(!1);return XE(()=>{l.current=!0}),R.useCallback((u,m={})=>{if(Xn(l.current,KE),!l.current)return;if(typeof u=="number"){n.go(u);return}let g=cf(u,JSON.parse(s),a,m.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:sr([t,g.pathname])),Pb(typeof u=="string"?u:Ha(u),n.createHref(g),Mb(n),"reject"),(m.replace?n.replace:n.push)(g,m.state,m)},[t,n,s,a,e])}var QE=R.createContext(null);function pO(){return R.useContext(QE)}function gO(e){let t=R.useContext(Qn).outlet;return R.useMemo(()=>t&&R.createElement(QE.Provider,{value:e},t),[t,e])}function fi(){let{matches:e}=R.useContext(Qn);return e[e.length-1]?.params??{}}function sc(e,{relative:t}={}){let{matches:n}=R.useContext(Qn),{pathname:r}=pn(),a=JSON.stringify(Ib(n));return R.useMemo(()=>cf(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function bO(e,t){return JE(e,t)}function JE(e,t,n){st(ps(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=R.useContext(On),{matches:a}=R.useContext(Qn),s=a[a.length-1],l=s?s.params:{},d=s?s.pathname:"/",u=s?s.pathnameBase:"/",m=s&&s.route;{let E=m&&m.path||"";tC(d,!m||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
|
+
|
|
12
|
+
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let g=pn(),p;if(t){let E=typeof t=="string"?hs(t):t;st(u==="/"||E.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${E.pathname}" was given in the \`location\` prop.`),p=E}else p=g;let v=p.pathname||"/",y=v;if(u!=="/"){let E=u.replace(/^\//,"").split("/");y="/"+v.replace(/^\//,"").split("/").slice(E.length).join("/")}let _=n&&n.state.matches.length?n.state.matches.map(E=>Object.assign(E,{route:n.manifest[E.route.id]||E.route})):zE(e,{pathname:y});Xn(m||_!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Xn(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let S=SO(_&&_.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:sr([u,r.encodeLocation?r.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?u:sr([u,r.encodeLocation?r.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),a,n);return t&&S?R.createElement(oc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...p},navigationType:"POP"}},S):S}function vO(){let e=RO(),t=eO(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:s},"ErrorBoundary")," or"," ",R.createElement("code",{style:s},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:a},n):null,l)}var yO=R.createElement(vO,null),eC=class extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=fO(e.digest);n&&(e=n)}let t=e!==void 0?R.createElement(Qn.Provider,{value:this.props.routeContext},R.createElement(zb.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?R.createElement(xO,{error:e},t):t}};eC.contextType=ZE;var gp=new WeakMap;function xO({children:e,error:t}){let{basename:n,navigator:r}=R.useContext(On);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=dO(t.digest);if(a){let s=gp.get(t);if(s)throw s;let l=GE(a.location,n),d=l.absoluteURL||l.to;if(Pb(a.location,d,Mb(r),"allow-explicit"),aO(d))throw new Error("Invalid redirect location");if(FE&&!gp.get(t))if(l.isExternal||a.reloadDocument)window.location.href=d;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:a.replace}));throw gp.set(t,u),u}return R.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function _O({routeContext:e,match:t,children:n}){let r=R.useContext(ms);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),R.createElement(Qn.Provider,{value:e},n)}function SO(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,s=r?.errors;if(s!=null){let g=a.findIndex(p=>p.route.id&&s?.[p.route.id]!==void 0);st(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,g+1))}let l=!1,d=-1;if(n&&r){l=r.renderFallback;for(let g=0;g<a.length;g++){let p=a[g];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=g),p.route.id){let{loaderData:v,errors:y}=r,_=p.route.loader&&!v.hasOwnProperty(p.route.id)&&(!y||y[p.route.id]===void 0);if(p.route.lazy||_){n.isStatic&&(l=!0),d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}}let u=n?.onError,m=r&&u?(g,p)=>{u(g,{location:r.location,params:r.matches?.[0]?.params??{},pattern:tO(r.matches),errorInfo:p})}:void 0;return a.reduceRight((g,p,v)=>{let y,_=!1,S=null,E=null;r&&(y=s&&p.route.id?s[p.route.id]:void 0,S=p.route.errorElement||yO,l&&(d<0&&v===0?(tC("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,E=null):d===v&&(_=!0,E=p.route.hydrateFallbackElement||null)));let k=t.concat(a.slice(0,v+1)),C=()=>{let A;return y?A=S:_?A=E:p.route.Component?A=R.createElement(p.route.Component,null):p.route.element?A=p.route.element:A=g,R.createElement(_O,{match:p,routeContext:{outlet:g,matches:k,isDataRoute:r!=null},children:A})};return r&&(p.route.ErrorBoundary||p.route.errorElement||v===0)?R.createElement(eC,{location:r.location,revalidation:r.revalidation,component:S,error:y,children:C(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:m}):C()},null)}function $b(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wO(e){let t=R.useContext(ms);return st(t,$b(e)),t}function EO(e){let t=R.useContext(uf);return st(t,$b(e)),t}function CO(e){let t=R.useContext(Qn);return st(t,$b(e)),t}function Ub(e){let t=CO(e),n=t.matches[t.matches.length-1];return st(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function kO(){return Ub("useRouteId")}function RO(){let e=R.useContext(zb),t=EO("useRouteError"),n=Ub("useRouteError");return e!==void 0?e:t.errors?.[n]}function AO(){let{router:e}=wO("useNavigate"),t=Ub("useNavigate"),n=R.useRef(!1);return XE(()=>{n.current=!0}),R.useCallback(async(a,s={})=>{Xn(n.current,KE),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...s}))},[e,t])}var wS={};function tC(e,t,n){!t&&!wS[e]&&(wS[e]=!0,Xn(!1,n))}R.memo(TO);function TO({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:s}){return JE(e,void 0,{manifest:t,state:r,isStatic:a,onError:s})}function Pl({to:e,replace:t,state:n,relative:r}){st(ps(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a,navigator:s}=R.useContext(On);Xn(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=R.useContext(Qn),{pathname:d}=pn(),u=ta(),m=cf(e,Ib(l),d,r==="path");Pb(typeof e=="string"?e:Ha(e),s.createHref(m),Mb(s),"reject");let g=JSON.stringify(m);return R.useEffect(()=>{u(JSON.parse(g),{replace:t,state:n,relative:r})},[u,g,r,t,n]),null}function nC(e){return gO(e.context)}function Rt(e){st(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function NO({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:s=!1,useTransitions:l}){st(!ps(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),u=R.useMemo(()=>({basename:d,navigator:a,static:s,useTransitions:l,future:{}}),[d,a,s,l]);typeof n=="string"&&(n=hs(n));let{pathname:m="/",search:g="",hash:p="",state:v=null,key:y="default",mask:_}=n,S=R.useMemo(()=>{let E=li(m,d);return E==null?null:{location:{pathname:E,search:g,hash:p,state:v,key:y,mask:_},navigationType:r}},[d,m,g,p,v,y,r,_]);return Xn(S!=null,`<Router basename="${d}"> is not able to match the URL "${m}${g}${p}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:R.createElement(On.Provider,{value:u},R.createElement(oc.Provider,{children:t,value:S}))}function jO({children:e,location:t}){return bO(_g(e),t)}function _g(e,t=[]){let n=[];return R.Children.forEach(e,(r,a)=>{if(!R.isValidElement(r))return;let s=[...t,a];if(r.type===R.Fragment){n.push.apply(n,_g(r.props.children,s));return}st(r.type===Rt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),st(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=_g(r.props.children,s)),n.push(l)}),n}var pd="get",gd="application/x-www-form-urlencoded";function df(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function LO(e){return df(e)&&e.tagName.toLowerCase()==="button"}function OO(e){return df(e)&&e.tagName.toLowerCase()==="form"}function DO(e){return df(e)&&e.tagName.toLowerCase()==="input"}function IO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function MO(e,t){return e.button===0&&(!t||t==="_self")&&!IO(e)}function Sg(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function PO(e,t){let n=Sg(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(s=>{n.append(a,s)})}),n}var Lu=null;function zO(){if(Lu===null)try{new FormData(document.createElement("form"),0),Lu=!1}catch{Lu=!0}return Lu}var $O=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bp(e){return e!=null&&!$O.has(e)?(Xn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gd}"`),null):e}function UO(e,t){let n,r,a,s,l;if(OO(e)){let d=e.getAttribute("action");r=d?li(d,t):null,n=e.getAttribute("method")||pd,a=bp(e.getAttribute("enctype"))||gd,s=new FormData(e)}else if(LO(e)||DO(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||d.getAttribute("action");if(r=u?li(u,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||pd,a=bp(e.getAttribute("formenctype"))||bp(d.getAttribute("enctype"))||gd,s=new FormData(d,e),!zO()){let{name:m,type:g,value:p}=e;if(g==="image"){let v=m?`${m}.`:"";s.append(`${v}x`,"0"),s.append(`${v}y`,"0")}else m&&s.append(m,p)}}else{if(df(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=pd,r=null,a=gd,l=e}return s&&a==="text/plain"&&(l=s,s=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Hb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function rC(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&li(a.pathname,t)==="/"?a.pathname=`${os(t)}/_root.${r}`:a.pathname=`${os(a.pathname)}.${r}`,a}async function HO(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function BO(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function VO(e,t,n){let r=await Promise.all(e.map(async a=>{let s=t.routes[a.route.id];if(s){let l=await HO(s,n);return l.links?l.links():[]}return[]}));return ZO(r.flat(1).filter(BO).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function ES(e,t,n,r,a,s){let l=(u,m)=>n[m]?u.route.id!==n[m].route.id:!0,d=(u,m)=>n[m].pathname!==u.pathname||n[m].route.path?.endsWith("*")&&n[m].params["*"]!==u.params["*"];return s==="assets"?t.filter((u,m)=>l(u,m)||d(u,m)):s==="data"?t.filter((u,m)=>{let g=r.routes[u.route.id];if(!g||!g.hasLoader)return!1;if(l(u,m)||d(u,m))return!0;if(u.route.shouldRevalidate){let p=u.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function FO(e,t,{includeHydrateFallback:n}={}){return GO(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function GO(e){return[...new Set(e)]}function qO(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ZO(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let s=JSON.stringify(qO(a));return n.has(s)||(n.add(s),r.push({key:s,link:a})),r},[])}function Bb(){let e=R.useContext(ms);return Hb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function WO(){let e=R.useContext(uf);return Hb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Vb=R.createContext(void 0);Vb.displayName="FrameworkContext";function ff(){let e=R.useContext(Vb);return Hb(e,"You must render this element inside a <HydratedRouter> element"),e}function YO(e,t){let n=R.useContext(Vb),[r,a]=R.useState(!1),[s,l]=R.useState(!1),{onFocus:d,onBlur:u,onMouseEnter:m,onMouseLeave:g,onTouchStart:p}=t,v=R.useRef(null);R.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let S=k=>{k.forEach(C=>{l(C.isIntersecting)})},E=new IntersectionObserver(S,{threshold:.5});return v.current&&E.observe(v.current),()=>{E.disconnect()}}},[e]),R.useEffect(()=>{if(r){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[r]);let y=()=>{a(!0)},_=()=>{a(!1),l(!1)};return n?e!=="intent"?[s,v,{}]:[s,v,{onFocus:_l(d,y),onBlur:_l(u,_),onMouseEnter:_l(m,y),onMouseLeave:_l(g,_),onTouchStart:_l(p,y)}]:[!1,v,{}]}function _l(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function KO({page:e,...t}){let n=oO(),{nonce:r}=ff(),{router:a}=Bb(),s=R.useMemo(()=>zE(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?(t.nonce==null&&r&&(t={...t,nonce:r}),n?R.createElement(QO,{page:e,matches:s,...t}):R.createElement(JO,{page:e,matches:s,...t})):null}function XO(e){let{manifest:t,routeModules:n}=ff(),[r,a]=R.useState([]);return R.useEffect(()=>{let s=!1;return VO(e,t,n).then(l=>{s||a(l)}),()=>{s=!0}},[e,t,n]),r}function QO({page:e,matches:t,...n}){let r=pn(),{future:a}=ff(),{basename:s}=Bb(),l=R.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let d=rC(e,s,a.v8_trailingSlashAwareDataRequests,"rsc"),u=!1,m=[];for(let g of t)typeof g.route.shouldRevalidate=="function"?u=!0:m.push(g.route.id);return u&&m.length>0&&d.searchParams.set("_routes",m.join(",")),[d.pathname+d.search]},[s,a.v8_trailingSlashAwareDataRequests,e,r,t]);return R.createElement(R.Fragment,null,l.map(d=>R.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function JO({page:e,matches:t,...n}){let r=pn(),{future:a,manifest:s,routeModules:l}=ff(),{basename:d}=Bb(),{loaderData:u,matches:m}=WO(),g=R.useMemo(()=>ES(e,t,m,s,r,"data"),[e,t,m,s,r]),p=R.useMemo(()=>ES(e,t,m,s,r,"assets"),[e,t,m,s,r]),v=R.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,E=!1;if(t.forEach(C=>{let A=s.routes[C.route.id];!A||!A.hasLoader||(!g.some(O=>O.route.id===C.route.id)&&C.route.id in u&&l[C.route.id]?.shouldRevalidate||A.hasClientLoader?E=!0:S.add(C.route.id))}),S.size===0)return[];let k=rC(e,d,a.v8_trailingSlashAwareDataRequests,"data");return E&&S.size>0&&k.searchParams.set("_routes",t.filter(C=>S.has(C.route.id)).map(C=>C.route.id).join(",")),[k.pathname+k.search]},[d,a.v8_trailingSlashAwareDataRequests,u,r,s,g,t,e,l]),y=R.useMemo(()=>FO(p,s),[p,s]),_=XO(p);return R.createElement(R.Fragment,null,v.map(S=>R.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),y.map(S=>R.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),_.map(({key:S,link:E})=>R.createElement("link",{key:S,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function eD(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var tD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{tD&&(window.__reactRouterVersion="7.18.3")}catch{}function nD({basename:e,children:t,useTransitions:n,window:r}){let a=R.useRef();a.current==null&&(a.current=jL({window:r,v5Compat:!0}));let s=a.current,[l,d]=R.useState({action:s.action,location:s.location}),u=R.useCallback(m=>{n===!1?d(m):R.startTransition(()=>d(m))},[n]);return R.useLayoutEffect(()=>s.listen(u),[s,u]),R.createElement(NO,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:s,useTransitions:n})}var $e=R.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:s,replace:l,mask:d,state:u,target:m,to:g,preventScrollReset:p,viewTransition:v,defaultShouldRevalidate:y,..._},S){let{basename:E,navigator:k,useTransitions:C}=R.useContext(On),A=typeof g=="string"&&Db.test(g),O=GE(g,E);g=O.to;let L=hO(g,{relative:a}),T=pn(),D=null;if(d){let se=cf(d,[],T.mask?T.mask.pathname:"/",!0);E!=="/"&&(se.pathname=se.pathname==="/"?E:sr([E,se.pathname])),D=k.createHref(se)}let[M,B,Y]=YO(r,_),F=aD(g,{replace:l,mask:d,state:u,target:m,preventScrollReset:p,relative:a,viewTransition:v,defaultShouldRevalidate:y,useTransitions:C});function $(se){t&&t(se),se.defaultPrevented||F(se)}let q=!(O.isExternal||s),ne=R.createElement("a",{..._,...Y,href:(q?D:void 0)||O.absoluteURL||L,onClick:q?$:t,ref:eD(S,B),target:m,"data-discover":!A&&n==="render"?"true":void 0});return M&&!A?R.createElement(R.Fragment,null,ne,R.createElement(KO,{page:L})):ne});$e.displayName="Link";var Rl=R.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:s,to:l,viewTransition:d,children:u,...m},g){let p=sc(l,{relative:m.relative}),v=pn(),y=R.useContext(uf),{navigator:_,basename:S}=R.useContext(On),E=y!=null&&uD(p)&&d===!0,k=_.encodeLocation?_.encodeLocation(p).pathname:p.pathname,C=v.pathname,A=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(C=C.toLowerCase(),A=A?A.toLowerCase():null,k=k.toLowerCase()),A&&S&&(A=li(A,S)||A);const O=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let L=C===k||!a&&C.startsWith(k)&&C.charAt(O)==="/",T=A!=null&&(A===k||!a&&A.startsWith(k)&&A.charAt(k.length)==="/"),D={isActive:L,isPending:T,isTransitioning:E},M=L?t:void 0,B;typeof r=="function"?B=r(D):B=[r,L?"active":null,T?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let Y=typeof s=="function"?s(D):s;return R.createElement($e,{...m,"aria-current":M,className:B,ref:g,style:Y,to:l,viewTransition:d},typeof u=="function"?u(D):u)});Rl.displayName="NavLink";var rD=R.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:s,method:l=pd,action:d,onSubmit:u,relative:m,preventScrollReset:g,viewTransition:p,defaultShouldRevalidate:v,...y},_)=>{let{useTransitions:S}=R.useContext(On),E=lD(),k=cD(d,{relative:m}),C=l.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&Db.test(d),O=L=>{if(u&&u(L),L.defaultPrevented)return;L.preventDefault();let T=L.nativeEvent.submitter,D=T?.getAttribute("formmethod")||l,M=()=>E(T||L.currentTarget,{fetcherKey:t,method:D,navigate:n,replace:a,state:s,relative:m,preventScrollReset:g,viewTransition:p,defaultShouldRevalidate:v});S&&n!==!1?R.startTransition(()=>M()):M()};return R.createElement("form",{ref:_,method:C,action:k,onSubmit:r?u:O,...y,"data-discover":!A&&e==="render"?"true":void 0})});rD.displayName="Form";function iD(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iC(e){let t=R.useContext(ms);return st(t,iD(e)),t}function aD(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:s,relative:l,viewTransition:d,defaultShouldRevalidate:u,useTransitions:m}={}){let g=ta(),p=pn(),v=sc(e,{relative:l});return R.useCallback(y=>{if(MO(y,t)){y.preventDefault();let _=n!==void 0?n:Ha(p)===Ha(v),S=()=>g(e,{replace:_,mask:r,state:a,preventScrollReset:s,relative:l,viewTransition:d,defaultShouldRevalidate:u});m?R.startTransition(()=>S()):S()}},[p,g,v,n,r,a,t,e,s,l,d,u,m])}function lc(e){Xn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=R.useRef(Sg(e)),n=R.useRef(!1),r=pn(),a=R.useMemo(()=>PO(r.search,n.current?null:t.current),[r.search]),s=ta(),l=R.useCallback((d,u)=>{const m=Sg(typeof d=="function"?d(new URLSearchParams(a)):d);n.current=!0,s("?"+m,u)},[s,a]);return[a,l]}var oD=0,sD=()=>`__${String(++oD)}__`;function lD(){let{router:e}=iC("useSubmit"),{basename:t}=R.useContext(On),n=kO(),r=e.fetch,a=e.navigate;return R.useCallback(async(s,l={})=>{let{action:d,method:u,encType:m,formData:g,body:p}=UO(s,t);if(l.navigate===!1){let v=l.fetcherKey||sD();await r(v,n,l.action||d,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:p,formMethod:l.method||u,formEncType:l.encType||m,flushSync:l.flushSync})}else await a(l.action||d,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:g,body:p,formMethod:l.method||u,formEncType:l.encType||m,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,a,t,n])}function cD(e,{relative:t}={}){let{basename:n}=R.useContext(On),r=R.useContext(Qn);st(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),s={...sc(e||".",{relative:t})},l=pn();if(e==null){s.search=l.search;let d=new URLSearchParams(s.search),u=d.getAll("index");if(u.some(g=>g==="")){d.delete("index"),u.filter(p=>p).forEach(p=>d.append("index",p));let g=d.toString();s.search=g?`?${g}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:sr([n,s.pathname])),Ha(s)}function uD(e,{relative:t}={}){let n=R.useContext(WE);st(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=iC("useViewTransitionState"),a=sc(e,{relative:t});if(!n.isTransitioning)return!1;let s=li(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=li(n.nextLocation.pathname,r)||n.nextLocation.pathname;return jd(a.pathname,l)!=null||jd(a.pathname,s)!=null}const wg="selfbench:session-expired";function Fb(e){e.status===401&&typeof window<"u"&&window.dispatchEvent(new Event(wg))}const dD=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function fD(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:dD(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}const hD=e=>{let t="",n=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t};const mD=e=>{const t=hD(e);return t.charAt(0).toUpperCase()+t.slice(1)};const Eg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Ra={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function vp(e){return e!=null}function pD(e,t={}){const n=t.attributeNames??{},r=v=>n[v]??v,a=e.size??e.width??Ra.width,s=e.size??e.height??Ra.height,l=e.aliases?.filter(v=>typeof v=="string"&&v.trim()!=="").map(v=>`lucide-${v}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...l],u=t.className?.split(" ").filter(Boolean)??[],m=t.includeDefaultClasses===!1?Eg(...u):Eg("lucide",...d,...u),g=t.absoluteStrokeWidth?Number(t.strokeWidth??Ra["stroke-width"])*Number(e.size??e.width??Ra.width)/Number(t.size??t.width??Ra.width):t.strokeWidth??Ra["stroke-width"];return["svg",{...Object.entries(Ra).reduce((v,[y,_])=>(v[r(y)]=_,v),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&vp(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&vp(t.width)&&{[r("width")]:t.width},..."height"in t&&vp(t.height)&&{[r("height")]:t.height},[r("stroke-width")]:g,...m&&{[r("class")]:m},[r("viewBox")]:`0 0 ${a} ${s}`,...t.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(v=>{const[y,_,S]=v,E=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",..._}:_;return S?[y,E,S]:[y,E]})]}function gD(e,t={}){return pD(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const bD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},vD=R.createContext({}),yD=()=>R.useContext(vD),xD=R.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:a,absoluteStrokeWidth:s,nonScalingStroke:l,className:d="",children:u,iconNode:m=[],icon:g={node:m,aliases:[],size:24},...p},v)=>{const{size:y=24,strokeWidth:_=2,absoluteStrokeWidth:S=!1,nonScalingStroke:E=!1,color:k="currentColor",className:C=""}=yD()??{},A=!!u||bD(p),[O,L,T=[]]=gD(g,{color:e??k,width:n??t??y,height:r??t??y,strokeWidth:a??_,absoluteStrokeWidth:s??S,nonScalingStroke:l??E,className:Eg(C,d),hasA11yProp:A,attributes:p});return R.createElement(O,{ref:v,...L},[...T.map(([D,M])=>R.createElement(D,M)),...Array.isArray(u)?u:[u]])});function Je(e,t=[],n=[]){const r=typeof e=="string"?fD(e,t,n):e,a=R.forwardRef(({className:s,...l},d)=>R.createElement(xD,{ref:d,icon:r,className:s,...l}));return r.name&&(a.displayName=mD(r.name)),a}const aC={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};aC.node;const _D=Je(aC);const oC={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};oC.node;const hf=Je(oC);const sC={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};sC.node;const CS=Je(sC);const lC={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};lC.node;const Vl=Je(lC);const cC={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};cC.node;const SD=Je(cC);const uC={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};uC.node;const wD=Je(uC);const dC={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};dC.node;const fC=Je(dC);const hC={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};hC.node;const ED=Je(hC);const mC={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};mC.node;const pC=Je(mC);const gC={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};gC.node;const CD=Je(gC);const bC={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};bC.node;const kD=Je(bC);const vC={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]};vC.node;const yC=Je(vC);const xC={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};xC.node;const RD=Je(xC);const _C={name:"git-pull-request",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]};_C.node;const AD=Je(_C);const SC={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};SC.node;const TD=Je(SC);const wC={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};wC.node;const EC=Je(wC);const CC={name:"lock-keyhole",size:24,node:[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]};CC.node;const kC=Je(CC);const RC={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};RC.node;const ND=Je(RC);const AC={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};AC.node;const jD=Je(AC);const TC={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};TC.node;const LD=Je(TC);const NC={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};NC.node;const OD=Je(NC);const jC={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};jC.node;const Ma=Je(jC);const LC={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};LC.node;const DD=Je(LC);const OC={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};OC.node;const ID=Je(OC);const DC={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};DC.node;const IC=Je(DC);const MC={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};MC.node;const MD=Je(MC);const PC={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};PC.node;const Gb=Je(PC);class Cg extends Error{constructor(t,n,r){super(t),this.runId=n,this.status=r,this.name="BatchRequestError"}runId;status}const mf=({org:e,fullName:t})=>`/api/orgs/${encodeURIComponent(e)}/repos/${t.split("/").map(encodeURIComponent).join("/")}/batches`;async function pf(e,t){const n=await fetch(e,{...t,headers:{"content-type":"application/json"}});Fb(n);const r=await n.json();if(!n.ok)throw new Cg(String(r.error??n.status),typeof r.runId=="string"?r.runId:void 0,n.status);return r}const PD=e=>pf(mf(e)),zD=(e,t,n)=>pf(mf(e),{method:"POST",body:JSON.stringify({candidateCounts:t,generation:n})}),zC=(e,t)=>pf(`${mf(e)}/${t}`),$D=(e,t)=>pf(`${mf(e)}/${t}/cancel`,{method:"POST"}),ai=e=>["complete","failed","blocked","cancelled"].includes(e);function Ou(e){const t=Object.values(e),n=t.reduce((r,a)=>r+a,0);return t.every(r=>Number.isInteger(r)&&r>=0)&&n>0&&n<=1e4}function $C(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=$C(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function UC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=$C(e))&&(r&&(r+=" "),r+=t);return r}const UD=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},HD=(e,t)=>({classGroupId:e,validator:t}),HC=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ld="-",kS=[],BD="arbitrary..",VD=e=>{const t=GD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return FD(l);const d=l.split(Ld),u=d[0]===""&&d.length>1?1:0;return BC(d,u,t)},getConflictingClassGroupIds:(l,d)=>{if(d){const u=r[l],m=n[l];return u?m?UD(m,u):u:m||kS}return n[l]||kS}}},BC=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],s=n.nextPart.get(a);if(s){const m=BC(e,t+1,s);if(m)return m}const l=n.validators;if(l===null)return;const d=t===0?e.join(Ld):e.slice(t).join(Ld),u=l.length;for(let m=0;m<u;m++){const g=l[m];if(g.validator(d))return g.classGroupId}},FD=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?BD+r:void 0})(),GD=e=>{const{theme:t,classGroups:n}=e;return qD(n,t)},qD=(e,t)=>{const n=HC();for(const r in e){const a=e[r];qb(a,n,r,t)}return n},qb=(e,t,n,r)=>{const a=e.length;for(let s=0;s<a;s++){const l=e[s];ZD(l,t,n,r)}},ZD=(e,t,n,r)=>{if(typeof e=="string"){WD(e,t,n);return}if(typeof e=="function"){YD(e,t,n,r);return}KD(e,t,n,r)},WD=(e,t,n)=>{const r=e===""?t:VC(t,e);r.classGroupId=n},YD=(e,t,n,r)=>{if(XD(e)){qb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(HD(n,e))},KD=(e,t,n,r)=>{const a=Object.entries(e),s=a.length;for(let l=0;l<s;l++){const[d,u]=a[l];qb(u,VC(t,d),n,r)}},VC=(e,t)=>{let n=e;const r=t.split(Ld),a=r.length;for(let s=0;s<a;s++){const l=r[s];let d=n.nextPart.get(l);d||(d=HC(),n.nextPart.set(l,d)),n=d}return n},XD=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,QD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(s,l)=>{n[s]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return a(s,l),l},set(s,l){s in n?n[s]=l:a(s,l)}}},kg="!",RS=":",JD=[],AS=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),eI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const s=[];let l=0,d=0,u=0,m;const g=a.length;for(let S=0;S<g;S++){const E=a[S];if(l===0&&d===0){if(E===RS){s.push(a.slice(u,S)),u=S+1;continue}if(E==="/"){m=S;continue}}E==="["?l++:E==="]"?l--:E==="("?d++:E===")"&&d--}const p=s.length===0?a:a.slice(u);let v=p,y=!1;p.endsWith(kg)?(v=p.slice(0,-1),y=!0):p.startsWith(kg)&&(v=p.slice(1),y=!0);const _=m&&m>u?m-u:void 0;return AS(s,y,v,_)};if(t){const a=t+RS,s=r;r=l=>l.startsWith(a)?s(l.slice(a.length)):AS(JD,!1,l,void 0,!0)}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},tI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let s=0;s<n.length;s++){const l=n[s],d=l[0]==="[",u=t.has(l);d||u?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},nI=e=>({cache:QD(e.cacheSize),parseClassName:eI(e),sortModifiers:tI(e),postfixLookupClassGroupIds:rI(e),...VD(e)}),rI=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},iI=/\s+/,aI=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s,postfixLookupClassGroupIds:l}=t,d=[],u=e.trim().split(iI);let m="";for(let g=u.length-1;g>=0;g-=1){const p=u[g],{isExternal:v,modifiers:y,hasImportantModifier:_,baseClassName:S,maybePostfixModifierPosition:E}=n(p);if(v){m=p+(m.length>0?" "+m:m);continue}let k=!!E,C;if(k){const D=S.substring(0,E);C=r(D);const M=C&&l[C]?r(S):void 0;M&&M!==C&&(C=M,k=!1)}else C=r(S);if(!C){if(!k){m=p+(m.length>0?" "+m:m);continue}if(C=r(S),!C){m=p+(m.length>0?" "+m:m);continue}k=!1}const A=y.length===0?"":y.length===1?y[0]:s(y).join(":"),O=_?A+kg:A,L=O+C;if(d.indexOf(L)>-1)continue;d.push(L);const T=a(C,k);for(let D=0;D<T.length;++D){const M=T[D];d.push(O+M)}m=p+(m.length>0?" "+m:m)}return m},oI=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=FC(n))&&(a&&(a+=" "),a+=r);return a},FC=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=FC(e[r]))&&(n&&(n+=" "),n+=t);return n},sI=(e,...t)=>{let n,r,a,s;const l=u=>{const m=t.reduce((g,p)=>p(g),e());return n=nI(m),r=n.cache.get,a=n.cache.set,s=d,d(u)},d=u=>{const m=r(u);if(m)return m;const g=aI(u,n);return a(u,g),g};return s=l,(...u)=>s(oI(...u))},lI=[],kt=e=>{const t=n=>n[e]||lI;return t.isThemeGetter=!0,t},GC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cI=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vi=e=>cI.test(e),je=e=>!!e&&!Number.isNaN(Number(e)),pr=e=>!!e&&Number.isInteger(Number(e)),yp=e=>e.endsWith("%")&&je(e.slice(0,-1)),Kr=e=>uI.test(e),ZC=()=>!0,pI=e=>dI.test(e)&&!fI.test(e),Zb=()=>!1,gI=e=>hI.test(e),bI=e=>mI.test(e),vI=e=>!me(e)&&!pe(e),yI=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),xI=e=>na(e,KC,Zb),me=e=>GC.test(e),Aa=e=>na(e,XC,pI),TS=e=>na(e,AI,je),_I=e=>na(e,JC,ZC),SI=e=>na(e,QC,Zb),NS=e=>na(e,WC,Zb),wI=e=>na(e,YC,bI),Du=e=>na(e,ek,gI),pe=e=>qC.test(e),Sl=e=>Za(e,XC),EI=e=>Za(e,QC),jS=e=>Za(e,WC),CI=e=>Za(e,KC),kI=e=>Za(e,YC),Iu=e=>Za(e,ek,!0),RI=e=>Za(e,JC,!0),na=(e,t,n)=>{const r=GC.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Za=(e,t,n=!1)=>{const r=qC.exec(e);return r?r[1]?t(r[1]):n:!1},WC=e=>e==="position"||e==="percentage",YC=e=>e==="image"||e==="url",KC=e=>e==="length"||e==="size"||e==="bg-size",XC=e=>e==="length",AI=e=>e==="number",QC=e=>e==="family-name",JC=e=>e==="number"||e==="weight",ek=e=>e==="shadow",TI=()=>{const e=kt("color"),t=kt("font"),n=kt("text"),r=kt("font-weight"),a=kt("tracking"),s=kt("leading"),l=kt("breakpoint"),d=kt("container"),u=kt("spacing"),m=kt("radius"),g=kt("shadow"),p=kt("inset-shadow"),v=kt("text-shadow"),y=kt("drop-shadow"),_=kt("blur"),S=kt("perspective"),E=kt("aspect"),k=kt("ease"),C=kt("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...O(),pe,me],T=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],M=()=>[pe,me,u],B=()=>[Vi,"full","auto",...M()],Y=()=>[pr,"none","subgrid",pe,me],F=()=>["auto",{span:["full",pr,pe,me]},pr,pe,me],$=()=>[pr,"auto",pe,me],q=()=>["auto","min","max","fr",pe,me],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...M()],G=()=>[Vi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],ie=()=>[Vi,"screen","full","dvw","lvw","svw","min","max","fit",...M()],J=()=>[Vi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],Z=()=>[e,pe,me],P=()=>[...O(),jS,NS,{position:[pe,me]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",CI,xI,{size:[pe,me]}],de=()=>[yp,Sl,Aa],ce=()=>["","none","full",m,pe,me],fe=()=>["",je,Sl,Aa],ye=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>[je,yp,jS,NS],Ke=()=>["","none",_,pe,me],Be=()=>["none",je,pe,me],Ot=()=>["none",je,pe,me],Et=()=>[je,pe,me],nt=()=>[Vi,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kr],breakpoint:[Kr],color:[ZC],container:[Kr],"drop-shadow":[Kr],ease:["in","out","in-out"],font:[vI],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kr],shadow:[Kr],spacing:["px",je],text:[Kr],"text-shadow":[Kr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vi,me,pe,E]}],container:["container"],"container-type":[{"@container":["","normal","size",pe,me]}],"container-named":[yI],columns:[{columns:[je,me,pe,d]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[pr,"auto",pe,me]}],basis:[{basis:[Vi,"full","auto",d,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,Vi,"auto","initial","none",me]}],grow:[{grow:["",je,pe,me]}],shrink:[{shrink:["",je,pe,me]}],order:[{order:[pr,"first","last","none",pe,me]}],"grid-cols":[{"grid-cols":Y()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":Y()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...J()]}],"min-block-size":[{"min-block":["auto",...J()]}],"max-block-size":[{"max-block":["none",...J()]}],w:[{w:[d,"screen",...G()]}],"min-w":[{"min-w":[d,"screen","none",...G()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[l]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",n,Sl,Aa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,RI,_I]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yp,me]}],"font-family":[{font:[EI,SI,t]}],"font-features":[{"font-features":[me]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,pe,me]}],"line-clamp":[{"line-clamp":[je,"none",pe,TS]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",pe,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",pe,Aa]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[je,"auto",pe,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"tab-size":[{tab:[pr,pe,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pr,pe,me],radial:["",pe,me],conic:[pr,pe,me]},kI,wI]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:de()}],"gradient-via-pos":[{via:de()}],"gradient-to-pos":[{to:de()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-bs":[{"border-bs":Z()}],"border-color-be":[{"border-be":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,pe,me]}],"outline-w":[{outline:["",je,Sl,Aa]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",g,Iu,Du]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",p,Iu,Du]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[je,Aa]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",v,Iu,Du]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[je,pe,me]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[pe,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,me]}],filter:[{filter:["","none",pe,me]}],blur:[{blur:Ke()}],brightness:[{brightness:[je,pe,me]}],contrast:[{contrast:[je,pe,me]}],"drop-shadow":[{"drop-shadow":["","none",y,Iu,Du]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",je,pe,me]}],"hue-rotate":[{"hue-rotate":[je,pe,me]}],invert:[{invert:["",je,pe,me]}],saturate:[{saturate:[je,pe,me]}],sepia:[{sepia:["",je,pe,me]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,me]}],"backdrop-blur":[{"backdrop-blur":Ke()}],"backdrop-brightness":[{"backdrop-brightness":[je,pe,me]}],"backdrop-contrast":[{"backdrop-contrast":[je,pe,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,pe,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,pe,me]}],"backdrop-invert":[{"backdrop-invert":["",je,pe,me]}],"backdrop-opacity":[{"backdrop-opacity":[je,pe,me]}],"backdrop-saturate":[{"backdrop-saturate":[je,pe,me]}],"backdrop-sepia":[{"backdrop-sepia":["",je,pe,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",pe,me]}],ease:[{ease:["linear","initial",k,pe,me]}],delay:[{delay:[je,pe,me]}],animate:[{animate:["none",C,pe,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,pe,me]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Be()}],"rotate-x":[{"rotate-x":Be()}],"rotate-y":[{"rotate-y":Be()}],"rotate-z":[{"rotate-z":Be()}],scale:[{scale:Ot()}],"scale-x":[{"scale-x":Ot()}],"scale-y":[{"scale-y":Ot()}],"scale-z":[{"scale-z":Ot()}],"scale-3d":["scale-3d"],skew:[{skew:Et()}],"skew-x":[{"skew-x":Et()}],"skew-y":[{"skew-y":Et()}],transform:[{transform:[pe,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nt()}],"translate-x":[{"translate-x":nt()}],"translate-y":[{"translate-y":nt()}],"translate-z":[{"translate-z":nt()}],"translate-none":["translate-none"],zoom:[{zoom:[pr,pe,me]}],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":Z()}],"scrollbar-track-color":[{"scrollbar-track":Z()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe,me]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[je,Sl,Aa,TS]}],stroke:[{stroke:["none",...Z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},NI=sI(TI);function Se(...e){return NI(UC(e))}const ss=(e,t)=>`/repos/${e}/batches${t?`/${encodeURIComponent(t)}`:""}`,Rg=e=>`Batch ${e.replace(/^batch-/,"").slice(0,8)}`,tk=e=>new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}),jI={queued:"Queued",discovering:"Discovering",authoring:"Generating Tasks",exporting:"Exporting",complete:"Complete",blocked:"Blocked",failed:"Failed",cancelled:"Cancelled"};function nk({phase:e}){return h.jsx("span",{className:Se("inline-flex items-center gap-2 whitespace-nowrap text-xs before:size-1.5 before:shrink-0 before:bg-current",e==="failed"||e==="blocked"?"text-destructive":e==="complete"?"text-success":e==="cancelled"||!e?"text-muted-foreground":"text-brand"),children:e?jI[e]:"Loading Status…"})}function LI(e){if(e.error)return e.error;switch(e.phase){case"blocked":return"Discovery ended before finding enough candidates. This batch has stopped.";case"failed":return"This batch stopped before completing.";case"cancelled":return"This batch was cancelled. Any generated tasks remain in the dataset.";case"complete":return"Generation is complete. Review the generated tasks in your dataset.";case"discovering":return"Finding repository changes to turn into tasks.";case"authoring":return"Authoring and verifying the discovered tasks.";case"exporting":return"Preparing the generated tasks for export.";case"queued":return"Waiting for the generation worker."}}const rk="w-full min-w-0",ls="px-4 sm:px-6";function Fl({children:e,className:t,...n}){return h.jsx("main",{...n,className:Se("w-full min-w-0 flex-1 py-6",ls,t),children:h.jsx("div",{className:rk,children:e})})}function Ba({className:e,...t}){return h.jsx("section",{...t,className:Se("w-full min-w-0",e)})}function hi({title:e,description:t,children:n,className:r}){return h.jsxs("header",{className:Se("mb-6 flex min-w-0 flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",r),"data-slot":"page-header",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("h1",{className:"text-xl font-medium text-foreground",children:e}),t&&h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),n&&h.jsx("div",{className:"flex w-full max-w-full flex-wrap items-center gap-2 sm:w-auto sm:shrink-0","data-slot":"page-actions",children:n})]})}function gf({title:e,description:t,children:n}){return h.jsxs("header",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{className:"text-sm leading-6 font-medium text-foreground",children:e}),t&&h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t})]}),n]})}function Wb({items:e}){return h.jsx("nav",{"aria-label":"Breadcrumb",className:"mb-4 min-w-0",children:h.jsx("ol",{className:"flex min-w-0 items-center gap-2 text-xs text-muted-foreground",children:e.map((t,n)=>h.jsxs("li",{className:Se("flex min-w-0 items-center gap-2",n===e.length-1?"flex-1":"shrink-0"),children:[n>0&&h.jsx(SD,{className:"size-3 shrink-0","aria-hidden":"true"}),t.to?h.jsx($e,{to:t.to,className:"truncate hover:text-foreground",children:t.label}):h.jsx("span",{className:"truncate","aria-current":"page",children:t.label})]},t.to??t.label))})})}function wr({title:e,children:t,action:n,className:r}){return h.jsxs("div",{className:Se("flex flex-col gap-4 border border-border bg-card p-4 text-left",r),children:[h.jsxs("div",{className:"space-y-1",children:[h.jsx("h3",{className:"text-sm font-medium text-foreground",children:e}),t&&h.jsx("div",{className:"max-w-2xl text-sm text-muted-foreground",children:t})]}),n&&h.jsx("div",{className:"flex flex-wrap gap-2",children:n})]})}function ft({tone:e="error",className:t,children:n,...r}){return h.jsx("div",{role:e==="error"?"alert":"status",...r,className:Se("flex min-w-0 flex-wrap items-center justify-between gap-3 border px-4 py-3 text-sm leading-6",e==="error"?"border-destructive/30 bg-destructive/5 text-destructive":e==="success"?"border-success/30 bg-success/5 text-success":"border-border bg-muted/30 text-muted-foreground",t),children:n})}const Mu="inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-brand disabled:pointer-events-none disabled:opacity-50 [&>svg]:shrink-0",Al={primary:Se(Mu,"border border-primary bg-primary text-primary-foreground hover:bg-primary/90"),secondary:Se(Mu,"border border-border bg-transparent text-foreground hover:bg-accent"),ghost:Se(Mu,"bg-transparent text-foreground hover:bg-accent"),destructive:Se(Mu,"border border-destructive-background bg-destructive-background text-destructive-foreground hover:bg-destructive-background/90")},Pu="h-9 gap-2 px-3 py-2 [&>svg]:size-4 [&>svg]:shrink-0",ra={primary:Se(Al.primary,Pu),secondary:Se(Al.secondary,Pu),ghost:Se(Al.ghost,Pu),destructive:Se(Al.destructive,Pu)};function be({variant:e="secondary",size:t="default",className:n,type:r="button",...a}){return h.jsx("button",{type:r,...a,className:Se(Al[e],t==="default"&&"h-9 px-3 py-2",t==="small"&&"h-8 px-3 text-xs",t==="icon"&&"h-9 w-9",n)})}const qn="grid min-w-0 gap-2 text-sm font-medium text-foreground",ik="h-9 w-full min-w-0 rounded-none border border-input bg-background px-3 text-base text-foreground placeholder:text-muted-foreground transition-colors hover:border-foreground/30 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand disabled:cursor-not-allowed disabled:opacity-40 md:text-sm";function Nn({className:e,...t}){return h.jsx("input",{...t,className:Se(ik,e)})}function Yb({className:e,...t}){return h.jsxs("span",{className:Se("relative block min-w-0",e),children:[h.jsx(ID,{className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),h.jsx(Nn,{type:"search",...t,className:"pl-9"})]})}function Qt({className:e,...t}){return h.jsxs("span",{className:"relative block min-w-0",children:[h.jsx("select",{...t,className:Se(ik,"appearance-none pr-9",e)}),h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 12 12",className:"pointer-events-none absolute top-1/2 right-3 size-3 -translate-y-1/2 fill-none stroke-muted-foreground",strokeWidth:"1.25",children:h.jsx("path",{d:"m3 4.5 3 3 3-3"})})]})}function bf({className:e,...t}){return h.jsx("section",{className:"min-w-0 overflow-x-auto border border-border bg-card","aria-label":"Scrollable Table",tabIndex:0,children:h.jsx("table",{...t,className:Se("w-full border-collapse text-left text-sm [&_thead]:bg-muted/50 [&_th]:px-4 [&_th]:py-3 [&_th]:text-xs [&_th]:font-medium [&_th]:tracking-wider [&_th]:whitespace-nowrap [&_th]:text-muted-foreground [&_th]:uppercase [&_td]:border-t [&_td]:border-border [&_td]:px-4 [&_td]:py-3 [&_td]:align-middle [&_tbody_tr]:transition-colors [&_tbody_tr:hover]:bg-muted/50 [&_small]:mt-1 [&_small]:block [&_small]:text-xs [&_small]:text-muted-foreground",e)})})}function Ag({value:e}){const t=e==="completed"?"text-success":e==="failed"?"text-destructive":e==="running"?"text-brand":"text-muted-foreground";return h.jsx("span",{className:Se("inline-flex items-center gap-1.5 text-xs uppercase before:size-1 before:bg-current",t),children:e})}function ak(e){const t=R.useRef(null);return R.useEffect(()=>{const n=t.current,r=document.activeElement,a=document.body.style.overflow;return n?.showModal(),document.body.style.overflow="hidden",e.current?.focus(),()=>{n?.close(),document.body.style.overflow=a,r instanceof HTMLElement&&r.isConnected&&r.focus()}},[e]),t}const OI={small:"max-w-md",medium:"max-w-lg",large:"max-w-xl",wide:"max-w-5xl"};function mi({initialFocus:e,onDismiss:t,busy:n=!1,size:r="medium",placement:a="center",className:s,...l}){const d=ak(e);return h.jsx("dialog",{...l,ref:d,"aria-busy":n,onCancel:u=>{u.preventDefault(),n||t()},onPointerDown:u=>{if(n||u.target!==u.currentTarget)return;const m=u.currentTarget.getBoundingClientRect();(u.clientX<m.left||u.clientX>m.right||u.clientY<m.top||u.clientY>m.bottom)&&t()},className:Se("fixed inset-0 w-[calc(100%_-_2rem)] overflow-y-auto border border-input bg-card p-0 text-foreground backdrop:bg-black/70",a==="center"?"m-auto max-h-[calc(100dvh_-_2rem)]":"my-0 mr-0 ml-auto h-dvh max-h-none w-full border-y-0 border-r-0",OI[r],s)})}function pi({title:e,description:t,titleId:n,descriptionId:r,onClose:a,closeRef:s,busy:l}){return h.jsxs("header",{className:"flex items-start justify-between gap-4 border-b border-border p-4 sm:px-6 sm:py-5",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:n,className:"text-base leading-6 font-medium",children:e}),t&&h.jsx("p",{id:r,className:"mt-1 break-words text-sm leading-6 text-muted-foreground",children:t})]}),h.jsx(be,{ref:s,size:"icon",variant:"ghost","aria-label":"Close",title:"Close",disabled:l,onClick:a,children:h.jsx(Gb,{"aria-hidden":"true"})})]})}function gs({className:e,...t}){return h.jsx("div",{...t,className:Se("space-y-4 p-4 sm:p-6",e)})}function gi({className:e,...t}){return h.jsx("footer",{...t,className:Se("flex flex-wrap items-center justify-end gap-2 border-t border-border bg-muted/30 p-4 sm:px-6",e)})}const ok=["docker","modal","vercel","e2b"],bd={docker:"Docker",modal:"Modal",vercel:"Vercel",e2b:"E2B"},sk=["docker","modal","vercel","e2b","daytona"],Tg={docker:"Docker",modal:"Modal",vercel:"Vercel",e2b:"E2B",daytona:"Daytona"},DI=["modal","vercel","e2b"],lk=["modal","vercel","e2b","daytona"];new Set(ok);new Set(sk);function ck({value:e,onChange:t,options:n,disabled:r}){const a=e.sandbox==="e2b"||e.sandbox==="vercel",s=[{field:"sandboxCredentialId",kind:e.sandbox,label:`${bd[e.sandbox]} Credential`}];return a&&e.harborEnvironment&&s.push({field:"harborCredentialId",kind:e.harborEnvironment,label:`Harbor ${Tg[e.harborEnvironment]} Credential`}),h.jsxs("fieldset",{disabled:r,className:"grid min-w-0 gap-6 border-0 p-0 sm:grid-cols-2",children:[!n?.available&&h.jsx("p",{role:"alert",className:"text-sm text-destructive sm:col-span-2",children:"Generation credentials are not available. Configure credential storage before generating tasks."}),["authorModel","verifierModel"].map(l=>h.jsxs("label",{htmlFor:`generation-${l}`,className:"grid gap-2 font-mono text-[13px] text-muted-foreground",children:[l==="authorModel"?"Author Model":"Verifier Model",h.jsx(Qt,{id:`generation-${l}`,"aria-label":l==="authorModel"?"Author Model":"Verifier Model",value:e[l],onChange:d=>t({...e,[l]:d.target.value}),children:n?.models.map(d=>h.jsx("option",{value:d,children:d},d))})]},l)),h.jsxs("label",{htmlFor:"generation-reasoning",className:"grid gap-2 font-mono text-[13px] text-muted-foreground",children:["Reasoning",h.jsxs(Qt,{id:"generation-reasoning","aria-label":"Reasoning",value:e.reasoning,onChange:l=>t({...e,reasoning:l.target.value}),children:[h.jsx("option",{value:"low",children:"Low"}),h.jsx("option",{value:"medium",children:"Medium"}),h.jsx("option",{value:"high",children:"High"})]})]}),h.jsxs("label",{htmlFor:"generation-sandbox",className:"grid gap-2 font-mono text-[13px] text-muted-foreground",children:["Sandbox",h.jsx(Qt,{id:"generation-sandbox","aria-label":"Sandbox",value:e.sandbox,onChange:l=>{const d=l.target.value;t({...e,sandbox:d,sandboxCredentialId:void 0,sandboxImage:void 0,harborEnvironment:d==="e2b"||d==="vercel"?d:void 0,harborCredentialId:void 0})},children:n?.sandboxes.map(l=>h.jsx("option",{value:l,children:bd[l]},l))})]}),h.jsxs("label",{htmlFor:"generation-model-key",className:"grid gap-2 font-mono text-[13px] text-muted-foreground",children:["OpenAI Credential",h.jsxs(Qt,{id:"generation-model-key","aria-label":"OpenAI Credential",value:e.modelCredentialId,onChange:l=>t({...e,modelCredentialId:l.target.value}),children:[h.jsx("option",{value:"",children:"Choose an API Key"}),n?.credentials.filter(l=>l.kind==="openai"&&["api-key","codex-login"].includes(l.auth)).map(l=>h.jsx("option",{value:l.id,children:l.name},l.id))]})]}),a&&h.jsxs(h.Fragment,{children:[h.jsxs("label",{className:"grid gap-2 font-mono text-[13px] text-muted-foreground",htmlFor:"generation-image",children:[e.sandbox==="e2b"?"E2B Template":"Vercel Runtime Image",h.jsx(Nn,{id:"generation-image",required:!0,value:e.sandboxImage??"",onChange:l=>t({...e,sandboxImage:l.target.value}),placeholder:e.sandbox==="e2b"?"Template Name or ID":"registry/image@sha256:…"}),h.jsx("span",{className:"text-xs leading-5",children:e.sandbox==="e2b"?"Use a SelfBench template built with self-bench setup e2b, not the base template.":"Use the digest-pinned image from self-bench setup vercel."})]}),h.jsxs("label",{className:"grid gap-2 font-mono text-[13px] text-muted-foreground",htmlFor:"generation-harbor",children:["Harbor Verification",h.jsxs(Qt,{id:"generation-harbor","aria-label":"Harbor Verification",value:e.harborEnvironment??"",onChange:l=>t({...e,harborEnvironment:l.target.value,harborCredentialId:void 0}),children:[h.jsx("option",{value:"",children:"Choose an Environment"}),lk.map(l=>h.jsx("option",{value:l,children:Tg[l]},l))]}),h.jsxs("span",{className:"text-xs leading-5",children:["Generation runs in ",bd[e.sandbox],"; Harbor verification runs in your Modal, Vercel, E2B, or Daytona account."]})]})]}),s.map(({field:l,kind:d,label:u})=>h.jsxs("label",{htmlFor:`generation-${l}`,className:"grid gap-2 font-mono text-[13px] text-muted-foreground",children:[u,h.jsxs(Qt,{id:`generation-${l}`,"aria-label":u,value:e[l]??"",onChange:m=>t({...e,[l]:m.target.value}),children:[h.jsx("option",{value:"",children:"Choose a Credential"}),e[l]&&!n?.credentials.some(m=>m.id===e[l]&&m.kind===d)&&h.jsx("option",{value:e[l],children:"Unavailable Credential"}),n?.credentials.filter(m=>m.kind===d&&m.auth==="api-key").map(m=>h.jsx("option",{value:m.id,children:m.name},m.id))]})]},l)),h.jsxs("div",{className:"font-mono text-[13px] leading-6 text-muted-foreground sm:col-span-2",children:[h.jsx($e,{className:"text-brand hover:text-brand",to:"/settings/credentials",target:"_blank",rel:"noopener noreferrer",children:"Manage Credentials"}),h.jsx("p",{className:"mt-3",children:"Each PR starts a separate workflow. Model and sandbox usage may incur charges."})]})]})}function uk({step:e,firstStep:t}){return h.jsx("ol",{"aria-label":"Generation Steps",className:"mx-4 mb-6 flex gap-6 border-b border-border py-4 text-xs sm:mx-6",children:[t,"Configure Generation"].map((n,r)=>h.jsxs("li",{className:e===r+1?"text-brand":"text-muted-foreground","aria-current":e===r+1?"step":void 0,children:[r+1,". ",n]},n))})}function dk(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function LS(e,t="|"){return e.map(n=>mk(n)).join(t)}function Ng(e,t){return typeof t=="bigint"?t.toString():t}function Kb(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function II(e){return e==null}function Xb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function MI(e,t){const n=e/t,r=Math.round(n),a=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<a?0:n-r}function Ln(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ia(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function PI(e){return JSON.stringify(e)}function zI(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const fk="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Od(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const $I=Kb(()=>{if(Cr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Gl(e){if(Od(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Od(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function hk(e){return Gl(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const UI=new Set(["string","number","symbol"]);function vf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function aa(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function _e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function mk(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function HI(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const BI={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function VI(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=ia(e._zod.def,{get shape(){const l={};for(const d of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,d))throw new Error(`Unrecognized key: "${String(d)}"`);t[d]&&Ln(l,d,n.shape[d])}return Ln(this,"shape",l),l},checks:[]});return aa(e,s)}function FI(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=ia(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const d of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,d))throw new Error(`Unrecognized key: "${String(d)}"`);t[d]&&delete l[d]}return Ln(this,"shape",l),l},checks:[]});return aa(e,s)}function GI(e,t){if(!Gl(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const l of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(s,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=ia(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Ln(this,"shape",s),s}});return aa(e,a)}function qI(e,t){if(!Gl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ia(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ln(this,"shape",r),r}});return aa(e,n)}function ZI(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.");const n=ia(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ln(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return aa(e,n)}function OS(e,t,n,r="partial"){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const d=ia(t._zod.def,{get shape(){const u=t._zod.def.shape,m={...u};if(n)for(const g of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(u,g))throw new Error(`Unrecognized key: "${String(g)}"`);n[g]&&(m[g]=e?new e({type:"optional",innerType:u[g]}):u[g])}else for(const g of Reflect.ownKeys(u))m[g]=e?new e({type:"optional",innerType:u[g]}):u[g];return Ln(this,"shape",m),m},checks:[]});return aa(t,d)}function WI(e,t,n){const r=ia(t._zod.def,{get shape(){const a=t._zod.def.shape,s={...a};if(n)for(const l of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(s,l))throw new Error(`Unrecognized key: "${String(l)}"`);n[l]&&(s[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l of Reflect.ownKeys(a))s[l]=new e({type:"nonoptional",innerType:a[l]});return Ln(this,"shape",s),s}});return aa(t,r)}function Jo(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function YI(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function pk(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function wl(e){return typeof e=="string"?e:e?.message}function DS(e,t,n){var r;for(let a=t;a<e.length;a++)(r=e[a]).schema??(r.schema=n)}function bs(e,t,n){var r;const a=e.inst?._zod?.traits;a?.has("$ZodType")&&(a.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const s=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,l=e.message?e.message:wl(e.inst?._zod.def?.error?.(e))??wl(s?.(e))??wl(t?.error?.(e))??wl(n.customError?.(e))??wl(n.localeError?.(e))??"Invalid input",{inst:d,schema:u,continue:m,input:g,...p}=e;return p.path??(p.path=[]),p.message=l,t?.reportInput&&(p.input=g),p}const KI=/[\uD800-\uDBFF]/;function Qb(e){const t=e.length;if(!KI.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function Jb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function XI(e){const 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";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function ql(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function QI(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):JI(e,n,r.value)}}function cs(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function gk(e,t,n){return cs(e,t,n,!1)}function JI(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:cs(this,t,n.bind(this))},set(r){cs(this,t,r)}})}function eM(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let xp,Gi=!1;const tM={configurable:!0,get(){Gi=!0}};function Ye(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&xp!==e._zod){xp=void 0;return}xp=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,tM);const a=Gi;Gi=!1;try{const s=n(this);return Gi?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),Gi=Gi||a,s}catch(s){throw delete this[t],Gi=Gi||a,s}},set(a){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:a})}})}function nM(e,t,n,r){const a=eM(e,t);a&&Object.defineProperty(a,t,{configurable:!0,get(){const s={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,s),s.value=n(this),Object.defineProperty(this,t,s),s.value},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:s})}})}const rM="~constantCatch";function iM(e){const t=()=>e;return t[rM]=!0,t}var IS;const _p={value:void 0,enumerable:!1};let MS="captureStackTrace"in Error?Error:null;function aM(e){const t=MS;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return MS=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function ae(e,t,n,r){const a={};function s(v){this.def=v,this.constr=p,this.traits=new Set}s.prototype=a;const l=n,d=l&&new WeakSet;function u(v,y){if(!v._zod){_p.value=new s(y);try{Object.defineProperty(v,"_zod",_p)}finally{_p.value=void 0}}if(v._zod.traits.has(e))return;if(v._zod.traits.add(e),t(v,y),d){const S=Object.getPrototypeOf(v),E=v._zod.constr.prototype;let k=S;for(;k&&k!==E;)k=Object.getPrototypeOf(k);const C=k??S;d.has(C)||(d.add(C),QI(C,l))}const _=p.prototype;for(const S in _)Object.prototype.hasOwnProperty.call(_,S)&&(S in v||(v[S]=_[S].bind(v)))}const m=r?.Parent??Object;class g extends m{}Object.defineProperty(g,"name",{value:e});function p(v){const y=r?.Parent?aM(g):this;u(y,v);const _=y._zod.deferred;if(_){for(const E of _)E();y._zod.deferred=void 0}const S=globalThis.__zod_globalConfig?.postProcessor;return S&&S(y),y}return Object.defineProperty(p,"init",{value:u}),Object.defineProperty(p,Symbol.hasInstance,{value:v=>r?.Parent&&v instanceof r.Parent?!0:v?._zod?.traits?.has(e)}),Object.defineProperty(p,"name",{value:e}),p}class ts extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class bk extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(IS=globalThis).__zod_globalConfig??(IS.__zod_globalConfig={});const Cr=globalThis.__zod_globalConfig;function oa(e){return e&&Object.assign(Cr,e),Cr}function oM(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ng,2)),e.message}function sM(e){this._zod.message=e}const lM={get:oM,set:sM,enumerable:!0,configurable:!0},Sp={value:void 0,enumerable:!1},wp={value:void 0,enumerable:!1},PS=new WeakSet([Object.prototype,Error.prototype]),vk=(e,t)=>{e.name="$ZodError",Sp.value=e._zod,Object.defineProperty(e,"_zod",Sp),wp.value=t,Object.defineProperty(e,"issues",wp),Sp.value=void 0,wp.value=void 0,Object.defineProperty(e,"message",lM);const n=Object.getPrototypeOf(e);PS.has(n)||(PS.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},yk=ae("$ZodError",vk),xk=ae("$ZodError",vk,void 0,{Parent:Error});function cM(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function uM(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?cM(n,a.path[0],()=>[]).push(t(a)):r.push(t(a));return{formErrors:r,fieldErrors:n}}function dM(e,t=n=>n.message){const n={_errors:[]},r=(a,s=[])=>{for(const l of a.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(d=>r({issues:d},[...s,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...s,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...s,...l.path]);else{const d=[...s,...l.path];if(d.length===0)n._errors.push(t(l));else{let u=n,m=0;for(;m<d.length;){const g=d[m],p=m===d.length-1;if(g==="_errors"){p&&u._errors.push(t(l)),m++;continue}Object.prototype.hasOwnProperty.call(u,g)||Object.defineProperty(u,g,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const v=u[g];p&&v._errors.push(t(l)),u=v,m++}}}};return r(e),n}function yf(e,t){return{callee:t?.callee??e,Err:t?.Err}}const ev=e=>{const t=(n,r,a,s)=>{const l=a?{...a,async:!1}:{async:!1},d=n._zod.run({value:r,issues:[]},l);if(d instanceof Promise)throw new ts;if(d.issues.length){const u=new(s?.Err??e)(d.issues.map(m=>bs(m,l,oa())));throw fk(u,s?.callee??t),u}return d.value};return t},tv=e=>{const t=async(n,r,a,s)=>{const l=a?{...a,async:!0}:{async:!0};let d=n._zod.run({value:r,issues:[]},l);if(d instanceof Promise&&(d=await d),d.issues.length){const u=new(s?.Err??e)(d.issues.map(m=>bs(m,l,oa())));throw fk(u,s?.callee??t),u}return d.value};return t},xf=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new ts;return s.issues.length?{success:!1,error:new(e??yk)(s.issues.map(l=>bs(l,a,oa())))}:{success:!0,data:s.value}},fM=xf(xk),_f=e=>async(t,n,r)=>{const a=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},a);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>bs(l,a,oa())))}:{success:!0,data:s.value}},hM=_f(xk),mM=e=>{const t=ev(e),n=(r,a,s,l)=>{const d=s?{...s,direction:"backward"}:{direction:"backward"};return t(r,a,d,yf(n,l))};return n},pM=e=>{const t=ev(e),n=(r,a,s,l)=>t(r,a,s,yf(n,l));return n},gM=e=>{const t=tv(e),n=async(r,a,s,l)=>{const d=s?{...s,direction:"backward"}:{direction:"backward"};return await t(r,a,d,yf(n,l))};return n},bM=e=>{const t=tv(e),n=async(r,a,s,l)=>await t(r,a,s,yf(n,l));return n},vM=e=>(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return xf(e)(t,n,a)},yM=e=>(t,n,r)=>xf(e)(t,n,r),xM=e=>async(t,n,r)=>{const a=r?{...r,direction:"backward"}:{direction:"backward"};return _f(e)(t,n,a)},_M=e=>async(t,n,r)=>_f(e)(t,n,r),SM=/^[cC][0-9a-z]{6,}$/,wM=/^[0-9a-z]+$/,EM=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,CM=/^[0-9a-vA-V]{20}$/,kM=/^[A-Za-z0-9]{27}$/,RM=/^[a-zA-Z0-9_-]{21}$/;function AM(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const TM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,NM=/^([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})$/,zS=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)$/,jM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,LM="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function OM(){return new RegExp(LM,"u")}const DM=/^(?:(?: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])$/,IM=/^(([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}|:))$/,MM=/^((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])$/,PM=/^(([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])$/,zM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_k=/^[A-Za-z0-9_-]*$/,$M=/^https?$/,UM=/^\+[1-9]\d{6,14}$/,Sk="(?:(?:\\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 HM(e){return new RegExp(`^${e}$`)}const BM=HM(Sk);function jg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function VM(e){return new RegExp(`^${jg(e)}$`)}function FM(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${jg({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${jg({precision:e.precision})}`:n;return new RegExp(`^${Sk}T(?:${r})$`)}const GM=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},qM=/^-?\d+$/,ZM=/^-?\d+(?:\.\d+)?$/,WM=/^(?:true|false)$/i,YM=/^[^A-Z]*$/,KM=/^[^a-z]*$/,gn=ae("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nv=e=>{const t=e.value;return!II(t)&&t.length!==void 0},Dd={number:"number",bigint:"bigint",object:"date"},wk=ae("$ZodCheckLessThan",(e,t)=>{gn.init(e,t);const n=Dd[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,s=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Dd[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ek=ae("$ZodCheckGreaterThan",(e,t)=>{gn.init(e,t);const n=Dd[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,s=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Dd[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),XM=ae("$ZodCheckMultipleOf",(e,t)=>{gn.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):MI(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),QM=ae("$ZodCheckNumberFormat",(e,t)=>{gn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[a,s]=BI[t.format];e._zod.onattach.push(l=>{const d=l._zod.bag;d.format=t.format,d.minimum=a,d.maximum=s,n&&(d.pattern=qM)}),e._zod.check=l=>{const d=l.value;if(n){if(!Number.isInteger(d)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:d,inst:e});return}if(!Number.isSafeInteger(d)){d>0?l.issues.push({input:d,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:d,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}d<a&&l.issues.push({origin:"number",input:d,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),d>s&&l.issues.push({origin:"number",input:d,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),JM=ae("$ZodCheckMaxLength",(e,t)=>{var n;gn.init(e,t),(n=e._zod.def).when??(n.when=nv),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value,s=a.length;if((typeof a=="string"&&s>t.maximum?Qb(a):s)<=t.maximum)return;const d=Jb(a);r.issues.push({origin:d,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),eP=ae("$ZodCheckMinLength",(e,t)=>{var n;gn.init(e,t),(n=e._zod.def).when??(n.when=nv),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value,s=a.length;if((typeof a=="string"&&s>=t.minimum&&s<t.minimum*2?Qb(a):s)>=t.minimum)return;const d=Jb(a);r.issues.push({origin:d,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),tP=ae("$ZodCheckLengthEquals",(e,t)=>{var n;gn.init(e,t),(n=e._zod.def).when??(n.when=nv),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,s=a.length,l=typeof a=="string"&&s>=t.length&&s<=t.length*2?Qb(a):s;if(l===t.length)return;const d=Jb(a),u=l>t.length;r.issues.push({origin:d,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Sf=ae("$ZodCheckStringFormat",(e,t)=>{var n,r;gn.init(e,t),e._zod.onattach.push(a=>{const s=a._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),nP=ae("$ZodCheckRegex",(e,t)=>{Sf.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rP=ae("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=YM),Sf.init(e,t)}),iP=ae("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=KM),Sf.init(e,t)}),aP=ae("$ZodCheckIncludes",(e,t)=>{gn.init(e,t);const n=vf(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const s=a._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),oP=ae("$ZodCheckStartsWith",(e,t)=>{gn.init(e,t);const n=new RegExp(`^${vf(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),sP=ae("$ZodCheckEndsWith",(e,t)=>{gn.init(e,t);const n=new RegExp(`.*${vf(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),lP=ae("$ZodCheckOverwrite",(e,t)=>{gn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class cP{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
13
|
+
`).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),s=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of s)this.content.push(l)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
14
|
+
${n.join(`
|
|
15
|
+
`)}
|
|
16
|
+
};`)(...Object.values(this.closed))}}const uP={major:4,minor:5,patch:4},gt=ae("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=uP;const r=e._zod.def.checks,a=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const s of a)for(const l of s._zod.onattach)l(e);if(a.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(d,u,m)=>{if(d.memo)return d;let g=Jo(d),p;for(const v of u){if(v._zod.def.when){if(YI(d)||!v._zod.def.when(d))continue}else if(g)continue;const y=d.issues.length,_=v._zod.check(d);if(_ instanceof Promise&&m?.async===!1)throw new ts;if(p||_ instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await _,d.issues.length!==y&&(DS(d.issues,y,e),g||(g=Jo(d,y)))});else{if(d.issues.length===y)continue;DS(d.issues,y,e),g||(g=Jo(d,y))}}return p?p.then(()=>d):d},l=(d,u,m)=>{if(Jo(d))return d.aborted=!0,d;const g=s(u,a,m);if(g instanceof Promise){if(m.async===!1)throw new ts;return g.then(p=>e._zod.parse(p,m))}return e._zod.parse(g,m)};e._zod.run=(d,u)=>{if(u.skipChecks)return e._zod.parse(d,u);if(u.direction==="backward"){const g=e._zod.parse({value:d.value,issues:[]},{...u,skipChecks:!0});return g instanceof Promise?g.then(p=>l(p,d,u)):l(g,d,u)}const m=e._zod.parse(d,u);if(m instanceof Promise){if(u.async===!1)throw new ts;return m.then(g=>s(g,a,u))}return s(m,a,u)}}},{get"~standard"(){return gk(this,"~standard",Ck(this))},set"~standard"(e){cs(this,"~standard",e)}}),$S=e=>e.success?{value:e.data}:{issues:e.error?.issues};function Ck(e){return{validate:t=>{try{return $S(fM(e,t))}catch{return hM(e,t).then($S)}},vendor:"zod",version:1}}const rv=ae("$ZodString",(e,t)=>{gt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??GM(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),lt=ae("$ZodStringFormat",(e,t)=>{Sf.init(e,t),rv.init(e,t)}),dP=ae("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=NM),lt.init(e,t)}),fP=ae("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=zS(r))}else t.pattern??(t.pattern=zS());lt.init(e,t)}),hP=ae("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=jM),lt.init(e,t)}),kk=1,Rk=2;function mP(e,t){if(!t.normalize&&t.protocol?.source===$M.source&&!/^https?:\/\//i.test(e))return kk;try{return new URL(e)}catch{return Rk}}const pP=/[\t\n\r]/g;function gP(e){return e.replace(pP,"")}function bP(e,t){return t.lastIndex=0,t.test(e.hostname)}function vP(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const yP=ae("$ZodURL",(e,t)=>{lt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),a=mP(r,t);if(a===kk){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(a===Rk){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!bP(a,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!vP(a,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?a.href:gP(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),xP=ae("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=OM()),lt.init(e,t)}),_P=ae("$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?RM:AM(t.length)),lt.init(e,t)}),SP=ae("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=SM),lt.init(e,t)}),wP=ae("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=wM),lt.init(e,t)}),EP=ae("$ZodULID",(e,t)=>{t.pattern??(t.pattern=EM),lt.init(e,t)}),CP=ae("$ZodXID",(e,t)=>{t.pattern??(t.pattern=CM),lt.init(e,t)}),kP=ae("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=kM),lt.init(e,t)}),RP=ae("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=FM(t)),lt.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(n=>{n._zod.bag.laxFormat=!0}))}),AP=ae("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=BM),lt.init(e,t)}),TP=ae("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=VM(t)),lt.init(e,t)}),NP=ae("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=TM),lt.init(e,t)}),jP=ae("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=DM),lt.init(e,t),e._zod.bag.format="ipv4"}),LP=/^[0-9a-fA-F:.]+$/;function Ak(e){if(!LP.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}const OP=ae("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=IM),lt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{Ak(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),DP=ae("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=MM),lt.init(e,t)});function IP(e){const t=e.split("/");if(t.length!==2)return!1;const[n,r]=t;if(!r)return!1;const a=Number(r);return`${a}`!==r||a<0||a>128?!1:Ak(n)}const MP=ae("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=PM),lt.init(e,t),e._zod.check=n=>{IP(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function Tk(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const PP=ae("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=zM),lt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Tk(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function zP(e){if(!_k.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Tk(n)}const $P=ae("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=_k),lt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{zP(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),UP=ae("$ZodE164",(e,t)=>{t.pattern??(t.pattern=UM),lt.init(e,t)});function HP(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const BP=ae("$ZodJWT",(e,t)=>{lt.init(e,t),e._zod.check=n=>{HP(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Nk=ae("$ZodNumber",(e,t)=>{gt.init(e,t),e._zod.pattern=e._zod.bag.pattern??ZM,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const a=n.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return n;const s=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:String(a):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...s?{received:s}:{}}),n}}),VP=ae("$ZodNumberFormat",(e,t)=>{QM.init(e,t),Nk.init(e,t)}),FP=ae("$ZodBoolean",(e,t)=>{gt.init(e,t),e._zod.pattern=WM,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),GP=ae("$ZodUnknown",(e,t)=>{gt.init(e,t),e._zod.parse=n=>n}),qP=ae("$ZodNever",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function US(e,t,n){e.issues.length&&t.issues.push(...pk(n,e.issues)),t.value[n]=e.value}const ZP=ae("$ZodArray",(e,t)=>{gt.init(e,t);const n=Cr.memoizer;n?.attach(e),e._zod.parse=(r,a)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=n?n.alloc(e,r,Array(s.length),a):Array(s.length);const l=[];for(let d=0;d<s.length;d++){const u=s[d],m=t.element._zod.run({value:u,issues:[]},a);m instanceof Promise?l.push(m.then(g=>US(g,r,d))):US(m,r,d)}return l.length?Promise.all(l).then(()=>r):r}});function Id(e,t,n,r,a,s){const l=n in r,d=s==="optional";if(!(!l&&d&&a==="optional")){if(e.issues.length){if(a!==void 0&&d&&!l)return;t.issues.push(...pk(n,e.issues))}if(!l&&a===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?l&&(t.value[n]=void 0):t.value[n]=e.value}}const WP=[];function jk(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:WP,a=r.length?[...t,...r]:t;for(const l of a)if(!e.shape?.[l]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(l)}": expected a Zod schema`);const s=HI(e.shape);return{...e,allKeys:a,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(s)}}function Lk(e,t,n,r,a,s){const l=[],d=a.keySet,u=a.catchall._zod,m=u.def.type,g=u.optin,p=u.optout;for(const v in t){if(d.has(v))continue;if(v==="__proto__"){m==="never"&&l.push(v);continue}if(m==="never"){l.push(v);continue}const y=u.run({value:t[v],issues:[]},r);y instanceof Promise?e.push(y.then(_=>Id(_,n,v,t,g,p))):Id(y,n,v,t,g,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:s,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const HS=new WeakMap,YP=ae("$ZodObject",(e,t)=>{if(gt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const u=t.shape;HS.set(t,u),Object.defineProperty(t,"shape",{get:()=>{const m={...u};return Object.defineProperty(t,"shape",{value:m}),HS.set(t,m),m}})}const r=Kb(()=>jk(t));Ye(e,"propValues",u=>{const m=u.def.shape,g={};for(const p in m){const v=m[p]._zod;if(v.values){Object.prototype.hasOwnProperty.call(g,p)||Ln(g,p,new Set);for(const y of v.values)g[p].add(y);v.optin!==void 0&&g[p].add(void 0)}}return g});const a=Od,s=t.catchall;let l;const d=Cr.memoizer;d?.attach(e),e._zod.parse=(u,m)=>{l??(l=r.value);const g=u.value;if(!a(g))return u.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),u;u.value=d?d.alloc(e,u,{},m):{};const p=[],v=l.shape;for(const y of l.allKeys){if(y==="__proto__")continue;const _=v[y],S=_._zod.optin,E=_._zod.optout,k=_._zod.run({value:g[y],issues:[]},m);k instanceof Promise?p.push(k.then(C=>Id(C,u,y,g,S,E))):Id(k,u,y,g,S,E)}return s?Lk(p,g,u,m,r.value,e):p.length?Promise.all(p).then(()=>u):u}}),KP=ae("$ZodObjectJIT",(e,t)=>{YP.init(e,t);const n=e._zod.parse,r=Kb(()=>jk(t)),a=Cr.memoizer,s=y=>{const _=r.value,S=_.symbolKeys,E=new cP(["payload","ctx"],{shape:y,inst:e,memo:a,syms:S}),k=L=>`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`,C=(L,T)=>`
|
|
17
|
+
for (let i = 0; i < ${L}.issues.length; i++) {
|
|
18
|
+
const iss = ${L}.issues[i];
|
|
19
|
+
iss.path = iss.path ? [${T}, ...iss.path] : [${T}];
|
|
20
|
+
payload.issues.push(iss);
|
|
21
|
+
}`;E.write("const input = payload.value;");const A=Object.create(null);let O=0;for(const L of _.allKeys)A[L]=`key_${O++}`;E.write(a?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const L of _.allKeys){if(L==="__proto__")continue;const T=A[L],D=typeof L=="symbol"?`syms[${S.indexOf(L)}]`:PI(L),M=`${D} in input`,B=y[L],Y=B?._zod?.optin,F=Y!==void 0,$=B?._zod?.optout==="optional";if(E.write(`const ${T} = ${k(D)};`),F&&$){const q=Y==="optional"?`${T}_present`:`${T}.value !== undefined || ${T}_present`;E.write(`
|
|
22
|
+
const ${T}_present = ${M};
|
|
23
|
+
if (!${T}.issues.length || ${T}_present) {
|
|
24
|
+
if (${T}.issues.length) {${C(T,D)}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (${q}) {
|
|
28
|
+
newResult[${D}] = ${T}.value;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
`)}else F?E.write(`
|
|
33
|
+
if (${T}.issues.length) {${C(T,D)}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (${T}.value === undefined) {
|
|
37
|
+
if (${M}) {
|
|
38
|
+
newResult[${D}] = undefined;
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
newResult[${D}] = ${T}.value;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
`):E.write(`
|
|
45
|
+
const ${T}_present = ${M};
|
|
46
|
+
if (${T}.issues.length) {${C(T,D)}
|
|
47
|
+
}
|
|
48
|
+
if (!${T}_present && !${T}.issues.length) {
|
|
49
|
+
payload.issues.push({
|
|
50
|
+
code: "invalid_type",
|
|
51
|
+
expected: "nonoptional",
|
|
52
|
+
input: undefined,
|
|
53
|
+
path: [${D}]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (${T}_present) {
|
|
58
|
+
newResult[${D}] = ${T}.value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
`)}return E.write("payload.value = newResult;"),E.write("return payload;"),E.compile()};let l;const d=Od,u=!Cr.jitless,g=u&&$I.value,p=t.catchall;let v;e._zod.parse=(y,_)=>{v??(v=r.value);const S=y.value;return d(S)?u&&g&&_?.async===!1&&_.jitless!==!0?(l||(l=s(t.shape)),y=l(y,_),p?Lk([],S,y,_,v,e):y):n(y,_):(y.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),y)}});function BS(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const a=e.filter(s=>!Jo(s));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(l=>bs(l,r,oa())))}),t)}const XP=ae("$ZodUnion",(e,t)=>{gt.init(e,t),Ye(e,"optin",r=>r.def.options.some(a=>a._zod.optin==="defaulted")?"defaulted":r.def.options.some(a=>a._zod.optin!==void 0)?"optional":void 0),Ye(e,"optout",r=>r.def.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Ye(e,"values",r=>{if(r.def.options.every(a=>a._zod.values))return new Set(r.def.options.flatMap(a=>Array.from(a._zod.values)))}),Ye(e,"pattern",r=>{if(r.def.options.every(a=>a._zod.pattern)){const a=r.def.options.map(s=>s._zod.pattern);return new RegExp(`^(${a.map(s=>Xb(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,a)=>{if(n)return n(r,a);let s=!1;const l=[];for(const d of t.options){const u=d._zod.run({value:r.value,issues:[]},a);if(u instanceof Promise)l.push(u),s=!0;else{if(u.issues.length===0)return u;l.push(u)}}return s?Promise.all(l).then(d=>BS(d,r,e,a)):BS(l,r,e,a)}}),QP=ae("$ZodIntersection",(e,t)=>{gt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,s=t.left._zod.run({value:a,issues:[]},r),l=t.right._zod.run({value:a,issues:[]},r);return s instanceof Promise||l instanceof Promise?Promise.all([s,l]).then(([u,m])=>VS(n,u,m)):VS(n,s,l)}});function Lg(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(Gl(e)&&Gl(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),a={...e,...t};Object.prototype.hasOwnProperty.call(a,"__proto__")&&delete a.__proto__;for(const s of r){if(s==="__proto__")continue;const l=Lg(e[s],t[s]);if(!l.valid)return{valid:!1,mergeErrorPath:[s,...l.mergeErrorPath]};a[s]=l.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=e[r],s=t[r],l=Lg(a,s);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function VS(e,t,n){const r=new Map;let a;const s=new Map,l=(m,g)=>{let p;if(m.code==="unrecognized_keys"&&!m.path?.length)a??(a=m),p=m.keys;else if(m.code==="invalid_key"&&m.origin==="record"&&m.path?.length===1){const v=String(m.path[0]);s.has(v)||s.set(v,m),p=[v]}else return!1;for(const v of p)r.has(v)||r.set(v,{}),r.get(v)[g]=!0;return!0};for(const m of t.issues)l(m,"l")||e.issues.push(m);for(const m of n.issues)l(m,"r")||e.issues.push(m);const d=[...r].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(d.length){const m=a?d.filter(g=>a.keys.includes(g)):[];m.length&&e.issues.push({...a,keys:m});for(const g of d)!m.includes(g)&&s.has(g)&&e.issues.push(s.get(g))}const u=Lg(t.value,n.value);if(!u.valid){if(Jo(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}const JP=ae("$ZodEnum",(e,t)=>{gt.init(e,t);const n=dk(t.entries),r=new Set(n);e._zod.values=r;const a=n.filter(s=>UI.has(typeof s));e._zod.pattern=new RegExp(a.length?`^(${a.map(s=>vf(s.toString())).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(s,l)=>{const d=s.value;return r.has(d)||s.issues.push({code:"invalid_value",values:n,input:d,inst:e}),s}}),ez=ae("$ZodTransform",(e,t)=>{gt.init(e,t),e._zod.optin="optional",Cr.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new bk(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(l=>(n.value=l,n));if(a instanceof Promise)throw new ts;return n.value=a,n}});function FS(e,t){return e.value=t.issues.length?void 0:t.value,e}const Ok=ae("$ZodOptional",(e,t)=>{gt.init(e,t),Ye(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Ye(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),Ye(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${Xb(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;const a=t.innerType._zod.run({value:n.value,issues:[]},r);return a instanceof Promise?a.then(s=>FS(n,s)):FS(n,a)}return t.innerType._zod.run(n,r)}}),tz=ae("$ZodExactOptional",(e,t)=>{Ok.init(e,t),Ye(e,"values",n=>n.def.innerType._zod.values),Ye(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),nz=ae("$ZodNullable",(e,t)=>{gt.init(e,t),Ye(e,"optin",n=>n.def.innerType._zod.optin),Ye(e,"optout",n=>n.def.innerType._zod.optout),Ye(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${Xb(r.source)}|null)$`):void 0}),Ye(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),rz=ae("$ZodDefault",(e,t)=>{gt.init(e,t),e._zod.optin="defaulted",Ye(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(s=>GS(s,t)):GS(a,t)}});function GS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const iz=ae("$ZodPrefault",(e,t)=>{gt.init(e,t),e._zod.optin="defaulted",Ye(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),az=ae("$ZodNonOptional",(e,t)=>{gt.init(e,t),Ye(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r].filter(a=>a!==void 0)):void 0}),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(s=>qS(s,e)):qS(a,e)}});function qS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function ZS(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(a=>bs(a,r,oa()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const oz=ae("$ZodCatch",(e,t)=>{gt.init(e,t),Ye(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Ye(e,"optout",n=>n.def.innerType._zod.optout),Ye(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run({value:n.value,issues:[]},r);return a instanceof Promise?a.then(s=>ZS(n,s,t,r)):ZS(n,a,t,r)}}),Dk=ae("$ZodPipe",(e,t)=>{gt.init(e,t),Ye(e,"values",n=>n.def.in._zod.values),Ye(e,"optin",n=>n.def.in._zod.optin),Ye(e,"optout",n=>n.def.out._zod.optout),Ye(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(l=>zu(l,t.in,r)):zu(s,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(s=>zu(s,t.out,r)):zu(a,t.out,r)}});function zu(e,t,n){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const sz=ae("$ZodPreprocess",(e,t)=>{Dk.init(e,t)}),lz=ae("$ZodReadonly",(e,t)=>{gt.init(e,t),Ye(e,"propValues",n=>n.def.innerType._zod.propValues),Ye(e,"values",n=>n.def.innerType._zod.values),Ye(e,"optin",n=>n.def.innerType?._zod?.optin),Ye(e,"optout",n=>n.def.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(WS):WS(a)}});function WS(e){return e.memo||(e.value=Object.freeze(e.value)),e}const cz=ae("$ZodCustom",(e,t)=>{gn.init(e,t),gt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(s=>YS(s,n,r,e));YS(a,n,r,e)}});function YS(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(ql(a))}}class uz extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Og="~memo",KS=[];function Ep(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const XS=new WeakMap;function Ik(e,t){const n=XS.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1;const a=d=>{!r&&d?._zod&&Ik(d,t)&&(r=!0)},s=e._zod.def;switch(s.type){case"object":{for(const d of Reflect.ownKeys(s.shape))a(s.shape[d]);a(s.catchall);break}case"array":a(s.element);break;case"tuple":for(const d of s.items)a(d);a(s.rest);break;case"record":case"map":a(s.keyType),a(s.valueType);break;case"set":a(s.valueType);break;case"union":for(const d of s.options)a(d);break;case"intersection":a(s.left),a(s.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":a(s.innerType);break;case"pipe":a(s.in),a(s.out);break;case"function":a(s.input),a(s.output);break;case"lazy":a(e._zod.innerType);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(const d in s){const u=Object.getOwnPropertyDescriptor(s,d);if(!u||u.get)continue;const m=u.value;if(!(!m||typeof m!="object")){if(m._zod)a(m);else if(Array.isArray(m))for(const g of m)a(g)}}}return t.delete(e),XS.set(e,r),r}function dz(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}let $u;const Uu=[],fz={alloc(e,t,n){const r=$u;if(!r)return n;$u=void 0;const a={value:n,issues:null};return r.set(t.value,a),Uu.push(a),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,r=(a,s)=>{if(s.direction!=="backward"&&mz(s,a.value))throw new uz;return n(a,s)};e._zod.parse=r,e._zod.run===n&&(e._zod.run=r)})},attach(e){var t;let n,r,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const s=e._zod.parse,l=(d,u)=>{if(n===void 0&&(n=Ik(e,new Set),!n))return e._zod.parse=s,e._zod.run===l&&(e._zod.run=s),s(d,u);const m=d.value;if(m===null||typeof m!="object")return s(d,u);let g=u[Og];g||(g={buckets:new Map,backEdges:void 0},u[Og]=g);let p;r===u?p=a:(p=dz(g,e),r=u,a=p);const v=p.get(m);if(v)return d.value=v.value,v.issues?v.issues.length&&d.issues.push(...Ep(v.issues)):(d.memo=!0,g.backEdges??(g.backEdges=new Set),g.backEdges.add(v.value)),d;$u=p;const y=Uu.length,_=s(d,u);$u=void 0;const S=Uu.length>y?Uu.pop():void 0;return _ instanceof Promise?_.then(E=>(S&&(S.issues=E.issues.length?Ep(E.issues):KS),E)):(S&&(S.issues=_.issues.length?Ep(_.issues):KS),_)};e._zod.parse=l,e._zod.run===s&&(e._zod.run=l)})}};function hz(){return fz}function mz(e,t){const n=e[Og]?.backEdges;return n!==void 0&&t!==null&&typeof t=="object"&&n.has(t)}const pz=()=>{const 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(s){return e[s]??null}const n={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:"credit card number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function a(s,l){return s==="number"&&typeof l=="number"&&!Number.isFinite(l)?String(l):r[s]??s}return s=>{switch(s.code){case"invalid_type":{const l=a(s.expected),d=XI(s.input),u=a(d,s.input);return`Invalid input: expected ${l}, received ${u}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${mk(s.values[0])}`:`Invalid option: expected one of ${LS(s.values,"|")}`;case"too_big":{const l=s.exact?"exactly ":s.inclusive?"<=":"<",d=t(s.origin);return d?`Too big: expected ${s.origin??"value"} to have ${l}${s.maximum.toString()} ${d.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${l}${s.maximum.toString()}`}case"too_small":{const l=s.exact?"exactly ":s.inclusive?">=":">",d=t(s.origin);return d?`Too small: expected ${s.origin} to have ${l}${s.minimum.toString()} ${d.unit}`:`Too small: expected ${s.origin} to be ${l}${s.minimum.toString()}`}case"invalid_format":{const l=s;return l.format==="starts_with"?`Invalid string: must start with "${l.prefix}"`:l.format==="ends_with"?`Invalid string: must end with "${l.suffix}"`:l.format==="includes"?`Invalid string: must include "${l.includes}"`:l.format==="regex"?`Invalid string: must match pattern ${l.pattern}`:`Invalid ${n[l.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${LS(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Invalid discriminator value. Expected ${s.options.map(d=>`'${d}'`).join(" | ")}`:s.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function gz(){return{localeError:pz()}}var QS;class bz{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function vz(){return new bz}(QS=globalThis).__zod_globalRegistry??(QS.__zod_globalRegistry=vz());const Tl=globalThis.__zod_globalRegistry;function yz(e,t){return new e({type:"string",..._e(t)})}function xz(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._e(t)})}function _z(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._e(t)})}function Mk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._e(t)})}function Sz(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._e(t)})}function wz(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._e(t)})}function Ez(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._e(t)})}function Cz(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._e(t)})}function kz(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._e(t)})}function Rz(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._e(t)})}function Az(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._e(t)})}function Tz(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._e(t)})}function Nz(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._e(t)})}function jz(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._e(t)})}function Lz(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._e(t)})}function Oz(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._e(t)})}function Dz(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._e(t)})}function Iz(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._e(t)})}function Mz(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._e(t)})}function Pz(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._e(t)})}function zz(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._e(t)})}function $z(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._e(t)})}function Uz(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._e(t)})}function Hz(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._e(t)})}function Bz(e,t){return new e({type:"string",format:"date",check:"string_format",..._e(t)})}function Vz(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,..._e(t)})}function Fz(e,t){return new e({type:"string",format:"duration",check:"string_format",..._e(t)})}function Gz(e,t){return new e({type:"number",checks:[],..._e(t)})}function qz(e,t){return new e({type:"number",coerce:!0,checks:[],..._e(t)})}function Zz(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._e(t)})}function Wz(e,t){return new e({type:"boolean",..._e(t)})}function Yz(e){return new e({type:"unknown"})}function Kz(e,t){return new e({type:"never",..._e(t)})}function JS(e,t){return new wk({check:"less_than",..._e(t),value:e,inclusive:!1})}function Cp(e,t){return new wk({check:"less_than",..._e(t),value:e,inclusive:!0})}function ew(e,t){return new Ek({check:"greater_than",..._e(t),value:e,inclusive:!1})}function kp(e,t){return new Ek({check:"greater_than",..._e(t),value:e,inclusive:!0})}function tw(e,t){return new XM({check:"multiple_of",..._e(t),value:e})}function Pk(e,t){return new JM({check:"max_length",..._e(t),maximum:e})}function Md(e,t){return new eP({check:"min_length",..._e(t),minimum:e})}function zk(e,t){return new tP({check:"length_equals",..._e(t),length:e})}function Xz(e,t){return new nP({check:"string_format",format:"regex",..._e(t),pattern:e})}function Qz(e){return new rP({check:"string_format",format:"lowercase",..._e(e)})}function Jz(e){return new iP({check:"string_format",format:"uppercase",..._e(e)})}function e8(e,t){return new aP({check:"string_format",format:"includes",..._e(t),includes:e})}function t8(e,t){return new oP({check:"string_format",format:"starts_with",..._e(t),prefix:e})}function n8(e,t){return new sP({check:"string_format",format:"ends_with",..._e(t),suffix:e})}function vs(e){return new lP({check:"overwrite",tx:e})}function r8(e){return vs(t=>t.normalize(e))}function i8(){return vs(e=>e.trim())}function a8(){return vs(e=>e.toLowerCase())}function o8(){return vs(e=>e.toUpperCase())}function s8(){return vs(e=>zI(e))}function l8(e,t,n){return new e({type:"array",element:t,..._e(n)})}function c8(e,t,n){return new e({type:"custom",check:"custom",fn:t,..._e(n)})}function u8(e,t){const n=d8(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(ql(a,r.value,n._zod.def));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(ql(s))}},e(r.value,r)),t);return n}function d8(e,t){const n=new gn({check:"custom",..._e(t)});return n._zod.check=e,n}function zl(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&Ln(e,r,n[r]);return e}function $k(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??Tl,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 ys(e,t,n,r,a){const s=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:a}):t.unrepresentable;if(s==="any")return!1;if(s===void 0||s==="throw")throw new Error(a);return Object.assign(n,s),!0}function Zt(e,t,n={path:[],schemaPath:[]}){var r;const a=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const d=e._zod.toJSONSchema?.();if(d)l.schema=d;else{const g={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,g);else{const v=l.schema,y=t.processors[a.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);y(e,t,v,g)}const p=e._zod.parent;p&&(l.ref||(l.ref=p),Zt(p,t,g),t.seen.get(p).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&zl(l.schema,u),t.io==="input"&&nn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function nw(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Uk(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const l of e.seen.entries()){const d=e.metadataRegistry.get(l[0])?.id;if(d){const u=r.get(d);if(u&&u!==l[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,l[0])}}const a=l=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(l[0])?.id,v=e.external.uri??(_=>_);if(p)return{ref:v(p)};const y=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=y,{defId:y,ref:`${v("__shared")}#/${d}/${nw(y)}`}}const u="#",m=`${u}/${d}/`;if(l[1]===n&&!l[1].schema.id)return{ref:u};const g=l[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:m+nw(g)}},s=l=>{if(l[1].schema.$ref)return;const d=l[1],{ref:u,defId:m}=a(l);d.def={...d.schema},m&&(d.defId=m);const g=d.schema;for(const p in g)delete g[p];g.$ref=u};if(e.cycles==="throw")for(const l of e.seen.entries()){const d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
62
|
+
|
|
63
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const d=l[1];if(t===l[0]){s(l);continue}if(e.external){const m=e.external.registry.get(l[0])?.id;if(t!==l[0]&&m){s(l);continue}}if(e.metadataRegistry.get(l[0])?.id){s(l);continue}if(d.cycle){s(l);continue}if(d.count>1&&e.reused==="ref"){s(l);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Hk(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const n=[];for(const r of t){if(!r||typeof r!="object")return;Hk(r);const a=Object.keys(r);if(a.length!==1||a[0]!=="type")return;const s=r.type;for(const l of Array.isArray(s)?s:[s]){if(typeof l!="string")return;n.includes(l)||n.push(l)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const Bk=new Set(["type","properties","required","additionalProperties"]),rw=["oneOf","anyOf"];function iw(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function Dg(e){const t=[];for(const s of e){if(typeof s!="object"||s.type!=="object")return null;for(const l in s)if(!Bk.has(l))return null;t.push(s)}const n={},r=new Set;for(const s of t){for(const l in s.properties){if(Object.prototype.hasOwnProperty.call(n,l))continue;const d=[];for(const m of t){const g=m.properties?.[l]??iw(m);g!=null&&(d.some(p=>JSON.stringify(p)===JSON.stringify(g))||d.push(g))}const u=d.length===1?d[0]:Dg(d)??{allOf:d};Ln(n,l,u)}for(const l of s.required??[])r.add(l)}const a={type:"object",properties:n};if(r.size&&(a.required=[...r]),t.every(s=>s.additionalProperties===!1))a.additionalProperties=!1;else{const s=[];for(const l of t){const d=iw(l);d&&!s.some(u=>JSON.stringify(u)===JSON.stringify(d))&&s.push(d)}s.length===1?a.additionalProperties=s[0]:s.length>1&&(a.additionalProperties={allOf:s})}return a}function f8(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const a of Bk)if(a in e)return;const n=t.filter(a=>rw.some(s=>Array.isArray(a[s])));let r=null;if(!n.length)r=Dg(t);else{const a=n[0],s=rw.find(u=>Array.isArray(a[u]));if(Object.keys(a).length!==1)return;const l=t.filter(u=>u!==a),d=a[s].map(u=>Dg([...l,u]));if(d.some(u=>!u))return;r={[s]:d}}r&&(delete e.allOf,zl(e,r))}function Vk(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=d=>{const u=e.seen.get(d);if(u.ref===null)return;const m=u.def??u.schema,g={...m},p=u.ref;if(u.ref=null,p){r(p);const y=e.seen.get(p),_=y.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(_)):zl(m,_),zl(m,g),d._zod.parent===p)for(const E in m)E==="$ref"||E==="allOf"||E in g||delete m[E];if(_.$ref&&y.def)for(const E in m)E==="$ref"||E==="allOf"||E in y.def&&JSON.stringify(m[E])===JSON.stringify(y.def[E])&&delete m[E]}const v=d._zod.parent;if(v&&v!==p){r(v);const y=e.seen.get(v);if(y?.schema.$ref&&(m.$ref=y.schema.$ref,y.def))for(const _ in m)_==="$ref"||_==="allOf"||_ in y.def&&JSON.stringify(m[_])===JSON.stringify(y.def[_])&&delete m[_]}e.override({zodSchema:d,jsonSchema:m,path:u.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const d of[...e.seen.entries()].reverse())r(d[0]);if(e.target!=="openapi-3.0")for(const d of e.seen.entries())Hk(d[1].def??d[1].schema);for(const d of e.deferred)d();if(e.intersections.length){const d=new Map;for(const u of e.seen.values())for(const m of[u.schema,u.def]){const g=m?.allOf;if(!Array.isArray(g))continue;const p=d.get(g);p?p.push(m):d.set(g,[m])}for(const u of e.intersections)for(const m of d.get(u)??[])f8(m)}}const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const d=e.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(d)}zl(a,n.defId?n.schema:n.def??n.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&a.id===s&&delete a.id;const l=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const d of e.seen.entries()){const u=d[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,Ln(l,u.defId,u.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?a.$defs=l:a.definitions=l);try{const d=JSON.parse(JSON.stringify(a));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:Pd(t,"input",e.processors),output:Pd(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function nn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return nn(r.element,n);if(r.type==="set")return nn(r.valueType,n);if(r.type==="lazy")return nn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return nn(r.innerType,n);if(r.type==="intersection")return nn(r.left,n)||nn(r.right,n);if(r.type==="record"||r.type==="map")return nn(r.keyType,n)||nn(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:nn(r.in,n)||nn(r.out,n);if(r.type==="object"){for(const a in r.shape)if(nn(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(nn(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(nn(a,n))return!0;return!!(r.rest&&nn(r.rest,n))}return!1}const h8=(e,t={})=>n=>{const r=$k({...n,processors:t});return Zt(e,r),Uk(r,e),Vk(r,e)},Pd=(e,t,n={})=>r=>{const{libraryOptions:a,target:s}=r??{},l=$k({...a??{},target:s,io:t,processors:n});return Zt(e,l),Uk(l,e),Vk(l,e)},m8={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},p8=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:s,maximum:l,format:d,patterns:u,contentEncoding:m,laxFormat:g}=e._zod.bag;if(typeof s=="number"&&(a.minLength=s),typeof l=="number"&&(a.maxLength=l),d&&(a.format=m8[d]??d,a.format===""&&delete a.format,(d==="time"||g)&&delete a.format),m&&(a.contentEncoding=m),u&&u.size>0){const p=[...u];p.length===1?a.pattern=p[0].source:p.length>1&&(a.allOf=[...p.map(v=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},g8=(e,t,n,r)=>{const a=n,{minimum:s,maximum:l,format:d,multipleOf:u,exclusiveMaximum:m,exclusiveMinimum:g}=e._zod.bag;typeof d=="string"&&d.includes("int")?a.type="integer":a.type="number";const p=typeof g=="number"&&g>=(s??Number.NEGATIVE_INFINITY),v=typeof m=="number"&&m<=(l??Number.POSITIVE_INFINITY),y=t.target==="draft-04"||t.target==="openapi-3.0";p?y?(a.minimum=g,a.exclusiveMinimum=!0):a.exclusiveMinimum=g:typeof s=="number"&&(a.minimum=s),v?y?(a.maximum=m,a.exclusiveMaximum=!0):a.exclusiveMaximum=m:typeof l=="number"&&(a.maximum=l),typeof u=="number"&&(Number.isFinite(u)&&u!==0?a.multipleOf=Math.abs(u):ys(e,t,a,r,`A multipleOf divisor of ${u} cannot be represented in JSON Schema`))},b8=(e,t,n,r)=>{n.type="boolean"},v8=(e,t,n,r)=>{n.not={}},y8=(e,t,n,r)=>{},x8=(e,t,n,r)=>{const a=e._zod.def,s=dk(a.entries);if(s.length===0){n.not={};return}s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),n.enum=s},_8=(e,t,n,r)=>{ys(e,t,n,r,"Custom types cannot be represented in JSON Schema")},S8=(e,t,n,r)=>{ys(e,t,n,r,"Transforms cannot be represented in JSON Schema")},w8=(e,t,n,r)=>{const a=n,s=e._zod.def,{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(a.minItems=l),typeof d=="number"&&(a.maxItems=d),a.type="array",a.items=Zt(s.element,t,{...r,path:[...r.path,"items"]})};function Ig(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Ig(t.out):t.type==="catch"?Ig(t.innerType):e._zod.optin}const E8=(e,t,n,r)=>{const a=n,s=e._zod.def,l=s.shape;if(Object.getOwnPropertySymbols(l).length&&ys(e,t,a,r,"Symbol keys cannot be represented in JSON Schema"))return;a.type="object",a.properties={};for(const g in l)Ln(a.properties,g,Zt(l[g],t,{...r,path:[...r.path,"properties",g]}));const u=new Set(Object.keys(l)),m=new Set([...u].filter(g=>{const p=s.shape[g];return t.io==="input"?Ig(p)===void 0:p._zod.optout===void 0}));m.size>0&&(a.required=Array.from(m)),s.catchall?._zod.def.type==="never"?a.additionalProperties=!1:s.catchall?s.catchall&&(a.additionalProperties=Zt(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},C8=(e,t,n,r)=>{const a=e._zod.def,s=a.inclusive===!1,l=a.options.map((d,u)=>Zt(d,t,{...r,path:[...r.path,s?"oneOf":"anyOf",u]}));s?n.oneOf=l:n.anyOf=l},k8=(e,t,n,r)=>{const a=e._zod.def,s=Zt(a.left,t,{...r,path:[...r.path,"allOf",0]}),l=Zt(a.right,t,{...r,path:[...r.path,"allOf",1]}),d=m=>"allOf"in m&&Object.keys(m).length===1,u=[...d(s)?s.allOf:[s],...d(l)?l.allOf:[l]];n.allOf=u,t.intersections.push(u)},R8=(e,t,n,r)=>{const a=e._zod.def,s=Zt(a.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=a.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},A8=(e,t,n,r)=>{const a=e._zod.def;Zt(a.innerType,t,r);const s=t.seen.get(e);s.ref=a.innerType},iv=Symbol();function Fk(e,t,n,r,a){let s=!1;const l=JSON.stringify(e,(d,u)=>typeof u!="bigint"?u:(s=!0,null));return s?(ys(t,n,r,a,"BigInt defaults cannot be represented in JSON Schema"),iv):JSON.parse(l)}const T8=(e,t,n,r)=>{const a=e._zod.def;Zt(a.innerType,t,r);const s=t.seen.get(e);s.ref=a.innerType;const l=Fk(a.defaultValue,e,t,n,r);l!==iv&&(n.default=l)},N8=(e,t,n,r)=>{const a=e._zod.def;Zt(a.innerType,t,r);const s=t.seen.get(e);if(s.ref=a.innerType,t.io!=="input")return;const l=Fk(a.defaultValue,e,t,n,r);l!==iv&&(n._prefault=l)},j8=(e,t,n,r)=>{const a=e._zod.def;Zt(a.innerType,t,r);const s=t.seen.get(e);s.ref=a.innerType;let l;try{l=a.catchValue(void 0)}catch{ys(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=l},L8=(e,t,n,r)=>{const a=e._zod.def,s=a.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?s?a.out:a.in:a.out;Zt(l,t,r);const d=t.seen.get(e);d.ref=l},O8=(e,t,n,r)=>{const a=e._zod.def;Zt(a.innerType,t,r);const s=t.seen.get(e);s.ref=a.innerType,n.readOnly=!0},Gk=(e,t,n,r)=>{const a=e._zod.def;Zt(a.innerType,t,r);const s=t.seen.get(e);s.ref=a.innerType},aw=new WeakSet([Object.prototype,Error.prototype]);function Hu(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}const D8=(e,t)=>{yk.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);aw.has(n)||(aw.add(n),Hu(n,"format",r=>a=>dM(r,a)),Hu(n,"flatten",r=>a=>uM(r,a)),Hu(n,"addIssue",r=>a=>{r.issues.push(a),r.message=JSON.stringify(r.issues,Ng,2)}),Hu(n,"addIssues",r=>a=>{r.issues.push(...a),r.message=JSON.stringify(r.issues,Ng,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Jn=ae("ZodError",D8,void 0,{Parent:Error}),I8=ev(Jn),M8=tv(Jn),P8=xf(Jn),z8=_f(Jn),$8=mM(Jn),U8=pM(Jn),H8=gM(Jn),B8=bM(Jn),V8=vM(Jn),F8=yM(Jn),G8=xM(Jn),q8=_M(Jn);function Z8(){Cr.localeError||oa(gz())}function av(){Cr.memoizer||oa({memoizer:hz()})}const bt=ae("ZodType",(e,t)=>(Z8(),gt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(ia(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return aa(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(V4(e,t))},superRefine(e,t){return this.check(F4(e,t))},overwrite(e){return this.check(vs(e))},optional(){return lw(this)},exactOptional(){return N4(this)},nullable(){return cw(this)},nullish(){return lw(cw(this))},nonoptional(e){return M4(this,e)},array(){return zd(this)},or(e){return k4([this,e])},and(e){return A4(this,e)},transform(e){return uw(this,Zk(e))},default(e){return O4(this,e)},prefault(e){return I4(this,e)},catch(e){return z4(this,e)},pipe(e){return uw(this,e)},readonly(){return H4(this)},describe(e){const t=this.clone();return Tl.add(t,{description:e}),t},meta(...e){if(e.length===0)return Tl.get(this);const t=this.clone();return Tl.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 gk(this,"~standard",{...Ck(this),jsonSchema:{input:Pd(this,"input"),output:Pd(this,"output")}})},set"~standard"(e){cs(this,"~standard",e)},parse:function e(t,n){return I8(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await M8(this,t,n,{callee:e})},safeParse(e,t){return P8(this,e,t)},async safeParseAsync(e,t){return z8(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){cs(this,"spa",e)},encode:function e(t,n){return $8(this,t,n,{callee:e})},decode:function e(t,n){return U8(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await H8(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await B8(this,t,n,{callee:e})},safeEncode(e,t){return V8(this,e,t)},safeDecode(e,t){return F8(this,e,t)},async safeEncodeAsync(e,t){return G8(this,e,t)},async safeDecodeAsync(e,t){return q8(this,e,t)},toJSONSchema(e){return h8(this,{})(e)},get description(){return Tl.get(this)?.description},get _def(){return this._zod.def}}),qk=ae("_ZodString",(e,t)=>{rv.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,a,s)=>p8(e,r,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(Xz(...e))},includes(...e){return this.check(e8(...e))},startsWith(...e){return this.check(t8(...e))},endsWith(...e){return this.check(n8(...e))},min(...e){return this.check(Md(...e))},max(...e){return this.check(Pk(...e))},length(...e){return this.check(zk(...e))},nonempty(...e){return this.check(Md(1,...e))},lowercase(e){return this.check(Qz(e))},uppercase(e){return this.check(Jz(e))},trim(){return this.check(i8())},normalize(...e){return this.check(r8(...e))},toLowerCase(){return this.check(a8())},toUpperCase(){return this.check(o8())},slugify(){return this.check(s8())}}),W8=ae("ZodString",(e,t)=>{rv.init(e,t),qk.init(e,t)},{email(e){return this.check(xz(J8,e))},url(e){return this.check(Cz(t4,e))},jwt(e){return this.check(Uz(g4,e))},emoji(e){return this.check(kz(n4,e))},guid(e){return this.check(_z(e4,e))},uuid(e){return this.check(Mk(Nl,e))},uuidv4(e){return this.check(Sz(Nl,e))},uuidv6(e){return this.check(wz(Nl,e))},uuidv7(e){return this.check(Ez(Nl,e))},nanoid(e){return this.check(Rz(r4,e))},cuid(e){return this.check(Az(i4,e))},cuid2(e){return this.check(Tz(a4,e))},ulid(e){return this.check(Nz(o4,e))},base64(e){return this.check(Pz(h4,e))},base64url(e){return this.check(zz(m4,e))},xid(e){return this.check(jz(s4,e))},ksuid(e){return this.check(Lz(l4,e))},ipv4(e){return this.check(Oz(c4,e))},ipv6(e){return this.check(Dz(u4,e))},cidrv4(e){return this.check(Iz(d4,e))},cidrv6(e){return this.check(Mz(f4,e))},e164(e){return this.check($z(p4,e))},datetime(e){return this.check(Hz(Y8,e))},date(e){return this.check(Bz(K8,e))},time(e){return this.check(Vz(X8,e))},duration(e){return this.check(Fz(Q8,e))}});function at(e){return yz(W8,e)}const ct=ae("ZodStringFormat",(e,t)=>{lt.init(e,t),qk.init(e,t)}),Y8=ae("ZodISODateTime",(e,t)=>{RP.init(e,t),ct.init(e,t)}),K8=ae("ZodISODate",(e,t)=>{AP.init(e,t),ct.init(e,t)}),X8=ae("ZodISOTime",(e,t)=>{TP.init(e,t),ct.init(e,t)}),Q8=ae("ZodISODuration",(e,t)=>{NP.init(e,t),ct.init(e,t)}),J8=ae("ZodEmail",(e,t)=>{hP.init(e,t),ct.init(e,t)}),e4=ae("ZodGUID",(e,t)=>{dP.init(e,t),ct.init(e,t)}),Nl=ae("ZodUUID",(e,t)=>{fP.init(e,t),ct.init(e,t)});function vd(e){return Mk(Nl,e)}const t4=ae("ZodURL",(e,t)=>{yP.init(e,t),ct.init(e,t)}),n4=ae("ZodEmoji",(e,t)=>{xP.init(e,t),ct.init(e,t)}),r4=ae("ZodNanoID",(e,t)=>{_P.init(e,t),ct.init(e,t)}),i4=ae("ZodCUID",(e,t)=>{SP.init(e,t),ct.init(e,t)}),a4=ae("ZodCUID2",(e,t)=>{wP.init(e,t),ct.init(e,t)}),o4=ae("ZodULID",(e,t)=>{EP.init(e,t),ct.init(e,t)}),s4=ae("ZodXID",(e,t)=>{CP.init(e,t),ct.init(e,t)}),l4=ae("ZodKSUID",(e,t)=>{kP.init(e,t),ct.init(e,t)}),c4=ae("ZodIPv4",(e,t)=>{jP.init(e,t),ct.init(e,t)}),u4=ae("ZodIPv6",(e,t)=>{OP.init(e,t),ct.init(e,t)}),d4=ae("ZodCIDRv4",(e,t)=>{DP.init(e,t),ct.init(e,t)}),f4=ae("ZodCIDRv6",(e,t)=>{MP.init(e,t),ct.init(e,t)}),h4=ae("ZodBase64",(e,t)=>{PP.init(e,t),ct.init(e,t)}),m4=ae("ZodBase64URL",(e,t)=>{$P.init(e,t),ct.init(e,t)}),p4=ae("ZodE164",(e,t)=>{UP.init(e,t),ct.init(e,t)}),g4=ae("ZodJWT",(e,t)=>{BP.init(e,t),ct.init(e,t)}),ov=ae("ZodNumber",(e,t)=>{Nk.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,a,s)=>g8(e,r,a,s);const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(ew(e,t))},gte(e,t){return this.check(kp(e,t))},min(e,t){return this.check(kp(e,t))},lt(e,t){return this.check(JS(e,t))},lte(e,t){return this.check(Cp(e,t))},max(e,t){return this.check(Cp(e,t))},int(e){return this.check(ow(e))},safe(e){return this.check(ow(e))},positive(e){return this.check(ew(0,e))},nonnegative(e){return this.check(kp(0,e))},negative(e){return this.check(JS(0,e))},nonpositive(e){return this.check(Cp(0,e))},multipleOf(e,t){return this.check(tw(e,t))},step(e,t){return this.check(tw(e,t))},finite(){return this}});function Rp(e){return Gz(ov,e)}const b4=ae("ZodNumberFormat",(e,t)=>{VP.init(e,t),ov.init(e,t)});function ow(e){return Zz(b4,e)}const v4=ae("ZodBoolean",(e,t)=>{FP.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>b8(e,n,r)});function y4(e){return Wz(v4,e)}const x4=ae("ZodUnknown",(e,t)=>{GP.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>y8()});function sw(){return Yz(x4)}const _4=ae("ZodNever",(e,t)=>{qP.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>v8(e,n,r)});function S4(e){return Kz(_4,e)}const w4=ae("ZodArray",(e,t)=>{av(),ZP.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>w8(e,n,r,a),e.element=t.element},{min(e,t){return this.check(Md(e,t))},nonempty(e){return this.check(Md(1,e))},max(e,t){return this.check(Pk(e,t))},length(e,t){return this.check(zk(e,t))},unwrap(){return this.element}});function zd(e,t){return l8(w4,e,t)}const E4=ae("ZodObject",(e,t)=>{av(),KP.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>E8(e,n,r,a),nM(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return hn(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:sw()})},loose(){return this.clone({...this._zod.def,catchall:sw()})},strict(){return this.clone({...this._zod.def,catchall:S4()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return GI(this,e)},safeExtend(e){return qI(this,e)},merge(e){return ZI(this,e)},pick(e){return VI(this,e)},omit(e){return FI(this,e)},partial(...e){return OS(Wk,this,e[0])},exactPartial(...e){return OS(Yk,this,e[0],"exactPartial")},required(...e){return WI(Kk,this,e[0])}});function Pa(e,t){const n={type:"object",shape:e??{},..._e(t)};return new E4(n)}const C4=ae("ZodUnion",(e,t)=>{XP.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>C8(e,n,r,a),e.options=t.options});function k4(e,t){return new C4({type:"union",options:e,..._e(t)})}const R4=ae("ZodIntersection",(e,t)=>{QP.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>k8(e,n,r,a)});function A4(e,t){return new R4({type:"intersection",left:e,right:t})}const Mg=ae("ZodEnum",(e,t)=>{JP.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,a,s)=>x8(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const s={};for(const l of r)if(n.has(l))s[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Mg({...t,checks:[],..._e(a),entries:s})},e.exclude=(r,a)=>{const s={...t.entries};for(const l of r)if(n.has(l))delete s[l];else throw new Error(`Key ${l} not found in enum`);return new Mg({...t,checks:[],..._e(a),entries:s})}});function hn(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Mg({type:"enum",entries:n,..._e(t)})}const T4=ae("ZodTransform",(e,t)=>{av(),ez.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>S8(e,n,r,a),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new bk(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(ql(s,n.value,t));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),"input"in l||(l.input=n.value),l.inst??(l.inst=e),n.issues.push(ql(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(s=>(n.value=s,n)):(n.value=a,n)}});function Zk(e){return new T4({type:"transform",transform:e})}const Wk=ae("ZodOptional",(e,t)=>{Ok.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Gk(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function lw(e){return new Wk({type:"optional",innerType:e})}const Yk=ae("ZodExactOptional",(e,t)=>{tz.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Gk(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function N4(e){return new Yk({type:"optional",innerType:e})}const j4=ae("ZodNullable",(e,t)=>{nz.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>R8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function cw(e){return new j4({type:"nullable",innerType:e})}const L4=ae("ZodDefault",(e,t)=>{rz.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>T8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function O4(e,t){return new L4({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():hk(t)}})}const D4=ae("ZodPrefault",(e,t)=>{iz.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>N8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function I4(e,t){return new D4({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():hk(t)}})}const Kk=ae("ZodNonOptional",(e,t)=>{az.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>A8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function M4(e,t){return new Kk({type:"nonoptional",innerType:e,..._e(t)})}const P4=ae("ZodCatch",(e,t)=>{oz.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>j8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function z4(e,t){return new P4({type:"catch",innerType:e,catchValue:typeof t=="function"?t:iM(t)})}const Xk=ae("ZodPipe",(e,t)=>{Dk.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>L8(e,n,r,a),e.in=t.in,e.out=t.out});function uw(e,t){return new Xk({type:"pipe",in:e,out:t})}const $4=ae("ZodPreprocess",(e,t)=>{Xk.init(e,t),sz.init(e,t)}),U4=ae("ZodReadonly",(e,t)=>{lz.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>O8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function H4(e){return new U4({type:"readonly",innerType:e})}const B4=ae("ZodCustom",(e,t)=>{cz.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>_8(e,n,r,a)});function V4(e,t={}){return c8(B4,e,t)}function F4(e,t){return u8(e,t)}function Ta(e,t){return new $4({type:"pipe",in:Zk(e),out:t})}function dw(e){return qz(ov,e)}const G4=/^[a-z0-9][a-z0-9_-]{0,127}$/,q4=/^[a-z0-9][a-z0-9._-]{0,127}$/;function Z4(e){const t=e.trim();if(!t)throw new Error("E2B template reference must not be blank");const n=t.indexOf(":");if(n!==-1&&n!==t.lastIndexOf(":"))throw fw(e);const r=n===-1?t:t.slice(0,n),a=n===-1?void 0:t.slice(n+1),s=r.split("/");if(s.length>2||s.some(l=>!G4.test(l))||a!==void 0&&!q4.test(a))throw fw(e);return t}function fw(e){return new Error(`invalid E2B template reference ${JSON.stringify(e)}; use lowercase name[:tag] or team/name[:tag] with letters, digits, hyphens, underscores, and optional periods in the tag`)}const zo=e=>typeof e=="string"&&e.trim()===""?void 0:e;Pa({SELFBENCH_API_HOST:at().default("127.0.0.1"),SELFBENCH_API_PORT:dw().int().min(1).max(65535).default(8080),SELFBENCH_API_TOKEN:at().min(1).optional(),SELFBENCH_ARTIFACT_BACKEND:hn(["local","gcs"]).default("local"),SELFBENCH_ARTIFACT_DIR:at().default(".selfbench/artifacts"),SELFBENCH_GCS_BUCKET:at().optional(),SELFBENCH_GCS_PREFIX:at().default("selfbench"),SELFBENCH_EXECUTION_BACKEND:hn(ok).default("docker"),SELFBENCH_DOCKER_IMAGE:at().default("selfbench-sandbox:local"),SELFBENCH_HARBOR_ENVIRONMENT:Ta(zo,hn(sk).optional()),SELFBENCH_MODAL_APP:at().default("selfbench"),SELFBENCH_MODAL_ENVIRONMENT:at().optional(),SELFBENCH_MODAL_IMAGE:at().default("node:22-bookworm"),SELFBENCH_VERCEL_IMAGE:Ta(zo,at().trim().min(1).optional()),SELFBENCH_VERCEL_TIMEOUT_CAP:Ta(zo,at().optional()),SELFBENCH_E2B_TEMPLATE:Ta(zo,at().trim().min(1).optional()),SELFBENCH_E2B_TIMEOUT_CAP:Ta(zo,at().optional()),SELFBENCH_BUILD_COMMIT:Ta(e=>e===""?void 0:e,at().regex(/^[0-9a-f]{40}$/i).optional()),SELFBENCH_ACTIVITY_CONCURRENCY:Ta(zo,dw().int().min(1).max(100).optional()),SELFBENCH_TASK_QUEUE:at().default("selfbench-dev"),SELFBENCH_TEMPORAL_ADDRESS:at().default("127.0.0.1:7233"),SELFBENCH_TEMPORAL_NAMESPACE:at().default("default"),SELFBENCH_TEMPORAL_API_KEY:at().optional(),SELFBENCH_TEMPORAL_CONNECT:hn(["eager","lazy"]).default("eager"),SELFBENCH_TEMPORAL_TLS:hn(["true","false"]).transform(e=>e==="true").default(!1)});function W4(e){return/^[^@\s]+@sha256:[0-9a-f]{64}$/i.test(e)}const hw=["gpt-5.6-sol","gpt-6-astra","gpt-5.6-terra","gpt-5.6-luna"],sv=Pa({authorModel:hn(hw),verifierModel:hn(hw),reasoning:hn(["low","medium","high"]),sandbox:hn(DI),modelCredentialId:vd(),sandboxCredentialId:vd().optional(),sandboxImage:at().trim().min(1).max(512).optional(),harborEnvironment:hn(lk).optional(),harborCredentialId:vd().optional()}).strict().superRefine((e,t)=>{if(e.sandboxCredentialId||t.addIssue({code:"custom",path:["sandboxCredentialId"],message:`Choose a ${bd[e.sandbox]} credential.`}),!(e.sandbox==="e2b"||e.sandbox==="vercel")){(e.harborEnvironment||e.harborCredentialId||e.sandboxImage)&&t.addIssue({code:"custom",message:"Separate verification and runtime settings are only supported for E2B and Vercel generation."});return}if(e.harborEnvironment?e.harborCredentialId||t.addIssue({code:"custom",path:["harborCredentialId"],message:`Choose a ${Tg[e.harborEnvironment]} credential for Harbor verification.`}):t.addIssue({code:"custom",path:["harborEnvironment"],message:"Choose a Harbor verification environment."}),e.sandbox==="vercel"&&!W4(e.sandboxImage??"")&&t.addIssue({code:"custom",path:["sandboxImage"],message:"Vercel requires a runtime image pinned by sha256 digest."}),e.sandbox==="e2b")try{if(Z4(e.sandboxImage??"").split(":")[0]==="base")throw new Error}catch{t.addIssue({code:"custom",path:["sandboxImage"],message:"E2B requires a prebuilt SelfBench template, not base."})}});Pa({ownerId:Rp().int().positive(),orgId:Rp().int().positive().optional(),repoId:Rp().int().positive(),settings:sv}).strict();async function en(e,t){const n=await fetch(e,{...t,headers:{accept:"application/json",...t?.headers}});if(Fb(n),!n.ok){let r=String(n.status);try{const a=await n.json();a.error&&(r=a.error)}catch{}throw new Error(r)}return n.json()}async function Y4(e){return(await en(`/api/orgs/${encodeURIComponent(e)}/github-repos`)).repos}function mw(e){return en(`/api/github-repos/${e}`)}async function Qk(e){return(await en(`/api/orgs/${encodeURIComponent(e)}/repos`)).repos}async function K4(e,t){return(await en(`/api/orgs/${encodeURIComponent(e)}/repos`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({fullName:t})})).repo}async function X4(e,t){await en(`/api/orgs/${encodeURIComponent(e)}/repos/${t}`,{method:"DELETE"})}function cc(e,t=Date.now()){if(!e)return"";const n=new Date(e).getTime();if(Number.isNaN(n))return"";const r=Math.max(0,Math.round((t-n)/1e3));if(r<60)return"just now";const a=Math.round(r/60);if(a<60)return`${a}m ago`;const s=Math.round(a/60);if(s<24)return`${s}h ago`;const l=Math.round(s/24);return l<31?`${l}d ago`:e.slice(0,10)}async function Q4(e,t,n,r){return(await en(`${sa(e,t)}/tasks/from-pr`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({pr:n,...r?{generation:r}:{}})})).task}function J4(e,t){return en(`${sa(e,t)}/generation-options`)}async function e5(e){return(await en(`/api/orgs/${encodeURIComponent(e)}/task-counts`)).counts}const sa=(e,t)=>`/api/orgs/${encodeURIComponent(e)}/repos/${t}`;async function yd(e,t){return(await en(`${sa(e,t)}/tasks`)).tasks}async function t5(e,t,n,r){await en(`${sa(e,t)}/tasks/${encodeURIComponent(n)}/${encodeURIComponent(r)}`,{method:"DELETE"})}async function n5(e,t,n,r,a){return(await en(`${sa(e,t)}/tasks/${n}/${encodeURIComponent(r)}/review`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(a)})).task}async function r5(e,t,n,r){return(await en(`${sa(e,t)}/tasks/${n}/${encodeURIComponent(r)}/review`,{method:"DELETE"})).task}function i5(e,t,n,r){return`${sa(e,t)}/tasks/${n}/${encodeURIComponent(r)}/artifacts`}function a5(e,t,n=1){return en(`${sa(e,t)}/pull-requests?page=${n}`)}const pw={authorModel:"gpt-5.6-sol",verifierModel:"gpt-5.6-sol",reasoning:"high",sandbox:"modal",modelCredentialId:""};function gw(e){try{const t=sv.safeParse(JSON.parse(window.localStorage.getItem(e)??"null"));return t.success?t.data:void 0}catch{return}}function bw(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function vw(e,t){return{...e,modelCredentialId:e.modelCredentialId||t.credentials.find(n=>n.kind==="openai"&&n.auth==="api-key")?.id||t.credentials.find(n=>n.kind==="openai"&&n.auth==="codex-login")?.id||"",sandboxCredentialId:e.sandboxCredentialId||t.credentials.find(n=>n.kind===e.sandbox&&n.auth==="api-key")?.id,harborCredentialId:e.harborEnvironment?e.harborCredentialId||t.credentials.find(n=>n.kind===e.harborEnvironment&&n.auth==="api-key")?.id:void 0}}function Jk(e,t,n=!0){const r=`selfbench-generation:${e}:${t}`,[a,s]=U.useState(()=>gw(r)??pw),l=U.useRef({key:r,settings:a}),d=S=>{const E=l.current.settings;u&&S.sandbox!==E.sandbox&&(S={...S,sandboxCredentialId:void 0},S.sandbox!=="e2b"&&S.sandbox!=="vercel"&&(S={...S,sandboxImage:void 0,harborEnvironment:void 0,harborCredentialId:void 0})),u&&(S.sandbox!==E.sandbox||S.harborEnvironment!==E.harborEnvironment)&&(S=vw(S,u)),l.current={key:r,settings:S},s(S),bw(r,S)},[u,m]=U.useState(null),[g,p]=U.useState(null),[v,y]=U.useState(0);U.useEffect(()=>{if(!n)return;const S=l.current,E=gw(r)??(S.key===r?S.settings:pw);l.current={key:r,settings:E},s(E);let k=!0,C=0;m(null),p(null);const A=()=>{const O=++C;J4(e,t).then(L=>{if(!k||C!==O)return;const T=vw(l.current.settings,L);l.current={key:r,settings:T},s(T),bw(r,T),m(L),p(null)},L=>{!k||C!==O||(m(null),p(L.message))})};return A(),window.addEventListener("focus",A),()=>{k=!1,window.removeEventListener("focus",A)}},[e,t,n,v,r]);const _=!!u?.available&&!g&&sv.safeParse(a).success&&u.models.includes(a.authorModel)&&u.models.includes(a.verifierModel)&&u.sandboxes.includes(a.sandbox)&&u.credentials.some(S=>S.id===a.modelCredentialId&&S.kind==="openai"&&["api-key","codex-login"].includes(S.auth))&&u.credentials.some(S=>S.id===a.sandboxCredentialId&&S.kind===a.sandbox&&S.auth==="api-key")&&(!(a.sandbox==="e2b"||a.sandbox==="vercel")||u.credentials.some(S=>S.id===a.harborCredentialId&&S.kind===a.harborEnvironment&&S.auth==="api-key"));return{settings:a,setSettings:d,options:u,error:g,valid:_,reload:()=>y(S=>S+1)}}function eR({repoId:e,onStarted:t,disabled:n,variant:r="secondary"}){const[a,s]=U.useState(!1),[l,d]=U.useState(1),[u,m]=U.useState({easy:1,medium:1,hard:1}),[g,p]=U.useState(),[v,y]=U.useState(!1),[_,S]=U.useState(!1),E=U.useRef(!1),k=U.useRef(null),{org:C,fullName:A}=e,{settings:O,setSettings:L,options:T,error:D,valid:M,reload:B}=Jk(C,A,a),Y=async()=>{if(!(l!==2||E.current||_||!M||!Ou(u))){E.current=!0,y(!0),p(void 0);try{const F=await zD({org:C,fullName:A},u,O);s(!1),t?.(F.runId)}catch(F){if(F instanceof Cg&&F.runId)s(!1),t?.(F.runId,F.message);else{const $=!(F instanceof Cg)||(F.status??0)>=500;S($),p($?"Batch start could not be confirmed. Check batch history before starting another.":F.message)}}finally{E.current=!1,y(!1)}}};return h.jsxs(h.Fragment,{children:[h.jsxs(be,{type:"button",variant:r,disabled:n,onClick:()=>{d(1),p(void 0),S(!1),s(!0)},children:[h.jsx(EC,{className:"size-4","aria-hidden":"true"}),"Generate Batch"]}),a&&h.jsxs(mi,{"aria-labelledby":"generate-batch-title",size:"large",initialFocus:k,busy:v,onDismiss:()=>s(!1),children:[h.jsx(pi,{title:"Generate Batch",titleId:"generate-batch-title",description:A,onClose:()=>s(!1),closeRef:k,busy:v}),h.jsx(uk,{step:l,firstStep:"Set Counts"}),h.jsxs("form",{className:"min-w-0",onSubmit:F=>{F.preventDefault(),l===1?Ou(u)&&d(2):Y()},children:[h.jsx("div",{className:"px-4 pb-6 sm:px-6",children:l===1?h.jsxs("fieldset",{className:"m-0 min-w-0 border-0 p-0",children:[h.jsx("legend",{className:"mb-4 text-sm font-medium",children:"Candidates"}),h.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{tier:"easy",label:"Easy"},{tier:"medium",label:"Medium"},{tier:"hard",label:"Hard"}].map(({tier:F,label:$})=>h.jsxs("label",{htmlFor:`batch-${F}`,className:qn,children:[$,h.jsx(Nn,{id:`batch-${F}`,"aria-label":`${$} Candidates`,type:"number",min:"0",max:"10000",step:"1",required:!0,value:Number.isNaN(u[F])?"":u[F],disabled:v,onChange:q=>m(ne=>({...ne,[F]:q.target.valueAsNumber}))})]},F))}),h.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"1–10,000 candidates total."})]}):h.jsx("div",{children:D?h.jsxs("div",{role:"alert",className:"space-y-3 text-sm text-destructive",children:[h.jsx("p",{children:D}),h.jsx(be,{type:"button",onClick:B,children:"Try Again"})]}):T?h.jsx(ck,{value:O,onChange:L,options:T,disabled:v}):h.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading generation settings…"})})}),h.jsxs(gi,{className:"sticky bottom-0 justify-between bg-card",children:[h.jsx("span",{className:"text-sm text-muted-foreground",children:Ou(u)?`${u.easy+u.medium+u.hard} Candidates`:"Set Candidate Counts"}),h.jsxs("div",{className:"ml-auto flex gap-3",children:[l===2&&h.jsx(be,{type:"button",variant:"ghost",disabled:v,onClick:()=>d(1),children:"Back"}),h.jsx(be,{type:"submit",variant:"primary",disabled:v||_||!Ou(u)||l===2&&!M,children:v?"Starting…":l===1?"Continue":"Generate"})]})]})]}),g&&h.jsxs("p",{className:"border-t border-border p-4 text-sm text-destructive sm:px-6",role:"alert",children:[g,_&&h.jsx($e,{to:ss(A),className:"mt-2 block text-foreground underline",children:"View Batches"})]})]})]})}function et({className:e=""}){return h.jsx("span",{"aria-hidden":"true",className:`block animate-pulse rounded-md bg-muted motion-reduce:animate-none ${e}`})}function ci({label:e,rows:t=3}){return h.jsxs("div",{role:"status","aria-label":e,className:"divide-y divide-border border border-border bg-card",children:[h.jsx("span",{className:"sr-only",children:e}),["first","second","third","fourth"].slice(0,t).map(n=>h.jsxs("div",{className:"flex items-center gap-4 px-4 py-4","aria-hidden":"true",children:[h.jsx(et,{className:"size-8 shrink-0"}),h.jsxs("div",{className:"min-w-0 flex-1 space-y-3",children:[h.jsx(et,{className:"h-3.5 w-36 max-w-full"}),h.jsx(et,{className:"h-3 w-56 max-w-full"})]}),h.jsx(et,{className:"hidden h-5 w-20 sm:block"})]},n))]})}function o5(){return h.jsxs("div",{className:"min-h-screen md:pl-64",role:"status","aria-label":"Loading Workspace",children:[h.jsx("span",{className:"sr-only",children:"Loading workspace…"}),h.jsxs("aside",{"aria-hidden":"true",className:"fixed inset-y-0 left-0 hidden w-64 space-y-6 border-r border-border bg-background p-4 md:block",children:[h.jsx(et,{className:"h-8 w-36"}),h.jsx(et,{className:"h-10 w-full"}),h.jsx(et,{className:"h-4 w-28"}),h.jsx(et,{className:"h-4 w-32"})]}),h.jsx("div",{"aria-hidden":"true",className:"flex h-14 items-center justify-end border-b border-border px-6",children:h.jsx(et,{className:"size-7"})}),h.jsxs("div",{className:"space-y-6 px-6 py-6","aria-hidden":"true",children:[h.jsx(et,{className:"h-6 w-52"}),h.jsx(et,{className:"h-4 w-80 max-w-full"}),h.jsx(ci,{label:"Loading Content"})]})]})}const tR=U.createContext({session:{status:"loading"},signOut:async()=>{}});function lv(){return U.useContext(tR)}async function s5(){try{const e=await fetch("/api/me",{headers:{accept:"application/json"}});if(!e.ok)return{status:"anonymous"};const t=await e.json();return{status:"signed-in",user:t.user,orgs:t.orgs??[]}}catch{return{status:"anonymous"}}}async function l5(){await fetch("/auth/logout",{method:"POST"})}const nR="selfbench.org";function c5(e){let t=null;try{t=window.localStorage.getItem(nR)}catch{}return e.find(n=>n.login.toLowerCase()===t?.toLowerCase())??e.find(n=>n.kind==="user")??e[0]}function u5(e){try{window.localStorage.setItem(nR,e)}catch{}}function er(e){U.useEffect(()=>{const t=document.title;return document.title=e,()=>{document.title=t}},[e])}const rR=U.createContext(null);function d5({repoId:e,children:t}){const{org:n,fullName:r}=e,[a,s]=U.useState(null),[l,d]=U.useState({}),[u,m]=U.useState({}),[g,p]=U.useState(null),[v,y]=U.useState(!0),[_,S]=U.useState(0),E=U.useRef(()=>{}),k=U.useCallback(()=>E.current(),[]);return U.useEffect(()=>{let C=!1,A=!1,O=!1,L;const T=new Map,D=new Set,M=async(Y=!1)=>{if(C)return;if(A){O||=Y;return}A=!0,clearTimeout(L),y(!0);let F=!1,$=!1;try{const q=await PD({org:n,fullName:r});if(C)return;s(q.batches),p(null);for(const ne of q.batches){const se=T.get(ne.runId);if(!(!Y&&se&&ai(se.phase)&&!D.has(ne.runId)))try{const z=await zC({org:n,fullName:r},ne.runId);if(C)return;$||=JSON.stringify(se)!==JSON.stringify(z),T.set(ne.runId,z),D.delete(ne.runId),d(G=>({...G,[ne.runId]:z})),m(G=>{const ie={...G};return delete ie[ne.runId],ie}),F||=!ai(z.phase)}catch(z){if(C)return;F=!0,D.add(ne.runId),m(G=>({...G,[ne.runId]:z instanceof Error?z.message:"Could not load batch status."}))}}}catch(q){C||p(q instanceof Error?q.message:"Could not load batches.")}finally{A=!1,C||($&&S(q=>q+1),y(!1),O?(O=!1,M(!0)):L=setTimeout(()=>{M()},F?5e3:15e3))}},B=()=>{M(!0)};return E.current=B,window.addEventListener("focus",B),M(),()=>{C=!0,clearTimeout(L),E.current=()=>{},window.removeEventListener("focus",B)}},[n,r]),h.jsx(rR.Provider,{value:{repoId:e,runs:a,statuses:l,errors:u,error:g,refreshing:v,revision:_,refresh:k},children:t})}function wf(){const e=U.useContext(rR);if(!e)throw new Error("Batch history requires a repository context");return e}const yw="grid grid-cols-[minmax(0,1fr)_auto] gap-x-4 gap-y-2 md:grid-cols-[minmax(0,1fr)_10rem_12rem_1rem]";function f5(){const{repoId:e,runs:t,statuses:n,errors:r,error:a,refreshing:s,refresh:l}=wf(),d=ta();return er(`Batches · ${e.fullName} · self-bench`),h.jsxs(Ba,{children:[h.jsx(hi,{title:"Batches",description:"Track task generation and revisit past batches.",children:h.jsx(eR,{variant:"primary",repoId:e,onStarted:(u,m)=>{l(),d(ss(e.fullName,u),{state:{batchStartWarning:m}})}})}),a&&h.jsxs(ft,{className:"mb-4",children:[a,h.jsx(be,{disabled:s,onClick:l,children:"Try Again"})]}),!t&&!a&&h.jsx(ci,{label:"Loading Batches"}),t?.length===0&&h.jsx(wr,{title:"No Batches Yet",children:"Generate a batch to create tasks from repository changes."}),!!t?.length&&h.jsxs("section",{className:"border border-border bg-card","aria-label":"Batch History",children:[h.jsxs("div",{className:`${yw} border-b border-border bg-muted/30 px-4 py-3 text-xs tracking-wider text-muted-foreground uppercase max-md:hidden`,"aria-hidden":"true",children:[h.jsx("span",{children:"Batch"}),h.jsx("span",{children:"Status"}),h.jsx("span",{children:"Progress"}),h.jsx("span",{})]}),h.jsx("ul",{className:"divide-y divide-border",children:t.map(u=>{const m=n[u.runId];return h.jsx("li",{children:h.jsxs($e,{to:ss(e.fullName,u.runId),className:`${yw} items-center px-4 py-3 hover:bg-muted/50`,children:[h.jsxs("span",{className:"min-w-0",children:[h.jsx("span",{className:"block text-sm font-medium",children:Rg(u.runId)}),h.jsxs("span",{className:"mt-1 block truncate text-xs text-muted-foreground",children:[h.jsx("time",{dateTime:u.attachedAt,children:tk(u.attachedAt)})," ·"," ",u.attachedBy]})]}),h.jsx("span",{className:"max-md:col-start-1 max-md:row-start-2",children:r[u.runId]?h.jsx("span",{className:"text-xs text-destructive",children:"Status Unavailable"}):h.jsx(nk,{phase:m?.phase})}),h.jsx("span",{className:"text-xs leading-5 text-muted-foreground max-md:col-start-1 max-md:row-start-3",children:m?h.jsxs(h.Fragment,{children:[h.jsxs("span",{children:[m.discovered??"—"," Discovered"]}),h.jsx("span",{className:"mx-2 text-muted-foreground",children:"/"}),h.jsxs("span",{children:[m.accepted??"—"," Verified"]})]}):"—"}),h.jsx(hf,{className:"size-4 text-muted-foreground max-md:col-start-2 max-md:row-start-1","aria-hidden":"true"})]})},u.runId)})})]})]})}function h5({status:e}){const t=e.discovery,n=e.phase==="blocked"||e.phase==="failed",r=t?Math.min(t.totalShards,t.completedShards+t.failedShards):0;return h.jsxs("section",{className:"border border-border bg-card","aria-label":"Batch Progress",children:[h.jsx("div",{className:"border-b border-border px-4 py-3",children:h.jsx("p",{className:Se("max-w-3xl break-words text-sm leading-6",n?"text-destructive":"text-muted-foreground"),children:LI(e)})}),h.jsx("dl",{className:"grid grid-cols-2 border-b border-border md:grid-cols-4",children:[["Requested",e.requested],["Discovered",e.discovered],["Verified",e.accepted],["Rejected",e.rejected]].map(([a,s],l)=>h.jsxs("div",{className:Se("min-w-0 border-border px-4 py-4",l%2===0&&"border-r border-border",l<2&&"max-md:border-b",l===1&&"md:border-r"),children:[h.jsx("dt",{className:"text-xs text-muted-foreground",children:a}),h.jsx("dd",{className:"mt-2 text-2xl font-medium tabular-nums",children:s??"—"})]},a))}),t&&h.jsxs("div",{className:"p-4 sm:p-5",children:[h.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2 text-xs",children:[h.jsxs("h2",{className:"font-medium",children:["Discovery · Wave ",t.wave+1]}),h.jsxs("span",{className:"text-muted-foreground",children:[r," / ",t.totalShards," Shards Finished"]})]}),t.totalShards>0&&h.jsxs("div",{role:"progressbar","aria-label":"Discovery Shards Finished","aria-valuemin":0,"aria-valuemax":t.totalShards,"aria-valuenow":r,className:"flex h-1.5 overflow-hidden bg-muted",children:[h.jsx("span",{className:"bg-success",style:{width:`${t.completedShards/t.totalShards*100}%`}}),h.jsx("span",{className:"bg-destructive",style:{width:`${t.failedShards/t.totalShards*100}%`}})]}),h.jsxs("div",{className:"mt-3 flex flex-wrap gap-x-5 gap-y-1 text-xs text-muted-foreground",children:[h.jsxs("span",{children:[t.completedShards," Complete"]}),h.jsxs("span",{className:t.failedShards?"text-destructive":void 0,children:[t.failedShards," Failed"]}),h.jsxs("span",{children:[Math.max(0,t.totalShards-r)," Pending"]})]})]}),e.requestedByDifficulty&&h.jsxs("p",{className:"border-t border-border px-4 py-3 text-xs text-muted-foreground sm:px-5",children:["Requested: ",e.requestedByDifficulty.easy," easy ·"," ",e.requestedByDifficulty.medium," medium · ",e.requestedByDifficulty.hard," hard"]})]})}const iR={needs_review:"Needs Review",accepted:"Accepted",rejected:"Rejected",failed:"Failed",in_progress:"In Progress"};function aR({state:e}){const t={needs_review:"text-brand",accepted:"text-success",rejected:"text-muted-foreground",failed:"text-destructive",in_progress:"text-brand"};return h.jsx("span",{className:`inline-flex items-center gap-2 whitespace-nowrap text-xs leading-5 before:size-1.5 before:shrink-0 before:bg-current before:content-[''] ${t[e]}`,children:iR[e]})}function oR({difficulty:e}){const t={easy:"Easy",medium:"Medium",hard:"Hard"};return h.jsx("span",{className:"whitespace-nowrap text-xs leading-5 text-muted-foreground",children:t[e]??e})}function cv(e){const t=e.sourcePr??e.taskId.match(/-pr-(\d+)$/)?.[1];return t?`PR #${t}`:"Task"}const m5={authoring:"Authoring",verifying:"Verifying",reviewing:"Reviewing",infrastructure_failed:"Failed",rejected:"Rejected",accepted:"Verified"};function p5({status:e,fullName:t}){return h.jsxs("section",{className:"mt-6",children:[h.jsx(gf,{title:"Tasks",children:h.jsxs($e,{to:`/repos/${t}`,className:"inline-flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground",children:["View Dataset",h.jsx(hf,{className:"size-3.5","aria-hidden":"true"})]})}),e.tasks?.length?h.jsx("ul",{className:"divide-y divide-border border border-border bg-card","aria-label":"Batch Tasks",children:e.tasks.map(n=>{const r=ai(e.phase)&&!["accepted","rejected","infrastructure_failed"].includes(n.status);return h.jsx("li",{children:h.jsxs($e,{to:`/repos/${t}/tasks/${encodeURIComponent(e.runId)}/${encodeURIComponent(n.taskId)}`,className:"grid items-center gap-3 px-4 py-3 hover:bg-muted/50 md:grid-cols-[minmax(0,1fr)_5rem_10rem]",children:[h.jsxs("span",{className:"min-w-0",children:[h.jsx("span",{className:"block break-words text-sm",children:cv({taskId:n.candidateId})}),n.reason&&h.jsx("span",{className:"mt-1 block break-words text-xs text-muted-foreground",children:n.reason})]}),h.jsxs("span",{className:"flex flex-wrap items-center gap-4 md:contents",children:[h.jsx(oR,{difficulty:n.difficulty}),h.jsxs("span",{className:e.activity?.[n.candidateId]==="running"?"text-xs text-brand":"text-xs text-muted-foreground",children:[e.activity?.[n.candidateId]==="running"?"Running · ":e.activity?.[n.candidateId]==="queued"?"Queued · ":"",r?"Stopped":m5[n.status],n.round!==void 0?` · Round ${n.round}`:""]})]})]})},n.candidateId)})}):h.jsx(wr,{className:"border-solid",title:e.tasks?ai(e.phase)?"No Tasks Generated":"No Tasks Yet":"Task Details Unavailable",children:e.tasks&&!ai(e.phase)?"Tasks will appear here as generation progresses.":e.tasks?"There are no tasks to review from this batch.":"Any saved tasks are available in the dataset."})]})}function g5({repoId:e,runId:t,onCancelled:n}){const[r,a]=U.useState(!1),[s,l]=U.useState(!1),[d,u]=U.useState(!1),[m,g]=U.useState(),p=U.useRef(!1),v=U.useRef(null),y=U.useId();return h.jsxs(h.Fragment,{children:[h.jsx(be,{disabled:d,onClick:()=>a(!0),children:d?"Cancellation Requested…":"Cancel Batch"}),r&&h.jsxs(mi,{initialFocus:v,onDismiss:()=>a(!1),busy:s,size:"small","aria-labelledby":y,children:[h.jsx(pi,{title:"Cancel Batch?",titleId:y,onClose:()=>a(!1),busy:s}),h.jsxs(gs,{children:[h.jsx("p",{className:"text-sm text-muted-foreground",children:"Stop generation for this batch? Tasks already generated will remain in the dataset."}),m&&h.jsx(ft,{children:m})]}),h.jsxs(gi,{children:[h.jsx(be,{ref:v,disabled:s,onClick:()=>a(!1),children:"Keep Running"}),h.jsx(be,{variant:"destructive",disabled:s,onClick:async()=>{if(!p.current){p.current=!0,l(!0),g(void 0);try{await $D(e,t),u(!0),a(!1),n()}catch(_){g(_ instanceof Error?_.message:"Could not cancel batch.")}finally{p.current=!1,l(!1)}}},children:s?"Cancelling…":"Cancel Batch"})]})]})]})}function b5(){const{batchId:e=""}=fi(),{state:t}=pn(),{repoId:n,runs:r,statuses:a,errors:s,error:l,refreshing:d,refresh:u}=wf(),m=r?.find(v=>v.runId===e),g=a[e],p=s[e];return er(`${Rg(e)} · ${n.fullName} · self-bench`),h.jsxs(Ba,{children:[h.jsxs($e,{to:ss(n.fullName),className:"mb-5 inline-flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground",children:[h.jsx(_D,{className:"size-3.5","aria-hidden":"true"}),"Back to Batches"]}),h.jsxs(hi,{title:Rg(e),description:m?h.jsxs(h.Fragment,{children:[h.jsx("time",{dateTime:m.attachedAt,children:tk(m.attachedAt)})," · Started by"," ",m.attachedBy]}):void 0,children:[g&&h.jsx(nk,{phase:g.phase}),g&&!ai(g.phase)&&h.jsx(g5,{repoId:n,runId:e,onCancelled:u},e)]}),!g&&t?.batchStartWarning&&h.jsx(ft,{tone:"info",className:"mb-4",children:t.batchStartWarning}),(l||p)&&h.jsxs(ft,{className:"mb-4",children:[h.jsxs("span",{children:[g?"Status could not be refreshed. Showing the last update. ":"",l||p]}),h.jsx(be,{disabled:d,onClick:u,children:"Try Again"})]}),!m&&!l&&(r===null||d)&&h.jsx(ci,{label:"Loading Batch"}),!m&&r!==null&&!d&&!l&&h.jsx(wr,{title:"Batch Not Found",children:"This batch is not in this repository."}),m&&!g&&!p&&h.jsx(ci,{label:"Loading Batch Status"}),m&&g&&h.jsxs(h.Fragment,{children:[g.activity&&h.jsxs("div",{className:"mb-4 border-l-2 border-brand bg-brand/5 px-4 py-3 text-sm",role:"status",children:[Object.values(g.activity).filter(v=>v==="running").length," running · ",Object.values(g.activity).filter(v=>v==="queued").length," queued"]}),h.jsx(h5,{status:g}),h.jsx(p5,{status:g,fullName:n.fullName})]}),m&&h.jsxs("dl",{className:"mt-6 border-t border-border pt-4 text-xs text-muted-foreground",children:[h.jsx("dt",{className:"mb-1",children:"Batch ID"}),h.jsx("dd",{className:"break-all select-all",children:m.runId})]})]})}const $d=["codex","claude-code","pi","mini-swe-agent","terminus-2"],Va={codex:"Codex","claude-code":"Claude Code",pi:"Pi","mini-swe-agent":"Mini-SWE-Agent","terminus-2":"Terminus 2"},v5=$d.map(e=>({id:e,label:Va[e]}));function sR(e,t){return`/api/orgs/${encodeURIComponent(e)}/repos/${t.split("/").map(encodeURIComponent).join("/")}/evaluations`}function uv(){const e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}class dv extends Error{constructor(t,n){super(t),this.status=n}status}async function jt(e,t){const n=await fetch(e,t?{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}:void 0);if(n.status===401)throw window.location.assign("/login"),new Error("Session expired. Please sign in again.");if(!n.ok){const r=await n.json().catch(()=>({}));throw new dv(r.error??`Request failed (${n.status}). Retry with the same selection to avoid duplicate runs.`,n.status)}return n.json()}const y5={"openai-astra6":[10,50,1,12.5],"openai-sol56":[4,20,.4,5],"openai-terra56":[2,12,.2,2.5],"openai-luna56":[.2,1.2,.02,.25],"anthropic-fable51":[10,50,.25,12.5],"anthropic-opus5":[5,25,.5,6.25],"anthropic-sonnet5":[2,10,.2,2.5],"router-astra6":[10,50,1,12.5],"router-sol56":[2,10,.2,2.5],"router-terra56":[2,12,.2,2.5],"router-luna56":[.2,1.2,.02,.25],"router-opus5":[5,25,.5,6.25],"router-fable51":[10,50,.25,12.5],"router-sonnet5":[2,10,.2,2.5]};function xw(e){const t=y5[e.id];if(!t)return e;const[n,r,a,s]=t;return{...e,pricing:{input:n,output:r,cacheRead:a,cacheWrite:s,source:e.provider==="anthropic"?"https://platform.claude.com/docs/en/about-claude/pricing":e.source,asOf:"2026-09-06",maxInputTokens:2e5}}}const lR=["default","off","minimal","low","medium","high","xhigh","max"],x5={"z-ai/glm-5.3":["default","low","high","max"],"z-ai/glm-5.3-flash":["default","low","high","max"],"deepseek/deepseek-v4-pro":["default","off","low","high","max"],"deepseek/deepseek-v4-flash-0731":["default","off","low","high","max"],"deepseek/deepseek-v4.1-flash":["default","off","low","high","xhigh","max"]},_w={openai:["codex","pi","mini-swe-agent","terminus-2"],anthropic:["claude-code","pi","mini-swe-agent","terminus-2"]},cR={"openai-astra6":"openai/gpt-6-astra","openai-sol56":"openai/gpt-5.6-sol","openai-terra56":"openai/gpt-5.6-terra","openai-luna56":"openai/gpt-5.6-luna","anthropic-fable51":"anthropic/claude-fable-5.1","anthropic-opus5":"anthropic/claude-opus-5","anthropic-sonnet5":"anthropic/claude-sonnet-5"};function _5(e){const t=cR[e.id]??(e.provider==="openrouter"||e.provider==="custom"?e.model:`${e.provider}/${e.model}`),n=_w[e.provider]??_w.openai??[],{pricing:r,...a}=e;return[...e.provider!=="openrouter"?[xw({...e,harnesses:[...n]})]:[],...e.provider==="custom"?[{...a,provider:"openai",harnesses:[...n]}]:[],xw({...a,id:e.id.replace(/^(openai|anthropic)-/,"router-"),provider:"openrouter",model:t,harnesses:[...$d]})]}function $l(e,t){return _5(e).find(n=>n.provider===t)}function Ud(e,t){if(t.some(a=>a==="mini-swe-agent"||a==="terminus-2"))return["default"];const n=e.provider==="custom"?void 0:x5[e.model];if(!n&&!cR[e.id])return["default"];const r=n?[...n]:["default","low","medium","high","xhigh","max"];return!n&&e.id.startsWith("openai-")&&e.id!=="openai-astra6"&&r.unshift("off"),r.filter(a=>a!=="default"&&(!t.includes("pi")||a!=="max"))}const uR=zd(Pa({runId:at().min(1).max(100),taskId:at().min(1).max(200)})),S5=Pa({submitted:y4(),draft:Pa({id:vd(),tasks:uR,models:zd(Pa({catalogId:at().max(80),credentialId:at().max(36),thinking:hn(lR).optional(),customModel:at().max(200).optional(),harnesses:zd(hn($d)).max($d.length)})).max(12),sandbox:hn(["e2b","modal","daytona"]),sandboxCredentialId:at().max(36)})});function dR(e,t){if(e&&t===null)try{const r=S5.safeParse(JSON.parse(e));if(r.success)return r.data.draft.models.length||(r.data.draft.models=[{catalogId:"",credentialId:"",harnesses:[]}]),r.data}catch{}let n=[];if(t)try{const r=uR.safeParse(JSON.parse(t));r.success&&(n=r.data)}catch{}return{submitted:!1,draft:{id:uv(),tasks:n,models:[{catalogId:"",credentialId:"",harnesses:[]}],sandbox:"e2b",sandboxCredentialId:""}}}class fR extends Error{}async function w5(e,t){try{return await jt(`${e}/comparisons`,t)}catch(n){try{return await jt(`${e}/comparisons/${t.id}`)}catch(r){throw r instanceof dv&&r.status===404?new fR(n instanceof Error?n.message:"Comparison was not saved."):n}}}function E5(e,t){try{const n=`selfbench-run:${e}`,r=sessionStorage.getItem(n);if(!r)return;const a=dR(r,null);a.draft.id===t&&sessionStorage.setItem(n,JSON.stringify({...a,submitted:!1}))}catch{}}const C5={default:"model default",off:"off",minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"};function Zl(e){return e?C5[e]:"Not Recorded"}function hR(){return h.jsx("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:h.jsxs("g",{fill:"currentColor",children:[h.jsx("path",{d:"M227.174 643.267C309.13 501.04 353.3 382.247 461.711 379.747c100.278 6.927 172.975 162.686 217.376 263.52h110.942c-81.304-117.797-196.325-301.555-326.906-303.36-166.044-4.954-236.495 312.426-235.949 303.36"}),h.jsx("path",{d:"M657.933 552.765h177.78V487.33l-224.079 18.712 44.162 15.727zM327.444 446.849h14.02v89.346h-14.02z"}),h.jsx("path",{d:"M368.884 403.285h13.92v129.377h-13.92z"}),h.jsx("path",{d:"M413.178 382.234h13.886v144.712h-13.886zm48.935-4.033h13.886v144.712h-13.886z"}),h.jsx("path",{d:"M525.783 410.11h.44v-.31h-.44zm-13.447.421v118.442h13.887V423.498a300 300 0 0 0-13.887-12.967"}),h.jsx("path",{d:"m593.563 507.768-329.946 33.841-85.683 11.157h444.87c-9.563-15.205-19.29-30.327-29.241-44.998"})]})})}function mR({compact:e=!1,showName:t=!0}){return h.jsxs($e,{className:"inline-flex min-w-0 items-center gap-2.5 text-foreground",to:"/","aria-label":"self-bench by dari.dev Home",children:[h.jsx("span",{className:e?"inline-flex size-6 shrink-0 items-center justify-center rounded-[50%] border border-white/40 text-foreground [&>svg]:size-4":"size-9 shrink-0 text-foreground",children:h.jsx(hR,{})}),t&&h.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[h.jsx("strong",{className:e?"text-sm leading-none font-medium":"text-lg leading-none font-medium",children:"self-bench"}),h.jsx("span",{className:"text-xs leading-none text-muted-foreground",children:"by dari.dev"})]})]})}var k5=Object.defineProperty,fv=(e,t)=>k5(e,"name",{value:t,configurable:!0});function Pg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}fv(Pg,"setRef");function pR(...e){return t=>{let n=!1;const r=e.map(a=>{const s=Pg(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():Pg(e[a],null)}}}}fv(pR,"composeRefs");function qt(...e){return R.useCallback(pR(...e),e)}fv(qt,"useComposedRefs");var R5=Object.defineProperty,ur=(e,t)=>R5(e,"name",{value:t,configurable:!0});function Qi(e){const t=R.forwardRef((n,r)=>{let{children:a,...s}=n,l=null,d=!1;const u=[];zg(a)&&typeof Bu=="function"&&(a=Bu(a._payload)),R.Children.forEach(a,v=>{if(yR(v)){d=!0;const y=v;let _="child"in y.props?y.props.child:y.props.children;zg(_)&&typeof Bu=="function"&&(_=Bu(_._payload)),l=N5(y,_),u.push(l?.props?.children)}else u.push(v)}),l?l=R.cloneElement(l,void 0,u):!d&&R.Children.count(a)===1&&R.isValidElement(a)&&(l=a);const m=l?vR(l):void 0,g=qt(r,m);if(!l){if(a||a===0)throw new Error(d?O5(e):L5(e));return a}const p=bR(s,l.props??{});return l.type!==R.Fragment&&(p.ref=r?g:m),R.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}ur(Qi,"createSlot");var A5=Qi("Slot"),gR=Symbol.for("radix.slottable");function T5(e){const t=ur(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=gR,t}ur(T5,"createSlottable");var N5=ur((e,t)=>{if("child"in e.props){const n=e.props.child;return R.isValidElement(n)?R.cloneElement(n,void 0,e.props.children(n.props.children)):null}return R.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function bR(e,t){const n={...t};for(const r in t){const a=e[r],s=t[r];/^on[A-Z]/.test(r)?a&&s?n[r]=(...d)=>{const u=s(...d);return a(...d),u}:a&&(n[r]=a):r==="style"?n[r]={...a,...s}:r==="className"&&(n[r]=[a,s].filter(Boolean).join(" "))}return{...e,...n}}ur(bR,"mergeProps");function vR(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ur(vR,"getElementRef");function yR(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gR}ur(yR,"isSlottable");var j5=Symbol.for("react.lazy");function zg(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===j5&&"_payload"in e&&xR(e._payload)}ur(zg,"isLazyComponent");function xR(e){return typeof e=="object"&&e!==null&&"then"in e}ur(xR,"isPromiseLike");var L5=ur(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),O5=ur(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Bu=fs[" use ".trim().toString()];const Sw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ww=UC,D5=(e,t)=>n=>{var r;if(t?.variants==null)return ww(e,n?.class,n?.className);const{variants:a,defaultVariants:s}=t,l=Object.keys(a).map(m=>{const g=n?.[m],p=s?.[m];if(g===null)return null;const v=Sw(g)||Sw(p);return a[m][v]}),d=n&&Object.entries(n).reduce((m,g)=>{let[p,v]=g;return v===void 0||(m[p]=v),m},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((m,g)=>{let{class:p,className:v,...y}=g;return Object.entries(y).every(_=>{let[S,E]=_;return Array.isArray(E)?E.includes({...s,...d}[S]):{...s,...d}[S]===E})?[...m,p,v]:m},[]);return ww(e,l,u,n?.class,n?.className)};function I5({className:e,...t}){return h.jsx(be,{"data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:Se("h-7 w-7",e),...t,children:h.jsx(LD,{strokeWidth:1.5,"aria-hidden":"true"})})}function M5({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-inset",className:Se("relative flex w-full min-w-0 flex-1 flex-col bg-background",e),...t})}function P5({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-group",className:Se("relative flex w-full min-w-0 flex-col p-2",e),...t})}function z5({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-group-content",className:Se("w-full text-sm",e),...t})}function $5({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-header",className:Se("flex flex-col gap-2 p-2",e),...t})}function U5({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-content",className:Se("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]/sidebar:overflow-hidden",e),...t})}function H5({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-group-label",className:Se("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]/sidebar:-mt-8 group-data-[collapsible=icon]/sidebar:opacity-0",e),...t})}function B5({className:e,...t}){return h.jsx("div",{"data-slot":"sidebar-footer",className:Se("flex flex-col gap-2 p-2",e),...t})}function V5({className:e,...t}){return h.jsx("ul",{"data-slot":"sidebar-menu",className:Se("flex w-full min-w-0 flex-col gap-1",e),...t})}function Ap({className:e,...t}){return h.jsx("li",{"data-slot":"sidebar-menu-item",className:Se("group/menu-item relative",e),...t})}const F5=D5("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-data-[collapsible=icon]/sidebar:!size-8 group-data-[collapsible=icon]/sidebar:!p-2 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{active:{true:"data-[active=true]:text-brand",false:"text-sidebar-foreground"},size:{default:"h-8 text-sm",lg:"h-12 text-sm"}},defaultVariants:{active:!1,size:"default"}});function Tp({asChild:e=!1,isActive:t=!1,size:n="default",className:r,...a}){const s=e?A5:"button";return h.jsx(s,{"data-slot":"sidebar-menu-button","data-active":t,className:Se(F5({active:t,size:n}),r),...a})}function G5({trigger:e,children:t,label:n,className:r,align:a="right",above:s=!1}){const[l,d]=U.useState(!1),u=U.useRef(null),m=U.useRef(null),g=U.useCallback(()=>d(!1),[]);return U.useEffect(()=>{if(!l)return;const p=y=>{u.current?.contains(y.target)||d(!1)},v=y=>{y.key==="Escape"&&(d(!1),m.current?.focus())};return document.addEventListener("pointerdown",p),document.addEventListener("keydown",v),()=>{document.removeEventListener("pointerdown",p),document.removeEventListener("keydown",v)}},[l]),h.jsxs("div",{className:`relative ${r??""}`,ref:u,children:[h.jsxs("button",{type:"button",className:"group/trigger flex h-9 items-center gap-2 border border-transparent bg-transparent pr-2.5 pl-2 font-mono text-sm font-medium text-foreground hover:border-input hover:bg-muted aria-expanded:border-input aria-expanded:bg-muted",ref:m,"aria-haspopup":"menu","aria-expanded":l,"aria-label":n,onClick:()=>d(p=>!p),children:[e,h.jsx("svg",{className:"h-1.5 w-2.5 text-muted-foreground transition-transform group-aria-expanded/trigger:rotate-180 group-aria-expanded/trigger:text-brand",viewBox:"0 0 10 6","aria-hidden":"true",children:h.jsx("path",{d:"M1 1l4 4 4-4",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})})]}),l&&h.jsx("div",{className:`absolute ${s?"bottom-[calc(100%+6px)]":"top-[calc(100%+6px)]"} z-10 min-w-[220px] border border-input bg-muted ${a==="right"?"right-0":"right-0 sm:right-auto sm:left-0"}`,role:"menu","aria-label":n,children:t(g)})]})}function hv({login:e,url:t,size:n=24}){return t?h.jsx("img",{className:"block shrink-0 bg-accent",src:t,alt:"",width:n,height:n}):h.jsx("span",{className:"grid shrink-0 place-items-center border border-input bg-accent font-mono text-xs font-medium text-brand",style:{width:n,height:n},"aria-hidden":"true",children:e.slice(0,1).toUpperCase()})}var q5=Object.defineProperty,xs=(e,t)=>q5(e,"name",{value:t,configurable:!0}),_R=!!(typeof window<"u"&&window.document&&window.document.createElement);function We(e,t,{checkForDefaultPrevented:n=!0}={}){return xs(function(a){if(e?.(a),n===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}xs(We,"composeEventHandlers");function Z5(e){if(!_R)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}xs(Z5,"getOwnerWindow");function $g(e){if(!_R)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}xs($g,"getOwnerDocument");function SR(e,t=!1){const{activeElement:n}=$g(e);if(!n?.nodeName)return null;if(wR(n)&&n.contentDocument)return SR(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const a=$g(n).getElementById(r);if(a)return a}}return n}xs(SR,"getActiveElement");function wR(e){return e.tagName==="IFRAME"}xs(wR,"isFrame");var W5=Object.defineProperty,Zn=(e,t)=>W5(e,"name",{value:t,configurable:!0});function Y5(e,t){const n=R.createContext(t);n.displayName=e+"Context";const r=Zn(s=>{const{children:l,...d}=s,u=R.useMemo(()=>d,Object.values(d));return h.jsx(n.Provider,{value:u,children:l})},"Provider");r.displayName=e+"Provider";function a(s,l={}){const{optional:d=!1}=l,u=R.useContext(n);if(u)return u;if(t!==void 0)return t;if(!d)throw new Error(`\`${s}\` must be used within \`${e}\``)}return Zn(a,"useContext"),[r,a]}Zn(Y5,"createContext");function Wa(e,t=[]){let n=[];function r(s,l){const d=R.createContext(l);d.displayName=s+"Context";const u=n.length;n=[...n,l];const m=Zn(p=>{const{scope:v,children:y,..._}=p,S=v?.[e]?.[u]||d,E=R.useMemo(()=>_,Object.values(_));return h.jsx(S.Provider,{value:E,children:y})},"Provider");m.displayName=s+"Provider";function g(p,v,y={}){const{optional:_=!1}=y,S=v?.[e]?.[u]||d,E=R.useContext(S);if(E)return E;if(l!==void 0)return l;if(!_)throw new Error(`\`${p}\` must be used within \`${s}\``)}return Zn(g,"useContext"),[m,g]}Zn(r,"createContext");const a=Zn(()=>{const s=n.map(l=>R.createContext(l));return Zn(function(d){const u=d?.[e]||s;return R.useMemo(()=>({[`__scope${e}`]:{...d,[e]:u}}),[d,u])},"useScope")},"createScope");return a.scopeName=e,[r,ER(a,...t)]}Zn(Wa,"createContextScope");function ER(...e){const t=e[0];if(e.length===1)return t;const n=Zn(()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return Zn(function(s){const l=r.reduce((d,{useScope:u,scopeName:m})=>{const p=u(s)[`__scope${m}`];return{...d,...p}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Zn(ER,"composeContextScopes");var lr=globalThis?.document?R.useLayoutEffect:()=>{},K5=Object.defineProperty,X5=(e,t)=>K5(e,"name",{value:t,configurable:!0}),Ew=fs[" useEffectEvent ".trim().toString()],Cw=fs[" useInsertionEffect ".trim().toString()];function CR(e){if(typeof Ew=="function")return Ew(e);const t=R.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Cw=="function"?Cw(()=>{t.current=e}):lr(()=>{t.current=e}),R.useMemo(()=>((...n)=>t.current?.(...n)),[])}X5(CR,"useEffectEvent");var Q5=Object.defineProperty,uc=(e,t)=>Q5(e,"name",{value:t,configurable:!0}),J5=fs[" useInsertionEffect ".trim().toString()]||lr;function mv({prop:e,defaultProp:t,onChange:n=uc(()=>{},"onChange"),caller:r}){const[a,s,l]=kR({defaultProp:t,onChange:n}),d=e!==void 0,u=d?e:a,m=R.useCallback(g=>{if(d){const p=RR(g)?g(e):g;p!==e&&l.current?.(p)}else s(g)},[d,e,s,l]);return[u,m]}uc(mv,"useControllableState");function kR({defaultProp:e,onChange:t}){const[n,r]=R.useState(e),a=R.useRef(n),s=R.useRef(t);return J5(()=>{s.current=t},[t]),R.useEffect(()=>{a.current!==n&&(s.current?.(n),a.current=n)},[n,a]),[n,r,s]}uc(kR,"useUncontrolledState");function RR(e){return typeof e=="function"}uc(RR,"isFunction");var kw=Symbol("RADIX:SYNC_STATE");function e3(e,t,n,r){const{prop:a,defaultProp:s,onChange:l,caller:d}=t,u=a!==void 0,m=CR(l),g=[{...n,state:s}];r&&g.push(r);const[p,v]=R.useReducer((E,k)=>{if(k.type===kw)return{...E,state:k.state};const C=e(E,k);return u&&!Object.is(C.state,E.state)&&m(C.state),C},...g),y=p.state,_=R.useRef(y);R.useEffect(()=>{_.current!==y&&(_.current=y,u||m(y))},[y,_,u]);const S=R.useMemo(()=>a!==void 0?{...p,state:a}:p,[p,a]);return R.useEffect(()=>{u&&!Object.is(a,p.state)&&v({type:kw,state:a})},[a,p.state,u]),[S,v]}uc(e3,"useControllableStateReducer");var Ef=ME(),t3=Object.defineProperty,n3=(e,t)=>t3(e,"name",{value:t,configurable:!0}),r3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Dn=r3.reduce((e,t)=>{const n=Qi(`Primitive.${t}`),r=R.forwardRef((a,s)=>{const{asChild:l,...d}=a,u=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(u,{...d,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pv(e,t){e&&Ef.flushSync(()=>e.dispatchEvent(t))}n3(pv,"dispatchDiscreteCustomEvent");var i3=Object.defineProperty,zt=(e,t)=>i3(e,"name",{value:t,configurable:!0});function gv(e){const t=e+"CollectionProvider",[n,r]=Wa(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=zt(S=>{const{scope:E,children:k}=S,C=R.useRef(null),A=R.useRef(new Map).current;return h.jsx(a,{scope:E,itemMap:A,collectionRef:C,children:k})},"CollectionProvider");l.displayName=t;const d=e+"CollectionSlot",u=Qi(d),m=R.forwardRef((S,E)=>{const{scope:k,children:C}=S,A=s(d,k),O=qt(E,A.collectionRef);return h.jsx(u,{ref:O,children:C})});m.displayName=d;const g=e+"CollectionItemSlot",p="data-radix-collection-item",v=Qi(g),y=R.forwardRef((S,E)=>{const{scope:k,children:C,...A}=S,O=R.useRef(null),L=qt(E,O),T=s(g,k);return R.useEffect(()=>(T.itemMap.set(O,{ref:O,...A}),()=>{T.itemMap.delete(O)})),h.jsx(v,{[p]:"",ref:L,children:C})});y.displayName=g;function _(S){const E=s(e+"CollectionConsumer",S);return R.useCallback(()=>{const C=E.collectionRef.current;if(!C)return[];const A=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((T,D)=>A.indexOf(T.ref.current)-A.indexOf(D.ref.current))},[E.collectionRef,E.itemMap])}return zt(_,"useCollection"),[{Provider:l,Slot:m,ItemSlot:y},_,r]}zt(gv,"createCollection");var Rw=new WeakMap,St,Tn,Np=(Tn=class extends Map{constructor(n){super(n);oS(this,St);sp(this,St,[...super.keys()]),Rw.set(this,!0)}set(n,r){return Rw.get(this)&&(this.has(n)?Wt(this,St)[Wt(this,St).indexOf(n)]=n:Wt(this,St).push(n)),super.set(n,r),this}insert(n,r,a){const s=this.has(r),l=Wt(this,St).length,d=bv(n);let u=d>=0?d:l+d;const m=u<0||u>=l?-1:u;if(m===this.size||s&&m===this.size-1||m===-1)return this.set(r,a),this;const g=this.size+(s?0:1);d<0&&u++;const p=[...Wt(this,St)];let v,y=!1;for(let _=u;_<g;_++)if(u===_){let S=p[_];p[_]===r&&(S=p[_+1]),s&&this.delete(r),v=this.get(S),this.set(r,a)}else{!y&&p[_-1]===r&&(y=!0);const S=p[y?_:_-1],E=v;v=this.get(S),this.delete(S),this.set(S,E)}return this}with(n,r,a){const s=new Tn(this);return s.insert(n,r,a),s}before(n){const r=Wt(this,St).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,a){const s=Wt(this,St).indexOf(n);return s===-1?this:this.insert(s,r,a)}after(n){let r=Wt(this,St).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,a){const s=Wt(this,St).indexOf(n);return s===-1?this:this.insert(s+1,r,a)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return sp(this,St,[]),super.clear()}delete(n){const r=super.delete(n);return r&&Wt(this,St).splice(Wt(this,St).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=xd(Wt(this,St),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=xd(Wt(this,St),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return Wt(this,St).indexOf(n)}keyAt(n){return xd(Wt(this,St),n)}from(n,r){const a=this.indexOf(n);if(a===-1)return;let s=a+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,r){const a=this.indexOf(n);if(a===-1)return;let s=a+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,r){let a=0;for(const s of this){if(Reflect.apply(n,r,[s,a,this]))return s;a++}}findIndex(n,r){let a=0;for(const s of this){if(Reflect.apply(n,r,[s,a,this]))return a;a++}return-1}filter(n,r){const a=[];let s=0;for(const l of this)Reflect.apply(n,r,[l,s,this])&&a.push(l),s++;return new Tn(a)}map(n,r){const a=[];let s=0;for(const l of this)a.push([l[0],Reflect.apply(n,r,[l,s,this])]),s++;return new Tn(a)}reduce(...n){const[r,a]=n;let s=0,l=a??this.at(0);for(const d of this)s===0&&n.length===1?l=d:l=Reflect.apply(r,this,[l,d,s,this]),s++;return l}reduceRight(...n){const[r,a]=n;let s=a??this.at(-1);for(let l=this.size-1;l>=0;l--){const d=this.at(l);l===this.size-1&&n.length===1?s=d:s=Reflect.apply(r,this,[s,d,l,this])}return s}toSorted(n){const r=[...this.entries()].sort(n);return new Tn(r)}toReversed(){const n=new Tn;for(let r=this.size-1;r>=0;r--){const a=this.keyAt(r),s=this.get(a);n.set(a,s)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new Tn(r)}slice(n,r){const a=new Tn;let s=this.size-1;if(n===void 0)return a;n<0&&(n=n+this.size),r!==void 0&&r>0&&(s=r-1);for(let l=n;l<=s;l++){const d=this.keyAt(l),u=this.get(d);a.set(d,u)}return a}every(n,r){let a=0;for(const s of this){if(!Reflect.apply(n,r,[s,a,this]))return!1;a++}return!0}some(n,r){let a=0;for(const s of this){if(Reflect.apply(n,r,[s,a,this]))return!0;a++}return!1}},St=new WeakMap,zt(Tn,"OrderedDict"),Tn);function xd(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=AR(e,t);return n===-1?void 0:e[n]}zt(xd,"at");function AR(e,t){const n=e.length,r=bv(t),a=r>=0?r:n+r;return a<0||a>=n?-1:a}zt(AR,"toSafeIndex");function bv(e){return e!==e||e===0?0:Math.trunc(e)}zt(bv,"toSafeInteger");function a3(e){const t=e+"CollectionProvider",[n,r]=Wa(t),[a,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Np,setItemMap:zt(()=>{},"setItemMap")}),l=zt(({state:A,...O})=>A?h.jsx(u,{...O,state:A}):h.jsx(d,{...O}),"CollectionProvider");l.displayName=t;const d=zt(A=>{const O=E();return h.jsx(u,{...A,state:O})},"CollectionInit");d.displayName=t+"Init";const u=zt(A=>{const{scope:O,children:L,state:T}=A,D=R.useRef(null),[M,B]=R.useState(null),Y=qt(D,B),[F,$]=T;return R.useEffect(()=>{if(!M)return;const q=jR(()=>{});return q.observe(M,{childList:!0,subtree:!0}),()=>{q.disconnect()}},[M]),h.jsx(a,{scope:O,itemMap:F,setItemMap:$,collectionRef:Y,collectionRefObject:D,collectionElement:M,children:L})},"CollectionProviderImpl");u.displayName=t+"Impl";const m=e+"CollectionSlot",g=Qi(m),p=R.forwardRef((A,O)=>{const{scope:L,children:T}=A,D=s(m,L),M=qt(O,D.collectionRef);return h.jsx(g,{ref:M,children:T})});p.displayName=m;const v=e+"CollectionItemSlot",y="data-radix-collection-item",_=Qi(v),S=R.forwardRef((A,O)=>{const{scope:L,children:T,...D}=A,M=R.useRef(null),[B,Y]=R.useState(null),F=qt(O,M,Y),$=s(v,L),{setItemMap:q}=$,ne=R.useRef(D);TR(ne.current,D)||(ne.current=D);const se=ne.current;return R.useEffect(()=>{const z=se;return q(G=>B?G.has(B)?G.set(B,{...z,element:B}).toSorted(Ug):(G.set(B,{...z,element:B}),G.toSorted(Ug)):G),()=>{q(G=>!B||!G.has(B)?G:(G.delete(B),new Np(G)))}},[B,se,q]),h.jsx(_,{[y]:"",ref:F,children:T})});S.displayName=v;function E(){return R.useState(new Np)}zt(E,"useInitCollection");function k(A){const{itemMap:O}=s(e+"CollectionConsumer",A);return O}return zt(k,"useCollection"),[{Provider:l,Slot:p,ItemSlot:S},{createCollectionScope:r,useCollection:k,useInitCollection:E}]}zt(a3,"createCollection");function TR(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||e[a]!==t[a])return!1;return!0}zt(TR,"shallowEqual");function NR(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}zt(NR,"isElementPreceding");function Ug(e,t){return!e[1].element||!t[1].element?0:NR(e[1].element,t[1].element)?-1:1}zt(Ug,"sortByDocumentPosition");function jR(e){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){e();return}})}zt(jR,"getChildListObserver");var o3=Object.defineProperty,s3=(e,t)=>o3(e,"name",{value:t,configurable:!0}),l3=R.createContext(void 0);function vv(e){const t=R.useContext(l3);return e||t||"ltr"}s3(vv,"useDirection");var c3=Object.defineProperty,u3=(e,t)=>c3(e,"name",{value:t,configurable:!0});function kr(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>((...n)=>t.current?.(...n)),[])}u3(kr,"useCallbackRef");var d3=Object.defineProperty,Pt=(e,t)=>d3(e,"name",{value:t,configurable:!0}),Hg="dismissableLayer.update",f3="dismissableLayer.pointerDownOutside",h3="dismissableLayer.focusOutside",Aw,LR=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),m3=R.forwardRef(Pt(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:u,onDismiss:m,...g}=t,p=R.useContext(LR),[v,y]=R.useState(null),_=v?.ownerDocument??globalThis?.document,[,S]=R.useState({}),E=qt(n,y),k=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=C?k.indexOf(C):-1,O=v?k.indexOf(v):-1,L=p.layersWithOutsidePointerEventsDisabled.size>0,T=O>=A,D=R.useRef(!1),M=OR($=>{l?.($),u?.($),$.defaultPrevented||m?.()},{ownerDocument:_,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:R.useCallback($=>{if(!($ instanceof Node))return!1;const q=[...p.branches].some(ne=>ne.contains($));return T&&!q},[p.branches,T])}),B=DR($=>{if(a&&D.current)return;const q=$.target;[...p.branches].some(se=>se.contains(q))||(d?.($),u?.($),$.defaultPrevented||m?.())},_),Y=v?O===k.length-1:!1,F=kr($=>{$.key==="Escape"&&(s?.($),!$.defaultPrevented&&m&&($.preventDefault(),m()))});return R.useEffect(()=>{if(Y)return _.addEventListener("keydown",F,{capture:!0}),()=>_.removeEventListener("keydown",F,{capture:!0})},[_,Y,F]),R.useEffect(()=>{if(v)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Aw=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(v)),p.layers.add(v),Bg(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(v),p.layersWithOutsidePointerEventsDisabled.size===0&&(_.body.style.pointerEvents=Aw))}},[v,_,r,p]),R.useEffect(()=>()=>{v&&(p.layers.delete(v),p.layersWithOutsidePointerEventsDisabled.delete(v),Bg())},[v,p]),R.useEffect(()=>{const $=Pt(()=>S({}),"handleUpdate");return document.addEventListener(Hg,$),()=>document.removeEventListener(Hg,$)},[]),h.jsx(Dn.div,{...g,ref:E,style:{pointerEvents:L?T?"auto":"none":void 0,...t.style},onFocusCapture:We(t.onFocusCapture,B.onFocusCapture),onBlurCapture:We(t.onBlurCapture,B.onBlurCapture),onPointerDownCapture:We(t.onPointerDownCapture,M.onPointerDownCapture)})},"DismissableLayer"));function p3(){const e=R.useContext(LR),[t,n]=R.useState(null);return R.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Pt(p3,"useDismissableLayerSurface");var g3=Pt(()=>!0,"IS_TRUE");function OR(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:s,shouldHandlePointerDownOutside:l=g3}=t,d=kr(e),u=R.useRef(!1),m=R.useRef(!1),g=R.useRef(new Map),p=R.useRef(()=>{});return R.useEffect(()=>{function v(){m.current=!1,a.current=!1,g.current.clear()}Pt(v,"resetOutsideInteraction");function y(){return Array.from(g.current.values()).some(Boolean)}Pt(y,"isOutsideInteractionIntercepted");function _(A){if(!m.current)return;const O=A.target;O instanceof Node&&[...s].some(T=>T.contains(O))||g.current.set(A.type,!0),A.type==="click"&&window.setTimeout(()=>{m.current&&p.current()},0)}Pt(_,"handleInteractionCapture");function S(A){m.current&&g.current.set(A.type,!1)}Pt(S,"handleInteractionBubble");const E=Pt(A=>{if(A.target&&!u.current){let O=function(){n.removeEventListener("click",p.current);const T=y();v(),T||yv(f3,d,L,{discrete:!0})};if(Pt(O,"handleAndDispatchPointerDownOutsideEvent"),!l(A.target)){n.removeEventListener("click",p.current),v(),u.current=!1;return}const L={originalEvent:A};m.current=!0,a.current=r&&A.button===0,g.current.clear(),!r||A.button!==0?O():(n.removeEventListener("click",p.current),p.current=O,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),v();u.current=!1},"handlePointerDown"),k=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const A of k)n.addEventListener(A,_,!0),n.addEventListener(A,S);const C=window.setTimeout(()=>{n.addEventListener("pointerdown",E)},0);return()=>{window.clearTimeout(C),n.removeEventListener("pointerdown",E),n.removeEventListener("click",p.current);for(const A of k)n.removeEventListener(A,_,!0),n.removeEventListener(A,S)}},[n,d,r,a,s,l]),{onPointerDownCapture:Pt(()=>u.current=!0,"onPointerDownCapture")}}Pt(OR,"usePointerDownOutside");function DR(e,t=globalThis?.document){const n=kr(e),r=R.useRef(!1);return R.useEffect(()=>{const a=Pt(s=>{s.target&&!r.current&&yv(h3,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:Pt(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Pt(()=>r.current=!1,"onBlurCapture")}}Pt(DR,"useFocusOutside");function Bg(){const e=new CustomEvent(Hg);document.dispatchEvent(e)}Pt(Bg,"dispatchUpdate");function yv(e,t,n,{discrete:r}){const a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?pv(a,s):a.dispatchEvent(s)}Pt(yv,"handleAndDispatchCustomEvent");var b3=Object.defineProperty,xv=(e,t)=>b3(e,"name",{value:t,configurable:!0}),Vu=0,$o=null;function v3(e){return _v(),e.children}xv(v3,"FocusGuards");function _v(){R.useEffect(()=>{$o||($o={start:Vg(),end:Vg()});const{start:e,end:t}=$o;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Vu++,()=>{Vu===1&&($o?.start.remove(),$o?.end.remove(),$o=null),Vu=Math.max(0,Vu-1)}},[])}xv(_v,"useFocusGuards");function Vg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}xv(Vg,"createFocusGuard");var y3=Object.defineProperty,rn=(e,t)=>y3(e,"name",{value:t,configurable:!0}),jp="focusScope.autoFocusOnMount",Lp="focusScope.autoFocusOnUnmount",Tw={bubbles:!1,cancelable:!0},x3=R.forwardRef(rn(function(t,n){const{loop:r=!1,trapped:a=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...d}=t,[u,m]=R.useState(null),g=kr(s),p=kr(l),v=R.useRef(null),y=qt(n,m),_=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(a){let E=function(O){if(_.paused||!u)return;const L=O.target;u.contains(L)?v.current=L:ti(v.current,{select:!0})},k=function(O){if(_.paused||!u)return;const L=O.relatedTarget;L!==null&&(u.contains(L)||ti(v.current,{select:!0}))},C=function(O){if(document.activeElement===document.body)for(const T of O)T.removedNodes.length>0&&ti(u)};rn(E,"handleFocusIn"),rn(k,"handleFocusOut"),rn(C,"handleMutations"),document.addEventListener("focusin",E),document.addEventListener("focusout",k);const A=new MutationObserver(C);return u&&A.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",k),A.disconnect()}}},[a,u,_.paused]),R.useEffect(()=>{if(u){Nw.add(_);const E=document.activeElement;if(!u.contains(E)){const C=new CustomEvent(jp,Tw);u.addEventListener(jp,g),u.dispatchEvent(C),C.defaultPrevented||(IR(UR(Sv(u)),{select:!0}),document.activeElement===E&&ti(u))}return()=>{u.removeEventListener(jp,g),setTimeout(()=>{const C=new CustomEvent(Lp,Tw);u.addEventListener(Lp,p),u.dispatchEvent(C),C.defaultPrevented||ti(E??document.body,{select:!0}),u.removeEventListener(Lp,p),Nw.remove(_)},0)}}},[u,g,p,_]);const S=R.useCallback(E=>{if(!r&&!a||_.paused)return;const k=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,C=document.activeElement;if(k&&C){const A=E.currentTarget,[O,L]=MR(A);O&&L?!E.shiftKey&&C===L?(E.preventDefault(),r&&ti(O,{select:!0})):E.shiftKey&&C===O&&(E.preventDefault(),r&&ti(L,{select:!0})):C===A&&E.preventDefault()}},[r,a,_.paused]);return h.jsx(Dn.div,{tabIndex:-1,...d,ref:y,onKeyDown:S})},"FocusScope"));function IR(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ti(r,{select:t}),document.activeElement!==n)return}rn(IR,"focusFirst");function MR(e){const t=Sv(e),n=Fg(t,e),r=Fg(t.reverse(),e);return[n,r]}rn(MR,"getTabbableEdges");function Sv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:rn(r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}rn(Sv,"getTabbableCandidates");function Fg(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):PR(r,{upTo:t})))return r}rn(Fg,"findVisible");function PR(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}rn(PR,"isHidden");function zR(e){return e instanceof HTMLInputElement&&"select"in e}rn(zR,"isSelectableInput");function ti(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zR(e)&&t&&e.select()}}rn(ti,"focus");var Nw=$R();function $R(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Gg(e,t),e.unshift(t)},remove(t){e=Gg(e,t),e[0]?.resume()}}}rn($R,"createFocusScopesStack");function Gg(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}rn(Gg,"arrayRemove");function UR(e){return e.filter(t=>t.tagName!=="A")}rn(UR,"removeLinks");var _3=Object.defineProperty,S3=(e,t)=>_3(e,"name",{value:t,configurable:!0}),w3=fs[" useId ".trim().toString()]||(()=>{}),E3=0;function Hd(e){const[t,n]=R.useState(w3());return lr(()=>{e||n(r=>r??String(E3++))},[e]),e||(t?`radix-${t}`:"")}S3(Hd,"useId");const C3=["top","right","bottom","left"],Ji=Math.min,oi=Math.max,Bd=Math.round,Fu=Math.floor,si=e=>({x:e,y:e}),k3={left:"right",right:"left",bottom:"top",top:"bottom"};function HR(e,t,n){return oi(e,Ji(t,n))}function ui(e,t){return typeof e=="function"?e(t):e}function ea(e){return e.split("-")[0]}function _s(e){return e.split("-")[1]}function wv(e){return e==="x"?"y":"x"}function Ev(e){return e==="y"?"height":"width"}function Sr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Cv(e){return wv(Sr(e))}function R3(e,t,n){n===void 0&&(n=!1);const r=_s(e),a=Cv(e),s=Ev(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(l=Vd(l)),[l,Vd(l)]}function A3(e){const t=Vd(e);return[qg(e),t,qg(t)]}function qg(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const jw=["left","right"],Lw=["right","left"],T3=["top","bottom"],N3=["bottom","top"];function j3(e,t,n){switch(e){case"top":case"bottom":return n?t?Lw:jw:t?jw:Lw;case"left":case"right":return t?T3:N3;default:return[]}}function L3(e,t,n,r){const a=_s(e);let s=j3(ea(e),n==="start",r);return a&&(s=s.map(l=>l+"-"+a),t&&(s=s.concat(s.map(qg)))),s}function Vd(e){const t=ea(e);return k3[t]+e.slice(t.length)}function O3(e){var t,n,r,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(a=e.left)!=null?a:0}}function BR(e){return typeof e!="number"?O3(e):{top:e,right:e,bottom:e,left:e}}function Fd(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Ow(e,t,n){let{reference:r,floating:a}=e;const s=Sr(t),l=Cv(t),d=Ev(l),u=ea(t),m=s==="y",g=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2,v=r[d]/2-a[d]/2;let y;switch(u){case"top":y={x:g,y:r.y-a.height};break;case"bottom":y={x:g,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-a.width,y:p};break;default:y={x:r.x,y:r.y}}const _=_s(t);return _&&(y[l]+=v*(_==="end"?1:-1)*(n&&m?-1:1)),y}async function D3(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:s,rects:l,elements:d,strategy:u}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:v=!1,padding:y=0}=ui(t,e),_=BR(y),E=d[v?p==="floating"?"reference":"floating":p],k=Fd(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(E)))==null||n?E:E.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(d.floating)),boundary:m,rootBoundary:g,strategy:u})),C=p==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d.floating)),O=await(s.isElement==null?void 0:s.isElement(A))&&await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1},L=Fd(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:C,offsetParent:A,strategy:u}):C);return{top:(k.top-L.top+_.top)/O.y,bottom:(L.bottom-k.bottom+_.bottom)/O.y,left:(k.left-L.left+_.left)/O.x,right:(L.right-k.right+_.right)/O.x}}const I3=50,M3=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:l}=n,d=l.detectOverflow?l:{...l,detectOverflow:D3},u=await(l.isRTL==null?void 0:l.isRTL(t));let m=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:g,y:p}=Ow(m,r,u),v=r,y=0;const _={};for(let S=0;S<s.length;S++){const E=s[S];if(!E)continue;const{name:k,fn:C}=E,{x:A,y:O,data:L,reset:T}=await C({x:g,y:p,initialPlacement:r,placement:v,strategy:a,middlewareData:_,rects:m,platform:d,elements:{reference:e,floating:t}});g=A??g,p=O??p,_[k]={..._[k],...L},T&&y<I3&&(y++,typeof T=="object"&&(T.placement&&(v=T.placement),T.rects&&(m=T.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):T.rects),{x:g,y:p}=Ow(m,v,u)),S=-1)}return{x:g,y:p,placement:v,strategy:a,middlewareData:_}},P3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:s,platform:l,elements:d,middlewareData:u}=t,{element:m,padding:g=0}=ui(e,t)||{};if(m==null)return{};const p=BR(g),v={x:n,y:r},y=Cv(a),_=Ev(y),S=await l.getDimensions(m),E=y==="y",k=E?"top":"left",C=E?"bottom":"right",A=E?"clientHeight":"clientWidth",O=s.reference[_]+s.reference[y]-v[y]-s.floating[_],L=v[y]-s.reference[y],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(m));let D=T?T[A]:0;(!D||!await(l.isElement==null?void 0:l.isElement(T)))&&(D=d.floating[A]||s.floating[_]);const M=O/2-L/2,B=D/2-S[_]/2-1,Y=Ji(p[k],B),F=Ji(p[C],B),$=D-S[_]-F,q=D/2-S[_]/2+M,ne=HR(Y,q,$),se=!u.arrow&&_s(a)!=null&&q!==ne&&s.reference[_]/2-(q<Y?Y:F)-S[_]/2<0,z=se?q<Y?q-Y:q-$:0;return{[y]:v[y]+z,data:{[y]:ne,centerOffset:q-ne-z,...se&&{alignmentOffset:z}},reset:se}}}),z3=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:s,rects:l,initialPlacement:d,platform:u,elements:m}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:S=!0,...E}=ui(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const k=ea(a),C=Sr(d),A=ea(d)===d,O=await(u.isRTL==null?void 0:u.isRTL(m.floating)),L=v||(A||!S?[Vd(d)]:A3(d)),T=_!=="none";!v&&T&&L.push(...L3(d,S,_,O));const D=[d,...L],M=await u.detectOverflow(t,E),B=[];let Y=((r=s.flip)==null?void 0:r.overflows)||[];if(g&&B.push(M[k]),p){const ne=R3(a,l,O);B.push(M[ne[0]],M[ne[1]])}if(Y=[...Y,{placement:a,overflows:B}],!B.every(ne=>ne<=0)){var F,$;const ne=(((F=s.flip)==null?void 0:F.index)||0)+1,se=D[ne];if(se&&(!(p==="alignment"?C!==Sr(se):!1)||Y.every(ie=>Sr(ie.placement)===C?ie.overflows[0]>0:!0)))return{data:{index:ne,overflows:Y},reset:{placement:se}};let z=($=Y.filter(G=>G.overflows[0]<=0).sort((G,ie)=>G.overflows[1]-ie.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(y){case"bestFit":{var q;const G=(q=Y.filter(ie=>{if(T){const J=Sr(ie.placement);return J===C||J==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(J=>J>0).reduce((J,Z)=>J+Z,0)]).sort((ie,J)=>ie[1]-J[1])[0])==null?void 0:q[0];G&&(z=G);break}case"initialPlacement":z=d;break}if(a!==z)return{reset:{placement:z}}}return{}}}};function Dw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Iw(e){return C3.some(t=>e[t]>=0)}const $3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...s}=ui(e,t);switch(a){case"referenceHidden":{const l=await r.detectOverflow(t,{...s,elementContext:"reference"}),d=Dw(l,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Iw(d)}}}case"escaped":{const l=await r.detectOverflow(t,{...s,altBoundary:!0}),d=Dw(l,n.floating);return{data:{escapedOffsets:d,escaped:Iw(d)}}}default:return{}}}}},VR=new Set(["left","top"]);async function U3(e,t){const{placement:n,platform:r,elements:a}=e,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=ea(n),d=_s(n),u=Sr(n)==="y",m=VR.has(l)?-1:1,g=s&&u?-1:1,p=ui(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:_}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return d&&typeof _=="number"&&(y=d==="end"?_*-1:_),u?{x:y*g,y:v*m}:{x:v*m,y:y*g}}const H3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:s,placement:l,middlewareData:d}=t,u=await U3(t,e);return l===((n=d.offset)==null?void 0:n.placement)&&(r=d.arrow)!=null&&r.alignmentOffset?{}:{x:a+u.x,y:s+u.y,data:{...u,placement:l}}}}},B3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:s}=t,{mainAxis:l=!0,crossAxis:d=!1,limiter:u={fn:C=>{let{x:A,y:O}=C;return{x:A,y:O}}},...m}=ui(e,t),g={x:n,y:r},p=await s.detectOverflow(t,m),v=Sr(a),y=wv(v);let _=g[y],S=g[v];const E=(C,A)=>HR(A+p[C==="y"?"top":"left"],A,A-p[C==="y"?"bottom":"right"]);l&&(_=E(y,_)),d&&(S=E(v,S));const k=u.fn({...t,[y]:_,[v]:S});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[y]:l,[v]:d}}}}}},V3=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:a,y:s,placement:l,rects:d,middlewareData:u}=t,{offset:m=0,mainAxis:g=!0,crossAxis:p=!0}=ui(e,t),v={x:a,y:s},y=Sr(l),_=wv(y);let S=v[_],E=v[y];const k=ui(m,t),C=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:(n=k.mainAxis)!=null?n:0,crossAxis:(r=k.crossAxis)!=null?r:0};if(g){const L=_==="y"?"height":"width",T=d.reference[_]-d.floating[L]+C.mainAxis,D=d.reference[_]+d.reference[L]-C.mainAxis;S<T?S=T:S>D&&(S=D)}if(p){var A,O;const L=_==="y"?"width":"height",T=VR.has(ea(l)),D=d.reference[y]-d.floating[L]+(T&&((A=u.offset)==null?void 0:A[y])||0)+(T?0:C.crossAxis),M=d.reference[y]+d.reference[L]+(T?0:((O=u.offset)==null?void 0:O[y])||0)-(T?C.crossAxis:0);E<D?E=D:E>M&&(E=M)}return{[_]:S,[y]:E}}}},F3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:a,elements:s}=t,{apply:l=()=>{},...d}=ui(e,t),u=await a.detectOverflow(t,d),m=ea(n),g=_s(n),p=Sr(n)==="y",{width:v,height:y}=r.floating;let _,S;m==="top"||m==="bottom"?(_=m,S=g===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(S=m,_=g==="end"?"top":"bottom");const E=y-u.top-u.bottom,k=v-u.left-u.right,C=Ji(y-u[_],E),A=Ji(v-u[S],k),O=t.middlewareData.shift,L=!O;let T=C,D=A;O!=null&&O.enabled.x&&(D=k),O!=null&&O.enabled.y&&(T=E),L&&!g&&(p?D=v-2*oi(u.left,u.right):T=y-2*oi(u.top,u.bottom)),await l({...t,availableWidth:D,availableHeight:T});const M=await a.getDimensions(s.floating);return v!==M.width||y!==M.height?{reset:{rects:!0}}:{}}}};function Cf(){return typeof window<"u"}function Ss(e){return FR(e)?(e.nodeName||"").toLowerCase():"#document"}function mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bi(e){var t;return(t=(FR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function FR(e){return Cf()?e instanceof Node||e instanceof mn(e).Node:!1}function Rr(e){return Cf()?e instanceof Element||e instanceof mn(e).Element:!1}function la(e){return Cf()?e instanceof HTMLElement||e instanceof mn(e).HTMLElement:!1}function Mw(e){return!Cf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mn(e).ShadowRoot}function kf(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function G3(e){return/^(table|td|th)$/.test(Ss(e))}function Rf(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const q3=/transform|translate|scale|rotate|perspective|filter/,Z3=/paint|layout|strict|content/,Na=e=>!!e&&e!=="none";let Op;function kv(e){const t=Rr(e)?Ar(e):e;return Na(t.transform)||Na(t.translate)||Na(t.scale)||Na(t.rotate)||Na(t.perspective)||!Rv()&&(Na(t.backdropFilter)||Na(t.filter))||q3.test(t.willChange||"")||Z3.test(t.contain||"")}function W3(e){let t=Fa(e);for(;la(t)&&!Wl(t);){if(kv(t))return t;if(Rf(t))return null;t=Fa(t)}return null}function Rv(){return Op==null&&(Op=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Op}function Wl(e){return/^(html|body|#document)$/.test(Ss(e))}function Ar(e){return mn(e).getComputedStyle(e)}function Af(e){return Rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fa(e){if(Ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mw(e)&&e.host||bi(e);return Mw(t)?t.host:t}function GR(e){const t=Fa(e);return Wl(t)?(e.ownerDocument||e).body:la(t)&&kf(t)?t:GR(t)}function Yl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=GR(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),l=mn(a);if(s){const d=Zg(l);return t.concat(l,l.visualViewport||[],kf(a)?a:[],d&&n?Yl(d):[])}else return t.concat(a,Yl(a,[],n))}function Zg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qR(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=la(e),s=a?e.offsetWidth:n,l=a?e.offsetHeight:r,d=Bd(n)!==s||Bd(r)!==l;return d&&(n=s,r=l),{width:n,height:r,$:d}}function Av(e){return Rr(e)?e:e.contextElement}function ns(e){const t=Av(e);if(!la(t))return si(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:s}=qR(t);let l=(s?Bd(n.width):n.width)/r,d=(s?Bd(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!d||!Number.isFinite(d))&&(d=1),{x:l,y:d}}const Y3=si(0);function ZR(e){const t=mn(e);return!Rv()||!t.visualViewport?Y3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function K3(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===mn(e)}function Ga(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=Av(e);let l=si(1);t&&(r?Rr(r)&&(l=ns(r)):l=ns(e));const d=K3(s,n,r)?ZR(s):si(0);let u=(a.left+d.x)/l.x,m=(a.top+d.y)/l.y,g=a.width/l.x,p=a.height/l.y;if(s&&r){const v=mn(s),y=Rr(r)?mn(r):r;let _=v,S=Zg(_);for(;S&&y!==_;){const E=ns(S),k=S.getBoundingClientRect(),C=Ar(S),A=k.left+(S.clientLeft+parseFloat(C.paddingLeft))*E.x,O=k.top+(S.clientTop+parseFloat(C.paddingTop))*E.y;u*=E.x,m*=E.y,g*=E.x,p*=E.y,u+=A,m+=O,_=mn(S),S=Zg(_)}}return Fd({width:g,height:p,x:u,y:m})}function Tf(e,t){const n=Af(e).scrollLeft;return t?t.left+n:Ga(bi(e)).left+n}function WR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Tf(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function X3(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const s=a==="fixed",l=bi(r),d=t?Rf(t.floating):!1;if(r===l||d&&s)return n;let u={scrollLeft:0,scrollTop:0},m=si(1);const g=si(0),p=la(r);if((p||!s)&&((Ss(r)!=="body"||kf(l))&&(u=Af(r)),p)){const y=Ga(r);m=ns(r),g.x=y.x+r.clientLeft,g.y=y.y+r.clientTop}const v=l&&!p&&!s?WR(l,u):si(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-u.scrollLeft*m.x+g.x+v.x,y:n.y*m.y-u.scrollTop*m.y+g.y+v.y}}function Q3(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function J3(e){const t=Af(e),n=e.ownerDocument.body,r=oi(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=oi(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+Tf(e);const l=-t.scrollTop;return Ar(n).direction==="rtl"&&(s+=oi(e.clientWidth,n.clientWidth)-r),{width:r,height:a,x:s,y:l}}const e6=25;function t6(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",a=mn(e),s=bi(e),l=a.visualViewport;let d=s.clientWidth,u=s.clientHeight,m=0,g=0;if(l){const v=!Rv()||t==="fixed";r?v||(m=-l.offsetLeft,g=-l.offsetTop):(d=l.width,u=l.height,v&&(m=l.offsetLeft,g=l.offsetTop))}if(Tf(s)<=0){const v=s.ownerDocument,y=v.body,_=getComputedStyle(y),S=v.compatMode==="CSS1Compat"&&parseFloat(_.marginLeft)+parseFloat(_.marginRight)||0,E=Math.abs(s.clientWidth-y.clientWidth-S),k=getComputedStyle(s).scrollbarGutter==="stable both-edges"?E/2:E;k<=e6&&(d-=k)}return{width:d,height:u,x:m,y:g}}function n6(e,t){const n=Ga(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,s=ns(e),l=e.clientWidth*s.x,d=e.clientHeight*s.y,u=a*s.x,m=r*s.y;return{width:l,height:d,x:u,y:m}}function Pw(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=t6(e,n,t);else if(t==="document")r=J3(bi(e));else if(Rr(t))r=n6(t,n);else{const a=ZR(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Fd(r)}function r6(e,t){const n=t.get(e);if(n)return n;let r=Yl(e,[],!1).filter(d=>Rr(d)&&Ss(d)!=="body"),a=null;const s=Ar(e).position==="fixed";let l=s?Fa(e):e;for(;Rr(l)&&!Wl(l);){const d=Ar(l),u=kv(l),m=a?a.position:s?"fixed":"";!u&&(m==="fixed"||m==="absolute"&&d.position==="static")?r=r.filter(p=>p!==l):a=d,l=Fa(l)}return t.set(e,r),r}function i6(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?Rf(t)?[]:r6(t,this._c):[].concat(n),r],d=Pw(t,l[0],a);let u=d.top,m=d.right,g=d.bottom,p=d.left;for(let v=1;v<l.length;v++){const y=Pw(t,l[v],a);u=oi(y.top,u),m=Ji(y.right,m),g=Ji(y.bottom,g),p=oi(y.left,p)}return{width:m-p,height:g-u,x:p,y:u}}function a6(e){const{width:t,height:n}=qR(e);return{width:t,height:n}}function o6(e,t,n){const r=la(t),a=bi(t),s=n==="fixed",l=Ga(e,!0,s,t);let d={scrollLeft:0,scrollTop:0};const u=si(0);if((r||!s)&&((Ss(t)!=="body"||kf(a))&&(d=Af(t)),r)){const v=Ga(t,!0,s,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}!r&&a&&(u.x=Tf(a));const m=a&&!r&&!s?WR(a,d):si(0),g=l.left+d.scrollLeft-u.x-m.x,p=l.top+d.scrollTop-u.y-m.y;return{x:g,y:p,width:l.width,height:l.height}}function Dp(e){return Ar(e).position==="static"}function zw(e,t){if(!la(e)||Ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return bi(e)===n&&(n=n.ownerDocument.body),n}function YR(e,t){const n=mn(e);if(Rf(e))return n;if(!la(e)){let a=Fa(e);for(;a&&!Wl(a);){if(Rr(a)&&!Dp(a))return a;a=Fa(a)}return n}let r=zw(e,t);for(;r&&G3(r)&&Dp(r);)r=zw(r,t);return r&&Wl(r)&&Dp(r)&&!kv(r)?n:r||W3(e)||n}const s6=async function(e){const t=this.getOffsetParent||YR,n=this.getDimensions,r=await n(e.floating);return{reference:o6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function l6(e){return Ar(e).direction==="rtl"}const c6={convertOffsetParentRelativeRectToViewportRelativeRect:X3,getDocumentElement:bi,getClippingRect:i6,getOffsetParent:YR,getElementRects:s6,getClientRects:Q3,getDimensions:a6,getScale:ns,isElement:Rr,isRTL:l6};function KR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function u6(e,t,n){let r=null,a;const s=bi(e);function l(){var g;clearTimeout(a),(g=r)==null||g.disconnect(),r=null}function d(g,p){g===void 0&&(g=!1),p===void 0&&(p=1),l();const v=e.getBoundingClientRect(),{left:y,top:_,width:S,height:E}=v;if(g||t(),!S||!E)return;const k=Fu(_),C=Fu(s.clientWidth-(y+S)),A=Fu(s.clientHeight-(_+E)),O=Fu(y),T={rootMargin:-k+"px "+-C+"px "+-A+"px "+-O+"px",threshold:oi(0,Ji(1,p))||1};let D=!0;function M(B){const Y=B[0].intersectionRatio;if(!KR(v,e.getBoundingClientRect()))return d();if(Y!==p){if(!D)return d();Y?d(!1,Y):a=setTimeout(()=>{d(!1,1e-7)},1e3)}D=!1}try{r=new IntersectionObserver(M,{...T,root:s.ownerDocument})}catch{r=new IntersectionObserver(M,T)}r.observe(e)}const u=mn(e),m=()=>d(n);return u.addEventListener("resize",m),d(!0),()=>{u.removeEventListener("resize",m),l()}}function d6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,m=Av(e),g=a||s?[...m?Yl(m):[],...t?Yl(t):[]]:[];g.forEach(k=>{a&&k.addEventListener("scroll",n),s&&k.addEventListener("resize",n)});const p=m&&d?u6(m,n,s):null;let v=-1,y=null;l&&(y=new ResizeObserver(k=>{let[C]=k;C&&C.target===m&&y&&t&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=y)==null||A.observe(t)})),n()}),m&&!u&&y.observe(m),t&&y.observe(t));let _,S=u?Ga(e):null;u&&E();function E(){const k=Ga(e);S&&!KR(S,k)&&n(),S=k,_=requestAnimationFrame(E)}return n(),()=>{var k;g.forEach(C=>{a&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),p?.(),(k=y)==null||k.disconnect(),y=null,u&&cancelAnimationFrame(_)}}const f6=H3,h6=B3,m6=z3,p6=F3,g6=$3,$w=P3,b6=V3,v6=(e,t,n)=>{const r=new Map,a=n??{},s={...c6,...a.platform,_c:r};return M3(e,t,{...a,platform:s})};var y6=typeof document<"u",x6=function(){},_d=y6?R.useLayoutEffect:x6;function Gd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Gd(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const s=a[r];if(!(s==="_owner"&&e.$$typeof)&&!Gd(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function XR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uw(e,t){const n=XR(e);return Math.round(t*n)/n}function Ip(e){const t=R.useRef(e);return _d(()=>{t.current=e}),t}function _6(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:s,floating:l}={},transform:d=!0,whileElementsMounted:u,open:m}=e,[g,p]=R.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=R.useState(r);Gd(v,r)||y(r);const[_,S]=R.useState(null),[E,k]=R.useState(null),C=R.useCallback(ie=>{ie!==T.current&&(T.current=ie,S(ie))},[]),A=R.useCallback(ie=>{ie!==D.current&&(D.current=ie,k(ie))},[]),O=s||_,L=l||E,T=R.useRef(null),D=R.useRef(null),M=R.useRef(g),B=u!=null,Y=Ip(u),F=Ip(a),$=Ip(m),q=R.useCallback(()=>{if(!T.current||!D.current)return;const ie={placement:t,strategy:n,middleware:v};F.current&&(ie.platform=F.current),v6(T.current,D.current,ie).then(J=>{const Z={...J,isPositioned:$.current!==!1};ne.current&&!Gd(M.current,Z)&&(M.current=Z,Ef.flushSync(()=>{p(Z)}))})},[v,t,n,F,$]);_d(()=>{m===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,p(ie=>({...ie,isPositioned:!1})))},[m]);const ne=R.useRef(!1);_d(()=>(ne.current=!0,()=>{ne.current=!1}),[]),_d(()=>{if(O&&(T.current=O),L&&(D.current=L),O&&L){if(Y.current)return Y.current(O,L,q);q()}},[O,L,q,Y,B]);const se=R.useMemo(()=>({reference:T,floating:D,setReference:C,setFloating:A}),[C,A]),z=R.useMemo(()=>({reference:O,floating:L}),[O,L]),G=R.useMemo(()=>{const ie={position:n,left:0,top:0};if(!z.floating)return ie;const J=Uw(z.floating,g.x),Z=Uw(z.floating,g.y);return d?{...ie,transform:"translate("+J+"px, "+Z+"px)",...XR(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:Z}},[n,d,z.floating,g.x,g.y]);return R.useMemo(()=>({...g,update:q,refs:se,elements:z,floatingStyles:G}),[g,q,se,z,G])}const S6=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?$w({element:r.current,padding:a}).fn(n):{}:r?$w({element:r,padding:a}).fn(n):{}}}},w6=(e,t)=>{const n=f6(e);return{name:n.name,fn:n.fn,options:[e,t]}},E6=(e,t)=>{const n=h6(e);return{name:n.name,fn:n.fn,options:[e,t]}},C6=(e,t)=>({fn:b6(e).fn,options:[e,t]}),k6=(e,t)=>{const n=m6(e);return{name:n.name,fn:n.fn,options:[e,t]}},R6=(e,t)=>{const n=p6(e);return{name:n.name,fn:n.fn,options:[e,t]}},A6=(e,t)=>{const n=g6(e);return{name:n.name,fn:n.fn,options:[e,t]}},T6=(e,t)=>{const n=S6(e);return{name:n.name,fn:n.fn,options:[e,t]}};var N6=Object.defineProperty,j6=(e,t)=>N6(e,"name",{value:t,configurable:!0});function QR(e){const[t,n]=R.useState(void 0);return lr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let l,d;if("borderBoxSize"in s){const u=s.borderBoxSize,m=Array.isArray(u)?u[0]:u;l=m.inlineSize,d=m.blockSize}else l=e.offsetWidth,d=e.offsetHeight;n({width:l,height:d})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}j6(QR,"useSize");var L6=Object.defineProperty,Wi=(e,t)=>L6(e,"name",{value:t,configurable:!0}),JR="Popper",[eA,tA]=Wa(JR),[O6,nA]=eA(JR),D6=Wi(e=>{const{__scopePopper:t,children:n}=e,[r,a]=R.useState(null),[s,l]=R.useState(void 0);return h.jsx(O6,{scope:t,anchor:r,onAnchorChange:a,placementState:s,setPlacementState:l,children:n})},"Popper"),I6="PopperAnchor",M6=R.forwardRef(Wi(function(t,n){const{__scopePopper:r,virtualRef:a,...s}=t,l=nA(I6,r),d=R.useRef(null),u=l.onAnchorChange,m=R.useCallback(S=>{d.current=S,S&&u(S)},[u]),g=qt(n,m),p=R.useRef(null);R.useEffect(()=>{if(!a)return;const S=p.current;p.current=a.current,S!==p.current&&u(p.current)});const v=l.placementState&&Nf(l.placementState),y=v?.[0],_=v?.[1];return a?null:h.jsx(Dn.div,{"data-radix-popper-side":y,"data-radix-popper-align":_,...s,ref:g})},"PopperAnchor")),rA="PopperContent",[P6,ZY]=eA(rA),z6=R.forwardRef(Wi(function(t,n){const{__scopePopper:r,side:a="bottom",sideOffset:s=0,align:l="center",alignOffset:d=0,arrowPadding:u=0,avoidCollisions:m=!0,collisionBoundary:g=[],collisionPadding:p=0,sticky:v="partial",hideWhenDetached:y=!1,updatePositionStrategy:_="optimized",onPlaced:S,...E}=t,k=nA(rA,r),[C,A]=R.useState(null),O=qt(n,A),[L,T]=R.useState(null),D=QR(L),M=D?.width??0,B=D?.height??0,Y=a+(l!=="center"?"-"+l:""),F=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(g)?g:[g],q=$.length>0,ne={padding:F,boundary:$.filter(iA),altBoundary:q},{refs:se,floatingStyles:z,placement:G,isPositioned:ie,middlewareData:J}=_6({strategy:"fixed",placement:Y,whileElementsMounted:Wi((...he)=>d6(...he,{animationFrame:_==="always"}),"whileElementsMounted"),elements:{reference:k.anchor},middleware:[w6({mainAxis:s+B,alignmentAxis:d}),m&&E6({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?C6():void 0,...ne}),m&&k6({...ne}),R6({...ne,apply:Wi(({elements:he,rects:Ke,availableWidth:Be,availableHeight:Ot})=>{const{width:Et,height:nt}=Ke.reference,an=he.floating.style;an.setProperty("--radix-popper-available-width",`${Be}px`),an.setProperty("--radix-popper-available-height",`${Ot}px`),an.setProperty("--radix-popper-anchor-width",`${Et}px`),an.setProperty("--radix-popper-anchor-height",`${nt}px`)},"apply")}),L&&T6({element:L,padding:u}),$6({arrowWidth:M,arrowHeight:B}),y&&A6({strategy:"referenceHidden",...ne,boundary:q?ne.boundary:void 0})]}),Z=k.setPlacementState;lr(()=>(Z(G),()=>{Z(void 0)}),[G,Z]);const[P,ee]=Nf(G),le=kr(S);lr(()=>{ie&&le?.()},[ie,le]);const de=J.arrow?.x,ce=J.arrow?.y,fe=J.arrow?.centerOffset!==0,[ye,Re]=R.useState();return lr(()=>{C&&Re(window.getComputedStyle(C).zIndex)},[C]),h.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:ie?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[J.transformOrigin?.x,J.transformOrigin?.y].join(" "),...J.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:h.jsx(P6,{scope:r,placedSide:P,placedAlign:ee,onArrowChange:T,arrowX:de,arrowY:ce,shouldHideArrow:fe,children:h.jsx(Dn.div,{"data-side":P,"data-align":ee,...E,ref:O,style:{...E.style,animation:ie?E.style?.animation:"none"}})})})},"PopperContent"));function iA(e){return e!==null}Wi(iA,"isNotNull");var $6=Wi(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,l=a.arrow?.centerOffset!==0,d=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[m,g]=Nf(n),p={start:"0%",center:"50%",end:"100%"}[g],v=(a.arrow?.x??0)+d/2,y=(a.arrow?.y??0)+u/2;let _="",S="";return m==="bottom"?(_=l?p:`${v}px`,S=`${-u}px`):m==="top"?(_=l?p:`${v}px`,S=`${r.floating.height+u}px`):m==="right"?(_=`${-u}px`,S=l?p:`${y}px`):m==="left"&&(_=`${r.floating.width+u}px`,S=l?p:`${y}px`),{data:{x:_,y:S}}}}),"transformOrigin");function Nf(e){const[t,n="center"]=e.split("-");return[t,n]}Wi(Nf,"getSideAndAlignFromPlacement");var U6=D6,H6=M6,B6=z6,V6=Object.defineProperty,F6=(e,t)=>V6(e,"name",{value:t,configurable:!0}),G6=R.forwardRef(F6(function(t,n){const{container:r,...a}=t,[s,l]=R.useState(!1);lr(()=>l(!0),[]);const d=r||s&&globalThis?.document?.body;return d?Ef.createPortal(h.jsx(Dn.div,{...a,ref:n}),d):null},"Portal")),q6=Object.defineProperty,di=(e,t)=>q6(e,"name",{value:t,configurable:!0});function aA(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}di(aA,"useStateMachine");var Tv=di(e=>{const{present:t,children:n}=e,r=oA(t),a=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),s=sA(r.ref,lA(a));return typeof n=="function"||r.isPresent?R.cloneElement(a,{ref:s}):null},"Presence");function oA(e){const[t,n]=R.useState(),r=R.useRef(null),a=R.useRef(e),s=R.useRef("none"),l=R.useRef(void 0),d=e?"mounted":"unmounted",[u,m]=aA(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{u==="mounted"?(s.current=l.current??Zo(r.current),l.current=void 0):s.current="none"},[u]),lr(()=>{const g=r.current,p=a.current;if(p!==e){const y=s.current,_=Zo(g);e?(l.current=_,m("MOUNT")):_==="none"||g?.display==="none"?m("UNMOUNT"):m(p&&y!==_?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,m]),lr(()=>{if(t){let g;const p=t.ownerDocument.defaultView??window,v=di(_=>{const E=Zo(r.current).includes(CSS.escape(_.animationName));if(_.target===t&&E&&(m("ANIMATION_END"),!a.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",g=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},"handleAnimationEnd"),y=di(_=>{_.target===t&&(s.current=Zo(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{p.clearTimeout(g),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else m("ANIMATION_END")},[t,m]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:R.useCallback(g=>{if(g){const p=getComputedStyle(g);r.current=p,l.current=Zo(p)}else r.current=null;n(g)},[])}}di(oA,"usePresence");function Wg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}di(Wg,"setRef");function sA(...e){const t=R.useRef(e);return t.current=e,R.useCallback(n=>{const r=t.current;let a=!1;const s=r.map(l=>{const d=Wg(l,n);return!a&&typeof d=="function"&&(a=!0),d});if(a)return()=>{for(let l=0;l<s.length;l++){const d=s[l];typeof d=="function"?d():Wg(r[l],null)}}},[])}di(sA,"useStableComposedRefs");function Zo(e){return e?.animationName||"none"}di(Zo,"getAnimationName");function lA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}di(lA,"getElementRef");var Z6=Object.defineProperty,Nv=(e,t)=>Z6(e,"name",{value:t,configurable:!0}),Mp=!1;function cA(){const[e,t]=R.useState(Mp);return R.useEffect(()=>{Mp||(Mp=!0,t(!0))},[]),e}Nv(cA,"useIsHydrated");var uA=fs[" useSyncExternalStore ".trim().toString()];function dA(){return()=>{}}Nv(dA,"subscribe");function fA(){return uA(dA,()=>!0,()=>!1)}Nv(fA,"useIsHydratedModern");var W6=typeof uA=="function"?fA:cA,Y6=Object.defineProperty,Ya=(e,t)=>Y6(e,"name",{value:t,configurable:!0}),Pp="rovingFocusGroup.onEntryFocus",K6={bubbles:!1,cancelable:!0},jf="RovingFocusGroup",[Yg,hA,X6]=gv(jf),[Q6,mA]=Wa(jf,[X6]),[J6,e$]=Q6(jf),t$=R.forwardRef(Ya(function(t,n){return h.jsx(Yg.Provider,{scope:t.__scopeRovingFocusGroup,children:h.jsx(Yg.Slot,{scope:t.__scopeRovingFocusGroup,children:h.jsx(n$,{...t,ref:n})})})},"RovingFocusGroup")),n$=R.forwardRef(Ya(function(t,n){const{__scopeRovingFocusGroup:r,orientation:a,loop:s=!1,dir:l,currentTabStopId:d,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:m,onEntryFocus:g,preventScrollOnEntryFocus:p=!1,...v}=t,y=R.useRef(null),_=qt(n,y),S=vv(l),[E,k]=mv({prop:d,defaultProp:u??null,onChange:m,caller:jf}),[C,A]=R.useState(!1),O=kr(g),L=hA(r),T=R.useRef(!1),[D,M]=R.useState(0);return R.useEffect(()=>{const B=y.current;if(B)return B.addEventListener(Pp,O),()=>B.removeEventListener(Pp,O)},[O]),h.jsx(J6,{scope:r,orientation:a,dir:S,loop:s,currentTabStopId:E,onItemFocus:R.useCallback(B=>k(B),[k]),onItemShiftTab:R.useCallback(()=>A(!0),[]),onFocusableItemAdd:R.useCallback(()=>M(B=>B+1),[]),onFocusableItemRemove:R.useCallback(()=>M(B=>B-1),[]),children:h.jsx(Dn.div,{tabIndex:C||D===0?-1:0,"data-orientation":a,...v,ref:_,style:{outline:"none",...t.style},onMouseDown:We(t.onMouseDown,()=>{T.current=!0}),onFocus:We(t.onFocus,B=>{const Y=!T.current;if(B.target===B.currentTarget&&Y&&!C){const F=new CustomEvent(Pp,K6);if(B.currentTarget.dispatchEvent(F),!F.defaultPrevented){const $=L().filter(G=>G.focusable),q=$.find(G=>G.active),ne=$.find(G=>G.id===E),z=[q,ne,...$].filter(Boolean).map(G=>G.ref.current);jv(z,p)}}T.current=!1}),onBlur:We(t.onBlur,()=>A(!1))})})},"RovingFocusGroupImpl")),r$="RovingFocusGroupItem",i$=R.forwardRef(Ya(function(t,n){const{__scopeRovingFocusGroup:r,focusable:a=!0,active:s=!1,tabStopId:l,children:d,...u}=t,m=Hd(),g=l||m,p=e$(r$,r),v=p.currentTabStopId===g,y=hA(r),{onFocusableItemAdd:_,onFocusableItemRemove:S,currentTabStopId:E}=p,k=W6();return lr(()=>{if(!(!k||!a))return _(),()=>S()},[k,a,_,S]),R.useEffect(()=>{if(!(k||!a))return _(),()=>S()},[k,a,_,S]),h.jsx(Yg.ItemSlot,{scope:r,id:g,focusable:a,active:s,children:h.jsx(Dn.span,{tabIndex:v?0:-1,"data-orientation":p.orientation,...u,ref:n,onMouseDown:We(t.onMouseDown,C=>{a?p.onItemFocus(g):C.preventDefault()}),onFocus:We(t.onFocus,()=>p.onItemFocus(g)),onKeyDown:We(t.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){p.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const A=gA(C,p.orientation,p.dir);if(A!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let L=y().filter(T=>T.focusable).map(T=>T.ref.current);if(A==="last")L.reverse();else if(A==="prev"||A==="next"){A==="prev"&&L.reverse();const T=L.indexOf(C.currentTarget);L=p.loop?bA(L,T+1):L.slice(T+1)}setTimeout(()=>jv(L))}}),children:typeof d=="function"?d({isCurrentTabStop:v,hasTabStop:E!=null}):d})})},"RovingFocusGroupItem")),a$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function pA(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Ya(pA,"getDirectionAwareKey");function gA(e,t,n){const r=pA(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return a$[r]}Ya(gA,"getFocusIntent");function jv(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Ya(jv,"focusFirst");function bA(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Ya(bA,"wrapArray");var o$=t$,s$=i$,l$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Uo=new WeakMap,Gu=new WeakMap,qu={},zp=0,vA=function(e){return e&&(e.host||vA(e.parentNode))},c$=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=vA(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},u$=function(e,t,n,r){var a=c$(t,Array.isArray(e)?e:[e]);qu[n]||(qu[n]=new WeakMap);var s=qu[n],l=[],d=new Set,u=new Set(a),m=function(p){!p||d.has(p)||(d.add(p),m(p.parentNode))};a.forEach(m);var g=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(v){if(d.has(v))g(v);else try{var y=v.getAttribute(r),_=y!==null&&y!=="false",S=(Uo.get(v)||0)+1,E=(s.get(v)||0)+1;Uo.set(v,S),s.set(v,E),l.push(v),S===1&&_&&Gu.set(v,!0),E===1&&v.setAttribute(n,"true"),_||v.setAttribute(r,"true")}catch(k){console.error("aria-hidden: cannot operate on ",v,k)}})};return g(t),d.clear(),zp++,function(){l.forEach(function(p){var v=Uo.get(p)-1,y=s.get(p)-1;Uo.set(p,v),s.set(p,y),v||(Gu.has(p)||p.removeAttribute(r),Gu.delete(p)),y||p.removeAttribute(n)}),zp--,zp||(Uo=new WeakMap,Uo=new WeakMap,Gu=new WeakMap,qu={})}},d$=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=l$(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),u$(r,a,n,"aria-hidden")):function(){return null}},xr=function(){return xr=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},xr.apply(this,arguments)};function yA(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function f$(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Sd="right-scroll-bar-position",wd="width-before-scroll-bar",h$="with-scroll-bars-hidden",m$="--removed-body-scroll-bar-size";function $p(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function p$(e,t){var n=R.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var g$=typeof window<"u"?R.useLayoutEffect:R.useEffect,Hw=new WeakMap;function b$(e,t){var n=p$(null,function(r){return e.forEach(function(a){return $p(a,r)})});return g$(function(){var r=Hw.get(n);if(r){var a=new Set(r),s=new Set(e),l=n.current;a.forEach(function(d){s.has(d)||$p(d,null)}),s.forEach(function(d){a.has(d)||$p(d,l)})}Hw.set(n,e)},[e]),n}function v$(e){return e}function y$(e,t){t===void 0&&(t=v$);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(d){return d!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(d){return s(d)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var d=n;n=[],d.forEach(s),l=n}var u=function(){var g=l;l=[],g.forEach(s)},m=function(){return Promise.resolve().then(u)};m(),n={push:function(g){l.push(g),m()},filter:function(g){return l=l.filter(g),n}}}};return a}function x$(e){e===void 0&&(e={});var t=y$(null);return t.options=xr({async:!0,ssr:!1},e),t}var xA=function(e){var t=e.sideCar,n=yA(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return R.createElement(r,xr({},n))};xA.isSideCarExport=!0;function _$(e,t){return e.useMedium(t),xA}var _A=x$(),Up=function(){},Lf=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:Up,onWheelCapture:Up,onTouchMoveCapture:Up}),a=r[0],s=r[1],l=e.forwardProps,d=e.children,u=e.className,m=e.removeScrollBar,g=e.enabled,p=e.shards,v=e.sideCar,y=e.noRelative,_=e.noIsolation,S=e.inert,E=e.allowPinchZoom,k=e.as,C=k===void 0?"div":k,A=e.gapMode,O=yA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=v,T=b$([n,t]),D=xr(xr({},O),a);return R.createElement(R.Fragment,null,g&&R.createElement(L,{sideCar:_A,removeScrollBar:m,shards:p,noRelative:y,noIsolation:_,inert:S,setCallbacks:s,allowPinchZoom:!!E,lockRef:n,gapMode:A}),l?R.cloneElement(R.Children.only(d),xr(xr({},D),{ref:T})):R.createElement(C,xr({},D,{className:u,ref:T}),d))});Lf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Lf.classNames={fullWidth:wd,zeroRight:Sd};var S$=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function w$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=S$();return t&&e.setAttribute("nonce",t),e}function E$(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function C$(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var k$=function(){var e=0,t=null;return{add:function(n){e==0&&(t=w$())&&(E$(t,n),C$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},R$=function(){var e=k$();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},SA=function(){var e=R$(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},A$={left:0,top:0,right:0,gap:0},Hp=function(e){return parseInt(e||"",10)||0},T$=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Hp(n),Hp(r),Hp(a)]},N$=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return A$;var t=T$(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},j$=SA(),rs="data-scroll-locked",L$=function(e,t,n,r){var a=e.left,s=e.top,l=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
64
|
+
.`.concat(h$,` {
|
|
65
|
+
overflow: hidden `).concat(r,`;
|
|
66
|
+
padding-right: `).concat(d,"px ").concat(r,`;
|
|
67
|
+
}
|
|
68
|
+
body[`).concat(rs,`] {
|
|
69
|
+
overflow: hidden `).concat(r,`;
|
|
70
|
+
overscroll-behavior: contain;
|
|
71
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
72
|
+
padding-left: `.concat(a,`px;
|
|
73
|
+
padding-top: `).concat(s,`px;
|
|
74
|
+
padding-right: `).concat(l,`px;
|
|
75
|
+
margin-left:0;
|
|
76
|
+
margin-top:0;
|
|
77
|
+
margin-right: `).concat(d,"px ").concat(r,`;
|
|
78
|
+
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.`).concat(Sd,` {
|
|
82
|
+
right: `).concat(d,"px ").concat(r,`;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.`).concat(wd,` {
|
|
86
|
+
margin-right: `).concat(d,"px ").concat(r,`;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.`).concat(Sd," .").concat(Sd,` {
|
|
90
|
+
right: 0 `).concat(r,`;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.`).concat(wd," .").concat(wd,` {
|
|
94
|
+
margin-right: 0 `).concat(r,`;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
body[`).concat(rs,`] {
|
|
98
|
+
`).concat(m$,": ").concat(d,`px;
|
|
99
|
+
}
|
|
100
|
+
`)},Bw=function(){var e=parseInt(document.body.getAttribute(rs)||"0",10);return isFinite(e)?e:0},O$=function(){R.useEffect(function(){return document.body.setAttribute(rs,(Bw()+1).toString()),function(){var e=Bw()-1;e<=0?document.body.removeAttribute(rs):document.body.setAttribute(rs,e.toString())}},[])},D$=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;O$();var s=R.useMemo(function(){return N$(a)},[a]);return R.createElement(j$,{styles:L$(s,!t,a,n?"":"!important")})},Kg=!1;if(typeof window<"u")try{var Zu=Object.defineProperty({},"passive",{get:function(){return Kg=!0,!0}});window.addEventListener("test",Zu,Zu),window.removeEventListener("test",Zu,Zu)}catch{Kg=!1}var Ho=Kg?{passive:!1}:!1,I$=function(e){return e.tagName==="TEXTAREA"},wA=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!I$(e)&&n[t]==="visible")},M$=function(e){return wA(e,"overflowY")},P$=function(e){return wA(e,"overflowX")},Vw=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=EA(e,r);if(a){var s=CA(e,r),l=s[1],d=s[2];if(l>d)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},z$=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$$=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},EA=function(e,t){return e==="v"?M$(t):P$(t)},CA=function(e,t){return e==="v"?z$(t):$$(t)},U$=function(e,t){return e==="h"&&t==="rtl"?-1:1},H$=function(e,t,n,r,a){var s=U$(e,window.getComputedStyle(t).direction),l=s*r,d=n.target,u=t.contains(d),m=!1,g=l>0,p=0,v=0;do{if(!d)break;var y=CA(e,d),_=y[0],S=y[1],E=y[2],k=S-E-s*_;(_||k)&&EA(e,d)&&(p+=k,v+=_);var C=d.parentNode;d=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!u&&d!==document.body||u&&(t.contains(d)||t===d));return(g&&Math.abs(p)<1||!g&&Math.abs(v)<1)&&(m=!0),m},Wu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fw=function(e){return[e.deltaX,e.deltaY]},Gw=function(e){return e&&"current"in e?e.current:e},B$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},V$=function(e){return`
|
|
101
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
102
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
103
|
+
`)},F$=0,Bo=[];function G$(e){var t=R.useRef([]),n=R.useRef([0,0]),r=R.useRef(),a=R.useState(F$++)[0],s=R.useState(SA)[0],l=R.useRef(e);R.useEffect(function(){l.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=f$([e.lockRef.current],(e.shards||[]).map(Gw),!0).filter(Boolean);return S.forEach(function(E){return E.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var d=R.useCallback(function(S,E){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var k=Wu(S),C=n.current,A="deltaX"in S?S.deltaX:C[0]-k[0],O="deltaY"in S?S.deltaY:C[1]-k[1],L,T=S.target,D=Math.abs(A)>Math.abs(O)?"h":"v";if("touches"in S&&D==="h"&&T.type==="range")return!1;var M=window.getSelection(),B=M&&M.anchorNode,Y=B?B===T||B.contains(T):!1;if(Y)return!1;var F=Vw(D,T);if(!F)return!0;if(F?L=D:(L=D==="v"?"h":"v",F=Vw(D,T)),!F)return!1;if(!r.current&&"changedTouches"in S&&(A||O)&&(r.current=L),!L)return!0;var $=r.current||L;return H$($,E,S,$==="h"?A:O)},[]),u=R.useCallback(function(S){var E=S;if(!(!Bo.length||Bo[Bo.length-1]!==s)){var k="deltaY"in E?Fw(E):Wu(E),C=t.current.filter(function(L){return L.name===E.type&&(L.target===E.target||E.target===L.shadowParent)&&B$(L.delta,k)})[0];if(C&&C.should){E.cancelable&&E.preventDefault();return}if(!C){var A=(l.current.shards||[]).map(Gw).filter(Boolean).filter(function(L){return L.contains(E.target)}),O=A.length>0?d(E,A[0]):!l.current.noIsolation;O&&E.cancelable&&E.preventDefault()}}},[]),m=R.useCallback(function(S,E,k,C){var A={name:S,delta:E,target:k,should:C,shadowParent:q$(k)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(O){return O!==A})},1)},[]),g=R.useCallback(function(S){n.current=Wu(S),r.current=void 0},[]),p=R.useCallback(function(S){m(S.type,Fw(S),S.target,d(S,e.lockRef.current))},[]),v=R.useCallback(function(S){m(S.type,Wu(S),S.target,d(S,e.lockRef.current))},[]);R.useEffect(function(){return Bo.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Ho),document.addEventListener("touchmove",u,Ho),document.addEventListener("touchstart",g,Ho),function(){Bo=Bo.filter(function(S){return S!==s}),document.removeEventListener("wheel",u,Ho),document.removeEventListener("touchmove",u,Ho),document.removeEventListener("touchstart",g,Ho)}},[]);var y=e.removeScrollBar,_=e.inert;return R.createElement(R.Fragment,null,_?R.createElement(s,{styles:V$(a)}):null,y?R.createElement(D$,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function q$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Z$=_$(_A,G$);var kA=R.forwardRef(function(e,t){return R.createElement(Lf,xr({},e,{ref:t,sideCar:Z$}))});kA.classNames=Lf.classNames;var W$=Object.defineProperty,He=(e,t)=>W$(e,"name",{value:t,configurable:!0}),Y$=["Enter"," "],K$=["ArrowDown","PageUp","Home"],RA=["ArrowUp","PageDown","End"],X$=[...K$,...RA],Of="Menu",[Xg,Q$,J$]=gv(Of),[Ka,AA]=Wa(Of,[J$,tA,mA]),Lv=tA(),TA=mA(),[eU,dc]=Ka(Of),[tU,Ov]=Ka(Of),nU=He(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:s,modal:l=!0}=e,d=Lv(t),[u,m]=R.useState(null),g=R.useRef(!1),p=kr(s),v=vv(a);return R.useEffect(()=>{const y=He(()=>{g.current=!0,document.addEventListener("pointerdown",_,{capture:!0,once:!0}),document.addEventListener("pointermove",_,{capture:!0,once:!0})},"handleKeyDown"),_=He(()=>g.current=!1,"handlePointer");return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",_,{capture:!0}),document.removeEventListener("pointermove",_,{capture:!0})}},[]),R.useEffect(()=>{if(!n)return;const y=He(()=>p(!1),"handleBlur");return window.addEventListener("blur",y),()=>window.removeEventListener("blur",y)},[n,p]),h.jsx(U6,{...d,children:h.jsx(eU,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:m,children:h.jsx(tU,{scope:t,onClose:R.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:v,modal:l,children:r})})})},"Menu"),rU=R.forwardRef(He(function(t,n){const{__scopeMenu:r,...a}=t,s=Lv(r);return h.jsx(H6,{...s,...a,ref:n})},"MenuAnchor")),NA="MenuPortal",[iU,aU]=Ka(NA,{forceMount:void 0}),oU=He(e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,s=dc(NA,t);return h.jsx(iU,{scope:t,forceMount:n,children:h.jsx(Tv,{present:n||s.open,children:h.jsx(G6,{asChild:!0,container:a,children:r})})})},"MenuPortal"),Yi="MenuContent",[sU,jA]=Ka(Yi),lU=R.forwardRef(He(function(t,n){const r=aU(Yi,t.__scopeMenu),{forceMount:a=r.forceMount,...s}=t,l=dc(Yi,t.__scopeMenu),d=Ov(Yi,t.__scopeMenu);return h.jsx(Xg.Provider,{scope:t.__scopeMenu,children:h.jsx(Tv,{present:a||l.open,children:h.jsx(Xg.Slot,{scope:t.__scopeMenu,children:d.modal?h.jsx(cU,{...s,ref:n}):h.jsx(uU,{...s,ref:n})})})})},"MenuContent")),cU=R.forwardRef(He(function(t,n){const r=dc(Yi,t.__scopeMenu),a=R.useRef(null),s=qt(n,a);return R.useEffect(()=>{const l=a.current;if(l)return d$(l)},[]),h.jsx(LA,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:We(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),uU=R.forwardRef(He(function(t,n){const r=dc(Yi,t.__scopeMenu);return h.jsx(LA,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),dU=Qi("MenuContent.ScrollLock"),LA=R.forwardRef(He(function(t,n){const{__scopeMenu:r,loop:a=!1,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:d,disableOutsidePointerEvents:u,onEntryFocus:m,onEscapeKeyDown:g,onPointerDownOutside:p,onFocusOutside:v,onInteractOutside:y,onDismiss:_,disableOutsideScroll:S,...E}=t,k=dc(Yi,r),C=Ov(Yi,r),A=Lv(r),O=TA(r),L=Q$(r),[T,D]=R.useState(null),M=R.useRef(null),B=qt(n,M,k.onContentChange),Y=R.useRef(0),F=R.useRef(""),$=R.useRef(0),q=R.useRef(null),ne=R.useRef("right"),se=R.useRef(0),z=S?kA:R.Fragment,G=S?{as:dU,allowPinchZoom:!0}:void 0,ie=He(Z=>{const P=F.current+Z,ee=L().filter(Re=>!Re.disabled),le=document.activeElement,de=ee.find(Re=>Re.ref.current===le)?.textValue,ce=ee.map(Re=>Re.textValue),fe=zA(ce,P,de),ye=ee.find(Re=>Re.textValue===fe)?.ref.current;He((function Re(he){F.current=he,window.clearTimeout(Y.current),he!==""&&(Y.current=window.setTimeout(()=>Re(""),1e3))}),"updateSearch")(P),ye&&setTimeout(()=>ye.focus())},"handleTypeaheadSearch");R.useEffect(()=>()=>window.clearTimeout(Y.current),[]),_v();const J=R.useCallback(Z=>ne.current===q.current?.side&&UA(Z,q.current?.area),[]);return h.jsx(sU,{scope:r,searchRef:F,onItemEnter:R.useCallback(Z=>{J(Z)&&Z.preventDefault()},[J]),onItemLeave:R.useCallback(Z=>{J(Z)||(M.current?.focus(),D(null))},[J]),onTriggerLeave:R.useCallback(Z=>{J(Z)&&Z.preventDefault()},[J]),pointerGraceTimerRef:$,onPointerGraceIntentChange:R.useCallback(Z=>{q.current=Z},[]),children:h.jsx(z,{...G,children:h.jsx(x3,{asChild:!0,trapped:s,onMountAutoFocus:We(l,Z=>{Z.preventDefault(),M.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:h.jsx(m3,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:g,onPointerDownOutside:p,onFocusOutside:v,onInteractOutside:y,onDismiss:_,children:h.jsx(o$,{asChild:!0,...O,dir:C.dir,orientation:"vertical",loop:a,currentTabStopId:T,onCurrentTabStopIdChange:D,onEntryFocus:We(m,Z=>{C.isUsingKeyboardRef.current||Z.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(B6,{role:"menu","aria-orientation":"vertical","data-state":IA(k.open),"data-radix-menu-content":"",dir:C.dir,...A,...E,ref:B,style:{outline:"none",...E.style},onKeyDown:We(E.onKeyDown,Z=>{const ee=Z.target.closest("[data-radix-menu-content]")===Z.currentTarget,le=Z.ctrlKey||Z.altKey||Z.metaKey,de=Z.key.length===1;ee&&(Z.key==="Tab"&&Z.preventDefault(),!le&&de&&ie(Z.key));const ce=M.current;if(Z.target!==ce||!X$.includes(Z.key))return;Z.preventDefault();const ye=L().filter(Re=>!Re.disabled).map(Re=>Re.ref.current);RA.includes(Z.key)&&ye.reverse(),MA(ye)}),onBlur:We(t.onBlur,Z=>{Z.currentTarget.contains(Z.target)||(window.clearTimeout(Y.current),F.current="")}),onPointerMove:We(t.onPointerMove,qd(Z=>{const P=Z.target,ee=se.current!==Z.clientX;if(Z.currentTarget.contains(P)&&ee){const le=Z.clientX>se.current?"right":"left";ne.current=le,se.current=Z.clientX}}))})})})})})})},"MenuContentImpl")),fU=R.forwardRef(He(function(t,n){const{__scopeMenu:r,...a}=t;return h.jsx(Dn.div,{role:"group",...a,ref:n})},"MenuGroup")),hU=R.forwardRef(He(function(t,n){const{__scopeMenu:r,...a}=t;return h.jsx(Dn.div,{...a,ref:n})},"MenuLabel")),Qg="MenuItem",qw="menu.itemSelect",OA=R.forwardRef(He(function(t,n){const{disabled:r=!1,onSelect:a,...s}=t,l=R.useRef(null),d=Ov(Qg,t.__scopeMenu),u=jA(Qg,t.__scopeMenu),m=qt(n,l),g=R.useRef(!1),p=He(()=>{const v=l.current;if(!r&&v){const y=new CustomEvent(qw,{bubbles:!0,cancelable:!0});v.addEventListener(qw,_=>a?.(_),{once:!0}),pv(v,y),y.defaultPrevented?g.current=!1:d.onClose()}},"handleSelect");return h.jsx(mU,{...s,ref:m,disabled:r,onClick:We(t.onClick,p),onPointerDown:v=>{t.onPointerDown?.(v),g.current=!0},onPointerUp:We(t.onPointerUp,v=>{g.current||v.currentTarget?.click()}),onKeyDown:We(t.onKeyDown,v=>{r||v.target!==v.currentTarget||u.searchRef.current!==""&&v.key===" "||Y$.includes(v.key)&&(v.currentTarget.click(),v.preventDefault())})})},"MenuItem")),mU=R.forwardRef(He(function(t,n){const{__scopeMenu:r,disabled:a=!1,textValue:s,...l}=t,d=jA(Qg,r),u=TA(r),m=R.useRef(null),g=qt(n,m),[p,v]=R.useState(!1),[y,_]=R.useState("");return R.useEffect(()=>{const S=m.current;S&&_((S.textContent??"").trim())},[l.children]),h.jsx(Xg.ItemSlot,{scope:r,disabled:a,textValue:s??y,children:h.jsx(s$,{asChild:!0,...u,focusable:!a,children:h.jsx(Dn.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...l,ref:g,onPointerMove:We(t.onPointerMove,qd(S=>{a?d.onItemLeave(S):(d.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:We(t.onPointerLeave,qd(S=>d.onItemLeave(S))),onFocus:We(t.onFocus,()=>v(!0)),onBlur:We(t.onBlur,()=>v(!1))})})})},"MenuItemImpl")),pU="MenuRadioGroup",[gU,bU]=Ka(pU,{value:void 0,onValueChange:He(()=>{},"onValueChange")}),vU=R.forwardRef(He(function(t,n){const{value:r,onValueChange:a,...s}=t,l=kr(a);return h.jsx(gU,{scope:t.__scopeMenu,value:r,onValueChange:l,children:h.jsx(fU,{...s,ref:n})})},"MenuRadioGroup")),yU="MenuRadioItem",xU=R.forwardRef(He(function(t,n){const{value:r,...a}=t,s=bU(yU,t.__scopeMenu),l=r===s.value;return h.jsx(_U,{scope:t.__scopeMenu,checked:l,children:h.jsx(OA,{role:"menuitemradio","aria-checked":l,...a,ref:n,"data-state":Iv(l),onSelect:We(a.onSelect,()=>s.onValueChange?.(r),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),DA="MenuItemIndicator",[_U,SU]=Ka(DA,{checked:!1}),wU=R.forwardRef(He(function(t,n){const{__scopeMenu:r,forceMount:a,...s}=t,l=SU(DA,r);return h.jsx(Tv,{present:a||Dv(l.checked)||l.checked===!0,children:h.jsx(Dn.span,{...s,ref:n,"data-state":Iv(l.checked)})})},"MenuItemIndicator")),EU=R.forwardRef(He(function(t,n){const{__scopeMenu:r,...a}=t;return h.jsx(Dn.div,{role:"separator","aria-orientation":"horizontal",...a,ref:n})},"MenuSeparator")),CU="MenuSub",[WY,YY]=Ka(CU);function IA(e){return e?"open":"closed"}He(IA,"getOpenState");function Dv(e){return e==="indeterminate"}He(Dv,"isIndeterminate");function Iv(e){return Dv(e)?"indeterminate":e?"checked":"unchecked"}He(Iv,"getCheckedState");function MA(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}He(MA,"focusFirst");function PA(e,t){return e.map((n,r)=>e[(t+r)%e.length])}He(PA,"wrapArray");function zA(e,t,n){const a=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=PA(e,Math.max(s,0));a.length===1&&(l=l.filter(m=>m!==n));const u=l.find(m=>m.toLowerCase().startsWith(a.toLowerCase()));return u!==n?u:void 0}He(zA,"getNextMatch");function $A(e,t){const{x:n,y:r}=e;let a=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const d=t[s],u=t[l],m=d.x,g=d.y,p=u.x,v=u.y;g>r!=v>r&&n<(p-m)*(r-g)/(v-g)+m&&(a=!a)}return a}He($A,"isPointInPolygon");function UA(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return $A(n,t)}He(UA,"isPointerInGraceArea");function qd(e){return t=>t.pointerType==="mouse"?e(t):void 0}He(qd,"whenMouse");var kU=nU,RU=rU,AU=oU,TU=lU,NU=hU,jU=OA,LU=vU,OU=xU,DU=wU,IU=EU,MU=Object.defineProperty,Tr=(e,t)=>MU(e,"name",{value:t,configurable:!0}),Mv="DropdownMenu",[PU,KY]=Wa(Mv,[AA]),Nr=AA(),[zU,HA]=PU(Mv),$U=Tr(e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:s,onOpenChange:l,modal:d=!0}=e,u=Nr(t),m=R.useRef(null),[g,p]=mv({prop:a,defaultProp:s??!1,onChange:l,caller:Mv});return h.jsx(zU,{scope:t,triggerId:Hd(),triggerRef:m,contentId:Hd(),open:g,onOpenChange:p,onOpenToggle:R.useCallback(()=>p(v=>!v),[p]),modal:d,children:h.jsx(kU,{...u,open:g,onOpenChange:p,dir:r,modal:d,children:n})})},"DropdownMenu"),UU="DropdownMenuTrigger",HU=R.forwardRef(Tr(function(t,n){const{__scopeDropdownMenu:r,disabled:a=!1,...s}=t,l=HA(UU,r),d=Nr(r),u=qt(n,l.triggerRef);return h.jsx(RU,{asChild:!0,...d,children:h.jsx(Dn.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...s,ref:u,onPointerDown:We(t.onPointerDown,m=>{!a&&m.button===0&&m.ctrlKey===!1&&(l.onOpenToggle(),l.open||m.preventDefault())}),onKeyDown:We(t.onKeyDown,m=>{a||(["Enter"," "].includes(m.key)&&l.onOpenToggle(),m.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})},"DropdownMenuTrigger")),BU=Tr(e=>{const{__scopeDropdownMenu:t,...n}=e,r=Nr(t);return h.jsx(AU,{...r,...n})},"DropdownMenuPortal"),VU="DropdownMenuContent",FU=R.forwardRef(Tr(function(t,n){const{__scopeDropdownMenu:r,...a}=t,s=HA(VU,r),l=Nr(r),d=R.useRef(!1);return h.jsx(TU,{id:s.contentId,"aria-labelledby":s.triggerId,...l,...a,ref:n,onCloseAutoFocus:We(t.onCloseAutoFocus,u=>{d.current||s.triggerRef.current?.focus(),d.current=!1,u.preventDefault()}),onInteractOutside:We(t.onInteractOutside,u=>{const m=u.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,p=m.button===2||g;(!s.modal||p)&&(d.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),GU=R.forwardRef(Tr(function(t,n){const{__scopeDropdownMenu:r,...a}=t,s=Nr(r);return h.jsx(NU,{...s,...a,ref:n})},"DropdownMenuLabel")),qU=R.forwardRef(Tr(function(t,n){const{__scopeDropdownMenu:r,...a}=t,s=Nr(r);return h.jsx(jU,{...s,...a,ref:n})},"DropdownMenuItem")),ZU=R.forwardRef(Tr(function(t,n){const{__scopeDropdownMenu:r,...a}=t,s=Nr(r);return h.jsx(LU,{...s,...a,ref:n})},"DropdownMenuRadioGroup")),WU=R.forwardRef(Tr(function(t,n){const{__scopeDropdownMenu:r,...a}=t,s=Nr(r);return h.jsx(OU,{...s,...a,ref:n})},"DropdownMenuRadioItem")),YU=R.forwardRef(Tr(function(t,n){const{__scopeDropdownMenu:r,...a}=t,s=Nr(r);return h.jsx(DU,{...s,...a,ref:n})},"DropdownMenuItemIndicator")),KU=R.forwardRef(Tr(function(t,n){const{__scopeDropdownMenu:r,...a}=t,s=Nr(r);return h.jsx(IU,{...s,...a,ref:n})},"DropdownMenuSeparator")),XU=$U,QU=HU,JU=BU,eH=FU,tH=GU,nH=qU,rH=ZU,iH=WU,aH=YU,oH=KU;const Pv=XU,zv=QU,sH=rH;function $v({className:e,container:t,...n}){return h.jsx(JU,{container:t,children:h.jsx(eH,{sideOffset:6,collisionPadding:12,className:Se("z-50 min-w-56 max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto border border-input bg-card p-1 font-mono text-sm text-foreground outline-none",e),...n})})}function lH({className:e,...t}){return h.jsx(tH,{className:Se("px-2 py-2 text-xs text-muted-foreground",e),...t})}function cH(e){return h.jsx(oH,{className:"my-1 h-px bg-border",...e})}function Jg({className:e,...t}){return h.jsx(nH,{className:Se("flex cursor-default items-center gap-2 px-2 py-2 outline-none data-[highlighted]:bg-muted data-[highlighted]:text-brand data-[disabled]:pointer-events-none data-[disabled]:opacity-40 [&>svg]:size-4",e),...t})}function uH({className:e,children:t,...n}){return h.jsxs(iH,{className:Se("relative flex cursor-default items-center gap-2 px-2 py-2 pr-8 outline-none data-[highlighted]:bg-muted data-[highlighted]:text-brand",e),...n,children:[t,h.jsx(aH,{className:"absolute right-2",children:h.jsx(Vl,{className:"size-3.5 text-brand"})})]})}function dH({org:e,orgs:t,onSelect:n,collapsed:r=!1}){const a=U.useRef(null),[s,l]=U.useState(null);U.useEffect(()=>{l(a.current?.closest("dialog")??a.current?.closest(".sb")??null)},[]);const d=t.filter(m=>m.kind==="user"),u=t.filter(m=>m.kind==="org");return h.jsx("div",{ref:a,children:h.jsxs(Pv,{modal:!1,children:[h.jsx(zv,{asChild:!0,children:h.jsxs("button",{type:"button","aria-label":"Organization",className:Se("flex h-9 w-full min-w-0 cursor-pointer items-center gap-2 border border-border bg-transparent px-3 text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-brand",r&&"justify-center px-0"),children:[h.jsx("span",{className:"shrink-0 overflow-hidden border border-border",children:h.jsx(hv,{login:e.login,url:e.avatarUrl,size:20})}),!r&&h.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:e.login}),!r&&h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 12 12",className:"h-3 w-3 shrink-0 text-muted-foreground",children:h.jsx("path",{d:"M2 4.5l4 4 4-4",fill:"none",stroke:"currentColor",strokeWidth:"1.25"})})]})}),h.jsx($v,{container:s,side:"top",align:"start",className:"w-[var(--radix-dropdown-menu-trigger-width)] min-w-52 max-w-[calc(100vw-24px)] p-1.5","aria-label":"Switch Organization",children:h.jsxs(sH,{value:e.login,onValueChange:m=>{const g=t.find(p=>p.login===m);g&&n(g)},children:[d.map(m=>h.jsx(Zw,{org:m},m.login)),u.length>0&&h.jsxs(h.Fragment,{children:[d.length>0&&h.jsx(cH,{}),h.jsx(lH,{className:"px-2 pt-2 pb-1 font-mono text-xs text-muted-foreground",children:"Organizations"}),u.map(m=>h.jsx(Zw,{org:m},m.login))]})]})})]})})}function Zw({org:e}){return h.jsxs(uH,{value:e.login,className:"min-h-9 gap-2.5 py-1.5 data-[state=checked]:bg-brand/5",children:[h.jsx("span",{className:"shrink-0 overflow-hidden border border-border",children:h.jsx(hv,{login:e.login,url:e.avatarUrl,size:24})}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block truncate font-mono text-sm leading-5",children:e.login}),e.kind==="user"&&h.jsx("span",{className:"block font-mono text-xs leading-5 text-muted-foreground",children:"Personal Account"})]})]})}function BA({org:e,orgs:t,onSelect:n,onNavigate:r,collapsed:a=!1}){const{pathname:s}=pn();return h.jsxs("aside",{"data-slot":"sidebar",className:"flex h-full min-h-0 flex-col bg-background",children:[h.jsx($5,{className:"flex h-14 shrink-0 flex-row items-center border-b border-border px-4 group-data-[collapsible=icon]/sidebar:px-2",children:h.jsx(mR,{compact:!0,showName:!a})}),h.jsx(U5,{children:h.jsx("nav",{"aria-label":"Organization Navigation",children:h.jsxs(P5,{children:[h.jsx(H5,{children:"Workspace"}),h.jsx(z5,{children:h.jsxs(V5,{children:[h.jsx(Ap,{children:h.jsx(Tp,{asChild:!0,isActive:s==="/"||s.startsWith("/repos/"),children:h.jsxs($e,{to:"/",onClick:r,"aria-label":"Repositories",title:"Repositories",children:[h.jsx(yC,{}),!a&&h.jsx("span",{children:"Repositories"})]})})}),h.jsx(Ap,{children:h.jsx(Tp,{asChild:!0,isActive:s.startsWith("/settings/credentials"),children:h.jsxs($e,{to:"/settings/credentials",onClick:r,"aria-label":"Credentials",title:"Credentials",children:[h.jsx(kC,{}),!a&&h.jsx("span",{children:"Credentials"})]})})}),h.jsx(Ap,{children:h.jsx(Tp,{asChild:!0,isActive:s.startsWith("/settings/api-keys"),children:h.jsxs($e,{to:"/settings/api-keys",onClick:r,"aria-label":"API Keys",title:"API Keys",children:[h.jsx(TD,{}),!a&&h.jsx("span",{children:"API Keys"})]})})})]})})]})})}),h.jsx(B5,{className:"border-t border-border p-3 group-data-[collapsible=icon]/sidebar:p-2",children:h.jsx(dH,{org:e,orgs:t,onSelect:n,collapsed:a})})]})}function fH(e){const t=U.useRef(null),n=ak(t);return h.jsxs("dialog",{ref:n,"aria-label":"Navigation",onCancel:r=>{r.preventDefault(),e.onClose()},className:"fixed inset-y-0 left-0 m-0 h-dvh max-h-none w-72 max-w-[calc(100%_-_2rem)] border-0 border-r border-border bg-card p-0 text-foreground backdrop:bg-black/70",children:[h.jsx(be,{size:"icon",variant:"ghost",ref:t,type:"button","aria-label":"Close Navigation",onClick:e.onClose,className:"absolute top-2 right-2",children:h.jsx(Gb,{"aria-hidden":"true"})}),h.jsx(BA,{...e,onNavigate:e.onClose})]})}function hH({user:e,onSignOut:t}){const[n,r]=U.useState(!1);return h.jsx(G5,{label:"Account",className:"user-menu",trigger:h.jsxs(h.Fragment,{children:[h.jsx(hv,{login:e.login,url:e.avatarUrl}),h.jsx("span",{className:"hidden max-w-32 truncate sm:block",children:e.login})]}),children:()=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"border-b border-border px-3.5 py-3",children:[h.jsx("div",{className:"font-mono text-sm font-medium tracking-[0.14em] text-brand uppercase",children:"Account"}),e.name&&h.jsx("div",{className:"mt-1.5 font-mono text-sm leading-snug font-semibold text-foreground",children:e.name}),h.jsxs("div",{className:"font-mono text-sm text-muted-foreground",children:["@",e.login]})]}),h.jsx("button",{type:"button",role:"menuitem",className:"flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left font-mono text-sm font-medium text-foreground hover:bg-accent hover:text-brand disabled:cursor-default disabled:opacity-50",disabled:n,onClick:()=>{r(!0),t().finally(()=>r(!1))},children:"Sign Out"})]})})}function jr(){return pO()}function mH({user:e,orgs:t}){const{signOut:n}=lv(),r=ta(),a=pn(),[s,l]=U.useState(()=>c5(t)),[d,u]=U.useState(!1),[m,g]=U.useState(()=>{try{return window.localStorage.getItem("selfbench.sidebar.collapsed")==="true"}catch{return!1}}),p=()=>{g(y=>{const _=!y;try{window.localStorage.setItem("selfbench.sidebar.collapsed",String(_))}catch{}return _})};U.useEffect(()=>{const y=window.matchMedia("(min-width: 768px)"),_=()=>{y.matches&&u(!1)};return y.addEventListener("change",_),()=>y.removeEventListener("change",_)},[]);const v=y=>{u5(y.login),l(y),u(!1),a.pathname!=="/"&&!a.pathname.startsWith("/settings/")&&r("/")};return h.jsxs("div",{className:Se("flex h-svh overflow-hidden transition-[padding] duration-200 ease-linear",m?"md:pl-12":"md:pl-64"),children:[h.jsx("div",{className:Se("group/sidebar fixed inset-y-0 left-0 z-20 hidden border-r border-border text-sidebar-foreground transition-[width] duration-200 ease-linear md:block",m?"w-12":"w-64"),"data-state":m?"collapsed":"expanded","data-collapsible":m?"icon":"","data-variant":"sidebar","data-side":"left",children:h.jsx(BA,{user:e,org:s,orgs:t,onSelect:v,onSignOut:n,collapsed:m})}),h.jsxs(M5,{children:[h.jsx("header",{className:Se("z-10 h-14 shrink-0 border-b border-border bg-background",ls),children:h.jsxs("div",{className:Se(rk,"flex h-full items-center justify-between"),children:[h.jsx(I5,{type:"button","aria-label":m?"Expand Sidebar":"Collapse Sidebar",title:m?"Expand Sidebar":"Collapse Sidebar",onClick:p,className:"-ml-2 hidden md:inline-flex"}),h.jsx("div",{className:"md:hidden",children:h.jsx(mR,{compact:!0})}),h.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[h.jsx(hH,{user:e,onSignOut:n}),h.jsx(be,{size:"icon",variant:"ghost","aria-label":"Open Navigation","aria-haspopup":"dialog","aria-expanded":d,onClick:()=>u(!0),className:"md:hidden",children:h.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M3 5h14M3 10h14M3 15h14"})})})]})]})}),h.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-auto",children:h.jsx(nC,{context:{org:s,orgs:t}},s.login)})]}),d&&h.jsx(fH,{user:e,org:s,orgs:t,onSelect:v,onSignOut:n,onClose:()=>u(!1)})]})}function VA(){const{org:e}=jr(),{owner:t="",name:n=""}=fi(),r=`${t}/${n}`;return{repo:r,url:sR(e.login,r)}}function pH(){const{repo:e,url:t}=VA();er(`Comparison · ${e}`);const{comparisonId:n}=fi(),[r,a]=U.useState(),[s,l]=U.useState(""),[d,u]=U.useState(!1),[m,g]=U.useState(!1);U.useEffect(()=>{let v=!1;const y=async()=>{try{const S=await jt(`${t}/comparisons/${n}`);v||(u(!1),a(S),l(""))}catch(S){!v&&S instanceof dv&&S.status===404&&n&&(E5(t,n),u(!0)),v||l(S instanceof Error?S.message:"Could not load comparison")}};a(void 0),u(!1),l(""),y();const _=setInterval(()=>{y()},3e3);return()=>{v=!0,clearInterval(_)}},[t,n]);const p=async()=>{g(!0);try{const v=await jt(`${t}/comparisons/${n}/resume`,{});a(v),l(v.submissionError??"")}catch(v){l(v instanceof Error?v.message:"Could not resume submission")}finally{g(!1)}};return h.jsxs(Ba,{children:[h.jsx(hi,{title:"Comparison",description:r?`${r.runs.filter(v=>v.status==="completed").length} of ${r.runs.length} runs complete · ${r.runs.filter(v=>v.status==="running").length} running · ${r.runs.filter(v=>v.status==="queued"||v.status==="pending").length} waiting`:"",children:h.jsx($e,{className:ra.secondary,to:`/repos/${e}/results`,children:"View Results"})}),d?h.jsxs(ft,{className:"mb-4",children:[h.jsx("p",{children:"This comparison could not be found. Return to Run to review your selection."}),h.jsx($e,{className:"text-brand",to:`/repos/${e}/run`,children:"Back to Run"})]}):s&&h.jsx(ft,{className:"mb-4",children:s}),!r&&!s&&h.jsx("p",{children:"Loading comparison…"}),r&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"divide-y divide-border border border-border",children:[...r.runs].sort((v,y)=>+(y.status==="running")-+(v.status==="running")).map(v=>h.jsxs($e,{to:`/repos/${e}/results?run=${v.id}`,className:`block min-w-0 bg-card px-4 py-3 hover:bg-muted ${v.status==="running"?"border-l-2 border-l-brand":""}`,children:[h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[h.jsx("h2",{className:"min-w-0 break-all text-sm font-medium",children:v.model}),h.jsx("span",{className:v.status==="running"?"text-xs text-brand":"text-xs text-muted-foreground",children:v.status==="running"?"Running Now":v.status==="pending"?"Not Submitted":v.status==="queued"?"Queued":v.status==="completed"?"Completed":"Failed"})]}),h.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[v.harnesses.map(y=>Va[y]).join(" + ")," · Thinking:"," ",Zl(v.thinking)]}),h.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:[v.completed," / ",v.trials," trials finished",v.status==="queued"?" · Waiting for a worker":""]})]},v.id))}),r.runs.some(v=>v.status==="pending"||v.status==="queued")&&h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 py-3.5",children:[h.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"If submission was interrupted, resume reuses the same run IDs."}),h.jsx(be,{type:"button",variant:"primary",disabled:m,onClick:()=>{p()},children:m?"Resuming…":"Resume Submission"})]})]})]})}function gH({org:e,name:t,onActiveChange:n,onSavingChange:r,onDone:a}){const s=`/api/orgs/${encodeURIComponent(e)}/credentials/codex-login`,[l,d]=U.useState(),[u,m]=U.useState(!1),[g,p]=U.useState(""),[v,y]=U.useState(!1),[_,S]=U.useState(""),E=U.useRef(void 0),k=U.useRef(0),C=U.useRef(!0),A=U.useRef(a);A.current=a;const O=U.useRef(null);U.useEffect(()=>(C.current=!0,()=>{C.current=!1,k.current+=1,E.current&&jt(`${s}/${E.current}/cancel`,{}).catch(()=>{})}),[s]);const L=l?.id;U.useEffect(()=>{if(!L||g)return;let D=!1;const M=k.current,B=()=>D||M!==k.current;let Y;const F=async()=>{try{const $=await jt(`${s}/${L}`);if(B())return;if($.status==="ready"){d({...$,status:"saving"}),r(!0);const q=await jt(`${s}/${L}/complete`,{});B()||(d({...$,status:"saved",credential:q}),r(!1),n(!1),A.current());return}if(d($),$.status==="failed"||$.status==="saved"){n(!1),$.status==="saved"&&A.current();return}Y=setTimeout(F,1500)}catch($){B()||(r(!1),p($ instanceof Error?$.message:"Could not check sign-in. Try again."))}};return Y=setTimeout(F,500),()=>{D=!0,clearTimeout(Y)}},[L,g,s,n,r]);const T=async()=>{k.current+=1,d(void 0),m(!0),p(""),y(!1),S(""),n(!0);try{const D=await jt(s,{name:t.trim()});if(!C.current){jt(`${s}/${D.id}/cancel`,{}).catch(()=>{});return}E.current=D.id,d(D)}catch(D){C.current&&(p(D instanceof Error?D.message:"Could not start sign-in"),n(!1))}finally{C.current&&m(!1)}};return l?.status==="saved"?h.jsxs("div",{className:"flex flex-wrap items-center gap-3 border border-brand/25 bg-brand/5 p-4",role:"status",children:[h.jsx(Vl,{className:"text-brand",size:18,"aria-hidden":"true"}),h.jsx("h3",{className:"flex-1 text-sm font-medium",children:"Codex Connected"}),h.jsx(be,{type:"button",variant:"primary",onClick:()=>{a()},children:"Done"})]}):h.jsxs("div",{className:"space-y-4",children:[!l&&!u?h.jsxs("div",{children:[h.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:"Use your ChatGPT plan for Codex runs."}),h.jsxs(be,{type:"button",className:"mt-3 w-full",variant:"primary",disabled:!t.trim(),onClick:()=>{T()},children:["Sign In with ChatGPT",h.jsx(CS,{size:15,"aria-hidden":"true"})]})]}):u||l?.status==="starting"?h.jsxs("div",{role:"status","aria-label":"Preparing Sign-In",className:"space-y-4 border border-border bg-background p-4",children:[h.jsx(et,{className:"h-4 w-44"}),h.jsx(et,{className:"h-12 w-full"}),h.jsx(et,{className:"h-9 w-full"}),h.jsx("span",{className:"sr-only",children:"Preparing your sign-in code…"})]}):l?.status==="failed"?h.jsxs("div",{role:"alert",className:"border border-destructive/30 p-4",children:[h.jsx("p",{className:"text-sm leading-6 text-destructive",children:l.error}),h.jsx(be,{type:"button",className:"mt-4",onClick:()=>{T()},children:"Start Again"})]}):h.jsxs("div",{className:"border border-border bg-background p-4",children:[h.jsx("p",{className:"mb-3 text-sm text-muted-foreground",children:"Enter this code on OpenAI."}),h.jsxs("div",{className:"flex border border-input bg-card",children:[h.jsx("input",{ref:O,"aria-label":"One-Time Code",readOnly:!0,value:l?.instructions?.userCode??"",onFocus:D=>D.target.select(),className:"min-w-0 flex-1 bg-transparent p-3 text-center font-mono text-xl tracking-[0.15em] text-brand outline-none"}),h.jsx("button",{type:"button","aria-label":v?"Code Copied":"Copy Code",title:v?"Code Copied":"Copy Code",className:"border-l border-border px-4 text-muted-foreground hover:text-brand",onClick:async()=>{try{await navigator.clipboard.writeText(l?.instructions?.userCode??""),y(!0)}catch{O.current?.focus(),O.current?.select(),S("Copy the selected code to continue.")}},children:v?h.jsx(Vl,{size:16,"aria-hidden":"true"}):h.jsx(fC,{size:16,"aria-hidden":"true"})})]}),_&&h.jsx("p",{role:"status",className:"mt-2 text-xs text-muted-foreground",children:_}),h.jsxs("a",{className:`${ra.primary} mt-4 w-full`,href:l?.instructions?.verificationUrl,target:"_blank",rel:"noreferrer",children:["Continue on OpenAI",h.jsx(CS,{size:15,"aria-hidden":"true"})]}),h.jsxs("p",{className:"mt-5 flex items-center gap-2 border-t border-border pt-4 text-xs text-muted-foreground",role:"status",children:[h.jsx("span",{className:"size-1.5 animate-pulse bg-brand motion-reduce:animate-none","aria-hidden":"true"}),l?.status==="saving"?"Saving…":"Waiting for approval…"]})]}),g&&h.jsxs("div",{role:"alert",className:"text-sm leading-6 text-destructive",children:[h.jsx("p",{children:g}),l&&h.jsxs("div",{className:"mt-2 flex gap-2",children:[h.jsx(be,{type:"button",onClick:()=>p(""),children:"Retry"}),h.jsx(be,{type:"button",variant:"ghost",onClick:()=>{T()},children:"Start Again"})]})]}),h.jsxs("details",{className:"text-xs leading-5 text-muted-foreground",children:[h.jsx("summary",{className:"w-fit cursor-pointer hover:text-foreground",children:"Sign-In Help"}),h.jsx("p",{className:"mt-2",children:"Enable device code login in your ChatGPT security settings. Your subscription limits apply."})]})]})}function bH({draft:e,setDraft:t,importing:n,setError:r,keyLabel:a}){const[s,l]=U.useState(!1),d=U.useRef(0);return U.useEffect(()=>()=>{d.current++},[]),h.jsx(h.Fragment,{children:n?h.jsxs("label",{className:qn,htmlFor:"credential-auth-file",children:["Codex auth.json",h.jsx(Nn,{id:"credential-auth-file",type:"file",required:!0,accept:"application/json,.json",onChange:async u=>{const m=u.target.files?.[0],g=++d.current;if(t(p=>({...p,value:""})),r(""),!!m){if(m.size>24e3){r("Auth file exceeds 24 KB.");return}try{const p=await m.text();if(g!==d.current)return;const v=JSON.parse(p);if(!v.tokens?.access_token||!v.tokens?.refresh_token||v.OPENAI_API_KEY)throw new Error;t(y=>({...y,value:p}))}catch{if(g!==d.current)return;r("Choose a Codex ChatGPT auth.json containing a subscription sign-in.")}}}}),h.jsx("span",{className:"text-xs font-normal leading-5 text-muted-foreground",children:"From your Codex CLI sign-in."})]}):h.jsxs("div",{className:qn,children:[h.jsx("label",{htmlFor:"credential-secret",children:a}),h.jsxs("div",{className:"relative",children:[h.jsx(Nn,{id:"credential-secret",className:"pr-12",required:!0,type:s?"text":"password",autoComplete:"new-password",maxLength:4096,value:e.value,onChange:u=>t({...e,value:u.target.value})}),h.jsx("button",{type:"button","aria-label":s?"Hide Secret":"Show Secret",className:"absolute inset-y-0 right-0 px-3 text-muted-foreground hover:text-foreground",onClick:()=>l(u=>!u),children:s?h.jsx(CD,{size:16,"aria-hidden":"true"}):h.jsx(kD,{size:16,"aria-hidden":"true"})})]})]})})}const FA=[{id:"openai",label:"OpenAI"},{id:"anthropic",label:"Anthropic"},{id:"openrouter",label:"OpenRouter"},{id:"custom",label:"Custom Endpoint"}],Uv=[{id:"e2b",label:"E2B"},{id:"modal",label:"Modal"},{id:"daytona",label:"Daytona"},{id:"vercel",label:"Vercel"}];function eb(e){return Uv.some(t=>t.id===e)}function vH(e){return e.auth==="codex-login"?"Codex":[...FA,...Uv].find(t=>t.id===e.kind)?.label??e.kind}function yH(e){return e.auth==="codex-login"?"ChatGPT Sign-In":e.kind==="modal"?"Token Pair":"API Key"}function xH({previous:e,kind:t="openai",auth:n="api-key",org:r,onSave:a,onSaved:s,onCancel:l}){const[d,u]=U.useState({name:e?`${e.name} replacement`.slice(0,80):n==="codex-login"?"Codex":"",kind:e?.kind??t,auth:e?.auth??n,value:"",endpoint:e?.endpoint}),[m,g]=U.useState(!1),[p,v]=U.useState(!1),[y,_]=U.useState(!1),[S,E]=U.useState(""),k=U.useRef(null),C=d.auth==="codex-login"&&!y,A=eb(e?.kind??t),O=A?Uv:FA,L=d.kind==="modal"?"Modal Token Secret":d.kind==="vercel"?"Vercel Token":"API Key";return h.jsxs(mi,{initialFocus:k,onDismiss:l,busy:m,"aria-labelledby":"credential-title","aria-describedby":"credential-description",children:[h.jsx(pi,{title:e?"Replace Credential":A?"Add Sandbox":"Add Provider",titleId:"credential-title",descriptionId:"credential-description",description:h.jsxs(h.Fragment,{children:["Shared with ",r,"."]}),onClose:l,busy:m}),h.jsxs("form",{onSubmit:async T=>{if(T.preventDefault(),!(m||C)){g(!0),E("");try{await a(d)}catch(D){E(D instanceof Error?D.message:"Could not save credential")}finally{g(!1)}}},children:[h.jsxs(gs,{children:[e&&h.jsx("p",{className:"border-l-2 border-input pl-3 text-xs leading-5 text-muted-foreground",children:"Creates a new credential. Existing runs keep the original."}),h.jsxs("fieldset",{disabled:m||p,className:"space-y-5",children:[h.jsxs("label",{className:qn,htmlFor:"credential-provider",children:[A?"Sandbox":"Provider",h.jsx(Qt,{id:"credential-provider",value:d.kind,onChange:T=>{u({name:d.name,kind:T.target.value,auth:"api-key",value:""}),_(!1),E("")},children:O.map(T=>h.jsx("option",{value:T.id,children:T.label},T.id))})]}),d.kind==="openai"&&h.jsxs("fieldset",{children:[h.jsx("legend",{className:"sr-only",children:"Authentication"}),h.jsx("div",{className:"grid grid-cols-2 border border-input p-1",children:[{id:"api-key",label:"API Key"},{id:"codex-login",label:"ChatGPT Sign-In"}].map(T=>h.jsx("button",{type:"button","aria-pressed":d.auth===T.id,className:`px-2 py-2 text-sm transition-colors ${d.auth===T.id?"bg-accent font-medium text-brand":"text-muted-foreground hover:text-foreground"}`,onClick:()=>{u({...d,auth:T.id,value:""}),_(!1),E("")},children:T.label},T.id))})]}),h.jsxs("label",{className:qn,htmlFor:"credential-name",children:["Name",h.jsx(Nn,{ref:k,id:"credential-name",required:!0,maxLength:80,placeholder:d.auth==="codex-login"?"e.g. Team Codex":"e.g. Team account",value:d.name,onChange:T=>u({...d,name:T.target.value})})]})]}),C?h.jsx(gH,{org:r,name:d.name,onActiveChange:v,onSavingChange:g,onDone:s}):h.jsxs("fieldset",{className:"space-y-5",disabled:m,children:[d.kind==="custom"&&h.jsxs("label",{className:qn,htmlFor:"credential-endpoint",children:["Endpoint",h.jsx(Nn,{id:"credential-endpoint",type:"url",required:!0,placeholder:"https://approved-host.example/v1",value:d.endpoint??"",onChange:T=>u({...d,endpoint:T.target.value})}),h.jsx("span",{className:"text-xs font-normal leading-5 text-muted-foreground",children:"An OpenAI-compatible HTTPS endpoint on an approved host."})]}),d.kind==="modal"&&h.jsxs("label",{className:qn,htmlFor:"credential-token-id",children:["Modal Token ID",h.jsx(Nn,{id:"credential-token-id",required:!0,autoComplete:"off",maxLength:4096,value:d.tokenId??"",onChange:T=>u({...d,tokenId:T.target.value})})]}),d.kind==="vercel"&&["teamId","projectId"].map(T=>h.jsxs("label",{className:qn,htmlFor:`credential-${T}`,children:[T==="teamId"?"Vercel Team ID":"Vercel Project ID",h.jsx(Nn,{id:`credential-${T}`,required:!0,autoComplete:"off",maxLength:256,value:d[T]??"",onChange:D=>u({...d,[T]:D.target.value})})]},T)),h.jsx(bH,{draft:d,setDraft:u,importing:y,setError:E,keyLabel:L},`${d.kind}-${d.auth}`)]}),d.auth==="codex-login"&&!p&&h.jsx("button",{type:"button",className:"text-xs text-muted-foreground underline underline-offset-4 hover:text-foreground",onClick:()=>{_(T=>!T),u({...d,value:""}),E("")},children:y?"Use Browser Sign-In":"Import auth.json"}),S&&h.jsx("p",{role:"alert",className:"text-sm leading-6 text-destructive",children:S})]}),h.jsx(gi,{children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx(be,{type:"button",variant:"ghost",disabled:m,onClick:l,children:p?"Cancel Sign-In":"Cancel"}),!C&&h.jsx(be,{type:"submit",variant:"primary",disabled:m||!d.value||!d.name.trim(),children:m?"Saving…":"Save"})]})})]})]})}function _H({name:e,onReplace:t,onDelete:n}){const r=R.useRef(null),a=R.useRef(null);return h.jsxs(Pv,{onOpenChange:s=>{s&&(a.current=null)},children:[h.jsx(zv,{asChild:!0,children:h.jsx(be,{ref:r,variant:"ghost",size:"icon","aria-label":`Actions for ${e}`,title:"Credential Actions",className:"shrink-0",children:h.jsx(pC,{"aria-hidden":"true"})})}),h.jsxs($v,{align:"end",onCloseAutoFocus:s=>{const l=a.current;l&&(s.preventDefault(),a.current=null,r.current?.focus(),l==="replace"?t():n())},children:[h.jsxs(Jg,{onSelect:()=>{a.current="replace"},children:[h.jsx(DD,{"aria-hidden":"true"}),"Replace"]}),h.jsxs(Jg,{className:"text-destructive data-[highlighted]:text-destructive",onSelect:()=>{a.current="delete"},children:[h.jsx(IC,{"aria-hidden":"true"}),"Delete"]})]})]})}function Ww({title:e,credentials:t,loading:n,canManage:r,sandbox:a=!1,onAdd:s,onReplace:l,onDelete:d}){return h.jsxs("section",{className:"min-w-0","aria-label":e,children:[h.jsxs(gf,{title:h.jsxs(h.Fragment,{children:[e,!n&&h.jsx("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:t.length})]}),children:[r&&h.jsxs(be,{size:"small",onClick:s,children:[h.jsx(Ma,{className:"mr-1 h-4 w-4","aria-hidden":"true"}),a?"Add Sandbox":"Add Provider"]}),n&&h.jsx(et,{className:"h-8 w-28"})]}),n?h.jsx("div",{role:"status","aria-label":`Loading ${e}`,className:"divide-y divide-border border border-border bg-card",children:Array.from({length:a?2:3},(u,m)=>h.jsxs("div",{className:"px-4 py-3.5",children:[h.jsx(et,{className:"h-5 w-36 max-w-full"}),h.jsx(et,{className:"mt-1 h-4 w-48 max-w-full"})]},m))}):t.length?h.jsx("ul",{className:"divide-y divide-border border border-border bg-card",children:t.map(u=>h.jsxs("li",{className:"flex items-center gap-4 px-4 py-3.5",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate text-sm font-medium",title:u.name,children:u.name}),h.jsxs("p",{className:"mt-1 truncate text-xs text-muted-foreground",title:u.endpoint,children:[vH(u)," · ",yH(u),u.endpoint&&h.jsxs(h.Fragment,{children:[" · ",u.endpoint]})]})]}),r&&h.jsx(_H,{name:u.name,onReplace:()=>l(u),onDelete:()=>d(u)})]},u.id))}):h.jsx("p",{className:"border border-border bg-card px-4 py-6 text-sm text-muted-foreground",children:"No credentials yet."})]})}function SH({credential:e,onDelete:t,onClose:n}){const r=U.useRef(null),[a,s]=U.useState(!1),[l,d]=U.useState("");return h.jsxs(mi,{initialFocus:r,onDismiss:n,busy:a,size:"small","aria-labelledby":"delete-credential-title","aria-describedby":"delete-credential-description",children:[h.jsx(pi,{title:"Delete Credential",titleId:"delete-credential-title",onClose:n,busy:a}),h.jsxs(gs,{children:[h.jsxs("p",{id:"delete-credential-description",className:"text-sm leading-6 text-muted-foreground",children:["Delete ",h.jsx("strong",{className:"break-all text-foreground",children:e.name}),"? New runs won’t be able to use it."]}),l&&h.jsx("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:l})]}),h.jsxs(gi,{children:[h.jsx(be,{ref:r,disabled:a,onClick:n,children:"Cancel"}),h.jsx(be,{disabled:a,variant:"destructive",onClick:async()=>{s(!0);try{await t()}catch(u){d(u instanceof Error?u.message:"Could not delete credential")}finally{s(!1)}},children:a?"Deleting…":"Delete"})]})]})}function wH(){const{org:e}=jr();return h.jsx(EH,{org:e.login},e.login)}function EH({org:e}){er(`Credentials · ${e}`);const t=`/api/orgs/${encodeURIComponent(e)}/credentials`,[n,r]=U.useState(),[a,s]=U.useState(),[l,d]=U.useState(),[u,m]=U.useState(""),[g,p]=U.useState(""),[v]=lc(),y=v.get("return"),_=y&&/^\/repos\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/run$/.test(y)?y:void 0;U.useEffect(()=>{let L=!1;return m(""),jt(t).then(T=>{L||r(T)},T=>{L||m(`Could not load credentials: ${T.message}`)}),()=>{L=!0}},[t]);const S=async()=>{try{r(await jt(t)),m("")}catch{m("Could not refresh credentials. Reload the list to try again.")}},E=async()=>{s(void 0),p("Credential saved."),await S()},k=async L=>{await jt(t,L),await E()},C=n?.canManage??!1,A=n?.credentials??[],O={loading:!n&&!u,canManage:C,onReplace:L=>s({previous:L}),onDelete:d};return h.jsxs(Fl,{children:[h.jsx(hi,{title:"Credentials",description:`Shared with ${e}.`,children:_&&h.jsx($e,{className:ra.secondary,to:_,children:"Back to Run"})}),u&&h.jsxs(ft,{className:"mb-6",children:[h.jsx("p",{children:u}),h.jsx(be,{onClick:()=>{S()},children:"Reload List"})]}),g&&h.jsx(ft,{tone:"success",className:"mb-6",children:g}),n&&!C&&h.jsx("p",{className:"mb-6 text-sm text-muted-foreground",children:"Only admins can manage credentials."}),(!u||n)&&h.jsxs("div",{className:"grid items-start gap-6 lg:grid-cols-2",children:[h.jsx(Ww,{...O,title:"Model Providers",credentials:A.filter(L=>!eb(L.kind)),onAdd:()=>s({})}),h.jsx(Ww,{...O,title:"Sandboxes",credentials:A.filter(L=>eb(L.kind)),sandbox:!0,onAdd:()=>s({kind:"modal"})})]}),a&&h.jsx(xH,{...a,org:e,onSave:k,onSaved:E,onCancel:()=>s(void 0)}),l&&h.jsx(SH,{credential:l,onClose:()=>d(void 0),onDelete:async()=>{await jt(`${t}/${l.id}/delete`,{}),d(void 0),p("Credential deleted."),await S()}})]})}function CH({runs:e,repo:t}){const n=e.filter(a=>a.status==="running"),r=e.filter(a=>a.status==="queued");return!n.length&&!r.length?null:h.jsxs("section",{className:"mb-6 border border-border bg-card","aria-label":"Run Activity",children:[h.jsxs("header",{className:"flex items-center justify-between border-b border-border px-4 py-3 text-sm",children:[h.jsx("h2",{className:"font-medium",children:"Run Activity"}),h.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.length," running · ",r.length," queued"]})]}),n.map(a=>h.jsxs($e,{to:`/repos/${t}/results?run=${a.id}`,className:"block border-l-2 border-brand bg-brand/5 px-4 py-4 hover:bg-brand/10",children:[h.jsx("span",{className:"text-xs text-brand",children:"Running Now"}),h.jsxs("p",{className:"mt-1 text-sm",children:[a.modelLabel," · ",a.harnesses.map(s=>Va[s]).join(" + ")," ","· Thinking: ",Zl(a.thinking)]}),h.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:a.trials.find(s=>s.status==="running")?.taskId??"Preparing the evaluation environment…"})]},a.id)),r.map(a=>h.jsxs($e,{to:`/repos/${t}/results?run=${a.id}`,className:"flex flex-wrap justify-between gap-2 border-t border-border px-4 py-3 text-sm hover:bg-muted",children:[h.jsxs("span",{children:[a.modelLabel," · ",a.harnesses.map(s=>Va[s]).join(" + ")]}),h.jsxs("span",{className:"text-xs text-muted-foreground",children:["Thinking: ",Zl(a.thinking)," · Queued"]})]},a.id))]})}function kH(e){return e.flatMap(t=>t.status!=="completed"||!t.datasetKey?[]:t.harnesses.flatMap(n=>{const r=t.trials.filter(a=>a.harness===n);return!r.length||r.some(a=>a.status!=="completed"||!a.modelVerified||a.apiCostUsd===void 0||!Number.isFinite(a.apiCostUsd)||a.apiCostUsd<0||![0,1].includes(a.rewards.reward??-1))?[]:[{id:`${t.id}/${n}`,runId:t.id,name:`${t.modelLabel} · ${t.thinking??"unrecorded effort"}`,harness:n,accuracy:r.reduce((a,s)=>a+(s.rewards.reward??0),0)/r.length*100,cost:r.reduce((a,s)=>a+(s.apiCostUsd??0),0)/r.length,tasks:r.length,datasetKey:t.datasetKey??""}]}))}function Zd(e){return`$${e.toFixed(e<.01?4:e<1?3:2)}`}function RH(e,t){const n=e.trials.filter(r=>r.harness===t);if(!(!n.length||n.some(r=>r.status!=="completed"||![0,1].includes(r.rewards.reward??-1))))return n.reduce((r,a)=>r+(a.rewards.reward??0),0)/n.length*100}function AH({repo:e,url:t}){const[n,r]=U.useState([]),[a,s]=U.useState("");return U.useEffect(()=>{let l=!1;return jt(`${t}/comparisons`).then(d=>{l||r(d.comparisons.slice().reverse())},()=>{l||s("Saved comparisons could not be loaded. Individual runs remain below.")}),()=>{l=!0}},[t]),!n.length&&!a?null:h.jsxs("section",{className:"mt-6",children:[h.jsx(gf,{title:"Saved Comparisons"}),a&&h.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:a}),h.jsx("div",{className:"mt-3 font-mono [&_a]:text-foreground [&_a:hover]:text-brand [&_button]:text-foreground [&_button:hover]:text-brand",children:h.jsxs(bf,{children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:"Created"}),h.jsx("th",{children:"Models"}),h.jsx("th",{children:"Completed Trials"}),h.jsx("th",{children:"Open"})]})}),h.jsx("tbody",{children:n.map(l=>h.jsxs("tr",{children:[h.jsx("td",{children:new Date(l.createdAt).toLocaleString()}),h.jsx("td",{className:"max-w-md",children:h.jsx("span",{className:"block truncate",title:l.runs.map(d=>d.model).join(", "),children:l.runs.map(d=>d.model).join(", ")})}),h.jsxs("td",{children:[l.runs.reduce((d,u)=>d+u.completed,0)," /"," ",l.runs.reduce((d,u)=>d+u.trials,0)]}),h.jsx("td",{children:h.jsx($e,{to:`/repos/${e}/comparisons/${l.id}`,children:"View Comparison →"})})]},l.id))})]})})]})}function TH({trial:e}){if(!e.tokenUsage)return null;const t=e.tokenUsage,n=[["Uncached Input",t.input],["Cached Input",t.cacheRead],["Cache Writes",t.cacheWrite],["Output",t.output]];return h.jsxs("section",{"aria-label":"Token Usage and Estimated Cost",children:[h.jsx("h4",{className:"text-sm font-medium",children:"Token Usage"}),h.jsxs("dl",{className:"my-3 grid grid-cols-2 gap-4 border border-border bg-muted/30 p-4 sm:grid-cols-3 xl:grid-cols-5 [&_dt]:text-xs [&_dt]:text-muted-foreground [&_dd]:mt-1 [&_dd]:text-sm [&_dd]:tabular-nums [&_dd]:text-foreground",children:[n.map(([r,a])=>h.jsxs("div",{children:[h.jsx("dt",{children:r}),h.jsx("dd",{children:a.toLocaleString()})]},r)),h.jsxs("div",{children:[h.jsx("dt",{children:"Estimated Model Cost"}),h.jsx("dd",{children:e.apiCostUsd===void 0?"Not Available":Zd(e.apiCostUsd)})]})]}),h.jsx("p",{className:"mb-6 text-xs text-muted-foreground",children:e.apiCostUsd===void 0?"Cost unavailable: incomplete pricing or usage records.":`${e.costSource==="harbor"?"Harbor’s per-request":"Reference-rate"} estimate from token usage. Not an invoice; sandbox charges excluded.`})]})}function NH(e){const t=Object.entries(e.rewards);return t.length?t.map(([n,r])=>`${n}: ${Number(r.toFixed(4))}`).join(" · "):"Not Scored"}function jH({run:e,baseUrl:t,repo:n}){const[r,a]=U.useState(0),s=e.trials[r]??e.trials[0],l=e.trials.filter(g=>g.status==="completed").length,d=e.trials.filter(g=>g.status==="failed").length,u=e.status==="queued"||e.status==="running",m=s?.steps.filter(g=>(g.role==="agent"||g.role==="assistant")&&g.text).at(-1)?.text;return h.jsxs("section",{className:"border border-border bg-card p-4 sm:p-6 [&_h4]:mb-3 [&_h4]:text-sm [&_h4]:font-medium [&_h5]:my-2 [&_h5]:text-xs [&_h5]:text-muted-foreground [&_details]:mt-3 [&_details]:border [&_details]:border-border [&_summary]:cursor-pointer [&_summary]:px-4 [&_summary]:py-3 [&_summary]:text-sm [&_details_h5]:px-4 [&_pre]:max-h-96 [&_pre]:overflow-auto [&_pre]:bg-background [&_pre]:p-4 [&_pre]:text-xs [&_pre]:leading-6 [&_pre]:whitespace-pre-wrap [&_pre]:wrap-anywhere","aria-label":"Evaluation Results",children:[h.jsxs("header",{className:"flex flex-wrap items-start justify-between gap-4",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsxs("h2",{className:"flex flex-wrap items-center gap-3 text-sm font-medium",children:[e.modelLabel," ",h.jsx(Ag,{value:e.status})]}),h.jsxs("p",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:[e.sandbox," · ",e.harnesses.map(g=>Va[g]).join(" + ")," · started by ",e.startedBy," · ",new Date(e.createdAt).toLocaleString()]}),h.jsxs("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:["Thinking: ",Zl(e.thinking)," · Route:"," ",e.credentials?.provider??e.modelName.split("/")[0]]})]}),h.jsxs("span",{className:"text-xs text-muted-foreground",role:"status",children:[l,"/",e.trials.length," completed",d?` · ${d} failed`:""]})]}),e.error&&h.jsx(ft,{className:"mt-4",children:e.error}),u&&h.jsxs("div",{className:"mt-4 border-l-2 border-brand bg-brand/5 px-4 py-3",role:"status",children:[h.jsx("p",{className:"text-sm font-medium",children:e.status==="queued"?"Queued":"Running Now"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:e.status==="queued"?"Waiting for an evaluation worker.":e.trials.find(g=>g.status==="running")?.taskId??"Preparing the evaluation environment…"}),h.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[e.trials.filter(g=>g.status==="queued").length," tasks queued · ",l," ","completed",d?` · ${d} failed`:""]})]}),h.jsx("div",{className:"mt-6",children:h.jsxs(bf,{className:"min-w-[600px] font-mono [&_tr[data-selected=true]]:bg-accent [&_button]:text-left [&_button]:text-brand [&_button]:wrap-anywhere",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:"Task"}),h.jsx("th",{children:"Harness"}),h.jsx("th",{children:"Status"}),h.jsx("th",{children:"Verifier Scores"})]})}),h.jsx("tbody",{children:e.trials.map((g,p)=>h.jsxs("tr",{"data-selected":p===r,children:[h.jsx("td",{children:h.jsx("button",{type:"button",onClick:()=>a(p),"aria-pressed":p===r,children:g.taskId})}),h.jsx("td",{children:Va[g.harness]}),h.jsx("td",{children:h.jsx(Ag,{value:g.status})}),h.jsx("td",{children:NH(g)})]},`${g.runId}/${g.taskId}/${g.harness}`))})]})}),s&&h.jsxs("div",{children:[h.jsxs("div",{className:"mt-6 mb-4 flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center [&_h3]:wrap-anywhere [&_h3_span]:ml-2 [&_h3_span]:font-mono [&_h3_span]:text-sm [&_h3_span]:text-muted-foreground",children:[h.jsxs("h3",{children:[s.taskId," ",h.jsxs("span",{children:[" / ",s.harness]})]}),h.jsx($e,{className:ra.ghost,to:`/repos/${n}/tasks/${encodeURIComponent(s.runId)}/${encodeURIComponent(s.taskId)}`,children:"View Task ↗"})]}),s.error&&h.jsx("p",{className:"my-4 font-mono text-sm text-destructive",children:s.error}),h.jsx(TH,{trial:s}),!u&&m&&h.jsxs("div",{className:"my-5 border-l-2 border-brand bg-muted/40 p-4 [&_p]:text-sm [&_p]:leading-relaxed [&_p]:whitespace-pre-wrap [&_p]:wrap-anywhere",children:[h.jsx("h4",{children:"Solver’s Final Response"}),h.jsx("p",{children:m})]}),h.jsx("h4",{children:"Solver Transcript"}),!s.steps.length&&h.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:u?"Waiting for transcript events. Available raw solver and tool output is shown below.":"This harness did not produce a readable structured transcript. Inspect the raw output and artifacts below."}),h.jsx("ol",{className:"m-0 list-none p-0 [&>li]:border-t [&>li]:border-border [&>li]:py-4 [&_p]:text-sm [&_p]:leading-relaxed [&_p]:whitespace-pre-wrap [&_p]:wrap-anywhere",children:s.steps.map((g,p)=>h.jsxs("li",{children:[h.jsxs("span",{className:"mb-2.5 block font-mono text-sm text-muted-foreground uppercase",children:[p+1," · ",g.role]}),g.text&&h.jsx("p",{children:g.text}),g.tools.map(v=>h.jsxs("details",{children:[h.jsx("summary",{children:v.name}),h.jsx("h5",{children:"Input"}),h.jsx("pre",{children:v.input}),h.jsx("h5",{children:"Output"}),h.jsx("pre",{children:v.output||"No output captured yet"})]},v.id))]},g.id))}),h.jsxs("details",{open:!s.steps.length,children:[h.jsx("summary",{children:"Harbor and Solver Output"}),h.jsx("pre",{children:s.log||"No output yet."})]}),s.artifacts.length>0&&h.jsxs("details",{className:"[&_p]:mt-3 [&_p]:text-sm [&_p]:text-muted-foreground [&_ul]:list-none [&_ul]:p-0 [&_a]:block [&_a]:py-2 [&_a]:font-mono [&_a]:text-sm [&_a]:text-brand [&_a]:wrap-anywhere",children:[h.jsxs("summary",{children:["Artifacts · ",s.artifacts.length]}),h.jsx("p",{children:"Sanitized text exports; large files may be capped at 1 MiB."}),h.jsx("ul",{children:s.artifacts.map(g=>h.jsx("li",{children:h.jsx("a",{href:`${t}/${e.id}/artifacts?name=${encodeURIComponent(g)}`,children:g.split("/").slice(2).join("/")})},g))})]})]})]})}function Yw(e,t,n){return n==="minimize"?e-t:t-e}function Kw(e,t,n){return n==="minimize"?e<t:e>t}function LH(e,t={}){GA(e);const n=t.xObjective??"minimize",r=t.yObjective??"maximize",a=[...e].sort((d,u)=>{const m=Yw(d.x,u.x,n);if(m!==0)return m;const g=Yw(d.y,u.y,r);return g!==0?g:d.id<u.id?-1:d.id>u.id?1:0}),s=[];let l;for(let d=0;d<a.length;){let u=d+1;for(;u<a.length&&a[u].x===a[d].x;)u+=1;const m=a[d].y;if(l===void 0||Kw(m,l,r))for(let g=d;g<u&&a[g].y===m;g+=1)s.push(a[g]);(l===void 0||Kw(m,l,r))&&(l=m),d=u}return s}function GA(e){const t=new Set;for(const n of e){if(!n.id)throw new Error("Pareto point ids must be non-empty.");if(t.has(n.id))throw new Error(`Duplicate Pareto point id: ${n.id}`);if(!Number.isFinite(n.x)||!Number.isFinite(n.y))throw new Error(`Pareto point ${n.id} must have finite x and y values.`);t.add(n.id)}}const OH=620,DH=290,Kt={top:45,right:36,bottom:56,left:54},IH={display:"block",width:"100%",height:"auto",background:"var(--pareto-background, #09100f)",color:"var(--pareto-foreground, #eef4ed)",fontFamily:"var(--pareto-font-family, 'JetBrains Mono', ui-monospace, monospace)",overflow:"visible"},MH=`
|
|
104
|
+
.pareto-point { cursor: pointer; outline: none; }
|
|
105
|
+
.pareto-point circle { stroke: var(--pareto-background, #09100f); stroke-width: 2; transition: .2s; }
|
|
106
|
+
.pareto-point-label { opacity: 0; pointer-events: none; transition: .2s; }
|
|
107
|
+
.pareto-point-label.visible { opacity: 1; }
|
|
108
|
+
.pareto-point:hover circle, .pareto-point:focus circle, .pareto-point.selected circle {
|
|
109
|
+
fill: var(--pareto-frontier, #8ee6bd); stroke: var(--pareto-frontier, #8ee6bd);
|
|
110
|
+
filter: drop-shadow(0 0 5px rgba(142, 230, 189, .7));
|
|
111
|
+
}
|
|
112
|
+
.pareto-point:hover .pareto-point-label, .pareto-point:focus .pareto-point-label, .pareto-point.selected .pareto-point-label { opacity: 1; }
|
|
113
|
+
`;function Wd(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:2}).format(e)}function Xw(e,t){if(t.domain){const[s,l]=t.domain;if(!Number.isFinite(s)||!Number.isFinite(l)||s>=l)throw new Error(`${t.label} axis domain must contain two finite, increasing values.`);return t.domain}const n=e.length>0?Math.min(...e):0,r=e.length>0?Math.max(...e):1;if(n===r){const s=Math.max(Math.abs(n)*.1,1);return[t.includeZero?Math.min(n-s,0):n-s,t.includeZero?Math.max(r+s,0):r+s]}const a=(r-n)*.06;return[t.includeZero?Math.min(n-a,0):n-a,t.includeZero?Math.max(r+a,0):r+a]}function Qw(e,t=5){if(!Number.isInteger(t)||t<2||t>10)throw new Error("Axis ticks must be an integer between 2 and 10.");const[n,r]=e;return Array.from({length:t},(a,s)=>n+(r-n)*s/(t-1))}function Jw(e,t,n,r){const a=t.format??Wd,s=n.format??Wd,l=`${t.label}: ${a(e.x)}; ${n.label}: ${s(e.y)}`;return[e.label,l,r?"Pareto-efficient":"Dominated",e.description].filter(Boolean).join(". ")}function PH({points:e,xAxis:t,yAxis:n,mode:r="interactive",width:a=OH,height:s=DH,title:l="Pareto Frontier",description:d,selectedId:u=null,onSelect:m,showLegend:g=!0,showPointLabels:p="none",className:v,style:y,focusedId:_=null,hoveredId:S=null,onFocusedIdChange:E,onHoveredIdChange:k}){GA(e);const C=S??_;if(!Number.isFinite(a)||!Number.isFinite(s)||a<320||s<240)throw new Error("Pareto plot width and height must be finite and at least 320 × 240.");const A=LH(e,{xObjective:t.objective,yObjective:n.objective}),O=new Set(A.map(J=>J.id)),L=Xw(e.map(J=>J.x),t),T=Xw(e.map(J=>J.y),n),D=Qw(L,t.ticks),M=Qw(T,n.ticks),B=Math.max(1,a-Kt.left-Kt.right),Y=Math.max(1,s-Kt.top-Kt.bottom),F=J=>Kt.left+(J-L[0])/(L[1]-L[0])*B,$=J=>Kt.top+Y-(J-T[0])/(T[1]-T[0])*Y,q=t.format??Wd,ne=n.format??Wd,se=r==="interactive",z=d??`${e.length} points. ${A.length} ${A.length===1?"point is":"points are"} Pareto-efficient.`,G=J=>{se&&m?.(J)},ie=(J,Z)=>{J.key!=="Enter"&&J.key!==" "||(J.preventDefault(),G(Z))};return h.jsxs("svg",{"aria-label":l,className:v,height:s,role:se?"group":"img",style:{...IH,...y},viewBox:`0 0 ${a} ${s}`,width:a,xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("style",{children:MH}),h.jsx("title",{children:l}),h.jsx("desc",{children:z}),h.jsx("text",{fill:"currentColor",fontSize:"14",fontWeight:"700",letterSpacing:"0.04em",x:Kt.left,y:"24",children:l}),g?h.jsxs("g",{"aria-hidden":"true",fontSize:"9",transform:`translate(${a-Kt.right-150} 20)`,children:[h.jsx("circle",{cx:"0",cy:"0",fill:"var(--pareto-background, #09100f)",r:"3",stroke:"var(--pareto-frontier, #8ee6bd)"}),h.jsx("text",{fill:"var(--pareto-muted, #91a39b)",x:"9",y:"3",children:"Selected"}),h.jsx("circle",{cx:"75",cy:"0",fill:"var(--pareto-frontier, #8ee6bd)",r:"3"}),h.jsx("text",{fill:"var(--pareto-muted, #91a39b)",x:"84",y:"3",children:"Pareto-efficient"})]}):null,h.jsxs("g",{"aria-hidden":"true",children:[M.filter(J=>J!==0).map(J=>{const Z=$(J);return h.jsxs("g",{children:[h.jsx("line",{stroke:"var(--pareto-grid, #263631)",strokeWidth:"1",x1:Kt.left,x2:a-Kt.right,y1:Z,y2:Z}),h.jsx("text",{dominantBaseline:"middle",fill:"var(--pareto-muted, #91a39b)",fontSize:"10",textAnchor:"end",x:Kt.left-10,y:Z,children:ne(J)})]},`y-${J}`)}),D.map(J=>{const Z=F(J);return h.jsx("text",{fill:"var(--pareto-muted, #91a39b)",fontSize:"9",textAnchor:"middle",x:Z,y:s-Kt.bottom+20,children:q(J)},`x-${J}`)})]}),A.length>1?h.jsx("polyline",{"aria-hidden":"true",fill:"none",points:A.map(J=>`${F(J.x)},${$(J.y)}`).join(" "),stroke:"var(--pareto-frontier, #8ee6bd)",opacity:"0.7",strokeDasharray:"4 5",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"}):null,h.jsx("g",{children:e.map(J=>{const Z=O.has(J.id),P=J.id===u||J.id===C;return h.jsx("g",{"aria-label":se?Jw(J,t,n,Z):void 0,className:`pareto-point${P?" selected":""}${Z?" efficient":""}`,onBlur:se?()=>E?.(null):void 0,onClick:se?()=>G(J):void 0,onFocus:se?()=>E?.(J.id):void 0,onKeyDown:se?ee=>ie(ee,J):void 0,onMouseEnter:se?()=>k?.(J.id):void 0,onMouseLeave:se?()=>k?.(null):void 0,role:se?"button":void 0,tabIndex:se?0:void 0,children:h.jsx("circle",{cx:F(J.x),cy:$(J.y),fill:Z?"var(--pareto-frontier, #8ee6bd)":"var(--pareto-point, #60736b)",r:P?8:5,children:se?null:h.jsx("title",{children:Jw(J,t,n,Z)})})},J.id)})}),h.jsx("g",{"aria-hidden":"true",children:e.map(J=>{const Z=O.has(J.id),P=J.id===u||J.id===C,ee=p==="all"||p==="frontier"&&Z||P;return!ee&&!(se&&J.id===C)?null:h.jsx("text",{className:`pareto-point-label${ee?" visible":""}`,fill:"var(--pareto-foreground, #eef4ed)",fontSize:"8",paintOrder:"stroke",stroke:"var(--pareto-background, #09100f)",strokeWidth:"4",textAnchor:"middle",x:F(J.x),y:$(J.y)-(P?13:11),children:J.label},J.id)})}),e.length===0?h.jsx("text",{fill:"var(--pareto-muted, #91a39b)",fontSize:"12",textAnchor:"middle",x:Kt.left+B/2,y:Kt.top+Y/2,children:"NO DATA"}):null,h.jsxs("text",{fill:"var(--pareto-muted, #91a39b)",fontSize:"11",letterSpacing:"0.04em",textAnchor:"end",x:a-4,y:s-8,children:[t.label.toUpperCase()," →"]}),h.jsx("text",{fill:"var(--pareto-muted, #91a39b)",fontSize:"11",letterSpacing:"0.04em",textAnchor:"middle",transform:`rotate(-90 16 ${Kt.top+Y/2})`,x:"16",y:Kt.top+Y/2,children:n.label.toUpperCase()})]})}function zH(e){const[t,n]=R.useState(null),[r,a]=R.useState(null);return h.jsx(PH,{...e,focusedId:t,hoveredId:r,onFocusedIdChange:n,onHoveredIdChange:a})}function $H({points:e,onSelect:t}){const n=R.useRef(null),[r,a]=R.useState(1040);R.useEffect(()=>{if(!n.current)return;const l=new ResizeObserver(([d])=>{d&&a(Math.max(320,d.contentRect.width))});return l.observe(n.current),()=>l.disconnect()},[]);const s=new Set(e.map(l=>l.harness)).size===1;return h.jsx("section",{ref:n,className:"border border-border bg-background p-4 sm:p-6","aria-label":"Accuracy versus Cost",children:e.length?h.jsx("div",{className:"[&_svg]:block [&_svg]:w-full",children:h.jsx(zH,{className:"[--pareto-background:var(--background)] [--pareto-foreground:var(--foreground)] [--pareto-muted:var(--muted-fg)] [--pareto-grid:var(--border)] [--pareto-point:var(--muted-fg)] [--pareto-font-family:'DM_Mono',var(--mono)] [&>text[font-size='14']]:text-[17px] [&_text[font-size='11']]:text-[13px] [&_text[font-size='10']]:text-[12px] [&_text[font-size='8']]:text-[10px]",title:"Model Comparison",description:"Higher accuracy and lower model API cost are better. Select a point to inspect the run.",width:r,height:r<640?300:Math.round(Math.min(520,Math.max(380,r*.55))),showLegend:r>=640,points:e.map(l=>({id:l.id,label:s?l.name:`${l.name} · ${l.harness}`,x:l.cost,y:l.accuracy,description:`${l.accuracy.toFixed(1)}% at ${Zd(l.cost)} per task`})),xAxis:{label:"Cost per Task",objective:"minimize",includeZero:!0,ticks:r<640?3:5,format:Zd},yAxis:{label:"Accuracy",objective:"maximize",format:l=>l>100?"":`${l.toFixed(0)}%`},showPointLabels:r<640?"none":"frontier",onSelect:l=>{const d=e.find(u=>u.id===l.id);d&&t(d.runId)}})}):h.jsxs("div",{className:"py-2 text-sm text-muted-foreground [&_span]:mt-2 [&_span]:block [&_span]:max-w-2xl [&_span]:text-xs [&_span]:leading-5",children:[h.jsx("p",{children:"Your completed runs appear here."}),h.jsx("span",{children:"Runs need complete scores, verified model usage, and a cost estimate. Missing costs aren’t plotted as zero."})]})})}function e1(){const{org:e}=jr(),{owner:t="",name:n=""}=fi(),r=`${t}/${n}`,a=sR(e.login,r),[s,l]=lc(),d=s.get("run"),[u,m]=U.useState([]),[g,p]=U.useState(),[v,y]=U.useState(""),[_,S]=U.useState(!0),[E,k]=U.useState("");er(`Results · ${r}`),U.useEffect(()=>{let T=!1,D;S(!0),m([]),y("");const M=async()=>{try{const B=await jt(a);if(T)return;m(B.runs),S(!1),B.runs.some(Y=>Y.status==="queued"||Y.status==="running")&&(D=setTimeout(()=>{M()},3e3))}catch(B){T||(y(B instanceof Error?B.message:"Could not load results"),S(!1))}};return M(),()=>{T=!0,clearTimeout(D)}},[a]),U.useEffect(()=>{let T=!1,D;if(p(void 0),!d)return;const M=async()=>{try{const B=await jt(`${a}/${encodeURIComponent(d)}`);if(T)return;p(B),y(""),m(Y=>[B,...Y.filter(F=>F.id!==B.id)]),(B.status==="queued"||B.status==="running")&&(D=setTimeout(()=>{M()},3e3))}catch(B){T||(y(B instanceof Error?B.message:"Could not refresh run"),D=setTimeout(()=>{M()},1e4))}};return M(),()=>{T=!0,clearTimeout(D)}},[a,d]);const C=kH(u),A=[...new Set(C.map(T=>T.datasetKey))],O=A.includes(E)?E:A[0],L=C.filter(T=>T.datasetKey===O);return h.jsxs(Ba,{children:[h.jsxs(hi,{title:"Results",description:"Compare your runs. Inspect what the solver did.",children:[h.jsx($e,{className:ra.primary,to:`/repos/${r}/run`,children:"New Comparison"}),d&&h.jsx(be,{type:"button",variant:"secondary",onClick:()=>l({}),children:"All Results"})]}),v&&h.jsx(ft,{className:"mb-4",children:v}),d?g?h.jsx(jH,{run:g,baseUrl:a,repo:r},g.id):!v&&h.jsx(ci,{label:"Loading Run"}):h.jsxs(h.Fragment,{children:[h.jsx(CH,{runs:u,repo:r}),A.length>1&&h.jsxs("label",{htmlFor:"evaluationpage-field-0",className:"mb-4 flex flex-wrap items-center gap-3.5 font-mono text-sm text-muted-foreground",children:["Compare Dataset",h.jsx(Qt,{id:"evaluationpage-field-0",value:O,onChange:T=>k(T.target.value),children:A.map(T=>h.jsxs("option",{value:T,children:[C.find(D=>D.datasetKey===T)?.tasks," tasks ·"," ",T.slice(0,8)]},T))})]}),h.jsx($H,{points:L,onSelect:T=>l({run:T})}),h.jsx(AH,{repo:r,url:a},a),h.jsxs("section",{className:"mt-6",children:[h.jsx(gf,{title:"Runs"}),_&&!u.length&&!v&&h.jsx(ci,{label:"Loading Runs"}),!_&&!u.length&&h.jsx(wr,{title:"No Runs Yet",children:"Choose models and a sandbox on the Run page to compare them against your dataset."}),u.length>0&&h.jsx("div",{className:"mt-3 font-mono [&_a]:text-foreground [&_a:hover]:text-brand [&_button]:text-foreground [&_button:hover]:text-brand",children:h.jsxs(bf,{children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:"Model"}),h.jsx("th",{children:"Harness"}),h.jsx("th",{children:"Thinking"}),h.jsx("th",{children:"Accuracy"}),h.jsx("th",{children:"Estimated Model Cost / Task"}),h.jsx("th",{children:"Status"})]})}),h.jsx("tbody",{children:u.flatMap(T=>T.harnesses.map(D=>{const M=C.find(Y=>Y.runId===T.id&&Y.harness===D),B=RH(T,D);return h.jsxs("tr",{children:[h.jsxs("td",{children:[h.jsx("button",{type:"button",onClick:()=>l({run:T.id}),children:T.modelLabel}),h.jsx("small",{children:new Date(T.createdAt).toLocaleString()})]}),h.jsx("td",{children:Va[D]}),h.jsx("td",{children:Zl(T.thinking)}),h.jsx("td",{children:B===void 0?"—":`${B.toFixed(1)}%`}),h.jsx("td",{children:M?Zd(M.cost):"Not Available"}),h.jsx("td",{children:h.jsx(Ag,{value:T.status})})]},`${T.id}/${D}`)}))})]})})]})]})]})}function t1(e,t,n){for(const r of t){const a=$l(e,r.kind)?.harnesses.find(s=>(!n||n===s)&&(r.auth!=="codex-login"||s==="codex"));if(a)return{catalogId:e.id,credentialId:r.id,harnesses:[a]}}}function UH(e,t,n){const r=a=>a.thinking??(Ud(e,a.harnesses).includes("high")?"high":"default");return t.some(a=>a.catalogId===n.catalogId&&(a.customModel??"")===(n.customModel??"")&&r(a)===r(n)&&a.harnesses.some(s=>n.harnesses.includes(s)))}function qA(e,t){return t.some((n,r)=>{const a=e.find(s=>s.id===n.catalogId);return!!a&&UH(a,t.slice(0,r),n)})}function HH({repo:e,draft:t,credentials:n,sandboxes:r,submitted:a,busy:s,ready:l,tasksReady:d,pairs:u,onChange:m,onSubmit:g}){return h.jsxs("aside",{className:"min-w-0 border border-border bg-card xl:sticky xl:top-6",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 py-4",children:[h.jsx("h2",{className:"text-sm font-medium",children:"Execution"}),h.jsx($e,{className:"text-xs text-muted-foreground hover:text-foreground",to:`/settings/credentials?return=${encodeURIComponent(`/repos/${e}/run`)}`,children:"Credentials"})]}),h.jsxs("fieldset",{className:"grid min-w-0 gap-4 border-0 p-4 sm:grid-cols-2 xl:grid-cols-1",disabled:s||a,children:[h.jsxs("label",{className:qn,htmlFor:"runpage-field-0",children:["Sandbox",h.jsx(Qt,{id:"runpage-field-0","aria-label":"Sandbox",value:t.sandbox,onChange:p=>m({...t,sandbox:p.target.value,sandboxCredentialId:""}),children:r.map(p=>h.jsx("option",{value:p,children:p==="e2b"?"E2B":p==="modal"?"Modal":"Daytona"},p))})]}),h.jsxs("label",{className:qn,htmlFor:"runpage-field-1",children:["Sandbox Credential",h.jsxs(Qt,{id:"runpage-field-1","aria-label":"Sandbox Credential",value:t.sandboxCredentialId,onChange:p=>m({...t,sandboxCredentialId:p.target.value}),children:[h.jsx("option",{value:"",children:"Select Credential"}),n.filter(p=>p.kind===t.sandbox).map(p=>h.jsx("option",{value:p.id,children:p.name},p.id))]})]})]}),h.jsxs("div",{className:"border-t border-border p-4",children:[h.jsxs("dl",{className:"mb-4 space-y-2 text-xs tabular-nums",children:[h.jsxs("div",{className:"flex justify-between gap-3",children:[h.jsx("dt",{className:"text-muted-foreground",children:"Tasks"}),h.jsx("dd",{children:t.tasks.length})]}),h.jsxs("div",{className:"flex justify-between gap-3",children:[h.jsx("dt",{className:"text-muted-foreground",children:"Model / Harness Pairs"}),h.jsx("dd",{children:u})]}),h.jsxs("div",{className:"flex justify-between gap-3 border-t border-border pt-3 text-sm",children:[h.jsx("dt",{children:"Total Trials"}),h.jsx("dd",{className:"font-medium",children:u*t.tasks.length})]})]}),h.jsxs(be,{type:"button",variant:"primary",className:"w-full",disabled:s||!a&&!l,onClick:g,children:[h.jsx(OD,{className:"size-4","aria-hidden":"true"}),s?"Saving Comparison…":a?"Retry Same Comparison":"Run Comparison"]}),!l&&!a&&h.jsx("p",{className:"mt-3 text-xs leading-5 text-muted-foreground",children:d?u?t.sandboxCredentialId?"Check the credentials and harness for each model.":"Select a sandbox credential to continue.":"Add a model to continue.":"Accepted tasks are required to run."}),h.jsx("p",{className:"mt-3 text-xs leading-5 text-muted-foreground",children:"Model and sandbox usage is billed by your providers."})]})]})}const Yu="mb-2 block text-xs text-muted-foreground";function BH({model:e,models:t=[e],credentials:n,selection:r,onChange:a}){const s=r??{catalogId:e.id,credentialId:"",harnesses:[]},l=n.find(v=>v.id===s.credentialId),d=l?$l(e,l.kind):void 0,u=Ud(e,s.harnesses),m=s.thinking??(u.includes("high")?"high":"default"),g=v=>{const y=n.find(k=>k.id===v),_=y?$l(e,y.kind):void 0,S=s.harnesses.filter(k=>_?.harnesses.includes(k)&&(y?.auth!=="codex-login"||k==="codex")),E=_?.harnesses.filter(k=>y?.auth!=="codex-login"||k==="codex");a({...s,credentialId:v,harnesses:S.length?S:E?.slice(0,1)??[]})},p=v=>(d??e).harnesses.includes(v)&&(l?.auth!=="codex-login"||v==="codex");return h.jsxs("div",{className:"grid grid-cols-1 items-center gap-3 px-4 py-3 pr-10 sm:grid-cols-3 xl:grid-cols-[minmax(0,1.2fr)_repeat(3,minmax(0,1fr))]",children:[h.jsxs("div",{className:"min-w-0 sm:col-span-3 xl:col-span-1",children:[h.jsx("span",{className:Yu,children:"Model"}),h.jsxs(Qt,{className:"text-xs md:text-xs","aria-label":"Model",value:s.catalogId,onChange:v=>{const y=t.find(S=>S.id===v.target.value);if(!y)return;const _=t1(y,n,s.harnesses[0])??t1(y,n)??{catalogId:y.id,credentialId:"",harnesses:[]};s.thinking&&Ud(y,_.harnesses).includes(s.thinking)&&(_.thinking=s.thinking),a(_)},children:[h.jsx("option",{value:"",disabled:!0,children:"Select Model"}),t.map(v=>h.jsx("option",{value:v.id,children:v.label},v.id))]}),e.id==="custom"&&h.jsx(Nn,{"aria-label":"Custom Model ID",placeholder:"Model ID",value:s.customModel??"",onChange:v=>a({...s,customModel:v.target.value})})]}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("span",{className:Yu,children:"Credential"}),h.jsxs(Qt,{className:"text-xs md:text-xs","aria-label":`${e.label} Credential`,disabled:!s.catalogId,value:s.credentialId,onChange:v=>g(v.target.value),children:[h.jsx("option",{value:"",children:"Select Credential"}),n.filter(v=>$l(e,v.kind)).map(v=>h.jsx("option",{value:v.id,children:v.name},v.id))]})]}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("span",{className:Yu,children:"Reasoning"}),h.jsxs(Qt,{className:"text-xs md:text-xs","aria-label":`${e.label} Thinking Level`,disabled:!s.catalogId,value:m,onChange:v=>{const y=lR.find(_=>_===v.target.value);y&&a({...s,thinking:y})},children:[!u.includes(m)&&h.jsx("option",{value:m,disabled:!0,children:"Select Thinking Level"}),u.map(v=>h.jsx("option",{value:v,children:v},v))]})]}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("span",{className:Yu,children:"Harness"}),h.jsxs(Qt,{className:"text-xs md:text-xs","aria-label":`${e.label} Harness`,disabled:!s.catalogId,value:s.harnesses.length>1?"multiple":s.harnesses[0]??"",onChange:v=>a({...s,harnesses:[v.target.value],thinking:void 0}),children:[h.jsx("option",{value:"",disabled:!0,children:"Choose Harness"}),s.harnesses.length>1&&h.jsx("option",{value:"multiple",disabled:!0,children:s.harnesses.join(" + ")}),v5.filter(v=>p(v.id)).map(v=>h.jsx("option",{value:v.id,children:v.label},v.id))]})]})]})}function VH({models:e,credentials:t,draft:n,onChange:r}){const[a]=R.useState(()=>new WeakMap);return h.jsxs("div",{className:"divide-y divide-border",children:[qA(e,n.models)&&h.jsx(ft,{children:"Duplicate configurations cannot run. Choose a different model, thinking level, or harness."}),n.models.map((s,l)=>{const d=a.get(s)??uv();a.set(s,d);const u=e.find(m=>m.id===s.catalogId)??{id:s.catalogId,label:"Model",provider:"custom",model:"",harnesses:[],source:""};return h.jsxs("section",{className:"relative min-w-0 bg-card",children:[h.jsx(BH,{model:u,models:e,credentials:t,selection:n.models[l],onChange:m=>{a.set(m,d),r({...n,models:n.models.map((g,p)=>p===l?m:g)})}}),h.jsx("button",{type:"button",className:"absolute right-0 bottom-3 flex h-9 w-10 items-center justify-center border-0 bg-transparent p-0 text-muted-foreground hover:text-foreground focus-visible:text-brand focus-visible:outline-none","aria-label":`Remove ${u.label}`,onClick:()=>{r({...n,models:n.models.length===1?[{catalogId:"",credentialId:"",harnesses:[]}]:n.models.filter((m,g)=>g!==l)})},children:h.jsx(Gb,{className:"size-4","aria-hidden":"true"})})]},d)})]})}function FH(){const e=VA();return h.jsx(GH,{...e},e.url)}function GH({repo:e,url:t}){const{org:n}=jr();er(`Run · ${e}`);const[r,a]=lc(),s=ta(),l=`selfbench-run:${t}`,[d,u]=U.useState(()=>{let F=null;try{F=sessionStorage.getItem(l)}catch{}return dR(F,r.get("tasks"))}),[m,g]=U.useState([]),[p,v]=U.useState([]),[y,_]=U.useState([]),[S,E]=U.useState(""),[k,C]=U.useState(!1),[A,O]=U.useState(!1),{draft:L}=d;U.useEffect(()=>{try{sessionStorage.setItem(l,JSON.stringify(d)),r.has("tasks")&&a({},{replace:!0})}catch{}},[l,d,r,a]),U.useEffect(()=>{let F=!1;return O(!1),jt(`${t}/catalog`).then($=>{F||(g($.models),v($.sandboxes))},$=>{F||E($.message)}),jt(`/api/orgs/${encodeURIComponent(n.login)}/credentials`).then($=>{F||_($.credentials)},$=>{F||E($.message)}),jt(`${t}/options`).then($=>{if(!F){const q=$.tasks.map(({runId:ne,taskId:se})=>({runId:ne,taskId:se}));u(ne=>ne.submitted?ne:{...ne,draft:{...ne.draft,tasks:q}}),O(!d.submitted&&q.length>0)}},$=>{F||E($.message)}),()=>{F=!0}},[t,n.login,d.submitted]);const T=L.models.filter(F=>F.harnesses.length>0),D=T.reduce((F,$)=>F+$.harnesses.length,0),M={id:"custom",provider:"custom",model:"",label:"Custom Model",harnesses:["pi"],source:""},B=A&&T.length>0&&T.length===L.models.length&&!qA([...m,M],L.models)&&T.length<=12&&y.some(F=>F.id===L.sandboxCredentialId&&F.kind===L.sandbox)&&T.every(F=>{const $=F.catalogId==="custom"?M:m.find(z=>z.id===F.catalogId),q=y.find(z=>z.id===F.credentialId);if(!$||!q)return!1;const ne=$l($,q.kind),se=Ud($,F.harnesses);return!!ne&&F.harnesses.every(z=>ne.harnesses.includes(z))&&(q.auth!=="codex-login"||F.harnesses.every(z=>z==="codex"))&&(!F.thinking||se.includes(F.thinking))&&($.id!=="custom"||!!F.customModel)}),Y=async()=>{if(k||!d.submitted&&!B)return;C(!0),E("");const F=d.submitted?L:{...L,models:T},$={draft:F,submitted:!0};u($);try{sessionStorage.setItem(l,JSON.stringify($))}catch{}try{const q=await w5(t,F);sessionStorage.removeItem(l),s(`/repos/${e}/comparisons/${q.id}`)}catch(q){q instanceof fR&&u({draft:F,submitted:!1}),E(q instanceof Error?q.message:"Submission not confirmed. Retry uses the same ID.")}finally{C(!1)}};return h.jsxs(Ba,{children:[h.jsx(hi,{title:"Run",description:"Compare models and harnesses against your accepted tasks."}),d.submitted&&h.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3 border border-border bg-card p-4",children:[h.jsx("p",{className:"text-sm",children:"These settings belong to a submitted request."}),h.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[h.jsx($e,{className:"text-sm text-brand",to:`/repos/${e}/comparisons/${L.id}`,children:"View Status"}),h.jsx(be,{type:"button",disabled:k,onClick:()=>{u({submitted:!1,draft:{...L,id:uv()}}),E("")},children:"New Comparison"})]})]}),S&&h.jsx(ft,{className:"mb-4",children:S}),h.jsxs("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3 border border-border bg-card px-4 py-3",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(ED,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),h.jsxs("div",{children:[h.jsxs("p",{className:"text-sm font-medium",children:[L.tasks.length," ",L.tasks.length===1?"Accepted Task":"Accepted Tasks"]}),h.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:L.tasks.length?"Each configuration runs against the same dataset.":"Accept tasks in your dataset before starting a comparison."})]})]}),h.jsxs($e,{className:"inline-flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground",to:`/repos/${e}`,children:["Review Dataset ",h.jsx(hf,{className:"size-3.5","aria-hidden":"true"})]})]}),h.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-[minmax(0,1fr)_18rem]",children:[h.jsxs("fieldset",{className:"min-w-0 border border-border bg-card p-0",disabled:k||d.submitted,children:[h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-sm font-medium",children:"Models and Harnesses"}),h.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[L.models.length," of 12 configurations"]})]}),h.jsx(be,{type:"button",size:"icon","aria-label":"Add Model",title:"Add Model",disabled:L.models.length>=12||L.models.some(F=>!F.catalogId),onClick:()=>u({draft:{...L,models:[...L.models,{catalogId:"",credentialId:"",harnesses:[]}]},submitted:!1}),children:h.jsx(Ma,{className:"size-4","aria-hidden":"true"})})]}),h.jsx(VH,{models:[...m,M],credentials:y,draft:L,onChange:F=>u({draft:F,submitted:!1})})]}),h.jsx(HH,{repo:e,draft:L,credentials:y,sandboxes:p,submitted:d.submitted,busy:k,ready:B,tasksReady:A,pairs:D,onChange:F=>u({...d,draft:F}),onSubmit:()=>{Y()}})]})]})}async function qH(e,t){const n=[],r=[];for(const a of new Set(e))try{n.push({number:a,task:await t(a)})}catch(s){r.push({number:a,message:s instanceof Error?s.message:"Could not start task."})}return{started:n,failed:r}}function ZH({search:e,setSearch:t,visible:n,selected:r,started:a,busy:s,loading:l,listError:d,query:u,incomplete:m,nextPage:g,onToggle:p,onRetry:v,onMore:y}){return h.jsxs(h.Fragment,{children:[h.jsx(Yb,{className:"mx-4 shrink-0 sm:mx-6",placeholder:"Search Listed PRs…","aria-label":"Search Listed Pull Requests",value:e,onChange:_=>t(_.target.value)}),h.jsxs("div",{className:"mt-4 max-h-[55dvh] min-h-0 flex-1 overflow-y-auto px-4 pb-4 sm:px-6","aria-busy":l,children:[n.map(_=>h.jsxs("label",{className:`flex w-full cursor-pointer items-start gap-3 border-b border-border px-3 py-3 text-left text-foreground hover:bg-muted has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-[-2px] has-[:focus-visible]:outline-brand has-[:disabled]:cursor-default has-[:disabled]:opacity-55${r.has(_.number)?" bg-brand/5":""}`,children:[h.jsx("input",{className:"sr-only",type:"checkbox",checked:r.has(_.number),disabled:s||a.has(_.number),onChange:()=>p(_.number)}),h.jsx("span",{"aria-hidden":"true",className:`flex size-4 shrink-0 items-center justify-center self-center border ${r.has(_.number)?"border-brand bg-brand text-background":"border-input"}`,children:r.has(_.number)&&h.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"size-3",fill:"none",stroke:"currentColor",strokeWidth:"2",children:h.jsx("path",{d:"m3 8 3 3 7-7"})})}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block font-mono text-sm leading-6 text-foreground/80 wrap-anywhere",children:_.title}),h.jsxs("span",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs leading-5 text-muted-foreground",children:[h.jsxs("span",{className:"text-brand/80",children:["#",_.number]}),h.jsx("span",{className:"min-w-0 break-all",children:_.author}),a.has(_.number)&&h.jsx("span",{className:"text-brand",children:"Started"}),h.jsx("span",{className:"ml-auto whitespace-nowrap",children:cc(_.mergedAt)})]})]})]},_.number)),l&&h.jsxs("div",{role:"status","aria-label":"Loading Merged Pull Requests",children:[h.jsx("span",{className:"sr-only",children:"Loading merged pull requests…"}),h.jsx("div",{"aria-hidden":"true",className:"motion-safe:animate-pulse",children:(n.length?[1,2]:[1,2,3,4,5,6]).map(_=>h.jsxs("div",{className:"flex gap-3 border-b border-border px-2 py-3",children:[h.jsx("div",{className:"size-4 shrink-0 self-center border border-border"}),h.jsxs("div",{className:"min-w-0 flex-1 py-1",children:[h.jsx("div",{className:`h-3 bg-accent ${_%2?"w-4/5":"w-3/5"}`}),h.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[h.jsx("div",{className:"h-2.5 w-8 bg-accent"}),h.jsx("div",{className:"h-2.5 w-16 bg-accent"}),h.jsx("div",{className:"ml-auto h-2.5 w-12 bg-accent"})]})]})]},_))})]}),d&&h.jsxs("p",{className:"py-4 text-muted-foreground mt-4 font-mono text-sm leading-relaxed text-destructive",role:"alert",children:[d," ",h.jsx(be,{type:"button",variant:"ghost",onClick:()=>v(),children:"Retry"})]}),!l&&!d&&n.length===0&&h.jsx("p",{className:"py-4 font-mono text-sm leading-5 text-muted-foreground",children:u?"No matching pull requests.":"No merged pull requests found on this page."}),m&&h.jsx("p",{className:"py-4 font-mono text-sm leading-5 text-muted-foreground",children:"GitHub returned partial results. Try reopening the picker to refresh."}),!l&&!d&&g!==null&&h.jsx(be,{type:"button",className:"mx-auto mt-4 flex w-fit",disabled:s,onClick:()=>y(),children:"Load More"})]})]})}function WH({org:e,fullName:t,onClose:n,onComplete:r}){const[a,s]=U.useState(""),[l,d]=U.useState(1),{settings:u,setSettings:m,options:g,error:p,valid:v,reload:y}=Jk(e.login,t),[_,S]=U.useState(new Set),[E,k]=U.useState(new Set),C=U.useRef(!1),[A,O]=U.useState([]),[L,T]=U.useState(1),[D,M]=U.useState(null),[B,Y]=U.useState(!0),[F,$]=U.useState(null),[q,ne]=U.useState(0),[se,z]=U.useState(!1),[G,ie]=U.useState(!1),[J,Z]=U.useState(null),P=U.useRef(null);U.useEffect(()=>{let ce=!0;return Y(!0),$(null),a5(e.login,t,L).then(fe=>{ce&&(O(ye=>L===1?fe.pullRequests:[...ye,...fe.pullRequests.filter(Re=>!ye.some(he=>he.number===Re.number))]),M(fe.nextPage),z(fe.incomplete),Y(!1))},fe=>{ce&&($(fe.message),Y(!1))}),()=>{ce=!1}},[e.login,t,L,q]);const ee=a.trim().toLowerCase(),le=A.filter(ce=>`${ce.title} #${ce.number} ${ce.author}`.toLowerCase().includes(ee)),de=async()=>{if(!_.size||C.current||!v)return;C.current=!0,ie(!0),Z(null);const ce=await qH(_,fe=>Q4(e.login,t,String(fe),u));if(k(fe=>new Set([...fe,...ce.started.map(ye=>ye.number)])),S(new Set(ce.failed.map(fe=>fe.number))),C.current=!1,ie(!1),!ce.failed.length){r();return}Z({started:ce.started.length,failed:ce.failed})};return h.jsx(mi,{initialFocus:P,onDismiss:n,busy:G,size:l===1?"wide":"large","aria-labelledby":"add-pr-title",children:h.jsxs("section",{className:"flex min-w-0 flex-col","aria-labelledby":"add-pr-title",children:[h.jsx(pi,{title:"Add PRs",titleId:"add-pr-title",description:t,onClose:n,closeRef:P,busy:G}),h.jsx(uk,{step:l,firstStep:"Select PRs"}),l===1?h.jsx(ZH,{search:a,setSearch:s,visible:le,selected:_,started:E,busy:G,loading:B,listError:F,query:ee,incomplete:se,nextPage:D,onToggle:ce=>{S(fe=>{const ye=new Set(fe);return ye.has(ce)?ye.delete(ce):ye.add(ce),ye}),Z(null)},onRetry:()=>ne(ce=>ce+1),onMore:()=>{D!==null&&T(D)}}):h.jsxs("div",{className:"px-4 pb-6 sm:px-6",children:[p&&h.jsxs(ft,{className:"mb-4",children:[p," ",h.jsx(be,{onClick:y,children:"Try Again"})]}),!g&&!p?h.jsx("p",{role:"status",className:"font-mono text-sm text-muted-foreground",children:"Loading generation settings…"}):h.jsx(ck,{value:u,onChange:m,options:g,disabled:G})]}),J&&h.jsxs("div",{className:"max-h-40 shrink-0 overflow-auto border-t border-border px-4 py-3 font-mono text-sm leading-5 sm:px-6",children:[h.jsxs("p",{role:"status",className:"text-muted-foreground",children:[J.started>0&&h.jsxs("span",{className:"text-brand",children:[J.started," started · "]}),h.jsxs("span",{className:"text-destructive",children:[J.failed.length," failed"]}),h.jsx("span",{children:" — failed PRs remain selected."})]}),h.jsxs("details",{className:"mt-2 text-muted-foreground",children:[h.jsx("summary",{className:"w-fit cursor-pointer hover:text-foreground",children:"Technical Details"}),h.jsx("ul",{className:"mt-2 space-y-1 break-words",children:J.failed.map(ce=>h.jsxs("li",{children:["PR #",ce.number,": ",ce.message]},ce.number))})]})]}),h.jsxs(gi,{className:"sticky bottom-0 justify-between",children:[h.jsxs("span",{className:"font-mono text-sm text-muted-foreground",children:[_.size," Selected"]}),h.jsxs("div",{className:"ml-auto flex gap-3",children:[l===2&&h.jsx(be,{variant:"ghost",disabled:G,onClick:()=>d(1),children:"Back"}),h.jsx(be,{variant:"primary",disabled:G||_.size===0||l===2&&!v,onClick:()=>l===1?d(2):void de(),children:G?"Starting…":l===1?"Continue":"Generate Tasks"})]})]})]})})}function YH(){const{repoId:e,runs:t,statuses:n,errors:r,error:a}=wf();if(!a&&!t?.length)return null;const s=(t??[]).filter(u=>n[u.runId]&&!ai(n[u.runId].phase)).length,l=(t??[]).filter(u=>["blocked","failed"].includes(n[u.runId]?.phase)).length,d=a||(t??[]).some(u=>r[u.runId]);return h.jsxs($e,{to:ss(e.fullName),className:"mb-6 flex flex-wrap items-center justify-between gap-3 border border-border bg-card px-4 py-3 hover:bg-muted/50","aria-label":"View Batch Activity",children:[h.jsxs("span",{className:"flex flex-wrap items-center gap-x-5 gap-y-2",children:[h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm",children:[h.jsx(EC,{className:"size-4 text-muted-foreground","aria-hidden":"true"}),"Batch Activity"]}),h.jsx("span",{className:"text-xs text-muted-foreground",children:t?`${t.length} ${t.length===1?"Batch":"Batches"}`:"History Unavailable"}),s>0&&h.jsxs("span",{className:"text-xs text-brand",children:[s," Running"]}),l>0&&h.jsxs("span",{className:"text-xs text-destructive",children:[l," ",l===1?"Needs Attention":"Need Attention"]}),d&&h.jsx("span",{className:"text-xs text-destructive",children:"Status Unavailable"})]}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-xs text-muted-foreground",children:["View Batches",h.jsx(hf,{className:"size-3.5","aria-hidden":"true"})]})]})}function KH({tasks:e,busy:t,onCancel:n,onConfirm:r}){const a=U.useRef(null),s=U.useId(),l=U.useId();return h.jsxs(mi,{initialFocus:a,onDismiss:n,busy:t,size:"small","aria-labelledby":s,"aria-describedby":l,children:[h.jsx(pi,{title:e.length===1?"Delete Task?":`Delete ${e.length} Tasks?`,titleId:s,onClose:n,busy:t}),h.jsx(gs,{children:h.jsxs("p",{id:l,className:"break-words text-sm leading-6 text-muted-foreground",children:[e.length===1?`Remove “${e[0]?.taskId}” from this dataset?`:`Remove these ${e.length} selected tasks from this dataset?`," ","They will stay removed after sync. Historical results and artifacts are kept."]})}),h.jsxs(gi,{children:[h.jsx(be,{ref:a,disabled:t,onClick:n,children:"Cancel"}),h.jsx(be,{variant:"destructive",disabled:t,onClick:r,children:t?"Deleting…":e.length===1?"Delete Task":"Delete Tasks"})]})]})}function XH({task:e,disabled:t,onDelete:n}){const r=R.useRef(null),a=R.useRef(!1);return h.jsxs(Pv,{onOpenChange:s=>{s&&(a.current=!1)},children:[h.jsx(zv,{asChild:!0,children:h.jsx(be,{ref:r,variant:"ghost",size:"icon","aria-label":`Task Actions for ${e.taskId} from ${e.runId}`,disabled:t,title:t?"Task actions are unavailable during generation or deletion.":"Task Actions",className:"size-8",children:h.jsx(pC,{"aria-hidden":"true"})})}),h.jsx($v,{align:"end",className:"min-w-40",onCloseAutoFocus:s=>{a.current&&(s.preventDefault(),a.current=!1,r.current?.focus(),n())},children:h.jsxs(Jg,{className:"text-destructive data-[highlighted]:text-destructive",onSelect:()=>{a.current=!0},children:[h.jsx(IC,{"aria-hidden":"true"}),"Delete Task"]})})]})}const _r=e=>`${e.runId}:${e.taskId}`;async function QH(e,t){const n=new Set,r=[],a=[...e];return await Promise.all(Array.from({length:Math.min(4,a.length)},async()=>{for(let s=a.shift();s;s=a.shift())try{await t(s),n.add(_r(s))}catch(l){r.push({task:s,error:l instanceof Error?l.message:"Deletion failed"})}})),{deleted:n,failures:r}}const Hv="grid grid-cols-[1rem_minmax(0,1fr)_2rem] items-center gap-x-3 px-4",Bv="grid min-w-0 items-center gap-x-6 gap-y-2 md:grid-cols-[minmax(0,1fr)_5rem_7.5rem] xl:grid-cols-[minmax(0,1fr)_6rem_5rem_7.5rem]";function JH({fullName:e,tasks:t,selected:n,busy:r,onSelect:a,onDelete:s}){return h.jsxs("div",{children:[h.jsx(ZA,{}),h.jsx("ul",{className:"list-none divide-y divide-border","aria-label":"Dataset Tasks",children:t.map(l=>h.jsxs("li",{"data-selected":n.has(_r(l)),className:Se(Hv,"group border-border transition-colors hover:bg-muted/50 data-[selected=true]:bg-brand/5"),children:[h.jsx("input",{type:"checkbox",className:"size-4 accent-brand","aria-label":`Select ${l.taskId} from ${l.runId}`,checked:n.has(_r(l)),disabled:r||l.pipelineStatus==="in_progress",onChange:d=>a(l,d.target.checked)}),h.jsxs($e,{className:Se(Bv,"py-3 text-foreground outline-offset-4 focus-visible:outline-brand"),to:`/repos/${e}/tasks/${l.runId}/${encodeURIComponent(l.taskId)}`,children:[h.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[h.jsx("span",{className:"line-clamp-2 text-sm leading-6 font-medium wrap-anywhere md:line-clamp-1",title:l.taskId,children:l.taskId}),h.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-xs leading-5 text-muted-foreground",children:[l.sourcePr&&h.jsxs("span",{className:"shrink-0 xl:hidden",children:["PR #",l.sourcePr,h.jsx("span",{className:"ml-2 text-input",children:"/"})]}),h.jsx("span",{className:"truncate",title:l.runId,children:l.runId})]}),l.state==="in_progress"?h.jsxs("span",{className:"truncate text-xs leading-5 text-muted-foreground",children:[l.stage,l.round?` · round ${l.round}`:"",l.startedBy?` · started by ${l.startedBy}`:""]}):l.reasonSummary&&l.state!=="accepted"?h.jsx("span",{className:"truncate text-xs leading-5 text-muted-foreground",title:l.reasonSummary,children:l.reasonSummary}):null]}),h.jsx("span",{className:"hidden items-center gap-1.5 text-xs text-muted-foreground xl:flex",children:l.sourcePr?h.jsxs(h.Fragment,{children:[h.jsx(AD,{className:"size-3.5","aria-hidden":"true"}),"#",l.sourcePr]}):"—"}),h.jsxs("span",{className:"grid grid-cols-[4rem_minmax(0,1fr)] items-center gap-x-3 md:contents",children:[h.jsx(oR,{difficulty:l.difficulty}),h.jsx(aR,{state:l.state})]})]}),h.jsx(XH,{task:l,disabled:r||l.pipelineStatus==="in_progress",onDelete:()=>s(l)})]},_r(l)))})]})}function ZA(){return h.jsxs("div",{className:Se(Hv,"hidden border-b border-border bg-muted/30 py-3 text-xs text-muted-foreground md:grid"),"aria-hidden":"true",children:[h.jsx("span",{}),h.jsxs("div",{className:Bv,children:[h.jsx("span",{children:"Task"}),h.jsx("span",{className:"hidden xl:block",children:"Source"}),h.jsx("span",{children:"Difficulty"}),h.jsx("span",{children:"Status"})]}),h.jsx("span",{})]})}function eB({org:e,fullName:t,visible:n,selectionScope:r,onDeleting:a,onDeleted:s,actionsTarget:l}){const[d,u]=U.useState(new Set),[m,g]=U.useState(!1),[p,v]=U.useState(null),y=U.useRef(!1),[_,S]=U.useState(null),[E,k]=U.useState(r);E!==r&&(k(r),u(new Set),S(null));const A=n.filter(D=>D.pipelineStatus!=="in_progress").filter(D=>d.has(_r(D))),O=A.length,L=async D=>{if(D.length===0||y.current)return;y.current=!0,g(!0),a(!0),S(null);const M=await QH(D,B=>t5(e,t,B.runId,B.taskId));s(M.deleted),u(new Set(M.failures.map(({task:B})=>_r(B)))),S(M),v(null),y.current=!1,g(!1),a(!1)},T=D=>{D.length===0||y.current||(v(D),a(!0))};return h.jsxs(h.Fragment,{children:[l&&O>0&&Ef.createPortal(h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"mr-auto text-xs tabular-nums text-muted-foreground",children:[O," Selected"]}),h.jsx(be,{variant:"ghost",size:"small","aria-label":"Clear Selection",disabled:m,onClick:()=>u(new Set),children:"Clear"}),h.jsx(be,{variant:"destructive",size:"small",title:"Delete Selected Tasks","aria-busy":m,disabled:m,onClick:()=>T(A),children:m?"Deleting…":"Delete Selected"})]}),l),p&&h.jsx(KH,{tasks:p,busy:m,onCancel:()=>{v(null),a(!1)},onConfirm:()=>{L(p)}}),_&&h.jsxs("div",{className:"border-b border-border px-4 py-3 text-xs leading-5",role:"status",children:[h.jsxs("p",{children:[_.deleted.size," task",_.deleted.size===1?"":"s"," deleted.",_.failures.length>0&&` ${_.failures.length} could not be deleted and remain selected.`]}),_.failures.length>0&&h.jsx("ul",{className:"mt-2 list-inside list-disc break-words text-destructive",children:_.failures.map(({task:D,error:M})=>h.jsxs("li",{children:[D.taskId," (",D.runId,"): ",M]},_r(D)))})]}),n.length>0&&h.jsx(JH,{fullName:t,tasks:n,selected:d,busy:m,onSelect:(D,M)=>u(B=>{const Y=new Set(B);return M?Y.add(_r(D)):Y.delete(_r(D)),Y}),onDelete:D=>T([D])})]})}const tB=["all","in_progress","needs_review","accepted","rejected","failed"];function nB({counts:e,filter:t,onFilter:n,query:r,onQuery:a,disabled:s,actions:l}){const d=R.useId();return h.jsxs("div",{className:"border-b border-border",children:[h.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[h.jsx(Yb,{className:"w-full sm:max-w-80",placeholder:"Search Tasks…",value:r,disabled:s,onChange:u=>a(u.target.value),"aria-label":"Search Tasks",title:"Search by task, PR, or run"}),h.jsxs("label",{htmlFor:d,className:"flex shrink-0 items-center gap-3 text-xs text-muted-foreground [&>span]:flex-1 sm:[&>span]:w-48",children:["Status",h.jsx(Qt,{id:d,value:t,disabled:s,onChange:u=>n(u.target.value),children:tB.map(u=>h.jsxs("option",{value:u,children:[u==="all"?"All Tasks":iR[u],e?` (${e[u]})`:""]},u))})]})]}),l]})}function rB(){return h.jsxs(h.Fragment,{children:[h.jsx(ZA,{}),h.jsx("ul",{className:"pointer-events-none list-none divide-y divide-border","aria-busy":"true","aria-label":"Loading Tasks",children:[0,1,2,3,4].map(e=>h.jsxs("li",{className:Se(Hv,"py-3"),children:[h.jsx("span",{className:"size-4 bg-accent"}),h.jsxs("div",{className:Bv,children:[h.jsxs("span",{className:"grid min-w-0 gap-3 py-1",children:[h.jsx("span",{className:Se("h-3.5 max-w-72 animate-pulse bg-accent motion-reduce:animate-none",e%2?"w-4/5":"w-full")}),h.jsx("span",{className:"h-2.5 w-3/5 max-w-48 animate-pulse bg-accent motion-reduce:animate-none"})]}),h.jsx("span",{className:"hidden h-3 w-12 bg-accent xl:block"}),h.jsxs("span",{className:"flex gap-6 md:contents",children:[h.jsx("span",{className:"h-3 w-12 bg-accent"}),h.jsx("span",{className:"h-3 w-20 bg-accent"})]})]}),h.jsx("span",{})]},e))})]})}function WA(){const{org:e}=jr(),{owner:t="",name:n=""}=fi();return h.jsx(iB,{},`${e.login}/${t}/${n}`)}function iB(){const e=ta(),t=wf(),{org:n}=jr(),{owner:r="",name:a=""}=fi(),s=`${r}/${a}`;er(`Dataset · ${s} · self-bench`);const[l,d]=U.useState(void 0),[u,m]=U.useState(null),[g,p]=U.useState(null),[v]=lc(),[y,_]=U.useState(v.get("state")==="in_progress"?"in_progress":"accepted"),[S,E]=U.useState(""),[k,C]=U.useState(!1),[A,O]=U.useState(null),L=U.useRef(0),T=U.useCallback(()=>{const $=++L.current;p(null),m(null),yd(n.login,s).then(q=>$===L.current&&m(q),q=>$===L.current&&p(q.message))},[n.login,s]),D=U.useCallback(()=>{if(k)return;const $=++L.current;yd(n.login,s).then(q=>$===L.current&&m(q),q=>$===L.current&&p(q.message))},[n.login,s,k]);U.useEffect(()=>{t.revision>0&&D()},[t.revision,D]),U.useEffect(()=>{let $=!1;return Qk(n.login).then(q=>{if($)return;const ne=q.find(se=>se.fullName.toLowerCase()===s.toLowerCase());d(ne??null)},q=>!$&&p(q.message)),T(),()=>{$=!0}},[n.login,s,T]);const M=(u??[]).some($=>$.state==="in_progress");U.useEffect(()=>{if(!M||k)return;const $=window.setInterval(()=>{const q=L.current;yd(n.login,s).then(ne=>q===L.current&&m(ne),()=>{})},15e3);return()=>window.clearInterval($)},[M,k,n.login,s]);const B=U.useMemo(()=>{const $={all:0,needs_review:0,accepted:0,rejected:0,failed:0,in_progress:0};for(const q of u??[])$.all+=1,$[q.state]+=1;return $},[u]),Y=S.trim().toLowerCase(),F=(u??[]).filter($=>(y==="all"||$.state===y)&&(!Y||$.taskId.toLowerCase().includes(Y)||String($.sourcePr??"").includes(Y)||$.runId.toLowerCase().includes(Y)));return l===null?h.jsx(Ba,{children:h.jsxs("p",{className:"mb-4 font-mono text-base text-destructive",children:[s," is not connected in ",n.login,". ",h.jsx($e,{to:"/",children:"Back to Repositories"})]})}):h.jsxs(Ba,{children:[h.jsx(hi,{title:"Dataset",className:"max-sm:flex-col max-sm:items-start",description:l&&h.jsxs("span",{className:"inline-flex flex-wrap items-center gap-x-4 gap-y-1 text-xs",children:[h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(RD,{className:"size-3.5","aria-hidden":"true"}),l.defaultBranch]}),l.private&&h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(kC,{className:"size-3.5","aria-hidden":"true"}),"Private"]})]}),children:h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(eR,{repoId:{org:n.login,fullName:s},onStarted:($,q)=>{t.refresh(),e(ss(s,$),{state:{batchStartWarning:q}})},disabled:k}),h.jsxs($e,{className:ra.primary,to:`/repos/${s}/add-prs`,onClick:$=>{k&&$.preventDefault()},"aria-disabled":k,children:[h.jsx(Ma,{"aria-hidden":"true"}),"Add PRs"]})]})}),h.jsx(YH,{}),g&&u!==null&&h.jsx(ft,{className:"mb-4",children:g}),h.jsxs("section",{className:"overflow-clip border border-border bg-card","aria-label":"Dataset",children:[h.jsx(nB,{counts:u===null?null:B,filter:y,onFilter:_,query:S,onQuery:E,disabled:k||u===null,actions:h.jsx("div",{ref:O,className:"flex items-center gap-2 border-t border-border px-4 py-3 empty:hidden"})}),u===null&&!g&&h.jsx(rB,{}),u===null&&g&&h.jsx("div",{role:"alert",children:h.jsx(wr,{title:"Could Not Load Tasks",className:"border-0 bg-transparent",action:h.jsx(be,{onClick:T,children:"Try Again"}),children:g})}),u!==null&&u.length===0&&h.jsx(wr,{title:"No Tasks Yet",className:"border-0 bg-transparent",children:"Add a PR to generate your first task."}),u!==null&&u.length>0&&F.length===0&&h.jsx(wr,{title:"No Matching Tasks",className:"border-0 bg-transparent",action:h.jsx(be,{variant:"ghost",disabled:k,onClick:()=>{_("all"),E("")},children:"Clear Filters"}),children:"Try a different search or task state."}),h.jsx(eB,{actionsTarget:A,org:n.login,fullName:s,visible:F,selectionScope:`${y}/${S}`,onDeleting:$=>{$&&++L.current,C($)},onDeleted:$=>m(q=>q?.filter(ne=>!$.has(_r(ne)))??null)}),u!==null&&u.length>0&&h.jsx("p",{className:"border-t border-border px-4 py-3 text-xs tabular-nums text-muted-foreground",role:"status",children:F.length===u.length?`${u.length} Tasks`:`${F.length} of ${u.length} Tasks`})]})]})}function aB(){const{owner:e,name:t}=fi(),{org:n}=jr(),r=ta(),a=`${e}/${t}`;return er(`Add PRs · ${a}`),h.jsxs(h.Fragment,{children:[h.jsx(WA,{}),h.jsx(WH,{org:n,fullName:a,onClose:()=>{r(`/repos/${a}`)},onComplete:()=>{r(`/repos/${a}?state=in_progress`)}},`${n.login}/${a}`)]})}const n1={state:"That sign-in attempt expired. Try again.",denied:"GitHub sign-in was cancelled.",github:"GitHub sign-in failed. Try again."};function oB(){er("Sign In — self-bench by dari.dev");const{session:e}=lv(),[t]=lc(),[n,r]=R.useState(!1);R.useEffect(()=>{const s=()=>r(!1);return window.addEventListener("pageshow",s),()=>window.removeEventListener("pageshow",s)},[]);const a=t.get("error");return e.status==="signed-in"?h.jsx(Pl,{to:"/",replace:!0}):h.jsx("div",{className:"flex min-h-svh items-center justify-center px-6 py-12",children:h.jsxs("div",{className:"w-full max-w-[320px]",children:[h.jsxs("div",{className:"flex flex-col items-center text-center",children:[h.jsx($e,{to:"/","aria-label":"self-bench Home",className:"mb-5 block [&_svg]:size-14",children:h.jsx(hR,{})}),h.jsx("h1",{className:"font-mono text-3xl font-medium leading-tight tracking-[-0.06em] text-foreground",children:"self-bench"}),h.jsx("p",{className:"mt-2 font-mono text-sm text-muted-foreground",children:"by dari.dev"}),h.jsxs("a",{className:`${ra.primary} mt-8 w-full [&_svg]:fill-current`,href:"/auth/github","aria-busy":n,"aria-disabled":n,onClick:s=>{if(!(s.button!==0||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)){if(n){s.preventDefault();return}r(!0)}},children:[n?h.jsx("span",{"aria-hidden":"true",className:"size-4 shrink-0 animate-spin rounded-full border-2 border-current border-r-transparent motion-reduce:animate-none"}):h.jsx(sB,{}),h.jsx("span",{"aria-live":"polite",children:n?"Connecting to GitHub…":"Continue with GitHub"})]}),a&&h.jsx(ft,{className:"mt-5 w-full text-left",children:n1[a]??n1.github})]}),h.jsxs("div",{className:"mt-8 flex items-center justify-center gap-4 font-mono text-sm text-muted-foreground [&_a:hover]:text-foreground",children:[h.jsx("a",{href:"https://dari.dev",children:"dari.dev"}),h.jsx("span",{className:"text-input","aria-hidden":"true",children:"·"}),h.jsx("a",{href:"https://github.com/mupt-ai/self-bench",children:"GitHub"})]})]})})}function sB(){return h.jsx("svg",{className:"size-4 shrink-0",width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:h.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function lB({org:e,mode:t,connected:n,onClose:r,onConnected:a}){const[s,l]=U.useState({status:"loading"}),[d,u]=U.useState(""),[m,g]=U.useState(null),[p,v]=U.useState(null),[y,_]=U.useState({busy:!1}),S=U.useRef(null);U.useEffect(()=>{if(t!=="mine")return;let T=!1;return l({status:"loading"}),Y4(e.login).then(D=>!T&&l({status:"ok",value:D}),D=>!T&&l({status:"error",message:D.message})),()=>{T=!0}},[e.login,t]);const E=T=>{g(T),v({status:"loading"}),mw(T.fullName).then(D=>v(M=>M?.status==="loading"?{status:"ok",value:D}:M),D=>v({status:"error",message:D.message}))},k=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(d.trim())?d.trim():null,C=()=>{k&&(g(null),v({status:"loading"}),mw(k).then(T=>{g(T.repo),v({status:"ok",value:T})},T=>v({status:"error",message:T.message})))},A=()=>{m&&(_({busy:!0}),K4(e.login,m.fullName).then(T=>{_({busy:!1}),a(T)},T=>_({busy:!1,error:T.message})))},O=d.trim().toLowerCase(),L=t==="mine"&&s.status==="ok"?s.value.filter(T=>!O||T.fullName.toLowerCase().includes(O)):[];return h.jsx(mi,{initialFocus:S,onDismiss:r,busy:y.busy,placement:"right",size:"large","aria-labelledby":"connect-repo-title",children:h.jsxs("div",{className:"flex h-full flex-col",children:[h.jsx(pi,{title:t==="mine"?"Connect My Repo":"Connect Public Repo",titleId:"connect-repo-title",description:t==="mine"?`Repositories in ${e.login} that your GitHub account can read.`:"Find a public GitHub repository by owner/name.",onClose:r,busy:y.busy}),t==="public"?h.jsxs("form",{className:"flex gap-2 p-4 sm:p-6",onSubmit:T=>{T.preventDefault(),C()},children:[h.jsx(Nn,{ref:S,className:"flex-1",type:"text",placeholder:"owner/name",value:d,onChange:T=>u(T.target.value),"aria-label":"Repository Owner and Name",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1}),h.jsx(be,{type:"submit",disabled:!k,children:"Look Up"})]}):h.jsx(Yb,{ref:S,className:"m-4 sm:m-6",type:"search",placeholder:"Search Repositories",value:d,onChange:T=>u(T.target.value),"aria-label":"Search Repositories"}),h.jsxs("fieldset",{className:"min-h-0 min-w-0 flex-1 overflow-y-auto border-0 px-4 pb-4 sm:px-6 sm:pb-6","aria-label":"Repositories",children:[t==="mine"&&s.status==="loading"&&h.jsx(ci,{label:"Loading Repositories"}),t==="mine"&&s.status==="error"&&h.jsx(ft,{children:s.message}),t==="mine"&&s.status==="ok"&&L.length===0&&h.jsx(wr,{title:O?"No Matching Repositories":"No Repositories",children:"Try another search or connect a public repository."}),t==="public"&&p?.status==="loading"&&h.jsx(ci,{label:"Looking Up Repository",rows:1}),t==="public"&&p?.status==="error"&&h.jsx(ft,{children:p.message}),t==="public"&&!p&&h.jsx("p",{className:"py-4 text-muted-foreground",children:"Type the repository as it appears on GitHub, then look it up."}),L.map(T=>h.jsxs("button",{type:"button","aria-pressed":m?.githubId===T.githubId,disabled:n.has(T.fullName.toLowerCase()),className:`flex w-full flex-wrap items-center justify-between gap-2 border border-transparent border-b-border px-3 py-2.5 text-left text-foreground hover:bg-muted disabled:cursor-default disabled:opacity-55 ${m?.githubId===T.githubId?"border-brand bg-muted":""}`,onClick:()=>E(T),children:[h.jsx("span",{className:"truncate font-mono text-sm font-medium",children:T.name}),h.jsxs("span",{className:"flex max-w-full flex-wrap gap-2 text-xs text-muted-foreground",children:[n.has(T.fullName.toLowerCase())&&h.jsx("span",{className:"text-[10px] tracking-wide text-muted-foreground uppercase",children:"Connected"}),T.private&&h.jsx("span",{className:"text-[10px] tracking-wide text-muted-foreground uppercase",children:"Private"}),T.archived&&h.jsx("span",{className:"text-[10px] tracking-wide text-muted-foreground uppercase",children:"Archived"}),T.language&&h.jsx("span",{children:T.language}),h.jsx("span",{children:cc(T.pushedAt)})]})]},T.githubId))]}),m&&h.jsxs(gi,{className:"justify-between",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-sm text-foreground font-mono",children:m.fullName}),h.jsxs("div",{className:"mt-1 flex gap-2 text-sm text-muted-foreground",children:[h.jsx("span",{className:"font-mono",children:m.defaultBranch}),h.jsx("span",{className:"text-input","aria-hidden":"true",children:"·"}),h.jsx("span",{children:cB(p)})]}),y.error&&h.jsx("div",{className:"mt-1.5 font-mono text-sm text-destructive",children:y.error})]}),h.jsx(be,{variant:"primary",disabled:y.busy,onClick:A,children:y.busy?"Connecting…":"Connect"})]})]})})}function cB(e){if(!e||e.status==="loading")return"counting merged pull requests…";if(e.status==="error")return"could not count merged pull requests";const t=e.value.mergedPullRequests;return`${t} merged pull request${t===1?"":"s"} in the last 12 months`}const r1="grid grid-cols-[minmax(0,1fr)_auto] gap-x-4 gap-y-3 md:grid-cols-[minmax(0,1fr)_5rem_8rem_5rem_2.5rem]";function uB({repos:e,stats:t,onDisconnect:n}){return h.jsxs("div",{className:"overflow-hidden border border-border bg-card",children:[h.jsxs("div",{className:`${r1} hidden border-b border-border bg-muted/50 px-4 py-3 text-xs tracking-wider text-muted-foreground uppercase md:grid`,"aria-hidden":"true",children:[h.jsx("span",{children:"Repository"}),h.jsx("span",{children:"Tasks"}),h.jsx("span",{children:"Needs Review"}),h.jsx("span",{children:"Last PR"}),h.jsx("span",{})]}),h.jsx("ul",{className:"divide-y divide-border",children:e.map(r=>{const a=t[r.fullName];return h.jsxs("li",{className:`${r1} items-center px-4 py-4 transition-colors hover:bg-muted/40`,children:[h.jsxs("div",{className:"min-w-0",children:[h.jsxs($e,{className:"inline-flex max-w-full items-center gap-2 font-medium text-foreground hover:text-brand",to:`/repos/${r.fullName}`,children:[h.jsx(yC,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),h.jsx("span",{className:"truncate",children:r.fullName})]}),h.jsxs("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:[r.defaultBranch," · ",r.private?"Private":"Public"," · connected"," ",cc(r.connectedAt)]})]}),h.jsxs("div",{className:"col-span-2 grid grid-cols-3 gap-4 text-sm tabular-nums md:contents",children:[h.jsx(Bp,{label:"Tasks",value:a?.tasks}),h.jsx(Bp,{label:"Needs Review",value:a?.needsReview,attention:!!a?.needsReview}),h.jsx(Bp,{label:"Last PR",value:a?a.lastPr?`#${a.lastPr}`:"—":void 0})]}),h.jsx(be,{size:"icon",variant:"ghost",className:"col-start-2 row-start-1 text-muted-foreground hover:text-destructive md:col-start-5","aria-label":`Disconnect ${r.fullName}`,title:"Disconnect",onClick:()=>n(r),children:h.jsx(MD,{"aria-hidden":"true"})})]},r.fullName)})})]})}function Bp({label:e,value:t,attention:n}){return h.jsxs("div",{children:[h.jsx("span",{className:"mb-1 block text-xs text-muted-foreground md:sr-only",children:e}),t===void 0?h.jsx(et,{className:"h-4 w-8"}):h.jsx("span",{className:n?"text-brand":"text-foreground",children:t})]})}function dB(e){return e?{tasks:e.total-e.rejected,needsReview:e.needsReview,...e.lastPr!==void 0?{lastPr:e.lastPr}:{}}:{tasks:0,needsReview:0}}function fB(){const{org:e}=jr();er(`${e.login} · self-bench`);const[t,n]=U.useState({status:"loading"}),[r,a]=U.useState(null),[s,l]=U.useState(null),[d,u]=U.useState({});U.useEffect(()=>{let y=!1;return Qk(e.login).then(_=>{y||(n({status:"ok",repos:_}),e5(e.login).then(S=>!y&&u(Object.fromEntries(_.map(E=>[E.fullName,dB(S[E.fullName])]))),()=>{}))},_=>!y&&a(_.message)),()=>{y=!0}},[e.login]);const m=U.useCallback(()=>l(null),[]),g=U.useCallback(y=>{n(_=>_.status==="ok"?{status:"ok",repos:[y,..._.repos]}:_),l(null)},[]),p=y=>{window.confirm(`Disconnect ${y.fullName}?`)&&X4(e.login,y.fullName).then(()=>n(_=>_.status==="ok"?{status:"ok",repos:_.repos.filter(S=>S.fullName!==y.fullName)}:_),_=>a(_.message))},v=new Set(t.status==="ok"?t.repos.map(y=>y.fullName.toLowerCase()):[]);return h.jsxs(Fl,{children:[h.jsxs(hi,{title:"Connected Repositories",description:`Repositories available to ${e.login}.`,children:[h.jsxs(be,{size:"small",onClick:()=>l("public"),children:[h.jsx(Ma,{className:"mr-1 h-4 w-4","aria-hidden":"true"}),"Connect Public Repo"]}),h.jsxs(be,{size:"small",variant:"primary",onClick:()=>l("mine"),children:[h.jsx(Ma,{className:"mr-1 h-4 w-4","aria-hidden":"true"}),"Connect My Repo"]})]}),r&&h.jsx(ft,{className:"mb-4",children:r}),t.status==="loading"&&!r&&h.jsx(ci,{label:"Loading Repositories"}),t.status==="ok"&&t.repos.length===0&&h.jsx(wr,{title:"Connect a Repository to Get Started",action:h.jsxs(be,{size:"small",variant:"primary",onClick:()=>l("mine"),children:[h.jsx(Ma,{className:"mr-1 h-4 w-4","aria-hidden":"true"}),"Connect My Repo"]}),children:"Choose a repository to turn merged pull requests into reviewable tasks."}),t.status==="ok"&&t.repos.length>0&&h.jsx(uB,{repos:t.repos,stats:d,onDisconnect:p}),s&&h.jsx(lB,{org:e,mode:s,connected:v,onClose:m,onConnected:g})]})}function hB({task:e,org:t,fullName:n}){const[r,a]=R.useState();if(R.useEffect(()=>{if(!e.runId.startsWith("batch-")||e.state!=="in_progress")return;let m=!1,g;const p=async()=>{try{const v=await zC({org:t,fullName:n},e.runId);if(m||(a(v),ai(v.phase)))return}catch{m||a(void 0)}m||(g=setTimeout(()=>{p()},3e3))};return p(),()=>{m=!0,clearTimeout(g)}},[e.runId,e.state,t,n]),!e.runId.startsWith("batch-")||e.state!=="in_progress")return h.jsx(aR,{state:e.state});const s=r?.tasks?.find(m=>m.candidateId===e.candidateId),l=r?.activity?.[e.candidateId],d=s?.status==="reviewing"||s?.status==="verifying"?"Verification":"Authoring",u=s?.status==="accepted"?"Verified":s?.status==="rejected"?"Rejected":s?.status==="infrastructure_failed"?"Failed":r&&ai(r.phase)?"Stopped":l==="running"?`Running · ${d}`:l==="queued"?`Queued · ${d}`:"Checking Status…";return h.jsx("span",{role:"status",className:l==="running"?"text-sm text-brand":"text-sm text-muted-foreground",children:u})}function mB({org:e,fullName:t,task:n,onReview:r}){const[a,s]=U.useState(null),[l,d]=U.useState(""),[u,m]=U.useState(!1),[g,p]=U.useState(null),v=()=>{a&&(m(!0),n5(e,t,n.runId,n.taskId,{decision:a,note:l.trim()}).then(_=>{m(!1),s(null),d(""),r(_)},_=>{m(!1),p(_.message)}))},y=()=>{m(!0),r5(e,t,n.runId,n.taskId).then(_=>{m(!1),r(_)},_=>{m(!1),p(_.message)})};return n.review?h.jsxs("div",{className:"flex min-w-0 max-w-full flex-wrap items-center gap-3 border border-border bg-background px-3 py-2",children:[h.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5",children:[h.jsxs("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium tracking-wide uppercase ${n.review.decision==="approve"?"text-success":"text-destructive"}`,children:[n.review.decision==="approve"?h.jsx(Vl,{"aria-hidden":"true",className:"size-3.5",strokeWidth:2.5}):h.jsx(wD,{"aria-hidden":"true",className:"size-3.5",strokeWidth:2}),n.review.decision==="approve"?"Approved":"Rejected"]}),h.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.review.decidedBy," · ",cc(n.review.decidedAt)]}),n.review.note&&h.jsxs("span",{className:"max-w-[40ch] truncate text-sm text-foreground",title:n.review.note,children:["“",n.review.note,"”"]})]}),h.jsx(be,{type:"button",variant:"ghost",size:"small",disabled:u,onClick:y,children:"Clear Decision"}),g&&h.jsx("span",{className:"font-mono text-sm text-destructive",children:g})]}):h.jsxs("div",{className:"flex min-w-0 max-w-full flex-wrap items-center gap-2",children:[a?h.jsxs("form",{className:"flex flex-wrap items-center gap-2.5",onSubmit:_=>{_.preventDefault(),v()},children:[h.jsx(Nn,{className:"w-64 max-w-full",placeholder:a==="approve"?"Note (Optional)":"Why reject? (optional)",value:l,onChange:_=>d(_.target.value),"aria-label":"Review Note"}),h.jsx(be,{type:"submit",variant:a==="approve"?"primary":"destructive",disabled:u,children:u?"Saving…":a==="approve"?"Confirm Approve":"Confirm Reject"}),h.jsx(be,{type:"button",variant:"ghost",disabled:u,onClick:()=>s(null),children:"Cancel"})]}):h.jsxs(h.Fragment,{children:[h.jsx(be,{type:"button",variant:"destructive",onClick:()=>s("reject"),children:"Reject"}),h.jsx(be,{type:"button",variant:"primary",onClick:()=>s("approve"),children:"Approve"})]}),g&&h.jsx("span",{className:"font-mono text-sm text-destructive",children:g})]})}function pB(e){const t=async n=>{const r=await fetch(n,void 0);if(Fb(r),!r.ok){let a=`${r.status}`;try{const s=await r.json();s.error&&(a=`${r.status} ${s.error}`)}catch{}throw new Error(`${n.split("?")[0]} failed (${a})`)}return r};return{json:async n=>(await t(n)).json(),text:async n=>(await t(n)).text(),blob:async n=>(await t(n)).blob()}}function gB(e,t,n){const r=pB(),a=encodeURIComponent(n.runId),s=()=>r.json(i5(e,t,n.runId,n.taskId)),l=d=>r.json(`/v1/runs/${a}/bundle?key=${encodeURIComponent(d)}`);return{kind:"run",label:n.runId,rows:[YA(n)],artifacts:s,loadBundle:l,readArtifact:(d,u)=>r.text(`/v1/runs/${a}/artifacts?key=${encodeURIComponent(d)}${u?.start?`&start=${u.start}`:""}`),loadFiles:async d=>{const m=(await s()).bundles[0];return m?l(m.key):{taskId:d,files:[]}}}}function YA(e){return{id:e.taskId,name:e.taskId,candidateId:e.candidateId,difficulty:e.difficulty,status:e.pipelineStatus,stage:e.stage,...e.sourcePr?{sourcePr:e.sourcePr}:{},...e.sourceUrl?{sourceUrl:e.sourceUrl}:{},...e.reasonSummary?{reasonSummary:e.reasonSummary}:{}}}const Kl="flex min-w-0 flex-col gap-5 overflow-auto p-4 pb-12 sm:p-6 site:px-4! site:pt-3!",jn="px-4 py-3 text-sm leading-6 text-muted-foreground",Yd=jn,Vv="max-w-[96ch] px-4 py-3 text-sm leading-6 whitespace-pre-wrap wrap-anywhere text-foreground [&:is(pre)]:max-w-none",bB=ra.secondary,vB=Se(bB,"size-9 p-0"),Ed="cursor-pointer text-left text-sm text-foreground hover:text-brand hover:underline hover:underline-offset-4",Wo="w-full border-collapse text-sm [&_th]:w-36 [&_th]:text-xs [&_th]:font-medium [&_th]:tracking-wider [&_th]:text-muted-foreground [&_th]:uppercase [&_td]:text-foreground [&_th,&_td]:border-t [&_th,&_td]:border-border [&_th,&_td]:px-4 [&_th,&_td]:py-3 [&_th,&_td]:text-left [&_th,&_td]:align-top [&_tr:first-child>th,&_tr:first-child>td]:border-t-0 [&_thead+tbody>tr:first-child>td]:border-t",Yo="!w-auto bg-muted/50",ni="leading-6 whitespace-pre-wrap wrap-anywhere",KA="!text-sm !tracking-normal !text-muted-foreground !normal-case",XA="flex h-11 shrink-0 items-stretch gap-6 overflow-x-auto border-b border-border bg-card px-4 sm:px-6 site:px-4!",Cd="-mb-px inline-flex shrink-0 cursor-pointer items-center border-b-2 border-transparent px-0.5 text-sm text-muted-foreground transition-colors hover:text-foreground aria-selected:border-brand aria-selected:text-brand aria-pressed:border-brand aria-pressed:text-brand disabled:cursor-default disabled:text-muted-foreground focus-visible:outline-offset-[-4px]!";function yB({fullName:e,taskId:t}){return h.jsxs("div",{className:"grid h-full min-h-0 min-w-0 flex-none grid-cols-1 grid-rows-[auto_minmax(0,1fr)] overflow-hidden",role:"status","aria-label":"Loading Task",children:[h.jsxs("header",{className:`border-b border-border bg-card py-5 ${ls}`,children:[h.jsx(Wb,{items:[{label:"Repositories",to:"/"},{label:e,to:`/repos/${e}`},{label:"Task"}]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[h.jsx("h1",{className:"text-xl leading-7 font-medium wrap-anywhere",children:cv({taskId:t})}),h.jsx(et,{className:"h-5 w-20"})]})]}),h.jsxs("div",{className:"grid min-h-0 min-w-0 grid-cols-1 grid-rows-[140px_minmax(0,1fr)] md:grid-cols-[240px_minmax(0,1fr)] md:grid-rows-1","aria-hidden":"true",children:[h.jsxs("aside",{className:"overflow-hidden border-r border-b border-border md:border-b-0",children:[h.jsx("div",{className:"flex h-11 items-center border-b border-border px-4 text-xs tracking-wider text-muted-foreground uppercase",children:"Files"}),h.jsx("div",{className:"space-y-3 p-4",children:["first","second","third","fourth"].map(n=>h.jsx(et,{className:"h-3 w-3/4"},n))})]}),h.jsxs("section",{className:"grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)]",children:[h.jsxs("div",{className:XA,children:[h.jsx("span",{className:Cd,children:"File"}),h.jsx("span",{className:Cd,children:"Environment"}),h.jsx("span",{className:Cd,children:"Pipeline"})]}),h.jsx("div",{className:Kl,children:h.jsxs("div",{className:"space-y-4 border border-border bg-card p-4",children:[h.jsx(et,{className:"h-3 w-1/3"}),h.jsx(et,{className:"h-3 w-4/5"}),h.jsx(et,{className:"h-3 w-3/5"}),h.jsx(et,{className:"h-3 w-3/4"})]})})]})]})]})}function jl(e){if(e<1024)return`${e} B`;const t=["KB","MB","GB"];let n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n<10?n.toFixed(1):Math.round(n)} ${t[r]}`}function xB({files:e,current:t,onOpen:n}){const r=U.useMemo(()=>_B(e),[e]);return h.jsx("ul",{className:"list-none py-2 font-mono",children:r.children.map(a=>h.jsx(QA,{node:a,depth:0,current:t,onOpen:n},a.path))})}function QA({node:e,depth:t,current:n,onOpen:r}){const a={"--depth":t};if(e.file){const s=e.file.text===void 0;return h.jsx("li",{children:h.jsxs("button",{type:"button",className:`flex min-h-8 w-full min-w-0 cursor-pointer items-center justify-between gap-2 border-l-2 border-transparent py-1 pr-4 pl-[calc(14px+var(--depth)*14px)] text-left text-sm text-muted-foreground hover:bg-muted hover:text-foreground aria-current:border-brand aria-current:bg-brand/10 aria-current:text-brand [&_span:first-child]:min-w-0 [&_span:first-child]:truncate ${s?"opacity-50":""}`,style:a,"aria-current":n===e.path,onClick:()=>r(e.path),title:e.path,children:[h.jsx("span",{children:e.name}),h.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:jl(e.file.sizeBytes)})]})})}return h.jsxs("li",{children:[h.jsxs("div",{className:"mt-2 px-4 py-1 pl-[calc(16px+var(--depth)*14px)] text-xs tracking-wider text-muted-foreground uppercase",style:a,children:[e.name,"/"]}),h.jsx("ul",{children:e.children.map(s=>h.jsx(QA,{node:s,depth:t+1,current:n,onOpen:r},s.path))})]})}function _B(e){const t={name:"",path:"",children:[]};for(const r of[...e].sort((a,s)=>a.path.localeCompare(s.path))){const a=r.path.split("/");let s=t;a.forEach((l,d)=>{const u=a.slice(0,d+1).join("/");let m=s.children.find(g=>g.name===l&&!g.file);if(d===a.length-1){s.children.push({name:l,path:u,children:[],file:r});return}m||(m={name:l,path:u,children:[]},s.children.push(m)),s=m})}const n=r=>{r.children.sort((a,s)=>!!a.file!=!!s.file?a.file?1:-1:a.name.localeCompare(s.name));for(const a of r.children)n(a)};return n(t),t}const SB=/^(FROM|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)\b[ \t]*([\s\S]*)$/i;function wB(e){const t=[],n=e.split(/\r?\n/);let r=0;for(;r<n.length;){const a=r;let s=n[r]??"";for(;s.trimEnd().endsWith("\\")&&r+1<n.length;)r+=1,s=`${s.trimEnd().slice(0,-1)}
|
|
114
|
+
${n[r]??""}`;r+=1;const l=s.trim();if(!l||l.startsWith("#"))continue;const d=SB.exec(l);d?.[1]?t.push({instruction:d[1].toUpperCase(),args:d[2]??"",line:a+1}):t.push({instruction:"?",args:l,line:a+1})}return t}function EB(e){const t=[];for(const n of e){if(n.instruction!=="ENV")continue;const r=/^([A-Za-z_][A-Za-z0-9_]*)\s+(.*)$/.exec(n.args);if(r?.[1]&&!n.args.includes("=")){t.push([r[1],r[2]??""]);continue}const a=/([A-Za-z_][A-Za-z0-9_]*)=("(?:[^"\\]|\\.)*"|'[^']*'|\S*)/g;for(const s of n.args.matchAll(a)){const l=s[2]??"",d=/^".*"$/.test(l)?CB(l):l.replace(/^'|'$/g,"");t.push([s[1]??"",d])}}return t}function CB(e){try{return JSON.parse(e)}catch{return e.slice(1,-1)}}function kB(e){const t=[];let n={name:"",entries:[],repeated:!1};t.push(n);const r=e.split(/\r?\n/);for(let a=0;a<r.length;a+=1){const s=r[a]??"",l=i1(s).trim();if(!l)continue;const d=/^\[\[(.+)\]\]$/.exec(l),u=/^\[(.+)\]$/.exec(l);if(d?.[1]||u?.[1]){n={name:(d?.[1]??u?.[1]??"").trim(),entries:[],repeated:!!d},t.push(n);continue}const m=l.indexOf("=");if(m<0){n.entries.push([l,""]);continue}const g=TB(l.slice(0,m).trim());let p=l.slice(m+1).trim();for(;p.startsWith("[")&&!AB(p)&&a+1<r.length;)a+=1,p+=` ${i1(r[a]??"").trim()}`;n.entries.push([g,eT(p)])}return t.filter(a=>a.entries.length>0||a.name)}function JA(e){return Array.isArray(e)?e.map(JA).join(", "):String(e)}function eT(e){return e.startsWith("[")&&e.endsWith("]")?RB(e.slice(1,-1)).map(eT):/^"(?:[^"\\]|\\.)*"$/.test(e)?JSON.parse(e):/^'.*'$/.test(e)?e.slice(1,-1):e==="true"?!0:e==="false"?!1:/^[+-]?\d+(?:\.\d+)?(?:e[+-]?\d+)?$/i.test(e)?Number(e):e}function RB(e){const t=[];let n=0,r=!1,a="";for(let s=0;s<e.length;s+=1){const l=e[s]??"";if(r){a+=l,l==="\\"?(a+=e[s+1]??"",s+=1):l==='"'&&(r=!1);continue}l==='"'?(r=!0,a+=l):l==="["?(n+=1,a+=l):l==="]"?(n-=1,a+=l):l===","&&n===0?(a.trim()&&t.push(a.trim()),a=""):a+=l}return a.trim()&&t.push(a.trim()),t}function AB(e){let t=0,n=!1;for(let r=0;r<e.length;r+=1){const a=e[r];n?a==="\\"?r+=1:a==='"'&&(n=!1):a==='"'?n=!0:a==="["?t+=1:a==="]"&&(t-=1)}return t<=0&&!n}function i1(e){let t=!1;for(let n=0;n<e.length;n+=1){const r=e[n];if(r==="\\"&&t)n+=1;else if(r==='"')t=!t;else if(r==="#"&&!t)return e.slice(0,n)}return e}function TB(e){return/^"(.*)"$/.test(e)?e.slice(1,-1):e}const NB=["tests/docker-compose.yaml","environment/docker-compose.yaml"],jB=[["environment/root-setup.sh","Root Setup (Agent Image)"],["environment/setup.sh","Setup (Agent Image)"],["environment/smoke.sh","Smoke (Agent Image)"],["tests/root-setup.sh","Root Setup (Verifier Image)"],["tests/setup.sh","Setup (Verifier Image)"],["tests/smoke.sh","Smoke (Verifier Image)"],["tests/test.sh","Verifier test.sh"],["tests/task-test.sh","Verifier task-test.sh"],["solution/solve.sh","Oracle solve.sh"]];function LB(e){const t=new Map(e.files.map(y=>[y.path,y])),n=y=>t.get(y)?.text,r=OB(n("definition.json")),a=n("task.toml"),s=[];for(const y of e.files){const _=y.path.split("/").pop()??"";if(!/^Dockerfile(\..+)?$/.test(_)||y.text===void 0)continue;const S=y.path==="environment/Dockerfile"?"Agent Image":y.path==="tests/Dockerfile"?"Verifier Image":y.path;s.push({label:S,path:y.path,text:y.text,instructions:wB(y.text)})}const l=[];for(const[y,_]of jB){const S=n(y);S!==void 0&&l.push({label:_,path:y,text:S})}const d=n("instruction.md")??r?.prompt,u=n("solution/gold.patch")??n("gold.patch"),m=n("tests/test.patch")??n("test.patch"),g=n("tests/dependency-setup.patch"),p=NB.find(y=>n(y)!==void 0),v=p?n(p):void 0;return{taskId:e.taskId,files:e.files,byPath:t,...r?{definition:r}:{},toml:a?kB(a):[],...d!==void 0?{instruction:d}:{},...u!==void 0?{goldPatch:u}:{},...m!==void 0?{testPatch:m}:{},...g!==void 0?{dependencyPatch:g}:{},images:s,scripts:l,...v!==void 0&&p?{compose:v,composePath:p}:{}}}function OB(e){if(e)try{const t=JSON.parse(e);return typeof t=="object"&&t!==null?t:void 0}catch{return}}function DB(e){const t=e.split("/").pop()??e;return t.endsWith(".patch")||t.endsWith(".diff")?"patch":t.endsWith(".json")?"json":t.endsWith(".toml")?"toml":/^Dockerfile/.test(t)?"dockerfile":t.endsWith(".sh")?"shell":"text"}function IB(e){return[[/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,"[REDACTED PRIVATE KEY]"],[/Authorization\s*:\s*Bearer\s+[^\s,;]+/gi,"Authorization: Bearer [REDACTED]"],[/\b(?:AKIA|ASIA)[A-Z0-9]{16}\b/g,"AWS_ACCESS_KEY_ID=[REDACTED]"],[/AWS_SECRET_ACCESS_KEY\s*[:=]\s*[^\s,;]+/gi,"AWS_SECRET_ACCESS_KEY=[REDACTED]"],[/\bnpm_[A-Za-z0-9]{16,}\b/g,"npm_[REDACTED]"],[/\bglpat-[A-Za-z0-9_-]{16,}\b/g,"glpat-[REDACTED]"],[/\b(?:password|passwd|pwd)\s*[:=]\s*[^\s,;]+/gi,"password=[REDACTED]"],[/\b(?:database_url|db_url)\s*[:=]\s*[^\s]+/gi,"DATABASE_URL=[REDACTED]"],[/\b(?:postgres(?:ql)?|mysql|mariadb|mongodb(?:\+srv)?|redis):\/\/[^\s]+/gi,"[REDACTED DATABASE URL]"],[/\bdari_[A-Za-z0-9_-]{16,}/g,"dari_[REDACTED]"],[/\bsk-[A-Za-z0-9_-]{16,}/g,"sk-[REDACTED]"],[/\b(?:ghp|github_pat)_[A-Za-z0-9_-]{16,}/g,"github_[REDACTED]"],[/\b[A-Z][A-Z0-9_]*(?:API_KEY|ACCESS_TOKEN|AUTH_TOKEN|CLIENT_SECRET)\s*[:=]\s*[^\s,;]+/g,"SECRET=[REDACTED]"]].reduce((n,[r,a])=>n.replace(r,a),e)}function MB(e,t=[]){const n=[],r=t.flatMap(s=>{try{const l=[];return JSON.parse(s,(d,u)=>(typeof u=="string"&&l.push(u),u)),l}catch{return[s]}}),a=s=>{let l=s;for(const d of r)d.length>=8&&(l=l.split(d).join("[REDACTED]"));return IB(l).slice(0,8e3)};for(const s of e.split(`
|
|
115
|
+
`))try{const l=JSON.parse(s),d=l.message;if(!d||!["assistant","toolResult"].includes(d.role))continue;const u=Array.isArray(d.content)?d.content:[];for(const m of u)m.type==="text"&&typeof m.text=="string"?n.push({kind:d.role==="toolResult"?"result":"message",text:a(m.text),...typeof l.timestamp=="string"?{timestamp:l.timestamp}:{}}):d.role==="assistant"&&m.type==="toolCall"&&n.push({kind:"tool",text:a(`${m.name}
|
|
116
|
+
${JSON.stringify(m.arguments??{},null,2)}`),...typeof l.timestamp=="string"?{timestamp:l.timestamp}:{}})}catch{}return n.slice(-60)}function PB(e){const t=new Map;for(const n of["authoring","verification"]){const r=`runs/${e.runId}/${n}/${e.candidateId}/`;for(const a of e.groups[n]??[]){const s=a.key.slice(r.length),l=/^(?:round-(\d+)(?:\/attempt-(\d+))?\/|session\/round-(\d+)(?:-attempt-(\d+))?\.jsonl$)/.exec(s);if(!a.key.startsWith(r)||!l)continue;const d=Number(l[1]??l[3]),u=Number(l[2]??l[4]??1),m=`${n}-${d}-${u}`,g=t.get(m)??{id:m,stage:n,round:d,attempt:u,title:`${n==="authoring"?"Authoring":"Verification"} Part ${d}`};s.includes("/live/")&&(!g.live||a.key>g.live.key)&&(g.live=a),s.startsWith("session/")&&(g.session=a),s===`round-${d}/result.json`&&(g.result=a),t.set(m,g)}}return[...t.values()].sort((n,r)=>n.round-r.round||+(n.stage==="verification")-+(r.stage==="verification")||n.attempt-r.attempt)}function zB({source:e,row:t}){const[n,r]=U.useState(null),[a,s]=U.useState(null);U.useEffect(()=>{let d=!1,u;const m=async()=>{try{const g=await e.artifacts?.(t.id);!d&&g&&(r(g),s(null))}catch{d||s("Could not refresh agent activity")}d||(u=setTimeout(()=>{m()},5e3))};return m(),()=>{d=!0,clearTimeout(u)}},[e,t.id]);const l=n?PB(n):[];return h.jsxs("div",{className:Kl,children:[a&&h.jsx("p",{className:`${jn} site:p-0! !text-(--bad-fg) site:!text-danger`,role:"alert",children:a}),t.reason&&h.jsx("p",{className:`${jn} site:p-0! !text-(--bad-fg) site:!text-danger`,children:t.reason}),!n&&!a&&h.jsx("p",{className:`${Yd} site:p-0!`,children:"Loading agent activity…"}),n&&l.length===0&&h.jsx("p",{className:`${jn} site:p-0!`,children:"No agent activity yet."}),l.map(d=>h.jsx($B,{round:d,source:e,active:t.status==="in_progress"||t.status==="authoring"||t.status==="verifying"},d.id))]})}function $B({round:e,source:t,active:n}){const[r,a]=U.useState([]),[s,l]=U.useState(!1),[d,u]=U.useState(),m=e.live??e.session;U.useEffect(()=>{if(!m||!t.readArtifact)return;let p=!1;const v=m===e.session?Math.max(0,m.sizeBytes-262144):0;return t.readArtifact(m.key,v?{start:v}:void 0).then(y=>{if(!p){if(m===e.live){const _=JSON.parse(y);a(_.events),u(_.capturedAt)}else a(MB(y)),u(m.updatedAt);l(!1)}}).catch(()=>{p||l(!0)}),()=>{p=!0}},[m,t,e.live,e.session]);const g=!!(e.session||e.result);return h.jsxs("details",{className:"group/part border border-border [&+&]:mt-3",children:[h.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-4 px-4 py-3 font-mono text-sm font-medium text-foreground before:text-muted-foreground before:content-['▸'] group-open/part:before:content-['▾'] [&::-webkit-details-marker]:hidden site:text-sm site:leading-normal",children:[h.jsx("span",{children:e.title}),h.jsxs("span",{className:"font-mono text-xs text-muted-foreground site:text-sm site:leading-normal",children:[e.attempt>1?`Attempt ${e.attempt} · `:"",g?"Finished":n?"In Progress":"Stopped"]})]}),h.jsxs("div",{className:"border-t border-border",children:[d&&h.jsxs("p",{className:"m-0 px-4 py-2.5 font-mono text-xs leading-[normal] text-muted-foreground site:text-sm site:leading-normal",children:["Last Output · ",new Date(d).toLocaleTimeString()]}),s&&h.jsx("p",{className:`${jn} !text-(--bad-fg) site:!text-danger`,children:"Could not load agent output"}),!s&&r.length===0&&h.jsx("p",{className:jn,children:g?"No agent output available.":"Waiting for agent output…"}),h.jsx("div",{className:"max-h-[560px] overflow-auto",children:r.map((p,v)=>{const y=`${p.kind}:${p.timestamp??""}:${p.text.slice(0,32)}:${v}`;return p.kind==="message"?h.jsxs("div",{className:"border-t border-border px-4 py-3 first:border-t-0 [&_pre]:m-0 [&_pre]:font-mono [&_pre]:text-xs [&_pre]:leading-[1.6] [&_pre]:whitespace-pre-wrap [&_pre]:wrap-anywhere [&_pre]:text-foreground site:[&_pre]:text-base [&_time]:float-right [&_time]:font-mono [&_time]:text-xs [&_time]:text-muted-foreground site:[&_time]:text-sm site:[&_time]:leading-normal",children:[h.jsx("span",{className:"mb-2 block font-mono text-xs leading-[normal] text-brand site:text-sm site:leading-normal",children:"Agent Message"}),p.timestamp&&h.jsx("time",{dateTime:p.timestamp,children:a1(p.timestamp)}),h.jsx("pre",{children:p.text})]},y):h.jsxs("details",{className:"group/event border-t border-border px-4 py-3 first:border-t-0 [&_pre]:m-0 [&_pre]:font-mono [&_pre]:text-xs [&_pre]:leading-[1.6] [&_pre]:whitespace-pre-wrap [&_pre]:wrap-anywhere [&_pre]:text-foreground site:[&_pre]:text-sm site:[&_pre]:leading-6 [&_time]:float-right [&_time]:font-mono [&_time]:text-xs [&_time]:text-muted-foreground site:[&_time]:text-sm site:[&_time]:leading-normal",children:[h.jsxs("summary",{className:"cursor-pointer list-none font-mono text-xs leading-[normal] text-muted-foreground [&::-webkit-details-marker]:hidden [&>span:first-child]:mr-2.5 [&>span:first-child]:inline site:text-sm site:leading-normal",children:[h.jsx("span",{className:"mb-2 block font-mono text-xs leading-[normal] text-brand site:text-sm site:leading-normal",children:p.kind==="tool"?"Tool Call":"Tool Output"}),p.timestamp&&h.jsx("time",{dateTime:p.timestamp,children:a1(p.timestamp)}),h.jsx("span",{className:"font-mono text-xs leading-[normal] text-muted-foreground site:text-sm site:leading-normal",children:p.text.split(`
|
|
117
|
+
`)[0]||"(empty)"})]}),h.jsx("pre",{children:p.text})]},y)})})]})]})}function a1(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleTimeString()}function o1({text:e,highlight:t,placeholder:n,wrap:r=!1}){const a=U.useMemo(()=>e.replace(/\n$/,"").split(`
|
|
118
|
+
`),[e]);return h.jsx("pre",{className:"overflow-x-auto py-3 font-mono text-sm leading-6 [counter-reset:line]",children:a.map((s,l)=>h.jsx("span",{className:`block pr-4 text-foreground before:box-content before:mr-4 before:inline-block before:w-8 before:pl-3 before:text-right before:text-xs before:text-muted-foreground before:select-none before:content-[counter(line)] before:[counter-increment:line] hover:bg-muted ${r?"max-w-[110ch] pl-15 -indent-15 whitespace-pre-wrap wrap-anywhere before:indent-0":"whitespace-pre"} ${t?.(s)?"bg-brand/10":""}`,children:n?UB(s,n):s||" "},l))})}function UB(e,t){const n=e.split(t);return n.length===1?e||" ":n.flatMap((r,a)=>a===0?[r]:[h.jsx("span",{className:"font-semibold text-(--brand) site:text-brand",children:t},a),r])}function ri({title:e,detail:t,right:n,children:r,pad:a}){return h.jsxs("section",{className:"shrink-0 border border-(--border) bg-(--card)",children:[h.jsxs("div",{className:"flex min-h-11 flex-wrap items-center gap-x-3 gap-y-2 border-b border-border bg-muted/50 px-4 py-2 text-xs tracking-wider text-muted-foreground uppercase [&_b]:text-sm [&_b]:font-medium [&_b]:tracking-normal [&_b]:text-foreground [&_b]:normal-case [&_button]:h-8 [&_button]:text-xs",children:[h.jsx("span",{children:e}),t&&h.jsx("b",{children:t}),n&&h.jsx("span",{className:"ml-auto inline-flex items-center gap-3 text-xs font-normal tracking-normal text-muted-foreground normal-case",children:n})]}),h.jsx("div",{className:a?"px-4 py-3":"",children:r})]})}function HB({rows:e}){return e.length===0?h.jsx("p",{className:"px-4 py-3 text-(--muted-fg)",children:"nothing recorded"}):h.jsx("table",{className:Wo,children:h.jsx("tbody",{children:e.map(([t,n])=>h.jsxs("tr",{children:[h.jsx("th",{children:t}),h.jsx("td",{className:ni,children:n})]},t))})})}function BB({model:e,onOpenFile:t}){const n=e.definition?.environment,r=n?.environmentVariables?Object.entries(n.environmentVariables):EB(e.images[0]?.instructions??[]),a=e.definition?.resources,s=e.definition?.timeouts,l=e.toml.length===0&&e.images.length===0&&!n,d=e.composePath;return h.jsxs("div",{className:Kl,children:[l&&h.jsx("p",{className:`${jn} site:p-0!`,children:"This bundle has no compiled environment yet. Authoring bundles carry only the definition and patches; the environment stage produces task.toml and the Dockerfiles."}),(n||a||s)&&h.jsx(ri,{title:"Environment Contract",detail:n?.source??"",children:h.jsx(HB,{rows:[["Base Image",n?.baseImage??"—"],["Workdir",e.definition?.workdir??"."],["CPUs",a?String(a.cpus??""):"—"],["Memory",a?.memoryMb?`${a.memoryMb} MB`:"—"],["Storage",a?.storageMb?`${a.storageMb} MB`:"—"],["Timeouts",s?`setup ${s.setupSeconds??"?"}s · agent ${s.agentSeconds??"?"}s · tests ${s.testsSeconds??"?"}s`:"—"],["Services",n?.services?.length?`${n.services.length}`:"none"]]})}),e.toml.length>0&&h.jsx(ri,{title:"task.toml",right:h.jsx("button",{type:"button",className:Ed,onClick:()=>t("task.toml"),children:"Open Raw"}),children:h.jsx("table",{className:Wo,children:h.jsx("tbody",{children:s1(e.toml,u=>u.name).map(([u,m])=>h.jsx(VB,{name:m.name,entries:m.entries,repeated:m.repeated},u))})})}),r.length>0&&h.jsx(ri,{title:"Environment Variables",detail:`${r.length}`,children:h.jsx("table",{className:Wo,children:h.jsx("tbody",{children:r.map(([u,m])=>h.jsxs("tr",{children:[h.jsx("th",{className:KA,children:u}),h.jsx("td",{className:ni,children:m})]},u))})})}),n?.services&&n.services.length>0&&h.jsx(ri,{title:"Services",detail:`${n.services.length}`,children:h.jsxs("table",{className:Wo,children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{className:Yo,children:"Name"}),h.jsx("th",{className:Yo,children:"Image"}),h.jsx("th",{className:Yo,children:"Command"}),h.jsx("th",{className:Yo,children:"Healthcheck"}),h.jsx("th",{className:Yo,children:"Env"})]})}),h.jsx("tbody",{children:n.services.map(u=>h.jsxs("tr",{children:[h.jsx("td",{className:"whitespace-nowrap site:!font-mono",children:u.name}),h.jsx("td",{className:ni,children:u.image}),h.jsx("td",{className:ni,children:u.command?.join(" ")??""}),h.jsxs("td",{className:ni,children:[u.healthcheck?.test?.join(" "),u.healthcheck&&h.jsx("span",{className:"text-(--muted-fg) site:text-muted-foreground",children:` · every ${u.healthcheck.intervalSeconds}s · ${u.healthcheck.retries} retries`})]}),h.jsx("td",{className:ni,children:Object.entries(u.environmentVariables??{}).map(([m,g])=>`${m}=${g}`).join(`
|
|
119
|
+
`)})]},u.name??u.image))})]})}),e.images.map(u=>h.jsx(ri,{title:u.label,detail:`${u.instructions.length} instructions`,right:h.jsx("button",{type:"button",className:Ed,onClick:()=>t(u.path),children:u.path}),children:h.jsx("table",{className:Wo,children:h.jsx("tbody",{children:u.instructions.map(m=>h.jsxs("tr",{children:[h.jsx("th",{className:"!font-medium !text-(--brand) site:font-mono site:!text-brand",children:m.instruction}),h.jsx("td",{className:ni,children:m.args})]},`${m.line}`))})})},u.path)),n?.evidence&&n.evidence.length>0&&h.jsx(ri,{title:"Evidence the Environment Agent Cited",detail:`${n.evidence.length}`,children:h.jsx("table",{className:Wo,children:h.jsx("tbody",{children:s1(n.evidence,u=>u.path??"").map(([u,m])=>h.jsxs("tr",{children:[h.jsx("th",{className:"text-(--foreground) site:font-mono site:text-sm",children:m.path}),h.jsx("td",{className:ni,children:m.reason})]},u))})})}),e.compose&&d&&h.jsx(ri,{title:"docker-compose.yaml",detail:d,right:h.jsx("button",{type:"button",className:Ed,onClick:()=>t(d),children:"Open Raw"}),children:h.jsx("pre",{className:Vv,children:e.compose})})]})}function VB({name:e,entries:t,repeated:n}){return h.jsxs(h.Fragment,{children:[e&&h.jsx("tr",{children:h.jsx("th",{className:Yo,colSpan:2,children:n?`[[${e}]]`:`[${e}]`})}),t.map(([r,a])=>h.jsxs("tr",{children:[h.jsx("th",{className:KA,children:r}),h.jsx("td",{className:ni,children:JA(a)})]},`${e}.${r}`))]})}function s1(e,t){const n=new Map;return e.map(r=>{const a=t(r),s=(n.get(a)??0)+1;return n.set(a,s),[s===1?a:`${a}·${s}`,r]})}const tT="diffs-container";(()=>{try{return!1}catch{return!1}})();const FB=/(?=^From [a-f0-9]+ .+$)/m,nT=/(?=^diff --git)/gm,GB=/^(---|\+\+\+)\s+([^\t\r\n]+)/,qB=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,ZB=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,WB=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,rT="header-prefix",iT="header-metadata",Fv="header-custom",Yn={dark:"pierre-dark",light:"pierre-light"},YB="data-theme-css",KB="data-unsafe-css",XB="data-diffs-scrollbar-measure",aT="--diffs-scrollbar-gutter-measured",QB=1e5,JB={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},e7=Object.freeze({fromStart:0,fromEnd:0}),l1={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},t7={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function tb(e,t,n){if(e===t||e==null||t==null)return e===t;const r=new Set(n),a=Object.keys(e),s=new Set(Object.keys(t));for(const l of a)if(s.delete(l),!r.has(l)&&(!(l in t)||e[l]!==t[l]))return!1;for(const l of Array.from(s))if(!r.has(l))return!1;return!0}function Gv(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function oT(e,t){const n=e?.theme??Yn,r=t?.theme??Yn,a=c1(e),s=c1(t);return Gv(n,r)&&tb(e,t,["theme","parseDiffOptions"])&&tb(a,s)}function c1(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function u1(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Er(e){return{type:"text",value:e}}function Ne({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function Kd({name:e,width:t=16,height:n=16,properties:r}){return Ne({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...r},children:[Ne({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function n7(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function Ku(e){return Ne({tagName:"div",properties:{"data-gutter":""},children:e})}function r7(e,t,n,r={}){return Ne({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t!=null?[Ne({tagName:"span",properties:{"data-line-number-content":""},children:[Er(`${t}`)]})]:void 0})}function ir(e,t,n){return Ne({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function i7(){return Ne({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[Kd({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function a7(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}const o7=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class fc{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}fc.prototype.normal={};fc.prototype.property={};fc.prototype.space=void 0;function sT(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new fc(n,r,t)}function nb(e){return e.toLowerCase()}class bn{constructor(t,n){this.attribute=n,this.property=t}}bn.prototype.attribute="";bn.prototype.booleanish=!1;bn.prototype.boolean=!1;bn.prototype.commaOrSpaceSeparated=!1;bn.prototype.commaSeparated=!1;bn.prototype.defined=!1;bn.prototype.mustUseProperty=!1;bn.prototype.number=!1;bn.prototype.overloadedBoolean=!1;bn.prototype.property="";bn.prototype.spaceSeparated=!1;bn.prototype.space=void 0;let s7=0;const Ee=Xa(),wt=Xa(),rb=Xa(),ue=Xa(),Qe=Xa(),za=Xa(),An=Xa();function Xa(){return 2**++s7}const ib=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:wt,commaOrSpaceSeparated:An,commaSeparated:za,number:ue,overloadedBoolean:rb,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),Vp=Object.keys(ib);class qv extends bn{constructor(t,n,r,a){let s=-1;if(super(t,n),d1(this,"space",a),typeof r=="number")for(;++s<Vp.length;){const l=Vp[s];d1(this,Vp[s],(r&ib[l])===ib[l])}}}qv.prototype.defined=!0;function d1(e,t,n){n&&(e[t]=n)}function ws(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const s=new qv(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[nb(r)]=r,n[nb(s.attribute)]=r}return new fc(t,n,e.space)}const lT=ws({properties:{ariaActiveDescendant:null,ariaAtomic:wt,ariaAutoComplete:null,ariaBusy:wt,ariaChecked:wt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:wt,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:wt,ariaFlowTo:Qe,ariaGrabbed:wt,ariaHasPopup:null,ariaHidden:wt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:ue,ariaLive:null,ariaModal:wt,ariaMultiLine:wt,ariaMultiSelectable:wt,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:wt,ariaReadOnly:wt,ariaRelevant:null,ariaRequired:wt,ariaRoleDescription:Qe,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:wt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function cT(e,t){return t in e?e[t]:t}function uT(e,t){return cT(e,t.toLowerCase())}const l7=ws({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:za,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alpha:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Qe,autoFocus:Ee,autoPlay:Ee,blocking:Qe,capture:null,charSet:null,checked:Ee,cite:null,className:Qe,closedBy:null,colorSpace:null,cols:ue,colSpan:ue,command:null,commandFor:null,content:null,contentEditable:wt,controls:Ee,controlsList:Qe,coords:ue|za,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:rb,draggable:wt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Qe,height:ue,hidden:rb,high:ue,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Ee,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:ue,pattern:null,ping:Qe,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Qe,required:Ee,reversed:Ee,rows:ue,rowSpan:ue,sandbox:Qe,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootCustomElementRegistry:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shadowRootSerializable:Ee,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:wt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:wt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:wt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ee,disablePictureInPicture:Ee,disableRemotePlayback:Ee,exportParts:za,part:Qe,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:uT}),c7=ws({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:An,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:Qe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:za,g2:za,glyphName:za,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:An,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ue,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:An,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:An,rev:An,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:An,requiredFeatures:An,requiredFonts:An,requiredFormats:An,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:An,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:An,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:An,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:cT}),dT=ws({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),fT=ws({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:uT}),hT=ws({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),u7=/[A-Z]/g,f1=/-[a-z]/g,d7=/^data[-\w.:]+$/i;function f7(e,t){const n=nb(t);let r=t,a=bn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&d7.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(f1,m7);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!f1.test(s)){let l=s.replace(u7,h7);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=qv}return new a(r,t)}function h7(e){return"-"+e.toLowerCase()}function m7(e){return e.charAt(1).toUpperCase()}const p7=sT([lT,l7,dT,fT,hT],"html"),mT=sT([lT,c7,dT,fT,hT],"svg"),h1={}.hasOwnProperty;function g7(e,t){const n=t||{};function r(a,...s){let l=r.invalid;const d=r.handlers;if(a&&h1.call(a,e)){const u=String(a[e]);l=h1.call(d,u)?d[u]:r.unknown}if(l)return l.call(this,a,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const b7=/["&'<>`]/g,v7=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,y7=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,x7=/[|\\{}()[\]^$+*?.]/g,m1=new WeakMap;function _7(e,t){if(e=e.replace(t.subset?S7(t.subset):b7,r),t.subset||t.escapeOnly)return e;return e.replace(v7,n).replace(y7,r);function n(a,s,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function r(a,s,l){return t.format(a.charCodeAt(0),l.charCodeAt(s+1),t)}}function S7(e){let t=m1.get(e);return t||(t=w7(e),m1.set(e,t)),t}function w7(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(x7,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const E7=/[\dA-Fa-f]/;function C7(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!E7.test(String.fromCharCode(t))?r:r+";"}const k7=/\d/;function R7(e,t,n){const r="&#"+String(e);return n&&t&&!k7.test(String.fromCharCode(t))?r:r+";"}const A7=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Fp={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},T7=["cent","copy","divide","gt","lt","not","para","times"],pT={}.hasOwnProperty,ab={};let Xu;for(Xu in Fp)pT.call(Fp,Xu)&&(ab[Fp[Xu]]=Xu);const N7=/[^\dA-Za-z]/;function j7(e,t,n,r){const a=String.fromCharCode(e);if(pT.call(ab,a)){const s=ab[a],l="&"+s;return n&&A7.includes(s)&&!T7.includes(s)&&(!r||t&&t!==61&&N7.test(String.fromCharCode(t)))?l:l+";"}return""}function L7(e,t,n){let r=C7(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=j7(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const s=R7(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function is(e,t){return _7(e,Object.assign({format:L7},t))}const O7=/^>|^->|<!--|-->|--!>|<!-$/g,D7=[">"],I7=["<",">"];function M7(e,t,n,r){return r.settings.bogusComments?"<?"+is(e.value,Object.assign({},r.settings.characterReferences,{subset:D7}))+">":"<!--"+e.value.replace(O7,a)+"-->";function a(s){return is(s,Object.assign({},r.settings.characterReferences,{subset:I7}))}}function P7(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function p1(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function z7(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function $7(e){return e.join(" ").trim()}const U7=/[ \t\n\f\r]/g;function Zv(e){return typeof e=="object"?e.type==="text"?g1(e.value):!1:g1(e)}function g1(e){return e.replace(U7,"")===""}const Lt=bT(1),gT=bT(-1),H7=[];function bT(e){return t;function t(n,r,a){const s=n?n.children:H7;let l=(r||0)+e,d=s[l];if(!a)for(;d&&Zv(d);)l+=e,d=s[l];return d}}const B7={}.hasOwnProperty;function vT(e){return t;function t(n,r,a){return B7.call(e,n.tagName)&&e[n.tagName](n,r,a)}}const Wv=vT({body:F7,caption:Gp,colgroup:Gp,dd:W7,dt:Z7,head:Gp,html:V7,li:q7,optgroup:Y7,option:K7,p:G7,rp:b1,rt:b1,tbody:Q7,td:v1,tfoot:J7,th:v1,thead:X7,tr:eV});function Gp(e,t,n){const r=Lt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Zv(r.value.charAt(0)))}function V7(e,t,n){const r=Lt(n,t);return!r||r.type!=="comment"}function F7(e,t,n){const r=Lt(n,t);return!r||r.type!=="comment"}function G7(e,t,n){const r=Lt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function q7(e,t,n){const r=Lt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function Z7(e,t,n){const r=Lt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function W7(e,t,n){const r=Lt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function b1(e,t,n){const r=Lt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Y7(e,t,n){const r=Lt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function K7(e,t,n){const r=Lt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function X7(e,t,n){const r=Lt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Q7(e,t,n){const r=Lt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function J7(e,t,n){return!Lt(n,t)}function eV(e,t,n){const r=Lt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function v1(e,t,n){const r=Lt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const tV=vT({body:iV,colgroup:aV,head:rV,html:nV,tbody:oV});function nV(e){const t=Lt(e,-1);return!t||t.type!=="comment"}function rV(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function iV(e){const t=Lt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Zv(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function aV(e,t,n){const r=gT(n,t),a=Lt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Wv(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function oV(e,t,n){const r=gT(n,t),a=Lt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Wv(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const Qu={name:[[`
|
|
120
|
+
\f\r &/=>`.split(""),`
|
|
121
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
122
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
123
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
124
|
+
\f\r &>`.split(""),`\0
|
|
125
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
126
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
127
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function sV(e,t,n,r){const a=r.schema,s=a.space==="svg"?!1:r.settings.omitOptionalTags;let l=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const d=[];let u;a.space==="html"&&e.tagName==="svg"&&(r.schema=mT);const m=lV(r,e.properties),g=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,g&&(l=!1),(m||!s||!tV(e,t,n))&&(d.push("<",e.tagName,m?" "+m:""),l&&(a.space==="svg"||r.settings.closeSelfClosing)&&(u=m.charAt(m.length-1),(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&d.push(" "),d.push("/")),d.push(">")),d.push(g),!l&&(!s||!Wv(e,t,n))&&d.push("</"+e.tagName+">"),d.join("")}function lV(e,t){const n=[];let r=-1,a;if(t){for(a in t)if(t[a]!==null&&t[a]!==void 0){const s=cV(e,a,t[a]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function cV(e,t,n){const r=f7(e.schema,t),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let l=e.quote,d;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const u=is(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Qu.name[a][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?z7:$7)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(d=is(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Qu.unquoted[a][s]}))),d!==n&&(e.settings.quoteSmart&&p1(n,l)>p1(n,e.alternative)&&(l=e.alternative),d=l+is(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?Qu.single:Qu.double)[a][s],attribute:!0}))+l),u+(d&&"="+d))}const uV=["<","&"];function yT(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:is(e.value,Object.assign({},r.settings.characterReferences,{subset:uV}))}function dV(e,t,n,r){return r.settings.allowDangerousHtml?e.value:yT(e,t,n,r)}function fV(e,t,n,r){return r.all(e)}const hV=g7("type",{invalid:mV,unknown:pV,handlers:{comment:M7,doctype:P7,element:sV,raw:dV,root:fV,text:yT}});function mV(e){throw new Error("Expected node, not `"+e+"`")}function pV(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const gV={},bV={},vV=[];function as(e,t){const n=t||gV,r=n.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:yV,all:xV,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||o7,characterReferences:n.characterReferences||bV,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?mT:p7,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function yV(e,t,n){return hV(e,t,n,this)}function xV(e){const t=[],n=e&&e.children||vV;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}var _V=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||u1(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:a,onMergeConflictActionClick:s}=this.options;t==null&&n==null&&r==null&&s==null&&a==null||this.options.onGutterUtilityClick!=null&&ed(e.composedPath())||(Xr(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:r,onTokenEnter:a,onTokenLeave:s,enableGutterUtility:l=!1}=this.options;t==="disabled"&&!l&&n==null&&r==null&&a==null&&s==null||(Xr(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(Xr(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){Xr(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,r=t.composedPath();Xr(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:r});const a=this.resolvePointerTarget(r);Xr(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",a);const{onLineClick:s,onLineNumberClick:l,onLineEnter:d,onLineLeave:u,onTokenClick:m,onTokenEnter:g,onTokenLeave:p,onHunkExpand:v,onMergeConflictActionClick:y}=this.options;switch(e){case"move":{const _=qp(a)&&this.hoveredLine?.lineElement===a.lineElement;kd(a)&&this.hoveredToken?.tokenElement===a.tokenElement||(this.hoveredToken!=null&&(p?.(this.hoveredToken,t),this.clearHoveredToken()),kd(a)&&(this.setHoveredToken(this.toTokenEventBaseProps(a)),g?.(this.hoveredToken,t))),_||(this.hoveredLine!=null&&(u?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),qp(a)?(this.setHoveredLine(this.toEventBaseProps(a)),this.placeUtility(),d?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(a==null)break;if(EV(a)&&y!=null){y(a);break}if(wV(a)&&v!=null){v(a.hunkIndex,a.all||t.shiftKey?"both":a.direction,a.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!qp(a))break;kd(a)&&m!=null&&m(this.toTokenEventBaseProps(a),t);const _=this.toEventBaseProps(a);l!=null&&a.numberColumn?l({..._,event:t}):s?.({..._,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:r,onLineNumberClick:a,onLineEnter:s,onLineLeave:l,onTokenClick:d,onTokenEnter:u,onTokenLeave:m,onHunkExpand:g,onMergeConflictActionClick:p,enableGutterUtility:v=!1,enableLineSelection:y=!1,onGutterUtilityClick:_}=this.options,S=_!=null,E=n!=="disabled"||r!=null||a!=null||s!=null||l!=null||d!=null||u!=null||m!=null||g!=null||p!=null||v||y||S;E&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,Xr(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const A=[];return(t==="both"||t==="click")&&(r!=null&&A.push("onLineClick"),a!=null&&A.push("onLineNumberClick"),g!=null&&A.push("expandable hunk separators"),p!=null&&A.push("merge conflict actions")),A})()),Xr(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),Xr(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!E&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const k=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",C=this.pointerSession.mode==="gutterSelecting";(!y&&k||!S&&C)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,a=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),a&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!a&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();ed(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:r}=this;if(r==null)return;const{lineNumber:a,eventSide:s,lineIndex:l}=n;if(e.shiftKey&&this.selectedRange!=null){const d=this.getIndexesFromSelection(this.selectedRange,r.getAttribute("data-diff-type")==="split");if(d==null)return;const u=d.start<=d.end?l>=d.start:l<=d.end;this.selectionAnchor={lineNumber:u?this.selectedRange.start:this.selectedRange.end,side:u?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(a,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===a&&this.selectedRange?.end===a){const d={lineNumber:a,side:s};this.selectionAnchor=d,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:d,pending:d},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:a,side:s},this.updateSelection(a,s,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const r=this.currentSelectionEnds(),a=r?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),s=r?.top??a;a==null||s==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:s,current:a},t&&(this.selectionAnchor={lineNumber:s.lineNumber,side:s.side},this.updateSelection(a.lineNumber,a.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const r={lineNumber:n.lineNumber,side:n.eventSide};if(a7(this.pointerSession.pending,r))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const r=this.resolveSelectionPoint(e,{source:"coordinates-first"});r!=null&&(this.pointerSession.current=r,t&&this.updateSelection(r.lineNumber,r.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=as(i7());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Ll(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),a=this.selectionPointRowIndex(n);if(!(r==null||a==null))return r>a?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const a of r){if(!(a instanceof HTMLElement))continue;const s=this.resolvePointerTarget(Ju(a));if(Ll(s)&&!(this.mode==="diff"&&e.side!=null&&s.side!==e.side))return s}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Ll(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Ll(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const r=this.pathFromCoordinates(e,n);return r!==void 0?r??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&ed(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Ju(e);if(t&&ed(n))return;const r=kV(e);return r!=null?Ju(r):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=AV(RV(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Ju(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=_1(t)?t:_1(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const r=this.getCurrentSelectionRange();let a;if(e==null)a=null;else{const s=this.selectionAnchor?.side??t,l=this.selectionAnchor?.lineNumber??e;a=this.buildSelectionRange(l,e,s,t)}u1(r??void 0,a??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=a:(this.selectedRange=a,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const d of e)d.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",r=this.getIndexesFromSelection(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const a=r.start===r.end,s=Math.min(r.start,r.end),l=Math.max(r.start,r.end);for(const d of t){const[u,m]=d.children,g=m.children.length;if(g!==u.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let p=0;p<g;p++){const v=m.children[p],y=u.children[p];if(!(v instanceof HTMLElement)||!(y instanceof HTMLElement))continue;const _=this.parseLineIndex(v,n);if((_??0)>l)break;if(_==null||_<s)continue;let S=a?"single":_===s?"first":_===l?"last":"";v.setAttribute("data-selected-line",S),y.setAttribute("data-selected-line",S),y.nextSibling instanceof HTMLElement&&v.nextSibling instanceof HTMLElement&&(v.nextSibling.hasAttribute("data-line-annotation")||v.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(a?(S="last",v.setAttribute("data-selected-line","first")):_===s?S="":_===l&&v.setAttribute("data-selected-line",""),v.nextSibling.setAttribute("data-selected-line",S),y.nextSibling.setAttribute("data-selected-line",S))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:a,tokenText:s}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:a,tokenText:s}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:a,tokenText:s}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n!=null?{side:n}:{},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,a,s,l,d,u,m,g,p;for(const y of e){if(!(y instanceof HTMLElement))continue;if(p==null&&y.hasAttribute("data-merge-conflict-action")){const k=y.getAttribute("data-merge-conflict-action")??void 0,C=y.getAttribute("data-merge-conflict-conflict-index")??void 0,A=C!=null?Number.parseInt(C,10):NaN;CV(k)&&Number.isFinite(A)&&(p={kind:"merge-conflict-action",resolution:k,conflictIndex:A})}if(d==null&&y.hasAttribute("data-char")){d=y;const k=y.getAttribute("data-char");if(k!=null){const C=Number.parseInt(k,10);if(!Number.isNaN(C)){const A=y.textContent??"",O=C+A.length;(A.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(u={tokenElement:d,lineCharStart:C,lineCharEnd:O,tokenText:A});continue}}}const _=l==null?y.getAttribute("data-column-number")??void 0:void 0;if(_!=null){l=y,g=Number.parseInt(_,10),t=!0,n=w1(y),s=y.getAttribute("data-line-index")??void 0;continue}const S=a==null?y.getAttribute("data-line")??void 0:void 0;if(S!=null){a=y,g=Number.parseInt(S,10),n=w1(y),s=y.getAttribute("data-line-index")??void 0;continue}if(m==null&&(y.hasAttribute("data-expand-button")||y.hasAttribute("data-unmodified-lines"))){m={hunkIndex:void 0,direction:y.hasAttribute("data-expand-up")?"up":y.hasAttribute("data-expand-down")?"down":"both",all:y.hasAttribute("data-expand-all-button")};continue}const E=m!=null?y.getAttribute("data-expand-index")??void 0:void 0;if(m!=null&&E!=null){const k=Number.parseInt(E,10);Number.isNaN(k)||(m.hunkIndex=k);continue}if(r==null&&y.hasAttribute("data-code")){r=y;break}}if(p!=null)return p;if(m?.hunkIndex!=null)return{type:"line-info",hunkIndex:m.hunkIndex,direction:m.direction,all:m.all};if(a??=s!=null?x1(r,`[data-line][data-line-index="${s}"]`):void 0,l??=s!=null?x1(r,`[data-column-number][data-line-index="${s}"]`):void 0,r==null||a==null||l==null||n==null||g==null||Number.isNaN(g))return;const v=this.parseLineIndex(a,this.isSplitDiff());return u!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:a,lineNumber:g,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:v,...u}:{kind:"token",lineType:n,lineElement:a,lineNumber:g,numberColumn:t,numberElement:l,side:S1(n,r),splitLineIndex:v,...u}:this.mode==="file"?{kind:"line",lineType:n,lineElement:a,lineNumber:g,numberColumn:t,numberElement:l,side:void 0,splitLineIndex:v}:{kind:"line",lineType:n,lineElement:a,lineNumber:g,numberColumn:t,numberElement:l,side:S1(n,r),splitLineIndex:v}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(r=>Number.parseInt(r,10)).filter(r=>!Number.isNaN(r));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function y1({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:a,onLineEnter:s,onLineLeave:l,onLineNumberClick:d,onTokenClick:u,onTokenEnter:m,onTokenLeave:g,renderGutterUtility:p,__debugPointerEvents:v,enableLineSelection:y,controlledSelection:_,onLineSelected:S,onLineSelectionStart:E,onLineSelectionChange:k,onLineSelectionEnd:C},A,O,L){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:SV({enableGutterUtility:t,renderGutterUtility:p,onGutterUtilityClick:r}),usesCustomGutterUtility:p!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:A,onMergeConflictActionClick:L,onLineClick:a,onLineEnter:s,onLineLeave:l,onLineNumberClick:d,onTokenClick:u,onTokenEnter:m,onTokenLeave:g,__debugPointerEvents:v,enableLineSelection:y,controlledSelection:_,onLineSelected:S,onLineSelectionStart:E,onLineSelectionChange:k,onLineSelectionEnd:C,getLineIndex:O}}function SV({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Ll(e){return e!=null&&"kind"in e&&e.kind==="line"}function kd(e){return e!=null&&"kind"in e&&e.kind==="token"}function qp(e){return Ll(e)||kd(e)}function wV(e){return"type"in e&&e.type==="line-info"}function EV(e){return"kind"in e&&e.kind==="merge-conflict-action"}function CV(e){return e==="current"||e==="incoming"||e==="both"}function x1(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ju(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function kV(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute("data-line")||r.hasAttribute("data-column-number"))?r:void 0}function RV(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function AV(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function _1(e){return e!=null&&typeof e.elementFromPoint=="function"}function S1(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function w1(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function ed(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function Xr(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var TV=class ei{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ei.resizeObserver??new ResizeObserver(ei.handleSharedResizeEntries);return ei.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const r of t){const a=ei.managersByElement.get(r.target);if(a==null)continue;const s=n.get(a);s==null?n.set(a,[r]):s.push(r)}for(const[r,a]of n)r.handleResizeEntries(a)}observedNodes=new Map;setup(t,n){const r=new Set;let a=0;const s=new Map(this.observedNodes);this.observedNodes.clear();for(const l of t.children){if(a===2)break;const d=(()=>{if(l instanceof HTMLElement&&l.tagName==="CODE")return l})();if(d==null)continue;a++;let u=s.get(d);if(u!=null&&u.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let m=d.firstElementChild;m instanceof HTMLElement||(m=null),u!=null?(this.observedNodes.set(d,u),s.delete(d),u.numberElement!==m?(u.numberElement!=null&&(this.unobserve(u.numberElement),s.delete(u.numberElement)),m!=null&&(this.observe(m),s.delete(m),this.observedNodes.set(m,u)),u.numberElement=m,u.numberWidth=0):u.numberElement!=null?(s.delete(u.numberElement),this.observedNodes.set(u.numberElement,u)):u.numberWidth=0):(u={type:"code",codeElement:d,numberElement:m,codeWidth:"auto",numberWidth:0},this.observedNodes.set(d,u),this.observe(d),m!=null&&(this.observedNodes.set(m,u),this.observe(m)))}if(a>1&&!n){const l=t.querySelectorAll('[data-line-annotation*=","]'),d=new Map;for(const u of l){if(!(u instanceof HTMLElement))continue;const m=u.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(m)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:m,element:u});continue}let g=d.get(m);g==null&&(g=[],d.set(m,g)),g.push(u)}for(const[u,m]of d){if(m.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",u,m);continue}const[g,p]=m,v=g.firstElementChild,y=p.firstElementChild;if(!(g instanceof HTMLElement)||!(p instanceof HTMLElement)||!(v instanceof HTMLElement)||!(y instanceof HTMLElement))continue;let _=s.get(v);if(_!=null){this.observedNodes.set(v,_),this.observedNodes.set(y,_),s.delete(v),s.delete(y);continue}const S=v.getBoundingClientRect().height,E=y.getBoundingClientRect().height;_={type:"annotations",column1:{container:g,child:v,childHeight:S},column2:{container:p,child:y,childHeight:E},currentHeight:"auto"},r.add({child1:v,child2:y,item:_,newHeight:Math.max(S,E)})}for(const u of r)this.applyNewHeight(u.item,u.newHeight),this.observedNodes.set(u.child1,u.item),this.observedNodes.set(u.child2,u.item),this.observe(u.child1),this.observe(u.child2);r.clear()}for(const[l,d]of s)this.unobserve(l),d.type==="code"?LV(d):OV(d);s.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ei,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ei.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:r}=ei,a=n.get(t);if(a!=null){if(a!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),ei.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,r=new Set;for(const a of t){const{target:s,borderBoxSize:l,contentBoxSize:d}=a;if(!(s instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",a);continue}const u=this.observedNodes.get(s);if(u==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",a);continue}if(u.type==="annotations"){const m=(()=>{if(s===u.column1.child)return u.column1;if(s===u.column2.child)return u.column2})();if(m==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:u,target:s});continue}m.childHeight=l[0].blockSize,r.add(u)}else if(u.type==="code"){const m=n.get(u)??{},g=d[0].inlineSize;s===u.codeElement?m.codeInlineSize=g:s===u.numberElement&&(m.numberInlineSize=g),n.set(u,m)}}this.applyAnnotationUpdates(r),r.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,r]of t){const a=r.codeInlineSize!=null?NV(r.codeInlineSize):n.codeWidth,s=r.numberInlineSize!=null?jV(r.numberInlineSize):n.numberWidth,l=a!==n.codeWidth,d=s!==n.numberWidth;if(!(!l&&!d)&&(n.codeWidth=a,n.numberWidth=s,l&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof a=="number"?`${a}px`:"auto"}`),d&&n.codeElement.style.setProperty("--diffs-column-number-width",`${s===0?"auto":`${s}px`}`),l||d&&a!=="auto")){const u=typeof a=="number"?Math.max(a-s,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${u>0?`${u}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function NV(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function jV(e){return Math.max(Math.ceil(e),0)}function LV(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function OV(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Xl=new Map,Zp=new Map,DV=new Map,ob=new Set;function E1(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!ob.has(t))return!1;return!0}function C1(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(ob.has(n.name))continue;let r=Xl.get(n.name);r==null&&(r=n,Xl.set(n.name,r)),ob.add(r.name),t.loadLanguageSync(r.data)}}function xT(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}var sb=Object.defineProperty,IV=Object.getOwnPropertyDescriptor,MV=Object.getOwnPropertyNames,PV=Object.prototype.hasOwnProperty,zV=(e,t)=>{let n={};for(var r in e)sb(n,r,{get:e[r],enumerable:!0});return sb(n,Symbol.toStringTag,{value:"Module"}),n},$V=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=MV(t),s=0,l=a.length,d;s<l;s++)d=a[s],!PV.call(e,d)&&d!==n&&sb(e,d,{get:(u=>t[u]).bind(null,d),enumerable:!(r=IV(t,d))||r.enumerable});return e},UV=(e,t,n)=>($V(e,t,"default"),n);const HV="modulepreload",BV=function(e){return"/"+e},k1={},N=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let m=function(g){return Promise.all(g.map(p=>Promise.resolve(p).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};var l=m;document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),u=d?.nonce||d?.getAttribute("nonce");a=m(n.map(g=>{if(g=BV(g),g in k1)return;k1[g]=!0;const p=g.endsWith(".css"),v=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${v}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":HV,p||(y.as="script"),y.crossOrigin="",y.href=g,u&&y.setAttribute("nonce",u),document.head.appendChild(y),p)return new Promise((_,S)=>{y.addEventListener("load",_),y.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${g}`)))})}))}function s(d){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=d,window.dispatchEvent(u),!u.defaultPrevented)throw d}return a.then(d=>{for(const u of d||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})},_T=[{id:"abap",name:"ABAP",import:(()=>N(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",aliases:["actionscript","as3"],import:(()=>N(()=>import("./actionscript-3-B3316cI-.js"),[]))},{id:"ada",name:"Ada",import:(()=>N(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"ahk",name:"AutoHotkey",aliases:["ahk1"],import:(()=>N(()=>import("./ahk-CsyLZFj1.js"),[]))},{id:"ahk2",name:"AutoHotkey2",import:(()=>N(()=>import("./ahk2-8Zs4aa1G.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>N(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>N(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>N(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>N(()=>import("./apex-DhZFqWV2.js"),[]))},{id:"apl",name:"APL",import:(()=>N(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>N(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>N(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>N(()=>import("./asciidoc-CSVQ5wI8.js"),[]))},{id:"asm",name:"Assembly",import:(()=>N(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>N(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>N(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>N(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch","cmd"],import:(()=>N(()=>import("./bat-CickPsom.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>N(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>N(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>N(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>N(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>N(()=>import("./bird2-Bx8U0n9b.js"),[]))},{id:"blade",name:"Blade",import:(()=>N(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>N(()=>import("./bsl-DlhNcFeZ.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>N(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>N(()=>import("./c3-Dp5svz6Z.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>N(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>N(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"chapel",name:"Chapel",aliases:["chpl"],import:(()=>N(()=>import("./chapel-DTp_pixX.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>N(()=>import("./clarity-Dn5IMItf.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>N(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>N(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>N(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([23,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>N(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>N(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>N(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>N(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Rocq",import:(()=>N(()=>import("./coq-C7JzOVbR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>N(()=>import("./cpp-BMRokrvK.js"),__vite__mapDeps([25,26,27,22])))},{id:"crystal",name:"Crystal",import:(()=>N(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([28,1,2,3,16,22,29])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>N(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>N(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>N(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>N(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>N(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>N(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>N(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>N(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>N(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>N(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>N(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>N(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>N(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>N(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([30,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>N(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([31,1,2,3])))},{id:"elm",name:"Elm",import:(()=>N(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([32,27,22])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>N(()=>import("./emacs-lisp-C_m_b--Z.js"),[]))},{id:"erb",name:"ERB",import:(()=>N(()=>import("./erb-DXfck5VN.js"),__vite__mapDeps([33,1,2,3,34,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>N(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([40,41])))},{id:"fennel",name:"Fennel",import:(()=>N(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>N(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>N(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>N(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([42,43])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>N(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>N(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([44,41])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>N(()=>import("./gdresource-TyuKm33G.js"),__vite__mapDeps([45,46,47])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>N(()=>import("./gdscript-DqcFQ5yU.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>N(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>N(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>N(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>N(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([48,49])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>N(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([50,29])))},{id:"gleam",name:"Gleam",import:(()=>N(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>N(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([51,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>N(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([52,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>N(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,22])))},{id:"gn",name:"GN",import:(()=>N(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>N(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>N(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>N(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([36,2,11,37,13])))},{id:"groovy",name:"Groovy",import:(()=>N(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>N(()=>import("./hack-BWmVpMyf.js"),__vite__mapDeps([53,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>N(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([35,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>N(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([54,1,2,3,39])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>N(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>N(()=>import("./haxe-CfZj7gIn.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>N(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>N(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>N(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>N(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>N(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>N(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([55,29,9,7,8,36,2,11,37,13])))},{id:"hurl",name:"Hurl",import:(()=>N(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([56,36,2,11,37,13,7,8,57])))},{id:"hxml",name:"HXML",import:(()=>N(()=>import("./hxml-2-FPmUDs.js"),__vite__mapDeps([58,59])))},{id:"hy",name:"Hy",import:(()=>N(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>N(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>N(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>N(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>N(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>N(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([60,1,2,3])))},{id:"jison",name:"Jison",import:(()=>N(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([61,2])))},{id:"json",name:"JSON",import:(()=>N(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>N(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>N(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>N(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>N(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>N(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>N(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>N(()=>import("./julia-5Bft2YPA.js"),__vite__mapDeps([62,25,26,27,22,20,2,63,16])))},{id:"just",name:"Just",aliases:["justfile"],import:(()=>N(()=>import("./just-Cwhn7H3k.js"),__vite__mapDeps([64,29,2,11,65,1,3,7,8,16,20,34,35,36,37,13,25,26,27,22,38,39])))},{id:"kdl",name:"KDL",import:(()=>N(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>N(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>N(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>N(()=>import("./latex-D5pSuvFb.js"),__vite__mapDeps([66,67,63])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>N(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>N(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>N(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([68,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>N(()=>import("./llvm-BZoOZj88.js"),[]))},{id:"log",name:"Log file",import:(()=>N(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>N(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>N(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([38,22])))},{id:"luau",name:"Luau",import:(()=>N(()=>import("./luau-BnpPk5vE.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>N(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>N(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>N(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([69,3,70,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>N(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>N(()=>import("./mdc-D1_yUvq7.js"),__vite__mapDeps([71,41,39,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>N(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>N(()=>import("./mermaid-CQcHuHx7.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>N(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>N(()=>import("./mojo-DJz3ZmWd.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>N(()=>import("./moonbit-CHtswR0a.js"),[]))},{id:"move",name:"Move",import:(()=>N(()=>import("./move-el3G9tDJ.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>N(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>N(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([72,73])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>N(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>N(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([74,38,22])))},{id:"nim",name:"Nim",import:(()=>N(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([75,22,1,2,3,7,8,27,41])))},{id:"nix",name:"Nix",import:(()=>N(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nsis",name:"NSIS",import:(()=>N(()=>import("./nsis-BlV79W_Q.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>N(()=>import("./nushell-D3jzshHO.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>N(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>N(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>N(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>N(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>N(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"org",name:"Org Markup",import:(()=>N(()=>import("./org-DM6o9KBp.js"),__vite__mapDeps([76,2,11,13,8,20,26,3,38,22,77,78,65,1,7,16,63,34,35,36,37,25,27,29,39,79,9,80,81,24,82,49,83,84,85,70,5,86,87,88,89,90,75,41,31,40,91,92,93,48,50,66,67])))},{id:"pascal",name:"Pascal",import:(()=>N(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>N(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([65,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>N(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([79,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>N(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>N(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>N(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>N(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>N(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>N(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1","pwsh"],import:(()=>N(()=>import("./powershell-BmBUJMz7.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>N(()=>import("./prisma-Vru482bI.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>N(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>N(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>N(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([94,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>N(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>N(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>N(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>N(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([95,2])))},{id:"qmldir",name:"QML Directory",import:(()=>N(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>N(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>N(()=>import("./r-Cf5RLm7j.js"),[]))},{id:"racket",name:"Racket",import:(()=>N(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>N(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>N(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([96,1,2,3,89])))},{id:"rbs",name:"RBS",aliases:["ruby-signature"],import:(()=>N(()=>import("./rbs-CpoqiR4B.js"),[]))},{id:"reg",name:"Windows Registry Script",import:(()=>N(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>N(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>N(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>N(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>N(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>N(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>N(()=>import("./rst-bs7f0vWN.js"),__vite__mapDeps([97,15,1,2,3,25,26,27,22,20,29,39,98,34,35,7,8,16,36,11,37,13,38])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>N(()=>import("./ruby-C0TQ7zu5.js"),__vite__mapDeps([34,1,2,3,35,7,8,16,36,11,37,13,25,26,27,22,29,38,39])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>N(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>N(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([99,16])))},{id:"sass",name:"Sass",import:(()=>N(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>N(()=>import("./scala-CqE71os6.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>N(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>N(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>N(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>N(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([100,101])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>N(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>N(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([102,29])))},{id:"smalltalk",name:"GNU Smalltalk",import:(()=>N(()=>import("./smalltalk-BOQMe2GC.js"),[]))},{id:"smithy",name:"Smithy",import:(()=>N(()=>import("./smithy-cds9vsN8.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>N(()=>import("./solidity-DijEV5ha.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>N(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([103,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>N(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([104,105])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>N(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>N(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>N(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>N(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([106,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>N(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>N(()=>import("./surrealql-Cjom0U5J.js"),__vite__mapDeps([107,2])))},{id:"svelte",name:"Svelte",import:(()=>N(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([108,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>N(()=>import("./swift-C2oV4EkX.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>N(()=>import("./system-verilog-0hqHdDBg.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>N(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>N(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>N(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>N(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>N(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([109,84,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>N(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>N(()=>import("./tex-D96PA37w.js"),__vite__mapDeps([67,63])))},{id:"toml",name:"TOML",import:(()=>N(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>N(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([110,11,3,2,27,22,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>N(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>N(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>N(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>N(()=>import("./twig-27uCiNez.js"),__vite__mapDeps([111,3,2,5,79,1,7,8,16,9,20,34,35,36,11,37,13,25,26,27,22,29,38,39])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>N(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>N(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>N(()=>import("./typst-BUadGCkm.js"),__vite__mapDeps([112,113,114,22,81,24,2,25,26,27,3,89,90,49,83,31,1,40,41,44,48,50,29,84,85,54,39,77,8,115,9,62,20,63,16,66,67,70,116,38,78,82,65,7,86,79,117,94,34,35,36,11,37,13,5,118,93,87,88,111,119,120,80])))},{id:"v",name:"V",import:(()=>N(()=>import("./v-BGw2Nkan.js"),[]))},{id:"vala",name:"Vala",import:(()=>N(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",import:(()=>N(()=>import("./vb-Cu-pLBUe.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>N(()=>import("./verilog-nZwndyjY.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>N(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>N(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>N(()=>import("./vue-BqiEGhQt.js"),__vite__mapDeps([121,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>N(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([122,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>N(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([123,3,5,70,124,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>N(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>N(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>N(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>N(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>N(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>N(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>N(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>N(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>N(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([93,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>N(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>N(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>N(()=>import("./zig-VOosw3JB.js"),[]))}],VV=Object.fromEntries(_T.map(e=>[e.id,e.import])),FV=Object.fromEntries(_T.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),lb={...VV,...FV},GV=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>N(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>N(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>N(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>N(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>N(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>N(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>N(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>N(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>N(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>N(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>N(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>N(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>N(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>N(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>N(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>N(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>N(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>N(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>N(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>N(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>N(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>N(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>N(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>N(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>N(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>N(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>N(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>N(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>N(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>N(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>N(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>N(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>N(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>N(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>N(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>N(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>N(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>N(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>N(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>N(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>N(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>N(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>N(()=>import("./monokai-BRVnQi9A.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>N(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>N(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>N(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>N(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>N(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>N(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>N(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>N(()=>import("./red-hvxz__6c.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>N(()=>import("./rose-pine-5qJOZa0Y.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>N(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>N(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>N(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>N(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>N(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>N(()=>import("./solarized-dark-CpvCGNkr.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>N(()=>import("./solarized-light-Dlz6yCKv.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>N(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>N(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>N(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>N(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>N(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>N(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],qV=Object.fromEntries(GV.map(e=>[e.id,e.import]));var Yv=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function ZV(){return 2147483648}function WV(){return typeof performance<"u"?performance.now():Date.now()}const YV=(e,t)=>e+(t-e%t)%t;async function KV(e){let t,n;const r={};function a(y){n=y,r.HEAPU8=new Uint8Array(y),r.HEAPU32=new Uint32Array(y)}function s(y,_,S){r.HEAPU8.copyWithin(y,_,_+S)}function l(y){try{return t.grow(y-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function d(y){const _=r.HEAPU8.length;y=y>>>0;const S=ZV();if(y>S)return!1;for(let E=1;E<=4;E*=2){let k=_*(1+.2/E);k=Math.min(k,y+100663296);const C=Math.min(S,YV(Math.max(y,k),65536));if(l(C))return!0}return!1}const u=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function m(y,_,S=1024){const E=_+S;let k=_;for(;y[k]&&!(k>=E);)++k;if(k-_>16&&y.buffer&&u)return u.decode(y.subarray(_,k));let C="";for(;_<k;){let A=y[_++];if(!(A&128)){C+=String.fromCharCode(A);continue}const O=y[_++]&63;if((A&224)===192){C+=String.fromCharCode((A&31)<<6|O);continue}const L=y[_++]&63;if((A&240)===224?A=(A&15)<<12|O<<6|L:A=(A&7)<<18|O<<12|L<<6|y[_++]&63,A<65536)C+=String.fromCharCode(A);else{const T=A-65536;C+=String.fromCharCode(55296|T>>10,56320|T&1023)}}return C}function g(y,_){return y?m(r.HEAPU8,y,_):""}const p={emscripten_get_now:WV,emscripten_memcpy_big:s,emscripten_resize_heap:d,fd_write:()=>0};async function v(){const _=await e({env:p,wasi_snapshot_preview1:p});t=_.memory,a(t.buffer),Object.assign(r,_),r.UTF8ToString=g}return await v(),r}var XV=Object.defineProperty,QV=(e,t,n)=>t in e?XV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tt=(e,t,n)=>QV(e,typeof t!="symbol"?t+"":t,n);let Mt=null;function JV(e){throw new Yv(e.UTF8ToString(e.getLastOnigError()))}class Df{constructor(t){Tt(this,"utf16Length"),Tt(this,"utf8Length"),Tt(this,"utf16Value"),Tt(this,"utf8Value"),Tt(this,"utf16OffsetToUtf8"),Tt(this,"utf8OffsetToUtf16");const n=t.length,r=Df._utf8ByteLength(t),a=r!==n,s=a?new Uint32Array(n+1):null;a&&(s[n]=r);const l=a?new Uint32Array(r+1):null;a&&(l[r]=n);const d=new Uint8Array(r);let u=0;for(let m=0;m<n;m++){const g=t.charCodeAt(m);let p=g,v=!1;if(g>=55296&&g<=56319&&m+1<n){const y=t.charCodeAt(m+1);y>=56320&&y<=57343&&(p=(g-55296<<10)+65536|y-56320,v=!0)}a&&(s[m]=u,v&&(s[m+1]=u),p<=127?l[u+0]=m:p<=2047?(l[u+0]=m,l[u+1]=m):p<=65535?(l[u+0]=m,l[u+1]=m,l[u+2]=m):(l[u+0]=m,l[u+1]=m,l[u+2]=m,l[u+3]=m)),p<=127?d[u++]=p:p<=2047?(d[u++]=192|(p&1984)>>>6,d[u++]=128|(p&63)>>>0):p<=65535?(d[u++]=224|(p&61440)>>>12,d[u++]=128|(p&4032)>>>6,d[u++]=128|(p&63)>>>0):(d[u++]=240|(p&1835008)>>>18,d[u++]=128|(p&258048)>>>12,d[u++]=128|(p&4032)>>>6,d[u++]=128|(p&63)>>>0),v&&m++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=d,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){const s=t.charCodeAt(r);let l=s,d=!1;if(s>=55296&&s<=56319&&r+1<a){const u=t.charCodeAt(r+1);u>=56320&&u<=57343&&(l=(s-55296<<10)+65536|u-56320,d=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,d&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const If=class br{constructor(t){if(Tt(this,"id",++br.LAST_ID),Tt(this,"_onigBinding"),Tt(this,"content"),Tt(this,"utf16Length"),Tt(this,"utf8Length"),Tt(this,"utf16OffsetToUtf8"),Tt(this,"utf8OffsetToUtf16"),Tt(this,"ptr"),!Mt)throw new Yv("Must invoke loadWasm first.");this._onigBinding=Mt,this.content=t;const n=new Df(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!br._sharedPtrInUse?(br._sharedPtr||(br._sharedPtr=Mt.omalloc(1e4)),br._sharedPtrInUse=!0,Mt.HEAPU8.set(n.utf8Value,br._sharedPtr),this.ptr=br._sharedPtr):this.ptr=n.createString(Mt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===br._sharedPtr?br._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Tt(If,"LAST_ID",0);Tt(If,"_sharedPtr",0);Tt(If,"_sharedPtrInUse",!1);let ST=If;class e9{constructor(t){if(Tt(this,"_onigBinding"),Tt(this,"_ptr"),!Mt)throw new Yv("Must invoke loadWasm first.");const n=[],r=[];for(let d=0,u=t.length;d<u;d++){const m=new Df(t[d]);n[d]=m.createString(Mt),r[d]=m.utf8Length}const a=Mt.omalloc(4*t.length);Mt.HEAPU32.set(n,a/4);const s=Mt.omalloc(4*t.length);Mt.HEAPU32.set(r,s/4);const l=Mt.createOnigScanner(a,s,t.length);for(let d=0,u=t.length;d<u;d++)Mt.ofree(n[d]);Mt.ofree(s),Mt.ofree(a),l===0&&JV(Mt),this._onigBinding=Mt,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new ST(t);const s=this._findNextMatchSync(t,n,!1,a);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){const s=this._onigBinding,l=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(l===0)return null;const d=s.HEAPU32;let u=l/4;const m=d[u++],g=d[u++],p=[];for(let v=0;v<g;v++){const y=t.convertUtf8OffsetToUtf16(d[u++]),_=t.convertUtf8OffsetToUtf16(d[u++]);p[v]={start:y,end:_,length:_-y}}return{index:m,captureIndices:p}}}function t9(e){return typeof e.instantiator=="function"}function n9(e){return typeof e.default=="function"}function r9(e){return typeof e.data<"u"}function i9(e){return typeof Response<"u"&&e instanceof Response}function a9(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let td;function wT(e){if(td)return td;async function t(){Mt=await KV(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),t9(r)?r=await r.instantiator(n):n9(r)?r=await r.default(n):(r9(r)&&(r=r.data),i9(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await o9(r)(n):r=await s9(r)(n):a9(r)?r=await Wp(r)(n):r instanceof WebAssembly.Module?r=await Wp(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Wp(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return td=t(),td}function Wp(e){return t=>WebAssembly.instantiate(e,t)}function o9(e){return t=>WebAssembly.instantiateStreaming(e,t)}function s9(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let ET;function l9(e){ET=e}function c9(){return ET}async function CT(e){return e&&await wT(e),{createScanner(t){return new e9(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new ST(t)}}}const u9=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:CT,getDefaultWasmLoader:c9,loadWasm:wT,setDefaultWasmLoader:l9},Symbol.toStringTag,{value:"Module"}));var kT=zV({});UV(kT,u9);var tt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function d9(e){return Kv(e)}function Kv(e){return Array.isArray(e)?f9(e):e instanceof RegExp?e:typeof e=="object"?h9(e):e}function f9(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Kv(e[n]);return t}function h9(e){let t={};for(let n in e)t[n]=Kv(e[n]);return t}function RT(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function AT(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?AT(e.substring(0,e.length-1)):e.substr(~t+1)}var Yp=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,nd=class{static hasCaptures(e){return e===null?!1:(Yp.lastIndex=0,Yp.test(e))}static replaceCaptures(e,t,n){return e.replace(Yp,(r,a,s,l)=>{let d=n[parseInt(a||s,10)];if(d){let u=t.substring(d.start,d.end);for(;u[0]===".";)u=u.substring(1);switch(l){case"downcase":return u.toLowerCase();case"upcase":return u.toUpperCase();default:return u}}else return r})}};function TT(e,t){return e<t?-1:e>t?1:0}function NT(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let s=TT(e[a],t[a]);if(s!==0)return s}return 0}return n-r}function R1(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function jT(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var LT=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Xd=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(g9(e),t)}static createFromParsedTheme(e,t){return v9(e,t)}_cachedMatchRoot=new LT(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>m9(e.parent,a.parentScopes));return r?new OT(r.fontStyle,r.foreground,r.background):null}},Kp=class Rd{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Rd(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Rd(n,t[r]);return n}push(t){return new Rd(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function m9(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!p9(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function p9(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var OT=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function g9(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,s=t.length;a<s;a++){let l=t[a];if(!l.settings)continue;let d;if(typeof l.scope=="string"){let p=l.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),d=p.split(",")}else Array.isArray(l.scope)?d=l.scope:d=[""];let u=-1;if(typeof l.settings.fontStyle=="string"){u=0;let p=l.settings.fontStyle.split(" ");for(let v=0,y=p.length;v<y;v++)switch(p[v]){case"italic":u=u|1;break;case"bold":u=u|2;break;case"underline":u=u|4;break;case"strikethrough":u=u|8;break}}let m=null;typeof l.settings.foreground=="string"&&R1(l.settings.foreground)&&(m=l.settings.foreground);let g=null;typeof l.settings.background=="string"&&R1(l.settings.background)&&(g=l.settings.background);for(let p=0,v=d.length;p<v;p++){let _=d[p].trim().split(" "),S=_[_.length-1],E=null;_.length>1&&(E=_.slice(0,_.length-1),E.reverse()),n[r++]=new b9(S,E,a,u,m,g)}}return n}var b9=class{constructor(e,t,n,r,a,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=s}},Jt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Jt||{});function v9(e,t){e.sort((u,m)=>{let g=TT(u.scope,m.scope);return g!==0||(g=NT(u.parentScopes,m.parentScopes),g!==0)?g:u.index-m.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let u=e.shift();u.fontStyle!==-1&&(n=u.fontStyle),u.foreground!==null&&(r=u.foreground),u.background!==null&&(a=u.background)}let s=new y9(t),l=new OT(n,s.getId(r),s.getId(a)),d=new _9(new cb(0,null,-1,0,0),[]);for(let u=0,m=e.length;u<m;u++){let g=e[u];d.insert(0,g.scope,g.parentScopes,g.fontStyle,s.getId(g.foreground),s.getId(g.background))}return new Xd(s,l,d)}var y9=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},x9=Object.freeze([]),cb=class DT{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,a,s){this.scopeDepth=t,this.parentScopes=n||x9,this.fontStyle=r,this.foreground=a,this.background=s}clone(){return new DT(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},_9=class ub{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){const s=n.parentScopes[a].length-t.parentScopes[r].length;if(s!==0)return s;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,s;if(r===-1?(a=t,s=""):(a=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(ub._cmpBySpecificity),n}insert(t,n,r,a,s,l){if(n===""){this._doInsertHere(t,r,a,s,l);return}let d=n.indexOf("."),u,m;d===-1?(u=n,m=""):(u=n.substring(0,d),m=n.substring(d+1));let g;this._children.hasOwnProperty(u)?g=this._children[u]:(g=new ub(this._mainRule.clone(),cb.cloneArr(this._rulesWithParentScopes)),this._children[u]=g),g.insert(t+1,m,r,a,s,l)}_doInsertHere(t,n,r,a,s){if(n===null){this._mainRule.acceptOverwrite(t,r,a,s);return}for(let l=0,d=this._rulesWithParentScopes.length;l<d;l++){let u=this._rulesWithParentScopes[l];if(NT(u.parentScopes,n)===0){u.acceptOverwrite(t,r,a,s);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new cb(t,n,r,a,s))}},$a=class Gn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Gn.getLanguageId(t),r=Gn.getTokenType(t),a=Gn.getFontStyle(t),s=Gn.getForeground(t),l=Gn.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:s,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,s,l,d){let u=Gn.getLanguageId(t),m=Gn.getTokenType(t),g=Gn.containsBalancedBrackets(t)?1:0,p=Gn.getFontStyle(t),v=Gn.getForeground(t),y=Gn.getBackground(t);return n!==0&&(u=n),r!==8&&(m=r),a!==null&&(g=a?1:0),s!==-1&&(p=s),l!==0&&(v=l),d!==0&&(y=d),(u<<0|m<<8|g<<10|p<<11|v<<15|y<<24)>>>0}};function Qd(e,t){const n=[],r=S9(e);let a=r.next();for(;a!==null;){let u=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let m=l();if(n.push({matcher:m,priority:u}),a!==",")break;a=r.next()}return n;function s(){if(a==="-"){a=r.next();const u=s();return m=>!!u&&!u(m)}if(a==="("){a=r.next();const u=d();return a===")"&&(a=r.next()),u}if(A1(a)){const u=[];do u.push(a),a=r.next();while(A1(a));return m=>t(u,m)}return null}function l(){const u=[];let m=s();for(;m;)u.push(m),m=s();return g=>u.every(p=>p(g))}function d(){const u=[];let m=l();for(;m&&(u.push(m),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");m=l()}return g=>u.some(p=>p(g))}}function A1(e){return!!e&&!!e.match(/[\w\.:]+/)}function S9(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function IT(e){typeof e.dispose=="function"&&e.dispose()}var Ql=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},w9=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},E9=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},C9=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ql(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new E9;for(const n of e)k9(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ql){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function k9(e,t,n,r){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof Ql?Ad({baseGrammar:s,selfGrammar:a},r):db(e.ruleName,{baseGrammar:s,selfGrammar:a,repository:a.repository},r);const l=n.injections(e.scopeName);if(l)for(const d of l)r.add(new Ql(d))}function db(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Jd([r],t,n)}}function Ad(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Jd(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Jd(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Jd(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const a=r.repository?RT({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Jd(r.patterns,{...t,repository:a},n);const s=r.include;if(!s)continue;const l=MT(s);switch(l.kind){case 0:Ad({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ad(t,n);break;case 2:db(l.ruleName,{...t,repository:a},n);break;case 3:case 4:const d=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(d){const u={baseGrammar:t.baseGrammar,selfGrammar:d,repository:a};l.kind===4?db(l.ruleName,u,n):Ad(u,n)}else l.kind===4?n.add(new w9(l.scopeName,l.ruleName)):n.add(new Ql(l.scopeName));break}}}var R9=class{kind=0},A9=class{kind=1},T9=class{constructor(e){this.ruleName=e}kind=2},N9=class{constructor(e){this.scopeName=e}kind=3},j9=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function MT(e){if(e==="$base")return new R9;if(e==="$self")return new A9;const t=e.indexOf("#");if(t===-1)return new N9(e);if(t===0)return new T9(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new j9(n,r)}}var L9=/\\(\d+)/,T1=/\\(\d+)/g,O9=-1,PT=-2;var hc=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=nd.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=nd.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${AT(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:nd.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:nd.replaceCaptures(this._contentName,e,t)}},D9=class extends hc{retokenizeCapturedWithRuleId;constructor(e,t,n,r,a){super(e,t,n,r),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},I9=class extends hc{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new Jl(r,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ec,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},N1=class extends hc{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,r),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ec,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},fb=class extends hc{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a,s,l,d,u,m){super(e,t,n,r),this._begin=new Jl(a,this.id),this.beginCaptures=s,this._end=new Jl(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=d,this.applyEndPatternLast=u||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ec;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ef=class extends hc{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,a,s,l,d,u){super(e,t,n,r),this._begin=new Jl(a,this.id),this.beginCaptures=s,this.whileCaptures=d,this._while=new Jl(l,PT),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ec;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ec,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},zT=class Xt{static createCaptureRule(t,n,r,a,s){return t.registerRule(l=>new D9(n,l,r,a,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new I9(t.$vscodeTextmateLocation,t.id,t.name,t.match,Xt._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=RT({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new N1(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Xt._compilePatterns(s,n,r))}return t.while?new ef(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Xt._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Xt._compileCaptures(t.whileCaptures||t.captures,n,r),Xt._compilePatterns(t.patterns,n,r)):new fb(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Xt._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Xt._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Xt._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let s=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const d=parseInt(l,10);d>s&&(s=d)}for(let l=0;l<=s;l++)a[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const d=parseInt(l,10);let u=0;t[l].patterns&&(u=Xt.getCompiledRuleId(t[l],n,r)),a[d]=Xt.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,u)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let s=0,l=t.length;s<l;s++){const d=t[s];let u=-1;if(d.include){const m=MT(d.include);switch(m.kind){case 0:case 1:u=Xt.getCompiledRuleId(r[d.include],n,r);break;case 2:let g=r[m.ruleName];g&&(u=Xt.getCompiledRuleId(g,n,r));break;case 3:case 4:const p=m.scopeName,v=m.kind===4?m.ruleName:null,y=n.getExternalGrammar(p,r);if(y)if(v){let _=y.repository[v];_&&(u=Xt.getCompiledRuleId(_,n,y.repository))}else u=Xt.getCompiledRuleId(y.repository.$self,n,y.repository);break}}else u=Xt.getCompiledRuleId(d,n,r);if(u!==-1){const m=n.getRule(u);let g=!1;if((m instanceof N1||m instanceof fb||m instanceof ef)&&m.hasMissingPatterns&&m.patterns.length===0&&(g=!0),g)continue;a.push(u)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Jl=class $T{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let a=0,s=[],l=!1;for(let d=0;d<r;d++)if(t.charAt(d)==="\\"&&d+1<r){const m=t.charAt(d+1);m==="z"?(s.push(t.substring(a,d)),s.push("$(?!\\n)(?<!\\n)"),a=d+2):(m==="A"||m==="G")&&(l=!0),d++}this.hasAnchor=l,a===0?this.source=t:(s.push(t.substring(a,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=L9.test(this.source):this.hasBackReferences=!1}clone(){return new $T(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return T1.lastIndex=0,this.source.replace(T1,(a,s)=>jT(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],s,l,d,u;for(s=0,l=this.source.length;s<l;s++)d=this.source.charAt(s),t[s]=d,n[s]=d,r[s]=d,a[s]=d,d==="\\"&&s+1<l&&(u=this.source.charAt(s+1),u==="A"?(t[s+1]="",n[s+1]="",r[s+1]="A",a[s+1]="A"):u==="G"?(t[s+1]="",n[s+1]="G",r[s+1]="",a[s+1]="G"):(t[s+1]=u,n[s+1]=u,r[s+1]=u,a[s+1]=u),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ec=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new j1(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new j1(e,r,this._items.map(a=>a.ruleId))}},j1=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
128
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Xp=class{constructor(e,t){this.languageId=e,this.tokenType=t}},M9=class hb{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Xp(t,8),this._embeddedLanguagesMatcher=new P9(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?hb._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Xp(0,0);_getBasicScopeAttributes=new LT(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Xp(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(hb.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},P9=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>jT(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},L1=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function UT(e,t,n,r,a,s,l,d){const u=t.content.length;let m=!1,g=-1;if(l){const y=z9(e,t,n,r,a,s);a=y.stack,r=y.linePos,n=y.isFirstLine,g=y.anchorPosition}const p=Date.now();for(;!m;){if(d!==0&&Date.now()-p>d)return new L1(a,!0);v()}return new L1(a,!1);function v(){const y=$9(e,t,n,r,a,g);if(!y){s.produce(a,u),m=!0;return}const _=y.captureIndices,S=y.matchedRuleId,E=_&&_.length>0?_[0].end>r:!1;if(S===O9){const k=a.getRule(e);s.produce(a,_[0].start),a=a.withContentNameScopesList(a.nameScopesList),Ol(e,t,n,a,s,k.endCaptures,_),s.produce(a,_[0].end);const C=a;if(a=a.parent,g=C.getAnchorPos(),!E&&C.getEnterPos()===r){a=C,s.produce(a,u),m=!0;return}}else{const k=e.getRule(S);s.produce(a,_[0].start);const C=a,A=k.getName(t.content,_),O=a.contentNameScopesList.pushAttributed(A,e);if(a=a.push(S,r,g,_[0].end===u,null,O,O),k instanceof fb){const L=k;Ol(e,t,n,a,s,L.beginCaptures,_),s.produce(a,_[0].end),g=_[0].end;const T=L.getContentName(t.content,_),D=O.pushAttributed(T,e);if(a=a.withContentNameScopesList(D),L.endHasBackReferences&&(a=a.withEndRule(L.getEndWithResolvedBackReferences(t.content,_))),!E&&C.hasSameRuleAs(a)){a=a.pop(),s.produce(a,u),m=!0;return}}else if(k instanceof ef){const L=k;Ol(e,t,n,a,s,L.beginCaptures,_),s.produce(a,_[0].end),g=_[0].end;const T=L.getContentName(t.content,_),D=O.pushAttributed(T,e);if(a=a.withContentNameScopesList(D),L.whileHasBackReferences&&(a=a.withEndRule(L.getWhileWithResolvedBackReferences(t.content,_))),!E&&C.hasSameRuleAs(a)){a=a.pop(),s.produce(a,u),m=!0;return}}else if(Ol(e,t,n,a,s,k.captures,_),s.produce(a,_[0].end),a=a.pop(),!E){a=a.safePop(),s.produce(a,u),m=!0;return}}_[0].end>r&&(r=_[0].end,n=!1)}}function z9(e,t,n,r,a,s){let l=a.beginRuleCapturedEOL?0:-1;const d=[];for(let u=a;u;u=u.pop()){const m=u.getRule(e);m instanceof ef&&d.push({rule:m,stack:u})}for(let u=d.pop();u;u=d.pop()){const{ruleScanner:m,findOptions:g}=B9(u.rule,e,u.stack.endRule,n,r===l),p=m.findNextMatchSync(t,r,g);if(p){if(p.ruleId!==PT){a=u.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(s.produce(u.stack,p.captureIndices[0].start),Ol(e,t,n,u.stack,s,u.rule.whileCaptures,p.captureIndices),s.produce(u.stack,p.captureIndices[0].end),l=p.captureIndices[0].end,p.captureIndices[0].end>r&&(r=p.captureIndices[0].end,n=!1))}else{a=u.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:l,isFirstLine:n}}function $9(e,t,n,r,a,s){const l=U9(e,t,n,r,a,s),d=e.getInjections();if(d.length===0)return l;const u=H9(d,e,t,n,r,a,s);if(!u)return l;if(!l)return u;const m=l.captureIndices[0].start,g=u.captureIndices[0].start;return g<m||u.priorityMatch&&g===m?u:l}function U9(e,t,n,r,a,s){const l=a.getRule(e),{ruleScanner:d,findOptions:u}=HT(l,e,a.endRule,n,r===s),m=d.findNextMatchSync(t,r,u);return m?{captureIndices:m.captureIndices,matchedRuleId:m.ruleId}:null}function H9(e,t,n,r,a,s,l){let d=Number.MAX_VALUE,u=null,m,g=0;const p=s.contentNameScopesList.getScopeNames();for(let v=0,y=e.length;v<y;v++){const _=e[v];if(!_.matcher(p))continue;const S=t.getRule(_.ruleId),{ruleScanner:E,findOptions:k}=HT(S,t,null,r,a===l),C=E.findNextMatchSync(n,a,k);if(!C)continue;const A=C.captureIndices[0].start;if(!(A>=d)&&(d=A,u=C.captureIndices,m=C.ruleId,g=_.priority,d===a))break}return u?{priorityMatch:g===-1,captureIndices:u,matchedRuleId:m}:null}function HT(e,t,n,r,a){return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function B9(e,t,n,r,a){return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function Ol(e,t,n,r,a,s,l){if(s.length===0)return;const d=t.content,u=Math.min(s.length,l.length),m=[],g=l[0].end;for(let p=0;p<u;p++){const v=s[p];if(v===null)continue;const y=l[p];if(y.length===0)continue;if(y.start>g)break;for(;m.length>0&&m[m.length-1].endPos<=y.start;)a.produceFromScopes(m[m.length-1].scopes,m[m.length-1].endPos),m.pop();if(m.length>0?a.produceFromScopes(m[m.length-1].scopes,y.start):a.produce(r,y.start),v.retokenizeCapturedWithRuleId){const S=v.getName(d,l),E=r.contentNameScopesList.pushAttributed(S,e),k=v.getContentName(d,l),C=E.pushAttributed(k,e),A=r.push(v.retokenizeCapturedWithRuleId,y.start,-1,!1,null,E,C),O=e.createOnigString(d.substring(0,y.end));UT(e,O,n&&y.start===0,y.start,A,a,!1,0),IT(O);continue}const _=v.getName(d,l);if(_!==null){const E=(m.length>0?m[m.length-1].scopes:r.contentNameScopesList).pushAttributed(_,e);m.push(new V9(E,y.end))}}for(;m.length>0;)a.produceFromScopes(m[m.length-1].scopes,m[m.length-1].endPos),m.pop()}var V9=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function F9(e,t,n,r,a,s,l,d){return new q9(e,t,n,r,a,s,l,d)}function O1(e,t,n,r,a){const s=Qd(t,tf),l=zT.getCompiledRuleId(n,r,a.repository);for(const d of s)e.push({debugSelector:t,matcher:d.matcher,ruleId:l,grammar:a,priority:d.priority})}function tf(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let a=n;a<t.length;a++)if(G9(t[a],r))return n=a+1,!0;return!1})}function G9(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var q9=class{constructor(e,t,n,r,a,s,l,d){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=d,this._basicScopeAttributesProvider=new M9(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=D1(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(const u of Object.keys(a)){const m=Qd(u,tf);for(const g of m)this._tokenTypeMatchers.push({matcher:g.matcher,type:a[u]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const a=r.injections;if(a)for(let l in a)O1(t,l,a[l],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(l=>{const d=this.getExternalGrammar(l);if(d){const u=d.injectionSelector;u&&O1(t,u,d,this,d)}})}return t.sort((a,s)=>a.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=D1(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=zT.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===mb.NULL){a=!0;const m=this._basicScopeAttributesProvider.getDefaultAttributes(),g=this.themeProvider.getDefaults(),p=$a.set(0,m.languageId,m.tokenType,null,g.fontStyle,g.foregroundId,g.backgroundId),v=this.getRule(this._rootId).getName(null,null);let y;v?y=Ul.createRootAndLookUpScopeName(v,p,this):y=Ul.createRoot("unknown",p),t=new mb(null,this._rootId,-1,-1,!1,null,y,y)}else a=!1,t.reset();e=e+`
|
|
129
|
+
`;const s=this.createOnigString(e),l=s.content.length,d=new W9(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),u=UT(this,s,a,0,t,d,!0,r);return IT(s),{lineLength:l,lineTokens:d,ruleStack:u.stack,stoppedEarly:u.stoppedEarly}}};function D1(e,t){return e=d9(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ul=class vr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,a=t?.scopePath??null;for(const s of n)a=Kp.push(a,s.scopeNames),r=new vr(r,a,s.encodedTokenAttributes);return r}static createRoot(t,n){return new vr(null,new Kp(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const a=r.getMetadataForScope(t),s=new Kp(null,t),l=r.themeProvider.themeMatch(s),d=vr.mergeAttributes(n,a,l);return new vr(null,s,d)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return vr.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let a=-1,s=0,l=0;return r!==null&&(a=r.fontStyle,s=r.foregroundId,l=r.backgroundId),$a.set(t,n.languageId,n.tokenType,null,a,s,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return vr._pushAttributed(this,t,n);const r=t.split(/ /g);let a=this;for(const s of r)a=vr._pushAttributed(a,s,n);return a}static _pushAttributed(t,n,r){const a=r.getMetadataForScope(n),s=t.scopePath.push(n),l=r.themeProvider.themeMatch(s),d=vr.mergeAttributes(t.tokenAttributes,a,l);return new vr(t,s,d)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},mb=class La{constructor(t,n,r,a,s,l,d,u){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=l,this.nameScopesList=d,this.contentNameScopesList=u,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=a}_stackElementBrand=void 0;static NULL=new La(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:La._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ul.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){La._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,s,l,d){return new La(this,t,n,r,a,s,l,d)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new La(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Ul.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new La(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ul.fromExtension(r,n.contentNameScopesList))}},Z9=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Qd(n,tf).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Qd(n,tf).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},W9=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const l of this._tokenTypeOverrides)l.matcher(s)&&(r=$a.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(s))}if(a&&(r=$a.set(r,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n}},Y9=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,F9(e,s,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},K9=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Y9(Xd.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Xd.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new Z9(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,a,s){const l=new C9(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(d=>this._loadSingleGrammar(d.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,a,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,a=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,a)}_grammarForScopeName(t,n=0,r=null,a=null,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,a,s)}},pb=mb.NULL;function nf(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[a,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[a]=s:a===r&&Object.assign(n,s);return n}function Ki(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function X9(e){return Array.isArray(e)?e:[e]}async function BT(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Mf(e){return!e||["plaintext","txt","text","plain"].includes(e)}function VT(e){return e==="ansi"||Mf(e)}function Pf(e){return e==="none"}function FT(e){return Pf(e)}const Q9=/(\r?\n)/g;function zf(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(Q9);let r=0;const a=[];for(let s=0;s<n.length;s+=2){const l=t?n[s]+(n[s+1]||""):n[s];a.push([l,r]),r+=n[s].length,r+=n[s+1]?.length||0}return a}const I1={light:"#333333",dark:"#bbbbbb"},M1={light:"#fffffe",dark:"#1e1e1e"},P1="__shiki_resolved";function $f(e){if(e?.[P1])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const d=t.settings?t.settings.find(u=>!u.name&&!u.scope):void 0;d?.settings?.foreground&&(r=d.settings.foreground),d?.settings?.background&&(n=d.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?I1.light:I1.dark),n||(n=t.type==="light"?M1.light:M1.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0;const s=new Map;function l(d){if(s.has(d))return s.get(d);a+=1;const u=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${u}`]?l(d):(s.set(d,u),u)}t.settings=t.settings.map(d=>{const u=d.settings?.foreground&&!d.settings.foreground.startsWith("#"),m=d.settings?.background&&!d.settings.background.startsWith("#");if(!u&&!m)return d;const g={...d,settings:{...d.settings}};if(u){const p=l(d.settings.foreground);t.colorReplacements[p]=d.settings.foreground,g.settings.foreground=p}if(m){const p=l(d.settings.background);t.colorReplacements[p]=d.settings.background,g.settings.background=p}return g});for(const d of Object.keys(t.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!t.colors[d]?.startsWith("#")){const u=l(t.colors[d]);t.colorReplacements[u]=t.colors[d],t.colors[d]=u}return Object.defineProperty(t,P1,{enumerable:!1,writable:!1,value:!0}),t}async function GT(e){return[...new Set((await Promise.all(e.filter(t=>!VT(t)).map(async t=>await BT(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function qT(e){return(await Promise.all(e.map(async t=>FT(t)?null:$f(await BT(t))))).filter(t=>!!t)}function ZT(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new tt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var J9=class extends K9{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=$f(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Xd.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=ZT(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(a=>{this._alias[a]=e.name}),this._loadedLanguagesCache=null,t.size)for(const a of t)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,a])=>!a);if(n.length){const r=t.filter(([a,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(l=>n.map(([d])=>d).includes(l)):!1).filter(a=>!n.includes(a));throw new tt(`Missing languages ${n.map(([a])=>`\`${a}\``).join(", ")}, required by ${r.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[r,a]of t)this._resolver.addLanguage(a);for(const[r,a]of t)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},eF=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const a=t.slice(0,r).join(".");n=[...n,...this._injections.get(a)||[]]}return n}};let El=0;function tF(e){El+=1,e.warnings!==!1&&El>=10&&El%10===0&&console.warn(`[Shiki] ${El} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new tt("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map($f),a=new J9(new eF(e.engine,n),r,n,e.langAlias);let s;function l(C){return ZT(C,e.langAlias)}function d(C){E();const A=a.getGrammar(typeof C=="string"?C:C.name);if(!A)throw new tt(`Language \`${C}\` not found, you may need to load it first`);return A}function u(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};E();const A=a.getTheme(C);if(!A)throw new tt(`Theme \`${C}\` not found, you may need to load it first`);return A}function m(C){E();const A=u(C);return s!==C&&(a.setTheme(A),s=C),{theme:A,colorMap:a.getColorMap()}}function g(){return E(),a.getLoadedThemes()}function p(){return E(),a.getLoadedLanguages()}function v(...C){E(),a.loadLanguages(C.flat(1))}async function y(...C){return v(await GT(C))}function _(...C){E();for(const A of C.flat(1))a.loadTheme(A)}async function S(...C){return E(),_(await qT(C))}function E(){if(t)throw new tt("Shiki instance has been disposed")}function k(){t||(t=!0,a.dispose(),El-=1)}return{setTheme:m,getTheme:u,getLanguage:d,getLoadedThemes:g,getLoadedLanguages:p,resolveLangAlias:l,loadLanguage:y,loadLanguageSync:v,loadTheme:S,loadThemeSync:_,dispose:k,[Symbol.dispose]:k}}async function nF(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([qT(e.themes||[]),GT(e.langs||[]),e.engine]);return tF({...e,themes:t,langs:n,engine:r})}const WT=new WeakMap;function Uf(e,t){WT.set(e,t)}function tc(e){return WT.get(e)}var Hf=class YT{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new YT(Object.fromEntries(X9(n).map(r=>[r,pb])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,a]=t;this.lang=r,this._stacks={[a]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return rF(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function rF(e){const t=[],n=new Set;function r(a){if(n.has(a))return;n.add(a);const s=a?.nameScopesList?.scopeName;s&&t.push(s),a.parent&&r(a.parent)}return r(e),t}function iF(e,t){if(!(e instanceof Hf))throw new tt("Invalid grammar state");return e.getInternalStack(t)}const aF=/,/,oF=/ /;function KT(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(Mf(e.resolveLangAlias(n.lang||"text"))||Pf(r))return zf(t).map(d=>[{content:d[0],offset:d[1]}]);const{theme:a,colorMap:s}=e.setTheme(r),l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new tt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(a.name))throw new tt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return lF(t,l,a,s,n)}function sF(...e){if(e.length===2)return tc(e[1]);const[t,n,r={}]=e,{lang:a="text",theme:s=t.getLoadedThemes()[0]}=r;if(Mf(a)||Pf(s))throw new tt("Plain language does not have grammar state");if(a==="ansi")throw new tt("ANSI language does not have grammar state");const{theme:l,colorMap:d}=t.setTheme(s),u=t.getLanguage(a);return new Hf(Xv(n,u,l,d,r).stateStack,u.name,l.name)}function lF(e,t,n,r,a){const s=Xv(e,t,n,r,a),l=new Hf(s.stateStack,t.name,n.name);return Uf(s.tokens,l),s.tokens}function Xv(e,t,n,r,a){const s=nf(n,a),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:d=500,includeExplanation:u=!1}=a,m=zf(e);let g=a.grammarState?iF(a.grammarState,n.name)??pb:a.grammarContextCode!=null?Xv(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:pb,p=[];const v=[];for(let y=0,_=m.length;y<_;y++){const[S,E]=m[y];if(S===""){p=[],v.push([]);continue}if(l>0&&S.length>=l){p=[],v.push([{content:S,offset:E,color:"",fontStyle:0}]);continue}let k,C,A;u&&u!=="tokenType"&&(k=t.tokenizeLine(S,g,d),C=k.tokens,A=0);const O=t.tokenizeLine2(S,g,d),L=O.tokens.length/2;for(let T=0;T<L;T++){const D=O.tokens[2*T],M=T+1<L?O.tokens[2*T+2]:S.length;if(D===M)continue;const B=O.tokens[2*T+1],Y=Ki(r[$a.getForeground(B)],s),F=$a.getFontStyle(B),$={content:S.substring(D,M),offset:E+D,color:Y,fontStyle:F};if(u==="tokenType")$.type=$a.getTokenType(B);else if(u){const q=[];if(u!=="scopeName")for(const se of n.settings){let z;switch(typeof se.scope){case"string":z=se.scope.split(aF).map(G=>G.trim());break;case"object":z=se.scope;break;default:continue}q.push({settings:se,selectors:z.map(G=>G.split(oF))})}$.explanation=[];let ne=0;for(;D+ne<M;){const se=C[A],z=S.substring(se.startIndex,se.endIndex);ne+=z.length,$.explanation.push({content:z,scopes:u==="scopeName"?cF(se.scopes):uF(q,se.scopes)}),A+=1}}p.push($)}v.push(p),p=[],g=O.ruleStack}return{tokens:v,stateStack:g}}function cF(e){return e.map(t=>({scopeName:t}))}function uF(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const s=t[r];n[r]={scopeName:s,themeMatches:fF(e,s,t.slice(0,r))}}return n}function z1(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function dF(e,t,n){if(!z1(e.at(-1),t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)z1(e[r],n[a])&&(r-=1),a-=1;return r===-1}function fF(e,t,n){const r=[];for(const{selectors:a,settings:s}of e)for(const l of a)if(dF(l,t,n)){r.push(s);break}return r}function XT(e,t,n,r=KT){const a=Object.entries(n.themes).filter(m=>m[1]).map(m=>({color:m[0],theme:m[1]})),s=a.map(m=>{const g=r(e,t,{...n,theme:m.theme});return{tokens:g,state:tc(g),theme:typeof m.theme=="string"?m.theme:m.theme.name}}),l=hF(...s.map(m=>m.tokens)),d=l[0].map((m,g)=>m.map((p,v)=>{const y={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in n&&n.includeExplanation&&(y.explanation=p.explanation),l.forEach((_,S)=>{const{content:E,explanation:k,offset:C,...A}=_[g][v];y.variants[a[S].color]=A}),y})),u=s[0].state?new Hf(Object.fromEntries(s.map(m=>[m.theme,m.state?.getInternalStack(m.theme)])),s[0].state.lang):void 0;return u&&Uf(d,u),d}function hF(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const a=e.map(u=>u[r]),s=t.map(()=>[]);t.forEach((u,m)=>u.push(s[m]));const l=a.map(()=>0),d=a.map(u=>u[0]);for(;d.every(u=>u);){const u=Math.min(...d.map(m=>m.content.length));for(let m=0;m<n;m++){const g=d[m];g.content.length===u?(s[m].push(g),l[m]+=1,d[m]=a[m][l[m]]):(s[m].push({...g,content:g.content.slice(0,u)}),d[m]={...g,content:g.content.slice(u),offset:g.offset+u})}}}return t}const $1=/\s+/g;function QT(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split($1)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split($1);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function mF(e){const t=zf(e,!0).map(([a])=>a);function n(a){if(a===e.length)return{line:t.length-1,character:t.at(-1).length};let s=a,l=0;for(const d of t){if(s<d.length)break;s-=d.length,l++}return{line:l,character:s}}function r(a,s){let l=0;for(let d=0;d<a;d++)l+=t[d].length;return l+=s,l}return{lines:t,indexToPos:n,posToIndex:r}}const pF=["color","background-color"];function gF(e,t){let n=0;const r=[];for(const a of t)a>n&&r.push({...e,content:e.content.slice(n,a),offset:e.offset+n}),n=a;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function bF(e,t){let n=0,r=e.length;for(;n<r;){const a=n+(r-n>>1);e[a]<=t?n=a+1:r=a}return n}function vF(e,t){const n=[...t instanceof Set?t:new Set(t)].sort((r,a)=>r-a);return n.length?e.map(r=>r.flatMap(a=>{const s=a.offset+a.content.length,l=bF(n,a.offset);let d=l;for(;d<n.length&&n[d]<s;)d++;if(l===d)return a;const u=n.slice(l,d);for(let m=0;m<u.length;m++)u[m]-=a.offset;return gF(a,u)})):e}function yF(e,t,n,r,a="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(g=>rf(e.variants[g])),d=new Set(l.flatMap(g=>Object.keys(g))),u={},m=(g,p)=>{const v=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+t[g]+(p==="color"?"":v)};return l.forEach((g,p)=>{for(const v of d){const y=g[v]||"inherit";if(p===0&&r&&pF.includes(v))if(r==="light-dark()"&&l.length>1){const _=t.findIndex(C=>C==="light"),S=t.findIndex(C=>C==="dark");if(_===-1||S===-1)throw new tt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const E=l[_][v]||"inherit",k=l[S][v]||"inherit";u[v]=`light-dark(${E}, ${k})`,a==="css-vars"&&(u[m(p,v)]=y)}else u[v]=y;else a==="css-vars"&&(u[m(p,v)]=y)}}),s.htmlStyle=u,s}function rf(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Jt.Italic&&(t["font-style"]="italic"),e.fontStyle&Jt.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Jt.Underline&&n.push("underline"),e.fontStyle&Jt.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function gb(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function xF(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let s=function(d){if(typeof d=="number"){if(d<0||d>n.source.length)throw new tt(`Invalid decoration offset: ${d}. Code length: ${n.source.length}`);return{...a.indexToPos(d),offset:d}}else{const u=a.lines[d.line];if(u===void 0)throw new tt(`Invalid decoration position ${JSON.stringify(d)}. Lines length: ${a.lines.length}`);let m=d.character;if(m<0&&(m=u.length+m),m<0||m>u.length)throw new tt(`Invalid decoration position ${JSON.stringify(d)}. Line ${d.line} length: ${u.length}`);return{...d,character:m,offset:a.posToIndex(d.line,m)}}};var r=s;const a=mF(n.source),l=(n.options.decorations||[]).map(d=>({...d,start:s(d.start),end:s(d.end)}));_F(l),e.set(n.meta,{decorations:l,converter:a,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return vF(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=t(this),a=[...n.children].filter(g=>g.type==="element"&&g.tagName==="span");if(a.length!==r.converter.lines.length)throw new tt(`Number of lines in code element (${a.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(g,p,v,y){const _=a[g];let S="",E=-1,k=-1;if(p===0&&(E=0),v===0&&(k=0),v===Number.POSITIVE_INFINITY&&(k=_.children.length),E===-1||k===-1)for(let A=0;A<_.children.length;A++)S+=JT(_.children[A]),E===-1&&S.length===p&&(E=A+1),k===-1&&S.length===v&&(k=A+1);if(E===-1)throw new tt(`Failed to find start index for decoration ${JSON.stringify(y.start)}`);if(k===-1)throw new tt(`Failed to find end index for decoration ${JSON.stringify(y.end)}`);const C=_.children.slice(E,k);if(!y.alwaysWrap&&C.length===_.children.length)d(_,y,"line");else if(!y.alwaysWrap&&C.length===1&&C[0].type==="element")d(C[0],y,"token");else{const A={type:"element",tagName:"span",properties:{},children:C};d(A,y,"wrapper"),_.children.splice(E,C.length,A)}}function l(g,p){a[g]=d(a[g],p,"line")}function d(g,p,v){const y=p.properties||{},_=p.transform||(S=>S);return g.tagName=p.tagName||"span",g.properties={...g.properties,...y,class:g.properties.class},p.properties?.class&&QT(g,p.properties.class),g=_(g,v)||g,g}const u=[],m=r.decorations.sort((g,p)=>p.start.offset-g.start.offset||g.end.offset-p.end.offset);for(const g of m){const{start:p,end:v}=g;if(p.line===v.line)s(p.line,p.character,v.character,g);else if(p.line<v.line){s(p.line,p.character,Number.POSITIVE_INFINITY,g);for(let y=p.line+1;y<v.line;y++)u.unshift(()=>l(y,g));s(v.line,0,v.character,g)}}u.forEach(g=>g())}}}function _F(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new tt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const a=e[r],s=n.start.offset<=a.start.offset&&a.start.offset<n.end.offset,l=n.start.offset<a.end.offset&&a.end.offset<=n.end.offset,d=a.start.offset<=n.start.offset&&n.start.offset<a.end.offset,u=a.start.offset<n.end.offset&&n.end.offset<=a.end.offset;if(s||l||d||u){if(s&&l||d&&u||d&&n.start.offset===n.end.offset||l&&a.start.offset===a.end.offset)continue;throw new tt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(a.start)} intersect.`)}}}}function JT(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(JT).join(""):""}const SF=[xF()];function af(e){const t=wF(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...SF]}function wF(e){const t=[],n=[],r=[];for(const a of e)switch(a.enforce){case"pre":t.push(a);break;case"post":n.push(a);break;default:r.push(a)}return{pre:t,post:n,normal:r}}var Da=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Qp={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function EF(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function U1(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function CF(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)Qp[r]&&t.push({type:"setDecoration",value:Qp[r]});else if(r<=29){const a=Qp[r-20];a&&(t.push({type:"resetDecoration",value:a}),a==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Da[r-30]}});else if(r===38){const a=U1(e);a&&t.push({type:"setForegroundColor",value:a})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Da[r-40]}});else if(r===48){const a=U1(e);a&&t.push({type:"setBackgroundColor",value:a})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Da[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Da[r-100+8]}})}return t}function kF(){let e=null,t=null,n=new Set;return{parse(r){const a=[];let s=0;do{const l=EF(r,s),d=l.sequence?r.substring(s,l.startPosition):r.substring(s);if(d.length>0&&a.push({value:d,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const u=CF(l.sequence);for(const m of u)m.type==="resetAll"?(e=null,t=null,n.clear()):m.type==="resetForegroundColor"?e=null:m.type==="resetBackgroundColor"?t=null:m.type==="resetDecoration"&&n.delete(m.value);for(const m of u)m.type==="setForegroundColor"?e=m.value:m.type==="setBackgroundColor"?t=m.value:m.type==="setDecoration"&&n.add(m.value)}s=l.position}while(s<r.length);return a}}}var RF={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function AF(e=RF){function t(d){return e[d]}function n(d){return`#${d.map(u=>Math.max(0,Math.min(u,255)).toString(16).padStart(2,"0")).join("")}`}let r;function a(){if(r)return r;r=[];for(let m=0;m<Da.length;m++)r.push(t(Da[m]));let d=[0,95,135,175,215,255];for(let m=0;m<6;m++)for(let g=0;g<6;g++)for(let p=0;p<6;p++)r.push(n([d[m],d[g],d[p]]));let u=8;for(let m=0;m<24;m++,u+=10)r.push(n([u,u,u]));return r}function s(d){return a()[d]}function l(d){switch(d.type){case"named":return t(d.name);case"rgb":return n(d.rgb);case"table":return s(d.index)}}return{value:l}}const TF=/#([0-9a-f]{3,8})/i,NF=/var\((--[\w-]+-ansi-[\w-]+)\)/,jF={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function LF(e,t,n){const r=nf(e,n),a=zf(t),s=AF(Object.fromEntries(Da.map(d=>{const u=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`;return[d,e.colors?.[u]||jF[d]]}))),l=kF();return a.map(d=>l.parse(d[0]).map(u=>{let m,g;u.decorations.has("reverse")?(m=u.background?s.value(u.background):e.bg,g=u.foreground?s.value(u.foreground):e.fg):(m=u.foreground?s.value(u.foreground):e.fg,g=u.background?s.value(u.background):void 0),m=Ki(m,r),g=Ki(g,r),u.decorations.has("dim")&&(m=OF(m));let p=Jt.None;return u.decorations.has("bold")&&(p|=Jt.Bold),u.decorations.has("italic")&&(p|=Jt.Italic),u.decorations.has("underline")&&(p|=Jt.Underline),u.decorations.has("strikethrough")&&(p|=Jt.Strikethrough),{content:u.value,offset:d[1],color:m,bgColor:g,fontStyle:p}}))}function OF(e){const t=e.match(TF);if(t){const r=t[1];if(r.length===8){const a=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${a}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const a=r[0],s=r[1],l=r[2],d=r[3];return`#${a}${a}${s}${s}${l}${l}${Math.round(Number.parseInt(`${d}${d}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const a=r[0],s=r[1],l=r[2];return`#${a}${a}${s}${s}${l}${l}80`}}}const n=e.match(NF);return n?`var(${n[1]}-dim)`:e}function bb(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:a=e.getLoadedThemes()[0]}=n;if(!Mf(r)&&!Pf(a)&&r==="ansi"){const{theme:s}=e.setTheme(a);return LF(s,t,n)}return KT(e,t,n)}function of(e,t,n){let r,a,s,l,d,u;if("themes"in n){const{defaultColor:m="light",cssVariablePrefix:g="--shiki-",colorsRendering:p="css-vars"}=n,v=Object.entries(n.themes).filter(k=>k[1]).map(k=>({color:k[0],theme:k[1]})).sort((k,C)=>k.color===m?-1:C.color===m?1:0);if(v.length===0)throw new tt("`themes` option must not be empty");const y=XT(e,t,n,bb);if(u=tc(y),m&&m!=="light-dark()"&&!v.some(k=>k.color===m))throw new tt(`\`themes\` option must contain the defaultColor key \`${m}\``);const _=v.map(k=>e.getTheme(k.theme)),S=v.map(k=>k.color);s=y.map(k=>k.map(C=>yF(C,S,g,m,p))),u&&Uf(s,u);const E=v.map(k=>nf(k.theme,n));a=H1(v,_,E,g,m,"fg",p),r=H1(v,_,E,g,m,"bg",p),l=`shiki-themes ${_.map(k=>k.name).join(" ")}`,d=m?void 0:[a,r].join(";")}else if("theme"in n){const m=nf(n.theme,n);s=bb(e,t,n);const g=e.getTheme(n.theme);r=Ki(g.bg,m),a=Ki(g.fg,m),l=g.name,u=tc(s)}else throw new tt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:a,bg:r,themeName:l,rootStyle:d,grammarState:u}}function H1(e,t,n,r,a,s,l){return e.map((d,u)=>{const m=Ki(t[u][s],n[u])||"inherit",g=`${r+d.color}${s==="bg"?"-bg":""}:${m}`;if(u===0&&a){if(a==="light-dark()"&&e.length>1){const p=e.findIndex(y=>y.color==="light"),v=e.findIndex(y=>y.color==="dark");if(p===-1||v===-1)throw new tt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ki(t[p][s],n[p])||"inherit"}, ${Ki(t[v][s],n[v])||"inherit"});${g}`}return m}return l==="css-vars"?g:null}).filter(d=>!!d).join(";")}const eN=/^\s+$/,DF=/^(\s*)(.*?)(\s*)$/;function sf(e,t,n,r={meta:{},options:n,codeToHast:(a,s)=>sf(e,a,s),codeToTokens:(a,s)=>of(e,a,s)}){let a=t;for(const _ of af(n))a=_.preprocess?.call(r,a,n)||a;let{tokens:s,fg:l,bg:d,themeName:u,rootStyle:m,grammarState:g}=of(e,a,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:v=!1}=n;p===!0?s=MF(s):p==="never"&&(s=PF(s)),v&&(s=zF(s));const y={...r,get source(){return a}};for(const _ of af(n))s=_.tokens?.call(y,s)||s;return IF(s,{...n,fg:l,bg:d,themeName:u,rootStyle:n.rootStyle===!1?!1:n.rootStyle??m},y,g)}function IF(e,t,n,r=tc(e)){const a=af(t),s=[],l={type:"root",children:[]},{structure:d="classic",tabindex:u="0"}=t,m={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?m.style=t.rootStyle:m.style=`background-color:${t.bg};color:${t.fg}`),u!==!1&&u!=null&&(m.tabindex=u.toString());for(const[S,E]of Object.entries(t.meta||{}))S.startsWith("_")||(m[S]=E);let g={type:"element",tagName:"pre",properties:m,children:[],data:t.data},p={type:"element",tagName:"code",properties:{},children:s};const v=[],y={...n,structure:d,addClassToHast:QT,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return g},get code(){return p},get lines(){return v}};if(e.forEach((S,E)=>{E&&(d==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):d==="classic"&&s.push({type:"text",value:`
|
|
130
|
+
`}));let k={type:"element",tagName:"span",properties:{class:"line"},children:[]},C=0;for(const A of S){let O={type:"element",tagName:"span",properties:{...A.htmlAttrs},children:[{type:"text",value:A.content}]};const L=gb(A.htmlStyle||rf(A));L&&(O.properties.style=L);for(const T of a)O=T?.span?.call(y,O,E+1,C,k,A)||O;d==="inline"?l.children.push(O):d==="classic"&&k.children.push(O),C+=A.content.length}if(d==="classic"){for(const A of a)k=A?.line?.call(y,k,E+1)||k;v.push(k),s.push(k)}else d==="inline"&&v.push(k)}),d==="classic"){for(const S of a)p=S?.code?.call(y,p)||p;g.children.push(p);for(const S of a)g=S?.pre?.call(y,g)||g;l.children.push(g)}else if(d==="inline"){const S=[];let E={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const C of l.children)C.type==="element"&&C.tagName==="br"?(S.push(E),E={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(C.type==="element"||C.type==="text")&&E.children.push(C);S.push(E);let k={type:"element",tagName:"code",properties:{},children:S};for(const C of a)k=C?.code?.call(y,k)||k;l.children=[];for(let C=0;C<k.children.length;C++){C>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const A=k.children[C];A.type==="element"&&l.children.push(...A.children)}}let _=l;for(const S of a)_=S?.root?.call(y,_)||_;return r&&Uf(_,r),_}function MF(e){return e.map(t=>{const n=[];let r="",a;return t.forEach((s,l)=>{const d=!(s.fontStyle&&(s.fontStyle&Jt.Underline||s.fontStyle&Jt.Strikethrough));d&&eN.test(s.content)&&t[l+1]?(a===void 0&&(a=s.offset),r+=s.content):r?(d?n.push({...s,offset:a,content:r+s.content}):n.push({content:r,offset:a},s),a=void 0,r=""):n.push(s)}),n})}function PF(e){return e.map(t=>t.flatMap(n=>{if(eN.test(n.content))return n;const r=n.content.match(DF);if(!r)return n;const[,a,s,l]=r;if(!a&&!l)return n;const d=[{...n,offset:n.offset+a.length,content:s}];return a&&d.unshift({content:a,offset:n.offset}),l&&d.push({content:l,offset:n.offset+a.length+s.length}),d}))}function zF(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const a=n.at(-1),s=gb(a.htmlStyle||rf(a)),l=gb(r.htmlStyle||rf(r)),d=a.fontStyle&&(a.fontStyle&Jt.Underline||a.fontStyle&Jt.Strikethrough),u=r.fontStyle&&(r.fontStyle&Jt.Underline||r.fontStyle&Jt.Strikethrough);!d&&!u&&s===l?a.content+=r.content:n.push({...r})}return n})}const $F=as;function UF(e,t,n){const r={meta:{},options:n,codeToHast:(s,l)=>sf(e,s,l),codeToTokens:(s,l)=>of(e,s,l)};let a=$F(sf(e,t,n,r));for(const s of af(n))a=s.postprocess?.call(r,a,n)||a;return a}async function HF(e){const t=await nF(e);return{getLastGrammarState:(...n)=>sF(t,...n),codeToTokensBase:(n,r)=>bb(t,n,r),codeToTokensWithThemes:(n,r)=>XT(t,n,r),codeToTokens:(n,r)=>of(t,n,r),codeToHast:(n,r)=>sf(t,n,r),codeToHtml:(n,r)=>UF(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function BF(e){const t=e.langs,n=e.themes,r=e.engine;async function a(s){function l(p){if(typeof p=="string"){if(p=s.langAlias?.[p]||p,VT(p))return[];const v=t[p];if(!v)throw new tt(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return v}return p}function d(p){if(FT(p))return"none";if(typeof p=="string"){const v=n[p];if(!v)throw new tt(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return v}return p}const u=(s.themes??[]).map(p=>d(p)),m=(s.langs??[]).map(p=>l(p)),g=await HF({engine:s.engine??r(),...s,themes:u,langs:m});return{...g,loadLanguage(...p){return g.loadLanguage(...p.map(l))},loadTheme(...p){return g.loadTheme(...p.map(d))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return a}const VF=BF({langs:lb,themes:qV,engine:()=>(0,kT.createOnigurumaEngine)(N(()=>import("./wasm-CG6Dc4jp.js"),[]))}),B1=4294967295;var FF=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:a}=t;if(!a)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;const l=r?.get(s);if(l){if(l instanceof RegExp)return l;if(n)return null;throw l}try{const d=a(s);return r?.set(s,d),d}catch(d){if(r?.set(s,d),n)return null;throw d}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,a=[];function s(l,d,u=0){return{index:l,captureIndices:d.indices.map(m=>m==null?{start:B1,end:B1,length:0}:{start:m[0]+u,end:m[1]+u,length:m[1]-m[0]})}}for(let l=0;l<this.regexps.length;l++){const d=this.regexps[l];if(d)try{d.lastIndex=t;const u=d.exec(r);if(!u)continue;if(u.index===t)return s(l,u,0);a.push([l,u,0])}catch(u){if(this.options.forgiving)continue;throw u}}if(a.length){const l=Math.min(...a.map(d=>d[1].index));for(const[d,u,m]of a)if(u.index===l)return s(d,u,m)}return null}};function Es(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function GF(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Qv=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),$t=String.raw;function Cs(e,t){if(e==null)throw new Error(t??"Value expected");return e}const tN=$t`\[\^?`,nN=`c.? | C(?:-.?)?|${$t`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${$t`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${$t`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${$t`o\{[^\}]*\}?`}|${$t`\d{1,3}`}`,Jv=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,rd=new RegExp($t`
|
|
131
|
+
\\ (?:
|
|
132
|
+
${nN}
|
|
133
|
+
| [gk]<[^>]*>?
|
|
134
|
+
| [gk]'[^']*'?
|
|
135
|
+
| .
|
|
136
|
+
)
|
|
137
|
+
| \( (?:
|
|
138
|
+
\? (?:
|
|
139
|
+
[:=!>({]
|
|
140
|
+
| <[=!]
|
|
141
|
+
| <[^>]*>
|
|
142
|
+
| '[^']*'
|
|
143
|
+
| ~\|?
|
|
144
|
+
| #(?:[^)\\]|\\.?)*
|
|
145
|
+
| [^:)]*[:)]
|
|
146
|
+
)?
|
|
147
|
+
| \*[^\)]*\)?
|
|
148
|
+
)?
|
|
149
|
+
| (?:${Jv.source})+
|
|
150
|
+
| ${tN}
|
|
151
|
+
| .
|
|
152
|
+
`.replace(/\s+/g,""),"gsu"),Jp=new RegExp($t`
|
|
153
|
+
\\ (?:
|
|
154
|
+
${nN}
|
|
155
|
+
| .
|
|
156
|
+
)
|
|
157
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
158
|
+
| ${tN}
|
|
159
|
+
| &&
|
|
160
|
+
| .
|
|
161
|
+
`.replace(/\s+/g,""),"gsu");function qF(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=dG(n.flags),a=[r.extended],s={captureGroup:n.rules.captureGroup,getCurrentModX(){return a.at(-1)},numOpenGroups:0,popModX(){a.pop()},pushModX(p){a.push(p)},replaceCurrentModX(p){a[a.length-1]=p},singleline:n.rules.singleline};let l=[],d;for(rd.lastIndex=0;d=rd.exec(e);){const p=ZF(s,e,d[0],rd.lastIndex);p.tokens?l.push(...p.tokens):p.token&&l.push(p.token),p.lastIndex!==void 0&&(rd.lastIndex=p.lastIndex)}const u=[];let m=0;l.filter(p=>p.type==="GroupOpen").forEach(p=>{p.kind==="capturing"?p.number=++m:p.raw==="("&&u.push(p)}),m||u.forEach((p,v)=>{p.kind="capturing",p.number=v+1});const g=m||u.length;return{tokens:l.map(p=>p.type==="EscapedNumber"?hG(p,g):p).flat(),flags:r}}function ZF(e,t,n,r){const[a,s]=n;if(n==="["||n==="[^"){const l=WF(t,n,r);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(a==="\\"){if("AbBGyYzZ".includes(s))return{token:V1(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:iG(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:iN(n)}}if(s==="K")return{token:aN("keep",n)};if(s==="N"||s==="R")return{token:Ia("newline",n,{negate:s==="N"})};if(s==="O")return{token:Ia("any",n)};if(s==="X")return{token:Ia("text_segment",n)};const l=rN(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(a==="("){if(s==="*")return{token:lG(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:sG(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Ko("group",n)};if(n==="(?>")return{token:Ko("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Ko(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Ko("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Ko("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:tG(n)}}if(e.getCurrentModX()){if(n==="#"){const l=t.indexOf(`
|
|
162
|
+
`,r);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)){const l=/\s+/y;return l.lastIndex=r,{lastIndex:l.exec(t)?l.lastIndex:r}}}if(n===".")return{token:Ia("dot",n)};if(n==="^"||n==="$"){const l=e.singleline?{"^":$t`\A`,$:$t`\Z`}[n]:n;return{token:V1(l,n)}}return n==="|"?{token:KF(n)}:Jv.test(n)?{tokens:mG(n)}:{token:ii(Es(n),n)}}function WF(e,t,n){const r=[F1(t[1]==="^",t)];let a=1,s;for(Jp.lastIndex=n;s=Jp.exec(e);){const l=s[0];if(l[0]==="["&&l[1]!==":")a++,r.push(F1(l[1]==="^",l));else if(l==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(ii(93,l));else if(a--,r.push(XF(l)),!a)break}else{const d=YF(l);Array.isArray(d)?r.push(...d):r.push(d)}}return{tokens:r,lastIndex:Jp.lastIndex||e.length}}function YF(e){if(e[0]==="\\")return rN(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Qv.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Ia("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?QF(e):e==="&&"?JF(e):ii(Es(e),e)}function rN(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return oG(e);if("dDhHsSwW".includes(n))return cG(e);if(e.startsWith($t`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return uG(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),s=new TextEncoder;return[...a].map(l=>{const d=[...s.encode(l)].map(u=>`\\x${u.toString(16)}`).join("");return ii(Es(l),d)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return ii(fG(e),e);if(G1.has(n))return ii(G1.get(n),e);if(/\d/.test(n))return eG(t,e);if(e==="\\")throw new Error($t`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return ii(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function KF(e){return{type:"Alternator",raw:e}}function V1(e,t){return{type:"Assertion",kind:e,raw:t}}function iN(e){return{type:"Backreference",raw:e}}function ii(e,t){return{type:"Character",value:e,raw:t}}function XF(e){return{type:"CharacterClassClose",raw:e}}function QF(e){return{type:"CharacterClassHyphen",raw:e}}function JF(e){return{type:"CharacterClassIntersector",raw:e}}function F1(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Ia(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function aN(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Cs(n.flags),raw:t}}function eG(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function tG(e){return{type:"GroupClose",raw:e}}function Ko(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function nG(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function rG(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function iG(e){return{type:"Subroutine",raw:e}}const aG=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),G1=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function oG(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return ii(Es(t.toUpperCase())-64,e)}function sG(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";const a=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),s=Z1(n),l=Z1(r),d={};if(s&&(d.enable=s),l&&(d.disable=l),e.endsWith(")"))return t.replaceCurrentModX(a),aN("flags",e,{flags:d});if(e.endsWith(":"))return t.pushModX(a),t.numOpenGroups++,Ko("group",e,{...(s||l)&&{flags:d}});throw new Error(`Unexpected flag modifier "${e}"`)}function lG(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:a}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=a?a.split(",").filter(g=>g!=="").map(g=>/^[+-]?\d+$/.test(g)?+g:g):[],[l,d,u]=s,m=aG.has(n)?n.toLowerCase():"custom";switch(m){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof l=="string")throw new Error(`Named callout argument must be a number "${l}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(s.length===2&&(typeof d=="number"||!/^[<>X]$/.test(d)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${d}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${l}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(typeof d=="number"||!/^(?:[<>!=]=|[<>])$/.test(d))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${d}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument three must be a tag or number "${u}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${m}"`)}return nG(m,r??null,a?.split(",")??null,e)}function q1(e){let t=null,n,r;if(e[0]==="{"){const{minStr:a,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,l=1e5;if(+a>l||s&&+s>l)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+a,r=s===void 0?+a:s===""?1/0:+s,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return rG(t,n,r,e)}function cG(e){const t=e[1].toLowerCase();return Ia({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function uG(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Ia("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function Z1(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function dG(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function fG(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function hG(e,t){const{raw:n,inCharClass:r}=e,a=n.slice(1);if(!r&&(a!=="0"&&a.length===1||a[0]!=="0"&&+a<=t))return[iN(n)];const s=[],l=a.match(/^[0-7]+|\d/g);for(let d=0;d<l.length;d++){const u=l[d];let m;if(d===0&&u!=="8"&&u!=="9"){if(m=parseInt(u,8),m>127)throw new Error($t`Octal encoded byte above 177 unsupported "${n}"`)}else m=Es(u);s.push(ii(m,(d===0?"\\":"")+u))}return s}function mG(e){const t=[],n=new RegExp(Jv,"gy");let r;for(;r=n.exec(e);){const a=r[0];if(a[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(a);if(s){const{min:l,max:d}=s.groups;if(+l>+d&&a.endsWith("?")){n.lastIndex--,t.push(q1(a.slice(0,-1)));continue}}}t.push(q1(a))}return t}function oN(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function pG(e){return gG.has(e.type)}const gG=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function sN(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=qF(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),a=(v,y)=>{const _=r.tokens[s.nextIndex];switch(s.parent=v,s.nextIndex++,_.type){case"Alternator":return qa();case"Assertion":return bG(_);case"Backreference":return vG(_,s);case"Character":return Bf(_.value,{useLastValid:!!y.isCheckingRangeEnd});case"CharacterClassHyphen":return yG(_,s,y);case"CharacterClassOpen":return xG(_,s,y);case"CharacterSet":return _G(_,s);case"Directive":return RG(_.kind,{flags:_.flags});case"GroupOpen":return SG(_,s,y);case"NamedCallout":return TG(_.kind,_.tag,_.arguments);case"Quantifier":return wG(_,s);case"Subroutine":return EG(_,s);default:throw new Error(`Unexpected token type "${_.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:a},l=jG(AG(r.flags));let d=l.body[0];for(;s.nextIndex<r.tokens.length;){const v=a(d,{});v.type==="Alternative"?(l.body.push(v),d=v):d.body.push(v)}const{capturingGroups:u,hasNumberedRef:m,namedGroupsByName:g,subroutines:p}=s;if(m&&g.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:v}of p)if(typeof v=="number"){if(v>u.length)throw new Error("Subroutine uses a group number that's not defined");v&&(u[v-1].isSubroutined=!0)}else if(g.has(v)){if(g.get(v).length>1)throw new Error($t`Subroutine uses a duplicate group name "\g<${v}>"`);g.get(v)[0].isSubroutined=!0}else throw new Error($t`Subroutine uses a group name that's not defined "\g<${v}>"`);return l}function bG({kind:e}){return vb(Cs({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===$t`\B`||e===$t`\Y`})}function vG({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),a=(s,l=!1)=>{const d=t.capturingGroups.length;let u=!1;if(s>d)if(t.skipBackrefValidation)u=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,yb(l?d+1-s:s,{orphan:u})};if(n){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(s)return a(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return yb(r)}return a(+r)}function yG(e,t,n){const{tokens:r,walk:a}=t,s=t.parent,l=s.body.at(-1),d=r[t.nextIndex];if(!n.isCheckingRangeEnd&&l&&l.type!=="CharacterClass"&&l.type!=="CharacterClassRange"&&d&&d.type!=="CharacterClassOpen"&&d.type!=="CharacterClassClose"&&d.type!=="CharacterClassIntersector"){const u=a(s,{...n,isCheckingRangeEnd:!0});if(l.type==="Character"&&u.type==="Character")return s.body.pop(),kG(l,u);throw new Error("Invalid character class range")}return Bf(Es("-"))}function xG({negate:e},t,n){const{tokens:r,walk:a}=t,s=[Td()],l=r[t.nextIndex];let d=K1(l);for(;d.type!=="CharacterClassClose";){if(d.type==="CharacterClassIntersector")s.push(Td()),t.nextIndex++;else{const m=s.at(-1);m.body.push(a(m,n))}d=K1(r[t.nextIndex],l)}const u=Td({negate:e});return s.length===1?u.body=s[0].body:(u.kind="intersection",u.body=s.map(m=>m.body.length===1?m.body[0]:m)),t.nextIndex++,u}function _G({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:a,skipPropertyNameValidation:s,unicodePropertyMap:l}=r;if(e==="property"){const d=Vf(n);if(Qv.has(d)&&!l?.has(d))e="posix",n=d;else return Xo(n,{negate:t,normalizeUnknownPropertyNames:a,skipPropertyNameValidation:s,unicodePropertyMap:l})}return e==="posix"?NG(n,{negate:t}):xb(e,{negate:t})}function SG(e,t,n){const{tokens:r,capturingGroups:a,namedGroupsByName:s,skipLookbehindValidation:l,walk:d}=t,u=LG(e),m=u.type==="AbsenceFunction",g=Y1(u),p=g&&u.negate;if(u.type==="CapturingGroup"&&(a.push(u),u.name&&GF(s,u.name,[]).push(u)),m&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let v=X1(r[t.nextIndex]);for(;v.type!=="GroupClose";){if(v.type==="Alternator")u.body.push(qa()),t.nextIndex++;else{const y=u.body.at(-1),_=d(y,{...n,isInAbsenceFunction:n.isInAbsenceFunction||m,isInLookbehind:n.isInLookbehind||g,isInNegLookbehind:n.isInNegLookbehind||p});if(y.body.push(_),(g||n.isInLookbehind)&&!l){const S="Lookbehind includes a pattern not allowed by Oniguruma";if(p||n.isInNegLookbehind){if(W1(_)||_.type==="CapturingGroup")throw new Error(S)}else if(W1(_)||Y1(_)&&_.negate)throw new Error(S)}}v=X1(r[t.nextIndex])}return t.nextIndex++,u}function wG({kind:e,min:t,max:n},r){const a=r.parent,s=a.body.at(-1);if(!s||!pG(s))throw new Error("Quantifier requires a repeatable token");const l=cN(e,t,n,s);return a.body.pop(),l}function EG({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let a=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(a);if(s){const d=+s.groups.num,u=n.length;if(t.hasNumberedRef=!0,a={"":d,"+":u+d,"-":u+1-d}[s.groups.sign],a<1)throw new Error("Invalid subroutine number")}else a==="0"&&(a=0);const l=uN(a);return r.push(l),l}function CG(e,t){return{type:"AbsenceFunction",kind:e,body:mc(t?.body)}}function qa(e){return{type:"Alternative",body:dN(e?.body)}}function vb(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function yb(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function lN(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!OG(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:mc(t?.body)}}function Bf(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function Td(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:dN(e?.body)}}function kG(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function xb(e,t){const n=!!t?.negate,r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function RG(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Cs(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function AG(e){return{type:"Flags",...e}}function or(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:mc(e?.body)}}function Oa(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:mc(e?.body)}}function TG(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function NG(e,t){const n=!!t?.negate;if(!Qv.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function cN(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function jG(e,t){return{type:"Regex",body:mc(t?.body),flags:e}}function uN(e){return{type:"Subroutine",ref:e}}function Xo(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(Vf(e));if(!r){if(n.normalizeUnknownPropertyNames)r=DG(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error($t`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function LG({flags:e,kind:t,name:n,negate:r,number:a}){switch(t){case"absence_repeater":return CG("repeater");case"atomic":return or({atomic:!0});case"capturing":return lN(a,{name:n});case"group":return or({flags:e});case"lookahead":case"lookbehind":return Oa({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function mc(e){if(e===void 0)e=[qa()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function dN(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function W1(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Y1(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function OG(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function DG(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Vf(e){return e.replace(/[- _]+/g,"").toLowerCase()}function K1(e,t){const n=t;return Cs(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function X1(e){return Cs(e,"Unclosed group")}function Hl(e,t,n=null){function r(s,l){for(let d=0;d<s.length;d++){const u=a(s[d],l,d,s);d=Math.max(-1,d+u)}}function a(s,l=null,d=null,u=null){let m=0,g=!1;const p={node:s,parent:l,key:d,container:u,root:e,remove(){id(u).splice(Math.max(0,Vo(d)+m),1),m--,g=!0},removeAllNextSiblings(){return id(u).splice(Vo(d)+1)},removeAllPrevSiblings(){const k=Vo(d)+m;return m-=k,id(u).splice(0,Math.max(0,k))},replaceWith(k,C={}){const A=!!C.traverse;u?u[Math.max(0,Vo(d)+m)]=k:Cs(l,"Can't replace root node")[d]=k,A&&a(k,l,d,u),g=!0},replaceWithMultiple(k,C={}){const A=!!C.traverse;if(id(u).splice(Math.max(0,Vo(d)+m),1,...k),m+=k.length-1,A){let O=0;for(let L=0;L<k.length;L++)O+=a(k[L],l,Vo(d)+L+O,u)}g=!0},skip(){g=!0}},{type:v}=s,y=t["*"],_=t[v],S=typeof y=="function"?y:y?.enter,E=typeof _=="function"?_:_?.enter;if(S?.(p,n),E?.(p,n),!g)switch(v){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":a(s.min,s,"min"),a(s.max,s,"max");break;case"Quantifier":a(s.body,s,"body");break;case"Regex":r(s.body,s),a(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${v}"`)}return _?.exit?.(p,n),y?.exit?.(p,n),m}return a(e),e}function id(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Vo(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const IG=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function MG(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function PG(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const Kn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function ey(e,t,n,r){const a=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let l=0,d="";for(const u of e.matchAll(a)){const{0:m,groups:{$skip:g}}=u;if(!g&&(!r||r===Kn.DEFAULT==!l)){n instanceof Function?d+=n(u,{context:l?Kn.CHAR_CLASS:Kn.DEFAULT,negated:s[s.length-1]}):d+=n;continue}m[0]==="["?(l++,s.push(m[1]==="^")):m==="]"&&l&&(l--,s.pop()),d+=m}return d}function fN(e,t,n,r){ey(e,t,n,r)}function zG(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const a=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=n;let s=0,l;for(;l=a.exec(e);){const{0:d,groups:{$skip:u}}=l;if(!u&&(!r||r===Kn.DEFAULT==!s))return l;d==="["?s++:d==="]"&&s&&s--,a.lastIndex==l.index&&a.lastIndex++}return null}function ad(e,t,n){return!!zG(e,t,0,n)}function $G(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,a=0,s=1,l;for(;l=n.exec(e);){const[d]=l;if(d==="[")a++;else if(a)d==="]"&&a--;else if(d==="(")s++;else if(d===")"&&(s--,!s)){r=l.index;break}}return e.slice(t,r)}const Q1=new RegExp(String.raw`(?<noncapturingStart>${IG})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function UG(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const a="(?>",s="(?:(?=(",l=[0],d=[];let u=0,m=0,g=NaN,p;do{p=!1;let v=0,y=0,_=!1,S;for(Q1.lastIndex=Number.isNaN(g)?0:g+s.length;S=Q1.exec(e);){const{0:E,index:k,groups:{capturingStart:C,noncapturingStart:A}}=S;if(E==="[")v++;else if(v)E==="]"&&v--;else if(E===a&&!_)g=k,_=!0;else if(_&&A)y++;else if(C)_?y++:(u++,l.push(u+m));else if(E===")"&&_){if(!y){m++;const O=u+m;if(e=`${e.slice(0,g)}${s}${e.slice(g+a.length,k)}))<$$${O}>)${e.slice(k+1)}`,p=!0,d.push(O),MG(n,O),r.size){const L=new Map;r.forEach((T,D)=>{L.set(D>=O?D+1:D,T.map(M=>M>=O?M+1:M))}),r=L}break}y--}}}while(p);return n.push(...d),e=ey(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:v,groups:{backrefNum:y,wrappedBackrefNum:_}})=>{if(y){const S=+y;if(S>l.length-1)throw new Error(`Backref "${v}" greater than number of captures`);return`\\${l[S]}`}return`\\${_}`},Kn.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const hN=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,eg=new RegExp(String.raw`
|
|
163
|
+
\\(?: \d+
|
|
164
|
+
| c[A-Za-z]
|
|
165
|
+
| [gk]<[^>]+>
|
|
166
|
+
| [pPu]\{[^\}]+\}
|
|
167
|
+
| u[A-Fa-f\d]{4}
|
|
168
|
+
| x[A-Fa-f\d]{2}
|
|
169
|
+
)
|
|
170
|
+
| \((?: \? (?: [:=!>]
|
|
171
|
+
| <(?:[=!]|[^>]+>)
|
|
172
|
+
| [A-Za-z\-]+:
|
|
173
|
+
| \(DEFINE\)
|
|
174
|
+
))?
|
|
175
|
+
| (?<qBase>${hN})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
176
|
+
| \\?.
|
|
177
|
+
`.replace(/\s+/g,""),"gsu");function HG(e){if(!new RegExp(`${hN}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,a="",s=0,l;for(eg.lastIndex=0;l=eg.exec(e);){const{0:d,index:u,groups:{qBase:m,qMod:g,invalidQ:p}}=l;if(d==="[")s||(r=u),s++;else if(d==="]")s?s--:r=null;else if(!s)if(g==="+"&&a&&!a.startsWith("(")){if(p)throw new Error(`Invalid quantifier "${d}"`);let v=-1;if(/^\{\d+\}$/.test(m))e=PG(e,u+m.length,g,"");else{if(a===")"||a==="]"){const y=a===")"?n:r;if(y===null)throw new Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,y)}(?>${e.slice(y,u)}${m})${e.slice(u+d.length)}`}else e=`${e.slice(0,u-a.length)}(?>${a}${m})${e.slice(u+d.length)}`;v+=4}eg.lastIndex+=v}else d[0]==="("?t.push(u):d===")"&&(n=t.length?t.pop():null);a=d}return{pattern:e}}const Wn=String.raw,BG=Wn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,_b=Wn`\(\?R=(?<rDepth>[^\)]+)\)|${BG}`,Ff=Wn`\(\?<(?![=!])(?<captureName>[^>]+)>`,mN=Wn`${Ff}|(?<unnamed>\()(?!\?)`,ja=new RegExp(Wn`${Ff}|${_b}|\(\?|\\?.`,"gsu"),tg="Cannot use multiple overlapping recursions";function VG(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let a=t?.captureTransfers??new Map;if(!new RegExp(_b,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:n};if(r==="plugin"&&ad(e,Wn`\(\?\(DEFINE\)`,Kn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],l=ad(e,Wn`\\[1-9]`,Kn.DEFAULT),d=new Map,u=[];let m=!1,g=0,p=0,v;for(ja.lastIndex=0;v=ja.exec(e);){const{0:y,groups:{captureName:_,rDepth:S,gRNameOrNum:E,gRDepth:k}}=v;if(y==="[")g++;else if(g)y==="]"&&g--;else if(S){if(J1(S),m)throw new Error(tg);if(l)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const C=e.slice(0,v.index),A=e.slice(ja.lastIndex);if(ad(A,_b,Kn.DEFAULT))throw new Error(tg);const O=+S-1;e=eE(C,A,O,!1,n,s,p),a=nE(a,C,O,s.length,0,p);break}else if(E){J1(k);let C=!1;for(const $ of u)if($.name===E||$.num===+E){if(C=!0,$.hasRecursedWithin)throw new Error(tg);break}if(!C)throw new Error(Wn`Recursive \g cannot be used outside the referenced group "${r==="external"?E:Wn`\g<${E}&R=${k}>`}"`);const A=d.get(E),O=$G(e,A);if(l&&ad(O,Wn`${Ff}|\((?!\?)`,Kn.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const L=e.slice(A,v.index),T=O.slice(L.length+y.length),D=s.length,M=+k-1,B=eE(L,T,M,!0,n,s,p);a=nE(a,L,M,s.length-D,D,p);const Y=e.slice(0,A),F=e.slice(A+O.length);e=`${Y}${B}${F}`,ja.lastIndex+=B.length-y.length-L.length-T.length,u.forEach($=>$.hasRecursedWithin=!0),m=!0}else if(_)p++,d.set(String(p),ja.lastIndex),d.set(_,ja.lastIndex),u.push({num:p,name:_});else if(y[0]==="("){const C=y==="(";C&&(p++,d.set(String(p),ja.lastIndex)),u.push(C?{num:p}:{})}else y===")"&&u.pop()}return n.push(...s),{pattern:e,captureTransfers:a,hiddenCaptures:n}}function J1(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function eE(e,t,n,r,a,s,l){const d=new Set;r&&fN(e+t,Ff,({groups:{captureName:m}})=>{d.add(m)},Kn.DEFAULT);const u=[n,r?d:null,a,s,l];return`${e}${tE(`(?:${e}`,"forward",...u)}(?:)${tE(`${t})`,"backward",...u)}${t}`}function tE(e,t,n,r,a,s,l){const u=g=>t==="forward"?g+2:n-g+2-1;let m="";for(let g=0;g<n;g++){const p=u(g);m+=ey(e,Wn`${mN}|\\k<(?<backref>[^>]+)>`,({0:v,groups:{captureName:y,unnamed:_,backref:S}})=>{if(S&&r&&!r.has(S))return v;const E=`_$${p}`;if(_||y){const k=l+s.length+1;return s.push(k),FG(a,k),_?v:`(?<${y}${E}>`}return Wn`\k<${S}${E}>`},Kn.DEFAULT)}return m}function FG(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function nE(e,t,n,r,a,s){if(e.size&&r){let l=0;fN(t,mN,()=>l++,Kn.DEFAULT);const d=s-l+a,u=new Map;return e.forEach((m,g)=>{const p=(r-l*n)/n,v=l*n,y=g>d+l?g+r:g,_=[];for(const S of m)if(S<=d)_.push(S);else if(S>d+l+p)_.push(S+r);else if(S<=d+l)for(let E=0;E<=n;E++)_.push(S+l*E);else for(let E=0;E<=n;E++)_.push(S+v+p*E);u.set(y,_)}),u}return e}var Nt=String.fromCodePoint,ke=String.raw,cr={},Gf=globalThis.RegExp;cr.flagGroups=(()=>{try{new Gf("(?i:)")}catch{return!1}return!0})();cr.unicodeSets=(()=>{try{new Gf("[[]]","v")}catch{return!1}return!0})();cr.bugFlagVLiteralHyphenIsRange=cr.unicodeSets?(()=>{try{new Gf(ke`[\d\-a]`,"v")}catch{return!0}return!1})():!1;cr.bugNestedClassIgnoresNegation=cr.unicodeSets&&new Gf("[[^a]]","v").test("a");function lf(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function nc(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Sb(e,t){return rE[e]>=rE[t]}function GG(e,t){if(e==null)throw new Error(t??"Value expected");return e}var rE={ES2025:2025,ES2024:2024,ES2018:2018},qG={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function pN(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!qG[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=cr.flagGroups?"ES2025":cr.unicodeSets?"ES2024":"ES2018"),t}var ZG="[ -\r ]",WG=new Set([Nt(304),Nt(305)]),Qr=ke`[\p{L}\p{M}\p{N}\p{Pc}]`;function gN(e){if(WG.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),a=XG.get(n),s=YG.get(n),l=KG.get(n);return[...r].length===1&&t.add(r),l&&t.add(l),a&&t.add(a),t.add(n),s&&t.add(s),[...t]}var ty=new Map(`C Other
|
|
178
|
+
Cc Control cntrl
|
|
179
|
+
Cf Format
|
|
180
|
+
Cn Unassigned
|
|
181
|
+
Co Private_Use
|
|
182
|
+
Cs Surrogate
|
|
183
|
+
L Letter
|
|
184
|
+
LC Cased_Letter
|
|
185
|
+
Ll Lowercase_Letter
|
|
186
|
+
Lm Modifier_Letter
|
|
187
|
+
Lo Other_Letter
|
|
188
|
+
Lt Titlecase_Letter
|
|
189
|
+
Lu Uppercase_Letter
|
|
190
|
+
M Mark Combining_Mark
|
|
191
|
+
Mc Spacing_Mark
|
|
192
|
+
Me Enclosing_Mark
|
|
193
|
+
Mn Nonspacing_Mark
|
|
194
|
+
N Number
|
|
195
|
+
Nd Decimal_Number digit
|
|
196
|
+
Nl Letter_Number
|
|
197
|
+
No Other_Number
|
|
198
|
+
P Punctuation punct
|
|
199
|
+
Pc Connector_Punctuation
|
|
200
|
+
Pd Dash_Punctuation
|
|
201
|
+
Pe Close_Punctuation
|
|
202
|
+
Pf Final_Punctuation
|
|
203
|
+
Pi Initial_Punctuation
|
|
204
|
+
Po Other_Punctuation
|
|
205
|
+
Ps Open_Punctuation
|
|
206
|
+
S Symbol
|
|
207
|
+
Sc Currency_Symbol
|
|
208
|
+
Sk Modifier_Symbol
|
|
209
|
+
Sm Math_Symbol
|
|
210
|
+
So Other_Symbol
|
|
211
|
+
Z Separator
|
|
212
|
+
Zl Line_Separator
|
|
213
|
+
Zp Paragraph_Separator
|
|
214
|
+
Zs Space_Separator
|
|
215
|
+
ASCII
|
|
216
|
+
ASCII_Hex_Digit AHex
|
|
217
|
+
Alphabetic Alpha
|
|
218
|
+
Any
|
|
219
|
+
Assigned
|
|
220
|
+
Bidi_Control Bidi_C
|
|
221
|
+
Bidi_Mirrored Bidi_M
|
|
222
|
+
Case_Ignorable CI
|
|
223
|
+
Cased
|
|
224
|
+
Changes_When_Casefolded CWCF
|
|
225
|
+
Changes_When_Casemapped CWCM
|
|
226
|
+
Changes_When_Lowercased CWL
|
|
227
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
228
|
+
Changes_When_Titlecased CWT
|
|
229
|
+
Changes_When_Uppercased CWU
|
|
230
|
+
Dash
|
|
231
|
+
Default_Ignorable_Code_Point DI
|
|
232
|
+
Deprecated Dep
|
|
233
|
+
Diacritic Dia
|
|
234
|
+
Emoji
|
|
235
|
+
Emoji_Component EComp
|
|
236
|
+
Emoji_Modifier EMod
|
|
237
|
+
Emoji_Modifier_Base EBase
|
|
238
|
+
Emoji_Presentation EPres
|
|
239
|
+
Extended_Pictographic ExtPict
|
|
240
|
+
Extender Ext
|
|
241
|
+
Grapheme_Base Gr_Base
|
|
242
|
+
Grapheme_Extend Gr_Ext
|
|
243
|
+
Hex_Digit Hex
|
|
244
|
+
IDS_Binary_Operator IDSB
|
|
245
|
+
IDS_Trinary_Operator IDST
|
|
246
|
+
ID_Continue IDC
|
|
247
|
+
ID_Start IDS
|
|
248
|
+
Ideographic Ideo
|
|
249
|
+
Join_Control Join_C
|
|
250
|
+
Logical_Order_Exception LOE
|
|
251
|
+
Lowercase Lower
|
|
252
|
+
Math
|
|
253
|
+
Noncharacter_Code_Point NChar
|
|
254
|
+
Pattern_Syntax Pat_Syn
|
|
255
|
+
Pattern_White_Space Pat_WS
|
|
256
|
+
Quotation_Mark QMark
|
|
257
|
+
Radical
|
|
258
|
+
Regional_Indicator RI
|
|
259
|
+
Sentence_Terminal STerm
|
|
260
|
+
Soft_Dotted SD
|
|
261
|
+
Terminal_Punctuation Term
|
|
262
|
+
Unified_Ideograph UIdeo
|
|
263
|
+
Uppercase Upper
|
|
264
|
+
Variation_Selector VS
|
|
265
|
+
White_Space space
|
|
266
|
+
XID_Continue XIDC
|
|
267
|
+
XID_Start XIDS`.split(/\s/).map(e=>[Vf(e),e])),YG=new Map([["s",Nt(383)],[Nt(383),"s"]]),KG=new Map([[Nt(223),Nt(7838)],[Nt(107),Nt(8490)],[Nt(229),Nt(8491)],[Nt(969),Nt(8486)]]),XG=new Map([qi(453),qi(456),qi(459),qi(498),...ng(8072,8079),...ng(8088,8095),...ng(8104,8111),qi(8124),qi(8140),qi(8188)]),QG=new Map([["alnum",ke`[\p{Alpha}\p{Nd}]`],["alpha",ke`\p{Alpha}`],["ascii",ke`\p{ASCII}`],["blank",ke`[\p{Zs}\t]`],["cntrl",ke`\p{Cc}`],["digit",ke`\p{Nd}`],["graph",ke`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",ke`\p{Lower}`],["print",ke`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",ke`[\p{P}\p{S}]`],["space",ke`\p{space}`],["upper",ke`\p{Upper}`],["word",ke`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",ke`\p{AHex}`]]);function JG(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function qi(e){const t=Nt(e);return[t.toLowerCase(),t]}function ng(e,t){return JG(e,t).map(n=>qi(n))}var bN=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function eq(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};vN(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Sb(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Hl(e,tq,r);const a={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:a,prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Hl(e,nq,s);const l={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Hl(e,rq,l),e._originMap=s.groupOriginByCopy,e._strategy=r.strategy,e}var tq={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:a}=e;if(a==="repeater"){const s=or();s.body[0].body.push(Oa({negate:!0,body:r}),Xo("Any"));const l=or();l.body[0].body.push(cN("greedy",0,1/0,s)),n(pt(l,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const a=e.body.filter(s=>s.kind==="flags");for(let s=n+1;s<t.body.length;s++){const l=t.body[s];nc(r,l,[]).push(...a)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=xN(t.get(e));if(n){const r=or({flags:n});r.body[0].body=e.body,e.body=[pt(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:a,remove:s,replaceWith:l},d){const{kind:u,negate:m}=e,{asciiWordBoundaries:g,avoidSubclass:p,supportedGNodes:v,wordIsAscii:y}=d;if(u==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${m?"Y":"y"}"`);if(u==="line_end")l(pt(Oa({body:[qa({body:[vb("string_end")]}),qa({body:[Bf(10)]})]}),t));else if(u==="line_start")l(pt(Jr(ke`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(u==="search_start")if(v.has(e))a.flags.sticky=!0,s();else{const _=r[n-1];if(_&&cq(_))l(pt(Oa({negate:!0}),t));else{if(p)throw new Error(ke`Uses "\G" in a way that requires a subclass`);l(Zi(vb("string_start"),t)),d.strategy="clip_search"}}else if(!(u==="string_end"||u==="string_start"))if(u==="string_end_newline")l(pt(Jr(ke`(?=\n?\z)`),t));else if(u==="word_boundary"){if(!y&&!g){const _=`(?:(?<=${Qr})(?!${Qr})|(?<!${Qr})(?=${Qr}))`,S=`(?:(?<=${Qr})(?=${Qr})|(?<!${Qr})(?!${Qr}))`;l(pt(Jr(m?S:_),t))}}else throw new Error(`Unexpected assertion kind "${u}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!ig(n)&&(n=rg(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!ig(r)&&(r=rg(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=Td({body:[e]});n(pt(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:a,digitIsAscii:s,spaceIsAscii:l,wordIsAscii:d}){const{kind:u,negate:m,value:g}=e;if(s&&(u==="digit"||g==="digit")){n(Zi(xb("digit",{negate:m}),t));return}if(l&&(u==="space"||g==="space")){n(pt(ag(Jr(ZG),m),t));return}if(d&&(u==="word"||g==="word")){n(Zi(xb("word",{negate:m}),t));return}if(u==="any")n(Zi(Xo("Any"),t));else if(u==="digit")n(Zi(Xo("Nd",{negate:m}),t));else if(u!=="dot")if(u==="text_segment"){if(r==="strict")throw new Error(ke`Use of "\X" requires non-strict accuracy`);const p="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",v=ke`\p{RI}{2}|${p}(?:\u200D${p})*`;n(pt(Jr(ke`(?>\r\n|${a?ke`\p{RGI_Emoji}`:v}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(u==="hex")n(Zi(Xo("AHex",{negate:m}),t));else if(u==="newline")n(pt(Jr(m?`[^
|
|
268
|
+
]`:`(?>\r
|
|
269
|
+
?|[
|
|
270
|
+
\v\f
\u2028\u2029])`),t));else if(u==="posix")if(!a&&(g==="graph"||g==="print")){if(r==="strict")throw new Error(`POSIX class "${g}" requires min target ES2024 or non-strict accuracy`);let p={graph:"!-~",print:" -~"}[g];m&&(p=`\0-${Nt(p.codePointAt(0)-1)}${Nt(p.codePointAt(2)+1)}-`),n(pt(Jr(`[${p}]`),t))}else n(pt(ag(Jr(QG.get(g)),m),t));else if(u==="property")ty.has(Vf(g))||(e.key="sc");else if(u==="space")n(Zi(Xo("space",{negate:m}),t));else if(u==="word")n(pt(ag(Jr(Qr),m),t));else throw new Error(`Unexpected character set kind "${u}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:a,removeAllPrevSiblings:s,removeAllNextSiblings:l}){const{kind:d,flags:u}=e;if(d==="flags")if(!u.enable&&!u.disable)r();else{const m=or({flags:u});m.body[0].body=l(),a(pt(m,t),{traverse:!0})}else if(d==="keep"){const m=n.body[0],p=n.body.length===1&&oN(m,{type:"Group"})&&m.body[0].body.length===1?m.body[0]:n;if(t.parent!==p||p.body.length>1)throw new Error(ke`Uses "\K" in a way that's unsupported`);const v=Oa({behind:!0});v.body[0].body=s(),a(pt(v,t))}else throw new Error(`Unexpected directive kind "${d}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(pt(Oa({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=or();t.body[0].body.push(e.body),e.body=pt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,a=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const l=SN(s.body);l?(r=!0,Array.isArray(l)?n.push(...l):n.push(l)):a=!0}r&&!a&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(ke`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!ig(n)&&(n=rg(n,t),e.ref=n)}},nq={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:a}=e;r||n.set(e,[...t.get(a).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:a,groupsByName:s,multiplexCapturesToLeftByRef:l,openRefs:d,reffedNodesByReferencer:u}){const m=a.get(e);if(m&&d.has(e.number)){const p=Zi(iE(e.number),t);u.set(p,d.get(e.number)),n(p);return}d.set(e.number,e),l.set(e.number,[]),e.name&&nc(l,e.name,[]);const g=l.get(e.name??e.number);for(let p=0;p<g.length;p++){const v=g[p];if(m===v.node||m&&m===v.origin||e===v.origin){g.splice(p,1);break}}if(l.get(e.number).push({node:e,origin:m}),e.name&&l.get(e.name).push({node:e,origin:m}),e.name){const p=nc(s,e.name,new Map);let v=!1;if(m)v=!0;else for(const y of p.values())if(!y.hasDuplicateNameToRemove){v=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:v})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=lf(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:a,ref:s}=e;if(a){let g=t;for(;(g=g.parent)&&!(g.type==="CapturingGroup"&&(g.name===s||g.number===s)););r.reffedNodesByReferencer.set(e,g);return}const l=r.subroutineRefMap.get(s),d=s===0,u=d?iE(0):yN(l,r.groupOriginByCopy,null);let m=u;if(!d){const g=xN(oq(l,v=>v.type==="Group"&&!!v.flags)),p=g?lf(r.globalFlags,g):r.globalFlags;iq(p,r.currentFlags)||(m=or({flags:sq(p)}),m.body[0].body.push(u))}n(pt(m,t),{traverse:!d})}},rq={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const s=r.reffedNodesByReferencer.get(e).filter(l=>aq(l,e));if(!s.length)n(pt(Oa({negate:!0}),t));else if(s.length>1){const l=or({atomic:!0,body:s.reverse().map(d=>qa({body:[yb(d.number)]}))});n(pt(l,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const a=lN();e.body.at(-1).body.push(a)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function vN(e){Hl(e,{"*"({node:t,parent:n}){t.parent=n}})}function iq(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function aq(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=_N(n.parent);for(const a of r){if(a===n)break;if(a===e||wN(a,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function yN(e,t,n,r){const a=Array.isArray(e)?[]:{};for(const[s,l]of Object.entries(e))s==="parent"?a.parent=Array.isArray(n)?r:n:l&&typeof l=="object"?a[s]=yN(l,t,a,n):(s==="type"&&l==="CapturingGroup"&&t.set(a,t.get(e)??e),a[s]=l);return a}function iE(e){const t=uN(e);return t.isRecursive=!0,t}function oq(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function rg(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function xN(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(a=>{r.enable?.[a]&&(delete n.disable[a],n.enable[a]=!0),r.disable?.[a]&&(n.disable[a]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function sq({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function _N(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function SN(e){const t=e.find(n=>n.kind==="search_start"||uq(n,{negate:!1})||!lq(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const a=SN(r.body);if(!a)return null;Array.isArray(a)?n.push(...a):n.push(a)}return n}return null}function wN(e,t){const n=_N(e)??[];for(const r of n)if(r===t||wN(r,t))return!0;return!1}function lq({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function cq(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function uq(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&oN(e.body[0],{type:"Assertion",kind:"search_start"})}function ig(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Jr(e,t){const r=sN(e,{...t,unicodePropertyMap:ty}).body;return r.length>1||r[0].body.length>1?or({body:r}):r[0].body[0]}function ag(e,t){return e.negate=t,e}function Zi(e,t){return e.parent=t,e}function pt(e,t){return vN(e),e.parent=t,e}function dq(e,t){const n=pN(t),r=Sb(n.target,"ES2024"),a=Sb(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,d=null;if(!a){const y=[e.flags.ignoreCase];Hl(e,fq,{getCurrentModI:()=>y.at(-1),popModI(){y.pop()},pushModI(_){y.push(_)},setHasCasedChar(){y.at(-1)?l=!0:d=!0}})}const u={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!d)};let m=e;const g={accuracy:n.accuracy,appliedGlobalFlags:u,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:m,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!a&&l&&d),useFlagMods:a,useFlagV:r,verbose:n.verbose};function p(y){return g.lastNode=m,m=y,GG(hq[y.type],`Unexpected node type "${y.type}"`)(y,g,p)}const v={pattern:e.body.map(p).join("|"),flags:p(e.flags),options:{...e.options}};return r||(delete v.options.force.v,v.options.disable.v=!0,v.options.unicodeSetsPlugin=null),v._captureTransfers=new Map,v._hiddenCaptures=[],g.captureMap.forEach((y,_)=>{y.hidden&&v._hiddenCaptures.push(_),y.transferTo&&nc(v._captureTransfers,y.transferTo,[]).push(_)}),v}var fq={"*":{enter({node:e},t){if(oE(e)){const n=t.getCurrentModI();t.pushModI(e.flags?lf({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){oE(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){ny(Nt(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),EN(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&bN.has(e.value)&&t.setHasCasedChar()}},hq={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?ke`\B`:ke`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:a,number:s}=e,l={ignoreCase:t.currentFlags.ignoreCase},d=t.originMap.get(e);return d&&(l.hidden=!0,s>d.number&&(l.transferTo=d.number)),t.captureMap.set(s,l),`(${a?`?<${a}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Nt(e),r=Fo(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ny(n)){const a=gN(n);return t.inCharClass?a.join(""):a.length>1?`[${a.join("")}]`:a[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:a,parent:s}=e;let{body:l}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");cr.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&l.some(sE)&&(l=[Bf(45),...l.filter(m=>!sE(m))]);const d=()=>`[${a?"^":""}${l.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||cr.bugNestedClassIgnoresNegation)&&!a){const g=l.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(g.length){const p=or(),v=p.body[0];return p.parent=s,v.parent=p,l=l.filter(y=>!g.includes(y)),e.body=l,l.length?(e.parent=v,v.body.push(e)):p.body.pop(),g.forEach(y=>{const _=qa({body:[y]});y.parent=_,_.parent=p,p.body.push(_)}),n(p)}}t.inCharClass=!0;const m=d();return t.inCharClass=!1,m}const u=l[0];if(r==="union"&&!a&&u&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(cr.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&l.length===1&&u.type!=="CharacterClassRange"))return l.map(n).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return d()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=Fo(n,a),l=Fo(r,a),d=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const u=EN(e);vq(u).forEach(g=>{d.add(Array.isArray(g)?`${Fo(g[0],a)}-${Fo(g[1],a)}`:Fo(g,a))})}return`${s}-${l}${[...d].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},a){if(e==="dot")return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":ke`[^\n]`;if(e==="digit")return t?ke`\D`:ke`\d`;if(e==="property"){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&bN.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?ke`\P`:ke`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?ke`\W`:ke`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},a,s){const l=a.currentFlags;n&&(a.currentFlags=lf(l,n));const d=t.map(s).join("|"),u=!a.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!a.useFlagMods||!n)?d:`(?${yq(e,n,a.useFlagMods)}${d})`;return a.currentFlags=l,u},LookaroundAssertion({body:e,kind:t,negate:n},r,a){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(a).join("|")})`},Quantifier(e,t,n){return n(e.body)+xq(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:ke`\g<${t}&R=${r}>`}},mq=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),pq=new Set(["-","\\","]","^","["]),gq=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),aE=new Map([[9,ke`\t`],[10,ke`\n`],[11,ke`\v`],[12,ke`\f`],[13,ke`\r`],[8232,ke`\u2028`],[8233,ke`\u2029`],[65279,ke`\uFEFF`]]),bq=new RegExp("^\\p{Cased}$","u");function ny(e){return bq.test(e)}function EN(e,t){const n=!!t?.firstOnly,r=e.min.value,a=e.max.value,s=[];if(r<65&&(a===65535||a>=131071)||r===65536&&a>=131071)return s;for(let l=r;l<=a;l++){const d=Nt(l);if(!ny(d))continue;const u=gN(d).filter(m=>{const g=m.codePointAt(0);return g<r||g>a});if(u.length&&(s.push(...u),n))break}return s}function Fo(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(aE.has(e))return aE.get(e);if(e<32||e>126&&e<160||e>262143||t&&_q(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const a=n?r?gq:pq:mq,s=Nt(e);return(a.has(s)?"\\":"")+s}function vq(e){const t=e.map(a=>a.codePointAt(0)).sort((a,s)=>a-s),n=[];let r=null;for(let a=0;a<t.length;a++)t[a+1]===t[a]+1?r??=t[a]:r===null?n.push(t[a]):(n.push([r,t[a]]),r=null);return n}function yq(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:a,disable:s}=t;r=(a?.ignoreCase?"i":"")+(a?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${r}:`}function xq({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function oE({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function _q(e){return e>47&&e<58}function sE({type:e,value:t}){return e==="Character"&&t===45}var Sq=class wb extends RegExp{#t=new Map;#e=null;#r;#n=null;#i=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,r){const a=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,n),this.#r=s.source,s instanceof wb&&(this.#t=s.#t,this.#n=s.#n,this.#i=s.#i,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...r};super(a?"":t,n),this.#r=t,this.#t=Eq(s.hiddenCaptures,s.transfers),this.#i=s.strategy,this.rawOptions=r??{}}a||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:a,...s}=this.rawOptions;this.#e=new wb(this.#r,this.flags,s)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#i==="clip_search"&&n&&r){this.lastIndex=0;const a=this.#a(t.slice(r));return a&&(wq(a,r,t,this.hasIndices),this.lastIndex+=r),a}return this.#a(t)}#a(t){this.#e.lastIndex=this.lastIndex;const n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;const r=[...n];n.length=1;let a;this.hasIndices&&(a=[...n.indices],n.indices.length=1);const s=[0];for(let l=1;l<r.length;l++){const{hidden:d,transferTo:u}=this.#t.get(l)??{};if(d?s.push(null):(s.push(n.length),n.push(r[l]),this.hasIndices&&n.indices.push(a[l])),u&&r[l]!==void 0){const m=s[u];if(!m)throw new Error(`Invalid capture transfer to "${m}"`);if(n[m]=r[l],this.hasIndices&&(n.indices[m]=a[l]),n.groups){this.#n||(this.#n=Cq(this.source));const g=this.#n.get(u);g&&(n.groups[g]=r[l],this.hasIndices&&(n.indices.groups[g]=a[l]))}}}return n}};function wq(e,t,n,r){if(e.index+=t,e.input=n,r){const a=e.indices;for(let l=0;l<a.length;l++){const d=a[l];d&&(a[l]=[d[0]+t,d[1]+t])}const s=a.groups;s&&Object.keys(s).forEach(l=>{const d=s[l];d&&(s[l]=[d[0]+t,d[1]+t])})}}function Eq(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,a]of t)for(const s of a)nc(n,s,{}).transferTo=r;return n}function Cq(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,a=0,s;for(;s=t.exec(e);){const{0:l,groups:{capture:d,name:u}}=s;l==="["?r++:r?l==="]"&&r--:d&&(a++,u&&n.set(a,u))}return n}function kq(e,t){const n=Rq(e,t);return n.options?new Sq(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function Rq(e,t){const n=pN(t),r=sN(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:ty}),a=eq(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=dq(a,n),l=VG(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),d=HG(l.pattern),u=UG(d.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),m={pattern:u.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const g=u.hiddenCaptures.sort((_,S)=>_-S),p=Array.from(u.captureTransfers),v=a._strategy,y=m.pattern.length>=n.lazyCompileLength;(g.length||p.length||v||y)&&(m.options={...g.length&&{hiddenCaptures:g},...p.length&&{transfers:p},...v&&{strategy:v},...y&&{lazyCompile:y}})}return m}function Aq(e,t){return kq(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Tq(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>Aq(n,{target:t.target}),{createScanner(n){return new FF(n,t)},createString(n){return{content:n}}}}async function Nq(e){if(xT())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Zp.get(e);if(t!=null)return t;try{let n=DV.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(lb,e)&&(n=lb[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const r=n().then(({default:a})=>{const s={name:e,data:a};return Xl.has(e)||Xl.set(e,s),s});return Zp.set(e,r),await r}finally{Zp.delete(e)}}function jq(e){return Xl.get(e)??Nq(e)}const Eb=new Set;function rc(e){const t=[],n=new Set;for(const p of Lq(e.themes)){const v=CN(p)?p.getThemes():[p];for(const y of v){if(n.has(y.name))throw new Error(`Theme collection already contains theme "${y.name}"`);n.add(y.name),t.push(y)}}const r=Object.freeze([...t]),a=Object.freeze(r.filter(p=>p.colorScheme==="light")),s=Object.freeze(r.filter(p=>p.colorScheme==="dark")),l=new Map(r.map(p=>[p.name,p])),d=Object.freeze(r.map(p=>p.name)),u=Object.freeze(a.map(p=>p.name)),m=Object.freeze(s.map(p=>p.name));function g(p){if(p==null)return r;const{colorScheme:v,collection:y}=p;return y==null?v==="light"?a:v==="dark"?s:r:r.filter(_=>_.collection!==y?!1:v==null||_.colorScheme===v)}return{getTheme(p){return l.get(p)},getThemes(p){return g(p)},getThemeNames(p){return p?.collection==null?p?.colorScheme==="light"?u:p?.colorScheme==="dark"?m:d:g(p).map(v=>v.name)},hasTheme(p){return l.has(p)},orderBy(p){return rc({themes:r.map((v,y)=>({descriptor:v,index:y})).sort((v,y)=>{const _=p(v.descriptor,y.descriptor);return _!==0?_:v.index-y.index}).map(v=>v.descriptor)})},pick(p){const v=[],y=new Set;for(const _ of p){if(y.has(_))throw new Error(`Theme collection pick already includes theme "${_}"`);y.add(_);const S=l.get(_);if(S==null)throw new Error(`Theme collection does not contain theme "${_}"`);v.push(S)}return rc({themes:v})},registerInto(p){for(const v of r)p.registerThemeIfAbsent(v.name,v.load)}}}function Lq(e){return Oq(e)?[e]:e}function Oq(e){return CN(e)||Dq(e)}function Dq(e){return typeof e.name=="string"&&typeof e.load=="function"}function CN(e){return typeof e.getThemes=="function"}function kN(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var Iq=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},Mq=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},Pq=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function zq(){const e=new Map,t=new Map,n=new Map;let r=0;function a(k,C){if(e.has(k))throw new Iq(k);e.set(k,C)}function s(k,C){return e.has(k)?!1:(e.set(k,C),!0)}function l(k){return e.has(k)}function d(k){const C=t.get(k);if(C!==void 0)return Promise.resolve(C);const A=n.get(k);if(A!==void 0)return A;const O=e.get(k);if(O===void 0)return Promise.reject(new Mq(k));const L=r,T=O().then(D=>{const M=kN(D);return L===r&&t.set(k,M),n.get(k)===T&&n.delete(k),M}).catch(D=>{throw n.get(k)===T&&n.delete(k),D});return n.set(k,T),T}function u(k){return Promise.all(k.map(C=>d(C)))}function m(k,C){t.set(k,C)}function g(k){for(const[C,A]of k)m(C,A)}function p(k){return t.get(k)}function v(k){const C=[];for(const A of k){const O=t.get(A);if(O===void 0)throw new Pq(A);C.push(O)}return C}function y(k){return t.has(k)}function _(k){for(const C of k)if(!t.has(C))return!1;return!0}function S(k){const C=t.get(k);return C!==void 0?C:d(k)}function E(){r++,t.clear(),n.clear()}return{clearResolvedThemes:E,getResolvedOrResolveTheme:S,getResolvedTheme:p,getResolvedThemes:v,hasRegisteredTheme:l,hasResolvedTheme:y,hasResolvedThemes:_,registerTheme:a,registerThemeIfAbsent:s,resolveTheme:d,resolveThemes:u,seedResolvedTheme:m,seedResolvedThemes:g}}const Xi=zq();function lE(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let r;if(typeof n=="string"){if(r=Xi.getResolvedTheme(n),r==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else r=n,n=n.name,Xi.getResolvedTheme(n)==null&&Xi.seedResolvedTheme(n,r);Eb.has(n)||(Eb.add(n),t.loadThemeSync(r))}}function RN({name:e,load:t,colorScheme:n,collection:r,displayName:a}){return{name:e,colorScheme:n,collection:r,displayName:a,load:$q(t)}}function $q(e){return async()=>$f(kN(await e()))}const Uq="pierre",Hq=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],AN=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Bq=[...AN,...Hq],Vq=new Set(AN);function Fq(e){return Vq.has(e)?"light":"dark"}const Gq={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},qq={"pierre-dark":()=>N(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>N(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>N(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>N(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>N(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>N(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>N(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>N(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>N(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>N(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function Zq(e){return RN({name:e,collection:Uq,colorScheme:Fq(e),displayName:Gq[e],load:qq[e]})}const TN=rc({themes:Bq.map(e=>Zq(e))}),Wq="shiki",NN=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],Yq=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],Kq=new Set(NN);function Xq(e){return Kq.has(e)?"light":"dark"}const Qq={andromeeda:()=>N(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>N(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>N(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>N(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>N(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>N(()=>import("./catppuccin-frappe-CZL1YF0i.js"),[]),"catppuccin-latte":()=>N(()=>import("./catppuccin-latte-DH-8KZSZ.js"),[]),"catppuccin-macchiato":()=>N(()=>import("./catppuccin-macchiato-B7yYVSCf.js"),[]),"catppuccin-mocha":()=>N(()=>import("./catppuccin-mocha-Ct7hS0mc.js"),[]),"dark-plus":()=>N(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>N(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>N(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>N(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>N(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>N(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>N(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>N(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>N(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>N(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>N(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>N(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>N(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>N(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>N(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>N(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>N(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>N(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>N(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>N(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>N(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>N(()=>import("./kanagawa-dragon-BuwD2xS4.js"),[]),"kanagawa-lotus":()=>N(()=>import("./kanagawa-lotus-C3DzagqV.js"),[]),"kanagawa-wave":()=>N(()=>import("./kanagawa-wave-DFGoQZhC.js"),[]),laserwave:()=>N(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>N(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>N(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>N(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>N(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>N(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>N(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>N(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>N(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>N(()=>import("./monokai-BRVnQi9A.js"),[]),"night-owl":()=>N(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>N(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>N(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>N(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>N(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>N(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>N(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>N(()=>import("./red-hvxz__6c.js"),[]),"rose-pine":()=>N(()=>import("./rose-pine-5qJOZa0Y.js"),[]),"rose-pine-dawn":()=>N(()=>import("./rose-pine-dawn-zx0QlTCp.js"),[]),"rose-pine-moon":()=>N(()=>import("./rose-pine-moon-C9pEdX9L.js"),[]),"slack-dark":()=>N(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>N(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>N(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>N(()=>import("./solarized-dark-CpvCGNkr.js"),[]),"solarized-light":()=>N(()=>import("./solarized-light-Dlz6yCKv.js"),[]),"synthwave-84":()=>N(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>N(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>N(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>N(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>N(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>N(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function cE(e){return RN({name:e,collection:Wq,colorScheme:Xq(e),load:Qq[e]})}const jN=rc({themes:Object.freeze([...NN.map(e=>cE(e)),...Yq.map(e=>cE(e))])});rc({themes:[TN,jN]});function Jq(e){if(xT())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(Xi.hasRegisteredTheme(e))return;const t=jN.getTheme(e);if(t!=null){Xi.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function eZ(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function tZ(e){Jq(e);const t=await Xi.resolveTheme(e);return eZ(e,t),t}function nZ(e){return Xi.getResolvedTheme(e)??tZ(e)}let yr;async function rZ({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){yr??=VF({themes:[],langs:["text"],engine:n==="shiki-wasm"?CT(N(()=>import("./wasm-CG6Dc4jp.js"),[])):Tq()});const r=aZ(yr)?await yr:yr;yr=r;const a=[];for(const l of t){if(l==="text"||l==="ansi")continue;const d=jq(l);"then"in d?a.push(d):C1(d,r)}const s=[];for(const l of e){const d=nZ(l);"then"in d?s.push(d):lE(d,yr)}return(a.length>0||s.length>0)&&await Promise.all([Promise.all(a).then(l=>{C1(l,r)}),Promise.all(s).then(l=>{lE(l,r)})]),r}function iZ(){if(yr!=null&&!("then"in yr))return yr}function aZ(e=yr){return e!=null&&"then"in e}for(const e of TN.getThemes())Xi.registerThemeIfAbsent(e.name,e.load);function LN(e=Yn){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function og(e){for(const t of LN(e))if(!Eb.has(t))return!1;return!0}function uE(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function ON(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function oZ(e){return Ne({tagName:"div",children:[Ne({tagName:"div",children:e.annotations?.map(t=>Ne({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function sZ(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function lZ({fileOrDiff:e,mode:t,stickyHeader:n}){const r="type"in e?e:void 0,a={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?"":void 0};return Ne({tagName:"div",children:[t==="custom"?Ne({tagName:"slot",properties:{name:Fv}}):cZ({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:r?.type??"file"}),...t==="custom"?[]:[uZ(r)]],properties:a})}function cZ({name:e,prevName:t,iconType:n}){const r=[Ne({tagName:"slot",properties:{name:rT}}),Kd({name:sZ(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(Ne({tagName:"div",children:[Ne({tagName:"bdi",children:[Er(t)]})],properties:{"data-prev-name":""}})),r.push(Kd({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),r.push(Ne({tagName:"div",children:[Ne({tagName:"bdi",children:[Er(e)]})],properties:{"data-title":""}})),Ne({tagName:"div",children:r,properties:{"data-header-content":""}})}function uZ(e){const t=[];if(e!=null){let n=0,r=0;for(const a of e.hunks)n+=a.additionLines,r+=a.deletionLines;(r>0||n===0)&&t.push(Ne({tagName:"span",children:[Er(`-${r}`)],properties:{"data-deletions-count":""}})),(n>0||r===0)&&t.push(Ne({tagName:"span",children:[Er(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(Ne({tagName:"slot",properties:{name:iT}})),Ne({tagName:"div",children:t,properties:{"data-metadata":""}})}function dZ(e){return Ne({tagName:"pre",properties:fZ(e)})}function fZ({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:a,totalLines:s,type:l,customProperties:d}){return{...d,"data-diff":l==="diff"?"":void 0,"data-file":l==="file"?"":void 0,"data-diff-type":l==="diff"?a?"split":"single":void 0,"data-overflow":r,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${s}`.length}ch;`}}const Go=new Map,Cl={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Ua(e){if(Go.has(e))return Go.get(e)??"text";if(Cl[e]!=null)return Cl[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Go.has(t[1]))return Go.get(t[1])??"text";if(Cl[t[1]]!=null)return Cl[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Go.has(n)?Go.get(n)??"text":Cl[n]??"text"}function hZ(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:LN(t),preferredHighlighter:n}}function us(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function ds(e){return e.replace(/\n$|\r\n$/,"")}function mZ(e,t,n){const r=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(r==null){const a=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(a,{node:e,line:t,state:n}),new Error(a)}return e.tagName="div",e.properties["data-line"]=r.lineNumber,e.properties["data-alt-line"]=r.altLineNumber,e.properties["data-line-type"]=r.type,e.properties["data-line-index"]=r.lineIndex,e.children.length===0&&e.children.push(Er(`
|
|
271
|
+
`)),e}const od=Symbol("no-token"),sg=Symbol("multiple-tokens");function DN(e){const t=pZ(e);if(t!=null)return t;let n=od;const r=[];let a=[],s;const l=()=>{if(a.length===0||s==null){a=[],s=void 0;return}if(a.length===1){const u=a[0];if(u?.type==="element"){gZ(u,s);for(const m of u.children)Nd(m)}else Nd(u);r.push(u),a=[],s=void 0;return}for(const u of a)Nd(u);r.push(Ne({tagName:"span",properties:{"data-char":s},children:a})),a=[],s=void 0},d=u=>{if(u!==od){if(u===sg){n=sg;return}if(n===od){n=u;return}n!==u&&(n=sg)}};for(const u of e.children){const m=u.type==="element"?DN(u):od;if(d(m),typeof m!="number"){l(),r.push(u);continue}s!=null&&s!==m&&l(),s??=m,a.push(u)}return l(),e.children=r,n}function pZ(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function Nd(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)Nd(t)}}function gZ(e,t){e.properties["data-char"]=t}function bZ(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:r=d=>d}=e,a=new Map;function s(d){return Object.entries(d).map(([u,m])=>`${u}:${m}`).join(";")}function l(d){const u=typeof d=="string"?d:s(d);let m=t+vZ(u)+n;return m=r(m),a.has(m)||a.set(m,typeof d=="string"?d:{...d}),m}return{name:"@shikijs/transformers:style-to-class",pre(d){if(!d.properties.style)return;const u=l(d.properties.style);delete d.properties.style,this.addClassToHast(d,u)},tokens(d){for(const u of d)for(const m of u){if(!m.htmlStyle)continue;const g=l(m.htmlStyle);m.htmlStyle={},m.htmlAttrs||={},m.htmlAttrs.class?m.htmlAttrs.class+=` ${g}`:m.htmlAttrs.class=g}},getClassRegistry(){return a},getCSS(){let d="";for(const[u,m]of a.entries())d+=`.${u}{${typeof m=="string"?m:s(m)}}`;return d},clearRegistry(){a.clear()}}}function vZ(e,t=0){let n=3735928559^t,r=1103547991^t;for(let a=0,s;a<e.length;a++)s=e.charCodeAt(a),n=Math.imul(n^s,2654435761),r=Math.imul(r^s,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function yZ(e=!1,t=!1){const n={lineInfo:[]},r=[{line(a){return delete a.properties.class,a},pre(a){const s=n7(a),l=[];if(s!=null){let d=1;for(const u of s.children)u.type==="element"&&(e&&DN(u),l.push(mZ(u,d,n)),d++);s.children=l}return a},...e?{tokens(a){for(const s of a){let l=0;for(const d of s){const u=d;u.__lineChar??=l,l+=d.content.length}}},preprocess(a,s){s.mergeWhitespaces="never"},span(a,s,l,d,u){if(u?.offset!=null&&u.content!=null){const m=u.__lineChar;return m!=null&&(a.properties["data-char"]=m),a}return a}}:null}];return t&&r.push(xZ,dE),{state:n,transformers:r,toClass:dE}}const dE=bZ({classPrefix:"hl-"}),xZ={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const r={};n.color!=null&&(r.color=n.color),n.bgColor!=null&&(r["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(r["font-style"]="italic"),(n.fontStyle&2)!==0&&(r["font-weight"]="bold"),(n.fontStyle&4)!==0&&(r["text-decoration"]="underline")),Object.keys(r).length>0&&(n.htmlStyle=r)}}};function ar(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const _Z=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,SZ=/^0(?:\.0+)?%?$/;function wZ(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const r=e.slice(t+1,-1).trim();if(r.length===0)return;const a=r.lastIndexOf("/");if(a!==-1)return r.slice(a+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const s=r.split(",");if(s.length===4)return s[3]?.trim()}}function EZ(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let r,a=1;return n.length===3?r=n.split("").map(s=>s+s).join(""):n.length===6?r=n:(r=n.slice(0,6),a=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),a]}function lg(e){if(e==null)return null;const t=EZ(e);if(t==null)return null;const n=t[0]/255,r=t[1]/255,a=t[2]/255,s=l=>l<=.03928?l/12.92:((l+.055)/1.055)**2.4;return .2126*s(n)+.7152*s(r)+.0722*s(a)}function fE(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||_Z.test(t))return!0;const n=wZ(t);return n!=null&&SZ.test(n)}function CZ(e,t,n){if(t==null||n==null)return!1;const r=lg(e),a=lg(t),s=lg(n);return r==null||a==null||s==null?!1:Math.abs(r-s)<Math.abs(r-a)}const hE=new WeakMap;function cg(e){const t=hE.get(e);if(t!=null)return t;const n=e.colors??{},r={...n},a=n["editor.background"]??e.bg,s=n["editor.foreground"]??e.fg,l=n["sideBar.background"]??a,d=n["sideBar.foreground"]??s;gr(r,"editor.background",a),gr(r,"editor.foreground",s),gr(r,"sideBar.background",l),gr(r,"sideBar.foreground",d),gr(r,"input.background",n["input.background"]??l),gr(r,"sideBarSectionHeader.foreground",n["sideBarSectionHeader.foreground"]??d),gr(r,"list.activeSelectionForeground",n["list.activeSelectionForeground"]??d),gr(r,"gitDecoration.addedResourceForeground",ug(n["gitDecoration.addedResourceForeground"],n["terminal.ansiGreen"],n["editorGutter.addedBackground"])),gr(r,"gitDecoration.modifiedResourceForeground",ug(n["gitDecoration.modifiedResourceForeground"],n["terminal.ansiBlue"],n["editorGutter.modifiedBackground"])),gr(r,"gitDecoration.deletedResourceForeground",ug(n["gitDecoration.deletedResourceForeground"],n["terminal.ansiRed"],n["editorGutter.deletedBackground"]));const u=(fE(n["list.focusOutline"])?void 0:n["list.focusOutline"])??(fE(n.focusBorder)?void 0:n.focusBorder);u!=null?r["list.focusOutline"]=u:delete r["list.focusOutline"];const m=n["list.hoverBackground"];m!=null&&(kZ(m,l)||CZ(m,l,d))&&delete r["list.hoverBackground"];const g=Object.freeze({...e,colors:Object.freeze(r)});return hE.set(e,g),g}function gr(e,t,n){n!=null&&n!==""&&(e[t]=n)}function ug(...e){for(const t of e)if(t!=null&&t!=="")return t}function kZ(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function RZ({theme:e=Yn,highlighter:t,prefix:n}){let r="";if(typeof e=="string"){const a=t.getTheme(e),s=cg(a);r+=`color:${s.fg};`,r+=`background-color:${s.bg};`,r+=`${ar("global")}fg:${s.fg};`,r+=`${ar("global")}bg:${s.bg};`,r+=dg(a,n)}else{let a=t.getTheme(e.dark),s=cg(a);r+=`${ar("global")}dark:${s.fg};`,r+=`${ar("global")}dark-bg:${s.bg};`,r+=dg(a,"dark"),a=t.getTheme(e.light),s=cg(a),r+=`${ar("global")}light:${s.fg};`,r+=`${ar("global")}light-bg:${s.bg};`,r+=dg(a,"light")}return r}function dg(e,t){t=t!=null?`${t}-`:"";let n="";const r=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];r!=null&&(n+=`${ar("global")}${t}addition-color:${r};`);const a=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];a!=null&&(n+=`${ar("global")}${t}deletion-color:${a};`);const s=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return s!=null&&(n+=`${ar("global")}${t}modified-color:${s};`),n}function mE(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}const AZ="-1,-1";function TZ(e){return e?.some(t=>t.lineNumber===0)??!1}function pE(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function IN(e){return e.startingLine===0&&e.totalLines>0}function NZ(e,t){return Ne({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function jZ(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}const LZ=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
272
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
273
|
+
<path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
|
|
274
|
+
</symbol>
|
|
275
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
276
|
+
<path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
|
|
277
|
+
</symbol>
|
|
278
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
279
|
+
<path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
|
|
280
|
+
</symbol>
|
|
281
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
282
|
+
<path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
|
|
283
|
+
</symbol>
|
|
284
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
285
|
+
<path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
|
|
286
|
+
</symbol>
|
|
287
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
288
|
+
<path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
|
|
289
|
+
</symbol>
|
|
290
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
291
|
+
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
|
|
292
|
+
</symbol>
|
|
293
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
294
|
+
<path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
|
|
295
|
+
</symbol>
|
|
296
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
297
|
+
<path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
|
|
298
|
+
</symbol>
|
|
299
|
+
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
300
|
+
<path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
|
|
301
|
+
</symbol>
|
|
302
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
303
|
+
<path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
304
|
+
</symbol>
|
|
305
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
306
|
+
<path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
307
|
+
</symbol>
|
|
308
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
309
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
|
|
310
|
+
</symbol>
|
|
311
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
312
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
|
|
313
|
+
</symbol>
|
|
314
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
315
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
|
|
316
|
+
</symbol>
|
|
317
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
318
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
|
|
319
|
+
</symbol>
|
|
320
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
321
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
|
|
322
|
+
</symbol>
|
|
323
|
+
</svg>`;function OZ(e,t){return e==null||t==null?e===t:DZ(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const gE={};function DZ(e=gE,t=gE){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n)if(e[a]!==t[a])return!1;return!0}function IZ(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function MZ(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function PZ(){const e=document.createElement("style");return e.setAttribute(KB,""),e}var zZ=`@layer base {
|
|
324
|
+
:host {
|
|
325
|
+
--diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",
|
|
326
|
+
"Courier New", monospace;
|
|
327
|
+
--diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
|
|
328
|
+
"Noto Sans", "Liberation Sans", Arial, sans-serif;
|
|
329
|
+
--diffs-mixer: light-dark(#000, #fff);
|
|
330
|
+
--diffs-gap-fallback: 8px;
|
|
331
|
+
--diffs-scrollbar-gutter-fallback: 6px;
|
|
332
|
+
--diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));
|
|
333
|
+
--diffs-added-light: #0dbe4e;
|
|
334
|
+
--diffs-added-dark: #5ecc71;
|
|
335
|
+
--diffs-modified-light: #009fff;
|
|
336
|
+
--diffs-modified-dark: #69b1ff;
|
|
337
|
+
--diffs-deleted-light: #ff2e3f;
|
|
338
|
+
--diffs-deleted-dark: #ff6762;
|
|
339
|
+
color-scheme: light dark;
|
|
340
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
341
|
+
font-size: var(--diffs-font-size, 13px);
|
|
342
|
+
line-height: var(--diffs-line-height, 20px);
|
|
343
|
+
font-feature-settings: var(--diffs-font-features);
|
|
344
|
+
--diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));
|
|
345
|
+
--diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));
|
|
346
|
+
--diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));
|
|
347
|
+
--diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));
|
|
348
|
+
--diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));
|
|
349
|
+
--diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));
|
|
350
|
+
--diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));
|
|
351
|
+
--diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));
|
|
352
|
+
--diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));
|
|
353
|
+
--diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));
|
|
354
|
+
--diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));
|
|
355
|
+
--diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));
|
|
356
|
+
--diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));
|
|
357
|
+
--diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));
|
|
358
|
+
--diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));
|
|
359
|
+
--diffs-selection-base: var(--diffs-modified-base);
|
|
360
|
+
--diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));
|
|
361
|
+
background-color: var(--diffs-bg);
|
|
362
|
+
color: var(--diffs-fg);
|
|
363
|
+
display: block;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
pre, code, [data-error-wrapper] {
|
|
367
|
+
isolation: isolate;
|
|
368
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
369
|
+
outline: none;
|
|
370
|
+
margin: 0;
|
|
371
|
+
padding: 0;
|
|
372
|
+
display: block;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
pre, code {
|
|
376
|
+
background-color: var(--diffs-bg);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
code {
|
|
380
|
+
contain: content;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
*, :before, :after {
|
|
384
|
+
box-sizing: border-box;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
[data-icon-sprite] {
|
|
388
|
+
display: none;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
[data-diffs-header], [data-separator] {
|
|
392
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
[data-diffs-header][data-sticky] {
|
|
396
|
+
z-index: 1;
|
|
397
|
+
background-color: var(--diffs-bg);
|
|
398
|
+
position: sticky;
|
|
399
|
+
top: 0;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
[data-file-info] {
|
|
403
|
+
color: var(--fg);
|
|
404
|
+
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
405
|
+
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
406
|
+
padding: 10px;
|
|
407
|
+
font-weight: 700;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
[data-diff], [data-file] {
|
|
411
|
+
--diffs-grid-number-column-width: minmax(min-content, max-content);
|
|
412
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
|
|
413
|
+
|
|
414
|
+
&[data-dehydrated] {
|
|
415
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
&:hover [data-code]::-webkit-scrollbar-thumb {
|
|
419
|
+
background-color: var(--diffs-bg-context);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
@supports (-webkit-touch-callout: none) {
|
|
424
|
+
:host {
|
|
425
|
+
--diffs-scrollbar-gutter-fallback: 0px;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
[data-line] span {
|
|
430
|
+
color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));
|
|
431
|
+
background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
|
|
432
|
+
font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));
|
|
433
|
+
font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));
|
|
434
|
+
text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
[data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions] {
|
|
438
|
+
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
439
|
+
--diffs-computed-diff-line-bg: var(--diffs-bg);
|
|
440
|
+
--diffs-computed-selected-line-bg: var(--diffs-bg);
|
|
441
|
+
color: var(--diffs-fg);
|
|
442
|
+
background-color: var(--diffs-line-bg, var(--diffs-bg));
|
|
443
|
+
|
|
444
|
+
@media (pointer: fine) {
|
|
445
|
+
&:where([data-hovered]) {
|
|
446
|
+
--diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,
|
|
447
|
+
var(--diffs-computed-selected-line-bg) 97%,
|
|
448
|
+
var(--diffs-bg-hover-override, var(--diffs-mixer))), color-mix(in lab,
|
|
449
|
+
var(--diffs-computed-selected-line-bg) 91%,
|
|
450
|
+
var(--diffs-bg-hover-override, var(--diffs-mixer))));
|
|
451
|
+
--diffs-line-bg: var(--diffs-computed-hovered-line-bg, inherit);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
[data-line], [data-no-newline] {
|
|
457
|
+
&[data-decoration-bg] {
|
|
458
|
+
--mix-deco-light: 92%;
|
|
459
|
+
--mix-deco-dark: 85%;
|
|
460
|
+
|
|
461
|
+
&[data-decoration-bg-depth="2"] {
|
|
462
|
+
--mix-deco-light: 88%;
|
|
463
|
+
--mix-deco-dark: 80%;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
&[data-decoration-bg-depth="3"] {
|
|
467
|
+
--mix-deco-light: 85%;
|
|
468
|
+
--mix-deco-dark: 78%;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
@media (pointer: fine) {
|
|
472
|
+
&[data-hovered]:not([data-selected-line]) {
|
|
473
|
+
--mix-deco-light: 85%;
|
|
474
|
+
--mix-deco-dark: 85%;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
&[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="2"] {
|
|
478
|
+
--mix-deco-light: 83%;
|
|
479
|
+
--mix-deco-dark: 83%;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
&[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="3"] {
|
|
483
|
+
--mix-deco-light: 81%;
|
|
484
|
+
--mix-deco-dark: 81%;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
489
|
+
var(--diffs-bg) var(--mix-deco-light),
|
|
490
|
+
var(--diffs-decoration-bg)), color-mix(in lab,
|
|
491
|
+
var(--diffs-bg) var(--mix-deco-dark),
|
|
492
|
+
var(--diffs-decoration-bg)));
|
|
493
|
+
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
494
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
|
|
495
|
+
--diffs-line-bg: var(--diffs-computed-decoration-bg);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
[data-line-annotation], [data-gutter-buffer="annotation"] {
|
|
500
|
+
--diffs-annotation-bg: var(--diffs-bg-context);
|
|
501
|
+
--diffs-computed-decoration-bg: var(--diffs-annotation-bg);
|
|
502
|
+
--diffs-computed-diff-line-bg: var(--diffs-annotation-bg);
|
|
503
|
+
--diffs-computed-selected-line-bg: var(--diffs-annotation-bg);
|
|
504
|
+
--diffs-line-bg: var(--diffs-annotation-bg);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
[data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {
|
|
508
|
+
--diffs-computed-decoration-bg: var(--diffs-bg-context);
|
|
509
|
+
--diffs-computed-diff-line-bg: var(--diffs-bg-context);
|
|
510
|
+
--diffs-computed-selected-line-bg: var(--diffs-bg-context);
|
|
511
|
+
--diffs-line-bg: var(--diffs-bg-context);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
[data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {
|
|
515
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
516
|
+
var(--diffs-bg) 78%,
|
|
517
|
+
var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,
|
|
518
|
+
var(--diffs-bg) 68%,
|
|
519
|
+
var(--conflict-bg-current-header-override, var(--diffs-addition-base))));
|
|
520
|
+
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
521
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
|
|
522
|
+
--diffs-line-bg: var(--diffs-computed-decoration-bg);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
[data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {
|
|
526
|
+
--diffs-computed-decoration-bg: light-dark(color-mix(in lab,
|
|
527
|
+
var(--diffs-bg) 78%,
|
|
528
|
+
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,
|
|
529
|
+
var(--diffs-bg) 68%,
|
|
530
|
+
var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));
|
|
531
|
+
--diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);
|
|
532
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg);
|
|
533
|
+
--diffs-line-bg: var(--diffs-computed-decoration-bg);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
[data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {
|
|
537
|
+
--diffs-computed-decoration-bg: var(--diffs-bg);
|
|
538
|
+
--diffs-computed-diff-line-bg: var(--diffs-bg);
|
|
539
|
+
--diffs-computed-selected-line-bg: var(--diffs-bg);
|
|
540
|
+
--diffs-line-bg: var(--diffs-bg);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
:where([data-background]) {
|
|
544
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
545
|
+
--mix-light: 91%;
|
|
546
|
+
--mix-dark: 85%;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
& [data-line], & [data-no-newline] {
|
|
550
|
+
--mix-light: 88%;
|
|
551
|
+
--mix-dark: 80%;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
& [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {
|
|
555
|
+
--diffs-diff-line-mix-target: var(--diffs-bg);
|
|
556
|
+
|
|
557
|
+
&[data-line-type="change-deletion"] {
|
|
558
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));
|
|
559
|
+
|
|
560
|
+
@media (pointer: fine) {
|
|
561
|
+
&[data-hovered] {
|
|
562
|
+
--mix-light: 80%;
|
|
563
|
+
--mix-dark: 75%;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
568
|
+
color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));
|
|
569
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
573
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
574
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
575
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
576
|
+
var(--diffs-diff-line-mix-target)));
|
|
577
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
578
|
+
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
&[data-line-type="change-addition"] {
|
|
582
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));
|
|
583
|
+
|
|
584
|
+
@media (pointer: fine) {
|
|
585
|
+
&[data-hovered] {
|
|
586
|
+
--mix-light: 80%;
|
|
587
|
+
--mix-dark: 70%;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
592
|
+
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
593
|
+
--diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
597
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
598
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
599
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
600
|
+
var(--diffs-diff-line-mix-target)));
|
|
601
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
602
|
+
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
&[data-merge-conflict="current"] {
|
|
606
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));
|
|
607
|
+
|
|
608
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
609
|
+
color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));
|
|
610
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
@media (pointer: fine) {
|
|
614
|
+
&[data-hovered] {
|
|
615
|
+
--mix-light: 80%;
|
|
616
|
+
--mix-dark: 70%;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
621
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
622
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
623
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
624
|
+
var(--diffs-diff-line-mix-target)));
|
|
625
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
626
|
+
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
&[data-merge-conflict="incoming"] {
|
|
630
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));
|
|
631
|
+
|
|
632
|
+
&:where([data-gutter-buffer], [data-column-number]) {
|
|
633
|
+
color: var(--diffs-modified-base);
|
|
634
|
+
--diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
@media (pointer: fine) {
|
|
638
|
+
&[data-hovered] {
|
|
639
|
+
--mix-light: 80%;
|
|
640
|
+
--mix-dark: 70%;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
--diffs-computed-diff-line-bg: light-dark(color-mix(in lab,
|
|
645
|
+
var(--diffs-computed-decoration-bg) var(--mix-light),
|
|
646
|
+
var(--diffs-diff-line-mix-target)), color-mix(in lab,
|
|
647
|
+
var(--diffs-computed-decoration-bg) var(--mix-dark),
|
|
648
|
+
var(--diffs-diff-line-mix-target)));
|
|
649
|
+
--diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);
|
|
650
|
+
--diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
[data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline] {
|
|
656
|
+
--diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));
|
|
657
|
+
|
|
658
|
+
&:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {
|
|
659
|
+
--mix-selection-light: 82%;
|
|
660
|
+
--mix-selection-dark: 75%;
|
|
661
|
+
|
|
662
|
+
@media (pointer: fine) {
|
|
663
|
+
&[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
|
|
664
|
+
--mix-selection-light: 75%;
|
|
665
|
+
--mix-selection-dark: 70%;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
&:where([data-gutter-buffer], [data-column-number])[data-selected-line] {
|
|
671
|
+
--mix-selection-light: 75%;
|
|
672
|
+
--mix-selection-dark: 60%;
|
|
673
|
+
--diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));
|
|
674
|
+
|
|
675
|
+
@media (pointer: fine) {
|
|
676
|
+
&[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) {
|
|
677
|
+
--mix-selection-light: 70%;
|
|
678
|
+
--mix-selection-dark: 55%;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
&[data-selected-line] {
|
|
684
|
+
--diffs-computed-selected-line-bg: light-dark(color-mix(in lab,
|
|
685
|
+
var(--diffs-computed-diff-line-bg) var(--mix-selection-light),
|
|
686
|
+
var(--diffs-selection-mix-target)), color-mix(in lab,
|
|
687
|
+
var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),
|
|
688
|
+
var(--diffs-selection-mix-target)));
|
|
689
|
+
--diffs-line-bg: var(--diffs-computed-selected-line-bg, inherit);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
[data-gutter-buffer], [data-column-number] {
|
|
694
|
+
&[data-selected-line] {
|
|
695
|
+
color: var(--diffs-selection-number-fg);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
[data-no-newline] {
|
|
700
|
+
user-select: none;
|
|
701
|
+
|
|
702
|
+
& span {
|
|
703
|
+
opacity: .6;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
[data-diff-type="split"][data-overflow="scroll"] {
|
|
708
|
+
grid-template-columns: 1fr 1fr;
|
|
709
|
+
display: grid;
|
|
710
|
+
|
|
711
|
+
& [data-additions] {
|
|
712
|
+
border-left: 1px solid var(--diffs-bg);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
& [data-deletions] {
|
|
716
|
+
border-right: 1px solid var(--diffs-bg);
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
[data-code] {
|
|
721
|
+
grid-auto-flow: dense;
|
|
722
|
+
grid-template-columns: var(--diffs-code-grid);
|
|
723
|
+
overflow: var(--diffs-overflow-override, scroll) clip;
|
|
724
|
+
overscroll-behavior-x: none;
|
|
725
|
+
tab-size: var(--diffs-tab-size, 2);
|
|
726
|
+
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
727
|
+
padding-bottom: max(0px,
|
|
728
|
+
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -
|
|
729
|
+
var(--diffs-scrollbar-gutter)));
|
|
730
|
+
scrollbar-gutter: stable;
|
|
731
|
+
align-self: flex-start;
|
|
732
|
+
display: grid;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
[data-diffs-scrollbar-measure] {
|
|
736
|
+
opacity: 0;
|
|
737
|
+
pointer-events: none;
|
|
738
|
+
scrollbar-gutter: auto;
|
|
739
|
+
grid-template-columns: none;
|
|
740
|
+
width: 100px;
|
|
741
|
+
height: 100px;
|
|
742
|
+
padding: 0;
|
|
743
|
+
position: absolute;
|
|
744
|
+
top: -200px;
|
|
745
|
+
left: -200px;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
[data-container-size] {
|
|
749
|
+
container-type: inline-size;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
[data-code]::-webkit-scrollbar {
|
|
753
|
+
width: 0;
|
|
754
|
+
height: var(--diffs-scrollbar-gutter);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
[data-code]::-webkit-scrollbar-track {
|
|
758
|
+
background: none;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
[data-code]::-webkit-scrollbar-thumb {
|
|
762
|
+
background-color: #0000;
|
|
763
|
+
background-clip: content-box;
|
|
764
|
+
border: 1px solid #0000;
|
|
765
|
+
border-radius: 3px;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
[data-code]::-webkit-scrollbar-corner {
|
|
769
|
+
background-color: #0000;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
@supports ((-moz-appearance: none)) {
|
|
773
|
+
[data-code] {
|
|
774
|
+
scrollbar-width: thin;
|
|
775
|
+
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
776
|
+
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
[data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {
|
|
781
|
+
& [data-code], &[data-overflow="wrap"] {
|
|
782
|
+
padding-top: 0;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
[data-gutter] {
|
|
787
|
+
grid-template-rows: subgrid;
|
|
788
|
+
grid-template-columns: subgrid;
|
|
789
|
+
z-index: 3;
|
|
790
|
+
background-color: var(--diffs-bg);
|
|
791
|
+
grid-column: 1;
|
|
792
|
+
display: grid;
|
|
793
|
+
position: relative;
|
|
794
|
+
|
|
795
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
796
|
+
border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
[data-content] {
|
|
801
|
+
grid-template-rows: subgrid;
|
|
802
|
+
grid-template-columns: subgrid;
|
|
803
|
+
background-color: var(--diffs-bg);
|
|
804
|
+
grid-column: 2;
|
|
805
|
+
min-width: 0;
|
|
806
|
+
display: grid;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
[data-diff-type="split"][data-overflow="wrap"] {
|
|
810
|
+
grid-auto-flow: dense;
|
|
811
|
+
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
812
|
+
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
813
|
+
display: grid;
|
|
814
|
+
|
|
815
|
+
& [data-deletions] {
|
|
816
|
+
display: contents;
|
|
817
|
+
|
|
818
|
+
& [data-gutter] {
|
|
819
|
+
grid-column: 1;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
& [data-content] {
|
|
823
|
+
border-right: 1px solid var(--diffs-bg);
|
|
824
|
+
grid-column: 2;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
& [data-additions] {
|
|
829
|
+
display: contents;
|
|
830
|
+
|
|
831
|
+
& [data-gutter] {
|
|
832
|
+
border-left: 1px solid var(--diffs-bg);
|
|
833
|
+
grid-column: 3;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
& [data-content] {
|
|
837
|
+
grid-column: 4;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
[data-overflow="scroll"] [data-gutter] {
|
|
843
|
+
position: sticky;
|
|
844
|
+
left: 0;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
[data-interactive-lines] [data-line] {
|
|
848
|
+
cursor: pointer;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
[data-interactive-line-numbers] [data-column-number] {
|
|
852
|
+
cursor: pointer;
|
|
853
|
+
touch-action: none;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
[data-content-buffer], [data-gutter-buffer] {
|
|
857
|
+
user-select: none;
|
|
858
|
+
min-height: 1lh;
|
|
859
|
+
position: relative;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
[data-gutter-buffer] {
|
|
863
|
+
padding-left: 2ch;
|
|
864
|
+
padding-right: 1ch;
|
|
865
|
+
|
|
866
|
+
&:before {
|
|
867
|
+
content: "";
|
|
868
|
+
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
869
|
+
display: block;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
[data-gutter-buffer="annotation"] {
|
|
874
|
+
--diffs-annotation-bg: var(--diffs-bg-context-gutter);
|
|
875
|
+
min-height: 0;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
[data-gutter-buffer="buffer"] {
|
|
879
|
+
--diffs-line-bg: var(--diffs-bg-context-gutter);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
[data-content-buffer] {
|
|
883
|
+
background-position: 5px 0;
|
|
884
|
+
background-size: 8px 8px;
|
|
885
|
+
background-origin: border-box;
|
|
886
|
+
background-image: repeating-linear-gradient(-45deg,
|
|
887
|
+
transparent,
|
|
888
|
+
transparent calc(3px * 1.414),
|
|
889
|
+
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
890
|
+
var(--diffs-bg-buffer) calc(4px * 1.414));
|
|
891
|
+
grid-column: 1;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
[data-separator] {
|
|
895
|
+
box-sizing: content-box;
|
|
896
|
+
background-color: var(--diffs-bg);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
[data-separator="simple"] {
|
|
900
|
+
min-height: 4px;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {
|
|
904
|
+
background-color: var(--diffs-bg-separator);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
[data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
908
|
+
height: 32px;
|
|
909
|
+
position: relative;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
[data-separator-wrapper] {
|
|
913
|
+
user-select: none;
|
|
914
|
+
fill: currentColor;
|
|
915
|
+
background-color: var(--diffs-bg);
|
|
916
|
+
align-items: center;
|
|
917
|
+
height: 100%;
|
|
918
|
+
display: flex;
|
|
919
|
+
position: absolute;
|
|
920
|
+
inset-inline: 0;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
[data-content] [data-separator-wrapper] {
|
|
924
|
+
display: none;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
[data-separator="metadata"] [data-separator-wrapper] {
|
|
928
|
+
background-color: var(--diffs-bg-separator);
|
|
929
|
+
height: 100%;
|
|
930
|
+
color: var(--diffs-fg-number);
|
|
931
|
+
white-space: nowrap;
|
|
932
|
+
text-overflow: ellipsis;
|
|
933
|
+
min-width: min-content;
|
|
934
|
+
padding-inline: 1ch;
|
|
935
|
+
inset-inline: 100% auto;
|
|
936
|
+
overflow: hidden;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
[data-separator="line-info"] {
|
|
940
|
+
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
941
|
+
|
|
942
|
+
& [data-separator-wrapper] {
|
|
943
|
+
min-width: 16px;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
[data-separator="line-info-basic"], [data-separator="metadata"] {
|
|
948
|
+
margin-block: 0;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
[data-separator="line-info"][data-separator-first] {
|
|
952
|
+
margin-top: 0;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
[data-separator="line-info"][data-separator-last] {
|
|
956
|
+
margin-bottom: 0;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
[data-expand-index] [data-separator-wrapper] {
|
|
960
|
+
grid-template-columns: 32px auto;
|
|
961
|
+
display: grid;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
[data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
|
|
965
|
+
grid-template-columns: 32px 32px auto;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
[data-expand-button], [data-separator-content] {
|
|
969
|
+
background-color: var(--diffs-bg-separator);
|
|
970
|
+
flex: none;
|
|
971
|
+
align-items: center;
|
|
972
|
+
display: flex;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
[data-expand-index] [data-separator-content]:hover {
|
|
976
|
+
cursor: pointer;
|
|
977
|
+
text-decoration: underline;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
[data-expand-button] {
|
|
981
|
+
cursor: pointer;
|
|
982
|
+
min-width: 32px;
|
|
983
|
+
color: var(--diffs-fg-number);
|
|
984
|
+
border-right: 2px solid var(--diffs-bg);
|
|
985
|
+
flex-shrink: 0;
|
|
986
|
+
justify-content: center;
|
|
987
|
+
align-self: stretch;
|
|
988
|
+
|
|
989
|
+
&:hover {
|
|
990
|
+
color: var(--diffs-fg);
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
&[data-expand-all-button] {
|
|
994
|
+
display: none;
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
[data-expand-down] [data-icon] {
|
|
999
|
+
transform: scaleY(-1);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
[data-separator-content] {
|
|
1003
|
+
height: 100%;
|
|
1004
|
+
color: var(--diffs-fg-number);
|
|
1005
|
+
flex: auto;
|
|
1006
|
+
justify-content: flex-start;
|
|
1007
|
+
padding: 0 1ch;
|
|
1008
|
+
overflow: hidden;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
1012
|
+
& [data-separator-content] {
|
|
1013
|
+
user-select: none;
|
|
1014
|
+
height: 100%;
|
|
1015
|
+
overflow: clip;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
[data-unmodified-lines] {
|
|
1020
|
+
text-overflow: ellipsis;
|
|
1021
|
+
white-space: nowrap;
|
|
1022
|
+
flex: 0 auto;
|
|
1023
|
+
min-width: 0;
|
|
1024
|
+
display: block;
|
|
1025
|
+
overflow: hidden;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
@supports (width: 1cqi) {
|
|
1029
|
+
[data-unified] {
|
|
1030
|
+
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
1031
|
+
padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1032
|
+
width: 100cqi;
|
|
1033
|
+
|
|
1034
|
+
& [data-separator-content] {
|
|
1035
|
+
border-radius: 6px;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
& [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {
|
|
1040
|
+
border-top-left-radius: unset;
|
|
1041
|
+
border-bottom-left-radius: unset;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
[data-gutter] {
|
|
1046
|
+
& [data-separator="line-info"] [data-separator-wrapper] {
|
|
1047
|
+
padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
& [data-separator="line-info"] [data-separator-content] {
|
|
1051
|
+
border-top-left-radius: 6px;
|
|
1052
|
+
border-bottom-left-radius: 6px;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
& [data-separator="line-info"][data-expand-index] [data-separator-content] {
|
|
1056
|
+
border-top-left-radius: unset;
|
|
1057
|
+
border-bottom-left-radius: unset;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
[data-additions] {
|
|
1062
|
+
& [data-content] [data-separator="line-info"] {
|
|
1063
|
+
background-color: var(--diffs-bg);
|
|
1064
|
+
|
|
1065
|
+
& [data-separator-wrapper] {
|
|
1066
|
+
display: none;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
& [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
1071
|
+
background-color: var(--diffs-bg-separator);
|
|
1072
|
+
border-top-right-radius: 6px;
|
|
1073
|
+
border-bottom-right-radius: 6px;
|
|
1074
|
+
height: 100%;
|
|
1075
|
+
display: block;
|
|
1076
|
+
|
|
1077
|
+
& [data-separator-content], & [data-expand-button] {
|
|
1078
|
+
display: none;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
[data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {
|
|
1084
|
+
width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
[data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {
|
|
1088
|
+
background-color: var(--diffs-bg-separator);
|
|
1089
|
+
height: 100%;
|
|
1090
|
+
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1091
|
+
border-top-right-radius: 6px;
|
|
1092
|
+
border-bottom-right-radius: 6px;
|
|
1093
|
+
display: block;
|
|
1094
|
+
|
|
1095
|
+
& [data-separator-content], & [data-expand-button] {
|
|
1096
|
+
display: none;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
1101
|
+
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
1102
|
+
border-top-left-radius: 6px;
|
|
1103
|
+
border-bottom-left-radius: 6px;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
@media (pointer: fine) {
|
|
1108
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
1109
|
+
&[data-separator-multi-button] {
|
|
1110
|
+
& [data-expand-up] {
|
|
1111
|
+
border-top-left-radius: 6px;
|
|
1112
|
+
border-bottom-left-radius: unset;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
& [data-expand-down] {
|
|
1116
|
+
border-bottom-left-radius: 6px;
|
|
1117
|
+
border-top-left-radius: unset;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
@media (pointer: coarse) {
|
|
1125
|
+
[data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {
|
|
1126
|
+
grid-template-columns: 34px 34px auto;
|
|
1127
|
+
|
|
1128
|
+
& [data-separator-content] {
|
|
1129
|
+
grid-column: unset;
|
|
1130
|
+
grid-row: unset;
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
@supports (width: 1cqi) {
|
|
1135
|
+
[data-separator="line-info"] [data-separator-wrapper] {
|
|
1136
|
+
& [data-expand-both], & [data-expand-down], & [data-expand-up] {
|
|
1137
|
+
border-top-left-radius: 6px;
|
|
1138
|
+
border-bottom-left-radius: 6px;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
&[data-separator-multi-button] {
|
|
1142
|
+
& [data-expand-up] {
|
|
1143
|
+
border-top-left-radius: 6px;
|
|
1144
|
+
border-bottom-left-radius: 6px;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
& [data-expand-down] {
|
|
1148
|
+
border-bottom-left-radius: unset;
|
|
1149
|
+
border-top-left-radius: unset;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
@media (pointer: fine) {
|
|
1157
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
1158
|
+
grid-template-rows: 50% 50%;
|
|
1159
|
+
display: grid;
|
|
1160
|
+
|
|
1161
|
+
& [data-separator-content] {
|
|
1162
|
+
grid-area: 1 / 2 / -1;
|
|
1163
|
+
min-width: min-content;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
& [data-expand-button] {
|
|
1167
|
+
grid-column: 1;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
[data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {
|
|
1172
|
+
grid-template-columns: 34px auto;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
[data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {
|
|
1176
|
+
grid-template-columns: 100% auto;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
[data-separator="line-info"], [data-separator="line-info-basic"] {
|
|
1180
|
+
& [data-separator-multi-button] {
|
|
1181
|
+
& [data-expand-up] {
|
|
1182
|
+
border-bottom: 1px solid var(--diffs-bg);
|
|
1183
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
& [data-expand-down] {
|
|
1187
|
+
border-top: 1px solid var(--diffs-bg);
|
|
1188
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
[data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {
|
|
1195
|
+
display: none;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
[data-line-annotation] {
|
|
1199
|
+
min-height: var(--diffs-annotation-min-height, 0);
|
|
1200
|
+
z-index: 2;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
[data-merge-conflict-actions] {
|
|
1204
|
+
z-index: 2;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
[data-separator="custom"] {
|
|
1208
|
+
grid-template-columns: subgrid;
|
|
1209
|
+
display: grid;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
[data-line], [data-column-number], [data-no-newline] {
|
|
1213
|
+
padding-inline: 1ch;
|
|
1214
|
+
position: relative;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
[data-indicators="classic"] [data-line] {
|
|
1218
|
+
padding-inline-start: 2ch;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
[data-indicators="classic"] {
|
|
1222
|
+
& [data-line-type="change-addition"], & [data-line-type="change-deletion"] {
|
|
1223
|
+
&[data-no-newline], &[data-line] {
|
|
1224
|
+
&:before {
|
|
1225
|
+
user-select: none;
|
|
1226
|
+
width: 1ch;
|
|
1227
|
+
height: 1lh;
|
|
1228
|
+
display: inline-block;
|
|
1229
|
+
position: absolute;
|
|
1230
|
+
top: 0;
|
|
1231
|
+
left: 0;
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
& [data-line-type="change-addition"] {
|
|
1237
|
+
&[data-line], &[data-no-newline] {
|
|
1238
|
+
&:before {
|
|
1239
|
+
content: "+";
|
|
1240
|
+
color: var(--diffs-addition-base);
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
& [data-line-type="change-deletion"] {
|
|
1246
|
+
&[data-line], &[data-no-newline] {
|
|
1247
|
+
&:before {
|
|
1248
|
+
content: "-";
|
|
1249
|
+
color: var(--diffs-deletion-base);
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
[data-indicators="bars"] {
|
|
1256
|
+
& [data-line-type="change-deletion"], & [data-line-type="change-addition"] {
|
|
1257
|
+
&[data-column-number] {
|
|
1258
|
+
&:before {
|
|
1259
|
+
content: "";
|
|
1260
|
+
user-select: none;
|
|
1261
|
+
contain: strict;
|
|
1262
|
+
width: 4px;
|
|
1263
|
+
height: 100%;
|
|
1264
|
+
display: block;
|
|
1265
|
+
position: absolute;
|
|
1266
|
+
top: 0;
|
|
1267
|
+
left: 0;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
& [data-line-type="change-deletion"] {
|
|
1273
|
+
&[data-column-number] {
|
|
1274
|
+
&:before {
|
|
1275
|
+
background-image: linear-gradient(0deg,
|
|
1276
|
+
var(--diffs-bg-deletion) 50%,
|
|
1277
|
+
var(--diffs-deletion-base) 50%);
|
|
1278
|
+
background-repeat: repeat;
|
|
1279
|
+
background-size: 2px 2px;
|
|
1280
|
+
background-size: calc(1lh / round(1lh / 2px))
|
|
1281
|
+
calc(1lh / round(1lh / 2px));
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
& [data-line-type="change-addition"] {
|
|
1287
|
+
&[data-column-number] {
|
|
1288
|
+
&:before {
|
|
1289
|
+
background-color: var(--diffs-addition-base);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
[data-overflow="wrap"] {
|
|
1296
|
+
& [data-line], & [data-annotation-content] {
|
|
1297
|
+
white-space: pre-wrap;
|
|
1298
|
+
word-break: break-word;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
[data-overflow="scroll"] [data-line] {
|
|
1303
|
+
white-space: pre;
|
|
1304
|
+
min-height: 1lh;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
[data-column-number] {
|
|
1308
|
+
box-sizing: content-box;
|
|
1309
|
+
text-align: right;
|
|
1310
|
+
user-select: none;
|
|
1311
|
+
color: var(--diffs-fg-number);
|
|
1312
|
+
padding-left: 2ch;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
[data-line-number-content] {
|
|
1316
|
+
min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));
|
|
1317
|
+
z-index: 1;
|
|
1318
|
+
display: inline-block;
|
|
1319
|
+
position: relative;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
[data-disable-line-numbers] {
|
|
1323
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
1324
|
+
min-width: 4px;
|
|
1325
|
+
padding: 0;
|
|
1326
|
+
|
|
1327
|
+
&:before {
|
|
1328
|
+
min-width: 0;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
& [data-line-number-content] {
|
|
1333
|
+
display: none;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
& [data-gutter-utility-slot] {
|
|
1337
|
+
right: unset;
|
|
1338
|
+
justify-content: flex-start;
|
|
1339
|
+
left: 0;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
&[data-indicators="bars"] [data-gutter-utility-slot] {
|
|
1343
|
+
left: 6px;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
[data-file][data-disable-line-numbers] {
|
|
1348
|
+
& [data-gutter-buffer], & [data-column-number] {
|
|
1349
|
+
border-right: 0;
|
|
1350
|
+
min-width: 0;
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
[data-diff-span] {
|
|
1355
|
+
box-decoration-break: clone;
|
|
1356
|
+
border-radius: 3px;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
[data-line-type="change-addition"] [data-diff-span] {
|
|
1360
|
+
background-color: var(--diffs-bg-addition-emphasis);
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
[data-line-type="change-deletion"] [data-diff-span] {
|
|
1364
|
+
background-color: var(--diffs-bg-deletion-emphasis);
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {
|
|
1368
|
+
color: var(--diffs-fg);
|
|
1369
|
+
padding-left: 1ch;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
[data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {
|
|
1373
|
+
align-items: center;
|
|
1374
|
+
display: flex;
|
|
1375
|
+
|
|
1376
|
+
&:after {
|
|
1377
|
+
color: var(--diffs-fg-conflict-marker);
|
|
1378
|
+
font-size: .75rem;
|
|
1379
|
+
font-style: normal;
|
|
1380
|
+
line-height: 1.25rem;
|
|
1381
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1382
|
+
padding-left: 1ch;
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
[data-merge-conflict="marker-start"]:after {
|
|
1387
|
+
content: "(Current Change)";
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
[data-merge-conflict="marker-end"]:after {
|
|
1391
|
+
content: "(Incoming Change)";
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
[data-merge-conflict-actions-content] {
|
|
1395
|
+
min-height: 1.75rem;
|
|
1396
|
+
font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));
|
|
1397
|
+
color: var(--diffs-fg);
|
|
1398
|
+
align-items: center;
|
|
1399
|
+
gap: .25rem;
|
|
1400
|
+
padding-inline: .5rem;
|
|
1401
|
+
font-size: .75rem;
|
|
1402
|
+
line-height: 1.2;
|
|
1403
|
+
display: flex;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
[data-merge-conflict-action] {
|
|
1407
|
+
appearance: none;
|
|
1408
|
+
color: var(--diffs-fg-number);
|
|
1409
|
+
font: inherit;
|
|
1410
|
+
cursor: pointer;
|
|
1411
|
+
background: none;
|
|
1412
|
+
border: 0;
|
|
1413
|
+
padding: 0;
|
|
1414
|
+
font-style: normal;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
[data-merge-conflict-action]:hover {
|
|
1418
|
+
color: var(--diffs-fg);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
[data-merge-conflict-action="current"]:hover {
|
|
1422
|
+
color: var(--diffs-addition-base);
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
[data-merge-conflict-action="incoming"]:hover {
|
|
1426
|
+
color: var(--diffs-modified-base);
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
[data-merge-conflict-action-separator] {
|
|
1430
|
+
color: var(--diffs-fg-number);
|
|
1431
|
+
opacity: .6;
|
|
1432
|
+
user-select: none;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
[data-diffs-header="default"] {
|
|
1436
|
+
background-color: var(--diffs-bg);
|
|
1437
|
+
justify-content: space-between;
|
|
1438
|
+
align-items: center;
|
|
1439
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1440
|
+
min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));
|
|
1441
|
+
z-index: 2;
|
|
1442
|
+
flex-direction: row;
|
|
1443
|
+
padding-inline: 16px;
|
|
1444
|
+
display: flex;
|
|
1445
|
+
position: relative;
|
|
1446
|
+
top: 0;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
[data-header-content] {
|
|
1450
|
+
align-items: center;
|
|
1451
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1452
|
+
white-space: nowrap;
|
|
1453
|
+
flex-direction: row;
|
|
1454
|
+
min-width: 0;
|
|
1455
|
+
display: flex;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
[data-header-content] [data-prev-name], [data-header-content] [data-title] {
|
|
1459
|
+
text-overflow: ellipsis;
|
|
1460
|
+
white-space: nowrap;
|
|
1461
|
+
direction: rtl;
|
|
1462
|
+
min-width: 0;
|
|
1463
|
+
overflow: hidden;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
[data-prev-name] {
|
|
1467
|
+
opacity: .7;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
[data-rename-icon] {
|
|
1471
|
+
fill: currentColor;
|
|
1472
|
+
flex-grow: 0;
|
|
1473
|
+
flex-shrink: 0;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
[data-diffs-header="default"] [data-metadata] {
|
|
1477
|
+
white-space: nowrap;
|
|
1478
|
+
align-items: center;
|
|
1479
|
+
gap: 1ch;
|
|
1480
|
+
display: flex;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
[data-diffs-header="default"] [data-additions-count] {
|
|
1484
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1485
|
+
color: var(--diffs-addition-base);
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
[data-diffs-header="default"] [data-deletions-count] {
|
|
1489
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1490
|
+
color: var(--diffs-deletion-base);
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
[data-change-icon] {
|
|
1494
|
+
fill: currentColor;
|
|
1495
|
+
flex-shrink: 0;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
[data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {
|
|
1499
|
+
color: var(--diffs-modified-base);
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
[data-change-icon="new"] {
|
|
1503
|
+
color: var(--diffs-addition-base);
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
[data-change-icon="deleted"] {
|
|
1507
|
+
color: var(--diffs-deletion-base);
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
[data-change-icon="file"] {
|
|
1511
|
+
opacity: .6;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
[data-annotation-content] {
|
|
1515
|
+
z-index: 2;
|
|
1516
|
+
isolation: isolate;
|
|
1517
|
+
align-self: flex-start;
|
|
1518
|
+
min-width: 0;
|
|
1519
|
+
display: flow-root;
|
|
1520
|
+
position: relative;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
[data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {
|
|
1524
|
+
width: var(--diffs-column-content-width, auto);
|
|
1525
|
+
left: var(--diffs-column-number-width, 0);
|
|
1526
|
+
position: sticky;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
[data-annotation-slot] {
|
|
1530
|
+
text-wrap-mode: wrap;
|
|
1531
|
+
word-break: normal;
|
|
1532
|
+
white-space-collapse: collapse;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
[data-gutter-utility-slot] {
|
|
1536
|
+
touch-action: none;
|
|
1537
|
+
justify-content: flex-end;
|
|
1538
|
+
display: flex;
|
|
1539
|
+
position: absolute;
|
|
1540
|
+
top: 0;
|
|
1541
|
+
bottom: 0;
|
|
1542
|
+
right: 0;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
[data-utility-button] {
|
|
1546
|
+
appearance: none;
|
|
1547
|
+
cursor: pointer;
|
|
1548
|
+
width: 1lh;
|
|
1549
|
+
height: 1lh;
|
|
1550
|
+
font-size: var(--diffs-font-size, 13px);
|
|
1551
|
+
line-height: var(--diffs-line-height, 20px);
|
|
1552
|
+
background-color: var(--diffs-modified-base);
|
|
1553
|
+
color: var(--diffs-bg);
|
|
1554
|
+
fill: currentColor;
|
|
1555
|
+
z-index: 4;
|
|
1556
|
+
touch-action: none;
|
|
1557
|
+
border: none;
|
|
1558
|
+
border-radius: 4px;
|
|
1559
|
+
justify-content: center;
|
|
1560
|
+
align-items: center;
|
|
1561
|
+
margin-right: calc(-1lh + 1ch);
|
|
1562
|
+
padding: 0;
|
|
1563
|
+
display: flex;
|
|
1564
|
+
position: relative;
|
|
1565
|
+
|
|
1566
|
+
&:before {
|
|
1567
|
+
content: "";
|
|
1568
|
+
display: block;
|
|
1569
|
+
position: absolute;
|
|
1570
|
+
inset: 0 0 0 -4px;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
[data-decoration-bar-stack] {
|
|
1575
|
+
pointer-events: none;
|
|
1576
|
+
isolation: isolate;
|
|
1577
|
+
z-index: 1;
|
|
1578
|
+
background-color: var(--diffs-decoration-bar-color, transparent);
|
|
1579
|
+
box-sizing: content-box;
|
|
1580
|
+
border-left: 2px solid var(--diffs-bg);
|
|
1581
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1582
|
+
width: 6px;
|
|
1583
|
+
position: absolute;
|
|
1584
|
+
top: 0;
|
|
1585
|
+
bottom: 0;
|
|
1586
|
+
right: -2px;
|
|
1587
|
+
|
|
1588
|
+
[data-decoration-bar-depth="1"] & {
|
|
1589
|
+
background-color: color-mix(in lab,
|
|
1590
|
+
var(--diffs-bg) 20%,
|
|
1591
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
[data-decoration-bar-depth="2"] & {
|
|
1595
|
+
background-color: color-mix(in lab,
|
|
1596
|
+
var(--diffs-bg) 45%,
|
|
1597
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
[data-decoration-bar-depth="3"] & {
|
|
1601
|
+
background-color: color-mix(in lab,
|
|
1602
|
+
var(--diffs-bg) 65%,
|
|
1603
|
+
var(--diffs-decoration-bar-color, transparent));
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
[data-decoration-bar-start] & {
|
|
1607
|
+
border-top-left-radius: 5px;
|
|
1608
|
+
border-top-right-radius: 5px;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
[data-decoration-bar-end] & {
|
|
1612
|
+
z-index: 3;
|
|
1613
|
+
border-bottom-right-radius: 5px;
|
|
1614
|
+
border-bottom-left-radius: 5px;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
[data-placeholder] {
|
|
1619
|
+
contain: strict;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
[data-error-wrapper] {
|
|
1623
|
+
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
1624
|
+
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1625
|
+
scrollbar-width: none;
|
|
1626
|
+
max-height: 400px;
|
|
1627
|
+
overflow: auto;
|
|
1628
|
+
|
|
1629
|
+
& [data-error-message] {
|
|
1630
|
+
color: var(--diffs-deletion-base);
|
|
1631
|
+
font-size: 18px;
|
|
1632
|
+
font-weight: bold;
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
& [data-error-stack] {
|
|
1636
|
+
color: var(--diffs-fg-number);
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
@layer theme, rendered, unsafe;
|
|
1642
|
+
`;let sd;function Cb(e){if(sd!=null)return sd;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const n=document.createElement("div");n.setAttribute("data-code",""),n.setAttribute(XB,"true");const r=document.createElement("div");return r.style.position="relative",r.style.width="200%",r.style.height="200%",n.appendChild(r),e.appendChild(n),sd=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),sd}function MN(e){return`${aT}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}const PN="@layer base, theme, rendered, unsafe;",$Z=new RegExp(`${VZ(aT)}\\s*:\\s*[^;]+;`);function UZ(e){return`${PN}
|
|
1643
|
+
@layer unsafe {
|
|
1644
|
+
${e}
|
|
1645
|
+
}`}function HZ(e,t="system",n){return`${PN}
|
|
1646
|
+
@layer rendered {
|
|
1647
|
+
:host {${t==="system"?"":`
|
|
1648
|
+
color-scheme: ${t};`}
|
|
1649
|
+
${MN(n)}
|
|
1650
|
+
${e}
|
|
1651
|
+
}
|
|
1652
|
+
}`}function BZ(e,t){const n=MN(t);return e.replace($Z,n)}function VZ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fg({code:e,pre:t,columnType:n,rowSpan:r,containerSize:a=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),n!=null&&e.setAttribute(`data-${n}`,""),t?.appendChild(e)),r!=null?e.style.setProperty("grid-row",`span ${r}`):e.style.removeProperty("grid-row"),a?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function FZ(e,t){if(t==null)return;const n=e.shadowRoot??e.attachShadow({mode:"open"});n.innerHTML===""&&(n.innerHTML=t)}function GZ(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:a,overflow:s,split:l,totalLines:d,customProperties:u}){if(u!=null)for(const m in u){const g=u[m];g!=null&&e.setAttribute(m,`${g}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),n){case"bars":case"classic":e.setAttribute("data-indicators",n);break;case"none":e.removeAttribute("data-indicators");break}return a?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),r?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",l?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",s),e.style.setProperty("--diffs-min-number-column-width-default",`${`${d}`.length}ch`),e}function bE(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}function qZ({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===""){t?.remove();return}return t??=ZZ(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function ZZ(){const e=document.createElement("style");return e.setAttribute(YB,""),e}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const r=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(zZ)),r.adoptedStyleSheets=[e]}connectedCallback(){Cb(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(tT,t)}function hg(e){return{...JB,...e}}function Qo(e,t){const n=WZ(e,t);return t?n:e.diffHeaderHeight+n}function WZ(e,t){return e.paddingTop??(t?e.spacing:0)}function zN(e){return e.paddingBottom??e.spacing}function YZ(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}function Dl(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}const KZ=new TextEncoder,XZ=new TextDecoder("utf-8",{ignoreBOM:!0}),QZ=/[\uD800-\uDFFF]/,kb=1024;let es=new Uint8Array(kb);function $N(){es.length!==kb&&(es=new Uint8Array(kb))}function At(e){if(e.length===0)return e;if(QZ.test(e))return JSON.parse(JSON.stringify(e));const t=e.length*3;es.length<t&&(es=new Uint8Array(t));const{written:n}=KZ.encodeInto(e,es);return XZ.decode(es.subarray(0,n))}function JZ(e,t,n){try{return eW(e,t,n)}finally{$N()}}function eW(e,t,n=!1){const r=uW(e),a=r?iW(e):aW(e);let s;const l=[];for(const d of a){if(r&&!nT.test(d)){if(s==null)s=At(d);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}else if(!r&&!oW(d)){if(s==null)s=At(d);else{if(n)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",d)}continue}const u=UN(d,{cacheKey:void 0,isGitDiff:r,throwOnError:n});u!=null&&l.push(u)}return{patchMetadata:s,files:l}}function tW(e,t){try{return UN(e,t)}finally{$N()}}function UN(e,{cacheKey:t,isGitDiff:n=nT.test(e),oldFile:r,newFile:a,throwOnError:s=!1}={}){let l=0;const d=FN(e,"@@ ");let u;const m=r==null||a==null;let g=0,p=0;for(const v of d){const y=HN(v),_=y[0];if(_==null){if(s)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",v);continue}const S=VN(_);let E=0,k=0;if(S==null||u==null){if(u!=null){if(s)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",v);continue}u={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:m,additionLines:!m&&r!=null&&a!=null?vE(a.contents):[],deletionLines:!m&&r!=null&&a!=null?vE(r.contents):[],cacheKey:_E(t)},u.additionLines.length===1&&a?.contents===""&&(u.additionLines.length=0),u.deletionLines.length===1&&r?.contents===""&&(u.deletionLines.length=0);for(const B of y){if(B.startsWith("diff --git")){const F=B.trim().match(ZB),$=F?.[1]??F?.[2],q=F?.[3]??F?.[4];if($==null||q==null){if(s)throw Error("parsePatchContent: invalid git diff header");console.error("parsePatchContent: invalid git diff header",B);continue}u.name=At(q.trim()),$!==q&&(u.prevName=At($.trim()));continue}const Y=B.startsWith("---")||B.startsWith("+++")?B.match(n?qB:GB):null;if(Y!=null){const[,F,$]=Y;if(F==="---"&&$!=="/dev/null"){const q=At($.trim());u.prevName=q,u.name=q}else F==="+++"&&$!=="/dev/null"&&(u.name=At($.trim()))}else if(n){if(B.startsWith("new mode ")&&(u.mode=At(B.slice(8).trim())),B.startsWith("old mode ")&&(u.prevMode=At(B.slice(8).trim())),B.startsWith("new file mode")&&(u.type="new",u.mode=At(B.slice(13).trim())),B.startsWith("deleted file mode")&&(u.type="deleted",u.mode=At(B.slice(17).trim())),B.startsWith("similarity index")&&(B.startsWith("similarity index 100%")?u.type="rename-pure":u.type="rename-changed"),B.startsWith("index ")){const[,F,$,q]=B.trim().match(WB)??[];F!=null&&(u.prevObjectId=At(F)),$!=null&&(u.newObjectId=At($)),q!=null&&(u.mode=At(q))}B.startsWith("rename from ")&&(u.prevName=At(B.slice(12).trim())),B.startsWith("rename to ")&&(u.name=At(B.slice(10).trim()))}}continue}let C,A;for(;y.length>0&&(y[y.length-1]===`
|
|
1653
|
+
`||y[y.length-1]==="\r"||y[y.length-1]===`\r
|
|
1654
|
+
`||y[y.length-1]==="");)y.pop();const{additionStart:O,deletionStart:L}=S;g=m?g:L-1,p=m?p:O-1;const T={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:S.additionCount,additionStart:O,additionLines:E,deletionCount:S.deletionCount,deletionStart:L,deletionLines:k,deletionLineIndex:g,additionLineIndex:p,hunkContent:[],hunkContext:_E(S.hunkContext),hunkSpecs:At(_),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let D=0,M=0;for(let B=1;B<y.length;B++){const Y=y[B];if(D>=T.additionCount&&M>=T.deletionCount&&!Y.startsWith("\\")){if(s&&sW(Y)&&!lW(Y))throw Error("parsePatchContent: hunk has more lines than expected");break}const F=Y[0];if(F!=="+"&&F!=="-"&&F!==" "&&F!=="\\"){if(s)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${F}", full line: "${Y}"`),console.error("processFile: invalid rawLine:",Y);continue}const $=dW(F);if($==="addition"){if(s&&D>=T.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const q=mg(Y);(C==null||C.type!=="change")&&(C=pg("change",g,p),T.hunkContent.push(C)),p++,D++,m&&u.additionLines.push(q),C.additions++,E++,A="addition"}else if($==="deletion"){if(s&&M>=T.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const q=mg(Y);(C==null||C.type!=="change")&&(C=pg("change",g,p),T.hunkContent.push(C)),g++,M++,m&&u.deletionLines.push(q),C.deletions++,k++,A="deletion"}else if($==="context"){if(s&&(M>=T.deletionCount||D>=T.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const q=mg(Y);(C==null||C.type!=="context")&&(C=pg("context",g,p),T.hunkContent.push(C)),p++,g++,D++,M++,m&&(u.deletionLines.push(q),u.additionLines.push(q)),C.lines++,A="context"}else if($==="metadata"&&C!=null){if(C.type==="context"?(T.noEOFCRAdditions=!0,T.noEOFCRDeletions=!0):A==="deletion"?T.noEOFCRDeletions=!0:A==="addition"&&(T.noEOFCRAdditions=!0),m&&(A==="addition"||A==="context")){const q=u.additionLines.length-1;q>=0&&(u.additionLines[q]=ds(u.additionLines[q]))}if(m&&(A==="deletion"||A==="context")){const q=u.deletionLines.length-1;q>=0&&(u.deletionLines[q]=ds(u.deletionLines[q]))}}}if(s&&(D!==T.additionCount||M!==T.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");T.additionLines=E,T.deletionLines=k,T.collapsedBefore=Math.max(T.additionStart-1-l,0),u.hunks.push(T),l=T.additionStart+T.additionCount-1;for(const B of T.hunkContent)B.type==="context"?(T.splitLineCount+=B.lines,T.unifiedLineCount+=B.lines):(T.splitLineCount+=Math.max(B.additions,B.deletions),T.unifiedLineCount+=B.deletions+B.additions);T.splitLineStart=u.splitLineCount+T.collapsedBefore,T.unifiedLineStart=u.unifiedLineCount+T.collapsedBefore,u.splitLineCount+=T.collapsedBefore+T.splitLineCount,u.unifiedLineCount+=T.collapsedBefore+T.unifiedLineCount}if(u!=null){if(s&&m&&!n&&u.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(u.hunks.length>0&&!m&&u.additionLines.length>0&&u.deletionLines.length>0){const v=u.hunks[u.hunks.length-1],y=v.additionStart+v.additionCount-1,_=u.additionLines.length,S=Math.max(_-y,0);u.splitLineCount+=S,u.unifiedLineCount+=S}return n||(u.prevName!=null&&u.name!==u.prevName?u.hunks.length>0?u.type="rename-changed":u.type="rename-pure":(r==null||r.contents==="")&&a!=null&&a.contents!==""?u.type="new":r!=null&&r.contents!==""&&(a==null||a.contents==="")&&(u.type="deleted")),u.type!=="rename-pure"&&u.type!=="rename-changed"&&(u.prevName=void 0),u}}function nW(e,t,n=!1){const r=[],a=rW(e)?e.split(FB):[e];for(const s of a)try{r.push(JZ(s,t!=null?`${t}-${r.length}`:void 0,n))}catch(l){if(n)throw l;console.error(l)}return r}function rW(e){return e.startsWith("From ")||e.includes(`
|
|
1655
|
+
From `)}function vE(e){const t=HN(e);for(let n=0;n<t.length;n++)t[n]=At(t[n]);return t}function HN(e){if(e.length===0)return[""];const t=[];let n=0;for(;;){const r=e.indexOf(`
|
|
1656
|
+
`,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function iW(e){return FN(e,"diff --git")}function aW(e){if(e.length===0)return[""];const t=[];let n=0,r=0,a=0,s=0,l=!1;for(;r<e.length;){const d=Rb(e,r);if(a<=0&&s<=0){if(BN(e,r)){r>n&&t.push(e.slice(n,r)),n=r,l=!0,r=Rb(e,d);continue}if(l&&e.startsWith("@@ -",r)){const m=VN(e.slice(r,d));m!=null&&(a=m.deletionCount,s=m.additionCount)}r=d;continue}const u=e[r];if(u==="\\"){r=d;continue}u===" "?(a=Math.max(a-1,0),s=Math.max(s-1,0)):u==="-"?a=Math.max(a-1,0):u==="+"&&(s=Math.max(s-1,0)),r=d}return t.push(e.slice(n)),t}function oW(e){return BN(e,0)}function BN(e,t){const n=Rb(e,t);return yE(e,t,"---")&&yE(e,n,"+++")}function yE(e,t,n){if(!e.startsWith(n,t))return!1;const r=e[t+n.length];if(r!==" "&&r!==" ")return!1;for(let a=t+n.length+1;a<e.length;a++){const s=e[a];if(s===`
|
|
1657
|
+
`||s==="\r")break;if(s!==" "&&s!==" ")return!0}return!1}function Rb(e,t){const n=e.indexOf(`
|
|
1658
|
+
`,t);return n===-1?e.length:n+1}function sW(e){const t=e[0];return t==="+"||t==="-"||t===" "}function lW(e){if(!e.startsWith("--"))return!1;for(let t=2;t<e.length;t++){const n=e[t];if(n!==" "&&n!==" "&&n!==`
|
|
1659
|
+
`&&n!=="\r")return!1}return!0}function VN(e){if(!e.startsWith("@@ -"))return;let t=4;const n=ld(e,t);if(n==null)return;const r=n.value;t=n.endIndex;let a=1;if(e[t]===","){const g=ld(e,t+1);if(g==null)return;a=g.value,t=g.endIndex}if(e[t]!==" "||e[t+1]!=="+")return;t+=2;const s=ld(e,t);if(s==null)return;const l=s.value;t=s.endIndex;let d=1;if(e[t]===","){const g=ld(e,t+1);if(g==null)return;d=g.value,t=g.endIndex}if(e[t]!==" "||e[t+1]!=="@"||e[t+2]!=="@")return;let u;const m=t+3;return e[m]===" "&&(u=cW(e.slice(m+1))),{additionCount:d,additionStart:l,deletionCount:a,deletionStart:r,hunkContext:u}}function ld(e,t){let n=t,r=0;for(;n<e.length;n++){const a=e.charCodeAt(n)-48;if(a<0||a>9)break;r=r*10+a}if(n!==t)return{value:r,endIndex:n}}function cW(e){return e.endsWith(`\r
|
|
1660
|
+
`)?e.slice(0,-2):e.endsWith(`
|
|
1661
|
+
`)?e.slice(0,-1):e}function uW(e){return e.startsWith("diff --git")||e.includes(`
|
|
1662
|
+
diff --git`)}function FN(e,t){if(e.length===0)return[""];const n=`
|
|
1663
|
+
${t}`,r=e.startsWith(t)?0:xE(e,n,0);if(r===-1)return[e];const a=[];r>0&&a.push(e.slice(0,r));let s=r;for(;;){const l=xE(e,n,s+1);if(l===-1)break;a.push(e.slice(s,l)),s=l}return a.push(e.slice(s)),a}function xE(e,t,n){const r=e.indexOf(t,n);return r===-1?-1:r+1}function _E(e){return e==null?e:At(e)}function dW(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function mg(e){const t=e.slice(1);return At(t===""?`
|
|
1664
|
+
`:t)}function pg(e,t,n){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:n,deletionLineIndex:t}}class ry{diff(t,n,r={}){let a;typeof r=="function"?(a=r,r={}):"callback"in r&&(a=r.callback);const s=this.castInput(t,r),l=this.castInput(n,r),d=this.removeEmpty(this.tokenize(s,r)),u=this.removeEmpty(this.tokenize(l,r));return this.diffWithOptionsObj(d,u,r,a)}diffWithOptionsObj(t,n,r,a){var s;const l=C=>{if(C=this.postProcess(C,r),a){setTimeout(function(){a(C)},0);return}else return C},d=n.length,u=t.length;let m=1,g=d+u;r.maxEditLength!=null&&(g=Math.min(g,r.maxEditLength));const p=(s=r.timeout)!==null&&s!==void 0?s:1/0,v=Date.now()+p,y=[{oldPos:-1,lastComponent:void 0}];let _=this.extractCommon(y[0],n,t,0,r);if(y[0].oldPos+1>=u&&_+1>=d)return l(this.buildValues(y[0].lastComponent,n,t));let S=-1/0,E=1/0;const k=()=>{for(let C=Math.max(S,-m);C<=Math.min(E,m);C+=2){let A;const O=y[C-1],L=y[C+1];O&&(y[C-1]=void 0);let T=!1;if(L){const M=L.oldPos-C;T=L&&0<=M&&M<d}const D=O&&O.oldPos+1<u;if(!T&&!D){y[C]=void 0;continue}if(!D||T&&O.oldPos<L.oldPos?A=this.addToPath(L,!0,!1,0,r):A=this.addToPath(O,!1,!0,1,r),_=this.extractCommon(A,n,t,C,r),A.oldPos+1>=u&&_+1>=d)return l(this.buildValues(A.lastComponent,n,t))||!0;y[C]=A,A.oldPos+1>=u&&(E=Math.min(E,C-1)),_+1>=d&&(S=Math.max(S,C+1))}m++};if(a)(function C(){setTimeout(function(){if(m>g||Date.now()>v)return a(void 0);k()||C()},0)})();else for(;m<=g&&Date.now()<=v;){const C=k();if(C)return C}}addToPath(t,n,r,a,s){const l=t.lastComponent;return l&&!s.oneChangePerToken&&l.added===n&&l.removed===r?{oldPos:t.oldPos+a,lastComponent:{count:l.count+1,added:n,removed:r,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+a,lastComponent:{count:1,added:n,removed:r,previousComponent:l}}}extractCommon(t,n,r,a,s){const l=n.length,d=r.length;let u=t.oldPos,m=u-a,g=0;for(;m+1<l&&u+1<d&&this.equals(r[u+1],n[m+1],s);)m++,u++,g++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return g&&!s.oneChangePerToken&&(t.lastComponent={count:g,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=u,m}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const a=[];let s;for(;t;)a.push(t),s=t.previousComponent,delete t.previousComponent,t=s;a.reverse();const l=a.length;let d=0,u=0,m=0;for(;d<l;d++){const g=a[d];if(g.removed)g.value=this.join(r.slice(m,m+g.count)),m+=g.count;else{if(!g.added&&this.useLongestToken){let p=n.slice(u,u+g.count);p=p.map(function(v,y){const _=r[m+y];return _.length>v.length?_:v}),g.value=this.join(p)}else g.value=this.join(n.slice(u,u+g.count));u+=g.count,g.added||(m+=g.count)}}return a}}class fW extends ry{}const hW=new fW;function mW(e,t,n){return hW.diff(e,t,n)}const SE="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class pW extends ry{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${SE}]+|[^\\S\\n\\r]+|[^${SE}]`,"ug");return t.match(n)||[]}}const gW=new pW;function bW(e,t,n){return gW.diff(e,t,n)}class vW extends ry{constructor(){super(...arguments),this.tokenize=xW}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
1665
|
+
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
1666
|
+
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
1667
|
+
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
1668
|
+
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const yW=new vW;function wE(e,t,n){return yW.diff(e,t,n)}function xW(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1669
|
+
`));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let a=0;a<r.length;a++){const s=r[a];a%2&&!t.newlineIsToken?n[n.length-1]+=s:n.push(s)}return n}function _W(e){for(let t=0;t<e.length;t++)if(e[t]<" "||e[t]>"~"||e[t]==='"'||e[t]==="\\")return!0;return!1}function Fi(e){if(!_W(e))return e;let t='"';const n=new TextEncoder().encode(e);let r=0;for(;r<n.length;){const a=n[r];a===7?t+="\\a":a===8?t+="\\b":a===9?t+="\\t":a===10?t+="\\n":a===11?t+="\\v":a===12?t+="\\f":a===13?t+="\\r":a===34?t+='\\"':a===92?t+="\\\\":a>=32&&a<=126?t+=String.fromCharCode(a):t+="\\"+a.toString(8).padStart(3,"0"),r++}return t+='"',t}const EE={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function CE(e,t,n,r,a,s,l){let d;l?typeof l=="function"?d={callback:l}:d=l:d={},typeof d.context>"u"&&(d.context=4);const u=d.context;if(d.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(d.callback){const{callback:g}=d;wE(n,r,Object.assign(Object.assign({},d),{callback:p=>{const v=m(p);g(v)}}))}else return m(wE(n,r,d));function m(g){if(!g)return;g.push({value:"",lines:[]});function p(C){return C.map(function(A){return" "+A})}const v=[];let y=0,_=0,S=[],E=1,k=1;for(let C=0;C<g.length;C++){const A=g[C],O=A.lines||wW(A.value);if(A.lines=O,A.added||A.removed){if(!y){const L=g[C-1];y=E,_=k,L&&(S=u>0?p(L.lines.slice(-u)):[],y-=S.length,_-=S.length)}for(const L of O)S.push((A.added?"+":"-")+L);A.added?k+=O.length:E+=O.length}else{if(y)if(O.length<=u*2&&C<g.length-2)for(const L of p(O))S.push(L);else{const L=Math.min(O.length,u);for(const D of p(O.slice(0,L)))S.push(D);const T={oldStart:y,oldLines:E-y+L,newStart:_,newLines:k-_+L,lines:S};v.push(T),y=0,_=0,S=[]}E+=O.length,k+=O.length}}for(const C of v)for(let A=0;A<C.lines.length;A++)C.lines[A].endsWith(`
|
|
1670
|
+
`)?C.lines[A]=C.lines[A].slice(0,-1):(C.lines.splice(A+1,0,"\"),A++);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:s,hunks:v}}}function Ab(e,t){var n,r,a,s,l,d;if(t||(t=EE),Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(g=>g.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(g=>Ab(g,t)).join(`
|
|
1671
|
+
`)}const u=[];if(e.isGit){if(t=EE,!e.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!e.newFileName)throw new Error("newFileName must be specified for Git patches");let g=e.oldFileName,p=e.newFileName;e.isCreate&&g==="/dev/null"?g=p.replace(/^b\//,"a/"):e.isDelete&&p==="/dev/null"&&(p=g.replace(/^a\//,"b/")),u.push("diff --git "+Fi(g)+" "+Fi(p)),e.isDelete&&u.push("deleted file mode "+((n=e.oldMode)!==null&&n!==void 0?n:"100644")),e.isCreate&&u.push("new file mode "+((r=e.newMode)!==null&&r!==void 0?r:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(u.push("old mode "+e.oldMode),u.push("new mode "+e.newMode)),e.isRename&&(u.push("rename from "+Fi(((a=e.oldFileName)!==null&&a!==void 0?a:"").replace(/^a\//,""))),u.push("rename to "+Fi(((s=e.newFileName)!==null&&s!==void 0?s:"").replace(/^b\//,"")))),e.isCopy&&(u.push("copy from "+Fi(((l=e.oldFileName)!==null&&l!==void 0?l:"").replace(/^a\//,""))),u.push("copy to "+Fi(((d=e.newFileName)!==null&&d!==void 0?d:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&u.push("Index: "+e.oldFileName),t.includeUnderline&&u.push("===================================================================");const m=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||m)&&(u.push("--- "+Fi(e.oldFileName)+(e.oldHeader?" "+e.oldHeader:"")),u.push("+++ "+Fi(e.newFileName)+(e.newHeader?" "+e.newHeader:"")));for(let g=0;g<e.hunks.length;g++){const p=e.hunks[g],v=p.oldLines===0?p.oldStart-1:p.oldStart,y=p.newLines===0?p.newStart-1:p.newStart;u.push("@@ -"+v+","+p.oldLines+" +"+y+","+p.newLines+" @@");for(const _ of p.lines)u.push(_)}return u.join(`
|
|
1672
|
+
`)+`
|
|
1673
|
+
`}function SW(e,t,n,r,a,s,l){if(typeof l=="function"&&(l={callback:l}),l?.callback){const{callback:d}=l;CE(e,t,n,r,a,s,Object.assign(Object.assign({},l),{callback:u=>{d(u?Ab(u,l.headerOptions):void 0)}}))}else{const d=CE(e,t,n,r,a,s,l);return d?Ab(d,l?.headerOptions):void 0}}function wW(e){const t=e.endsWith(`
|
|
1674
|
+
`),n=e.split(`
|
|
1675
|
+
`).map(r=>r+`
|
|
1676
|
+
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Tb(e,t,n,r=!1){const a=tW(SW(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:r});if(a==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return t.lang!=null&&(a.lang=t.lang),a}var EW=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,t,n){if(t==null||n==null)for(const r of e.children??[])r instanceof HTMLElement&&("deletions"in r.dataset?t=r:"additions"in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function kl(e,t){return Gv(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function cd(e){return Ne({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function ud(e){return Ne({tagName:"div",children:[Ne({tagName:"span",children:[Er("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function gg(e){return Ne({tagName:"div",children:[Kd({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","data-expand-button":"","data-expand-both":e==="both"?"":void 0,"data-expand-up":e==="up"?"":void 0,"data-expand-down":e==="down"?"":void 0}})}function qo({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:a,isFirstHunk:s,isLastHunk:l}){let d=0;const u=[];if(e==="metadata"&&t!=null&&u.push(Ne({tagName:"div",children:[Er(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const m=[];n!=null&&(r?(s||(m.push(gg("up")),d++),l||(m.push(gg("down")),d++)):(m.push(gg(!s&&!l?"both":s?"down":"up")),d++)),m.push(Ne({tagName:"div",children:[Ne({tagName:"span",children:[Er(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),r&&n!=null&&m.push(Ne({tagName:"div",children:[Er("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),u.push(Ne({tagName:"div",children:m,properties:{"data-separator-wrapper":"","data-separator-multi-button":d>1?"":void 0}}))}return e==="custom"&&a!=null&&u.push(Ne({tagName:"slot",properties:{name:a}})),Ne({tagName:"div",children:u,properties:{"data-separator":u.length===0?"simple":e,"data-expand-index":n,"data-separator-first":s?"":void 0,"data-separator-last":l?"":void 0}})}function CW(e,t){return`hunk-separator-${e}-${t}`}function kW(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function RW(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function kE({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}}function dd({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:a=!1}){const s=t[t.length-1];if(s==null||a||!n){t.push([r?0:1,e.value]);return}const l=s[0]===0;if(r===l||r&&e.value.length===1&&!l){s[1]+=e.value;return}t.push([r?0:1,e.value])}function ic({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:a}){const s=Math.max(t,0);if(s===0||e)return{fromStart:0,fromEnd:0,rangeSize:s,collapsedLines:s,renderAll:!1};if(n===!0||s<=a)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const l=n?.get(r),d=Math.min(Math.max(l?.fromStart??0,0),s),u=Math.min(Math.max(l?.fromEnd??0,0),s),m=d+u,g=m>=s;return{fromStart:g?s:d,fromEnd:g?0:u,rangeSize:s,collapsedLines:Math.max(s-m,0),renderAll:g}}function GN({fileDiff:e,errorPrefix:t}){const n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const r=e.additionLines.length-(n.additionLineIndex+n.additionCount),a=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(r<=0&&a<=0)return 0;if(r!==a)throw new Error(`${t}: trailing context mismatch (additions=${r}, deletions=${a}) for ${e.name}`);return Math.min(r,a)}function ac({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:a}){if(t!==e.hunks.length-1)return;const s=GN({fileDiff:e,errorPrefix:a});if(s<=0)return;if(n===!0||s<=r)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};const l=n?.get(e.hunks.length),d=Math.min(Math.max(l?.fromStart??0,0),s);return{fromStart:d,fromEnd:0,rangeSize:s,collapsedLines:s-d,renderAll:d>=s}}function qN({type:e,metrics:t}){return t.hunkSeparatorHeight??YZ(e)}function ZN({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function AW({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case"simple":return t>0;case"metadata":return n!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function TW(e){return e!=="simple"&&e!=="metadata"}function Il({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!AW({type:e,hunkIndex:n,hunkSpecs:r}))return;const a=qN({type:e,metrics:t}),s=ZN({type:e,metrics:t}),l=n>0?s:0,d=s;return{height:a,gapBefore:l,gapAfter:d,totalHeight:l+a+d}}function Ml({type:e,metrics:t}){if(!TW(e))return;const n=qN({type:e,metrics:t}),r=ZN({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function Bl({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:a,collapsedContextThreshold:s=1,callback:l}){const d=NW({diff:e,diffStyle:t,startingLine:n,expandedHunks:a,collapsedContextThreshold:s}),u={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:d.splitCount,unifiedCount:d.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!u.isWindowedHighlight)return!1;const p=u.unifiedCount>=n+r,v=u.splitCount>=n+r;return t==="unified"?p:(t==="split"||p)&&v},shouldSkip(p,v){if(!u.isWindowedHighlight)return!1;const y=u.unifiedCount+p<n,_=u.splitCount+v<n;return t==="unified"?y:(t==="split"||y)&&_},incrementCounts(p,v){(t==="unified"||t==="both")&&(u.unifiedCount+=p),(t==="split"||t==="both")&&(u.splitCount+=v)},isInWindow(p,v){if(!u.isWindowedHighlight)return!0;const y=u.isInUnifiedWindow(p),_=u.isInSplitWindow(v);return t==="unified"?y:t==="split"?_:y||_},isInUnifiedWindow(p){return!u.isWindowedHighlight||u.unifiedCount>=n-p&&u.unifiedCount<n+r},isInSplitWindow(p){return!u.isWindowedHighlight||u.splitCount>=n-p&&u.splitCount<n+r},emit(p,v=!1){return v||(t==="unified"?u.incrementCounts(1,0):t==="split"?u.incrementCounts(0,1):u.incrementCounts(1,1)),l(p)??!1}};e:for(let p=d.hunkIndex;p<e.hunks.length;p++){let E=function(Y,F){return _==null||_.collapsedLines<=0||_.fromStart+_.fromEnd>0?0:t==="unified"?Y===v.unifiedLineStart+v.unifiedLineCount-1?_.collapsedLines:0:F===v.splitLineStart+v.splitLineCount-1?_.collapsedLines:0},C=function(){return k?0:(k=!0,y.collapsedLines)};var m=E,g=C;const v=e.hunks[p];if(v==null)throw new Error("iterateOverDiff: invalid hunk index");if(u.shouldBreak())break;const y=ic({isPartial:e.isPartial,rangeSize:v.collapsedBefore,expandedHunks:a,hunkIndex:p,collapsedContextThreshold:s}),_=p===u.finalHunkIndex?ac({fileDiff:e,hunkIndex:p,expandedHunks:a,collapsedContextThreshold:s,errorPrefix:"iterateOverDiff"}):void 0,S=y.fromStart+y.fromEnd;let k=y.collapsedLines===0;if(u.shouldSkip(S,S))u.incrementCounts(S,S),C();else{let Y=v.unifiedLineStart-y.rangeSize,F=v.splitLineStart-y.rangeSize,$=v.deletionLineIndex-y.rangeSize,q=v.additionLineIndex-y.rangeSize,ne=v.deletionStart-y.rangeSize,se=v.additionStart-y.rangeSize;if(fd(u,y.fromStart,t,z=>u.emit({hunkIndex:p,hunk:v,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:ne+z,lineIndex:$+z,noEOFCR:!1,unifiedLineIndex:Y+z,splitLineIndex:F+z},additionLine:{unifiedLineIndex:Y+z,splitLineIndex:F+z,lineIndex:q+z,lineNumber:se+z,noEOFCR:!1}}))||(Y=v.unifiedLineStart-y.fromEnd,F=v.splitLineStart-y.fromEnd,$=v.deletionLineIndex-y.fromEnd,q=v.additionLineIndex-y.fromEnd,ne=v.deletionStart-y.fromEnd,se=v.additionStart-y.fromEnd,fd(u,y.fromEnd,t,z=>u.emit({hunkIndex:p,hunk:v,collapsedBefore:C(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:ne+z,lineIndex:$+z,noEOFCR:!1,unifiedLineIndex:Y+z,splitLineIndex:F+z},additionLine:{unifiedLineIndex:Y+z,splitLineIndex:F+z,lineIndex:q+z,lineNumber:se+z,noEOFCR:!1}}),()=>{C()})))break e}let A=v.unifiedLineStart,O=v.splitLineStart,L=v.deletionLineIndex,T=v.additionLineIndex,D=v.deletionStart,M=v.additionStart;const B=v.hunkContent.at(-1);for(const Y of v.hunkContent){if(u.shouldBreak())break e;const F=Y===B;if(Y.type==="context"){if(u.shouldSkip(Y.lines,Y.lines))u.incrementCounts(Y.lines,Y.lines),C();else if(fd(u,Y.lines,t,$=>{const q=F&&$===Y.lines-1,ne=A+$,se=O+$;return u.emit({hunkIndex:p,hunk:v,collapsedBefore:C(),collapsedAfter:E(ne,se),type:"context",deletionLine:{lineNumber:D+$,lineIndex:L+$,noEOFCR:q&&v.noEOFCRDeletions,unifiedLineIndex:ne,splitLineIndex:se},additionLine:{unifiedLineIndex:ne,splitLineIndex:se,lineIndex:T+$,lineNumber:M+$,noEOFCR:q&&v.noEOFCRAdditions}})},()=>{C()}))break e;A+=Y.lines,O+=Y.lines,L+=Y.lines,T+=Y.lines,D+=Y.lines,M+=Y.lines}else{const $=Math.max(Y.deletions,Y.additions),q=Y.deletions+Y.additions;if(!u.shouldSkip(q,$)){const ne=OW(u,Y,t);(ne[0]?.[0]??0)>0&&C();for(const[se,z]of ne)for(let G=se;G<z;G++){const ie=E(A+G,t==="unified"?O+(G<Y.deletions?G:G-Y.deletions):O+G);if(u.emit(DW({hunkIndex:p,hunk:v,collapsedBefore:C(),collapsedAfter:ie,diffStyle:t,index:G,unifiedLineIndex:A,splitLineIndex:O,additionLineIndex:T,deletionLineIndex:L,additionLineNumber:M,deletionLineNumber:D,content:Y,isLastContent:F,unifiedCount:q,splitCount:$}),!0))break e}}C(),u.incrementCounts(q,$),A+=q,O+=$,L+=Y.deletions,T+=Y.additions,D+=Y.deletions,M+=Y.additions}}if(_!=null){const{collapsedLines:Y,fromStart:F,fromEnd:$}=_,q=F+$;if(fd(u,q,t,ne=>{const se=ne===q-1;return u.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:se?Y:0,type:"context-expanded",deletionLine:{lineNumber:D+ne,lineIndex:L+ne,noEOFCR:!1,unifiedLineIndex:A+ne,splitLineIndex:O+ne},additionLine:{unifiedLineIndex:A+ne,splitLineIndex:O+ne,lineIndex:T+ne,lineNumber:M+ne,noEOFCR:!1}})},void 0,()=>u.shouldBreak()))break e}}}function NW({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:a}){if(n<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const s=jW({diff:e,expandedHunks:r,collapsedContextThreshold:a});let l=0,d=e.hunks.length-1,u=e.hunks.length;for(;l<=d;){const g=l+d>>1,p=s[g+1];if(p==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?p.unifiedCount:p.splitCount)>n?(u=g,d=g-1):l=g+1}if(u>=e.hunks.length){const g=s[e.hunks.length];if(g==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:g.splitCount,unifiedCount:g.unifiedCount}}const m=s[u];if(m==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:u,splitCount:m.splitCount,unifiedCount:m.unifiedCount}}function jW({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,a=0;const s=e.hunks.length-1,l=[{splitCount:0,unifiedCount:0}];for(let d=0;d<e.hunks.length;d++){const u=e.hunks[d];if(u==null)throw new Error("iterateOverDiff: invalid hunk summary index");const m=ic({isPartial:e.isPartial,rangeSize:u.collapsedBefore,expandedHunks:t,hunkIndex:d,collapsedContextThreshold:n}),g=m.fromStart+m.fromEnd;r+=g+u.splitLineCount,a+=g+u.unifiedLineCount;const p=d===s?ac({fileDiff:e,hunkIndex:d,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:"iterateOverDiff"}):void 0;if(p!=null){const v=p.fromStart+p.fromEnd;r+=v,a+=v}l.push({splitCount:r,unifiedCount:a})}return l}function LW(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];const r=[];function a(d){const u=Math.max(0,e.viewportStart-d),m=Math.min(t,e.viewportEnd-d);m>u&&r.push([u,m])}if(n!=="split"&&a(e.unifiedCount),n!=="unified"&&a(e.splitCount),r.length===0)return[0,0];let s=r[0][0],l=r[0][1];for(let d=1;d<r.length;d++){const u=r[d];s=Math.min(s,u[0]),l=Math.max(l,u[1])}return[s,l]}function fd(e,t,n,r,a,s){const[l,d]=LW(e,t,n);l>0&&(e.incrementCounts(l,l),a?.());let u=l;for(;u<t;){if(s?.()===!0)return!0;if(u>=d){e.incrementCounts(t-u,t-u);break}if(e.isInWindow(0,0)){if(r(u)===!0)return!0}else e.incrementCounts(1,1);u++}return!1}function OW(e,t,n){if(!e.isWindowedHighlight)return[[0,n==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const r=n!=="split",a=n!=="unified",s=n==="unified"?"unified":"split",l=[];function d(p,v){if(p+v<=e.viewportStart||p>=e.viewportEnd)return;const y=Math.max(0,e.viewportStart-p),_=Math.min(v,e.viewportEnd-p);return _>y?[y,_]:void 0}function u(p,v){return s==="split"?p:v==="additions"?[p[0]+t.deletions,p[1]+t.deletions]:p}function m(p,v){if(p==null)return;const[y,_]=u(p,v);_>y&&l.push([y,_])}if(r&&(m(d(e.unifiedCount,t.deletions),"deletions"),m(d(e.unifiedCount+t.deletions,t.additions),"additions")),a&&(m(d(e.splitCount,t.deletions),"deletions"),m(d(e.splitCount,t.additions),"additions")),l.length===0)return l;l.sort((p,v)=>p[0]-v[0]);const g=[l[0]];for(const[p,v]of l.slice(1)){const y=g[g.length-1];p<=y[1]?y[1]=Math.max(y[1],v):g.push([p,v])}return g}function DW({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:a,index:s,unifiedLineIndex:l,splitLineIndex:d,additionLineIndex:u,deletionLineIndex:m,additionLineNumber:g,deletionLineNumber:p,content:v,isLastContent:y,unifiedCount:_,splitCount:S}){const E=s<v.deletions?l+s:void 0,k=a==="unified"?s>=v.deletions?l+s:void 0:s<v.additions?l+v.deletions+s:void 0,C=a==="unified"?d+(s<v.deletions?s:s-v.deletions):d+s,A=s<v.deletions?m+s:void 0,O=s<v.deletions?p+s:void 0,L=a==="unified"?s>=v.deletions?u+(s-v.deletions):void 0:s<v.additions?u+s:void 0,T=a==="unified"?s>=v.deletions?g+(s-v.deletions):void 0:s<v.additions?g+s:void 0,D=a==="unified"?y&&s===v.deletions-1&&t.noEOFCRDeletions:y&&s===S-1&&t.noEOFCRDeletions,M=a==="unified"?y&&s===_-1&&t.noEOFCRAdditions:y&&s===S-1&&t.noEOFCRAdditions,B=A!=null&&O!=null&&E!=null?{lineNumber:O,lineIndex:A,noEOFCR:D,unifiedLineIndex:E,splitLineIndex:C}:void 0,Y=L!=null&&T!=null&&k!=null?{unifiedLineIndex:k,splitLineIndex:C,lineIndex:L,lineNumber:T,noEOFCR:M}:void 0;if(B==null&&Y!=null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:Y};if(B!=null&&Y==null)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:B,additionLine:void 0};if(B==null||Y==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:B,additionLine:Y}}const IW={forcePlainText:!1};function MW(e,t,n,{forcePlainText:r,startingLine:a,totalLines:s,expandedHunks:l,collapsedContextThreshold:d=1}=IW){r?(a??=0,s??=1/0):(a=0,s=1/0);const u=a>0||s<1/0,m=typeof n.theme=="string"?t.getTheme(n.theme).type:void 0,g=RZ({theme:n.theme,highlighter:t}),p=r&&!u&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,v={deletionLines:[],additionLines:[]},{maxLineDiffLength:y}=n,_=!r&&!e.isPartial,S=r?l:void 0,E=new Map;function k(A){const O=_?0:A,L=E.get(O)??zW();return E.set(O,L),L}function C(A,O,L,T){if(u){let D=L.at(-1);(D==null||D.targetIndex+D.count!==O)&&(D={targetIndex:O,originalOffset:T.length,count:0},L.push(D)),D.count++}T.push(A)}Bl({diff:e,diffStyle:"both",startingLine:a,totalLines:s,expandedHunks:u?S:!0,collapsedContextThreshold:d,callback:({hunkIndex:A,additionLine:O,deletionLine:L,type:T})=>{const D=k(A),M=O!=null?O.splitLineIndex:L.splitLineIndex;T==="change"&&O!=null&&L!=null&&PW({additionLine:e.additionLines[O.lineIndex],deletionLine:e.deletionLines[L.lineIndex],deletionLineIndex:D.deletionContent.length,additionLineIndex:D.additionContent.length,deletionDecorations:D.deletionDecorations,additionDecorations:D.additionDecorations,lineDiffType:p,maxLineDiffLength:y}),L!=null&&(C(e.deletionLines[L.lineIndex],L.lineIndex,D.deletionSegments,D.deletionContent),D.deletionInfo.push({type:T==="change"?"change-deletion":T,lineNumber:L.lineNumber,altLineNumber:T==="change"?void 0:O.lineNumber??void 0,lineIndex:`${L.unifiedLineIndex},${M}`})),O!=null&&(C(e.additionLines[O.lineIndex],O.lineIndex,D.additionSegments,D.additionContent),D.additionInfo.push({type:T==="change"?"change-addition":T,lineNumber:O.lineNumber,altLineNumber:T==="change"?void 0:L.lineNumber??void 0,lineIndex:`${O.unifiedLineIndex},${M}`}))}});for(const A of E.values()){if(A.deletionContent.length===0&&A.additionContent.length===0)continue;const O={name:e.prevName??e.name,contents:A.deletionContent.value},L={name:e.name,contents:A.additionContent.value},{deletionLines:T,additionLines:D}=$W({deletionFile:O,deletionInfo:A.deletionInfo,deletionDecorations:A.deletionDecorations,additionFile:L,additionInfo:A.additionInfo,additionDecorations:A.additionDecorations,highlighter:t,options:n,languageOverride:r?"text":e.lang});if(_){v.deletionLines=T,v.additionLines=D;continue}if(A.deletionSegments.length>0)for(const M of A.deletionSegments)for(let B=0;B<M.count;B++)v.deletionLines[M.targetIndex+B]=T[M.originalOffset+B];else v.deletionLines.push(...T);if(A.additionSegments.length>0)for(const M of A.additionSegments)for(let B=0;B<M.count;B++)v.additionLines[M.targetIndex+B]=D[M.originalOffset+B];else v.additionLines.push(...D)}return{code:v,themeStyles:g,baseThemeType:m}}function PW({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:a,additionDecorations:s,lineDiffType:l,maxLineDiffLength:d}){if(e==null||t==null||l==="none"||(e=ds(e),t=ds(t),e.length>d||t.length>d))return;const u=l==="char"?mW(e,t):bW(e,t),m=[],g=[],p=l==="word-alt",v=u.at(-1);for(const _ of u){const S=_===v;!_.added&&!_.removed?(dd({item:_,arr:m,enableJoin:p,isNeutral:!0,isLastItem:S}),dd({item:_,arr:g,enableJoin:p,isNeutral:!0,isLastItem:S})):_.removed?dd({item:_,arr:m,enableJoin:p,isLastItem:S}):dd({item:_,arr:g,enableJoin:p,isLastItem:S})}let y=0;for(const _ of m)_[0]===1&&a.push(kE({line:n,spanStart:y,spanLength:_[1].length})),y+=_[1].length;y=0;for(const _ of g)_[0]===1&&s.push(kE({line:r,spanStart:y,spanLength:_[1].length})),y+=_[1].length}function zW(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function $W({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:a,deletionDecorations:s,additionDecorations:l,languageOverride:d,options:{theme:u=Yn,...m}}){const g=d??Ua(e.name),p=d??Ua(t.name),{state:v,transformers:y}=yZ(m.useTokenTransformer),_=typeof u=="string"?{...m,lang:"text",theme:u,transformers:y,decorations:void 0,defaultColor:!1,cssVariablePrefix:ar("token"),tokenizeTimeLimit:0}:{...m,lang:"text",themes:u,transformers:y,decorations:void 0,defaultColor:!1,cssVariablePrefix:ar("token"),tokenizeTimeLimit:0};return{deletionLines:e.contents===""?[]:(_.lang=g,v.lineInfo=n,_.decorations=s,mE(a.codeToHast(ds(e.contents),_))),additionLines:t.contents===""?[]:(_.lang=p,_.decorations=l,v.lineInfo=r,mE(a.codeToHast(ds(t.contents),_)))}}function Nb(e){const t=e.lang??Ua(e.name),n=e.lang??(e.prevName!=null?Ua(e.prevName):"text");return t==="text"&&n==="text"}let UW=-1;var HW=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++UW}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:Yn},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=og(e.theme??Yn)?iZ():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){const r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(r.fromStart+=n),(t==="down"||t==="both")&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??e7}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const n=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),r=n[t.lineNumber]??[];n[t.lineNumber]=r,r.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t!=="change"?{gutterLineType:t}:{gutterLineType:e==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement=e=>oZ(e);getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:a=!1,disableVirtualizationBuffers:s=!1,collapsed:l=!1,expandUnchanged:d=!1,collapsedContextThreshold:u=1,expansionLineCount:m=100,hunkSeparators:g="line-info",lineDiffType:p="word-alt",maxLineDiffLength:v=1e3,overflow:y="scroll",stickyHeader:_=!1,theme:S=Yn,headerRenderMode:E="default",tokenizeMaxLineLength:k=1e3,tokenizeMaxLength:C=QB,useTokenTransformer:A=!1,useCSSClasses:O=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:a,disableVirtualizationBuffers:s,collapsed:l,expandUnchanged:d,collapsedContextThreshold:u,expansionLineCount:m,hunkSeparators:g,lineDiffType:p,maxLineDiffLength:v,overflow:y,stickyHeader:_,theme:this.workerManager?.getDiffRenderOptions().theme??S,headerRenderMode:E,tokenizeMaxLineLength:k,tokenizeMaxLength:C,useTokenTransformer:A,useCSSClasses:O}}async initializeHighlighter(){return this.highlighter=await rZ(hZ(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),n=vg(e,this.getTokenizeMaxLength());let r=this.workerManager?.getDiffResultCache(e);r!=null&&!kl(t,r.options)&&(r=void 0),this.renderCache??={diff:e,highlighted:!n&&!Nb(e),options:t,result:n?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??Ua(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:r,tokenizeMaxLineLength:a,lineDiffType:s,maxLineDiffLength:l}=this.getOptionsWithDefaults();return{theme:r,useTokenTransformer:jZ(this.options),tokenizeMaxLineLength:a,lineDiffType:s,maxLineDiffLength:l}})();this.getOptionsWithDefaults();const{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!Dl(e,n.diff)||!kl(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=l1){if(e==null)return;const{expandUnchanged:n=!1,collapsedContextThreshold:r}=this.getOptionsWithDefaults();let{options:a,forceHighlight:s}=this.getRenderOptions(e);const l=this.getMatchingWorkerResultCache(e,a);l!=null&&!this.hasHighlightedRenderCache(e,a)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...l},s=!1),this.renderCache??={diff:e,highlighted:!1,options:a,result:void 0,renderRange:void 0};const d=e.additionLines.length>0||e.deletionLines.length>0,u=!d||Nb(e)||vg(e,this.getTokenizeMaxLength()),m=!Dl(e,this.renderCache.diff),g=!ON(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(u||this.renderCache.result==null||!this.renderCache.highlighted&&(m||g))&&(this.renderCache.diff=e,this.renderCache.options=a,this.renderCache.highlighted=!1,(this.renderCache.result==null||m||g||s)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,RW(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!u&&d&&(!this.renderCache.highlighted||s)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??Ua(e.name);const p=this.highlighter!=null&&og(a.theme),v=this.highlighter!=null&&E1(this.computedLang),y=!u&&v;if(this.highlighter!=null&&p&&(s||u||!this.renderCache.highlighted&&y||this.renderCache.result==null)){const{result:_,options:S}=this.renderDiffWithHighlighter(e,this.highlighter,u||!v);this.renderCache={diff:e,options:S,highlighted:y,result:_,renderRange:void 0}}(!p||!u&&!v)&&this.asyncHighlight(e).then(({result:_,options:S})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,_,S,!u)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=l1){const{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){const{diffIndicators:r,disableBackground:a,disableLineNumbers:s,overflow:l}=this.getOptionsWithDefaults();return dZ({type:"diff",diffIndicators:r,disableBackground:a,disableLineNumbers:s,overflow:l,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){const t=vg(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Ua(e.name);const n=this.highlighter!=null&&og(this.options.theme??Yn),r=t||this.highlighter!=null&&E1(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){const{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:a}=this.getOptionsWithDefaults();return{result:MW(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:a}),options:r}}onHighlightSuccess(e,t,n,r=!0){if(this.renderCache==null)return;const a=!this.renderCache.highlighted||!kl(this.renderCache.options,n)||!Dl(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:r,result:t,renderRange:void 0},a&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!kl(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Dl(e,n.diff)&&kl(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:a}){const{diffStyle:s,disableFileHeader:l,expandUnchanged:d,expansionLineCount:u,collapsedContextThreshold:m,hunkSeparators:g}=this.getOptionsWithDefaults();this.diff=e;const p=s==="unified";let v=[],y=[],_=[];const S=[],{additionLines:E,deletionLines:k}=n,C={rowCount:0,hunkSeparators:g,additionsContentAST:v,deletionsContentAST:y,unifiedContentAST:_,unifiedGutterAST:Ku(),deletionsGutterAST:Ku(),additionsGutterAST:Ku(),expansionLineCount:u,hunkData:S,incrementRowCount(q=1){C.rowCount+=q},pushToGutter(q,ne){switch(q){case"unified":C.unifiedGutterAST.children.push(ne);break;case"deletions":C.deletionsGutterAST.children.push(ne);break;case"additions":C.additionsGutterAST.children.push(ne);break}}},A=GN({fileDiff:e,errorPrefix:"DiffHunksRenderer.processDiffResult"}),O={size:0,side:void 0,increment(){this.size+=1},flush(){if(s!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(C.pushToGutter("additions",ir(void 0,"buffer",this.size)),v?.push(cd(this.size))):(C.pushToGutter("deletions",ir(void 0,"buffer",this.size)),y?.push(cd(this.size))),this.size=0,this.side=void 0}}},L=(q,ne,se,z,G)=>{C.pushToGutter(q,r7(ne,se,z,G))};function T(q){O.flush(),s==="unified"?bg("unified",q,C):(bg("deletions",q,C),bg("additions",q,C))}this.pushFileLevelAnnotations(e,s,t,C),Bl({diff:e,diffStyle:s,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:d?!0:this.expandedHunks,collapsedContextThreshold:m,callback:({hunkIndex:q,hunk:ne,collapsedBefore:se,collapsedAfter:z,additionLine:G,deletionLine:ie,type:J})=>{const Z=ie!=null?ie.splitLineIndex:G.splitLineIndex,P=G!=null?G.unifiedLineIndex:ie.unifiedLineIndex;s==="split"&&J!=="change"&&O.flush(),se>0&&T({hunkIndex:q,collapsedLines:se,rangeSize:Math.max(ne?.collapsedBefore??0,0),hunkSpecs:ne?.hunkSpecs,isFirstHunk:q===0,isLastHunk:!1,isExpandable:!e.isPartial});const ee=s==="unified"?P:Z,le={type:J,hunkIndex:q,lineIndex:ee,unifiedLineIndex:P,splitLineIndex:Z,deletionLine:ie,additionLine:G};if(s==="unified"){const he=this.getUnifiedInjectedRowsForLine?.(le);he?.before!=null&&TE(he.before,C);let Ke=ie!=null?k[ie.lineIndex]:void 0,Be=G!=null?E[G.lineIndex]:void 0;if(Ke==null&&Be==null){const nt="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(nt,{file:e.name}),new Error(nt)}const Ot=J==="change"?G!=null?"change-addition":"change-deletion":J,Et=this.getUnifiedLineDecoration({type:J,lineType:Ot,additionLineIndex:G?.lineIndex,deletionLineIndex:ie?.lineIndex});L("unified",Et.gutterLineType,G!=null?G.lineNumber:ie.lineNumber,`${P},${Z}`,Et.gutterProperties),Be!=null?Be=md(Be,Et.contentProperties):Ke!=null&&(Ke=md(Ke,Et.contentProperties)),hd({diffStyle:"unified",type:J,deletionLine:Ke,additionLine:Be,unifiedSpan:this.getAnnotations("unified",ie?.lineNumber,G?.lineNumber,q,ee),createAnnotationElement:nt=>this.createAnnotationElement(nt),context:C}),he?.after!=null&&TE(he.after,C)}else{const he=this.getSplitInjectedRowsForLine?.(le);he?.before!=null&&NE(he.before,C,O);let Ke=ie!=null?k[ie.lineIndex]:void 0,Be=G!=null?E[G.lineIndex]:void 0;const Ot=this.getSplitLineDecoration({side:"deletions",type:J,lineIndex:ie?.lineIndex}),Et=this.getSplitLineDecoration({side:"additions",type:J,lineIndex:G?.lineIndex});if(Ke==null&&Be==null){const Ut="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(Ut,{file:e.name}),new Error(Ut)}const nt=(()=>{if(J==="change"){if(Be==null)return"additions";if(Ke==null)return"deletions"}})();if(nt!=null){if(O.side!=null&&O.side!==nt)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");O.side=nt,O.increment()}const an=this.getAnnotations("split",ie?.lineNumber,G?.lineNumber,q,ee);if(an!=null&&O.size>0&&O.flush(),ie!=null){const Ut=md(Ke,Ot.contentProperties);L("deletions",Ot.gutterLineType,ie.lineNumber,`${ie.unifiedLineIndex},${Z}`,Ot.gutterProperties),Ut!=null&&(Ke=Ut)}if(G!=null){const Ut=md(Be,Et.contentProperties);L("additions",Et.gutterLineType,G.lineNumber,`${G.unifiedLineIndex},${Z}`,Et.gutterProperties),Ut!=null&&(Be=Ut)}hd({diffStyle:"split",type:J,additionLine:Be,deletionLine:Ke,...an,createAnnotationElement:Ut=>this.createAnnotationElement(Ut),context:C}),he?.after!=null&&NE(he.after,C,O)}const de=s==="split"&&ne!=null&&Z===ne.splitLineStart+ne.splitLineCount-1,ce=de?ne.noEOFCRDeletions:!1,fe=de?ne.noEOFCRAdditions:!1,ye=(ie?.noEOFCR??!1)||ce,Re=(G?.noEOFCR??!1)||fe;if(Re||ye){if(s==="split"&&O.flush(),ye){const he=J==="context"||J==="context-expanded"?J:"change-deletion";s==="unified"?(C.unifiedContentAST.push(ud(he)),C.pushToGutter("unified",ir(he,"metadata",1))):(C.deletionsContentAST.push(ud(he)),C.pushToGutter("deletions",ir(he,"metadata",1)),Re||(C.pushToGutter("additions",ir(void 0,"buffer",1)),C.additionsContentAST.push(cd(1))))}if(Re){const he=J==="context"||J==="context-expanded"?J:"change-addition";s==="unified"?(C.unifiedContentAST.push(ud(he)),C.pushToGutter("unified",ir(he,"metadata",1))):(C.additionsContentAST.push(ud(he)),C.pushToGutter("additions",ir(he,"metadata",1)),ye||(C.pushToGutter("deletions",ir(void 0,"buffer",1)),C.deletionsContentAST.push(cd(1))))}C.incrementRowCount(1)}z>0&&g!=="simple"&&T({hunkIndex:J==="context-expanded"?q:q+1,collapsedLines:z,rangeSize:A,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),C.incrementRowCount(1)}}),s==="split"&&O.flush();const D=Math.max(kW(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),M=t.bufferBefore>0||t.bufferAfter>0,B=!p&&e.type!=="deleted",Y=!p&&e.type!=="new",F=C.rowCount>0||M;v=B&&F?v:void 0,y=Y&&F?y:void 0,_=p&&F?_:void 0;const $=this.createPreElement(y!=null&&v!=null,D);return{unifiedGutterAST:p&&F?C.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:Y&&F?C.deletionsGutterAST.children:void 0,deletionsContentAST:y,additionsGutterAST:B&&F?C.additionsGutterAST.children:void 0,additionsContentAST:v,hunkData:S,preNode:$,themeStyles:r,baseThemeType:a,headerElement:l?void 0:this.renderHeader(this.diff),totalLines:D,rowCount:C.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const n=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,r=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;const a=Ku(n);return a.properties.style=`grid-row: span ${t.rowCount}`,[a,NZ(r,t.rowCount)]}renderFullAST(e,t=[]){const n=this.getOptionsWithDefaults().hunkSeparators==="line-info",r=this.renderCodeAST("unified",e);if(r!=null)return t.push(Ne({tagName:"code",children:r,properties:{"data-code":"","data-container-size":n?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const a=this.renderCodeAST("deletions",e);a!=null&&t.push(Ne({tagName:"code",children:a,properties:{"data-code":"","data-container-size":n?"":void 0,"data-deletions":""}}));const s=this.renderCodeAST("additions",e);return s!=null&&t.push(Ne({tagName:"code",children:s,properties:{"data-code":"","data-container-size":n?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return as(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?as(e):as(Ne({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}pushFileLevelAnnotations(e,t,n,r){if(!IN(n))return;const a=e.type!=="new"?RE(pE(this.deletionAnnotations)):[],s=e.type!=="deleted"?RE(pE(this.additionAnnotations)):[];if(a.length===0&&s.length===0)return;const l=-1,d=-1,{createAnnotationElement:u}=this;if(t==="unified"){hd({diffStyle:t,type:"context",unifiedSpan:{type:"annotation",hunkIndex:l,lineIndex:d,annotations:a.concat(s)},createAnnotationElement:u,context:r});return}hd({diffStyle:t,type:"context",deletionSpan:{type:"annotation",hunkIndex:l,lineIndex:d,annotations:a},additionSpan:{type:"annotation",hunkIndex:l,lineIndex:d,annotations:s},createAnnotationElement:u,context:r})}getAnnotations(e,t,n,r,a){const s={type:"annotation",hunkIndex:r,lineIndex:a,annotations:[]};if(t!=null)for(const d of this.deletionAnnotations[t]??[])s.annotations.push(us(d));const l={type:"annotation",hunkIndex:r,lineIndex:a,annotations:[]};if(n!=null)for(const d of this.additionAnnotations[n]??[])(e==="unified"?s:l).annotations.push(us(d));if(e==="unified")return s.annotations.length>0?s:void 0;if(!(l.annotations.length===0&&s.annotations.length===0))return{deletionSpan:s,additionSpan:l}}renderHeader(e){const{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return lZ({fileOrDiff:e,mode:t,stickyHeader:n})}};function RE(e){return e?.map(t=>us(t))??[]}const BW=new Intl.PluralRules("en-US");function AE(e){return`${e} unmodified line${BW.select(e)==="one"?"":"s"}`}function TE(e,t){for(const n of e)t.unifiedContentAST.push(n.content),t.pushToGutter("unified",n.gutter),t.incrementRowCount(1)}function NE(e,t,n){for(const{deletion:r,addition:a}of e){if(r==null&&a==null)continue;const s=r!=null&&a!=null?void 0:r==null?"deletions":"additions";(s==null||n.side!==s)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter("deletions",r.gutter)),a!=null&&(t.additionsContentAST.push(a.content),t.pushToGutter("additions",a.gutter)),s!=null&&(n.side=s,n.increment()),t.incrementRowCount(1)}}function hd({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:a,deletionSpan:s,additionSpan:l,createAnnotationElement:d,context:u}){let m=!1;if(e==="unified"){if(r!=null?u.unifiedContentAST.push(r):n!=null&&u.unifiedContentAST.push(n),a!=null){const g=t==="change"?n!=null?"change-deletion":"change-addition":t;u.unifiedContentAST.push(d(a)),u.pushToGutter("unified",ir(g,"annotation",1)),m=!0}}else if(e==="split"){if(n!=null&&u.deletionsContentAST.push(n),r!=null&&u.additionsContentAST.push(r),s!=null){const g=t==="change"?n!=null?"change-deletion":"context":t;u.deletionsContentAST.push(d(s)),u.pushToGutter("deletions",ir(g,"annotation",1)),m=!0}if(l!=null){const g=t==="change"?r!=null?"change-addition":"context":t;u.additionsContentAST.push(d(l)),u.pushToGutter("additions",ir(g,"annotation",1)),m=!0}}m&&u.incrementRowCount(1)}function bg(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:a,isFirstHunk:s,isLastHunk:l,isExpandable:d},u){if(n<=0)return;const m=e==="unified"?u.unifiedContentAST:e==="deletions"?u.deletionsContentAST:u.additionsContentAST;if(u.hunkSeparators==="metadata"){a!=null&&(u.pushToGutter(e,qo({type:"metadata",content:a,isFirstHunk:s,isLastHunk:l})),m.push(qo({type:"metadata",content:a,isFirstHunk:s,isLastHunk:l})),e!=="additions"&&u.incrementRowCount(1));return}if(u.hunkSeparators==="simple"){t>0&&(u.pushToGutter(e,qo({type:"simple",isFirstHunk:s,isLastHunk:!1})),m.push(qo({type:"simple",isFirstHunk:s,isLastHunk:!1})),e!=="additions"&&u.incrementRowCount(1));return}const g=CW(e,t),p=r>u.expansionLineCount,v=d?t:void 0;u.pushToGutter(e,qo({type:u.hunkSeparators,content:AE(n),expandIndex:v,chunked:p,slotName:g,isFirstHunk:s,isLastHunk:l})),m.push(qo({type:u.hunkSeparators,content:AE(n),expandIndex:v,chunked:p,slotName:g,isFirstHunk:s,isLastHunk:l})),e!=="additions"&&u.incrementRowCount(1),u.hunkData.push({slotName:g,hunkIndex:t,lines:n,type:e,expandable:d?{up:!s,down:!l,chunked:p}:void 0})}function md(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function vg(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function VW(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function FW(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function GW(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators=="function"?"custom":e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}let qW=-1;var WN=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++qW}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(t={theme:Yn},n,r=!1){this.options=t,this.workerManager=n,this.isContainerManaged=r,this.hunksRenderer=this.createHunksRenderer(t),this.resizeManager=new TV,this.scrollSyncManager=new EW,this.interactionManager=new _V("diff",y1(t,typeof t.hunkSeparators=="function"||(t.hunkSeparators??"line-info")==="line-info"||t.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(t){return GW(t)}createHunksRenderer(t){return new HW(this.getHunksRendererOptions(t),this.handleHighlightRender,this.workerManager)}getLineIndex=(t,n="additions")=>{if(this.fileDiff==null)return;const r=this.fileDiff.hunks.at(-1);let a,s;e:for(const l of this.fileDiff.hunks){let d=n==="deletions"?l.deletionStart:l.additionStart;const u=n==="deletions"?l.deletionCount:l.additionCount;let m=l.splitLineStart,g=l.unifiedLineStart;if(t<d){const p=d-t;a=Math.max(g-p,0),s=Math.max(m-p,0);break e}if(t>=d+u){if(l===r){const p=t-(d+u);a=g+l.unifiedLineCount+p,s=m+l.splitLineCount+p;break e}continue}for(const p of l.hunkContent)if(p.type==="context")if(t<d+p.lines){const v=t-d;s=m+v,a=g+v;break e}else d+=p.lines,m+=p.lines,g+=p.lines;else{const v=n==="deletions"?p.deletions:p.additions;if(t<d+v){const y=t-d;a=g+(n==="additions"?p.deletions:0)+y,s=m+y;break e}else d+=v,m+=Math.max(p.deletions,p.additions),g+=p.deletions+p.additions}break e}if(!(a==null||s==null))return[a,s]};setOptions(t){t!=null&&(this.options=t,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(t)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(y1(this.options,typeof this.options.hunkSeparators=="function"||(this.options.hunkSeparators??"line-info")==="line-info"||this.options.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){(this.options.themeType??"system")!==t&&(this.mergeOptions({themeType:t}),this.applyCachedThemeState(t))}applyCachedThemeState(t){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const n=this.appliedThemeCSS.baseThemeType??t;return this.appliedThemeCSS.themeType===n?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,t,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Gv(this.appliedThemeCSS.theme,this.options.theme??Yn)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(t){this.lineAnnotations=t}canPartiallyRender(t,n,r){return!(t||n||r||typeof this.options.hunkSeparators=="function")}setSelectedLines(t,n){this.interactionManager.setSelection(t,n)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:t="split",overflow:n="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,n==="wrap"),n==="scroll"&&t==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(t=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,t||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,t||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,t?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(t){const{fileContainer:n,prerenderedHTML:r,preventEmit:a=!1,lineAnnotations:s,oldFile:l,newFile:d,fileDiff:u}=t;this.hydrateElements(n,r),YW(this.pre,ZW({fileDiff:u,oldFile:l,newFile:d}),this.options.collapsed)||KW(this.headerElement,WW({fileDiff:u,oldFile:l,newFile:d}),this.options.disableFileHeader)?this.render({...t,preventEmit:!0}):this.hydrationSetup({fileDiff:u,oldFile:l,newFile:d,lineAnnotations:s}),a||this.emitPostRender()}hydrateElements(t,n){this.fileContainer!==t&&this.emitPostRender(!0),FZ(t,n);for(const r of t.shadowRoot?.children??[]){if(r instanceof SVGElement){this.spriteSVG=r;continue}if(r instanceof HTMLElement){if(r instanceof HTMLPreElement){this.pre=r;for(const a of r.children)!(a instanceof HTMLElement)||a.tagName.toLowerCase()!=="code"||("deletions"in a.dataset&&(this.codeDeletions=a),"additions"in a.dataset&&(this.codeAdditions=a),"unified"in a.dataset&&(this.codeUnified=a));continue}if("diffsHeader"in r.dataset){this.headerElement=r;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute("data-theme-css")){this.themeCSSStyle=r;continue}if(r instanceof HTMLStyleElement&&r.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=r,this.appliedUnsafeCSS=r.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=t,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:t,oldFile:n,newFile:r,lineAnnotations:a}){this.lineAnnotations=a??this.lineAnnotations,this.additionFile=r,this.deletionFile=n,this.fileDiff=t??(n!=null&&r!=null?Tb(n,r,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(t,n,r)=>{this.expandHunk(t,n,r)};expandHunk=(t,n,r)=>{this.hunksRenderer.expandHunk(t,n,r),this.rerender()};render({oldFile:t,newFile:n,fileDiff:r,deferManagers:a=!1,forceRender:s=!1,preventEmit:l=!1,lineAnnotations:d,fileContainer:u,containerWrapper:m,renderRange:g}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:p=!1,themeType:v="system"}=this.options,y=p?void 0:g,_=this.hasThemeChanged(),S=t!=null&&n!=null&&(!uE(t,this.deletionFile)||!uE(n,this.additionFile));let E=r!=null&&r!==this.fileDiff;const k=d!=null&&(d.length>0||this.lineAnnotations.length>0)?d!==this.lineAnnotations:!1;if(!p&&ON(y,this.renderRange)&&!s&&!k&&!_&&(r!=null&&r===this.fileDiff||r==null&&!S))return this.applyCachedThemeState(v);const{renderRange:C}=this;if(this.renderRange=y,this.deletionFile=t,this.additionFile=n,r!=null?this.fileDiff=r:t!=null&&n!=null&&S&&(E=!0,this.fileDiff=Tb(t,n,this.options.parseDiffOptions)),E&&(this.cachedHeaderHTML=void 0),d!=null&&this.setLineAnnotations(d),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:A=!1,disableFileHeader:O=!1}=this.options;if(O&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),u=this.getOrCreateFileContainer(u,m),this.applyCachedThemeState(v),p){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const L=this.hunksRenderer.renderDiff(this.fileDiff,t7);L!=null&&this.applyThemeState(u,L.themeStyles,v,L.baseThemeType),L?.headerElement!=null&&this.applyHeaderToDOM(L.headerElement,u),this.renderSeparators([]),this.injectUnsafeCSS()}catch(L){if(A)throw L;console.error(L),L instanceof Error&&this.applyErrorToDOM(L,u)}return l||this.emitPostRender(),!0}try{const L=this.getOrCreatePreNode(u);if(!(this.canPartiallyRender(s,k,S||E||_)&&this.applyPartialRender({previousRenderRange:C,renderRange:y}))){const T=this.hunksRenderer.renderDiff(this.fileDiff,y);if(T==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(u,T.themeStyles,v,T.baseThemeType),T.headerElement!=null&&this.applyHeaderToDOM(T.headerElement,u),T.additionsContentAST!=null||T.deletionsContentAST!=null||T.unifiedContentAST!=null?this.applyHunksToDOM(L,T):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(T.hunkData)}this.applyBuffers(L,y),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,a||this.flushManagers()}catch(L){if(A)throw L;console.error(L),L instanceof Error&&this.applyErrorToDOM(L,u)}return l||this.emitPostRender(),!0}emitPostRender(t=!1){const{fileContainer:n,options:{onPostRender:r}}=this;if(t){if(!this.mounted||(this.mounted=!1,n==null))return;this.options.onPostRender?.(n,this,"unmount");return}if(n==null)return;const a=this.mounted?"update":"mount";this.mounted=!0,r?.(n,this,a)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:t}of this.separatorCache.values())t.remove();this.separatorCache.clear();for(const{element:t}of this.annotationCache.values())t.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(t){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const n=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",n.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${t}px`),!0}primeHighlightCache(){const{fileDiff:t,workerManager:n}=this;if(t==null||n==null||Nb(t))return;const r=this.options.tokenizeMaxLength??1e5;Math.max(t.additionLines.length,t.deletionLines.length)>r||n.primeDiffHighlightCache(t)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(t){const{hunkSeparators:n}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof n!="function"){for(const{element:a}of this.separatorCache.values())a.remove();this.separatorCache.clear();return}const r=new Map(this.separatorCache);for(const a of t){const s=a.slotName;let l=this.separatorCache.get(s);if(l==null||!FW(a,l.hunkData)){l?.element.remove();const d=document.createElement("div");d.style.display="contents",d.slot=a.slotName;const u=n(a,this);u!=null&&d.appendChild(u),this.fileContainer.appendChild(d),l={element:d,hunkData:a},this.separatorCache.set(s,l)}r.delete(s)}for(const[a,{element:s}]of r.entries())this.separatorCache.delete(a),s.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:r}of this.annotationCache.values())r.remove();this.annotationCache.clear();return}const t=new Map(this.annotationCache),{renderAnnotation:n}=this.options;if(n!=null&&this.lineAnnotations.length>0)for(const[r,a]of this.lineAnnotations.entries()){const s=`${r}-${us(a)}`;let l=this.annotationCache.get(s);if(l==null||!VW(a,l.annotation)){l?.element.remove();const d=n(a);if(d==null)continue;l={element:IZ(us(a)),annotation:a},l.element.appendChild(d),this.fileContainer.appendChild(l.element),this.annotationCache.set(s,l)}t.delete(s)}for(const[r,{element:a}]of t.entries())this.annotationCache.delete(r),a.remove()}renderGutterUtility(){const{renderGutterUtility:t}=this.options;if(this.fileContainer==null||t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=t(this.interactionManager.getHoveredLine);if(n!=null&&this.gutterUtilityContent!=null)return;if(n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const r=MZ();r.appendChild(n),this.fileContainer.appendChild(r),this.gutterUtilityContent=r}getOrCreateFileContainer(t,n){const{fileContainer:r}=this,a=t??r??document.createElement("diffs-container"),s=r!==a;return s&&this.emitPostRender(!0),this.fileContainer=a,r!=null&&s&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),n!=null&&this.fileContainer.parentNode!==n&&n.appendChild(this.fileContainer),s&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(t){const{shadowRoot:n}=t;if(n!=null)for(const r of n.children)r instanceof SVGElement?this.spriteSVG??=r:bE(r)&&r.hasAttribute("data-theme-css")?(this.themeCSSStyle??=r,this.hasAdoptedThemeCSS=!0):bE(r)&&r.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=r,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});if(this.spriteSVG==null){const r=document.createElement("div");r.innerHTML=LZ;const a=r.firstChild;a instanceof SVGElement&&(this.spriteSVG=a)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==n&&n.appendChild(this.spriteSVG)}getOrCreatePreNode(t){const n=t.shadowRoot??t.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,n.appendChild(this.pre)):this.pre.parentNode!==n&&(n.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(t){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const n of Array.from(t.children))n instanceof HTMLElement&&(n.hasAttribute("data-unified")?this.codeUnified=n:n.hasAttribute("data-deletions")?this.codeDeletions=n:n.hasAttribute("data-additions")&&(this.codeAdditions=n))}applyHeaderToDOM(t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:r}=this,a=this.cachedHeaderHTML??as(t);if(this.cachedHeaderHTML=a,a!==this.lastRenderedHeaderHTML){const g=document.createElement("div");g.innerHTML=a;const p=g.firstElementChild;if(!(p instanceof HTMLElement))return;this.headerElement!=null?n.shadowRoot?.replaceChild(p,this.headerElement):n.shadowRoot?.prepend(p),this.headerElement=p,this.lastRenderedHeaderHTML=a}if(this.isContainerManaged||r==null)return;const{renderCustomHeader:s,renderHeaderPrefix:l,renderHeaderMetadata:d}=this.options;if(s!=null){const g=s(r)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,Fv,g),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const u=l?.(r)??void 0,m=d?.(r)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,rT,u),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,iT,m),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(t,n,r,a){if(a==null){n?.remove();return}const s=n??this.createHeaderSlotElement(r);return n==null&&t.appendChild(s),this.replaceHeaderSlotContent(s,a),s}replaceHeaderSlotContent(t,n){t.replaceChildren(),n instanceof Element?t.appendChild(n):t.innerText=`${n}`}createHeaderSlotElement(t){const n=document.createElement("div");return n.slot=t,n}injectUnsafeCSS(){const{unsafeCSS:t}=this.options,n=this.fileContainer?.shadowRoot;if(n!=null){if(t==null||t===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===n&&this.appliedUnsafeCSS===t||(this.unsafeCSSStyle??=PZ(),this.unsafeCSSStyle.parentNode!==n&&n.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=UZ(t),this.appliedUnsafeCSS=t)}}applyThemeState(t,n,r,a){const s=t.shadowRoot??t.attachShadow({mode:"open"}),l=a??r,d=this.options.theme??Yn,u=typeof d=="string"?d:{...d},m=Cb(s);if(this.themeCSSStyle?.parentNode===s&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===l&&this.appliedThemeCSS.scrollbarGutter===m){this.appliedThemeCSS.theme=u;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===s){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:u,themeStyles:n,themeType:l,baseThemeType:a,scrollbarGutter:m};return}this.themeCSSStyle=qZ({shadowRoot:s,currentNode:this.themeCSSStyle,themeCSS:HZ(n,l,m)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:u,themeStyles:n,themeType:l,baseThemeType:a,scrollbarGutter:m}:void 0}hydrateMeasuredScrollbar(){const t=this.fileContainer?.shadowRoot;t==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=BZ(this.themeCSSStyle.textContent??"",Cb(t)))}applyHunksToDOM(t,n){const{overflow:r="scroll"}=this.options,a=(this.options.hunkSeparators??"line-info")==="line-info",s=r==="wrap"?n.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,n);let l=!1;const d=[],u=this.hunksRenderer.renderCodeAST("unified",n),m=this.hunksRenderer.renderCodeAST("deletions",n),g=this.hunksRenderer.renderCodeAST("additions",n);u!=null?(l=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=fg({code:this.codeUnified,columnType:"unified",rowSpan:s,containerSize:a}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(u),d.push(this.codeUnified)):m!=null||g!=null?(m!=null?(l=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=fg({code:this.codeDeletions,columnType:"deletions",rowSpan:s,containerSize:a}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(m),d.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),g!=null?(l=l||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=fg({code:this.codeAdditions,columnType:"additions",rowSpan:s,containerSize:a}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(g),d.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),d.length===0?t.textContent="":l&&t.replaceChildren(...d),this.lastRowCount=n.rowCount}applyPartialRender({previousRenderRange:t,renderRange:n}){const{pre:r,codeUnified:a,codeAdditions:s,codeDeletions:l,options:{diffStyle:d="split"}}=this;if(r==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;const u=this.getCodeColumns(d,a,l,s);if(u==null)return!1;const m=t.startingLine,g=n.startingLine,p=m+t.totalLines,v=g+n.totalLines,y=Math.max(m,g),_=Math.min(p,v);if(_<=y)return!1;const S=Math.max(0,y-m),E=Math.max(0,p-_),k=this.trimColumns({columns:u,trimStart:S,trimEnd:E,previousStart:m,overlapStart:y,overlapEnd:_,diffStyle:d});if(k<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<k)throw new Error("applyPartialRender: trimmed beyond DOM row count");let C=this.lastRowCount-k;const A=(D,M)=>{if(!(M<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:D,totalLines:M,bufferBefore:0,bufferAfter:0})},O=A(g,Math.max(y-g,0));if(O==null&&g<y)return!1;const L=A(_,Math.max(v-_,0));if(L==null&&v>_)return!1;const T=(D,M)=>{if(D!=null){if(d==="unified"&&!Array.isArray(u))this.insertPartialHTML(d,u,D,M);else if(d==="split"&&Array.isArray(u))this.insertPartialHTML(d,u,D,M);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");C+=D.rowCount}};return this.cleanupErrorWrapper(),T(O,"afterbegin"),T(L,"beforeend"),this.lastRowCount!==C&&(this.applyRowSpan(d,u,C),this.lastRowCount=C),!0}insertPartialHTML(t,n,r,a){if(t==="unified"&&!Array.isArray(n)){const s=this.hunksRenderer.renderCodeAST("unified",r);this.renderPartialColumn(n,s,a)}else if(t==="split"&&Array.isArray(n)){const s=this.hunksRenderer.renderCodeAST("deletions",r),l=this.hunksRenderer.renderCodeAST("additions",r);this.renderPartialColumn(n[0],s,a),this.renderPartialColumn(n[1],l,a)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(t,n,r){if(t==null||n==null)return;const a=jE(n[0]),s=jE(n[1]);if(a==null||s==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const l=s.at(0);r==="beforeend"&&l?.type==="element"&&typeof l.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(l.properties["data-buffer-size"],t.content.children[t.content.children.length-1],t.gutter.children[t.gutter.children.length-1],a,s,!0);const d=s.at(-1);r==="afterbegin"&&d?.type==="element"&&typeof d.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(d.properties["data-buffer-size"],t.content.children[0],t.gutter.children[0],a,s,!1),t.gutter.insertAdjacentHTML(r,this.hunksRenderer.renderPartialHTML(a)),t.content.insertAdjacentHTML(r,this.hunksRenderer.renderPartialHTML(s))}mergeBuffersIfNecessary(t,n,r,a,s,l){if(!(n instanceof HTMLElement)||!(r instanceof HTMLElement))return;const d=this.getBufferSize(n.dataset);d!=null&&(l?(a.shift(),s.shift()):(a.pop(),s.pop()),this.updateBufferSize(n,d+t),this.updateBufferSize(r,d+t))}applyRowSpan(t,n,r){const a=s=>{s!=null&&(s.gutter.style.setProperty("grid-row",`span ${r}`),s.content.style.setProperty("grid-row",`span ${r}`))};if(t==="unified"&&!Array.isArray(n))a(n);else if(t==="split"&&Array.isArray(n))a(n[0]),a(n[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(t,n,r){let a=0,s=0,l=0,d=!1;const u=r>=0;if(t==null)return 0;const m=Array.from(t.content.children),g=Array.from(t.gutter.children);if(m.length!==g.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;l<m.length&&!(n<=0&&!u&&!d);){const p=g[l],v=m[l];if(l++,!(p instanceof HTMLElement)||!(v instanceof HTMLElement))throw console.error({gutterElement:p,contentElement:v}),new Error("FileDiff.trimColumnRows: invalid row elements");if(d&&(d=!1,p.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset||p.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset)){p.remove(),v.remove(),s++;continue}if("lineIndex"in p.dataset&&"lineIndex"in v.dataset){(n>0||u&&a>=r)&&(p.remove(),v.remove(),n>0&&(n--,n===0&&(d=!0)),s++),a++;continue}if("separator"in p.dataset&&"separator"in v.dataset){(n>0||u&&a>=r)&&(p.remove(),v.remove(),s++);continue}if(p.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset){(n>0||u&&a>=r)&&(p.remove(),v.remove(),s++);continue}if(p.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset){(n>0||u&&a>=r)&&(p.remove(),v.remove(),s++);continue}if(p.dataset.gutterBuffer==="buffer"&&"contentBuffer"in v.dataset){const y=this.getBufferSize(v.dataset);if(y==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(n>0){const _=Math.min(n,y),S=y-_;S>0?(this.updateBufferSize(p,S),this.updateBufferSize(v,S),s+=_):(p.remove(),v.remove(),s+=y),n-=_,n===0&&S===0&&(d=!0)}else if(u){const _=a,S=a+y-1;if(r<=_)p.remove(),v.remove(),s+=y;else if(r<=S){const E=S-r+1,k=y-E;this.updateBufferSize(p,k),this.updateBufferSize(v,k),s+=E}}a+=y;continue}throw console.error({gutterElement:p,contentElement:v}),new Error("FileDiff.trimColumnRows: unknown row elements")}return s}trimColumns({columns:t,diffStyle:n,overlapEnd:r,overlapStart:a,previousStart:s,trimEnd:l,trimStart:d}){const u=Math.max(0,a-s),m=r-s;if(m<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const g=d>0,p=l>0;if(!g&&!p)return 0;const v=g?u:0,y=p?m:-1;if(n==="unified"&&!Array.isArray(t))return this.trimColumnRows(t,v,y);if(n==="split"&&Array.isArray(t)){const _=this.trimColumnRows(t[0],v,y),S=this.trimColumnRows(t[1],v,y);if(t[0]!=null&&t[1]!=null&&_!==S)throw new Error("FileDiff.trimColumns: split columns out of sync");return t[0]!=null?_:S}else throw console.error({diffStyle:n,columns:t}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(t){const n=Number.parseInt(t?.bufferSize??"",10);return Number.isNaN(n)?void 0:n}updateBufferSize(t,n){t.dataset.bufferSize=`${n}`,t.style.setProperty("grid-row",`span ${n}`),t.style.setProperty("min-height",`calc(${n} * 1lh)`)}getCodeColumns(t,n,r,a){function s(l){if(l==null)return;const d=l.children[0],u=l.children[1];if(!(!(d instanceof HTMLElement)||!(u instanceof HTMLElement)||d.dataset.gutter==null||u.dataset.content==null))return{gutter:d,content:u}}if(t==="unified")return s(n);{const l=s(r),d=s(a);return l!=null||d!=null?[l,d]:void 0}}applyBuffers(t,n){if(n==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}n.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",t.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${n.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),n.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",t.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${n.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(t,{additionsContentAST:n,deletionsContentAST:r,totalLines:a},s){const{diffIndicators:l="bars",disableBackground:d=!1,disableLineNumbers:u=!1,overflow:m="scroll",diffStyle:g="split"}=this.options,p={type:"diff",diffIndicators:l,disableBackground:d,disableLineNumbers:u,overflow:m,split:g==="unified"?!1:n!=null&&r!=null,totalLines:a,customProperties:s};OZ(p,this.appliedPreAttributes)||(GZ(t,p),this.appliedPreAttributes=p)}applyErrorToDOM(t,n){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const r=n.shadowRoot??n.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",r.appendChild(this.errorWrapper);const a=document.createElement("div");a.dataset.errorMessage="",a.innerText=t.message,this.errorWrapper.appendChild(a);const s=document.createElement("pre");s.dataset.errorStack="",s.innerText=t.stack??"No Error Stack",this.errorWrapper.appendChild(s)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function ZW({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function WW({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function YW(e,t,n=!1){return!n&&e==null&&t}function KW(e,t,n=!1){return e==null&&t&&!n}function jE(e){if(!(e==null||e.type!=="element"))return e.children??[]}function XW({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:a,expandedHunks:s,collapsedContextThreshold:l}){let d=Qo(t,n),u=d;const m=a?!0:s,g=e.hunks.length-1;for(let p=0;p<e.hunks.length;p++){const v=e.hunks[p];if(v==null)throw new Error("computeEstimatedDiffHeights: invalid hunk index");const y=ic({isPartial:e.isPartial,rangeSize:v.collapsedBefore,expandedHunks:m,hunkIndex:p,collapsedContextThreshold:l}),_=(y.fromStart+y.fromEnd)*t.lineHeight;if(d+=_,u+=_,y.collapsedLines>0){const k=Il({type:r,metrics:t,hunkIndex:p,hunkSpecs:v.hunkSpecs})?.totalHeight??0;d+=k,u+=k}d+=v.splitLineCount*t.lineHeight,u+=v.unifiedLineCount*t.lineHeight;const S=QW(v);d+=S.split*t.lineHeight,u+=S.unified*t.lineHeight;const E=p===g?ac({fileDiff:e,hunkIndex:p,expandedHunks:m,collapsedContextThreshold:l,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(E!=null){const k=(E.fromStart+E.fromEnd)*t.lineHeight;if(d+=k,u+=k,E.collapsedLines>0){const C=Ml({type:r,metrics:t})?.totalHeight??0;d+=C,u+=C}}}if(e.hunks.length>0){const p=zN(t);d+=p,u+=p}return{splitHeight:d,unifiedHeight:u}}function QW(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};const t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type==="context"){const n=t.lines>0?1:0;return{split:n,unified:n}}return JW(e,t)}function JW(e,t){const n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,a=t.additions>0&&e.noEOFCRAdditions;return{split:r||a?1:0,unified:n}}const jb=5e3;let eY=-1;var tY=class extends WN{__id=`little-virtualized-file-diff:${++eY}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n,r,a=!1){super(e,r,a),this.virtualizer=t,this.metrics=hg(n)}setMetrics(e,t=!1){const n=hg(e);!t&&tb(this.metrics,n)||(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}setFileAnnotationHeight(e){const t=this.cache.fileAnnotationHeight;return e===t?!1:(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e=this.fileDiff){return e==null||!TZ(this.lineAnnotations)?!1:this.lineAnnotations.some(t=>t.lineNumber!==0?!1:e.type==="new"?t.side==="additions":e.type==="deleted"?t.side==="deletions":!0)}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){const t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!oT(t,e),r=n&&sY(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:lY(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;const{overflow:t="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;const n=this.getDiffStyle(),r=n==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],a=this.hasFileAnnotations(this.fileDiff);if(this.renderRange!=null&&a&&IN(this.renderRange)){const s=nY(r)??0;this.setFileAnnotationHeight(s)&&(e=!0)}else!a&&this.setFileAnnotationHeight(0)&&(e=!0);for(const s of r){if(s==null)continue;const l=s.children[1];if(l instanceof HTMLElement)for(const d of l.children){if(!(d instanceof HTMLElement))continue;const u=d.dataset.lineIndex;if(u==null)continue;const m=uY(u,n);let g=d.getBoundingClientRect().height,p=!1;d.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in d.nextElementSibling.dataset||"noNewline"in d.nextElementSibling.dataset)&&("noNewline"in d.nextElementSibling.dataset&&(p=!0),g+=d.nextElementSibling.getBoundingClientRect().height);const v=this.getEstimatedLineHeight(p),y=this.cache.heightDeltas.get(m)??0,_=g-v;_!==y&&(e=!0,this.cache.measuredHeightDeltaTotal+=_-y,_===0?this.cache.heightDeltas.delete(m):this.cache.heightDeltas.set(m,_))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,n,r){const a=!Dl(this.fileDiff,e),s=this.syncLineAnnotations(r);let l=n?.resetDiffLayoutCache===!0||a||s,d=a||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=hg(n.metrics),l=!0,d=!0);const{collapsed:u=!1}=this.options;return this.currentCollapsed!==u&&(this.currentCollapsed=u,l=!0),l&&this.resetLayoutCache({includeEstimatedHeights:d}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null||e<1)return;const n=this.getLineIndex(e,t);if(n==null)return;const{disableFileHeader:r=!1,expandUnchanged:a=!1,collapsed:s=!1,collapsedContextThreshold:l=1}=this.options,d=this.getDiffStyle(),u=this.getHunkSeparatorType(),m=d==="split"?n[1]:n[0];this.approximateLayoutCheckpoints();const g=Qo(this.metrics,r),p=this.getLayoutCheckpointBeforeLineIndex(m);let v=p?.top??g+this.cache.fileAnnotationHeight;if(s)return{top:g,height:0};let y;return Bl({diff:this.fileDiff,diffStyle:d,startingLine:p?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:l,callback:({hunkIndex:_,hunk:S,collapsedBefore:E,collapsedAfter:k,deletionLine:C,additionLine:A})=>{const O=d==="split"?A?.splitLineIndex??C?.splitLineIndex:A?.unifiedLineIndex??C?.unifiedLineIndex;if(O==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(E>0){const T=Il({type:u,metrics:this.metrics,hunkIndex:_,hunkSpecs:S?.hunkSpecs});if(T!=null){if(v+=T.gapBefore,m>=O-E&&m<O)return y={top:v,height:T.height},!0;v+=T.height+T.gapAfter}}const L=this.getLineHeight(O,(A?.noEOFCR??!1)||(C?.noEOFCR??!1));if(O===m)return y={top:v,height:L},!0;if(v+=L,k>0){const T=Ml({type:u,metrics:this.metrics});if(T!=null){if(m>O&&m<=O+k)return y={top:v+T.gapBefore,height:T.height},!0;v+=T.totalHeight}}return!1}}),y}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:r=!1,collapsedContextThreshold:a=1}=this.options;if(r)return;const s=this.getDiffStyle(),l=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const d=this.getLayoutCheckpointBeforeTop(e);let u=d?.top??Qo(this.metrics,t)+this.cache.fileAnnotationHeight,m;return Bl({diff:this.fileDiff,diffStyle:s,startingLine:d?.renderedLineIndex??0,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:g,hunk:p,collapsedBefore:v,collapsedAfter:y,deletionLine:_,additionLine:S})=>{const E=s==="split"?S?.splitLineIndex??_?.splitLineIndex:S?.unifiedLineIndex??_?.unifiedLineIndex;if(E==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(v>0){const C=Il({type:l,metrics:this.metrics,hunkIndex:g,hunkSpecs:p?.hunkSpecs});C!=null&&(u+=C.totalHeight)}if(u>=e&&(_!=null?m={lineNumber:_.lineNumber,side:"deletions",top:u}:S!=null&&(m={lineNumber:S.lineNumber,side:"additions",top:u}),m!=null))return!0;const k=this.getLineHeight(E,(S?.noEOFCR??!1)||(_?.noEOFCR??!1));if(u+=k,y>0){const C=Ml({type:l,metrics:this.metrics});C!=null&&(u+=C.totalHeight)}return!1}}),m}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:r,totalLines:a}=t;let s=0;if(a===0){const l=e??this.virtualizer.getWindowSpecs();this.top<l.top&&(s=r)}return{topOffset:this.top+n+s,height:this.height-(n+r)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(e=!1){const t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;const n=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}const{disableFileHeader:r=!1,collapsed:a=!1}=this.options,s=Qo(this.metrics,r);if(this.height+=s,a){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!n&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();const e=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(e==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return e}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,{splitHeight:r,unifiedHeight:a}=XW({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:n});this.cache.estimatedSplitHeight=r,this.cache.estimatedUnifiedHeight=a}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;const e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:r,forceRender:a=!1,lineAnnotations:s,...l}={}){const{forceRenderOverride:d,isSetup:u}=this;this.forceRenderOverride=void 0;const m=this.syncLineAnnotations(s);if(m&&this.resetLayoutCache({includeEstimatedHeights:!1}),this.fileDiff??=r??(t!=null&&n!=null?Tb(t,n,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(u)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const y=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(y==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");y.connect(e,this),this.isVisible=y.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const g=this.virtualizer.getWindowSpecs(),p=this.top??0,v=this.computeRenderRangeFromWindow(this.fileDiff,p,g);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:v,oldFile:t,newFile:n,lineAnnotations:s,forceRender:(d??a)||m,...l})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return cY(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,r=this.fileDiff.hunks.length-1,a=this.getDiffStyle(),s=this.getHunkSeparatorType(),l=t?!0:this.hunksRenderer.getExpandedHunksMap(),d=rY(this.cache.heightDeltas);let u=Qo(this.metrics,e)+this.cache.fileAnnotationHeight,m=0;const g=({rowCount:p,startLineIndex:v,preSeparatorHeight:y=0,postSeparatorHeight:_=0,metadataOffsets:S=[]})=>{if(p<=0)return;const E=m,k=m+p;let C=iY(E);for(;C<k;){const A=C-E,O=u+(A>0?y:0)+A*this.metrics.lineHeight+aY(S,A)*this.metrics.lineHeight+LE(d,v,v+A);this.cache.checkpoints.push({renderedLineIndex:C,lineIndex:v+A,top:O}),C+=jb}u+=y+p*this.metrics.lineHeight+S.length*this.metrics.lineHeight+LE(d,v,v+p)+_,m=k};for(let p=0;p<this.fileDiff.hunks.length;p++){const v=this.fileDiff.hunks[p];if(v==null)throw new Error("VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index");const y=ic({isPartial:this.fileDiff.isPartial,rangeSize:v.collapsedBefore,expandedHunks:l,hunkIndex:p,collapsedContextThreshold:n}),_=y.collapsedLines>0?Il({type:s,metrics:this.metrics,hunkIndex:p,hunkSpecs:v.hunkSpecs})?.totalHeight??0:0;g({rowCount:y.fromStart,startLineIndex:(a==="split"?v.splitLineStart:v.unifiedLineStart)-y.rangeSize});let S=_;g({rowCount:y.fromEnd,startLineIndex:(a==="split"?v.splitLineStart:v.unifiedLineStart)-y.fromEnd,preSeparatorHeight:S}),y.fromEnd>0&&(S=0);const E=p===r?ac({fileDiff:this.fileDiff,hunkIndex:p,expandedHunks:l,collapsedContextThreshold:n,errorPrefix:"VirtualizedFileDiff"}):void 0,k=E!=null&&E.collapsedLines>0?Ml({type:s,metrics:this.metrics})?.totalHeight??0:0,C=E!=null?E.fromStart+E.fromEnd:0,A=a==="split"?v.splitLineCount:v.unifiedLineCount,O=a==="split"?v.splitLineStart:v.unifiedLineStart;g({rowCount:A,startLineIndex:O,preSeparatorHeight:S,postSeparatorHeight:C===0?k:0,metadataOffsets:oY({diffStyle:a,hunk:v,rowCount:A})}),E!=null&&C>0&&g({rowCount:C,startLineIndex:O+A,postSeparatorHeight:k})}this.cache.totalLines=m}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){const a=t+n>>1,s=this.cache.checkpoints[a];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");s.lineIndex<=e?(r=s,t=a+1):n=a-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,a=-1;for(;n<=r;){const s=n+r>>1,l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");l.top<=e?(a=s,n=s+1):r=s-1}if(t==null)return a>=0?this.cache.checkpoints[a]:void 0;for(let s=a;s>=0;s--){const l=this.cache.checkpoints[s];if(l==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(l.renderedLineIndex%t===0)return l}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(const d of e.hunks)n+=t==="split"?d.splitLineCount:d.unifiedLineCount;return n}const{expandUnchanged:r=!1,collapsedContextThreshold:a=1}=this.options,s=r?!0:this.hunksRenderer.getExpandedHunksMap();for(const[d,u]of e.hunks.entries()){const m=t==="split"?u.splitLineCount:u.unifiedLineCount;n+=m;const g=Math.max(u.collapsedBefore,0),{fromStart:p,fromEnd:v,renderAll:y}=ic({isPartial:e.isPartial,rangeSize:g,expandedHunks:s,hunkIndex:d,collapsedContextThreshold:a});g>0&&(n+=y?g:p+v)}const l=ac({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:s,collapsedContextThreshold:a,errorPrefix:"VirtualizedFileDiff"});return l!=null&&(n+=l.fromStart+l.fromEnd),n}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){const{disableFileHeader:a=!1,expandUnchanged:s=!1,collapsedContextThreshold:l=1}=this.options,{hunkLineCount:d,lineHeight:u}=this.metrics,m=this.getDiffStyle(),g=this.getHunkSeparatorType(),p=this.height;let v=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,m);const y=Qo(this.metrics,a),_=e.hunks.length>0?zN(this.metrics):0,{fileAnnotationHeight:S}=this.cache,E=y+S,k=Math.max(0,p-y-S-_),C=this.hasFileAnnotations(e),A=t+y,O=S>0&&C&&A<r&&A+S>n;if(t<n-p||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-y-_};if(v<=d||e.hunks.length===0)return{startingLine:0,totalLines:d,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),v=this.cache.totalLines>0?this.cache.totalLines:v;const L=Math.ceil(Math.max(r-n,0)/u),T=Math.ceil(L/d)*d+d,D=T/d,M=D,B=[],Y=(n+r)/2,F=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-T*u*2),d);let $=t+(F?.top??E),q=F?.renderedLineIndex??0,ne,se,z;if(Bl({diff:e,diffStyle:m,startingLine:F?.renderedLineIndex??0,expandedHunks:s?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:l,callback:({hunkIndex:fe,hunk:ye,collapsedBefore:Re,collapsedAfter:he,deletionLine:Ke,additionLine:Be})=>{const Ot=Be!=null?Be.splitLineIndex:Ke.splitLineIndex,Et=Be!=null?Be.unifiedLineIndex:Ke.unifiedLineIndex,nt=(Be?.noEOFCR??!1)||(Ke?.noEOFCR??!1),an=(Re>0?Il({type:g,metrics:this.metrics,hunkIndex:fe,hunkSpecs:ye?.hunkSpecs}):void 0)?.totalHeight??0;$+=an;const Ut=q%d===0,ks=Math.floor(q/d);if(Ut&&(B[ks]=$-(t+E+an),z!=null)){if(z<=0)return!0;z--}const Qa=this.getLineHeight(m==="split"?Ot:Et,nt);return $>n-Qa&&$<r&&(ne??=ks),se==null&&$+Qa>Y&&(se=ks),z==null&&$>=r&&Ut&&(z=M),q++,$+=Qa,he>0&&($+=Ml({type:g,metrics:this.metrics})?.totalHeight??0),!1}}),ne==null)if(O)ne=0,se=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-y-_};se??=ne;const G=Math.round(se-D/2),ie=Math.max(0,Math.ceil(v/d)-D),J=Math.max(0,Math.min(G,ie)),Z=J*d,P=G<0?T+G*d:T,ee=B[J]??0,le=Z===0?0:S+ee,de=J+P/d,ce=de<B.length?k-B[de]:k-($-t-E);return{startingLine:Z,totalLines:P,bufferBefore:le,bufferAfter:Math.max(0,ce)}}};function nY(e){let t;for(const n of e){if(n==null)continue;const r=n.children[1];if(r instanceof HTMLElement)for(const a of r.children)a instanceof HTMLElement&&a.dataset.lineAnnotation===AZ&&(t=Math.max(t??0,a.getBoundingClientRect().height))}return t}function rY(e){const t=Array.from(e).sort((s,l)=>s[0]-l[0]),n=[],r=[0];let a=0;for(const[s,l]of t)n.push(s),a+=l,r.push(a);return{lineIndexes:n,prefixTotals:r}}function LE({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;const a=OE(e,n);return(t[OE(e,r)]??0)-(t[a]??0)}function OE(e,t){let n=0,r=e.length;for(;n<r;){const a=n+r>>1,s=e[a];if(s==null)throw new Error("VirtualizedFileDiff: invalid prefix index");s<t?n=a+1:r=a}return n}function iY(e){return Math.ceil(e/jb)*jb}function aY(e,t){let n=0;for(const r of e)r<t&&n++;return n}function oY({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];const r=t.hunkContent.at(-1);if(r==null)return[];if(r.type==="context")return[n-1];const a=Math.max(r.deletions,r.additions),s=r.deletions+r.additions;if(e==="split")return a>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];const l=[],d=n-s;return r.deletions>0&&t.noEOFCRDeletions&&l.push(d+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&l.push(n-1),l}function sY(e,t){return(e.diffStyle??"split")!==(t.diffStyle??"split")||(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??"bars")!==(t.diffIndicators??"bars")||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function lY(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function cY(e){return typeof e=="function"?"custom":e??"line-info"}function uY(e,t){const[n,r]=e.split(",").map(Number);return t==="split"?r:n}function dY({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function fY(e,t){const n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:hY(n,e.startContentIndex)}}function hY(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){const a=e.hunkContent[r];n+=a.type==="context"?a.lines:a.deletions+a.additions}return n}const mY={position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},pY={display:"contents"};function DE(){return null}function gY({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderMetadata:a,renderAnnotation:s,renderGutterUtility:l,renderMergeConflictUtility:d,lineAnnotations:u,getHoveredLine:m,getInstance:g}){const p=n?.(e),v=r?.(e),y=a?.(e);return h.jsxs(h.Fragment,{children:[p!=null?h.jsx("div",{slot:Fv,children:p}):h.jsxs(h.Fragment,{children:[v!=null&&h.jsx("div",{slot:"header-prefix",children:v}),y!=null&&h.jsx("div",{slot:"header-metadata",children:y})]}),s!=null&&u?.map((_,S)=>h.jsx("div",{slot:us(_),children:s(_)},S)),t!=null&&d!=null&&g!=null&&t.map(_=>{if(_==null)return;const S=bY(_,e);return h.jsx("div",{slot:S,style:pY,children:d(_,g)},S)}),l!=null&&h.jsx("div",{slot:"gutter-utility-slot",style:mY,children:l(m)})]})}function bY(e,t){const n=fY(e,t);return n!=null?dY({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex}):void 0}function vY(e){const t=R.useRef(e);return R.useInsertionEffect(()=>{t.current=e}),R.useCallback((...n)=>t.current(...n),[])}const yY=R.createContext(void 0);function xY(e,t){return typeof window>"u"&&t!=null?h.jsxs(h.Fragment,{children:[h.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:t}}),e]}):h.jsx(h.Fragment,{children:e})}const _Y=R.createContext(void 0);function SY(){return R.useContext(_Y)}const wY=typeof window>"u"?R.useEffect:R.useLayoutEffect;function EY({fileDiff:e,options:t,lineAnnotations:n,selectedLines:r,prerenderedHTML:a,metrics:s,hasGutterRenderUtility:l,hasCustomHeader:d,disableWorkerPool:u}){const m=SY(),g=r!==void 0,p=R.useContext(yY),v=R.useRef(null),y=vY(_=>{if(_!=null){if(v.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");m!=null?v.current=new tY(yg({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:l,options:t}),m,s,u?void 0:p,!0):v.current=new WN(yg({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:l,options:t}),u?void 0:p,!0),v.current.hydrate({fileDiff:e,fileContainer:_,lineAnnotations:n,prerenderedHTML:a})}else{if(v.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");v.current.cleanUp(),v.current=null}});return wY(()=>{const{current:_}=v;if(_==null)return;const S=yg({controlledSelection:g,hasCustomHeader:d,hasGutterRenderUtility:l,options:t}),E=!oT(_.options,S);_.setOptions(S),_.render({forceRender:E,fileDiff:e,lineAnnotations:n}),r!==void 0&&_.setSelectedLines(r)}),{ref:y,getHoveredLine:R.useCallback(()=>v.current?.getHoveredLine(),[])}}function yg({options:e,controlledSelection:t,hasCustomHeader:n,hasGutterRenderUtility:r}){return!t&&!r&&!n?e:{...e,controlledSelection:t,renderCustomHeader:n?DE:e?.renderCustomHeader,renderGutterUtility:r?DE:e?.renderGutterUtility}}function CY({fileDiff:e,options:t,metrics:n,lineAnnotations:r,selectedLines:a,className:s,style:l,prerenderedHTML:d,renderAnnotation:u,renderCustomHeader:m,renderHeaderPrefix:g,renderHeaderMetadata:p,renderGutterUtility:v,disableWorkerPool:y=!1}){const{ref:_,getHoveredLine:S}=EY({fileDiff:e,options:t,metrics:n,lineAnnotations:r,selectedLines:a,prerenderedHTML:d,hasGutterRenderUtility:v!=null,hasCustomHeader:m!=null,disableWorkerPool:y});return h.jsx(tT,{ref:_,className:s,style:l,children:xY(gY({fileDiff:e,renderCustomHeader:m,renderHeaderPrefix:g,renderHeaderMetadata:p,renderAnnotation:u,renderGutterUtility:v,lineAnnotations:r,getHoveredLine:S}),d)})}function kY({patch:e}){return h.jsx(AY,{fallback:e,children:h.jsx(RY,{patch:e})},e)}function RY({patch:e}){const t=U.useMemo(()=>nW(e).flatMap(r=>r.files),[e]);if(!t.length)return h.jsx("pre",{className:Vv,children:e});const n={themeType:"dark",diffStyle:window.matchMedia("(max-width: 1200px)").matches?"unified":"split",diffIndicators:"bars",overflow:"scroll",stickyHeader:!0};return h.jsx("div",{className:"flex flex-col gap-3 p-3 site:gap-4 site:px-0",children:t.map(r=>h.jsx(CY,{fileDiff:r,disableWorkerPool:!0,options:n},`${r.prevName??""}:${r.name}`))})}class AY extends U.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(t){console.error("diff renderer failed",t)}render(){return this.state.failed?h.jsx("pre",{className:Vv,children:this.props.fallback}):this.props.children}}function TY({file:e}){const[t,n]=U.useState(!1);if(U.useEffect(()=>{if(!t)return;const d=u=>{u.key==="Escape"&&n(!1)};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[t]),!e)return h.jsx("p",{className:jn,children:"Select a file to inspect."});if(e.loading)return h.jsxs("p",{className:Yd,children:["reading ",e.path]});if(e.error)return h.jsx("p",{className:`${jn} !text-(--bad-fg) site:!text-danger`,children:e.error});const r=e.sizeBytes??e.text?.length??0;if(e.text===void 0)return h.jsx("div",{className:Kl,children:h.jsx(ri,{title:"Binary File",detail:e.path,children:h.jsxs("p",{className:"px-4 py-3 text-(--muted-fg)",children:[jl(r)," · not shown inline. Repository snapshots and archives stay on the server."]})})});const a=DB(e.path),s=e.tail?`last ${jl(e.tail.shownBytes)} of ${jl(r)}`:`${jl(r)} · ${e.text.split(`
|
|
1677
|
+
`).length} lines`,l=a==="patch"?h.jsx(kY,{patch:e.text}):a==="json"?h.jsx(o1,{text:jY(e.text)}):h.jsx(o1,{text:e.text,wrap:a==="text"});return t?h.jsxs("div",{className:"fixed inset-0 z-50 grid grid-rows-[auto_minmax(0,1fr)] bg-(--background) site:z-30",role:"dialog","aria-label":`${e.path} Full Screen`,children:[h.jsxs("div",{className:"flex h-12 items-center gap-3.5 border-b border-(--border) bg-(--viewer-panel) px-6 site:h-auto site:min-h-12 site:flex-wrap site:gap-3 site:py-3 site:break-all",children:[h.jsx("span",{className:"text-xs tracking-[0.16em] text-(--muted-fg) uppercase site:font-mono site:text-sm site:font-medium site:tracking-[0.14em] site:text-brand",children:a}),h.jsx("b",{className:"font-mono text-sm",children:e.path}),h.jsx("span",{className:"text-xs text-(--muted-fg) site:font-mono site:text-sm",children:s}),h.jsx("span",{className:"flex-1"}),h.jsx("span",{className:"text-xs text-(--faint) site:hidden site:font-mono site:text-sm site:text-muted-foreground site:sm:inline",children:"esc to close"}),h.jsx("button",{type:"button",className:vB,onClick:()=>n(!1),"aria-label":"Exit Full Screen",title:"Exit Full Screen",children:h.jsx(jD,{"aria-hidden":"true",className:"size-4"})})]}),h.jsx("div",{className:"overflow-auto px-6 pt-4 pb-10 [&_pre]:p-0 site:pb-4",children:l})]}):h.jsxs("div",{className:Kl,ref:NY(!!e.tail),children:[e.tail&&h.jsxs("p",{className:`${jn} site:p-0!`,children:["Showing the end of the log, where sandbox failures are reported."," ",h.jsx("button",{type:"button",className:Ed,onClick:e.tail.loadFull,children:"Load Full File"})]}),h.jsx(ri,{title:a,detail:e.path,right:h.jsxs("span",{className:"inline-flex items-baseline gap-3.5 site:items-center site:gap-3",children:[h.jsx("span",{children:s}),h.jsx("button",{type:"button",className:"inline-flex size-8 cursor-pointer items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground",onClick:()=>n(!0),"aria-label":"Full Screen",title:"Full Screen",children:h.jsx(ND,{"aria-hidden":"true",className:"size-4"})})]}),children:l})]})}function NY(e){return t=>{t&&e&&(t.scrollTop=t.scrollHeight)}}function jY(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const LY=["instruction.md","task.toml","definition.json"];function OY({source:e,row:t}){const[n,r]=U.useState(null),[a,s]=U.useState(null),[l,d]=U.useState("file"),[u,m]=U.useState(null);U.useEffect(()=>{let y=!1;return(async()=>{try{const S=await e.artifacts?.(t.id);if(y)return;const E=S?.bundles[0];if(E&&e.loadBundle){const k=await e.loadBundle(E.key);y||r(k)}else r({taskId:t.id,files:[]}),d("pipeline")}catch(S){y||s(S instanceof Error?S.message:String(S))}})(),()=>{y=!0}},[e,t.id]);const g=U.useMemo(()=>n?LB(n):null,[n]);U.useEffect(()=>{if(!n||u||l!=="file")return;const y=LY.map(_=>n.files.find(S=>S.path===_)).find(Boolean)??n.files.find(_=>_.text!==void 0);y&&m({path:y.path,sizeBytes:y.sizeBytes,...y.text!==void 0?{text:y.text}:{}})},[n,u,l]);const p=y=>{const _=g?.byPath.get(y);m(_?{path:y,sizeBytes:_.sizeBytes,..._.text!==void 0?{text:_.text}:{}}:{path:y,error:"file not in this bundle"}),d("file")},v=[["file",u?`File · ${u.path.split("/").pop()}`:"File"],["environment","Environment"],["pipeline","Pipeline"]];return h.jsxs("div",{className:"grid min-h-0 min-w-0 grid-cols-1 grid-rows-[140px_minmax(0,1fr)] md:grid-cols-[240px_minmax(0,1fr)] md:grid-rows-1",children:[h.jsxs("aside",{className:"flex min-h-0 flex-col border-r border-b border-border bg-background md:border-b-0","aria-label":"Files",children:[h.jsxs("div",{className:"flex h-11 shrink-0 items-center gap-2.5 border-b border-border px-4",children:[h.jsx("span",{className:"font-mono text-xs font-medium tracking-wider text-muted-foreground uppercase",children:"Files"}),n&&h.jsx("span",{className:"font-mono text-sm font-medium text-muted-foreground",children:n.files.length})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:n?n.files.length===0?h.jsx("p",{className:jn,children:"No files available yet."}):h.jsx(xB,{files:n.files,current:u?.path??null,onOpen:p}):a?h.jsx("p",{className:`${jn} !text-(--bad-fg) site:!text-destructive`,children:a}):h.jsx("p",{className:Yd,children:"Loading files…"})})]}),h.jsxs("section",{className:"grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)]",children:[h.jsx("div",{className:`${XA} min-w-0 overflow-x-auto whitespace-nowrap [&_button]:shrink-0`,role:"tablist",children:v.map(([y,_])=>h.jsx("button",{type:"button",role:"tab",className:Cd,"aria-selected":l===y,onClick:()=>d(y),children:_},y))}),a&&l!=="pipeline"?h.jsx("p",{className:`${jn} !text-(--bad-fg) site:!text-destructive`,children:a}):l==="pipeline"?h.jsx(zB,{source:e,row:t}):l==="file"?h.jsx(TY,{file:u},u?.path??""):g?h.jsx(BB,{model:g,onOpenFile:p}):h.jsx("p",{className:Yd,children:"Loading files…"})]})]})}function DY(){const{org:e}=jr(),{owner:t="",name:n="",runId:r="",taskId:a=""}=fi(),s=`${t}/${n}`,[l,d]=U.useState(void 0),u=cv(l??{taskId:a});er(`${u} · self-bench`);const[m,g]=U.useState(null);U.useEffect(()=>{let y=!1;return yd(e.login,s).then(_=>{y||d(_.find(S=>S.runId===r&&S.taskId===a)??null)},_=>!y&&g(_.message)),()=>{y=!0}},[e.login,s,r,a]);const p=U.useMemo(()=>l?gB(e.login,s,l):null,[e.login,s,l]),v=y=>d(y);return m?h.jsx(Fl,{children:h.jsx(ft,{children:m})}):l===void 0?h.jsx(yB,{fullName:s,taskId:a}):l===null||!p?h.jsx(Fl,{children:h.jsxs(ft,{children:["Task not found. ",h.jsxs($e,{to:`/repos/${s}`,children:["Back to ",s]})]})}):h.jsxs("div",{className:"grid h-full min-h-0 min-w-0 flex-none grid-cols-1 grid-rows-[auto_minmax(0,1fr)] overflow-hidden",children:[h.jsxs("header",{className:`flex flex-wrap items-start justify-between gap-4 border-b border-border bg-card py-4 ${ls}`,children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx(Wb,{items:[{label:s,to:`/repos/${s}`},{label:"Batch",to:`/repos/${s}/batches/${encodeURIComponent(l.runId)}`}]}),h.jsx("h1",{className:"text-xl leading-7 font-medium wrap-anywhere",children:l.sourceUrl?h.jsx("a",{className:"hover:text-brand",href:l.sourceUrl,target:"_blank",rel:"noreferrer",children:u}):u}),h.jsx("div",{className:"mt-1",children:h.jsx(hB,{task:l,org:e.login,fullName:s})}),l.pipelineStatus==="infrastructure_failed"&&(l.reason||l.reasonSummary)?h.jsxs("div",{className:"mt-3 font-mono text-sm leading-6 text-muted-foreground",children:[h.jsx("p",{children:l.reasonSummary}),l.reason&&h.jsxs("details",{className:"mt-2 [&_summary]:cursor-pointer [&_pre]:mt-2 [&_pre]:max-h-64 [&_pre]:overflow-auto [&_pre]:whitespace-pre-wrap [&_pre]:wrap-anywhere",children:[h.jsx("summary",{children:"Technical Details"}),h.jsx("pre",{children:l.reason.replace(`${l.reasonSummary}
|
|
1678
|
+
|
|
1679
|
+
`,"")})]})]}):l.reasonSummary&&l.state!=="accepted"?h.jsx("p",{className:"mt-2 max-w-[90ch] font-mono text-sm leading-6 text-muted-foreground wrap-anywhere",title:l.reasonSummary,children:l.reasonSummary}):null]}),l.state!=="in_progress"&&l.state!=="failed"&&h.jsx(mB,{org:e.login,fullName:s,task:l,onReview:v})]}),h.jsx(OY,{source:p,row:YA(l)})]})}function IY(){const{owner:e,name:t}=fi(),n=jr(),r=`${e}/${t}`,a=`/repos/${r}`;return h.jsx(d5,{repoId:{org:n.org.login,fullName:r},children:h.jsxs("main",{className:"flex h-full min-h-0 min-w-0 flex-col overflow-hidden",children:[h.jsxs("div",{className:Se("shrink-0 pt-6",ls),children:[h.jsx(Wb,{items:[{label:"Repositories",to:"/"},{label:r}]}),h.jsxs("nav",{className:"flex gap-6 overflow-x-auto border-b border-border [&_a]:shrink-0 [&_a]:border-b-2 [&_a]:border-transparent [&_a]:py-3 [&_a]:text-sm [&_a]:text-muted-foreground [&_a:hover]:text-foreground [&_a.active]:border-brand [&_a.active]:text-foreground","aria-label":"Repository Sections",children:[h.jsx(Rl,{to:a,end:!0,children:"Dataset"}),h.jsx(Rl,{to:`${a}/batches`,children:"Batches"}),h.jsx(Rl,{to:`${a}/run`,children:"Run"}),h.jsx(Rl,{to:`${a}/results`,children:"Results"})]})]}),h.jsx("div",{className:Se("min-h-0 flex-1 overflow-y-auto overscroll-contain py-6",ls),"data-slot":"repository-content",children:h.jsx(nC,{context:n})})]})},`${n.org.login}/${r}`)}const iy="/api/api-keys";async function IE(){return(await en(iy)).keys}function MY(e){return en(iy,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}async function PY(e){await en(`${iy}/${e}`,{method:"DELETE"})}const Lb={read:"Read Only",write:"Read & Write"};function zY({onCreated:e,onCancel:t}){const[n,r]=U.useState(""),[a,s]=U.useState("write"),[l,d]=U.useState(!1),[u,m]=U.useState(""),g=U.useRef(null);return h.jsxs(mi,{initialFocus:g,onDismiss:t,busy:l,size:"small","aria-labelledby":"create-api-key-title","aria-describedby":"create-api-key-description",children:[h.jsx(pi,{title:"Create API Key",titleId:"create-api-key-title",descriptionId:"create-api-key-description",description:"The key acts as you in every organization you belong to.",onClose:t,busy:l}),h.jsxs("form",{onSubmit:async p=>{if(p.preventDefault(),!l){d(!0),m("");try{e(await MY({name:n.trim(),scope:a}))}catch(v){m(v instanceof Error?v.message:"Could not create the key")}finally{d(!1)}}},children:[h.jsxs(gs,{children:[h.jsxs("label",{className:qn,htmlFor:"api-key-name",children:["Name",h.jsx(Nn,{id:"api-key-name",ref:g,value:n,maxLength:80,required:!0,placeholder:"CI, laptop, notebook…",onChange:p=>r(p.target.value)})]}),h.jsxs("label",{className:qn,htmlFor:"api-key-scope",children:["Scope",h.jsxs(Qt,{id:"api-key-scope",value:a,onChange:p=>s(p.target.value),children:[h.jsx("option",{value:"write",children:Lb.write}),h.jsx("option",{value:"read",children:Lb.read})]})]}),h.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"Read-only keys can list and download but never start, change, or delete anything."}),u&&h.jsx("p",{role:"alert",className:"text-sm text-destructive",children:u})]}),h.jsxs(gi,{children:[h.jsx(be,{disabled:l,onClick:t,children:"Cancel"}),h.jsx(be,{type:"submit",variant:"primary",disabled:l||!n.trim(),children:l?"Creating…":"Create Key"})]})]})]})}function $Y({apiKey:e,onRevoke:t,onClose:n}){const r=U.useRef(null),[a,s]=U.useState(!1),[l,d]=U.useState("");return h.jsxs(mi,{initialFocus:r,onDismiss:n,busy:a,size:"small","aria-labelledby":"revoke-api-key-title","aria-describedby":"revoke-api-key-description",children:[h.jsx(pi,{title:"Revoke API Key",titleId:"revoke-api-key-title",onClose:n,busy:a}),h.jsxs(gs,{children:[h.jsxs("p",{id:"revoke-api-key-description",className:"text-sm leading-6 text-muted-foreground",children:["Revoke ",h.jsx("strong",{className:"break-all text-foreground",children:e.name})," (",h.jsxs("code",{className:"font-mono",children:[e.prefix,"…"]}),")? Requests using it will stop working immediately."]}),l&&h.jsx("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:l})]}),h.jsxs(gi,{children:[h.jsx(be,{ref:r,disabled:a,onClick:n,children:"Cancel"}),h.jsx(be,{disabled:a,variant:"destructive",onClick:async()=>{s(!0);try{await t()}catch(u){d(u instanceof Error?u.message:"Could not revoke the key")}finally{s(!1)}},children:a?"Revoking…":"Revoke"})]})]})}function UY(){er("API Keys");const[e,t]=U.useState(),[n,r]=U.useState(""),[a,s]=U.useState(""),[l,d]=U.useState(),[u,m]=U.useState(!1),[g,p]=U.useState();U.useEffect(()=>{let y=!1;return IE().then(_=>{y||t(_)},_=>{y||r(`Could not load API keys: ${_.message}`)}),()=>{y=!0}},[]);const v=async()=>{try{t(await IE()),r("")}catch{r("Could not refresh API keys. Reload the list to try again.")}};return h.jsxs(Fl,{children:[h.jsx(hi,{title:"API Keys",description:"Use the API as yourself from scripts and CI. Keys reach every organization you belong to.",children:h.jsxs(be,{size:"small",onClick:()=>m(!0),children:[h.jsx(Ma,{className:"mr-1 h-4 w-4","aria-hidden":"true"}),"Create Key"]})}),n&&h.jsxs(ft,{className:"mb-6",children:[h.jsx("p",{children:n}),h.jsx(be,{onClick:()=>{v()},children:"Reload List"})]}),a&&h.jsx(ft,{tone:"success",className:"mb-6",children:a}),l&&h.jsx(HY,{created:l,onDismiss:()=>d(void 0)}),(!n||e)&&h.jsx(VY,{keys:e,loading:!e&&!n,onRevoke:p}),u&&h.jsx(zY,{onCancel:()=>m(!1),onCreated:async y=>{m(!1),s(""),d(y),await v()}}),g&&h.jsx($Y,{apiKey:g,onClose:()=>p(void 0),onRevoke:async()=>{await PY(g.id),p(void 0),l?.key.id===g.id&&d(void 0),s("API key revoked."),await v()}})]})}function HY({created:e,onDismiss:t}){const[n,r]=U.useState("idle"),a=U.useRef(null);U.useEffect(()=>{if(n!=="copied")return;const l=window.setTimeout(()=>r("idle"),2500);return()=>window.clearTimeout(l)},[n]);const s=async()=>{const l=await BY(e.secret,a.current);r(l?"copied":"failed"),l||YN(a.current)};return h.jsxs("section",{"aria-labelledby":"new-api-key-title",className:"mb-6 space-y-3 border border-success/30 bg-success/5 p-4",children:[h.jsxs("h2",{id:"new-api-key-title",className:"text-sm font-medium text-foreground",children:[e.key.name," created"]}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Copy the key now. It will not be shown again."}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx("code",{ref:a,"data-testid":"api-key-secret",className:"min-w-0 max-w-full break-all border border-border bg-background px-3 py-2 font-mono text-xs select-all",children:e.secret}),h.jsxs(be,{size:"small",variant:n==="copied"?"primary":"secondary",onClick:()=>{s()},"aria-label":"Copy API Key",children:[n==="copied"?h.jsx(Vl,{className:"mr-1 h-4 w-4","aria-hidden":"true"}):h.jsx(fC,{className:"mr-1 h-4 w-4","aria-hidden":"true"}),n==="copied"?"Copied":"Copy"]}),h.jsx(be,{size:"small",variant:"ghost",onClick:t,children:"Done"})]}),h.jsxs("p",{role:"status",className:n==="failed"?"text-sm text-destructive":"text-sm text-success",children:[n==="copied"&&"Copied to clipboard.",n==="failed"&&"Copying is not available here. The key is selected; press ⌘C or Ctrl+C to copy it."]})]})}async function BY(e,t){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{return YN(t)?document.execCommand("copy"):!1}catch{return!1}}function YN(e){const t=window.getSelection();if(!e||!t)return!1;const n=document.createRange();return n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n),!0}function VY({keys:e,loading:t,onRevoke:n}){return t?h.jsx("div",{role:"status","aria-label":"Loading API Keys",className:"divide-y divide-border border border-border bg-card",children:Array.from({length:2},(r,a)=>h.jsxs("div",{className:"px-4 py-3.5",children:[h.jsx(et,{className:"h-5 w-36 max-w-full"}),h.jsx(et,{className:"mt-1 h-4 w-48 max-w-full"})]},a))}):e?.length?h.jsxs(bf,{children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{scope:"col",children:"Name"}),h.jsx("th",{scope:"col",children:"Key"}),h.jsx("th",{scope:"col",children:"Scope"}),h.jsx("th",{scope:"col",children:"Created"}),h.jsx("th",{scope:"col",children:"Last Used"}),h.jsx("th",{scope:"col",children:h.jsx("span",{className:"sr-only",children:"Actions"})})]})}),h.jsx("tbody",{children:e.map(r=>h.jsxs("tr",{children:[h.jsx("td",{className:"font-medium",children:r.name}),h.jsxs("td",{className:"font-mono text-xs",children:[r.prefix,"…"]}),h.jsx("td",{children:Lb[r.scope]}),h.jsx("td",{className:"whitespace-nowrap text-muted-foreground",children:r.createdAt.slice(0,10)}),h.jsx("td",{className:"whitespace-nowrap text-muted-foreground",children:r.lastUsedAt?cc(r.lastUsedAt):"Never"}),h.jsx("td",{className:"text-right",children:h.jsx(be,{size:"small",onClick:()=>n(r),"aria-label":`Revoke ${r.name}`,children:"Revoke"})})]},r.id))})]}):h.jsxs(wr,{title:"No API keys yet",children:["Create a key, then send it as ",h.jsx("code",{className:"font-mono",children:"Authorization: Bearer"})," or"," ",h.jsx("code",{className:"font-mono",children:"X-API-Key"})," on any request the site makes."]})}function FY(){const[e,t]=U.useState({status:"loading"});U.useEffect(()=>{let a=!1;const s=()=>{a=!0,t({status:"anonymous"})};return window.addEventListener(wg,s),s5().then(l=>{a||t(l)}),()=>{a=!0,window.removeEventListener(wg,s)}},[]);const n=U.useCallback(async()=>{await l5(),t({status:"anonymous"})},[]),r=U.useMemo(()=>({session:e,signOut:n}),[e,n]);return h.jsx(tR.Provider,{value:r,children:h.jsx("div",{className:"sb min-h-full bg-background font-mono text-sm leading-6 text-foreground antialiased [&_a]:no-underline [&_button:not(:disabled)]:cursor-pointer [&_:focus-visible]:outline-2 [&_:focus-visible]:outline-brand [&_:focus-visible]:outline-offset-2 motion-reduce:[&_*]:transition-none",children:e.status==="loading"?h.jsx(o5,{}):h.jsx(nD,{children:h.jsxs(jO,{children:[h.jsx(Rt,{path:"/login",element:h.jsx(oB,{})}),h.jsxs(Rt,{element:h.jsx(GY,{}),children:[h.jsx(Rt,{index:!0,element:h.jsx(fB,{})}),h.jsx(Rt,{path:"settings/credentials",element:h.jsx(wH,{})}),h.jsx(Rt,{path:"settings/api-keys",element:h.jsx(UY,{})}),h.jsxs(Rt,{path:"repos/:owner/:name",element:h.jsx(IY,{}),children:[h.jsx(Rt,{index:!0,element:h.jsx(WA,{})}),h.jsx(Rt,{path:"batches",element:h.jsx(f5,{})}),h.jsx(Rt,{path:"batches/:batchId",element:h.jsx(b5,{})}),h.jsx(Rt,{path:"add-prs",element:h.jsx(aB,{})}),h.jsx(Rt,{path:"evaluations",element:h.jsx(e1,{})}),h.jsx(Rt,{path:"results",element:h.jsx(e1,{})}),h.jsx(Rt,{path:"dataset",element:h.jsx(Pl,{to:"..",replace:!0})}),h.jsx(Rt,{path:"run",element:h.jsx(FH,{})}),h.jsx(Rt,{path:"settings/credentials",element:h.jsx(Pl,{to:"/settings/credentials",replace:!0})}),h.jsx(Rt,{path:"comparisons/:comparisonId",element:h.jsx(pH,{})})]}),h.jsx(Rt,{path:"repos/:owner/:name/tasks/:runId/:taskId",element:h.jsx(DY,{})}),h.jsx(Rt,{path:"*",element:h.jsx(Pl,{to:"/",replace:!0})})]})]})})})})}function GY(){const{session:e}=lv();return e.status!=="signed-in"?h.jsx(Pl,{to:"/login",replace:!0}):h.jsx(mH,{user:e.user,orgs:e.orgs})}const KN=document.getElementById("root");if(!KN)throw new Error("review root is missing");TL.createRoot(KN).render(h.jsx(U.StrictMode,{children:h.jsx(FY,{})}));
|