@reqvire-org/ads 0.4.7 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +268 -420
- package/dist/accessibility-declarations.mjs +43 -0
- package/dist/active-clock.d.mts +30 -0
- package/dist/active-clock.mjs +26 -17
- package/dist/ads-errors.mjs +3684 -0
- package/dist/ads-view-choices.mjs +17 -0
- package/dist/ads-views.mjs +12 -0
- package/dist/analysis/captured-content.mjs +16 -0
- package/dist/analysis/compiler-options.mjs +3 -7
- package/dist/analysis/context.mjs +14 -20
- package/dist/analysis/controller-gates.mjs +119 -0
- package/dist/analysis/design-usage.mjs +142 -0
- package/dist/analysis/file-tree.mjs +44 -29
- package/dist/analysis/framework-imports.mjs +62 -0
- package/dist/analysis/glyph-macros.mjs +103 -0
- package/dist/analysis/helpers.mjs +119 -91
- package/dist/analysis/impact.mjs +25 -12
- package/dist/analysis/inputs.mjs +19 -13
- package/dist/analysis/mock-check.mjs +99 -0
- package/dist/analysis/module-graph.mjs +156 -0
- package/dist/analysis/module-resolvers.mjs +30 -28
- package/dist/analysis/native-adapter.mjs +139 -146
- package/dist/analysis/native-boundary.mjs +52 -0
- package/dist/analysis/native-project.mjs +331 -231
- package/dist/analysis/native-session.mjs +20 -0
- package/dist/analysis/owner-accessibility.mjs +74 -0
- package/dist/analysis/owner-analysis-cache.mjs +125 -0
- package/dist/analysis/owner-analysis-key.mjs +114 -0
- package/dist/analysis/owner-choices.mjs +896 -0
- package/dist/analysis/owner-composition.mjs +636 -0
- package/dist/analysis/owner-controls.mjs +27 -0
- package/dist/analysis/owner-discovery.mjs +164 -0
- package/dist/analysis/owner-failures.mjs +19 -0
- package/dist/analysis/owner-outcomes.mjs +42 -0
- package/dist/analysis/owner-reuse.mjs +100 -0
- package/dist/analysis/owner-source.mjs +1555 -0
- package/dist/analysis/prose-owners.mjs +57 -0
- package/dist/analysis/public-imports.mjs +31 -0
- package/dist/analysis/queries.mjs +72 -54
- package/dist/analysis/runtime-setters.mjs +114 -0
- package/dist/analysis/scenario-keys.mjs +151 -0
- package/dist/analysis/service.mjs +111 -70
- package/dist/analysis/standalone.mjs +40 -37
- package/dist/analysis/styling-ownership.mjs +298 -0
- package/dist/analysis/svg-attributes.mjs +199 -0
- package/dist/analysis/syntax.mjs +82 -78
- package/dist/analysis/visual-bindings.mjs +68 -0
- package/dist/analysis/worker-protocol.mjs +302 -0
- package/dist/analysis/worker.mjs +234 -166
- package/dist/api-signature.mjs +53 -0
- package/dist/app-icon-checks.mjs +298 -0
- package/dist/app-icon-declaration.d.mts +53 -0
- package/dist/app-icon-declaration.mjs +66 -0
- package/dist/asset-binding.mjs +35 -0
- package/dist/asset-catalog.mjs +83 -0
- package/dist/asset-declaration.d.mts +42 -0
- package/dist/asset-declaration.mjs +108 -0
- package/dist/asset-macro.d.mts +63 -0
- package/dist/asset-macro.mjs +22 -0
- package/dist/asset-model.mjs +74 -0
- package/dist/asset-usage.mjs +14 -0
- package/dist/asset-view-facts.mjs +41 -0
- package/dist/authoring-macro.d.mts +11 -0
- package/dist/authoring-macro.mjs +21 -0
- package/dist/autocomplete-hints.mjs +31 -0
- package/dist/availability.mjs +9 -0
- package/dist/behavior-macro.d.mts +31 -0
- package/dist/behavior-macro.mjs +3 -0
- package/dist/behavior-registry.mjs +358 -0
- package/dist/boundaries.mjs +50 -212
- package/dist/browser-runtime.mjs +73 -0
- package/dist/browser-test.d.mts +3 -0
- package/dist/browser-test.mjs +2 -0
- package/dist/bun-bundler.mjs +10 -0
- package/dist/bun-compiler.mjs +30 -18
- package/dist/bun-runtime.mjs +4 -0
- package/dist/bun-worker.mjs +10 -4
- package/dist/capture/request.mjs +81 -0
- package/dist/capture/worker.mjs +69 -40
- package/dist/capture/worker.page.mjs +6 -0
- package/dist/capture-store.mjs +159 -75
- package/dist/capture.mjs +232 -95
- package/dist/check-service.mjs +27 -33
- package/dist/check.mjs +206 -904
- package/dist/cli-arguments.mjs +278 -0
- package/dist/cli.mjs +374 -304
- package/dist/color-values.mjs +294 -242
- package/dist/composed-contrast.mjs +648 -0
- package/dist/composed-keyline.mjs +107 -0
- package/dist/config.mjs +162 -468
- package/dist/construction-output.mjs +345 -0
- package/dist/construction-spec.d.mts +915 -0
- package/dist/construction-spec.mjs +1178 -0
- package/dist/corner-overpaint.mjs +53 -0
- package/dist/css-length.mjs +80 -0
- package/dist/css-quantity.mjs +173 -0
- package/dist/deletion-model.mjs +56 -0
- package/dist/deletion-plan.mjs +364 -0
- package/dist/dependency-manifest.mjs +56 -0
- package/dist/design-context-model.d.mts +61 -0
- package/dist/design-context-model.mjs +79 -0
- package/dist/design-contexts.mjs +105 -0
- package/dist/design-foundation.mjs +532 -0
- package/dist/design-inputs.mjs +156 -0
- package/dist/design-modules.mjs +27 -0
- package/dist/design-rejection.d.mts +23 -0
- package/dist/design-rejection.mjs +29 -0
- package/dist/design-system-closure.mjs +108 -0
- package/dist/design-usage.mjs +54 -0
- package/dist/development-modules.mjs +2 -0
- package/dist/development-runtime.mjs +0 -7
- package/dist/digest.mjs +2 -0
- package/dist/draft-boundary.mjs +1 -27
- package/dist/draft-workspace.mjs +11 -5
- package/dist/emit/accept.mjs +33 -0
- package/dist/emit/app-icon-emission.mjs +124 -0
- package/dist/emit/app-icon-render.mjs +126 -0
- package/dist/emit/asset-imports.mjs +18 -0
- package/dist/emit/cli-report.mjs +97 -0
- package/dist/emit/contract.mjs +136 -0
- package/dist/emit/emission.mjs +182 -0
- package/dist/emit/font-emission.mjs +111 -0
- package/dist/emit/foundation-sheet.mjs +56 -0
- package/dist/emit/icon-containers.mjs +46 -0
- package/dist/emit/integrity.mjs +61 -0
- package/dist/emit/lock.mjs +66 -0
- package/dist/emit/namespace.mjs +79 -0
- package/dist/emit/operation-reply.mjs +3 -0
- package/dist/emit/operation.mjs +36 -0
- package/dist/emit/output-location.mjs +20 -0
- package/dist/emit/output-package.mjs +7 -0
- package/dist/emit/owner-emission-cache.mjs +52 -0
- package/dist/emit/palette-module.mjs +19 -0
- package/dist/emit/palette-refresh.mjs +77 -0
- package/dist/emit/preview-emitter.mjs +110 -0
- package/dist/emit/preview-tree.mjs +174 -0
- package/dist/emit/scheduler.mjs +75 -0
- package/dist/emit/service.mjs +249 -0
- package/dist/emit/sync.mjs +38 -0
- package/dist/emit/watch.mjs +74 -0
- package/dist/emit/writer.mjs +102 -0
- package/dist/evidence.mjs +6 -8
- package/dist/example-babel.mjs +7 -0
- package/dist/example-literals.mjs +88 -0
- package/dist/finding-rules.mjs +78 -77
- package/dist/focus-checks.mjs +93 -0
- package/dist/font-checks.mjs +185 -0
- package/dist/font-declaration.d.mts +64 -0
- package/dist/font-declaration.mjs +99 -0
- package/dist/font-fallback.d.mts +37 -0
- package/dist/font-fallback.mjs +25 -0
- package/dist/font-macro.d.mts +42 -0
- package/dist/font-macro.mjs +6 -0
- package/dist/font-metrics.d.mts +34 -0
- package/dist/font-metrics.mjs +314 -0
- package/dist/font-model.mjs +63 -0
- package/dist/form-states.mjs +82 -0
- package/dist/foundation-macro.d.mts +108 -0
- package/dist/foundation-macro.mjs +6 -0
- package/dist/frame-regions.mjs +253 -0
- package/dist/glyph-set-declaration.d.mts +27 -0
- package/dist/glyph-set-declaration.mjs +36 -0
- package/dist/grid-checks.mjs +94 -0
- package/dist/grid-facts.mjs +148 -0
- package/dist/grid-lowering.mjs +263 -0
- package/dist/guard/cli.mjs +51 -0
- package/dist/guard/config.mjs +67 -0
- package/dist/guard/files.mjs +31 -0
- package/dist/guard/index.mjs +3 -0
- package/dist/guard/run.mjs +56 -0
- package/dist/guard/tsconfig.declarations.json +13 -0
- package/dist/index.mjs +2 -7
- package/dist/init-project.mjs +134 -0
- package/dist/init.mjs +217 -264
- package/dist/input-digests.mjs +109 -163
- package/dist/input-scope.mjs +18 -41
- package/dist/inspected-svg.d.mts +28 -0
- package/dist/inspected-svg.mjs +40 -0
- package/dist/inventories.mjs +149 -0
- package/dist/inventory-query.mjs +15 -0
- package/dist/investigations.mjs +177 -99
- package/dist/json.d.mts +10 -0
- package/dist/json.mjs +36 -0
- package/dist/linaria/atomic-processor.json +96 -0
- package/dist/linaria/atomic-processor.mjs +2452 -0
- package/dist/linaria/backend-identity.mjs +26 -0
- package/dist/linaria/compatibility.json +61 -0
- package/dist/linaria/css-shape.mjs +94 -0
- package/dist/linaria/custom-property-css.mjs +56 -0
- package/dist/linaria/delivery.mjs +111 -0
- package/dist/linaria/direct-extract.mjs +43 -0
- package/dist/linaria/extraction-cache.mjs +31 -0
- package/dist/linaria/extraction-model.mjs +5 -0
- package/dist/linaria/fingerprint.mjs +183 -0
- package/dist/linaria/pair-manifest.json +2315 -0
- package/dist/linaria/persisted-extraction-cache.mjs +352 -0
- package/dist/linaria/preservation.mjs +13 -0
- package/dist/linaria/priority-emitted-rank.mjs +40 -0
- package/dist/linaria/priority-manifest.mjs +87 -0
- package/dist/linaria/priority-table.mjs +47 -0
- package/dist/linaria/priority-tiers.mjs +27 -0
- package/dist/linaria/processor-host.mjs +42 -0
- package/dist/linaria/processor-runtime.mjs +36 -0
- package/dist/linaria-processor-NOTICES.md +147 -0
- package/dist/lowering-components.mjs +14 -0
- package/dist/lowering-effects.mjs +38 -0
- package/dist/lowering-emitter.mjs +29 -0
- package/dist/lowering-enter.mjs +31 -0
- package/dist/lowering-hidden.mjs +30 -0
- package/dist/lowering-layer.mjs +141 -0
- package/dist/lowering-motion.mjs +37 -0
- package/dist/lowering-normalize.mjs +194 -0
- package/dist/lowering-overlaps.mjs +328 -0
- package/dist/lowering-paint.mjs +32 -0
- package/dist/lowering-properties.mjs +165 -0
- package/dist/lowering-region-layout.mjs +225 -0
- package/dist/lowering-sequence.mjs +89 -0
- package/dist/lowering-serialize.mjs +40 -0
- package/dist/lowering-session.mjs +137 -0
- package/dist/lowering-tiers.mjs +23 -0
- package/dist/lowering-transitions.mjs +53 -0
- package/dist/mcp/ads-mcp.mjs +423 -0
- package/dist/mcp/apps.mjs +3 -25
- package/dist/mcp/behavior-pages.mjs +58 -51
- package/dist/mcp/build-status.mjs +233 -267
- package/dist/mcp/catalog.mjs +21 -128
- package/dist/mcp/compiler-channel.mjs +218 -83
- package/dist/mcp/context.mjs +50 -40
- package/dist/mcp/deletions.mjs +147 -0
- package/dist/mcp/draft-discovery.mjs +43 -38
- package/dist/mcp/drafts.mjs +635 -691
- package/dist/mcp/execution-context.mjs +33 -22
- package/dist/mcp/execution-coordinator.mjs +367 -354
- package/dist/mcp/execution-results.mjs +440 -173
- package/dist/mcp/mutation-limits.mjs +1 -2
- package/dist/mcp/mutations.mjs +515 -553
- package/dist/mcp/patch.mjs +117 -75
- package/dist/mcp/preview-http.bundle.js +3 -7
- package/dist/mcp/preview-http.mjs +220 -107
- package/dist/mcp/preview-owner-guard.mjs +81 -43
- package/dist/mcp/preview-watch.mjs +428 -365
- package/dist/mcp/preview-widget.bundle.js +42 -46
- package/dist/mcp/preview-work.mjs +25 -13
- package/dist/mcp/prompts.mjs +22 -16
- package/dist/mcp/resource-loader.js +1 -1
- package/dist/mcp/result-pages.mjs +94 -54
- package/dist/mcp/sandbox-host.mjs +41 -19
- package/dist/mcp/server-discovery.mjs +96 -0
- package/dist/mcp/server-guides.mjs +43 -0
- package/dist/mcp/server-host.mjs +203 -0
- package/dist/mcp/server-observation.mjs +225 -0
- package/dist/mcp/server-project.mjs +371 -0
- package/dist/mcp/server-resources.mjs +466 -0
- package/dist/mcp/server-shared.mjs +79 -0
- package/dist/mcp/server-tools.mjs +791 -0
- package/dist/mcp/server.mjs +2 -2813
- package/dist/mcp/showcase-host.mjs +209 -135
- package/dist/mcp/showcase-http.mjs +50 -28
- package/dist/mcp/skills.mjs +32 -36
- package/dist/mcp/text-diff.mjs +18 -36
- package/dist/measured-geometry.mjs +157 -0
- package/dist/motion-model.mjs +52 -0
- package/dist/non-text-contrast.mjs +118 -0
- package/dist/owner-analysis-check.mjs +711 -0
- package/dist/owner-design.mjs +15 -0
- package/dist/owner-errors.mjs +216 -0
- package/dist/owner-lowering.mjs +206 -0
- package/dist/owner-scenarios.mjs +854 -0
- package/dist/ownership-model.d.mts +6 -0
- package/dist/ownership-model.mjs +143 -0
- package/dist/package-declarations.mjs +34 -0
- package/dist/paint-contrast.mjs +186 -0
- package/dist/palette-generated.mjs +101 -116
- package/dist/pictogram-model.mjs +13 -51
- package/dist/placeholder-contrast.mjs +35 -0
- package/dist/platform-features.mjs +401 -0
- package/dist/press-scale.mjs +26 -0
- package/dist/preview-bun.mjs +334 -404
- package/dist/preview-compile-inputs.mjs +78 -0
- package/dist/preview-contexts.mjs +7 -0
- package/dist/preview-controls.mjs +35 -0
- package/dist/preview-failure.mjs +20 -10
- package/dist/preview-files.mjs +18 -36
- package/dist/preview-imports.mjs +76 -70
- package/dist/preview-incremental.mjs +322 -222
- package/dist/preview-inputs.mjs +26 -26
- package/dist/preview-manifest-update.mjs +67 -49
- package/dist/preview-requests.mjs +10 -17
- package/dist/preview-resources.mjs +275 -323
- package/dist/preview-scope.mjs +15 -17
- package/dist/preview-source.mjs +182 -0
- package/dist/preview-spatial.mjs +27 -0
- package/dist/profile-macro.d.mts +56 -0
- package/dist/profile-macro.mjs +6 -0
- package/dist/profile-model.d.mts +65 -0
- package/dist/profile-model.mjs +213 -0
- package/dist/profile-view-facts.mjs +93 -0
- package/dist/program-cache.mjs +9 -7
- package/dist/project-boundary.mjs +8 -13
- package/dist/project-documents.mjs +25 -29
- package/dist/property-registrations.mjs +44 -35
- package/dist/prose-model.d.mts +81 -0
- package/dist/prose-model.mjs +101 -0
- package/dist/public-catalog.mjs +76 -0
- package/dist/recipe-defaults.mjs +117 -0
- package/dist/recipe-macro.d.mts +502 -0
- package/dist/recipe-macro.mjs +23 -0
- package/dist/recipe-model.d.mts +26 -0
- package/dist/recipe-model.mjs +214 -0
- package/dist/region-lowering.mjs +723 -0
- package/dist/registration-css.mjs +41 -0
- package/dist/registration-roles.mjs +35 -0
- package/dist/render-audit/axe-run.page.mjs +28 -0
- package/dist/render-audit/corner-overpaint.page.mjs +54 -0
- package/dist/render-audit/first-render.page.mjs +35 -0
- package/dist/render-audit/image-shape.page.mjs +42 -0
- package/dist/render-audit/layout-overflow.page.mjs +240 -0
- package/dist/render-audit/layout-shift.page.mjs +36 -0
- package/dist/render-audit/non-text-contrast.page.mjs +138 -0
- package/dist/render-audit/render-states.mjs +66 -293
- package/dist/render-audit/render-states.page.mjs +177 -0
- package/dist/render-audit/text-scale.mjs +42 -0
- package/dist/render-audit/text-scale.page.mjs +25 -0
- package/dist/render-audit/worker.mjs +130 -112
- package/dist/render-audit/worker.page.mjs +21 -0
- package/dist/render-audit.mjs +490 -500
- package/dist/resource-limits.mjs +174 -223
- package/dist/result.d.mts +34 -0
- package/dist/result.mjs +60 -0
- package/dist/role-vocabulary.d.mts +260 -0
- package/dist/role-vocabulary.mjs +258 -0
- package/dist/runtime-paint-contrast.mjs +97 -0
- package/dist/runtime-paint.mjs +42 -0
- package/dist/runtime-requirements.mjs +10 -11
- package/dist/runtime-style.mjs +21 -0
- package/dist/scenario-groups.mjs +42 -33
- package/dist/scenario-inspector.mjs +4 -4
- package/dist/scenario-kit.d.mts +85 -0
- package/dist/scenario-kit.mjs +18 -0
- package/dist/scenario-registry-model.mjs +2 -0
- package/dist/scenario-registry.mjs +89 -108
- package/dist/scenarios-compiler.mjs +875 -662
- package/dist/scheme-switch.d.mts +8 -0
- package/dist/scheme-switch.mjs +1 -0
- package/dist/showcase/ads-views.mjs +166 -0
- package/dist/showcase/assets-view.mjs +252 -0
- package/dist/showcase/client.bundle.js +211 -48
- package/dist/showcase/guide-controls.d.mts +28 -0
- package/dist/showcase/guide-controls.mjs +31 -0
- package/dist/showcase/http-client.bundle.js +172 -9
- package/dist/showcase/index.html +1 -1
- package/dist/showcase/preview-frame.css +18 -0
- package/dist/showcase/preview-frame.d.mts +5 -0
- package/dist/showcase/preview-frame.mjs +4 -0
- package/dist/showcase/preview-root.d.mts +2 -0
- package/dist/showcase/preview-root.mjs +9 -0
- package/dist/showcase/profiles-view.mjs +321 -0
- package/dist/showcase/project-rules.mjs +9 -0
- package/dist/showcase/sandbox.bundle.js +1 -1
- package/dist/showcase/scenario-page.d.mts +49 -0
- package/dist/showcase/scenario-page.mjs +105 -0
- package/dist/showcase/style.css +2 -0
- package/dist/showcase/token-sample.mjs +89 -0
- package/dist/showcase/tokens-view.mjs +233 -0
- package/dist/showcase/ui/apple-touch-icon-9zwv3w79.png +0 -0
- package/dist/showcase/{favicon.ico → ui/favicon-c2c9kvtf.ico} +0 -0
- package/dist/showcase/ui/icon-192-t5zh7mxx.png +0 -0
- package/dist/showcase/ui/icon-512-ed6yz0n0.png +0 -0
- package/dist/showcase/ui/ui.css +1 -1353
- package/dist/showcase/ui/ui.js +165 -1064
- package/dist/showcase-http-routes.mjs +28 -21
- package/dist/skills/README.md +28 -28
- package/dist/skills/ads-designer/README.md +1 -1
- package/dist/skills/ads-designer/SKILL.md +313 -551
- package/dist/skills/ads-designer/references/accessibility.md +162 -114
- package/dist/skills/ads-designer/references/atomic-styles.md +72 -277
- package/dist/skills/ads-designer/references/behaviors.md +144 -280
- package/dist/skills/ads-designer/references/branding.md +137 -222
- package/dist/skills/ads-designer/references/captures.md +13 -7
- package/dist/skills/ads-designer/references/cli.md +80 -63
- package/dist/skills/ads-designer/references/contracts.md +225 -286
- package/dist/skills/ads-designer/references/design-craft.md +2 -2
- package/dist/skills/ads-designer/references/design-data.md +299 -323
- package/dist/skills/ads-designer/references/drafts.md +83 -22
- package/dist/skills/ads-designer/references/evidence.md +2 -1
- package/dist/skills/ads-designer/references/forms.md +199 -0
- package/dist/skills/ads-designer/references/guarded-editing.md +37 -48
- package/dist/skills/ads-designer/references/layers.md +64 -76
- package/dist/skills/ads-designer/references/layout.md +224 -330
- package/dist/skills/ads-designer/references/mobile.md +2 -2
- package/dist/skills/ads-designer/references/motion.md +66 -25
- package/dist/skills/ads-designer/references/performance.md +55 -50
- package/dist/skills/ads-designer/references/pictograms.md +62 -127
- package/dist/skills/ads-designer/references/recipes.md +368 -0
- package/dist/skills/ads-designer/references/review.md +51 -95
- package/dist/skills/ads-designer/references/runtimes.md +34 -33
- package/dist/skills/ads-designer/references/scenarios.md +256 -216
- package/dist/skills/ads-designer/references/stress-test.md +13 -5
- package/dist/skills/ads-designer/references/validation.md +28 -21
- package/dist/skills/ads-designer/references/workflows.md +7 -5
- package/dist/skills/ads-import/SKILL.md +29 -29
- package/dist/skills/ads-import/references/atomic-styles.md +72 -277
- package/dist/skills/ads-import/references/behaviors.md +144 -280
- package/dist/skills/ads-import/references/branding.md +24 -41
- package/dist/skills/ads-import/references/captures.md +13 -7
- package/dist/skills/ads-import/references/cli.md +80 -63
- package/dist/skills/ads-import/references/compatibility.md +3 -3
- package/dist/skills/ads-import/references/contracts.md +225 -286
- package/dist/skills/ads-import/references/design-data.md +299 -323
- package/dist/skills/ads-import/references/drafts.md +83 -22
- package/dist/skills/ads-import/references/evidence.md +2 -1
- package/dist/skills/ads-import/references/forms.md +199 -0
- package/dist/skills/ads-import/references/guarded-editing.md +37 -48
- package/dist/skills/ads-import/references/implementation.md +20 -20
- package/dist/skills/ads-import/references/layers.md +64 -76
- package/dist/skills/ads-import/references/layout.md +224 -330
- package/dist/skills/ads-import/references/recipes.md +368 -0
- package/dist/skills/ads-import/references/review.md +51 -95
- package/dist/skills/ads-import/references/runtimes.md +34 -33
- package/dist/skills/ads-import/references/scenarios.md +256 -216
- package/dist/skills/ads-import/references/tokens.md +26 -17
- package/dist/skills/ads-import/references/validation.md +28 -21
- package/dist/skills/ads-import/references/workflows.md +7 -5
- package/dist/skills/ads-migrate/SKILL.md +20 -5
- package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +6 -0
- package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0-boundary.md +71 -0
- package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0-grid.md +204 -0
- package/dist/skills/ads-migrate/references/0.4.7-to-0.5.0.md +727 -0
- package/dist/skills/ads-migrate/references/0.5.0-to-0.5.1.md +239 -0
- package/dist/skills/ads-port/SKILL.md +27 -28
- package/dist/skills/ads-port/references/atomic-styles.md +72 -277
- package/dist/skills/ads-port/references/behaviors.md +144 -280
- package/dist/skills/ads-port/references/captures.md +13 -7
- package/dist/skills/ads-port/references/cli.md +80 -63
- package/dist/skills/ads-port/references/contracts.md +225 -286
- package/dist/skills/ads-port/references/design-data.md +299 -323
- package/dist/skills/ads-port/references/drafts.md +83 -22
- package/dist/skills/ads-port/references/evidence.md +2 -1
- package/dist/skills/ads-port/references/forms.md +199 -0
- package/dist/skills/ads-port/references/guarded-editing.md +37 -48
- package/dist/skills/ads-port/references/layers.md +64 -76
- package/dist/skills/ads-port/references/layout.md +224 -330
- package/dist/skills/ads-port/references/lint-and-docs.md +2 -3
- package/dist/skills/ads-port/references/native-implementation.md +23 -33
- package/dist/skills/ads-port/references/recipes.md +368 -0
- package/dist/skills/ads-port/references/review.md +51 -95
- package/dist/skills/ads-port/references/runtimes.md +34 -33
- package/dist/skills/ads-port/references/scenarios.md +256 -216
- package/dist/skills/ads-port/references/validation.md +28 -21
- package/dist/skills/ads-port/references/workflows.md +7 -5
- package/dist/source-inventory.mjs +33 -0
- package/dist/source-values.mjs +272 -262
- package/dist/spatial-css.mjs +403 -0
- package/dist/spatial-metadata.mjs +11 -11
- package/dist/spatial-model.mjs +438 -0
- package/dist/spatial-reading.mjs +127 -0
- package/dist/stage-timing.mjs +27 -0
- package/dist/state-conditions.d.mts +80 -0
- package/dist/state-conditions.mjs +107 -0
- package/dist/static-values.mjs +94 -0
- package/dist/surface-contrast.mjs +252 -0
- package/dist/surface-effects.mjs +98 -0
- package/dist/target-size.mjs +177 -0
- package/dist/task-cache.mjs +142 -136
- package/dist/task-worker.mjs +18 -18
- package/dist/test-boundaries.mjs +50 -189
- package/dist/token-checks.mjs +21 -0
- package/dist/token-dtcg.mjs +136 -0
- package/dist/token-expression.mjs +19 -0
- package/dist/token-inventory.mjs +146 -0
- package/dist/token-operations.mjs +37 -0
- package/dist/token-overlap.mjs +29 -0
- package/dist/token-provenance.mjs +260 -0
- package/dist/token-references.mjs +71 -0
- package/dist/token-registrations.mjs +116 -0
- package/dist/token-resolution.mjs +38 -0
- package/dist/token-sections.mjs +123 -0
- package/dist/token-shapes.mjs +121 -0
- package/dist/token-sheet-check.mjs +54 -0
- package/dist/token-type-check.mjs +89 -0
- package/dist/token-view-facts.mjs +111 -0
- package/dist/tsconfig.declarations.json +24 -0
- package/dist/types/css-tree.d.ts +45 -0
- package/dist/ui-framework.mjs +34 -34
- package/dist/units.mjs +186 -226
- package/dist/unknown.d.mts +9 -0
- package/dist/unknown.mjs +13 -0
- package/dist/unreached-sources.mjs +5 -0
- package/dist/validation-checks.mjs +62 -71
- package/dist/validation-inputs.mjs +209 -279
- package/dist/validation.mjs +132 -159
- package/dist/verification/browser.d.mts +21 -25
- package/dist/verification/browser.mjs +281 -124
- package/dist/verification/browser.page.d.mts +22 -0
- package/dist/verification/browser.page.mjs +19 -0
- package/dist/verification/paint-audit.page.d.mts +55 -0
- package/dist/verification/paint-audit.page.mjs +144 -0
- package/dist/verification/playwright-reporter.mjs +160 -0
- package/dist/verification/preview-startup.d.mts +51 -0
- package/dist/verification/preview-startup.mjs +76 -0
- package/dist/verification/request.d.mts +28 -0
- package/dist/verification/request.mjs +30 -0
- package/dist/verification/unit-preload.mjs +37 -0
- package/dist/verification.mjs +574 -607
- package/docs/ADS.md +585 -565
- package/docs/ARCHITECTURE.md +2002 -1384
- package/docs/ASSETS.md +487 -0
- package/docs/BEHAVIORS.md +339 -370
- package/docs/CACHING.md +365 -154
- package/docs/CHANGELOG.md +462 -21
- package/docs/COMPARISON.md +21 -26
- package/docs/DESIGN-REFERENCES.md +40 -27
- package/docs/GUIDE.md +2473 -1292
- package/docs/LANGUAGE.md +1159 -0
- package/docs/LOWERING.md +180 -0
- package/docs/MCP.md +1461 -1179
- package/docs/MOTION.md +491 -0
- package/docs/PROFILE-KINDS.md +544 -0
- package/docs/PROFILES.md +176 -0
- package/docs/RULES.md +590 -0
- package/docs/TOKEN-ROLES.md +377 -0
- package/docs/benchmarks/README.md +26 -27
- package/package.json +59 -45
- package/dist/a11y.mjs +0 -187
- package/dist/assets.mjs +0 -159
- package/dist/atomic-composition.mjs +0 -337
- package/dist/atomic-trace.mjs +0 -162
- package/dist/behavior-libraries.mjs +0 -174
- package/dist/behaviors.mjs +0 -306
- package/dist/brand-assets.mjs +0 -458
- package/dist/brands.mjs +0 -141
- package/dist/component-contrast.mjs +0 -256
- package/dist/construction-styles.cjs +0 -10
- package/dist/contracts/foundation.json +0 -211
- package/dist/contracts/tokens.json +0 -52
- package/dist/contracts.d.mts +0 -30
- package/dist/contrast-composition.mjs +0 -80
- package/dist/contrast-styles.mjs +0 -88
- package/dist/control-padding.mjs +0 -113
- package/dist/css-values.mjs +0 -27
- package/dist/declarative-flow.mjs +0 -244
- package/dist/design-values.mjs +0 -173
- package/dist/font-rules.mjs +0 -108
- package/dist/fonts-generated.mjs +0 -112
- package/dist/foundation-views.mjs +0 -242
- package/dist/foundation.mjs +0 -154
- package/dist/generated-entries.mjs +0 -198
- package/dist/html.mjs +0 -30
- package/dist/icons.mjs +0 -154
- package/dist/image-attributes.mjs +0 -187
- package/dist/image-size.mjs +0 -28
- package/dist/layers.mjs +0 -461
- package/dist/layout-widths.mjs +0 -332
- package/dist/linaria/atomic-css.cjs +0 -2
- package/dist/linaria/atomic-styled.cjs +0 -2
- package/dist/linaria/preserve-values.cjs +0 -58
- package/dist/linaria/spatial-inputs.cjs +0 -56
- package/dist/linaria.d.mts +0 -1
- package/dist/linaria.mjs +0 -9
- package/dist/lockup-composition.mjs +0 -44
- package/dist/lockup-model.cjs +0 -64
- package/dist/paint-contracts.mjs +0 -216
- package/dist/pictograms.mjs +0 -52
- package/dist/public-api.mjs +0 -121
- package/dist/public-props.mjs +0 -91
- package/dist/render-audit/axe-run.mjs +0 -17
- package/dist/render-audit/first-render.mjs +0 -40
- package/dist/render-audit/image-shape.mjs +0 -46
- package/dist/render-audit/layout-overflow.mjs +0 -167
- package/dist/render-audit/layout-shift.mjs +0 -32
- package/dist/render-audit/non-text-contrast.mjs +0 -151
- package/dist/render-audit/pictograms.mjs +0 -88
- package/dist/render-color-probe.mjs +0 -202
- package/dist/render-composition.mjs +0 -186
- package/dist/runtime-contracts.mjs +0 -506
- package/dist/scenario-program.mjs +0 -19
- package/dist/scenario-selectors.mjs +0 -237
- package/dist/scenario-slots.mjs +0 -217
- package/dist/scenario-trace.mjs +0 -314
- package/dist/scenarios-vite.d.mts +0 -2
- package/dist/scenarios-vite.mjs +0 -2
- package/dist/scenarios.mjs +0 -616
- package/dist/selector-match.mjs +0 -94
- package/dist/showcase/comparison.js +0 -48
- package/dist/showcase/connection.js +0 -10
- package/dist/showcase/draft-navigation.js +0 -59
- package/dist/showcase/foundation-view.css +0 -58
- package/dist/showcase/foundation-view.mjs +0 -255
- package/dist/showcase/guide-controls.ads.review.mjs +0 -32
- package/dist/showcase/http-connection.js +0 -86
- package/dist/showcase/http-preview.js +0 -81
- package/dist/showcase/icons.js +0 -2
- package/dist/showcase/navigation.js +0 -13
- package/dist/showcase/pictogram-view.mjs +0 -53
- package/dist/showcase/preview-frame.ads.review.css +0 -46
- package/dist/showcase/preview-frame.ads.review.d.mts +0 -11
- package/dist/showcase/preview-frame.ads.review.mjs +0 -22
- package/dist/showcase/preview-state.js +0 -11
- package/dist/showcase/refresh-scheduler.js +0 -23
- package/dist/showcase/resource-reader.js +0 -37
- package/dist/showcase-coverage.mjs +0 -139
- package/dist/source-symbols.mjs +0 -4
- package/dist/spatial-composition.mjs +0 -322
- package/dist/spatial-contexts.cjs +0 -56
- package/dist/spatial-css.cjs +0 -351
- package/dist/spatial-inputs.cjs +0 -80
- package/dist/spatial-model.cjs +0 -322
- package/dist/spatial.mjs +0 -21
- package/dist/stage-timing.cjs +0 -21
- package/dist/starters/preact/design-system/patterns/Conversation/Conversation.tsx +0 -105
- package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +0 -275
- package/dist/starters/preact/design-system/review/demo-frame/DemoFrame.ads.review.tsx +0 -7
- package/dist/starters/preact/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +0 -10
- package/dist/starters/preact/design-system/showcase/mcp/main.ads.mount.tsx +0 -8
- package/dist/starters/preact/ds.config.json +0 -37
- package/dist/starters/preact/package.json +0 -35
- package/dist/starters/preact/src/vite-env.d.ts +0 -7
- package/dist/starters/preact/tsconfig.json +0 -35
- package/dist/starters/preact/vite.config.ts +0 -23
- package/dist/starters/react/ADS.md +0 -286
- package/dist/starters/react/README.md +0 -184
- package/dist/starters/react/biome.css.json +0 -21
- package/dist/starters/react/design-system/assets/brand/README.md +0 -41
- package/dist/starters/react/design-system/assets/brand/app-icon.svg +0 -4
- package/dist/starters/react/design-system/assets/brand/logo.dark.svg +0 -6
- package/dist/starters/react/design-system/assets/brand/logo.svg +0 -6
- package/dist/starters/react/design-system/assets/glyphs/README.md +0 -15
- package/dist/starters/react/design-system/assets/glyphs/aliases.json +0 -1
- package/dist/starters/react/design-system/assets/glyphs/check.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-down.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/chevron-right.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/close.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/external-link.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/info.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/menu.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/plus.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/search.svg +0 -1
- package/dist/starters/react/design-system/assets/glyphs/warning.svg +0 -1
- package/dist/starters/react/design-system/assets/pictograms/catalog.ads.json +0 -13
- package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +0 -7
- package/dist/starters/react/design-system/assets/pictograms/journey.svg +0 -7
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -13
- package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +0 -56
- package/dist/starters/react/design-system/components/Actions/Button/README.md +0 -12
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.fixture.ts +0 -9
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.scenario.tsx +0 -16
- package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +0 -60
- package/dist/starters/react/design-system/components/Actions/IconButton/README.md +0 -17
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.fixture.ts +0 -6
- package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -16
- package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +0 -42
- package/dist/starters/react/design-system/components/Content/Icon/README.md +0 -17
- package/dist/starters/react/design-system/components/Content/Icon/glyphs.ts +0 -17
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.fixture.ts +0 -2
- package/dist/starters/react/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -13
- package/dist/starters/react/design-system/components/Content/Image/Image.tsx +0 -51
- package/dist/starters/react/design-system/components/Content/Image/README.md +0 -20
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Logo/Logo.ads.scenario.tsx +0 -12
- package/dist/starters/react/design-system/components/Content/Logo/Logo.tsx +0 -35
- package/dist/starters/react/design-system/components/Content/Logo/README.md +0 -12
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +0 -7
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +0 -26
- package/dist/starters/react/design-system/components/Forms/TextField/README.md +0 -14
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.fixture.ts +0 -6
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -13
- package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +0 -61
- package/dist/starters/react/design-system/composition/Search/SearchPage/README.md +0 -4
- package/dist/starters/react/design-system/composition/Search/SearchPage/SearchPage.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/composition/Search/SearchPage/SearchPage.ads.scenario.tsx +0 -16
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/README.md +0 -5
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.fixture.ts +0 -13
- package/dist/starters/react/design-system/composition/Workspace/WorkspacePage/WorkspacePage.ads.scenario.tsx +0 -22
- package/dist/starters/react/design-system/controllers/Palette/Palette.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/controllers/Palette/Palette.ts +0 -164
- package/dist/starters/react/design-system/index.ts +0 -12
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.fixture.ts +0 -7
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.ads.scenario.tsx +0 -15
- package/dist/starters/react/design-system/patterns/Conversation/Conversation.tsx +0 -105
- package/dist/starters/react/design-system/patterns/Conversation/README.md +0 -9
- package/dist/starters/react/design-system/patterns/Search/SearchBar/README.md +0 -12
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.fixture.ts +0 -1
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.ads.scenario.tsx +0 -11
- package/dist/starters/react/design-system/patterns/Search/SearchBar/SearchBar.tsx +0 -41
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.fixture.ts +0 -5
- package/dist/starters/react/design-system/patterns/Shell/Floating.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/patterns/Shell/README.md +0 -43
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.fixture.ts +0 -5
- package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -21
- package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +0 -274
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/demo-frame/DemoFrame.ads.review.tsx +0 -7
- package/dist/starters/react/design-system/review/index.ads.review.ts +0 -4
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/region-block/RegionBlock.ads.review.tsx +0 -6
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.exports.ts +0 -1
- package/dist/starters/react/design-system/review/screen-frame/ScreenFrame.ads.review.tsx +0 -10
- package/dist/starters/react/design-system/showcase/mcp/main.ads.mount.tsx +0 -10
- package/dist/starters/react/design-system/styles.css +0 -7
- package/dist/starters/react/design-system/tokens/base.css +0 -36
- package/dist/starters/react/design-system/tokens/catalog.ads.json +0 -1221
- package/dist/starters/react/design-system/tokens/colors.css +0 -215
- package/dist/starters/react/design-system/tokens/elevation.css +0 -53
- package/dist/starters/react/design-system/tokens/spacing.css +0 -87
- package/dist/starters/react/design-system/tokens/spatial.ads.json +0 -70
- package/dist/starters/react/design-system/tokens/themes.generated.css +0 -142
- package/dist/starters/react/design-system/tokens/themes.generated.ts +0 -402
- package/dist/starters/react/design-system/tokens/typography.css +0 -31
- package/dist/starters/react/ds.config.json +0 -37
- package/dist/starters/react/gitignore.template +0 -8
- package/dist/starters/react/package.json +0 -39
- package/dist/starters/react/scripts/build-mcp-previews.mjs +0 -3
- package/dist/starters/react/src/vite-env.d.ts +0 -7
- package/dist/starters/react/tsconfig.build.json +0 -20
- package/dist/starters/react/tsconfig.json +0 -34
- package/dist/starters/react/vite.config.ts +0 -23
- package/dist/style-boundaries.mjs +0 -106
- package/dist/style-token-rules.mjs +0 -51
- package/dist/themes-generated.mjs +0 -161
- package/dist/themes-watch.mjs +0 -83
- package/dist/themes.mjs +0 -360
- package/dist/token-export.mjs +0 -94
- package/dist/token-origins.mjs +0 -24
- package/dist/token-policy.mjs +0 -26
- package/dist/token-quality.mjs +0 -149
- package/dist/token-samples.mjs +0 -19
- package/dist/tokens.mjs +0 -194
- package/dist/unit-contracts.mjs +0 -396
- package/dist/usage.mjs +0 -184
- package/dist/verification/playwright-reporter.cjs +0 -87
- package/docs/CONTRACTS.md +0 -285
- package/docs/HTTP-SHOWCASE-POC.md +0 -397
- package/docs/SPATIAL-CHECKS.md +0 -69
- package/docs/benchmarks/http-showcase-optimized.json +0 -1879
- package/docs/benchmarks/http-showcase-profile.json +0 -308
- package/docs/benchmarks/http-showcase.json +0 -3069
- /package/dist/{starters/react/design-system/assets/fonts/.gitkeep → analysis/semantic.mjs} +0 -0
- /package/dist/{starters/react/design-system/controllers/.gitkeep → lowering-model.mjs} +0 -0
- /package/dist/showcase/{favicon.svg → ui/favicon-scavmehf.svg} +0 -0
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
function
|
|
2
|
-
`)}var{create:hb,defineProperty:Ba,getOwnPropertyDescriptor:fb,getOwnPropertyNames:_b,getPrototypeOf:gb}=Object,Sb=Object.prototype.hasOwnProperty,zp=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rp=(e,t)=>{let r={};for(var o in e)Ba(r,o,{get:e[o],enumerable:!0});if(t)Ba(r,Symbol.toStringTag,{value:"Module"});return r},vb=(e,t,r,o)=>{if(t&&typeof t==="object"||typeof t==="function"){for(var s=_b(t),n=0,i=s.length,a;n<i;n++)if(a=s[n],!Sb.call(e,a)&&a!==r)Ba(e,a,{get:((c)=>t[c]).bind(null,a),enumerable:!(o=fb(t,a))||o.enumerable})}return e},xp=(e,t,r)=>(r=e!=null?hb(gb(e)):{},vb(t||!e||!e.__esModule?Ba(r,"default",{value:e,enumerable:!0}):r,e));var bb=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),kp=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),yb=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),wb=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function Pp(e){return typeof e==="string"&&kp.has(e.replace(/#$/,""))}function Tp(e,t){if(!("$schema"in e)||typeof e.$schema!=="string")return"2020-12";let r=e.$schema.replace(/#$/,"");if(bb.has(r))return"2020-12";if(kp.has(r))return"2019-09";if(yb.has(r)||wb.has(r))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var Ep,qu=Object.freeze({status:"aborted"});function w(e,t,r){function o(a,c){if(!a._zod)Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let l=i.prototype,d=Object.keys(l);for(let f=0;f<d.length;f++){let h=d[f];if(!(h in a))a[h]=l[h].bind(a)}}let s=r?.Parent??Object;class n extends s{}Object.defineProperty(n,"name",{value:e});function i(a){var c;let l=r?.Parent?new n:this;o(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(i,"init",{value:o}),Object.defineProperty(i,Symbol.hasInstance,{value:(a)=>{if(r?.Parent&&a instanceof r.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}var zb=Symbol("zod_brand");class Ft extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class dn extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}(Ep=globalThis).__zod_globalConfig??(Ep.__zod_globalConfig={});var No=globalThis.__zod_globalConfig;function Je(e){if(e)Object.assign(No,e);return No}function Wa(e){let t=Object.values(e).filter((o)=>typeof o==="number");return Object.entries(e).filter(([o,s])=>t.indexOf(+o)===-1).map(([o,s])=>s)}function Nu(e,t="|"){return e.map((r)=>Lu(r)).join(t)}function pn(e,t){if(typeof t==="bigint")return t.toString();return t}function mn(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw Error("cached value already set")}}}function Ka(e){return e===null||e===void 0}function Ga(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Cp(e,t){let r=e/t,o=Math.round(r),s=Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-o)<s)return 0;return r-o}var $p=Symbol("evaluating");function oe(e,t,r){let o=void 0;Object.defineProperty(e,t,{get(){if(o===$p)return;if(o===void 0)o=$p,o=r();return o},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function Hr(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function cr(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function ju(e){return JSON.stringify(e)}function Ip(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Mu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jo(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var qp=mn(()=>{if(No.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Fr(e){if(jo(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let r=t.prototype;if(jo(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)return!1;return!0}function Au(e){if(Fr(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}var Op=new Set(["string","number","symbol"]);function ur(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ht(e,t,r){let o=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)o._zod.parent=e;return o}function H(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function Lu(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function Np(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var jp={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Rb(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let n=cr(e._zod.def,{get shape(){let i={};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;i[a]=r.shape[a]}return Hr(this,"shape",i),i},checks:[]});return ht(e,n)}function xb(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let n=cr(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;delete i[a]}return Hr(this,"shape",i),i},checks:[]});return ht(e,n)}function kb(e,t){if(!Fr(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let n=e._zod.def.shape;for(let i in t)if(Object.getOwnPropertyDescriptor(n,i)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let s=cr(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Hr(this,"shape",n),n}});return ht(e,s)}function Pb(e,t){if(!Fr(t))throw Error("Invalid input to safeExtend: expected a plain object");let r=cr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Hr(this,"shape",o),o}});return ht(e,r)}function Tb(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=cr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Hr(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ht(e,r)}function Eb(e,t,r){let s=t._zod.def.checks;if(s&&s.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let i=cr(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw Error(`Unrecognized key: "${l}"`);if(!r[l])continue;c[l]=e?new e({type:"optional",innerType:a[l]}):a[l]}else for(let l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return Hr(this,"shape",c),c},checks:[]});return ht(t,i)}function $b(e,t,r){let o=cr(t._zod.def,{get shape(){let s=t._zod.def.shape,n={...s};if(r)for(let i in r){if(!(i in n))throw Error(`Unrecognized key: "${i}"`);if(!r[i])continue;n[i]=new e({type:"nonoptional",innerType:s[i]})}else for(let i in s)n[i]=new e({type:"nonoptional",innerType:s[i]});return Hr(this,"shape",n),n}});return ht(t,o)}function Vr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Mp(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function lr(e,t){return t.map((r)=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Ja(e){return typeof e==="string"?e:e?.message}function ft(e,t,r){let o=e.message?e.message:Ja(e.inst?._zod.def?.error?.(e))??Ja(t?.error?.(e))??Ja(r.customError?.(e))??Ja(r.localeError?.(e))??"Invalid input",{inst:s,continue:n,input:i,...a}=e;if(a.path??(a.path=[]),a.message=o,t?.reportInput)a.input=i;return a}function Ya(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function Ap(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Br(...e){let[t,r,o]=e;if(typeof t==="string")return{message:t,code:"custom",input:r,inst:o};return{...t}}var Lp=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,pn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Xa=w("$ZodError",Lp),Uu=w("$ZodError",Lp,{Parent:Error});function Du(e,t=(r)=>r.message){let r={},o=[];for(let s of e.issues)if(s.path.length>0)r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s));else o.push(t(s));return{formErrors:o,fieldErrors:r}}function Zu(e,t=(r)=>r.message){let r={_errors:[]},o=(s,n=[])=>{for(let i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map((a)=>o({issues:a},[...n,...i.path]));else if(i.code==="invalid_key")o({issues:i.issues},[...n,...i.path]);else if(i.code==="invalid_element")o({issues:i.issues},[...n,...i.path]);else{let a=[...n,...i.path];if(a.length===0)r._errors.push(t(i));else{let c=r,l=0;while(l<a.length){let d=a[l];if(l!==a.length-1)c[d]=c[d]||{_errors:[]};else c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(i));c=c[d],l++}}}};return o(e),r}var Qa=(e)=>(t,r,o,s)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Ft;if(i.issues.length){let a=new(s?.Err??e)(i.issues.map((c)=>ft(c,n,Je())));throw Mu(a,s?.callee),a}return i.value};var ec=(e)=>async(t,r,o,s)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)i=await i;if(i.issues.length){let a=new(s?.Err??e)(i.issues.map((c)=>ft(c,n,Je())));throw Mu(a,s?.callee),a}return i.value};var hn=(e)=>(t,r,o)=>{let s=o?{...o,async:!1}:{async:!1},n=t._zod.run({value:r,issues:[]},s);if(n instanceof Promise)throw new Ft;return n.issues.length?{success:!1,error:new(e??Xa)(n.issues.map((i)=>ft(i,s,Je())))}:{success:!0,data:n.value}},Up=hn(Uu),fn=(e)=>async(t,r,o)=>{let s=o?{...o,async:!0}:{async:!0},n=t._zod.run({value:r,issues:[]},s);if(n instanceof Promise)n=await n;return n.issues.length?{success:!1,error:new e(n.issues.map((i)=>ft(i,s,Je())))}:{success:!0,data:n.value}},Dp=fn(Uu),Zp=(e)=>(t,r,o)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return Qa(e)(t,r,s)};var Hp=(e)=>(t,r,o)=>Qa(e)(t,r,o);var Fp=(e)=>async(t,r,o)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return ec(e)(t,r,s)};var Vp=(e)=>async(t,r,o)=>ec(e)(t,r,o);var Bp=(e)=>(t,r,o)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return hn(e)(t,r,s)};var Jp=(e)=>(t,r,o)=>hn(e)(t,r,o);var Wp=(e)=>async(t,r,o)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return fn(e)(t,r,s)};var Kp=(e)=>async(t,r,o)=>fn(e)(t,r,o);var Gp=/^[cC][0-9a-z]{6,}$/,Yp=/^[0-9a-z]+$/,Xp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Qp=/^[0-9a-vA-V]{20}$/,em=/^[A-Za-z0-9]{27}$/,tm=/^[a-zA-Z0-9_-]{21}$/,rm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var om=/^([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})$/,Hu=(e)=>{if(!e)return/^([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)$/;return 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})$`)};var sm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var Ib="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function nm(){return new RegExp(Ib,"u")}var im=/^(?:(?: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])$/,am=/^(([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}|:))$/;var cm=/^((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])$/,um=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Fu=/^[A-Za-z0-9_-]*$/;var dm=/^https?$/,pm=/^\+[1-9]\d{6,14}$/,mm="(?:(?:\\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])))",hm=new RegExp(`^${mm}$`);function fm(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function _m(e){return new RegExp(`^${fm(e)}$`)}function gm(e){let t=fm({precision:e.precision}),r=["Z"];if(e.local)r.push("");if(e.offset)r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${mm}T(?:${o})$`)}var Sm=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};var vm=/^-?\d+$/,Vu=/^-?\d+(?:\.\d+)?$/,bm=/^(?:true|false)$/i,ym=/^null$/i;var wm=/^undefined$/i;var zm=/^[^A-Z]*$/,Rm=/^[^a-z]*$/;var Ie=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),xm={number:"number",bigint:"bigint",object:"date"},Bu=w("$ZodCheckLessThan",(e,t)=>{Ie.init(e,t);let r=xm[typeof t.value];e._zod.onattach.push((o)=>{let s=o._zod.bag,n=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<n)if(t.inclusive)s.maximum=t.value;else s.exclusiveMaximum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:r,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ju=w("$ZodCheckGreaterThan",(e,t)=>{Ie.init(e,t);let r=xm[typeof t.value];e._zod.onattach.push((o)=>{let s=o._zod.bag,n=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>n)if(t.inclusive)s.minimum=t.value;else s.exclusiveMinimum=t.value}),e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:r,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),km=w("$ZodCheckMultipleOf",(e,t)=>{Ie.init(e,t),e._zod.onattach.push((r)=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof r.value==="bigint"?r.value%t.value===BigInt(0):Cp(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Pm=w("$ZodCheckNumberFormat",(e,t)=>{Ie.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[s,n]=jp[t.format];e._zod.onattach.push((i)=>{let a=i._zod.bag;if(a.format=t.format,a.minimum=s,a.maximum=n,r)a.pattern=vm}),e._zod.check=(i)=>{let a=i.value;if(r){if(!Number.isInteger(a)){i.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});else i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(a<s)i.issues.push({origin:"number",input:a,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort});if(a>n)i.issues.push({origin:"number",input:a,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}});var Tm=w("$ZodCheckMaxLength",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let s=o.value;return!Ka(s)&&s.length!==void 0}),e._zod.onattach.push((o)=>{let s=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<s)o._zod.bag.maximum=t.maximum}),e._zod.check=(o)=>{let s=o.value;if(s.length<=t.maximum)return;let i=Ya(s);o.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Em=w("$ZodCheckMinLength",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let s=o.value;return!Ka(s)&&s.length!==void 0}),e._zod.onattach.push((o)=>{let s=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>s)o._zod.bag.minimum=t.minimum}),e._zod.check=(o)=>{let s=o.value;if(s.length>=t.minimum)return;let i=Ya(s);o.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),$m=w("$ZodCheckLengthEquals",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=(o)=>{let s=o.value;return!Ka(s)&&s.length!==void 0}),e._zod.onattach.push((o)=>{let s=o._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=(o)=>{let s=o.value,n=s.length;if(n===t.length)return;let i=Ya(s),a=n>t.length;o.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),gn=w("$ZodCheckStringFormat",(e,t)=>{var r,o;if(Ie.init(e,t),e._zod.onattach.push((s)=>{let n=s._zod.bag;if(n.format=t.format,t.pattern)n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern)}),t.pattern)(r=e._zod).check??(r.check=(s)=>{if(t.pattern.lastIndex=0,t.pattern.test(s.value))return;s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(o=e._zod).check??(o.check=()=>{})}),Cm=w("$ZodCheckRegex",(e,t)=>{gn.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Im=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=zm),gn.init(e,t)}),qm=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Rm),gn.init(e,t)}),Om=w("$ZodCheckIncludes",(e,t)=>{Ie.init(e,t);let r=ur(t.includes),o=new RegExp(typeof t.position==="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push((s)=>{let n=s._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),e._zod.check=(s)=>{if(s.value.includes(t.includes,t.position))return;s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),Nm=w("$ZodCheckStartsWith",(e,t)=>{Ie.init(e,t);let r=new RegExp(`^${ur(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push((o)=>{let s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),jm=w("$ZodCheckEndsWith",(e,t)=>{Ie.init(e,t);let r=new RegExp(`.*${ur(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push((o)=>{let s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});var Mm=w("$ZodCheckOverwrite",(e,t)=>{Ie.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}});class Wu{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
3
|
-
|
|
4
|
-
`))}}var Lm={major:4,minor:4,patch:3};var ae=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Lm;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))o.unshift(e);for(let s of o)for(let n of s._zod.onattach)n(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let s=(i,a,c)=>{let l=Vr(i),d;for(let f of a){if(f._zod.def.when){if(Mp(i))continue;if(!f._zod.def.when(i))continue}else if(l)continue;let h=i.issues.length,g=f._zod.check(i);if(g instanceof Promise&&c?.async===!1)throw new Ft;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{if(await g,i.issues.length===h)return;if(!l)l=Vr(i,h)});else{if(i.issues.length===h)continue;if(!l)l=Vr(i,h)}}if(d)return d.then(()=>i);return i},n=(i,a,c)=>{if(Vr(i))return i.aborted=!0,i;let l=s(a,o,c);if(l instanceof Promise){if(c.async===!1)throw new Ft;return l.then((d)=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction==="backward"){let l=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});if(l instanceof Promise)return l.then((d)=>n(d,i,a));return n(l,i,a)}let c=e._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Ft;return c.then((l)=>s(l,o,a))}return s(c,o,a)}}oe(e,"~standard",()=>({validate:(s)=>{try{let n=Up(e,s);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Dp(e,s).then((i)=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),oc=w("$ZodString",(e,t)=>{ae.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Sm(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch(s){}if(typeof r.value==="string")return r;return r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),pe=w("$ZodStringFormat",(e,t)=>{gn.init(e,t),oc.init(e,t)}),Wm=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=om),pe.init(e,t)}),Km=w("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Hu(o))}else t.pattern??(t.pattern=Hu());pe.init(e,t)}),Gm=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=sm),pe.init(e,t)}),Ym=w("$ZodURL",(e,t)=>{pe.init(e,t),e._zod.check=(r)=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===dm.source){if(!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}}let s=new URL(o);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(s.hostname))r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol))r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})}if(t.normalize)r.value=s.href;else r.value=o;return}catch(o){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Xm=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=nm()),pe.init(e,t)}),Qm=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=tm),pe.init(e,t)}),eh=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Gp),pe.init(e,t)}),th=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Yp),pe.init(e,t)}),rh=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Xp),pe.init(e,t)}),oh=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Qp),pe.init(e,t)}),sh=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=em),pe.init(e,t)}),nh=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=gm(t)),pe.init(e,t)}),ih=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=hm),pe.init(e,t)}),ah=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=_m(t)),pe.init(e,t)}),ch=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=rm),pe.init(e,t)}),uh=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=im),pe.init(e,t),e._zod.bag.format="ipv4"}),lh=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=am),pe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=(r)=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}});var dh=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=cm),pe.init(e,t)}),ph=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=um),pe.init(e,t),e._zod.check=(r)=>{let o=r.value.split("/");try{if(o.length!==2)throw Error();let[s,n]=o;if(!n)throw Error();let i=Number(n);if(`${i}`!==n)throw Error();if(i<0||i>128)throw Error();new URL(`http://[${s}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function mh(e){if(e==="")return!0;if(/\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var hh=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=lm),pe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=(r)=>{if(mh(r.value))return;r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function qb(e){if(!Fu.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return mh(r)}var fh=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Fu),pe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=(r)=>{if(qb(r.value))return;r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),_h=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=pm),pe.init(e,t)});function Ob(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let s=JSON.parse(atob(o));if("typ"in s&&s?.typ!=="JWT")return!1;if(!s.alg)return!1;if(t&&(!("alg"in s)||s.alg!==t))return!1;return!0}catch{return!1}}var gh=w("$ZodJWT",(e,t)=>{pe.init(e,t),e._zod.check=(r)=>{if(Ob(r.value,t.alg))return;r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}});var Gu=w("$ZodNumber",(e,t)=>{ae.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vu,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch(i){}let s=r.value;if(typeof s==="number"&&!Number.isNaN(s)&&Number.isFinite(s))return r;let n=typeof s==="number"?Number.isNaN(s)?"NaN":!Number.isFinite(s)?"Infinity":void 0:void 0;return r.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...n?{received:n}:{}}),r}}),Sh=w("$ZodNumberFormat",(e,t)=>{Pm.init(e,t),Gu.init(e,t)}),vh=w("$ZodBoolean",(e,t)=>{ae.init(e,t),e._zod.pattern=bm,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(n){}let s=r.value;if(typeof s==="boolean")return r;return r.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),r}});var bh=w("$ZodUndefined",(e,t)=>{ae.init(e,t),e._zod.pattern=wm,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let s=r.value;if(typeof s>"u")return r;return r.issues.push({expected:"undefined",code:"invalid_type",input:s,inst:e}),r}}),yh=w("$ZodNull",(e,t)=>{ae.init(e,t),e._zod.pattern=ym,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let s=r.value;if(s===null)return r;return r.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),r}}),wh=w("$ZodAny",(e,t)=>{ae.init(e,t),e._zod.parse=(r)=>r}),zh=w("$ZodUnknown",(e,t)=>{ae.init(e,t),e._zod.parse=(r)=>r}),Rh=w("$ZodNever",(e,t)=>{ae.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Um(e,t,r){if(e.issues.length)t.issues.push(...lr(r,e.issues));t.value[r]=e.value}var xh=w("$ZodArray",(e,t)=>{ae.init(e,t),e._zod.parse=(r,o)=>{let s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=Array(s.length);let n=[];for(let i=0;i<s.length;i++){let a=s[i],c=t.element._zod.run({value:a,issues:[]},o);if(c instanceof Promise)n.push(c.then((l)=>Um(l,r,i)));else Um(c,r,i)}if(n.length)return Promise.all(n).then(()=>r);return r}});function rc(e,t,r,o,s,n){let i=r in o;if(e.issues.length){if(s&&n&&!i)return;t.issues.push(...lr(r,e.issues))}if(!i&&!s){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}if(e.value===void 0){if(i)t.value[r]=void 0}else t.value[r]=e.value}function kh(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${o}": expected a Zod schema`);let r=Np(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Ph(e,t,r,o,s,n){let i=[],a=s.keySet,c=s.catchall._zod,l=c.def.type,d=c.optin==="optional",f=c.optout==="optional";for(let h in t){if(h==="__proto__")continue;if(a.has(h))continue;if(l==="never"){i.push(h);continue}let g=c.run({value:t[h],issues:[]},o);if(g instanceof Promise)e.push(g.then((v)=>rc(v,r,h,t,d,f)));else rc(g,r,h,t,d,f)}if(i.length)r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:n});if(!e.length)return r;return Promise.all(e).then(()=>r)}var Nb=w("$ZodObject",(e,t)=>{if(ae.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=mn(()=>kh(t));oe(e._zod,"propValues",()=>{let a=t.shape,c={};for(let l in a){let d=a[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(let f of d.values)c[l].add(f)}}return c});let s=jo,n=t.catchall,i;e._zod.parse=(a,c)=>{i??(i=o.value);let l=a.value;if(!s(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};let d=[],f=i.shape;for(let h of i.keys){let g=f[h],v=g._zod.optin==="optional",_=g._zod.optout==="optional",y=g._zod.run({value:l[h],issues:[]},c);if(y instanceof Promise)d.push(y.then((T)=>rc(T,a,h,l,v,_)));else rc(y,a,h,l,v,_)}if(!n)return d.length?Promise.all(d).then(()=>a):a;return Ph(d,l,a,c,o.value,e)}}),Th=w("$ZodObjectJIT",(e,t)=>{Nb.init(e,t);let r=e._zod.parse,o=mn(()=>kh(t)),s=(h)=>{let g=new Wu(["shape","payload","ctx"]),v=o.value,_=(k)=>{let P=ju(k);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};g.write("const input = payload.value;");let y=Object.create(null),T=0;for(let k of v.keys)y[k]=`key_${T++}`;g.write("const newResult = {};");for(let k of v.keys){let P=y[k],z=ju(k),R=h[k],Z=R?._zod?.optin==="optional",ee=R?._zod?.optout==="optional";if(g.write(`const ${P} = ${_(k)};`),Z&&ee)g.write(`
|
|
1
|
+
function Yn(e){if(e?.failure?.scope!=="project")return"Preview build failed";if(e.failure.phase==="validation")return"Project validation failed";if(e.failure.phase==="discovery")return"Project scenario discovery failed";return"Project preview build failed"}function Ku(e=[]){return e.map((t)=>{let a=t.file?t.file+(t.line?`:${t.line}`:"")+(t.column?`:${t.column}`:""):"";return(a?`${a}: `:"")+t.message}).join(`
|
|
2
|
+
`)}var Gu=12;function Vm(e){if(e?.kind!=="stale"||e.reason.kind==="emitting")return null;let t=e.reason.failure,a=e.shown===null?"No earlier revision is available to show.":"Showing the last good revision.",s=t?.kind==="check-failed"?`The current source fails its check. ${a}`:e.reason.kind==="tree-failed"?`The preview tree could not be written${t?.message??t?.reason?`: ${t.message??t.reason}`:""}. ${a}`:`The current source could not be emitted. ${a}`,i=t?.diagnostics??[],o=Ku(i.slice(0,Gu)),r=i.length>Gu?`
|
|
3
|
+
… and ${i.length-Gu} more (ads check lists them all).`:"";return`${s}${o===""?"":`
|
|
4
|
+
${o}`}${r}`}var Je=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof Map);var{create:Jw,defineProperty:Xn,getOwnPropertyDescriptor:Ww,getOwnPropertyNames:Gw,getPrototypeOf:Kw}=Object,Yw=Object.prototype.hasOwnProperty,Jm=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wm=(e,t)=>{let a={};for(var s in e)Xn(a,s,{get:e[s],enumerable:!0});if(t)Xn(a,Symbol.toStringTag,{value:"Module"});return a},Xw=(e,t,a,s)=>{if(t&&typeof t==="object"||typeof t==="function"){for(var i=Gw(t),o=0,r=i.length,n;o<r;o++)if(n=i[o],!Yw.call(e,n)&&n!==a)Xn(e,n,{get:((u)=>t[u]).bind(null,n),enumerable:!(s=Ww(t,n))||s.enumerable})}return e},Gm=(e,t,a)=>(a=e!=null?Jw(Kw(e)):{},Xw(t||!e||!e.__esModule?Xn(a,"default",{value:e,enumerable:!0}):a,e));var Qw=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),Km=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),e0=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),t0=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function Ym(e){return typeof e==="string"&&Km.has(e.replace(/#$/,""))}function Xm(e,t){if(!("$schema"in e)||typeof e.$schema!=="string")return"2020-12";let a=e.$schema.replace(/#$/,"");if(Qw.has(a))return"2020-12";if(Km.has(a))return"2019-09";if(e0.has(a)||t0.has(a))return"draft-7";throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var Qm,Yu=Object.freeze({status:"aborted"});function z(e,t,a){function s(n,u){if(!n._zod)Object.defineProperty(n,"_zod",{value:{def:u,constr:r,traits:new Set},enumerable:!1});if(n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,u);let d=r.prototype,l=Object.keys(d);for(let h=0;h<l.length;h++){let p=l[h];if(!(p in n))n[p]=d[p].bind(n)}}let i=a?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function r(n){var u;let d=a?.Parent?new o:this;s(d,n),(u=d._zod).deferred??(u.deferred=[]);for(let l of d._zod.deferred)l();return d}return Object.defineProperty(r,"init",{value:s}),Object.defineProperty(r,Symbol.hasInstance,{value:(n)=>{if(a?.Parent&&n instanceof a.Parent)return!0;return n?._zod?.traits?.has(e)}}),Object.defineProperty(r,"name",{value:e}),r}var a0=Symbol("zod_brand");class Ft extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ho extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}(Qm=globalThis).__zod_globalConfig??(Qm.__zod_globalConfig={});var Os=globalThis.__zod_globalConfig;function We(e){if(e)Object.assign(Os,e);return Os}function ec(e){let t=Object.values(e).filter((s)=>typeof s==="number");return Object.entries(e).filter(([s,i])=>t.indexOf(+s)===-1).map(([s,i])=>i)}function Qu(e,t="|"){return e.map((a)=>sd(a)).join(t)}function fo(e,t){if(typeof t==="bigint")return t.toString();return t}function go(e){return{get value(){{let a=e();return Object.defineProperty(this,"value",{value:a}),a}throw Error("cached value already set")}}}function tc(e){return e===null||e===void 0}function ac(e){let t=e.startsWith("^")?1:0,a=e.endsWith("$")?e.length-1:e.length;return e.slice(t,a)}function t_(e,t){let a=e/t,s=Math.round(a),i=Number.EPSILON*Math.max(Math.abs(a),1);if(Math.abs(a-s)<i)return 0;return a-s}var e_=Symbol("evaluating");function ae(e,t,a){let s=void 0;Object.defineProperty(e,t,{get(){if(s===e_)return;if(s===void 0)s=e_,s=a();return s},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Fa(e,t,a){Object.defineProperty(e,t,{value:a,writable:!0,enumerable:!0,configurable:!0})}function ua(...e){let t={};for(let a of e){let s=Object.getOwnPropertyDescriptors(a);Object.assign(t,s)}return Object.defineProperties({},t)}function ed(e){return JSON.stringify(e)}function a_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var td="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function As(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var s_=go(()=>{if(Os.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Va(e){if(As(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let a=t.prototype;if(As(a)===!1)return!1;if(Object.prototype.hasOwnProperty.call(a,"isPrototypeOf")===!1)return!1;return!0}function ad(e){if(Va(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}var i_=new Set(["string","number","symbol"]);function da(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _t(e,t,a){let s=new e._zod.constr(t??e._zod.def);if(!t||a?.parent)s._zod.parent=e;return s}function Z(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function sd(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function o_(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var r_={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function s0(e,t){let a=e._zod.def,s=a.checks;if(s&&s.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let o=ua(e._zod.def,{get shape(){let r={};for(let n in t){if(!(n in a.shape))throw Error(`Unrecognized key: "${n}"`);if(!t[n])continue;r[n]=a.shape[n]}return Fa(this,"shape",r),r},checks:[]});return _t(e,o)}function i0(e,t){let a=e._zod.def,s=a.checks;if(s&&s.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=ua(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let n in t){if(!(n in a.shape))throw Error(`Unrecognized key: "${n}"`);if(!t[n])continue;delete r[n]}return Fa(this,"shape",r),r},checks:[]});return _t(e,o)}function o0(e,t){if(!Va(t))throw Error("Invalid input to extend: expected a plain object");let a=e._zod.def.checks;if(a&&a.length>0){let o=e._zod.def.shape;for(let r in t)if(Object.getOwnPropertyDescriptor(o,r)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=ua(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Fa(this,"shape",o),o}});return _t(e,i)}function r0(e,t){if(!Va(t))throw Error("Invalid input to safeExtend: expected a plain object");let a=ua(e._zod.def,{get shape(){let s={...e._zod.def.shape,...t};return Fa(this,"shape",s),s}});return _t(e,a)}function n0(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let a=ua(e._zod.def,{get shape(){let s={...e._zod.def.shape,...t._zod.def.shape};return Fa(this,"shape",s),s},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return _t(e,a)}function c0(e,t,a){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let r=ua(t._zod.def,{get shape(){let n=t._zod.def.shape,u={...n};if(a)for(let d in a){if(!(d in n))throw Error(`Unrecognized key: "${d}"`);if(!a[d])continue;u[d]=e?new e({type:"optional",innerType:n[d]}):n[d]}else for(let d in n)u[d]=e?new e({type:"optional",innerType:n[d]}):n[d];return Fa(this,"shape",u),u},checks:[]});return _t(t,r)}function u0(e,t,a){let s=ua(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(a)for(let r in a){if(!(r in o))throw Error(`Unrecognized key: "${r}"`);if(!a[r])continue;o[r]=new e({type:"nonoptional",innerType:i[r]})}else for(let r in i)o[r]=new e({type:"nonoptional",innerType:i[r]});return Fa(this,"shape",o),o}});return _t(t,s)}function Ja(e,t=0){if(e.aborted===!0)return!0;for(let a=t;a<e.issues.length;a++)if(e.issues[a]?.continue!==!0)return!0;return!1}function n_(e,t=0){if(e.aborted===!0)return!0;for(let a=t;a<e.issues.length;a++)if(e.issues[a]?.continue===!1)return!0;return!1}function la(e,t){return t.map((a)=>{var s;return(s=a).path??(s.path=[]),a.path.unshift(e),a})}function Qn(e){return typeof e==="string"?e:e?.message}function pt(e,t,a){let s=e.message?e.message:Qn(e.inst?._zod.def?.error?.(e))??Qn(t?.error?.(e))??Qn(a.customError?.(e))??Qn(a.localeError?.(e))??"Invalid input",{inst:i,continue:o,input:r,...n}=e;if(n.path??(n.path=[]),n.message=s,t?.reportInput)n.input=r;return n}function sc(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function c_(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let a=e;if(a&&Object.getPrototypeOf(a)!==Object.prototype&&"constructor"in a&&a.constructor)return a.constructor.name}}return t}function Wa(...e){let[t,a,s]=e;if(typeof t==="string")return{message:t,code:"custom",input:a,inst:s};return{...t}}var u_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,fo,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ic=z("$ZodError",u_),id=z("$ZodError",u_,{Parent:Error});function od(e,t=(a)=>a.message){let a={},s=[];for(let i of e.issues)if(i.path.length>0)a[i.path[0]]=a[i.path[0]]||[],a[i.path[0]].push(t(i));else s.push(t(i));return{formErrors:s,fieldErrors:a}}function rd(e,t=(a)=>a.message){let a={_errors:[]},s=(i,o=[])=>{for(let r of i.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map((n)=>s({issues:n},[...o,...r.path]));else if(r.code==="invalid_key")s({issues:r.issues},[...o,...r.path]);else if(r.code==="invalid_element")s({issues:r.issues},[...o,...r.path]);else{let n=[...o,...r.path];if(n.length===0)a._errors.push(t(r));else{let u=a,d=0;while(d<n.length){let l=n[d];if(d!==n.length-1)u[l]=u[l]||{_errors:[]};else u[l]=u[l]||{_errors:[]},u[l]._errors.push(t(r));u=u[l],d++}}}};return s(e),a}var oc=(e)=>(t,a,s,i)=>{let o=s?{...s,async:!1}:{async:!1},r=t._zod.run({value:a,issues:[]},o);if(r instanceof Promise)throw new Ft;if(r.issues.length){let n=new(i?.Err??e)(r.issues.map((u)=>pt(u,o,We())));throw td(n,i?.callee),n}return r.value};var rc=(e)=>async(t,a,s,i)=>{let o=s?{...s,async:!0}:{async:!0},r=t._zod.run({value:a,issues:[]},o);if(r instanceof Promise)r=await r;if(r.issues.length){let n=new(i?.Err??e)(r.issues.map((u)=>pt(u,o,We())));throw td(n,i?.callee),n}return r.value};var vo=(e)=>(t,a,s)=>{let i=s?{...s,async:!1}:{async:!1},o=t._zod.run({value:a,issues:[]},i);if(o instanceof Promise)throw new Ft;return o.issues.length?{success:!1,error:new(e??ic)(o.issues.map((r)=>pt(r,i,We())))}:{success:!0,data:o.value}},d_=vo(id),wo=(e)=>async(t,a,s)=>{let i=s?{...s,async:!0}:{async:!0},o=t._zod.run({value:a,issues:[]},i);if(o instanceof Promise)o=await o;return o.issues.length?{success:!1,error:new e(o.issues.map((r)=>pt(r,i,We())))}:{success:!0,data:o.value}},l_=wo(id),m_=(e)=>(t,a,s)=>{let i=s?{...s,direction:"backward"}:{direction:"backward"};return oc(e)(t,a,i)};var __=(e)=>(t,a,s)=>oc(e)(t,a,s);var p_=(e)=>async(t,a,s)=>{let i=s?{...s,direction:"backward"}:{direction:"backward"};return rc(e)(t,a,i)};var h_=(e)=>async(t,a,s)=>rc(e)(t,a,s);var f_=(e)=>(t,a,s)=>{let i=s?{...s,direction:"backward"}:{direction:"backward"};return vo(e)(t,a,i)};var g_=(e)=>(t,a,s)=>vo(e)(t,a,s);var v_=(e)=>async(t,a,s)=>{let i=s?{...s,direction:"backward"}:{direction:"backward"};return wo(e)(t,a,i)};var w_=(e)=>async(t,a,s)=>wo(e)(t,a,s);var b_=/^[cC][0-9a-z]{6,}$/,y_=/^[0-9a-z]+$/,k_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,z_=/^[0-9a-vA-V]{20}$/,S_=/^[A-Za-z0-9]{27}$/,x_=/^[a-zA-Z0-9_-]{21}$/,R_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var q_=/^([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})$/,nd=(e)=>{if(!e)return/^([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)$/;return 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})$`)};var j_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var l0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function P_(){return new RegExp(l0,"u")}var T_=/^(?:(?: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])$/,C_=/^(([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}|:))$/;var E_=/^((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])$/,$_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,M_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cd=/^[A-Za-z0-9_-]*$/;var N_=/^https?$/,I_=/^\+[1-9]\d{6,14}$/,O_="(?:(?:\\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])))",A_=new RegExp(`^${O_}$`);function L_(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function U_(e){return new RegExp(`^${L_(e)}$`)}function D_(e){let t=L_({precision:e.precision}),a=["Z"];if(e.local)a.push("");if(e.offset)a.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let s=`${t}(?:${a.join("|")})`;return new RegExp(`^${O_}T(?:${s})$`)}var Z_=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};var B_=/^-?\d+$/,ud=/^-?\d+(?:\.\d+)?$/,H_=/^(?:true|false)$/i,F_=/^null$/i;var V_=/^undefined$/i;var J_=/^[^A-Z]*$/,W_=/^[^a-z]*$/;var je=z("$ZodCheck",(e,t)=>{var a;e._zod??(e._zod={}),e._zod.def=t,(a=e._zod).onattach??(a.onattach=[])}),G_={number:"number",bigint:"bigint",object:"date"},dd=z("$ZodCheckLessThan",(e,t)=>{je.init(e,t);let a=G_[typeof t.value];e._zod.onattach.push((s)=>{let i=s._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<o)if(t.inclusive)i.maximum=t.value;else i.exclusiveMaximum=t.value}),e._zod.check=(s)=>{if(t.inclusive?s.value<=t.value:s.value<t.value)return;s.issues.push({origin:a,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ld=z("$ZodCheckGreaterThan",(e,t)=>{je.init(e,t);let a=G_[typeof t.value];e._zod.onattach.push((s)=>{let i=s._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>o)if(t.inclusive)i.minimum=t.value;else i.exclusiveMinimum=t.value}),e._zod.check=(s)=>{if(t.inclusive?s.value>=t.value:s.value>t.value)return;s.issues.push({origin:a,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),K_=z("$ZodCheckMultipleOf",(e,t)=>{je.init(e,t),e._zod.onattach.push((a)=>{var s;(s=a._zod.bag).multipleOf??(s.multipleOf=t.value)}),e._zod.check=(a)=>{if(typeof a.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof a.value==="bigint"?a.value%t.value===BigInt(0):t_(a.value,t.value)===0)return;a.issues.push({origin:typeof a.value,code:"not_multiple_of",divisor:t.value,input:a.value,inst:e,continue:!t.abort})}}),Y_=z("$ZodCheckNumberFormat",(e,t)=>{je.init(e,t),t.format=t.format||"float64";let a=t.format?.includes("int"),s=a?"int":"number",[i,o]=r_[t.format];e._zod.onattach.push((r)=>{let n=r._zod.bag;if(n.format=t.format,n.minimum=i,n.maximum=o,a)n.pattern=B_}),e._zod.check=(r)=>{let n=r.value;if(a){if(!Number.isInteger(n)){r.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:n,inst:e});return}if(!Number.isSafeInteger(n)){if(n>0)r.issues.push({input:n,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort});else r.issues.push({input:n,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort});return}}if(n<i)r.issues.push({origin:"number",input:n,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort});if(n>o)r.issues.push({origin:"number",input:n,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}});var X_=z("$ZodCheckMaxLength",(e,t)=>{var a;je.init(e,t),(a=e._zod.def).when??(a.when=(s)=>{let i=s.value;return!tc(i)&&i.length!==void 0}),e._zod.onattach.push((s)=>{let i=s._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<i)s._zod.bag.maximum=t.maximum}),e._zod.check=(s)=>{let i=s.value;if(i.length<=t.maximum)return;let r=sc(i);s.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Q_=z("$ZodCheckMinLength",(e,t)=>{var a;je.init(e,t),(a=e._zod.def).when??(a.when=(s)=>{let i=s.value;return!tc(i)&&i.length!==void 0}),e._zod.onattach.push((s)=>{let i=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>i)s._zod.bag.minimum=t.minimum}),e._zod.check=(s)=>{let i=s.value;if(i.length>=t.minimum)return;let r=sc(i);s.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ep=z("$ZodCheckLengthEquals",(e,t)=>{var a;je.init(e,t),(a=e._zod.def).when??(a.when=(s)=>{let i=s.value;return!tc(i)&&i.length!==void 0}),e._zod.onattach.push((s)=>{let i=s._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=(s)=>{let i=s.value,o=i.length;if(o===t.length)return;let r=sc(i),n=o>t.length;s.issues.push({origin:r,...n?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!t.abort})}}),yo=z("$ZodCheckStringFormat",(e,t)=>{var a,s;if(je.init(e,t),e._zod.onattach.push((i)=>{let o=i._zod.bag;if(o.format=t.format,t.pattern)o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern)}),t.pattern)(a=e._zod).check??(a.check=(i)=>{if(t.pattern.lastIndex=0,t.pattern.test(i.value))return;i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(s=e._zod).check??(s.check=()=>{})}),tp=z("$ZodCheckRegex",(e,t)=>{yo.init(e,t),e._zod.check=(a)=>{if(t.pattern.lastIndex=0,t.pattern.test(a.value))return;a.issues.push({origin:"string",code:"invalid_format",format:"regex",input:a.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ap=z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=J_),yo.init(e,t)}),sp=z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=W_),yo.init(e,t)}),ip=z("$ZodCheckIncludes",(e,t)=>{je.init(e,t);let a=da(t.includes),s=new RegExp(typeof t.position==="number"?`^.{${t.position}}${a}`:a);t.pattern=s,e._zod.onattach.push((i)=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(s)}),e._zod.check=(i)=>{if(i.value.includes(t.includes,t.position))return;i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),op=z("$ZodCheckStartsWith",(e,t)=>{je.init(e,t);let a=new RegExp(`^${da(t.prefix)}.*`);t.pattern??(t.pattern=a),e._zod.onattach.push((s)=>{let i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(a)}),e._zod.check=(s)=>{if(s.value.startsWith(t.prefix))return;s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:s.value,inst:e,continue:!t.abort})}}),rp=z("$ZodCheckEndsWith",(e,t)=>{je.init(e,t);let a=new RegExp(`.*${da(t.suffix)}$`);t.pattern??(t.pattern=a),e._zod.onattach.push((s)=>{let i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(a)}),e._zod.check=(s)=>{if(s.value.endsWith(t.suffix))return;s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:s.value,inst:e,continue:!t.abort})}});var np=z("$ZodCheckOverwrite",(e,t)=>{je.init(e,t),e._zod.check=(a)=>{a.value=t.tx(a.value)}});class md{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let a=e.split(`
|
|
5
|
+
`).filter((o)=>o),s=Math.min(...a.map((o)=>o.length-o.trimStart().length)),i=a.map((o)=>o.slice(s)).map((o)=>" ".repeat(this.indent*2)+o);for(let o of i)this.content.push(o)}compile(){let e=Function,t=this?.args,s=[...(this?.content??[""]).map((i)=>` ${i}`)];return new e(...t,s.join(`
|
|
6
|
+
`))}}var up={major:4,minor:4,patch:3};var ce=z("$ZodType",(e,t)=>{var a;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=up;let s=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))s.unshift(e);for(let i of s)for(let o of i._zod.onattach)o(e);if(s.length===0)(a=e._zod).deferred??(a.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(r,n,u)=>{let d=Ja(r),l;for(let h of n){if(h._zod.def.when){if(n_(r))continue;if(!h._zod.def.when(r))continue}else if(d)continue;let p=r.issues.length,v=h._zod.check(r);if(v instanceof Promise&&u?.async===!1)throw new Ft;if(l||v instanceof Promise)l=(l??Promise.resolve()).then(async()=>{if(await v,r.issues.length===p)return;if(!d)d=Ja(r,p)});else{if(r.issues.length===p)continue;if(!d)d=Ja(r,p)}}if(l)return l.then(()=>r);return r},o=(r,n,u)=>{if(Ja(r))return r.aborted=!0,r;let d=i(n,s,u);if(d instanceof Promise){if(u.async===!1)throw new Ft;return d.then((l)=>e._zod.parse(l,u))}return e._zod.parse(d,u)};e._zod.run=(r,n)=>{if(n.skipChecks)return e._zod.parse(r,n);if(n.direction==="backward"){let d=e._zod.parse({value:r.value,issues:[]},{...n,skipChecks:!0});if(d instanceof Promise)return d.then((l)=>o(l,r,n));return o(d,r,n)}let u=e._zod.parse(r,n);if(u instanceof Promise){if(n.async===!1)throw new Ft;return u.then((d)=>i(d,s,n))}return i(u,s,n)}}ae(e,"~standard",()=>({validate:(i)=>{try{let o=d_(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch(o){return l_(e,i).then((r)=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),uc=z("$ZodString",(e,t)=>{ce.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Z_(e._zod.bag),e._zod.parse=(a,s)=>{if(t.coerce)try{a.value=String(a.value)}catch(i){}if(typeof a.value==="string")return a;return a.issues.push({expected:"string",code:"invalid_type",input:a.value,inst:e}),a}}),_e=z("$ZodStringFormat",(e,t)=>{yo.init(e,t),uc.init(e,t)}),vp=z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=q_),_e.init(e,t)}),wp=z("$ZodUUID",(e,t)=>{if(t.version){let s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(s===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=nd(s))}else t.pattern??(t.pattern=nd());_e.init(e,t)}),bp=z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=j_),_e.init(e,t)}),yp=z("$ZodURL",(e,t)=>{_e.init(e,t),e._zod.check=(a)=>{try{let s=a.value.trim();if(!t.normalize&&t.protocol?.source===N_.source){if(!/^https?:\/\//i.test(s)){a.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:a.value,inst:e,continue:!t.abort});return}}let i=new URL(s);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(i.hostname))a.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:a.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol))a.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:a.value,inst:e,continue:!t.abort})}if(t.normalize)a.value=i.href;else a.value=s;return}catch(s){a.issues.push({code:"invalid_format",format:"url",input:a.value,inst:e,continue:!t.abort})}}}),kp=z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=P_()),_e.init(e,t)}),zp=z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=x_),_e.init(e,t)}),Sp=z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=b_),_e.init(e,t)}),xp=z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=y_),_e.init(e,t)}),Rp=z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=k_),_e.init(e,t)}),qp=z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=z_),_e.init(e,t)}),jp=z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=S_),_e.init(e,t)}),Pp=z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=D_(t)),_e.init(e,t)}),Tp=z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=A_),_e.init(e,t)}),Cp=z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=U_(t)),_e.init(e,t)}),Ep=z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=R_),_e.init(e,t)}),$p=z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=T_),_e.init(e,t),e._zod.bag.format="ipv4"}),Mp=z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=C_),_e.init(e,t),e._zod.bag.format="ipv6",e._zod.check=(a)=>{try{new URL(`http://[${a.value}]`)}catch{a.issues.push({code:"invalid_format",format:"ipv6",input:a.value,inst:e,continue:!t.abort})}}});var Np=z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=E_),_e.init(e,t)}),Ip=z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=$_),_e.init(e,t),e._zod.check=(a)=>{let s=a.value.split("/");try{if(s.length!==2)throw Error();let[i,o]=s;if(!o)throw Error();let r=Number(o);if(`${r}`!==o)throw Error();if(r<0||r>128)throw Error();new URL(`http://[${i}]`)}catch{a.issues.push({code:"invalid_format",format:"cidrv6",input:a.value,inst:e,continue:!t.abort})}}});function Op(e){if(e==="")return!0;if(/\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Ap=z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=M_),_e.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=(a)=>{if(Op(a.value))return;a.issues.push({code:"invalid_format",format:"base64",input:a.value,inst:e,continue:!t.abort})}});function m0(e){if(!cd.test(e))return!1;let t=e.replace(/[-_]/g,(s)=>s==="-"?"+":"/"),a=t.padEnd(Math.ceil(t.length/4)*4,"=");return Op(a)}var Lp=z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=cd),_e.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=(a)=>{if(m0(a.value))return;a.issues.push({code:"invalid_format",format:"base64url",input:a.value,inst:e,continue:!t.abort})}}),Up=z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=I_),_e.init(e,t)});function _0(e,t=null){try{let a=e.split(".");if(a.length!==3)return!1;let[s]=a;if(!s)return!1;let i=JSON.parse(atob(s));if("typ"in i&&i?.typ!=="JWT")return!1;if(!i.alg)return!1;if(t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}var Dp=z("$ZodJWT",(e,t)=>{_e.init(e,t),e._zod.check=(a)=>{if(_0(a.value,t.alg))return;a.issues.push({code:"invalid_format",format:"jwt",input:a.value,inst:e,continue:!t.abort})}});var pd=z("$ZodNumber",(e,t)=>{ce.init(e,t),e._zod.pattern=e._zod.bag.pattern??ud,e._zod.parse=(a,s)=>{if(t.coerce)try{a.value=Number(a.value)}catch(r){}let i=a.value;if(typeof i==="number"&&!Number.isNaN(i)&&Number.isFinite(i))return a;let o=typeof i==="number"?Number.isNaN(i)?"NaN":!Number.isFinite(i)?"Infinity":void 0:void 0;return a.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),a}}),Zp=z("$ZodNumberFormat",(e,t)=>{Y_.init(e,t),pd.init(e,t)}),Bp=z("$ZodBoolean",(e,t)=>{ce.init(e,t),e._zod.pattern=H_,e._zod.parse=(a,s)=>{if(t.coerce)try{a.value=Boolean(a.value)}catch(o){}let i=a.value;if(typeof i==="boolean")return a;return a.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),a}});var Hp=z("$ZodUndefined",(e,t)=>{ce.init(e,t),e._zod.pattern=V_,e._zod.values=new Set([void 0]),e._zod.parse=(a,s)=>{let i=a.value;if(typeof i>"u")return a;return a.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),a}}),Fp=z("$ZodNull",(e,t)=>{ce.init(e,t),e._zod.pattern=F_,e._zod.values=new Set([null]),e._zod.parse=(a,s)=>{let i=a.value;if(i===null)return a;return a.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),a}}),Vp=z("$ZodAny",(e,t)=>{ce.init(e,t),e._zod.parse=(a)=>a}),Jp=z("$ZodUnknown",(e,t)=>{ce.init(e,t),e._zod.parse=(a)=>a}),Wp=z("$ZodNever",(e,t)=>{ce.init(e,t),e._zod.parse=(a,s)=>(a.issues.push({expected:"never",code:"invalid_type",input:a.value,inst:e}),a)});function dp(e,t,a){if(e.issues.length)t.issues.push(...la(a,e.issues));t.value[a]=e.value}var Gp=z("$ZodArray",(e,t)=>{ce.init(e,t),e._zod.parse=(a,s)=>{let i=a.value;if(!Array.isArray(i))return a.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),a;a.value=Array(i.length);let o=[];for(let r=0;r<i.length;r++){let n=i[r],u=t.element._zod.run({value:n,issues:[]},s);if(u instanceof Promise)o.push(u.then((d)=>dp(d,a,r)));else dp(u,a,r)}if(o.length)return Promise.all(o).then(()=>a);return a}});function cc(e,t,a,s,i,o){let r=a in s;if(e.issues.length){if(i&&o&&!r)return;t.issues.push(...la(a,e.issues))}if(!r&&!i){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[a]});return}if(e.value===void 0){if(r)t.value[a]=void 0}else t.value[a]=e.value}function Kp(e){let t=Object.keys(e.shape);for(let s of t)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${s}": expected a Zod schema`);let a=o_(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Yp(e,t,a,s,i,o){let r=[],n=i.keySet,u=i.catchall._zod,d=u.def.type,l=u.optin==="optional",h=u.optout==="optional";for(let p in t){if(p==="__proto__")continue;if(n.has(p))continue;if(d==="never"){r.push(p);continue}let v=u.run({value:t[p],issues:[]},s);if(v instanceof Promise)e.push(v.then((b)=>cc(b,a,p,t,l,h)));else cc(v,a,p,t,l,h)}if(r.length)a.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:o});if(!e.length)return a;return Promise.all(e).then(()=>a)}var p0=z("$ZodObject",(e,t)=>{if(ce.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let n=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...n};return Object.defineProperty(t,"shape",{value:u}),u}})}let s=go(()=>Kp(t));ae(e._zod,"propValues",()=>{let n=t.shape,u={};for(let d in n){let l=n[d]._zod;if(l.values){u[d]??(u[d]=new Set);for(let h of l.values)u[d].add(h)}}return u});let i=As,o=t.catchall,r;e._zod.parse=(n,u)=>{r??(r=s.value);let d=n.value;if(!i(d))return n.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),n;n.value={};let l=[],h=r.shape;for(let p of r.keys){let v=h[p],b=v._zod.optin==="optional",g=v._zod.optout==="optional",w=v._zod.run({value:d[p],issues:[]},u);if(w instanceof Promise)l.push(w.then((R)=>cc(R,n,p,d,b,g)));else cc(w,n,p,d,b,g)}if(!o)return l.length?Promise.all(l).then(()=>n):n;return Yp(l,d,n,u,s.value,e)}}),Xp=z("$ZodObjectJIT",(e,t)=>{p0.init(e,t);let a=e._zod.parse,s=go(()=>Kp(t)),i=(p)=>{let v=new md(["shape","payload","ctx"]),b=s.value,g=(x)=>{let P=ed(x);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};v.write("const input = payload.value;");let w=Object.create(null),R=0;for(let x of b.keys)w[x]=`key_${R++}`;v.write("const newResult = {};");for(let x of b.keys){let P=w[x],S=ed(x),k=p[x],N=k?._zod?.optin==="optional",X=k?._zod?.optout==="optional";if(v.write(`const ${P} = ${g(x)};`),N&&X)v.write(`
|
|
5
7
|
if (${P}.issues.length) {
|
|
6
|
-
if (${
|
|
8
|
+
if (${S} in input) {
|
|
7
9
|
payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
|
|
8
10
|
...iss,
|
|
9
|
-
path: iss.path ? [${
|
|
11
|
+
path: iss.path ? [${S}, ...iss.path] : [${S}]
|
|
10
12
|
})));
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
if (${P}.value === undefined) {
|
|
15
|
-
if (${
|
|
16
|
-
newResult[${
|
|
17
|
+
if (${S} in input) {
|
|
18
|
+
newResult[${S}] = undefined;
|
|
17
19
|
}
|
|
18
20
|
} else {
|
|
19
|
-
newResult[${
|
|
21
|
+
newResult[${S}] = ${P}.value;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
|
-
`);else if(!
|
|
23
|
-
const ${P}_present = ${
|
|
24
|
+
`);else if(!N)v.write(`
|
|
25
|
+
const ${P}_present = ${S} in input;
|
|
24
26
|
if (${P}.issues.length) {
|
|
25
27
|
payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
|
|
26
28
|
...iss,
|
|
27
|
-
path: iss.path ? [${
|
|
29
|
+
path: iss.path ? [${S}, ...iss.path] : [${S}]
|
|
28
30
|
})));
|
|
29
31
|
}
|
|
30
32
|
if (!${P}_present && !${P}.issues.length) {
|
|
@@ -32,59 +34,59 @@ function Va(e){if(e?.failure?.scope!=="project")return"Preview build failed";if(
|
|
|
32
34
|
code: "invalid_type",
|
|
33
35
|
expected: "nonoptional",
|
|
34
36
|
input: undefined,
|
|
35
|
-
path: [${
|
|
37
|
+
path: [${S}]
|
|
36
38
|
});
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
if (${P}_present) {
|
|
40
42
|
if (${P}.value === undefined) {
|
|
41
|
-
newResult[${
|
|
43
|
+
newResult[${S}] = undefined;
|
|
42
44
|
} else {
|
|
43
|
-
newResult[${
|
|
45
|
+
newResult[${S}] = ${P}.value;
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
`);else
|
|
49
|
+
`);else v.write(`
|
|
48
50
|
if (${P}.issues.length) {
|
|
49
51
|
payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
|
|
50
52
|
...iss,
|
|
51
|
-
path: iss.path ? [${
|
|
53
|
+
path: iss.path ? [${S}, ...iss.path] : [${S}]
|
|
52
54
|
})));
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
if (${P}.value === undefined) {
|
|
56
|
-
if (${
|
|
57
|
-
newResult[${
|
|
58
|
+
if (${S} in input) {
|
|
59
|
+
newResult[${S}] = undefined;
|
|
58
60
|
}
|
|
59
61
|
} else {
|
|
60
|
-
newResult[${
|
|
62
|
+
newResult[${S}] = ${P}.value;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
`)}g.write("payload.value = newResult;"),g.write("return payload;");let O=g.compile();return(k,P)=>O(h,k,P)},n,i=jo,a=!No.jitless,l=a&&qp.value,d=t.catchall,f;e._zod.parse=(h,g)=>{f??(f=o.value);let v=h.value;if(!i(v))return h.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),h;if(a&&l&&g?.async===!1&&g.jitless!==!0){if(!n)n=s(t.shape);if(h=n(h,g),!d)return h;return Ph([],v,h,g,f,e)}return r(h,g)}});function Dm(e,t,r,o){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let s=e.filter((n)=>!Vr(n));if(s.length===1)return t.value=s[0].value,s[0];return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map((n)=>n.issues.map((i)=>ft(i,o,Je())))}),t}var Yu=w("$ZodUnion",(e,t)=>{ae.init(e,t),oe(e._zod,"optin",()=>t.options.some((o)=>o._zod.optin==="optional")?"optional":void 0),oe(e._zod,"optout",()=>t.options.some((o)=>o._zod.optout==="optional")?"optional":void 0),oe(e._zod,"values",()=>{if(t.options.every((o)=>o._zod.values))return new Set(t.options.flatMap((o)=>Array.from(o._zod.values)));return}),oe(e._zod,"pattern",()=>{if(t.options.every((o)=>o._zod.pattern)){let o=t.options.map((s)=>s._zod.pattern);return new RegExp(`^(${o.map((s)=>Ga(s.source)).join("|")})$`)}return});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,s)=>{if(r)return r(o,s);let n=!1,i=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},s);if(c instanceof Promise)i.push(c),n=!0;else{if(c.issues.length===0)return c;i.push(c)}}if(!n)return Dm(i,o,e,s);return Promise.all(i).then((a)=>Dm(a,o,e,s))}});var Eh=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Yu.init(e,t);let r=e._zod.parse;oe(e._zod,"propValues",()=>{let s={};for(let n of t.options){let i=n._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[a,c]of Object.entries(i)){if(!s[a])s[a]=new Set;for(let l of c)s[a].add(l)}}return s});let o=mn(()=>{let s=t.options,n=new Map;for(let i of s){let a=i._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let c of a){if(n.has(c))throw Error(`Duplicate discriminator value "${String(c)}"`);n.set(c,i)}}return n});e._zod.parse=(s,n)=>{let i=s.value;if(!jo(i))return s.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),s;let a=o.value.get(i?.[t.discriminator]);if(a)return a._zod.run(s,n);if(t.unionFallback||n.direction==="backward")return r(s,n);return s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:i,path:[t.discriminator],inst:e}),s}}),$h=w("$ZodIntersection",(e,t)=>{ae.init(e,t),e._zod.parse=(r,o)=>{let s=r.value,n=t.left._zod.run({value:s,issues:[]},o),i=t.right._zod.run({value:s,issues:[]},o);if(n instanceof Promise||i instanceof Promise)return Promise.all([n,i]).then(([c,l])=>Zm(r,c,l));return Zm(r,n,i)}});function Ku(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(Fr(e)&&Fr(t)){let r=Object.keys(t),o=Object.keys(e).filter((n)=>r.indexOf(n)!==-1),s={...e,...t};for(let n of o){let i=Ku(e[n],t[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};s[n]=i.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let s=e[o],n=t[o],i=Ku(s,n);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Zm(e,t,r){let o=new Map,s;for(let a of t.issues)if(a.code==="unrecognized_keys"){s??(s=a);for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).l=!0}}else e.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys){if(!o.has(c))o.set(c,{});o.get(c).r=!0}else e.issues.push(a);let n=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(n.length&&s)e.issues.push({...s,keys:n});if(Vr(e))return e;let i=Ku(t.value,r.value);if(!i.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}var Ch=w("$ZodRecord",(e,t)=>{ae.init(e,t),e._zod.parse=(r,o)=>{let s=r.value;if(!Fr(s))return r.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),r;let n=[],i=t.keyType._zod.values;if(i){r.value={};let a=new Set;for(let l of i)if(typeof l==="string"||typeof l==="number"||typeof l==="symbol"){a.add(typeof l==="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map((g)=>ft(g,o,Je())),input:l,path:[l],inst:e});continue}let f=d.value,h=t.valueType._zod.run({value:s[l],issues:[]},o);if(h instanceof Promise)n.push(h.then((g)=>{if(g.issues.length)r.issues.push(...lr(l,g.issues));r.value[f]=g.value}));else{if(h.issues.length)r.issues.push(...lr(l,h.issues));r.value[f]=h.value}}let c;for(let l in s)if(!a.has(l))c=c??[],c.push(l);if(c&&c.length>0)r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(s)){if(a==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(s,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof a==="string"&&Vu.test(a)&&c.issues.length){let f=t.keyType._zod.run({value:Number(a),issues:[]},o);if(f instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(f.issues.length===0)c=f}if(c.issues.length){if(t.mode==="loose")r.value[a]=s[a];else r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map((f)=>ft(f,o,Je())),input:a,path:[a],inst:e});continue}let d=t.valueType._zod.run({value:s[a],issues:[]},o);if(d instanceof Promise)n.push(d.then((f)=>{if(f.issues.length)r.issues.push(...lr(a,f.issues));r.value[c.value]=f.value}));else{if(d.issues.length)r.issues.push(...lr(a,d.issues));r.value[c.value]=d.value}}}if(n.length)return Promise.all(n).then(()=>r);return r}});var Ih=w("$ZodEnum",(e,t)=>{ae.init(e,t);let r=Wa(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter((s)=>Op.has(typeof s)).map((s)=>typeof s==="string"?ur(s):s.toString()).join("|")})$`),e._zod.parse=(s,n)=>{let i=s.value;if(o.has(i))return s;return s.issues.push({code:"invalid_value",values:r,input:i,inst:e}),s}}),qh=w("$ZodLiteral",(e,t)=>{if(ae.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map((o)=>typeof o==="string"?ur(o):o?ur(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,s)=>{let n=o.value;if(r.has(n))return o;return o.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),o}});var Oh=w("$ZodTransform",(e,t)=>{ae.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new dn(e.constructor.name);let s=t.transform(r.value,r);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then((i)=>(r.value=i,r.fallback=!0,r));if(s instanceof Promise)throw new Ft;return r.value=s,r.fallback=!0,r}});function Hm(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var Xu=w("$ZodOptional",(e,t)=>{ae.init(e,t),e._zod.optin="optional",e._zod.optout="optional",oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ga(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let s=r.value,n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>Hm(i,s));return Hm(n,s)}if(r.value===void 0)return r;return t.innerType._zod.run(r,o)}}),Nh=w("$ZodExactOptional",(e,t)=>{Xu.init(e,t),oe(e._zod,"values",()=>t.innerType._zod.values),oe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),jh=w("$ZodNullable",(e,t)=>{ae.init(e,t),oe(e._zod,"optin",()=>t.innerType._zod.optin),oe(e._zod,"optout",()=>t.innerType._zod.optout),oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ga(r.source)}|null)$`):void 0}),oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>{if(r.value===null)return r;return t.innerType._zod.run(r,o)}}),Mh=w("$ZodDefault",(e,t)=>{ae.init(e,t),e._zod.optin="optional",oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let s=t.innerType._zod.run(r,o);if(s instanceof Promise)return s.then((n)=>Fm(n,t));return Fm(s,t)}});function Fm(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var Ah=w("$ZodPrefault",(e,t)=>{ae.init(e,t),e._zod.optin="optional",oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)r.value=t.defaultValue;return t.innerType._zod.run(r,o)}}),Lh=w("$ZodNonOptional",(e,t)=>{ae.init(e,t),oe(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let s=t.innerType._zod.run(r,o);if(s instanceof Promise)return s.then((n)=>Vm(n,e));return Vm(s,e)}});function Vm(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}var Uh=w("$ZodCatch",(e,t)=>{ae.init(e,t),e._zod.optin="optional",oe(e._zod,"optout",()=>t.innerType._zod.optout),oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let s=t.innerType._zod.run(r,o);if(s instanceof Promise)return s.then((n)=>{if(r.value=n.value,n.issues.length)r.value=t.catchValue({...r,error:{issues:n.issues.map((i)=>ft(i,o,Je()))},input:r.value}),r.issues=[],r.fallback=!0;return r});if(r.value=s.value,s.issues.length)r.value=t.catchValue({...r,error:{issues:s.issues.map((n)=>ft(n,o,Je()))},input:r.value}),r.issues=[],r.fallback=!0;return r}});var Qu=w("$ZodPipe",(e,t)=>{ae.init(e,t),oe(e._zod,"values",()=>t.in._zod.values),oe(e._zod,"optin",()=>t.in._zod.optin),oe(e._zod,"optout",()=>t.out._zod.optout),oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let n=t.out._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>tc(i,t.in,o));return tc(n,t.in,o)}let s=t.in._zod.run(r,o);if(s instanceof Promise)return s.then((n)=>tc(n,t.out,o));return tc(s,t.out,o)}});function tc(e,t,r){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var Dh=w("$ZodPreprocess",(e,t)=>{Qu.init(e,t)}),Zh=w("$ZodReadonly",(e,t)=>{ae.init(e,t),oe(e._zod,"propValues",()=>t.innerType._zod.propValues),oe(e._zod,"values",()=>t.innerType._zod.values),oe(e._zod,"optin",()=>t.innerType?._zod?.optin),oe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let s=t.innerType._zod.run(r,o);if(s instanceof Promise)return s.then(Bm);return Bm(s)}});function Bm(e){return e.value=Object.freeze(e.value),e}var Hh=w("$ZodLazy",(e,t)=>{ae.init(e,t),oe(e._zod,"innerType",()=>{let r=t;if(!r._cachedInner)r._cachedInner=t.getter();return r._cachedInner}),oe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),oe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),oe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),oe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),Fh=w("$ZodCustom",(e,t)=>{Ie.init(e,t),ae.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=(r)=>{let o=r.value,s=t.fn(o);if(s instanceof Promise)return s.then((n)=>Jm(n,r,o,e));Jm(s,r,o,e);return}});function Jm(e,t,r,o){if(!e){let s={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)s.params=o._zod.def.params;t.issues.push(Br(s))}}var jb=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(s){return e[s]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return(s)=>{switch(s.code){case"invalid_type":{let n=o[s.expected]??s.expected,i=Ap(s.input),a=o[i]??i;return`Invalid input: expected ${n}, received ${a}`}case"invalid_value":if(s.values.length===1)return`Invalid input: expected ${Lu(s.values[0])}`;return`Invalid option: expected one of ${Nu(s.values,"|")}`;case"too_big":{let n=s.inclusive?"<=":"<",i=t(s.origin);if(i)return`Too big: expected ${s.origin??"value"} to have ${n}${s.maximum.toString()} ${i.unit??"elements"}`;return`Too big: expected ${s.origin??"value"} to be ${n}${s.maximum.toString()}`}case"too_small":{let n=s.inclusive?">=":">",i=t(s.origin);if(i)return`Too small: expected ${s.origin} to have ${n}${s.minimum.toString()} ${i.unit}`;return`Too small: expected ${s.origin} to be ${n}${s.minimum.toString()}`}case"invalid_format":{let n=s;if(n.format==="starts_with")return`Invalid string: must start with "${n.prefix}"`;if(n.format==="ends_with")return`Invalid string: must end with "${n.suffix}"`;if(n.format==="includes")return`Invalid string: must include "${n.includes}"`;if(n.format==="regex")return`Invalid string: must match pattern ${n.pattern}`;return`Invalid ${r[n.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":""}: ${Nu(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":if(s.options&&Array.isArray(s.options)&&s.options.length>0)return`Invalid discriminator value. Expected ${s.options.map((i)=>`'${i}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function el(){return{localeError:jb()}}var Vh,Mb=Symbol("ZodOutput"),Ab=Symbol("ZodInput");class Bh{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&typeof r==="object"&&"id"in r)this._idmap.set(r.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let o={...r,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Jh(){return new Bh}(Vh=globalThis).__zod_globalRegistry??(Vh.__zod_globalRegistry=Jh());var dr=globalThis.__zod_globalRegistry;function Wh(e,t){return new e({type:"string",...H(t)})}function tl(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...H(t)})}function rl(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...H(t)})}function Kh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...H(t)})}function Gh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...H(t)})}function Yh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...H(t)})}function Xh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...H(t)})}function ol(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}function Qh(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...H(t)})}function ef(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...H(t)})}function tf(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...H(t)})}function rf(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...H(t)})}function of(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...H(t)})}function sf(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...H(t)})}function nf(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...H(t)})}function af(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...H(t)})}function cf(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...H(t)})}function uf(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...H(t)})}function lf(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...H(t)})}function df(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...H(t)})}function pf(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...H(t)})}function mf(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...H(t)})}function hf(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...H(t)})}function ff(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...H(t)})}function _f(e,t){return new e({type:"string",format:"date",check:"string_format",...H(t)})}function gf(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...H(t)})}function Sf(e,t){return new e({type:"string",format:"duration",check:"string_format",...H(t)})}function vf(e,t){return new e({type:"number",checks:[],...H(t)})}function bf(e,t){return new e({type:"number",coerce:!0,checks:[],...H(t)})}function yf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H(t)})}function wf(e,t){return new e({type:"boolean",...H(t)})}function zf(e,t){return new e({type:"undefined",...H(t)})}function Rf(e,t){return new e({type:"null",...H(t)})}function xf(e){return new e({type:"any"})}function kf(e){return new e({type:"unknown"})}function Pf(e,t){return new e({type:"never",...H(t)})}function sc(e,t){return new Bu({check:"less_than",...H(t),value:e,inclusive:!1})}function Sn(e,t){return new Bu({check:"less_than",...H(t),value:e,inclusive:!0})}function nc(e,t){return new Ju({check:"greater_than",...H(t),value:e,inclusive:!1})}function vn(e,t){return new Ju({check:"greater_than",...H(t),value:e,inclusive:!0})}function ic(e,t){return new km({check:"multiple_of",...H(t),value:e})}function ac(e,t){return new Tm({check:"max_length",...H(t),maximum:e})}function Mo(e,t){return new Em({check:"min_length",...H(t),minimum:e})}function cc(e,t){return new $m({check:"length_equals",...H(t),length:e})}function sl(e,t){return new Cm({check:"string_format",format:"regex",...H(t),pattern:e})}function nl(e){return new Im({check:"string_format",format:"lowercase",...H(e)})}function il(e){return new qm({check:"string_format",format:"uppercase",...H(e)})}function al(e,t){return new Om({check:"string_format",format:"includes",...H(t),includes:e})}function cl(e,t){return new Nm({check:"string_format",format:"starts_with",...H(t),prefix:e})}function ul(e,t){return new jm({check:"string_format",format:"ends_with",...H(t),suffix:e})}function pr(e){return new Mm({check:"overwrite",tx:e})}function ll(e){return pr((t)=>t.normalize(e))}function dl(){return pr((e)=>e.trim())}function pl(){return pr((e)=>e.toLowerCase())}function ml(){return pr((e)=>e.toUpperCase())}function hl(){return pr((e)=>Ip(e))}function Tf(e,t,r){return new e({type:"array",element:t,...H(r)})}function Ef(e,t,r){return new e({type:"custom",check:"custom",fn:t,...H(r)})}function $f(e,t){let r=Lb((o)=>(o.addIssue=(s)=>{if(typeof s==="string")o.issues.push(Br(s,o.value,r._zod.def));else{let n=s;if(n.fatal)n.continue=!1;n.code??(n.code="custom"),n.input??(n.input=o.value),n.inst??(n.inst=r),n.continue??(n.continue=!r._zod.def.abort),o.issues.push(Br(n))}},e(o.value,o)),t);return r}function Lb(e,t){let r=new Ie({check:"custom",...H(t)});return r._zod.check=e,r}function yn(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??dr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function ce(e,t,r={path:[],schemaPath:[]}){var o;let s=e._zod.def,n=t.seen.get(e);if(n){if(n.count++,r.schemaPath.includes(e))n.cycle=r.path;return n.schema}let i={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,i);let a=e._zod.toJSONSchema?.();if(a)i.schema=a;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,d);else{let h=i.schema,g=t.processors[s.type];if(!g)throw Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);g(e,t,h,d)}let f=e._zod.parent;if(f){if(!i.ref)i.ref=f;ce(f,t,d),t.seen.get(f).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(i.schema,c);if(t.io==="input"&&He(e))delete i.schema.examples,delete i.schema.default;if(t.io==="input"&&"_prefault"in i.schema)(o=i.schema).default??(o.default=i.schema._prefault);return delete i.schema._prefault,t.seen.get(e).schema}function wn(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let i of e.seen.entries()){let a=e.metadataRegistry.get(i[0])?.id;if(a){let c=o.get(a);if(c&&c!==i[0])throw Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,i[0])}}let s=(i)=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let f=e.external.registry.get(i[0])?.id,h=e.external.uri??((v)=>v);if(f)return{ref:h(f)};let g=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=g,{defId:g,ref:`${h("__shared")}#/${a}/${g}`}}if(i[1]===r)return{ref:"#"};let l=`${"#"}/${a}/`,d=i[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},n=(i)=>{if(i[1].schema.$ref)return;let a=i[1],{ref:c,defId:l}=s(i);if(a.def={...a.schema},l)a.defId=l;let d=a.schema;for(let f in d)delete d[f];d.$ref=c};if(e.cycles==="throw")for(let i of e.seen.entries()){let a=i[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
65
|
+
`)}v.write("payload.value = newResult;"),v.write("return payload;");let j=v.compile();return(x,P)=>j(p,x,P)},o,r=As,n=!Os.jitless,d=n&&s_.value,l=t.catchall,h;e._zod.parse=(p,v)=>{h??(h=s.value);let b=p.value;if(!r(b))return p.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),p;if(n&&d&&v?.async===!1&&v.jitless!==!0){if(!o)o=i(t.shape);if(p=o(p,v),!l)return p;return Yp([],b,p,v,h,e)}return a(p,v)}});function lp(e,t,a,s){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let i=e.filter((o)=>!Ja(o));if(i.length===1)return t.value=i[0].value,i[0];return t.issues.push({code:"invalid_union",input:t.value,inst:a,errors:e.map((o)=>o.issues.map((r)=>pt(r,s,We())))}),t}var hd=z("$ZodUnion",(e,t)=>{ce.init(e,t),ae(e._zod,"optin",()=>t.options.some((s)=>s._zod.optin==="optional")?"optional":void 0),ae(e._zod,"optout",()=>t.options.some((s)=>s._zod.optout==="optional")?"optional":void 0),ae(e._zod,"values",()=>{if(t.options.every((s)=>s._zod.values))return new Set(t.options.flatMap((s)=>Array.from(s._zod.values)));return}),ae(e._zod,"pattern",()=>{if(t.options.every((s)=>s._zod.pattern)){let s=t.options.map((i)=>i._zod.pattern);return new RegExp(`^(${s.map((i)=>ac(i.source)).join("|")})$`)}return});let a=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(s,i)=>{if(a)return a(s,i);let o=!1,r=[];for(let n of t.options){let u=n._zod.run({value:s.value,issues:[]},i);if(u instanceof Promise)r.push(u),o=!0;else{if(u.issues.length===0)return u;r.push(u)}}if(!o)return lp(r,s,e,i);return Promise.all(r).then((n)=>lp(n,s,e,i))}});var Qp=z("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,hd.init(e,t);let a=e._zod.parse;ae(e._zod,"propValues",()=>{let i={};for(let o of t.options){let r=o._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[n,u]of Object.entries(r)){if(!i[n])i[n]=new Set;for(let d of u)i[n].add(d)}}return i});let s=go(()=>{let i=t.options,o=new Map;for(let r of i){let n=r._zod.propValues?.[t.discriminator];if(!n||n.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let u of n){if(o.has(u))throw Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,r)}}return o});e._zod.parse=(i,o)=>{let r=i.value;if(!As(r))return i.issues.push({code:"invalid_type",expected:"object",input:r,inst:e}),i;let n=s.value.get(r?.[t.discriminator]);if(n)return n._zod.run(i,o);if(t.unionFallback||o.direction==="backward")return a(i,o);return i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(s.value.keys()),input:r,path:[t.discriminator],inst:e}),i}}),eh=z("$ZodIntersection",(e,t)=>{ce.init(e,t),e._zod.parse=(a,s)=>{let i=a.value,o=t.left._zod.run({value:i,issues:[]},s),r=t.right._zod.run({value:i,issues:[]},s);if(o instanceof Promise||r instanceof Promise)return Promise.all([o,r]).then(([u,d])=>mp(a,u,d));return mp(a,o,r)}});function _d(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(Va(e)&&Va(t)){let a=Object.keys(t),s=Object.keys(e).filter((o)=>a.indexOf(o)!==-1),i={...e,...t};for(let o of s){let r=_d(e[o],t[o]);if(!r.valid)return{valid:!1,mergeErrorPath:[o,...r.mergeErrorPath]};i[o]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let a=[];for(let s=0;s<e.length;s++){let i=e[s],o=t[s],r=_d(i,o);if(!r.valid)return{valid:!1,mergeErrorPath:[s,...r.mergeErrorPath]};a.push(r.data)}return{valid:!0,data:a}}return{valid:!1,mergeErrorPath:[]}}function mp(e,t,a){let s=new Map,i;for(let n of t.issues)if(n.code==="unrecognized_keys"){i??(i=n);for(let u of n.keys){if(!s.has(u))s.set(u,{});s.get(u).l=!0}}else e.issues.push(n);for(let n of a.issues)if(n.code==="unrecognized_keys")for(let u of n.keys){if(!s.has(u))s.set(u,{});s.get(u).r=!0}else e.issues.push(n);let o=[...s].filter(([,n])=>n.l&&n.r).map(([n])=>n);if(o.length&&i)e.issues.push({...i,keys:o});if(Ja(e))return e;let r=_d(t.value,a.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}var th=z("$ZodRecord",(e,t)=>{ce.init(e,t),e._zod.parse=(a,s)=>{let i=a.value;if(!Va(i))return a.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),a;let o=[],r=t.keyType._zod.values;if(r){a.value={};let n=new Set;for(let d of r)if(typeof d==="string"||typeof d==="number"||typeof d==="symbol"){n.add(typeof d==="number"?d.toString():d);let l=t.keyType._zod.run({value:d,issues:[]},s);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(l.issues.length){a.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map((v)=>pt(v,s,We())),input:d,path:[d],inst:e});continue}let h=l.value,p=t.valueType._zod.run({value:i[d],issues:[]},s);if(p instanceof Promise)o.push(p.then((v)=>{if(v.issues.length)a.issues.push(...la(d,v.issues));a.value[h]=v.value}));else{if(p.issues.length)a.issues.push(...la(d,p.issues));a.value[h]=p.value}}let u;for(let d in i)if(!n.has(d))u=u??[],u.push(d);if(u&&u.length>0)a.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:u})}else{a.value={};for(let n of Reflect.ownKeys(i)){if(n==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(i,n))continue;let u=t.keyType._zod.run({value:n,issues:[]},s);if(u instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof n==="string"&&ud.test(n)&&u.issues.length){let h=t.keyType._zod.run({value:Number(n),issues:[]},s);if(h instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(h.issues.length===0)u=h}if(u.issues.length){if(t.mode==="loose")a.value[n]=i[n];else a.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map((h)=>pt(h,s,We())),input:n,path:[n],inst:e});continue}let l=t.valueType._zod.run({value:i[n],issues:[]},s);if(l instanceof Promise)o.push(l.then((h)=>{if(h.issues.length)a.issues.push(...la(n,h.issues));a.value[u.value]=h.value}));else{if(l.issues.length)a.issues.push(...la(n,l.issues));a.value[u.value]=l.value}}}if(o.length)return Promise.all(o).then(()=>a);return a}});var ah=z("$ZodEnum",(e,t)=>{ce.init(e,t);let a=ec(t.entries),s=new Set(a);e._zod.values=s,e._zod.pattern=new RegExp(`^(${a.filter((i)=>i_.has(typeof i)).map((i)=>typeof i==="string"?da(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{let r=i.value;if(s.has(r))return i;return i.issues.push({code:"invalid_value",values:a,input:r,inst:e}),i}}),sh=z("$ZodLiteral",(e,t)=>{if(ce.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let a=new Set(t.values);e._zod.values=a,e._zod.pattern=new RegExp(`^(${t.values.map((s)=>typeof s==="string"?da(s):s?da(s.toString()):String(s)).join("|")})$`),e._zod.parse=(s,i)=>{let o=s.value;if(a.has(o))return s;return s.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),s}});var ih=z("$ZodTransform",(e,t)=>{ce.init(e,t),e._zod.optin="optional",e._zod.parse=(a,s)=>{if(s.direction==="backward")throw new ho(e.constructor.name);let i=t.transform(a.value,a);if(s.async)return(i instanceof Promise?i:Promise.resolve(i)).then((r)=>(a.value=r,a.fallback=!0,a));if(i instanceof Promise)throw new Ft;return a.value=i,a.fallback=!0,a}});function _p(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var fd=z("$ZodOptional",(e,t)=>{ce.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ae(e._zod,"pattern",()=>{let a=t.innerType._zod.pattern;return a?new RegExp(`^(${ac(a.source)})?$`):void 0}),e._zod.parse=(a,s)=>{if(t.innerType._zod.optin==="optional"){let i=a.value,o=t.innerType._zod.run(a,s);if(o instanceof Promise)return o.then((r)=>_p(r,i));return _p(o,i)}if(a.value===void 0)return a;return t.innerType._zod.run(a,s)}}),oh=z("$ZodExactOptional",(e,t)=>{fd.init(e,t),ae(e._zod,"values",()=>t.innerType._zod.values),ae(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(a,s)=>t.innerType._zod.run(a,s)}),rh=z("$ZodNullable",(e,t)=>{ce.init(e,t),ae(e._zod,"optin",()=>t.innerType._zod.optin),ae(e._zod,"optout",()=>t.innerType._zod.optout),ae(e._zod,"pattern",()=>{let a=t.innerType._zod.pattern;return a?new RegExp(`^(${ac(a.source)}|null)$`):void 0}),ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(a,s)=>{if(a.value===null)return a;return t.innerType._zod.run(a,s)}}),nh=z("$ZodDefault",(e,t)=>{ce.init(e,t),e._zod.optin="optional",ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(a,s)=>{if(s.direction==="backward")return t.innerType._zod.run(a,s);if(a.value===void 0)return a.value=t.defaultValue,a;let i=t.innerType._zod.run(a,s);if(i instanceof Promise)return i.then((o)=>pp(o,t));return pp(i,t)}});function pp(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var ch=z("$ZodPrefault",(e,t)=>{ce.init(e,t),e._zod.optin="optional",ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(a,s)=>{if(s.direction==="backward")return t.innerType._zod.run(a,s);if(a.value===void 0)a.value=t.defaultValue;return t.innerType._zod.run(a,s)}}),uh=z("$ZodNonOptional",(e,t)=>{ce.init(e,t),ae(e._zod,"values",()=>{let a=t.innerType._zod.values;return a?new Set([...a].filter((s)=>s!==void 0)):void 0}),e._zod.parse=(a,s)=>{let i=t.innerType._zod.run(a,s);if(i instanceof Promise)return i.then((o)=>hp(o,e));return hp(i,e)}});function hp(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}var dh=z("$ZodCatch",(e,t)=>{ce.init(e,t),e._zod.optin="optional",ae(e._zod,"optout",()=>t.innerType._zod.optout),ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(a,s)=>{if(s.direction==="backward")return t.innerType._zod.run(a,s);let i=t.innerType._zod.run(a,s);if(i instanceof Promise)return i.then((o)=>{if(a.value=o.value,o.issues.length)a.value=t.catchValue({...a,error:{issues:o.issues.map((r)=>pt(r,s,We()))},input:a.value}),a.issues=[],a.fallback=!0;return a});if(a.value=i.value,i.issues.length)a.value=t.catchValue({...a,error:{issues:i.issues.map((o)=>pt(o,s,We()))},input:a.value}),a.issues=[],a.fallback=!0;return a}});var gd=z("$ZodPipe",(e,t)=>{ce.init(e,t),ae(e._zod,"values",()=>t.in._zod.values),ae(e._zod,"optin",()=>t.in._zod.optin),ae(e._zod,"optout",()=>t.out._zod.optout),ae(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(a,s)=>{if(s.direction==="backward"){let o=t.out._zod.run(a,s);if(o instanceof Promise)return o.then((r)=>nc(r,t.in,s));return nc(o,t.in,s)}let i=t.in._zod.run(a,s);if(i instanceof Promise)return i.then((o)=>nc(o,t.out,s));return nc(i,t.out,s)}});function nc(e,t,a){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},a)}var lh=z("$ZodPreprocess",(e,t)=>{gd.init(e,t)}),mh=z("$ZodReadonly",(e,t)=>{ce.init(e,t),ae(e._zod,"propValues",()=>t.innerType._zod.propValues),ae(e._zod,"values",()=>t.innerType._zod.values),ae(e._zod,"optin",()=>t.innerType?._zod?.optin),ae(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(a,s)=>{if(s.direction==="backward")return t.innerType._zod.run(a,s);let i=t.innerType._zod.run(a,s);if(i instanceof Promise)return i.then(fp);return fp(i)}});function fp(e){return e.value=Object.freeze(e.value),e}var _h=z("$ZodLazy",(e,t)=>{ce.init(e,t),ae(e._zod,"innerType",()=>{let a=t;if(!a._cachedInner)a._cachedInner=t.getter();return a._cachedInner}),ae(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ae(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ae(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ae(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(a,s)=>e._zod.innerType._zod.run(a,s)}),ph=z("$ZodCustom",(e,t)=>{je.init(e,t),ce.init(e,t),e._zod.parse=(a,s)=>a,e._zod.check=(a)=>{let s=a.value,i=t.fn(s);if(i instanceof Promise)return i.then((o)=>gp(o,a,s,e));gp(i,a,s,e);return}});function gp(e,t,a,s){if(!e){let i={code:"custom",input:a,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};if(s._zod.def.params)i.params=s._zod.def.params;t.issues.push(Wa(i))}}var h0=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let a={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",jwt:"JWT",template_literal:"input"},s={nan:"NaN"};return(i)=>{switch(i.code){case"invalid_type":{let o=s[i.expected]??i.expected,r=c_(i.input),n=s[r]??r;return`Invalid input: expected ${o}, received ${n}`}case"invalid_value":if(i.values.length===1)return`Invalid input: expected ${sd(i.values[0])}`;return`Invalid option: expected one of ${Qu(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",r=t(i.origin);if(r)return`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${r.unit??"elements"}`;return`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",r=t(i.origin);if(r)return`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${r.unit}`;return`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;if(o.format==="starts_with")return`Invalid string: must start with "${o.prefix}"`;if(o.format==="ends_with")return`Invalid string: must end with "${o.suffix}"`;if(o.format==="includes")return`Invalid string: must include "${o.includes}"`;if(o.format==="regex")return`Invalid string: must match pattern ${o.pattern}`;return`Invalid ${a[o.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${Qu(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":if(i.options&&Array.isArray(i.options)&&i.options.length>0)return`Invalid discriminator value. Expected ${i.options.map((r)=>`'${r}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function vd(){return{localeError:h0()}}var hh,f0=Symbol("ZodOutput"),g0=Symbol("ZodInput");class fh{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let a=t[0];if(this._map.set(e,a),a&&typeof a==="object"&&"id"in a)this._idmap.set(a.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let a={...this.get(t)??{}};delete a.id;let s={...a,...this._map.get(e)};return Object.keys(s).length?s:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function gh(){return new fh}(hh=globalThis).__zod_globalRegistry??(hh.__zod_globalRegistry=gh());var ma=globalThis.__zod_globalRegistry;function vh(e,t){return new e({type:"string",...Z(t)})}function wd(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Z(t)})}function bd(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Z(t)})}function wh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Z(t)})}function bh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Z(t)})}function yh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Z(t)})}function kh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Z(t)})}function yd(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}function zh(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Z(t)})}function Sh(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Z(t)})}function xh(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Z(t)})}function Rh(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Z(t)})}function qh(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Z(t)})}function jh(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Z(t)})}function Ph(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Z(t)})}function Th(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Z(t)})}function Ch(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Z(t)})}function Eh(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Z(t)})}function $h(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Z(t)})}function Mh(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Z(t)})}function Nh(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Z(t)})}function Ih(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Z(t)})}function Oh(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Z(t)})}function Ah(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Z(t)})}function Lh(e,t){return new e({type:"string",format:"date",check:"string_format",...Z(t)})}function Uh(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Z(t)})}function Dh(e,t){return new e({type:"string",format:"duration",check:"string_format",...Z(t)})}function Zh(e,t){return new e({type:"number",checks:[],...Z(t)})}function Bh(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}function Hh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(t)})}function Fh(e,t){return new e({type:"boolean",...Z(t)})}function Vh(e,t){return new e({type:"undefined",...Z(t)})}function Jh(e,t){return new e({type:"null",...Z(t)})}function Wh(e){return new e({type:"any"})}function Gh(e){return new e({type:"unknown"})}function Kh(e,t){return new e({type:"never",...Z(t)})}function dc(e,t){return new dd({check:"less_than",...Z(t),value:e,inclusive:!1})}function ko(e,t){return new dd({check:"less_than",...Z(t),value:e,inclusive:!0})}function lc(e,t){return new ld({check:"greater_than",...Z(t),value:e,inclusive:!1})}function zo(e,t){return new ld({check:"greater_than",...Z(t),value:e,inclusive:!0})}function mc(e,t){return new K_({check:"multiple_of",...Z(t),value:e})}function _c(e,t){return new X_({check:"max_length",...Z(t),maximum:e})}function Ls(e,t){return new Q_({check:"min_length",...Z(t),minimum:e})}function pc(e,t){return new ep({check:"length_equals",...Z(t),length:e})}function kd(e,t){return new tp({check:"string_format",format:"regex",...Z(t),pattern:e})}function zd(e){return new ap({check:"string_format",format:"lowercase",...Z(e)})}function Sd(e){return new sp({check:"string_format",format:"uppercase",...Z(e)})}function xd(e,t){return new ip({check:"string_format",format:"includes",...Z(t),includes:e})}function Rd(e,t){return new op({check:"string_format",format:"starts_with",...Z(t),prefix:e})}function qd(e,t){return new rp({check:"string_format",format:"ends_with",...Z(t),suffix:e})}function _a(e){return new np({check:"overwrite",tx:e})}function jd(e){return _a((t)=>t.normalize(e))}function Pd(){return _a((e)=>e.trim())}function Td(){return _a((e)=>e.toLowerCase())}function Cd(){return _a((e)=>e.toUpperCase())}function Ed(){return _a((e)=>a_(e))}function Yh(e,t,a){return new e({type:"array",element:t,...Z(a)})}function Xh(e,t,a){return new e({type:"custom",check:"custom",fn:t,...Z(a)})}function Qh(e,t){let a=v0((s)=>(s.addIssue=(i)=>{if(typeof i==="string")s.issues.push(Wa(i,s.value,a._zod.def));else{let o=i;if(o.fatal)o.continue=!1;o.code??(o.code="custom"),o.input??(o.input=s.value),o.inst??(o.inst=a),o.continue??(o.continue=!a._zod.def.abort),s.issues.push(Wa(o))}},e(s.value,s)),t);return a}function v0(e,t){let a=new je({check:"custom",...Z(t)});return a._zod.check=e,a}function xo(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??ma,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function ue(e,t,a={path:[],schemaPath:[]}){var s;let i=e._zod.def,o=t.seen.get(e);if(o){if(o.count++,a.schemaPath.includes(e))o.cycle=a.path;return o.schema}let r={schema:{},count:1,cycle:void 0,path:a.path};t.seen.set(e,r);let n=e._zod.toJSONSchema?.();if(n)r.schema=n;else{let l={...a,schemaPath:[...a.schemaPath,e],path:a.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,r.schema,l);else{let p=r.schema,v=t.processors[i.type];if(!v)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);v(e,t,p,l)}let h=e._zod.parent;if(h){if(!r.ref)r.ref=h;ue(h,t,l),t.seen.get(h).isParent=!0}}let u=t.metadataRegistry.get(e);if(u)Object.assign(r.schema,u);if(t.io==="input"&&De(e))delete r.schema.examples,delete r.schema.default;if(t.io==="input"&&"_prefault"in r.schema)(s=r.schema).default??(s.default=r.schema._prefault);return delete r.schema._prefault,t.seen.get(e).schema}function Ro(e,t){let a=e.seen.get(t);if(!a)throw Error("Unprocessed schema. This is a bug in Zod.");let s=new Map;for(let r of e.seen.entries()){let n=e.metadataRegistry.get(r[0])?.id;if(n){let u=s.get(n);if(u&&u!==r[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(n,r[0])}}let i=(r)=>{let n=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let h=e.external.registry.get(r[0])?.id,p=e.external.uri??((b)=>b);if(h)return{ref:p(h)};let v=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=v,{defId:v,ref:`${p("__shared")}#/${n}/${v}`}}if(r[1]===a)return{ref:"#"};let d=`${"#"}/${n}/`,l=r[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:d+l}},o=(r)=>{if(r[1].schema.$ref)return;let n=r[1],{ref:u,defId:d}=i(r);if(n.def={...n.schema},d)n.defId=d;let l=n.schema;for(let h in l)delete l[h];l.$ref=u};if(e.cycles==="throw")for(let r of e.seen.entries()){let n=r[1];if(n.cycle)throw Error(`Cycle detected: #/${n.cycle?.join("/")}/<root>
|
|
64
66
|
|
|
65
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let a=i[1];if(t===i[0]){n(i);continue}if(e.external){let l=e.external.registry.get(i[0])?.id;if(t!==i[0]&&l){n(i);continue}}if(e.metadataRegistry.get(i[0])?.id){n(i);continue}if(a.cycle){n(i);continue}if(a.count>1){if(e.reused==="ref"){n(i);continue}}}}function zn(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let o=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let l=c.def??c.schema,d={...l},f=c.ref;if(c.ref=null,f){o(f);let g=e.seen.get(f),v=g.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))l.allOf=l.allOf??[],l.allOf.push(v);else Object.assign(l,v);if(Object.assign(l,d),a._zod.parent===f)for(let y in l){if(y==="$ref"||y==="allOf")continue;if(!(y in d))delete l[y]}if(v.$ref&&g.def)for(let y in l){if(y==="$ref"||y==="allOf")continue;if(y in g.def&&JSON.stringify(l[y])===JSON.stringify(g.def[y]))delete l[y]}}let h=a._zod.parent;if(h&&h!==f){o(h);let g=e.seen.get(h);if(g?.schema.$ref){if(l.$ref=g.schema.$ref,g.def)for(let v in l){if(v==="$ref"||v==="allOf")continue;if(v in g.def&&JSON.stringify(l[v])===JSON.stringify(g.def[v]))delete l[v]}}}e.override({zodSchema:a,jsonSchema:l,path:c.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let s={};if(e.target==="draft-2020-12")s.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")s.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")s.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error("Schema is missing an `id` property");s.$id=e.external.uri(a)}Object.assign(s,r.def??r.schema);let n=e.metadataRegistry.get(t)?.id;if(n!==void 0&&s.id===n)delete s.id;let i=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;i[c.defId]=c.def}}if(e.external);else if(Object.keys(i).length>0)if(e.target==="draft-2020-12")s.$defs=i;else s.definitions=i;try{let a=JSON.parse(JSON.stringify(s));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:bn(t,"input",e.processors),output:bn(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error("Error converting schema to JSON.")}}function He(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return He(o.element,r);if(o.type==="set")return He(o.valueType,r);if(o.type==="lazy")return He(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return He(o.innerType,r);if(o.type==="intersection")return He(o.left,r)||He(o.right,r);if(o.type==="record"||o.type==="map")return He(o.keyType,r)||He(o.valueType,r);if(o.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return He(o.in,r)||He(o.out,r)}if(o.type==="object"){for(let s in o.shape)if(He(o.shape[s],r))return!0;return!1}if(o.type==="union"){for(let s of o.options)if(He(s,r))return!0;return!1}if(o.type==="tuple"){for(let s of o.items)if(He(s,r))return!0;if(o.rest&&He(o.rest,r))return!0;return!1}return!1}var Cf=(e,t={})=>(r)=>{let o=yn({...r,processors:t});return ce(e,o),wn(o,e),zn(o,e)},bn=(e,t,r={})=>(o)=>{let{libraryOptions:s,target:n}=o??{},i=yn({...s??{},target:n,io:t,processors:r});return ce(e,i),wn(i,e),zn(i,e)};var Ub={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fl=(e,t,r,o)=>{let s=r;s.type="string";let{minimum:n,maximum:i,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof n==="number")s.minLength=n;if(typeof i==="number")s.maxLength=i;if(a){if(s.format=Ub[a]??a,s.format==="")delete s.format;if(a==="time")delete s.format}if(l)s.contentEncoding=l;if(c&&c.size>0){let d=[...c];if(d.length===1)s.pattern=d[0].source;else if(d.length>1)s.allOf=[...d.map((f)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))]}},_l=(e,t,r,o)=>{let s=r,{minimum:n,maximum:i,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;if(typeof a==="string"&&a.includes("int"))s.type="integer";else s.type="number";let f=typeof d==="number"&&d>=(n??Number.NEGATIVE_INFINITY),h=typeof l==="number"&&l<=(i??Number.POSITIVE_INFINITY),g=t.target==="draft-04"||t.target==="openapi-3.0";if(f)if(g)s.minimum=d,s.exclusiveMinimum=!0;else s.exclusiveMinimum=d;else if(typeof n==="number")s.minimum=n;if(h)if(g)s.maximum=l,s.exclusiveMaximum=!0;else s.exclusiveMaximum=l;else if(typeof i==="number")s.maximum=i;if(typeof c==="number")s.multipleOf=c},gl=(e,t,r,o)=>{r.type="boolean"},qf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Of=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},Sl=(e,t,r,o)=>{if(t.target==="openapi-3.0")r.type="string",r.nullable=!0,r.enum=[null];else r.type="null"},vl=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},Nf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},bl=(e,t,r,o)=>{r.not={}},yl=(e,t,r,o)=>{},wl=(e,t,r,o)=>{},jf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},zl=(e,t,r,o)=>{let s=e._zod.def,n=Wa(s.entries);if(n.every((i)=>typeof i==="number"))r.type="number";if(n.every((i)=>typeof i==="string"))r.type="string";r.enum=n},Rl=(e,t,r,o)=>{let s=e._zod.def,n=[];for(let i of s.values)if(i===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i==="bigint")if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else n.push(Number(i));else n.push(i);if(n.length===0);else if(n.length===1){let i=n[0];if(r.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0")r.enum=[i];else r.const=i}else{if(n.every((i)=>typeof i==="number"))r.type="number";if(n.every((i)=>typeof i==="string"))r.type="string";if(n.every((i)=>typeof i==="boolean"))r.type="boolean";if(n.every((i)=>i===null))r.type="null";r.enum=n}},Mf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},Af=(e,t,r,o)=>{let s=r,n=e._zod.pattern;if(!n)throw Error("Pattern not found in template literal");s.type="string",s.pattern=n.source},Lf=(e,t,r,o)=>{let s=r,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:a,mime:c}=e._zod.bag;if(i!==void 0)n.minLength=i;if(a!==void 0)n.maxLength=a;if(c)if(c.length===1)n.contentMediaType=c[0],Object.assign(s,n);else Object.assign(s,n),s.anyOf=c.map((l)=>({contentMediaType:l}));else Object.assign(s,n)},Uf=(e,t,r,o)=>{r.type="boolean"},xl=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},Df=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},kl=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},Zf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},Hf=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},Pl=(e,t,r,o)=>{let s=r,n=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;if(typeof i==="number")s.minItems=i;if(typeof a==="number")s.maxItems=a;s.type="array",s.items=ce(n.element,t,{...o,path:[...o.path,"items"]})},Tl=(e,t,r,o)=>{let s=r,n=e._zod.def;s.type="object",s.properties={};let i=n.shape;for(let l in i)s.properties[l]=ce(i[l],t,{...o,path:[...o.path,"properties",l]});let a=new Set(Object.keys(i)),c=new Set([...a].filter((l)=>{let d=n.shape[l]._zod;if(t.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(c.size>0)s.required=Array.from(c);if(n.catchall?._zod.def.type==="never")s.additionalProperties=!1;else if(!n.catchall){if(t.io==="output")s.additionalProperties=!1}else if(n.catchall)s.additionalProperties=ce(n.catchall,t,{...o,path:[...o.path,"additionalProperties"]})},El=(e,t,r,o)=>{let s=e._zod.def,n=s.inclusive===!1,i=s.options.map((a,c)=>ce(a,t,{...o,path:[...o.path,n?"oneOf":"anyOf",c]}));if(n)r.oneOf=i;else r.anyOf=i},$l=(e,t,r,o)=>{let s=e._zod.def,n=ce(s.left,t,{...o,path:[...o.path,"allOf",0]}),i=ce(s.right,t,{...o,path:[...o.path,"allOf",1]}),a=(l)=>("allOf"in l)&&Object.keys(l).length===1,c=[...a(n)?n.allOf:[n],...a(i)?i.allOf:[i]];r.allOf=c},Ff=(e,t,r,o)=>{let s=r,n=e._zod.def;s.type="array";let i=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",c=n.items.map((h,g)=>ce(h,t,{...o,path:[...o.path,i,g]})),l=n.rest?ce(n.rest,t,{...o,path:[...o.path,a,...t.target==="openapi-3.0"?[n.items.length]:[]]}):null;if(t.target==="draft-2020-12"){if(s.prefixItems=c,l)s.items=l}else if(t.target==="openapi-3.0"){if(s.items={anyOf:c},l)s.items.anyOf.push(l);if(s.minItems=c.length,!l)s.maxItems=c.length}else if(s.items=c,l)s.additionalItems=l;let{minimum:d,maximum:f}=e._zod.bag;if(typeof d==="number")s.minItems=d;if(typeof f==="number")s.maxItems=f},Cl=(e,t,r,o)=>{let s=r,n=e._zod.def;s.type="object";let i=n.keyType,c=i._zod.bag?.patterns;if(n.mode==="loose"&&c&&c.size>0){let d=ce(n.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});s.patternProperties={};for(let f of c)s.patternProperties[f.source]=d}else{if(t.target==="draft-07"||t.target==="draft-2020-12")s.propertyNames=ce(n.keyType,t,{...o,path:[...o.path,"propertyNames"]});s.additionalProperties=ce(n.valueType,t,{...o,path:[...o.path,"additionalProperties"]})}let l=i._zod.values;if(l){let d=[...l].filter((f)=>typeof f==="string"||typeof f==="number");if(d.length>0)s.required=d}},Il=(e,t,r,o)=>{let s=e._zod.def,n=ce(s.innerType,t,o),i=t.seen.get(e);if(t.target==="openapi-3.0")i.ref=s.innerType,r.nullable=!0;else r.anyOf=[n,{type:"null"}]},ql=(e,t,r,o)=>{let s=e._zod.def;ce(s.innerType,t,o);let n=t.seen.get(e);n.ref=s.innerType},Ol=(e,t,r,o)=>{let s=e._zod.def;ce(s.innerType,t,o);let n=t.seen.get(e);n.ref=s.innerType,r.default=JSON.parse(JSON.stringify(s.defaultValue))},Nl=(e,t,r,o)=>{let s=e._zod.def;ce(s.innerType,t,o);let n=t.seen.get(e);if(n.ref=s.innerType,t.io==="input")r._prefault=JSON.parse(JSON.stringify(s.defaultValue))},jl=(e,t,r,o)=>{let s=e._zod.def;ce(s.innerType,t,o);let n=t.seen.get(e);n.ref=s.innerType;let i;try{i=s.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}r.default=i},Ml=(e,t,r,o)=>{let s=e._zod.def,n=s.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?n?s.out:s.in:s.out;ce(i,t,o);let a=t.seen.get(e);a.ref=i},Al=(e,t,r,o)=>{let s=e._zod.def;ce(s.innerType,t,o);let n=t.seen.get(e);n.ref=s.innerType,r.readOnly=!0},Vf=(e,t,r,o)=>{let s=e._zod.def;ce(s.innerType,t,o);let n=t.seen.get(e);n.ref=s.innerType},uc=(e,t,r,o)=>{let s=e._zod.def;ce(s.innerType,t,o);let n=t.seen.get(e);n.ref=s.innerType},Ll=(e,t,r,o)=>{let s=e._zod.innerType;ce(s,t,o);let n=t.seen.get(e);n.ref=s},If={string:fl,number:_l,boolean:gl,bigint:qf,symbol:Of,null:Sl,undefined:vl,void:Nf,never:bl,any:yl,unknown:wl,date:jf,enum:zl,literal:Rl,nan:Mf,template_literal:Af,file:Lf,success:Uf,custom:xl,function:Df,transform:kl,map:Zf,set:Hf,array:Pl,object:Tl,union:El,intersection:$l,tuple:Ff,record:Cl,nullable:Il,nonoptional:ql,default:Ol,prefault:Nl,catch:jl,pipe:Ml,readonly:Al,promise:Vf,optional:uc,lazy:Ll};function lc(e,t){if("_idmap"in e){let o=e,s=yn({...t,processors:If}),n={};for(let c of o._idmap.entries()){let[l,d]=c;ce(d,s)}let i={},a={registry:o,uri:t?.uri,defs:n};s.external=a;for(let c of o._idmap.entries()){let[l,d]=c;wn(s,d),i[l]=zn(s,d)}if(Object.keys(n).length>0){let c=s.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[c]:n}}return{schemas:i}}let r=yn({...t,processors:If});return ce(e,r),wn(r,e),zn(r,e)}var Wb=w("ZodISODateTime",(e,t)=>{nh.init(e,t),fe.init(e,t)});function Lo(e){return ff(Wb,e)}var Kb=w("ZodISODate",(e,t)=>{ih.init(e,t),fe.init(e,t)});function Ul(e){return _f(Kb,e)}var Gb=w("ZodISOTime",(e,t)=>{ah.init(e,t),fe.init(e,t)});function Bf(e){return gf(Gb,e)}var Yb=w("ZodISODuration",(e,t)=>{ch.init(e,t),fe.init(e,t)});function Jf(e){return Sf(Yb,e)}var Xb=(e,t)=>{Xa.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(r)=>Zu(e,r)},flatten:{value:(r)=>Du(e,r)},addIssue:{value:(r)=>{e.issues.push(r),e.message=JSON.stringify(e.issues,pn,2)}},addIssues:{value:(r)=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,pn,2)}},isEmpty:{get(){return e.issues.length===0}}})};var tt=w("ZodError",Xb,{Parent:Error});var Kf=Qa(tt),Gf=ec(tt),pc=hn(tt),Yf=fn(tt),Xf=Zp(tt),Qf=Hp(tt),e_=Fp(tt),t_=Vp(tt),r_=Bp(tt),o_=Jp(tt),s_=Wp(tt),n_=Kp(tt);var i_=new WeakMap;function Rn(e,t,r){let o=Object.getPrototypeOf(e),s=i_.get(o);if(!s)s=new Set,i_.set(o,s);if(s.has(t))return;s.add(t);for(let n in r){let i=r[n];Object.defineProperty(o,n,{configurable:!0,enumerable:!1,get(){let a=i.bind(this);return Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var ue=w("ZodType",(e,t)=>(ae.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:bn(e,"input"),output:bn(e,"output")}}),e.toJSONSchema=Cf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>Kf(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>pc(e,r,o),e.parseAsync=async(r,o)=>Gf(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Yf(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Xf(e,r,o),e.decode=(r,o)=>Qf(e,r,o),e.encodeAsync=async(r,o)=>e_(e,r,o),e.decodeAsync=async(r,o)=>t_(e,r,o),e.safeEncode=(r,o)=>r_(e,r,o),e.safeDecode=(r,o)=>o_(e,r,o),e.safeEncodeAsync=async(r,o)=>s_(e,r,o),e.safeDecodeAsync=async(r,o)=>n_(e,r,o),Rn(e,"ZodType",{check(...r){let o=this.def;return this.clone(cr(o,{checks:[...o.checks??[],...r.map((s)=>typeof s==="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return ht(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(Dy(r,o))},superRefine(r,o){return this.check(Zy(r,o))},overwrite(r){return this.check(pr(r))},optional(){return F(this)},exactOptional(){return Py(this)},nullable(){return l_(this)},nullish(){return F(l_(this))},nonoptional(r){return qy(this,r)},array(){return b(this)},or(r){return q([this,r])},and(r){return Vt(this,r)},transform(r){return d_(this,b_(r))},default(r){return $y(this,r)},prefault(r){return Iy(this,r)},catch(r){return Ny(this,r)},pipe(r){return d_(this,r)},readonly(){return Ay(this)},describe(r){let o=this.clone();return dr.add(o,{description:r}),o},meta(...r){if(r.length===0)return dr.get(this);let o=this.clone();return dr.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return dr.get(e)?.description},configurable:!0}),e)),p_=w("_ZodString",(e,t)=>{oc.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,s,n)=>fl(e,o,s,n);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Rn(e,"_ZodString",{regex(...o){return this.check(sl(...o))},includes(...o){return this.check(al(...o))},startsWith(...o){return this.check(cl(...o))},endsWith(...o){return this.check(ul(...o))},min(...o){return this.check(Mo(...o))},max(...o){return this.check(ac(...o))},length(...o){return this.check(cc(...o))},nonempty(...o){return this.check(Mo(1,...o))},lowercase(o){return this.check(nl(o))},uppercase(o){return this.check(il(o))},trim(){return this.check(dl())},normalize(...o){return this.check(ll(...o))},toLowerCase(){return this.check(pl())},toUpperCase(){return this.check(ml())},slugify(){return this.check(hl())}})}),m_=w("ZodString",(e,t)=>{oc.init(e,t),p_.init(e,t),e.email=(r)=>e.check(tl(h_,r)),e.url=(r)=>e.check(ol(__,r)),e.jwt=(r)=>e.check(hf(hy,r)),e.emoji=(r)=>e.check(Qh(ey,r)),e.guid=(r)=>e.check(rl(a_,r)),e.uuid=(r)=>e.check(Kh(mc,r)),e.uuidv4=(r)=>e.check(Gh(mc,r)),e.uuidv6=(r)=>e.check(Yh(mc,r)),e.uuidv7=(r)=>e.check(Xh(mc,r)),e.nanoid=(r)=>e.check(ef(ty,r)),e.guid=(r)=>e.check(rl(a_,r)),e.cuid=(r)=>e.check(tf(ry,r)),e.cuid2=(r)=>e.check(rf(oy,r)),e.ulid=(r)=>e.check(of(sy,r)),e.base64=(r)=>e.check(df(dy,r)),e.base64url=(r)=>e.check(pf(py,r)),e.xid=(r)=>e.check(sf(ny,r)),e.ksuid=(r)=>e.check(nf(iy,r)),e.ipv4=(r)=>e.check(af(ay,r)),e.ipv6=(r)=>e.check(cf(cy,r)),e.cidrv4=(r)=>e.check(uf(uy,r)),e.cidrv6=(r)=>e.check(lf(ly,r)),e.e164=(r)=>e.check(mf(my,r)),e.datetime=(r)=>e.check(Lo(r)),e.date=(r)=>e.check(Ul(r)),e.time=(r)=>e.check(Bf(r)),e.duration=(r)=>e.check(Jf(r))});function u(e){return Wh(m_,e)}var fe=w("ZodStringFormat",(e,t)=>{pe.init(e,t),p_.init(e,t)}),h_=w("ZodEmail",(e,t)=>{Gm.init(e,t),fe.init(e,t)});function f_(e){return tl(h_,e)}var a_=w("ZodGUID",(e,t)=>{Wm.init(e,t),fe.init(e,t)});var mc=w("ZodUUID",(e,t)=>{Km.init(e,t),fe.init(e,t)});var __=w("ZodURL",(e,t)=>{Ym.init(e,t),fe.init(e,t)});function hc(e){return ol(__,e)}var ey=w("ZodEmoji",(e,t)=>{Xm.init(e,t),fe.init(e,t)});var ty=w("ZodNanoID",(e,t)=>{Qm.init(e,t),fe.init(e,t)});var ry=w("ZodCUID",(e,t)=>{eh.init(e,t),fe.init(e,t)});var oy=w("ZodCUID2",(e,t)=>{th.init(e,t),fe.init(e,t)});var sy=w("ZodULID",(e,t)=>{rh.init(e,t),fe.init(e,t)});var ny=w("ZodXID",(e,t)=>{oh.init(e,t),fe.init(e,t)});var iy=w("ZodKSUID",(e,t)=>{sh.init(e,t),fe.init(e,t)});var ay=w("ZodIPv4",(e,t)=>{uh.init(e,t),fe.init(e,t)});var cy=w("ZodIPv6",(e,t)=>{lh.init(e,t),fe.init(e,t)});var uy=w("ZodCIDRv4",(e,t)=>{dh.init(e,t),fe.init(e,t)});var ly=w("ZodCIDRv6",(e,t)=>{ph.init(e,t),fe.init(e,t)});var dy=w("ZodBase64",(e,t)=>{hh.init(e,t),fe.init(e,t)});var py=w("ZodBase64URL",(e,t)=>{fh.init(e,t),fe.init(e,t)});var my=w("ZodE164",(e,t)=>{_h.init(e,t),fe.init(e,t)});var hy=w("ZodJWT",(e,t)=>{gh.init(e,t),fe.init(e,t)});var fc=w("ZodNumber",(e,t)=>{Gu.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,s,n)=>_l(e,o,s,n),Rn(e,"ZodNumber",{gt(o,s){return this.check(nc(o,s))},gte(o,s){return this.check(vn(o,s))},min(o,s){return this.check(vn(o,s))},lt(o,s){return this.check(sc(o,s))},lte(o,s){return this.check(Sn(o,s))},max(o,s){return this.check(Sn(o,s))},int(o){return this.check(c_(o))},safe(o){return this.check(c_(o))},positive(o){return this.check(nc(0,o))},nonnegative(o){return this.check(vn(0,o))},negative(o){return this.check(sc(0,o))},nonpositive(o){return this.check(Sn(0,o))},multipleOf(o,s){return this.check(ic(o,s))},step(o,s){return this.check(ic(o,s))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??0.5),e.isFinite=!0,e.format=r.format??null});function x(e){return vf(fc,e)}var fy=w("ZodNumberFormat",(e,t)=>{Sh.init(e,t),fc.init(e,t)});function c_(e){return yf(fy,e)}var g_=w("ZodBoolean",(e,t)=>{vh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>gl(e,r,o,s)});function I(e){return wf(g_,e)}var _y=w("ZodUndefined",(e,t)=>{bh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>vl(e,r,o,s)});function Zl(e){return zf(_y,e)}var gy=w("ZodNull",(e,t)=>{yh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Sl(e,r,o,s)});function Jr(e){return Rf(gy,e)}var Sy=w("ZodAny",(e,t)=>{wh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>yl(e,r,o,s)});function _c(){return xf(Sy)}var vy=w("ZodUnknown",(e,t)=>{zh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>wl(e,r,o,s)});function D(){return kf(vy)}var by=w("ZodNever",(e,t)=>{Rh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>bl(e,r,o,s)});function Hl(e){return Pf(by,e)}var yy=w("ZodArray",(e,t)=>{xh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Pl(e,r,o,s),e.element=t.element,Rn(e,"ZodArray",{min(r,o){return this.check(Mo(r,o))},nonempty(r){return this.check(Mo(1,r))},max(r,o){return this.check(ac(r,o))},length(r,o){return this.check(cc(r,o))},unwrap(){return this.element}})});function b(e,t){return Tf(yy,e,t)}var S_=w("ZodObject",(e,t)=>{Th.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Tl(e,r,o,s),oe(e,"shape",()=>t.shape),Rn(e,"ZodObject",{keyof(){return Y(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:D()})},loose(){return this.clone({...this._zod.def,catchall:D()})},strict(){return this.clone({...this._zod.def,catchall:Hl()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return kb(this,r)},safeExtend(r){return Pb(this,r)},merge(r){return Tb(this,r)},pick(r){return Rb(this,r)},omit(r){return xb(this,r)},partial(...r){return Eb(y_,this,r[0])},required(...r){return $b(w_,this,r[0])}})});function p(e,t){let r={type:"object",shape:e??{},...H(t)};return new S_(r)}function V(e,t){return new S_({type:"object",shape:e,catchall:D(),...H(t)})}var v_=w("ZodUnion",(e,t)=>{Yu.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>El(e,r,o,s),e.options=t.options});function q(e,t){return new v_({type:"union",options:e,...H(t)})}var wy=w("ZodDiscriminatedUnion",(e,t)=>{v_.init(e,t),Eh.init(e,t)});function Uo(e,t,r){return new wy({type:"union",options:t,discriminator:e,...H(r)})}var zy=w("ZodIntersection",(e,t)=>{$h.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>$l(e,r,o,s)});function Vt(e,t){return new zy({type:"intersection",left:e,right:t})}var u_=w("ZodRecord",(e,t)=>{Ch.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Cl(e,r,o,s),e.keyType=t.keyType,e.valueType=t.valueType});function C(e,t,r){if(!t||!t._zod)return new u_({type:"record",keyType:u(),valueType:e,...H(t)});return new u_({type:"record",keyType:e,valueType:t,...H(r)})}var Dl=w("ZodEnum",(e,t)=>{Ih.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,s,n)=>zl(e,o,s,n),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,s)=>{let n={};for(let i of o)if(r.has(i))n[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new Dl({...t,checks:[],...H(s),entries:n})},e.exclude=(o,s)=>{let n={...t.entries};for(let i of o)if(r.has(i))delete n[i];else throw Error(`Key ${i} not found in enum`);return new Dl({...t,checks:[],...H(s),entries:n})}});function Y(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new Dl({type:"enum",entries:r,...H(t)})}var Ry=w("ZodLiteral",(e,t)=>{qh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Rl(e,r,o,s),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function m(e,t){return new Ry({type:"literal",values:Array.isArray(e)?e:[e],...H(t)})}var xy=w("ZodTransform",(e,t)=>{Oh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>kl(e,r,o,s),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new dn(e.constructor.name);r.addIssue=(n)=>{if(typeof n==="string")r.issues.push(Br(n,r.value,t));else{let i=n;if(i.fatal)i.continue=!1;i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(Br(i))}};let s=t.transform(r.value,r);if(s instanceof Promise)return s.then((n)=>(r.value=n,r.fallback=!0,r));return r.value=s,r.fallback=!0,r}});function b_(e){return new xy({type:"transform",transform:e})}var y_=w("ZodOptional",(e,t)=>{Xu.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>uc(e,r,o,s),e.unwrap=()=>e._zod.def.innerType});function F(e){return new y_({type:"optional",innerType:e})}var ky=w("ZodExactOptional",(e,t)=>{Nh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>uc(e,r,o,s),e.unwrap=()=>e._zod.def.innerType});function Py(e){return new ky({type:"optional",innerType:e})}var Ty=w("ZodNullable",(e,t)=>{jh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Il(e,r,o,s),e.unwrap=()=>e._zod.def.innerType});function l_(e){return new Ty({type:"nullable",innerType:e})}var Ey=w("ZodDefault",(e,t)=>{Mh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Ol(e,r,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $y(e,t){return new Ey({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():Au(t)}})}var Cy=w("ZodPrefault",(e,t)=>{Ah.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Nl(e,r,o,s),e.unwrap=()=>e._zod.def.innerType});function Iy(e,t){return new Cy({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():Au(t)}})}var w_=w("ZodNonOptional",(e,t)=>{Lh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>ql(e,r,o,s),e.unwrap=()=>e._zod.def.innerType});function qy(e,t){return new w_({type:"nonoptional",innerType:e,...H(t)})}var Oy=w("ZodCatch",(e,t)=>{Uh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>jl(e,r,o,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ny(e,t){return new Oy({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}var z_=w("ZodPipe",(e,t)=>{Qu.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Ml(e,r,o,s),e.in=t.in,e.out=t.out});function d_(e,t){return new z_({type:"pipe",in:e,out:t})}var jy=w("ZodPreprocess",(e,t)=>{z_.init(e,t),Dh.init(e,t)}),My=w("ZodReadonly",(e,t)=>{Zh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Al(e,r,o,s),e.unwrap=()=>e._zod.def.innerType});function Ay(e){return new My({type:"readonly",innerType:e})}var Ly=w("ZodLazy",(e,t)=>{Hh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>Ll(e,r,o,s),e.unwrap=()=>e._zod.def.getter()});function xn(e){return new Ly({type:"lazy",getter:e})}var Uy=w("ZodCustom",(e,t)=>{Fh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,s)=>xl(e,r,o,s)});function Dy(e,t={}){return Ef(Uy,e,t)}function Zy(e,t){return $f(e,t)}function Wr(e,t){return new jy({type:"pipe",in:b_(e),out:t})}var x_={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};var R_;(function(e){})(R_||(R_={}));function Hy(e){return bf(fc,e)}Je(el());var Kr="2025-11-25";var gc=[Kr,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Sc="io.modelcontextprotocol/related-task",Jt="io.modelcontextprotocol/protocolVersion",Do="io.modelcontextprotocol/clientInfo",It="io.modelcontextprotocol/serverInfo",Gr="io.modelcontextprotocol/clientCapabilities",Zo="io.modelcontextprotocol/subscriptionId",Ho="io.modelcontextprotocol/logLevel";var Yr="2.0";var Bt=xn(()=>q([u(),x(),I(),Jr(),C(u(),Bt),b(Bt)])),ge=C(u(),Bt),vc=b(Bt),Fo=q([u(),x().int()]),Vo=u(),kn=p({ttl:x().optional()}),Pn=p({taskId:u()}),Bo=V({progressToken:Fo.optional(),[Sc]:Pn.optional()}),Te=p({_meta:Bo.optional()}),hr=Te.extend({task:kn.optional()}),Se=p({method:u(),params:Te.loose().optional()}),Ae=p({_meta:Bo.optional()}),qe=p({method:u(),params:Ae.loose().optional()}),Jo=V({get[It](){return qt.optional().catch(void 0)}}),ve=V({_meta:Jo.optional()}),_t=q([u(),x().int()]),Wo=p({jsonrpc:m(Yr),id:_t,...Se.shape}).strict(),Ko=p({jsonrpc:m(Yr),...qe.shape}).strict(),Xr=p({jsonrpc:m(Yr),id:_t,result:ve}).strict(),Qr=p({jsonrpc:m(Yr),id:_t.optional(),error:p({code:x().int(),message:u(),data:D().optional()})}).strict(),gt=q([Wo,Ko,Xr,Qr]),bc=q([Xr,Qr]),fr=ve.strict(),Tn=Ae.extend({requestId:_t.optional(),reason:u().optional()}),Go=qe.extend({method:m("notifications/cancelled"),params:Tn}),En=p({src:u(),mimeType:u().optional(),sizes:b(u()).optional(),theme:Y(["light","dark"]).optional()}),Wt=p({icons:b(En).optional()}),Ct=p({name:u(),title:u().optional()}),qt=Ct.extend({...Ct.shape,...Wt.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),Fy=Vt(p({applyDefaults:I().optional()}),ge),Vy=Wr((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)&&Object.keys(e).length===0)return{form:{}};return e},Vt(p({form:Fy.optional(),url:ge.optional()}),ge.optional())),yc=V({list:ge.optional(),cancel:ge.optional(),requests:V({sampling:V({createMessage:ge.optional()}).optional(),elicitation:V({create:ge.optional()}).optional()}).optional()}),wc=V({list:ge.optional(),cancel:ge.optional(),requests:V({tools:V({call:ge.optional()}).optional()}).optional()}),$n=p({experimental:C(u(),ge).optional(),sampling:p({context:ge.optional(),tools:ge.optional()}).optional(),elicitation:Vy.optional(),roots:p({listChanged:I().optional()}).optional(),tasks:yc.optional(),extensions:C(u(),ge).optional()}),Cn=Te.extend({protocolVersion:u(),capabilities:$n,clientInfo:qt}),Yo=Se.extend({method:m("initialize"),params:Cn}),Xo=p({experimental:C(u(),ge).optional(),logging:ge.optional(),completions:ge.optional(),prompts:p({listChanged:I().optional()}).optional(),resources:p({subscribe:I().optional(),listChanged:I().optional()}).optional(),tools:p({listChanged:I().optional()}).optional(),tasks:wc.optional(),extensions:C(u(),ge).optional()}),In=ve.extend({protocolVersion:u(),capabilities:Xo,serverInfo:qt,instructions:u().optional()}),Qo=qe.extend({method:m("notifications/initialized"),params:Ae.optional()}),qn=Se.extend({method:m("server/discover"),params:Te.optional()}),_r=ve.extend({supportedVersions:b(u()),capabilities:Xo,instructions:u().optional()}),es=Se.extend({method:m("ping"),params:Te.optional()}),On=p({progress:x(),total:F(x()),message:F(u())}),Nn=p({...Ae.shape,...On.shape,progressToken:Fo}),ts=qe.extend({method:m("notifications/progress"),params:Nn}),jn=Te.extend({cursor:Vo.optional()}),Kt=Se.extend({params:jn.optional()}),Gt=ve.extend({nextCursor:Vo.optional()}),rs=p({uri:u(),mimeType:F(u()),_meta:C(u(),D()).optional()}),os=rs.extend({text:u()}),Fl=u().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),ss=rs.extend({blob:Fl}),Yt=Y(["user","assistant"]),Ot=p({audience:b(Yt).optional(),priority:x().min(0).max(1).optional(),lastModified:Lo({offset:!0}).optional()}),ns=p({...Ct.shape,...Wt.shape,uri:u(),description:F(u()),mimeType:F(u()),size:F(x()),annotations:Ot.optional(),_meta:F(V({}))}),Mn=p({...Ct.shape,...Wt.shape,uriTemplate:u(),description:F(u()),mimeType:F(u()),annotations:Ot.optional(),_meta:F(V({}))}),An=Kt.extend({method:m("resources/list")}),Ln=Gt.extend({resources:b(ns)}),Un=Kt.extend({method:m("resources/templates/list")}),Dn=Gt.extend({resourceTemplates:b(Mn)}),eo=Te.extend({uri:u()}),Zn=eo,Hn=Se.extend({method:m("resources/read"),params:Zn}),Fn=ve.extend({contents:b(q([os,ss]))}),Vn=qe.extend({method:m("notifications/resources/list_changed"),params:Ae.optional()}),Bn=eo,Jn=Se.extend({method:m("resources/subscribe"),params:Bn}),Wn=eo,Kn=Se.extend({method:m("resources/unsubscribe"),params:Wn}),is=p({toolsListChanged:I().optional(),promptsListChanged:I().optional(),resourcesListChanged:I().optional(),resourceSubscriptions:b(u()).optional()}),Gn=Te.extend({notifications:is}),Yn=Se.extend({method:m("subscriptions/listen"),params:Gn}),Xn=Ae.extend({notifications:is}),Qn=qe.extend({method:m("notifications/subscriptions/acknowledged"),params:Xn}),ei=Jo.extend({[Zo]:_t}),ti=ve.extend({_meta:ei}),ri=Ae.extend({uri:u()}),oi=qe.extend({method:m("notifications/resources/updated"),params:ri}),si=p({name:u(),description:F(u()),required:F(I())}),ni=p({...Ct.shape,...Wt.shape,description:F(u()),arguments:F(b(si)),_meta:F(V({}))}),ii=Kt.extend({method:m("prompts/list")}),ai=Gt.extend({prompts:b(ni)}),ci=Te.extend({name:u(),arguments:C(u(),u()).optional()}),ui=Se.extend({method:m("prompts/get"),params:ci}),to=p({type:m("text"),text:u(),annotations:Ot.optional(),_meta:C(u(),D()).optional()}),ro=p({type:m("image"),data:Fl,mimeType:u(),annotations:Ot.optional(),_meta:C(u(),D()).optional()}),oo=p({type:m("audio"),data:Fl,mimeType:u(),annotations:Ot.optional(),_meta:C(u(),D()).optional()}),li=p({type:m("tool_use"),name:u(),id:u(),input:C(u(),D()),_meta:C(u(),D()).optional()}),so=p({type:m("resource"),resource:q([os,ss]),annotations:Ot.optional(),_meta:C(u(),D()).optional()}),no=ns.extend({type:m("resource_link")}),Nt=q([to,ro,oo,no,so]),di=p({role:Yt,content:Nt}),pi=ve.extend({description:u().optional(),messages:b(di)}),mi=qe.extend({method:m("notifications/prompts/list_changed"),params:Ae.optional()}),hi=p({title:u().optional(),readOnlyHint:I().optional(),destructiveHint:I().optional(),idempotentHint:I().optional(),openWorldHint:I().optional()}),fi=p({taskSupport:Y(["required","optional","forbidden"]).optional()}),gr=p({...Ct.shape,...Wt.shape,description:u().optional(),inputSchema:p({type:m("object"),properties:C(u(),Bt).optional(),required:b(u()).optional()}).catchall(D()),outputSchema:V({$schema:u().optional()}).optional(),annotations:hi.optional(),execution:fi.optional(),_meta:C(u(),D()).optional()}),_i=Kt.extend({method:m("tools/list")}),gi=Gt.extend({tools:b(gr)}),Sr=ve.extend({content:b(Nt).default([]),structuredContent:D().optional(),isError:I().optional()}),zc=Sr.or(ve.extend({toolResult:D()})),Si=hr.extend({name:u(),arguments:C(u(),D()).optional()}),vi=Se.extend({method:m("tools/call"),params:Si}),bi=qe.extend({method:m("notifications/tools/list_changed"),params:Ae.optional()}),yi=p({autoRefresh:I().default(!0),debounceMs:x().int().nonnegative().default(300)}),as=Y(["debug","info","notice","warning","error","critical","alert","emergency"]),wi=Te.extend({level:as}),zi=Se.extend({method:m("logging/setLevel"),params:wi}),Ri=Ae.extend({level:as,logger:u().optional(),data:D()}),io=qe.extend({method:m("notifications/message"),params:Ri}),xi=p({name:u().optional()}),ki=p({hints:b(xi).optional(),costPriority:x().min(0).max(1).optional(),speedPriority:x().min(0).max(1).optional(),intelligencePriority:x().min(0).max(1).optional()}),Pi=p({mode:Y(["auto","required","none"]).optional()}),Ti=p({type:m("tool_result"),toolUseId:u().describe("The unique identifier for the corresponding tool call."),content:b(Nt),structuredContent:D().optional(),isError:I().optional(),_meta:C(u(),D()).optional()}),Ei=Uo("type",[to,ro,oo]),mr=Uo("type",[to,ro,oo,li,Ti]),$i=p({role:Yt,content:q([mr,b(mr)]),_meta:C(u(),D()).optional()}),Ci=hr.extend({messages:b($i),modelPreferences:ki.optional(),systemPrompt:u().optional(),includeContext:Y(["none","thisServer","allServers"]).optional(),temperature:x().optional(),maxTokens:x().int(),stopSequences:b(u()).optional(),metadata:ge.optional(),tools:b(gr).optional(),toolChoice:Pi.optional()}),Ii=Se.extend({method:m("sampling/createMessage"),params:Ci}),qi=ve.extend({model:u(),stopReason:F(Y(["endTurn","stopSequence","maxTokens"]).or(u())),role:Yt,content:Ei}),Oi=ve.extend({model:u(),stopReason:F(Y(["endTurn","stopSequence","maxTokens","toolUse"]).or(u())),role:Yt,content:q([mr,b(mr)])}),cs=p({type:m("boolean"),title:u().optional(),description:u().optional(),default:I().optional()}),ao=p({type:m("string"),title:u().optional(),description:u().optional(),minLength:x().optional(),maxLength:x().optional(),format:Y(["email","uri","date","date-time"]).optional(),default:u().optional()}),co=p({type:Y(["number","integer"]),title:u().optional(),description:u().optional(),minimum:x().optional(),maximum:x().optional(),default:x().optional()}),us=p({type:m("string"),title:u().optional(),description:u().optional(),enum:b(u()),default:u().optional()}),ls=p({type:m("string"),title:u().optional(),description:u().optional(),oneOf:b(p({const:u(),title:u()})),default:u().optional()}),ds=p({type:m("string"),title:u().optional(),description:u().optional(),enum:b(u()),enumNames:b(u()).optional(),default:u().optional()}),Ni=q([us,ls]),ps=p({type:m("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:p({type:m("string"),enum:b(u())}),default:b(u()).optional()}),ms=p({type:m("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:p({anyOf:b(p({const:u(),title:u()}))}),default:b(u()).optional()}),ji=q([ps,ms]),Mi=q([ds,Ni,ji]),hs=q([Mi,cs,ao,co]),uo=hr.extend({mode:m("form").optional(),message:u(),requestedSchema:p({type:m("object"),properties:C(u(),hs),required:b(u()).optional()}).catchall(D())}),Ai=hr.extend({mode:m("url"),message:u(),elicitationId:u(),url:u().url()}),Li=q([uo,Ai]),Ui=Se.extend({method:m("elicitation/create"),params:Li}),Di=Ae.extend({elicitationId:u()}),Zi=qe.extend({method:m("notifications/elicitation/complete"),params:Di}),Hi=ve.extend({action:Y(["accept","decline","cancel"]),content:Wr((e)=>e===null?void 0:e,C(u(),q([u(),x(),I(),b(u())])).optional())}),Fi=p({type:m("ref/resource"),uri:u()}),Vi=p({type:m("ref/prompt"),name:u()}),Bi=Te.extend({ref:q([Vi,Fi]),argument:p({name:u(),value:u()}),context:p({arguments:C(u(),u()).optional()}).optional()}),Ji=Se.extend({method:m("completion/complete"),params:Bi}),Wi=ve.extend({completion:V({values:b(u()).max(100),total:F(x().int()),hasMore:F(I())})}),Ki=p({uri:u().startsWith("file://"),name:u().optional(),_meta:C(u(),D()).optional()}),Gi=Se.extend({method:m("roots/list"),params:Te.optional()}),Yi=ve.extend({roots:b(Ki)}),Xi=qe.extend({method:m("notifications/roots/list_changed"),params:Ae.optional()}),Rc=V({ttl:x().optional(),pollInterval:x().optional()}),Qi=Y(["working","input_required","completed","failed","cancelled"]),Xt=p({taskId:u(),status:Qi,ttl:q([x(),Jr()]),createdAt:u(),lastUpdatedAt:u(),pollInterval:F(x()),statusMessage:F(u())}),xc=ve.extend({task:Xt}),ea=Ae.merge(Xt),kc=qe.extend({method:m("notifications/tasks/status"),params:ea}),Pc=Se.extend({method:m("tasks/get"),params:Te.extend({taskId:u()})}),Tc=ve.merge(Xt),Ec=Se.extend({method:m("tasks/result"),params:Te.extend({taskId:u()})}),$c=ve.loose(),Cc=Kt.extend({method:m("tasks/list")}),Ic=Gt.extend({tasks:b(Xt)}),qc=Se.extend({method:m("tasks/cancel"),params:Te.extend({taskId:u()})}),Oc=ve.merge(Xt),Nc=q([es,Yo,qn,Ji,zi,ui,ii,An,Un,Hn,Jn,Kn,Yn,vi,_i]),jc=q([Go,ts,Qo,Xi]),Mc=q([fr,qi,Oi,Hi,Yi]),Ac=q([es,Ii,Ui,Gi]),Lc=q([Go,ts,io,oi,Vn,bi,mi,Qn,Zi]),Uc=q([fr,In,_r,Wi,pi,ai,Ln,Dn,Fn,Sr,gi,ti]);var Ee=hc().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:x_.custom,message:"URL must be parseable",fatal:!0}),qu}).refine((e)=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),fs=V({resource:u().url(),authorization_servers:b(Ee).optional(),jwks_uri:u().url().optional(),scopes_supported:b(u()).optional(),bearer_methods_supported:b(u()).optional(),resource_signing_alg_values_supported:b(u()).optional(),resource_name:u().optional(),resource_documentation:u().optional(),resource_policy_uri:u().url().optional(),resource_tos_uri:u().url().optional(),tls_client_certificate_bound_access_tokens:I().optional(),authorization_details_types_supported:b(u()).optional(),dpop_signing_alg_values_supported:b(u()).optional(),dpop_bound_access_tokens_required:I().optional()}),lo=V({issuer:u(),authorization_endpoint:Ee,token_endpoint:Ee,registration_endpoint:Ee.optional(),scopes_supported:b(u()).optional(),response_types_supported:b(u()),response_modes_supported:b(u()).optional(),grant_types_supported:b(u()).optional(),token_endpoint_auth_methods_supported:b(u()).optional(),token_endpoint_auth_signing_alg_values_supported:b(u()).optional(),service_documentation:Ee.optional(),revocation_endpoint:Ee.optional(),revocation_endpoint_auth_methods_supported:b(u()).optional(),revocation_endpoint_auth_signing_alg_values_supported:b(u()).optional(),introspection_endpoint:u().optional(),introspection_endpoint_auth_methods_supported:b(u()).optional(),introspection_endpoint_auth_signing_alg_values_supported:b(u()).optional(),code_challenge_methods_supported:b(u()).optional(),client_id_metadata_document_supported:I().optional(),authorization_response_iss_parameter_supported:I().optional().catch(void 0),dpop_signing_alg_values_supported:b(u()).optional()}),ta=V({issuer:u(),authorization_endpoint:Ee,token_endpoint:Ee,userinfo_endpoint:Ee.optional(),jwks_uri:Ee,registration_endpoint:Ee.optional(),scopes_supported:b(u()).optional(),response_types_supported:b(u()),response_modes_supported:b(u()).optional(),grant_types_supported:b(u()).optional(),acr_values_supported:b(u()).optional(),subject_types_supported:b(u()),id_token_signing_alg_values_supported:b(u()),id_token_encryption_alg_values_supported:b(u()).optional(),id_token_encryption_enc_values_supported:b(u()).optional(),userinfo_signing_alg_values_supported:b(u()).optional(),userinfo_encryption_alg_values_supported:b(u()).optional(),userinfo_encryption_enc_values_supported:b(u()).optional(),request_object_signing_alg_values_supported:b(u()).optional(),request_object_encryption_alg_values_supported:b(u()).optional(),request_object_encryption_enc_values_supported:b(u()).optional(),token_endpoint_auth_methods_supported:b(u()).optional(),token_endpoint_auth_signing_alg_values_supported:b(u()).optional(),display_values_supported:b(u()).optional(),claim_types_supported:b(u()).optional(),claims_supported:b(u()).optional(),service_documentation:u().optional(),claims_locales_supported:b(u()).optional(),ui_locales_supported:b(u()).optional(),claims_parameter_supported:I().optional(),request_parameter_supported:I().optional(),request_uri_parameter_supported:I().optional(),require_request_uri_registration:I().optional(),op_policy_uri:Ee.optional(),op_tos_uri:Ee.optional(),client_id_metadata_document_supported:I().optional(),authorization_response_iss_parameter_supported:I().optional().catch(void 0)}),_s=p({...ta.shape,...lo.pick({code_challenge_methods_supported:!0}).shape}),po=p({access_token:u(),id_token:u().optional(),token_type:u(),expires_in:Hy().optional(),scope:u().optional(),refresh_token:u().optional(),issuer:u().optional().catch(void 0)}).strip(),ra=p({issued_token_type:m("urn:ietf:params:oauth:token-type:id-jag"),access_token:u(),token_type:u().optional(),expires_in:x().optional(),scope:u().optional()}).strip(),mo=p({error:u(),error_description:u().optional(),error_uri:u().optional()}),Vl=Ee.optional().or(m("").transform(()=>{return})),oa=p({redirect_uris:b(Ee),token_endpoint_auth_method:u().optional(),grant_types:b(u()).optional(),response_types:b(u()).optional(),application_type:u().optional(),client_name:u().optional(),client_uri:Ee.optional(),logo_uri:Vl,scope:u().optional(),contacts:b(u()).optional(),tos_uri:Vl,policy_uri:u().optional(),jwks_uri:Ee.optional(),jwks:_c().optional(),software_id:u().optional(),software_version:u().optional(),software_statement:u().optional()}).strip(),sa=p({client_id:u(),client_secret:u().optional(),client_id_issued_at:x().optional(),client_secret_expires_at:x().optional(),issuer:u().optional().catch(void 0)}).strip(),gs=oa.merge(sa),Dc=p({error:u(),error_description:u().optional()}).strip(),Zc=p({token:u(),token_type_hint:u().optional()}).strip();var Gl=Symbol.for("mcp.sdk.errorBrands");function br(e,t){let r=new Set,o=t;while(typeof o==="function"){let s=o.mcpBrand;if(Object.prototype.hasOwnProperty.call(o,"mcpBrand")&&typeof s==="string")r.add(s);o=Object.getPrototypeOf(o)}if(r.size===0)return;Object.defineProperty(e,Gl,{value:r,enumerable:!1,configurable:!0})}function We(e,t){try{if(typeof t==="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand==="string"&&Object.prototype.hasOwnProperty.call(t,Gl)){let r=t[Gl];if(r&&typeof r.has==="function"&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var jt=function(e){return e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedGrantType="unsupported_grant_type",e.InvalidScope="invalid_scope",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedTokenType="unsupported_token_type",e.InvalidToken="invalid_token",e.MethodNotAllowed="method_not_allowed",e.TooManyRequests="too_many_requests",e.InvalidClientMetadata="invalid_client_metadata",e.InvalidRedirectUri="invalid_redirect_uri",e.InsufficientScope="insufficient_scope",e.InvalidTarget="invalid_target",e.InvalidDpopProof="invalid_dpop_proof",e.UseDpopNonce="use_dpop_nonce",e}({}),yr=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](t){return We(this,t)}static isInstance(t){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return We(this,t)}constructor(t,r,o){super(r);this.code=t,this.errorUri=o,this.name="OAuthError",br(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};if(this.errorUri)t.error_uri=this.errorUri;return t}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},A=function(e){return e.NotConnected="NOT_CONNECTED",e.AlreadyConnected="ALREADY_CONNECTED",e.NotInitialized="NOT_INITIALIZED",e.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",e.RequestTimeout="REQUEST_TIMEOUT",e.ConnectionClosed="CONNECTION_CLOSED",e.SendFailed="SEND_FAILED",e.InvalidResult="INVALID_RESULT",e.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",e.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",e.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",e.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",e.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",e.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",e.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",e.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",e.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",e.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",e.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",e}({}),L=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return We(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return We(this,e)}constructor(e,t,r,o){super(t,o);this.code=e,this.data=r,this.name="SdkError",br(this,new.target)}},St=class extends L{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,o){super(e,t,r,o);this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function td(e){let t=typeof e==="string"?new URL(e):new URL(e.href);return t.hash="",t}function Kc(e){if(typeof e!=="object"||e===null||Array.isArray(e))return e;let t={...e};return delete t.issuer,t}function rd({requestedResource:e,configuredResource:t}){let r=typeof e==="string"?new URL(e):new URL(e.href),o=typeof t==="string"?new URL(t):new URL(t.href);if(r.origin!==o.origin)return!1;if(r.pathname.length<o.pathname.length)return!1;let s=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",n=o.pathname.endsWith("/")?o.pathname:o.pathname+"/";return s.startsWith(n)}var X_="2026-07-28",od=[X_];function Mt(e){return e>=X_}function sd(e){return e.filter((t)=>!Mt(t))}function la(e){return e.filter((t)=>Mt(t))}function Q_(e){let t=e.structuredContent;if(t===void 0)return e;if(!(typeof t!=="object"||t===null||Array.isArray(t)))return e;if(e.content?.some((r)=>r.type==="text")??!1)return e;return{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var eg=["task","inputRequests","requestState"];function By(e){if(e===null||typeof e!=="object"||Array.isArray(e)||e.content!==void 0||eg.some((t)=>(t in e)))return e;return{...e,content:[]}}function Jy(){let e=xn(()=>q([u(),x(),I(),Jr(),C(u(),e),b(e)])),t=C(u(),e),r=q([u(),x().int()]),o=u(),s=p({ttl:x().optional()}),n=p({taskId:u()}),i=V({progressToken:r.optional(),"io.modelcontextprotocol/related-task":n.optional()}),a=p({_meta:i.optional()}),c=a.extend({task:s.optional()}),l=p({method:u(),params:a.loose().optional()}),d=p({_meta:i.optional()}),f=p({method:u(),params:d.loose().optional()}),h=V({_meta:i.optional()}),g=q([u(),x().int()]),v=h.strict(),_=d.extend({requestId:g.optional(),reason:u().optional()}),y=f.extend({method:m("notifications/cancelled"),params:_}),T=p({src:u(),mimeType:u().optional(),sizes:b(u()).optional(),theme:Y(["light","dark"]).optional()}),O=p({icons:b(T).optional()}),k=p({name:u(),title:u().optional()}),P=k.extend({...k.shape,...O.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),z=Vt(p({applyDefaults:I().optional()}),t),R=Wr((Me)=>{if(Me&&typeof Me==="object"&&!Array.isArray(Me)&&Object.keys(Me).length===0)return{form:{}};return Me},Vt(p({form:z.optional(),url:t.optional()}),t.optional())),Z=V({list:t.optional(),cancel:t.optional(),requests:V({sampling:V({createMessage:t.optional()}).optional(),elicitation:V({create:t.optional()}).optional()}).optional()}),ee=V({list:t.optional(),cancel:t.optional(),requests:V({tools:V({call:t.optional()}).optional()}).optional()}),X=p({experimental:C(u(),t).optional(),sampling:p({context:t.optional(),tools:t.optional()}).optional(),elicitation:R.optional(),roots:p({listChanged:I().optional()}).optional(),tasks:Z.optional(),extensions:C(u(),t).optional()}),ne=a.extend({protocolVersion:u(),capabilities:X,clientInfo:P}),xe=l.extend({method:m("initialize"),params:ne}),te=p({experimental:C(u(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:p({listChanged:I().optional()}).optional(),resources:p({subscribe:I().optional(),listChanged:I().optional()}).optional(),tools:p({listChanged:I().optional()}).optional(),tasks:ee.optional(),extensions:C(u(),t).optional()}),ie=h.extend({protocolVersion:u(),capabilities:te,serverInfo:P,instructions:u().optional()}),re=f.extend({method:m("notifications/initialized"),params:d.optional()}),de=l.extend({method:m("ping"),params:a.optional()}),wt=p({progress:x(),total:F(x()),message:F(u())}),Fe=p({...d.shape,...wt.shape,progressToken:r}),nt=f.extend({method:m("notifications/progress"),params:Fe}),zt=a.extend({cursor:o.optional()}),Ge=l.extend({params:zt.optional()}),Le=h.extend({nextCursor:o.optional()}),Zt=p({uri:u(),mimeType:F(u()),_meta:C(u(),D()).optional()}),Ht=Zt.extend({text:u()}),Rt=u().refine((Me)=>{try{return atob(Me),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ne=Zt.extend({blob:Rt}),Ue=Y(["user","assistant"]),De=p({audience:b(Ue).optional(),priority:x().min(0).max(1).optional(),lastModified:Lo({offset:!0}).optional()}),pt=p({...k.shape,...O.shape,uri:u(),description:F(u()),mimeType:F(u()),size:F(x()),annotations:De.optional(),_meta:F(V({}))}),Ir=p({...k.shape,...O.shape,uriTemplate:u(),description:F(u()),mimeType:F(u()),annotations:De.optional(),_meta:F(V({}))}),Ye=Ge.extend({method:m("resources/list")}),Xe=Le.extend({resources:b(pt)}),Ve=Ge.extend({method:m("resources/templates/list")}),it=Le.extend({resourceTemplates:b(Ir)}),at=a.extend({uri:u()}),xt=at,kt=l.extend({method:m("resources/read"),params:xt}),sr=h.extend({contents:b(q([Ht,Ne]))}),Pt=f.extend({method:m("notifications/resources/list_changed"),params:d.optional()}),qr=at,j=l.extend({method:m("resources/subscribe"),params:qr}),Tt=at,B=l.extend({method:m("resources/unsubscribe"),params:Tt}),U=d.extend({uri:u()}),Q=f.extend({method:m("notifications/resources/updated"),params:U}),M=p({name:u(),description:F(u()),required:F(I())}),N=p({...k.shape,...O.shape,description:F(u()),arguments:F(b(M)),_meta:F(V({}))}),K=Ge.extend({method:m("prompts/list")}),J=Le.extend({prompts:b(N)}),ke=a.extend({name:u(),arguments:C(u(),u()).optional()}),Or=l.extend({method:m("prompts/get"),params:ke}),Et=p({type:m("text"),text:u(),annotations:De.optional(),_meta:C(u(),D()).optional()}),Nr=p({type:m("image"),data:Rt,mimeType:u(),annotations:De.optional(),_meta:C(u(),D()).optional()}),jr=p({type:m("audio"),data:Rt,mimeType:u(),annotations:De.optional(),_meta:C(u(),D()).optional()}),js=p({type:m("tool_use"),name:u(),id:u(),input:C(u(),D()),_meta:C(u(),D()).optional()}),nr=p({type:m("resource"),resource:q([Ht,Ne]),annotations:De.optional(),_meta:C(u(),D()).optional()}),Ms=pt.extend({type:m("resource_link")}),ct=q([Et,Nr,jr,Ms,nr]),Ro=p({role:Ue,content:ct}),xo=h.extend({description:u().optional(),messages:b(Ro)}),Mr=f.extend({method:m("notifications/prompts/list_changed"),params:d.optional()}),As=p({title:u().optional(),readOnlyHint:I().optional(),destructiveHint:I().optional(),idempotentHint:I().optional(),openWorldHint:I().optional()}),ko=p({taskSupport:Y(["required","optional","forbidden"]).optional()}),Ar=p({...k.shape,...O.shape,description:u().optional(),inputSchema:p({type:m("object"),properties:C(u(),e).optional(),required:b(u()).optional()}).catchall(D()),outputSchema:p({type:m("object"),properties:C(u(),e).optional(),required:b(u()).optional()}).catchall(D()).optional(),annotations:As.optional(),execution:ko.optional(),_meta:C(u(),D()).optional()}),Po=Ge.extend({method:m("tools/list")}),To=Le.extend({tools:b(Ar)}),Eo=h.extend({content:b(ct),structuredContent:C(u(),D()).optional(),isError:I().optional()}),je=c.extend({name:u(),arguments:C(u(),D()).optional()}),Ls=l.extend({method:m("tools/call"),params:je}),Ea=f.extend({method:m("notifications/tools/list_changed"),params:d.optional()}),$o=Y(["debug","info","notice","warning","error","critical","alert","emergency"]),Us=a.extend({level:$o}),Ds=l.extend({method:m("logging/setLevel"),params:Us}),Zs=d.extend({level:$o,logger:u().optional(),data:D()}),Hs=f.extend({method:m("notifications/message"),params:Zs}),Fs=p({name:u().optional()}),Vs=p({hints:b(Fs).optional(),costPriority:x().min(0).max(1).optional(),speedPriority:x().min(0).max(1).optional(),intelligencePriority:x().min(0).max(1).optional()}),Bs=p({mode:Y(["auto","required","none"]).optional()}),$a=p({type:m("tool_result"),toolUseId:u().describe("The unique identifier for the corresponding tool call."),content:b(ct),structuredContent:p({}).loose().optional(),isError:I().optional(),_meta:C(u(),D()).optional()}),Js=Uo("type",[Et,Nr,jr]),ir=Uo("type",[Et,Nr,jr,js,$a]),Ws=p({role:Ue,content:q([ir,b(ir)]),_meta:C(u(),D()).optional()}),Ks=c.extend({messages:b(Ws),modelPreferences:Vs.optional(),systemPrompt:u().optional(),includeContext:Y(["none","thisServer","allServers"]).optional(),temperature:x().optional(),maxTokens:x().int(),stopSequences:b(u()).optional(),metadata:t.optional(),tools:b(Ar).optional(),toolChoice:Bs.optional()}),Gs=l.extend({method:m("sampling/createMessage"),params:Ks}),Ys=h.extend({model:u(),stopReason:F(Y(["endTurn","stopSequence","maxTokens"]).or(u())),role:Ue,content:Js}),Xs=h.extend({model:u(),stopReason:F(Y(["endTurn","stopSequence","maxTokens","toolUse"]).or(u())),role:Ue,content:q([ir,b(ir)])}),Qs=p({type:m("boolean"),title:u().optional(),description:u().optional(),default:I().optional()}),en=p({type:m("string"),title:u().optional(),description:u().optional(),minLength:x().optional(),maxLength:x().optional(),format:Y(["email","uri","date","date-time"]).optional(),default:u().optional()}),tn=p({type:Y(["number","integer"]),title:u().optional(),description:u().optional(),minimum:x().optional(),maximum:x().optional(),default:x().optional()}),rn=p({type:m("string"),title:u().optional(),description:u().optional(),enum:b(u()),default:u().optional()}),on=p({type:m("string"),title:u().optional(),description:u().optional(),oneOf:b(p({const:u(),title:u()})),default:u().optional()}),sn=p({type:m("string"),title:u().optional(),description:u().optional(),enum:b(u()),enumNames:b(u()).optional(),default:u().optional()}),nn=q([rn,on]),Lr=p({type:m("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:p({type:m("string"),enum:b(u())}),default:b(u()).optional()}),Ur=p({type:m("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:p({anyOf:b(p({const:u(),title:u()}))}),default:b(u()).optional()}),Ca=q([Lr,Ur]),Ia=q([sn,nn,Ca]),Qe=q([Ia,Qs,en,tn]),et=c.extend({mode:m("form").optional(),message:u(),requestedSchema:p({type:m("object"),properties:C(u(),Qe),required:b(u()).optional()}).catchall(D())}),an=c.extend({mode:m("url"),message:u(),elicitationId:u(),url:u().url()}),mt=q([et,an]),qa=l.extend({method:m("elicitation/create"),params:mt}),Oa=d.extend({elicitationId:u()}),Na=f.extend({method:m("notifications/elicitation/complete"),params:Oa}),ja=h.extend({action:Y(["accept","decline","cancel"]),content:Wr((Me)=>Me===null?void 0:Me,C(u(),q([u(),x(),I(),b(u())])).optional())}),Ma=p({type:m("ref/resource"),uri:u()}),Aa=p({type:m("ref/prompt"),name:u()}),La=a.extend({ref:q([Aa,Ma]),argument:p({name:u(),value:u()}),context:p({arguments:C(u(),u()).optional()}).optional()}),cn=l.extend({method:m("completion/complete"),params:La}),Ua=h.extend({completion:V({values:b(u()).max(100),total:F(x().int()),hasMore:F(I())})}),Da=p({uri:u().startsWith("file://"),name:u().optional(),_meta:C(u(),D()).optional()}),Co=l.extend({method:m("roots/list"),params:a.optional()}),un=h.extend({roots:b(Da)}),Za=f.extend({method:m("notifications/roots/list_changed"),params:d.optional()}),Ha=V({ttl:x().optional(),pollInterval:x().optional()}),ln=Y(["working","input_required","completed","failed","cancelled"]),ar=p({taskId:u(),status:ln,ttl:q([x(),Jr()]),createdAt:u(),lastUpdatedAt:u(),pollInterval:F(x()),statusMessage:F(u())}),Be=h.extend({task:ar}),Fa=d.merge(ar),Dr=f.extend({method:m("notifications/tasks/status"),params:Fa}),Io=l.extend({method:m("tasks/get"),params:a.extend({taskId:u()})}),qo=h.merge(ar),Oo=l.extend({method:m("tasks/result"),params:a.extend({taskId:u()})}),Iu=h.loose(),Ze=Ge.extend({method:m("tasks/list")}),ye=Le.extend({tasks:b(ar)}),Zr=l.extend({method:m("tasks/cancel"),params:a.extend({taskId:u()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:o,TaskMetadataSchema:s,RelatedTaskMetadataSchema:n,RequestMetaSchema:i,BaseRequestParamsSchema:a,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:d,NotificationSchema:f,ResultSchema:h,RequestIdSchema:g,EmptyResultSchema:v,CancelledNotificationParamsSchema:_,CancelledNotificationSchema:y,IconSchema:T,IconsSchema:O,BaseMetadataSchema:k,ImplementationSchema:P,ClientTasksCapabilitySchema:Z,ServerTasksCapabilitySchema:ee,ClientCapabilitiesSchema:X,InitializeRequestParamsSchema:ne,InitializeRequestSchema:xe,ServerCapabilitiesSchema:te,InitializeResultSchema:ie,InitializedNotificationSchema:re,PingRequestSchema:de,ProgressSchema:wt,ProgressNotificationParamsSchema:Fe,ProgressNotificationSchema:nt,PaginatedRequestParamsSchema:zt,PaginatedRequestSchema:Ge,PaginatedResultSchema:Le,ResourceContentsSchema:Zt,TextResourceContentsSchema:Ht,BlobResourceContentsSchema:Ne,RoleSchema:Ue,AnnotationsSchema:De,ResourceSchema:pt,ResourceTemplateSchema:Ir,ListResourcesRequestSchema:Ye,ListResourcesResultSchema:Xe,ListResourceTemplatesRequestSchema:Ve,ListResourceTemplatesResultSchema:it,ResourceRequestParamsSchema:at,ReadResourceRequestParamsSchema:xt,ReadResourceRequestSchema:kt,ReadResourceResultSchema:sr,ResourceListChangedNotificationSchema:Pt,SubscribeRequestParamsSchema:qr,SubscribeRequestSchema:j,UnsubscribeRequestParamsSchema:Tt,UnsubscribeRequestSchema:B,ResourceUpdatedNotificationParamsSchema:U,ResourceUpdatedNotificationSchema:Q,PromptArgumentSchema:M,PromptSchema:N,ListPromptsRequestSchema:K,ListPromptsResultSchema:J,GetPromptRequestParamsSchema:ke,GetPromptRequestSchema:Or,TextContentSchema:Et,ImageContentSchema:Nr,AudioContentSchema:jr,ToolUseContentSchema:js,EmbeddedResourceSchema:nr,ResourceLinkSchema:Ms,ContentBlockSchema:ct,PromptMessageSchema:Ro,GetPromptResultSchema:xo,PromptListChangedNotificationSchema:Mr,ToolAnnotationsSchema:As,ToolExecutionSchema:ko,ToolSchema:Ar,ListToolsRequestSchema:Po,ListToolsResultSchema:To,CallToolResultSchema:Eo,CallToolRequestParamsSchema:je,CallToolRequestSchema:Ls,ToolListChangedNotificationSchema:Ea,LoggingLevelSchema:$o,SetLevelRequestParamsSchema:Us,SetLevelRequestSchema:Ds,LoggingMessageNotificationParamsSchema:Zs,LoggingMessageNotificationSchema:Hs,ModelHintSchema:Fs,ModelPreferencesSchema:Vs,ToolChoiceSchema:Bs,ToolResultContentSchema:$a,SamplingContentSchema:Js,SamplingMessageContentBlockSchema:ir,SamplingMessageSchema:Ws,CreateMessageRequestParamsSchema:Ks,CreateMessageRequestSchema:Gs,CreateMessageResultSchema:Ys,CreateMessageResultWithToolsSchema:Xs,BooleanSchemaSchema:Qs,StringSchemaSchema:en,NumberSchemaSchema:tn,UntitledSingleSelectEnumSchemaSchema:rn,TitledSingleSelectEnumSchemaSchema:on,LegacyTitledEnumSchemaSchema:sn,SingleSelectEnumSchemaSchema:nn,UntitledMultiSelectEnumSchemaSchema:Lr,TitledMultiSelectEnumSchemaSchema:Ur,MultiSelectEnumSchemaSchema:Ca,EnumSchemaSchema:Ia,PrimitiveSchemaDefinitionSchema:Qe,ElicitRequestFormParamsSchema:et,ElicitRequestURLParamsSchema:an,ElicitRequestParamsSchema:mt,ElicitRequestSchema:qa,ElicitationCompleteNotificationParamsSchema:Oa,ElicitationCompleteNotificationSchema:Na,ElicitResultSchema:ja,ResourceTemplateReferenceSchema:Ma,PromptReferenceSchema:Aa,CompleteRequestParamsSchema:La,CompleteRequestSchema:cn,CompleteResultSchema:Ua,RootSchema:Da,ListRootsRequestSchema:Co,ListRootsResultSchema:un,RootsListChangedNotificationSchema:Za,TaskCreationParamsSchema:Ha,TaskStatusSchema:ln,TaskSchema:ar,CreateTaskResultSchema:Be,TaskStatusNotificationParamsSchema:Fa,TaskStatusNotificationSchema:Dr,GetTaskRequestSchema:Io,GetTaskResultSchema:qo,GetTaskPayloadRequestSchema:Oo,GetTaskPayloadResultSchema:Iu,ListTasksRequestSchema:Ze,ListTasksResultSchema:ye,CancelTaskRequestSchema:Zr,CancelTaskResultSchema:h.merge(ar),ClientRequestSchema:q([de,xe,cn,Ds,Or,K,Ye,Ve,kt,j,B,Ls,Po,Io,Oo,Ze,Zr]),ClientNotificationSchema:q([y,nt,re,Za,Dr]),ClientResultSchema:q([v,Ys,Xs,ja,un,qo,ye,Be]),ServerRequestSchema:q([de,Gs,qa,Co,Io,Oo,Ze,Zr]),ServerNotificationSchema:q([y,nt,Hs,Q,Pt,Ea,Mr,Dr,Na]),ServerResultSchema:q([v,ie,Ua,xo,J,Xe,it,sr,Eo,To,qo,ye,Be]),CallToolResultWireSchema:D().superRefine((Me,mb)=>{if(typeof Me!=="object"||Me===null||Array.isArray(Me)||Me.content!==void 0)return;for(let yp of eg)if(yp in Me){mb.addIssue({code:"custom",message:`content is required when the body carries '${yp}' — another result family cannot default into an empty tools/call success`});return}}).transform(By).pipe(Eo)}}var Wy;function tg(){return Wy??=Jy()}function rg(e){return e.type!=="object"}var Ky=new Set(["const","enum","default","examples"]),Gy=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function A_(e){return e!==void 0&&!(typeof e==="string"&&e.startsWith("#"))}function Yy(e){let t=typeof e.$schema==="string"?e.$schema:void 0;if(A_(e.$id))return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let r=Pp(e.$schema)&&e.$recursiveAnchor!==!0,o=(s,n)=>{if(Array.isArray(s))return s.map((c)=>o(c,!1));if(s===null||typeof s!=="object")return s;if(!n&&A_(s.$id))return s;let i={},a=!1;for(let[c,l]of Object.entries(s))if(n)i[c]=o(l,!1);else if((c==="$ref"||c==="$dynamicRef")&&typeof l==="string")i[c]=l==="#"?"#/properties/result":l.startsWith("#/")?`#/properties/result${l.slice(1)}`:l;else if(c==="$recursiveRef"&&l==="#"&&r)a=!0;else if(Ky.has(c))i[c]=l;else if(Gy.has(c))i[c]=o(l,!0);else i[c]=o(l,!1);if(a)if("$ref"in i)i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:"#/properties/result"}];else i.$ref="#/properties/result";return i};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:o(e,!1)},required:["result"]}}var og={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},sg={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Xy={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Hc;function nd(){if(Hc)return Hc;let e=tg();return Hc={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Hc}function ng(e){return Object.prototype.hasOwnProperty.call(og,e)}function ig(e){return Object.prototype.hasOwnProperty.call(sg,e)}function Qy(e){return Object.prototype.hasOwnProperty.call(Xy,e)}function ew(e){return Qy(e)?nd().resultSchemas[e]:void 0}function tw(e){return ng(e)?nd().requestSchemas[e]:void 0}function rw(e){return ig(e)?nd().notificationSchemas[e]:void 0}var G0=Object.keys(og),Y0=Object.keys(sg);function Yl(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function Fc(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}var L_={ok:!1,reason:"not-in-era"};function U_(e){return Yl(e)&&Yl(e.outputSchema)&&rg(e.outputSchema)}function D_(e){return e}var id={era:"2025-11-25",hasRequestMethod:ng,hasNotificationMethod:ig,validateRequest:(e,t)=>Fc(tw(e),t),validateResult:(e,t)=>Fc(ew(e),t),validateNotification:(e,t)=>Fc(rw(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>L_,validateInputResponse:()=>L_,samplingResultVariant:(e,t)=>{let r=tg();return Fc(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)},outboundEnvelope:(e)=>{return},validateEnvelopeMeta:(e)=>[],projectCallToolResult(e,t){let r=Q_(e),o=r.structuredContent;if(o===void 0)return r;let s=typeof o!=="object"||o===null||Array.isArray(o),n=t!==void 0&&rg(t);if(!s&&!n)return r;return{...r,structuredContent:{result:o}}},decodeResult(e,t){if(Yl(t)&&"resultType"in t){let r={...t};return delete r.resultType,{kind:"complete",result:D_(r)}}return{kind:"complete",result:D_(t)}},encodeResult(e,t){if(e!=="tools/list")return t;let r=t.tools;if(!Array.isArray(r)||!r.some((o)=>U_(o)))return t;return{...t,tools:r.map((o)=>U_(o)?{...o,outputSchema:Yy(o.outputSchema)}:o)}},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope:(e)=>{return}};function ow(){let e=xn(()=>q([u(),x(),I(),Jr(),C(u(),e),b(e)])),t=C(u(),e),r=q([u(),x().int()]),o=u(),s=q([u(),x().int()]),n=Y(["user","assistant"]),i=Y(["debug","info","notice","warning","error","critical","alert","emergency"]),a=u().refine((ye)=>{try{return atob(ye),!0}catch{return!1}},{message:"Invalid Base64 string"}),c=p({ttl:x().optional()}),l=p({taskId:u()}),d=V({progressToken:r.optional(),"io.modelcontextprotocol/related-task":l.optional()}),f=p({_meta:d.optional()}),h=f.extend({task:c.optional()}),g=p({_meta:d.optional()}),v=p({method:u(),params:g.loose().optional()}),_=p({src:u(),mimeType:u().optional(),sizes:b(u()).optional(),theme:Y(["light","dark"]).optional()}),y=p({icons:b(_).optional()}),T=p({name:u(),title:u().optional()}),O=T.extend({...T.shape,...y.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),k=Vt(p({applyDefaults:I().optional()}),t),P=Wr((ye)=>{if(ye&&typeof ye==="object"&&!Array.isArray(ye)&&Object.keys(ye).length===0)return{form:{}};return ye},Vt(p({form:k.optional(),url:t.optional()}),t.optional())),z=V({list:t.optional(),cancel:t.optional(),requests:V({sampling:V({createMessage:t.optional()}).optional(),elicitation:V({create:t.optional()}).optional()}).optional()}),R=V({list:t.optional(),cancel:t.optional(),requests:V({tools:V({call:t.optional()}).optional()}).optional()}),Z=p({experimental:C(u(),t).optional(),sampling:p({context:t.optional(),tools:t.optional()}).optional(),elicitation:P.optional(),roots:p({listChanged:I().optional()}).optional(),tasks:z.optional(),extensions:C(u(),t).optional()}),ee=p({experimental:C(u(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:p({listChanged:I().optional()}).optional(),resources:p({subscribe:I().optional(),listChanged:I().optional()}).optional(),tools:p({listChanged:I().optional()}).optional(),tasks:R.optional(),extensions:C(u(),t).optional()}),X=p({progress:x(),total:F(x()),message:F(u())}),ne=p({...g.shape,...X.shape,progressToken:r}),xe=v.extend({method:m("notifications/progress"),params:ne}),te=g.extend({level:i,logger:u().optional(),data:D()}),ie=v.extend({method:m("notifications/message"),params:te}),re=p({uri:u(),mimeType:F(u()),_meta:C(u(),D()).optional()}),de=re.extend({text:u()}),wt=re.extend({blob:a}),Fe=p({audience:b(n).optional(),priority:x().min(0).max(1).optional(),lastModified:Lo({offset:!0}).optional()}),nt=p({...T.shape,...y.shape,uri:u(),description:F(u()),mimeType:F(u()),size:F(x()),annotations:Fe.optional(),_meta:F(V({}))}),zt=p({...T.shape,...y.shape,uriTemplate:u(),description:F(u()),mimeType:F(u()),annotations:Fe.optional(),_meta:F(V({}))}),Ge=v.extend({method:m("notifications/resources/list_changed"),params:g.optional()}),Le=g.extend({uri:u()}),Zt=v.extend({method:m("notifications/resources/updated"),params:Le}),Ht=p({name:u(),description:F(u()),required:F(I())}),Rt=p({...T.shape,...y.shape,description:F(u()),arguments:F(b(Ht)),_meta:F(V({}))}),Ne=v.extend({method:m("notifications/prompts/list_changed"),params:g.optional()}),Ue=p({type:m("text"),text:u(),annotations:Fe.optional(),_meta:C(u(),D()).optional()}),De=p({type:m("image"),data:a,mimeType:u(),annotations:Fe.optional(),_meta:C(u(),D()).optional()}),pt=p({type:m("audio"),data:a,mimeType:u(),annotations:Fe.optional(),_meta:C(u(),D()).optional()}),Ir=p({type:m("tool_use"),name:u(),id:u(),input:C(u(),D()),_meta:C(u(),D()).optional()}),Ye=p({type:m("resource"),resource:q([de,wt]),annotations:Fe.optional(),_meta:C(u(),D()).optional()}),Xe=nt.extend({type:m("resource_link")}),Ve=q([Ue,De,pt,Xe,Ye]),it=p({role:n,content:Ve}),at=p({title:u().optional(),readOnlyHint:I().optional(),destructiveHint:I().optional(),idempotentHint:I().optional(),openWorldHint:I().optional()}),xt=v.extend({method:m("notifications/tools/list_changed"),params:g.optional()}),kt=p({name:u().optional()}),sr=p({hints:b(kt).optional(),costPriority:x().min(0).max(1).optional(),speedPriority:x().min(0).max(1).optional(),intelligencePriority:x().min(0).max(1).optional()}),Pt=p({mode:Y(["auto","required","none"]).optional()}),qr=p({type:m("boolean"),title:u().optional(),description:u().optional(),default:I().optional()}),j=p({type:m("string"),title:u().optional(),description:u().optional(),minLength:x().optional(),maxLength:x().optional(),format:Y(["email","uri","date","date-time"]).optional(),default:u().optional()}),Tt=p({type:Y(["number","integer"]),title:u().optional(),description:u().optional(),minimum:x().optional(),maximum:x().optional(),default:x().optional()}),B=p({type:m("string"),title:u().optional(),description:u().optional(),enum:b(u()),default:u().optional()}),U=p({type:m("string"),title:u().optional(),description:u().optional(),oneOf:b(p({const:u(),title:u()})),default:u().optional()}),Q=p({type:m("string"),title:u().optional(),description:u().optional(),enum:b(u()),enumNames:b(u()).optional(),default:u().optional()}),M=q([B,U]),N=p({type:m("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:p({type:m("string"),enum:b(u())}),default:b(u()).optional()}),K=p({type:m("array"),title:u().optional(),description:u().optional(),minItems:x().optional(),maxItems:x().optional(),items:p({anyOf:b(p({const:u(),title:u()}))}),default:b(u()).optional()}),J=q([N,K]),ke=q([Q,M,J]),Or=q([ke,qr,j,Tt]),Et=h.extend({mode:m("form").optional(),message:u(),requestedSchema:p({type:m("object"),properties:C(u(),Or),required:b(u()).optional()}).catchall(D())}),Nr=p({type:m("ref/resource"),uri:u()}),jr=p({type:m("ref/prompt"),name:u()}),js=p({uri:u().startsWith("file://"),name:u().optional(),_meta:C(u(),D()).optional()}),nr=Z.shape,Ms=p({experimental:nr.experimental,sampling:nr.sampling,elicitation:nr.elicitation,roots:nr.roots,extensions:nr.extensions}),ct=ee.shape,Ro=p({experimental:ct.experimental,logging:ct.logging,completions:ct.completions,prompts:ct.prompts,resources:ct.resources,tools:ct.tools,extensions:ct.extensions}),xo=V({progressToken:r.optional(),[Jt]:u(),[Do]:O.optional(),[Gr]:Ms,[Ho]:i.optional()}),Mr=p({...T.shape,...y.shape,description:u().optional(),inputSchema:V({$schema:u().optional(),type:m("object")}),outputSchema:V({$schema:u().optional()}).optional(),annotations:at.optional(),_meta:C(u(),D()).optional()}),As=p({type:m("tool_result"),toolUseId:u(),content:b(Ve),structuredContent:D().optional(),isError:I().optional(),_meta:C(u(),D()).optional()}),ko=q([Ue,De,pt,Ir,As]),Ar=p({role:n,content:q([ko,b(ko)]),_meta:C(u(),D()).optional()}),Po=u(),To=V({[It]:O.optional().catch(void 0)}),Eo=To.optional();function je(ye){return V({_meta:Eo,resultType:Po.default("complete"),...ye})}let Ls=je({}),Ea=je({nextCursor:o.optional()}),$o=je({content:b(Ve),structuredContent:D().optional(),isError:I().optional()}),Us=je({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),tools:b(Mr),nextCursor:o.optional()}),Ds=je({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),prompts:b(Rt),nextCursor:o.optional()}),Zs=je({description:u().optional(),messages:b(it)}),Hs=je({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),resources:b(nt),nextCursor:o.optional()}),Fs=je({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),resourceTemplates:b(zt),nextCursor:o.optional()}),Vs=je({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),contents:b(q([de,wt]))}),Bs=je({completion:p({values:b(u()).max(100),total:x().int().optional(),hasMore:I().optional()}).loose()}),$a=je({ttlMs:x().int().min(0),cacheScope:Y(["public","private"])}),Js=je({ttlMs:x().int().min(0).catch(0),cacheScope:Y(["public","private"]).catch("private"),supportedVersions:b(u()),capabilities:Ro,instructions:u().optional()}),ir=p({messages:b(Ar),modelPreferences:sr.optional(),systemPrompt:u().optional(),includeContext:Y(["none","thisServer","allServers"]).optional(),temperature:x().optional(),maxTokens:x().int(),stopSequences:b(u()).optional(),metadata:t.optional(),tools:b(Mr).optional(),toolChoice:Pt.optional()}),Ws=p({method:m("sampling/createMessage"),params:ir}),Ks=p({method:m("roots/list"),params:p({_meta:C(u(),D()).optional()}).optional()}),Gs=p({...Ar.shape,model:u(),stopReason:u().optional()}),Ys=p({roots:b(js)}),Xs=p({action:Y(["accept","decline","cancel"]),content:C(u(),q([u(),x(),I(),b(u())])).optional()}),Qs=p({mode:m("url"),message:u(),url:u().url()}),en=q([Et,Qs]),tn=p({method:m("elicitation/create"),params:en}),rn=q([Ws,Ks,tn]),on=q([Gs,Ys,Xs]),sn=C(u(),rn),nn=C(u(),on),Lr=je({inputRequests:sn.optional(),requestState:u().optional()}),Ur={inputResponses:nn.optional(),requestState:u().optional()},Ca=p({_meta:xo,...Ur}),Ia=V({progressToken:r.optional()});function Qe(ye,Zr){return p({method:m(ye),params:p({_meta:xo,...Zr})})}function et(ye,Zr){return p({method:m(ye),params:p({_meta:Ia.optional(),...Zr}).optional()})}let an={name:u(),arguments:C(u(),D()).optional(),...Ur},mt={cursor:o.optional()},qa=Qe("tools/call",an),Oa=Qe("tools/list",mt),Na=Qe("prompts/list",mt),ja=Qe("prompts/get",{name:u(),arguments:C(u(),u()).optional(),...Ur}),Ma=Qe("resources/list",mt),Aa=Qe("resources/templates/list",mt),La=Qe("resources/read",{uri:u(),...Ur}),cn={ref:q([jr,Nr]),argument:p({name:u(),value:u()}),context:p({arguments:C(u(),u()).optional()}).optional()},Ua=Qe("completion/complete",cn),Da=Qe("server/discover",{}),Co=p({toolsListChanged:I().optional(),promptsListChanged:I().optional(),resourcesListChanged:I().optional(),resourceSubscriptions:b(u()).optional()}),un={notifications:Co},Za=Qe("subscriptions/listen",un),Ha=To.extend({"io.modelcontextprotocol/subscriptionId":s}),ln=V({_meta:Ha,resultType:Po.default("complete")}),ar={"tools/call":et("tools/call",an),"tools/list":et("tools/list",mt),"prompts/get":et("prompts/get",{name:u(),arguments:C(u(),u()).optional()}),"prompts/list":et("prompts/list",mt),"resources/list":et("resources/list",mt),"resources/templates/list":et("resources/templates/list",mt),"resources/read":et("resources/read",{uri:u()}),"completion/complete":et("completion/complete",cn),"server/discover":et("server/discover",{}),"subscriptions/listen":et("subscriptions/listen",un)};function Be(ye){return V({_meta:Eo,...ye})}let Fa={"tools/call":Be({content:b(Ve),structuredContent:D().optional(),isError:I().optional()}),"tools/list":Be({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),tools:b(Mr),nextCursor:o.optional()}),"prompts/get":Be({description:u().optional(),messages:b(it)}),"prompts/list":Be({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),prompts:b(Rt),nextCursor:o.optional()}),"resources/list":Be({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),resources:b(nt),nextCursor:o.optional()}),"resources/templates/list":Be({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),resourceTemplates:b(zt),nextCursor:o.optional()}),"resources/read":Be({ttlMs:x().int().min(0),cacheScope:Y(["public","private"]),contents:b(q([de,wt]))}),"completion/complete":Be({completion:p({values:b(u()).max(100),total:x().int().optional(),hasMore:I().optional()}).loose()}),"server/discover":Be({ttlMs:x().int().min(0).catch(0),cacheScope:Y(["public","private"]).catch("private"),supportedVersions:b(u()),capabilities:Ro,instructions:u().optional()}),"subscriptions/listen":Be({})},Dr=V({"io.modelcontextprotocol/subscriptionId":s.optional()}),Io=p({method:m("notifications/subscriptions/acknowledged"),params:p({_meta:Dr.optional(),notifications:Co})}),qo=p({_meta:Dr.optional(),requestId:s,reason:u().optional()}),Oo=p({method:m("notifications/cancelled"),params:qo}),Iu={"notifications/cancelled":Oo,"notifications/progress":xe,"notifications/message":ie,"notifications/resources/updated":Zt,"notifications/resources/list_changed":Ge,"notifications/tools/list_changed":xt,"notifications/prompts/list_changed":Ne,"notifications/subscriptions/acknowledged":Io},Ze=(ye)=>p({jsonrpc:m("2.0"),id:q([u(),x().int()]),result:ye}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:o,RequestIdSchema:s,RoleSchema:n,LoggingLevelSchema:i,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:d,BaseRequestParamsSchema:f,TaskAugmentedRequestParamsSchema:h,NotificationsParamsSchema:g,NotificationSchema:v,IconSchema:_,IconsSchema:y,BaseMetadataSchema:T,ImplementationSchema:O,ClientTasksCapabilitySchema:z,ServerTasksCapabilitySchema:R,ClientCapabilitiesSchema:Z,ServerCapabilitiesSchema:ee,ProgressSchema:X,ProgressNotificationParamsSchema:ne,ProgressNotificationSchema:xe,LoggingMessageNotificationParamsSchema:te,LoggingMessageNotificationSchema:ie,ResourceContentsSchema:re,TextResourceContentsSchema:de,BlobResourceContentsSchema:wt,AnnotationsSchema:Fe,ResourceSchema:nt,ResourceTemplateSchema:zt,ResourceListChangedNotificationSchema:Ge,ResourceUpdatedNotificationParamsSchema:Le,ResourceUpdatedNotificationSchema:Zt,PromptArgumentSchema:Ht,PromptSchema:Rt,PromptListChangedNotificationSchema:Ne,TextContentSchema:Ue,ImageContentSchema:De,AudioContentSchema:pt,ToolUseContentSchema:Ir,EmbeddedResourceSchema:Ye,ResourceLinkSchema:Xe,ContentBlockSchema:Ve,PromptMessageSchema:it,ToolAnnotationsSchema:at,ToolListChangedNotificationSchema:xt,ModelHintSchema:kt,ModelPreferencesSchema:sr,ToolChoiceSchema:Pt,BooleanSchemaSchema:qr,StringSchemaSchema:j,NumberSchemaSchema:Tt,UntitledSingleSelectEnumSchemaSchema:B,TitledSingleSelectEnumSchemaSchema:U,LegacyTitledEnumSchemaSchema:Q,SingleSelectEnumSchemaSchema:M,UntitledMultiSelectEnumSchemaSchema:N,TitledMultiSelectEnumSchemaSchema:K,MultiSelectEnumSchemaSchema:J,EnumSchemaSchema:ke,PrimitiveSchemaDefinitionSchema:Or,ElicitRequestFormParamsSchema:Et,ResourceTemplateReferenceSchema:Nr,PromptReferenceSchema:jr,RootSchema:js,ClientCapabilities2026Schema:Ms,ServerCapabilities2026Schema:Ro,RequestMetaEnvelopeSchema:xo,ToolSchema:Mr,ToolResultContentSchema:As,SamplingMessageContentBlockSchema:ko,SamplingMessageSchema:Ar,ResultTypeSchema:Po,ResultMetaSchema:To,ResultSchema:Ls,PaginatedResultSchema:Ea,CallToolResultSchema:$o,ListToolsResultSchema:Us,ListPromptsResultSchema:Ds,GetPromptResultSchema:Zs,ListResourcesResultSchema:Hs,ListResourceTemplatesResultSchema:Fs,ReadResourceResultSchema:Vs,CompleteResultSchema:Bs,CacheableResultSchema:$a,DiscoverResultSchema:Js,CreateMessageRequestParamsSchema:ir,CreateMessageRequestSchema:Ws,ListRootsRequestSchema:Ks,CreateMessageResultSchema:Gs,ListRootsResultSchema:Ys,ElicitResultSchema:Xs,ElicitRequestURLParamsSchema:Qs,ElicitRequestParamsSchema:en,ElicitRequestSchema:tn,InputRequestSchema:rn,InputResponseSchema:on,InputRequestsSchema:sn,InputResponsesSchema:nn,InputRequiredResultSchema:Lr,InputResponseRequestParamsSchema:Ca,CallToolRequestSchema:qa,ListToolsRequestSchema:Oa,ListPromptsRequestSchema:Na,GetPromptRequestSchema:ja,ListResourcesRequestSchema:Ma,ListResourceTemplatesRequestSchema:Aa,ReadResourceRequestSchema:La,CompleteRequestSchema:Ua,DiscoverRequestSchema:Da,SubscriptionFilterSchema:Co,SubscriptionsListenRequestSchema:Za,SubscriptionsListenResultMetaSchema:Ha,SubscriptionsListenResultSchema:ln,dispatchRequestSchemas:ar,dispatchResultSchemas:Fa,NotificationMetaSchema:Dr,SubscriptionsAcknowledgedNotificationSchema:Io,CancelledNotificationParamsSchema:qo,CancelledNotificationSchema:Oo,notificationSchemas2026:Iu,JSONRPCResultResponseSchema:Ze(Ls),CallToolResultResponseSchema:Ze(q([$o,Lr])),ListToolsResultResponseSchema:Ze(Us),ListPromptsResultResponseSchema:Ze(Ds),GetPromptResultResponseSchema:Ze(q([Zs,Lr])),ListResourcesResultResponseSchema:Ze(Hs),ListResourceTemplatesResultResponseSchema:Ze(Fs),ReadResourceResultResponseSchema:Ze(q([Vs,Lr])),CompleteResultResponseSchema:Ze(Bs),DiscoverResultResponseSchema:Ze(Js),SubscriptionsListenResultResponseSchema:Ze(ln)}}var sw;function vr(){return sw??=ow()}var nw=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function iw(e){return nw.includes(e)}var ad=Symbol("modelcontextprotocol.resultCacheHintFallback");function aw(e){return e[ad]}function ag(e){return typeof e==="number"&&Number.isSafeInteger(e)&&e>=0}function cg(e){return e==="public"||e==="private"}var W=function(e){return e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.ResourceNotFound=-32002]="ResourceNotFound",e[e.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",e[e.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired",e}({}),se=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return We(this,t)}static isInstance(t){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return We(this,t)}constructor(t,r,o){super(r);this.code=t,this.data=o,this.name="ProtocolError",br(this,new.target)}static fromError(t,r,o){if(t===W.UrlElicitationRequired&&o){let s=o;if(s.elicitations)return new lg(s.elicitations,r)}if(t===W.UnsupportedProtocolVersion&&o){let s=o;if(Array.isArray(s.supported)&&typeof s.requested==="string")return new da({supported:s.supported,requested:s.requested},r)}if(t===W.InvalidParams||t===W.ResourceNotFound){let s=o;if(typeof s?.uri==="string"&&(t===W.ResourceNotFound||Object.keys(s).length===1))return new ug(s.uri,r)}if(t===W.MissingRequiredClientCapability&&o){let s=o;if(s.requiredCapabilities!==null&&typeof s.requiredCapabilities==="object"&&!Array.isArray(s.requiredCapabilities))return new dg({requiredCapabilities:s.requiredCapabilities},r)}return new e(t,r,o)}},ug=class extends se{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(W.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},lg=class extends se{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(W.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},da=class extends se{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(W.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},dg=class extends se{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(W.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},cw=0,uw="private",lw=["tools/call","prompts/get","resources/read"];function dw(e,t){let r=t.resultType;if(r===void 0)return{...t,resultType:"complete"};if(r==="complete")return t;if(lw.includes(e))return t;throw new se(W.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function pw(e,t){let r=aw(t);if(t.resultType!=="complete"||!iw(e))return r===void 0?t:gw(t);let o=t,s=ag(o.ttlMs)?o.ttlMs:fw(r),n=cg(o.cacheScope)?o.cacheScope:_w(r),i={...o,ttlMs:s,cacheScope:n};return delete i[ad],i}function mw(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function hw(e,t){if(t===void 0)return e;let r=e._meta;if(r===void 0)return{...e,_meta:{[It]:t}};if(!mw(r))return e;if(r[It]!==void 0)return e;return{...e,_meta:{...r,[It]:t}}}function fw(e){return e!==void 0&&ag(e.ttlMs)?e.ttlMs:cw}function _w(e){return e!==void 0&&cg(e.cacheScope)?e.cacheScope:uw}function gw(e){let t={...e};return delete t[ad],t}var Sw=["elicitation/create","sampling/createMessage","roots/list"],Vc;function pg(){if(Vc)return Vc;let e=vr();return Vc={request:{"elicitation/create":p({method:m("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":p({method:m("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":p({method:m("roots/list"),params:V({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Vc}function mg(e){return Sw.includes(e)}function Bl(e){return mg(e)?pg().request[e]:void 0}function vw(e){return mg(e)?pg().response[e]:void 0}var cd={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},hg={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function fg(e){return Object.prototype.hasOwnProperty.call(cd,e)}function _g(e){return Object.prototype.hasOwnProperty.call(hg,e)}function bw(e){return Object.prototype.hasOwnProperty.call(cd,e)}function yw(e){return fg(e)?vr().dispatchRequestSchemas[e]:void 0}function ww(e){return bw(e)?vr().dispatchResultSchemas[e]:void 0}function zw(e){return _g(e)?vr().notificationSchemas2026[e]:void 0}var X0=Object.keys(cd),Q0=Object.keys(hg);function aa(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function na(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}var Rw={ok:!1,reason:"not-in-era"},xw=[Jt,Gr];function kw(e,t){let r=t,o=!1,s=()=>{if(!o)r={...r},o=!0;return r},n=t.tools;if(e==="tools/list"&&Array.isArray(n)&&n.some((a)=>aa(a)&&("execution"in a)))s().tools=n.map((a)=>{if(!aa(a)||!("execution"in a))return a;let c={...a};return delete c.execution,c});let i=t.capabilities;if(aa(i)&&"tasks"in i){let a={...i};delete a.tasks,s().capabilities=a}return r}var ud={era:"2026-07-28",hasRequestMethod:fg,hasNotificationMethod:_g,hasInputRequestMethod:(e)=>Bl(e)!==void 0,validateRequest:(e,t)=>na(yw(e),t),validateResult:(e,t)=>na(ww(e),t),validateNotification:(e,t)=>na(zw(e),t),validateInputRequest:(e,t)=>na(Bl(e),t),validateInputResponse:(e,t)=>na(vw(e),t),samplingResultVariant:()=>Rw,outboundEnvelope(e){return{[Jt]:e.protocolVersion,[Do]:e.clientInfo,[Gr]:e.clientCapabilities,...e.logLevel!==void 0&&{[Ho]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let o of xw)if(!(o in e))t.push({key:o,problem:"missing"});let r=vr().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let o of r.error.issues){let s=o.path.map(String),n=s.length>0?s.join("."):"_meta";if(s.length===1&&t.some((i)=>i.key===n&&i.problem==="missing"))continue;t.push({key:n,problem:o.message})}return t},projectCallToolResult:(e)=>Q_(e),inputRequestSchema:Bl,decodeResult(e,t){if(!aa(t))return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(r===void 0)return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if(typeof r!=="string")return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if(r==="input_required"){let i=t.inputRequests,a=aa(i)?i:{},c=t.requestState,l=t._meta===void 0?void 0:vr().ResultMetaSchema.safeParse(t._meta),d=l?.success?l.data:void 0;if(Object.keys(a).length===0&&typeof c!=="string")return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})};return{kind:"input_required",inputRequests:a,...typeof c==="string"&&{requestState:c},...d!==void 0&&{_meta:d}}}if(r!=="complete")return{kind:"invalid",error:new L(A.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let o=Pw(),s=Object.hasOwn(o,e)?o[e]:void 0;if(s!==void 0){let i=s.safeParse(t);if(!i.success)return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: ${i.error}`,{method:e})}}let n={...t};return delete n.resultType,{kind:"complete",result:n}},encodeResult(e,t,r){return hw(pw(e,dw(e,kw(e,t))),r)},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=vr().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map((r)=>r.message).join("; ")}`}},Bc;function Pw(){if(Bc)return Bc;let e=vr();return Bc={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Bc}var Gc="2026-07-28";function Qt(e){return e!==void 0&&Mt(e)?ud:id}function Z_(e){if(e.revision!==void 0)return Qt(e.revision).era;return e.era==="modern"?ud.era:id.era}function Jl(e){return gg.some((t)=>t.hasRequestMethod(e))}function Wl(e){return gg.some((t)=>t.hasNotificationMethod(e))}function H_(e){return e==="tasks/get"||e==="tasks/cancel"}var gg=[id,ud],Tw=Rp({AnnotationsSchema:()=>Ot,AudioContentSchema:()=>oo,BaseMetadataSchema:()=>Ct,BaseRequestParamsSchema:()=>Te,BlobResourceContentsSchema:()=>ss,BooleanSchemaSchema:()=>cs,CallToolRequestParamsSchema:()=>Si,CallToolRequestSchema:()=>vi,CallToolResultSchema:()=>Sr,CancelTaskRequestSchema:()=>qc,CancelTaskResultSchema:()=>Oc,CancelledNotificationParamsSchema:()=>Tn,CancelledNotificationSchema:()=>Go,ClientCapabilitiesSchema:()=>$n,ClientNotificationSchema:()=>jc,ClientRequestSchema:()=>Nc,ClientResultSchema:()=>Mc,ClientTasksCapabilitySchema:()=>yc,CompatibilityCallToolResultSchema:()=>zc,CompleteRequestParamsSchema:()=>Bi,CompleteRequestSchema:()=>Ji,CompleteResultSchema:()=>Wi,ContentBlockSchema:()=>Nt,CreateMessageRequestParamsSchema:()=>Ci,CreateMessageRequestSchema:()=>Ii,CreateMessageResultSchema:()=>qi,CreateMessageResultWithToolsSchema:()=>Oi,CreateTaskResultSchema:()=>xc,CursorSchema:()=>Vo,DiscoverRequestSchema:()=>qn,DiscoverResultSchema:()=>_r,ElicitRequestFormParamsSchema:()=>uo,ElicitRequestParamsSchema:()=>Li,ElicitRequestSchema:()=>Ui,ElicitRequestURLParamsSchema:()=>Ai,ElicitResultSchema:()=>Hi,ElicitationCompleteNotificationParamsSchema:()=>Di,ElicitationCompleteNotificationSchema:()=>Zi,EmbeddedResourceSchema:()=>so,EmptyResultSchema:()=>fr,EnumSchemaSchema:()=>Mi,GetPromptRequestParamsSchema:()=>ci,GetPromptRequestSchema:()=>ui,GetPromptResultSchema:()=>pi,GetTaskPayloadRequestSchema:()=>Ec,GetTaskPayloadResultSchema:()=>$c,GetTaskRequestSchema:()=>Pc,GetTaskResultSchema:()=>Tc,IconSchema:()=>En,IconsSchema:()=>Wt,ImageContentSchema:()=>ro,ImplementationSchema:()=>qt,InitializeRequestParamsSchema:()=>Cn,InitializeRequestSchema:()=>Yo,InitializeResultSchema:()=>In,InitializedNotificationSchema:()=>Qo,JSONArraySchema:()=>vc,JSONObjectSchema:()=>ge,JSONRPCErrorResponseSchema:()=>Qr,JSONRPCMessageSchema:()=>gt,JSONRPCNotificationSchema:()=>Ko,JSONRPCRequestSchema:()=>Wo,JSONRPCResponseSchema:()=>bc,JSONRPCResultResponseSchema:()=>Xr,JSONValueSchema:()=>Bt,LegacyTitledEnumSchemaSchema:()=>ds,ListChangedOptionsBaseSchema:()=>yi,ListPromptsRequestSchema:()=>ii,ListPromptsResultSchema:()=>ai,ListResourceTemplatesRequestSchema:()=>Un,ListResourceTemplatesResultSchema:()=>Dn,ListResourcesRequestSchema:()=>An,ListResourcesResultSchema:()=>Ln,ListRootsRequestSchema:()=>Gi,ListRootsResultSchema:()=>Yi,ListTasksRequestSchema:()=>Cc,ListTasksResultSchema:()=>Ic,ListToolsRequestSchema:()=>_i,ListToolsResultSchema:()=>gi,LoggingLevelSchema:()=>as,LoggingMessageNotificationParamsSchema:()=>Ri,LoggingMessageNotificationSchema:()=>io,ModelHintSchema:()=>xi,ModelPreferencesSchema:()=>ki,MultiSelectEnumSchemaSchema:()=>ji,NotificationSchema:()=>qe,NotificationsParamsSchema:()=>Ae,NumberSchemaSchema:()=>co,PaginatedRequestParamsSchema:()=>jn,PaginatedRequestSchema:()=>Kt,PaginatedResultSchema:()=>Gt,PingRequestSchema:()=>es,PrimitiveSchemaDefinitionSchema:()=>hs,ProgressNotificationParamsSchema:()=>Nn,ProgressNotificationSchema:()=>ts,ProgressSchema:()=>On,ProgressTokenSchema:()=>Fo,PromptArgumentSchema:()=>si,PromptListChangedNotificationSchema:()=>mi,PromptMessageSchema:()=>di,PromptReferenceSchema:()=>Vi,PromptSchema:()=>ni,ReadResourceRequestParamsSchema:()=>Zn,ReadResourceRequestSchema:()=>Hn,ReadResourceResultSchema:()=>Fn,RelatedTaskMetadataSchema:()=>Pn,RequestIdSchema:()=>_t,RequestMetaSchema:()=>Bo,RequestSchema:()=>Se,ResourceContentsSchema:()=>rs,ResourceLinkSchema:()=>no,ResourceListChangedNotificationSchema:()=>Vn,ResourceRequestParamsSchema:()=>eo,ResourceSchema:()=>ns,ResourceTemplateReferenceSchema:()=>Fi,ResourceTemplateSchema:()=>Mn,ResourceUpdatedNotificationParamsSchema:()=>ri,ResourceUpdatedNotificationSchema:()=>oi,ResultMetaObjectSchema:()=>Jo,ResultSchema:()=>ve,RoleSchema:()=>Yt,RootSchema:()=>Ki,RootsListChangedNotificationSchema:()=>Xi,SamplingContentSchema:()=>Ei,SamplingMessageContentBlockSchema:()=>mr,SamplingMessageSchema:()=>$i,ServerCapabilitiesSchema:()=>Xo,ServerNotificationSchema:()=>Lc,ServerRequestSchema:()=>Ac,ServerResultSchema:()=>Uc,ServerTasksCapabilitySchema:()=>wc,SetLevelRequestParamsSchema:()=>wi,SetLevelRequestSchema:()=>zi,SingleSelectEnumSchemaSchema:()=>Ni,StringSchemaSchema:()=>ao,SubscribeRequestParamsSchema:()=>Bn,SubscribeRequestSchema:()=>Jn,SubscriptionFilterSchema:()=>is,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Xn,SubscriptionsAcknowledgedNotificationSchema:()=>Qn,SubscriptionsListenRequestParamsSchema:()=>Gn,SubscriptionsListenRequestSchema:()=>Yn,SubscriptionsListenResultMetaSchema:()=>ei,SubscriptionsListenResultSchema:()=>ti,TaskAugmentedRequestParamsSchema:()=>hr,TaskCreationParamsSchema:()=>Rc,TaskMetadataSchema:()=>kn,TaskSchema:()=>Xt,TaskStatusNotificationParamsSchema:()=>ea,TaskStatusNotificationSchema:()=>kc,TaskStatusSchema:()=>Qi,TextContentSchema:()=>to,TextResourceContentsSchema:()=>os,TitledMultiSelectEnumSchemaSchema:()=>ms,TitledSingleSelectEnumSchemaSchema:()=>ls,ToolAnnotationsSchema:()=>hi,ToolChoiceSchema:()=>Pi,ToolExecutionSchema:()=>fi,ToolListChangedNotificationSchema:()=>bi,ToolResultContentSchema:()=>Ti,ToolSchema:()=>gr,ToolUseContentSchema:()=>li,UnsubscribeRequestParamsSchema:()=>Wn,UnsubscribeRequestSchema:()=>Kn,UntitledMultiSelectEnumSchemaSchema:()=>ps,UntitledSingleSelectEnumSchemaSchema:()=>us});var wr=(e)=>Wo.safeParse(e).success,Sg=(e)=>Ko.safeParse(e).success,ho=(e)=>Xr.safeParse(e).success,fo=(e)=>Qr.safeParse(e).success;var vg=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";var ld=(e)=>Yo.safeParse(e).success,bg=(e)=>Qo.safeParse(e).success;var Ew="Mcp-Param-",F_="x-mcp-header",$w=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Cw=new Set(["string","integer","boolean"]);function dd(e){let t=[],r=new Map,o,s=(i,a,c)=>{if(i===null||typeof i!=="object")return;let l=i;if(F_ in l){if(!c||a.length===0)return`${Jc(a)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let f=l[F_];if(typeof f!=="string"||f.length===0)return`${Jc(a)}: x-mcp-header MUST be a non-empty string`;if(!$w.test(f))return`${Jc(a)}: x-mcp-header '${f}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let h=typeof l.type==="string"?l.type:void 0;if(h===void 0||!Cw.has(h)){let _=`${Jc(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${h??"<none>"}`;if(h!=="number")return _;o??=_}let g=f.toLowerCase(),v=r.get(g);if(v!==void 0)return`x-mcp-header '${f}' is not case-insensitively unique (also declared as '${v}')`;r.set(g,f),t.push({path:a,headerName:f,type:h})}let d=l.properties;if(d!==null&&typeof d==="object")for(let[f,h]of Object.entries(d)){let g=s(h,[...a,f],c);if(g!==void 0)return g}for(let f of Iw){let h=l[f];if(h===void 0)continue;let g=Array.isArray(h)?h:h!==null&&typeof h==="object"&&qw.has(f)?Object.values(h):[h];for(let v of g){let _=s(v,[...a,`<${f}>`],!1);if(_!==void 0)return _}}},n=s(e,[],!0);if(n!==void 0)return{valid:!1,reason:o??n};return o===void 0?{valid:!0,declarations:t}:{valid:!1,reason:o,declarations:t}}var Iw=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],qw=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Jc(e){return e.length===0?"<root>":e.join(".")}var yg="=?base64?",wg="?=";function Ow(e){if(typeof e==="string")return e;if(typeof e==="boolean")return e?"true":"false";if(typeof e==="number"){if(!Number.isFinite(e))return;if(Number.isInteger(e)&&!Number.isSafeInteger(e))return;return String(e)}}function Nw(e){if(e.length===0)return!0;if(e.startsWith(yg)&&e.endsWith(wg))return!0;if(e!==e.trim())return!0;for(let t=0;t<e.length;t++){let r=e.codePointAt(t);if(r===9||r>=32&&r<=126)continue;return!0}return!1}function jw(e){let t=new TextEncoder().encode(e),r="";for(let o of t)r+=String.fromCodePoint(o);return btoa(r)}function pd(e){return Nw(e)?`${yg}${jw(e)}${wg}`:e}function Mw(e,t){let r=e;for(let o of t){if(r===null||typeof r!=="object")return;r=r[o]}return r}function zg(e,t){let r={};for(let o of e){let s=Mw(t,o.path);if(s===void 0||s===null)continue;let n=Ow(s);if(n===void 0)continue;r[`${Ew}${o.headerName}`]=pd(n)}return r}var Ss=-32020,eP=[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32000],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[W.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[Ss,W.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[W.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[W.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[W.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[Ss],conformance:["http-header-validation"],rationale:"SEP-2243 standard `MCP-Protocol-Version` / `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The spec requires `MCP-Protocol-Version` and `Mcp-Method` on every modern *request* POST (`Mcp-Name` only for the methods that mirror `params.name` / `params.uri` / `params.taskId`, see `MCP_NAME_HEADER_SOURCE`) and names them in that order, so a request missing several is answered by the earliest. Notification POSTs are exempt: the presence half runs on requests only, so a modern-enveloped notification is dispatched even with no standard headers at all. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half — including the missing `MCP-Protocol-Version` cell, which cannot live on the edge rung without breaking body-primary classification. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[W.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[Ss],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}],tP={[W.ParseError]:400,[W.InvalidRequest]:400,[W.MethodNotFound]:404,[W.UnsupportedProtocolVersion]:400,[W.MissingRequiredClientCapability]:400,[Ss]:400},V_={"tools/call":"name","prompts/get":"name","resources/read":"uri","tasks/get":"taskId","tasks/update":"taskId","tasks/cancel":"taskId"};function Rg(e,t){let r=Object.hasOwn(V_,e)?V_[e]:void 0;if(r===void 0)return;let o=Aw(t)?t[r]:void 0;return{field:r,value:typeof o==="string"?o:void 0}}function Aw(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function Yc(e,t){return pc(e,t)}function ia(e){return new Set(e.flatMap((t)=>Object.keys(t.shape)))}function Xl(e){if(e==null)return!1;let t=typeof e;if(t!=="object"&&t!=="function")return!1;if(!("~standard"in e))return!1;return typeof e["~standard"]?.validate==="function"}var B_=!1,Ql="draft-2020-12";function Lw(e,t="input"){let r=e["~standard"],o;if(r.jsonSchema)o=r.jsonSchema[t]({target:Ql});else if(r.vendor==="zod"){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");if(!B_)B_=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.");o=lc(e,{target:Ql,io:t})}else throw Error(`Schema library "${r.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output"){if(o.type!==void 0)return o;return xg(o)?{type:"object",...o}:o}if(o.type!==void 0&&o.type!=="object")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(o.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...o}}var Uw=/^#\/(\$defs|definitions)\/([^/~%]+)$/;function xg(e,t=e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;let r=typeof e.$ref==="string"&&Uw.exec(e.$ref);if(r&&t[r[1]]?.[r[2]]?.type==="object")return!0;for(let o of["oneOf","anyOf","allOf"]){let s=e[o];if(Array.isArray(s)&&s.length>0)return s.every((n)=>n!==null&&typeof n==="object"&&(n.type==="object"||xg(n,"$id"in n?{}:t)))}return!1}function Dw(e){if(!e.path?.length)return e.message;return`${e.path.map((t)=>String(typeof t==="object"?t.key:t)).join(".")}: ${e.message}`}async function Kl(e,t){let r=await e["~standard"].validate(t);if(r.issues&&r.issues.length>0)return{success:!1,error:r.issues.map((o)=>Dw(o)).join(", ")};return{success:!0,data:r.value}}function Zw(e){let t=lc(e,{target:Ql,io:"input"});return typeof t.pattern==="string"?t.pattern:void 0}var Hw=/\\\.\\d\{(\d+)\}/;function Fw(e){let t=Hw.exec(e),r=[void 0,-1,0];if(t)r.push(Number(t[1]));return[!1,!0].flatMap((o)=>[!1,!0].flatMap((s)=>r.map((n)=>Lo({local:o,offset:s,precision:n}))))}function Vw(e,t){let r;switch(e){case"email":r=[f_()];break;case"uri":r=[hc()];break;case"date":r=[Ul()];break;case"date-time":r=Fw(t);break}return new Set(r.map((o)=>Zw(o)).filter((o)=>o!==void 0))}function Bw(e,t,r){if(r!=="zod")return!0;return Vw(e,t).has(t)}function ua(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Jw(e){try{return Lw(e,"input")}catch(t){let r=t instanceof Error?t.message:String(t);throw new se(W.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${r}`)}}var Ww=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function md(e){return Ww.has(e)||e.startsWith("x-")}var Kw=new Set(["$schema",...Object.keys(uo.shape.requestedSchema.shape)]),J_={string:ia([ao,us,ls,ds]),number:ia([co]),integer:ia([co]),boolean:ia([cs]),array:ia([ps,ms])},Gw=new Set(ao.shape.format.unwrap().options);function Yw(e,t,r,o){if(!ua(e))return e;let s=typeof e.type==="string"&&Object.hasOwn(J_,e.type)?J_[e.type]:void 0;if(s===void 0)return e;let n={};for(let[i,a]of Object.entries(e))if(s.has(i)||md(i))n[i]=a;else if(i==="pattern"&&e.type==="string"&&typeof e.format==="string"){if(!Gw.has(e.format))n[i]=a;else if(typeof a!=="string"||!Bw(e.format,a,r))o.push(`${t}.${i}`)}else o.push(`${t}.${i}`);return n}function Xw(e,t){let r={},o=[];for(let[s,n]of Object.entries(e))if(s==="properties"&&ua(n))r[s]=Object.fromEntries(Object.entries(n).map(([i,a])=>[i,Yw(a,`properties.${i}`,t,o)]));else if(Kw.has(s))r[s]=n;else if(!md(s))o.push(s);if(o.length>0)throw new se(W.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${o.join(", ")}`);return r}function Qw(e,t){if(!ua(e.properties))return t;let r=Object.entries(e.properties).filter(([,o])=>!Yc(hs,o).success).map(([o])=>`properties.${o}`);return r.length>0?r.join(", "):t}function ed(e,t,r=""){if(Array.isArray(e)&&Array.isArray(t))return e.flatMap((o,s)=>ed(o,t[s],`${r}[${s}]`));if(!ua(e)||!ua(t))return[];return Object.entries(e).flatMap(([o,s])=>{let n=r?`${r}.${o}`:o;if(!Object.prototype.hasOwnProperty.call(t,o))return md(o)?[]:[n];return ed(s,t[o],n)})}function ez(e){if(!Xl(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,r=Xw(Jw(e.requestedSchema),t),o=Yc(uo.shape.requestedSchema,r);if(!o.success)throw new se(W.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${Qw(r,o.error.message)}`);let s=ed(r,o.data);if(s.length>0)throw new se(W.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${s.join(", ")}`);let n=(o.data.required??[]).filter((i)=>!Object.prototype.hasOwnProperty.call(o.data.properties,i));if(n.length>0)throw new se(W.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${n.join(", ")}`);return{...e,mode:"form",requestedSchema:o.data}}function tz(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,r=typeof e.requestState==="string";if(!t&&!r)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}var rP=Object.assign(tz,{elicit(e){try{return{method:"elicitation/create",params:ez(e)}}catch(t){throw t instanceof se?TypeError(t.message,{cause:t}):t}},elicitUrl(e){return{method:"elicitation/create",params:{...e,mode:"url"}}},createMessage(e){return{method:"sampling/createMessage",params:e}},listRoots(){return{method:"roots/list"}}});var rz=!0,oz=10,sz=250;function kg(e){return{autoFulfill:e?.autoFulfill??rz,maxRounds:e?.maxRounds??oz}}function nz(e,t,r){let o=t!==void 0&&Object.keys(t).length>0;if(!o&&r===void 0)return e;return{...e,...o&&{inputResponses:t},...r!==void 0&&{requestState:r}}}function iz(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function az(e,t){return new Promise((r,o)=>{if(t?.aborted){o(t.reason instanceof L?t.reason:new L(A.RequestTimeout,String(t.reason)));return}let s=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e),n=()=>{clearTimeout(s),o(t?.reason instanceof L?t.reason:new L(A.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",n,{once:!0})})}function cz(e){let t=new AbortController,r=()=>t.abort(e?.reason);if(e?.addEventListener("abort",r,{once:!0}),e?.aborted)t.abort(e.reason);return{signal:t.signal,abort:(o)=>t.abort(o),dispose:()=>e?.removeEventListener("abort",r)}}async function uz(e){let{config:t,method:r,originalParams:o,requestOptions:s,hooks:n,signal:i}=e,a=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;while(!0){if(l+=1,l>t.maxRounds)throw new L(A.InputRequiredRoundsExceeded,iz(r,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});s.onprogress?.({progress:l,message:`Fulfilling input required by '${r}' (round ${l})`});let d=Object.entries(c.inputRequests??{}),f;if(d.length>0){let v=cz(i);try{let _=await Promise.all(d.map(async([y,T])=>{try{return[y,await n.dispatchInputRequest(y,T,v.signal)]}catch(O){throw v.abort(O),O}}));f=Object.fromEntries(_)}finally{v.dispose()}}else await az(sz,i);let h={...s.timeout!==void 0&&{timeout:s.timeout}};if(s.maxTotalTimeout!==void 0){let v=Date.now()-a,_=s.maxTotalTimeout-v;if(_<=0)throw new L(A.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:s.maxTotalTimeout,totalElapsed:v});h.maxTotalTimeout=_}let g=await n.retry(nz(o,f,c.requestState),h);if(vg(g)){c={inputRequests:g.inputRequests??{},...g.requestState!==void 0&&{requestState:g.requestState}};continue}return g}}var lz=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],dz={IdJagTokenExchangeResponseSchema:ra,OAuthClientInformationFullSchema:gs,OAuthClientInformationSchema:sa,OAuthClientMetadataSchema:oa,OAuthClientRegistrationErrorSchema:Dc,OAuthErrorResponseSchema:mo,OAuthMetadataSchema:lo,OAuthProtectedResourceMetadataSchema:fs,OAuthTokenRevocationRequestSchema:Zc,OAuthTokensSchema:po,OpenIdProviderDiscoveryMetadataSchema:_s,OpenIdProviderMetadataSchema:ta},Pg={},Tg={};function Eg(e,t){let r=e.slice(0,-6);Pg[r]=t,Tg[r]=(o)=>t.safeParse(o).success}for(let e of lz)Eg(e,Tw[e]);for(let[e,t]of Object.entries(dz))Eg(e,t);var pz=Object.freeze(Pg),hd=Object.freeze(Tg);function mz(e){switch(e){case"initialize":case"notifications/initialized":return Qt(void 0);case"server/discover":return Qt(Gc);default:return}}var pa=60000,hz=[Jt,Do,Gr,Ho],fz=["inputResponses","requestState"];function W_(e,t){let r=e.params;if(!ca(r))return{message:e,lifted:{}};let o=r._meta,s=ca(o)?hz.filter((c)=>(c in o)):[],n=t==="request"?fz.filter((c)=>(c in r)):[];if(s.length===0&&n.length===0)return{message:e,lifted:{}};let i={},a={...r};if(s.length>0&&ca(o)){let c={},l={...o};for(let d of s)c[d]=o[d],delete l[d];if(i.envelope=c,Object.keys(l).length>0)a._meta=l;else delete a._meta}for(let c of n){if(c==="inputResponses")i.inputResponses=a[c];if(c==="requestState")i.requestState=a[c];delete a[c]}return{message:{...e,params:a},lifted:i}}function K_(e,t){let r=e.validateResult(t,void 0);if(!r.ok&&r.reason==="not-in-era")return;return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(o){let s=e.validateResult(t,o);if(s.ok)return{value:s.value};return{issues:[{message:s.reason==="invalid"?s.message:`not-in-era: ${t}`}]}}}}}function fd(e){return()=>e}var _z=fd(void 0),gz,ma=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{gz=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??gc,this.setNotificationHandler("notifications/cancelled",(t)=>{this._oncancel(t)}),this.setNotificationHandler("notifications/progress",(t)=>{this._onprogress(t)}),this.setRequestHandler("ping",(t)=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new L(A.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){if(e.params.requestId===void 0)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,o,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:s,onTimeout:o})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new L(A.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);if(t)clearTimeout(t.timeoutId),this._timeoutInfo.delete(e)}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let r=this.transport?.onerror;this._transport.onerror=(s)=>{r?.(s),this._onerror(s)};let o=this._transport?.onmessage;this._transport.onmessage=(s,n)=>{if(o?.(s,n),ho(s)||fo(s))this._onresponse(s);else if(wr(s))this._onrequest(s,n);else if(Sg(s))this._onnotification(s,n);else this._onerror(Error(`Unknown message type: ${JSON.stringify(s)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new L(A.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let o of e.values())o(r);for(let o of t.values())o.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=W_(e,"notification"),o=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let i=Z_(t.classification);if(i!==o.era){this._onerror(Error(`Era mismatch on inbound notification '${r.method}': classified as ${i} but this instance serves ${o.era}`));return}}if(Wl(r.method)&&!o.hasNotificationMethod(r.method))return;let s=this._notificationHandlers.get(r.method),n=this.fallbackNotificationHandler;if(s===void 0&&n===void 0)return;Promise.resolve().then(()=>s===void 0?n(r):s(r,o)).catch((i)=>this._onerror(Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(e,t){let{message:r,lifted:o}=W_(e,"request"),s=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop"){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let n=this._transport,i=(_,y,T)=>{let O={jsonrpc:"2.0",id:r.id,error:{code:_,message:y,...T!==void 0&&{data:T}}};n?.send(O).catch((k)=>this._onerror(Error(`Failed to send an error response: ${k}`)))};if(t?.classification!==void 0){let _=Z_(t.classification);if(_!==s.era){this._onerror(Error(`Era mismatch on inbound request '${r.method}': classified as ${_} but this instance serves ${s.era}`));let y=t.classification.revision??_;i(W.UnsupportedProtocolVersion,`Unsupported protocol version: ${y}`,{supported:this._supportedProtocolVersions,requested:y});return}}if(Jl(r.method)&&!s.hasRequestMethod(r.method)&&!(H_(r.method)&&this._customSchemaRequestMethods.has(r.method))){i(W.MethodNotFound,"Method not found");return}let a=this._requestHandlers.get(r.method)??this.fallbackRequestHandler;if(a===void 0){i(W.MethodNotFound,"Method not found");return}let c=s.checkInboundEnvelope(o);if(c!==void 0){i(W.InvalidParams,c);return}let l=(_,y)=>this._notificationViaCodec(this._resolveOutboundCodec(_.method),_,{...y,relatedRequestId:r.id}),d=(_,y,T)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(_.method),_,y,{...T,relatedRequestId:r.id}),f=new AbortController;this._requestHandlerAbortControllers.set(r.id,f);let h=o.inputResponses===void 0?void 0:Sz(o.inputResponses),g={sessionId:n?.sessionId,mcpReq:{id:r.id,method:r.method,_meta:r.params?._meta,...o.envelope!==void 0&&{envelope:o.envelope},...h!==void 0&&{inputResponses:h.accepted},...h!==void 0&&h.droppedKeys.length>0&&{droppedInputResponseKeys:h.droppedKeys},requestState:o.requestState===void 0?_z:fd(o.requestState),signal:f.signal,send:(_,y,T)=>{let O=this._resolveOutboundCodec(_.method);if(this._assertOutboundRequestInEra(O,_.method),Xl(y))return d(_,y,T);let k=K_(O,_.method);if(k===void 0)throw TypeError(`'${_.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return d(_,k,y)},notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},v=this.buildContext(g,t);Promise.resolve().then(()=>a(r,v)).then(async(_)=>{if(f.signal.aborted)return;let y;try{y=s.encodeResult(r.method,_,this._outboundServerInfo())}catch(O){this._onerror(Error(`Failed to encode result for ${r.method}: ${O}`)),i(W.InternalError,"Internal error");return}let T={result:y,jsonrpc:"2.0",id:r.id};await n?.send(T)},async(_)=>{if(f.signal.aborted)return;let y=Number.isSafeInteger(_.code)?_.code:W.InternalError,T={jsonrpc:"2.0",id:r.id,error:{code:s.encodeErrorCode(y),message:_.message??"Internal error",..._.data!==void 0&&{data:_.data}}};await n?.send(T)}).catch((_)=>this._onerror(Error(`Failed to send response: ${_}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(r.id)===f)this._requestHandlerAbortControllers.delete(r.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,o=Number(t),s=this._progressHandlers.get(o);if(!s){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let n=this._responseHandlers.get(o),i=this._timeoutInfo.get(o);if(i&&n&&i.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(a){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),n(a);return}s(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),ho(e))r(e);else r(se.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let o=this._resolveOutboundCodec(e.method);if(Xl(t)){if(!H_(e.method))this._assertOutboundRequestInEra(o,e.method);return this._requestWithSchemaViaCodec(o,e,t,r)}this._assertOutboundRequestInEra(o,e.method);let s=K_(o,e.method);if(s===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(o,e,s,t)}_negotiatedWireCodec(){return Qt(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=mz(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Jl(t)&&!e.hasRequestMethod(t))throw new L(A.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let o=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(o,e.method),this._requestWithSchemaViaCodec(o,e,t,r)}_requestWithSchemaViaCodec(e,t,r,o){let{relatedRequestId:s,resumptionToken:n,onresumptiontoken:i,headers:a}=o??{},c=Date.now(),l,d;return new Promise((f,h)=>{let g=(R)=>{h(R)};if(!this._transport){g(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(R){g(R);return}if(o?.signal?.aborted){let R=o.signal.reason;throw R instanceof L?R:new L(A.RequestTimeout,String(R))}let v=e.era===Gc&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,_=this._requestMessageId++;d=_;let y={...t,jsonrpc:"2.0",id:_};if(o?.onprogress)this._progressHandlers.set(_,o.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:_}};let T=this._envelopeOutbound(y),O=!1,k=(R)=>{if(O)return;if(this._progressHandlers.delete(_),v===void 0){if(t.method!=="initialize")this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:_,reason:String(R)}}),{relatedRequestId:s,resumptionToken:n,onresumptiontoken:i}).catch((Z)=>this._onerror(Error(`Failed to send cancellation: ${Z}`)))}else v.abort();h(R instanceof L?R:new L(A.RequestTimeout,String(R)))};this._responseHandlers.set(_,(R)=>{if(o?.signal?.aborted)return;if(O=!0,R instanceof Error)return h(R);let Z;try{Z=e.decodeResult(t.method,R.result)}catch(X){return h(X instanceof Error?X:Error(String(X)))}if(Z.kind==="invalid")return h(Z.error);if(Z.kind==="input_required"){if(o?.allowInputRequired===!0)return f(wz(Z));let X={codec:e,request:t,resultSchema:r,options:o,flowStartedAt:c,retry:(ne,xe)=>this._requestWithSchemaViaCodec(e,ne===void 0?{method:t.method}:{method:t.method,params:ne},r,xe)};return f(this._resolveNonCompleteResult(Z,X))}let ee=Z.result;Kl(r,ee).then((X)=>{if(X.success)f(X.data);else h(new L(A.InvalidResult,`Invalid result for ${t.method}: ${X.error}`))},h)}),l=()=>k(o?.signal?.reason),o?.signal?.addEventListener("abort",l,{once:!0});let P=o?.timeout??pa,z=()=>k(new L(A.RequestTimeout,"Request timed out",{timeout:P}));this._setupTimeout(_,P,o?.maxTotalTimeout,z,o?.resetTimeoutOnProgress??!1),this._transport.send(T,{relatedRequestId:s,resumptionToken:n,onresumptiontoken:i,headers:a,requestSignal:v?.signal}).catch((R)=>{this._progressHandlers.delete(_),h(R)})}).finally(()=>{if(l)o?.signal?.removeEventListener("abort",l);if(d!==void 0)this._responseHandlers.delete(d),this._cleanupTimeout(d)})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new L(A.NotConnected,"Not connected");if(Wl(t.method)&&!e.hasNotificationMethod(t.method))throw new L(A.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let o=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;this._transport?.send(o,r).catch((s)=>this._onerror(s))});return}await this._transport.send(o,r)}setRequestHandler(e,t,r){this.assertRequestHandlerCapability(e);let o;if(typeof t==="function"){if(!Jl(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);o=(s,n)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,s);if(!a.ok&&a.reason==="not-in-era")a=i.validateInputRequest(e,s);if(!a.ok){if(a.reason==="not-in-era")throw new se(W.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(a.message)}return Promise.resolve(t(a.value,n))}}else if(r)o=async(s,n)=>{let i=await Kl(t.params,{...s.params});if(!i.success)throw new se(W.InvalidParams,`Invalid params for ${e}: ${i.error}`);return r(i.data,n)};else throw TypeError("setRequestHandler: handler is required");if(typeof t==="function")this._customSchemaRequestMethods.delete(e);else this._customSchemaRequestMethods.add(e);this._requestHandlers.set(e,this._wrapHandler(e,o))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,r){if(typeof t==="function"){if(!Wl(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(o,s)=>{let n=s.validateNotification(e,o);if(!n.ok){if(n.reason==="not-in-era")throw new se(W.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value))});return}if(!r)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async(o)=>{let s=await Kl(t.params,{...o.params});if(!s.success)throw new se(W.InvalidParams,`Invalid params for notification ${e}: ${s.error}`);await r(s.data,o)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ca(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function _d(e,t){let r={...e};for(let o in t){let s=o,n=t[s];if(n===void 0)continue;let i=r[s];r[s]=ca(i)&&ca(n)?{...i,...n}:n}return r}function Wc(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Sz(e){let t={},r=[];if(!Wc(e))return{accepted:t,droppedKeys:r};for(let[o,s]of Object.entries(e)){if(!Wc(s)||"method"in s||"result"in s){r.push(o);continue}t[o]=s}return{accepted:t,droppedKeys:r}}function G_(e){throw new L(A.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function vz(e,t,r,o,s){return{sessionId:s,mcpReq:{id:e,method:t,_meta:r?._meta,requestState:fd(void 0),signal:o,send:()=>G_("send"),notify:()=>G_("notify")}}}async function bz(e,t,r,o,s){if(!Wc(o)||typeof o.method!=="string")throw new L(A.InvalidResult,`Invalid input request '${r}': each inputRequests entry must be an embedded request object with a method`,{key:r});let n=o.method;if(!t.hasInputRequestMethod(n))throw new L(A.InvalidResult,`Invalid input request '${r}': '${n}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:r,method:n});let i=e.getRequestHandler(n);if(i===void 0)throw new L(A.CapabilityNotSupported,`Cannot fulfil input request '${r}': no handler is registered for '${n}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:r,method:n});let a=Wc(o.params)?o.params:void 0;return await i({jsonrpc:"2.0",id:r,method:n,...a!==void 0&&{params:a}},e.buildContext(vz(r,n,a,s,e.sessionId)))}function yz(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function $g(e,t,r,o){let{codec:s,request:n,options:i,flowStartedAt:a}=o,c={inputRequests:r.inputRequests,...r.requestState!==void 0&&{requestState:r.requestState}},l={dispatchInputRequest:(d,f,h)=>bz(e,s,d,f,h),retry:(d,f)=>o.retry(d,yz(i,f))};return uz({config:t,method:n.method,originalParams:n.params,firstPayload:c,flowStartedAt:a,signal:i?.signal,requestOptions:{...i?.timeout!==void 0&&{timeout:i.timeout},...i?.maxTotalTimeout!==void 0&&{maxTotalTimeout:i.maxTotalTimeout},...i?.onprogress!==void 0&&{onprogress:i.onprogress}},hooks:l})}function wz(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}/*!
|
|
67
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let r of e.seen.entries()){let n=r[1];if(t===r[0]){o(r);continue}if(e.external){let d=e.external.registry.get(r[0])?.id;if(t!==r[0]&&d){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id){o(r);continue}if(n.cycle){o(r);continue}if(n.count>1){if(e.reused==="ref"){o(r);continue}}}}function qo(e,t){let a=e.seen.get(t);if(!a)throw Error("Unprocessed schema. This is a bug in Zod.");let s=(n)=>{let u=e.seen.get(n);if(u.ref===null)return;let d=u.def??u.schema,l={...d},h=u.ref;if(u.ref=null,h){s(h);let v=e.seen.get(h),b=v.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))d.allOf=d.allOf??[],d.allOf.push(b);else Object.assign(d,b);if(Object.assign(d,l),n._zod.parent===h)for(let w in d){if(w==="$ref"||w==="allOf")continue;if(!(w in l))delete d[w]}if(b.$ref&&v.def)for(let w in d){if(w==="$ref"||w==="allOf")continue;if(w in v.def&&JSON.stringify(d[w])===JSON.stringify(v.def[w]))delete d[w]}}let p=n._zod.parent;if(p&&p!==h){s(p);let v=e.seen.get(p);if(v?.schema.$ref){if(d.$ref=v.schema.$ref,v.def)for(let b in d){if(b==="$ref"||b==="allOf")continue;if(b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.def[b]))delete d[b]}}}e.override({zodSchema:n,jsonSchema:d,path:u.path??[]})};for(let n of[...e.seen.entries()].reverse())s(n[0]);let i={};if(e.target==="draft-2020-12")i.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")i.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")i.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,a.def??a.schema);let o=e.metadataRegistry.get(t)?.id;if(o!==void 0&&i.id===o)delete i.id;let r=e.external?.defs??{};for(let n of e.seen.entries()){let u=n[1];if(u.def&&u.defId){if(u.def.id===u.defId)delete u.def.id;r[u.defId]=u.def}}if(e.external);else if(Object.keys(r).length>0)if(e.target==="draft-2020-12")i.$defs=r;else i.definitions=r;try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:So(t,"input",e.processors),output:So(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(n){throw Error("Error converting schema to JSON.")}}function De(e,t){let a=t??{seen:new Set};if(a.seen.has(e))return!1;a.seen.add(e);let s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return De(s.element,a);if(s.type==="set")return De(s.valueType,a);if(s.type==="lazy")return De(s.getter(),a);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return De(s.innerType,a);if(s.type==="intersection")return De(s.left,a)||De(s.right,a);if(s.type==="record"||s.type==="map")return De(s.keyType,a)||De(s.valueType,a);if(s.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return De(s.in,a)||De(s.out,a)}if(s.type==="object"){for(let i in s.shape)if(De(s.shape[i],a))return!0;return!1}if(s.type==="union"){for(let i of s.options)if(De(i,a))return!0;return!1}if(s.type==="tuple"){for(let i of s.items)if(De(i,a))return!0;if(s.rest&&De(s.rest,a))return!0;return!1}return!1}var ef=(e,t={})=>(a)=>{let s=xo({...a,processors:t});return ue(e,s),Ro(s,e),qo(s,e)},So=(e,t,a={})=>(s)=>{let{libraryOptions:i,target:o}=s??{},r=xo({...i??{},target:o,io:t,processors:a});return ue(e,r),Ro(r,e),qo(r,e)};var w0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$d=(e,t,a,s)=>{let i=a;i.type="string";let{minimum:o,maximum:r,format:n,patterns:u,contentEncoding:d}=e._zod.bag;if(typeof o==="number")i.minLength=o;if(typeof r==="number")i.maxLength=r;if(n){if(i.format=w0[n]??n,i.format==="")delete i.format;if(n==="time")delete i.format}if(d)i.contentEncoding=d;if(u&&u.size>0){let l=[...u];if(l.length===1)i.pattern=l[0].source;else if(l.length>1)i.allOf=[...l.map((h)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))]}},Md=(e,t,a,s)=>{let i=a,{minimum:o,maximum:r,format:n,multipleOf:u,exclusiveMaximum:d,exclusiveMinimum:l}=e._zod.bag;if(typeof n==="string"&&n.includes("int"))i.type="integer";else i.type="number";let h=typeof l==="number"&&l>=(o??Number.NEGATIVE_INFINITY),p=typeof d==="number"&&d<=(r??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";if(h)if(v)i.minimum=l,i.exclusiveMinimum=!0;else i.exclusiveMinimum=l;else if(typeof o==="number")i.minimum=o;if(p)if(v)i.maximum=d,i.exclusiveMaximum=!0;else i.exclusiveMaximum=d;else if(typeof r==="number")i.maximum=r;if(typeof u==="number")i.multipleOf=u},Nd=(e,t,a,s)=>{a.type="boolean"},af=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},sf=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},Id=(e,t,a,s)=>{if(t.target==="openapi-3.0")a.type="string",a.nullable=!0,a.enum=[null];else a.type="null"},Od=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},of=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},Ad=(e,t,a,s)=>{a.not={}},Ld=(e,t,a,s)=>{},Ud=(e,t,a,s)=>{},rf=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},Dd=(e,t,a,s)=>{let i=e._zod.def,o=ec(i.entries);if(o.every((r)=>typeof r==="number"))a.type="number";if(o.every((r)=>typeof r==="string"))a.type="string";a.enum=o},Zd=(e,t,a,s)=>{let i=e._zod.def,o=[];for(let r of i.values)if(r===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof r==="bigint")if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else o.push(Number(r));else o.push(r);if(o.length===0);else if(o.length===1){let r=o[0];if(a.type=r===null?"null":typeof r,t.target==="draft-04"||t.target==="openapi-3.0")a.enum=[r];else a.const=r}else{if(o.every((r)=>typeof r==="number"))a.type="number";if(o.every((r)=>typeof r==="string"))a.type="string";if(o.every((r)=>typeof r==="boolean"))a.type="boolean";if(o.every((r)=>r===null))a.type="null";a.enum=o}},nf=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},cf=(e,t,a,s)=>{let i=a,o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},uf=(e,t,a,s)=>{let i=a,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:r,maximum:n,mime:u}=e._zod.bag;if(r!==void 0)o.minLength=r;if(n!==void 0)o.maxLength=n;if(u)if(u.length===1)o.contentMediaType=u[0],Object.assign(i,o);else Object.assign(i,o),i.anyOf=u.map((d)=>({contentMediaType:d}));else Object.assign(i,o)},df=(e,t,a,s)=>{a.type="boolean"},Bd=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},lf=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},Hd=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},mf=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},_f=(e,t,a,s)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},Fd=(e,t,a,s)=>{let i=a,o=e._zod.def,{minimum:r,maximum:n}=e._zod.bag;if(typeof r==="number")i.minItems=r;if(typeof n==="number")i.maxItems=n;i.type="array",i.items=ue(o.element,t,{...s,path:[...s.path,"items"]})},Vd=(e,t,a,s)=>{let i=a,o=e._zod.def;i.type="object",i.properties={};let r=o.shape;for(let d in r)i.properties[d]=ue(r[d],t,{...s,path:[...s.path,"properties",d]});let n=new Set(Object.keys(r)),u=new Set([...n].filter((d)=>{let l=o.shape[d]._zod;if(t.io==="input")return l.optin===void 0;else return l.optout===void 0}));if(u.size>0)i.required=Array.from(u);if(o.catchall?._zod.def.type==="never")i.additionalProperties=!1;else if(!o.catchall){if(t.io==="output")i.additionalProperties=!1}else if(o.catchall)i.additionalProperties=ue(o.catchall,t,{...s,path:[...s.path,"additionalProperties"]})},Jd=(e,t,a,s)=>{let i=e._zod.def,o=i.inclusive===!1,r=i.options.map((n,u)=>ue(n,t,{...s,path:[...s.path,o?"oneOf":"anyOf",u]}));if(o)a.oneOf=r;else a.anyOf=r},Wd=(e,t,a,s)=>{let i=e._zod.def,o=ue(i.left,t,{...s,path:[...s.path,"allOf",0]}),r=ue(i.right,t,{...s,path:[...s.path,"allOf",1]}),n=(d)=>("allOf"in d)&&Object.keys(d).length===1,u=[...n(o)?o.allOf:[o],...n(r)?r.allOf:[r]];a.allOf=u},pf=(e,t,a,s)=>{let i=a,o=e._zod.def;i.type="array";let r=t.target==="draft-2020-12"?"prefixItems":"items",n=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((p,v)=>ue(p,t,{...s,path:[...s.path,r,v]})),d=o.rest?ue(o.rest,t,{...s,path:[...s.path,n,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;if(t.target==="draft-2020-12"){if(i.prefixItems=u,d)i.items=d}else if(t.target==="openapi-3.0"){if(i.items={anyOf:u},d)i.items.anyOf.push(d);if(i.minItems=u.length,!d)i.maxItems=u.length}else if(i.items=u,d)i.additionalItems=d;let{minimum:l,maximum:h}=e._zod.bag;if(typeof l==="number")i.minItems=l;if(typeof h==="number")i.maxItems=h},Gd=(e,t,a,s)=>{let i=a,o=e._zod.def;i.type="object";let r=o.keyType,u=r._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let l=ue(o.valueType,t,{...s,path:[...s.path,"patternProperties","*"]});i.patternProperties={};for(let h of u)i.patternProperties[h.source]=l}else{if(t.target==="draft-07"||t.target==="draft-2020-12")i.propertyNames=ue(o.keyType,t,{...s,path:[...s.path,"propertyNames"]});i.additionalProperties=ue(o.valueType,t,{...s,path:[...s.path,"additionalProperties"]})}let d=r._zod.values;if(d){let l=[...d].filter((h)=>typeof h==="string"||typeof h==="number");if(l.length>0)i.required=l}},Kd=(e,t,a,s)=>{let i=e._zod.def,o=ue(i.innerType,t,s),r=t.seen.get(e);if(t.target==="openapi-3.0")r.ref=i.innerType,a.nullable=!0;else a.anyOf=[o,{type:"null"}]},Yd=(e,t,a,s)=>{let i=e._zod.def;ue(i.innerType,t,s);let o=t.seen.get(e);o.ref=i.innerType},Xd=(e,t,a,s)=>{let i=e._zod.def;ue(i.innerType,t,s);let o=t.seen.get(e);o.ref=i.innerType,a.default=JSON.parse(JSON.stringify(i.defaultValue))},Qd=(e,t,a,s)=>{let i=e._zod.def;ue(i.innerType,t,s);let o=t.seen.get(e);if(o.ref=i.innerType,t.io==="input")a._prefault=JSON.parse(JSON.stringify(i.defaultValue))},el=(e,t,a,s)=>{let i=e._zod.def;ue(i.innerType,t,s);let o=t.seen.get(e);o.ref=i.innerType;let r;try{r=i.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}a.default=r},tl=(e,t,a,s)=>{let i=e._zod.def,o=i.in._zod.traits.has("$ZodTransform"),r=t.io==="input"?o?i.out:i.in:i.out;ue(r,t,s);let n=t.seen.get(e);n.ref=r},al=(e,t,a,s)=>{let i=e._zod.def;ue(i.innerType,t,s);let o=t.seen.get(e);o.ref=i.innerType,a.readOnly=!0},hf=(e,t,a,s)=>{let i=e._zod.def;ue(i.innerType,t,s);let o=t.seen.get(e);o.ref=i.innerType},hc=(e,t,a,s)=>{let i=e._zod.def;ue(i.innerType,t,s);let o=t.seen.get(e);o.ref=i.innerType},sl=(e,t,a,s)=>{let i=e._zod.innerType;ue(i,t,s);let o=t.seen.get(e);o.ref=i},tf={string:$d,number:Md,boolean:Nd,bigint:af,symbol:sf,null:Id,undefined:Od,void:of,never:Ad,any:Ld,unknown:Ud,date:rf,enum:Dd,literal:Zd,nan:nf,template_literal:cf,file:uf,success:df,custom:Bd,function:lf,transform:Hd,map:mf,set:_f,array:Fd,object:Vd,union:Jd,intersection:Wd,tuple:pf,record:Gd,nullable:Kd,nonoptional:Yd,default:Xd,prefault:Qd,catch:el,pipe:tl,readonly:al,promise:hf,optional:hc,lazy:sl};function fc(e,t){if("_idmap"in e){let s=e,i=xo({...t,processors:tf}),o={};for(let u of s._idmap.entries()){let[d,l]=u;ue(l,i)}let r={},n={registry:s,uri:t?.uri,defs:o};i.external=n;for(let u of s._idmap.entries()){let[d,l]=u;Ro(i,l),r[d]=qo(i,l)}if(Object.keys(o).length>0){let u=i.target==="draft-2020-12"?"$defs":"definitions";r.__shared={[u]:o}}return{schemas:r}}let a=xo({...t,processors:tf});return ue(e,a),Ro(a,e),qo(a,e)}var q0=z("ZodISODateTime",(e,t)=>{Pp.init(e,t),pe.init(e,t)});function Ds(e){return Ah(q0,e)}var j0=z("ZodISODate",(e,t)=>{Tp.init(e,t),pe.init(e,t)});function il(e){return Lh(j0,e)}var P0=z("ZodISOTime",(e,t)=>{Cp.init(e,t),pe.init(e,t)});function ff(e){return Uh(P0,e)}var T0=z("ZodISODuration",(e,t)=>{Ep.init(e,t),pe.init(e,t)});function gf(e){return Dh(T0,e)}var C0=(e,t)=>{ic.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(a)=>rd(e,a)},flatten:{value:(a)=>od(e,a)},addIssue:{value:(a)=>{e.issues.push(a),e.message=JSON.stringify(e.issues,fo,2)}},addIssues:{value:(a)=>{e.issues.push(...a),e.message=JSON.stringify(e.issues,fo,2)}},isEmpty:{get(){return e.issues.length===0}}})};var st=z("ZodError",C0,{Parent:Error});var wf=oc(st),bf=rc(st),vc=vo(st),yf=wo(st),kf=m_(st),zf=__(st),Sf=p_(st),xf=h_(st),Rf=f_(st),qf=g_(st),jf=v_(st),Pf=w_(st);var Tf=new WeakMap;function jo(e,t,a){let s=Object.getPrototypeOf(e),i=Tf.get(s);if(!i)i=new Set,Tf.set(s,i);if(i.has(t))return;i.add(t);for(let o in a){let r=a[o];Object.defineProperty(s,o,{configurable:!0,enumerable:!1,get(){let n=r.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(n){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:n})}})}}var de=z("ZodType",(e,t)=>(ce.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:So(e,"input"),output:So(e,"output")}}),e.toJSONSchema=ef(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(a,s)=>wf(e,a,s,{callee:e.parse}),e.safeParse=(a,s)=>vc(e,a,s),e.parseAsync=async(a,s)=>bf(e,a,s,{callee:e.parseAsync}),e.safeParseAsync=async(a,s)=>yf(e,a,s),e.spa=e.safeParseAsync,e.encode=(a,s)=>kf(e,a,s),e.decode=(a,s)=>zf(e,a,s),e.encodeAsync=async(a,s)=>Sf(e,a,s),e.decodeAsync=async(a,s)=>xf(e,a,s),e.safeEncode=(a,s)=>Rf(e,a,s),e.safeDecode=(a,s)=>qf(e,a,s),e.safeEncodeAsync=async(a,s)=>jf(e,a,s),e.safeDecodeAsync=async(a,s)=>Pf(e,a,s),jo(e,"ZodType",{check(...a){let s=this.def;return this.clone(ua(s,{checks:[...s.checks??[],...a.map((i)=>typeof i==="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...a){return this.check(...a)},clone(a,s){return _t(this,a,s)},brand(){return this},register(a,s){return a.add(this,s),this},refine(a,s){return this.check(bb(a,s))},superRefine(a,s){return this.check(yb(a,s))},overwrite(a){return this.check(_a(a))},optional(){return H(this)},exactOptional(){return rb(this)},nullable(){return Mf(this)},nullish(){return H(Mf(this))},nonoptional(a){return mb(this,a)},array(){return y(this)},or(a){return E([this,a])},and(a){return Vt(this,a)},transform(a){return Nf(this,Hf(a))},default(a){return ub(this,a)},prefault(a){return lb(this,a)},catch(a){return pb(this,a)},pipe(a){return Nf(this,a)},readonly(){return gb(this)},describe(a){let s=this.clone();return ma.add(s,{description:a}),s},meta(...a){if(a.length===0)return ma.get(this);let s=this.clone();return ma.add(s,a[0]),s},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(a){return a(this)}}),Object.defineProperty(e,"description",{get(){return ma.get(e)?.description},configurable:!0}),e)),If=z("_ZodString",(e,t)=>{uc.init(e,t),de.init(e,t),e._zod.processJSONSchema=(s,i,o)=>$d(e,s,i,o);let a=e._zod.bag;e.format=a.format??null,e.minLength=a.minimum??null,e.maxLength=a.maximum??null,jo(e,"_ZodString",{regex(...s){return this.check(kd(...s))},includes(...s){return this.check(xd(...s))},startsWith(...s){return this.check(Rd(...s))},endsWith(...s){return this.check(qd(...s))},min(...s){return this.check(Ls(...s))},max(...s){return this.check(_c(...s))},length(...s){return this.check(pc(...s))},nonempty(...s){return this.check(Ls(1,...s))},lowercase(s){return this.check(zd(s))},uppercase(s){return this.check(Sd(s))},trim(){return this.check(Pd())},normalize(...s){return this.check(jd(...s))},toLowerCase(){return this.check(Td())},toUpperCase(){return this.check(Cd())},slugify(){return this.check(Ed())}})}),Of=z("ZodString",(e,t)=>{uc.init(e,t),If.init(e,t),e.email=(a)=>e.check(wd(Af,a)),e.url=(a)=>e.check(yd(Uf,a)),e.jwt=(a)=>e.check(Oh(J0,a)),e.emoji=(a)=>e.check(zh($0,a)),e.guid=(a)=>e.check(bd(Cf,a)),e.uuid=(a)=>e.check(wh(wc,a)),e.uuidv4=(a)=>e.check(bh(wc,a)),e.uuidv6=(a)=>e.check(yh(wc,a)),e.uuidv7=(a)=>e.check(kh(wc,a)),e.nanoid=(a)=>e.check(Sh(M0,a)),e.guid=(a)=>e.check(bd(Cf,a)),e.cuid=(a)=>e.check(xh(N0,a)),e.cuid2=(a)=>e.check(Rh(I0,a)),e.ulid=(a)=>e.check(qh(O0,a)),e.base64=(a)=>e.check(Mh(H0,a)),e.base64url=(a)=>e.check(Nh(F0,a)),e.xid=(a)=>e.check(jh(A0,a)),e.ksuid=(a)=>e.check(Ph(L0,a)),e.ipv4=(a)=>e.check(Th(U0,a)),e.ipv6=(a)=>e.check(Ch(D0,a)),e.cidrv4=(a)=>e.check(Eh(Z0,a)),e.cidrv6=(a)=>e.check($h(B0,a)),e.e164=(a)=>e.check(Ih(V0,a)),e.datetime=(a)=>e.check(Ds(a)),e.date=(a)=>e.check(il(a)),e.time=(a)=>e.check(ff(a)),e.duration=(a)=>e.check(gf(a))});function c(e){return vh(Of,e)}var pe=z("ZodStringFormat",(e,t)=>{_e.init(e,t),If.init(e,t)}),Af=z("ZodEmail",(e,t)=>{bp.init(e,t),pe.init(e,t)});function Lf(e){return wd(Af,e)}var Cf=z("ZodGUID",(e,t)=>{vp.init(e,t),pe.init(e,t)});var wc=z("ZodUUID",(e,t)=>{wp.init(e,t),pe.init(e,t)});var Uf=z("ZodURL",(e,t)=>{yp.init(e,t),pe.init(e,t)});function bc(e){return yd(Uf,e)}var $0=z("ZodEmoji",(e,t)=>{kp.init(e,t),pe.init(e,t)});var M0=z("ZodNanoID",(e,t)=>{zp.init(e,t),pe.init(e,t)});var N0=z("ZodCUID",(e,t)=>{Sp.init(e,t),pe.init(e,t)});var I0=z("ZodCUID2",(e,t)=>{xp.init(e,t),pe.init(e,t)});var O0=z("ZodULID",(e,t)=>{Rp.init(e,t),pe.init(e,t)});var A0=z("ZodXID",(e,t)=>{qp.init(e,t),pe.init(e,t)});var L0=z("ZodKSUID",(e,t)=>{jp.init(e,t),pe.init(e,t)});var U0=z("ZodIPv4",(e,t)=>{$p.init(e,t),pe.init(e,t)});var D0=z("ZodIPv6",(e,t)=>{Mp.init(e,t),pe.init(e,t)});var Z0=z("ZodCIDRv4",(e,t)=>{Np.init(e,t),pe.init(e,t)});var B0=z("ZodCIDRv6",(e,t)=>{Ip.init(e,t),pe.init(e,t)});var H0=z("ZodBase64",(e,t)=>{Ap.init(e,t),pe.init(e,t)});var F0=z("ZodBase64URL",(e,t)=>{Lp.init(e,t),pe.init(e,t)});var V0=z("ZodE164",(e,t)=>{Up.init(e,t),pe.init(e,t)});var J0=z("ZodJWT",(e,t)=>{Dp.init(e,t),pe.init(e,t)});var yc=z("ZodNumber",(e,t)=>{pd.init(e,t),de.init(e,t),e._zod.processJSONSchema=(s,i,o)=>Md(e,s,i,o),jo(e,"ZodNumber",{gt(s,i){return this.check(lc(s,i))},gte(s,i){return this.check(zo(s,i))},min(s,i){return this.check(zo(s,i))},lt(s,i){return this.check(dc(s,i))},lte(s,i){return this.check(ko(s,i))},max(s,i){return this.check(ko(s,i))},int(s){return this.check(Ef(s))},safe(s){return this.check(Ef(s))},positive(s){return this.check(lc(0,s))},nonnegative(s){return this.check(zo(0,s))},negative(s){return this.check(dc(0,s))},nonpositive(s){return this.check(ko(0,s))},multipleOf(s,i){return this.check(mc(s,i))},step(s,i){return this.check(mc(s,i))},finite(){return this}});let a=e._zod.bag;e.minValue=Math.max(a.minimum??Number.NEGATIVE_INFINITY,a.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(a.maximum??Number.POSITIVE_INFINITY,a.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(a.format??"").includes("int")||Number.isSafeInteger(a.multipleOf??0.5),e.isFinite=!0,e.format=a.format??null});function q(e){return Zh(yc,e)}var W0=z("ZodNumberFormat",(e,t)=>{Zp.init(e,t),yc.init(e,t)});function Ef(e){return Hh(W0,e)}var Df=z("ZodBoolean",(e,t)=>{Bp.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Nd(e,a,s,i)});function C(e){return Fh(Df,e)}var G0=z("ZodUndefined",(e,t)=>{Hp.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Od(e,a,s,i)});function rl(e){return Vh(G0,e)}var K0=z("ZodNull",(e,t)=>{Fp.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Id(e,a,s,i)});function Ga(e){return Jh(K0,e)}var Y0=z("ZodAny",(e,t)=>{Vp.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Ld(e,a,s,i)});function kc(){return Wh(Y0)}var X0=z("ZodUnknown",(e,t)=>{Jp.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Ud(e,a,s,i)});function D(){return Gh(X0)}var Q0=z("ZodNever",(e,t)=>{Wp.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Ad(e,a,s,i)});function nl(e){return Kh(Q0,e)}var eb=z("ZodArray",(e,t)=>{Gp.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Fd(e,a,s,i),e.element=t.element,jo(e,"ZodArray",{min(a,s){return this.check(Ls(a,s))},nonempty(a){return this.check(Ls(1,a))},max(a,s){return this.check(_c(a,s))},length(a,s){return this.check(pc(a,s))},unwrap(){return this.element}})});function y(e,t){return Yh(eb,e,t)}var Zf=z("ZodObject",(e,t)=>{Xp.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Vd(e,a,s,i),ae(e,"shape",()=>t.shape),jo(e,"ZodObject",{keyof(){return Y(Object.keys(this._zod.def.shape))},catchall(a){return this.clone({...this._zod.def,catchall:a})},passthrough(){return this.clone({...this._zod.def,catchall:D()})},loose(){return this.clone({...this._zod.def,catchall:D()})},strict(){return this.clone({...this._zod.def,catchall:nl()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(a){return o0(this,a)},safeExtend(a){return r0(this,a)},merge(a){return n0(this,a)},pick(a){return s0(this,a)},omit(a){return i0(this,a)},partial(...a){return c0(Ff,this,a[0])},required(...a){return u0(Vf,this,a[0])}})});function _(e,t){let a={type:"object",shape:e??{},...Z(t)};return new Zf(a)}function F(e,t){return new Zf({type:"object",shape:e,catchall:D(),...Z(t)})}var Bf=z("ZodUnion",(e,t)=>{hd.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Jd(e,a,s,i),e.options=t.options});function E(e,t){return new Bf({type:"union",options:e,...Z(t)})}var tb=z("ZodDiscriminatedUnion",(e,t)=>{Bf.init(e,t),Qp.init(e,t)});function Zs(e,t,a){return new tb({type:"union",options:t,discriminator:e,...Z(a)})}var ab=z("ZodIntersection",(e,t)=>{eh.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Wd(e,a,s,i)});function Vt(e,t){return new ab({type:"intersection",left:e,right:t})}var $f=z("ZodRecord",(e,t)=>{th.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Gd(e,a,s,i),e.keyType=t.keyType,e.valueType=t.valueType});function T(e,t,a){if(!t||!t._zod)return new $f({type:"record",keyType:c(),valueType:e,...Z(t)});return new $f({type:"record",keyType:e,valueType:t,...Z(a)})}var ol=z("ZodEnum",(e,t)=>{ah.init(e,t),de.init(e,t),e._zod.processJSONSchema=(s,i,o)=>Dd(e,s,i,o),e.enum=t.entries,e.options=Object.values(t.entries);let a=new Set(Object.keys(t.entries));e.extract=(s,i)=>{let o={};for(let r of s)if(a.has(r))o[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new ol({...t,checks:[],...Z(i),entries:o})},e.exclude=(s,i)=>{let o={...t.entries};for(let r of s)if(a.has(r))delete o[r];else throw Error(`Key ${r} not found in enum`);return new ol({...t,checks:[],...Z(i),entries:o})}});function Y(e,t){let a=Array.isArray(e)?Object.fromEntries(e.map((s)=>[s,s])):e;return new ol({type:"enum",entries:a,...Z(t)})}var sb=z("ZodLiteral",(e,t)=>{sh.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Zd(e,a,s,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function f(e,t){return new sb({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}var ib=z("ZodTransform",(e,t)=>{ih.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Hd(e,a,s,i),e._zod.parse=(a,s)=>{if(s.direction==="backward")throw new ho(e.constructor.name);a.addIssue=(o)=>{if(typeof o==="string")a.issues.push(Wa(o,a.value,t));else{let r=o;if(r.fatal)r.continue=!1;r.code??(r.code="custom"),r.input??(r.input=a.value),r.inst??(r.inst=e),a.issues.push(Wa(r))}};let i=t.transform(a.value,a);if(i instanceof Promise)return i.then((o)=>(a.value=o,a.fallback=!0,a));return a.value=i,a.fallback=!0,a}});function Hf(e){return new ib({type:"transform",transform:e})}var Ff=z("ZodOptional",(e,t)=>{fd.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>hc(e,a,s,i),e.unwrap=()=>e._zod.def.innerType});function H(e){return new Ff({type:"optional",innerType:e})}var ob=z("ZodExactOptional",(e,t)=>{oh.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>hc(e,a,s,i),e.unwrap=()=>e._zod.def.innerType});function rb(e){return new ob({type:"optional",innerType:e})}var nb=z("ZodNullable",(e,t)=>{rh.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Kd(e,a,s,i),e.unwrap=()=>e._zod.def.innerType});function Mf(e){return new nb({type:"nullable",innerType:e})}var cb=z("ZodDefault",(e,t)=>{nh.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Xd(e,a,s,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ub(e,t){return new cb({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():ad(t)}})}var db=z("ZodPrefault",(e,t)=>{ch.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Qd(e,a,s,i),e.unwrap=()=>e._zod.def.innerType});function lb(e,t){return new db({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():ad(t)}})}var Vf=z("ZodNonOptional",(e,t)=>{uh.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Yd(e,a,s,i),e.unwrap=()=>e._zod.def.innerType});function mb(e,t){return new Vf({type:"nonoptional",innerType:e,...Z(t)})}var _b=z("ZodCatch",(e,t)=>{dh.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>el(e,a,s,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pb(e,t){return new _b({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}var Jf=z("ZodPipe",(e,t)=>{gd.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>tl(e,a,s,i),e.in=t.in,e.out=t.out});function Nf(e,t){return new Jf({type:"pipe",in:e,out:t})}var hb=z("ZodPreprocess",(e,t)=>{Jf.init(e,t),lh.init(e,t)}),fb=z("ZodReadonly",(e,t)=>{mh.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>al(e,a,s,i),e.unwrap=()=>e._zod.def.innerType});function gb(e){return new fb({type:"readonly",innerType:e})}var vb=z("ZodLazy",(e,t)=>{_h.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>sl(e,a,s,i),e.unwrap=()=>e._zod.def.getter()});function Po(e){return new vb({type:"lazy",getter:e})}var wb=z("ZodCustom",(e,t)=>{ph.init(e,t),de.init(e,t),e._zod.processJSONSchema=(a,s,i)=>Bd(e,a,s,i)});function bb(e,t={}){return Xh(wb,e,t)}function yb(e,t){return Qh(e,t)}function Ka(e,t){return new hb({type:"pipe",in:Hf(e),out:t})}var Gf={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};var Wf;(function(e){})(Wf||(Wf={}));function kb(e){return Bh(yc,e)}We(vd());var Ya="2025-11-25";var zc=[Ya,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Sc="io.modelcontextprotocol/related-task",Wt="io.modelcontextprotocol/protocolVersion",Bs="io.modelcontextprotocol/clientInfo",$t="io.modelcontextprotocol/serverInfo",Xa="io.modelcontextprotocol/clientCapabilities",Hs="io.modelcontextprotocol/subscriptionId",Fs="io.modelcontextprotocol/logLevel";var Qa="2.0";var Jt=Po(()=>E([c(),q(),C(),Ga(),T(c(),Jt),y(Jt)])),he=T(c(),Jt),xc=y(Jt),Vs=E([c(),q().int()]),Js=c(),To=_({ttl:q().optional()}),Co=_({taskId:c()}),Ws=F({progressToken:Vs.optional(),[Sc]:Co.optional()}),xe=_({_meta:Ws.optional()}),ha=xe.extend({task:To.optional()}),fe=_({method:c(),params:xe.loose().optional()}),Me=_({_meta:Ws.optional()}),Pe=_({method:c(),params:Me.loose().optional()}),Gs=F({get[$t](){return Mt.optional().catch(void 0)}}),ge=F({_meta:Gs.optional()}),ht=E([c(),q().int()]),Ks=_({jsonrpc:f(Qa),id:ht,...fe.shape}).strict(),Ys=_({jsonrpc:f(Qa),...Pe.shape}).strict(),es=_({jsonrpc:f(Qa),id:ht,result:ge}).strict(),ts=_({jsonrpc:f(Qa),id:ht.optional(),error:_({code:q().int(),message:c(),data:D().optional()})}).strict(),ft=E([Ks,Ys,es,ts]),Rc=E([es,ts]),fa=ge.strict(),Eo=Me.extend({requestId:ht.optional(),reason:c().optional()}),Xs=Pe.extend({method:f("notifications/cancelled"),params:Eo}),$o=_({src:c(),mimeType:c().optional(),sizes:y(c()).optional(),theme:Y(["light","dark"]).optional()}),Gt=_({icons:y($o).optional()}),Et=_({name:c(),title:c().optional()}),Mt=Et.extend({...Et.shape,...Gt.shape,version:c(),websiteUrl:c().optional(),description:c().optional()}),zb=Vt(_({applyDefaults:C().optional()}),he),Sb=Ka((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)&&Object.keys(e).length===0)return{form:{}};return e},Vt(_({form:zb.optional(),url:he.optional()}),he.optional())),qc=F({list:he.optional(),cancel:he.optional(),requests:F({sampling:F({createMessage:he.optional()}).optional(),elicitation:F({create:he.optional()}).optional()}).optional()}),jc=F({list:he.optional(),cancel:he.optional(),requests:F({tools:F({call:he.optional()}).optional()}).optional()}),Mo=_({experimental:T(c(),he).optional(),sampling:_({context:he.optional(),tools:he.optional()}).optional(),elicitation:Sb.optional(),roots:_({listChanged:C().optional()}).optional(),tasks:qc.optional(),extensions:T(c(),he).optional()}),No=xe.extend({protocolVersion:c(),capabilities:Mo,clientInfo:Mt}),Qs=fe.extend({method:f("initialize"),params:No}),ei=_({experimental:T(c(),he).optional(),logging:he.optional(),completions:he.optional(),prompts:_({listChanged:C().optional()}).optional(),resources:_({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:_({listChanged:C().optional()}).optional(),tasks:jc.optional(),extensions:T(c(),he).optional()}),Io=ge.extend({protocolVersion:c(),capabilities:ei,serverInfo:Mt,instructions:c().optional()}),ti=Pe.extend({method:f("notifications/initialized"),params:Me.optional()}),Oo=fe.extend({method:f("server/discover"),params:xe.optional()}),ga=ge.extend({supportedVersions:y(c()),capabilities:ei,instructions:c().optional()}),ai=fe.extend({method:f("ping"),params:xe.optional()}),Ao=_({progress:q(),total:H(q()),message:H(c())}),Lo=_({...Me.shape,...Ao.shape,progressToken:Vs}),si=Pe.extend({method:f("notifications/progress"),params:Lo}),Uo=xe.extend({cursor:Js.optional()}),Kt=fe.extend({params:Uo.optional()}),Yt=ge.extend({nextCursor:Js.optional()}),ii=_({uri:c(),mimeType:H(c()),_meta:T(c(),D()).optional()}),oi=ii.extend({text:c()}),cl=c().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),ri=ii.extend({blob:cl}),Xt=Y(["user","assistant"]),Nt=_({audience:y(Xt).optional(),priority:q().min(0).max(1).optional(),lastModified:Ds({offset:!0}).optional()}),ni=_({...Et.shape,...Gt.shape,uri:c(),description:H(c()),mimeType:H(c()),size:H(q()),annotations:Nt.optional(),_meta:H(F({}))}),Do=_({...Et.shape,...Gt.shape,uriTemplate:c(),description:H(c()),mimeType:H(c()),annotations:Nt.optional(),_meta:H(F({}))}),Zo=Kt.extend({method:f("resources/list")}),Bo=Yt.extend({resources:y(ni)}),Ho=Kt.extend({method:f("resources/templates/list")}),Fo=Yt.extend({resourceTemplates:y(Do)}),as=xe.extend({uri:c()}),Vo=as,Jo=fe.extend({method:f("resources/read"),params:Vo}),Wo=ge.extend({contents:y(E([oi,ri]))}),Go=Pe.extend({method:f("notifications/resources/list_changed"),params:Me.optional()}),Ko=as,Yo=fe.extend({method:f("resources/subscribe"),params:Ko}),Xo=as,Qo=fe.extend({method:f("resources/unsubscribe"),params:Xo}),ci=_({toolsListChanged:C().optional(),promptsListChanged:C().optional(),resourcesListChanged:C().optional(),resourceSubscriptions:y(c()).optional()}),er=xe.extend({notifications:ci}),tr=fe.extend({method:f("subscriptions/listen"),params:er}),ar=Me.extend({notifications:ci}),sr=Pe.extend({method:f("notifications/subscriptions/acknowledged"),params:ar}),ir=Gs.extend({[Hs]:ht}),or=ge.extend({_meta:ir}),rr=Me.extend({uri:c()}),nr=Pe.extend({method:f("notifications/resources/updated"),params:rr}),cr=_({name:c(),description:H(c()),required:H(C())}),ur=_({...Et.shape,...Gt.shape,description:H(c()),arguments:H(y(cr)),_meta:H(F({}))}),dr=Kt.extend({method:f("prompts/list")}),lr=Yt.extend({prompts:y(ur)}),mr=xe.extend({name:c(),arguments:T(c(),c()).optional()}),_r=fe.extend({method:f("prompts/get"),params:mr}),ss=_({type:f("text"),text:c(),annotations:Nt.optional(),_meta:T(c(),D()).optional()}),is=_({type:f("image"),data:cl,mimeType:c(),annotations:Nt.optional(),_meta:T(c(),D()).optional()}),os=_({type:f("audio"),data:cl,mimeType:c(),annotations:Nt.optional(),_meta:T(c(),D()).optional()}),pr=_({type:f("tool_use"),name:c(),id:c(),input:T(c(),D()),_meta:T(c(),D()).optional()}),rs=_({type:f("resource"),resource:E([oi,ri]),annotations:Nt.optional(),_meta:T(c(),D()).optional()}),ns=ni.extend({type:f("resource_link")}),It=E([ss,is,os,ns,rs]),hr=_({role:Xt,content:It}),fr=ge.extend({description:c().optional(),messages:y(hr)}),gr=Pe.extend({method:f("notifications/prompts/list_changed"),params:Me.optional()}),vr=_({title:c().optional(),readOnlyHint:C().optional(),destructiveHint:C().optional(),idempotentHint:C().optional(),openWorldHint:C().optional()}),wr=_({taskSupport:Y(["required","optional","forbidden"]).optional()}),va=_({...Et.shape,...Gt.shape,description:c().optional(),inputSchema:_({type:f("object"),properties:T(c(),Jt).optional(),required:y(c()).optional()}).catchall(D()),outputSchema:F({$schema:c().optional()}).optional(),annotations:vr.optional(),execution:wr.optional(),_meta:T(c(),D()).optional()}),br=Kt.extend({method:f("tools/list")}),yr=Yt.extend({tools:y(va)}),wa=ge.extend({content:y(It).default([]),structuredContent:D().optional(),isError:C().optional()}),Pc=wa.or(ge.extend({toolResult:D()})),kr=ha.extend({name:c(),arguments:T(c(),D()).optional()}),zr=fe.extend({method:f("tools/call"),params:kr}),Sr=Pe.extend({method:f("notifications/tools/list_changed"),params:Me.optional()}),xr=_({autoRefresh:C().default(!0),debounceMs:q().int().nonnegative().default(300)}),ui=Y(["debug","info","notice","warning","error","critical","alert","emergency"]),Rr=xe.extend({level:ui}),qr=fe.extend({method:f("logging/setLevel"),params:Rr}),jr=Me.extend({level:ui,logger:c().optional(),data:D()}),cs=Pe.extend({method:f("notifications/message"),params:jr}),Pr=_({name:c().optional()}),Tr=_({hints:y(Pr).optional(),costPriority:q().min(0).max(1).optional(),speedPriority:q().min(0).max(1).optional(),intelligencePriority:q().min(0).max(1).optional()}),Cr=_({mode:Y(["auto","required","none"]).optional()}),Er=_({type:f("tool_result"),toolUseId:c().describe("The unique identifier for the corresponding tool call."),content:y(It),structuredContent:D().optional(),isError:C().optional(),_meta:T(c(),D()).optional()}),$r=Zs("type",[ss,is,os]),pa=Zs("type",[ss,is,os,pr,Er]),Mr=_({role:Xt,content:E([pa,y(pa)]),_meta:T(c(),D()).optional()}),Nr=ha.extend({messages:y(Mr),modelPreferences:Tr.optional(),systemPrompt:c().optional(),includeContext:Y(["none","thisServer","allServers"]).optional(),temperature:q().optional(),maxTokens:q().int(),stopSequences:y(c()).optional(),metadata:he.optional(),tools:y(va).optional(),toolChoice:Cr.optional()}),Ir=fe.extend({method:f("sampling/createMessage"),params:Nr}),Or=ge.extend({model:c(),stopReason:H(Y(["endTurn","stopSequence","maxTokens"]).or(c())),role:Xt,content:$r}),Ar=ge.extend({model:c(),stopReason:H(Y(["endTurn","stopSequence","maxTokens","toolUse"]).or(c())),role:Xt,content:E([pa,y(pa)])}),di=_({type:f("boolean"),title:c().optional(),description:c().optional(),default:C().optional()}),us=_({type:f("string"),title:c().optional(),description:c().optional(),minLength:q().optional(),maxLength:q().optional(),format:Y(["email","uri","date","date-time"]).optional(),default:c().optional()}),ds=_({type:Y(["number","integer"]),title:c().optional(),description:c().optional(),minimum:q().optional(),maximum:q().optional(),default:q().optional()}),li=_({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),default:c().optional()}),mi=_({type:f("string"),title:c().optional(),description:c().optional(),oneOf:y(_({const:c(),title:c()})),default:c().optional()}),_i=_({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),enumNames:y(c()).optional(),default:c().optional()}),Lr=E([li,mi]),pi=_({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:_({type:f("string"),enum:y(c())}),default:y(c()).optional()}),hi=_({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:_({anyOf:y(_({const:c(),title:c()}))}),default:y(c()).optional()}),Ur=E([pi,hi]),Dr=E([_i,Lr,Ur]),fi=E([Dr,di,us,ds]),ls=ha.extend({mode:f("form").optional(),message:c(),requestedSchema:_({type:f("object"),properties:T(c(),fi),required:y(c()).optional()}).catchall(D())}),Zr=ha.extend({mode:f("url"),message:c(),elicitationId:c(),url:c().url()}),Br=E([ls,Zr]),Hr=fe.extend({method:f("elicitation/create"),params:Br}),Fr=Me.extend({elicitationId:c()}),Vr=Pe.extend({method:f("notifications/elicitation/complete"),params:Fr}),Jr=ge.extend({action:Y(["accept","decline","cancel"]),content:Ka((e)=>e===null?void 0:e,T(c(),E([c(),q(),C(),y(c())])).optional())}),Wr=_({type:f("ref/resource"),uri:c()}),Gr=_({type:f("ref/prompt"),name:c()}),Kr=xe.extend({ref:E([Gr,Wr]),argument:_({name:c(),value:c()}),context:_({arguments:T(c(),c()).optional()}).optional()}),Yr=fe.extend({method:f("completion/complete"),params:Kr}),Xr=ge.extend({completion:F({values:y(c()).max(100),total:H(q().int()),hasMore:H(C())})}),Qr=_({uri:c().startsWith("file://"),name:c().optional(),_meta:T(c(),D()).optional()}),en=fe.extend({method:f("roots/list"),params:xe.optional()}),tn=ge.extend({roots:y(Qr)}),an=Pe.extend({method:f("notifications/roots/list_changed"),params:Me.optional()}),Tc=F({ttl:q().optional(),pollInterval:q().optional()}),sn=Y(["working","input_required","completed","failed","cancelled"]),Qt=_({taskId:c(),status:sn,ttl:E([q(),Ga()]),createdAt:c(),lastUpdatedAt:c(),pollInterval:H(q()),statusMessage:H(c())}),Cc=ge.extend({task:Qt}),on=Me.merge(Qt),Ec=Pe.extend({method:f("notifications/tasks/status"),params:on}),$c=fe.extend({method:f("tasks/get"),params:xe.extend({taskId:c()})}),Mc=ge.merge(Qt),Nc=fe.extend({method:f("tasks/result"),params:xe.extend({taskId:c()})}),Ic=ge.loose(),Oc=Kt.extend({method:f("tasks/list")}),Ac=Yt.extend({tasks:y(Qt)}),Lc=fe.extend({method:f("tasks/cancel"),params:xe.extend({taskId:c()})}),Uc=ge.merge(Qt),Dc=E([ai,Qs,Oo,Yr,qr,_r,dr,Zo,Ho,Jo,Yo,Qo,tr,zr,br]),Zc=E([Xs,si,ti,an]),Bc=E([fa,Or,Ar,Jr,tn]),Hc=E([ai,Ir,Hr,en]),Fc=E([Xs,si,cs,nr,Go,Sr,gr,sr,Vr]),Vc=E([fa,Io,ga,Xr,fr,lr,Bo,Fo,Wo,wa,yr,or]);var Re=bc().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Gf.custom,message:"URL must be parseable",fatal:!0}),Yu}).refine((e)=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),gi=F({resource:c().url(),authorization_servers:y(Re).optional(),jwks_uri:c().url().optional(),scopes_supported:y(c()).optional(),bearer_methods_supported:y(c()).optional(),resource_signing_alg_values_supported:y(c()).optional(),resource_name:c().optional(),resource_documentation:c().optional(),resource_policy_uri:c().url().optional(),resource_tos_uri:c().url().optional(),tls_client_certificate_bound_access_tokens:C().optional(),authorization_details_types_supported:y(c()).optional(),dpop_signing_alg_values_supported:y(c()).optional(),dpop_bound_access_tokens_required:C().optional()}),ms=F({issuer:c(),authorization_endpoint:Re,token_endpoint:Re,registration_endpoint:Re.optional(),scopes_supported:y(c()).optional(),response_types_supported:y(c()),response_modes_supported:y(c()).optional(),grant_types_supported:y(c()).optional(),token_endpoint_auth_methods_supported:y(c()).optional(),token_endpoint_auth_signing_alg_values_supported:y(c()).optional(),service_documentation:Re.optional(),revocation_endpoint:Re.optional(),revocation_endpoint_auth_methods_supported:y(c()).optional(),revocation_endpoint_auth_signing_alg_values_supported:y(c()).optional(),introspection_endpoint:c().optional(),introspection_endpoint_auth_methods_supported:y(c()).optional(),introspection_endpoint_auth_signing_alg_values_supported:y(c()).optional(),code_challenge_methods_supported:y(c()).optional(),client_id_metadata_document_supported:C().optional(),authorization_response_iss_parameter_supported:C().optional().catch(void 0),dpop_signing_alg_values_supported:y(c()).optional()}),rn=F({issuer:c(),authorization_endpoint:Re,token_endpoint:Re,userinfo_endpoint:Re.optional(),jwks_uri:Re,registration_endpoint:Re.optional(),scopes_supported:y(c()).optional(),response_types_supported:y(c()),response_modes_supported:y(c()).optional(),grant_types_supported:y(c()).optional(),acr_values_supported:y(c()).optional(),subject_types_supported:y(c()),id_token_signing_alg_values_supported:y(c()),id_token_encryption_alg_values_supported:y(c()).optional(),id_token_encryption_enc_values_supported:y(c()).optional(),userinfo_signing_alg_values_supported:y(c()).optional(),userinfo_encryption_alg_values_supported:y(c()).optional(),userinfo_encryption_enc_values_supported:y(c()).optional(),request_object_signing_alg_values_supported:y(c()).optional(),request_object_encryption_alg_values_supported:y(c()).optional(),request_object_encryption_enc_values_supported:y(c()).optional(),token_endpoint_auth_methods_supported:y(c()).optional(),token_endpoint_auth_signing_alg_values_supported:y(c()).optional(),display_values_supported:y(c()).optional(),claim_types_supported:y(c()).optional(),claims_supported:y(c()).optional(),service_documentation:c().optional(),claims_locales_supported:y(c()).optional(),ui_locales_supported:y(c()).optional(),claims_parameter_supported:C().optional(),request_parameter_supported:C().optional(),request_uri_parameter_supported:C().optional(),require_request_uri_registration:C().optional(),op_policy_uri:Re.optional(),op_tos_uri:Re.optional(),client_id_metadata_document_supported:C().optional(),authorization_response_iss_parameter_supported:C().optional().catch(void 0)}),vi=_({...rn.shape,...ms.pick({code_challenge_methods_supported:!0}).shape}),_s=_({access_token:c(),id_token:c().optional(),token_type:c(),expires_in:kb().optional(),scope:c().optional(),refresh_token:c().optional(),issuer:c().optional().catch(void 0)}).strip(),nn=_({issued_token_type:f("urn:ietf:params:oauth:token-type:id-jag"),access_token:c(),token_type:c().optional(),expires_in:q().optional(),scope:c().optional()}).strip(),ps=_({error:c(),error_description:c().optional(),error_uri:c().optional()}),ul=Re.optional().or(f("").transform(()=>{return})),cn=_({redirect_uris:y(Re),token_endpoint_auth_method:c().optional(),grant_types:y(c()).optional(),response_types:y(c()).optional(),application_type:c().optional(),client_name:c().optional(),client_uri:Re.optional(),logo_uri:ul,scope:c().optional(),contacts:y(c()).optional(),tos_uri:ul,policy_uri:c().optional(),jwks_uri:Re.optional(),jwks:kc().optional(),software_id:c().optional(),software_version:c().optional(),software_statement:c().optional()}).strip(),un=_({client_id:c(),client_secret:c().optional(),client_id_issued_at:q().optional(),client_secret_expires_at:q().optional(),issuer:c().optional().catch(void 0)}).strip(),wi=cn.merge(un),Jc=_({error:c(),error_description:c().optional()}).strip(),Wc=_({token:c(),token_type_hint:c().optional()}).strip();var pl=Symbol.for("mcp.sdk.errorBrands");function ya(e,t){let a=new Set,s=t;while(typeof s==="function"){let i=s.mcpBrand;if(Object.prototype.hasOwnProperty.call(s,"mcpBrand")&&typeof i==="string")a.add(i);s=Object.getPrototypeOf(s)}if(a.size===0)return;Object.defineProperty(e,pl,{value:a,enumerable:!1,configurable:!0})}function Ge(e,t){try{if(typeof t==="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand==="string"&&Object.prototype.hasOwnProperty.call(t,pl)){let a=t[pl];if(a&&typeof a.has==="function"&&a.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var Ot=function(e){return e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedGrantType="unsupported_grant_type",e.InvalidScope="invalid_scope",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedTokenType="unsupported_token_type",e.InvalidToken="invalid_token",e.MethodNotAllowed="method_not_allowed",e.TooManyRequests="too_many_requests",e.InvalidClientMetadata="invalid_client_metadata",e.InvalidRedirectUri="invalid_redirect_uri",e.InsufficientScope="insufficient_scope",e.InvalidTarget="invalid_target",e.InvalidDpopProof="invalid_dpop_proof",e.UseDpopNonce="use_dpop_nonce",e}({}),ka=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](t){return Ge(this,t)}static isInstance(t){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ge(this,t)}constructor(t,a,s){super(a);this.code=t,this.errorUri=s,this.name="OAuthError",ya(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};if(this.errorUri)t.error_uri=this.errorUri;return t}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},A=function(e){return e.NotConnected="NOT_CONNECTED",e.AlreadyConnected="ALREADY_CONNECTED",e.NotInitialized="NOT_INITIALIZED",e.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",e.RequestTimeout="REQUEST_TIMEOUT",e.ConnectionClosed="CONNECTION_CLOSED",e.SendFailed="SEND_FAILED",e.InvalidResult="INVALID_RESULT",e.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",e.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",e.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",e.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",e.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",e.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",e.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",e.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",e.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",e.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",e.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",e}({}),L=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return Ge(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ge(this,e)}constructor(e,t,a,s){super(t,s);this.code=e,this.data=a,this.name="SdkError",ya(this,new.target)}},gt=class extends L{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,a,s){super(e,t,a,s);this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function wl(e){let t=typeof e==="string"?new URL(e):new URL(e.href);return t.hash="",t}function tu(e){if(typeof e!=="object"||e===null||Array.isArray(e))return e;let t={...e};return delete t.issuer,t}function bl({requestedResource:e,configuredResource:t}){let a=typeof e==="string"?new URL(e):new URL(e.href),s=typeof t==="string"?new URL(t):new URL(t.href);if(a.origin!==s.origin)return!1;if(a.pathname.length<s.pathname.length)return!1;let i=a.pathname.endsWith("/")?a.pathname:a.pathname+"/",o=s.pathname.endsWith("/")?s.pathname:s.pathname+"/";return i.startsWith(o)}var k1="2026-07-28",yl=[k1];function At(e){return e>=k1}function kl(e){return e.filter((t)=>!At(t))}function hn(e){return e.filter((t)=>At(t))}function z1(e){let t=e.structuredContent;if(t===void 0)return e;if(!(typeof t!=="object"||t===null||Array.isArray(t)))return e;if(e.content?.some((a)=>a.type==="text")??!1)return e;return{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var S1=["task","inputRequests","requestState"];function xb(e){if(e===null||typeof e!=="object"||Array.isArray(e)||e.content!==void 0||S1.some((t)=>(t in e)))return e;return{...e,content:[]}}function Rb(){let e=Po(()=>E([c(),q(),C(),Ga(),T(c(),e),y(e)])),t=T(c(),e),a=E([c(),q().int()]),s=c(),i=_({ttl:q().optional()}),o=_({taskId:c()}),r=F({progressToken:a.optional(),"io.modelcontextprotocol/related-task":o.optional()}),n=_({_meta:r.optional()}),u=n.extend({task:i.optional()}),d=_({method:c(),params:n.loose().optional()}),l=_({_meta:r.optional()}),h=_({method:c(),params:l.loose().optional()}),p=F({_meta:r.optional()}),v=E([c(),q().int()]),b=p.strict(),g=l.extend({requestId:v.optional(),reason:c().optional()}),w=h.extend({method:f("notifications/cancelled"),params:g}),R=_({src:c(),mimeType:c().optional(),sizes:y(c()).optional(),theme:Y(["light","dark"]).optional()}),j=_({icons:y(R).optional()}),x=_({name:c(),title:c().optional()}),P=x.extend({...x.shape,...j.shape,version:c(),websiteUrl:c().optional(),description:c().optional()}),S=Vt(_({applyDefaults:C().optional()}),t),k=Ka(($e)=>{if($e&&typeof $e==="object"&&!Array.isArray($e)&&Object.keys($e).length===0)return{form:{}};return $e},Vt(_({form:S.optional(),url:t.optional()}),t.optional())),N=F({list:t.optional(),cancel:t.optional(),requests:F({sampling:F({createMessage:t.optional()}).optional(),elicitation:F({create:t.optional()}).optional()}).optional()}),X=F({list:t.optional(),cancel:t.optional(),requests:F({tools:F({call:t.optional()}).optional()}).optional()}),K=_({experimental:T(c(),t).optional(),sampling:_({context:t.optional(),tools:t.optional()}).optional(),elicitation:k.optional(),roots:_({listChanged:C().optional()}).optional(),tasks:N.optional(),extensions:T(c(),t).optional()}),se=n.extend({protocolVersion:c(),capabilities:K,clientInfo:P}),we=d.extend({method:f("initialize"),params:se}),te=_({experimental:T(c(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:_({listChanged:C().optional()}).optional(),resources:_({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:_({listChanged:C().optional()}).optional(),tasks:X.optional(),extensions:T(c(),t).optional()}),ie=p.extend({protocolVersion:c(),capabilities:te,serverInfo:P,instructions:c().optional()}),B=h.extend({method:f("notifications/initialized"),params:l.optional()}),re=d.extend({method:f("ping"),params:n.optional()}),zt=_({progress:q(),total:H(q()),message:H(c())}),He=_({...l.shape,...zt.shape,progressToken:a}),rt=h.extend({method:f("notifications/progress"),params:He}),St=n.extend({cursor:s.optional()}),Xe=d.extend({params:St.optional()}),Oe=p.extend({nextCursor:s.optional()}),Bt=_({uri:c(),mimeType:H(c()),_meta:T(c(),D()).optional()}),Ht=Bt.extend({text:c()}),xt=c().refine(($e)=>{try{return atob($e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ce=Bt.extend({blob:xt}),Ae=Y(["user","assistant"]),Le=_({audience:y(Ae).optional(),priority:q().min(0).max(1).optional(),lastModified:Ds({offset:!0}).optional()}),lt=_({...x.shape,...j.shape,uri:c(),description:H(c()),mimeType:H(c()),size:H(q()),annotations:Le.optional(),_meta:H(F({}))}),Ma=_({...x.shape,...j.shape,uriTemplate:c(),description:H(c()),mimeType:H(c()),annotations:Le.optional(),_meta:H(F({}))}),Qe=Xe.extend({method:f("resources/list")}),et=Oe.extend({resources:y(lt)}),Fe=Xe.extend({method:f("resources/templates/list")}),nt=Oe.extend({resourceTemplates:y(Ma)}),ct=n.extend({uri:c()}),Rt=ct,qt=d.extend({method:f("resources/read"),params:Rt}),oa=p.extend({contents:y(E([Ht,Ce]))}),jt=h.extend({method:f("notifications/resources/list_changed"),params:l.optional()}),Na=ct,I=d.extend({method:f("resources/subscribe"),params:Na}),Pt=ct,V=d.extend({method:f("resources/unsubscribe"),params:Pt}),U=l.extend({uri:c()}),ee=h.extend({method:f("notifications/resources/updated"),params:U}),O=_({name:c(),description:H(c()),required:H(C())}),M=_({...x.shape,...j.shape,description:H(c()),arguments:H(y(O)),_meta:H(F({}))}),G=Xe.extend({method:f("prompts/list")}),J=Oe.extend({prompts:y(M)}),ke=n.extend({name:c(),arguments:T(c(),c()).optional()}),Ia=d.extend({method:f("prompts/get"),params:ke}),Tt=_({type:f("text"),text:c(),annotations:Le.optional(),_meta:T(c(),D()).optional()}),Oa=_({type:f("image"),data:xt,mimeType:c(),annotations:Le.optional(),_meta:T(c(),D()).optional()}),Aa=_({type:f("audio"),data:xt,mimeType:c(),annotations:Le.optional(),_meta:T(c(),D()).optional()}),Ui=_({type:f("tool_use"),name:c(),id:c(),input:T(c(),D()),_meta:T(c(),D()).optional()}),ra=_({type:f("resource"),resource:E([Ht,Ce]),annotations:Le.optional(),_meta:T(c(),D()).optional()}),Di=lt.extend({type:f("resource_link")}),ut=E([Tt,Oa,Aa,Di,ra]),Rs=_({role:Ae,content:ut}),qs=p.extend({description:c().optional(),messages:y(Rs)}),La=h.extend({method:f("notifications/prompts/list_changed"),params:l.optional()}),Zi=_({title:c().optional(),readOnlyHint:C().optional(),destructiveHint:C().optional(),idempotentHint:C().optional(),openWorldHint:C().optional()}),js=_({taskSupport:Y(["required","optional","forbidden"]).optional()}),Ua=_({...x.shape,...j.shape,description:c().optional(),inputSchema:_({type:f("object"),properties:T(c(),e).optional(),required:y(c()).optional()}).catchall(D()),outputSchema:_({type:f("object"),properties:T(c(),e).optional(),required:y(c()).optional()}).catchall(D()).optional(),annotations:Zi.optional(),execution:js.optional(),_meta:T(c(),D()).optional()}),Ps=Xe.extend({method:f("tools/list")}),Ts=Oe.extend({tools:y(Ua)}),Cs=p.extend({content:y(ut),structuredContent:T(c(),D()).optional(),isError:C().optional()}),Ee=u.extend({name:c(),arguments:T(c(),D()).optional()}),Bi=d.extend({method:f("tools/call"),params:Ee}),Nn=h.extend({method:f("notifications/tools/list_changed"),params:l.optional()}),Es=Y(["debug","info","notice","warning","error","critical","alert","emergency"]),Hi=n.extend({level:Es}),Fi=d.extend({method:f("logging/setLevel"),params:Hi}),Vi=l.extend({level:Es,logger:c().optional(),data:D()}),Ji=h.extend({method:f("notifications/message"),params:Vi}),Wi=_({name:c().optional()}),Gi=_({hints:y(Wi).optional(),costPriority:q().min(0).max(1).optional(),speedPriority:q().min(0).max(1).optional(),intelligencePriority:q().min(0).max(1).optional()}),Ki=_({mode:Y(["auto","required","none"]).optional()}),In=_({type:f("tool_result"),toolUseId:c().describe("The unique identifier for the corresponding tool call."),content:y(ut),structuredContent:_({}).loose().optional(),isError:C().optional(),_meta:T(c(),D()).optional()}),Yi=Zs("type",[Tt,Oa,Aa]),na=Zs("type",[Tt,Oa,Aa,Ui,In]),Xi=_({role:Ae,content:E([na,y(na)]),_meta:T(c(),D()).optional()}),Qi=u.extend({messages:y(Xi),modelPreferences:Gi.optional(),systemPrompt:c().optional(),includeContext:Y(["none","thisServer","allServers"]).optional(),temperature:q().optional(),maxTokens:q().int(),stopSequences:y(c()).optional(),metadata:t.optional(),tools:y(Ua).optional(),toolChoice:Ki.optional()}),eo=d.extend({method:f("sampling/createMessage"),params:Qi}),to=p.extend({model:c(),stopReason:H(Y(["endTurn","stopSequence","maxTokens"]).or(c())),role:Ae,content:Yi}),ao=p.extend({model:c(),stopReason:H(Y(["endTurn","stopSequence","maxTokens","toolUse"]).or(c())),role:Ae,content:E([na,y(na)])}),so=_({type:f("boolean"),title:c().optional(),description:c().optional(),default:C().optional()}),io=_({type:f("string"),title:c().optional(),description:c().optional(),minLength:q().optional(),maxLength:q().optional(),format:Y(["email","uri","date","date-time"]).optional(),default:c().optional()}),oo=_({type:Y(["number","integer"]),title:c().optional(),description:c().optional(),minimum:q().optional(),maximum:q().optional(),default:q().optional()}),ro=_({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),default:c().optional()}),no=_({type:f("string"),title:c().optional(),description:c().optional(),oneOf:y(_({const:c(),title:c()})),default:c().optional()}),co=_({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),enumNames:y(c()).optional(),default:c().optional()}),uo=E([ro,no]),Da=_({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:_({type:f("string"),enum:y(c())}),default:y(c()).optional()}),Za=_({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:_({anyOf:y(_({const:c(),title:c()}))}),default:y(c()).optional()}),On=E([Da,Za]),An=E([co,uo,On]),tt=E([An,so,io,oo]),at=u.extend({mode:f("form").optional(),message:c(),requestedSchema:_({type:f("object"),properties:T(c(),tt),required:y(c()).optional()}).catchall(D())}),lo=u.extend({mode:f("url"),message:c(),elicitationId:c(),url:c().url()}),mt=E([at,lo]),Ln=d.extend({method:f("elicitation/create"),params:mt}),Un=l.extend({elicitationId:c()}),Dn=h.extend({method:f("notifications/elicitation/complete"),params:Un}),Zn=p.extend({action:Y(["accept","decline","cancel"]),content:Ka(($e)=>$e===null?void 0:$e,T(c(),E([c(),q(),C(),y(c())])).optional())}),Bn=_({type:f("ref/resource"),uri:c()}),Hn=_({type:f("ref/prompt"),name:c()}),Fn=n.extend({ref:E([Hn,Bn]),argument:_({name:c(),value:c()}),context:_({arguments:T(c(),c()).optional()}).optional()}),mo=d.extend({method:f("completion/complete"),params:Fn}),Vn=p.extend({completion:F({values:y(c()).max(100),total:H(q().int()),hasMore:H(C())})}),Jn=_({uri:c().startsWith("file://"),name:c().optional(),_meta:T(c(),D()).optional()}),$s=d.extend({method:f("roots/list"),params:n.optional()}),_o=p.extend({roots:y(Jn)}),Wn=h.extend({method:f("notifications/roots/list_changed"),params:l.optional()}),Gn=F({ttl:q().optional(),pollInterval:q().optional()}),po=Y(["working","input_required","completed","failed","cancelled"]),ca=_({taskId:c(),status:po,ttl:E([q(),Ga()]),createdAt:c(),lastUpdatedAt:c(),pollInterval:H(q()),statusMessage:H(c())}),Ve=p.extend({task:ca}),Kn=l.merge(ca),Ba=h.extend({method:f("notifications/tasks/status"),params:Kn}),Ms=d.extend({method:f("tasks/get"),params:n.extend({taskId:c()})}),Ns=p.merge(ca),Is=d.extend({method:f("tasks/result"),params:n.extend({taskId:c()})}),Wu=p.loose(),Ue=Xe.extend({method:f("tasks/list")}),be=Oe.extend({tasks:y(ca)}),Ha=d.extend({method:f("tasks/cancel"),params:n.extend({taskId:c()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:a,CursorSchema:s,TaskMetadataSchema:i,RelatedTaskMetadataSchema:o,RequestMetaSchema:r,BaseRequestParamsSchema:n,TaskAugmentedRequestParamsSchema:u,RequestSchema:d,NotificationsParamsSchema:l,NotificationSchema:h,ResultSchema:p,RequestIdSchema:v,EmptyResultSchema:b,CancelledNotificationParamsSchema:g,CancelledNotificationSchema:w,IconSchema:R,IconsSchema:j,BaseMetadataSchema:x,ImplementationSchema:P,ClientTasksCapabilitySchema:N,ServerTasksCapabilitySchema:X,ClientCapabilitiesSchema:K,InitializeRequestParamsSchema:se,InitializeRequestSchema:we,ServerCapabilitiesSchema:te,InitializeResultSchema:ie,InitializedNotificationSchema:B,PingRequestSchema:re,ProgressSchema:zt,ProgressNotificationParamsSchema:He,ProgressNotificationSchema:rt,PaginatedRequestParamsSchema:St,PaginatedRequestSchema:Xe,PaginatedResultSchema:Oe,ResourceContentsSchema:Bt,TextResourceContentsSchema:Ht,BlobResourceContentsSchema:Ce,RoleSchema:Ae,AnnotationsSchema:Le,ResourceSchema:lt,ResourceTemplateSchema:Ma,ListResourcesRequestSchema:Qe,ListResourcesResultSchema:et,ListResourceTemplatesRequestSchema:Fe,ListResourceTemplatesResultSchema:nt,ResourceRequestParamsSchema:ct,ReadResourceRequestParamsSchema:Rt,ReadResourceRequestSchema:qt,ReadResourceResultSchema:oa,ResourceListChangedNotificationSchema:jt,SubscribeRequestParamsSchema:Na,SubscribeRequestSchema:I,UnsubscribeRequestParamsSchema:Pt,UnsubscribeRequestSchema:V,ResourceUpdatedNotificationParamsSchema:U,ResourceUpdatedNotificationSchema:ee,PromptArgumentSchema:O,PromptSchema:M,ListPromptsRequestSchema:G,ListPromptsResultSchema:J,GetPromptRequestParamsSchema:ke,GetPromptRequestSchema:Ia,TextContentSchema:Tt,ImageContentSchema:Oa,AudioContentSchema:Aa,ToolUseContentSchema:Ui,EmbeddedResourceSchema:ra,ResourceLinkSchema:Di,ContentBlockSchema:ut,PromptMessageSchema:Rs,GetPromptResultSchema:qs,PromptListChangedNotificationSchema:La,ToolAnnotationsSchema:Zi,ToolExecutionSchema:js,ToolSchema:Ua,ListToolsRequestSchema:Ps,ListToolsResultSchema:Ts,CallToolResultSchema:Cs,CallToolRequestParamsSchema:Ee,CallToolRequestSchema:Bi,ToolListChangedNotificationSchema:Nn,LoggingLevelSchema:Es,SetLevelRequestParamsSchema:Hi,SetLevelRequestSchema:Fi,LoggingMessageNotificationParamsSchema:Vi,LoggingMessageNotificationSchema:Ji,ModelHintSchema:Wi,ModelPreferencesSchema:Gi,ToolChoiceSchema:Ki,ToolResultContentSchema:In,SamplingContentSchema:Yi,SamplingMessageContentBlockSchema:na,SamplingMessageSchema:Xi,CreateMessageRequestParamsSchema:Qi,CreateMessageRequestSchema:eo,CreateMessageResultSchema:to,CreateMessageResultWithToolsSchema:ao,BooleanSchemaSchema:so,StringSchemaSchema:io,NumberSchemaSchema:oo,UntitledSingleSelectEnumSchemaSchema:ro,TitledSingleSelectEnumSchemaSchema:no,LegacyTitledEnumSchemaSchema:co,SingleSelectEnumSchemaSchema:uo,UntitledMultiSelectEnumSchemaSchema:Da,TitledMultiSelectEnumSchemaSchema:Za,MultiSelectEnumSchemaSchema:On,EnumSchemaSchema:An,PrimitiveSchemaDefinitionSchema:tt,ElicitRequestFormParamsSchema:at,ElicitRequestURLParamsSchema:lo,ElicitRequestParamsSchema:mt,ElicitRequestSchema:Ln,ElicitationCompleteNotificationParamsSchema:Un,ElicitationCompleteNotificationSchema:Dn,ElicitResultSchema:Zn,ResourceTemplateReferenceSchema:Bn,PromptReferenceSchema:Hn,CompleteRequestParamsSchema:Fn,CompleteRequestSchema:mo,CompleteResultSchema:Vn,RootSchema:Jn,ListRootsRequestSchema:$s,ListRootsResultSchema:_o,RootsListChangedNotificationSchema:Wn,TaskCreationParamsSchema:Gn,TaskStatusSchema:po,TaskSchema:ca,CreateTaskResultSchema:Ve,TaskStatusNotificationParamsSchema:Kn,TaskStatusNotificationSchema:Ba,GetTaskRequestSchema:Ms,GetTaskResultSchema:Ns,GetTaskPayloadRequestSchema:Is,GetTaskPayloadResultSchema:Wu,ListTasksRequestSchema:Ue,ListTasksResultSchema:be,CancelTaskRequestSchema:Ha,CancelTaskResultSchema:p.merge(ca),ClientRequestSchema:E([re,we,mo,Fi,Ia,G,Qe,Fe,qt,I,V,Bi,Ps,Ms,Is,Ue,Ha]),ClientNotificationSchema:E([w,rt,B,Wn,Ba]),ClientResultSchema:E([b,to,ao,Zn,_o,Ns,be,Ve]),ServerRequestSchema:E([re,eo,Ln,$s,Ms,Is,Ue,Ha]),ServerNotificationSchema:E([w,rt,Ji,ee,jt,Nn,La,Ba,Dn]),ServerResultSchema:E([b,ie,Vn,qs,J,et,nt,oa,Cs,Ts,Ns,be,Ve]),CallToolResultWireSchema:D().superRefine(($e,Vw)=>{if(typeof $e!=="object"||$e===null||Array.isArray($e)||$e.content!==void 0)return;for(let Fm of S1)if(Fm in $e){Vw.addIssue({code:"custom",message:`content is required when the body carries '${Fm}' — another result family cannot default into an empty tools/call success`});return}}).transform(xb).pipe(Cs)}}var qb;function x1(){return qb??=Rb()}function R1(e){return e.type!=="object"}var jb=new Set(["const","enum","default","examples"]),Pb=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function c1(e){return e!==void 0&&!(typeof e==="string"&&e.startsWith("#"))}function Tb(e){let t=typeof e.$schema==="string"?e.$schema:void 0;if(c1(e.$id))return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let a=Ym(e.$schema)&&e.$recursiveAnchor!==!0,s=(i,o)=>{if(Array.isArray(i))return i.map((u)=>s(u,!1));if(i===null||typeof i!=="object")return i;if(!o&&c1(i.$id))return i;let r={},n=!1;for(let[u,d]of Object.entries(i))if(o)r[u]=s(d,!1);else if((u==="$ref"||u==="$dynamicRef")&&typeof d==="string")r[u]=d==="#"?"#/properties/result":d.startsWith("#/")?`#/properties/result${d.slice(1)}`:d;else if(u==="$recursiveRef"&&d==="#"&&a)n=!0;else if(jb.has(u))r[u]=d;else if(Pb.has(u))r[u]=s(d,!0);else r[u]=s(d,!1);if(n)if("$ref"in r)r.allOf=[...Array.isArray(r.allOf)?r.allOf:[],{$ref:"#/properties/result"}];else r.$ref="#/properties/result";return r};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:s(e,!1)},required:["result"]}}var q1={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},j1={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Cb={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Gc;function zl(){if(Gc)return Gc;let e=x1();return Gc={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Gc}function P1(e){return Object.prototype.hasOwnProperty.call(q1,e)}function T1(e){return Object.prototype.hasOwnProperty.call(j1,e)}function Eb(e){return Object.prototype.hasOwnProperty.call(Cb,e)}function $b(e){return Eb(e)?zl().resultSchemas[e]:void 0}function Mb(e){return P1(e)?zl().requestSchemas[e]:void 0}function Nb(e){return T1(e)?zl().notificationSchemas[e]:void 0}var pq=Object.keys(q1),hq=Object.keys(j1);function hl(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function Kc(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let a=e.safeParse(t);return a.success?{ok:!0,value:a.data}:{ok:!1,reason:"invalid",message:String(a.error)}}var u1={ok:!1,reason:"not-in-era"};function d1(e){return hl(e)&&hl(e.outputSchema)&&R1(e.outputSchema)}function l1(e){return e}var Sl={era:"2025-11-25",hasRequestMethod:P1,hasNotificationMethod:T1,validateRequest:(e,t)=>Kc(Mb(e),t),validateResult:(e,t)=>Kc($b(e),t),validateNotification:(e,t)=>Kc(Nb(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>u1,validateInputResponse:()=>u1,samplingResultVariant:(e,t)=>{let a=x1();return Kc(e?a.CreateMessageResultWithToolsSchema:a.CreateMessageResultSchema,t)},outboundEnvelope:(e)=>{return},validateEnvelopeMeta:(e)=>[],projectCallToolResult(e,t){let a=z1(e),s=a.structuredContent;if(s===void 0)return a;let i=typeof s!=="object"||s===null||Array.isArray(s),o=t!==void 0&&R1(t);if(!i&&!o)return a;return{...a,structuredContent:{result:s}}},decodeResult(e,t){if(hl(t)&&"resultType"in t){let a={...t};return delete a.resultType,{kind:"complete",result:l1(a)}}return{kind:"complete",result:l1(t)}},encodeResult(e,t){if(e!=="tools/list")return t;let a=t.tools;if(!Array.isArray(a)||!a.some((s)=>d1(s)))return t;return{...t,tools:a.map((s)=>d1(s)?{...s,outputSchema:Tb(s.outputSchema)}:s)}},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope:(e)=>{return}};function Ib(){let e=Po(()=>E([c(),q(),C(),Ga(),T(c(),e),y(e)])),t=T(c(),e),a=E([c(),q().int()]),s=c(),i=E([c(),q().int()]),o=Y(["user","assistant"]),r=Y(["debug","info","notice","warning","error","critical","alert","emergency"]),n=c().refine((be)=>{try{return atob(be),!0}catch{return!1}},{message:"Invalid Base64 string"}),u=_({ttl:q().optional()}),d=_({taskId:c()}),l=F({progressToken:a.optional(),"io.modelcontextprotocol/related-task":d.optional()}),h=_({_meta:l.optional()}),p=h.extend({task:u.optional()}),v=_({_meta:l.optional()}),b=_({method:c(),params:v.loose().optional()}),g=_({src:c(),mimeType:c().optional(),sizes:y(c()).optional(),theme:Y(["light","dark"]).optional()}),w=_({icons:y(g).optional()}),R=_({name:c(),title:c().optional()}),j=R.extend({...R.shape,...w.shape,version:c(),websiteUrl:c().optional(),description:c().optional()}),x=Vt(_({applyDefaults:C().optional()}),t),P=Ka((be)=>{if(be&&typeof be==="object"&&!Array.isArray(be)&&Object.keys(be).length===0)return{form:{}};return be},Vt(_({form:x.optional(),url:t.optional()}),t.optional())),S=F({list:t.optional(),cancel:t.optional(),requests:F({sampling:F({createMessage:t.optional()}).optional(),elicitation:F({create:t.optional()}).optional()}).optional()}),k=F({list:t.optional(),cancel:t.optional(),requests:F({tools:F({call:t.optional()}).optional()}).optional()}),N=_({experimental:T(c(),t).optional(),sampling:_({context:t.optional(),tools:t.optional()}).optional(),elicitation:P.optional(),roots:_({listChanged:C().optional()}).optional(),tasks:S.optional(),extensions:T(c(),t).optional()}),X=_({experimental:T(c(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:_({listChanged:C().optional()}).optional(),resources:_({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:_({listChanged:C().optional()}).optional(),tasks:k.optional(),extensions:T(c(),t).optional()}),K=_({progress:q(),total:H(q()),message:H(c())}),se=_({...v.shape,...K.shape,progressToken:a}),we=b.extend({method:f("notifications/progress"),params:se}),te=v.extend({level:r,logger:c().optional(),data:D()}),ie=b.extend({method:f("notifications/message"),params:te}),B=_({uri:c(),mimeType:H(c()),_meta:T(c(),D()).optional()}),re=B.extend({text:c()}),zt=B.extend({blob:n}),He=_({audience:y(o).optional(),priority:q().min(0).max(1).optional(),lastModified:Ds({offset:!0}).optional()}),rt=_({...R.shape,...w.shape,uri:c(),description:H(c()),mimeType:H(c()),size:H(q()),annotations:He.optional(),_meta:H(F({}))}),St=_({...R.shape,...w.shape,uriTemplate:c(),description:H(c()),mimeType:H(c()),annotations:He.optional(),_meta:H(F({}))}),Xe=b.extend({method:f("notifications/resources/list_changed"),params:v.optional()}),Oe=v.extend({uri:c()}),Bt=b.extend({method:f("notifications/resources/updated"),params:Oe}),Ht=_({name:c(),description:H(c()),required:H(C())}),xt=_({...R.shape,...w.shape,description:H(c()),arguments:H(y(Ht)),_meta:H(F({}))}),Ce=b.extend({method:f("notifications/prompts/list_changed"),params:v.optional()}),Ae=_({type:f("text"),text:c(),annotations:He.optional(),_meta:T(c(),D()).optional()}),Le=_({type:f("image"),data:n,mimeType:c(),annotations:He.optional(),_meta:T(c(),D()).optional()}),lt=_({type:f("audio"),data:n,mimeType:c(),annotations:He.optional(),_meta:T(c(),D()).optional()}),Ma=_({type:f("tool_use"),name:c(),id:c(),input:T(c(),D()),_meta:T(c(),D()).optional()}),Qe=_({type:f("resource"),resource:E([re,zt]),annotations:He.optional(),_meta:T(c(),D()).optional()}),et=rt.extend({type:f("resource_link")}),Fe=E([Ae,Le,lt,et,Qe]),nt=_({role:o,content:Fe}),ct=_({title:c().optional(),readOnlyHint:C().optional(),destructiveHint:C().optional(),idempotentHint:C().optional(),openWorldHint:C().optional()}),Rt=b.extend({method:f("notifications/tools/list_changed"),params:v.optional()}),qt=_({name:c().optional()}),oa=_({hints:y(qt).optional(),costPriority:q().min(0).max(1).optional(),speedPriority:q().min(0).max(1).optional(),intelligencePriority:q().min(0).max(1).optional()}),jt=_({mode:Y(["auto","required","none"]).optional()}),Na=_({type:f("boolean"),title:c().optional(),description:c().optional(),default:C().optional()}),I=_({type:f("string"),title:c().optional(),description:c().optional(),minLength:q().optional(),maxLength:q().optional(),format:Y(["email","uri","date","date-time"]).optional(),default:c().optional()}),Pt=_({type:Y(["number","integer"]),title:c().optional(),description:c().optional(),minimum:q().optional(),maximum:q().optional(),default:q().optional()}),V=_({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),default:c().optional()}),U=_({type:f("string"),title:c().optional(),description:c().optional(),oneOf:y(_({const:c(),title:c()})),default:c().optional()}),ee=_({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),enumNames:y(c()).optional(),default:c().optional()}),O=E([V,U]),M=_({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:_({type:f("string"),enum:y(c())}),default:y(c()).optional()}),G=_({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:_({anyOf:y(_({const:c(),title:c()}))}),default:y(c()).optional()}),J=E([M,G]),ke=E([ee,O,J]),Ia=E([ke,Na,I,Pt]),Tt=p.extend({mode:f("form").optional(),message:c(),requestedSchema:_({type:f("object"),properties:T(c(),Ia),required:y(c()).optional()}).catchall(D())}),Oa=_({type:f("ref/resource"),uri:c()}),Aa=_({type:f("ref/prompt"),name:c()}),Ui=_({uri:c().startsWith("file://"),name:c().optional(),_meta:T(c(),D()).optional()}),ra=N.shape,Di=_({experimental:ra.experimental,sampling:ra.sampling,elicitation:ra.elicitation,roots:ra.roots,extensions:ra.extensions}),ut=X.shape,Rs=_({experimental:ut.experimental,logging:ut.logging,completions:ut.completions,prompts:ut.prompts,resources:ut.resources,tools:ut.tools,extensions:ut.extensions}),qs=F({progressToken:a.optional(),[Wt]:c(),[Bs]:j.optional(),[Xa]:Di,[Fs]:r.optional()}),La=_({...R.shape,...w.shape,description:c().optional(),inputSchema:F({$schema:c().optional(),type:f("object")}),outputSchema:F({$schema:c().optional()}).optional(),annotations:ct.optional(),_meta:T(c(),D()).optional()}),Zi=_({type:f("tool_result"),toolUseId:c(),content:y(Fe),structuredContent:D().optional(),isError:C().optional(),_meta:T(c(),D()).optional()}),js=E([Ae,Le,lt,Ma,Zi]),Ua=_({role:o,content:E([js,y(js)]),_meta:T(c(),D()).optional()}),Ps=c(),Ts=F({[$t]:j.optional().catch(void 0)}),Cs=Ts.optional();function Ee(be){return F({_meta:Cs,resultType:Ps.default("complete"),...be})}let Bi=Ee({}),Nn=Ee({nextCursor:s.optional()}),Es=Ee({content:y(Fe),structuredContent:D().optional(),isError:C().optional()}),Hi=Ee({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),tools:y(La),nextCursor:s.optional()}),Fi=Ee({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),prompts:y(xt),nextCursor:s.optional()}),Vi=Ee({description:c().optional(),messages:y(nt)}),Ji=Ee({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),resources:y(rt),nextCursor:s.optional()}),Wi=Ee({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),resourceTemplates:y(St),nextCursor:s.optional()}),Gi=Ee({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),contents:y(E([re,zt]))}),Ki=Ee({completion:_({values:y(c()).max(100),total:q().int().optional(),hasMore:C().optional()}).loose()}),In=Ee({ttlMs:q().int().min(0),cacheScope:Y(["public","private"])}),Yi=Ee({ttlMs:q().int().min(0).catch(0),cacheScope:Y(["public","private"]).catch("private"),supportedVersions:y(c()),capabilities:Rs,instructions:c().optional()}),na=_({messages:y(Ua),modelPreferences:oa.optional(),systemPrompt:c().optional(),includeContext:Y(["none","thisServer","allServers"]).optional(),temperature:q().optional(),maxTokens:q().int(),stopSequences:y(c()).optional(),metadata:t.optional(),tools:y(La).optional(),toolChoice:jt.optional()}),Xi=_({method:f("sampling/createMessage"),params:na}),Qi=_({method:f("roots/list"),params:_({_meta:T(c(),D()).optional()}).optional()}),eo=_({...Ua.shape,model:c(),stopReason:c().optional()}),to=_({roots:y(Ui)}),ao=_({action:Y(["accept","decline","cancel"]),content:T(c(),E([c(),q(),C(),y(c())])).optional()}),so=_({mode:f("url"),message:c(),url:c().url()}),io=E([Tt,so]),oo=_({method:f("elicitation/create"),params:io}),ro=E([Xi,Qi,oo]),no=E([eo,to,ao]),co=T(c(),ro),uo=T(c(),no),Da=Ee({inputRequests:co.optional(),requestState:c().optional()}),Za={inputResponses:uo.optional(),requestState:c().optional()},On=_({_meta:qs,...Za}),An=F({progressToken:a.optional()});function tt(be,Ha){return _({method:f(be),params:_({_meta:qs,...Ha})})}function at(be,Ha){return _({method:f(be),params:_({_meta:An.optional(),...Ha}).optional()})}let lo={name:c(),arguments:T(c(),D()).optional(),...Za},mt={cursor:s.optional()},Ln=tt("tools/call",lo),Un=tt("tools/list",mt),Dn=tt("prompts/list",mt),Zn=tt("prompts/get",{name:c(),arguments:T(c(),c()).optional(),...Za}),Bn=tt("resources/list",mt),Hn=tt("resources/templates/list",mt),Fn=tt("resources/read",{uri:c(),...Za}),mo={ref:E([Aa,Oa]),argument:_({name:c(),value:c()}),context:_({arguments:T(c(),c()).optional()}).optional()},Vn=tt("completion/complete",mo),Jn=tt("server/discover",{}),$s=_({toolsListChanged:C().optional(),promptsListChanged:C().optional(),resourcesListChanged:C().optional(),resourceSubscriptions:y(c()).optional()}),_o={notifications:$s},Wn=tt("subscriptions/listen",_o),Gn=Ts.extend({"io.modelcontextprotocol/subscriptionId":i}),po=F({_meta:Gn,resultType:Ps.default("complete")}),ca={"tools/call":at("tools/call",lo),"tools/list":at("tools/list",mt),"prompts/get":at("prompts/get",{name:c(),arguments:T(c(),c()).optional()}),"prompts/list":at("prompts/list",mt),"resources/list":at("resources/list",mt),"resources/templates/list":at("resources/templates/list",mt),"resources/read":at("resources/read",{uri:c()}),"completion/complete":at("completion/complete",mo),"server/discover":at("server/discover",{}),"subscriptions/listen":at("subscriptions/listen",_o)};function Ve(be){return F({_meta:Cs,...be})}let Kn={"tools/call":Ve({content:y(Fe),structuredContent:D().optional(),isError:C().optional()}),"tools/list":Ve({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),tools:y(La),nextCursor:s.optional()}),"prompts/get":Ve({description:c().optional(),messages:y(nt)}),"prompts/list":Ve({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),prompts:y(xt),nextCursor:s.optional()}),"resources/list":Ve({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),resources:y(rt),nextCursor:s.optional()}),"resources/templates/list":Ve({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),resourceTemplates:y(St),nextCursor:s.optional()}),"resources/read":Ve({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),contents:y(E([re,zt]))}),"completion/complete":Ve({completion:_({values:y(c()).max(100),total:q().int().optional(),hasMore:C().optional()}).loose()}),"server/discover":Ve({ttlMs:q().int().min(0).catch(0),cacheScope:Y(["public","private"]).catch("private"),supportedVersions:y(c()),capabilities:Rs,instructions:c().optional()}),"subscriptions/listen":Ve({})},Ba=F({"io.modelcontextprotocol/subscriptionId":i.optional()}),Ms=_({method:f("notifications/subscriptions/acknowledged"),params:_({_meta:Ba.optional(),notifications:$s})}),Ns=_({_meta:Ba.optional(),requestId:i,reason:c().optional()}),Is=_({method:f("notifications/cancelled"),params:Ns}),Wu={"notifications/cancelled":Is,"notifications/progress":we,"notifications/message":ie,"notifications/resources/updated":Bt,"notifications/resources/list_changed":Xe,"notifications/tools/list_changed":Rt,"notifications/prompts/list_changed":Ce,"notifications/subscriptions/acknowledged":Ms},Ue=(be)=>_({jsonrpc:f("2.0"),id:E([c(),q().int()]),result:be}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:a,CursorSchema:s,RequestIdSchema:i,RoleSchema:o,LoggingLevelSchema:r,TaskMetadataSchema:u,RelatedTaskMetadataSchema:d,RequestMetaSchema:l,BaseRequestParamsSchema:h,TaskAugmentedRequestParamsSchema:p,NotificationsParamsSchema:v,NotificationSchema:b,IconSchema:g,IconsSchema:w,BaseMetadataSchema:R,ImplementationSchema:j,ClientTasksCapabilitySchema:S,ServerTasksCapabilitySchema:k,ClientCapabilitiesSchema:N,ServerCapabilitiesSchema:X,ProgressSchema:K,ProgressNotificationParamsSchema:se,ProgressNotificationSchema:we,LoggingMessageNotificationParamsSchema:te,LoggingMessageNotificationSchema:ie,ResourceContentsSchema:B,TextResourceContentsSchema:re,BlobResourceContentsSchema:zt,AnnotationsSchema:He,ResourceSchema:rt,ResourceTemplateSchema:St,ResourceListChangedNotificationSchema:Xe,ResourceUpdatedNotificationParamsSchema:Oe,ResourceUpdatedNotificationSchema:Bt,PromptArgumentSchema:Ht,PromptSchema:xt,PromptListChangedNotificationSchema:Ce,TextContentSchema:Ae,ImageContentSchema:Le,AudioContentSchema:lt,ToolUseContentSchema:Ma,EmbeddedResourceSchema:Qe,ResourceLinkSchema:et,ContentBlockSchema:Fe,PromptMessageSchema:nt,ToolAnnotationsSchema:ct,ToolListChangedNotificationSchema:Rt,ModelHintSchema:qt,ModelPreferencesSchema:oa,ToolChoiceSchema:jt,BooleanSchemaSchema:Na,StringSchemaSchema:I,NumberSchemaSchema:Pt,UntitledSingleSelectEnumSchemaSchema:V,TitledSingleSelectEnumSchemaSchema:U,LegacyTitledEnumSchemaSchema:ee,SingleSelectEnumSchemaSchema:O,UntitledMultiSelectEnumSchemaSchema:M,TitledMultiSelectEnumSchemaSchema:G,MultiSelectEnumSchemaSchema:J,EnumSchemaSchema:ke,PrimitiveSchemaDefinitionSchema:Ia,ElicitRequestFormParamsSchema:Tt,ResourceTemplateReferenceSchema:Oa,PromptReferenceSchema:Aa,RootSchema:Ui,ClientCapabilities2026Schema:Di,ServerCapabilities2026Schema:Rs,RequestMetaEnvelopeSchema:qs,ToolSchema:La,ToolResultContentSchema:Zi,SamplingMessageContentBlockSchema:js,SamplingMessageSchema:Ua,ResultTypeSchema:Ps,ResultMetaSchema:Ts,ResultSchema:Bi,PaginatedResultSchema:Nn,CallToolResultSchema:Es,ListToolsResultSchema:Hi,ListPromptsResultSchema:Fi,GetPromptResultSchema:Vi,ListResourcesResultSchema:Ji,ListResourceTemplatesResultSchema:Wi,ReadResourceResultSchema:Gi,CompleteResultSchema:Ki,CacheableResultSchema:In,DiscoverResultSchema:Yi,CreateMessageRequestParamsSchema:na,CreateMessageRequestSchema:Xi,ListRootsRequestSchema:Qi,CreateMessageResultSchema:eo,ListRootsResultSchema:to,ElicitResultSchema:ao,ElicitRequestURLParamsSchema:so,ElicitRequestParamsSchema:io,ElicitRequestSchema:oo,InputRequestSchema:ro,InputResponseSchema:no,InputRequestsSchema:co,InputResponsesSchema:uo,InputRequiredResultSchema:Da,InputResponseRequestParamsSchema:On,CallToolRequestSchema:Ln,ListToolsRequestSchema:Un,ListPromptsRequestSchema:Dn,GetPromptRequestSchema:Zn,ListResourcesRequestSchema:Bn,ListResourceTemplatesRequestSchema:Hn,ReadResourceRequestSchema:Fn,CompleteRequestSchema:Vn,DiscoverRequestSchema:Jn,SubscriptionFilterSchema:$s,SubscriptionsListenRequestSchema:Wn,SubscriptionsListenResultMetaSchema:Gn,SubscriptionsListenResultSchema:po,dispatchRequestSchemas:ca,dispatchResultSchemas:Kn,NotificationMetaSchema:Ba,SubscriptionsAcknowledgedNotificationSchema:Ms,CancelledNotificationParamsSchema:Ns,CancelledNotificationSchema:Is,notificationSchemas2026:Wu,JSONRPCResultResponseSchema:Ue(Bi),CallToolResultResponseSchema:Ue(E([Es,Da])),ListToolsResultResponseSchema:Ue(Hi),ListPromptsResultResponseSchema:Ue(Fi),GetPromptResultResponseSchema:Ue(E([Vi,Da])),ListResourcesResultResponseSchema:Ue(Ji),ListResourceTemplatesResultResponseSchema:Ue(Wi),ReadResourceResultResponseSchema:Ue(E([Gi,Da])),CompleteResultResponseSchema:Ue(Ki),DiscoverResultResponseSchema:Ue(Yi),SubscriptionsListenResultResponseSchema:Ue(po)}}var Ob;function ba(){return Ob??=Ib()}var Ab=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function Lb(e){return Ab.includes(e)}var xl=Symbol("modelcontextprotocol.resultCacheHintFallback");function Ub(e){return e[xl]}function C1(e){return typeof e==="number"&&Number.isSafeInteger(e)&&e>=0}function E1(e){return e==="public"||e==="private"}var W=function(e){return e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.ResourceNotFound=-32002]="ResourceNotFound",e[e.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",e[e.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired",e}({}),oe=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return Ge(this,t)}static isInstance(t){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ge(this,t)}constructor(t,a,s){super(a);this.code=t,this.data=s,this.name="ProtocolError",ya(this,new.target)}static fromError(t,a,s){if(t===W.UrlElicitationRequired&&s){let i=s;if(i.elicitations)return new M1(i.elicitations,a)}if(t===W.UnsupportedProtocolVersion&&s){let i=s;if(Array.isArray(i.supported)&&typeof i.requested==="string")return new fn({supported:i.supported,requested:i.requested},a)}if(t===W.InvalidParams||t===W.ResourceNotFound){let i=s;if(typeof i?.uri==="string"&&(t===W.ResourceNotFound||Object.keys(i).length===1))return new $1(i.uri,a)}if(t===W.MissingRequiredClientCapability&&s){let i=s;if(i.requiredCapabilities!==null&&typeof i.requiredCapabilities==="object"&&!Array.isArray(i.requiredCapabilities))return new N1({requiredCapabilities:i.requiredCapabilities},a)}return new e(t,a,s)}},$1=class extends oe{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(W.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},M1=class extends oe{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(W.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},fn=class extends oe{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(W.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},N1=class extends oe{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(W.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Db=0,Zb="private",Bb=["tools/call","prompts/get","resources/read"];function Hb(e,t){let a=t.resultType;if(a===void 0)return{...t,resultType:"complete"};if(a==="complete")return t;if(Bb.includes(e))return t;throw new oe(W.InternalError,`Handler for ${e} returned resultType '${String(a)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Fb(e,t){let a=Ub(t);if(t.resultType!=="complete"||!Lb(e))return a===void 0?t:Kb(t);let s=t,i=C1(s.ttlMs)?s.ttlMs:Wb(a),o=E1(s.cacheScope)?s.cacheScope:Gb(a),r={...s,ttlMs:i,cacheScope:o};return delete r[xl],r}function Vb(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function Jb(e,t){if(t===void 0)return e;let a=e._meta;if(a===void 0)return{...e,_meta:{[$t]:t}};if(!Vb(a))return e;if(a[$t]!==void 0)return e;return{...e,_meta:{...a,[$t]:t}}}function Wb(e){return e!==void 0&&C1(e.ttlMs)?e.ttlMs:Db}function Gb(e){return e!==void 0&&E1(e.cacheScope)?e.cacheScope:Zb}function Kb(e){let t={...e};return delete t[xl],t}var Yb=["elicitation/create","sampling/createMessage","roots/list"],Yc;function I1(){if(Yc)return Yc;let e=ba();return Yc={request:{"elicitation/create":_({method:f("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":_({method:f("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":_({method:f("roots/list"),params:F({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Yc}function O1(e){return Yb.includes(e)}function dl(e){return O1(e)?I1().request[e]:void 0}function Xb(e){return O1(e)?I1().response[e]:void 0}var Rl={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},A1={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function L1(e){return Object.prototype.hasOwnProperty.call(Rl,e)}function U1(e){return Object.prototype.hasOwnProperty.call(A1,e)}function Qb(e){return Object.prototype.hasOwnProperty.call(Rl,e)}function ey(e){return L1(e)?ba().dispatchRequestSchemas[e]:void 0}function ty(e){return Qb(e)?ba().dispatchResultSchemas[e]:void 0}function ay(e){return U1(e)?ba().notificationSchemas2026[e]:void 0}var fq=Object.keys(Rl),gq=Object.keys(A1);function mn(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function dn(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let a=e.safeParse(t);return a.success?{ok:!0,value:a.data}:{ok:!1,reason:"invalid",message:String(a.error)}}var sy={ok:!1,reason:"not-in-era"},iy=[Wt,Xa];function oy(e,t){let a=t,s=!1,i=()=>{if(!s)a={...a},s=!0;return a},o=t.tools;if(e==="tools/list"&&Array.isArray(o)&&o.some((n)=>mn(n)&&("execution"in n)))i().tools=o.map((n)=>{if(!mn(n)||!("execution"in n))return n;let u={...n};return delete u.execution,u});let r=t.capabilities;if(mn(r)&&"tasks"in r){let n={...r};delete n.tasks,i().capabilities=n}return a}var ql={era:"2026-07-28",hasRequestMethod:L1,hasNotificationMethod:U1,hasInputRequestMethod:(e)=>dl(e)!==void 0,validateRequest:(e,t)=>dn(ey(e),t),validateResult:(e,t)=>dn(ty(e),t),validateNotification:(e,t)=>dn(ay(e),t),validateInputRequest:(e,t)=>dn(dl(e),t),validateInputResponse:(e,t)=>dn(Xb(e),t),samplingResultVariant:()=>sy,outboundEnvelope(e){return{[Wt]:e.protocolVersion,[Bs]:e.clientInfo,[Xa]:e.clientCapabilities,...e.logLevel!==void 0&&{[Fs]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let s of iy)if(!(s in e))t.push({key:s,problem:"missing"});let a=ba().RequestMetaEnvelopeSchema.safeParse(e);if(!a.success)for(let s of a.error.issues){let i=s.path.map(String),o=i.length>0?i.join("."):"_meta";if(i.length===1&&t.some((r)=>r.key===o&&r.problem==="missing"))continue;t.push({key:o,problem:s.message})}return t},projectCallToolResult:(e)=>z1(e),inputRequestSchema:dl,decodeResult(e,t){if(!mn(t))return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let a=t.resultType;if(a===void 0)return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if(typeof a!=="string")return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:a})};if(a==="input_required"){let r=t.inputRequests,n=mn(r)?r:{},u=t.requestState,d=t._meta===void 0?void 0:ba().ResultMetaSchema.safeParse(t._meta),l=d?.success?d.data:void 0;if(Object.keys(n).length===0&&typeof u!=="string")return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})};return{kind:"input_required",inputRequests:n,...typeof u==="string"&&{requestState:u},...l!==void 0&&{_meta:l}}}if(a!=="complete")return{kind:"invalid",error:new L(A.UnsupportedResultType,`Unsupported result type '${a}' for ${e}`,{resultType:a,method:e})};let s=ry(),i=Object.hasOwn(s,e)?s[e]:void 0;if(i!==void 0){let r=i.safeParse(t);if(!r.success)return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: ${r.error}`,{method:e})}}let o={...t};return delete o.resultType,{kind:"complete",result:o}},encodeResult(e,t,a){return Jb(Fb(e,Hb(e,oy(e,t))),a)},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=ba().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map((a)=>a.message).join("; ")}`}},Xc;function ry(){if(Xc)return Xc;let e=ba();return Xc={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Xc}var au="2026-07-28";function ea(e){return e!==void 0&&At(e)?ql:Sl}function m1(e){if(e.revision!==void 0)return ea(e.revision).era;return e.era==="modern"?ql.era:Sl.era}function ll(e){return D1.some((t)=>t.hasRequestMethod(e))}function ml(e){return D1.some((t)=>t.hasNotificationMethod(e))}function _1(e){return e==="tasks/get"||e==="tasks/cancel"}var D1=[Sl,ql],ny=Wm({AnnotationsSchema:()=>Nt,AudioContentSchema:()=>os,BaseMetadataSchema:()=>Et,BaseRequestParamsSchema:()=>xe,BlobResourceContentsSchema:()=>ri,BooleanSchemaSchema:()=>di,CallToolRequestParamsSchema:()=>kr,CallToolRequestSchema:()=>zr,CallToolResultSchema:()=>wa,CancelTaskRequestSchema:()=>Lc,CancelTaskResultSchema:()=>Uc,CancelledNotificationParamsSchema:()=>Eo,CancelledNotificationSchema:()=>Xs,ClientCapabilitiesSchema:()=>Mo,ClientNotificationSchema:()=>Zc,ClientRequestSchema:()=>Dc,ClientResultSchema:()=>Bc,ClientTasksCapabilitySchema:()=>qc,CompatibilityCallToolResultSchema:()=>Pc,CompleteRequestParamsSchema:()=>Kr,CompleteRequestSchema:()=>Yr,CompleteResultSchema:()=>Xr,ContentBlockSchema:()=>It,CreateMessageRequestParamsSchema:()=>Nr,CreateMessageRequestSchema:()=>Ir,CreateMessageResultSchema:()=>Or,CreateMessageResultWithToolsSchema:()=>Ar,CreateTaskResultSchema:()=>Cc,CursorSchema:()=>Js,DiscoverRequestSchema:()=>Oo,DiscoverResultSchema:()=>ga,ElicitRequestFormParamsSchema:()=>ls,ElicitRequestParamsSchema:()=>Br,ElicitRequestSchema:()=>Hr,ElicitRequestURLParamsSchema:()=>Zr,ElicitResultSchema:()=>Jr,ElicitationCompleteNotificationParamsSchema:()=>Fr,ElicitationCompleteNotificationSchema:()=>Vr,EmbeddedResourceSchema:()=>rs,EmptyResultSchema:()=>fa,EnumSchemaSchema:()=>Dr,GetPromptRequestParamsSchema:()=>mr,GetPromptRequestSchema:()=>_r,GetPromptResultSchema:()=>fr,GetTaskPayloadRequestSchema:()=>Nc,GetTaskPayloadResultSchema:()=>Ic,GetTaskRequestSchema:()=>$c,GetTaskResultSchema:()=>Mc,IconSchema:()=>$o,IconsSchema:()=>Gt,ImageContentSchema:()=>is,ImplementationSchema:()=>Mt,InitializeRequestParamsSchema:()=>No,InitializeRequestSchema:()=>Qs,InitializeResultSchema:()=>Io,InitializedNotificationSchema:()=>ti,JSONArraySchema:()=>xc,JSONObjectSchema:()=>he,JSONRPCErrorResponseSchema:()=>ts,JSONRPCMessageSchema:()=>ft,JSONRPCNotificationSchema:()=>Ys,JSONRPCRequestSchema:()=>Ks,JSONRPCResponseSchema:()=>Rc,JSONRPCResultResponseSchema:()=>es,JSONValueSchema:()=>Jt,LegacyTitledEnumSchemaSchema:()=>_i,ListChangedOptionsBaseSchema:()=>xr,ListPromptsRequestSchema:()=>dr,ListPromptsResultSchema:()=>lr,ListResourceTemplatesRequestSchema:()=>Ho,ListResourceTemplatesResultSchema:()=>Fo,ListResourcesRequestSchema:()=>Zo,ListResourcesResultSchema:()=>Bo,ListRootsRequestSchema:()=>en,ListRootsResultSchema:()=>tn,ListTasksRequestSchema:()=>Oc,ListTasksResultSchema:()=>Ac,ListToolsRequestSchema:()=>br,ListToolsResultSchema:()=>yr,LoggingLevelSchema:()=>ui,LoggingMessageNotificationParamsSchema:()=>jr,LoggingMessageNotificationSchema:()=>cs,ModelHintSchema:()=>Pr,ModelPreferencesSchema:()=>Tr,MultiSelectEnumSchemaSchema:()=>Ur,NotificationSchema:()=>Pe,NotificationsParamsSchema:()=>Me,NumberSchemaSchema:()=>ds,PaginatedRequestParamsSchema:()=>Uo,PaginatedRequestSchema:()=>Kt,PaginatedResultSchema:()=>Yt,PingRequestSchema:()=>ai,PrimitiveSchemaDefinitionSchema:()=>fi,ProgressNotificationParamsSchema:()=>Lo,ProgressNotificationSchema:()=>si,ProgressSchema:()=>Ao,ProgressTokenSchema:()=>Vs,PromptArgumentSchema:()=>cr,PromptListChangedNotificationSchema:()=>gr,PromptMessageSchema:()=>hr,PromptReferenceSchema:()=>Gr,PromptSchema:()=>ur,ReadResourceRequestParamsSchema:()=>Vo,ReadResourceRequestSchema:()=>Jo,ReadResourceResultSchema:()=>Wo,RelatedTaskMetadataSchema:()=>Co,RequestIdSchema:()=>ht,RequestMetaSchema:()=>Ws,RequestSchema:()=>fe,ResourceContentsSchema:()=>ii,ResourceLinkSchema:()=>ns,ResourceListChangedNotificationSchema:()=>Go,ResourceRequestParamsSchema:()=>as,ResourceSchema:()=>ni,ResourceTemplateReferenceSchema:()=>Wr,ResourceTemplateSchema:()=>Do,ResourceUpdatedNotificationParamsSchema:()=>rr,ResourceUpdatedNotificationSchema:()=>nr,ResultMetaObjectSchema:()=>Gs,ResultSchema:()=>ge,RoleSchema:()=>Xt,RootSchema:()=>Qr,RootsListChangedNotificationSchema:()=>an,SamplingContentSchema:()=>$r,SamplingMessageContentBlockSchema:()=>pa,SamplingMessageSchema:()=>Mr,ServerCapabilitiesSchema:()=>ei,ServerNotificationSchema:()=>Fc,ServerRequestSchema:()=>Hc,ServerResultSchema:()=>Vc,ServerTasksCapabilitySchema:()=>jc,SetLevelRequestParamsSchema:()=>Rr,SetLevelRequestSchema:()=>qr,SingleSelectEnumSchemaSchema:()=>Lr,StringSchemaSchema:()=>us,SubscribeRequestParamsSchema:()=>Ko,SubscribeRequestSchema:()=>Yo,SubscriptionFilterSchema:()=>ci,SubscriptionsAcknowledgedNotificationParamsSchema:()=>ar,SubscriptionsAcknowledgedNotificationSchema:()=>sr,SubscriptionsListenRequestParamsSchema:()=>er,SubscriptionsListenRequestSchema:()=>tr,SubscriptionsListenResultMetaSchema:()=>ir,SubscriptionsListenResultSchema:()=>or,TaskAugmentedRequestParamsSchema:()=>ha,TaskCreationParamsSchema:()=>Tc,TaskMetadataSchema:()=>To,TaskSchema:()=>Qt,TaskStatusNotificationParamsSchema:()=>on,TaskStatusNotificationSchema:()=>Ec,TaskStatusSchema:()=>sn,TextContentSchema:()=>ss,TextResourceContentsSchema:()=>oi,TitledMultiSelectEnumSchemaSchema:()=>hi,TitledSingleSelectEnumSchemaSchema:()=>mi,ToolAnnotationsSchema:()=>vr,ToolChoiceSchema:()=>Cr,ToolExecutionSchema:()=>wr,ToolListChangedNotificationSchema:()=>Sr,ToolResultContentSchema:()=>Er,ToolSchema:()=>va,ToolUseContentSchema:()=>pr,UnsubscribeRequestParamsSchema:()=>Xo,UnsubscribeRequestSchema:()=>Qo,UntitledMultiSelectEnumSchemaSchema:()=>pi,UntitledSingleSelectEnumSchemaSchema:()=>li});var za=(e)=>Ks.safeParse(e).success,Z1=(e)=>Ys.safeParse(e).success,hs=(e)=>es.safeParse(e).success,fs=(e)=>ts.safeParse(e).success;var B1=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";var jl=(e)=>Qs.safeParse(e).success,H1=(e)=>ti.safeParse(e).success;var cy="Mcp-Param-",p1="x-mcp-header",uy=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,dy=new Set(["string","integer","boolean"]);function Pl(e){let t=[],a=new Map,s,i=(r,n,u)=>{if(r===null||typeof r!=="object")return;let d=r;if(p1 in d){if(!u||n.length===0)return`${Qc(n)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let h=d[p1];if(typeof h!=="string"||h.length===0)return`${Qc(n)}: x-mcp-header MUST be a non-empty string`;if(!uy.test(h))return`${Qc(n)}: x-mcp-header '${h}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let p=typeof d.type==="string"?d.type:void 0;if(p===void 0||!dy.has(p)){let g=`${Qc(n)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${p??"<none>"}`;if(p!=="number")return g;s??=g}let v=h.toLowerCase(),b=a.get(v);if(b!==void 0)return`x-mcp-header '${h}' is not case-insensitively unique (also declared as '${b}')`;a.set(v,h),t.push({path:n,headerName:h,type:p})}let l=d.properties;if(l!==null&&typeof l==="object")for(let[h,p]of Object.entries(l)){let v=i(p,[...n,h],u);if(v!==void 0)return v}for(let h of ly){let p=d[h];if(p===void 0)continue;let v=Array.isArray(p)?p:p!==null&&typeof p==="object"&&my.has(h)?Object.values(p):[p];for(let b of v){let g=i(b,[...n,`<${h}>`],!1);if(g!==void 0)return g}}},o=i(e,[],!0);if(o!==void 0)return{valid:!1,reason:s??o};return s===void 0?{valid:!0,declarations:t}:{valid:!1,reason:s,declarations:t}}var ly=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],my=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Qc(e){return e.length===0?"<root>":e.join(".")}var F1="=?base64?",V1="?=";function _y(e){if(typeof e==="string")return e;if(typeof e==="boolean")return e?"true":"false";if(typeof e==="number"){if(!Number.isFinite(e))return;if(Number.isInteger(e)&&!Number.isSafeInteger(e))return;return String(e)}}function py(e){if(e.length===0)return!0;if(e.startsWith(F1)&&e.endsWith(V1))return!0;if(e!==e.trim())return!0;for(let t=0;t<e.length;t++){let a=e.codePointAt(t);if(a===9||a>=32&&a<=126)continue;return!0}return!1}function hy(e){let t=new TextEncoder().encode(e),a="";for(let s of t)a+=String.fromCodePoint(s);return btoa(a)}function Tl(e){return py(e)?`${F1}${hy(e)}${V1}`:e}function fy(e,t){let a=e;for(let s of t){if(a===null||typeof a!=="object")return;a=a[s]}return a}function J1(e,t){let a={};for(let s of e){let i=fy(t,s.path);if(i===void 0||i===null)continue;let o=_y(i);if(o===void 0)continue;a[`${cy}${s.headerName}`]=Tl(o)}return a}var bi=-32020,vq=[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32000],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[W.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[bi,W.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[W.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[W.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[W.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[bi],conformance:["http-header-validation"],rationale:"SEP-2243 standard `MCP-Protocol-Version` / `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The spec requires `MCP-Protocol-Version` and `Mcp-Method` on every modern *request* POST (`Mcp-Name` only for the methods that mirror `params.name` / `params.uri` / `params.taskId`, see `MCP_NAME_HEADER_SOURCE`) and names them in that order, so a request missing several is answered by the earliest. Notification POSTs are exempt: the presence half runs on requests only, so a modern-enveloped notification is dispatched even with no standard headers at all. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half — including the missing `MCP-Protocol-Version` cell, which cannot live on the edge rung without breaking body-primary classification. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[W.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[bi],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}],wq={[W.ParseError]:400,[W.InvalidRequest]:400,[W.MethodNotFound]:404,[W.UnsupportedProtocolVersion]:400,[W.MissingRequiredClientCapability]:400,[bi]:400},h1={"tools/call":"name","prompts/get":"name","resources/read":"uri","tasks/get":"taskId","tasks/update":"taskId","tasks/cancel":"taskId"};function W1(e,t){let a=Object.hasOwn(h1,e)?h1[e]:void 0;if(a===void 0)return;let s=gy(t)?t[a]:void 0;return{field:a,value:typeof s==="string"?s:void 0}}function gy(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function su(e,t){return vc(e,t)}function ln(e){return new Set(e.flatMap((t)=>Object.keys(t.shape)))}function fl(e){if(e==null)return!1;let t=typeof e;if(t!=="object"&&t!=="function")return!1;if(!("~standard"in e))return!1;return typeof e["~standard"]?.validate==="function"}var f1=!1,gl="draft-2020-12";function vy(e,t="input"){let a=e["~standard"],s;if(a.jsonSchema)s=a.jsonSchema[t]({target:gl});else if(a.vendor==="zod"){if(!("_zod"in e))throw Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");if(!f1)f1=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.");s=fc(e,{target:gl,io:t})}else throw Error(`Schema library "${a.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output"){if(s.type!==void 0)return s;return G1(s)?{type:"object",...s}:s}if(s.type!==void 0&&s.type!=="object")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(s.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...s}}var wy=/^#\/(\$defs|definitions)\/([^/~%]+)$/;function G1(e,t=e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;let a=typeof e.$ref==="string"&&wy.exec(e.$ref);if(a&&t[a[1]]?.[a[2]]?.type==="object")return!0;for(let s of["oneOf","anyOf","allOf"]){let i=e[s];if(Array.isArray(i)&&i.length>0)return i.every((o)=>o!==null&&typeof o==="object"&&(o.type==="object"||G1(o,"$id"in o?{}:t)))}return!1}function by(e){if(!e.path?.length)return e.message;return`${e.path.map((t)=>String(typeof t==="object"?t.key:t)).join(".")}: ${e.message}`}async function _l(e,t){let a=await e["~standard"].validate(t);if(a.issues&&a.issues.length>0)return{success:!1,error:a.issues.map((s)=>by(s)).join(", ")};return{success:!0,data:a.value}}function yy(e){let t=fc(e,{target:gl,io:"input"});return typeof t.pattern==="string"?t.pattern:void 0}var ky=/\\\.\\d\{(\d+)\}/;function zy(e){let t=ky.exec(e),a=[void 0,-1,0];if(t)a.push(Number(t[1]));return[!1,!0].flatMap((s)=>[!1,!0].flatMap((i)=>a.map((o)=>Ds({local:s,offset:i,precision:o}))))}function Sy(e,t){let a;switch(e){case"email":a=[Lf()];break;case"uri":a=[bc()];break;case"date":a=[il()];break;case"date-time":a=zy(t);break}return new Set(a.map((s)=>yy(s)).filter((s)=>s!==void 0))}function xy(e,t,a){if(a!=="zod")return!0;return Sy(e,t).has(t)}function pn(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Ry(e){try{return vy(e,"input")}catch(t){let a=t instanceof Error?t.message:String(t);throw new oe(W.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${a}`)}}var qy=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function Cl(e){return qy.has(e)||e.startsWith("x-")}var jy=new Set(["$schema",...Object.keys(ls.shape.requestedSchema.shape)]),g1={string:ln([us,li,mi,_i]),number:ln([ds]),integer:ln([ds]),boolean:ln([di]),array:ln([pi,hi])},Py=new Set(us.shape.format.unwrap().options);function Ty(e,t,a,s){if(!pn(e))return e;let i=typeof e.type==="string"&&Object.hasOwn(g1,e.type)?g1[e.type]:void 0;if(i===void 0)return e;let o={};for(let[r,n]of Object.entries(e))if(i.has(r)||Cl(r))o[r]=n;else if(r==="pattern"&&e.type==="string"&&typeof e.format==="string"){if(!Py.has(e.format))o[r]=n;else if(typeof n!=="string"||!xy(e.format,n,a))s.push(`${t}.${r}`)}else s.push(`${t}.${r}`);return o}function Cy(e,t){let a={},s=[];for(let[i,o]of Object.entries(e))if(i==="properties"&&pn(o))a[i]=Object.fromEntries(Object.entries(o).map(([r,n])=>[r,Ty(n,`properties.${r}`,t,s)]));else if(jy.has(i))a[i]=o;else if(!Cl(i))s.push(i);if(s.length>0)throw new oe(W.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${s.join(", ")}`);return a}function Ey(e,t){if(!pn(e.properties))return t;let a=Object.entries(e.properties).filter(([,s])=>!su(fi,s).success).map(([s])=>`properties.${s}`);return a.length>0?a.join(", "):t}function vl(e,t,a=""){if(Array.isArray(e)&&Array.isArray(t))return e.flatMap((s,i)=>vl(s,t[i],`${a}[${i}]`));if(!pn(e)||!pn(t))return[];return Object.entries(e).flatMap(([s,i])=>{let o=a?`${a}.${s}`:s;if(!Object.prototype.hasOwnProperty.call(t,s))return Cl(s)?[]:[o];return vl(i,t[s],o)})}function $y(e){if(!fl(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,a=Cy(Ry(e.requestedSchema),t),s=su(ls.shape.requestedSchema,a);if(!s.success)throw new oe(W.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${Ey(a,s.error.message)}`);let i=vl(a,s.data);if(i.length>0)throw new oe(W.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);let o=(s.data.required??[]).filter((r)=>!Object.prototype.hasOwnProperty.call(s.data.properties,r));if(o.length>0)throw new oe(W.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${o.join(", ")}`);return{...e,mode:"form",requestedSchema:s.data}}function My(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,a=typeof e.requestState==="string";if(!t&&!a)throw TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}var bq=Object.assign(My,{elicit(e){try{return{method:"elicitation/create",params:$y(e)}}catch(t){throw t instanceof oe?TypeError(t.message,{cause:t}):t}},elicitUrl(e){return{method:"elicitation/create",params:{...e,mode:"url"}}},createMessage(e){return{method:"sampling/createMessage",params:e}},listRoots(){return{method:"roots/list"}}});var Ny=!0,Iy=10,Oy=250;function K1(e){return{autoFulfill:e?.autoFulfill??Ny,maxRounds:e?.maxRounds??Iy}}function Ay(e,t,a){let s=t!==void 0&&Object.keys(t).length>0;if(!s&&a===void 0)return e;return{...e,...s&&{inputResponses:t},...a!==void 0&&{requestState:a}}}function Ly(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function Uy(e,t){return new Promise((a,s)=>{if(t?.aborted){s(t.reason instanceof L?t.reason:new L(A.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener("abort",o),a()},e),o=()=>{clearTimeout(i),s(t?.reason instanceof L?t.reason:new L(A.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",o,{once:!0})})}function Dy(e){let t=new AbortController,a=()=>t.abort(e?.reason);if(e?.addEventListener("abort",a,{once:!0}),e?.aborted)t.abort(e.reason);return{signal:t.signal,abort:(s)=>t.abort(s),dispose:()=>e?.removeEventListener("abort",a)}}async function Zy(e){let{config:t,method:a,originalParams:s,requestOptions:i,hooks:o,signal:r}=e,n=e.flowStartedAt??Date.now(),u=e.firstPayload,d=0;while(!0){if(d+=1,d>t.maxRounds)throw new L(A.InputRequiredRoundsExceeded,Ly(a,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:u.inputRequests,...u.requestState!==void 0&&{requestState:u.requestState}}});i.onprogress?.({progress:d,message:`Fulfilling input required by '${a}' (round ${d})`});let l=Object.entries(u.inputRequests??{}),h;if(l.length>0){let b=Dy(r);try{let g=await Promise.all(l.map(async([w,R])=>{try{return[w,await o.dispatchInputRequest(w,R,b.signal)]}catch(j){throw b.abort(j),j}}));h=Object.fromEntries(g)}finally{b.dispose()}}else await Uy(Oy,r);let p={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let b=Date.now()-n,g=i.maxTotalTimeout-b;if(g<=0)throw new L(A.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:b});p.maxTotalTimeout=g}let v=await o.retry(Ay(s,h,u.requestState),p);if(B1(v)){u={inputRequests:v.inputRequests??{},...v.requestState!==void 0&&{requestState:v.requestState}};continue}return v}}var By=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],Hy={IdJagTokenExchangeResponseSchema:nn,OAuthClientInformationFullSchema:wi,OAuthClientInformationSchema:un,OAuthClientMetadataSchema:cn,OAuthClientRegistrationErrorSchema:Jc,OAuthErrorResponseSchema:ps,OAuthMetadataSchema:ms,OAuthProtectedResourceMetadataSchema:gi,OAuthTokenRevocationRequestSchema:Wc,OAuthTokensSchema:_s,OpenIdProviderDiscoveryMetadataSchema:vi,OpenIdProviderMetadataSchema:rn},Y1={},X1={};function Q1(e,t){let a=e.slice(0,-6);Y1[a]=t,X1[a]=(s)=>t.safeParse(s).success}for(let e of By)Q1(e,ny[e]);for(let[e,t]of Object.entries(Hy))Q1(e,t);var Fy=Object.freeze(Y1),El=Object.freeze(X1);function Vy(e){switch(e){case"initialize":case"notifications/initialized":return ea(void 0);case"server/discover":return ea(au);default:return}}var gn=60000,Jy=[Wt,Bs,Xa,Fs],Wy=["inputResponses","requestState"];function v1(e,t){let a=e.params;if(!_n(a))return{message:e,lifted:{}};let s=a._meta,i=_n(s)?Jy.filter((u)=>(u in s)):[],o=t==="request"?Wy.filter((u)=>(u in a)):[];if(i.length===0&&o.length===0)return{message:e,lifted:{}};let r={},n={...a};if(i.length>0&&_n(s)){let u={},d={...s};for(let l of i)u[l]=s[l],delete d[l];if(r.envelope=u,Object.keys(d).length>0)n._meta=d;else delete n._meta}for(let u of o){if(u==="inputResponses")r.inputResponses=n[u];if(u==="requestState")r.requestState=n[u];delete n[u]}return{message:{...e,params:n},lifted:r}}function w1(e,t){let a=e.validateResult(t,void 0);if(!a.ok&&a.reason==="not-in-era")return;return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(s){let i=e.validateResult(t,s);if(i.ok)return{value:i.value};return{issues:[{message:i.reason==="invalid"?i.message:`not-in-era: ${t}`}]}}}}}function $l(e){return()=>e}var Gy=$l(void 0),Ky,vn=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{Ky=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??zc,this.setNotificationHandler("notifications/cancelled",(t)=>{this._oncancel(t)}),this.setNotificationHandler("notifications/progress",(t)=>{this._onprogress(t)}),this.setRequestHandler("ping",(t)=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let a=e.params??{};return{...e,params:{...a,_meta:{...t,...a._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new L(A.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){if(e.params.requestId===void 0)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,a,s,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(s,t),startTime:Date.now(),timeout:t,maxTotalTimeout:a,resetTimeoutOnProgress:i,onTimeout:s})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let a=Date.now()-t.startTime;if(t.maxTotalTimeout&&a>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new L(A.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:a});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);if(t)clearTimeout(t.timeoutId),this._timeoutInfo.delete(e)}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let a=this.transport?.onerror;this._transport.onerror=(i)=>{a?.(i),this._onerror(i)};let s=this._transport?.onmessage;this._transport.onmessage=(i,o)=>{if(s?.(i,o),hs(i)||fs(i))this._onresponse(i);else if(za(i))this._onrequest(i,o);else if(Z1(i))this._onnotification(i,o);else this._onerror(Error(`Unknown message type: ${JSON.stringify(i)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let s of this._timeoutInfo.values())clearTimeout(s.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let a=new L(A.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let s of e.values())s(a);for(let s of t.values())s.abort(a)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:a}=v1(e,"notification"),s=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let r=m1(t.classification);if(r!==s.era){this._onerror(Error(`Era mismatch on inbound notification '${a.method}': classified as ${r} but this instance serves ${s.era}`));return}}if(ml(a.method)&&!s.hasNotificationMethod(a.method))return;let i=this._notificationHandlers.get(a.method),o=this.fallbackNotificationHandler;if(i===void 0&&o===void 0)return;Promise.resolve().then(()=>i===void 0?o(a):i(a,s)).catch((r)=>this._onerror(Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(e,t){let{message:a,lifted:s}=v1(e,"request"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop"){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let o=this._transport,r=(g,w,R)=>{let j={jsonrpc:"2.0",id:a.id,error:{code:g,message:w,...R!==void 0&&{data:R}}};o?.send(j).catch((x)=>this._onerror(Error(`Failed to send an error response: ${x}`)))};if(t?.classification!==void 0){let g=m1(t.classification);if(g!==i.era){this._onerror(Error(`Era mismatch on inbound request '${a.method}': classified as ${g} but this instance serves ${i.era}`));let w=t.classification.revision??g;r(W.UnsupportedProtocolVersion,`Unsupported protocol version: ${w}`,{supported:this._supportedProtocolVersions,requested:w});return}}if(ll(a.method)&&!i.hasRequestMethod(a.method)&&!(_1(a.method)&&this._customSchemaRequestMethods.has(a.method))){r(W.MethodNotFound,"Method not found");return}let n=this._requestHandlers.get(a.method)??this.fallbackRequestHandler;if(n===void 0){r(W.MethodNotFound,"Method not found");return}let u=i.checkInboundEnvelope(s);if(u!==void 0){r(W.InvalidParams,u);return}let d=(g,w)=>this._notificationViaCodec(this._resolveOutboundCodec(g.method),g,{...w,relatedRequestId:a.id}),l=(g,w,R)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(g.method),g,w,{...R,relatedRequestId:a.id}),h=new AbortController;this._requestHandlerAbortControllers.set(a.id,h);let p=s.inputResponses===void 0?void 0:Yy(s.inputResponses),v={sessionId:o?.sessionId,mcpReq:{id:a.id,method:a.method,_meta:a.params?._meta,...s.envelope!==void 0&&{envelope:s.envelope},...p!==void 0&&{inputResponses:p.accepted},...p!==void 0&&p.droppedKeys.length>0&&{droppedInputResponseKeys:p.droppedKeys},requestState:s.requestState===void 0?Gy:$l(s.requestState),signal:h.signal,send:(g,w,R)=>{let j=this._resolveOutboundCodec(g.method);if(this._assertOutboundRequestInEra(j,g.method),fl(w))return l(g,w,R);let x=w1(j,g.method);if(x===void 0)throw TypeError(`'${g.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return l(g,x,w)},notify:d},http:t?.authInfo?{authInfo:t.authInfo}:void 0},b=this.buildContext(v,t);Promise.resolve().then(()=>n(a,b)).then(async(g)=>{if(h.signal.aborted)return;let w;try{w=i.encodeResult(a.method,g,this._outboundServerInfo())}catch(j){this._onerror(Error(`Failed to encode result for ${a.method}: ${j}`)),r(W.InternalError,"Internal error");return}let R={result:w,jsonrpc:"2.0",id:a.id};await o?.send(R)},async(g)=>{if(h.signal.aborted)return;let w=Number.isSafeInteger(g.code)?g.code:W.InternalError,R={jsonrpc:"2.0",id:a.id,error:{code:i.encodeErrorCode(w),message:g.message??"Internal error",...g.data!==void 0&&{data:g.data}}};await o?.send(R)}).catch((g)=>this._onerror(Error(`Failed to send response: ${g}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(a.id)===h)this._requestHandlerAbortControllers.delete(a.id)})}_onprogress(e){let{progressToken:t,...a}=e.params,s=Number(t),i=this._progressHandlers.get(s);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let o=this._responseHandlers.get(s),r=this._timeoutInfo.get(s);if(r&&o&&r.resetTimeoutOnProgress)try{this._resetTimeout(s)}catch(n){this._responseHandlers.delete(s),this._progressHandlers.delete(s),this._cleanupTimeout(s),o(n);return}i(a)}_onresponse(e){let t=Number(e.id),a=this._responseHandlers.get(t);if(a===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),hs(e))a(e);else a(oe.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,a){let s=this._resolveOutboundCodec(e.method);if(fl(t)){if(!_1(e.method))this._assertOutboundRequestInEra(s,e.method);return this._requestWithSchemaViaCodec(s,e,t,a)}this._assertOutboundRequestInEra(s,e.method);let i=w1(s,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(s,e,i,t)}_negotiatedWireCodec(){return ea(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Vy(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(ll(t)&&!e.hasRequestMethod(t))throw new L(A.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,a){let s=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(s,e.method),this._requestWithSchemaViaCodec(s,e,t,a)}_requestWithSchemaViaCodec(e,t,a,s){let{relatedRequestId:i,resumptionToken:o,onresumptiontoken:r,headers:n}=s??{},u=Date.now(),d,l;return new Promise((h,p)=>{let v=(k)=>{p(k)};if(!this._transport){v(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(k){v(k);return}if(s?.signal?.aborted){let k=s.signal.reason;throw k instanceof L?k:new L(A.RequestTimeout,String(k))}let b=e.era===au&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,g=this._requestMessageId++;l=g;let w={...t,jsonrpc:"2.0",id:g};if(s?.onprogress)this._progressHandlers.set(g,s.onprogress),w.params={...t.params,_meta:{...t.params?._meta,progressToken:g}};let R=this._envelopeOutbound(w),j=!1,x=(k)=>{if(j)return;if(this._progressHandlers.delete(g),b===void 0){if(t.method!=="initialize")this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(k)}}),{relatedRequestId:i,resumptionToken:o,onresumptiontoken:r}).catch((N)=>this._onerror(Error(`Failed to send cancellation: ${N}`)))}else b.abort();p(k instanceof L?k:new L(A.RequestTimeout,String(k)))};this._responseHandlers.set(g,(k)=>{if(s?.signal?.aborted)return;if(j=!0,k instanceof Error)return p(k);let N;try{N=e.decodeResult(t.method,k.result)}catch(K){return p(K instanceof Error?K:Error(String(K)))}if(N.kind==="invalid")return p(N.error);if(N.kind==="input_required"){if(s?.allowInputRequired===!0)return h(tk(N));let K={codec:e,request:t,resultSchema:a,options:s,flowStartedAt:u,retry:(se,we)=>this._requestWithSchemaViaCodec(e,se===void 0?{method:t.method}:{method:t.method,params:se},a,we)};return h(this._resolveNonCompleteResult(N,K))}let X=N.result;_l(a,X).then((K)=>{if(K.success)h(K.data);else p(new L(A.InvalidResult,`Invalid result for ${t.method}: ${K.error}`))},p)}),d=()=>x(s?.signal?.reason),s?.signal?.addEventListener("abort",d,{once:!0});let P=s?.timeout??gn,S=()=>x(new L(A.RequestTimeout,"Request timed out",{timeout:P}));this._setupTimeout(g,P,s?.maxTotalTimeout,S,s?.resetTimeoutOnProgress??!1),this._transport.send(R,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:r,headers:n,requestSignal:b?.signal}).catch((k)=>{this._progressHandlers.delete(g),p(k)})}).finally(()=>{if(d)s?.signal?.removeEventListener("abort",d);if(l!==void 0)this._responseHandlers.delete(l),this._cleanupTimeout(l)})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,a){if(!this._transport)throw new L(A.NotConnected,"Not connected");if(ml(t.method)&&!e.hasNotificationMethod(t.method))throw new L(A.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let s=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&a?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;this._transport?.send(s,a).catch((i)=>this._onerror(i))});return}await this._transport.send(s,a)}setRequestHandler(e,t,a){this.assertRequestHandlerCapability(e);let s;if(typeof t==="function"){if(!ll(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);s=(i,o)=>{let r=this._negotiatedWireCodec(),n=r.validateRequest(e,i);if(!n.ok&&n.reason==="not-in-era")n=r.validateInputRequest(e,i);if(!n.ok){if(n.reason==="not-in-era")throw new oe(W.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,o))}}else if(a)s=async(i,o)=>{let r=await _l(t.params,{...i.params});if(!r.success)throw new oe(W.InvalidParams,`Invalid params for ${e}: ${r.error}`);return a(r.data,o)};else throw TypeError("setRequestHandler: handler is required");if(typeof t==="function")this._customSchemaRequestMethods.delete(e);else this._customSchemaRequestMethods.add(e);this._requestHandlers.set(e,this._wrapHandler(e,s))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,a){if(typeof t==="function"){if(!ml(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(s,i)=>{let o=i.validateNotification(e,s);if(!o.ok){if(o.reason==="not-in-era")throw new oe(W.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(o.message)}return Promise.resolve(t(o.value))});return}if(!a)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async(s)=>{let i=await _l(t.params,{...s.params});if(!i.success)throw new oe(W.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await a(i.data,s)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function _n(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function Ml(e,t){let a={...e};for(let s in t){let i=s,o=t[i];if(o===void 0)continue;let r=a[i];a[i]=_n(r)&&_n(o)?{...r,...o}:o}return a}function eu(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Yy(e){let t={},a=[];if(!eu(e))return{accepted:t,droppedKeys:a};for(let[s,i]of Object.entries(e)){if(!eu(i)||"method"in i||"result"in i){a.push(s);continue}t[s]=i}return{accepted:t,droppedKeys:a}}function b1(e){throw new L(A.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function Xy(e,t,a,s,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:a?._meta,requestState:$l(void 0),signal:s,send:()=>b1("send"),notify:()=>b1("notify")}}}async function Qy(e,t,a,s,i){if(!eu(s)||typeof s.method!=="string")throw new L(A.InvalidResult,`Invalid input request '${a}': each inputRequests entry must be an embedded request object with a method`,{key:a});let o=s.method;if(!t.hasInputRequestMethod(o))throw new L(A.InvalidResult,`Invalid input request '${a}': '${o}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:a,method:o});let r=e.getRequestHandler(o);if(r===void 0)throw new L(A.CapabilityNotSupported,`Cannot fulfil input request '${a}': no handler is registered for '${o}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:a,method:o});let n=eu(s.params)?s.params:void 0;return await r({jsonrpc:"2.0",id:a,method:o,...n!==void 0&&{params:n}},e.buildContext(Xy(a,o,n,i,e.sessionId)))}function ek(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function eg(e,t,a,s){let{codec:i,request:o,options:r,flowStartedAt:n}=s,u={inputRequests:a.inputRequests,...a.requestState!==void 0&&{requestState:a.requestState}},d={dispatchInputRequest:(l,h,p)=>Qy(e,i,l,h,p),retry:(l,h)=>s.retry(l,ek(r,h))};return Zy({config:t,method:o.method,originalParams:o.params,firstPayload:u,flowStartedAt:n,signal:r?.signal,requestOptions:{...r?.timeout!==void 0&&{timeout:r.timeout},...r?.maxTotalTimeout!==void 0&&{maxTotalTimeout:r.maxTotalTimeout},...r?.onprogress!==void 0&&{onprogress:r.onprogress}},hooks:d})}function tk(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}/*!
|
|
66
68
|
* content-type
|
|
67
69
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
68
70
|
* MIT Licensed
|
|
69
|
-
*/var zz=zp((e)=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,r=/\\([\u000b\u0020-\u00ff])/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=s;function s(a){if(!a)throw TypeError("argument string is required");var c=typeof a==="object"?n(a):a;if(typeof c!=="string")throw TypeError("argument string is required to be a string");var l=c.indexOf(";"),d=l!==-1?c.slice(0,l).trim():c.trim();if(!o.test(d))throw TypeError("invalid media type");var f=new i(d.toLowerCase());if(l!==-1){var h,g,v;t.lastIndex=l;while(g=t.exec(c)){if(g.index!==l)throw TypeError("invalid parameter format");if(l+=g[0].length,h=g[1].toLowerCase(),v=g[2],v.charCodeAt(0)===34){if(v=v.slice(1,-1),v.indexOf("\\")!==-1)v=v.replace(r,"$1")}f.parameters[h]=v}if(l!==c.length)throw TypeError("invalid parameter format")}return f}function n(a){var c;if(typeof a.getHeader==="function")c=a.getHeader("content-type");else if(typeof a.headers==="object")c=a.headers&&a.headers["content-type"];if(typeof c!=="string")throw TypeError("content-type header is missing from object");return c}function i(a){this.parameters=Object.create(null),this.type=a}}),Rz=xp(zz(),1);function Cg(e){if(!e)return;try{return Rz.parse(e).type}catch{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(t===""||e.slice(t.length).includes(","))return;return t}}function Y_(e){if(!e)return{};if(e instanceof Headers)return Object.fromEntries(e.entries());if(Array.isArray(e))return Object.fromEntries(e);return{...e}}function Ig(e=fetch,t){if(!t)return e;return async(r,o)=>e(r,{...t,...o,headers:o?.headers?{...Y_(t.headers),...Y_(o.headers)}:t.headers})}var xz=new Set([301,302,303,307,308]),kz=5;function Pz(e,t){if(e.protocol===t.protocol&&e.host===t.host)return!0;return e.protocol==="http:"&&t.protocol==="https:"&&e.hostname===t.hostname&&!e.port&&!t.port}function qg(e,t){let r=xz.has(t.status)?t.headers?.get("location"):void 0;if(!r)return;try{return new URL(r,e)}catch{return}}var Og=new WeakSet;function Ng(e){let t=(r,o)=>e(r,o);return Og.add(t),t}function vs(e){if(Og.has(e))return e;return async(t,r)=>{if(r?.redirect==="error"||r?.redirect==="manual")return e(t,r);let o=(r?.method??"GET").toUpperCase(),s=t;for(let n=0;;n++){let i=await e(s,{...r,redirect:"manual"}),a=qg(s,i);if(!a||n===kz)return i;let c=new URL(s),l=o==="GET"||i.status===307||i.status===308,d=!(a.username||a.password)||a.username===c.username&&a.password===c.password;if(!l||!d||!Pz(c,a))return i;await i.text?.().catch(()=>{}),s=a}}}function jg(e,t){if(t.type==="opaqueredirect")return"Redirect not followed: this runtime does not expose where it points";let r=qg(t.url||e,t);if(!r)return;if(r.username=r.password=r.search=r.hash="",r.protocol==="http:"&&new URL(t.url||e).protocol==="https:")return r.protocol="https:",`Redirect from https to plain http not followed; try ${r.href} as the endpoint`;return`Redirect to ${r.href} not followed; use that URL as the endpoint if it is the intended server`}function ha(e,t){let r=typeof e;if(r!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s++)if(!ha(e[s],t[s]))return!1;return!0}if(r==="object"){if(!e||!t)return e===t;let o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(let n of o)if(!ha(e[n],t[n]))return!1;return!0}return e===t}function vt(e){return encodeURI(Tz(e))}function Tz(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var Ez={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},$z={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},Cz={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},Iz=typeof self<"u"&&self.location&&self.location.origin!=="null"?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");function _o(e,t=Object.create(null),r=Iz,o=""){if(e&&typeof e==="object"&&!Array.isArray(e)){let n=e.$id||e.id;if(n){let i=new URL(n,r.href);if(i.hash.length>1)t[i.href]=e;else if(i.hash="",o==="")r=i;else _o(e,t,r)}}else if(e!==!0&&e!==!1)return t;let s=r.href+(o?"#"+o:"");if(t[s]!==void 0)throw Error(`Duplicate schema URI "${s}".`);if(t[s]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0)Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:s});if(e.$ref&&e.__absolute_ref__===void 0){let n=new URL(e.$ref,r.href);n.hash=n.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:n.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let n=new URL(e.$recursiveRef,r.href);n.hash=n.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:n.href})}if(e.$anchor){let n=new URL("#"+e.$anchor,r.href);t[n.href]=e}for(let n in e){if(Cz[n])continue;let i=`${o}/${vt(n)}`,a=e[n];if(Array.isArray(a)){if(Ez[n]){let c=a.length;for(let l=0;l<c;l++)_o(a[l],t,r,`${i}/${l}`)}}else if($z[n])for(let c in a)_o(a[c],t,r,`${i}/${vt(c)}`);else _o(a,t,r,i)}return t}var qz=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Oz=[0,31,28,31,30,31,30,31,31,30,31,30,31],Nz=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,jz=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Mz=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Az=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Lz=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,Uz=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Dz=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Zz=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Hz=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Fz=(e)=>{if(e[0]==='"')return!1;let[t,r,...o]=e.split("@");if(!t||!r||o.length!==0||t.length>64||r.length>253)return!1;if(t[0]==="."||t.endsWith(".")||t.includes(".."))return!1;if(!/^[a-z0-9.-]+$/i.test(r)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t))return!1;return r.split(".").every((s)=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(s))},Vz=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Bz=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,Jz=(e)=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function At(e){return e.test.bind(e)}var Mg={date:Ag,time:Lg.bind(void 0,!1),"date-time":Gz,duration:Jz,uri:Qz,"uri-reference":At(Mz),"uri-template":At(Az),url:At(Lz),email:Fz,hostname:At(jz),ipv4:At(Vz),ipv6:At(Bz),regex:tR,uuid:At(Uz),"json-pointer":At(Dz),"json-pointer-uri-fragment":At(Zz),"relative-json-pointer":At(Hz)};function Wz(e){return e%4===0&&(e%100!==0||e%400===0)}function Ag(e){let t=e.match(qz);if(!t)return!1;let r=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o==2&&Wz(r)?29:Oz[o])}function Lg(e,t){let r=t.match(Nz);if(!r)return!1;let o=+r[1],s=+r[2],n=+r[3],i=!!r[5];return(o<=23&&s<=59&&n<=59||o==23&&s==59&&n==60)&&(!e||i)}var Kz=/t|\s/i;function Gz(e){let t=e.split(Kz);return t.length==2&&Ag(t[0])&&Lg(!0,t[1])}var Yz=/\/|:/,Xz=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Qz(e){return Yz.test(e)&&Xz.test(e)}var eR=/[^\\]\\Z/;function tR(e){if(eR.test(e))return!1;try{return new RegExp(e,"u"),!0}catch(t){return!1}}function rR(e){let t=0,r=e.length,o=0,s;while(o<r)if(t++,s=e.charCodeAt(o++),s>=55296&&s<=56319&&o<r){if(s=e.charCodeAt(o),(s&64512)==56320)o++}return t}function be(e,t,r="2019-09",o=_o(t),s=!0,n=null,i="#",a="#",c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:i,keyword:"false",keywordLocation:i,error:"False boolean schema."}]};let l=typeof e,d;switch(l){case"boolean":case"number":case"string":d=l;break;case"object":if(e===null)d="null";else if(Array.isArray(e))d="array";else d="object";break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:f,$recursiveRef:h,$recursiveAnchor:g,type:v,const:_,enum:y,required:T,not:O,anyOf:k,allOf:P,oneOf:z,if:R,then:Z,else:ee,format:X,properties:ne,patternProperties:xe,additionalProperties:te,unevaluatedProperties:ie,minProperties:re,maxProperties:de,propertyNames:wt,dependentRequired:Fe,dependentSchemas:nt,dependencies:zt,prefixItems:Ge,items:Le,additionalItems:Zt,unevaluatedItems:Ht,contains:Rt,minContains:Ne,maxContains:Ue,minItems:De,maxItems:pt,uniqueItems:Ir,minimum:Ye,maximum:Xe,exclusiveMinimum:Ve,exclusiveMaximum:it,multipleOf:at,minLength:xt,maxLength:kt,pattern:sr,__absolute_ref__:Pt,__absolute_recursive_ref__:qr}=t,j=[];if(g===!0&&n===null)n=t;if(h==="#"){let B=n===null?o[qr]:n,U=`${a}/$recursiveRef`,Q=be(e,n===null?t:n,r,o,s,B,i,U,c);if(!Q.valid)j.push({instanceLocation:i,keyword:"$recursiveRef",keywordLocation:U,error:"A subschema had errors."},...Q.errors)}if(f!==void 0){let B=o[Pt||f];if(B===void 0){let M=`Unresolved $ref "${f}".`;if(Pt&&Pt!==f)M+=` Absolute URI "${Pt}".`;throw M+=`
|
|
71
|
+
*/var ak=Jm((e)=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,a=/\\([\u000b\u0020-\u00ff])/g,s=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(n){if(!n)throw TypeError("argument string is required");var u=typeof n==="object"?o(n):n;if(typeof u!=="string")throw TypeError("argument string is required to be a string");var d=u.indexOf(";"),l=d!==-1?u.slice(0,d).trim():u.trim();if(!s.test(l))throw TypeError("invalid media type");var h=new r(l.toLowerCase());if(d!==-1){var p,v,b;t.lastIndex=d;while(v=t.exec(u)){if(v.index!==d)throw TypeError("invalid parameter format");if(d+=v[0].length,p=v[1].toLowerCase(),b=v[2],b.charCodeAt(0)===34){if(b=b.slice(1,-1),b.indexOf("\\")!==-1)b=b.replace(a,"$1")}h.parameters[p]=b}if(d!==u.length)throw TypeError("invalid parameter format")}return h}function o(n){var u;if(typeof n.getHeader==="function")u=n.getHeader("content-type");else if(typeof n.headers==="object")u=n.headers&&n.headers["content-type"];if(typeof u!=="string")throw TypeError("content-type header is missing from object");return u}function r(n){this.parameters=Object.create(null),this.type=n}}),sk=Gm(ak(),1);function tg(e){if(!e)return;try{return sk.parse(e).type}catch{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(t===""||e.slice(t.length).includes(","))return;return t}}function y1(e){if(!e)return{};if(e instanceof Headers)return Object.fromEntries(e.entries());if(Array.isArray(e))return Object.fromEntries(e);return{...e}}function ag(e=fetch,t){if(!t)return e;return async(a,s)=>e(a,{...t,...s,headers:s?.headers?{...y1(t.headers),...y1(s.headers)}:t.headers})}var ik=new Set([301,302,303,307,308]),ok=5;function rk(e,t){if(e.protocol===t.protocol&&e.host===t.host)return!0;return e.protocol==="http:"&&t.protocol==="https:"&&e.hostname===t.hostname&&!e.port&&!t.port}function sg(e,t){let a=ik.has(t.status)?t.headers?.get("location"):void 0;if(!a)return;try{return new URL(a,e)}catch{return}}var ig=new WeakSet;function og(e){let t=(a,s)=>e(a,s);return ig.add(t),t}function yi(e){if(ig.has(e))return e;return async(t,a)=>{if(a?.redirect==="error"||a?.redirect==="manual")return e(t,a);let s=(a?.method??"GET").toUpperCase(),i=t;for(let o=0;;o++){let r=await e(i,{...a,redirect:"manual"}),n=sg(i,r);if(!n||o===ok)return r;let u=new URL(i),d=s==="GET"||r.status===307||r.status===308,l=!(n.username||n.password)||n.username===u.username&&n.password===u.password;if(!d||!l||!rk(u,n))return r;await r.text?.().catch(()=>{}),i=n}}}function rg(e,t){if(t.type==="opaqueredirect")return"Redirect not followed: this runtime does not expose where it points";let a=sg(t.url||e,t);if(!a)return;if(a.username=a.password=a.search=a.hash="",a.protocol==="http:"&&new URL(t.url||e).protocol==="https:")return a.protocol="https:",`Redirect from https to plain http not followed; try ${a.href} as the endpoint`;return`Redirect to ${a.href} not followed; use that URL as the endpoint if it is the intended server`}function wn(e,t){let a=typeof e;if(a!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let s=e.length;if(s!==t.length)return!1;for(let i=0;i<s;i++)if(!wn(e[i],t[i]))return!1;return!0}if(a==="object"){if(!e||!t)return e===t;let s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(let o of s)if(!wn(e[o],t[o]))return!1;return!0}return e===t}function vt(e){return encodeURI(nk(e))}function nk(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var ck={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},uk={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},dk={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},lk=typeof self<"u"&&self.location&&self.location.origin!=="null"?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");function gs(e,t=Object.create(null),a=lk,s=""){if(e&&typeof e==="object"&&!Array.isArray(e)){let o=e.$id||e.id;if(o){let r=new URL(o,a.href);if(r.hash.length>1)t[r.href]=e;else if(r.hash="",s==="")a=r;else gs(e,t,a)}}else if(e!==!0&&e!==!1)return t;let i=a.href+(s?"#"+s:"");if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0)Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i});if(e.$ref&&e.__absolute_ref__===void 0){let o=new URL(e.$ref,a.href);o.hash=o.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:o.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let o=new URL(e.$recursiveRef,a.href);o.hash=o.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:o.href})}if(e.$anchor){let o=new URL("#"+e.$anchor,a.href);t[o.href]=e}for(let o in e){if(dk[o])continue;let r=`${s}/${vt(o)}`,n=e[o];if(Array.isArray(n)){if(ck[o]){let u=n.length;for(let d=0;d<u;d++)gs(n[d],t,a,`${r}/${d}`)}}else if(uk[o])for(let u in n)gs(n[u],t,a,`${r}/${vt(u)}`);else gs(n,t,a,r)}return t}var mk=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,_k=[0,31,28,31,30,31,30,31,31,30,31,30,31],pk=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,hk=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,fk=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,gk=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,vk=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,wk=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,bk=/^(?:\/(?:[^~/]|~0|~1)*)*$/,yk=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,kk=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,zk=(e)=>{if(e[0]==='"')return!1;let[t,a,...s]=e.split("@");if(!t||!a||s.length!==0||t.length>64||a.length>253)return!1;if(t[0]==="."||t.endsWith(".")||t.includes(".."))return!1;if(!/^[a-z0-9.-]+$/i.test(a)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t))return!1;return a.split(".").every((i)=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(i))},Sk=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,xk=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,Rk=(e)=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function Lt(e){return e.test.bind(e)}var ng={date:cg,time:ug.bind(void 0,!1),"date-time":Pk,duration:Rk,uri:Ek,"uri-reference":Lt(fk),"uri-template":Lt(gk),url:Lt(vk),email:zk,hostname:Lt(hk),ipv4:Lt(Sk),ipv6:Lt(xk),regex:Mk,uuid:Lt(wk),"json-pointer":Lt(bk),"json-pointer-uri-fragment":Lt(yk),"relative-json-pointer":Lt(kk)};function qk(e){return e%4===0&&(e%100!==0||e%400===0)}function cg(e){let t=e.match(mk);if(!t)return!1;let a=+t[1],s=+t[2],i=+t[3];return s>=1&&s<=12&&i>=1&&i<=(s==2&&qk(a)?29:_k[s])}function ug(e,t){let a=t.match(pk);if(!a)return!1;let s=+a[1],i=+a[2],o=+a[3],r=!!a[5];return(s<=23&&i<=59&&o<=59||s==23&&i==59&&o==60)&&(!e||r)}var jk=/t|\s/i;function Pk(e){let t=e.split(jk);return t.length==2&&cg(t[0])&&ug(!0,t[1])}var Tk=/\/|:/,Ck=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Ek(e){return Tk.test(e)&&Ck.test(e)}var $k=/[^\\]\\Z/;function Mk(e){if($k.test(e))return!1;try{return new RegExp(e,"u"),!0}catch(t){return!1}}function Nk(e){let t=0,a=e.length,s=0,i;while(s<a)if(t++,i=e.charCodeAt(s++),i>=55296&&i<=56319&&s<a){if(i=e.charCodeAt(s),(i&64512)==56320)s++}return t}function ve(e,t,a="2019-09",s=gs(t),i=!0,o=null,r="#",n="#",u=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:r,keyword:"false",keywordLocation:r,error:"False boolean schema."}]};let d=typeof e,l;switch(d){case"boolean":case"number":case"string":l=d;break;case"object":if(e===null)l="null";else if(Array.isArray(e))l="array";else l="object";break;default:throw Error(`Instances of "${d}" type are not supported.`)}let{$ref:h,$recursiveRef:p,$recursiveAnchor:v,type:b,const:g,enum:w,required:R,not:j,anyOf:x,allOf:P,oneOf:S,if:k,then:N,else:X,format:K,properties:se,patternProperties:we,additionalProperties:te,unevaluatedProperties:ie,minProperties:B,maxProperties:re,propertyNames:zt,dependentRequired:He,dependentSchemas:rt,dependencies:St,prefixItems:Xe,items:Oe,additionalItems:Bt,unevaluatedItems:Ht,contains:xt,minContains:Ce,maxContains:Ae,minItems:Le,maxItems:lt,uniqueItems:Ma,minimum:Qe,maximum:et,exclusiveMinimum:Fe,exclusiveMaximum:nt,multipleOf:ct,minLength:Rt,maxLength:qt,pattern:oa,__absolute_ref__:jt,__absolute_recursive_ref__:Na}=t,I=[];if(v===!0&&o===null)o=t;if(p==="#"){let V=o===null?s[Na]:o,U=`${n}/$recursiveRef`,ee=ve(e,o===null?t:o,a,s,i,V,r,U,u);if(!ee.valid)I.push({instanceLocation:r,keyword:"$recursiveRef",keywordLocation:U,error:"A subschema had errors."},...ee.errors)}if(h!==void 0){let V=s[jt||h];if(V===void 0){let O=`Unresolved $ref "${h}".`;if(jt&&jt!==h)O+=` Absolute URI "${jt}".`;throw O+=`
|
|
70
72
|
Known schemas:
|
|
71
|
-
- ${Object.keys(
|
|
72
|
-
- `)}`,Error(M)}let U=`${a}/$ref`,Q=be(e,B,r,o,s,n,i,U,c);if(!Q.valid)j.push({instanceLocation:i,keyword:"$ref",keywordLocation:U,error:"A subschema had errors."},...Q.errors);if(r==="4"||r==="7")return{valid:j.length===0,errors:j}}if(Array.isArray(v)){let B=v.length,U=!1;for(let Q=0;Q<B;Q++)if(d===v[Q]||v[Q]==="integer"&&d==="number"&&e%1===0&&e===e){U=!0;break}if(!U)j.push({instanceLocation:i,keyword:"type",keywordLocation:`${a}/type`,error:`Instance type "${d}" is invalid. Expected "${v.join('", "')}".`})}else if(v==="integer"){if(d!=="number"||e%1||e!==e)j.push({instanceLocation:i,keyword:"type",keywordLocation:`${a}/type`,error:`Instance type "${d}" is invalid. Expected "${v}".`})}else if(v!==void 0&&d!==v)j.push({instanceLocation:i,keyword:"type",keywordLocation:`${a}/type`,error:`Instance type "${d}" is invalid. Expected "${v}".`});if(_!==void 0){if(d==="object"||d==="array"){if(!ha(e,_))j.push({instanceLocation:i,keyword:"const",keywordLocation:`${a}/const`,error:`Instance does not match ${JSON.stringify(_)}.`})}else if(e!==_)j.push({instanceLocation:i,keyword:"const",keywordLocation:`${a}/const`,error:`Instance does not match ${JSON.stringify(_)}.`})}if(y!==void 0){if(d==="object"||d==="array"){if(!y.some((B)=>ha(e,B)))j.push({instanceLocation:i,keyword:"enum",keywordLocation:`${a}/enum`,error:`Instance does not match any of ${JSON.stringify(y)}.`})}else if(!y.some((B)=>e===B))j.push({instanceLocation:i,keyword:"enum",keywordLocation:`${a}/enum`,error:`Instance does not match any of ${JSON.stringify(y)}.`})}if(O!==void 0){let B=`${a}/not`;if(be(e,O,r,o,s,n,i,B).valid)j.push({instanceLocation:i,keyword:"not",keywordLocation:B,error:'Instance matched "not" schema.'})}let Tt=[];if(k!==void 0){let B=`${a}/anyOf`,U=j.length,Q=!1;for(let M=0;M<k.length;M++){let N=k[M],K=Object.create(c),J=be(e,N,r,o,s,g===!0?n:null,i,`${B}/${M}`,K);if(j.push(...J.errors),Q=Q||J.valid,J.valid)Tt.push(K)}if(Q)j.length=U;else j.splice(U,0,{instanceLocation:i,keyword:"anyOf",keywordLocation:B,error:"Instance does not match any subschemas."})}if(P!==void 0){let B=`${a}/allOf`,U=j.length,Q=!0;for(let M=0;M<P.length;M++){let N=P[M],K=Object.create(c),J=be(e,N,r,o,s,g===!0?n:null,i,`${B}/${M}`,K);if(j.push(...J.errors),Q=Q&&J.valid,J.valid)Tt.push(K)}if(Q)j.length=U;else j.splice(U,0,{instanceLocation:i,keyword:"allOf",keywordLocation:B,error:"Instance does not match every subschema."})}if(z!==void 0){let B=`${a}/oneOf`,U=j.length,Q=z.filter((M,N)=>{let K=Object.create(c),J=be(e,M,r,o,s,g===!0?n:null,i,`${B}/${N}`,K);if(j.push(...J.errors),J.valid)Tt.push(K);return J.valid}).length;if(Q===1)j.length=U;else j.splice(U,0,{instanceLocation:i,keyword:"oneOf",keywordLocation:B,error:`Instance does not match exactly one subschema (${Q} matches).`})}if(d==="object"||d==="array")Object.assign(c,...Tt);if(R!==void 0){let B=`${a}/if`;if(be(e,R,r,o,s,n,i,B,c).valid){if(Z!==void 0){let U=be(e,Z,r,o,s,n,i,`${a}/then`,c);if(!U.valid)j.push({instanceLocation:i,keyword:"if",keywordLocation:B,error:'Instance does not match "then" schema.'},...U.errors)}}else if(ee!==void 0){let U=be(e,ee,r,o,s,n,i,`${a}/else`,c);if(!U.valid)j.push({instanceLocation:i,keyword:"if",keywordLocation:B,error:'Instance does not match "else" schema.'},...U.errors)}}if(d==="object"){if(T!==void 0){for(let M of T)if(!(M in e))j.push({instanceLocation:i,keyword:"required",keywordLocation:`${a}/required`,error:`Instance does not have required property "${M}".`})}let B=Object.keys(e);if(re!==void 0&&B.length<re)j.push({instanceLocation:i,keyword:"minProperties",keywordLocation:`${a}/minProperties`,error:`Instance does not have at least ${re} properties.`});if(de!==void 0&&B.length>de)j.push({instanceLocation:i,keyword:"maxProperties",keywordLocation:`${a}/maxProperties`,error:`Instance does not have at least ${de} properties.`});if(wt!==void 0){let M=`${a}/propertyNames`;for(let N in e){let K=`${i}/${vt(N)}`,J=be(N,wt,r,o,s,n,K,M);if(!J.valid)j.push({instanceLocation:i,keyword:"propertyNames",keywordLocation:M,error:`Property name "${N}" does not match schema.`},...J.errors)}}if(Fe!==void 0){let M=`${a}/dependantRequired`;for(let N in Fe)if(N in e){let K=Fe[N];for(let J of K)if(!(J in e))j.push({instanceLocation:i,keyword:"dependentRequired",keywordLocation:M,error:`Instance has "${N}" but does not have "${J}".`})}}if(nt!==void 0)for(let M in nt){let N=`${a}/dependentSchemas`;if(M in e){let K=be(e,nt[M],r,o,s,n,i,`${N}/${vt(M)}`,c);if(!K.valid)j.push({instanceLocation:i,keyword:"dependentSchemas",keywordLocation:N,error:`Instance has "${M}" but does not match dependant schema.`},...K.errors)}}if(zt!==void 0){let M=`${a}/dependencies`;for(let N in zt)if(N in e){let K=zt[N];if(Array.isArray(K)){for(let J of K)if(!(J in e))j.push({instanceLocation:i,keyword:"dependencies",keywordLocation:M,error:`Instance has "${N}" but does not have "${J}".`})}else{let J=be(e,K,r,o,s,n,i,`${M}/${vt(N)}`);if(!J.valid)j.push({instanceLocation:i,keyword:"dependencies",keywordLocation:M,error:`Instance has "${N}" but does not match dependant schema.`},...J.errors)}}}let U=Object.create(null),Q=!1;if(ne!==void 0){let M=`${a}/properties`;for(let N in ne){if(!(N in e))continue;let K=`${i}/${vt(N)}`,J=be(e[N],ne[N],r,o,s,n,K,`${M}/${vt(N)}`);if(J.valid)c[N]=U[N]=!0;else if(Q=s,j.push({instanceLocation:i,keyword:"properties",keywordLocation:M,error:`Property "${N}" does not match schema.`},...J.errors),Q)break}}if(!Q&&xe!==void 0){let M=`${a}/patternProperties`;for(let N in xe){let K=new RegExp(N,"u"),J=xe[N];for(let ke in e){if(!K.test(ke))continue;let Or=`${i}/${vt(ke)}`,Et=be(e[ke],J,r,o,s,n,Or,`${M}/${vt(N)}`);if(Et.valid)c[ke]=U[ke]=!0;else Q=s,j.push({instanceLocation:i,keyword:"patternProperties",keywordLocation:M,error:`Property "${ke}" matches pattern "${N}" but does not match associated schema.`},...Et.errors)}}}if(!Q&&te!==void 0){let M=`${a}/additionalProperties`;for(let N in e){if(U[N])continue;let K=`${i}/${vt(N)}`,J=be(e[N],te,r,o,s,n,K,M);if(J.valid)c[N]=!0;else Q=s,j.push({instanceLocation:i,keyword:"additionalProperties",keywordLocation:M,error:`Property "${N}" does not match additional properties schema.`},...J.errors)}}else if(!Q&&ie!==void 0){let M=`${a}/unevaluatedProperties`;for(let N in e)if(!c[N]){let K=`${i}/${vt(N)}`,J=be(e[N],ie,r,o,s,n,K,M);if(J.valid)c[N]=!0;else j.push({instanceLocation:i,keyword:"unevaluatedProperties",keywordLocation:M,error:`Property "${N}" does not match unevaluated properties schema.`},...J.errors)}}}else if(d==="array"){if(pt!==void 0&&e.length>pt)j.push({instanceLocation:i,keyword:"maxItems",keywordLocation:`${a}/maxItems`,error:`Array has too many items (${e.length} > ${pt}).`});if(De!==void 0&&e.length<De)j.push({instanceLocation:i,keyword:"minItems",keywordLocation:`${a}/minItems`,error:`Array has too few items (${e.length} < ${De}).`});let B=e.length,U=0,Q=!1;if(Ge!==void 0){let M=`${a}/prefixItems`,N=Math.min(Ge.length,B);for(;U<N;U++){let K=be(e[U],Ge[U],r,o,s,n,`${i}/${U}`,`${M}/${U}`);if(c[U]=!0,!K.valid){if(Q=s,j.push({instanceLocation:i,keyword:"prefixItems",keywordLocation:M,error:"Items did not match schema."},...K.errors),Q)break}}}if(Le!==void 0){let M=`${a}/items`;if(Array.isArray(Le)){let N=Math.min(Le.length,B);for(;U<N;U++){let K=be(e[U],Le[U],r,o,s,n,`${i}/${U}`,`${M}/${U}`);if(c[U]=!0,!K.valid){if(Q=s,j.push({instanceLocation:i,keyword:"items",keywordLocation:M,error:"Items did not match schema."},...K.errors),Q)break}}}else for(;U<B;U++){let N=be(e[U],Le,r,o,s,n,`${i}/${U}`,M);if(c[U]=!0,!N.valid){if(Q=s,j.push({instanceLocation:i,keyword:"items",keywordLocation:M,error:"Items did not match schema."},...N.errors),Q)break}}if(!Q&&Zt!==void 0){let N=`${a}/additionalItems`;for(;U<B;U++){let K=be(e[U],Zt,r,o,s,n,`${i}/${U}`,N);if(c[U]=!0,!K.valid)Q=s,j.push({instanceLocation:i,keyword:"additionalItems",keywordLocation:N,error:"Items did not match additional items schema."},...K.errors)}}}if(Rt!==void 0)if(B===0&&Ne===void 0)j.push({instanceLocation:i,keyword:"contains",keywordLocation:`${a}/contains`,error:"Array is empty. It must contain at least one item matching the schema."});else if(Ne!==void 0&&B<Ne)j.push({instanceLocation:i,keyword:"minContains",keywordLocation:`${a}/minContains`,error:`Array has less items (${B}) than minContains (${Ne}).`});else{let M=`${a}/contains`,N=j.length,K=0;for(let J=0;J<B;J++){let ke=be(e[J],Rt,r,o,s,n,`${i}/${J}`,M);if(ke.valid)c[J]=!0,K++;else j.push(...ke.errors)}if(K>=(Ne||0))j.length=N;if(Ne===void 0&&Ue===void 0&&K===0)j.splice(N,0,{instanceLocation:i,keyword:"contains",keywordLocation:M,error:"Array does not contain item matching schema."});else if(Ne!==void 0&&K<Ne)j.push({instanceLocation:i,keyword:"minContains",keywordLocation:`${a}/minContains`,error:`Array must contain at least ${Ne} items matching schema. Only ${K} items were found.`});else if(Ue!==void 0&&K>Ue)j.push({instanceLocation:i,keyword:"maxContains",keywordLocation:`${a}/maxContains`,error:`Array may contain at most ${Ue} items matching schema. ${K} items were found.`})}if(!Q&&Ht!==void 0){let M=`${a}/unevaluatedItems`;for(;U<B;U++){if(c[U])continue;let N=be(e[U],Ht,r,o,s,n,`${i}/${U}`,M);if(c[U]=!0,!N.valid)j.push({instanceLocation:i,keyword:"unevaluatedItems",keywordLocation:M,error:"Items did not match unevaluated items schema."},...N.errors)}}if(Ir)for(let M=0;M<B;M++){let N=e[M],K=typeof N==="object"&&N!==null;for(let J=0;J<B;J++){if(M===J)continue;let ke=e[J];if(N===ke||K&&typeof ke==="object"&&ke!==null&&ha(N,ke))j.push({instanceLocation:i,keyword:"uniqueItems",keywordLocation:`${a}/uniqueItems`,error:`Duplicate items at indexes ${M} and ${J}.`}),M=Number.MAX_SAFE_INTEGER,J=Number.MAX_SAFE_INTEGER}}}else if(d==="number"){if(r==="4"){if(Ye!==void 0&&(Ve===!0&&e<=Ye||e<Ye))j.push({instanceLocation:i,keyword:"minimum",keywordLocation:`${a}/minimum`,error:`${e} is less than ${Ve?"or equal to ":""} ${Ye}.`});if(Xe!==void 0&&(it===!0&&e>=Xe||e>Xe))j.push({instanceLocation:i,keyword:"maximum",keywordLocation:`${a}/maximum`,error:`${e} is greater than ${it?"or equal to ":""} ${Xe}.`})}else{if(Ye!==void 0&&e<Ye)j.push({instanceLocation:i,keyword:"minimum",keywordLocation:`${a}/minimum`,error:`${e} is less than ${Ye}.`});if(Xe!==void 0&&e>Xe)j.push({instanceLocation:i,keyword:"maximum",keywordLocation:`${a}/maximum`,error:`${e} is greater than ${Xe}.`});if(Ve!==void 0&&e<=Ve)j.push({instanceLocation:i,keyword:"exclusiveMinimum",keywordLocation:`${a}/exclusiveMinimum`,error:`${e} is less than ${Ve}.`});if(it!==void 0&&e>=it)j.push({instanceLocation:i,keyword:"exclusiveMaximum",keywordLocation:`${a}/exclusiveMaximum`,error:`${e} is greater than or equal to ${it}.`})}if(at!==void 0){let B=e%at;if(Math.abs(0-B)>=0.00000011920929&&Math.abs(at-B)>=0.00000011920929)j.push({instanceLocation:i,keyword:"multipleOf",keywordLocation:`${a}/multipleOf`,error:`${e} is not a multiple of ${at}.`})}}else if(d==="string"){let B=xt===void 0&&kt===void 0?0:rR(e);if(xt!==void 0&&B<xt)j.push({instanceLocation:i,keyword:"minLength",keywordLocation:`${a}/minLength`,error:`String is too short (${B} < ${xt}).`});if(kt!==void 0&&B>kt)j.push({instanceLocation:i,keyword:"maxLength",keywordLocation:`${a}/maxLength`,error:`String is too long (${B} > ${kt}).`});if(sr!==void 0&&!new RegExp(sr,"u").test(e))j.push({instanceLocation:i,keyword:"pattern",keywordLocation:`${a}/pattern`,error:"String does not match pattern."});if(X!==void 0&&Mg[X]&&!Mg[X](e))j.push({instanceLocation:i,keyword:"format",keywordLocation:`${a}/format`,error:`String does not match format "${X}".`})}return{valid:j.length===0,errors:j}}var oR=class{schema;draft;shortCircuit;lookup;constructor(e,t="2019-09",r=!0){this.schema=e,this.draft=t,this.shortCircuit=r,this.lookup=_o(e)}validate(e){return be(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){if(t)e={...e,$id:t};_o(e,this.lookup)}},Xc=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=Tp(e,"pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.");return t==="draft-7"?"7":t}getValidator(e){let t=new oR(e,this.draft??this._draftFor(e),this.shortcircuit);return(r)=>{let o=t.validate(r);return o.valid?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:o.errors.map((s)=>`${s.instanceLocation}: ${s.error}`).join("; ")}}}};var Ug=!0;var gd;gd=globalThis.crypto;async function sR(e){return(await gd).getRandomValues(new Uint8Array(e))}async function nR(e){let r=Math.pow(2,8)-Math.pow(2,8)%66,o="";while(o.length<e){let s=await sR(e-o.length);for(let n of s)if(n<r)o+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"[n%66]}return o}async function iR(e){return await nR(e)}async function aR(e){let t=await(await gd).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Sd(e){if(!e)e=43;if(e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await iR(e),r=await aR(t);return{code_verifier:t,code_challenge:r}}var bs=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthClientFlowError"})}static[Symbol.hasInstance](e){return We(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return We(this,e)}constructor(e){super(e);this.name=new.target.name,br(this,new.target)}},ru=class extends bs{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.IssuerMismatchError"})}kind;expected;received;constructor(e,t,r){super(`Issuer mismatch in ${e==="metadata"?"authorization server metadata (RFC 8414 §3.3)":"authorization response (RFC 9207)"}: expected ${JSON.stringify(t)}, received ${JSON.stringify(r)}`);this.kind=e,this.expected=t,this.received=r}},Gg=class extends bs{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.RegistrationRejectedError"})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`);this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},Td=class extends bs{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsecureTokenEndpointError"})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`);this.tokenEndpoint=e}},fa=class extends bs{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.AuthorizationServerMismatchError"})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`);this.recordedIssuer=e,this.currentIssuer=t}},Ed=class extends bs{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsufficientScopeError"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:""}`);this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};function xd(e,t,r){if(!e)return;if(typeof e.issuer!=="string"){if(r?.canPersistStamp!==!1)console.warn("[mcp-sdk] SEP-2352: stored OAuth credential has no 'issuer' stamp (pre-upgrade storage or provider not round-tripping the value). SEP-2352 isolation is inactive for this read; ensure your provider round-trips the issuer field.");return e.issuer===void 0?e:{...e,issuer:void 0}}return Yg(e.issuer,t)?e:void 0}function Yg(e,t){return e===t||e.endsWith("/")&&e.slice(0,-1)===t||t.endsWith("/")&&t.slice(0,-1)===e}function Xg(e){if(e==null)return!1;let t=e;return typeof t.tokens==="function"&&typeof t.clientInformation==="function"}async function cR(e,t,r){let{resourceMetadataUrl:o,scope:s}=ys(t.response);if(await nu(e,{serverUrl:t.serverUrl,resourceMetadataUrl:o,scope:s,fetchFn:t.fetchFn,...r})!=="AUTHORIZED")throw new bt}function Qg(e,t){return{token:async()=>(await e.tokens())?.access_token,onUnauthorized:async(r)=>cR(e,r,t)}}var bt=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnauthorizedError"})}static[Symbol.hasInstance](e){return We(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return We(this,e)}constructor(e){super(e??"Unauthorized");this.name="UnauthorizedError",br(this,new.target)}};function $d(e){return e?.authorization_response_iss_parameter_supported===!0}function ou({iss:e,expectedIssuer:t,issParameterSupported:r}){if(t===void 0)return;if(e===void 0){if(r)throw new ru("authorization_response",t,void 0);return}if(e!==t)throw new ru("authorization_response",t,e)}function su(...e){let t=new Set;for(let r of e){if(!r)continue;for(let o of r.split(/\s+/))if(o)t.add(o)}return t.size>0?[...t].join(" "):void 0}function eS(e,t){if(!e)return!1;let r=new Set((t??"").split(/\s+/).filter(Boolean));for(let o of e.split(/\s+/))if(o&&!r.has(o))return!0;return!1}async function tS(e,t,r,o,s){if(typeof e==="string")return{authorizationCode:e,iss:t};let n=e.get("iss")??void 0,i=e.get("code");if(i)return{authorizationCode:i,iss:n};let a=(await r.discoveryState?.())?.authorizationServerMetadata;if(!a)try{a=(await qd(o,s)).authorizationServerMetadata}catch{a=void 0}if(!a)throw new bt("Authorization callback failed and the issuer could not be verified");ou({iss:n,expectedIssuer:a.issuer,issParameterSupported:$d(a)});let c=e.get("error");if(c)throw new yr(c,e.get("error_description")??c,e.get("error_uri")??void 0);throw new bt("Authorization callback contained neither `code` nor `error`")}function uR(e){return["client_secret_basic","client_secret_post","none"].includes(e)}var vd="code",bd="S256";function rS(e,t){let r=e.client_secret!==void 0;if("token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&uR(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method)))return e.token_endpoint_auth_method;if(t.length===0)return r?"client_secret_basic":"none";if(r&&t.includes("client_secret_basic"))return"client_secret_basic";if(r&&t.includes("client_secret_post"))return"client_secret_post";if(t.includes("none"))return"none";return r?"client_secret_post":"none"}function oS(e,t,r,o){let{client_id:s,client_secret:n}=t;switch(e){case"client_secret_basic":lR(s,n,r);return;case"client_secret_post":dR(s,n,o);return;case"none":pR(s,o);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function lR(e,t,r){if(!t)throw Error("client_secret_basic authentication requires a client_secret");let o=btoa(`${e}:${t}`);r.set("Authorization",`Basic ${o}`)}function dR(e,t,r){if(r.set("client_id",e),t)r.set("client_secret",t)}function pR(e,t){t.set("client_id",e)}function sS(e){return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="[::1]"||e==="::1"}function nS(e){let t=new URL(String(e));if(t.protocol!=="https:"&&!sS(t.hostname))throw new Td(t.href);return t}function mR(e){for(let t of e??[]){let r;try{r=new URL(t)}catch{continue}if(r.protocol!=="http:"&&r.protocol!=="https:")return"native";if(sS(r.hostname))return"native"}return"web"}function iS(e){let t=e.clientMetadata;return{...t,grant_types:t.grant_types??(e.redirectUrl===void 0?void 0:["authorization_code","refresh_token"]),application_type:t.application_type??mR(t.redirect_uris)}}async function kd(e){let t=e instanceof Response?e.status:void 0,r=e instanceof Response?await e.text():e;try{let o=mo.parse(JSON.parse(r));return yr.fromResponse(o)}catch(o){let s=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${o}. Raw body: ${r}`;return new yr(jt.ServerError,s)}}function Dg(e,t,r){let o=e.invalidateCredentials===void 0?`retrying authorization without discarding the stored ${r} (provider implements no invalidateCredentials())`:`invalidating the stored ${r} and retrying authorization`;console.warn(`[mcp-sdk] OAuth ${JSON.stringify(t.code)} — ${o}. Cause: ${JSON.stringify(t.message)}`)}async function nu(e,t){try{return await yd(e,t)}catch(r){if(r instanceof yr){if(r.code===jt.InvalidClient||r.code===jt.UnauthorizedClient)return Dg(e,r,"client credentials and tokens"),await e.invalidateCredentials?.("client"),await e.invalidateCredentials?.("tokens"),await yd(e,t);else if(r.code===jt.InvalidGrant||r.code===jt.InvalidDpopProof)return Dg(e,r,"tokens"),await e.invalidateCredentials?.("tokens"),await yd(e,t)}throw r}}function hR(e){let{requestedScope:t,resourceMetadata:r,authServerMetadata:o,clientMetadata:s}=e,n=t||r?.scopes_supported?.join(" ")||s.scope;if(n&&o?.scopes_supported?.includes("offline_access")&&!n.split(" ").includes("offline_access")&&s.grant_types?.includes("refresh_token"))n=`${n} offline_access`;return n}async function yd(e,{serverUrl:t,authorizationCode:r,iss:o,scope:s,resourceMetadataUrl:n,fetchFn:i,skipIssuerMetadataValidation:a,forceReauthorization:c}){let l=iS(e),d=await e.discoveryState?.(),f,h,g,v,_=n;if(!_&&d?.resourceMetadataUrl)_=new URL(d.resourceMetadataUrl);if(d?.authorizationServerUrl){if(h=d.authorizationServerUrl,f=d.resourceMetadata,g=d.authorizationServerMetadata??await Id(h,{fetchFn:i,skipIssuerValidation:a}),!f)try{f=await Cd(t,{resourceMetadataUrl:_},i)}catch(te){if(te instanceof TypeError)throw te}if(g!==d.authorizationServerMetadata||f!==d.resourceMetadata)await e.saveDiscoveryState?.({authorizationServerUrl:String(h),resourceMetadataUrl:_?.toString(),resourceMetadata:f,authorizationServerMetadata:g})}else{let te=await qd(t,{resourceMetadataUrl:_,fetchFn:i,skipIssuerMetadataValidation:a});h=te.authorizationServerUrl,g=te.authorizationServerMetadata,f=te.resourceMetadata,v={authorizationServerUrl:String(h),resourceMetadataUrl:_?.toString(),resourceMetadata:f,authorizationServerMetadata:g}}let y=g?.issuer??String(h),T={issuer:y};if(await e.saveAuthorizationServerUrl?.(y),r!==void 0){let te=d?.authorizationServerMetadata?.issuer??d?.authorizationServerUrl;if(te===void 0){if(e.saveDiscoveryState!==void 0)throw new fa("discoveryState was not available on the callback leg; ensure your provider persists discoveryState alongside codeVerifier",y);console.warn("[mcp-sdk] OAuthClientProvider does not implement saveDiscoveryState()/discoveryState(); the SEP-2352 callback-leg authorization-server binding cannot be checked. Implement discoveryState (persist alongside codeVerifier) — see docs/migration/upgrade-to-v2.md §SEP-2352.")}else if(!Yg(te,y))throw new fa(te,y)}if(v)await e.saveDiscoveryState?.(v);let O=await cS(t,e,f),k=O&&f&&!e.validateResourceURL?f.resource:O;if(k)await e.saveResourceUrl?.(Od(k));let P=hR({requestedScope:s,resourceMetadata:f,authServerMetadata:g,clientMetadata:e.clientMetadata}),z=await Promise.resolve(e.clientInformation(T)),R=xd(z,y,{canPersistStamp:e.saveClientInformation!==void 0});if(R===void 0&&z?.issuer&&e.saveClientInformation===void 0)throw new fa(z.issuer,y);if(R&&R.issuer===void 0)R={...R,issuer:y},await e.saveClientInformation?.(R,T);if(!R){if(r!==void 0)throw Error("Existing OAuth client information is required when exchanging an authorization code");let te=g?.client_id_metadata_document_supported===!0,ie=e.clientMetadataUrl;if(ie&&!aS(ie))throw new yr(jt.InvalidClientMetadata,`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${ie}`);if(te&&ie)R={client_id:ie,issuer:y},await e.saveClientInformation?.(R,T);else{if(!e.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");R={...await _S(h,{metadata:g,clientMetadata:l,scope:P,fetchFn:i}),issuer:y},await e.saveClientInformation(R,T)}}let Z=!e.redirectUrl;if(r!==void 0||Z){if(r!==void 0)ou({iss:o,expectedIssuer:g?.issuer,issParameterSupported:$d(g)});let te=await fS(e,h,{metadata:g,resource:k,authorizationCode:r,iss:o,scope:P,fetchFn:i});return await e.saveTokens({...te,issuer:y},T),"AUTHORIZED"}let ee=xd(await e.tokens(T),y);if(ee&&ee.issuer===void 0)ee={...ee,issuer:y},await e.saveTokens(ee,T);if(ee?.refresh_token&&!c){let te=await e.scopeForRefresh?.(ee),ie;try{ie=await hS(h,{metadata:g,clientInformation:R,refreshToken:ee.refresh_token,scope:te,resource:k,addClientAuthentication:e.addClientAuthentication,dpop:await e.dpop?.(),fetchFn:i})}catch(re){if(re instanceof Td)throw re;if(!(re instanceof yr)||re.code===jt.ServerError)console.warn(`[mcp-sdk] Could not refresh OAuth tokens; falling back to a new authorization request. Cause: ${JSON.stringify(re instanceof Error?re.message:String(re))}`);else throw re}if(ie)return await e.saveTokens({...ie,issuer:y},T),"AUTHORIZED"}let X=e.state?await e.state():void 0,{authorizationUrl:ne,codeVerifier:xe}=await dS(h,{metadata:g,clientInformation:R,state:X,redirectUrl:e.redirectUrl,scope:P,resource:k});return await e.saveCodeVerifier(xe),await e.redirectToAuthorization(ne),"REDIRECT"}function aS(e){if(!e)return!1;try{let t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function cS(e,t,r){let o=td(e);if(t.validateResourceURL)return await t.validateResourceURL(o,r?.resource);if(!r)return;if(!rd({requestedResource:o,configuredResource:r.resource}))throw Error(`Protected resource ${r.resource} does not match expected ${o} (or origin)`);return new URL(r.resource)}var fR=new Set(["bearer","dpop"]);function ys(e){let t=e.headers.get("WWW-Authenticate");if(!t)return{};let[r,o]=t.split(" ");if(!r||!fR.has(r.toLowerCase())||!o)return{};let s=Qc(e,"resource_metadata")||void 0,n;if(s)try{n=new URL(s)}catch{}let i=Qc(e,"scope")||void 0,a=Qc(e,"error")||void 0,c=Qc(e,"error_description")||void 0;return{resourceMetadataUrl:n,scope:i,error:a,errorDescription:c}}function Qc(e,t){let r=e.headers.get("WWW-Authenticate");if(!r)return null;let o=new RegExp(String.raw`${t}=(?:"([^"]+)"|([^\s,]+))`),s=r.match(o);if(s){let n=s[1]||s[2];if(n)return n}return null}async function Cd(e,t,r=fetch){let o=await SR(e,"oauth-protected-resource",r,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!o||o.status===404)throw await o?.text?.().catch(()=>{}),Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!o.ok)throw await o.text?.().catch(()=>{}),Error(`HTTP ${o.status} trying to load well-known OAuth protected resource metadata.`);return fs.parse(await o.json())}async function uS(e,t,r=fetch){let o=vs(r);try{return await o(e,{headers:t})}catch(s){if(!(s instanceof TypeError)||!Ug)throw s;if(t)try{return await o(e,{})}catch(n){if(!(n instanceof TypeError))throw n;return}return}}function _R(e,t="",r={}){if(t.endsWith("/"))t=t.slice(0,-1);return r.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function Zg(e,t,r=fetch){return await uS(e,{"MCP-Protocol-Version":t},r)}function gR(e,t){if(!e)return!0;if(t==="/")return!1;return!e.ok&&e.status<500||e.status===502}async function SR(e,t,r,o){let s=new URL(e),n=o?.protocolVersion??Kr,i;if(o?.metadataUrl)i=new URL(o.metadataUrl);else{let c=_R(t,s.pathname);i=new URL(c,o?.metadataServerUrl??s),i.search=s.search}let a=await Zg(i,n,r);if(!o?.metadataUrl&&gR(a,s.pathname))a=await Zg(new URL(`/.well-known/${t}`,s),n,r);return a}function lS(e){let t=typeof e==="string"?new URL(e):e,r=t.pathname!=="/",o=[];if(!r)return o.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"},{url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),o;let s=t.pathname;if(s.endsWith("/"))s=s.slice(0,-1);return o.push({url:new URL(`/.well-known/oauth-authorization-server${s}`,t.origin),type:"oauth"},{url:new URL(`/.well-known/openid-configuration${s}`,t.origin),type:"oidc"},{url:new URL(`${s}/.well-known/openid-configuration`,t.origin),type:"oidc"}),o}async function Id(e,{fetchFn:t=fetch,protocolVersion:r=Kr,skipIssuerValidation:o=!1}={}){let s={"MCP-Protocol-Version":r,Accept:"application/json"},n=lS(e);for(let{url:i,type:a}of n){let c=await uS(i,s,t);if(!c)continue;if(!c.ok){if(await c.text?.().catch(()=>{}),c.status<500||c.status===502)continue;throw Error(`HTTP ${c.status} trying to load ${a==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}let l=a==="oauth"?lo.parse(await c.json()):_s.parse(await c.json());if(!o){let d=typeof e==="string"?e:e.href;if(!(l.issuer===d||d.endsWith("/")&&l.issuer===d.slice(0,-1)))throw new ru("metadata",d,l.issuer)}return l}}async function qd(e,t){let r,o;try{if(r=await Cd(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),r.authorization_servers&&r.authorization_servers.length>0)o=r.authorization_servers[0]}catch(n){if(n instanceof TypeError)throw n}if(!o)o=String(new URL("/",e));let s=await Id(o,{fetchFn:t?.fetchFn,skipIssuerValidation:t?.skipIssuerMetadataValidation});return{authorizationServerUrl:o,authorizationServerMetadata:s,resourceMetadata:r}}function Od(e){return typeof e==="string"?e:e.href}async function dS(e,{metadata:t,clientInformation:r,redirectUrl:o,scope:s,state:n,resource:i}){let a;if(t){if(a=new URL(t.authorization_endpoint),!t.response_types_supported.includes(vd))throw Error(`Incompatible auth server: does not support response type ${vd}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(bd))throw Error(`Incompatible auth server: does not support code challenge method ${bd}`)}else a=new URL("/authorize",e);let c=await Sd(),{code_verifier:l,code_challenge:d}=c;if(a.searchParams.set("response_type",vd),a.searchParams.set("client_id",r.client_id),a.searchParams.set("code_challenge",d),a.searchParams.set("code_challenge_method",bd),a.searchParams.set("redirect_uri",String(o)),n)a.searchParams.set("state",n);if(s)a.searchParams.set("scope",s);if(s?.split(" ").includes("offline_access"))a.searchParams.append("prompt","consent");if(i)a.searchParams.set("resource",Od(i));return{authorizationUrl:a,codeVerifier:l}}function pS(e,t,r){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(r)})}async function mS(e,{metadata:t,tokenRequestParams:r,clientInformation:o,addClientAuthentication:s,resource:n,dpop:i,fetchFn:a}){let c=nS(t?.token_endpoint??new URL("/token",e)),l=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(n)r.set("resource",Od(n));if(!s&&o)oS(rS(o,t?.token_endpoint_auth_methods_supported??[]),o,l,r);let d=async()=>{let g=new Headers(l);if(s)await s(g,r,c,t);if(i)g.set("DPoP",await i.buildProof({htm:"POST",htu:c}));return vs(a??fetch)(c,{method:"POST",headers:g,body:r})},f=await d();if(i&&f.status===400){if((await f.clone().json().catch(()=>{}))?.error===jt.UseDpopNonce)i.observeNonce(f,c),f=await d()}if(i?.observeNonce(f,c),!f.ok)throw await kd(f);let h=await f.json();try{return po.parse(Kc(h))}catch(g){if(typeof h==="object"&&h!==null&&"error"in h)throw await kd(JSON.stringify(h));throw g}}async function hS(e,{metadata:t,clientInformation:r,refreshToken:o,scope:s,resource:n,addClientAuthentication:i,dpop:a,fetchFn:c}){let l=new URLSearchParams({grant_type:"refresh_token",refresh_token:o});if(s)l.set("scope",s);let d=await mS(e,{metadata:t,tokenRequestParams:l,clientInformation:r,addClientAuthentication:i,resource:n,dpop:a,fetchFn:c});return{refresh_token:o,...d,...s&&!d.scope&&{scope:s}}}async function fS(e,t,{metadata:r,resource:o,authorizationCode:s,iss:n,scope:i,fetchFn:a}={}){if(s!==void 0)ou({iss:n,expectedIssuer:r?.issuer,issParameterSupported:$d(r)});let c=r?.issuer??String(t),l=async()=>{let g=await e.clientInformation({issuer:c}),v=xd(g,c,{canPersistStamp:!1});if(g&&v===void 0)throw new fa(String(g.issuer),c);return v},d=await l(),f=i??e.clientMetadata.scope,h;if(e.prepareTokenRequest)h=await e.prepareTokenRequest(f);if(!h){if(!s)throw Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw Error("redirectUrl is required for authorization_code flow");h=pS(s,await e.codeVerifier(),e.redirectUrl)}return d??=await l(),mS(t,{metadata:r,tokenRequestParams:h,clientInformation:d,addClientAuthentication:e.addClientAuthentication,resource:o,dpop:await e.dpop?.(),fetchFn:a})}async function _S(e,{metadata:t,clientMetadata:r,scope:o,fetchFn:s}){let n;if(t){if(!t.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");n=new URL(t.registration_endpoint)}else n=new URL("/register",e);let i={...r,...o===void 0?{}:{scope:o}},a=await vs(s??fetch)(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!a.ok)throw new Gg({status:a.status,body:await a.text(),submittedMetadata:i});return gs.parse(Kc(await a.json()))}var eu=new Set(["tools/list","prompts/list","resources/list","resources/templates/list","server/discover"]),gS=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(wd(e))}set(e,t){let r=wd(e),o=eu.has(e.method),s=!this._entries.has(r);if(!o&&s&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let i of this._entries.keys())if(!eu.has(i.slice(0,i.indexOf("\x00")))){this._entries.delete(i),this._cappedSize--;break}}let n=++this._stamp;if(this._entries.set(r,{...t,stamp:n}),s&&!o)this._cappedSize++;return n}delete(e){if(this._entries.delete(wd(e))&&!eu.has(e.method))this._cappedSize--}evict(e){let t=`${e}\x00`,r=eu.has(e);for(let o of this._entries.keys())if(o.startsWith(t)){if(this._entries.delete(o),!r)this._cappedSize--}}clear(){this._entries.clear(),this._cappedSize=0}};function wd(e){return`${e.method}\x00${JSON.stringify([e.partition??"",e.params??""])}`}function zd(e,t){return t===void 0?e:`${e}\x00${t}`}var SS=86400000,vR=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity="";constructor(e,t,r=()=>{},o="",s=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=r,this._cachePartition=o,this._now=s}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e==="public"?"":this._cachePartition])}async _probe(e,t){let r={method:e,params:t??""},o=this._partitionFor("private"),s=await this._store.get({...r,partition:o});if(s!==void 0)return s;let n=this._partitionFor("public");if(n===o)return;let i=await this._store.get({...r,partition:n});return i?.scope==="public"?i:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,"")}async _deleteBoth(e,t){let r=this._partitionFor("private"),o=this._partitionFor("public");try{await this._store.delete({method:e,params:t,partition:r})}catch(s){this._reportError(s)}if(o!==r)try{await this._store.delete({method:e,params:t,partition:o})}catch(s){this._reportError(s)}}async evictKey(e,t){let r=zd(e,t),o=this._evictionGeneration.get(r);if(o!==void 0)this._evictionGeneration.set(r,o+1);await this._deleteBoth(e,t)}captureGeneration(e,t){let r=zd(e,t),o=this._evictionGeneration.get(r)??0;return this._evictionGeneration.set(r,o),o}async write(e,t,r,o){if((this._evictionGeneration.get(zd(e,o?.params))??0)!==r)return;let s=o?.params??"",n=this._partitionFor("private"),i=this._partitionFor("public"),a=(o?.scope??"private")==="public"?i:n;try{await this._store.set({method:e,params:s,partition:a},{value:bR(t),expiresAt:o?.expiresAt,scope:o?.scope})}catch(c){this._reportError(c)}if(i!==n)try{await this._store.delete({method:e,params:s,partition:a===n?i:n})}catch(c){this._reportError(c)}}async read(e,t){let r=await this._probe(e,t);if(r?.expiresAt===void 0||!(r.expiresAt>this.now()))return;try{let o=JSON.parse(r.value);if(typeof o!=="object"||o===null||Array.isArray(o))throw TypeError("cached document is not an object");return{value:o}}catch(o){this._reportError(o),await this._deleteBoth(e,t??"");return}}resetForReconnect(){if(!this._isUserSupplied)this._store.clear();this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=""}async toolDefinition(e){let t=await this._probe("tools/list");if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let r=this._decodeListTools(t),o=new Map;if(r!==void 0)for(let s of r.tools)o.set(s.name,s);this._toolIndex={stamp:t.stamp,byName:o}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let r=await this._probe("tools/list");if(r===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==r.stamp){let o=this._decodeListTools(r)??{tools:[]},s=new Map;for(let n of o.tools){let i=t(n);if(i!==void 0)s.set(n.name,i)}this._toolOutputValidatorIndex={stamp:r.stamp,byName:s}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every((r)=>r!==null&&typeof r==="object"))throw TypeError("cached tools/list document has a malformed tools array");return t}catch(t){this._reportError(t);return}}};function bR(e){let t;try{t=JSON.stringify(e)}catch(r){throw TypeError(`cache value is not JSON-serializable: ${r instanceof Error?r.message:String(r)}`)}if(typeof t!=="string")throw TypeError("cache value is not JSON-serializable: it has no JSON representation");return t}var vS=Symbol.for("mcp.authSeamEscape");function rt(e){if(typeof e==="object"&&e!==null||typeof e==="function")try{Object.defineProperty(e,vS,{value:!0,configurable:!0})}catch{}return e}function yR(e){return(typeof e==="object"&&e!==null||typeof e==="function")&&e[vS]===!0}var wR=-32022,zR=new Set([-32001,-32020,-32021]);function RR(e,t){switch(e.kind){case"result":return xR(e.result,t);case"rpc-error":return bS(e,t);case"http-error":return kR(e,t);case"network-error":return Hg(e.error,t);case"unusable-reply":return{kind:"error",error:new L(A.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${yS(e.error)})`,{cause:e.error},{cause:e.error})};case"auth-required":return{kind:"error",error:e.error};case"closed":if(t.transportKind==="stdio")return{kind:"legacy"};return Hg(Error("Connection closed during the version negotiation probe"),t);case"timeout":if(t.transportKind==="stdio")return{kind:"legacy"};return{kind:"error",error:new L(A.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function xR(e,t){let r=Qt(Gc).validateResult("server/discover",e);if(!r.ok)return{kind:"legacy"};let o=r.value.supportedVersions,s=t.clientModernVersions.find((n)=>o.includes(n));if(s!==void 0)return{kind:"modern",version:s,discover:r.value};if(t.fallbackAvailable)return{kind:"legacy"};return{kind:"error",error:new da({supported:[...o],requested:t.requestedVersion})}}function bS(e,t){let{code:r,message:o,data:s}=e;if(r===wR){let n=TR(s);if(n===void 0)return{kind:"legacy"};let i=new da({supported:n,requested:ER(s)??t.requestedVersion},o),a=la(n),c=t.clientModernVersions.find((l)=>a.includes(l));if(c!==void 0)return{kind:"corrective",version:c,error:i};if(a.length>0)return{kind:"error",error:i};return t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:i}}if(zR.has(r))return{kind:"legacy"};return{kind:"legacy"}}function kR(e,t){if(e.status===401||e.status===403){let o=e.status===403;return{kind:"error",error:new St(o?A.ClientHttpForbidden:A.ClientHttpAuthentication,`Version negotiation failed: ${o?"the server denied access (HTTP 403)":"the server requires authorization (HTTP 401)"}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:"error",error:new St(A.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let r=$R(e.body);if(r!==void 0)return bS(r,t);return{kind:"legacy"}}function Hg(e,t){if(t.environment==="browser"&&PR(e))return{kind:"legacy"};return{kind:"error",error:new L(A.EraNegotiationFailed,`Version negotiation probe failed: ${yS(e)}`,{cause:e},{cause:e})}}function PR(e){return e instanceof TypeError||e instanceof Error&&e.name==="TypeError"}function yS(e){return e instanceof Error?e.message:String(e)}function TR(e){if(typeof e!=="object"||e===null)return;let t=e.supported;if(!Array.isArray(t)||t.length===0||!t.every((r)=>typeof r==="string"))return;return t}function ER(e){if(typeof e!=="object"||e===null)return;let t=e.requested;return typeof t==="string"?t:void 0}function $R(e){if(e===void 0||e==="")return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=="object"||t===null)return;let r=t.error;if(typeof r!=="object"||r===null)return;let{code:o,message:s,data:n}=r;if(typeof o!=="number")return;return{code:o,message:typeof s==="string"?s:"",data:n}}var CR="legacy";function IR(e,t){let r=e?.mode??CR;if(r==="legacy")return{kind:"legacy"};let o=e?.probe??{};if(typeof r==="object"){if(!Mt(r.pin))throw TypeError(`versionNegotiation: { pin: '${r.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:"pin",version:r.pin,probe:o}}let s=t?la(t):[];return{kind:"auto",modernVersions:s.length>0?s:[...od],fallbackAvailable:t?sd(t).length>0:!0,probe:o}}function Fg(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?"browser":"node"}function Vg(e){return"stderr"in e&&"pid"in e?"stdio":"http"}var qR=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(t){this._transport=t,this._savedOnMessage=t.onmessage,this._savedOnError=t.onerror,this._savedOnClose=t.onclose}static async open(t){let r=new e(t);t.onmessage=(o)=>{let s=r._pending;if(s!==void 0&&(ho(o)||fo(o))&&o.id===s.id){if(r._pending=void 0,ho(o))s.resolve({kind:"response",result:o.result});else s.resolve({kind:"response",error:o.error});return}},t.onerror=(o)=>{r._savedOnError?.(o)},t.onclose=()=>{let o=r._pending;if(o!==void 0)r._pending=void 0,o.resolve({kind:"closed"});r._closeDelivered=!0,r._savedOnClose?.()};try{await t.start()}catch(o){throw r.detach(),o}return r}async exchange(t,r){let o=`server-discover-probe-${++this._probeCounter}`;return new Promise((s)=>{let n=!1,i=(c)=>{if(n)return;if(n=!0,clearTimeout(a),this._pending?.id===o)this._pending=void 0;s(c)},a=setTimeout(()=>i({kind:"timeout"}),r);this._pending={id:o,resolve:i},this._transport.send(t(o)).catch((c)=>i({kind:"send-error",error:c}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let t=this._savedOnClose,r=this._transport,o=!1,s=()=>{if(!o){o=!0;return}t()};r.onclose=s,Pd.set(r,()=>{if(r.onclose===s)r.onclose=t})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let t=this._transport,r=t.start,o=!0;t.start=async function(){if(o){o=!1,t.start=r;return}return r.call(t)}}},Pd=new WeakMap;function Bg(e){let t=Pd.get(e);Pd.delete(e),t?.()}function OR(e,t,r,o){return{jsonrpc:"2.0",id:e,method:"server/discover",params:{_meta:Qt(t).outboundEnvelope({protocolVersion:t,clientInfo:r,clientCapabilities:o})}}}function NR(e){if(e instanceof L&&e.code===A.ClientHttpUnexpectedContent)return!0;return e instanceof Error&&e.name==="SyntaxError"}function jR(e,t){switch(e.kind){case"response":return e.error===void 0?{kind:"result",result:e.result}:{kind:"rpc-error",...e.error};case"send-error":{let r=e.error;if(yR(r)||r instanceof bt||r instanceof Error&&r.name==="UnauthorizedError")return{kind:"auth-required",error:r};if(r instanceof St){let o=r.data?.text;return{kind:"http-error",status:r.data.status,body:typeof o==="string"?o:void 0,statusText:r.data.statusText}}if(NR(r))return{kind:"unusable-reply",error:r};return{kind:"network-error",error:r}}case"closed":return{kind:"closed"};case"timeout":return{kind:"timeout",timeoutMs:t}}}async function wS(e,t){let r=e.probe.timeoutMs??t.defaultTimeoutMs,o=Math.max(0,e.probe.maxRetries??0),s=e.kind==="pin"?[e.version]:e.modernVersions,n=e.kind==="auto"&&e.fallbackAvailable,i=await qR.open(t.transport),a=async()=>{let l=s[0],d=!1,f=o;for(;;){let h=await i.exchange((_)=>OR(_,l,t.clientInfo,t.capabilities),r);if(h.kind==="timeout"&&f>0){f--;continue}let g=jR(h,r),v=RR(g,{clientModernVersions:s,requestedVersion:l,fallbackAvailable:n,environment:t.environment,transportKind:t.transportKind});switch(v.kind){case"modern":return{era:"modern",version:v.version,discover:v.discover};case"corrective":if(d)throw v.error;d=!0,l=v.version;continue;case"legacy":{let _=g.kind==="closed"?"the connection closed during the server/discover probe":void 0;if(e.kind==="pin")throw new L(A.EraNegotiationFailed,_===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${_} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new L(A.EraNegotiationFailed,_===void 0?"Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to":`Version negotiation failed: ${_} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(_!==void 0&&t.disposableProbe!==!0)throw new L(A.EraNegotiationFailed,`Version negotiation failed: ${_} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:"legacy"}}case"error":throw v.error}}},c;try{c=await a()}catch(l){throw i.detach(),l}return i.release(),c}function MR(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,"_dispose"))return;let r=e._serverParams;return typeof r==="object"&&r!==null&&typeof r.command==="string"?r:void 0}async function AR(e,t,r,o){let n=new t.constructor({...r,stderr:"ignore"}),i=t.close,a=!1,c,l=new Promise((f,h)=>{c=()=>h(Jg())});t.close=async function(){return a=!0,c?.(),i.call(t)};let d;try{let f=wS(e,{...o,transport:n,transportKind:"stdio",disposableProbe:!0});f.catch(()=>{}),d=await Promise.race([f,l])}finally{await LR(n),t.close=i}if(a)throw Jg();return d}function Jg(){return new L(A.EraNegotiationFailed,"Version negotiation failed: the transport was closed during the server/discover probe")}async function LR(e){try{let t=e._dispose;await(typeof t==="function"?t.call(e):e.close())}catch{}}function Wg(e){let t=e._meta?.[It];return hd.Implementation(t)?t:void 0}function tu(e,t){if(!e||t===null||typeof t!=="object")return;if(e.type==="object"&&e.properties&&typeof e.properties==="object"){let r=t,o=e.properties;for(let s of Object.keys(o)){let n=o[s];if(r[s]===void 0&&Object.prototype.hasOwnProperty.call(n,"default"))r[s]=n.default;if(r[s]!==void 0)tu(n,r[s])}}if(Array.isArray(e.anyOf)){for(let r of e.anyOf)if(typeof r!=="boolean")tu(r,t)}if(Array.isArray(e.oneOf)){for(let r of e.oneOf)if(typeof r!=="boolean")tu(r,t)}}function zS(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,r=e.url!==void 0;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}function UR(e){if(typeof e==="object"&&e!==null){if(e.kind==="legacy"&&!("supportedVersions"in e)&&!("discover"in e))return e;if(e.kind==="modern"&&_r.safeParse(e.discover).success)return e}throw new L(A.EraNegotiationFailed,"connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }")}var Kg={"notifications/tools/list_changed":["tools/list"],"notifications/prompts/list_changed":["prompts/list"],"notifications/resources/list_changed":["resources/list","resources/templates/list"]},DR=64,Rd={},Nd=class extends ma{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;static{Rd.enforceStrictCapabilities=(e)=>e._enforceStrictCapabilities,Rd.walkPages=(e,t,r,o)=>e._walkPages(t,r,o),Rd.readResource=(e,t,r)=>e._readResource(t,r)}_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new L(A.ConnectionClosed,"subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset");for(let t of this._listenState.values())t.settle({cause:"remote",error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t);if(this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Xc,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=kg(t?.inputRequired),this._cache=new vR(t?.responseCacheStore??new gS,t?.responseCacheStore!==void 0,(r)=>this._reportStoreError(r),t?.cachePartition??""),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??DR,t?.listChanged)this._listChangedConfig=t.listChanged}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&Mt(this._negotiatedProtocolVersion)&&wr(e))return"drop"}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e===void 0)return;return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){if(!this._inputRequiredDriverConfig.autoFulfill)return Promise.reject(new L(A.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:"input_required",method:t.request.method}));return $g({getRequestHandler:(r)=>this._getRequestHandler(r),buildContext:(r)=>this.buildContext(r,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t)}_setupListChangedHandlers(e){if(e.tools&&this._serverCapabilities?.tools?.listChanged)this._setupListChangedHandler("tools","notifications/tools/list_changed",e.tools,async()=>(await this.listTools(void 0,{cacheMode:"refresh"})).tools);if(e.prompts&&this._serverCapabilities?.prompts?.listChanged)this._setupListChangedHandler("prompts","notifications/prompts/list_changed",e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:"refresh"})).prompts);if(e.resources&&this._serverCapabilities?.resources?.listChanged)this._setupListChangedHandler("resources","notifications/resources/list_changed",e.resources,async()=>(await this.listResources(void 0,{cacheMode:"refresh"})).resources)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=_d(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error("Cannot configure version negotiation after connecting to transport");this._versionNegotiation=e}_wrapHandler(e,t){if(e==="elicitation/create")return async(r,o)=>{let s=Qt(this._negotiatedProtocolVersion),n=s.validateRequest("elicitation/create",r);if(!n.ok&&n.reason==="not-in-era")n=s.validateInputRequest("elicitation/create",r);if(!n.ok)throw new se(n.reason==="not-in-era"?W.InternalError:W.InvalidParams,n.reason==="not-in-era"?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation request: ${n.message}`);let{params:i}=n.value;i.mode=i.mode??"form";let{supportsFormMode:a,supportsUrlMode:c}=zS(this._capabilities.elicitation);if(i.mode==="form"&&!a)throw new se(W.InvalidParams,"Client does not support form-mode elicitation requests");if(i.mode==="url"&&!c)throw new se(W.InvalidParams,"Client does not support URL-mode elicitation requests");let l=await t(r,o),d=s.validateResult("elicitation/create",l);if(!d.ok&&d.reason==="not-in-era")d=s.validateInputResponse("elicitation/create",l);if(!d.ok)throw new se(d.reason==="not-in-era"?W.InternalError:W.InvalidParams,d.reason==="not-in-era"?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation result: ${d.message}`);let f=d.value,h=i.mode==="form"?i.requestedSchema:void 0;if(i.mode==="form"&&f.action==="accept"&&f.content&&h&&this._capabilities.elicitation?.form?.applyDefaults)try{tu(h,f.content)}catch{}return f};if(e==="sampling/createMessage")return async(r,o)=>{let s=Qt(this._negotiatedProtocolVersion),n=s.validateRequest("sampling/createMessage",r);if(!n.ok&&n.reason==="not-in-era")n=s.validateInputRequest("sampling/createMessage",r);if(!n.ok)throw new se(n.reason==="not-in-era"?W.InternalError:W.InvalidParams,n.reason==="not-in-era"?"No wire schema for sampling/createMessage in the resolved era":`Invalid sampling request: ${n.message}`);let{params:i}=n.value,a=await t(r,o),c=Boolean(i.tools||i.toolChoice),l=s.samplingResultVariant(c,a);if(!l.ok&&l.reason==="not-in-era")l=s.validateInputResponse("sampling/createMessage",a);if(!l.ok)throw new se(l.reason==="not-in-era"?W.InternalError:W.InvalidParams,l.reason==="not-in-era"?"No result schema for sampling/createMessage in the resolved era":`Invalid sampling result: ${l.message}`);return l.value};return t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new L(A.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,UR(t.prior),t);let r=IR(this._versionNegotiation,this._supportedProtocolVersionsOption);if(r.kind!=="legacy")return this._connectNegotiated(e,r,t);return this._connectPlainLegacy(e,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let r=this._negotiatedProtocolVersion;if(r!==void 0)e.setProtocolVersion?.(r);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let r=sd(this._supportedProtocolVersions);try{let o=r[0];if(o===void 0)throw new L(A.EraNegotiationFailed,"Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version");let s=await this.request({method:"initialize",params:{protocolVersion:o,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(s===void 0)throw Error(`Server sent invalid initialize result: ${s}`);if(!r.includes(s.protocolVersion))throw Error(`Server's protocol version is not supported: ${s.protocolVersion}`);if(this._serverCapabilities=s.capabilities,this._serverVersion=s.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion)e.setProtocolVersion(s.protocolVersion);if(this._instructions=s.instructions,await this.notification({method:"notifications/initialized"}),this._negotiatedProtocolVersion=s.protocolVersion,this._listChangedConfig)this._setupListChangedHandlers(this._listChangedConfig)}catch(o){throw this.close(),o}}async _connectNegotiated(e,t,r){if(e.sessionId!==void 0){await super.connect(e);let s=this._negotiatedProtocolVersion;if(s!==void 0&&e.setProtocolVersion)e.setProtocolVersion(s);return}this._resetConnectionState();let o;try{let s=Vg(e),n={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:Fg(),defaultTimeoutMs:r?.timeout??pa},i=s==="stdio"?MR(e):void 0;o=i===void 0?await wS(t,{...n,transport:e,transportKind:s}):await AR(t,e,i,n)}catch(s){throw await e.close().catch(()=>{}),Bg(e),s}if(Bg(e),await super.connect(e),o.era==="legacy"){await this._legacyHandshake(e,r);return}if(this._serverCapabilities=o.discover.capabilities,this._serverVersion=Wg(o.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=o.discover.instructions,this._discoverResult=o.discover,this._negotiatedProtocolVersion=o.version,e.setProtocolVersion)e.setProtocolVersion(o.version);if(this._listChangedConfig){let s=this._listChangedConfig,n=this._serverCapabilities,i={...s.tools&&n?.tools?.listChanged&&{tools:s.tools},...s.prompts&&n?.prompts?.listChanged&&{prompts:s.prompts},...s.resources&&n?.resources?.listChanged&&{resources:s.resources}},a=!0;try{this._setupListChangedHandlers(i)}catch(l){a=!1,this.onerror?.(l instanceof Error?l:Error(String(l)))}let c=a?{...i.tools&&{toolsListChanged:!0},...i.prompts&&{promptsListChanged:!0},...i.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(c).length>0){let l=new AbortController,d=()=>l.abort(r?.signal?.reason);if(r?.signal?.aborted)d();r?.signal?.addEventListener("abort",d);try{this._autoOpenedSubscription=await this.listen(c,{timeout:r?.timeout,signal:l.signal})}catch(f){if(r?.signal?.aborted)throw await this.close().catch(()=>{}),f;this.onerror?.(f instanceof Error?f:Error(String(f)))}finally{r?.signal?.removeEventListener("abort",d)}}}}async _connectFromPrior(e,t,r){if(t.kind==="legacy")return this._connectPlainLegacy(e,r);let o=t.discover;this._resetConnectionState();let s=this._supportedProtocolVersionsOption,n=(s&&la(s).length>0?la(s):od).find((i)=>o.supportedVersions.includes(i));if(n===void 0)throw new L(A.EraNegotiationFailed,"connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.");if(await super.connect(e),this._discoverResult=o,this._serverCapabilities=o.capabilities,this._serverVersion=Wg(o),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=o.instructions,this._negotiatedProtocolVersion=n,e.setProtocolVersion?.(n),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(i){this.onerror?.(i instanceof Error?i:Error(String(i)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;if(t!==void 0)return`${t.name}@${t.version}`;return e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e===void 0)return;return Mt(e)?"modern":"legacy"}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new L(A.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new L(A.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new L(A.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new L(A.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new L(A.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new L(A.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"initialize":break;case"server/discover":break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new L(A.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new L(A.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new L(A.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new L(A.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case"ping":break}}async ping(e){return this.request({method:"ping"},e)}async discover(e){let t=await this._requestWithSchema({method:"server/discover"},_r,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:"completion/complete",params:e},t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug("Client.listPrompts() called but server does not advertise prompts capability - returning empty list"),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:"prompts/list",params:e},t);let r=await this._serveFromCache("prompts/list",void 0,t);if(r!==void 0)return r;return this._listAllPages("prompts/list",e,t,(o)=>o.prompts)}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResources() called but server does not advertise resources capability - returning empty list"),{resources:[]};if(e?.cursor!==void 0)return this.request({method:"resources/list",params:e},t);let r=await this._serveFromCache("resources/list",void 0,t);if(r!==void 0)return r;return this._listAllPages("resources/list",e,t,(o)=>o.resources)}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list"),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:"resources/templates/list",params:e},t);let r=await this._serveFromCache("resources/templates/list",void 0,t);if(r!==void 0)return r;return this._listAllPages("resources/templates/list",e,t,(o)=>o.resourceTemplates)}async _listAllPages(e,t,r,o,s){let n=r?.cacheMode==="bypass",i=this._cache.captureGeneration(e),a=(l)=>{let d=l===void 0?t&&{...t}:{...t,cursor:l};return this.request({method:e,...d&&{params:d}},r)},c=await this._walkPages(e,a,o);if(delete c.nextCursor,s?.(c),n)return c;return await this._cache.write(e,c,i,this._freshness(c)),c}async _walkPages(e,t,r){let o=await t(void 0),s=o.nextCursor,n=o,i=1;while(s!==void 0){if(this._listMaxPages!==0&&i>=this._listMaxPages)throw new L(A.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let a=await t(s);if(a.nextCursor===s&&JSON.stringify(r(a))===JSON.stringify(r(n)))break;r(o).push(...r(a)),n=a,s=a.nextCursor,i++}return o}_freshness(e,t){let r=e,o=typeof r.ttlMs==="number"?r.ttlMs:this._defaultCacheTtlMs,s=r.cacheScope==="public"?"public":"private";return{expiresAt:this._cache.now()+Math.min(Math.max(0,o),SS),scope:s,params:t}}async _serveFromCache(e,t,r){if(r?.cacheMode==="bypass"||r?.cacheMode==="refresh")return;let o=await this._cache.read(e,t).catch((s)=>void this._reportStoreError(s));if(o!==void 0){if(r?.signal?.aborted){let s=r.signal.reason;throw s instanceof L?s:new L(A.RequestTimeout,String(s))}return o.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(!e.outputSchema)return;try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(t){return{ok:!1,compileError:t}}}async _resolveXMcpHeaderScan(e,t){let r=t??await this._cache.toolDefinition(e);return r===void 0?void 0:dd(r.inputSchema)}async readResource(e,t){let{result:r}=await this._readResource(e,t);return r}async _readResource(e,t){let r=await this._serveFromCache("resources/read",e.uri,t);if(r!==void 0)return{result:r,cached:!0};let o=this._cache.captureGeneration("resources/read",e.uri),s=await this.request({method:"resources/read",params:e},t);if(t?.cacheMode!=="bypass"){let n=this._freshness(s,e.uri);if(n.expiresAt>this._cache.now())await this._cache.write("resources/read",s,o,n);else if(t?.cacheMode==="refresh")await this._cache.evictKey("resources/read",e.uri)}return{result:s,cached:!1}}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},t)}async listen(e,t){if(this.transport===void 0)throw new L(A.NotConnected,"Not connected");let r=this._negotiatedProtocolVersion;if(r===void 0||!Mt(r))throw new L(A.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${r??"none"}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:"subscriptions/listen",protocolVersion:r});if(t?.signal?.aborted){let k=t.signal.reason;throw k instanceof L?k:new L(A.RequestTimeout,String(k))}let o=new AbortController,s=`listen:${this._nextListenId++}`,n="opening",i,a,c,l,d=new Promise((k,P)=>{c=k,l=P}),f,h=new Promise((k)=>{f=k}),g=(k)=>{if(n==="closed")return;let P=n==="opening";if(i!==void 0)clearTimeout(i),i=void 0;if("ack"in k){n="open",c(k.ack);return}if(n="closed",a!==void 0)t?.signal?.removeEventListener("abort",a);if(this._listenState.delete(s),o.abort(),f(k.cause),P)l(k.error??new L(A.ConnectionClosed,"subscriptions/listen closed before the server acknowledged"))},v=async()=>{o.abort(),await this.notification({method:"notifications/cancelled",params:{requestId:s}}).catch(()=>{})},_=async()=>{if(n==="closed")return;g({cause:"local"}),await v()};this._listenState.set(s,{settle:g});let y=t?.timeout??pa;if(i=setTimeout(()=>{g({cause:"remote",error:new L(A.RequestTimeout,"subscriptions/listen ack timed out",{timeout:y})}),v().catch(()=>{})},y),t?.signal){let k=t.signal;a=()=>{if(n==="closed")return;let P=k.reason;g({cause:"local",error:P instanceof Error?P:Error(String(P??"Aborted"))}),v().catch(()=>{})},k.addEventListener("abort",a,{once:!0})}let T={jsonrpc:"2.0",id:s,method:"subscriptions/listen",params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},O=(k)=>{g({cause:"remote",error:k instanceof Error?k:Error(String(k))})};try{this.transport.send(T,{requestSignal:o.signal,onRequestStreamEnd:()=>g({cause:"remote",error:Error("subscriptions/listen: stream ended")})}).catch(O)}catch(k){O(k)}return{honoredFilter:await d,close:_,closed:h}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let r=Object.hasOwn(Kg,e.method)?Kg[e.method]:void 0;if(e.method==="notifications/resources/updated"){let o=e.params?.uri;if(typeof o==="string")this._cache.evictKey("resources/read",o)}else if(r!==void 0)for(let o of r)this._cache.evict(o);if(e.method==="notifications/subscriptions/acknowledged"){let o=e.params?._meta?.[Zo],s=typeof o==="string"?this._listenState.get(o):void 0;if(s!==void 0){let n=this._wireCodec().validateNotification("notifications/subscriptions/acknowledged",e);s.settle({ack:n.ok?n.value.params.notifications:{}});return}}if(e.method==="notifications/cancelled"){let o=e.params?.requestId,s=typeof o==="string"?this._listenState.get(o):void 0;if(s!==void 0){s.settle({cause:"remote",error:Error("subscriptions/listen: server cancelled the subscription")});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,r=typeof t==="string"?this._listenState.get(t):void 0;if(r!==void 0){if(fo(e))r.settle({cause:"remote",error:se.fromError(e.error.code,e.error.message,e.error.data)});else r.settle({cause:"graceful",error:new L(A.ConnectionClosed,"subscriptions/listen: server closed the subscription gracefully before acknowledging")});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new L(A.ConnectionClosed,"Connection closed");for(let t of this._listenState.values())t.settle({cause:"remote",error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let r=this.getProtocolEra()==="modern"&&Fg()!=="browser",o=async()=>{if(!r)return t;let c;try{c=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(d){this._reportStoreError(d)}if(!c?.valid||c.declarations.length===0)return t;let l=zg(c.declarations,e.arguments);return Object.keys(l).length===0?t:{...t,headers:{...t?.headers,...l}}},s=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,(c)=>this._compileOutputValidator(c)).catch((c)=>void this._reportStoreError(c)):this._compileOutputValidator(t.toolDefinition),n=()=>{if(s===void 0||s.ok)return;let c=s.compileError,l=(c instanceof Error?c.message:String(c)).slice(0,200);throw new se(W.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${l}`)};n();let i;try{i=await this.request({method:"tools/call",params:e},await o())}catch(c){let l=c instanceof se&&c.code===Ss;if(!r||!l||t?.toolDefinition!==void 0)throw c;let d={signal:t?.signal,timeout:t?.timeout,cacheMode:"refresh"};await this._cache.evict("tools/list"),await this.listTools(void 0,d).catch((f)=>this._reportStoreError(f)),s=await this._cache.outputValidator(e.name,(f)=>this._compileOutputValidator(f)).catch((f)=>void this._reportStoreError(f)),n(),i=await this.request({method:"tools/call",params:e},await o())}let a=s!==void 0&&s.ok?s.validator:void 0;if(a){if(i.structuredContent===void 0&&!i.isError)throw new se(W.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(i.structuredContent!==void 0&&!i.isError)try{let c=a(i.structuredContent);if(!c.valid)throw new se(W.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){if(c instanceof se)throw c;throw new se(W.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}return i}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug("Client.listTools() called but server does not advertise tools capability - returning empty list"),{tools:[]};if(e?.cursor!==void 0){let o=await this.request({method:"tools/list",params:e},t);return this._excludeInvalidXMcpHeaderTools(o),o}let r=await this._serveFromCache("tools/list",void 0,t);if(r!==void 0)return r;return this._listAllPages("tools/list",e,t,(o)=>o.tools,(o)=>this._excludeInvalidXMcpHeaderTools(o))}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!=="modern"||!this.transport||Vg(this.transport)==="stdio")return;let t=e.tools.filter((r)=>{let o=dd(r.inputSchema);if(!o.valid)return console.warn(`[mcp-sdk] excluding tool '${r.name}' from tools/list: invalid x-mcp-header declaration — ${o.reason}`),!1;return!0});if(t.length!==e.tools.length)e.tools=t}_setupListChangedHandler(e,t,r,o){let s=Yc(yi,r);if(!s.success)throw Error(`Invalid ${e} listChanged options: ${s.error.message}`);if(typeof r.onChanged!=="function")throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:n,debounceMs:i}=s.data,{onChanged:a}=r,c=async()=>{if(!n){a(null,null);return}try{a(null,await o())}catch(d){a(d instanceof Error?d:Error(String(d)),null)}},l=()=>{if(i){let d=this._listChangedDebounceTimers.get(e);if(d)clearTimeout(d);let f=setTimeout(c,i);this._listChangedDebounceTimers.set(e,f)}else c()};this.setNotificationHandler(t,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};class iu extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}var RS=10,ZR=13,go=32;function jd(e){}function PS(e){if(typeof e=="function")throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=jd,onError:r=jd,onRetry:o=jd,onComment:s,maxBufferSize:n}=e,i=[],a=0,c=!0,l,d="",f=0,h,g=!1;function v(z){if(g)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(c&&(c=!1,z.charCodeAt(0)===239&&z.charCodeAt(1)===187&&z.charCodeAt(2)===191&&(z=z.slice(3))),i.length===0){let ee=y(z);ee!==""&&(i.push(ee),a=ee.length),_();return}if(z.indexOf(`
|
|
73
|
-
`)===-1&&
|
|
74
|
-
`,
|
|
75
|
-
`,
|
|
76
|
-
`,
|
|
77
|
-
${
|
|
78
|
-
`,
|
|
79
|
-
`,
|
|
80
|
-
${
|
|
81
|
-
${R}`,f++;break;case"id":R.includes("\x00")||(l=R);break;case"retry":/^\d+$/.test(R)?o(parseInt(R,10)):r(new iu(`Invalid \`retry\` value: "${R}"`,{type:"invalid-retry",value:R,line:Z}));break;default:r(new iu(`Unknown field "${z.length>20?`${z.slice(0,20)}…`:z}"`,{type:"unknown-field",field:z,value:R,line:Z}));break}}function k(){f>0&&t({id:l,event:h,data:d}),l=void 0,d="",f=0,h=void 0}function P(z={}){if(z.consume&&i.length>0){let R=i.join("");T(R,0,R.length)}c=!0,l=void 0,d="",f=0,h=void 0,i.length=0,a=0,g=!1}return{feed:v,reset:P}}function xS(e,t,r){return r===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function kS(e,t,r){return r===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class Md extends TransformStream{constructor({onError:e,onRetry:t,onComment:r,maxBufferSize:o}={}){let s;super({start(n){s=PS({onEvent:(i)=>{n.enqueue(i)},onError(i){typeof e=="function"&&e(i),(e==="terminate"||i.type==="max-buffer-size-exceeded")&&n.error(i)},onRetry:t,onComment:r,maxBufferSize:o})},transform(n){s.feed(n)}})}}function HR(e){return/(?:^|,)\s*dpop(?:\s|$|,)/i.test(e)}function FR(e){if(e.status!==401)return!1;let t=e.headers.get("www-authenticate")??"";return HR(t)&&/use_dpop_nonce/i.test(t)}var VR=(e,t)=>(r)=>{let o=typeof e==="function"?e:()=>e;return async(s,n)=>{let i=(n?.method??"GET").toUpperCase(),a=new URL(s.toString()),c=await o();if(!c)return r(s,n);let l=async()=>{let f=await t();if(!f)return r(s,n);let h=new Headers(n?.headers),g=await c.buildProof({htm:i,htu:a,accessToken:f});return h.set("Authorization",`DPoP ${f}`),h.set("DPoP",g),r(s,{...n,headers:h})},d=await l();if(FR(d)&&d.headers.has("dpop-nonce"))c.observeNonce(d,a),await d.text?.().catch(()=>{}),d=await l();return c.observeNonce(d,a),d}},BR=(e)=>VR(async()=>{try{return await e.dpop?.()}catch(t){throw rt(t)}},async()=>{let t;try{t=await e.tokens()}catch(r){throw rt(r)}return t?.token_type?.toLowerCase()==="dpop"?t.access_token:void 0});var iT=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SseError"})}static[Symbol.hasInstance](e){return We(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return We(this,e)}constructor(e,t,r){super(`SSE error: ${t}`);this.code=e,this.event=r,br(this,new.target)}};var JR=1,WR={initialReconnectionDelay:1000,maxReconnectionDelay:30000,reconnectionDelayGrowFactor:1.5,maxRetries:2},KR=new Set(["authorization","dpop","content-type","mcp-protocol-version","mcp-method","mcp-name","mcp-session-id"]);function TS(e,t){if(typeof AbortSignal.any==="function")return AbortSignal.any([e,t]);let r=new AbortController;if(e.aborted)return r.abort(e.reason),r.signal;if(t.aborted)return r.abort(t.reason),r.signal;let o=()=>{e.removeEventListener("abort",s),t.removeEventListener("abort",n)};function s(){o(),r.abort(e.reason)}function n(){o(),r.abort(t.reason)}return e.addEventListener("abort",s,{once:!0}),t.addEventListener("abort",n,{once:!0}),r.signal}var ES=class{_abortController;_url;_resourceMetadataUrl;_scope;_requestInit;_authProvider;_oauthProvider;_skipIssuerMetadataValidation;_fetch;_fetchWithInit;_redirectPolicy;_sessionId;_reconnectionOptions;_protocolVersion;_onInsufficientScope;_maxStepUpRetries;_serverRetryMs;_reconnectionScheduler;_cancelReconnection;onclose;onerror;onmessage;hasPerRequestStream=!0;constructor(e,t){if(this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._skipIssuerMetadataValidation=t?.skipIssuerMetadataValidation,this._fetch=t?.fetch,Xg(t?.authProvider)){if(this._oauthProvider=t.authProvider,this._authProvider=Qg(t.authProvider,{skipIssuerMetadataValidation:t.skipIssuerMetadataValidation}),t.authProvider.dpop)this._fetch=BR(t.authProvider)(t.fetch??fetch)}else this._authProvider=t?.authProvider;if(this._redirectPolicy=t?.redirectPolicy,this._fetchWithInit=Ig(t?.fetch,t?.requestInit),this._redirectPolicy==="follow")this._fetchWithInit=Ng(this._fetchWithInit);this._sessionId=t?.sessionId,this._protocolVersion=t?.protocolVersion,this._reconnectionOptions=t?.reconnectionOptions??WR,this._reconnectionScheduler=t?.reconnectionScheduler,this._onInsufficientScope=t?.onInsufficientScope??"reauthorize",this._maxStepUpRetries=Math.max(0,t?.maxStepUpRetries??JR)}async _stepUpAuthorize(e,t){try{return await this._stepUpAuthorizeInner(e,t)}catch(r){throw rt(r)}}async _stepUpAuthorizeInner(e,t){if(this._onInsufficientScope==="throw")throw new Ed({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(!this._oauthProvider)throw new Ed({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(t>=this._maxStepUpRetries)throw new St(A.ClientHttpForbidden,`Server returned 403 insufficient_scope after step-up re-authorization (retry limit ${this._maxStepUpRetries} reached)`,{status:403,statusText:e.statusText??"Forbidden",text:e.text});if(e.resourceMetadataUrl)this._resourceMetadataUrl=e.resourceMetadataUrl;let r=await this._oauthProvider.tokens(),o=su(this._scope,r?.scope,e.scope);this._scope=o;let s=eS(o,r?.scope);return nu(this._oauthProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:o,forceReauthorization:s,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})}_redirects(e){return this._redirectPolicy==="follow"?e:vs(e)}_unfollowedRedirect(e,t){let r=this._redirectPolicy==="follow"?void 0:jg(e,t);return r&&`${r} (redirectPolicy: 'same-origin')`}async _commonHeaders(){let e=new Headers(this._requestInit?.headers||void 0),t;try{t=await this._authProvider?.token()}catch(r){throw rt(r)}if(t)e.set("Authorization",`Bearer ${t}`);if(this._sessionId)e.set("mcp-session-id",this._sessionId);if(this._protocolVersion)e.set("mcp-protocol-version",this._protocolVersion);return e}_applyBodyDerivedHeaders(e,t){if(Array.isArray(t)||!wr(t))return;let r=t.params?._meta?.[Jt];if(typeof r!=="string")return;e.set("mcp-protocol-version",r),e.set("mcp-method",t.method);let o=Rg(t.method,t.params);if(o?.value!==void 0)e.set("mcp-name",pd(o.value))}_isModernEnvelopedRequest(e){if(Array.isArray(e)||!wr(e))return!1;let t=e.params?._meta?.[Jt];return typeof t==="string"&&Mt(t)}async _startOrAuthSse(e,t=!1,r=0){let{resumptionToken:o,requestSignal:s}=e,n=()=>this._abortController?.signal.aborted===!0||s?.aborted===!0;try{let i=await this._commonHeaders(),a=[...i.get("accept")?.split(",").map((f)=>f.trim().toLowerCase())??[],"text/event-stream"];if(i.set("accept",[...new Set(a)].join(", ")),o)i.set("last-event-id",o);let c=this._abortController?.signal,l=s!==void 0&&c!==void 0?TS(c,s):s??c,d=await this._redirects(this._fetch??fetch)(this._url,{...this._requestInit,method:"GET",headers:i,signal:l});if(!d.ok){if(d.status===401&&this._authProvider){if(d.headers.has("www-authenticate")){let{resourceMetadataUrl:h,scope:g}=ys(d);this._resourceMetadataUrl=h,this._scope=su(this._scope,g)}if(this._authProvider.onUnauthorized&&!t){try{await this._authProvider.onUnauthorized({response:d,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(h){throw rt(h)}return await d.text?.().catch(()=>{}),this._startOrAuthSse(e,!0,r)}if(await d.text?.().catch(()=>{}),t)throw rt(new St(A.ClientHttpAuthentication,"Server returned 401 after re-authentication",{status:401,statusText:d.statusText}));throw rt(new bt)}if(d.status===403){let{resourceMetadataUrl:h,scope:g,error:v,errorDescription:_}=ys(d);if(v==="insufficient_scope"){let y=await d.text?.().catch(()=>null);if(await this._stepUpAuthorize({scope:g,resourceMetadataUrl:h,errorDescription:_,statusText:d.statusText,text:y},r)!=="AUTHORIZED")throw rt(new bt);return this._startOrAuthSse(e,t,r+1)}}if(await d.text?.().catch(()=>{}),d.status===405){e.onRequestStreamEnd?.();return}let f=this._unfollowedRedirect(this._url,d)??d.statusText;throw new St(A.ClientHttpFailedToOpenStream,`Failed to open SSE stream: ${f}`,{status:d.status,statusText:d.statusText})}this._handleSseStream(d.body,e,!0)}catch(i){if(!n())this.onerror?.(i);throw i}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,o=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*Math.pow(r,e),o)}_scheduleReconnection(e,t=0){let r=this._reconnectionOptions.maxRetries;if(t>=r){this.onerror?.(Error(`Maximum reconnection attempts (${r}) exceeded.`)),e.onRequestStreamEnd?.();return}let o=this._getNextReconnectionDelay(t),s=()=>{if(this._cancelReconnection=void 0,this._abortController?.signal.aborted||e.requestSignal?.aborted)return;this._startOrAuthSse(e).catch((n)=>{if(this._abortController?.signal.aborted||e.requestSignal?.aborted)return;this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`));try{this._scheduleReconnection(e,t+1)}catch(i){this.onerror?.(i instanceof Error?i:Error(String(i)))}})};if(this._reconnectionScheduler){let n=this._reconnectionScheduler(s,o,t);this._cancelReconnection=typeof n==="function"?n:void 0}else{let n=setTimeout(s,o);this._cancelReconnection=()=>clearTimeout(n)}}_handleSseStream(e,t,r){if(!e){t.onRequestStreamEnd?.();return}let{onresumptiontoken:o,replayMessageId:s,requestSignal:n,onRequestStreamEnd:i}=t,a=()=>this._abortController?.signal.aborted===!0||n?.aborted===!0,c,l=!1,d=!1;(async()=>{try{let h=e.pipeThrough(new TextDecoderStream).pipeThrough(new Md({onRetry:(g)=>{this._serverRetryMs=g}})).getReader();while(!0){let{value:g,done:v}=await h.read();if(v)break;if(g.id)c=g.id,l=!0,o?.(g.id);if(!g.data)continue;if(!g.event||g.event==="message")try{let _=gt.parse(JSON.parse(g.data));if(ho(_)||fo(_)){if(d=!0,s!==void 0)_.id=s}this.onmessage?.(_)}catch(_){this.onerror?.(_)}}if((r||l)&&!d&&this._abortController&&!a())this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:s,requestSignal:n,onRequestStreamEnd:i},0);else if(!a())i?.()}catch(h){if(a())return;if(this.onerror?.(Error(`SSE stream disconnected: ${h}`)),(r||l)&&!d&&this._abortController&&!a())try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:o,replayMessageId:s,requestSignal:n,onRequestStreamEnd:i},0)}catch(g){this.onerror?.(Error(`Failed to reconnect: ${g instanceof Error?g.message:String(g)}`)),i?.()}else i?.()}})()}async start(){if(this._abortController)throw Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e,t){if(!this._oauthProvider)throw new bt("finishAuth requires an OAuthClientProvider");let{authorizationCode:r,iss:o}=await tS(e,t,this._oauthProvider,this._url,{fetchFn:this._fetchWithInit,resourceMetadataUrl:this._resourceMetadataUrl});if(await nu(this._oauthProvider,{serverUrl:this._url,authorizationCode:r,iss:o,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})!=="AUTHORIZED")throw new bt("Failed to authorize")}async close(){try{this._cancelReconnection?.()}finally{this._cancelReconnection=void 0,this._abortController?.abort(),this.onclose?.()}}async send(e,t){return this._send(e,t,!1)}async _send(e,t,r,o=0){try{let{resumptionToken:s,onresumptiontoken:n}=t||{};if(s){this._startOrAuthSse({resumptionToken:s,replayMessageId:wr(e)?e.id:void 0,requestSignal:t?.requestSignal}).catch((y)=>this.onerror?.(y));return}let i=await this._commonHeaders();this._applyBodyDerivedHeaders(i,e);let a=Array.isArray(e)?e.some((y)=>ld(y)):ld(e);if(a)i.delete("mcp-session-id");if(t?.headers!==void 0)for(let[y,T]of Object.entries(t.headers)){if(KR.has(y.toLowerCase()))continue;i.set(y,T)}i.set("content-type","application/json");let c=[...i.get("accept")?.split(",").map((y)=>y.trim().toLowerCase())??[],"application/json","text/event-stream"];i.set("accept",[...new Set(c)].join(", "));let l=this._abortController?.signal,d=t?.requestSignal!==void 0&&l!==void 0?TS(l,t.requestSignal):t?.requestSignal??l,f={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(e),signal:d},h=await this._redirects(this._fetch??fetch)(this._url,f);if(a&&h.ok)this._sessionId=h.headers.get("mcp-session-id")||void 0;if(!h.ok){if(h.status===401&&this._authProvider){if(h.headers.has("www-authenticate")){let{resourceMetadataUrl:O,scope:k}=ys(h);this._resourceMetadataUrl=O,this._scope=su(this._scope,k)}if(this._authProvider.onUnauthorized&&!r){try{await this._authProvider.onUnauthorized({response:h,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(O){throw rt(O)}return await h.text?.().catch(()=>{}),this._send(e,t,!0,o)}if(await h.text?.().catch(()=>{}),r)throw rt(new St(A.ClientHttpAuthentication,"Server returned 401 after re-authentication",{status:401,statusText:h.statusText}));throw rt(new bt)}let y=await h.text?.().catch(()=>null);if(h.status===403){let{resourceMetadataUrl:O,scope:k,error:P,errorDescription:z}=ys(h);if(P==="insufficient_scope"){if(await this._stepUpAuthorize({scope:k,resourceMetadataUrl:O,errorDescription:z,statusText:h.statusText,text:y},o)!=="AUTHORIZED")throw rt(new bt);return this._send(e,t,r,o+1)}}if(h.status===400&&typeof y==="string"&&this._isModernEnvelopedRequest(e))try{let O=gt.parse(JSON.parse(y)),k=(Array.isArray(e)?e:[e]).filter((P)=>wr(P));if(fo(O)&&k.some((P)=>P.id===O.id)){this.onmessage?.(O);return}}catch{}let T=this._unfollowedRedirect(this._url,h)??y;throw new St(A.ClientHttpNotImplemented,`Error POSTing to endpoint: ${T}`,{status:h.status,statusText:h.statusText,text:y})}if(h.status===202){if(await h.text?.().catch(()=>{}),bg(e))this._startOrAuthSse({resumptionToken:void 0}).catch((y)=>this.onerror?.(y));return}let g=(Array.isArray(e)?e:[e]).some((y)=>("method"in y)&&("id"in y)&&y.id!==void 0),v=h.headers.get("content-type"),_=Cg(v);if(g)if(_==="text/event-stream")this._handleSseStream(h.body,{onresumptiontoken:n,requestSignal:t?.requestSignal,onRequestStreamEnd:t?.onRequestStreamEnd},!1);else if(_==="application/json"){let y=await h.json(),T=Array.isArray(y)?y.map((O)=>gt.parse(O)):[gt.parse(y)];for(let O of T)this.onmessage?.(O)}else throw await h.text?.().catch(()=>{}),new L(A.ClientHttpUnexpectedContent,`Unexpected content type: ${v}`,{contentType:v});else await h.text?.().catch(()=>{})}catch(s){if(t?.requestSignal?.aborted!==!0)this.onerror?.(s);throw s}}get sessionId(){return this._sessionId}async terminateSession(){if(!this._sessionId)return;try{let e=await this._commonHeaders(),t={...this._requestInit,method:"DELETE",headers:e,signal:this._abortController?.signal},r=await this._redirects(this._fetch??fetch)(this._url,t);if(await r.text?.().catch(()=>{}),!r.ok&&r.status!==405)throw new St(A.ClientHttpFailedToTerminateSession,`Failed to terminate session: ${this._unfollowedRedirect(this._url,r)??r.statusText}`,{status:r.status,statusText:r.statusText});this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}};class NS{_eventSlots=new Map;setHandler(e,t){let r=this._ensureEventSlot(e);if(r.onHandler&&t)console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`);r.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let r=this._eventSlots.get(e);if(!r)return;let o=r.listeners.indexOf(t);if(o!==-1)r.listeners.splice(o,1)}dispatch(e,t){let r=this._eventSlots.get(e);if(!r)return;r.onHandler?.(t);for(let o of[...r.listeners])o(t)}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t)t={listeners:[]},this._eventSlots.set(e,t);return t}}class jS{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}}var $S=new Set;function CS(e,t){let[r,o]=t,s=r?.shape;if(typeof s?.method?.value!=="string")return;let n=s.method.value,i=e==="request"?"setRequestHandler":"setNotificationHandler";if(!$S.has(i))$S.add(i),console.warn(`[ext-apps] ${i}(Schema, handler) is deprecated; use ${i}("${n}", { params: Schema.shape.params }, handler).`);let a=o;return[n,{params:s.params},e==="request"?(c,l)=>a({method:n,params:c},GR(l)):(c)=>a({method:n,params:c})]}function GR(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var MS="2026-01-26";var YR="ui/notifications/tool-input-partial";var XR=q([m("light"),m("dark")]).describe("Color theme preference for the host environment."),_a=q([m("inline"),m("fullscreen"),m("pip")]).describe("Display mode for UI presentation."),QR=q([m("--color-background-primary"),m("--color-background-secondary"),m("--color-background-tertiary"),m("--color-background-inverse"),m("--color-background-ghost"),m("--color-background-info"),m("--color-background-danger"),m("--color-background-success"),m("--color-background-warning"),m("--color-background-disabled"),m("--color-text-primary"),m("--color-text-secondary"),m("--color-text-tertiary"),m("--color-text-inverse"),m("--color-text-ghost"),m("--color-text-info"),m("--color-text-danger"),m("--color-text-success"),m("--color-text-warning"),m("--color-text-disabled"),m("--color-border-primary"),m("--color-border-secondary"),m("--color-border-tertiary"),m("--color-border-inverse"),m("--color-border-ghost"),m("--color-border-info"),m("--color-border-danger"),m("--color-border-success"),m("--color-border-warning"),m("--color-border-disabled"),m("--color-ring-primary"),m("--color-ring-secondary"),m("--color-ring-inverse"),m("--color-ring-info"),m("--color-ring-danger"),m("--color-ring-success"),m("--color-ring-warning"),m("--font-sans"),m("--font-mono"),m("--font-weight-normal"),m("--font-weight-medium"),m("--font-weight-semibold"),m("--font-weight-bold"),m("--font-text-xs-size"),m("--font-text-sm-size"),m("--font-text-md-size"),m("--font-text-lg-size"),m("--font-heading-xs-size"),m("--font-heading-sm-size"),m("--font-heading-md-size"),m("--font-heading-lg-size"),m("--font-heading-xl-size"),m("--font-heading-2xl-size"),m("--font-heading-3xl-size"),m("--font-text-xs-line-height"),m("--font-text-sm-line-height"),m("--font-text-md-line-height"),m("--font-text-lg-line-height"),m("--font-heading-xs-line-height"),m("--font-heading-sm-line-height"),m("--font-heading-md-line-height"),m("--font-heading-lg-line-height"),m("--font-heading-xl-line-height"),m("--font-heading-2xl-line-height"),m("--font-heading-3xl-line-height"),m("--border-radius-xs"),m("--border-radius-sm"),m("--border-radius-md"),m("--border-radius-lg"),m("--border-radius-xl"),m("--border-radius-full"),m("--border-width-regular"),m("--shadow-hairline"),m("--shadow-sm"),m("--shadow-md"),m("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),ex=C(QR.describe(`Style variables for theming MCP apps.
|
|
73
|
+
- ${Object.keys(s).join(`
|
|
74
|
+
- `)}`,Error(O)}let U=`${n}/$ref`,ee=ve(e,V,a,s,i,o,r,U,u);if(!ee.valid)I.push({instanceLocation:r,keyword:"$ref",keywordLocation:U,error:"A subschema had errors."},...ee.errors);if(a==="4"||a==="7")return{valid:I.length===0,errors:I}}if(Array.isArray(b)){let V=b.length,U=!1;for(let ee=0;ee<V;ee++)if(l===b[ee]||b[ee]==="integer"&&l==="number"&&e%1===0&&e===e){U=!0;break}if(!U)I.push({instanceLocation:r,keyword:"type",keywordLocation:`${n}/type`,error:`Instance type "${l}" is invalid. Expected "${b.join('", "')}".`})}else if(b==="integer"){if(l!=="number"||e%1||e!==e)I.push({instanceLocation:r,keyword:"type",keywordLocation:`${n}/type`,error:`Instance type "${l}" is invalid. Expected "${b}".`})}else if(b!==void 0&&l!==b)I.push({instanceLocation:r,keyword:"type",keywordLocation:`${n}/type`,error:`Instance type "${l}" is invalid. Expected "${b}".`});if(g!==void 0){if(l==="object"||l==="array"){if(!wn(e,g))I.push({instanceLocation:r,keyword:"const",keywordLocation:`${n}/const`,error:`Instance does not match ${JSON.stringify(g)}.`})}else if(e!==g)I.push({instanceLocation:r,keyword:"const",keywordLocation:`${n}/const`,error:`Instance does not match ${JSON.stringify(g)}.`})}if(w!==void 0){if(l==="object"||l==="array"){if(!w.some((V)=>wn(e,V)))I.push({instanceLocation:r,keyword:"enum",keywordLocation:`${n}/enum`,error:`Instance does not match any of ${JSON.stringify(w)}.`})}else if(!w.some((V)=>e===V))I.push({instanceLocation:r,keyword:"enum",keywordLocation:`${n}/enum`,error:`Instance does not match any of ${JSON.stringify(w)}.`})}if(j!==void 0){let V=`${n}/not`;if(ve(e,j,a,s,i,o,r,V).valid)I.push({instanceLocation:r,keyword:"not",keywordLocation:V,error:'Instance matched "not" schema.'})}let Pt=[];if(x!==void 0){let V=`${n}/anyOf`,U=I.length,ee=!1;for(let O=0;O<x.length;O++){let M=x[O],G=Object.create(u),J=ve(e,M,a,s,i,v===!0?o:null,r,`${V}/${O}`,G);if(I.push(...J.errors),ee=ee||J.valid,J.valid)Pt.push(G)}if(ee)I.length=U;else I.splice(U,0,{instanceLocation:r,keyword:"anyOf",keywordLocation:V,error:"Instance does not match any subschemas."})}if(P!==void 0){let V=`${n}/allOf`,U=I.length,ee=!0;for(let O=0;O<P.length;O++){let M=P[O],G=Object.create(u),J=ve(e,M,a,s,i,v===!0?o:null,r,`${V}/${O}`,G);if(I.push(...J.errors),ee=ee&&J.valid,J.valid)Pt.push(G)}if(ee)I.length=U;else I.splice(U,0,{instanceLocation:r,keyword:"allOf",keywordLocation:V,error:"Instance does not match every subschema."})}if(S!==void 0){let V=`${n}/oneOf`,U=I.length,ee=S.filter((O,M)=>{let G=Object.create(u),J=ve(e,O,a,s,i,v===!0?o:null,r,`${V}/${M}`,G);if(I.push(...J.errors),J.valid)Pt.push(G);return J.valid}).length;if(ee===1)I.length=U;else I.splice(U,0,{instanceLocation:r,keyword:"oneOf",keywordLocation:V,error:`Instance does not match exactly one subschema (${ee} matches).`})}if(l==="object"||l==="array")Object.assign(u,...Pt);if(k!==void 0){let V=`${n}/if`;if(ve(e,k,a,s,i,o,r,V,u).valid){if(N!==void 0){let U=ve(e,N,a,s,i,o,r,`${n}/then`,u);if(!U.valid)I.push({instanceLocation:r,keyword:"if",keywordLocation:V,error:'Instance does not match "then" schema.'},...U.errors)}}else if(X!==void 0){let U=ve(e,X,a,s,i,o,r,`${n}/else`,u);if(!U.valid)I.push({instanceLocation:r,keyword:"if",keywordLocation:V,error:'Instance does not match "else" schema.'},...U.errors)}}if(l==="object"){if(R!==void 0){for(let O of R)if(!(O in e))I.push({instanceLocation:r,keyword:"required",keywordLocation:`${n}/required`,error:`Instance does not have required property "${O}".`})}let V=Object.keys(e);if(B!==void 0&&V.length<B)I.push({instanceLocation:r,keyword:"minProperties",keywordLocation:`${n}/minProperties`,error:`Instance does not have at least ${B} properties.`});if(re!==void 0&&V.length>re)I.push({instanceLocation:r,keyword:"maxProperties",keywordLocation:`${n}/maxProperties`,error:`Instance does not have at least ${re} properties.`});if(zt!==void 0){let O=`${n}/propertyNames`;for(let M in e){let G=`${r}/${vt(M)}`,J=ve(M,zt,a,s,i,o,G,O);if(!J.valid)I.push({instanceLocation:r,keyword:"propertyNames",keywordLocation:O,error:`Property name "${M}" does not match schema.`},...J.errors)}}if(He!==void 0){let O=`${n}/dependantRequired`;for(let M in He)if(M in e){let G=He[M];for(let J of G)if(!(J in e))I.push({instanceLocation:r,keyword:"dependentRequired",keywordLocation:O,error:`Instance has "${M}" but does not have "${J}".`})}}if(rt!==void 0)for(let O in rt){let M=`${n}/dependentSchemas`;if(O in e){let G=ve(e,rt[O],a,s,i,o,r,`${M}/${vt(O)}`,u);if(!G.valid)I.push({instanceLocation:r,keyword:"dependentSchemas",keywordLocation:M,error:`Instance has "${O}" but does not match dependant schema.`},...G.errors)}}if(St!==void 0){let O=`${n}/dependencies`;for(let M in St)if(M in e){let G=St[M];if(Array.isArray(G)){for(let J of G)if(!(J in e))I.push({instanceLocation:r,keyword:"dependencies",keywordLocation:O,error:`Instance has "${M}" but does not have "${J}".`})}else{let J=ve(e,G,a,s,i,o,r,`${O}/${vt(M)}`);if(!J.valid)I.push({instanceLocation:r,keyword:"dependencies",keywordLocation:O,error:`Instance has "${M}" but does not match dependant schema.`},...J.errors)}}}let U=Object.create(null),ee=!1;if(se!==void 0){let O=`${n}/properties`;for(let M in se){if(!(M in e))continue;let G=`${r}/${vt(M)}`,J=ve(e[M],se[M],a,s,i,o,G,`${O}/${vt(M)}`);if(J.valid)u[M]=U[M]=!0;else if(ee=i,I.push({instanceLocation:r,keyword:"properties",keywordLocation:O,error:`Property "${M}" does not match schema.`},...J.errors),ee)break}}if(!ee&&we!==void 0){let O=`${n}/patternProperties`;for(let M in we){let G=new RegExp(M,"u"),J=we[M];for(let ke in e){if(!G.test(ke))continue;let Ia=`${r}/${vt(ke)}`,Tt=ve(e[ke],J,a,s,i,o,Ia,`${O}/${vt(M)}`);if(Tt.valid)u[ke]=U[ke]=!0;else ee=i,I.push({instanceLocation:r,keyword:"patternProperties",keywordLocation:O,error:`Property "${ke}" matches pattern "${M}" but does not match associated schema.`},...Tt.errors)}}}if(!ee&&te!==void 0){let O=`${n}/additionalProperties`;for(let M in e){if(U[M])continue;let G=`${r}/${vt(M)}`,J=ve(e[M],te,a,s,i,o,G,O);if(J.valid)u[M]=!0;else ee=i,I.push({instanceLocation:r,keyword:"additionalProperties",keywordLocation:O,error:`Property "${M}" does not match additional properties schema.`},...J.errors)}}else if(!ee&&ie!==void 0){let O=`${n}/unevaluatedProperties`;for(let M in e)if(!u[M]){let G=`${r}/${vt(M)}`,J=ve(e[M],ie,a,s,i,o,G,O);if(J.valid)u[M]=!0;else I.push({instanceLocation:r,keyword:"unevaluatedProperties",keywordLocation:O,error:`Property "${M}" does not match unevaluated properties schema.`},...J.errors)}}}else if(l==="array"){if(lt!==void 0&&e.length>lt)I.push({instanceLocation:r,keyword:"maxItems",keywordLocation:`${n}/maxItems`,error:`Array has too many items (${e.length} > ${lt}).`});if(Le!==void 0&&e.length<Le)I.push({instanceLocation:r,keyword:"minItems",keywordLocation:`${n}/minItems`,error:`Array has too few items (${e.length} < ${Le}).`});let V=e.length,U=0,ee=!1;if(Xe!==void 0){let O=`${n}/prefixItems`,M=Math.min(Xe.length,V);for(;U<M;U++){let G=ve(e[U],Xe[U],a,s,i,o,`${r}/${U}`,`${O}/${U}`);if(u[U]=!0,!G.valid){if(ee=i,I.push({instanceLocation:r,keyword:"prefixItems",keywordLocation:O,error:"Items did not match schema."},...G.errors),ee)break}}}if(Oe!==void 0){let O=`${n}/items`;if(Array.isArray(Oe)){let M=Math.min(Oe.length,V);for(;U<M;U++){let G=ve(e[U],Oe[U],a,s,i,o,`${r}/${U}`,`${O}/${U}`);if(u[U]=!0,!G.valid){if(ee=i,I.push({instanceLocation:r,keyword:"items",keywordLocation:O,error:"Items did not match schema."},...G.errors),ee)break}}}else for(;U<V;U++){let M=ve(e[U],Oe,a,s,i,o,`${r}/${U}`,O);if(u[U]=!0,!M.valid){if(ee=i,I.push({instanceLocation:r,keyword:"items",keywordLocation:O,error:"Items did not match schema."},...M.errors),ee)break}}if(!ee&&Bt!==void 0){let M=`${n}/additionalItems`;for(;U<V;U++){let G=ve(e[U],Bt,a,s,i,o,`${r}/${U}`,M);if(u[U]=!0,!G.valid)ee=i,I.push({instanceLocation:r,keyword:"additionalItems",keywordLocation:M,error:"Items did not match additional items schema."},...G.errors)}}}if(xt!==void 0)if(V===0&&Ce===void 0)I.push({instanceLocation:r,keyword:"contains",keywordLocation:`${n}/contains`,error:"Array is empty. It must contain at least one item matching the schema."});else if(Ce!==void 0&&V<Ce)I.push({instanceLocation:r,keyword:"minContains",keywordLocation:`${n}/minContains`,error:`Array has less items (${V}) than minContains (${Ce}).`});else{let O=`${n}/contains`,M=I.length,G=0;for(let J=0;J<V;J++){let ke=ve(e[J],xt,a,s,i,o,`${r}/${J}`,O);if(ke.valid)u[J]=!0,G++;else I.push(...ke.errors)}if(G>=(Ce||0))I.length=M;if(Ce===void 0&&Ae===void 0&&G===0)I.splice(M,0,{instanceLocation:r,keyword:"contains",keywordLocation:O,error:"Array does not contain item matching schema."});else if(Ce!==void 0&&G<Ce)I.push({instanceLocation:r,keyword:"minContains",keywordLocation:`${n}/minContains`,error:`Array must contain at least ${Ce} items matching schema. Only ${G} items were found.`});else if(Ae!==void 0&&G>Ae)I.push({instanceLocation:r,keyword:"maxContains",keywordLocation:`${n}/maxContains`,error:`Array may contain at most ${Ae} items matching schema. ${G} items were found.`})}if(!ee&&Ht!==void 0){let O=`${n}/unevaluatedItems`;for(;U<V;U++){if(u[U])continue;let M=ve(e[U],Ht,a,s,i,o,`${r}/${U}`,O);if(u[U]=!0,!M.valid)I.push({instanceLocation:r,keyword:"unevaluatedItems",keywordLocation:O,error:"Items did not match unevaluated items schema."},...M.errors)}}if(Ma)for(let O=0;O<V;O++){let M=e[O],G=typeof M==="object"&&M!==null;for(let J=0;J<V;J++){if(O===J)continue;let ke=e[J];if(M===ke||G&&typeof ke==="object"&&ke!==null&&wn(M,ke))I.push({instanceLocation:r,keyword:"uniqueItems",keywordLocation:`${n}/uniqueItems`,error:`Duplicate items at indexes ${O} and ${J}.`}),O=Number.MAX_SAFE_INTEGER,J=Number.MAX_SAFE_INTEGER}}}else if(l==="number"){if(a==="4"){if(Qe!==void 0&&(Fe===!0&&e<=Qe||e<Qe))I.push({instanceLocation:r,keyword:"minimum",keywordLocation:`${n}/minimum`,error:`${e} is less than ${Fe?"or equal to ":""} ${Qe}.`});if(et!==void 0&&(nt===!0&&e>=et||e>et))I.push({instanceLocation:r,keyword:"maximum",keywordLocation:`${n}/maximum`,error:`${e} is greater than ${nt?"or equal to ":""} ${et}.`})}else{if(Qe!==void 0&&e<Qe)I.push({instanceLocation:r,keyword:"minimum",keywordLocation:`${n}/minimum`,error:`${e} is less than ${Qe}.`});if(et!==void 0&&e>et)I.push({instanceLocation:r,keyword:"maximum",keywordLocation:`${n}/maximum`,error:`${e} is greater than ${et}.`});if(Fe!==void 0&&e<=Fe)I.push({instanceLocation:r,keyword:"exclusiveMinimum",keywordLocation:`${n}/exclusiveMinimum`,error:`${e} is less than ${Fe}.`});if(nt!==void 0&&e>=nt)I.push({instanceLocation:r,keyword:"exclusiveMaximum",keywordLocation:`${n}/exclusiveMaximum`,error:`${e} is greater than or equal to ${nt}.`})}if(ct!==void 0){let V=e%ct;if(Math.abs(0-V)>=0.00000011920929&&Math.abs(ct-V)>=0.00000011920929)I.push({instanceLocation:r,keyword:"multipleOf",keywordLocation:`${n}/multipleOf`,error:`${e} is not a multiple of ${ct}.`})}}else if(l==="string"){let V=Rt===void 0&&qt===void 0?0:Nk(e);if(Rt!==void 0&&V<Rt)I.push({instanceLocation:r,keyword:"minLength",keywordLocation:`${n}/minLength`,error:`String is too short (${V} < ${Rt}).`});if(qt!==void 0&&V>qt)I.push({instanceLocation:r,keyword:"maxLength",keywordLocation:`${n}/maxLength`,error:`String is too long (${V} > ${qt}).`});if(oa!==void 0&&!new RegExp(oa,"u").test(e))I.push({instanceLocation:r,keyword:"pattern",keywordLocation:`${n}/pattern`,error:"String does not match pattern."});if(K!==void 0&&ng[K]&&!ng[K](e))I.push({instanceLocation:r,keyword:"format",keywordLocation:`${n}/format`,error:`String does not match format "${K}".`})}return{valid:I.length===0,errors:I}}var Ik=class{schema;draft;shortCircuit;lookup;constructor(e,t="2019-09",a=!0){this.schema=e,this.draft=t,this.shortCircuit=a,this.lookup=gs(e)}validate(e){return ve(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){if(t)e={...e,$id:t};gs(e,this.lookup)}},iu=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=Xm(e,"pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.");return t==="draft-7"?"7":t}getValidator(e){let t=new Ik(e,this.draft??this._draftFor(e),this.shortcircuit);return(a)=>{let s=t.validate(a);return s.valid?{valid:!0,data:a,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:s.errors.map((i)=>`${i.instanceLocation}: ${i.error}`).join("; ")}}}};var dg=!0;var Nl;Nl=globalThis.crypto;async function Ok(e){return(await Nl).getRandomValues(new Uint8Array(e))}async function Ak(e){let a=Math.pow(2,8)-Math.pow(2,8)%66,s="";while(s.length<e){let i=await Ok(e-s.length);for(let o of i)if(o<a)s+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"[o%66]}return s}async function Lk(e){return await Ak(e)}async function Uk(e){let t=await(await Nl).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Il(e){if(!e)e=43;if(e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await Lk(e),a=await Uk(t);return{code_verifier:t,code_challenge:a}}var ki=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthClientFlowError"})}static[Symbol.hasInstance](e){return Ge(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ge(this,e)}constructor(e){super(e);this.name=new.target.name,ya(this,new.target)}},cu=class extends ki{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.IssuerMismatchError"})}kind;expected;received;constructor(e,t,a){super(`Issuer mismatch in ${e==="metadata"?"authorization server metadata (RFC 8414 §3.3)":"authorization response (RFC 9207)"}: expected ${JSON.stringify(t)}, received ${JSON.stringify(a)}`);this.kind=e,this.expected=t,this.received=a}},bg=class extends ki{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.RegistrationRejectedError"})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`);this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},Vl=class extends ki{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsecureTokenEndpointError"})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`);this.tokenEndpoint=e}},bn=class extends ki{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.AuthorizationServerMismatchError"})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`);this.recordedIssuer=e,this.currentIssuer=t}},Jl=class extends ki{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsufficientScopeError"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:""}`);this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};function Bl(e,t,a){if(!e)return;if(typeof e.issuer!=="string"){if(a?.canPersistStamp!==!1)console.warn("[mcp-sdk] SEP-2352: stored OAuth credential has no 'issuer' stamp (pre-upgrade storage or provider not round-tripping the value). SEP-2352 isolation is inactive for this read; ensure your provider round-trips the issuer field.");return e.issuer===void 0?e:{...e,issuer:void 0}}return yg(e.issuer,t)?e:void 0}function yg(e,t){return e===t||e.endsWith("/")&&e.slice(0,-1)===t||t.endsWith("/")&&t.slice(0,-1)===e}function kg(e){if(e==null)return!1;let t=e;return typeof t.tokens==="function"&&typeof t.clientInformation==="function"}async function Dk(e,t,a){let{resourceMetadataUrl:s,scope:i}=zi(t.response);if(await lu(e,{serverUrl:t.serverUrl,resourceMetadataUrl:s,scope:i,fetchFn:t.fetchFn,...a})!=="AUTHORIZED")throw new wt}function zg(e,t){return{token:async()=>(await e.tokens())?.access_token,onUnauthorized:async(a)=>Dk(e,a,t)}}var wt=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnauthorizedError"})}static[Symbol.hasInstance](e){return Ge(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ge(this,e)}constructor(e){super(e??"Unauthorized");this.name="UnauthorizedError",ya(this,new.target)}};function Wl(e){return e?.authorization_response_iss_parameter_supported===!0}function uu({iss:e,expectedIssuer:t,issParameterSupported:a}){if(t===void 0)return;if(e===void 0){if(a)throw new cu("authorization_response",t,void 0);return}if(e!==t)throw new cu("authorization_response",t,e)}function du(...e){let t=new Set;for(let a of e){if(!a)continue;for(let s of a.split(/\s+/))if(s)t.add(s)}return t.size>0?[...t].join(" "):void 0}function Sg(e,t){if(!e)return!1;let a=new Set((t??"").split(/\s+/).filter(Boolean));for(let s of e.split(/\s+/))if(s&&!a.has(s))return!0;return!1}async function xg(e,t,a,s,i){if(typeof e==="string")return{authorizationCode:e,iss:t};let o=e.get("iss")??void 0,r=e.get("code");if(r)return{authorizationCode:r,iss:o};let n=(await a.discoveryState?.())?.authorizationServerMetadata;if(!n)try{n=(await Yl(s,i)).authorizationServerMetadata}catch{n=void 0}if(!n)throw new wt("Authorization callback failed and the issuer could not be verified");uu({iss:o,expectedIssuer:n.issuer,issParameterSupported:Wl(n)});let u=e.get("error");if(u)throw new ka(u,e.get("error_description")??u,e.get("error_uri")??void 0);throw new wt("Authorization callback contained neither `code` nor `error`")}function Zk(e){return["client_secret_basic","client_secret_post","none"].includes(e)}var Ol="code",Al="S256";function Rg(e,t){let a=e.client_secret!==void 0;if("token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Zk(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method)))return e.token_endpoint_auth_method;if(t.length===0)return a?"client_secret_basic":"none";if(a&&t.includes("client_secret_basic"))return"client_secret_basic";if(a&&t.includes("client_secret_post"))return"client_secret_post";if(t.includes("none"))return"none";return a?"client_secret_post":"none"}function qg(e,t,a,s){let{client_id:i,client_secret:o}=t;switch(e){case"client_secret_basic":Bk(i,o,a);return;case"client_secret_post":Hk(i,o,s);return;case"none":Fk(i,s);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function Bk(e,t,a){if(!t)throw Error("client_secret_basic authentication requires a client_secret");let s=btoa(`${e}:${t}`);a.set("Authorization",`Basic ${s}`)}function Hk(e,t,a){if(a.set("client_id",e),t)a.set("client_secret",t)}function Fk(e,t){t.set("client_id",e)}function jg(e){return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="[::1]"||e==="::1"}function Pg(e){let t=new URL(String(e));if(t.protocol!=="https:"&&!jg(t.hostname))throw new Vl(t.href);return t}function Vk(e){for(let t of e??[]){let a;try{a=new URL(t)}catch{continue}if(a.protocol!=="http:"&&a.protocol!=="https:")return"native";if(jg(a.hostname))return"native"}return"web"}function Tg(e){let t=e.clientMetadata;return{...t,grant_types:t.grant_types??(e.redirectUrl===void 0?void 0:["authorization_code","refresh_token"]),application_type:t.application_type??Vk(t.redirect_uris)}}async function Hl(e){let t=e instanceof Response?e.status:void 0,a=e instanceof Response?await e.text():e;try{let s=ps.parse(JSON.parse(a));return ka.fromResponse(s)}catch(s){let i=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${s}. Raw body: ${a}`;return new ka(Ot.ServerError,i)}}function lg(e,t,a){let s=e.invalidateCredentials===void 0?`retrying authorization without discarding the stored ${a} (provider implements no invalidateCredentials())`:`invalidating the stored ${a} and retrying authorization`;console.warn(`[mcp-sdk] OAuth ${JSON.stringify(t.code)} — ${s}. Cause: ${JSON.stringify(t.message)}`)}async function lu(e,t){try{return await Ll(e,t)}catch(a){if(a instanceof ka){if(a.code===Ot.InvalidClient||a.code===Ot.UnauthorizedClient)return lg(e,a,"client credentials and tokens"),await e.invalidateCredentials?.("client"),await e.invalidateCredentials?.("tokens"),await Ll(e,t);else if(a.code===Ot.InvalidGrant||a.code===Ot.InvalidDpopProof)return lg(e,a,"tokens"),await e.invalidateCredentials?.("tokens"),await Ll(e,t)}throw a}}function Jk(e){let{requestedScope:t,resourceMetadata:a,authServerMetadata:s,clientMetadata:i}=e,o=t||a?.scopes_supported?.join(" ")||i.scope;if(o&&s?.scopes_supported?.includes("offline_access")&&!o.split(" ").includes("offline_access")&&i.grant_types?.includes("refresh_token"))o=`${o} offline_access`;return o}async function Ll(e,{serverUrl:t,authorizationCode:a,iss:s,scope:i,resourceMetadataUrl:o,fetchFn:r,skipIssuerMetadataValidation:n,forceReauthorization:u}){let d=Tg(e),l=await e.discoveryState?.(),h,p,v,b,g=o;if(!g&&l?.resourceMetadataUrl)g=new URL(l.resourceMetadataUrl);if(l?.authorizationServerUrl){if(p=l.authorizationServerUrl,h=l.resourceMetadata,v=l.authorizationServerMetadata??await Kl(p,{fetchFn:r,skipIssuerValidation:n}),!h)try{h=await Gl(t,{resourceMetadataUrl:g},r)}catch(te){if(te instanceof TypeError)throw te}if(v!==l.authorizationServerMetadata||h!==l.resourceMetadata)await e.saveDiscoveryState?.({authorizationServerUrl:String(p),resourceMetadataUrl:g?.toString(),resourceMetadata:h,authorizationServerMetadata:v})}else{let te=await Yl(t,{resourceMetadataUrl:g,fetchFn:r,skipIssuerMetadataValidation:n});p=te.authorizationServerUrl,v=te.authorizationServerMetadata,h=te.resourceMetadata,b={authorizationServerUrl:String(p),resourceMetadataUrl:g?.toString(),resourceMetadata:h,authorizationServerMetadata:v}}let w=v?.issuer??String(p),R={issuer:w};if(await e.saveAuthorizationServerUrl?.(w),a!==void 0){let te=l?.authorizationServerMetadata?.issuer??l?.authorizationServerUrl;if(te===void 0){if(e.saveDiscoveryState!==void 0)throw new bn("discoveryState was not available on the callback leg; ensure your provider persists discoveryState alongside codeVerifier",w);console.warn("[mcp-sdk] OAuthClientProvider does not implement saveDiscoveryState()/discoveryState(); the SEP-2352 callback-leg authorization-server binding cannot be checked. Implement discoveryState (persist alongside codeVerifier) — see docs/migration/upgrade-to-v2.md §SEP-2352.")}else if(!yg(te,w))throw new bn(te,w)}if(b)await e.saveDiscoveryState?.(b);let j=await Eg(t,e,h),x=j&&h&&!e.validateResourceURL?h.resource:j;if(x)await e.saveResourceUrl?.(Xl(x));let P=Jk({requestedScope:i,resourceMetadata:h,authServerMetadata:v,clientMetadata:e.clientMetadata}),S=await Promise.resolve(e.clientInformation(R)),k=Bl(S,w,{canPersistStamp:e.saveClientInformation!==void 0});if(k===void 0&&S?.issuer&&e.saveClientInformation===void 0)throw new bn(S.issuer,w);if(k&&k.issuer===void 0)k={...k,issuer:w},await e.saveClientInformation?.(k,R);if(!k){if(a!==void 0)throw Error("Existing OAuth client information is required when exchanging an authorization code");let te=v?.client_id_metadata_document_supported===!0,ie=e.clientMetadataUrl;if(ie&&!Cg(ie))throw new ka(Ot.InvalidClientMetadata,`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${ie}`);if(te&&ie)k={client_id:ie,issuer:w},await e.saveClientInformation?.(k,R);else{if(!e.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");k={...await Ug(p,{metadata:v,clientMetadata:d,scope:P,fetchFn:r}),issuer:w},await e.saveClientInformation(k,R)}}let N=!e.redirectUrl;if(a!==void 0||N){if(a!==void 0)uu({iss:s,expectedIssuer:v?.issuer,issParameterSupported:Wl(v)});let te=await Lg(e,p,{metadata:v,resource:x,authorizationCode:a,iss:s,scope:P,fetchFn:r});return await e.saveTokens({...te,issuer:w},R),"AUTHORIZED"}let X=Bl(await e.tokens(R),w);if(X&&X.issuer===void 0)X={...X,issuer:w},await e.saveTokens(X,R);if(X?.refresh_token&&!u){let te=await e.scopeForRefresh?.(X),ie;try{ie=await Ag(p,{metadata:v,clientInformation:k,refreshToken:X.refresh_token,scope:te,resource:x,addClientAuthentication:e.addClientAuthentication,dpop:await e.dpop?.(),fetchFn:r})}catch(B){if(B instanceof Vl)throw B;if(!(B instanceof ka)||B.code===Ot.ServerError)console.warn(`[mcp-sdk] Could not refresh OAuth tokens; falling back to a new authorization request. Cause: ${JSON.stringify(B instanceof Error?B.message:String(B))}`);else throw B}if(ie)return await e.saveTokens({...ie,issuer:w},R),"AUTHORIZED"}let K=e.state?await e.state():void 0,{authorizationUrl:se,codeVerifier:we}=await Ng(p,{metadata:v,clientInformation:k,state:K,redirectUrl:e.redirectUrl,scope:P,resource:x});return await e.saveCodeVerifier(we),await e.redirectToAuthorization(se),"REDIRECT"}function Cg(e){if(!e)return!1;try{let t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function Eg(e,t,a){let s=wl(e);if(t.validateResourceURL)return await t.validateResourceURL(s,a?.resource);if(!a)return;if(!bl({requestedResource:s,configuredResource:a.resource}))throw Error(`Protected resource ${a.resource} does not match expected ${s} (or origin)`);return new URL(a.resource)}var Wk=new Set(["bearer","dpop"]);function zi(e){let t=e.headers.get("WWW-Authenticate");if(!t)return{};let[a,s]=t.split(" ");if(!a||!Wk.has(a.toLowerCase())||!s)return{};let i=ou(e,"resource_metadata")||void 0,o;if(i)try{o=new URL(i)}catch{}let r=ou(e,"scope")||void 0,n=ou(e,"error")||void 0,u=ou(e,"error_description")||void 0;return{resourceMetadataUrl:o,scope:r,error:n,errorDescription:u}}function ou(e,t){let a=e.headers.get("WWW-Authenticate");if(!a)return null;let s=new RegExp(String.raw`${t}=(?:"([^"]+)"|([^\s,]+))`),i=a.match(s);if(i){let o=i[1]||i[2];if(o)return o}return null}async function Gl(e,t,a=fetch){let s=await Yk(e,"oauth-protected-resource",a,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!s||s.status===404)throw await s?.text?.().catch(()=>{}),Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!s.ok)throw await s.text?.().catch(()=>{}),Error(`HTTP ${s.status} trying to load well-known OAuth protected resource metadata.`);return gi.parse(await s.json())}async function $g(e,t,a=fetch){let s=yi(a);try{return await s(e,{headers:t})}catch(i){if(!(i instanceof TypeError)||!dg)throw i;if(t)try{return await s(e,{})}catch(o){if(!(o instanceof TypeError))throw o;return}return}}function Gk(e,t="",a={}){if(t.endsWith("/"))t=t.slice(0,-1);return a.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function mg(e,t,a=fetch){return await $g(e,{"MCP-Protocol-Version":t},a)}function Kk(e,t){if(!e)return!0;if(t==="/")return!1;return!e.ok&&e.status<500||e.status===502}async function Yk(e,t,a,s){let i=new URL(e),o=s?.protocolVersion??Ya,r;if(s?.metadataUrl)r=new URL(s.metadataUrl);else{let u=Gk(t,i.pathname);r=new URL(u,s?.metadataServerUrl??i),r.search=i.search}let n=await mg(r,o,a);if(!s?.metadataUrl&&Kk(n,i.pathname))n=await mg(new URL(`/.well-known/${t}`,i),o,a);return n}function Mg(e){let t=typeof e==="string"?new URL(e):e,a=t.pathname!=="/",s=[];if(!a)return s.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"},{url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),s;let i=t.pathname;if(i.endsWith("/"))i=i.slice(0,-1);return s.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,t.origin),type:"oauth"},{url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:"oidc"},{url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:"oidc"}),s}async function Kl(e,{fetchFn:t=fetch,protocolVersion:a=Ya,skipIssuerValidation:s=!1}={}){let i={"MCP-Protocol-Version":a,Accept:"application/json"},o=Mg(e);for(let{url:r,type:n}of o){let u=await $g(r,i,t);if(!u)continue;if(!u.ok){if(await u.text?.().catch(()=>{}),u.status<500||u.status===502)continue;throw Error(`HTTP ${u.status} trying to load ${n==="oauth"?"OAuth":"OpenID provider"} metadata from ${r}`)}let d=n==="oauth"?ms.parse(await u.json()):vi.parse(await u.json());if(!s){let l=typeof e==="string"?e:e.href;if(!(d.issuer===l||l.endsWith("/")&&d.issuer===l.slice(0,-1)))throw new cu("metadata",l,d.issuer)}return d}}async function Yl(e,t){let a,s;try{if(a=await Gl(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),a.authorization_servers&&a.authorization_servers.length>0)s=a.authorization_servers[0]}catch(o){if(o instanceof TypeError)throw o}if(!s)s=String(new URL("/",e));let i=await Kl(s,{fetchFn:t?.fetchFn,skipIssuerValidation:t?.skipIssuerMetadataValidation});return{authorizationServerUrl:s,authorizationServerMetadata:i,resourceMetadata:a}}function Xl(e){return typeof e==="string"?e:e.href}async function Ng(e,{metadata:t,clientInformation:a,redirectUrl:s,scope:i,state:o,resource:r}){let n;if(t){if(n=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Ol))throw Error(`Incompatible auth server: does not support response type ${Ol}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Al))throw Error(`Incompatible auth server: does not support code challenge method ${Al}`)}else n=new URL("/authorize",e);let u=await Il(),{code_verifier:d,code_challenge:l}=u;if(n.searchParams.set("response_type",Ol),n.searchParams.set("client_id",a.client_id),n.searchParams.set("code_challenge",l),n.searchParams.set("code_challenge_method",Al),n.searchParams.set("redirect_uri",String(s)),o)n.searchParams.set("state",o);if(i)n.searchParams.set("scope",i);if(i?.split(" ").includes("offline_access"))n.searchParams.append("prompt","consent");if(r)n.searchParams.set("resource",Xl(r));return{authorizationUrl:n,codeVerifier:d}}function Ig(e,t,a){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(a)})}async function Og(e,{metadata:t,tokenRequestParams:a,clientInformation:s,addClientAuthentication:i,resource:o,dpop:r,fetchFn:n}){let u=Pg(t?.token_endpoint??new URL("/token",e)),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(o)a.set("resource",Xl(o));if(!i&&s)qg(Rg(s,t?.token_endpoint_auth_methods_supported??[]),s,d,a);let l=async()=>{let v=new Headers(d);if(i)await i(v,a,u,t);if(r)v.set("DPoP",await r.buildProof({htm:"POST",htu:u}));return yi(n??fetch)(u,{method:"POST",headers:v,body:a})},h=await l();if(r&&h.status===400){if((await h.clone().json().catch(()=>{}))?.error===Ot.UseDpopNonce)r.observeNonce(h,u),h=await l()}if(r?.observeNonce(h,u),!h.ok)throw await Hl(h);let p=await h.json();try{return _s.parse(tu(p))}catch(v){if(typeof p==="object"&&p!==null&&"error"in p)throw await Hl(JSON.stringify(p));throw v}}async function Ag(e,{metadata:t,clientInformation:a,refreshToken:s,scope:i,resource:o,addClientAuthentication:r,dpop:n,fetchFn:u}){let d=new URLSearchParams({grant_type:"refresh_token",refresh_token:s});if(i)d.set("scope",i);let l=await Og(e,{metadata:t,tokenRequestParams:d,clientInformation:a,addClientAuthentication:r,resource:o,dpop:n,fetchFn:u});return{refresh_token:s,...l,...i&&!l.scope&&{scope:i}}}async function Lg(e,t,{metadata:a,resource:s,authorizationCode:i,iss:o,scope:r,fetchFn:n}={}){if(i!==void 0)uu({iss:o,expectedIssuer:a?.issuer,issParameterSupported:Wl(a)});let u=a?.issuer??String(t),d=async()=>{let v=await e.clientInformation({issuer:u}),b=Bl(v,u,{canPersistStamp:!1});if(v&&b===void 0)throw new bn(String(v.issuer),u);return b},l=await d(),h=r??e.clientMetadata.scope,p;if(e.prepareTokenRequest)p=await e.prepareTokenRequest(h);if(!p){if(!i)throw Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw Error("redirectUrl is required for authorization_code flow");p=Ig(i,await e.codeVerifier(),e.redirectUrl)}return l??=await d(),Og(t,{metadata:a,tokenRequestParams:p,clientInformation:l,addClientAuthentication:e.addClientAuthentication,resource:s,dpop:await e.dpop?.(),fetchFn:n})}async function Ug(e,{metadata:t,clientMetadata:a,scope:s,fetchFn:i}){let o;if(t){if(!t.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");o=new URL(t.registration_endpoint)}else o=new URL("/register",e);let r={...a,...s===void 0?{}:{scope:s}},n=await yi(i??fetch)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new bg({status:n.status,body:await n.text(),submittedMetadata:r});return wi.parse(tu(await n.json()))}var ru=new Set(["tools/list","prompts/list","resources/list","resources/templates/list","server/discover"]),Dg=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(Ul(e))}set(e,t){let a=Ul(e),s=ru.has(e.method),i=!this._entries.has(a);if(!s&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let r of this._entries.keys())if(!ru.has(r.slice(0,r.indexOf("\x00")))){this._entries.delete(r),this._cappedSize--;break}}let o=++this._stamp;if(this._entries.set(a,{...t,stamp:o}),i&&!s)this._cappedSize++;return o}delete(e){if(this._entries.delete(Ul(e))&&!ru.has(e.method))this._cappedSize--}evict(e){let t=`${e}\x00`,a=ru.has(e);for(let s of this._entries.keys())if(s.startsWith(t)){if(this._entries.delete(s),!a)this._cappedSize--}}clear(){this._entries.clear(),this._cappedSize=0}};function Ul(e){return`${e.method}\x00${JSON.stringify([e.partition??"",e.params??""])}`}function Dl(e,t){return t===void 0?e:`${e}\x00${t}`}var Zg=86400000,Xk=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity="";constructor(e,t,a=()=>{},s="",i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=a,this._cachePartition=s,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e==="public"?"":this._cachePartition])}async _probe(e,t){let a={method:e,params:t??""},s=this._partitionFor("private"),i=await this._store.get({...a,partition:s});if(i!==void 0)return i;let o=this._partitionFor("public");if(o===s)return;let r=await this._store.get({...a,partition:o});return r?.scope==="public"?r:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,"")}async _deleteBoth(e,t){let a=this._partitionFor("private"),s=this._partitionFor("public");try{await this._store.delete({method:e,params:t,partition:a})}catch(i){this._reportError(i)}if(s!==a)try{await this._store.delete({method:e,params:t,partition:s})}catch(i){this._reportError(i)}}async evictKey(e,t){let a=Dl(e,t),s=this._evictionGeneration.get(a);if(s!==void 0)this._evictionGeneration.set(a,s+1);await this._deleteBoth(e,t)}captureGeneration(e,t){let a=Dl(e,t),s=this._evictionGeneration.get(a)??0;return this._evictionGeneration.set(a,s),s}async write(e,t,a,s){if((this._evictionGeneration.get(Dl(e,s?.params))??0)!==a)return;let i=s?.params??"",o=this._partitionFor("private"),r=this._partitionFor("public"),n=(s?.scope??"private")==="public"?r:o;try{await this._store.set({method:e,params:i,partition:n},{value:Qk(t),expiresAt:s?.expiresAt,scope:s?.scope})}catch(u){this._reportError(u)}if(r!==o)try{await this._store.delete({method:e,params:i,partition:n===o?r:o})}catch(u){this._reportError(u)}}async read(e,t){let a=await this._probe(e,t);if(a?.expiresAt===void 0||!(a.expiresAt>this.now()))return;try{let s=JSON.parse(a.value);if(typeof s!=="object"||s===null||Array.isArray(s))throw TypeError("cached document is not an object");return{value:s}}catch(s){this._reportError(s),await this._deleteBoth(e,t??"");return}}resetForReconnect(){if(!this._isUserSupplied)this._store.clear();this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=""}async toolDefinition(e){let t=await this._probe("tools/list");if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let a=this._decodeListTools(t),s=new Map;if(a!==void 0)for(let i of a.tools)s.set(i.name,i);this._toolIndex={stamp:t.stamp,byName:s}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let a=await this._probe("tools/list");if(a===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==a.stamp){let s=this._decodeListTools(a)??{tools:[]},i=new Map;for(let o of s.tools){let r=t(o);if(r!==void 0)i.set(o.name,r)}this._toolOutputValidatorIndex={stamp:a.stamp,byName:i}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every((a)=>a!==null&&typeof a==="object"))throw TypeError("cached tools/list document has a malformed tools array");return t}catch(t){this._reportError(t);return}}};function Qk(e){let t;try{t=JSON.stringify(e)}catch(a){throw TypeError(`cache value is not JSON-serializable: ${a instanceof Error?a.message:String(a)}`)}if(typeof t!=="string")throw TypeError("cache value is not JSON-serializable: it has no JSON representation");return t}var Bg=Symbol.for("mcp.authSeamEscape");function it(e){if(typeof e==="object"&&e!==null||typeof e==="function")try{Object.defineProperty(e,Bg,{value:!0,configurable:!0})}catch{}return e}function ez(e){return(typeof e==="object"&&e!==null||typeof e==="function")&&e[Bg]===!0}var tz=-32022,az=new Set([-32001,-32020,-32021]);function sz(e,t){switch(e.kind){case"result":return iz(e.result,t);case"rpc-error":return Hg(e,t);case"http-error":return oz(e,t);case"network-error":return _g(e.error,t);case"unusable-reply":return{kind:"error",error:new L(A.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${Fg(e.error)})`,{cause:e.error},{cause:e.error})};case"auth-required":return{kind:"error",error:e.error};case"closed":if(t.transportKind==="stdio")return{kind:"legacy"};return _g(Error("Connection closed during the version negotiation probe"),t);case"timeout":if(t.transportKind==="stdio")return{kind:"legacy"};return{kind:"error",error:new L(A.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function iz(e,t){let a=ea(au).validateResult("server/discover",e);if(!a.ok)return{kind:"legacy"};let s=a.value.supportedVersions,i=t.clientModernVersions.find((o)=>s.includes(o));if(i!==void 0)return{kind:"modern",version:i,discover:a.value};if(t.fallbackAvailable)return{kind:"legacy"};return{kind:"error",error:new fn({supported:[...s],requested:t.requestedVersion})}}function Hg(e,t){let{code:a,message:s,data:i}=e;if(a===tz){let o=nz(i);if(o===void 0)return{kind:"legacy"};let r=new fn({supported:o,requested:cz(i)??t.requestedVersion},s),n=hn(o),u=t.clientModernVersions.find((d)=>n.includes(d));if(u!==void 0)return{kind:"corrective",version:u,error:r};if(n.length>0)return{kind:"error",error:r};return t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:r}}if(az.has(a))return{kind:"legacy"};return{kind:"legacy"}}function oz(e,t){if(e.status===401||e.status===403){let s=e.status===403;return{kind:"error",error:new gt(s?A.ClientHttpForbidden:A.ClientHttpAuthentication,`Version negotiation failed: ${s?"the server denied access (HTTP 403)":"the server requires authorization (HTTP 401)"}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:"error",error:new gt(A.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let a=uz(e.body);if(a!==void 0)return Hg(a,t);return{kind:"legacy"}}function _g(e,t){if(t.environment==="browser"&&rz(e))return{kind:"legacy"};return{kind:"error",error:new L(A.EraNegotiationFailed,`Version negotiation probe failed: ${Fg(e)}`,{cause:e},{cause:e})}}function rz(e){return e instanceof TypeError||e instanceof Error&&e.name==="TypeError"}function Fg(e){return e instanceof Error?e.message:String(e)}function nz(e){if(typeof e!=="object"||e===null)return;let t=e.supported;if(!Array.isArray(t)||t.length===0||!t.every((a)=>typeof a==="string"))return;return t}function cz(e){if(typeof e!=="object"||e===null)return;let t=e.requested;return typeof t==="string"?t:void 0}function uz(e){if(e===void 0||e==="")return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=="object"||t===null)return;let a=t.error;if(typeof a!=="object"||a===null)return;let{code:s,message:i,data:o}=a;if(typeof s!=="number")return;return{code:s,message:typeof i==="string"?i:"",data:o}}var dz="legacy";function lz(e,t){let a=e?.mode??dz;if(a==="legacy")return{kind:"legacy"};let s=e?.probe??{};if(typeof a==="object"){if(!At(a.pin))throw TypeError(`versionNegotiation: { pin: '${a.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:"pin",version:a.pin,probe:s}}let i=t?hn(t):[];return{kind:"auto",modernVersions:i.length>0?i:[...yl],fallbackAvailable:t?kl(t).length>0:!0,probe:s}}function pg(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?"browser":"node"}function hg(e){return"stderr"in e&&"pid"in e?"stdio":"http"}var mz=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(t){this._transport=t,this._savedOnMessage=t.onmessage,this._savedOnError=t.onerror,this._savedOnClose=t.onclose}static async open(t){let a=new e(t);t.onmessage=(s)=>{let i=a._pending;if(i!==void 0&&(hs(s)||fs(s))&&s.id===i.id){if(a._pending=void 0,hs(s))i.resolve({kind:"response",result:s.result});else i.resolve({kind:"response",error:s.error});return}},t.onerror=(s)=>{a._savedOnError?.(s)},t.onclose=()=>{let s=a._pending;if(s!==void 0)a._pending=void 0,s.resolve({kind:"closed"});a._closeDelivered=!0,a._savedOnClose?.()};try{await t.start()}catch(s){throw a.detach(),s}return a}async exchange(t,a){let s=`server-discover-probe-${++this._probeCounter}`;return new Promise((i)=>{let o=!1,r=(u)=>{if(o)return;if(o=!0,clearTimeout(n),this._pending?.id===s)this._pending=void 0;i(u)},n=setTimeout(()=>r({kind:"timeout"}),a);this._pending={id:s,resolve:r},this._transport.send(t(s)).catch((u)=>r({kind:"send-error",error:u}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let t=this._savedOnClose,a=this._transport,s=!1,i=()=>{if(!s){s=!0;return}t()};a.onclose=i,Fl.set(a,()=>{if(a.onclose===i)a.onclose=t})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let t=this._transport,a=t.start,s=!0;t.start=async function(){if(s){s=!1,t.start=a;return}return a.call(t)}}},Fl=new WeakMap;function fg(e){let t=Fl.get(e);Fl.delete(e),t?.()}function _z(e,t,a,s){return{jsonrpc:"2.0",id:e,method:"server/discover",params:{_meta:ea(t).outboundEnvelope({protocolVersion:t,clientInfo:a,clientCapabilities:s})}}}function pz(e){if(e instanceof L&&e.code===A.ClientHttpUnexpectedContent)return!0;return e instanceof Error&&e.name==="SyntaxError"}function hz(e,t){switch(e.kind){case"response":return e.error===void 0?{kind:"result",result:e.result}:{kind:"rpc-error",...e.error};case"send-error":{let a=e.error;if(ez(a)||a instanceof wt||a instanceof Error&&a.name==="UnauthorizedError")return{kind:"auth-required",error:a};if(a instanceof gt){let s=a.data?.text;return{kind:"http-error",status:a.data.status,body:typeof s==="string"?s:void 0,statusText:a.data.statusText}}if(pz(a))return{kind:"unusable-reply",error:a};return{kind:"network-error",error:a}}case"closed":return{kind:"closed"};case"timeout":return{kind:"timeout",timeoutMs:t}}}async function Vg(e,t){let a=e.probe.timeoutMs??t.defaultTimeoutMs,s=Math.max(0,e.probe.maxRetries??0),i=e.kind==="pin"?[e.version]:e.modernVersions,o=e.kind==="auto"&&e.fallbackAvailable,r=await mz.open(t.transport),n=async()=>{let d=i[0],l=!1,h=s;for(;;){let p=await r.exchange((g)=>_z(g,d,t.clientInfo,t.capabilities),a);if(p.kind==="timeout"&&h>0){h--;continue}let v=hz(p,a),b=sz(v,{clientModernVersions:i,requestedVersion:d,fallbackAvailable:o,environment:t.environment,transportKind:t.transportKind});switch(b.kind){case"modern":return{era:"modern",version:b.version,discover:b.discover};case"corrective":if(l)throw b.error;l=!0,d=b.version;continue;case"legacy":{let g=v.kind==="closed"?"the connection closed during the server/discover probe":void 0;if(e.kind==="pin")throw new L(A.EraNegotiationFailed,g===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${g} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new L(A.EraNegotiationFailed,g===void 0?"Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to":`Version negotiation failed: ${g} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(g!==void 0&&t.disposableProbe!==!0)throw new L(A.EraNegotiationFailed,`Version negotiation failed: ${g} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:"legacy"}}case"error":throw b.error}}},u;try{u=await n()}catch(d){throw r.detach(),d}return r.release(),u}function fz(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,"_dispose"))return;let a=e._serverParams;return typeof a==="object"&&a!==null&&typeof a.command==="string"?a:void 0}async function gz(e,t,a,s){let o=new t.constructor({...a,stderr:"ignore"}),r=t.close,n=!1,u,d=new Promise((h,p)=>{u=()=>p(gg())});t.close=async function(){return n=!0,u?.(),r.call(t)};let l;try{let h=Vg(e,{...s,transport:o,transportKind:"stdio",disposableProbe:!0});h.catch(()=>{}),l=await Promise.race([h,d])}finally{await vz(o),t.close=r}if(n)throw gg();return l}function gg(){return new L(A.EraNegotiationFailed,"Version negotiation failed: the transport was closed during the server/discover probe")}async function vz(e){try{let t=e._dispose;await(typeof t==="function"?t.call(e):e.close())}catch{}}function vg(e){let t=e._meta?.[$t];return El.Implementation(t)?t:void 0}function nu(e,t){if(!e||t===null||typeof t!=="object")return;if(e.type==="object"&&e.properties&&typeof e.properties==="object"){let a=t,s=e.properties;for(let i of Object.keys(s)){let o=s[i];if(a[i]===void 0&&Object.prototype.hasOwnProperty.call(o,"default"))a[i]=o.default;if(a[i]!==void 0)nu(o,a[i])}}if(Array.isArray(e.anyOf)){for(let a of e.anyOf)if(typeof a!=="boolean")nu(a,t)}if(Array.isArray(e.oneOf)){for(let a of e.oneOf)if(typeof a!=="boolean")nu(a,t)}}function Jg(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,a=e.url!==void 0;return{supportsFormMode:t||!t&&!a,supportsUrlMode:a}}function wz(e){if(typeof e==="object"&&e!==null){if(e.kind==="legacy"&&!("supportedVersions"in e)&&!("discover"in e))return e;if(e.kind==="modern"&&ga.safeParse(e.discover).success)return e}throw new L(A.EraNegotiationFailed,"connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }")}var wg={"notifications/tools/list_changed":["tools/list"],"notifications/prompts/list_changed":["prompts/list"],"notifications/resources/list_changed":["resources/list","resources/templates/list"]},bz=64,Zl={},Ql=class extends vn{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;static{Zl.enforceStrictCapabilities=(e)=>e._enforceStrictCapabilities,Zl.walkPages=(e,t,a,s)=>e._walkPages(t,a,s),Zl.readResource=(e,t,a)=>e._readResource(t,a)}_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new L(A.ConnectionClosed,"subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset");for(let t of this._listenState.values())t.settle({cause:"remote",error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t);if(this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new iu,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=K1(t?.inputRequired),this._cache=new Xk(t?.responseCacheStore??new Dg,t?.responseCacheStore!==void 0,(a)=>this._reportStoreError(a),t?.cachePartition??""),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??bz,t?.listChanged)this._listChangedConfig=t.listChanged}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&At(this._negotiatedProtocolVersion)&&za(e))return"drop"}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e===void 0)return;return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){if(!this._inputRequiredDriverConfig.autoFulfill)return Promise.reject(new L(A.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:"input_required",method:t.request.method}));return eg({getRequestHandler:(a)=>this._getRequestHandler(a),buildContext:(a)=>this.buildContext(a,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t)}_setupListChangedHandlers(e){if(e.tools&&this._serverCapabilities?.tools?.listChanged)this._setupListChangedHandler("tools","notifications/tools/list_changed",e.tools,async()=>(await this.listTools(void 0,{cacheMode:"refresh"})).tools);if(e.prompts&&this._serverCapabilities?.prompts?.listChanged)this._setupListChangedHandler("prompts","notifications/prompts/list_changed",e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:"refresh"})).prompts);if(e.resources&&this._serverCapabilities?.resources?.listChanged)this._setupListChangedHandler("resources","notifications/resources/list_changed",e.resources,async()=>(await this.listResources(void 0,{cacheMode:"refresh"})).resources)}registerCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after connecting to transport");this._capabilities=Ml(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error("Cannot configure version negotiation after connecting to transport");this._versionNegotiation=e}_wrapHandler(e,t){if(e==="elicitation/create")return async(a,s)=>{let i=ea(this._negotiatedProtocolVersion),o=i.validateRequest("elicitation/create",a);if(!o.ok&&o.reason==="not-in-era")o=i.validateInputRequest("elicitation/create",a);if(!o.ok)throw new oe(o.reason==="not-in-era"?W.InternalError:W.InvalidParams,o.reason==="not-in-era"?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation request: ${o.message}`);let{params:r}=o.value;r.mode=r.mode??"form";let{supportsFormMode:n,supportsUrlMode:u}=Jg(this._capabilities.elicitation);if(r.mode==="form"&&!n)throw new oe(W.InvalidParams,"Client does not support form-mode elicitation requests");if(r.mode==="url"&&!u)throw new oe(W.InvalidParams,"Client does not support URL-mode elicitation requests");let d=await t(a,s),l=i.validateResult("elicitation/create",d);if(!l.ok&&l.reason==="not-in-era")l=i.validateInputResponse("elicitation/create",d);if(!l.ok)throw new oe(l.reason==="not-in-era"?W.InternalError:W.InvalidParams,l.reason==="not-in-era"?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation result: ${l.message}`);let h=l.value,p=r.mode==="form"?r.requestedSchema:void 0;if(r.mode==="form"&&h.action==="accept"&&h.content&&p&&this._capabilities.elicitation?.form?.applyDefaults)try{nu(p,h.content)}catch{}return h};if(e==="sampling/createMessage")return async(a,s)=>{let i=ea(this._negotiatedProtocolVersion),o=i.validateRequest("sampling/createMessage",a);if(!o.ok&&o.reason==="not-in-era")o=i.validateInputRequest("sampling/createMessage",a);if(!o.ok)throw new oe(o.reason==="not-in-era"?W.InternalError:W.InvalidParams,o.reason==="not-in-era"?"No wire schema for sampling/createMessage in the resolved era":`Invalid sampling request: ${o.message}`);let{params:r}=o.value,n=await t(a,s),u=Boolean(r.tools||r.toolChoice),d=i.samplingResultVariant(u,n);if(!d.ok&&d.reason==="not-in-era")d=i.validateInputResponse("sampling/createMessage",n);if(!d.ok)throw new oe(d.reason==="not-in-era"?W.InternalError:W.InvalidParams,d.reason==="not-in-era"?"No result schema for sampling/createMessage in the resolved era":`Invalid sampling result: ${d.message}`);return d.value};return t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new L(A.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,wz(t.prior),t);let a=lz(this._versionNegotiation,this._supportedProtocolVersionsOption);if(a.kind!=="legacy")return this._connectNegotiated(e,a,t);return this._connectPlainLegacy(e,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let a=this._negotiatedProtocolVersion;if(a!==void 0)e.setProtocolVersion?.(a);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let a=kl(this._supportedProtocolVersions);try{let s=a[0];if(s===void 0)throw new L(A.EraNegotiationFailed,"Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version");let i=await this.request({method:"initialize",params:{protocolVersion:s,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!a.includes(i.protocolVersion))throw Error(`Server's protocol version is not supported: ${i.protocolVersion}`);if(this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion)e.setProtocolVersion(i.protocolVersion);if(this._instructions=i.instructions,await this.notification({method:"notifications/initialized"}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig)this._setupListChangedHandlers(this._listChangedConfig)}catch(s){throw this.close(),s}}async _connectNegotiated(e,t,a){if(e.sessionId!==void 0){await super.connect(e);let i=this._negotiatedProtocolVersion;if(i!==void 0&&e.setProtocolVersion)e.setProtocolVersion(i);return}this._resetConnectionState();let s;try{let i=hg(e),o={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:pg(),defaultTimeoutMs:a?.timeout??gn},r=i==="stdio"?fz(e):void 0;s=r===void 0?await Vg(t,{...o,transport:e,transportKind:i}):await gz(t,e,r,o)}catch(i){throw await e.close().catch(()=>{}),fg(e),i}if(fg(e),await super.connect(e),s.era==="legacy"){await this._legacyHandshake(e,a);return}if(this._serverCapabilities=s.discover.capabilities,this._serverVersion=vg(s.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=s.discover.instructions,this._discoverResult=s.discover,this._negotiatedProtocolVersion=s.version,e.setProtocolVersion)e.setProtocolVersion(s.version);if(this._listChangedConfig){let i=this._listChangedConfig,o=this._serverCapabilities,r={...i.tools&&o?.tools?.listChanged&&{tools:i.tools},...i.prompts&&o?.prompts?.listChanged&&{prompts:i.prompts},...i.resources&&o?.resources?.listChanged&&{resources:i.resources}},n=!0;try{this._setupListChangedHandlers(r)}catch(d){n=!1,this.onerror?.(d instanceof Error?d:Error(String(d)))}let u=n?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(u).length>0){let d=new AbortController,l=()=>d.abort(a?.signal?.reason);if(a?.signal?.aborted)l();a?.signal?.addEventListener("abort",l);try{this._autoOpenedSubscription=await this.listen(u,{timeout:a?.timeout,signal:d.signal})}catch(h){if(a?.signal?.aborted)throw await this.close().catch(()=>{}),h;this.onerror?.(h instanceof Error?h:Error(String(h)))}finally{a?.signal?.removeEventListener("abort",l)}}}}async _connectFromPrior(e,t,a){if(t.kind==="legacy")return this._connectPlainLegacy(e,a);let s=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,o=(i&&hn(i).length>0?hn(i):yl).find((r)=>s.supportedVersions.includes(r));if(o===void 0)throw new L(A.EraNegotiationFailed,"connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.");if(await super.connect(e),this._discoverResult=s,this._serverCapabilities=s.capabilities,this._serverVersion=vg(s),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=s.instructions,this._negotiatedProtocolVersion=o,e.setProtocolVersion?.(o),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(r){this.onerror?.(r instanceof Error?r:Error(String(r)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;if(t!==void 0)return`${t.name}@${t.version}`;return e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e===void 0)return;return At(e)?"modern":"legacy"}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new L(A.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new L(A.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new L(A.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new L(A.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new L(A.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new L(A.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"initialize":break;case"server/discover":break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new L(A.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new L(A.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new L(A.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new L(A.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case"ping":break}}async ping(e){return this.request({method:"ping"},e)}async discover(e){let t=await this._requestWithSchema({method:"server/discover"},ga,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:"completion/complete",params:e},t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug("Client.listPrompts() called but server does not advertise prompts capability - returning empty list"),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:"prompts/list",params:e},t);let a=await this._serveFromCache("prompts/list",void 0,t);if(a!==void 0)return a;return this._listAllPages("prompts/list",e,t,(s)=>s.prompts)}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResources() called but server does not advertise resources capability - returning empty list"),{resources:[]};if(e?.cursor!==void 0)return this.request({method:"resources/list",params:e},t);let a=await this._serveFromCache("resources/list",void 0,t);if(a!==void 0)return a;return this._listAllPages("resources/list",e,t,(s)=>s.resources)}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug("Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list"),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:"resources/templates/list",params:e},t);let a=await this._serveFromCache("resources/templates/list",void 0,t);if(a!==void 0)return a;return this._listAllPages("resources/templates/list",e,t,(s)=>s.resourceTemplates)}async _listAllPages(e,t,a,s,i){let o=a?.cacheMode==="bypass",r=this._cache.captureGeneration(e),n=(d)=>{let l=d===void 0?t&&{...t}:{...t,cursor:d};return this.request({method:e,...l&&{params:l}},a)},u=await this._walkPages(e,n,s);if(delete u.nextCursor,i?.(u),o)return u;return await this._cache.write(e,u,r,this._freshness(u)),u}async _walkPages(e,t,a){let s=await t(void 0),i=s.nextCursor,o=s,r=1;while(i!==void 0){if(this._listMaxPages!==0&&r>=this._listMaxPages)throw new L(A.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let n=await t(i);if(n.nextCursor===i&&JSON.stringify(a(n))===JSON.stringify(a(o)))break;a(s).push(...a(n)),o=n,i=n.nextCursor,r++}return s}_freshness(e,t){let a=e,s=typeof a.ttlMs==="number"?a.ttlMs:this._defaultCacheTtlMs,i=a.cacheScope==="public"?"public":"private";return{expiresAt:this._cache.now()+Math.min(Math.max(0,s),Zg),scope:i,params:t}}async _serveFromCache(e,t,a){if(a?.cacheMode==="bypass"||a?.cacheMode==="refresh")return;let s=await this._cache.read(e,t).catch((i)=>void this._reportStoreError(i));if(s!==void 0){if(a?.signal?.aborted){let i=a.signal.reason;throw i instanceof L?i:new L(A.RequestTimeout,String(i))}return s.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(!e.outputSchema)return;try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(t){return{ok:!1,compileError:t}}}async _resolveXMcpHeaderScan(e,t){let a=t??await this._cache.toolDefinition(e);return a===void 0?void 0:Pl(a.inputSchema)}async readResource(e,t){let{result:a}=await this._readResource(e,t);return a}async _readResource(e,t){let a=await this._serveFromCache("resources/read",e.uri,t);if(a!==void 0)return{result:a,cached:!0};let s=this._cache.captureGeneration("resources/read",e.uri),i=await this.request({method:"resources/read",params:e},t);if(t?.cacheMode!=="bypass"){let o=this._freshness(i,e.uri);if(o.expiresAt>this._cache.now())await this._cache.write("resources/read",i,s,o);else if(t?.cacheMode==="refresh")await this._cache.evictKey("resources/read",e.uri)}return{result:i,cached:!1}}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},t)}async listen(e,t){if(this.transport===void 0)throw new L(A.NotConnected,"Not connected");let a=this._negotiatedProtocolVersion;if(a===void 0||!At(a))throw new L(A.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${a??"none"}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:"subscriptions/listen",protocolVersion:a});if(t?.signal?.aborted){let x=t.signal.reason;throw x instanceof L?x:new L(A.RequestTimeout,String(x))}let s=new AbortController,i=`listen:${this._nextListenId++}`,o="opening",r,n,u,d,l=new Promise((x,P)=>{u=x,d=P}),h,p=new Promise((x)=>{h=x}),v=(x)=>{if(o==="closed")return;let P=o==="opening";if(r!==void 0)clearTimeout(r),r=void 0;if("ack"in x){o="open",u(x.ack);return}if(o="closed",n!==void 0)t?.signal?.removeEventListener("abort",n);if(this._listenState.delete(i),s.abort(),h(x.cause),P)d(x.error??new L(A.ConnectionClosed,"subscriptions/listen closed before the server acknowledged"))},b=async()=>{s.abort(),await this.notification({method:"notifications/cancelled",params:{requestId:i}}).catch(()=>{})},g=async()=>{if(o==="closed")return;v({cause:"local"}),await b()};this._listenState.set(i,{settle:v});let w=t?.timeout??gn;if(r=setTimeout(()=>{v({cause:"remote",error:new L(A.RequestTimeout,"subscriptions/listen ack timed out",{timeout:w})}),b().catch(()=>{})},w),t?.signal){let x=t.signal;n=()=>{if(o==="closed")return;let P=x.reason;v({cause:"local",error:P instanceof Error?P:Error(String(P??"Aborted"))}),b().catch(()=>{})},x.addEventListener("abort",n,{once:!0})}let R={jsonrpc:"2.0",id:i,method:"subscriptions/listen",params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},j=(x)=>{v({cause:"remote",error:x instanceof Error?x:Error(String(x))})};try{this.transport.send(R,{requestSignal:s.signal,onRequestStreamEnd:()=>v({cause:"remote",error:Error("subscriptions/listen: stream ended")})}).catch(j)}catch(x){j(x)}return{honoredFilter:await l,close:g,closed:p}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let a=Object.hasOwn(wg,e.method)?wg[e.method]:void 0;if(e.method==="notifications/resources/updated"){let s=e.params?.uri;if(typeof s==="string")this._cache.evictKey("resources/read",s)}else if(a!==void 0)for(let s of a)this._cache.evict(s);if(e.method==="notifications/subscriptions/acknowledged"){let s=e.params?._meta?.[Hs],i=typeof s==="string"?this._listenState.get(s):void 0;if(i!==void 0){let o=this._wireCodec().validateNotification("notifications/subscriptions/acknowledged",e);i.settle({ack:o.ok?o.value.params.notifications:{}});return}}if(e.method==="notifications/cancelled"){let s=e.params?.requestId,i=typeof s==="string"?this._listenState.get(s):void 0;if(i!==void 0){i.settle({cause:"remote",error:Error("subscriptions/listen: server cancelled the subscription")});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,a=typeof t==="string"?this._listenState.get(t):void 0;if(a!==void 0){if(fs(e))a.settle({cause:"remote",error:oe.fromError(e.error.code,e.error.message,e.error.data)});else a.settle({cause:"graceful",error:new L(A.ConnectionClosed,"subscriptions/listen: server closed the subscription gracefully before acknowledging")});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new L(A.ConnectionClosed,"Connection closed");for(let t of this._listenState.values())t.settle({cause:"remote",error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let a=this.getProtocolEra()==="modern"&&pg()!=="browser",s=async()=>{if(!a)return t;let u;try{u=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(l){this._reportStoreError(l)}if(!u?.valid||u.declarations.length===0)return t;let d=J1(u.declarations,e.arguments);return Object.keys(d).length===0?t:{...t,headers:{...t?.headers,...d}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,(u)=>this._compileOutputValidator(u)).catch((u)=>void this._reportStoreError(u)):this._compileOutputValidator(t.toolDefinition),o=()=>{if(i===void 0||i.ok)return;let u=i.compileError,d=(u instanceof Error?u.message:String(u)).slice(0,200);throw new oe(W.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${d}`)};o();let r;try{r=await this.request({method:"tools/call",params:e},await s())}catch(u){let d=u instanceof oe&&u.code===bi;if(!a||!d||t?.toolDefinition!==void 0)throw u;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:"refresh"};await this._cache.evict("tools/list"),await this.listTools(void 0,l).catch((h)=>this._reportStoreError(h)),i=await this._cache.outputValidator(e.name,(h)=>this._compileOutputValidator(h)).catch((h)=>void this._reportStoreError(h)),o(),r=await this.request({method:"tools/call",params:e},await s())}let n=i!==void 0&&i.ok?i.validator:void 0;if(n){if(r.structuredContent===void 0&&!r.isError)throw new oe(W.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent!==void 0&&!r.isError)try{let u=n(r.structuredContent);if(!u.valid)throw new oe(W.InvalidParams,`Structured content does not match the tool's output schema: ${u.errorMessage}`)}catch(u){if(u instanceof oe)throw u;throw new oe(W.InvalidParams,`Failed to validate structured content: ${u instanceof Error?u.message:String(u)}`)}}return r}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug("Client.listTools() called but server does not advertise tools capability - returning empty list"),{tools:[]};if(e?.cursor!==void 0){let s=await this.request({method:"tools/list",params:e},t);return this._excludeInvalidXMcpHeaderTools(s),s}let a=await this._serveFromCache("tools/list",void 0,t);if(a!==void 0)return a;return this._listAllPages("tools/list",e,t,(s)=>s.tools,(s)=>this._excludeInvalidXMcpHeaderTools(s))}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!=="modern"||!this.transport||hg(this.transport)==="stdio")return;let t=e.tools.filter((a)=>{let s=Pl(a.inputSchema);if(!s.valid)return console.warn(`[mcp-sdk] excluding tool '${a.name}' from tools/list: invalid x-mcp-header declaration — ${s.reason}`),!1;return!0});if(t.length!==e.tools.length)e.tools=t}_setupListChangedHandler(e,t,a,s){let i=su(xr,a);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof a.onChanged!=="function")throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:o,debounceMs:r}=i.data,{onChanged:n}=a,u=async()=>{if(!o){n(null,null);return}try{n(null,await s())}catch(l){n(l instanceof Error?l:Error(String(l)),null)}},d=()=>{if(r){let l=this._listChangedDebounceTimers.get(e);if(l)clearTimeout(l);let h=setTimeout(u,r);this._listChangedDebounceTimers.set(e,h)}else u()};this.setNotificationHandler(t,d)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};class mu extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}var Wg=10,yz=13,vs=32;function em(e){}function Yg(e){if(typeof e=="function")throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=em,onError:a=em,onRetry:s=em,onComment:i,maxBufferSize:o}=e,r=[],n=0,u=!0,d,l="",h=0,p,v=!1;function b(S){if(v)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(u&&(u=!1,S.charCodeAt(0)===239&&S.charCodeAt(1)===187&&S.charCodeAt(2)===191&&(S=S.slice(3))),r.length===0){let X=w(S);X!==""&&(r.push(X),n=X.length),g();return}if(S.indexOf(`
|
|
75
|
+
`)===-1&&S.indexOf("\r")===-1){r.push(S),n+=S.length,g();return}r.push(S);let k=r.join("");r.length=0,n=0;let N=w(k);N!==""&&(r.push(N),n=N.length),g()}function g(){o!==void 0&&(n+l.length<=o||(v=!0,r.length=0,n=0,d=void 0,l="",h=0,p=void 0,a(new mu(`Buffered data exceeded max buffer size of ${o} characters`,{type:"max-buffer-size-exceeded"}))))}function w(S){let k=0;if(S.indexOf("\r")===-1){let N=S.indexOf(`
|
|
76
|
+
`,k);for(;N!==-1;){if(k===N){h>0&&t({id:d,event:p,data:l}),d=void 0,l="",h=0,p=void 0,k=N+1,N=S.indexOf(`
|
|
77
|
+
`,k);continue}let X=S.charCodeAt(k);if(Gg(S,k,X)){let K=S.charCodeAt(k+5)===vs?k+6:k+5,se=S.slice(K,N);if(h===0&&S.charCodeAt(N+1)===Wg){t({id:d,event:p,data:se}),d=void 0,l="",p=void 0,k=N+2,N=S.indexOf(`
|
|
78
|
+
`,k);continue}l=h===0?se:`${l}
|
|
79
|
+
${se}`,h++}else Kg(S,k,X)?p=S.slice(S.charCodeAt(k+6)===vs?k+7:k+6,N)||void 0:R(S,k,N);k=N+1,N=S.indexOf(`
|
|
80
|
+
`,k)}return S.slice(k)}for(;k<S.length;){let N=S.indexOf("\r",k),X=S.indexOf(`
|
|
81
|
+
`,k),K=-1;if(N!==-1&&X!==-1?K=N<X?N:X:N!==-1?N===S.length-1?K=-1:K=N:X!==-1&&(K=X),K===-1)break;R(S,k,K),k=K+1,S.charCodeAt(k-1)===yz&&S.charCodeAt(k)===Wg&&k++}return S.slice(k)}function R(S,k,N){if(k===N){x();return}let X=S.charCodeAt(k);if(Gg(S,k,X)){let B=S.charCodeAt(k+5)===vs?k+6:k+5,re=S.slice(B,N);l=h===0?re:`${l}
|
|
82
|
+
${re}`,h++;return}if(Kg(S,k,X)){p=S.slice(S.charCodeAt(k+6)===vs?k+7:k+6,N)||void 0;return}if(X===105&&S.charCodeAt(k+1)===100&&S.charCodeAt(k+2)===58){let B=S.slice(S.charCodeAt(k+3)===vs?k+4:k+3,N);B.includes("\x00")||(d=B);return}if(X===58){if(i){let B=S.slice(k,N);i(B.slice(S.charCodeAt(k+1)===vs?2:1))}return}let K=S.slice(k,N),se=K.indexOf(":");if(se===-1){j(K,"",K);return}let we=K.slice(0,se),te=K.charCodeAt(se+1)===vs?2:1,ie=K.slice(se+te);j(we,ie,K)}function j(S,k,N){switch(S){case"event":p=k||void 0;break;case"data":l=h===0?k:`${l}
|
|
83
|
+
${k}`,h++;break;case"id":k.includes("\x00")||(d=k);break;case"retry":/^\d+$/.test(k)?s(parseInt(k,10)):a(new mu(`Invalid \`retry\` value: "${k}"`,{type:"invalid-retry",value:k,line:N}));break;default:a(new mu(`Unknown field "${S.length>20?`${S.slice(0,20)}…`:S}"`,{type:"unknown-field",field:S,value:k,line:N}));break}}function x(){h>0&&t({id:d,event:p,data:l}),d=void 0,l="",h=0,p=void 0}function P(S={}){if(S.consume&&r.length>0){let k=r.join("");R(k,0,k.length)}u=!0,d=void 0,l="",h=0,p=void 0,r.length=0,n=0,v=!1}return{feed:b,reset:P}}function Gg(e,t,a){return a===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function Kg(e,t,a){return a===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class tm extends TransformStream{constructor({onError:e,onRetry:t,onComment:a,maxBufferSize:s}={}){let i;super({start(o){i=Yg({onEvent:(r)=>{o.enqueue(r)},onError(r){typeof e=="function"&&e(r),(e==="terminate"||r.type==="max-buffer-size-exceeded")&&o.error(r)},onRetry:t,onComment:a,maxBufferSize:s})},transform(o){i.feed(o)}})}}function kz(e){return/(?:^|,)\s*dpop(?:\s|$|,)/i.test(e)}function zz(e){if(e.status!==401)return!1;let t=e.headers.get("www-authenticate")??"";return kz(t)&&/use_dpop_nonce/i.test(t)}var Sz=(e,t)=>(a)=>{let s=typeof e==="function"?e:()=>e;return async(i,o)=>{let r=(o?.method??"GET").toUpperCase(),n=new URL(i.toString()),u=await s();if(!u)return a(i,o);let d=async()=>{let h=await t();if(!h)return a(i,o);let p=new Headers(o?.headers),v=await u.buildProof({htm:r,htu:n,accessToken:h});return p.set("Authorization",`DPoP ${h}`),p.set("DPoP",v),a(i,{...o,headers:p})},l=await d();if(zz(l)&&l.headers.has("dpop-nonce"))u.observeNonce(l,n),await l.text?.().catch(()=>{}),l=await d();return u.observeNonce(l,n),l}},xz=(e)=>Sz(async()=>{try{return await e.dpop?.()}catch(t){throw it(t)}},async()=>{let t;try{t=await e.tokens()}catch(a){throw it(a)}return t?.token_type?.toLowerCase()==="dpop"?t.access_token:void 0});var S4=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SseError"})}static[Symbol.hasInstance](e){return Ge(this,e)}static isInstance(e){if(typeof this!=="function")throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ge(this,e)}constructor(e,t,a){super(`SSE error: ${t}`);this.code=e,this.event=a,ya(this,new.target)}};var Rz=1,qz={initialReconnectionDelay:1000,maxReconnectionDelay:30000,reconnectionDelayGrowFactor:1.5,maxRetries:2},jz=new Set(["authorization","dpop","content-type","mcp-protocol-version","mcp-method","mcp-name","mcp-session-id"]);function Xg(e,t){if(typeof AbortSignal.any==="function")return AbortSignal.any([e,t]);let a=new AbortController;if(e.aborted)return a.abort(e.reason),a.signal;if(t.aborted)return a.abort(t.reason),a.signal;let s=()=>{e.removeEventListener("abort",i),t.removeEventListener("abort",o)};function i(){s(),a.abort(e.reason)}function o(){s(),a.abort(t.reason)}return e.addEventListener("abort",i,{once:!0}),t.addEventListener("abort",o,{once:!0}),a.signal}var Qg=class{_abortController;_url;_resourceMetadataUrl;_scope;_requestInit;_authProvider;_oauthProvider;_skipIssuerMetadataValidation;_fetch;_fetchWithInit;_redirectPolicy;_sessionId;_reconnectionOptions;_protocolVersion;_onInsufficientScope;_maxStepUpRetries;_serverRetryMs;_reconnectionScheduler;_cancelReconnection;onclose;onerror;onmessage;hasPerRequestStream=!0;constructor(e,t){if(this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._skipIssuerMetadataValidation=t?.skipIssuerMetadataValidation,this._fetch=t?.fetch,kg(t?.authProvider)){if(this._oauthProvider=t.authProvider,this._authProvider=zg(t.authProvider,{skipIssuerMetadataValidation:t.skipIssuerMetadataValidation}),t.authProvider.dpop)this._fetch=xz(t.authProvider)(t.fetch??fetch)}else this._authProvider=t?.authProvider;if(this._redirectPolicy=t?.redirectPolicy,this._fetchWithInit=ag(t?.fetch,t?.requestInit),this._redirectPolicy==="follow")this._fetchWithInit=og(this._fetchWithInit);this._sessionId=t?.sessionId,this._protocolVersion=t?.protocolVersion,this._reconnectionOptions=t?.reconnectionOptions??qz,this._reconnectionScheduler=t?.reconnectionScheduler,this._onInsufficientScope=t?.onInsufficientScope??"reauthorize",this._maxStepUpRetries=Math.max(0,t?.maxStepUpRetries??Rz)}async _stepUpAuthorize(e,t){try{return await this._stepUpAuthorizeInner(e,t)}catch(a){throw it(a)}}async _stepUpAuthorizeInner(e,t){if(this._onInsufficientScope==="throw")throw new Jl({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(!this._oauthProvider)throw new Jl({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(t>=this._maxStepUpRetries)throw new gt(A.ClientHttpForbidden,`Server returned 403 insufficient_scope after step-up re-authorization (retry limit ${this._maxStepUpRetries} reached)`,{status:403,statusText:e.statusText??"Forbidden",text:e.text});if(e.resourceMetadataUrl)this._resourceMetadataUrl=e.resourceMetadataUrl;let a=await this._oauthProvider.tokens(),s=du(this._scope,a?.scope,e.scope);this._scope=s;let i=Sg(s,a?.scope);return lu(this._oauthProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:s,forceReauthorization:i,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})}_redirects(e){return this._redirectPolicy==="follow"?e:yi(e)}_unfollowedRedirect(e,t){let a=this._redirectPolicy==="follow"?void 0:rg(e,t);return a&&`${a} (redirectPolicy: 'same-origin')`}async _commonHeaders(){let e=new Headers(this._requestInit?.headers||void 0),t;try{t=await this._authProvider?.token()}catch(a){throw it(a)}if(t)e.set("Authorization",`Bearer ${t}`);if(this._sessionId)e.set("mcp-session-id",this._sessionId);if(this._protocolVersion)e.set("mcp-protocol-version",this._protocolVersion);return e}_applyBodyDerivedHeaders(e,t){if(Array.isArray(t)||!za(t))return;let a=t.params?._meta?.[Wt];if(typeof a!=="string")return;e.set("mcp-protocol-version",a),e.set("mcp-method",t.method);let s=W1(t.method,t.params);if(s?.value!==void 0)e.set("mcp-name",Tl(s.value))}_isModernEnvelopedRequest(e){if(Array.isArray(e)||!za(e))return!1;let t=e.params?._meta?.[Wt];return typeof t==="string"&&At(t)}async _startOrAuthSse(e,t=!1,a=0){let{resumptionToken:s,requestSignal:i}=e,o=()=>this._abortController?.signal.aborted===!0||i?.aborted===!0;try{let r=await this._commonHeaders(),n=[...r.get("accept")?.split(",").map((h)=>h.trim().toLowerCase())??[],"text/event-stream"];if(r.set("accept",[...new Set(n)].join(", ")),s)r.set("last-event-id",s);let u=this._abortController?.signal,d=i!==void 0&&u!==void 0?Xg(u,i):i??u,l=await this._redirects(this._fetch??fetch)(this._url,{...this._requestInit,method:"GET",headers:r,signal:d});if(!l.ok){if(l.status===401&&this._authProvider){if(l.headers.has("www-authenticate")){let{resourceMetadataUrl:p,scope:v}=zi(l);this._resourceMetadataUrl=p,this._scope=du(this._scope,v)}if(this._authProvider.onUnauthorized&&!t){try{await this._authProvider.onUnauthorized({response:l,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(p){throw it(p)}return await l.text?.().catch(()=>{}),this._startOrAuthSse(e,!0,a)}if(await l.text?.().catch(()=>{}),t)throw it(new gt(A.ClientHttpAuthentication,"Server returned 401 after re-authentication",{status:401,statusText:l.statusText}));throw it(new wt)}if(l.status===403){let{resourceMetadataUrl:p,scope:v,error:b,errorDescription:g}=zi(l);if(b==="insufficient_scope"){let w=await l.text?.().catch(()=>null);if(await this._stepUpAuthorize({scope:v,resourceMetadataUrl:p,errorDescription:g,statusText:l.statusText,text:w},a)!=="AUTHORIZED")throw it(new wt);return this._startOrAuthSse(e,t,a+1)}}if(await l.text?.().catch(()=>{}),l.status===405){e.onRequestStreamEnd?.();return}let h=this._unfollowedRedirect(this._url,l)??l.statusText;throw new gt(A.ClientHttpFailedToOpenStream,`Failed to open SSE stream: ${h}`,{status:l.status,statusText:l.statusText})}this._handleSseStream(l.body,e,!0)}catch(r){if(!o())this.onerror?.(r);throw r}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,a=this._reconnectionOptions.reconnectionDelayGrowFactor,s=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*Math.pow(a,e),s)}_scheduleReconnection(e,t=0){let a=this._reconnectionOptions.maxRetries;if(t>=a){this.onerror?.(Error(`Maximum reconnection attempts (${a}) exceeded.`)),e.onRequestStreamEnd?.();return}let s=this._getNextReconnectionDelay(t),i=()=>{if(this._cancelReconnection=void 0,this._abortController?.signal.aborted||e.requestSignal?.aborted)return;this._startOrAuthSse(e).catch((o)=>{if(this._abortController?.signal.aborted||e.requestSignal?.aborted)return;this.onerror?.(Error(`Failed to reconnect SSE stream: ${o instanceof Error?o.message:String(o)}`));try{this._scheduleReconnection(e,t+1)}catch(r){this.onerror?.(r instanceof Error?r:Error(String(r)))}})};if(this._reconnectionScheduler){let o=this._reconnectionScheduler(i,s,t);this._cancelReconnection=typeof o==="function"?o:void 0}else{let o=setTimeout(i,s);this._cancelReconnection=()=>clearTimeout(o)}}_handleSseStream(e,t,a){if(!e){t.onRequestStreamEnd?.();return}let{onresumptiontoken:s,replayMessageId:i,requestSignal:o,onRequestStreamEnd:r}=t,n=()=>this._abortController?.signal.aborted===!0||o?.aborted===!0,u,d=!1,l=!1;(async()=>{try{let p=e.pipeThrough(new TextDecoderStream).pipeThrough(new tm({onRetry:(v)=>{this._serverRetryMs=v}})).getReader();while(!0){let{value:v,done:b}=await p.read();if(b)break;if(v.id)u=v.id,d=!0,s?.(v.id);if(!v.data)continue;if(!v.event||v.event==="message")try{let g=ft.parse(JSON.parse(v.data));if(hs(g)||fs(g)){if(l=!0,i!==void 0)g.id=i}this.onmessage?.(g)}catch(g){this.onerror?.(g)}}if((a||d)&&!l&&this._abortController&&!n())this._scheduleReconnection({resumptionToken:u,onresumptiontoken:s,replayMessageId:i,requestSignal:o,onRequestStreamEnd:r},0);else if(!n())r?.()}catch(p){if(n())return;if(this.onerror?.(Error(`SSE stream disconnected: ${p}`)),(a||d)&&!l&&this._abortController&&!n())try{this._scheduleReconnection({resumptionToken:u,onresumptiontoken:s,replayMessageId:i,requestSignal:o,onRequestStreamEnd:r},0)}catch(v){this.onerror?.(Error(`Failed to reconnect: ${v instanceof Error?v.message:String(v)}`)),r?.()}else r?.()}})()}async start(){if(this._abortController)throw Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e,t){if(!this._oauthProvider)throw new wt("finishAuth requires an OAuthClientProvider");let{authorizationCode:a,iss:s}=await xg(e,t,this._oauthProvider,this._url,{fetchFn:this._fetchWithInit,resourceMetadataUrl:this._resourceMetadataUrl});if(await lu(this._oauthProvider,{serverUrl:this._url,authorizationCode:a,iss:s,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})!=="AUTHORIZED")throw new wt("Failed to authorize")}async close(){try{this._cancelReconnection?.()}finally{this._cancelReconnection=void 0,this._abortController?.abort(),this.onclose?.()}}async send(e,t){return this._send(e,t,!1)}async _send(e,t,a,s=0){try{let{resumptionToken:i,onresumptiontoken:o}=t||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:za(e)?e.id:void 0,requestSignal:t?.requestSignal}).catch((w)=>this.onerror?.(w));return}let r=await this._commonHeaders();this._applyBodyDerivedHeaders(r,e);let n=Array.isArray(e)?e.some((w)=>jl(w)):jl(e);if(n)r.delete("mcp-session-id");if(t?.headers!==void 0)for(let[w,R]of Object.entries(t.headers)){if(jz.has(w.toLowerCase()))continue;r.set(w,R)}r.set("content-type","application/json");let u=[...r.get("accept")?.split(",").map((w)=>w.trim().toLowerCase())??[],"application/json","text/event-stream"];r.set("accept",[...new Set(u)].join(", "));let d=this._abortController?.signal,l=t?.requestSignal!==void 0&&d!==void 0?Xg(d,t.requestSignal):t?.requestSignal??d,h={...this._requestInit,method:"POST",headers:r,body:JSON.stringify(e),signal:l},p=await this._redirects(this._fetch??fetch)(this._url,h);if(n&&p.ok)this._sessionId=p.headers.get("mcp-session-id")||void 0;if(!p.ok){if(p.status===401&&this._authProvider){if(p.headers.has("www-authenticate")){let{resourceMetadataUrl:j,scope:x}=zi(p);this._resourceMetadataUrl=j,this._scope=du(this._scope,x)}if(this._authProvider.onUnauthorized&&!a){try{await this._authProvider.onUnauthorized({response:p,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(j){throw it(j)}return await p.text?.().catch(()=>{}),this._send(e,t,!0,s)}if(await p.text?.().catch(()=>{}),a)throw it(new gt(A.ClientHttpAuthentication,"Server returned 401 after re-authentication",{status:401,statusText:p.statusText}));throw it(new wt)}let w=await p.text?.().catch(()=>null);if(p.status===403){let{resourceMetadataUrl:j,scope:x,error:P,errorDescription:S}=zi(p);if(P==="insufficient_scope"){if(await this._stepUpAuthorize({scope:x,resourceMetadataUrl:j,errorDescription:S,statusText:p.statusText,text:w},s)!=="AUTHORIZED")throw it(new wt);return this._send(e,t,a,s+1)}}if(p.status===400&&typeof w==="string"&&this._isModernEnvelopedRequest(e))try{let j=ft.parse(JSON.parse(w)),x=(Array.isArray(e)?e:[e]).filter((P)=>za(P));if(fs(j)&&x.some((P)=>P.id===j.id)){this.onmessage?.(j);return}}catch{}let R=this._unfollowedRedirect(this._url,p)??w;throw new gt(A.ClientHttpNotImplemented,`Error POSTing to endpoint: ${R}`,{status:p.status,statusText:p.statusText,text:w})}if(p.status===202){if(await p.text?.().catch(()=>{}),H1(e))this._startOrAuthSse({resumptionToken:void 0}).catch((w)=>this.onerror?.(w));return}let v=(Array.isArray(e)?e:[e]).some((w)=>("method"in w)&&("id"in w)&&w.id!==void 0),b=p.headers.get("content-type"),g=tg(b);if(v)if(g==="text/event-stream")this._handleSseStream(p.body,{onresumptiontoken:o,requestSignal:t?.requestSignal,onRequestStreamEnd:t?.onRequestStreamEnd},!1);else if(g==="application/json"){let w=await p.json(),R=Array.isArray(w)?w.map((j)=>ft.parse(j)):[ft.parse(w)];for(let j of R)this.onmessage?.(j)}else throw await p.text?.().catch(()=>{}),new L(A.ClientHttpUnexpectedContent,`Unexpected content type: ${b}`,{contentType:b});else await p.text?.().catch(()=>{})}catch(i){if(t?.requestSignal?.aborted!==!0)this.onerror?.(i);throw i}}get sessionId(){return this._sessionId}async terminateSession(){if(!this._sessionId)return;try{let e=await this._commonHeaders(),t={...this._requestInit,method:"DELETE",headers:e,signal:this._abortController?.signal},a=await this._redirects(this._fetch??fetch)(this._url,t);if(await a.text?.().catch(()=>{}),!a.ok&&a.status!==405)throw new gt(A.ClientHttpFailedToTerminateSession,`Failed to terminate session: ${this._unfollowedRedirect(this._url,a)??a.statusText}`,{status:a.status,statusText:a.statusText});this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}};class ov{_eventSlots=new Map;setHandler(e,t){let a=this._ensureEventSlot(e);if(a.onHandler&&t)console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`);a.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let a=this._eventSlots.get(e);if(!a)return;let s=a.listeners.indexOf(t);if(s!==-1)a.listeners.splice(s,1)}dispatch(e,t){let a=this._eventSlots.get(e);if(!a)return;a.onHandler?.(t);for(let s of[...a.listeners])s(t)}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t)t={listeners:[]},this._eventSlots.set(e,t);return t}}class rv{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}}var ev=new Set;function tv(e,t){let[a,s]=t,i=a?.shape;if(typeof i?.method?.value!=="string")return;let o=i.method.value,r=e==="request"?"setRequestHandler":"setNotificationHandler";if(!ev.has(r))ev.add(r),console.warn(`[ext-apps] ${r}(Schema, handler) is deprecated; use ${r}("${o}", { params: Schema.shape.params }, handler).`);let n=s;return[o,{params:i.params},e==="request"?(u,d)=>n({method:o,params:u},Pz(d)):(u)=>n({method:o,params:u})]}function Pz(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var nv="2026-01-26";var Tz="ui/notifications/tool-input-partial";var Cz=E([f("light"),f("dark")]).describe("Color theme preference for the host environment."),yn=E([f("inline"),f("fullscreen"),f("pip")]).describe("Display mode for UI presentation."),Ez=E([f("--color-background-primary"),f("--color-background-secondary"),f("--color-background-tertiary"),f("--color-background-inverse"),f("--color-background-ghost"),f("--color-background-info"),f("--color-background-danger"),f("--color-background-success"),f("--color-background-warning"),f("--color-background-disabled"),f("--color-text-primary"),f("--color-text-secondary"),f("--color-text-tertiary"),f("--color-text-inverse"),f("--color-text-ghost"),f("--color-text-info"),f("--color-text-danger"),f("--color-text-success"),f("--color-text-warning"),f("--color-text-disabled"),f("--color-border-primary"),f("--color-border-secondary"),f("--color-border-tertiary"),f("--color-border-inverse"),f("--color-border-ghost"),f("--color-border-info"),f("--color-border-danger"),f("--color-border-success"),f("--color-border-warning"),f("--color-border-disabled"),f("--color-ring-primary"),f("--color-ring-secondary"),f("--color-ring-inverse"),f("--color-ring-info"),f("--color-ring-danger"),f("--color-ring-success"),f("--color-ring-warning"),f("--font-sans"),f("--font-mono"),f("--font-weight-normal"),f("--font-weight-medium"),f("--font-weight-semibold"),f("--font-weight-bold"),f("--font-text-xs-size"),f("--font-text-sm-size"),f("--font-text-md-size"),f("--font-text-lg-size"),f("--font-heading-xs-size"),f("--font-heading-sm-size"),f("--font-heading-md-size"),f("--font-heading-lg-size"),f("--font-heading-xl-size"),f("--font-heading-2xl-size"),f("--font-heading-3xl-size"),f("--font-text-xs-line-height"),f("--font-text-sm-line-height"),f("--font-text-md-line-height"),f("--font-text-lg-line-height"),f("--font-heading-xs-line-height"),f("--font-heading-sm-line-height"),f("--font-heading-md-line-height"),f("--font-heading-lg-line-height"),f("--font-heading-xl-line-height"),f("--font-heading-2xl-line-height"),f("--font-heading-3xl-line-height"),f("--border-radius-xs"),f("--border-radius-sm"),f("--border-radius-md"),f("--border-radius-lg"),f("--border-radius-xl"),f("--border-radius-full"),f("--border-width-regular"),f("--shadow-hairline"),f("--shadow-sm"),f("--shadow-md"),f("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),$z=T(Ez.describe(`Style variables for theming MCP apps.
|
|
82
84
|
|
|
83
85
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
84
86
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
85
87
|
|
|
86
88
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
87
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),
|
|
89
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),E([c(),rl()]).describe(`Style variables for theming MCP apps.
|
|
88
90
|
|
|
89
91
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
90
92
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -96,10 +98,10 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
96
98
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
97
99
|
|
|
98
100
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
99
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),
|
|
101
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Mz=_({method:f("ui/open-link"),params:_({url:c().describe("URL to open in the host's browser")})}),Nz=_({isError:C().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),Iz=_({isError:C().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),Oz=_({isError:C().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),Az=_({method:f("ui/notifications/sandbox-proxy-ready"),params:_({})}),am=_({connectDomains:y(c()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
100
102
|
|
|
101
103
|
- Maps to CSP \`connect-src\` directive
|
|
102
|
-
- Empty or omitted → no network connections (secure default)`),resourceDomains:
|
|
104
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:y(c()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:y(c()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:y(c()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),sm=_({camera:_({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:_({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:_({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:_({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")}),Lz=_({method:f("ui/notifications/size-changed"),params:_({width:q().optional().describe("New width in pixels."),height:q().optional().describe("New height in pixels.")})}),N4=_({method:f("ui/notifications/tool-input"),params:_({arguments:T(c(),D().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),I4=_({method:f("ui/notifications/tool-input-partial"),params:_({arguments:T(c(),D().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),O4=_({method:f("ui/notifications/tool-cancelled"),params:_({reason:c().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Uz=_({fonts:c().optional()}),Dz=_({variables:$z.optional().describe("CSS variables for theming the app."),css:Uz.optional().describe("CSS blocks that apps can inject.")}),A4=_({method:f("ui/resource-teardown"),params:_({})}),Zz=T(c(),D()),av=_({text:_({}).optional().describe("Host supports text content blocks."),image:_({}).optional().describe("Host supports image content blocks."),audio:_({}).optional().describe("Host supports audio content blocks."),resource:_({}).optional().describe("Host supports resource content blocks."),resourceLink:_({}).optional().describe("Host supports resource link content blocks."),structuredContent:_({}).optional().describe("Host supports structured content.")}),Bz=_({method:f("ui/notifications/request-teardown"),params:_({}).optional()}),Hz=_({experimental:T(c(),T(c(),kc()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:_({}).optional().describe("Host supports opening external URLs."),downloadFile:_({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:_({listChanged:C().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:_({listChanged:C().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:_({}).optional().describe("Host accepts log messages."),sandbox:_({permissions:sm.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:am.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:av.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:av.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:_({tools:_({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Fz=_({experimental:T(c(),T(c(),kc()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:_({listChanged:C().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:y(yn).optional().describe("Display modes the app supports.")}),Vz=_({method:f("ui/notifications/initialized"),params:_({}).optional()}),L4=_({csp:am.optional().describe("Content Security Policy configuration for UI resources."),permissions:sm.optional().describe("Sandbox permissions requested by the UI resource."),domain:c().optional().describe(`Dedicated origin for view sandbox.
|
|
103
105
|
|
|
104
106
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
105
107
|
|
|
@@ -107,20 +109,181 @@ Useful when views need stable, dedicated origins for OAuth callbacks, CORS polic
|
|
|
107
109
|
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
|
|
108
110
|
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
|
|
109
111
|
|
|
110
|
-
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:
|
|
112
|
+
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:C().optional().describe(`Visual boundary preference - true if view prefers a visible border.
|
|
111
113
|
|
|
112
114
|
Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
|
|
113
115
|
|
|
114
116
|
- \`true\`: request visible border + background
|
|
115
117
|
- \`false\`: request no visible border + background
|
|
116
|
-
- omitted: host decides border`)}),
|
|
118
|
+
- omitted: host decides border`)}),sv=_({method:f("ui/request-display-mode"),params:_({mode:yn.describe("The display mode being requested.")})}),iv=_({mode:yn.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),Jz=E([f("model"),f("app")]).describe("Tool visibility scope - who can access the tool."),U4=_({resourceUri:c().optional(),visibility:y(Jz).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
117
119
|
- "model": Tool visible to and callable by the agent
|
|
118
|
-
- "app": Tool callable by the app from this server only`),csp:
|
|
119
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:u().optional().describe("User's language and region preference in BCP 47 format."),timeZone:u().optional().describe("User's timezone in IANA format."),userAgent:u().optional().describe("Host application identifier."),platform:q([m("web"),m("desktop"),m("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:p({touch:I().optional().describe("Whether the device supports touch input."),hover:I().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:p({top:x().describe("Top safe area inset in pixels."),right:x().describe("Right safe area inset in pixels."),bottom:x().describe("Bottom safe area inset in pixels."),left:x().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),kT=p({method:m("ui/notifications/host-context-changed"),params:AS.describe("Partial context update containing only changed fields.")}),gx=p({method:m("ui/update-model-context"),params:p({content:b(Nt).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:C(u(),D().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Sx=p({method:m("ui/initialize"),params:p({appInfo:qt.describe("App identification (name and version)."),appCapabilities:px.describe("Features and capabilities this app provides."),protocolVersion:u().describe("Protocol version this app supports.")})}),vx=p({protocolVersion:u().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:qt.describe("Host application identification and version."),hostCapabilities:dx.describe("Features and capabilities provided by the host."),hostContext:AS.describe("Rich context about the host environment.")}).passthrough();class ws{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=(r)=>{if(t&&r.source!==this.eventSource){console.debug("Ignoring message from unknown source",r);return}let o=gt.safeParse(r.data);if(o.success)console.debug("Parsed message",o.data),this.onmessage?.(o.data);else if(r.data?.jsonrpc!=="2.0")console.debug("Ignoring non-JSON-RPC message",o.error.message,r);else console.error("Failed to parse message",o.error.message,r),this.onerror?.(Error("Invalid JSON-RPC message received: "+o.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,t){if(e.method!==YR)console.debug("Sending message",e);this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var bx=[MS];class zs extends ma{_client;_hostInfo;_hostCapabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_registeredEvents=new Set;_events=new NS;_methods=new jS;setRequestHandler=(...e)=>{let[t,...r]=CS("request",e)??e;this._methods.claim(t,"setRequestHandler"),super.setRequestHandler.call(this,t,...r)};setNotificationHandler=(...e)=>{let[t,...r]=CS("notification",e)??e;this._methods.claim(t,"setNotificationHandler"),super.setNotificationHandler.call(this,t,...r)};removeRequestHandler=(e)=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=(e)=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_wrapHandler(e,t){let r=super._wrapHandler(e,t);if(e==="ui/initialize"||e==="ping")return r;return async(o,s)=>{if(!this._initializedReceived)console.warn(`[ext-apps] AppBridge received '${e}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`);return r(o,s)}}eventSchemas={sizechange:ix,sandboxready:nx,initialized:mx,requestteardown:lx,loggingmessage:io};setEventHandler(e,t){this._ensureEventSlot(e),this._events.setHandler(e,t)}getEventHandler(e){return this._events.getHandler(e)}addEventListener(e,t){this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);let r=(o)=>{if(e==="initialized")this._initializedReceived=!0;this._events.dispatch(e,o)};if(e==="loggingmessage")this.setNotificationHandler("notifications/message",(o)=>{r(o.params)});else this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},(o)=>r(o));this._registeredEvents.add(e)}warnIfRequestHandlerReplaced(e,t,r){if(t&&r)console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t,r,o){super(o);this._client=e,this._hostInfo=t,this._hostCapabilities=r,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),this._ensureEventSlot("initialized"),this._hostContext=o?.hostContext||{},this.replaceRequestHandler("ui/initialize",{params:Sx.shape.params,result:vx},(s)=>this._onAppsInitialize(s)),this.replaceRequestHandler("ping",(s,n)=>(this.onping?.(s.params,n),{})),this.replaceRequestHandler("ui/request-display-mode",{params:qS.shape.params,result:OS},()=>({mode:this._hostContext.displayMode??"inline"}))}buildContext(e){return e}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler("sizechange")}set onsizechange(e){this.setEventHandler("sizechange",e)}get onsandboxready(){return this.getEventHandler("sandboxready")}set onsandboxready(e){this.setEventHandler("sandboxready",e)}get oninitialized(){return this.getEventHandler("initialized")}set oninitialized(e){this.setEventHandler("initialized",e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced("onmessage",this._onmessage,e),this._onmessage=e,this.replaceRequestHandler("ui/message",{params:_x.shape.params,result:sx},async(t,r)=>{if(!this._onmessage)throw Error("No onmessage handler set");return this._onmessage(t,r)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced("onopenlink",this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler("ui/open-link",{params:tx.shape.params,result:rx},async(t,r)=>{if(!this._onopenlink)throw Error("No onopenlink handler set");return this._onopenlink(t,r)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced("ondownloadfile",this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler("ui/download-file",{params:fx.shape.params,result:ox},async(t,r)=>{if(!this._ondownloadfile)throw Error("No ondownloadfile handler set");return this._ondownloadfile(t,r)})}get onrequestteardown(){return this.getEventHandler("requestteardown")}set onrequestteardown(e){this.setEventHandler("requestteardown",e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced("onrequestdisplaymode",this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler("ui/request-display-mode",{params:qS.shape.params,result:OS},async(t,r)=>{if(!this._onrequestdisplaymode)throw Error("No onrequestdisplaymode handler set");return this._onrequestdisplaymode(t,r)})}get onloggingmessage(){return this.getEventHandler("loggingmessage")}set onloggingmessage(e){this.setEventHandler("loggingmessage",e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced("onupdatemodelcontext",this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler("ui/update-model-context",{params:gx.shape.params,result:fr},async(t,r)=>{if(!this._onupdatemodelcontext)throw Error("No onupdatemodelcontext handler set");return this._onupdatemodelcontext(t,r)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",async(t,r)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(t.params,r)})}_oncreatesamplingmessage;get oncreatesamplingmessage(){return this._oncreatesamplingmessage}set oncreatesamplingmessage(e){this.warnIfRequestHandlerReplaced("oncreatesamplingmessage",this._oncreatesamplingmessage,e),this._oncreatesamplingmessage=e,this.replaceRequestHandler("sampling/createMessage",async(t,r)=>{if(!this._oncreatesamplingmessage)throw Error("No oncreatesamplingmessage handler set");return this._oncreatesamplingmessage(t.params,r)})}sendToolListChanged(e={}){return this.notification({method:"notifications/tools/list_changed",params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced("onlistresources",this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler("resources/list",async(t,r)=>{if(!this._onlistresources)throw Error("No onlistresources handler set");return this._onlistresources(t.params,r)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced("onlistresourcetemplates",this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler("resources/templates/list",async(t,r)=>{if(!this._onlistresourcetemplates)throw Error("No onlistresourcetemplates handler set");return this._onlistresourcetemplates(t.params,r)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced("onreadresource",this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler("resources/read",async(t,r)=>{if(!this._onreadresource)throw Error("No onreadresource handler set");return this._onreadresource(t.params,r)})}sendResourceListChanged(e={}){return this.notification({method:"notifications/resources/list_changed",params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced("onlistprompts",this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler("prompts/list",async(t,r)=>{if(!this._onlistprompts)throw Error("No onlistprompts handler set");return this._onlistprompts(t.params,r)})}sendPromptListChanged(e={}){return this.notification({method:"notifications/prompts/list_changed",params:e})}getCapabilities(){return this._hostCapabilities}async _onAppsInitialize(e){let t=e.protocolVersion;if(this._appInfo!==void 0)console.warn("[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.");return this._appCapabilities=e.appCapabilities,this._appInfo=e.appInfo,{protocolVersion:bx.includes(t)?t:MS,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},r=!1;for(let o of Object.keys(e)){let s=this._hostContext[o],n=e[o];if(yx(s,n))continue;t[o]=n,r=!0}if(r)this._hostContext=e,this.sendHostContextChange(t)}sendHostContextChange(e){return this.notification({method:"ui/notifications/host-context-changed",params:e})}sendToolInput(e){return this.notification({method:"ui/notifications/tool-input",params:e})}sendToolInputPartial(e){return this.notification({method:"ui/notifications/tool-input-partial",params:e})}sendToolResult(e){return this.notification({method:"ui/notifications/tool-result",params:e})}sendToolCancelled(e){return this.notification({method:"ui/notifications/tool-cancelled",params:e})}sendSandboxResourceReady(e){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:e})}teardownResource(e,t){return this.request({method:"ui/resource-teardown",params:e},ux,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:"tools/call",params:e},t)}listTools(e,t){return this.request({method:"tools/list",params:e},t)}async connect(e){if(this.transport)throw Error("AppBridge is already connected. Call close() before connecting again.");if(this._initializedReceived=!1,this._client){let t=this._client.getServerCapabilities();if(!t)throw Error("Client server capabilities not available");if(t.tools){if(this.oncalltool=async(r,o)=>this._client.request({method:"tools/call",params:r},{signal:o.mcpReq.signal}),t.tools.listChanged)this._client.setNotificationHandler("notifications/tools/list_changed",(r)=>this.sendToolListChanged(r.params))}if(t.resources){if(this.onlistresources=async(r,o)=>this._client.request({method:"resources/list",params:r},{signal:o.mcpReq.signal}),this.onlistresourcetemplates=async(r,o)=>this._client.request({method:"resources/templates/list",params:r},{signal:o.mcpReq.signal}),this.onreadresource=async(r,o)=>this._client.request({method:"resources/read",params:r},{signal:o.mcpReq.signal}),t.resources.listChanged)this._client.setNotificationHandler("notifications/resources/list_changed",(r)=>this.sendResourceListChanged(r.params))}if(t.prompts){if(this.onlistprompts=async(r,o)=>this._client.request({method:"prompts/list",params:r},{signal:o.mcpReq.signal}),t.prompts.listChanged)this._client.setNotificationHandler("notifications/prompts/list_changed",(r)=>this.sendPromptListChanged(r.params))}}return super.connect(e)}}function yx(e,t){return JSON.stringify(e)===JSON.stringify(t)}var ga=!1;function LS(){return new Nd({name:"ads-showcase",version:"1.0.0"},{versionNegotiation:{mode:"auto"},capabilities:{extensions:{"io.modelcontextprotocol/ui":{mimeTypes:["text/html;profile=mcp-app"]}}}})}var US=(e)=>e.connect(new ES(new URL("mcp",location.href)));var DS=[200,800],wx=(e)=>e?.name==="TypeError"&&/^(Failed to fetch|fetch failed|Load failed|NetworkError when attempting to fetch resource\.)$/.test(e.message);function zx(e,t){return new Promise((r,o)=>{t?.throwIfAborted();let n=setTimeout(()=>{t?.removeEventListener("abort",i),r()},e),i=()=>{clearTimeout(n),t.removeEventListener("abort",i),o(t.reason)};t?.addEventListener("abort",i,{once:!0})})}function ZS(e,{signal:t,onDiagnostic:r,wait:o=zx}={}){return async(s)=>{for(let n=1;;n++){t?.throwIfAborted();try{let i=await e(s);if(t?.throwIfAborted(),n>1)r?.({state:"recovered",uri:s.uri,attempt:n});return i}catch(i){if(t?.throwIfAborted(),!wx(i))throw i;if(n>DS.length)throw r?.({state:"exhausted",uri:s.uri,attempt:n,message:i.message}),Object.assign(Error(`MCP resource transport failed for ${s.uri} after ${n} attempts: ${i.message}. Inspect the host connection and browser network diagnostics; this resource-loading error does not establish a component assertion failure.`,{cause:i}),{code:"ADS_RESOURCE_TRANSPORT"});let a=DS[n-1];r?.({state:"retry",uri:s.uri,attempt:n,nextAttempt:n+1,delayMs:a,message:i.message}),await o(a,t)}}}}function HS(e,{onError:t,delay:r=150,setTimer:o=setTimeout,clearTimer:s=clearTimeout}={}){let n=!1,i=!1,a=!1,c=!1,l=!1,d;function f(){if(!n||i||a||!c||d!==void 0)return;d=o(()=>{d=void 0,a=!0;let h=l;c=l=!1,Promise.resolve().then(()=>e(h)).catch((g)=>{if(!i)t?.(g)}).finally(()=>{a=!1,f()})},r)}return{schedule(h=!1){if(i)return;c=!0,l||=h,f()},start(){n=!0,f()},close(){i=!0,c=l=!1,s(d),d=void 0}}}function FS(e){let t=[],r=new Map;for(let o of e){if(!o.group){t.push(o);continue}if(!r.has(o.group))r.set(o.group,[]);r.get(o.group).push(o)}return[...t.length?[{label:null,entries:t}]:[],...[...r].sort(([o],[s])=>o.localeCompare(s)).map(([o,s])=>({label:o,entries:s}))]}var Rx=(e)=>typeof e==="string"&&/^(?:ads:\/\/project\/build|ads:\/\/preview\/(?:manifest|live)(?:\?from=[a-f0-9]{64})?)$/.test(e);function au({frame:e,context:t,draftScope:r}){let o,s=0,n=!1,i,a,c,l=new AbortController;async function d(v,_=!1){let y=await fetch("preview-http",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v),..._?{keepalive:!0}:{signal:l.signal}}),T=await y.json();if(!y.ok)throw Object.assign(Error(T.error??"HTTP preview control failed."),{code:T.code});return T}function f(v,_,y={}){if(!n&&o)e.contentWindow?.postMessage({channel:"ads-preview-http",instance:o.id,epoch:s,method:v,params:_,...y},"*")}async function h(v){let _=v.data;if(n||v.source!==e.contentWindow||v.origin!=="null"||_?.channel!=="ads-preview-http"||_.instance!==o?.id)return;if(_.method==="ready"){f("init",t),clearTimeout(a),i?.(),g.oninitialized?.();return}if(_.epoch!==s)return;if(_.method==="log"){g.onloggingmessage?.(_.params);return}if(!["read","prepare"].includes(_.method)||!Number.isSafeInteger(_.request))return;let y=s;try{let T;if(_.method==="prepare")T=await d({..._.params,op:"prepare",id:o.id});else{let O=_.params?.uri,k=r&&typeof O==="string"&&O.startsWith(r)?decodeURIComponent(O.slice(r.length)):O;if(!Rx(k)||r&&O===k)throw Error("Unexpected HTTP preview control resource.");T=await g.onreadresource({uri:O})}if(!n&&s===y)f("response",void 0,{request:_.request,result:T})}catch(T){if(!n&&s===y)f("response",void 0,{request:_.request,error:T.message,code:T.code})}}let g={async reconcileBuild(){if(n||!o)return;try{await d({op:"keepalive",id:o.id});let v=r?r+encodeURIComponent("ads://project/build"):"ads://project/build",_=await g.onreadresource({uri:v});g.receiveBuild(v,JSON.parse(_.contents.find((y)=>typeof y.text==="string").text))}catch(v){if(n)return;if(v.code==="ADS_PREVIEW_REOPEN")g.onloggingmessage?.({logger:"ads-preview",data:{state:"error",id:c,code:v.code}});else g.onerror?.(v)}},receiveBuild(v,_){let y=r?r+encodeURIComponent("ads://project/build"):"ads://project/build";if(v===y)f("build",_)},setHostContext(v){t=v,f("context",v)},async sendToolInput(){},async sendToolResult(v){if(v.structuredContent?.draftScope!==r)throw Error("Cannot change the scope of an HTTP preview instance.");c=(v.structuredContent?.previewResult?.structuredContent??v.structuredContent)?.scenario?.id,s++,f("select",v)},async connect(){if(o=await d({op:"open",draftScope:r}),n){await d({op:"close",id:o.id},!0);return}window.addEventListener("message",h);let v=new Promise((_,y)=>{i=_,a=setTimeout(()=>y(Error("HTTP preview initialization timed out.")),15000)});e.setAttribute("sandbox","allow-scripts allow-forms"),e.dataset.previewDelivery="http",e.src=o.url,await v},async teardownResource(){f("teardown")},async close(){if(n)return;if(f("teardown"),n=!0,clearTimeout(a),window.removeEventListener("message",h),l.abort(),o)await d({op:"close",id:o.id},!0).catch(()=>{});e.remove()}};return g}async function BS({slot:e,title:t,sandboxUrl:r,httpPreview:o=!1,resourceUri:s,result:n,readResource:i,callTool:a,context:c,onError:l,onState:d}){let f={slot:e,title:t,sandboxUrl:r,httpPreview:o,resourceUri:s,readResource:i,callTool:a,context:c,onError:l,onState:d},h=n,g,v,_,y=!1;function T(){if(y||_)return;d?.({state:"loading"}),_=Promise.resolve().then(async()=>{if(await v,await g?.close(),y)return;v=VS({...f,result:h,onReopen:T});try{g=await v}finally{v=void 0}}).catch((O)=>{if(!y)l(O)}).finally(()=>{_=void 0})}v=VS({...f,result:h,onReopen:T});try{g=await v}finally{v=void 0}return{async updateResult(O){if(h=O,await _,!y)await g.updateResult(h)},refreshContext(){if(!y&&!_)g.refreshContext()},receiveBuild(O,k){if(!y&&!_)g.receiveBuild?.(O,k)},reconcileBuild(){if(!y&&!_)return g.reconcileBuild?.()},async close(){y=!0,await _,await g?.close()}}}async function VS({slot:e,title:t,sandboxUrl:r,httpPreview:o,resourceUri:s,result:n,readResource:i,callTool:a,context:c,onError:l,onState:d,onReopen:f}){let h=!1,v=(o?void 0:await i({uri:s}))?.contents.find((P)=>P.mimeType==="text/html;profile=mcp-app"&&typeof P.text==="string");if(!o&&!v)throw Error("Comparison preview App is unavailable.");let _=document.createElement("iframe");if(_.title=t,_.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),!o)_.src=r;e.append(_);let y=o?au({frame:_,context:c(_),draftScope:n.structuredContent?.draftScope}):new zs(null,{name:"ADS showcase",version:"1.0.0"},{serverResources:{},serverTools:{},logging:{}},{hostContext:c(_)});y.onreadresource=i,y.oncalltool=a,y.onerror=(P)=>{if(!h)l(P)},y.onloggingmessage=(P)=>{if(h||P.logger!=="ads-preview")return;if(P.data?.code==="ADS_PREVIEW_REOPEN"){f();return}if(d?.(P.data),P.data?.state==="error")l(Error(P.data.message))};let T,O=new Promise((P,z)=>{T=setTimeout(()=>z(Error("Comparison App initialization timed out.")),15000),y.oninitialized=()=>{clearTimeout(T),P()}});if(!o)y.onsandboxready=()=>y.sendSandboxResourceReady({html:v.text,csp:v._meta?.ui?.csp,sandbox:"allow-scripts allow-forms"});let k=new ResizeObserver(()=>y.setHostContext(c(_)));try{await Promise.all([y.connect(o?void 0:new ws(_.contentWindow,_.contentWindow)),O]),k.observe(_),await y.sendToolInput({arguments:{}}),await y.sendToolResult(n)}catch(P){throw k.disconnect(),_.remove(),await y.close(),P}finally{clearTimeout(T)}return{updateResult:(P)=>y.sendToolResult(P),refreshContext:()=>y.setHostContext(c(_)),receiveBuild:(P,z)=>y.receiveBuild?.(P,z),reconcileBuild:()=>y.reconcileBuild?.(),async close(){h=!0,k.disconnect();try{await y.teardownResource({},{timeout:500})}catch{}await y.close(),_.remove()}}}function uu(e,t){return t===e||t.startsWith(e+"/")||t.startsWith(e+".")}function JS(e,t,r,o=new Map){let s=new Map(r.map(({id:c,title:l,revision:d,state:f,preview:h})=>[c,{id:c,title:l,revision:d,state:f,...h?{preview:h}:{}}])),n=new Map(e.map((c)=>[c.id,{...c,drafts:(c.drafts??[]).flatMap((l)=>s.has(l.id)?[s.get(l.id)]:[])}]));for(let c of t){let l=n.get(c.id);n.set(c.id,{...l,...c,kind:"tokens",drafts:l?.drafts??[]})}let i=(c,l)=>c==="assets/pictograms"&&l.kind==="pictograms"||c==="tokens"&&l.kind==="tokens"||(l.unit?l.unit===c:uu(c,l.id)),a=(c,l)=>{if(!c.drafts.some((d)=>d.id===l.id))c.drafts.push(s.get(l.id))};for(let c of r){let l=o.get(c.id);for(let d of l?.scenarios??[]){if(!c.units.some((h)=>i(h,d)))continue;let f=n.get(d.id);if(!f)f={...d,draftOnly:!0,drafts:[]},n.set(d.id,f);a(f,c)}}for(let c of r)for(let l of c.units){let d=l==="assets/pictograms"?"pictograms":l.split("/")[0];if(!["brand","pictograms","tokens","components","patterns","composition"].includes(d))continue;let f=[...n.values()].filter((h)=>i(l,h));if(f.length)for(let h of f)a(h,c);else n.set(l,{id:l,unit:l,title:l.split("/").at(-1),kind:d,draftOnly:!0,pendingDraftScenario:!0,drafts:[s.get(c.id)]})}return{scenarios:[...n.values()],categories:[...n.values()].filter((c)=>c.kind==="tokens")}}var xx=(e)=>e==="assets/pictograms"?"pictograms":e==="assets/glyphs"||e==="assets/logos"?"icons":e==="assets/brand"?"brand":e==="foundation"?"tokens":["brand","tokens","icons","components","patterns","composition"].includes(e.split("/")[0])?e.split("/")[0]:"other",cu={brand:"Brand",icons:"Icons",pictograms:"Pictograms",tokens:"Tokens",components:"Components",patterns:"Patterns",composition:"Compositions",other:"Other"};function WS(e,t){let r=[];for(let o of t){let s=e.filter((n)=>n.drafts?.some((i)=>i.id===o.id));for(let n of s)r.push({...n,id:`drafts/${encodeURIComponent(o.id)}/${encodeURIComponent(n.id)}`,previewId:n.id,title:`${o.title||o.id} · ${n.title}`,group:cu[n.kind]??"Other",drafts:[o]});for(let n of o.units??[]){if(s.some((a)=>n==="tokens"&&a.kind==="tokens"||a.unit===n||!a.unit&&uu(n,a.id)))continue;let i=xx(n);r.push({id:`drafts/${encodeURIComponent(o.id)}/${encodeURIComponent(n)}`,unit:n,kind:i,title:`${o.title||o.id} · ${n.split("/").at(-1)}`,group:cu[i],drafts:[o]})}if(!s.length&&!o.units?.length)r.push({id:`drafts/${encodeURIComponent(o.id)}`,kind:"other",title:o.title||o.id,group:"Other",drafts:[o]})}return r}var kx=["off","hover","always"],Px=["bounds","tracks","gaps","padding","margins","mini"],KS=Object.freeze({mode:"off",bounds:!0,tracks:!1,gaps:!1,padding:!0,margins:!0,mini:!1});function Sa(e){return{mode:kx.includes(e?.mode)?e.mode:e?.all===!0?"always":"off",...Object.fromEntries(Px.map((r)=>[r,e?.[r]===!0]))}}function GS(e){let{mode:t,...r}=Sa(e);return{all:t==="always",...r}}function YS(e){let{mode:t,...r}=Sa(e);return t!=="off"&&Object.values(r).some(Boolean)}function Ud(e,t,r){let o=e.drafts?.find((c)=>c.id===r)??e.drafts?.[0],s=o&&(t?.drafts?.find((c)=>c.id===o.id)??o.preview),n=o?s?.scenarios?.find((c)=>c.id===e.id)??s:t?.previews?.find((c)=>c.id===e.id)??e.build,i=n?.state==="error"?"error":n?.state==="checking"||n?.live?"checking":n?.building||["queued","building"].includes(n?.state)?"building":n?.current?"ready":n?.stale?"stale":"unreported",a={error:Va(n),checking:"Preview compiled; checking changes",building:"Preview build in progress",ready:"Preview build complete",stale:"Previous preview; current source not built",unreported:"Preview not built"};return{state:i,label:`${o?"Draft · ":""}${a[i]}${o&&i==="ready"?" · unaccepted":""}`}}var le,fv,zr,XS,hu,_v,du,gv,Wd,Fd,fu={},_u=[],Tx=/^m(i|n|o|s|text|space)$/,Kd=Array.isArray,Sv=_u.slice,So=Object.assign;function gu(e){e&&e.parentNode&&e.remove()}function pu(e,t,r,o,s){var n={type:e,props:t,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s||++fv,__i:-1,__u:0};return!s&&le.vnode&&le.vnode(n),n}function er(e){return e.children}function mu(e,t){this.props=e,this.context=t,this.__g=0}function Rr(e,t){if(t==null)return e.__?Rr(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])&&r.__e)return r.__e;return typeof e.type!="function"||e.props.__P?null:Rr(e)}function vv(e){if((e=e.__)&&e.__c&&!e.props.__P)return e.__e=null,e.__k.some(function(t){return t&&(e.__e=t.__e)}),vv(e)}function QS(e){(8&e.__g||!(e.__g|=8)||!zr.push(e)||hu++)&&XS==le.debounceRendering||((XS=le.debounceRendering)||queueMicrotask)(Ex)}function Ex(){var e,t,r,o,s,n,i,a,c;try{for(t=1;zr.length;)zr.length>t&&zr.sort(_v),e=zr.shift(),t=zr.length,8&e.__g&&(o=void 0,s=void 0,n=(s=(r=e).__v).__e,i=[],a=[],(c=r.__P)&&((o=So({constructor:void 0},s)).__v=s.__v+1,le.vnode&&le.vnode(o),Gd(c,o,s,r.__n,c.namespaceURI,32&s.__u?[n]:null,i,n||Rr(s),32&s.__u,a),o.__v=s.__v,o.__.__k[o.__i]=o,zv(i,o,a),s.__=s.__e=null,o.__e!=n&&vv(o)))}finally{zr.length=hu=0}}function bv(e,t,r,o,s,n,i,a,c,l,d){var f,h,g,v,_,y,T=o.__k||_u,O=t.length;for(c=$x(r,t,T,c,O),f=0;f<O;f++)(g=r.__k[f])!=null&&(h=~g.__i&&T[g.__i]||fu,g.__i=f,y=Gd(e,g,h,s,n,i,a,c,l,d),v=g.__e,(h.ref!=g.ref||8&h.__u)&&(h.ref&&Yd(h.ref,null,g,h),g.ref&&d.push(g.ref,g.__c||v,g)),_=_||v,4&g.__u?(c=yv(g,c,e,!h.__v),h.__e&&(h.__e=null)):typeof g.type=="function"&&y!==void 0?c=y:v&&(c=v.nextSibling),g.__u&=-7);return r.__e=_,c}function $x(e,t,r,o,s){var n,i,a,c,l,d,f,h,g,v,_=r.length,y=_,T=0,O=!1,k=e.__k=Array(s);for(n=0;n<s;n++)(i=t[n])!=null&&typeof i!="boolean"&&typeof i!="function"?(typeof i!="object"||i.constructor==String?i=k[n]=pu(null,i):Kd(i)?i=k[n]=pu(er,{children:i}):i.constructor===void 0&&i.__b?i=k[n]=pu(i.type,i.props,i.key,i.ref,i.__v):k[n]=i,c=n+T,i.__=e,i.__b=e.__b+1,a=null,~(l=i.__i=Cx(i,r,c,y))&&(y--,(a=r[l])&&(a.__u|=2)),a&&a.__v?(i.__u|=2,l==c-1?T--:l==c+1?T++:l!=c&&(l>c?T--:T++,O=!0)):(~l||(s>_?T--:s<_&&T++),typeof i.type!="function"&&(i.__u|=4))):k[n]=null;if(O){for(d=[],f=[],n=0;n<s;n++)if((i=k[n])&&2&i.__u){for(h=0,g=d.length;h<g;)d[v=h+g>>1]<i.__i?h=v+1:g=v;d[h]=i.__i,f[n]=h+1}for(T=d.length;n--;)f[n]&&(f[n]==T?T--:k[n].__u|=4)}if(y)for(n=0;n<_;n++)!(a=r[n])||2&a.__u||(a.__e==o&&(o=Rr(a)),Xd(a,a));return o}function yv(e,t,r,o){var s,n,i;if(typeof e.type=="function"){if(e.props.__P)return t;if(s=e.__k)for(n=0;n<s.length;n++)s[n]&&(s[n].__=e,t=yv(s[n],t,r,!1));return t}for(t&&!t.parentNode&&(t=Rr(e))&&!t.parentNode&&(t=null),i=t;i&&i.nodeType==8;)i=i.nextSibling;for(e.__e!=i&&(!o&&r.moveBefore&&e.__e.parentNode?r.moveBefore(e.__e,t):r.insertBefore(e.__e,t||null)),t=e.__e;(t=t&&t.nextSibling)&&t.nodeType==8;);return t}function Cx(e,t,r,o){var s,n,i,{key:a,type:c}=e,l=t[r],d=l&&!(2&l.__u);if(l===null&&a==null||d&&a==l.key&&c==l.type)return r;if(o>(d?1:0)){for(s=r-1,n=r+1;s>=0||n<t.length;)if((l=t[i=s>=0?s--:n++])&&!(2&l.__u)&&a==l.key&&c==l.type)return i}return-1}function ev(e,t,r){r==null&&(r=""),t[0]=="-"?e.setProperty(t,r):e[t]=r}function lu(e,t,r,o,s){var n,i;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)r&&t in r||ev(e.style,t,"");if(r)for(t in r)o&&r[t]==o[t]||ev(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")(e.__e||(e.__e={}))[t]=r,r&&o||(i=Fd[t]||(Fd[t]=Ix(t)),(e.__a||(e.__a={}))[t]=Wd,n=t!=(t=t.replace(gv,"$1")),(t=t.slice(2))[0]<"a"&&(t=t.toLowerCase()),r?e.addEventListener(t,i,n):e.removeEventListener(t,i,n));else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(a){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Ix(e){return function(t){if(this.__e){var r=this.__e[e];if(t[du]==null)t[du]=Wd++;else if(t[du]<this.__a[e])return;return r(le.event?le.event(t):t)}}}function Gd(e,t,r,o,s,n,i,a,c,l){var d,f,h,g,v,_,y,T,O,k,P,z,R,Z,ee,X,ne,xe,te,ie,re=t.type;if(t.constructor!==void 0)return null;if(128&r.__u&&(c=32&r.__u,d=r.__c.__z)){if(t.__u|=c,f=n=[],d.nodeType==8)for(h=1,g=d.nextSibling;g;g=g.nextSibling){if(g.nodeType==8){if(g.data.startsWith("$s"))h++;else if(g.data.startsWith("/$s")&&!--h)break}n.push(g)}else n.push(d);a=n[0]}(d=le.__b)&&d(t);e:if(typeof re=="function"){v=i.length;try{if(k=t.props,P=(d=re.prototype)&&d.render,z=(d=re.contextType)&&o[d.__c],R=d?z?z.props.value:d.__:o,r.__c?2&(_=t.__c=r.__c).__g&&(_.__g|=1):(P?t.__c=_=new re(k,R):(t.__c=_=new mu(k,R),_.constructor=re,_.render=Ox),z&&z.sub(_),_.state||(_.state={}),_.__n=o,_.__g|=8,_.__h=[],_.__k=[]),P&&(_.__s||(_.__s=_.state),re.getDerivedStateFromProps&&(_.__s==_.state&&(_.__s=So({},_.__s)),So(_.__s,re.getDerivedStateFromProps(k,_.__s)))),y=_.props,T=_.state,_.__v=t,r.__c){if(P&&!re.getDerivedStateFromProps&&k!==y&&_.componentWillReceiveProps&&_.componentWillReceiveProps(k,R),t.__v==r.__v&&!(8&_.__g)||!(4&_.__g)&&_.shouldComponentUpdate&&_.shouldComponentUpdate(k,_.__s,R)===!1){t.__v!=r.__v&&(_.props=k,_.state=_.__s,_.__g&=-9),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(de){de&&(de.__=t)}),_u.push.apply(_.__h,_.__k),_.__k=[],_.__h.length&&i.push(_),a=Rr(r);break e}_.componentWillUpdate&&_.componentWillUpdate(k,_.__s,R),P&&_.componentDidUpdate&&_.__h.push(function(){_.componentDidUpdate(y,T,O)})}else P&&!re.getDerivedStateFromProps&&_.componentWillMount&&_.componentWillMount(),P&&_.componentDidMount&&_.__h.push(_.componentDidMount);if(_.context=R,_.props=k,_.__P=e,_.__g&=-5,Z=le.__r,ee=0,P)_.state=_.__s,_.__g&=-9,Z&&Z(t),d=_.render(_.props,_.state,_.context),_u.push.apply(_.__h,_.__k),_.__k=[];else do _.__g&=-9,Z&&Z(t),d=_.render(_.props,_.state,_.context),_.state=_.__s;while(8&_.__g&&++ee<25);_.state=_.__s,_.getChildContext&&(o=So({},o,_.getChildContext())),P&&r.__c&&_.getSnapshotBeforeUpdate&&(O=_.getSnapshotBeforeUpdate(y,T)),X=d&&d.type===er&&d.key==null?d.props.children:d,k.__P&&(d=a,s=(e=k.__P).namespaceURI,c=n=null,r.props&&r.props.__P!=e&&(r.__k.some(function(de){de&&Xd(de,de)}),r.__k=null),a=r.__k?Rr(r,0):null),a=bv(e,Kd(X)?X:[X],t,r,o,s,n,i,a,c,l),k.__P&&(t.__e=null,a=d),t.__u&=-161,128&r.__u&&(_.__z=null),f&&f.some(gu),_.__h.length&&i.push(_),1&_.__g&&(_.__g&=-4)}catch(de){if(i.length=v,t.__v=null,c||n)if(de.then){if(ne=0,t.__u|=c?160:128,n){for(~(te=n.indexOf(a||void 0))||(te=n.length);(ie=n[te-1])&&ie.nodeType==8;)te--;for(;te<n.length;te++)if(ie=n[te]){if(n[te]=null,ie.nodeType==8){if(ie.data.startsWith("$s"))ne++||(xe=ie);else if(ne&&ie.data.startsWith("/$s")&&!--ne){a=ie;break}}else if(!ne)break}}if(!xe){for(;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;xe=a}t.__c.__z||(t.__c.__z=xe),t.__e=a}else n&&n.some(gu);else t.__e=r.__e;t.__k||(t.__k=r.__k||[]),de.then||wv(t),le.__e(de,t,r)}}else a=t.__e=qx(r.__e,t,r,o,s,n,i,c,l,e);return(d=le.diffed)&&d(t),128&t.__u?void 0:a}function wv(e){e&&(e.__c&&(e.__c.__g|=4),e.__k&&e.__k.some(wv))}function zv(e,t,r){for(var o=0;o<r.length;)Yd(r[o++],r[o++],r[o++]);le.__c&&le.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(n){n.call(s)})}catch(n){le.__e(n,s.__v)}})}function qx(e,t,r,o,s,n,i,a,c,l){var d,f,h,g,v,_,y,T,O,k=r.props||fu,{props:P,type:z}=t;if(z=="svg"?s="http://www.w3.org/2000/svg":z=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),n){for(d=0;d<n.length;d++)if((v=n[d])&&(z?v.localName==z:v.nodeType==3)){e=v,n[d]=null;break}}if(!e){if(T=l.ownerDocument||document,!z)return T.createTextNode(P);e=T.createElementNS(s,z,P.is&&P),a&&(le.__m&&le.__m(t,n),a=!1),n=null}if(z){if(l=z=="template"?e.content:e,n=z=="textarea"&&P.defaultValue!=null?null:n&&Sv.call(l.childNodes),!a&&n)for(k={},d=0;d<e.attributes.length;d++)k[(v=e.attributes[d]).name]=v.value;for(d in k)v=k[d],d=="dangerouslySetInnerHTML"?h=v:d=="children"||(d in P)||d=="value"&&("defaultValue"in P)||d=="checked"&&("defaultChecked"in P)||lu(e,d,null,v,s);for(d in O=1&r.__u,P)v=P[d],d=="children"?g=v:d=="dangerouslySetInnerHTML"?f=v:d=="value"?_=v:d=="checked"?y=v:a&&typeof v!="function"||!(k[d]!==v||O&&v!=null)||lu(e,d,v,k[d],s);f?(a||h&&(f.__html==h.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[]):(h&&(e.textContent=""),(z=="foreignObject"||s=="http://www.w3.org/1998/Math/MathML"&&Tx.test(z))&&(s="http://www.w3.org/1999/xhtml"),bv(l,Kd(g)?g:[g],t,r,o,s,n,i,n?n[0]:r.__k&&Rr(r,0),a,c),n&&n.some(gu)),a&&z!="textarea"||(d="value",z=="progress"&&_==null?e.removeAttribute(d):_==null||_===e[d]&&(z!="progress"||_)||lu(e,d,_,k[d],s),d="checked",y!=null&&y!=e[d]&&lu(e,d,y,k[d],s))}else k===P||a&&e.data==P||(e.data=P);return e}function Yd(e,t,r,o){try{typeof e=="function"?t?t.__x=e(t)||1:o&&(o=o.__c||o.__e)&&(t=o.__x)&&(o.__x=null,typeof t=="function"?t():e(null)):e.current=t}catch(s){le.__e(s,r)}}function Xd(e,t,r){var o,s;if(le.unmount&&le.unmount(e),!(o=e.ref)||o.current&&o.current!=e.__e||Yd(o,null,t,e),o=e.__c){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(n){le.__e(n,t)}o.__P=o.__n=null}if(o=e.__k)for(s=0;s<o.length;s++)o[s]&&Xd(o[s],t,typeof e.type!="function"||r&&!e.props.__P);(o=e.__e)&&(r||gu(o),o.__e&&(o.__e=null)),e.__e=e.__c=e.__=null}function Ox(e,t,r){return this.constructor(e,r)}function vo(e,t){var r,o,s,n;le.__&&le.__(e,t),t.nodeType==9&&(t=t.documentElement),o=(r=e&&32&e.__u)?null:t.__k,t.__k=pu(er,{children:[e]}),s=[],n=[],Gd(t,t.__k,o||fu,fu,t.namespaceURI,o?null:t.firstChild?Sv.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,n),zv(s,t.__k,n),t.__k.props.children=null}le={__e:function(e,t,r,o){for(var s,n,i;t=t.__;)if((s=t.__c)&&!(1&s.__g)){s.__g|=4;try{if((n=s.constructor)&&n.getDerivedStateFromError&&(s.setState(n.getDerivedStateFromError(e)),i=8&s.__g),s.componentDidCatch&&(s.componentDidCatch(e,o||{}),i=8&s.__g),i)return void(s.__g|=2)}catch(a){e=a,i=0}}throw hu=0,e}},fv=0,mu.prototype.setState=function(e,t){var r=this.__s;r&&r!=this.state||(r=this.__s=So({},this.state)),typeof e=="function"&&(e=e(So({},r),this.props)),e&&(So(r,e),this.__v&&(t&&this.__k.push(t),QS(this)))},mu.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),QS(this))},mu.prototype.render=er,zr=[],hu=0,_v=function(e,t){return e.__v.__b-t.__v.__b},du=Symbol(),gv=/(PointerCapture)$|Capture$/i,Wd=0,Fd={};var Nx=0;function S(e,t,r,o,s,n){t||(t={});var i,a,c=t;if("ref"in c&&typeof e!="function")for(a in c={},t)a=="ref"?i=t[a]:c[a]=t[a];var l={type:e,props:c,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Nx,__i:-1,__u:0};return le.vnode&&le.vnode(l),l}var jx=function(){let t=Array.prototype.slice.call(arguments).filter(Boolean),r={},o=[];t.forEach((n)=>{(n?n.split(" "):[]).forEach((a)=>{if(a.startsWith("atm_")){let[,c]=a.split("_");r[c]=a}else o.push(a)})});let s=[];for(let n in r)if(Object.prototype.hasOwnProperty.call(r,n))s.push(r[n]);return s.push(...o),s.join(" ")},me=jx,Mx="atm_adsuimk_stnw88 atm_adsuif3_idpfg4 atm_adsuivy_1osqo2v atm_adsuie2_1osqo2v",Ax="atm_adsui9s_1ulexfb atm_adsuimj_glywfm atm_adsuiy1254f_icygq7 atm_adsui1s0cpq2_1y4oovw atm_adsui11bgp38_ltqb7t atm_adsuiylp9lw_1627y59 atm_adsuig6en28_1ohcsmr";function Lx({box:e,preserveAspectRatio:t="xMidYMid meet",axes:r=!0,overlay:o=!1}){if(![e.x,e.y,e.width,e.height].every(Number.isFinite)||e.width<=0||e.height<=0)return null;let s=Math.max(1,Math.ceil(Math.max(e.width,e.height)/48)),n=(i)=>[...new Set([...Array.from({length:Math.floor(i/s)+1},(a,c)=>c*s),...r?[i/2]:[],i])].sort((a,c)=>a-c);return S("svg",{className:me("ds-artwork-grid",Ax,o&&Mx),viewBox:`${e.x} ${e.y} ${e.width} ${e.height}`,"data-step":s,preserveAspectRatio:t,"aria-hidden":"true",focusable:"false",children:[n(e.width).map((i)=>S("line",{className:r&&i*2===e.width?"mid":void 0,x1:e.x+i,x2:e.x+i,y1:e.y,y2:e.y+e.height},`x${i}`)),n(e.height).map((i)=>S("line",{className:r&&i*2===e.height?"mid":void 0,x1:e.x,x2:e.x+e.width,y1:e.y+i,y2:e.y+i},`y${i}`))]})}var Ux="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='%23b4b4b4'%3e%3ctitle%3eADS%20—%20Eye%20in%20the%20grid,%20greyscale%20small%20size%3c/title%3e%3cpath%20d='M1%201h4v4H1zM6%201h4v4H6zM11%201h4v4H11zM1%206h4v4H1zM11%206h4v4H11zM1%2011h4v4H1zM6%2011h4v4H6zM11%2011h4v4H11z'/%3e%3cpath%20d='M6%206h4v4H6z'%20fill='%23444444'/%3e%3cpath%20d='M7%207h2v2H7z'%20fill='%23fafafa'/%3e%3c/svg%3e",Dx="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='%235c5c5c'%3e%3ctitle%3eADS%20—%20Eye%20in%20the%20grid,%20greyscale%20small%20size%3c/title%3e%3cpath%20d='M1%201h4v4H1zM6%201h4v4H6zM11%201h4v4H11zM1%206h4v4H1zM11%206h4v4H11zM1%2011h4v4H1zM6%2011h4v4H6zM11%2011h4v4H11z'/%3e%3cpath%20d='M6%206h4v4H6z'%20fill='%23dddddd'/%3e%3cpath%20d='M7%207h2v2H7z'%20fill='%231b1b1b'/%3e%3c/svg%3e",Zx="atm_adsui9s_116y0ak atm_adsuibb_idpfg4 atm_adsuivy_1aou828 atm_adsuie2_1aou828 atm_adsui1w_kb7nvz",tv="atm_adsuivy_1osqo2v atm_adsuie2_1osqo2v",Hx="atm_adsui9s_o8hunj",Fx="atm_adsui9s_1a9ryah";function Vx({label:e}){return S("span",{className:me("ds-brand-mark",Zx),role:e?"img":void 0,"aria-label":e,"aria-hidden":e?void 0:!0,children:[S("img",{className:me(tv,Hx),loading:"eager",src:Ux,width:16,height:16,alt:""}),S("img",{className:me(tv,Fx),loading:"eager",src:Dx,width:16,height:16,alt:""})]})}var Bx="atm_adsui9s_116y0ak atm_adsuih_1h6ojuz atm_adsuifc_1h6ojuz atm_adsuicx_tx1for atm_adsuij6_1wdkmbo atm_adsuilh_dcxj7s atm_adsuilb_tx1for atm_adsui3f_e8f45q atm_adsui5j_idpfg4 atm_adsui26_1j28jx2 atm_adsui7l_1wskm3t atm_adsuibx_rhlbdi atm_adsuics_el7ql6 atm_adsuic8_1m800s6 atm_adsuig3_3szr2b atm_adsuird_glywfm atm_adsui9j_tlke0l atm_adsuibb_idpfg4 atm_adsuiv6g6dd_pt45zb atm_adsuit4h5aw_1wskm3t atm_adsui15xrhy7_pt45zb atm_adsui17yrrpa_16x0t2t atm_adsui6zeuib_15wi45 atm_adsui1jhk75u_1mfz0iu atm_adsui174zlj6_73adwj atm_adsui1tcisp7_glywfm",Jx="atm_adsui4b_1627y59 atm_adsui26_1u3842e atm_adsui7l_1r1dq30 atm_adsuics_1d1fc98 atm_adsuiv6g6dd_1wskm3t atm_adsui168r6ku_8o97w",Wx="atm_adsuivy_alpu0l atm_adsuie2_alpu0l atm_adsuij6_alpu0l atm_adsuilh_idpfg4 atm_adsuilb_idpfg4";function $e({id:e,label:t,iconOnly:r,children:o,disabled:s,hidden:n,pressed:i,current:a,expanded:c,controls:l,popoverTarget:d,section:f,phase:h,variant:g="quiet",onClick:v}){return S("button",{id:e,type:"button",className:me("ds-toolbar-button",Bx,g==="outlined"&&Jx,r&&Wx),"aria-label":r?t:void 0,title:r?t:void 0,disabled:s,hidden:n,"aria-pressed":i,"aria-current":a?"page":void 0,"aria-expanded":c,"aria-controls":l,popovertarget:d,"data-section":f,"data-phase":h,onClick:v,children:[o,!r&&t]})}var Kx="atm_adsui9s_1txwivl atm_adsuiar_1bp4okc atm_adsuih_1h6ojuz atm_adsuifc_1h6ojuz atm_adsuicx_tx1for atm_adsuijb_idpfg4 atm_adsuil8_1lr73f0 atm_adsui3f_e8f45q atm_adsui5j_idpfg4 atm_adsui26_1j28jx2 atm_adsui7l_1mqbmot atm_adsuibx_rhlbdi atm_adsuic8_1m800s6 atm_adsuig3_3szr2b atm_adsuir3_1h6ojuz atm_adsui9j_tlke0l atm_adsuiv6g6dd_pt45zb atm_adsui1qpv5ur_1r1dq30 atm_adsui1p5227w_pt45zb atm_adsui17yrrpa_16x0t2t atm_adsui6zeuib_15wi45 atm_adsui1jhk75u_1mfz0iu atm_adsui174zlj6_73adwj";function Gx({id:e,label:t,pressed:r=!1,disabled:o,children:s,onClick:n}){return S("button",{id:e,type:"button",className:me("ds-toggle-tile",Kx),"aria-pressed":r,disabled:o,onClick:n,children:[s,S("span",{children:t})]})}var Rv={brand:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 1.5 9.9 5.6l4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5L8 1.5Z"/></svg>',"chevron-left":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4l-4 4 4 4"/></svg>',"chevron-right":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 4 4 4-4 4"/></svg>',"chevron-up":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 10 4-4 4 4"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 4 8 8M12 4l-8 8"/></svg>',components:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7L8 1Zm-6 3.5 6 3.5 6-3.5M8 8v7"/></svg>',composition:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>',drafts:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 1h7l3 3v11H3zM10 1v4h3M5 8h6M5 11h4"/></svg>',"guide-bounds":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3.5" width="12" height="9"/></svg>',"guide-gaps":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="3" width="3.5" height="10"/><rect x="6.25" y="3" width="3.5" height="10"/><rect x="11" y="3" width="3.5" height="10"/></svg>',"guide-margins":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11" stroke-dasharray="1.5 1.5"/><rect x="4.5" y="5.5" width="7" height="5"/></svg>',"guide-mini":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2v12M6 2v12M10 2v12M14 2v12M2 2h12M2 6h12M2 10h12M2 14h12" stroke-width="1"/></svg>',"guide-padding":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11"/><rect x="4.5" y="5.5" width="7" height="5" stroke-dasharray="1.5 1.5"/></svg>',"guide-tracks":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 2v12M6 2v12M10 2v12M13.5 2v12"/></svg>',icons:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="5" r="2.5"/><rect x="9.5" y="2.5" width="4" height="5" rx="1"/><path d="m2.5 13.5 2.5-4 2.5 4ZM9.5 11.5h4M11.5 9.5v4"/></svg>',layout:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v12M6.5 2v12M9.5 2v12M13 2v12"/></svg>',moon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg>',patterns:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>',phone:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg>',pictograms:'<svg fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><rect x="1.5" y="2.5" width="13" height="11" rx="1"/><circle cx="5" cy="6" r="1"/><path d="m2 12 4-3 3 2 3-4 2 2"/></svg>',source:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m5 4-4 4 4 4m6-8 4 4-4 4M9 2 7 14"/></svg>',split:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1" y="2" width="14" height="12" rx="1"/><path d="M8 2v12"/></svg>',sun:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1M8 14v1M1 8h1M14 8h1M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg>',tokens:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 6 3-6 3-6-3 6-3Zm-6 6 6 3 6-3M2 11l6 3 6-3"/></svg>',warning:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 7 12H1L8 2Z"/><path d="M8 6v3M8 11v.5"/></svg>'},rv={};Object.keys(Rv).sort();var Yx="atm_adsui9s_116y0ak atm_adsuiam_glywfm atm_adsuih_1h6ojuz atm_adsuifc_1h6ojuz atm_adsuivh_nkobfv atm_adsui7l_1kw7nm4 atm_adsuix4ub3y_1ulexfb atm_adsuivskwj7_1osqo2v atm_adsui158k9f9_1osqo2v",Xx={sm:"atm_adsuivy_1aou828 atm_adsuie2_1aou828",md:"atm_adsuivy_fjcok3 atm_adsuie2_fjcok3",lg:"atm_adsuivy_14k5dlv atm_adsuie2_14k5dlv",xl:"atm_adsuivy_1j39cg3 atm_adsuie2_1j39cg3"};function Oe({name:e,size:t="sm",label:r}){let o=e in rv?rv[e]:e;return S("span",{className:me("ds-icon",Yx,Xx[t]),...r?{role:"img","aria-label":r}:{"aria-hidden":!0},dangerouslySetInnerHTML:{__html:Rv[o]}})}var Qx="atm_adsui9s_1txwivl atm_adsuih_1h6ojuz atm_adsuicx_tx1for atm_adsuij6_1wdkmbo atm_adsuil8_kr1xch atm_adsui3f_e8f45q atm_adsui5j_idpfg4 atm_adsui26_1j28jx2 atm_adsui7l_1wskm3t atm_adsuibx_rhlbdi atm_adsuics_el7ql6 atm_adsuic8_1m800s6 atm_adsuig3_sqnntc atm_adsuird_glywfm atm_adsuikz_fg65tv atm_adsui1e7xapd_1wugsn5 atm_adsui1cc01an_1m800s6 atm_adsuiz89mj4_el7ql6 atm_adsui19izows_1mqbmot atm_adsui1a1iq7z_1q9ccgz atm_adsui18vqbco_pt45zb atm_adsuisrk7fl_pt45zb atm_adsui1dpiaj6_1wskm3t atm_adsuizrwyxp_1d1fc98 atm_adsui17yrrpa_16x0t2t atm_adsui6zeuib_15wi45";function ek({label:e,href:t,current:r,previewState:o,previewLabel:s,draftLabel:n,draftDescription:i,onClick:a}){return S("a",{className:me("ds-navigation-item",Qx),href:t,"aria-current":r?"page":void 0,"aria-description":s,onClick:a,children:[e,n&&S("span",{className:"draft-badge",title:i,children:[" ",n]}),o&&S(kv,{state:o})]})}var tk="atm_adsuimk_1n9t6rb atm_adsuif3_aqos4q atm_adsui73_usvi9m atm_adsuigi_idpfg4 atm_adsuiiy_102o88r atm_adsuiks_1wugsn5 atm_adsuil8_1aqtv8w atm_adsui3f_m9afv7 atm_adsui5j_idpfg4 atm_adsui26_1bplolx atm_adsui7l_1wskm3t atm_adsui70_1fjsgd1 atm_adsuibx_rhlbdi atm_adsuic8_1m800s6 atm_adsuig3_sqnntc atm_adsuiarf92d_1txwivl atm_adsui1qpaa0x_1bp4okc",rk="atm_adsuil8_idpfg4",ok={narrow:"atm_adsuivy_hvzi4f",wide:"atm_adsuivy_1risgsc atm_adsuij3_1y8qh3w"},sk="atm_adsuimk_pfqszd atm_adsuiiy_glywfm atm_adsuij3_1osqo2v";function xv({id:e,label:t,role:r,width:o="narrow",inline:s=!1,flush:n=!1,children:i}){return S("div",{id:e,className:me("ds-popover",tk,ok[o],n&&rk,s&&sk),popover:s?void 0:"auto",role:r,"aria-label":t,children:i})}var nk="atm_adsui9s_116y0ak atm_adsuiam_glywfm atm_adsuih_1h6ojuz atm_adsuifc_1h6ojuz atm_adsuivy_1aou828 atm_adsuie2_1aou828 atm_adsui7l_1mqbmot atm_adsuivskwj7_1osqo2v atm_adsui158k9f9_1osqo2v atm_adsuio2zchm_glywfm atm_adsuibupyu4_1r31cwp atm_adsui91z0ma_c484nn atm_adsuieyuh4p_glywfm atm_adsuis7vg1k_1ulexfb atm_adsui1a7gqnz_glywfm atm_adsui1ypv4g8_glywfm atm_adsuisc4h6w_116y0ak";function kv({state:e="unreported",variant:t="navigation",label:r}){return S("span",{className:me("ds-preview-indicator",t==="navigation"&&"entry-preview",nk),"data-state":e,"data-variant":t,role:r?"img":void 0,"aria-label":r,"aria-hidden":r?void 0:!0,title:r,children:[S("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[S("circle",{"data-mark":"unreported",cx:"8",cy:"8",r:"3"}),S("circle",{"data-mark":"building",cx:"8",cy:"8",r:"5","stroke-dasharray":"22 10"}),S("circle",{"data-mark":"checking",cx:"8",cy:"8",r:"5","stroke-dasharray":"3 3"}),S("circle",{"data-mark":"ready",cx:"8",cy:"8",r:"5"}),S("circle",{"data-mark":"stale",cx:"8",cy:"8",r:"5","stroke-dasharray":"2 3"}),S("circle",{"data-mark":"error",cx:"8",cy:"8",r:"5",fill:"currentColor",stroke:"none"})]}),t==="toolbar"&&S("span",{className:"preview-warning",children:S(Oe,{name:"warning"})})]})}var ik="atm_adsuig1e7fr_1hh10yn atm_adsuina064p_1c8rstr atm_adsuibyi8sh_1d1fc98 atm_adsuit8tn60_1r1dq30 atm_adsui18xy9f7_1txwivl atm_adsui1kvotse_1xi6ry0 atm_adsui13bcc9y_q4j4l1 atm_adsui9ht5kt_1iwn3l9 atm_adsuiw49f19_1m800s6 atm_adsui1mb7f0m_1mqbmot atm_adsui1o7g9kp_sqnntc atm_adsuicsppdr_11p5wf0 atm_adsui156xhju_13mtsfm atm_adsui2uzat_iqvn5y atm_adsuizf04m1_1mfz0iu atm_adsuil2ckyf_1txwivl atm_adsuim3rxq9_1h6ojuz atm_adsuilfeyld_iqvn5y atm_adsuidl3q2m_ynj908 atm_adsui12er3fd_tx1for atm_adsui8e79fz_m9afv7 atm_adsui1qnfl3r_1m800s6 atm_adsui1sj4mjq_1mqbmot atm_adsui6ql2ro_iqvn5y",Dd=[{name:"off",label:"Off",hint:"Guides are hidden. Your layer choice is kept."},{name:"hover",label:"Hover",hint:"Point at or focus an element to see the selected layers."},{name:"always",label:"Always",hint:"Every element shows the selected layers."}],Pv=[{name:"bounds",label:"Bounds"},{name:"tracks",label:"Columns and rows"},{name:"gaps",label:"Gaps and gutters"},{name:"padding",label:"Padding"},{name:"margins",label:"Margins"},{name:"mini",label:"Mini-unit grid"}],Tv=[{name:"spacing",label:"Spacing",layers:["padding","margins","gaps"]},{name:"grid",label:"Grid",layers:["tracks","mini"]},{name:"all",label:"All",layers:["bounds","tracks","gaps","padding","margins","mini"]}];function Ev(e){var t;let r=((t=Tv.find((o)=>o.name===e))==null?void 0:t.layers)??[];return Object.fromEntries(Pv.map((o)=>[o.name,r.includes(o.name)]))}function ak({id:e="grid-options",inline:t=!1,mode:r="off",layers:o={},onModeChange:s,onLayerChange:n,onPreset:i}){var a;let c=(a=Dd.find((l)=>l.name===r))==null?void 0:a.hint;return S(xv,{id:e,label:"Layout guides",role:"dialog",inline:t,children:S("div",{id:`${e}-content`,className:me("ux-guide-options",ik),"data-mode":r,children:[S("h2",{children:"Layout guides"}),S("div",{className:"ux-guide-modes",role:"group","aria-label":"Show guides",children:Dd.map((l)=>S($e,{id:`${e}-mode-${l.name}`,label:l.label,pressed:r===l.name,onClick:()=>s==null?void 0:s(l.name)},l.name))}),S("p",{id:`${e}-hint`,className:"ux-guide-hint","aria-live":"polite",...Object.fromEntries(Dd.map((l)=>[`data-${l.name}`,l.hint])),children:c}),S("div",{className:"ux-guide-layers",role:"group","aria-label":"Layers",children:Pv.map((l)=>S(Gx,{id:`${e}-layer-${l.name}`,label:l.label,pressed:o[l.name]===!0,onClick:()=>n==null?void 0:n(l.name,o[l.name]!==!0),children:S(Oe,{name:`guide-${l.name}`,size:"lg"})},l.name))}),S("div",{className:"ux-guide-presets",role:"group","aria-label":"Presets",children:[S("span",{children:"Presets"}),Tv.map((l)=>S($e,{id:`${e}-preset-${l.name}`,label:l.label,onClick:()=>i==null?void 0:i(l.name)},l.name))]})]})})}var ba,Pe,Zd,ov,Vd=Object.is,Su=0,$v=[],Bd=[],we=le,{__b:sv,__r:nv,diffed:iv,__c:av,unmount:cv,__:uv}=we;function Qd(e,t){we.__h&&we.__h(Pe,e,Su||t),Su=0;var r=Pe.__H||(Pe.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function ck(e){return Su=1,uk(Iv,e)}function uk(e,t,r){var o=Qd(ba++,2);if(o.t=e,!o.__c&&(o.__=[Iv(void 0,t),function(n){var i=o.__N?o.__N[0]:o.__[0],a=o.t(i,n);Vd(i,a)||(o.__N=[a,o.__[1]],o.__c.setState({}))}],o.__c=Pe,!Pe.__f)){Pe.__f=!0;var s=Pe.shouldComponentUpdate;Pe.shouldComponentUpdate=function(n,i,a){var c=this.__H;if(!c)return!0;var l=!1,d=this.props!=n;if(c.__.some(function(h){h.__N&&(l=!0,Vd(h.__[0],h.__N[0])||(d=!0))}),s){var f=s.call(this,n,i,a);return l?f||d:f}return!l||d}}return o.__}function lk(e,t){var r=Qd(ba++,4);!we.__s&&Cv(r.__H,t)&&(r.__P=!1,r.__=e,r.u=t,Pe.__h.push(r))}function dk(e){return Su=5,pk(function(){return{current:e}},[])}function pk(e,t){var r=Qd(ba++,7);return Cv(r.__H,t)&&(r.__=e(),r.__H=t),r.__}function mk(){var e;do{for(;e=Bd.shift();)try{va(e)}catch(r){we.__e(r,{__:(e=e.__P)&&e.__v})}for(;e=$v.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(va),t.__h.some(Jd),t.__h=[]}catch(r){t.__h=[],we.__e(r,e.__v)}}}while(Bd.length)}we.__b=function(e){Pe=null,sv&&sv(e)},we.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),uv&&uv(e,t)},we.__r=function(e){nv&&nv(e),ba=0;var t=(Pe=e.__c).__H;t&&(Zd==Pe?Pe.__h=[]:(t.__h.some(va),t.__h.some(Jd),ba=0),t.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})),Zd=Pe},we.diffed=function(e){iv&&iv(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&dv($v.push(t)),t.__H.__.some(function(r){r.u&&(r.__H=r.u)})),Zd=Pe=null},we.__c=function(e,t){t.some(function(r){try{r.__h.some(va),r.__h=r.__h.filter(function(o){return!o.__||Jd(o)})}catch(o){t.some(function(s){s.__h&&(s.__h=[])}),t=[],we.__e(o,r.__v)}}),av&&av(e,t)},we.unmount=function(e){cv&&cv(e);var t,r,o=e.__c;o&&o.__H&&(o.__H.__.some(function(s){try{if(s.__P&&s.__c){if(r===void 0){for(r=e.__;r&&(!r.__c||!r.__c.__P);)r=r.__;r=r&&r.__c}s.__P=r,dv(Bd.push(s))}else va(s)}catch(n){t=n}}),o.__H=void 0,t&&we.__e(t,o.__v))};var lv=typeof requestAnimationFrame=="function";function hk(e){var t,r=function(){clearTimeout(o),lv&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(r,35);lv&&(t=requestAnimationFrame(r))}function dv(e){e!=1&&ov==we.requestAnimationFrame||((ov=we.requestAnimationFrame)||hk)(mk)}function va(e){var t=Pe,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Pe=t}function Jd(e){var t=Pe;e.__c=e.__(),Pe=t}function Cv(e,t){return!e||e.length!=t.length||t.some(function(r,o){return!Vd(r,e[o])})}function Iv(e,t){return typeof t=="function"?t(e):t}var pv="atm_adsuie2_1osqo2v atm_adsuiks_1wugsn5 atm_adsuil8_1ru0ig4 atm_adsuibx_rhlbdi atm_adsuic8_1c8rstr atm_adsuig3_sqnntc atm_adsui7l_an4usv atm_adsui1s9zg6e_idpfg4 atm_adsui1y1itgh_1heflvk atm_adsui124toe7_1d1fc98 atm_adsui1ajpmqv_3szr2b atm_adsuig1e7fr_81zv9y atm_adsuina064p_1ye8rbs atm_adsuibyi8sh_1d1fc98 atm_adsui1t8i83k_1ulexfb atm_adsui1t4u5ad_iqvn5y atm_adsui1ucxlaq_1m800s6 atm_adsuicqysi0_el7ql6 atm_adsuiugp1nr_1mqbmot atm_adsuimzw80z_1txwivl atm_adsuims933x_v2br90 atm_adsuikqzblj_1yb4nlp atm_adsui157qtsd_1doep66 atm_adsuipps9nr_1g80g66 atm_adsui1696orj_6e9m65 atm_adsui1kwsnex_1mqbmot atm_adsui1749l82_1m800s6 atm_adsui1pm6vxp_fg65tv atm_adsui1985805_rhlbdi atm_adsuifgvpx0_1m800s6 atm_adsui1f7jbwv_1wdkmbo atm_adsui4v11ke_13r6pey atm_adsui1ph4l26_kr1xch atm_adsui1td1et_58tz3v atm_adsui16q9e9r_idpfg4 atm_adsui1e1cn77_1u3842e atm_adsui1ok557x_an4usv atm_adsui8oqreq_16x0t2t atm_adsuidogt2j_15wi45 atm_adsui1ha57is_1txwivl atm_adsui154gtli_1g80g66 atm_adsui1m0o9p4_1doep66 atm_adsuitul8sy_116y0ak atm_adsuid9rgyl_1h6ojuz atm_adsui1ew4plt_1h6ojuz atm_adsui44kz9m_tx1for atm_adsui1l2cw9c_116y0ak atm_adsui1p2daoe_glywfm atm_adsui1lrgcs0_1kw7nm4 atm_adsui21ajbm_1ulexfb atm_adsuiv4i7ad_glywfm atm_adsui18exmc6_11p5wf0 atm_adsuinrahr7_14kz4g7 atm_adsui1sapuqh_1ak2vn7 atm_adsuia9snxg_v2br90 atm_adsuic1efku_idpfg4 atm_adsui1s5glk1_1h6ojuz atm_adsui4zbjz7_1txwivl atm_adsui1nrl83w_1h6ojuz atm_adsuidcq6po_1h6ojuz atm_adsuiodevil_1g80g66 atm_adsui15luuzb_tx1for atm_adsuiy20kxr_idpfg4 atm_adsui1pfuy6w_l6f2xw atm_adsuifo0n28_1m800s6 atm_adsui1yka5lj_sqnntc atm_adsuiazx38y_19dj2kj atm_adsuildippw_fg65tv atm_adsui2kz6ah_177qeyn atm_adsui5go7c5_1m800s6 atm_adsui12ii74i_1q4684i atm_adsui1t756hg_1mqbmot atm_adsui1n1nucf_h2mmj6 atm_adsuis5orb_qpi3z3 atm_adsui1maakrc_qpi3z3 atm_adsui3jvufv_6g0xcp atm_adsui1a6bvuq_6lcubb atm_adsui7le0qg_stnw88 atm_adsuikc8k8m_idpfg4 atm_adsui10ojrnp_1le1gz4 atm_adsuimhax7p_moqrwa atm_adsui1eq72d_1txwivl atm_adsuitglio1_1g80g66 atm_adsui1uq2nym_1h6ojuz atm_adsui1g6vde0_esu3gu atm_adsui1lgf0nm_1aqtv8w atm_adsui1e184xh_1txwivl atm_adsuila89rv_1bp4okc atm_adsui3c75k5_1h6ojuz atm_adsuihmh6q_tx1for atm_adsui1gfpqoj_1m800s6 atm_adsui1lezx94_1mqbmot atm_adsui1fnmsk6_b6kj4x atm_adsuip4zrj7_1le1gz4 atm_adsui1lf327s_1m800s6 atm_adsui10hei5o_glywfm atm_adsui11ndfci_12j2sah atm_adsuiewnzgi_1r3tyjr atm_adsuincp59s_19dj2kj atm_adsui5aykc5_ynj908 atm_adsui1z5d1z_1vz6rot atm_adsui1w4ry55_mrub5a atm_adsuinfdfyh_fg65tv atm_adsui1d1ue3r_1mqbmot atm_adsui1m3cqh4_1txwivl atm_adsuijhqbse_1g80g66 atm_adsui1y90xlu_1doep66 atm_adsui1konks8_idpfg4 atm_adsuirgczd9_1txwivl atm_adsui1tv24b1_1h6ojuz atm_adsui1adwpcp_ynj908 atm_adsui61s2ls_1m800s6 atm_adsui7olkud_116y0ak atm_adsuiu2kdnu_tx1for atm_adsuiv7vy6e_qm87f6 atm_adsuin0y7c7_1ivmhas atm_adsui1mpi4sj_1ulexfb atm_adsuit6wwae_1f51e7f",mv="http://www.w3.org/2000/svg";function Hd({item:e,size:t,label:r}){let o=dk(null);return lk(()=>{var s;let n=new DOMParser().parseFromString(e.svg,"image/svg+xml").documentElement;if(n.namespaceURI!==mv||n.localName!=="svg")return;for(let a of n.querySelectorAll("*"))if(["script","foreignObject","iframe","image","a","animate","set","animateTransform","animateMotion"].includes(a.localName)||a.namespaceURI!==mv)a.remove();for(let a of[n,...n.querySelectorAll("*")])for(let c of Array.from(a.attributes))if(/^on/i.test(c.name)||/href$/i.test(c.name)&&!c.value.trim().startsWith("#"))a.removeAttribute(c.name);let i=document.importNode(n,!0);return i.removeAttribute("class"),i.setAttribute("width",String(t)),i.setAttribute("height",String(t)),i.setAttribute("aria-hidden","true"),i.setAttribute("focusable","false"),(s=o.current)==null||s.replaceChildren(i),()=>{var a;return(a=o.current)==null?void 0:a.replaceChildren()}},[e.svg,t]),S("span",{className:"icons-glyph",ref:o,role:r?"img":void 0,"aria-label":r,title:r,"aria-hidden":r?void 0:"true"})}function hv({finding:e}){return S("p",{className:"icons-finding",title:e.file,children:[S("strong",{children:e.rule})," ",e.message]})}function fk({data:e}){var t;let[r,o]=ck("");if(!e.configured)return S("section",{className:me("icons-view",pv),"aria-label":"Icons",children:[S("h1",{children:"Icons"}),S("p",{className:"icons-summary",children:"The project configures no glyph set."})]});let s=e.glyphs.filter((n)=>[n.name,...n.aliases].some((i)=>i.toLowerCase().includes(r.trim().toLowerCase())));return S("section",{className:me("icons-view",pv),"aria-label":"Icons",children:[S("div",{className:"icons-head",children:[S("div",{children:[S("h1",{children:"Icons"}),S("p",{className:"icons-summary",children:[e.source," · ",e.glyphs.length," glyphs",e.grid?` · ${e.grid.width} × ${e.grid.height} grid`:e.mixed?" · Mixed grids":""," · ",e.aliasCount," aliases"]})]}),S("input",{type:"search",value:r,onInput:(n)=>o(n.currentTarget.value),placeholder:"Search name or alias","aria-label":"Search glyphs by name or alias"})]}),e.findings.map((n,i)=>S(hv,{finding:n},i)),S("h2",{children:["The set",S("small",{children:["Every glyph at ",((t=e.textSize)==null?void 0:t.px)??16,"px, the size used beside text"]})]}),S("div",{className:"icons-set",role:"list","aria-label":"The set",children:s.map((n)=>{var i;return S("span",{className:"icons-set-item","data-glyph":n.name,role:"listitem",children:S(Hd,{item:n,size:((i=e.textSize)==null?void 0:i.px)??16,label:n.name})},n.name)})}),S("h2",{children:["Glyphs",S("small",{children:"Enlarged construction grid and actual icon sizes"})]}),!s.length&&S("p",{className:"icons-empty",children:e.glyphs.length?`No glyph matches “${r.trim()}”.`:"No glyphs in this set."}),S("div",{className:"icons-cards",children:s.map((n)=>S("article",{className:"icons-card","data-glyph":n.name,"data-findings":n.findings.length||void 0,"aria-label":n.name,children:[S("div",{className:"icons-card-head",children:[S("h3",{children:n.name}),n.findings.length>0&&S("span",{className:"icons-badge",children:[n.findings.length," ",n.findings.every((i)=>i.severity==="error")?"error":"issue",n.findings.length===1?"":"s"]})]}),S("p",{className:"icons-alias",children:n.aliases.length?`alias: ${n.aliases.join(", ")}`:""}),S("div",{className:"icons-mag",children:[n.grid&&S(Lx,{box:n.grid,overlay:!0}),S(Hd,{item:n,size:96})]}),S("div",{className:"icons-sizes",children:e.sizes.map((i)=>S("span",{className:"icons-size",children:[S(Hd,{item:n,size:i.px}),S("small",{title:i.token,children:i.px})]},i.token))}),n.findings.map((i,a)=>S(hv,{finding:i},a))]},n.name))}),e.logos&&S(er,{children:[S("h2",{children:["Other products’ logos",S("small",{children:e.logos.source})]}),S("div",{className:"icons-logos",children:e.logos.files.map((n)=>S("figure",{className:"icons-logo","data-logo":n.name,children:n.tooLarge?S("figcaption",{children:[n.name," (over 1 MB; not shown)"]}):S(er,{children:[S("span",{className:"icons-logo-tile",children:S("img",{src:n.src,alt:n.name,title:n.file,width:24,height:24,loading:"lazy",decoding:"async"})}),S("span",{className:"icons-logo-tile icons-logo-tile-black",children:S("img",{src:n.src,alt:"",width:24,height:24,loading:"lazy",decoding:"async"})}),S("figcaption",{children:n.name})]})},n.name))})]})]})}var _k="atm_adsui9s_1txwivl atm_adsuiar_1bp4okc atm_adsuicx_idpfg4 atm_adsuijb_idpfg4",gk="atm_adsuijb_idpfg4 atm_adsui1pqo7b0_1txwivl atm_adsuiywbgd0_1h6ojuz atm_adsui1a6nw8z_tx1for atm_adsui1vu1bue_kr1xch atm_adsuiyzr3rh_1wdkmbo atm_adsuila54r4_glywfm atm_adsui10x1lus_tlke0l atm_adsui107eb71_1m800s6 atm_adsuir3v91m_1d1fc98 atm_adsui3vd9bk_1wskm3t atm_adsui1pvchle_glywfm atm_adsui93k5wf_1aou828 atm_adsui1jhtvjp_1aou828 atm_adsuixwcn1n_glywfm atm_adsuiaxt0xi_1r31cwp atm_adsuiu9ecgn_c484nn atm_adsui1rd1yp5_glywfm atm_adsuir4atoz_14w8a5s atm_adsuikwnb5l_16x0t2t atm_adsui1b3ry6x_xrd58z atm_adsui9abqyk_1txwivl atm_adsui152ylkv_1bp4okc atm_adsui4nxdgq_idpfg4 atm_adsui1jf9b6q_1aqtv8w";function Sk({id:e,label:t,children:r}){return S("nav",{id:e,className:me("ux-navigation-menu",_k),"aria-label":t,children:r})}function vk({label:e,open:t=!0,children:r}){return S("details",{className:me("entry-group",gk),open:t,children:[S("summary",{children:[S(Oe,{name:"chevron-right"}),S("span",{children:e})]}),S("div",{role:"group","aria-label":e,"data-slot":"entries",children:r})]})}var bk="atm_adsui9s_116y0ak atm_adsuih_1h6ojuz",yk="atm_adsui9s_1txwivl atm_adsuiar_1bp4okc atm_adsuij6_idpfg4 atm_adsuiam_kb7nvz atm_adsui1swzw65_glywfm atm_adsui1n6gq6x_idpfg4 atm_adsui1ew16gs_fg65tv atm_adsuilt2xkg_1txwivl atm_adsuicvgua_1bp4okc atm_adsuiibt2oz_idpfg4 atm_adsui13rscvo_kb7nvz atm_adsuifaj8v5_1txwivl atm_adsui1x9f3se_1h6ojuz atm_adsui7ff47s_1aqtv8w atm_adsui19ywhw4_5z7wz8 atm_adsuik8mrq7_m9afv7 atm_adsuitx6td0_glywfm atm_adsui24gkm1_kb7nvz atm_adsuibo9v2x_1mqbmot atm_adsuiof0hc7_1wugsn5",wk="atm_adsui9s_1txwivl atm_adsuiar_1bp4okc atm_adsuij6_idpfg4 atm_adsuiam_kb7nvz atm_adsui1n6gq6x_idpfg4 atm_adsui1ew16gs_fg65tv atm_adsui18hfcpa_5z7wz8 atm_adsui15kvw8j_1d1fc98 atm_adsuiput1jn_1r1dq30 atm_adsuiwst7e9_tx1for atm_adsuidds7x8_el7ql6 atm_adsuilhyqxr_1mqbmot atm_adsui10yw2xd_idpfg4 atm_adsui1womkjg_idpfg4 atm_adsui108aoln_glywfm atm_adsuirdnh25_1wugsn5 atm_adsuiiq3m8p_m9afv7 atm_adsui17tjeyp_5z7wz8 atm_adsui1s7p0pk_m9afv7 atm_adsuiq065rl_idpfg4 atm_adsui132u42p_1txwivl atm_adsuiy4slwo_1g80g66 atm_adsui41lbvx_1q9ycp6 atm_adsui1gu70gy_4baac9 atm_adsui3ffk06_iqvn5y atm_adsuiy5406h_l6f2xw atm_adsui1t4fsou_10of7rf atm_adsui1kdkncg_1mqbmot atm_adsuizdczfh_fg65tv atm_adsui1fkhvt8_1k2i9i8 atm_adsui1jjfms9_m9afv7 atm_adsuixcw6qj_l6f2xw atm_adsui1l7l6jv_10of7rf atm_adsui1n2a233_1wskm3t atm_adsui1gqwc3l_1r1dq30 atm_adsui1sox6pi_iqvn5y atm_adsuib4u3xt_1mqbmot atm_adsui14bm868_tlke0l atm_adsuiix7db5_1risgsc atm_adsui6nxdxv_16x0t2t atm_adsui1ouftwa_15wi45 atm_adsui1spa2l4_iqvn5y atm_adsui10ldf3v_ofj6oc atm_adsui167gjxu_1mqbmot";function zk(e){let[t="",...r]=e.split(`
|
|
120
|
-
|
|
121
|
-
`)[0]}`,phase:t,iconOnly:!0,popoverTarget:n("status-details"),children:S(kv,{variant:"toolbar",state:t==="reloading"?"building":t})}),S(xv,{id:n("status-details"),width:"wide",flush:!0,children:S("div",{className:me("ux-status-details",yk),children:[S("div",{id:n("status"),className:"ux-status-message",role:t==="error"?"alert":"status",children:S(qv,{message:r})}),S("div",{className:"ux-status-footer",children:[S("p",{id:n("warmup-status"),className:"ux-status-warmup",hidden:!o,children:o}),S("div",{id:n("preview-error"),className:"preview-retry",hidden:t!=="error",children:S($e,{id:n("retry-preview"),label:"Retry preview",variant:"outlined",onClick:s})})]})]})})]})}var xk="atm_adsuijb_idpfg4 atm_adsuij6_1osqo2v atm_adsuil8_1ru0ig4 atm_adsui7l_an4usv atm_adsuibx_rhlbdi atm_adsuic8_1c8rstr atm_adsuig3_sqnntc atm_adsui3z5xaq_d3l4uo atm_adsui1wgjgno_idpfg4 atm_adsuip5t3iw_glywfm atm_adsuixo4njo_uqc78k atm_adsui5o4a8h_rfutky atm_adsui1fodpaq_1g68hxi atm_adsuiw6dnwv_1j28jx2 atm_adsuigj0umz_1ru0ig4 atm_adsui12f0w6t_1txwivl atm_adsui1gdpbuc_1g80g66 atm_adsuiuqbam3_1h6ojuz atm_adsuio8ubsb_1aqtv8w atm_adsui5ug4ic_1wdkmbo atm_adsui1w6vi1x_13r6pey atm_adsuiz9prp4_kr1xch atm_adsuiwdfvbd_m9afv7 atm_adsui13fkfdg_idpfg4 atm_adsui1do7trk_1j28jx2 atm_adsui1rlis1a_an4usv atm_adsuizf9kzn_rhlbdi atm_adsuii5gv9h_1m800s6 atm_adsuindj6xq_16x0t2t atm_adsuitdd4i9_15wi45 atm_adsui11chkp6_irm9pb atm_adsui10tyobk_1heflvk atm_adsui1h392tq_3szr2b atm_adsuiatrpru_1d1fc98 atm_adsuiwv6oyq_1r1dq30 atm_adsui1wjk0g8_6e9m65 atm_adsui1bmpb92_cpeews atm_adsui1lgjzhx_1m800s6 atm_adsuijzdzyy_1mqbmot";function kk({title:e,description:t,onSearch:r,children:o}){return S("section",{className:me("ux-specimen-page",xk),"aria-label":e,children:[S("header",{children:[S("div",{className:"ux-specimen-heading",children:[S("h1",{children:e}),r&&S("input",{type:"search","aria-label":"Find token",placeholder:"Find a token",onInput:(s)=>r(s.currentTarget.value)})]}),t&&S("p",{children:t})]}),S("div",{"data-slot":"content",children:o})]})}var Ov="atm_adsuij7_idpfg4 atm_adsui9s_11p5wf0 atm_adsuin5_idpfg4 atm_adsui84_idpfg4 atm_adsuidz_1y3gjcq atm_adsuigw_1gem2g7 atm_adsuiiz_glywfm atm_adsuimrwrxb_1210cad atm_adsui165a258_idpfg4 atm_adsuindcbtc_idpfg4 atm_adsui1ywdvs7_idpfg4 atm_adsui7bg9zp_107lskt atm_adsuiqjzyof_idpfg4 atm_adsui15n9hsn_idpfg4 atm_adsuigpq1w8_idpfg4 atm_adsui1ts7i44_1gr7bv3 atm_adsui1xz6qul_1gem2g7 atm_adsui1pqqic1_glywfm atm_adsuilz7qdd_6s8zn8 atm_adsui134y5xe_1ncjpb7 atm_adsui1nznzd5_1gr7bv3 atm_adsuiom2ku1_1gem2g7 atm_adsui9o08mg_glywfm atm_adsui1iqqh5c_6s8zn8 atm_adsui1j124uw_1ncjpb7 atm_adsui1qgxgro_1gr7bv3 atm_adsui1ol26gk_1gem2g7 atm_adsuifnju3y_glywfm atm_adsui8dg1eh_6s8zn8 atm_adsui1t5abo5_1ncjpb7 atm_adsui1pcy8k9_1gr7bv3 atm_adsuiuzkx18_1gem2g7 atm_adsui1s22a1g_glywfm atm_adsuiv4wfzc_6s8zn8 atm_adsuiln2feu_1ncjpb7",Nv="atm_adsuij7_idpfg4 atm_adsui9s_11p5wf0 atm_adsuin5_idpfg4 atm_adsui84_idpfg4 atm_adsuidz_kyo2w3 atm_adsuigw_1gem2g7 atm_adsuiiz_glywfm atm_adsuimrwrxb_6s8zn8 atm_adsui165a258_idpfg4 atm_adsuindcbtc_idpfg4 atm_adsui1ywdvs7_idpfg4 atm_adsui7bg9zp_h3ouum atm_adsuiqjzyof_idpfg4 atm_adsui15n9hsn_idpfg4 atm_adsuigpq1w8_idpfg4 atm_adsui1ts7i44_kyo2w3 atm_adsui1xz6qul_1gem2g7 atm_adsui1pqqic1_glywfm atm_adsuilz7qdd_6s8zn8 atm_adsui134y5xe_h3ouum atm_adsui1nznzd5_kyo2w3 atm_adsuiom2ku1_1gem2g7 atm_adsui9o08mg_glywfm atm_adsui1iqqh5c_6s8zn8 atm_adsui1j124uw_h3ouum atm_adsui1qgxgro_kyo2w3 atm_adsui1ol26gk_1gem2g7 atm_adsuifnju3y_glywfm atm_adsui8dg1eh_6s8zn8 atm_adsui1t5abo5_h3ouum atm_adsui1pcy8k9_kyo2w3 atm_adsuiuzkx18_1gem2g7 atm_adsui1s22a1g_glywfm atm_adsuiv4wfzc_6s8zn8 atm_adsuiln2feu_h3ouum",jv="atm_adsuij7_idpfg4 atm_adsui9s_11p5wf0 atm_adsuin5_idpfg4 atm_adsui84_idpfg4 atm_adsuidz_1y3gjcq atm_adsuigw_1gem2g7 atm_adsuiiz_glywfm atm_adsui1xr9v27_1210cad atm_adsuif3wayr_idpfg4 atm_adsuimgqw9w_idpfg4 atm_adsui8iopdn_idpfg4 atm_adsuix9z4xg_107lskt atm_adsui1wohlm_idpfg4 atm_adsuiu9g1y7_idpfg4 atm_adsui1orm0qo_idpfg4 atm_adsuiskdtbx_15wbn57 atm_adsuip945hm_1pzsloo atm_adsui1ts7i44_1gr7bv3 atm_adsui1xz6qul_1gem2g7 atm_adsui1pqqic1_glywfm atm_adsuizryume_6s8zn8 atm_adsui1ngmxnq_1ncjpb7 atm_adsui1nznzd5_1gr7bv3 atm_adsuiom2ku1_1gem2g7 atm_adsui9o08mg_glywfm atm_adsuin783i1_6s8zn8 atm_adsui1l75c4v_1ncjpb7 atm_adsui1qgxgro_1gr7bv3 atm_adsui1ol26gk_1gem2g7 atm_adsuifnju3y_glywfm atm_adsui1i44mqh_6s8zn8 atm_adsuivsouqh_1ncjpb7 atm_adsui1pcy8k9_1gr7bv3 atm_adsuiuzkx18_1gem2g7 atm_adsui1s22a1g_glywfm atm_adsuiehc6gd_6s8zn8 atm_adsuittpjm6_1ncjpb7",Mv="atm_adsuij7_idpfg4 atm_adsui9s_11p5wf0 atm_adsuin5_idpfg4 atm_adsui84_idpfg4 atm_adsuidz_dk28gj atm_adsuigw_1gem2g7 atm_adsuiiz_glywfm atm_adsui1xr9v27_6s8zn8 atm_adsuif3wayr_idpfg4 atm_adsuimgqw9w_idpfg4 atm_adsui8iopdn_idpfg4 atm_adsuix9z4xg_h3ouum atm_adsui1wohlm_idpfg4 atm_adsuiu9g1y7_idpfg4 atm_adsui1orm0qo_idpfg4 atm_adsuiskdtbx_15wbn57 atm_adsuip945hm_1pzsloo atm_adsui1ts7i44_dk28gj atm_adsui1xz6qul_1gem2g7 atm_adsui1pqqic1_glywfm atm_adsuizryume_6s8zn8 atm_adsui1ngmxnq_h3ouum atm_adsui1nznzd5_dk28gj atm_adsuiom2ku1_1gem2g7 atm_adsui9o08mg_glywfm atm_adsuin783i1_6s8zn8 atm_adsui1l75c4v_h3ouum atm_adsui1qgxgro_dk28gj atm_adsui1ol26gk_1gem2g7 atm_adsuifnju3y_glywfm atm_adsui1i44mqh_6s8zn8 atm_adsuivsouqh_h3ouum atm_adsui1pcy8k9_dk28gj atm_adsuiuzkx18_1gem2g7 atm_adsui1s22a1g_glywfm atm_adsuiehc6gd_6s8zn8 atm_adsuittpjm6_h3ouum",Pk="atm_adsui9s_116y0ak atm_adsuiar_vrvcex atm_adsuih_1h6ojuz atm_adsui1xk5jbi_1aou828 atm_adsui15ztyo3_1wugsn5 atm_adsuiya8ym_12336oc atm_adsuiou0xue_1h6ojuz atm_adsuip2cq0w_idpfg4 atm_adsui3y46a7_pfqszd atm_adsui1e8hxr8_1f51e7f atm_adsui1w4yjon_1wugsn5 atm_adsui1fm6vu0_1aou828 atm_adsuieb1l7_1wugsn5 atm_adsuiu4pov9_1f51e7f atm_adsuibd751w_1wugsn5 atm_adsuip12vv8_1aou828 atm_adsui119azkn_1wugsn5 atm_adsuidutd7r_1f51e7f atm_adsuivm5w66_1wugsn5 atm_adsui7msh7_116y0ak atm_adsuijq6hmp_1q9ycp6 atm_adsuiqu4bbn_1h6ojuz atm_adsui1450k7n_1ulexfb atm_adsui7bxzlg_h68d5v atm_adsuin2zkk7_24x154 atm_adsuicx_tx1for atm_adsuijb_idpfg4";function Av(e=!1,t=!1){return{header:me("ux-workspace-header",e?Nv:Ov),main:me("ux-workspace-main",e||t?Mv:jv)}}var Tk="atm_adsui9s_1txwivl atm_adsuiar_1bp4okc atm_adsuivy_1osqo2v atm_adsuie2_1osqo2v atm_adsuij6_idpfg4 atm_adsui26_1bplolx atm_adsui7l_1wskm3t atm_adsuibx_rhlbdi atm_adsuic8_1m800s6 atm_adsuig3_sqnntc atm_adsui1swzw65_glywfm atm_adsuitwidkn_1eorbtc atm_adsui9sygfm_idpfg4 atm_adsui12bw0u4_10rgqv3 atm_adsuilgsf2q_1bplolx atm_adsui1czrkxg_m9afv7 atm_adsui1xxn05p_1txwivl atm_adsuijvq3zr_tx1for atm_adsui192tkol_1h6ojuz atm_adsui1uphbw0_1aqtv8w atm_adsui18j3xf2_1txwivl atm_adsuiv4kl24_1fhbwtr atm_adsui7tg88j_116y0ak atm_adsui3hsxdi_116y0ak atm_adsuiw4isa_1q9ycp6 atm_adsui1e372br_tx1for atm_adsuiol208p_idpfg4 atm_adsui1hwqkvt_14k5dlv atm_adsui1brizz9_1d1fc98 atm_adsui1qytvf8_1r1dq30 atm_adsui1i52crn_idpfg4 atm_adsui1rva9te_15vqwwr atm_adsui1ux9w3e_1l2sidv atm_adsui16phkqt_1q9ccgz atm_adsui11e3yb3_1wugsn5 atm_adsui121hswv_1txwivl atm_adsuikokisn_iqvn5y atm_adsui1xmdvl_1h6ojuz atm_adsuidgi0se_idpfg4 atm_adsui1106ncu_1wugsn5 atm_adsuiu6bb7r_tx1for atm_adsui1nngew9_1txwivl atm_adsui1hijnjn_1h6ojuz atm_adsui14yqywo_idpfg4 atm_adsui1n3v6f3_1wugsn5 atm_adsuibmhjpv_tx1for atm_adsuitwhtux_idpfg4 atm_adsui1t7jlm4_kb7nvz atm_adsuigr19py_idpfg4 atm_adsui1r3dd4x_1txwivl atm_adsui1dr8vx7_1bp4okc atm_adsui12n32ac_idpfg4 atm_adsui15x0kgb_m9afv7 atm_adsuixqxvxy_15vqwwr atm_adsuivq6bgu_ynj908 atm_adsui1o135n7_1bplolx atm_adsui7r55s8_kb7nvz atm_adsuiwklih5_idpfg4 atm_adsuixjj1j1_1wugsn5 atm_adsuirae8ic_1txwivl atm_adsui16ywoy7_kb7nvz atm_adsui3zzzu1_1bp4okc atm_adsuioe3i46_idpfg4 atm_adsuigjcmck_h2mmj6 atm_adsui16iisfr_15vqwwr atm_adsui1jwmmnn_idpfg4 atm_adsuiobixd9_kb7nvz atm_adsui1bb1xke_idpfg4 atm_adsuivnahyn_idpfg4 atm_adsui1xr98ve_1bgihbq atm_adsui18tesp1_1ulexfb atm_adsui3im4ne_idpfg4 atm_adsui3aiucy_1osqo2v atm_adsui1rjdu20_1osqo2v atm_adsuitmy5t6_1txwivl atm_adsui1dgldxt_esu3gu atm_adsui1ggjjzu_iqvn5y atm_adsui138t24g_4baac9 atm_adsui1qnyawd_m9afv7 atm_adsui4v0vbm_1bplolx atm_adsui1jhz6h2_glywfm atm_adsui1chybqy_stnw88 atm_adsui1br56z7_idpfg4 atm_adsui888a6e_o2ms3 atm_adsui1xuvgmd_11p5wf0 atm_adsuirxsuh_1h6ojuz atm_adsui1mqap2g_1bplolx atm_adsui1xhqumc_14k5dlv atm_adsuirc18cp_14k5dlv atm_adsuirrx08l_moeofi atm_adsuiey7ewl_nqa18y atm_adsuigux95j_7uy8cq atm_adsui1fe4k5a_12j2sah atm_adsuig4uoah_1v7nmpu atm_adsui11rdqaw_1wdkmbo atm_adsui18vvlvy_19uah5m atm_adsui1cw8iwc_dcxj7s atm_adsui1x2b1m8_1kw7nm4 atm_adsuitbv4yw_1bplolx atm_adsuizgbt4v_1wskm3t atm_adsui17eejsz_m9afv7 atm_adsuid87q3_idpfg4 atm_adsuitcdkhm_glywfm atm_adsui1xeiopu_1h6ojuz atm_adsui1ggp9a3_idpfg4 atm_adsui1k34kje_glywfm atm_adsui1gdfntm_idpfg4 atm_adsuiz1ci95_1knmvda atm_adsuiiqm1lt_1wugsn5 atm_adsuiez3a21_15vqwwr atm_adsui8ru30r_glywfm atm_adsui1b3wxlc_1osqo2v atm_adsui129m0mj_11p5wf0 atm_adsui5w99fc_cmo227 atm_adsuirt32k7_idpfg4 atm_adsui1bb439o_1uq4mm2 atm_adsui1azndq0_1txwivl atm_adsui1ef74b0_1bp4okc atm_adsui1r8nml_idpfg4 atm_adsui1oioy44_idpfg4 atm_adsui4s98mp_m9afv7 atm_adsuipkg9do_1m800s6 atm_adsui805znv_19dj2kj atm_adsui1uyulxv_8p4f3e atm_adsuiwjjjyp_idpfg4 atm_adsuii2eazt_m9afv7 atm_adsui1gx3q7f_kb7nvz atm_adsui1adcp8o_idpfg4 atm_adsui3micw4_1txwivl atm_adsui1q69jt1_1h6ojuz atm_adsui12dg9uo_1osqo2v atm_adsuia71lpn_1knmvda atm_adsuim1gh36_glywfm atm_adsui10vojm5_glywfm";function Ek({loading:e=!1,collapsed:t=!1,capture:r=!1,brand:o,sections:s,actions:n,navigation:i,overlays:a,previewOverlay:c,previewTools:l,children:d}){return S("div",{id:"workspace","data-loading":e,"data-collapsed":t,"data-capture":r,"aria-busy":e,className:me("ux-workspace",Tk),children:[S("header",{id:"header",className:me("ux-workspace-header",t?Nv:Ov),children:[S("div",{id:"brand",className:"ux-workspace-brand",children:o}),S("div",{className:"ux-workspace-bar",children:[S("nav",{id:"sections",className:"ux-workspace-sections","aria-label":"Showcase sections",children:s}),S("div",{className:"ux-workspace-actions",children:n})]})]}),a,S("main",{className:me("ux-workspace-main",t||r?Mv:jv),children:[S("aside",{id:"sidebar",className:"ux-workspace-sidebar",children:i}),S("section",{id:"preview-workspace",className:"ux-workspace-content","aria-label":"Preview workspace",children:S("section",{id:"preview",className:"ux-workspace-preview","aria-label":"Preview",children:[c,l&&S("div",{className:"ux-workspace-preview-tools",role:"toolbar","aria-label":"Preview tools",children:l}),S("div",{id:"frame-slot",className:"ux-workspace-slot",children:d})]})})]})]})}function $k({title:e="Design system",loading:t=!1,section:r="tokens",previewStatus:o,guidesAvailable:s=!1,guideOptions:n,navigation:i,children:a}){return S(Ek,{loading:t,brand:S(er,{children:[S("span",{className:me("ux-workspace-name",Pk),children:[S("span",{className:"ux-workspace-logo",children:S(Vx,{})}),S("span",{className:"ux-workspace-name-text",children:[S("span",{className:"ux-workspace-mark",children:"ADS"}),S("span",{id:"title",className:"ux-workspace-title",children:e})]})]}),S($e,{id:"pane-toggle",label:"Hide navigation pane",iconOnly:!0,expanded:!0,controls:"sidebar",children:S(Oe,{name:"chevron-left"})})]}),sections:S(er,{children:[S($e,{label:"Brand",section:"brand",current:r==="brand",children:S(Oe,{name:"brand"})}),S($e,{label:"Icons",section:"icons",current:r==="icons",children:S(Oe,{name:"icons"})}),S($e,{label:"Pictograms",section:"pictograms",current:r==="pictograms",children:S(Oe,{name:"pictograms"})}),S($e,{label:"Tokens",section:"tokens",current:r==="tokens",children:S(Oe,{name:"tokens"})}),S($e,{label:"Components",section:"components",current:r==="components",children:S(Oe,{name:"components"})}),S($e,{label:"Patterns",section:"patterns",current:r==="patterns",children:S(Oe,{name:"patterns"})}),S($e,{label:"Composition",section:"composition",current:r==="composition",children:S(Oe,{name:"composition"})}),S($e,{label:"Drafts",section:"drafts",current:r==="drafts",children:S(Oe,{name:"drafts"})})]}),actions:S(er,{children:[S(Rk,{...o}),S($e,{id:"viewport",label:"Phone viewport",iconOnly:!0,pressed:!1,controls:"frame-slot",children:S(Oe,{name:"phone"})}),S($e,{id:"grid-overlay",label:"Layout guides",iconOnly:!0,controls:"grid-options",popoverTarget:"grid-options",hidden:!s,children:S(Oe,{name:"layout"})}),S("select",{id:"brand-select",className:"ux-workspace-brand-select","aria-label":"Preview brand",hidden:!0}),S($e,{id:"theme",label:"Use dark theme",iconOnly:!0,children:S(Oe,{name:"moon"})}),S($e,{id:"minimize",label:"Minimize showcase menu",iconOnly:!0,children:S(Oe,{name:"chevron-up"})})]}),overlays:S(ak,{...n}),navigation:S(Sk,{id:"entries",label:"Entries",children:i}),previewTools:S($e,{id:"split-view",label:"Split view",iconOnly:!0,pressed:!1,disabled:!0,hidden:!0,children:S(Oe,{name:"split"})}),previewOverlay:S("div",{id:"loader",className:"ux-workspace-loader",role:"status","aria-label":"Loading preview",hidden:!0,children:S("span",{className:"ux-workspace-spinner","aria-hidden":"true"})}),children:a})}function ep(e,t){let r=document.createElement("div");return vo(S(e,{...t}),r),r.firstElementChild}function Lv(e){return vo(S($k,{title:"",loading:!0}),e),()=>vo(null,e)}var Uv=(e)=>ep(vk,e),Dv=(e)=>ep(ek,e),Zv=(e)=>ep(kk,e);var ya=new WeakMap;function vu(e){let t=ya.get(e);return!!t&&t.parentNode===e&&!!t.firstElementChild}function tp(e,t){let r=ya.get(e);if(!r||r.parentNode!==e){if(r)vo(null,r);r=document.createElement("div"),r.className="ux-icons-mount",ya.set(e,r),e.replaceChildren(r)}return vo(S(fk,{data:t}),r),r.firstElementChild}function rp(e){let t=ya.get(e);if(!t)return;vo(null,t),t.remove(),ya.delete(e)}function Hv(e,t){vo(S(qv,{message:t}),e)}var bu="ads://project/icons";Lv(document.getElementById("app"));var E=(e)=>document.getElementById(e),Ke=new URLSearchParams(location.search),Fv=Ke.get("scenario"),Ck=["brand","icons","pictograms","tokens","components","patterns","composition","drafts"],zu=!1,yo=[],ze,wo=Ke.get("draft"),up=[],Jv=[],lp=new Map,Tr=Ke.get("split")==="1",np,Ut=[],Lt=0,Pu;async function ka(){let e=Ut;Ut=[],await Promise.allSettled(e.map((t)=>t.close()))}var ks=E("split-view"),G="brand",Ce={},Vv=new Map,Rs=!0,Tu=[],Cs=[],Eu=[],ut,qs,Re,_e,xs,za,Ts,Ru,Ps,ot=0,Es=Ke.get("capture")!=="1"&&Ke.get("viewport")==="phone",lt=[{name:"light",scheme:"light"},{name:"dark",scheme:"dark"}],Er=Ke.get("capture")==="1"&&Ke.get("theme")||"light";if(Ke.get("capture")==="1")E("workspace").dataset.capture="true",lb();var ip=()=>lt.find((e)=>e.name===Er)?.scheme??"light";function Wv(){document.documentElement.dataset.theme=ip();let e=lt[(lt.findIndex((r)=>r.name===Er)+1)%lt.length],t=lt.length>1?`Use ${e.name} theme`:`Theme: ${Er}`;E("theme").setAttribute("aria-label",t),E("theme").title=t,E("theme").disabled=lt.length<2,E("theme").querySelector("svg").innerHTML=ip()==="dark"?'<circle cx="8" cy="8" r="3"/><path d="M8 1v1M8 14v1M1 8h1M14 8h1M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/>':'<path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/>'}document.documentElement.dataset.theme="light";var bo=[],rr=Ke.get("capture")==="1"&&Ke.get("brand")||null;function Kv(){let e=E("brand-select");if(e.hidden=!bo.length,e.options.length!==bo.length||bo.some((t,r)=>e.options[r].value!==t.name))e.replaceChildren(...bo.map((t)=>Object.assign(document.createElement("option"),{value:t.name,textContent:t.name})));if(rr)e.value=rr,e.title=`Brand: ${rr}`}var $u=HS(async(e)=>{if(e)await _p();await Dt(),await ub()},{onError:st}),ap,Pa=!1,Is=!1,dp=!1,kr,tr,op=0,wa,xr=!1,zo=new AbortController;window.addEventListener("blur",()=>setTimeout(()=>{if(document.activeElement?.tagName==="IFRAME")for(let e of document.querySelectorAll(":popover-open"))e.hidePopover()},0));var dt=LS(),Gv=(e,t={},r={})=>dt.callTool({name:e,arguments:t},{signal:zo.signal,...r}),xu=ZS((e)=>dt.readResource(e,{signal:zo.signal}),{signal:zo.signal,onDiagnostic:(e)=>{if(e.state==="retry")document.documentElement.dataset.adsResourceRetries=String(Number(document.documentElement.dataset.adsResourceRetries??0)+1);console.warn("ADS resource transport",e)}}),pp=async(e)=>JSON.parse((await xu({uri:e})).contents.find((t)=>typeof t.text==="string").text);function Yv(e){let t=Eu.find((r)=>r.name===e.name);if(!t||!(t._meta?.ui?.visibility??["model","app"]).includes("app"))throw Error("This tool is not callable from an App.");return dt.callTool(e)}var mp="";function he(e,t=!1,r=t?"error":e?"checking":"ready"){if(dp)e="Connection interrupted. Reconnecting… The retained preview may be stale.",t=!0,r="error";let o=e||"Preview is up to date.";if(E("preview-error").hidden=!t,Hv(E("status"),o),mp=o,E("status").dataset.error=String(t),!t)for(let s of["errorCategory","errorCode","resourceUri"])delete E("status").dataset[s];E("status").setAttribute("role",t?"alert":"status"),E("preview-status").dataset.phase=r,E("preview-status").querySelector(".ds-preview-indicator").dataset.state=["reloading","compiling","reverting"].includes(r)?"building":r,E("preview-status").title=o,E("preview-status").setAttribute("aria-label",`Preview status: ${o.split(`
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
- "app": Tool callable by the app from this server only`),csp:nl().optional(),permissions:nl().optional()}),D4=_({mimeTypes:y(c()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Wz=_({method:f("ui/download-file"),params:_({contents:y(E([rs,ns])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Gz=_({method:f("ui/message"),params:_({role:f("user").describe('Message role, currently only "user" is supported.'),content:y(It).describe("Message content blocks (text, image, etc.).")})}),Z4=_({method:f("ui/notifications/sandbox-resource-ready"),params:_({html:c().describe("HTML content to load into the inner iframe."),sandbox:c().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:am.optional().describe("CSP configuration from resource metadata."),permissions:sm.optional().describe("Sandbox permissions from resource metadata.")})}),B4=_({method:f("ui/notifications/tool-result"),params:wa.describe("Standard MCP tool execution result.")}),cv=_({toolInfo:_({id:ht.optional().describe("JSON-RPC id of the tools/call request."),tool:va.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Cz.optional().describe("Current color theme preference."),styles:Dz.optional().describe("Style configuration for theming the app."),displayMode:yn.optional().describe("How the UI is currently displayed."),availableDisplayModes:y(yn).optional().describe("Display modes the host supports."),containerDimensions:E([_({height:q().describe("Fixed container height in pixels.")}),_({maxHeight:E([q(),rl()]).optional().describe("Maximum container height in pixels.")})]).and(E([_({width:q().describe("Fixed container width in pixels.")}),_({maxWidth:E([q(),rl()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
121
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:c().optional().describe("User's language and region preference in BCP 47 format."),timeZone:c().optional().describe("User's timezone in IANA format."),userAgent:c().optional().describe("Host application identifier."),platform:E([f("web"),f("desktop"),f("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:_({touch:C().optional().describe("Whether the device supports touch input."),hover:C().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:_({top:q().describe("Top safe area inset in pixels."),right:q().describe("Right safe area inset in pixels."),bottom:q().describe("Bottom safe area inset in pixels."),left:q().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),H4=_({method:f("ui/notifications/host-context-changed"),params:cv.describe("Partial context update containing only changed fields.")}),Kz=_({method:f("ui/update-model-context"),params:_({content:y(It).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:T(c(),D().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Yz=_({method:f("ui/initialize"),params:_({appInfo:Mt.describe("App identification (name and version)."),appCapabilities:Fz.describe("Features and capabilities this app provides."),protocolVersion:c().describe("Protocol version this app supports.")})}),Xz=_({protocolVersion:c().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Mt.describe("Host application identification and version."),hostCapabilities:Hz.describe("Features and capabilities provided by the host."),hostContext:cv.describe("Rich context about the host environment.")}).passthrough();class im{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=(a)=>{if(t&&a.source!==this.eventSource){console.debug("Ignoring message from unknown source",a);return}let s=ft.safeParse(a.data);if(s.success)console.debug("Parsed message",s.data),this.onmessage?.(s.data);else if(a.data?.jsonrpc!=="2.0")console.debug("Ignoring non-JSON-RPC message",s.error.message,a);else console.error("Failed to parse message",s.error.message,a),this.onerror?.(Error("Invalid JSON-RPC message received: "+s.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,t){if(e.method!==Tz)console.debug("Sending message",e);this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var Qz=[nv];class om extends vn{_client;_hostInfo;_hostCapabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_registeredEvents=new Set;_events=new ov;_methods=new rv;setRequestHandler=(...e)=>{let[t,...a]=tv("request",e)??e;this._methods.claim(t,"setRequestHandler"),super.setRequestHandler.call(this,t,...a)};setNotificationHandler=(...e)=>{let[t,...a]=tv("notification",e)??e;this._methods.claim(t,"setNotificationHandler"),super.setNotificationHandler.call(this,t,...a)};removeRequestHandler=(e)=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=(e)=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_wrapHandler(e,t){let a=super._wrapHandler(e,t);if(e==="ui/initialize"||e==="ping")return a;return async(s,i)=>{if(!this._initializedReceived)console.warn(`[ext-apps] AppBridge received '${e}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`);return a(s,i)}}eventSchemas={sizechange:Lz,sandboxready:Az,initialized:Vz,requestteardown:Bz,loggingmessage:cs};setEventHandler(e,t){this._ensureEventSlot(e),this._events.setHandler(e,t)}getEventHandler(e){return this._events.getHandler(e)}addEventListener(e,t){this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);let a=(s)=>{if(e==="initialized")this._initializedReceived=!0;this._events.dispatch(e,s)};if(e==="loggingmessage")this.setNotificationHandler("notifications/message",(s)=>{a(s.params)});else this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},(s)=>a(s));this._registeredEvents.add(e)}warnIfRequestHandlerReplaced(e,t,a){if(t&&a)console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t,a,s){super(s);this._client=e,this._hostInfo=t,this._hostCapabilities=a,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),this._ensureEventSlot("initialized"),this._hostContext=s?.hostContext||{},this.replaceRequestHandler("ui/initialize",{params:Yz.shape.params,result:Xz},(i)=>this._onAppsInitialize(i)),this.replaceRequestHandler("ping",(i,o)=>(this.onping?.(i.params,o),{})),this.replaceRequestHandler("ui/request-display-mode",{params:sv.shape.params,result:iv},()=>({mode:this._hostContext.displayMode??"inline"}))}buildContext(e){return e}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler("sizechange")}set onsizechange(e){this.setEventHandler("sizechange",e)}get onsandboxready(){return this.getEventHandler("sandboxready")}set onsandboxready(e){this.setEventHandler("sandboxready",e)}get oninitialized(){return this.getEventHandler("initialized")}set oninitialized(e){this.setEventHandler("initialized",e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced("onmessage",this._onmessage,e),this._onmessage=e,this.replaceRequestHandler("ui/message",{params:Gz.shape.params,result:Oz},async(t,a)=>{if(!this._onmessage)throw Error("No onmessage handler set");return this._onmessage(t,a)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced("onopenlink",this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler("ui/open-link",{params:Mz.shape.params,result:Nz},async(t,a)=>{if(!this._onopenlink)throw Error("No onopenlink handler set");return this._onopenlink(t,a)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced("ondownloadfile",this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler("ui/download-file",{params:Wz.shape.params,result:Iz},async(t,a)=>{if(!this._ondownloadfile)throw Error("No ondownloadfile handler set");return this._ondownloadfile(t,a)})}get onrequestteardown(){return this.getEventHandler("requestteardown")}set onrequestteardown(e){this.setEventHandler("requestteardown",e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced("onrequestdisplaymode",this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler("ui/request-display-mode",{params:sv.shape.params,result:iv},async(t,a)=>{if(!this._onrequestdisplaymode)throw Error("No onrequestdisplaymode handler set");return this._onrequestdisplaymode(t,a)})}get onloggingmessage(){return this.getEventHandler("loggingmessage")}set onloggingmessage(e){this.setEventHandler("loggingmessage",e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced("onupdatemodelcontext",this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler("ui/update-model-context",{params:Kz.shape.params,result:fa},async(t,a)=>{if(!this._onupdatemodelcontext)throw Error("No onupdatemodelcontext handler set");return this._onupdatemodelcontext(t,a)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",async(t,a)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(t.params,a)})}_oncreatesamplingmessage;get oncreatesamplingmessage(){return this._oncreatesamplingmessage}set oncreatesamplingmessage(e){this.warnIfRequestHandlerReplaced("oncreatesamplingmessage",this._oncreatesamplingmessage,e),this._oncreatesamplingmessage=e,this.replaceRequestHandler("sampling/createMessage",async(t,a)=>{if(!this._oncreatesamplingmessage)throw Error("No oncreatesamplingmessage handler set");return this._oncreatesamplingmessage(t.params,a)})}sendToolListChanged(e={}){return this.notification({method:"notifications/tools/list_changed",params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced("onlistresources",this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler("resources/list",async(t,a)=>{if(!this._onlistresources)throw Error("No onlistresources handler set");return this._onlistresources(t.params,a)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced("onlistresourcetemplates",this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler("resources/templates/list",async(t,a)=>{if(!this._onlistresourcetemplates)throw Error("No onlistresourcetemplates handler set");return this._onlistresourcetemplates(t.params,a)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced("onreadresource",this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler("resources/read",async(t,a)=>{if(!this._onreadresource)throw Error("No onreadresource handler set");return this._onreadresource(t.params,a)})}sendResourceListChanged(e={}){return this.notification({method:"notifications/resources/list_changed",params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced("onlistprompts",this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler("prompts/list",async(t,a)=>{if(!this._onlistprompts)throw Error("No onlistprompts handler set");return this._onlistprompts(t.params,a)})}sendPromptListChanged(e={}){return this.notification({method:"notifications/prompts/list_changed",params:e})}getCapabilities(){return this._hostCapabilities}async _onAppsInitialize(e){let t=e.protocolVersion;if(this._appInfo!==void 0)console.warn("[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.");return this._appCapabilities=e.appCapabilities,this._appInfo=e.appInfo,{protocolVersion:Qz.includes(t)?t:nv,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},a=!1;for(let s of Object.keys(e)){let i=this._hostContext[s],o=e[s];if(eS(i,o))continue;t[s]=o,a=!0}if(a)this._hostContext=e,this.sendHostContextChange(t)}sendHostContextChange(e){return this.notification({method:"ui/notifications/host-context-changed",params:e})}sendToolInput(e){return this.notification({method:"ui/notifications/tool-input",params:e})}sendToolInputPartial(e){return this.notification({method:"ui/notifications/tool-input-partial",params:e})}sendToolResult(e){return this.notification({method:"ui/notifications/tool-result",params:e})}sendToolCancelled(e){return this.notification({method:"ui/notifications/tool-cancelled",params:e})}sendSandboxResourceReady(e){return this.notification({method:"ui/notifications/sandbox-resource-ready",params:e})}teardownResource(e,t){return this.request({method:"ui/resource-teardown",params:e},Zz,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:"tools/call",params:e},t)}listTools(e,t){return this.request({method:"tools/list",params:e},t)}async connect(e){if(this.transport)throw Error("AppBridge is already connected. Call close() before connecting again.");if(this._initializedReceived=!1,this._client){let t=this._client.getServerCapabilities();if(!t)throw Error("Client server capabilities not available");if(t.tools){if(this.oncalltool=async(a,s)=>this._client.request({method:"tools/call",params:a},{signal:s.mcpReq.signal}),t.tools.listChanged)this._client.setNotificationHandler("notifications/tools/list_changed",(a)=>this.sendToolListChanged(a.params))}if(t.resources){if(this.onlistresources=async(a,s)=>this._client.request({method:"resources/list",params:a},{signal:s.mcpReq.signal}),this.onlistresourcetemplates=async(a,s)=>this._client.request({method:"resources/templates/list",params:a},{signal:s.mcpReq.signal}),this.onreadresource=async(a,s)=>this._client.request({method:"resources/read",params:a},{signal:s.mcpReq.signal}),t.resources.listChanged)this._client.setNotificationHandler("notifications/resources/list_changed",(a)=>this.sendResourceListChanged(a.params))}if(t.prompts){if(this.onlistprompts=async(a,s)=>this._client.request({method:"prompts/list",params:a},{signal:s.mcpReq.signal}),t.prompts.listChanged)this._client.setNotificationHandler("notifications/prompts/list_changed",(a)=>this.sendPromptListChanged(a.params))}}return super.connect(e)}}function eS(e,t){return JSON.stringify(e)===JSON.stringify(t)}var kn=!1,rm=om,nm=im;function uv(){let e=new Ql({name:"ads-showcase",version:"1.0.0"},{versionNegotiation:{mode:"auto"},capabilities:{extensions:{"io.modelcontextprotocol/ui":{mimeTypes:["text/html;profile=mcp-app"]}}}});return{client:e,connect:()=>e.connect(new Qg(new URL("mcp",location.href)))}}var tS=[200,800],aS=(e)=>typeof e==="object"&&e!==null&&("name"in e)&&e.name==="TypeError"&&("message"in e)&&typeof e.message==="string"&&/^(Failed to fetch|fetch failed|Load failed|NetworkError when attempting to fetch resource\.)$/.test(e.message);function sS(e,t){return new Promise((a,s)=>{t?.throwIfAborted();let o=setTimeout(()=>{t?.removeEventListener("abort",r),a()},e),r=()=>{clearTimeout(o),t?.removeEventListener("abort",r),s(t?.reason)};t?.addEventListener("abort",r,{once:!0})})}function dv(e,{signal:t,onDiagnostic:a,wait:s=sS}={}){return async(i)=>{for(let o=1;;o++){t?.throwIfAborted();try{let r=await e(i);if(t?.throwIfAborted(),o>1)a?.({state:"recovered",uri:i.uri,attempt:o});return r}catch(r){if(t?.throwIfAborted(),!aS(r))throw r;let n=tS[o-1];if(n===void 0)throw a?.({state:"exhausted",uri:i.uri,attempt:o,message:r.message}),Object.assign(Error(`MCP resource transport failed for ${i.uri} after ${o} attempts: ${r.message}. Inspect the host connection and browser network diagnostics; this resource-loading error does not establish a component assertion failure.`,{cause:r}),{code:"ADS_RESOURCE_TRANSPORT"});a?.({state:"retry",uri:i.uri,attempt:o,nextAttempt:o+1,delayMs:n,message:r.message}),await s(n,t)}}}}var iS={setTimer:(e,t)=>setTimeout(e,t),clearTimer:(e)=>clearTimeout(e)};function lv({setTimer:e,clearTimer:t}){let a;return{get armed(){return a!==void 0},arm(s,i){a=e(()=>{a=void 0,s()},i)},clear(){t(a),a=void 0}}}function mv(e,t={}){let{onError:a,delay:s=150}=t,i=t.setTimer&&t.clearTimer?lv({setTimer:t.setTimer,clearTimer:t.clearTimer}):lv(iS),o=!1,r=!1,n=!1,u=!1,d=!1;function l(){if(!o||r||n||!u||i.armed)return;i.arm(()=>{n=!0;let h=d;u=d=!1,Promise.resolve().then(()=>e(h)).catch((p)=>{if(!r)a?.(p)}).finally(()=>{n=!1,l()})},s)}return{schedule(h=!1){if(r)return;u=!0,d||=h,l()},start(){o=!0,l()},close(){r=!0,u=d=!1,i.clear()}}}function _v(e){let t=[],a=new Map;for(let s of e){if(!s.group){t.push(s);continue}let i=a.get(s.group)??[];if(!a.has(s.group))a.set(s.group,i);i.push(s)}return[...t.length?[{label:null,entries:t}]:[],...[...a].sort(([s],[i])=>s.localeCompare(i)).map(([s,i])=>({label:s,entries:i}))]}var Ut=(e)=>("receiveBuild"in e);function zn(){if(!rm||!nm)throw Error("MCP Apps are not available in the HTTP showcase.");return{AppBridge:rm,PostMessageTransport:nm}}function _u(e){for(let t of e.contents){if(t.mimeType!=="text/html;profile=mcp-app"||!("text"in t)||typeof t.text!=="string")continue;let a=Je(t._meta)?t._meta.ui:void 0;return{html:t.text,csp:Je(a)?a.csp:void 0}}return}function pu(e){let t=e.contentWindow;if(!t)throw Error("The preview frame has no window.");return new(zn()).PostMessageTransport(t,t)}var Si=(e)=>typeof e.structuredContent==="object"&&e.structuredContent!==null?e.structuredContent:void 0,Sn=(e)=>e.content?.find((t)=>t.type==="text")?.text;function hu(e){for(let t of e.contents)if("text"in t&&typeof t.text==="string")return JSON.parse(t.text);throw TypeError("The resource has no text content.")}var fu=(e)=>typeof e==="object"&&e!==null?e:{};var oS=(e)=>typeof e==="string"&&/^(?:ads:\/\/project\/build|ads:\/\/preview\/(?:manifest|live)(?:\?from=[a-f0-9]{64})?)$/.test(e);function rS(e,t){if(!Je(e)||e.channel!=="ads-preview-http"||t===void 0||e.instance!==t.id)return;let{method:a,epoch:s,request:i,params:o}=e;if(a==="ready")return{method:a};if(a==="log")return{method:a,epoch:s,params:Je(o)?o:{}};if((a==="read"||a==="prepare")&&typeof i==="number"&&Number.isSafeInteger(i))return{method:a,epoch:s,request:i,params:Je(o)?o:void 0};return}var pv=(e)=>Je(e)?e.code:void 0,nS=(e)=>Je(e)?e.message:void 0;function gu({frame:e,context:t,draftScope:a}){let s,i=0,o=!1,r,n,u,d=new AbortController;async function l(w,R=!1){let j=await fetch("preview-http",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w),...R?{keepalive:!0}:{signal:d.signal}}),x=await j.json();if(!j.ok)throw Object.assign(Error(Je(x)&&typeof x.error==="string"?x.error:"HTTP preview control failed."),{code:Je(x)?x.code:void 0});return x}function h(w,R,j={}){if(!o&&s)e.contentWindow?.postMessage({channel:"ads-preview-http",instance:s.id,epoch:i,method:w,params:R,...j},"*")}async function p(w){if(o||w.source!==e.contentWindow||w.origin!=="null")return;let R=rS(w.data,s);if(R===void 0)return;if(R.method==="ready"){h("init",t),clearTimeout(n),r?.(),g.oninitialized?.();return}if(R.epoch!==i)return;if(R.method==="log"){g.onloggingmessage?.(R.params);return}let j=i,x=s;try{let P;if(R.method==="prepare")P=await l({...R.params,op:"prepare",id:x?.id});else{let S=R.params?.uri,k=a&&typeof S==="string"&&S.startsWith(a)?decodeURIComponent(S.slice(a.length)):S;if(!oS(k)||a&&S===k||typeof S!=="string"||!g.onreadresource)throw Error("Unexpected HTTP preview control resource.");P=await g.onreadresource({uri:S})}if(!o&&i===j)h("response",void 0,{request:R.request,result:P})}catch(P){if(!o&&i===j)h("response",void 0,{request:R.request,error:nS(P),code:pv(P)})}}let v=(w)=>{p(w)},b=()=>a?a+encodeURIComponent("ads://project/build"):"ads://project/build",g={onreadresource:void 0,oncalltool:void 0,onloggingmessage:void 0,onerror:void 0,oninitialized:void 0,async reconcileBuild(){if(o||!s)return;try{await l({op:"keepalive",id:s.id});let w=b();if(!g.onreadresource)throw Error("The HTTP preview has no resource reader.");let R=await g.onreadresource({uri:w});g.receiveBuild(w,hu(R))}catch(w){if(o)return;if(pv(w)==="ADS_PREVIEW_REOPEN")g.onloggingmessage?.({logger:"ads-preview",data:{state:"error",id:u,code:"ADS_PREVIEW_REOPEN"}});else g.onerror?.(w instanceof Error?w:Error(String(w)))}},receiveBuild(w,R){if(w===b())h("build",R)},setHostContext(w){t=w,h("context",w)},async sendToolInput(){},async sendToolResult(w){let R=Si(w);if(R?.draftScope!==a)throw Error("Cannot change the scope of an HTTP preview instance.");let j=(R?.previewResult?.structuredContent??R)?.scenario;u=typeof j==="object"&&j!==null?j.id:void 0,i++,h("select",w)},async connect(){let w=await l({op:"open",draftScope:a});if(!Je(w)||typeof w.id!=="string"||typeof w.url!=="string")throw Error("HTTP preview control failed.");if(s={id:w.id,url:w.url},o){await l({op:"close",id:s.id},!0);return}window.addEventListener("message",v);let R=new Promise((j,x)=>{r=j,n=setTimeout(()=>x(Error("HTTP preview initialization timed out.")),15000)});e.setAttribute("sandbox","allow-scripts allow-forms"),e.dataset.previewDelivery="http",e.src=s.url,await R},async teardownResource(){h("teardown",void 0)},async close(){if(o)return;if(h("teardown",void 0),o=!0,clearTimeout(n),window.removeEventListener("message",v),d.abort(),s)await l({op:"close",id:s.id},!0).catch(()=>{});e.remove()}};return g}async function fv({slot:e,title:t,createFrame:a,sandboxUrl:s,httpPreview:i=!1,resourceUri:o,result:r,readResource:n,callTool:u,context:d,onError:l,onState:h}){let p={slot:e,title:t,createFrame:a,sandboxUrl:s,httpPreview:i,resourceUri:o,readResource:n,callTool:u,context:d,onError:l,onState:h},v=r,b,g,w,R=!1;function j(){if(R||w)return;h?.({state:"loading"}),w=Promise.resolve().then(async()=>{if(await g,await b?.close(),R)return;g=hv({...p,result:v,onReopen:j});try{b=await g}finally{g=void 0}}).catch((x)=>{if(!R)l(x instanceof Error?x:Error(String(x)))}).finally(()=>{w=void 0})}g=hv({...p,result:v,onReopen:j});try{b=await g}finally{g=void 0}return{async updateResult(x){if(v=x,await w,!R)await b?.updateResult(v)},refreshContext(){if(!R&&!w)b?.refreshContext()},receiveBuild(x,P){if(!R&&!w)b?.receiveBuild(x,P)},reconcileBuild(){if(!R&&!w)return b?.reconcileBuild();return},async close(){R=!0,await w,await b?.close()}}}async function hv({slot:e,title:t,createFrame:a,sandboxUrl:s,httpPreview:i,resourceUri:o,result:r,readResource:n,callTool:u,context:d,onError:l,onState:h,onReopen:p}){let v=!1,b=i?void 0:await n({uri:o}),g=b&&_u(b);if(!i&&!g)throw Error("Comparison preview App is unavailable.");let w=a(t);if(!i&&s!==void 0)w.src=s;e.append(w);let R=Si(r)?.draftScope,j=i?gu({frame:w,context:d(w),draftScope:R}):new(zn()).AppBridge(null,{name:"ADS showcase",version:"1.0.0"},{serverResources:{},serverTools:{},logging:{}},{hostContext:d(w)});j.onreadresource=(k)=>n(k),j.oncalltool=(k)=>u(k),j.onerror=(k)=>{if(!v)l(k)},j.onloggingmessage=(k)=>{if(v||k.logger!=="ads-preview")return;let N=fu(k.data);if(N.code==="ADS_PREVIEW_REOPEN"){p();return}if(h?.(N),N.state==="error")l(Error(N.message))};let x,P=new Promise((k,N)=>{x=setTimeout(()=>N(Error("Comparison App initialization timed out.")),15000),j.oninitialized=()=>{clearTimeout(x),k()}});if(!Ut(j)&&g)j.onsandboxready=()=>j.sendSandboxResourceReady({html:g.html,...g.csp===void 0?{}:{csp:g.csp},sandbox:"allow-scripts allow-forms"});let S=new ResizeObserver(()=>j.setHostContext(d(w)));try{await Promise.all([Ut(j)?j.connect():j.connect(pu(w)),P]),S.observe(w),await j.sendToolInput({arguments:{}}),await j.sendToolResult(r)}catch(k){throw S.disconnect(),w.remove(),await j.close(),k}finally{clearTimeout(x)}return{updateResult:async(k)=>{await j.sendToolResult(k)},refreshContext:()=>j.setHostContext(d(w)),receiveBuild:(k,N)=>{if(Ut(j))j.receiveBuild(k,N)},reconcileBuild:()=>Ut(j)?j.reconcileBuild():void 0,async close(){v=!0,S.disconnect();try{await j.teardownResource({},{timeout:500})}catch{}await j.close(),w.remove()}}}function vu(e,t){return t===e||t.startsWith(e+"/")||t.startsWith(e+".")}function gv(e,t,a,s=new Map){let i=new Map(a.map(({id:d,title:l,revision:h,state:p,preview:v})=>[d,{id:d,title:l,revision:h,state:p,...v?{preview:v}:{}}])),o=(d)=>{let l=i.get(d);return l?[l]:[]},r=new Map(e.map((d)=>[d.id,{...d,drafts:(d.drafts??[]).flatMap((l)=>o(l.id))}]));for(let d of t){let l=r.get(d.id);r.set(d.id,{...l,...d,kind:"tokens",drafts:l?.drafts??[]})}let n=(d,l)=>d==="tokens"&&l.kind==="tokens"||(l.unit?l.unit===d:vu(d,l.id)),u=(d,l)=>{if(!d.drafts.some((h)=>h.id===l.id))d.drafts.push(...o(l.id))};for(let d of a){let l=s.get(d.id);for(let h of l?.scenarios??[]){if(!d.units.some((v)=>n(v,h)))continue;let p=r.get(h.id);if(!p)p={...h,draftOnly:!0,drafts:[]},r.set(h.id,p);u(p,d)}}for(let d of a)for(let l of d.units){let h=l.split("/")[0]??"";if(!["brand","tokens","components","patterns","mocks"].includes(h))continue;let p=[...r.values()].filter((v)=>n(l,v));if(p.length)for(let v of p)u(v,d);else r.set(l,{id:l,unit:l,title:l.split("/").at(-1)??l,kind:h,draftOnly:!0,pendingDraftScenario:!0,drafts:o(d.id)})}return{scenarios:[...r.values()],categories:[...r.values()].filter((d)=>d.kind==="tokens")}}var xn={brand:"Brand",artwork:"Artwork",tokens:"Tokens",components:"Components",patterns:"Patterns",mocks:"Mocks",other:"Other"},vv=(e)=>Object.hasOwn(xn,e);function cS(e){if(e.startsWith("assets/"))return"artwork";if(e==="foundation")return"tokens";let t=e.split("/")[0]??"";return["brand","tokens","components","patterns","mocks"].includes(t)&&vv(t)?t:"other"}var uS=(e)=>vv(e)?xn[e]:"Other";function wv(e,t){let a=[];for(let s of t){let i=e.filter((o)=>o.drafts?.some((r)=>r.id===s.id));for(let o of i)a.push({...o,id:`drafts/${encodeURIComponent(s.id)}/${encodeURIComponent(o.id)}`,previewId:o.id,title:`${s.title||s.id} · ${o.title}`,group:uS(o.kind),drafts:[s]});for(let o of s.units??[]){if(i.some((n)=>o==="tokens"&&n.kind==="tokens"||n.unit===o||!n.unit&&vu(o,n.id)))continue;let r=cS(o);a.push({id:`drafts/${encodeURIComponent(s.id)}/${encodeURIComponent(o)}`,unit:o,kind:r,title:`${s.title||s.id} · ${o.split("/").at(-1)??o}`,group:xn[r],drafts:[s]})}if(!i.length&&!s.units?.length)a.push({id:`drafts/${encodeURIComponent(s.id)}`,kind:"other",title:s.title||s.id,group:"Other",drafts:[s]})}return a}var dS=["off","hover","always"];var bv=Object.freeze({mode:"off",bounds:!0,tracks:!1,gaps:!1,padding:!0,margins:!0,mini:!1}),lS=(e)=>dS.some((t)=>t===e),Sa=(e,t)=>typeof e==="object"&&e!==null?e[t]:void 0;function Rn(e){let t=Sa(e,"mode");return{mode:lS(t)?t:Sa(e,"all")===!0?"always":"off",bounds:Sa(e,"bounds")===!0,tracks:Sa(e,"tracks")===!0,gaps:Sa(e,"gaps")===!0,padding:Sa(e,"padding")===!0,margins:Sa(e,"margins")===!0,mini:Sa(e,"mini")===!0}}function yv(e){let{mode:t,...a}=Rn(e);return{all:t==="always",...a}}function kv(e){let{mode:t,...a}=Rn(e);return t!=="off"&&Object.values(a).some(Boolean)}function mS(e){if(e?.state==="error")return"error";if(e?.state==="checking"||e?.live)return"checking";if(e?.building||e?.state==="queued"||e?.state==="building")return"building";if(e?.current)return"ready";if(e?.stale)return"stale";return"unreported"}function _S(e,t){switch(e){case"error":return Yn(t);case"checking":return"Preview compiled; checking changes";case"building":return"Preview build in progress";case"ready":return"Preview build complete";case"stale":return"Previous preview; current source not built";case"unreported":return"Preview not built"}}function zv(e,t,a){let s=e.drafts?.find((n)=>n.id===a)??e.drafts?.[0],i=s&&(t?.drafts?.find((n)=>n.id===s.id)??s.preview),o=s?i?.scenarios?.find((n)=>n.id===e.id)??i:t?.previews?.find((n)=>n.id===e.id)??e.build,r=mS(o);return{state:r,label:`${s?"Draft · ":""}${_S(r,o)}${s&&r==="ready"?" · unaccepted":""}`}}function Sv(e){let t=e.get("draft"),a=e.get("revision");return e.get("view")==="approval"&&t&&a?{draft:t,revision:a}:null}var pS=(e)=>e==="visible-label"?"Its visible label":"A boundary shown on hover and focus",hS=(e)=>e==="visible-label"?"A rendered label is associated with the control (<label for>, a wrapping <label> or aria-labelledby), in every theme and brand the audit renders":"A hover treatment draws the control's border at 3:1, and its focus outline reaches 3:1";async function xv(e){let t=await e.json().catch(()=>({}));if(!e.ok){let a=t!==null&&typeof t==="object"?Reflect.get(t,"error"):void 0,s=a!==null&&typeof a==="object"?Reflect.get(a,"message"):void 0;throw Error(typeof s==="string"?s:`The approval request failed (${e.status}).`)}return t}async function Rv(e,t){let a=new URL("api/approval",location.href);return a.search=new URLSearchParams({draft:e.draft,revision:e.revision}).toString(),await xv(await fetch(a,{signal:t??null,headers:{Accept:"application/json"}}))}async function qv(e){try{let t=await fetch(new URL("api/approval",location.href),{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({draft:e.draft,revision:e.revision})}),a=await xv(t);return a!==null&&typeof a==="object"&&Reflect.get(a,"ok")===!0?{kind:"accepted"}:{kind:"refused",message:"Acceptance did not pass its checks. Nothing was published; read ads_results for the failures."}}catch(t){return{kind:"refused",message:t instanceof Error?t.message:String(t)}}}function jv(e,t,a){if(e.current!==e.revision)return{title:"Approve accessibility declarations",description:`Draft ${e.draft} changed since this link was made. Nothing can be approved from it: ask for a new approval link for the current revision.`,sections:[]};if(t.kind==="accepted")return{title:"Approve accessibility declarations",description:`Draft ${e.draft} was approved and accepted.`,sections:[]};if(!e.pending.length)return{title:"Approve accessibility declarations",description:`Draft ${e.draft} adds or changes no accessibility declaration: nothing needs approval.`,sections:[]};let i=e.pending.map((n,u)=>({key:`${n.file}#${n.selector}`,title:`${n.element} in ${n.file}`,description:"Check the control in the draft's split view, in every theme and brand, before approving.",tables:[{label:`Declaration ${u+1}`,columns:[{label:"Field",rowHeader:!0},{label:"Value"}],rows:[{key:"part",cells:["Part",`${n.element} (${n.selector})`]},{key:"identified",cells:["Identified by",pS(n.boundary)]},{key:"reason",cells:["Reason",n.reason]},{key:"verified",cells:["ADS verifies",hS(n.boundary)]}]}]})),o=i.length-1,r={key:"approve",title:"Approval",description:t.kind==="refused"?t.message:t.kind==="working"?"Accepting: the draft's checks are running.":"Approve only if the controls are identified this way in the design. Approving accepts the draft through the usual checks; no name is recorded.",tables:[],...t.kind==="working"?{}:{more:{label:"Approve and accept",onClick:a}}};return{title:"Approve accessibility declarations",description:`Draft ${e.draft} declares that ${e.pending.length===1?"this text-entry control is":"these text-entry controls are"} identified other than by a 3:1 boundary (WCAG 1.4.11).`,sections:o>=0?[...i,r]:[r]}}var le,Hv,fS,xa,Pv,zu,Fv,bu,Vv,_m,um,gS,Su={},xu=[],vS=/^m(i|n|o|s|text|space)$/,pm=Array.isArray,Jv=xu.slice,ws=Object.assign;function Ru(e){e&&e.parentNode&&e.remove()}function yu(e,t,a,s,i){var o={type:e,props:t,key:a,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i||++Hv,__i:-1,__u:0};return!i&&le.vnode&&le.vnode(o),o}function Ra(e){return e.children}function ku(e,t){this.props=e,this.context=t,this.__g=0}function qa(e,t){if(t==null)return e.__?qa(e.__,e.__i+1):null;for(var a;t<e.__k.length;t++)if((a=e.__k[t])&&a.__e)return a.__e;return typeof e.type!="function"||e.props.__P?null:qa(e)}function Wv(e){if((e=e.__)&&e.__c&&!e.props.__P)return e.__e=null,e.__k.some(function(t){return t&&(e.__e=t.__e)}),Wv(e)}function Tv(e){(8&e.__g||!(e.__g|=8)||!xa.push(e)||zu++)&&Pv==le.debounceRendering||((Pv=le.debounceRendering)||queueMicrotask)(wS)}function wS(){var e,t,a,s,i,o,r,n,u;try{for(t=1;xa.length;)xa.length>t&&xa.sort(Fv),e=xa.shift(),t=xa.length,8&e.__g&&(s=void 0,i=void 0,o=(i=(a=e).__v).__e,r=[],n=[],(u=a.__P)&&((s=ws({constructor:void 0},i)).__v=i.__v+1,le.vnode&&le.vnode(s),hm(u,s,i,a.__n,u.namespaceURI,32&i.__u?[o]:null,r,o||qa(i),32&i.__u,n),s.__v=i.__v,s.__.__k[s.__i]=s,Xv(r,s,n),i.__=i.__e=null,s.__e!=o&&Wv(s)))}finally{xa.length=zu=0}}function Gv(e,t,a,s,i,o,r,n,u,d,l){var h,p,v,b,g,w,R=s.__k||xu,j=t.length;for(u=bS(a,t,R,u,j),h=0;h<j;h++)(v=a.__k[h])!=null&&(p=~v.__i&&R[v.__i]||Su,v.__i=h,w=hm(e,v,p,i,o,r,n,u,d,l),b=v.__e,(p.ref!=v.ref||8&p.__u)&&(p.ref&&fm(p.ref,null,v,p),v.ref&&l.push(v.ref,v.__c||b,v)),g=g||b,4&v.__u?(u=Kv(v,u,e,!p.__v),p.__e&&(p.__e=null)):typeof v.type=="function"&&w!==void 0?u=w:b&&(u=b.nextSibling),v.__u&=-7);return a.__e=g,u}function bS(e,t,a,s,i){var o,r,n,u,d,l,h,p,v,b,g=a.length,w=g,R=0,j=!1,x=e.__k=Array(i);for(o=0;o<i;o++)(r=t[o])!=null&&typeof r!="boolean"&&typeof r!="function"?(typeof r!="object"||r.constructor==String?r=x[o]=yu(null,r):pm(r)?r=x[o]=yu(Ra,{children:r}):r.constructor===void 0&&r.__b?r=x[o]=yu(r.type,r.props,r.key,r.ref,r.__v):x[o]=r,u=o+R,r.__=e,r.__b=e.__b+1,n=null,~(d=r.__i=yS(r,a,u,w))&&(w--,(n=a[d])&&(n.__u|=2)),n&&n.__v?(r.__u|=2,d==u-1?R--:d==u+1?R++:d!=u&&(d>u?R--:R++,j=!0)):(~d||(i>g?R--:i<g&&R++),typeof r.type!="function"&&(r.__u|=4))):x[o]=null;if(j){for(l=[],h=[],o=0;o<i;o++)if((r=x[o])&&2&r.__u){for(p=0,v=l.length;p<v;)l[b=p+v>>1]<r.__i?p=b+1:v=b;l[p]=r.__i,h[o]=p+1}for(R=l.length;o--;)h[o]&&(h[o]==R?R--:x[o].__u|=4)}if(w)for(o=0;o<g;o++)!(n=a[o])||2&n.__u||(n.__e==s&&(s=qa(n)),gm(n,n));return s}function Kv(e,t,a,s){var i,o,r;if(typeof e.type=="function"){if(e.props.__P)return t;if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&(i[o].__=e,t=Kv(i[o],t,a,!1));return t}for(t&&!t.parentNode&&(t=qa(e))&&!t.parentNode&&(t=null),r=t;r&&r.nodeType==8;)r=r.nextSibling;for(e.__e!=r&&(!s&&a.moveBefore&&e.__e.parentNode?a.moveBefore(e.__e,t):a.insertBefore(e.__e,t||null)),t=e.__e;(t=t&&t.nextSibling)&&t.nodeType==8;);return t}function yS(e,t,a,s){var i,o,r,{key:n,type:u}=e,d=t[a],l=d&&!(2&d.__u);if(d===null&&n==null||l&&n==d.key&&u==d.type)return a;if(s>(l?1:0)){for(i=a-1,o=a+1;i>=0||o<t.length;)if((d=t[r=i>=0?i--:o++])&&!(2&d.__u)&&n==d.key&&u==d.type)return r}return-1}function Cv(e,t,a){a==null&&(a=""),t[0]=="-"?e.setProperty(t,a):e[t]=a}function wu(e,t,a,s,i){var o,r;e:if(t=="style")if(typeof a=="string")e.style.cssText=a;else{if(typeof s=="string"&&(e.style.cssText=s=""),s)for(t in s)a&&t in a||Cv(e.style,t,"");if(a)for(t in a)s&&a[t]==s[t]||Cv(e.style,t,a[t])}else if(t[0]=="o"&&t[1]=="n")(e.__e||(e.__e={}))[t]=a,a&&s||(r=um[t]||(um[t]=kS(t)),(e.__a||(e.__a={}))[t]=_m,o=t!=(t=t.replace(Vv,"$1")),(t=t.slice(2))[0]<"a"&&(t=t.toLowerCase()),a?e.addEventListener(t,r,o):e.removeEventListener(t,r,o));else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=a==null?"":a;break e}catch(n){}typeof a=="function"||(a==null||a===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&a==1?"":a))}}function kS(e){return function(t){if(this.__e){var a=this.__e[e];if(t[bu]==null)t[bu]=_m++;else if(t[bu]<this.__a[e])return;return a(le.event?le.event(t):t)}}}function hm(e,t,a,s,i,o,r,n,u,d){var l,h,p,v,b,g,w,R,j,x,P,S,k,N,X,K,se,we,te,ie,B=t.type;if(t.constructor!==void 0)return null;if(128&a.__u&&(u=32&a.__u,l=a.__c.__z)){if(t.__u|=u,h=o=[],l.nodeType==8)for(p=1,v=l.nextSibling;v;v=v.nextSibling){if(v.nodeType==8){if(v.data.startsWith("$s"))p++;else if(v.data.startsWith("/$s")&&!--p)break}o.push(v)}else o.push(l);n=o[0]}(l=le.__b)&&l(t);e:if(typeof B=="function"){b=r.length;try{if(x=t.props,P=(l=B.prototype)&&l.render,S=(l=B.contextType)&&s[l.__c],k=l?S?S.props.value:l.__:s,a.__c?2&(g=t.__c=a.__c).__g&&(g.__g|=1):(P?t.__c=g=new B(x,k):(t.__c=g=new ku(x,k),g.constructor=B,g.render=SS),S&&S.sub(g),g.state||(g.state={}),g.__n=s,g.__g|=8,g.__h=[],g.__k=[]),P&&(g.__s||(g.__s=g.state),B.getDerivedStateFromProps&&(g.__s==g.state&&(g.__s=ws({},g.__s)),ws(g.__s,B.getDerivedStateFromProps(x,g.__s)))),w=g.props,R=g.state,g.__v=t,a.__c){if(P&&!B.getDerivedStateFromProps&&x!==w&&g.componentWillReceiveProps&&g.componentWillReceiveProps(x,k),t.__v==a.__v&&!(8&g.__g)||!(4&g.__g)&&g.shouldComponentUpdate&&g.shouldComponentUpdate(x,g.__s,k)===!1){t.__v!=a.__v&&(g.props=x,g.state=g.__s,g.__g&=-9),t.__e=a.__e,t.__k=a.__k,t.__k.some(function(re){re&&(re.__=t)}),xu.push.apply(g.__h,g.__k),g.__k=[],g.__h.length&&r.push(g),n=qa(a);break e}g.componentWillUpdate&&g.componentWillUpdate(x,g.__s,k),P&&g.componentDidUpdate&&g.__h.push(function(){g.componentDidUpdate(w,R,j)})}else P&&!B.getDerivedStateFromProps&&g.componentWillMount&&g.componentWillMount(),P&&g.componentDidMount&&g.__h.push(g.componentDidMount);if(g.context=k,g.props=x,g.__P=e,g.__g&=-5,N=le.__r,X=0,P)g.state=g.__s,g.__g&=-9,N&&N(t),l=g.render(g.props,g.state,g.context),xu.push.apply(g.__h,g.__k),g.__k=[];else do g.__g&=-9,N&&N(t),l=g.render(g.props,g.state,g.context),g.state=g.__s;while(8&g.__g&&++X<25);g.state=g.__s,g.getChildContext&&(s=ws({},s,g.getChildContext())),P&&a.__c&&g.getSnapshotBeforeUpdate&&(j=g.getSnapshotBeforeUpdate(w,R)),K=l&&l.type===Ra&&l.key==null?l.props.children:l,x.__P&&(l=n,i=(e=x.__P).namespaceURI,u=o=null,a.props&&a.props.__P!=e&&(a.__k.some(function(re){re&&gm(re,re)}),a.__k=null),n=a.__k?qa(a,0):null),n=Gv(e,pm(K)?K:[K],t,a,s,i,o,r,n,u,d),x.__P&&(t.__e=null,n=l),t.__u&=-161,128&a.__u&&(g.__z=null),h&&h.some(Ru),g.__h.length&&r.push(g),1&g.__g&&(g.__g&=-4)}catch(re){if(r.length=b,t.__v=null,u||o)if(re.then){if(se=0,t.__u|=u?160:128,o){for(~(te=o.indexOf(n||void 0))||(te=o.length);(ie=o[te-1])&&ie.nodeType==8;)te--;for(;te<o.length;te++)if(ie=o[te]){if(o[te]=null,ie.nodeType==8){if(ie.data.startsWith("$s"))se++||(we=ie);else if(se&&ie.data.startsWith("/$s")&&!--se){n=ie;break}}else if(!se)break}}if(!we){for(;n&&n.nodeType==8&&n.nextSibling;)n=n.nextSibling;we=n}t.__c.__z||(t.__c.__z=we),t.__e=n}else o&&o.some(Ru);else t.__e=a.__e;t.__k||(t.__k=a.__k||[]),re.then||Yv(t),le.__e(re,t,a)}}else n=t.__e=zS(a.__e,t,a,s,i,o,r,u,d,e);return(l=le.diffed)&&l(t),128&t.__u?void 0:n}function Yv(e){e&&(e.__c&&(e.__c.__g|=4),e.__k&&e.__k.some(Yv))}function Xv(e,t,a){for(var s=0;s<a.length;)fm(a[s++],a[s++],a[s++]);le.__c&&le.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){le.__e(o,i.__v)}})}function zS(e,t,a,s,i,o,r,n,u,d){var l,h,p,v,b,g,w,R,j,x=a.props||Su,{props:P,type:S}=t;if(S=="svg"?i="http://www.w3.org/2000/svg":S=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o){for(l=0;l<o.length;l++)if((b=o[l])&&(S?b.localName==S:b.nodeType==3)){e=b,o[l]=null;break}}if(!e){if(R=d.ownerDocument||document,!S)return R.createTextNode(P);e=R.createElementNS(i,S,P.is&&P),n&&(le.__m&&le.__m(t,o),n=!1),o=null}if(S){if(d=S=="template"?e.content:e,o=S=="textarea"&&P.defaultValue!=null?null:o&&Jv.call(d.childNodes),!n&&o)for(x={},l=0;l<e.attributes.length;l++)x[(b=e.attributes[l]).name]=b.value;for(l in x)b=x[l],l=="dangerouslySetInnerHTML"?p=b:l=="children"||(l in P)||l=="value"&&("defaultValue"in P)||l=="checked"&&("defaultChecked"in P)||wu(e,l,null,b,i);for(l in j=1&a.__u,P)b=P[l],l=="children"?v=b:l=="dangerouslySetInnerHTML"?h=b:l=="value"?g=b:l=="checked"?w=b:n&&typeof b!="function"||!(x[l]!==b||j&&b!=null)||wu(e,l,b,x[l],i);h?(n||p&&(h.__html==p.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),t.__k=[]):(p&&(e.textContent=""),(S=="foreignObject"||i=="http://www.w3.org/1998/Math/MathML"&&vS.test(S))&&(i="http://www.w3.org/1999/xhtml"),Gv(d,pm(v)?v:[v],t,a,s,i,o,r,o?o[0]:a.__k&&qa(a,0),n,u),o&&o.some(Ru)),n&&S!="textarea"||(l="value",S=="progress"&&g==null?e.removeAttribute(l):g==null||g===e[l]&&(S!="progress"||g)||wu(e,l,g,x[l],i),l="checked",w!=null&&w!=e[l]&&wu(e,l,w,x[l],i))}else x===P||n&&e.data==P||(e.data=P);return e}function fm(e,t,a,s){try{typeof e=="function"?t?t.__x=e(t)||1:s&&(s=s.__c||s.__e)&&(t=s.__x)&&(s.__x=null,typeof t=="function"?t():e(null)):e.current=t}catch(i){le.__e(i,a)}}function gm(e,t,a){var s,i;if(le.unmount&&le.unmount(e),!(s=e.ref)||s.current&&s.current!=e.__e||fm(s,null,t,e),s=e.__c){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(o){le.__e(o,t)}s.__P=s.__n=null}if(s=e.__k)for(i=0;i<s.length;i++)s[i]&&gm(s[i],t,typeof e.type!="function"||a&&!e.props.__P);(s=e.__e)&&(a||Ru(s),s.__e&&(s.__e=null)),e.__e=e.__c=e.__=null}function SS(e,t,a){return this.constructor(e,a)}function ju(e,t){var a,s,i,o;le.__&&le.__(e,t),t.nodeType==9&&(t=t.documentElement),s=(a=e&&32&e.__u)?null:t.__k,t.__k=yu(Ra,{children:[e]}),i=[],o=[],hm(t,t.__k,s||Su,Su,t.namespaceURI,s?null:t.firstChild?Jv.call(t.childNodes):null,i,s?s.__e:t.firstChild,a,o),Xv(i,t.__k,o),t.__k.props.children=null}le={__e:function(e,t,a,s){for(var i,o,r;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((o=i.constructor)&&o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),r=8&i.__g),i.componentDidCatch&&(i.componentDidCatch(e,s||{}),r=8&i.__g),r)return void(i.__g|=2)}catch(n){e=n,r=0}}throw zu=0,e}},Hv=0,fS=function(e){return e!=null&&e.constructor===void 0},ku.prototype.setState=function(e,t){var a=this.__s;a&&a!=this.state||(a=this.__s=ws({},this.state)),typeof e=="function"&&(e=e(ws({},a),this.props)),e&&(ws(a,e),this.__v&&(t&&this.__k.push(t),Tv(this)))},ku.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),Tv(this))},ku.prototype.render=Ra,xa=[],zu=0,Fv=function(e,t){return e.__v.__b-t.__v.__b},bu=Symbol(),Vv=/(PointerCapture)$|Capture$/i,_m=0,um={},gS=0;var xS=0;function m(e,t,a,s,i,o){t||(t={});var r,n,u=t;if("ref"in u&&typeof e!="function")for(n in u={},t)n=="ref"?r=t[n]:u[n]=t[n];var d={type:e,props:u,key:a,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--xS,__i:-1,__u:0};return(i||o)&&(d.__source=i,d.__self=o),le.vnode&&le.vnode(d),d}function Qv({box:e,preserveAspectRatio:t="xMidYMid meet",axes:a=!0,centre:s}){if(!([e.x,e.y,e.width,e.height].every(Number.isFinite)&&e.width>0&&e.height>0))return null;let i=s!==void 0,o={x:e.x+e.width*(0.5+(s?.[0]??0)),y:e.y+e.height*(0.5+(s?.[1]??0))},r=Math.min(e.width,e.height)/12,n=Math.max(1,Math.ceil(Math.max(e.width,e.height)/48)),u=(d)=>[...new Set([...Array.from({length:Math.floor(d/n)+1},(l,h)=>h*n),d])].filter((l)=>!a||l*2!==d).sort((l,h)=>l-h);return m("svg",{className:"ds-artwork-grid ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_172y5t0_glywfm ads-ui-atm_1gb0hee_icygq7 ads-ui-atm_f17go2_1y4oovw ads-ui-atm_s8x68_glywfm ads-ui-atm_xdo5pv_ltqb7t ads-ui-atm_xhpk5c_1627y59 ads-ui-atm_4me99n_1y4oovw ads-ui-atm_1qxfcqb_glywfm ads-ui-atm_l3ghlf_ltqb7t ads-ui-atm_1w25y0c_b6kj4x ads-ui-atm_1hh230p_1y4oovw ads-ui-atm_ymrlk4_glywfm ads-ui-atm_1wm7z8u_ltqb7t",viewBox:`${e.x} ${e.y} ${e.width} ${e.height}`,"data-step":n,preserveAspectRatio:t,"aria-hidden":"true",focusable:"false",children:[u(e.width).map((d)=>m("line",{className:"ds-artwork-grid-line",x1:e.x+d,x2:e.x+d,y1:e.y,y2:e.y+e.height},`x${d}`,!1,void 0,this)),u(e.height).map((d)=>m("line",{className:"ds-artwork-grid-line",x1:e.x,x2:e.x+e.width,y1:e.y+d,y2:e.y+d},`y${d}`,!1,void 0,this)),a&&m("line",{className:"ds-artwork-grid-axis mid",x1:e.x+e.width/2,x2:e.x+e.width/2,y1:e.y,y2:e.y+e.height},void 0,!1,void 0,this),a&&m("line",{className:"ds-artwork-grid-axis mid",x1:e.x,x2:e.x+e.width,y1:e.y+e.height/2,y2:e.y+e.height/2},void 0,!1,void 0,this),i&&m("line",{className:"ds-artwork-grid-centre",x1:o.x-r,x2:o.x+r,y1:o.y-r,y2:o.y+r},void 0,!1,void 0,this),i&&m("line",{className:"ds-artwork-grid-centre",x1:o.x-r,x2:o.x+r,y1:o.y+r,y2:o.y-r},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ze({id:e,label:t,icon:a,iconOnly:s=!1,title:i,disabled:o,hidden:r,pressed:n,current:u,enabled:d,expanded:l,controls:h,popoverTarget:p,section:v,variant:b="quiet",onClick:g}){return m("button",{id:e,type:"button",className:s===!1?b==="outlined"?a===void 0?"ds-toolbar-button ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_xypucb ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_9pzzkz_bk76yf ads-ui-atm_12itgy1_dcxj7s ads-ui-atm_1o7ozsh_dcxj7s ads-ui-atm_1wf0rum_99w7cs ads-ui-atm_h5r38d_99w7cs ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_snw50q_1627y59 ads-ui-atm_140esw6_1627y59 ads-ui-atm_1fpt21x_1627y59 ads-ui-atm_3v15jc_1627y59 ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_174zlj6_73adwj ads-ui-atm_168r6ku_8o97w ads-ui-atm_smau91_1r1dq30 ads-ui-atm_jwwj6z_1wskm3t ads-ui-atm_1qd811_1wskm3t ads-ui-atm_p68de7_1wskm3t ads-ui-atm_4jiwlx_1wskm3t ads-ui-atm_1jhk75u_1mfz0iu ads-ui-atm_16ku829_moeofi ads-ui-atm_4luhvg_2iq75o ads-ui-atm_6zeuib_15wi45 ads-ui-atm_14bywhv_nqa18y ads-ui-atm_1alf0zp_1q9ccgz ads-ui-atm_1vppilz_glywfm":"ds-toolbar-button ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_xypucb ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_9pzzkz_boiez5 ads-ui-atm_12itgy1_dcxj7s ads-ui-atm_1o7ozsh_dcxj7s ads-ui-atm_1wf0rum_1urt87q ads-ui-atm_h5r38d_1urt87q ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_snw50q_1627y59 ads-ui-atm_140esw6_1627y59 ads-ui-atm_1fpt21x_1627y59 ads-ui-atm_3v15jc_1627y59 ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_174zlj6_73adwj ads-ui-atm_168r6ku_8o97w ads-ui-atm_smau91_1r1dq30 ads-ui-atm_jwwj6z_1wskm3t ads-ui-atm_1qd811_1wskm3t ads-ui-atm_p68de7_1wskm3t ads-ui-atm_4jiwlx_1wskm3t ads-ui-atm_1jhk75u_1mfz0iu ads-ui-atm_16ku829_moeofi ads-ui-atm_4luhvg_2iq75o ads-ui-atm_6zeuib_15wi45 ads-ui-atm_14bywhv_nqa18y ads-ui-atm_1alf0zp_1q9ccgz ads-ui-atm_v6ol6z_116y0ak ads-ui-atm_1ok0m1g_idpfg4 ads-ui-atm_1f681zj_idpfg4 ads-ui-atm_1r1u0b6_1wugsn5 ads-ui-atm_ey5ueq_1h6ojuz ads-ui-atm_mi4h01_1h6ojuz ads-ui-atm_13o1j2w_5mvnfr ads-ui-atm_1gkvs5j_5mvnfr ads-ui-atm_1t0hcy6_1ulexfb ads-ui-atm_1ldb813_idpfg4 ads-ui-atm_1rgssx1_5mvnfr ads-ui-atm_12szd53_1aou828 ads-ui-atm_8rfqtx_13zt0f8 ads-ui-atm_1vppilz_glywfm":a===void 0?"ds-toolbar-button ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_xypucb ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_9pzzkz_bk76yf ads-ui-atm_12itgy1_dcxj7s ads-ui-atm_1o7ozsh_dcxj7s ads-ui-atm_1wf0rum_99w7cs ads-ui-atm_h5r38d_99w7cs ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1ft0qzd_hnzbge ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_174zlj6_73adwj ads-ui-atm_168r6ku_hnzbge ads-ui-atm_smau91_1wskm3t ads-ui-atm_jwwj6z_pt45zb ads-ui-atm_1qd811_pt45zb ads-ui-atm_p68de7_pt45zb ads-ui-atm_4jiwlx_pt45zb ads-ui-atm_t9t2pt_hnzbge ads-ui-atm_1dpiaj6_1wskm3t ads-ui-atm_1e5cc9n_pt45zb ads-ui-atm_119z8oz_pt45zb ads-ui-atm_8mfi5f_pt45zb ads-ui-atm_1semnwh_pt45zb ads-ui-atm_y4zjrh_hnzbge ads-ui-atm_1qpv5ur_1wskm3t ads-ui-atm_j4826l_pt45zb ads-ui-atm_16pdr53_pt45zb ads-ui-atm_13px4ts_pt45zb ads-ui-atm_obvrxk_pt45zb ads-ui-atm_180qrgb_hnzbge ads-ui-atm_jcwxs_1wskm3t ads-ui-atm_1bo2zy0_pt45zb ads-ui-atm_149zco_pt45zb ads-ui-atm_3p8ee7_pt45zb ads-ui-atm_zlcsif_pt45zb ads-ui-atm_1jhk75u_1mfz0iu ads-ui-atm_16ku829_moeofi ads-ui-atm_4luhvg_2iq75o ads-ui-atm_6zeuib_15wi45 ads-ui-atm_14bywhv_nqa18y ads-ui-atm_1alf0zp_1q9ccgz ads-ui-atm_1vppilz_glywfm":"ds-toolbar-button ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_xypucb ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_9pzzkz_boiez5 ads-ui-atm_12itgy1_dcxj7s ads-ui-atm_1o7ozsh_dcxj7s ads-ui-atm_1wf0rum_1urt87q ads-ui-atm_h5r38d_1urt87q ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1ft0qzd_hnzbge ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_174zlj6_73adwj ads-ui-atm_168r6ku_hnzbge ads-ui-atm_smau91_1wskm3t ads-ui-atm_jwwj6z_pt45zb ads-ui-atm_1qd811_pt45zb ads-ui-atm_p68de7_pt45zb ads-ui-atm_4jiwlx_pt45zb ads-ui-atm_t9t2pt_hnzbge ads-ui-atm_1dpiaj6_1wskm3t ads-ui-atm_1e5cc9n_pt45zb ads-ui-atm_119z8oz_pt45zb ads-ui-atm_8mfi5f_pt45zb ads-ui-atm_1semnwh_pt45zb ads-ui-atm_y4zjrh_hnzbge ads-ui-atm_1qpv5ur_1wskm3t ads-ui-atm_j4826l_pt45zb ads-ui-atm_16pdr53_pt45zb ads-ui-atm_13px4ts_pt45zb ads-ui-atm_obvrxk_pt45zb ads-ui-atm_180qrgb_hnzbge ads-ui-atm_jcwxs_1wskm3t ads-ui-atm_1bo2zy0_pt45zb ads-ui-atm_149zco_pt45zb ads-ui-atm_3p8ee7_pt45zb ads-ui-atm_zlcsif_pt45zb ads-ui-atm_1jhk75u_1mfz0iu ads-ui-atm_16ku829_moeofi ads-ui-atm_4luhvg_2iq75o ads-ui-atm_6zeuib_15wi45 ads-ui-atm_14bywhv_nqa18y ads-ui-atm_1alf0zp_1q9ccgz ads-ui-atm_v6ol6z_116y0ak ads-ui-atm_1ok0m1g_idpfg4 ads-ui-atm_1f681zj_idpfg4 ads-ui-atm_1r1u0b6_1wugsn5 ads-ui-atm_ey5ueq_1h6ojuz ads-ui-atm_mi4h01_1h6ojuz ads-ui-atm_13o1j2w_5mvnfr ads-ui-atm_1gkvs5j_5mvnfr ads-ui-atm_1t0hcy6_1ulexfb ads-ui-atm_1ldb813_idpfg4 ads-ui-atm_1rgssx1_5mvnfr ads-ui-atm_12szd53_1aou828 ads-ui-atm_8rfqtx_13zt0f8 ads-ui-atm_1vppilz_glywfm":b==="outlined"?"ds-toolbar-button ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_xypucb ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_9pzzkz_1cf0bhj ads-ui-atm_12itgy1_10dwebu ads-ui-atm_1o7ozsh_10dwebu ads-ui-atm_1wf0rum_9ihi2p ads-ui-atm_h5r38d_9ihi2p ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_snw50q_1627y59 ads-ui-atm_140esw6_1627y59 ads-ui-atm_1fpt21x_1627y59 ads-ui-atm_3v15jc_1627y59 ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_174zlj6_73adwj ads-ui-atm_168r6ku_8o97w ads-ui-atm_smau91_1r1dq30 ads-ui-atm_jwwj6z_1wskm3t ads-ui-atm_1qd811_1wskm3t ads-ui-atm_p68de7_1wskm3t ads-ui-atm_4jiwlx_1wskm3t ads-ui-atm_1jhk75u_1mfz0iu ads-ui-atm_16ku829_moeofi ads-ui-atm_4luhvg_2iq75o ads-ui-atm_6zeuib_15wi45 ads-ui-atm_14bywhv_nqa18y ads-ui-atm_v6ol6z_116y0ak ads-ui-atm_1ok0m1g_idpfg4 ads-ui-atm_1f681zj_idpfg4 ads-ui-atm_1r1u0b6_1wugsn5 ads-ui-atm_ey5ueq_1h6ojuz ads-ui-atm_mi4h01_1h6ojuz ads-ui-atm_13o1j2w_5mvnfr ads-ui-atm_1gkvs5j_5mvnfr ads-ui-atm_1t0hcy6_1ulexfb ads-ui-atm_1ldb813_idpfg4 ads-ui-atm_1rgssx1_5mvnfr ads-ui-atm_12szd53_1aou828 ads-ui-atm_8rfqtx_13zt0f8 ads-ui-atm_1vppilz_glywfm":"ds-toolbar-button ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_xypucb ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_9pzzkz_1cf0bhj ads-ui-atm_12itgy1_10dwebu ads-ui-atm_1o7ozsh_10dwebu ads-ui-atm_1wf0rum_9ihi2p ads-ui-atm_h5r38d_9ihi2p ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1ft0qzd_hnzbge ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_174zlj6_73adwj ads-ui-atm_168r6ku_hnzbge ads-ui-atm_smau91_1wskm3t ads-ui-atm_jwwj6z_pt45zb ads-ui-atm_1qd811_pt45zb ads-ui-atm_p68de7_pt45zb ads-ui-atm_4jiwlx_pt45zb ads-ui-atm_t9t2pt_hnzbge ads-ui-atm_1dpiaj6_1wskm3t ads-ui-atm_1e5cc9n_pt45zb ads-ui-atm_119z8oz_pt45zb ads-ui-atm_8mfi5f_pt45zb ads-ui-atm_1semnwh_pt45zb ads-ui-atm_y4zjrh_hnzbge ads-ui-atm_1qpv5ur_1wskm3t ads-ui-atm_j4826l_pt45zb ads-ui-atm_16pdr53_pt45zb ads-ui-atm_13px4ts_pt45zb ads-ui-atm_obvrxk_pt45zb ads-ui-atm_180qrgb_hnzbge ads-ui-atm_jcwxs_1wskm3t ads-ui-atm_1bo2zy0_pt45zb ads-ui-atm_149zco_pt45zb ads-ui-atm_3p8ee7_pt45zb ads-ui-atm_zlcsif_pt45zb ads-ui-atm_1jhk75u_1mfz0iu ads-ui-atm_16ku829_moeofi ads-ui-atm_4luhvg_2iq75o ads-ui-atm_6zeuib_15wi45 ads-ui-atm_14bywhv_nqa18y ads-ui-atm_v6ol6z_116y0ak ads-ui-atm_1ok0m1g_idpfg4 ads-ui-atm_1f681zj_idpfg4 ads-ui-atm_1r1u0b6_1wugsn5 ads-ui-atm_ey5ueq_1h6ojuz ads-ui-atm_mi4h01_1h6ojuz ads-ui-atm_13o1j2w_5mvnfr ads-ui-atm_1gkvs5j_5mvnfr ads-ui-atm_1t0hcy6_1ulexfb ads-ui-atm_1ldb813_idpfg4 ads-ui-atm_1rgssx1_5mvnfr ads-ui-atm_12szd53_1aou828 ads-ui-atm_8rfqtx_13zt0f8 ads-ui-atm_1vppilz_glywfm","aria-label":s?t:void 0,title:i??(s?t:void 0),disabled:o,hidden:r,"aria-pressed":n,"aria-current":u?"page":void 0,"aria-expanded":l,"aria-controls":h,popoverTarget:p,"data-section":v,"data-enabled":d===void 0?void 0:String(d),onClick:g,children:[a!==void 0&&m("span",{className:"ds-toolbar-glyph","aria-hidden":"true",dangerouslySetInnerHTML:{__html:{brand:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 1.5 9.9 5.6l4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5L8 1.5Z"/></svg>
|
|
122
|
+
`,"chevron-down":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 6 4 4 4-4"/></svg>
|
|
123
|
+
`,"chevron-left":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4l-4 4 4 4"/></svg>
|
|
124
|
+
`,"chevron-right":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 4 4 4-4 4"/></svg>
|
|
125
|
+
`,"chevron-up":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 10 4-4 4 4"/></svg>
|
|
126
|
+
`,close:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 4 8 8M12 4l-8 8"/></svg>
|
|
127
|
+
`,components:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7L8 1Zm-6 3.5 6 3.5 6-3.5M8 8v7"/></svg>
|
|
128
|
+
`,mocks:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>
|
|
129
|
+
`,drafts:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 1h7l3 3v11H3zM10 1v4h3M5 8h6M5 11h4"/></svg>
|
|
130
|
+
`,"guide-bounds":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3.5" width="12" height="9"/></svg>
|
|
131
|
+
`,"guide-gaps":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="3" width="3.5" height="10"/><rect x="6.25" y="3" width="3.5" height="10"/><rect x="11" y="3" width="3.5" height="10"/></svg>
|
|
132
|
+
`,"guide-margins":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11" stroke-dasharray="1.5 1.5"/><rect x="4.5" y="5.5" width="7" height="5"/></svg>
|
|
133
|
+
`,"guide-mini":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2v12M6 2v12M10 2v12M14 2v12M2 2h12M2 6h12M2 10h12M2 14h12" stroke-width="1"/></svg>
|
|
134
|
+
`,"guide-padding":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11"/><rect x="4.5" y="5.5" width="7" height="5" stroke-dasharray="1.5 1.5"/></svg>
|
|
135
|
+
`,"guide-tracks":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 2v12M6 2v12M10 2v12M13.5 2v12"/></svg>
|
|
136
|
+
`,icons:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="5" r="2.5"/><rect x="9.5" y="2.5" width="4" height="5" rx="1"/><path d="m2.5 13.5 2.5-4 2.5 4ZM9.5 11.5h4M11.5 9.5v4"/></svg>
|
|
137
|
+
`,layout:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v12M6.5 2v12M9.5 2v12M13 2v12"/></svg>
|
|
138
|
+
`,moon:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg>
|
|
139
|
+
`,patterns:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>
|
|
140
|
+
`,phone:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg>
|
|
141
|
+
`,profiles:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h8v5H2V3Zm4 5v2.5h8V14H6v-3.5"/></svg>
|
|
142
|
+
`,source:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m5 4-4 4 4 4m6-8 4 4-4 4M9 2 7 14"/></svg>
|
|
143
|
+
`,split:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1" y="2" width="14" height="12" rx="1"/><path d="M8 2v12"/></svg>
|
|
144
|
+
`,"state-building":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="building" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="22 10"/></svg>
|
|
145
|
+
`,"state-checking":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="checking" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="3 3"/></svg>
|
|
146
|
+
`,"state-error":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="error" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" fill="currentColor" stroke="none"/></svg>
|
|
147
|
+
`,"state-ready":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="ready" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5"/></svg>
|
|
148
|
+
`,"state-stale":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="stale" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="2 3"/></svg>
|
|
149
|
+
`,"state-unreported":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="unreported" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/></svg>
|
|
150
|
+
`,sun:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1M8 14v1M1 8h1M14 8h1M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg>
|
|
151
|
+
`,tokens:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 6 3-6 3-6-3 6-3Zm-6 6 6 3 6-3M2 11l6 3 6-3"/></svg>
|
|
152
|
+
`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 7 12H1L8 2Z"/><path d="M8 6v3M8 11v.5"/></svg>
|
|
153
|
+
`}[a]}},void 0,!1,void 0,this),!s&&m("span",{className:"ds-toolbar-label",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function RS({id:e,label:t,icon:a,pressed:s=!1,disabled:i,quiet:o=!1,className:r,onClick:n}){let u=o===!1?"ds-toggle-tile ads-ui-atm_krmq3d_116y0ak ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_xypucb ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_9pzzkz_r0828y ads-ui-atm_12itgy1_udrty0 ads-ui-atm_1o7ozsh_udrty0 ads-ui-atm_1wf0rum_vwskin ads-ui-atm_h5r38d_vwskin ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1ft0qzd_hnzbge ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_174zlj6_73adwj ads-ui-atm_168r6ku_hnzbge ads-ui-atm_smau91_1mqbmot ads-ui-atm_jwwj6z_pt45zb ads-ui-atm_1qd811_pt45zb ads-ui-atm_p68de7_pt45zb ads-ui-atm_4jiwlx_pt45zb ads-ui-atm_1qpv5ur_1r1dq30 ads-ui-atm_j4826l_pt45zb ads-ui-atm_16pdr53_pt45zb ads-ui-atm_13px4ts_pt45zb ads-ui-atm_obvrxk_pt45zb ads-ui-atm_1jhk75u_1mfz0iu ads-ui-atm_16ku829_moeofi ads-ui-atm_4luhvg_2iq75o ads-ui-atm_6zeuib_15wi45 ads-ui-atm_14bywhv_nqa18y ads-ui-atm_gktsyi_idpfg4 ads-ui-atm_2h0o9p_fg65tv ads-ui-atm_zleifh_116y0ak ads-ui-atm_8t2vr7_idpfg4 ads-ui-atm_1obf0hf_idpfg4 ads-ui-atm_1l229uo_1wugsn5 ads-ui-atm_o8zvh8_1h6ojuz ads-ui-atm_19oqyvg_1h6ojuz ads-ui-atm_1opa5ue_igxdd5 ads-ui-atm_1hzjabk_igxdd5 ads-ui-atm_4t75hh_1ulexfb ads-ui-atm_1k8z0bo_idpfg4 ads-ui-atm_qq3u1k_igxdd5 ads-ui-atm_1q5mrj8_14k5dlv ads-ui-atm_1af1oj_1q9vzh7":"ds-toggle-tile ads-ui-atm_krmq3d_116y0ak ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_xypucb ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_9pzzkz_r0828y ads-ui-atm_12itgy1_udrty0 ads-ui-atm_1o7ozsh_udrty0 ads-ui-atm_1wf0rum_vwskin ads-ui-atm_h5r38d_vwskin ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1ft0qzd_hnzbge ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_174zlj6_73adwj ads-ui-atm_168r6ku_hnzbge ads-ui-atm_smau91_1mqbmot ads-ui-atm_jwwj6z_pt45zb ads-ui-atm_1qd811_pt45zb ads-ui-atm_p68de7_pt45zb ads-ui-atm_4jiwlx_pt45zb ads-ui-atm_y4zjrh_hnzbge ads-ui-atm_1qpv5ur_1mqbmot ads-ui-atm_j4826l_pt45zb ads-ui-atm_16pdr53_pt45zb ads-ui-atm_13px4ts_pt45zb ads-ui-atm_obvrxk_pt45zb ads-ui-atm_1jhk75u_1mfz0iu ads-ui-atm_16ku829_moeofi ads-ui-atm_4luhvg_2iq75o ads-ui-atm_6zeuib_15wi45 ads-ui-atm_14bywhv_nqa18y ads-ui-atm_gktsyi_idpfg4 ads-ui-atm_2h0o9p_fg65tv ads-ui-atm_zleifh_116y0ak ads-ui-atm_8t2vr7_idpfg4 ads-ui-atm_1obf0hf_idpfg4 ads-ui-atm_1l229uo_1wugsn5 ads-ui-atm_o8zvh8_1h6ojuz ads-ui-atm_19oqyvg_1h6ojuz ads-ui-atm_1opa5ue_igxdd5 ads-ui-atm_1hzjabk_igxdd5 ads-ui-atm_4t75hh_1ulexfb ads-ui-atm_1k8z0bo_idpfg4 ads-ui-atm_qq3u1k_igxdd5 ads-ui-atm_1q5mrj8_14k5dlv ads-ui-atm_1af1oj_1q9vzh7";return m("button",{id:e,type:"button",className:r?u+" "+r:u,"aria-pressed":s,disabled:i,onClick:n,children:[m("span",{className:"ds-tile-glyph","aria-hidden":"true",dangerouslySetInnerHTML:{__html:{brand:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 1.5 9.9 5.6l4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5L8 1.5Z"/></svg>
|
|
154
|
+
`,"chevron-down":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 6 4 4 4-4"/></svg>
|
|
155
|
+
`,"chevron-left":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4l-4 4 4 4"/></svg>
|
|
156
|
+
`,"chevron-right":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 4 4 4-4 4"/></svg>
|
|
157
|
+
`,"chevron-up":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 10 4-4 4 4"/></svg>
|
|
158
|
+
`,close:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 4 8 8M12 4l-8 8"/></svg>
|
|
159
|
+
`,components:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7L8 1Zm-6 3.5 6 3.5 6-3.5M8 8v7"/></svg>
|
|
160
|
+
`,mocks:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>
|
|
161
|
+
`,drafts:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 1h7l3 3v11H3zM10 1v4h3M5 8h6M5 11h4"/></svg>
|
|
162
|
+
`,"guide-bounds":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3.5" width="12" height="9"/></svg>
|
|
163
|
+
`,"guide-gaps":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="3" width="3.5" height="10"/><rect x="6.25" y="3" width="3.5" height="10"/><rect x="11" y="3" width="3.5" height="10"/></svg>
|
|
164
|
+
`,"guide-margins":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11" stroke-dasharray="1.5 1.5"/><rect x="4.5" y="5.5" width="7" height="5"/></svg>
|
|
165
|
+
`,"guide-mini":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2v12M6 2v12M10 2v12M14 2v12M2 2h12M2 6h12M2 10h12M2 14h12" stroke-width="1"/></svg>
|
|
166
|
+
`,"guide-padding":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11"/><rect x="4.5" y="5.5" width="7" height="5" stroke-dasharray="1.5 1.5"/></svg>
|
|
167
|
+
`,"guide-tracks":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 2v12M6 2v12M10 2v12M13.5 2v12"/></svg>
|
|
168
|
+
`,icons:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="5" r="2.5"/><rect x="9.5" y="2.5" width="4" height="5" rx="1"/><path d="m2.5 13.5 2.5-4 2.5 4ZM9.5 11.5h4M11.5 9.5v4"/></svg>
|
|
169
|
+
`,layout:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v12M6.5 2v12M9.5 2v12M13 2v12"/></svg>
|
|
170
|
+
`,moon:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg>
|
|
171
|
+
`,patterns:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>
|
|
172
|
+
`,phone:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg>
|
|
173
|
+
`,profiles:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h8v5H2V3Zm4 5v2.5h8V14H6v-3.5"/></svg>
|
|
174
|
+
`,source:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m5 4-4 4 4 4m6-8 4 4-4 4M9 2 7 14"/></svg>
|
|
175
|
+
`,split:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1" y="2" width="14" height="12" rx="1"/><path d="M8 2v12"/></svg>
|
|
176
|
+
`,"state-building":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="building" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="22 10"/></svg>
|
|
177
|
+
`,"state-checking":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="checking" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="3 3"/></svg>
|
|
178
|
+
`,"state-error":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="error" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" fill="currentColor" stroke="none"/></svg>
|
|
179
|
+
`,"state-ready":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="ready" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5"/></svg>
|
|
180
|
+
`,"state-stale":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="stale" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="2 3"/></svg>
|
|
181
|
+
`,"state-unreported":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="unreported" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/></svg>
|
|
182
|
+
`,sun:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1M8 14v1M1 8h1M14 8h1M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg>
|
|
183
|
+
`,tokens:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 6 3-6 3-6-3 6-3Zm-6 6 6 3 6-3M2 11l6 3 6-3"/></svg>
|
|
184
|
+
`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 7 12H1L8 2Z"/><path d="M8 6v3M8 11v.5"/></svg>
|
|
185
|
+
`}[a]}},void 0,!1,void 0,this),m("span",{className:"ds-tile-label",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function qS({label:e,onReplay:t,demo:a=!1,track:s="fixed",subject:i="dot"}){return m("span",{className:s==="fill"?"ds-motion-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_tv4kfj ads-ui-atm_82yulm_1osqo2v":"ds-motion-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_tv4kfj ads-ui-atm_ei944y_1osqo2v",children:[m("span",{className:s==="fill"?"ds-motion-track ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_1bhzfr9 ads-ui-atm_1be842k_12j2sah ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1ft0qzd_1u3842e":"ds-motion-track ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_82yulm_1s1m2dt ads-ui-atm_b1mxoe_1bhzfr9 ads-ui-atm_ei944y_1osqo2v","data-slot":"track","aria-hidden":"true",children:m("span",{className:"ds-motion-place ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_198vcvx_i47zc9 ads-ui-atm_61a05l_i47zc9 ads-ui-atm_hvdlxv_kb7nvz ads-ui-atm_12oa9cr_kb7nvz ads-ui-atm_yerqrn_senxqy ads-ui-atm_nc9etp_12ltuzy ads-ui-atm_1q7u3d_11z9w73 ads-ui-atm_d3kff5_kb7nvz ads-ui-atm_1d9vjom_1hrf63d ads-ui-atm_1aql0lh_12ijf1b ads-ui-atm_aiiotb_glywfm ads-ui-atm_1oszhv8_glywfm ads-ui-atm_11sfkpf_kb7nvz ads-ui-atm_y8vczb_kb7nvz","data-demo":a?"true":"false",children:[m("span",{className:i==="block"?"ds-motion-rest ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1hwk43k ads-ui-atm_b1mxoe_xlk6xj ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_snw50q_1627y59 ads-ui-atm_140esw6_1627y59 ads-ui-atm_1fpt21x_1627y59 ads-ui-atm_3v15jc_1627y59 ads-ui-atm_13prmim_nqa18y":"ds-motion-rest ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_xlk6xj ads-ui-atm_b1mxoe_xlk6xj ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_snw50q_1627y59 ads-ui-atm_140esw6_1627y59 ads-ui-atm_1fpt21x_1627y59 ads-ui-atm_3v15jc_1627y59 ads-ui-atm_13prmim_nqa18y"},void 0,!1,void 0,this),m("span",{className:i==="block"?"ds-motion-dot ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1hwk43k ads-ui-atm_b1mxoe_xlk6xj ads-ui-atm_1ft0qzd_mrwupb":"ds-motion-dot ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_xlk6xj ads-ui-atm_b1mxoe_xlk6xj ads-ui-atm_1ft0qzd_mrwupb","data-slot":"dot"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),t&&m(Ze,{label:"Replay",title:`Replay ${e}`,variant:"outlined",onClick:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function jS({profile:e,example:t,columns:a,caption:s}){let i=Array.from({length:a},(o,r)=>r+1);return m("div",{className:"ux-grid-example ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_10lap3l",children:[m("p",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_ei944y_1agt12q ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4","aria-live":"polite","data-slot":"caption",children:s},void 0,!1,void 0,this),m("div",{className:"ux-grid-stage ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1ft0qzd_1bplolx",children:m("section",{className:"ads-grid-example ads-ui-atm_1ft0qzd_xktkfw ads-ui-atm_snw50q_1b6oztu ads-ui-atm_140esw6_1b6oztu ads-ui-atm_1fpt21x_1b6oztu ads-ui-atm_3v15jc_1b6oztu","data-ads-profile":e,"data-ads-example":t,"data-ads-source":`ads-preview-facts.json#grids/${e}`,"aria-label":`${e} ${t} grid example`,children:i.map((o)=>m("div",{className:"ads-grid-cell ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_mrub5a ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_snw50q_xktkfw ads-ui-atm_140esw6_xktkfw ads-ui-atm_1fpt21x_xktkfw ads-ui-atm_3v15jc_xktkfw ads-ui-atm_1cgskd2_l6f2xw ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y",children:o},o,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function PS({profile:e,token:t,label:a}){return m("div",{className:"ads-grid-unit ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_snw50q_icygq7 ads-ui-atm_140esw6_icygq7 ads-ui-atm_1fpt21x_icygq7 ads-ui-atm_3v15jc_icygq7 ads-ui-atm_13prmim_nqa18y ads-ui-atm_khssdj_l6f2xw ads-ui-atm_1oetkxo_1m800s6 ads-ui-atm_u7pw7p_1phvqmz ads-ui-atm_19fjwwo_el7ql6 ads-ui-atm_72ivqy_1q9ccgz","data-ads-profile":e,"data-ads-source":"ads-preview-facts.json#mini-unit","aria-label":`Mini unit ${t}`,"data-slot":"value",children:m("span",{className:"ux-grid-unit-label",children:a},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function TS({failed:e=!1,problem:t,grid:a,centre:s}){if(a!==void 0)return m("span",{className:"ds-artwork-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_1pyo15j ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_9pzzkz_1pyo15j ads-ui-atm_ei944y_1osqo2v",children:m("span",{className:"ds-artwork-frame ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_198vcvx_i47zc9 ads-ui-atm_61a05l_i47zc9 ads-ui-atm_1ft0qzd_6lcubb ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_6mvq8n_kb7nvz ads-ui-atm_1lyqywg_kb7nvz ads-ui-atm_wv00yy_kb7nvz ads-ui-atm_qaf3f8_kb7nvz","data-slot":"frame",children:[m("span",{className:"ds-artwork-guides",children:m(Qv,{box:a,...s===void 0?{}:{centre:s}},void 0,!1,void 0,this)},void 0,!1,void 0,this),m("span",{className:"ds-artwork-drawing","data-slot":"drawing"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return m("span",{className:"ds-artwork-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_1pyo15j ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_9pzzkz_1pyo15j ads-ui-atm_ei944y_1osqo2v","data-slot":"drawing",children:e&&m("span",{className:"ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6","data-slot":"problem",children:t},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var CS="",ES="",$S="";function MS({name:e,value:t}){return m("div",{className:"ds-applied-gap ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_10lap3l ads-ui-atm_82yulm_1osqo2v ads-ui-atm_10uybn5_rhlbdi ads-ui-atm_1vc176k_10of7rf ads-ui-atm_5c4rkd_l05n6q ads-ui-atm_1felhty_el7ql6 ads-ui-atm_10ncv82_1mqbmot ads-ui-atm_4g6x5j_1q9ccgz ads-ui-atm_1ip4gf9_l6f2xw ads-ui-atm_1szkk92_10of7rf ads-ui-atm_9rgl7n_l05n6q ads-ui-atm_wybagy_el7ql6 ads-ui-atm_q4rprj_1r1dq30 ads-ui-atm_gr9ghw_1q9ccgz ads-ui-atm_1tsa39m_15vqwwr ads-ui-atm_ydz2z6_1l2sidv ads-ui-atm_16a8qmn_idpfg4 ads-ui-atm_1ki4dcq_kb7nvz ads-ui-atm_13cexai_kb7nvz ads-ui-atm_1y5b2x0_idpfg4","data-gap":e,children:[m("span",{className:"ds-applied-gap-pair ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_ei944y_1osqo2v",children:[m("span",{className:"ds-applied-gap-block ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1al5sl6 ads-ui-atm_b1mxoe_14w14kp ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30"},void 0,!1,void 0,this),m("span",{className:"ds-applied-gap-space","data-slot":"value"},void 0,!1,void 0,this),m("span",{className:"ds-applied-gap-block ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1al5sl6 ads-ui-atm_b1mxoe_14w14kp ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m("span",{className:"ds-applied-gap-name",children:e},void 0,!1,void 0,this),m("span",{className:"ds-applied-gap-text",title:t,children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Ev({shape:e,content:t,outlined:a=!1,glyph:s=!1,staged:i=!1}){let o=i?$S:a?ES:CS;if(e==="visual")return m("span",{className:"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_1osqo2v ads-ui-atm_d5sx0j_l6f2xw ads-ui-atm_ldi5i5_10of7rf ads-ui-atm_1jf42fn_l05n6q ads-ui-atm_1oayeuc_el7ql6 ads-ui-atm_1bml8gq_1mqbmot ads-ui-atm_f3e24j_1q9ccgz","data-slot":"value","data-shape":"visual",children:[m("span",{className:"ds-applied-glyph ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_mrub5a ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_snw50q_1b6oztu ads-ui-atm_140esw6_1b6oztu ads-ui-atm_1fpt21x_1b6oztu ads-ui-atm_3v15jc_1b6oztu ads-ui-atm_13prmim_nqa18y","data-slot":"glyph"},void 0,!1,void 0,this),m("span",{className:"ds-applied-size","data-slot":"size"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(e==="text"&&s)return m("span",{className:"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_14jszr6 ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6","data-slot":"value","data-shape":"text",children:[m("span",{className:"ds-applied-glyph ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_mrub5a ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_snw50q_1b6oztu ads-ui-atm_140esw6_1b6oztu ads-ui-atm_1fpt21x_1b6oztu ads-ui-atm_3v15jc_1b6oztu ads-ui-atm_13prmim_nqa18y","data-slot":"glyph"},void 0,!1,void 0,this),m("span",{"data-slot":"text",children:"Name"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(e==="control")return m("span",{className:"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_14jszr6 ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6","data-slot":"value","data-shape":"control",children:[s&&m("span",{className:"ds-applied-glyph ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_mrub5a ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_snw50q_1b6oztu ads-ui-atm_140esw6_1b6oztu ads-ui-atm_1fpt21x_1b6oztu ads-ui-atm_3v15jc_1b6oztu ads-ui-atm_13prmim_nqa18y","data-slot":"glyph"},void 0,!1,void 0,this),m("span",{"data-slot":"text",children:"Label"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);switch(t){case"blocks":return m("span",{className:i===!1?a===!1?"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_1wnhlda_an4usv ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_keram9 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_9pzzkz_dx4awi ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_tkroio_1g80g66 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y","data-slot":"value","data-shape":e,children:[m("span",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6",children:"One"},void 0,!1,void 0,this),m("span",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6",children:"Two"},void 0,!1,void 0,this),m("span",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6",children:"Three"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"block":return m("span",{className:i===!1?a===!1?"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_1wnhlda_an4usv ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_keram9 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_9pzzkz_dx4awi ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_tkroio_1g80g66 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y","data-slot":"value","data-shape":e,children:m("span",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6",children:"content"},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"text":return m("span",{className:i===!1?a===!1?"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_1wnhlda_an4usv ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_keram9 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_9pzzkz_dx4awi ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_tkroio_1g80g66 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y","data-slot":"value","data-shape":e,children:"Ag 123 The quick brown fox"},void 0,!1,void 0,this);case"label":return m("span",{className:i===!1?a===!1?"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_1wnhlda_an4usv ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_keram9 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_9pzzkz_dx4awi ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_tkroio_1g80g66 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y","data-slot":"value","data-shape":e,children:"Sample"},void 0,!1,void 0,this);case"empty":return m("span",{className:i===!1?a===!1?"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_1wnhlda_an4usv ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_keram9 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_ei944y_14jszr6 ads-ui-atm_9pzzkz_dx4awi ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y":"ds-applied-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_tkroio_1g80g66 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_13prmim_nqa18y","data-slot":"value","data-shape":e},void 0,!1,void 0,this)}}function NS({shape:e,content:t,outlined:a=!1,glyph:s=!1,staged:i=!1}){if(i)return m("span",{className:"ds-applied-staging ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_1i6ovat_rhlbdi ads-ui-atm_1d37oce_1m800s6 ads-ui-atm_1hv33ix_1phvqmz ads-ui-atm_idw1d5_el7ql6 ads-ui-atm_g56oaw_1mqbmot ads-ui-atm_19xoug5_glywfm",children:[m("span",{className:"ds-applied-stage ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_rlc0ar_v2br90 ads-ui-atm_82yulm_mt9npp ads-ui-atm_b1mxoe_keram9 ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_snw50q_icygq7 ads-ui-atm_140esw6_icygq7 ads-ui-atm_1fpt21x_icygq7 ads-ui-atm_3v15jc_icygq7 ads-ui-atm_1p75dy7_zryt35","data-slot":"stage",children:m("span",{className:"ds-applied-holder ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck","data-slot":"extent",children:m(Ev,{shape:e,content:t,outlined:a,glyph:s,staged:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),m("span",{className:"ds-applied-scale","data-slot":"scale",hidden:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return m(Ev,{shape:e,content:t,outlined:a,glyph:s},void 0,!1,void 0,this)}function IS({kind:e,curve:t=[0,0,1,1],large:a=!1}){switch(e){case"value":return null;case"paint":case"gradient":return m("div",{className:a===!1?"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_shx8i3 ads-ui-atm_b1mxoe_14w14kp ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_13prmim_nqa18y":"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_1n4ea0m ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_mrub5a ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_13prmim_nqa18y","data-slot":"value"},void 0,!1,void 0,this);case"shadow":return m("div",{className:a===!1?"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_shx8i3 ads-ui-atm_b1mxoe_14w14kp ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_13prmim_nqa18y":"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_1n4ea0m ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_mrub5a ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_13prmim_nqa18y","data-slot":"value"},void 0,!1,void 0,this);case"opacity":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_shx8i3 ads-ui-atm_b1mxoe_14w14kp ads-ui-atm_1ft0qzd_mrwupb","data-slot":"value"},void 0,!1,void 0,this);case"gap":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_ei944y_1osqo2v",children:[m("span",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1al5sl6 ads-ui-atm_b1mxoe_14w14kp ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30"},void 0,!1,void 0,this),m("span",{"data-slot":"value"},void 0,!1,void 0,this),m("span",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1al5sl6 ads-ui-atm_b1mxoe_14w14kp ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"inset":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_snw50q_1b6oztu ads-ui-atm_140esw6_1b6oztu ads-ui-atm_1fpt21x_1b6oztu ads-ui-atm_3v15jc_1b6oztu ads-ui-atm_13prmim_nqa18y","data-slot":"value",children:m("span",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1al5sl6 ads-ui-atm_b1mxoe_14w14kp ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30"},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"control":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_mrub5a ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_13prmim_nqa18y","data-slot":"value",children:"Label"},void 0,!1,void 0,this);case"blur":case"scale":case"angle":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_shx8i3 ads-ui-atm_b1mxoe_14w14kp ads-ui-atm_1ft0qzd_mrwupb","data-slot":"value"},void 0,!1,void 0,this);case"word-spacing":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1o67g9_1ykzqm ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_12mizij_rhlbdi ads-ui-atm_1hko9lo_1c8rstr ads-ui-atm_q1jxiv_1d7pcef ads-ui-atm_1oe3fha_el7ql6 ads-ui-atm_whbzn7_1r1dq30 ads-ui-atm_z87c5f_1q9ccgz",children:m("span",{className:"ds-token-type-text","data-slot":"value",children:"Two words apart"},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"font-stretch":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1o67g9_1ykzqm ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_12mizij_rhlbdi ads-ui-atm_1hko9lo_1c8rstr ads-ui-atm_q1jxiv_1d7pcef ads-ui-atm_1oe3fha_el7ql6 ads-ui-atm_whbzn7_1r1dq30 ads-ui-atm_z87c5f_1q9ccgz",children:m("span",{className:"ds-token-type-text","data-slot":"value",children:"Ag 123"},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"size":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_mrub5a ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_snw50q_1b6oztu ads-ui-atm_140esw6_1b6oztu ads-ui-atm_1fpt21x_1b6oztu ads-ui-atm_3v15jc_1b6oztu ads-ui-atm_13prmim_nqa18y","data-slot":"value"},void 0,!1,void 0,this);case"radius":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_shx8i3 ads-ui-atm_b1mxoe_shx8i3 ads-ui-atm_rke6hk_1hb2d2j ads-ui-atm_6hwe7p_1hb2d2j ads-ui-atm_1tc06ke_1hb2d2j ads-ui-atm_1o6fuj3_1hb2d2j ads-ui-atm_snw50q_1627y59 ads-ui-atm_140esw6_1627y59 ads-ui-atm_1fpt21x_1627y59 ads-ui-atm_3v15jc_1627y59 ads-ui-atm_13prmim_nqa18y","data-slot":"value"},void 0,!1,void 0,this);case"length":case"duration":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_b1mxoe_y8hl8n ads-ui-atm_ei944y_175o37c ads-ui-atm_1ft0qzd_mrwupb","data-slot":"value"},void 0,!1,void 0,this);case"border":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_10lap3l ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6",children:[m("div",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_shx8i3 ads-ui-atm_1ft0qzd_mrwupb","data-slot":"value"},void 0,!1,void 0,this),"8×"]},void 0,!0,void 0,this);case"font-family":case"font-size":case"font-weight":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1o67g9_1ykzqm ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_12mizij_rhlbdi ads-ui-atm_1hko9lo_1c8rstr ads-ui-atm_q1jxiv_1d7pcef ads-ui-atm_1oe3fha_el7ql6 ads-ui-atm_whbzn7_1r1dq30 ads-ui-atm_z87c5f_1q9ccgz",children:m("span",{className:"ds-token-type-text","data-slot":"value",children:"Ag 123"},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"line-height":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1o67g9_1ykzqm ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_12mizij_rhlbdi ads-ui-atm_1hko9lo_1c8rstr ads-ui-atm_q1jxiv_1d7pcef ads-ui-atm_1oe3fha_el7ql6 ads-ui-atm_whbzn7_1r1dq30 ads-ui-atm_z87c5f_1q9ccgz",children:m("span",{className:"ds-token-type-text","data-slot":"value",children:["First line",m("br",{},void 0,!1,void 0,this),"Second line"]},void 0,!0,void 0,this)},void 0,!1,void 0,this);case"letter-spacing":return m("div",{className:"ds-token-sample ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1o67g9_1ykzqm ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_12mizij_rhlbdi ads-ui-atm_1hko9lo_1c8rstr ads-ui-atm_q1jxiv_1d7pcef ads-ui-atm_1oe3fha_el7ql6 ads-ui-atm_whbzn7_1r1dq30 ads-ui-atm_z87c5f_1q9ccgz",children:m("span",{className:"ds-token-type-text","data-slot":"value",children:"Spacing"},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"easing":{let s=(i,o)=>`${+(i*40).toFixed(2)} ${+(40-o*40).toFixed(2)}`;return m("svg",{className:"ds-token-sample ds-token-curve ads-ui-atm_1nvlfri_1627y59 ads-ui-atm_7b4581_1y4oovw ads-ui-atm_19wz2ba_glywfm ads-ui-atm_1y151l1_ltqb7t ads-ui-atm_1arpsfw_1r1dq30 ads-ui-atm_qsg3ay_1y4oovw ads-ui-atm_1wxp0zn_glywfm ads-ui-atm_645v98_ltqb7t",viewBox:"-2 -12 44 64",width:"44",height:"64","aria-hidden":"true",focusable:"false",children:[m("path",{className:"ds-token-curve-axes",d:"M0 0V40H40",fill:"none"},void 0,!1,void 0,this),m("path",{className:"ds-token-curve-path",d:`M${s(0,0)} C${s(t[0],t[1])} ${s(t[2],t[3])} ${s(1,1)}`,fill:"none"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}}}function OS({theme:e,value:t}){return m("div",{className:"ds-theme-swatch ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_10lap3l ads-ui-atm_82yulm_1osqo2v ads-ui-atm_4n1o6l_rhlbdi ads-ui-atm_1051aiu_10of7rf ads-ui-atm_pmvhht_l05n6q ads-ui-atm_ufanra_el7ql6 ads-ui-atm_1c1v3hl_1mqbmot ads-ui-atm_13r2o1p_1q9ccgz ads-ui-atm_1qbpuis_1l0jffh ads-ui-atm_1k0j8m5_usvi9m ads-ui-atm_il1iry_14w14kp ads-ui-atm_ixid8u_14w14kp ads-ui-atm_1f15vzq_mrub5a ads-ui-atm_p1sdc5_l6f2xw ads-ui-atm_1x2hnlt_10of7rf ads-ui-atm_9fohhf_l05n6q ads-ui-atm_gndkln_el7ql6 ads-ui-atm_5a96ju_1r1dq30 ads-ui-atm_1fftqwl_1q9ccgz ads-ui-atm_1lt77y2_15vqwwr ads-ui-atm_oa24eh_1l2sidv ads-ui-atm_178q4ln_idpfg4 ads-ui-atm_1kk5gcz_kb7nvz ads-ui-atm_uy0mrn_kb7nvz ads-ui-atm_epr68i_idpfg4","data-theme-name":e,children:[m("span",{className:"ds-theme-swatch-value","data-slot":"value"},void 0,!1,void 0,this),m("span",{className:"ds-theme-swatch-name",children:e},void 0,!1,void 0,this),m("span",{className:"ds-theme-swatch-text",title:t,children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function AS({label:e}){return m("span",{className:"ds-brand-mark ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_833615_idpfg4 ads-ui-atm_1yau7nr_116y0ak ads-ui-atm_ik8dk7_idpfg4 ads-ui-atm_10n6ic1_idpfg4 ads-ui-atm_1rm5hfv_1wugsn5 ads-ui-atm_1qvwhgx_1h6ojuz ads-ui-atm_4w6e92_1h6ojuz ads-ui-atm_1qa4lcj_5mvnfr ads-ui-atm_5i24v3_5mvnfr ads-ui-atm_1q1auil_1ulexfb ads-ui-atm_1hq7lks_idpfg4 ads-ui-atm_7bwpk7_5mvnfr ads-ui-atm_172pvmf_1aou828 ads-ui-atm_yncdph_13zt0f8 ads-ui-atm_1807fgz_1mkhkgf ads-ui-atm_o8lr5l_1ftk4im ads-ui-atm_p2k79o_hb3y7h",role:e?"img":void 0,"aria-label":e,"aria-hidden":e?void 0:!0,children:m("span",{className:"ds-brand-mark-visual",dangerouslySetInnerHTML:{__html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><title>ADS — Eye in the grid, greyscale small size</title><path d="M1 1h4v4H1zM6 1h4v4H6zM11 1h4v4H11zM1 6h4v4H1zM11 6h4v4H11zM1 11h4v4H1zM6 11h4v4H6zM11 11h4v4H11z" fill="var(--asset-tile)"/><path d="M6 6h4v4H6z" fill="var(--asset-eye)"/><path d="M7 7h2v2H7z" fill="var(--asset-pupil)"/></svg>
|
|
186
|
+
`}},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var LS={name:"showcase-glyphs",names:["brand","chevron-down","chevron-left","chevron-right","chevron-up","close","components","mocks","drafts","guide-bounds","guide-gaps","guide-margins","guide-mini","guide-padding","guide-tracks","icons","layout","moon","patterns","phone","profiles","source","split","state-building","state-checking","state-error","state-ready","state-stale","state-unreported","sun","tokens","warning"]},h5=[...LS.names].sort(),US={sm:{},md:{},lg:{},xl:{}};function DS({name:e,size:t="sm",label:a}){let s=US[t];return m("span",{className:t==="lg"?"ds-icon ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_833615_idpfg4 ads-ui-atm_lxs6r6_116y0ak ads-ui-atm_1m877pq_idpfg4 ads-ui-atm_a4etd6_idpfg4 ads-ui-atm_1ccgiil_1wugsn5 ads-ui-atm_waqb6y_1h6ojuz ads-ui-atm_aj6pg6_1h6ojuz ads-ui-atm_1yc208q_igxdd5 ads-ui-atm_5gjr0e_igxdd5 ads-ui-atm_1elvzx6_1ulexfb ads-ui-atm_9r6nho_idpfg4 ads-ui-atm_1rl036f_igxdd5 ads-ui-atm_1xoi3j5_14k5dlv ads-ui-atm_1kz6wps_1q9vzh7":t==="md"?"ds-icon ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_833615_idpfg4 ads-ui-atm_lxs6r6_116y0ak ads-ui-atm_1m877pq_idpfg4 ads-ui-atm_a4etd6_idpfg4 ads-ui-atm_1ccgiil_1wugsn5 ads-ui-atm_waqb6y_1h6ojuz ads-ui-atm_aj6pg6_1h6ojuz ads-ui-atm_1yc208q_i9rs9c ads-ui-atm_5gjr0e_i9rs9c ads-ui-atm_1elvzx6_1ulexfb ads-ui-atm_9r6nho_idpfg4 ads-ui-atm_1rl036f_i9rs9c ads-ui-atm_1xoi3j5_fjcok3 ads-ui-atm_1kz6wps_1jfreu5":t==="sm"?"ds-icon ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_833615_idpfg4 ads-ui-atm_lxs6r6_116y0ak ads-ui-atm_1m877pq_idpfg4 ads-ui-atm_a4etd6_idpfg4 ads-ui-atm_1ccgiil_1wugsn5 ads-ui-atm_waqb6y_1h6ojuz ads-ui-atm_aj6pg6_1h6ojuz ads-ui-atm_1yc208q_5mvnfr ads-ui-atm_5gjr0e_5mvnfr ads-ui-atm_1elvzx6_1ulexfb ads-ui-atm_9r6nho_idpfg4 ads-ui-atm_1rl036f_5mvnfr ads-ui-atm_1xoi3j5_1aou828 ads-ui-atm_1kz6wps_13zt0f8":"ds-icon ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_833615_idpfg4 ads-ui-atm_lxs6r6_116y0ak ads-ui-atm_1m877pq_idpfg4 ads-ui-atm_a4etd6_idpfg4 ads-ui-atm_1ccgiil_1wugsn5 ads-ui-atm_waqb6y_1h6ojuz ads-ui-atm_aj6pg6_1h6ojuz ads-ui-atm_1yc208q_1hxvxdc ads-ui-atm_5gjr0e_1hxvxdc ads-ui-atm_1elvzx6_1ulexfb ads-ui-atm_9r6nho_idpfg4 ads-ui-atm_1rl036f_1hxvxdc ads-ui-atm_1xoi3j5_1j39cg3 ads-ui-atm_1kz6wps_1f38pej",role:a?"img":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,children:m("span",{className:"ds-icon-visual",dangerouslySetInnerHTML:{__html:{brand:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 1.5 9.9 5.6l4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5L8 1.5Z"/></svg>
|
|
187
|
+
`,"chevron-down":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 6 4 4 4-4"/></svg>
|
|
188
|
+
`,"chevron-left":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4l-4 4 4 4"/></svg>
|
|
189
|
+
`,"chevron-right":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 4 4 4-4 4"/></svg>
|
|
190
|
+
`,"chevron-up":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 10 4-4 4 4"/></svg>
|
|
191
|
+
`,close:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 4 8 8M12 4l-8 8"/></svg>
|
|
192
|
+
`,components:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7L8 1Zm-6 3.5 6 3.5 6-3.5M8 8v7"/></svg>
|
|
193
|
+
`,mocks:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>
|
|
194
|
+
`,drafts:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 1h7l3 3v11H3zM10 1v4h3M5 8h6M5 11h4"/></svg>
|
|
195
|
+
`,"guide-bounds":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3.5" width="12" height="9"/></svg>
|
|
196
|
+
`,"guide-gaps":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="3" width="3.5" height="10"/><rect x="6.25" y="3" width="3.5" height="10"/><rect x="11" y="3" width="3.5" height="10"/></svg>
|
|
197
|
+
`,"guide-margins":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11" stroke-dasharray="1.5 1.5"/><rect x="4.5" y="5.5" width="7" height="5"/></svg>
|
|
198
|
+
`,"guide-mini":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2v12M6 2v12M10 2v12M14 2v12M2 2h12M2 6h12M2 10h12M2 14h12" stroke-width="1"/></svg>
|
|
199
|
+
`,"guide-padding":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11"/><rect x="4.5" y="5.5" width="7" height="5" stroke-dasharray="1.5 1.5"/></svg>
|
|
200
|
+
`,"guide-tracks":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 2v12M6 2v12M10 2v12M13.5 2v12"/></svg>
|
|
201
|
+
`,icons:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="5" r="2.5"/><rect x="9.5" y="2.5" width="4" height="5" rx="1"/><path d="m2.5 13.5 2.5-4 2.5 4ZM9.5 11.5h4M11.5 9.5v4"/></svg>
|
|
202
|
+
`,layout:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v12M6.5 2v12M9.5 2v12M13 2v12"/></svg>
|
|
203
|
+
`,moon:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg>
|
|
204
|
+
`,patterns:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>
|
|
205
|
+
`,phone:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg>
|
|
206
|
+
`,profiles:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h8v5H2V3Zm4 5v2.5h8V14H6v-3.5"/></svg>
|
|
207
|
+
`,source:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m5 4-4 4 4 4m6-8 4 4-4 4M9 2 7 14"/></svg>
|
|
208
|
+
`,split:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1" y="2" width="14" height="12" rx="1"/><path d="M8 2v12"/></svg>
|
|
209
|
+
`,"state-building":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="building" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="22 10"/></svg>
|
|
210
|
+
`,"state-checking":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="checking" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="3 3"/></svg>
|
|
211
|
+
`,"state-error":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="error" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" fill="currentColor" stroke="none"/></svg>
|
|
212
|
+
`,"state-ready":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="ready" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5"/></svg>
|
|
213
|
+
`,"state-stale":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="stale" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="2 3"/></svg>
|
|
214
|
+
`,"state-unreported":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="unreported" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/></svg>
|
|
215
|
+
`,sun:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1M8 14v1M1 8h1M14 8h1M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg>
|
|
216
|
+
`,tokens:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 6 3-6 3-6-3 6-3Zm-6 6 6 3 6-3M2 11l6 3 6-3"/></svg>
|
|
217
|
+
`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 7 12H1L8 2Z"/><path d="M8 6v3M8 11v.5"/></svg>
|
|
218
|
+
`}[e]}},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var ZS={unreported:"state-unreported",building:"state-building",checking:"state-checking",ready:"state-ready",stale:"state-stale",error:"state-error"};function BS({state:e="unreported",variant:t="navigation",label:a,hint:s}){let i=t==="toolbar"&&e==="error";return m("span",{className:t==="navigation"?"ds-preview-indicator entry-preview ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_172jl3m_116y0ak ads-ui-atm_5lr9hw_idpfg4 ads-ui-atm_hm2d40_idpfg4 ads-ui-atm_154m6fo_1wugsn5 ads-ui-atm_13jsubh_1h6ojuz ads-ui-atm_101o8aw_1h6ojuz ads-ui-atm_1m285ns_5mvnfr ads-ui-atm_k1lyca_5mvnfr ads-ui-atm_18ridwz_1ulexfb ads-ui-atm_utxrlr_idpfg4 ads-ui-atm_170bim3_5mvnfr ads-ui-atm_nhwuhz_1aou828 ads-ui-atm_1j4duo0_13zt0f8":"ds-preview-indicator ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_172jl3m_116y0ak ads-ui-atm_5lr9hw_idpfg4 ads-ui-atm_hm2d40_idpfg4 ads-ui-atm_154m6fo_1wugsn5 ads-ui-atm_13jsubh_1h6ojuz ads-ui-atm_101o8aw_1h6ojuz ads-ui-atm_1m285ns_5mvnfr ads-ui-atm_k1lyca_5mvnfr ads-ui-atm_18ridwz_1ulexfb ads-ui-atm_utxrlr_idpfg4 ads-ui-atm_170bim3_5mvnfr ads-ui-atm_nhwuhz_1aou828 ads-ui-atm_1j4duo0_13zt0f8","data-state":e,"data-variant":t,role:a?"img":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,title:a??s,children:m("span",{className:i===!1?"ds-preview-mark":"ds-preview-mark preview-warning",dangerouslySetInnerHTML:{__html:{brand:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 1.5 9.9 5.6l4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5L8 1.5Z"/></svg>
|
|
219
|
+
`,"chevron-down":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 6 4 4 4-4"/></svg>
|
|
220
|
+
`,"chevron-left":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4l-4 4 4 4"/></svg>
|
|
221
|
+
`,"chevron-right":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 4 4 4-4 4"/></svg>
|
|
222
|
+
`,"chevron-up":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 10 4-4 4 4"/></svg>
|
|
223
|
+
`,close:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 4 8 8M12 4l-8 8"/></svg>
|
|
224
|
+
`,components:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7L8 1Zm-6 3.5 6 3.5 6-3.5M8 8v7"/></svg>
|
|
225
|
+
`,mocks:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>
|
|
226
|
+
`,drafts:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 1h7l3 3v11H3zM10 1v4h3M5 8h6M5 11h4"/></svg>
|
|
227
|
+
`,"guide-bounds":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3.5" width="12" height="9"/></svg>
|
|
228
|
+
`,"guide-gaps":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="3" width="3.5" height="10"/><rect x="6.25" y="3" width="3.5" height="10"/><rect x="11" y="3" width="3.5" height="10"/></svg>
|
|
229
|
+
`,"guide-margins":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11" stroke-dasharray="1.5 1.5"/><rect x="4.5" y="5.5" width="7" height="5"/></svg>
|
|
230
|
+
`,"guide-mini":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2v12M6 2v12M10 2v12M14 2v12M2 2h12M2 6h12M2 10h12M2 14h12" stroke-width="1"/></svg>
|
|
231
|
+
`,"guide-padding":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11"/><rect x="4.5" y="5.5" width="7" height="5" stroke-dasharray="1.5 1.5"/></svg>
|
|
232
|
+
`,"guide-tracks":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 2v12M6 2v12M10 2v12M13.5 2v12"/></svg>
|
|
233
|
+
`,icons:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="5" r="2.5"/><rect x="9.5" y="2.5" width="4" height="5" rx="1"/><path d="m2.5 13.5 2.5-4 2.5 4ZM9.5 11.5h4M11.5 9.5v4"/></svg>
|
|
234
|
+
`,layout:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v12M6.5 2v12M9.5 2v12M13 2v12"/></svg>
|
|
235
|
+
`,moon:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg>
|
|
236
|
+
`,patterns:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>
|
|
237
|
+
`,phone:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg>
|
|
238
|
+
`,profiles:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h8v5H2V3Zm4 5v2.5h8V14H6v-3.5"/></svg>
|
|
239
|
+
`,source:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m5 4-4 4 4 4m6-8 4 4-4 4M9 2 7 14"/></svg>
|
|
240
|
+
`,split:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1" y="2" width="14" height="12" rx="1"/><path d="M8 2v12"/></svg>
|
|
241
|
+
`,"state-building":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="building" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="22 10"/></svg>
|
|
242
|
+
`,"state-checking":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="checking" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="3 3"/></svg>
|
|
243
|
+
`,"state-error":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="error" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" fill="currentColor" stroke="none"/></svg>
|
|
244
|
+
`,"state-ready":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="ready" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5"/></svg>
|
|
245
|
+
`,"state-stale":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="stale" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="2 3"/></svg>
|
|
246
|
+
`,"state-unreported":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="unreported" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/></svg>
|
|
247
|
+
`,sun:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1M8 14v1M1 8h1M14 8h1M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg>
|
|
248
|
+
`,tokens:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 6 3-6 3-6-3 6-3Zm-6 6 6 3 6-3M2 11l6 3 6-3"/></svg>
|
|
249
|
+
`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 7 12H1L8 2Z"/><path d="M8 6v3M8 11v.5"/></svg>
|
|
250
|
+
`}[i?"warning":ZS[e]]}},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function HS({label:e,href:t,current:a=!1,previewState:s,previewLabel:i,draftLabel:o,draftDescription:r,scenario:n,onClick:u}){return m("a",{className:a===!1?"ds-navigation-item ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_dcxj7s ads-ui-atm_1o7ozsh_dcxj7s ads-ui-atm_9pzzkz_1wdkmbo ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_82yulm_1osqo2v ads-ui-atm_1ft0qzd_hnzbge ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_5o47kn_glywfm ads-ui-atm_1tgqd35_hnzbge ads-ui-atm_18uqgji_1wskm3t ads-ui-atm_8qy9fs_pt45zb ads-ui-atm_yxpng4_pt45zb ads-ui-atm_1l8puf7_pt45zb ads-ui-atm_ny1oq5_pt45zb ads-ui-atm_t9t2pt_hnzbge ads-ui-atm_1dpiaj6_1wskm3t ads-ui-atm_1e5cc9n_pt45zb ads-ui-atm_119z8oz_pt45zb ads-ui-atm_8mfi5f_pt45zb ads-ui-atm_1semnwh_pt45zb ads-ui-atm_1yl5u20_53hpxf ads-ui-atm_fjn2vl_rhlbdi ads-ui-atm_irebtj_1m800s6 ads-ui-atm_r8ipkg_1phvqmz ads-ui-atm_153h4jg_el7ql6 ads-ui-atm_1xbdjb6_1q9ccgz ads-ui-atm_rdpcki_15vqwwr ads-ui-atm_hfficw_1l2sidv ads-ui-atm_gat7eg_idpfg4 ads-ui-atm_75aoaf_kb7nvz ads-ui-atm_1qykux0_kb7nvz ads-ui-atm_1bpe0sl_idpfg4 ads-ui-atm_10yfxn3_rhlbdi ads-ui-atm_b5vuvz_1m800s6 ads-ui-atm_1elao6_1phvqmz ads-ui-atm_xfqrmt_el7ql6 ads-ui-atm_17u77u5_1mqbmot ads-ui-atm_ofzq5e_1q9ccgz":"ds-navigation-item ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_dcxj7s ads-ui-atm_1o7ozsh_dcxj7s ads-ui-atm_9pzzkz_1wdkmbo ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_82yulm_1osqo2v ads-ui-atm_1ft0qzd_hnzbge ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_5o47kn_glywfm ads-ui-atm_1tgqd35_hnzbge ads-ui-atm_18uqgji_1wskm3t ads-ui-atm_8qy9fs_pt45zb ads-ui-atm_yxpng4_pt45zb ads-ui-atm_1l8puf7_pt45zb ads-ui-atm_ny1oq5_pt45zb ads-ui-atm_t9t2pt_hnzbge ads-ui-atm_1dpiaj6_1wskm3t ads-ui-atm_1e5cc9n_pt45zb ads-ui-atm_119z8oz_pt45zb ads-ui-atm_8mfi5f_pt45zb ads-ui-atm_1semnwh_pt45zb ads-ui-atm_1yl5u20_53hpxf ads-ui-atm_fjn2vl_rhlbdi ads-ui-atm_irebtj_1m800s6 ads-ui-atm_r8ipkg_1phvqmz ads-ui-atm_153h4jg_1d1fc98 ads-ui-atm_1xbdjb6_1q9ccgz ads-ui-atm_rdpcki_15vqwwr ads-ui-atm_hfficw_1l2sidv ads-ui-atm_gat7eg_idpfg4 ads-ui-atm_75aoaf_kb7nvz ads-ui-atm_1qykux0_kb7nvz ads-ui-atm_1bpe0sl_idpfg4 ads-ui-atm_10yfxn3_rhlbdi ads-ui-atm_b5vuvz_1m800s6 ads-ui-atm_1elao6_1phvqmz ads-ui-atm_xfqrmt_1d1fc98 ads-ui-atm_17u77u5_1mqbmot ads-ui-atm_ofzq5e_1q9ccgz",href:t,"aria-current":a?"page":void 0,"aria-description":i,"data-scenario":n,"data-build-state":s,onClick:u,children:[m("span",{className:"ds-navigation-label",title:e,children:e},void 0,!1,void 0,this),o&&m("span",{className:"draft-badge",title:r,children:[" ",o]},void 0,!0,void 0,this),s&&m(BS,{state:s,hint:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var FS={narrow:void 0,wide:"","narrow-flush":"","wide-flush":""};function ew({id:e,label:t,role:a,width:s="narrow",inline:i=!1,flush:o=!1,onToggle:r,children:n}){let u=FS[o?s==="wide"?"wide-flush":"narrow-flush":s]??"";if(i)return m("div",{id:e,className:o===!1?s==="narrow"?"ds-popover ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_zzfiyx_1fjsgd1 ads-ui-atm_1wf0rum_z9e1cl ads-ui-atm_h5r38d_z9e1cl ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_82yulm_yg8e7m ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6":"ds-popover ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_zzfiyx_1fjsgd1 ads-ui-atm_1wf0rum_z9e1cl ads-ui-atm_h5r38d_z9e1cl ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_ei944y_1spfnm6 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6":s==="narrow"?"ds-popover ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_zzfiyx_1fjsgd1 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_82yulm_yg8e7m ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6":"ds-popover ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_zzfiyx_1fjsgd1 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_ei944y_1spfnm6 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6",role:a,"aria-label":t,children:n},void 0,!1,void 0,this);return m("div",{id:e,className:o===!1?s==="narrow"?"ds-popover ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_zzfiyx_1fjsgd1 ads-ui-atm_1wf0rum_z9e1cl ads-ui-atm_h5r38d_z9e1cl ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_82yulm_yg8e7m ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_usce5a_idpfg4 ads-ui-atm_x71nf7_idpfg4 ads-ui-atm_1irt2gx_idpfg4 ads-ui-atm_cr5bj4_idpfg4 ads-ui-atm_1p75dy7_1wugsn5 ads-ui-atm_1co438l_1n9t6rb ads-ui-atm_17f9qpo_oe2fa9 ads-ui-atm_ptwcjl_1wugsn5 ads-ui-atm_dned2y_1wugsn5 ads-ui-atm_1s47rwz_1aqtv8w ads-ui-atm_1o67g9_1efm9ld ads-ui-atm_ei944y_1g2qdu6 ads-ui-atm_arf92d_1txwivl":"ds-popover ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_zzfiyx_1fjsgd1 ads-ui-atm_1wf0rum_z9e1cl ads-ui-atm_h5r38d_z9e1cl ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_ei944y_qizgwy ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_usce5a_idpfg4 ads-ui-atm_x71nf7_idpfg4 ads-ui-atm_1irt2gx_idpfg4 ads-ui-atm_cr5bj4_idpfg4 ads-ui-atm_1p75dy7_1wugsn5 ads-ui-atm_1co438l_1n9t6rb ads-ui-atm_17f9qpo_oe2fa9 ads-ui-atm_ptwcjl_1wugsn5 ads-ui-atm_dned2y_1wugsn5 ads-ui-atm_1s47rwz_1aqtv8w ads-ui-atm_1o67g9_1efm9ld ads-ui-atm_arf92d_1txwivl":s==="narrow"?"ds-popover ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_zzfiyx_1fjsgd1 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_82yulm_yg8e7m ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1wf0rum_idpfg4 ads-ui-atm_h5r38d_idpfg4 ads-ui-atm_12itgy1_idpfg4 ads-ui-atm_1o7ozsh_idpfg4 ads-ui-atm_usce5a_idpfg4 ads-ui-atm_x71nf7_idpfg4 ads-ui-atm_1irt2gx_idpfg4 ads-ui-atm_cr5bj4_idpfg4 ads-ui-atm_1p75dy7_1wugsn5 ads-ui-atm_1co438l_1n9t6rb ads-ui-atm_17f9qpo_oe2fa9 ads-ui-atm_ptwcjl_1wugsn5 ads-ui-atm_dned2y_1wugsn5 ads-ui-atm_1s47rwz_1aqtv8w ads-ui-atm_1o67g9_1efm9ld ads-ui-atm_ei944y_1g2qdu6 ads-ui-atm_arf92d_1txwivl":"ds-popover ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_zzfiyx_1fjsgd1 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1be842k_evuusw ads-ui-atm_ei944y_qizgwy ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1wf0rum_idpfg4 ads-ui-atm_h5r38d_idpfg4 ads-ui-atm_12itgy1_idpfg4 ads-ui-atm_1o7ozsh_idpfg4 ads-ui-atm_usce5a_idpfg4 ads-ui-atm_x71nf7_idpfg4 ads-ui-atm_1irt2gx_idpfg4 ads-ui-atm_cr5bj4_idpfg4 ads-ui-atm_1p75dy7_1wugsn5 ads-ui-atm_1co438l_1n9t6rb ads-ui-atm_17f9qpo_oe2fa9 ads-ui-atm_ptwcjl_1wugsn5 ads-ui-atm_dned2y_1wugsn5 ads-ui-atm_1s47rwz_1aqtv8w ads-ui-atm_1o67g9_1efm9ld ads-ui-atm_arf92d_1txwivl",popover:"auto",role:a,"aria-label":t,onToggle:(d)=>r?.(d.newState==="open"),children:n},void 0,!1,void 0,this)}function VS({title:e,sandbox:t="allow-scripts allow-same-origin allow-forms",viewport:a="auto"}){return m("iframe",{className:a==="auto"?"ds-preview-frame ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_krmq3d_1ulexfb ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1dwkn0r_glywfm ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm":"ds-preview-frame ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1ytd9ll ads-ui-atm_ei944y_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_krmq3d_1ulexfb ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1dwkn0r_glywfm ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm",title:e,sandbox:t},void 0,!1,void 0,this)}var JS={auto:"",phone:""};function WS({split:e=!1,accepted:t,draft:a,phone:s=!1}){let i=e&&t!==void 0,o=JS[s?"phone":"auto"];return m("div",{className:"draft-comparison ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1be77n5_kb7nvz ads-ui-atm_15zuxph_kb7nvz ads-ui-atm_9txq9e_idpfg4 ads-ui-atm_1259j0w_idpfg4 ads-ui-atm_12ncsas_kb7nvz ads-ui-atm_2imcxj_kb7nvz ads-ui-atm_e9k5um_idpfg4 ads-ui-atm_eptx5m_idpfg4","data-split":String(i),children:[i&&m("section",{className:"draft-version draft-version-accepted ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ftwvmp_usvi9m ads-ui-atm_1b122at_idpfg4 ads-ui-atm_96e0kc_116y0ak ads-ui-atm_dwyvz2_1fhbwtr ads-ui-atm_m4d731_1h6ojuz ads-ui-atm_1fu03b3_1nvpqck ads-ui-atm_1hkph9s_kb7nvz ads-ui-atm_1103v7e_kb7nvz ads-ui-atm_e8mo1v_idpfg4 ads-ui-atm_iftxj0_idpfg4",children:[m("h2",{className:"draft-version-heading ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_1ohcsmr ads-ui-atm_1dwkn0r_nqa18y ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_19dj2kj ads-ui-atm_1imonbj_idpfg4","data-version":"accepted",title:t?.title,children:t?.heading},void 0,!1,void 0,this),m("div",{className:"draft-stage-area",children:m("div",{className:s===!1?"draft-stage ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz":"draft-stage ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1ytd9ll ads-ui-atm_ei944y_jub8wz ads-ui-atm_b1mxoe_jub8wz","data-version":"accepted"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m("section",{className:i===!1?"draft-version draft-version-draft ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ftwvmp_usvi9m ads-ui-atm_1b122at_idpfg4 ads-ui-atm_96e0kc_116y0ak ads-ui-atm_dwyvz2_1fhbwtr ads-ui-atm_m4d731_1h6ojuz ads-ui-atm_1fu03b3_1nvpqck ads-ui-atm_1hkph9s_kb7nvz ads-ui-atm_1103v7e_kb7nvz ads-ui-atm_e8mo1v_idpfg4 ads-ui-atm_iftxj0_idpfg4":"draft-version draft-version-draft ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1dwkn0r_glywfm ads-ui-atm_1xg8yzr_1ohcsmr ads-ui-atm_9uxezr_nqa18y ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_1ftwvmp_usvi9m ads-ui-atm_1b122at_idpfg4 ads-ui-atm_96e0kc_116y0ak ads-ui-atm_dwyvz2_1fhbwtr ads-ui-atm_m4d731_1h6ojuz ads-ui-atm_1fu03b3_1nvpqck ads-ui-atm_1hkph9s_kb7nvz ads-ui-atm_1103v7e_kb7nvz ads-ui-atm_e8mo1v_idpfg4 ads-ui-atm_iftxj0_idpfg4",children:[m("h2",{className:"draft-version-heading ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_1ohcsmr ads-ui-atm_1dwkn0r_nqa18y ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_19dj2kj ads-ui-atm_1imonbj_idpfg4","data-version":"draft",title:a.title,children:a.heading},void 0,!1,void 0,this),m("div",{className:"draft-stage-area",children:m("div",{className:s===!1?"draft-stage ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz":"draft-stage ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1ytd9ll ads-ui-atm_ei944y_jub8wz ads-ui-atm_b1mxoe_jub8wz","data-version":"draft"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var $v=[{name:"off",label:"Off",hint:"Guides are hidden. Your layer choice is kept."},{name:"hover",label:"Hover",hint:"Point at or focus an element to see the selected layers."},{name:"always",label:"Always",hint:"Every element shows the selected layers."}],tw=[{name:"bounds",label:"Bounds",icon:"guide-bounds"},{name:"tracks",label:"Columns and rows",icon:"guide-tracks"},{name:"gaps",label:"Gaps and gutters",icon:"guide-gaps"},{name:"padding",label:"Padding",icon:"guide-padding"},{name:"margins",label:"Margins",icon:"guide-margins"},{name:"mini",label:"Mini-unit grid",icon:"guide-mini"}],aw=[{name:"spacing",label:"Spacing",layers:["padding","margins","gaps"]},{name:"grid",label:"Grid",layers:["tracks","mini"]},{name:"all",label:"All",layers:["bounds","tracks","gaps","padding","margins","mini"]}];function sw(e){let t=aw.find((a)=>a.name===e)?.layers??[];return Object.fromEntries(tw.map((a)=>[a.name,t.includes(a.name)]))}function GS({id:e="grid-options",inline:t=!1,mode:a="off",layers:s={},onModeChange:i,onLayerChange:o,onPreset:r,onOpenChange:n}){let u=$v.find((d)=>d.name===a)?.hint;return m(ew,{id:e,label:"Layout guides",role:"dialog",inline:t,onToggle:n,children:m("div",{id:`${e}-content`,className:"ux-guide-options ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_10gajkz_rhlbdi ads-ui-atm_2kex2d_1m800s6 ads-ui-atm_1agh0mp_1phvqmz ads-ui-atm_99rdcf_el7ql6 ads-ui-atm_1lomx4n_1mqbmot ads-ui-atm_m4wbzc_1ln74b8","data-mode":a,children:[m("h2",{className:"ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_1imonbj_idpfg4",children:"Layout guides"},void 0,!1,void 0,this),m("div",{className:"ux-guide-modes ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_widoeq ads-ui-atm_ei944y_1osqo2v",role:"group","aria-label":"Show guides",children:$v.map((d)=>m(Ze,{id:`${e}-mode-${d.name}`,label:d.label,pressed:a===d.name,onClick:()=>i?.(d.name)},d.name,!1,void 0,this))},void 0,!1,void 0,this),m("p",{id:`${e}-hint`,className:"ux-guide-hint","aria-live":"polite",children:u},void 0,!1,void 0,this),m("div",{className:"ux-guide-layers ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_w1d03b ads-ui-atm_1t3vapq_idpfg4 ads-ui-atm_198vcvx_13mtsfm ads-ui-atm_1mdd4zy_grho7r ads-ui-atm_ei944y_glywfm ads-ui-atm_493uhi_1ewd4b2 ads-ui-atm_1lddpkt_idpfg4 ads-ui-atm_lyxyqm_1yt4z34 ads-ui-atm_sxv116_1twucgp ads-ui-atm_4nyljr_13mtsfm ads-ui-atm_kivprt_grho7r ads-ui-atm_9vjuy7_glywfm ads-ui-atm_xq9szh_1ewd4b2 ads-ui-atm_1bc6r1s_13mtsfm ads-ui-atm_1goeq7f_grho7r ads-ui-atm_1besvjn_glywfm ads-ui-atm_r84fy2_1ewd4b2",role:"group","aria-label":"Layers",children:tw.map((d)=>m(RS,{className:"ux-guide-tile",id:`${e}-layer-${d.name}`,label:d.label,icon:d.icon,pressed:s[d.name]===!0,quiet:a==="off",onClick:()=>o?.(d.name,s[d.name]!==!0)},d.name,!1,void 0,this))},void 0,!1,void 0,this),m("div",{className:"ux-guide-presets ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_1wf0rum_1t30cte ads-ui-atm_h5r38d_1t30cte ads-ui-atm_1cm89v7_1ohcsmr ads-ui-atm_prxrza_nqa18y ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1dwkn0r_glywfm ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_ei944y_1osqo2v ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1c58i4o_rhlbdi ads-ui-atm_1g1sog8_1m800s6 ads-ui-atm_zgbnv7_1phvqmz ads-ui-atm_17tktrv_el7ql6 ads-ui-atm_1q8vkpq_1mqbmot",role:"group","aria-label":"Presets",children:[m("span",{className:"ux-guide-presets-label",children:"Presets"},void 0,!1,void 0,this),aw.map((d)=>m(Ze,{id:`${e}-preset-${d.name}`,label:d.label,onClick:()=>r?.(d.name)},d.name,!1,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var xi,ze,cm,Mv,dm=Object.is,qu=0,iw=[],lm=[],Te=le,{__b:Nv,__r:Iv,diffed:Ov,__c:Av,unmount:Lv,__:Uv}=Te;function Pu(e,t){Te.__h&&Te.__h(ze,e,qu||t),qu=0;var a=ze.__H||(ze.__H={__:[],__h:[]});return e>=a.__.length&&a.__.push({}),a.__[e]}function ow(e){return qu=1,KS(cw,e)}function KS(e,t,a){var s=Pu(xi++,2);if(s.t=e,!s.__c&&(s.__=[a?a(t):cw(void 0,t),function(o){var r=s.__N?s.__N[0]:s.__[0],n=s.t(r,o);dm(r,n)||(s.__N=[n,s.__[1]],s.__c.setState({}))}],s.__c=ze,!ze.__f)){ze.__f=!0;var i=ze.shouldComponentUpdate;ze.shouldComponentUpdate=function(o,r,n){var u=this.__H;if(!u)return!0;var d=!1,l=this.props!=o;if(u.__.some(function(p){p.__N&&(d=!0,dm(p.__[0],p.__N[0])||(l=!0))}),i){var h=i.call(this,o,r,n);return d?h||l:h}return!d||l}}return s.__}function YS(e,t){var a=Pu(xi++,3);!Te.__s&&vm(a.__H,t)&&(a.__P=!0,a.__=e,a.u=t,ze.__H.__h.push(a))}function rw(e,t){var a=Pu(xi++,4);!Te.__s&&vm(a.__H,t)&&(a.__P=!1,a.__=e,a.u=t,ze.__h.push(a))}function nw(e){return qu=5,XS(function(){return{current:e}},[])}function XS(e,t){var a=Pu(xi++,7);return vm(a.__H,t)&&(a.__=e(),a.__H=t),a.__}function QS(){var e;do{for(;e=lm.shift();)try{qn(e)}catch(a){Te.__e(a,{__:(e=e.__P)&&e.__v})}for(;e=iw.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(qn),t.__h.some(mm),t.__h=[]}catch(a){t.__h=[],Te.__e(a,e.__v)}}}while(lm.length)}Te.__b=function(e){ze=null,Nv&&Nv(e)},Te.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Uv&&Uv(e,t)},Te.__r=function(e){Iv&&Iv(e),xi=0;var t=(ze=e.__c).__H;t&&(cm==ze?ze.__h=[]:(t.__h.some(qn),t.__h.some(mm),xi=0),t.__h=[],t.__.some(function(a){a.__N&&(a.__=a.__N),a.u=a.__N=void 0})),cm=ze},Te.diffed=function(e){Ov&&Ov(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&Zv(iw.push(t)),t.__H.__.some(function(a){a.u&&(a.__H=a.u)})),cm=ze=null},Te.__c=function(e,t){t.some(function(a){try{a.__h.some(qn),a.__h=a.__h.filter(function(s){return!s.__||mm(s)})}catch(s){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Te.__e(s,a.__v)}}),Av&&Av(e,t)},Te.unmount=function(e){Lv&&Lv(e);var t,a,s=e.__c;s&&s.__H&&(s.__H.__.some(function(i){try{if(i.__P&&i.__c){if(a===void 0){for(a=e.__;a&&(!a.__c||!a.__c.__P);)a=a.__;a=a&&a.__c}i.__P=a,Zv(lm.push(i))}else qn(i)}catch(o){t=o}}),s.__H=void 0,t&&Te.__e(t,s.__v))};var Dv=typeof requestAnimationFrame=="function";function ex(e){var t,a=function(){clearTimeout(s),Dv&&cancelAnimationFrame(t),setTimeout(e)},s=setTimeout(a,35);Dv&&(t=requestAnimationFrame(a))}function Zv(e){e!=1&&Mv==Te.requestAnimationFrame||((Mv=Te.requestAnimationFrame)||ex)(QS)}function qn(e){var t=ze,a=e.__c;typeof a=="function"&&(e.__c=void 0,a()),ze=t}function mm(e){var t=ze;e.__c=e.__(),ze=t}function vm(e,t){return!e||e.length!=t.length||t.some(function(a,s){return!dm(a,e[s])})}function cw(e,t){return typeof t=="function"?t(e):t}function uw({glyph:e,px:t,label:a,kind:s}){let i=nw(null);return rw(()=>{let o=i.current,r=e.drawing(t);if(o===null||r===null)return;return o.replaceChildren(r),()=>o.replaceChildren()},[e,t]),m("span",{className:s==="size"?"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_1osqo2v ads-ui-atm_xmmnwg_1txwivl ads-ui-atm_v154ra_1h6ojuz ads-ui-atm_33y404_1h6ojuz ads-ui-atm_a5388g_idpfg4 ads-ui-atm_1ytzfxe_1osqo2v ads-ui-atm_5ilhjx_1ulexfb ads-ui-atm_1rt1e28_idpfg4 ads-ui-atm_1rfx49m_1osqo2v ads-ui-atm_1uy0e8w_1q27z9p":"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_1osqo2v ads-ui-atm_xmmnwg_1txwivl ads-ui-atm_v154ra_1h6ojuz ads-ui-atm_33y404_1h6ojuz ads-ui-atm_a5388g_idpfg4 ads-ui-atm_1ytzfxe_1osqo2v ads-ui-atm_5ilhjx_1ulexfb ads-ui-atm_1rt1e28_idpfg4 ads-ui-atm_1rfx49m_1osqo2v ads-ui-atm_1uy0e8w_1j39cg3",role:a?"img":void 0,"aria-label":a,title:a,"aria-hidden":a?void 0:"true",children:m("span",{ref:i,className:"icons-glyph"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function tx({glyph:e,flagged:t}){let a=nw(null);rw(()=>{let i=a.current,o=e.drawing(96);if(i===null||o===null)return;return i.replaceChildren(o),()=>i.replaceChildren()},[e]);let s=e.grid!==null;return m("div",{className:t===!1?"icons-mag ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_198vcvx_i47zc9 ads-ui-atm_61a05l_i47zc9 ads-ui-atm_82yulm_wwa8lf ads-ui-atm_b1mxoe_wwa8lf ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1ft0qzd_6lcubb ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_kd54ix_kb7nvz ads-ui-atm_iwwuj4_kb7nvz ads-ui-atm_jd291b_kb7nvz ads-ui-atm_1ari1k3_kb7nvz ads-ui-atm_xmmnwg_1txwivl ads-ui-atm_v154ra_1h6ojuz ads-ui-atm_33y404_1h6ojuz ads-ui-atm_a5388g_idpfg4 ads-ui-atm_1ytzfxe_1osqo2v ads-ui-atm_5ilhjx_1ulexfb ads-ui-atm_1rt1e28_idpfg4 ads-ui-atm_1rfx49m_1osqo2v ads-ui-atm_1uy0e8w_1q27z9p":"icons-mag ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_198vcvx_i47zc9 ads-ui-atm_61a05l_i47zc9 ads-ui-atm_82yulm_wwa8lf ads-ui-atm_b1mxoe_wwa8lf ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1ft0qzd_1le1gz4 ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_25qh7d ads-ui-atm_140esw6_25qh7d ads-ui-atm_1fpt21x_25qh7d ads-ui-atm_3v15jc_25qh7d ads-ui-atm_kd54ix_kb7nvz ads-ui-atm_iwwuj4_kb7nvz ads-ui-atm_jd291b_kb7nvz ads-ui-atm_1ari1k3_kb7nvz ads-ui-atm_xmmnwg_1txwivl ads-ui-atm_v154ra_1h6ojuz ads-ui-atm_33y404_1h6ojuz ads-ui-atm_a5388g_idpfg4 ads-ui-atm_1ytzfxe_1osqo2v ads-ui-atm_5ilhjx_1ulexfb ads-ui-atm_1rt1e28_idpfg4 ads-ui-atm_1rfx49m_1osqo2v ads-ui-atm_1uy0e8w_1q27z9p",children:[s&&m("span",{className:"icons-mag-grid",children:m(Qv,{box:e.grid},void 0,!1,void 0,this)},void 0,!1,void 0,this),m("span",{ref:a,className:"icons-glyph"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function dw({finding:e}){return m("p",{className:"icons-finding ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_rqyz39 ads-ui-atm_h5r38d_rqyz39 ads-ui-atm_12itgy1_1p59u9q ads-ui-atm_1o7ozsh_1p59u9q ads-ui-atm_1be842k_mrub5a ads-ui-atm_1ft0qzd_1le1gz4 ads-ui-atm_1wnhlda_b6kj4x ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",title:e.file,children:[m("strong",{children:e.rule},void 0,!1,void 0,this)," ",e.message]},void 0,!0,void 0,this)}function ax({glyph:e,sizes:t}){let a=e.findings.length>0,s=`${e.findings.length} ${e.findings.every((r)=>r.severity==="error")?"error":"issue"}${e.findings.length===1?"":"s"}`,i=e.aliases.length?`alias: ${e.aliases.join(", ")}`:"",o=e.aliases.length>0;return m("article",{className:"icons-card ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_10lap3l ads-ui-atm_1t5zwc4_rhlbdi ads-ui-atm_1gwto2k_1m800s6 ads-ui-atm_885nw_1phvqmz ads-ui-atm_bmrufs_el7ql6 ads-ui-atm_vejaqk_1mqbmot","data-glyph":e.name,"data-findings":a?e.findings.length:void 0,"aria-label":e.name,children:[m("div",{className:"icons-card-head ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_10lap3l ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1l6fbyr_l6f2xw ads-ui-atm_3nzwv4_1m800s6 ads-ui-atm_hkklln_1phvqmz ads-ui-atm_v5930n_19dj2kj ads-ui-atm_z0m4hu_idpfg4 ads-ui-atm_y06j6y_fg65tv",children:[m("h3",{className:"icons-card-name ads-ui-atm_1imonbj_idpfg4",children:e.name},void 0,!1,void 0,this),a&&m("span",{className:"icons-badge ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_19wx8lf ads-ui-atm_h5r38d_19wx8lf ads-ui-atm_12itgy1_1tgh169 ads-ui-atm_1o7ozsh_1tgh169 ads-ui-atm_1be842k_12j2sah ads-ui-atm_1ft0qzd_1le1gz4 ads-ui-atm_1wnhlda_b6kj4x ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_19dj2kj",children:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m(tx,{glyph:e,flagged:a},void 0,!1,void 0,this),m("div",{className:"icons-sizes ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_h9n0ih ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_1i51wq9 ads-ui-atm_ei944y_1osqo2v",children:t.map((r)=>m("span",{className:"icons-size ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_10lap3l ads-ui-atm_1k0v6n6_rhlbdi ads-ui-atm_aeeprd_1m800s6 ads-ui-atm_uxdovq_1phvqmz ads-ui-atm_gvbpnb_el7ql6 ads-ui-atm_r236bx_1mqbmot",children:[m(uw,{glyph:e,px:r.px,kind:"size"},void 0,!1,void 0,this),m("small",{className:"icons-size-px",title:r.token,children:r.px},void 0,!1,void 0,this)]},r.token,!0,void 0,this))},void 0,!1,void 0,this),o&&m("p",{className:"icons-alias",children:i},void 0,!1,void 0,this),e.findings.map((r,n)=>m(dw,{finding:r},n,!1,void 0,this))]},void 0,!0,void 0,this)}function sx({file:e}){let t=e.tooLarge!==!0;return m("figure",{className:"icons-logo ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1imonbj_idpfg4","data-logo":e.name,children:[t&&m("span",{className:"icons-logo-tile ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_1p59u9q ads-ui-atm_h5r38d_1p59u9q ads-ui-atm_12itgy1_1p59u9q ads-ui-atm_1o7ozsh_1p59u9q ads-ui-atm_1ft0qzd_qm87f6",children:m("img",{src:e.src,alt:e.name,title:e.file,width:24,height:24,loading:"lazy",decoding:"async"},void 0,!1,void 0,this)},void 0,!1,void 0,this),t&&m("span",{className:"icons-logo-tile icons-logo-tile-black ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_1p59u9q ads-ui-atm_h5r38d_1p59u9q ads-ui-atm_12itgy1_1p59u9q ads-ui-atm_1o7ozsh_1p59u9q ads-ui-atm_1ft0qzd_1ivmhas",children:m("img",{src:e.src,alt:"",width:24,height:24,loading:"lazy",decoding:"async"},void 0,!1,void 0,this)},void 0,!1,void 0,this),m("figcaption",{children:t?e.name:`${e.name} (over 1 MB; not shown)`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function ix({data:e}){let[t,a]=ow("");if(!e.configured)return m("section",{className:"icons-view ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_tv4kfj ads-ui-atm_1wnhlda_an4usv ads-ui-atm_1wf0rum_2sml4p ads-ui-atm_h5r38d_2sml4p ads-ui-atm_12itgy1_2sml4p ads-ui-atm_1o7ozsh_2sml4p ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_1ffux1g ads-ui-atm_9pzzkz_idpfg4","aria-label":"Icons",children:[m("h1",{className:"ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1heflvk ads-ui-atm_1tf621q_1l8tyb9 ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_1imonbj_idpfg4",children:"Icons"},void 0,!1,void 0,this),m("p",{className:"icons-summary ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:"The project configures no glyph set."},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return m(ox,{data:e,query:t,onQuery:a},void 0,!1,void 0,this)}function ox({data:e,query:t,onQuery:a}){let s=t.trim().toLowerCase(),i=e.glyphs.filter((p)=>[p.name,...p.aliases].some((v)=>v.toLowerCase().includes(s))),o=e.textSize?.px??16,r=`${e.source??""} · ${e.glyphs.length} glyphs${e.grid?` · ${e.grid.width} × ${e.grid.height} grid`:e.mixed?" · Mixed grids":""} · ${e.aliasCount} aliases`,n=e.embedded===!0,u=i.length===0,d=e.glyphs.length?`No glyph matches “${t.trim()}”.`:"No glyphs in this set.",l=e.logos??null,h=l!==null;return m("section",{className:"icons-view ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_tv4kfj ads-ui-atm_1wnhlda_an4usv ads-ui-atm_1wf0rum_2sml4p ads-ui-atm_h5r38d_2sml4p ads-ui-atm_12itgy1_2sml4p ads-ui-atm_1o7ozsh_2sml4p ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1p75dy7_1ffux1g ads-ui-atm_9pzzkz_idpfg4","aria-label":"Icons",children:[m("div",{className:"icons-head ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_1b8d50m_1yjf2zc ads-ui-atm_140ifm8_moeofi ads-ui-atm_lirbap_2iq75o ads-ui-atm_teazpr_15wi45 ads-ui-atm_1xpjwi3_nqa18y ads-ui-atm_t11rtj_rhlbdi ads-ui-atm_1vdxjvo_1m800s6 ads-ui-atm_gbhy_1phvqmz ads-ui-atm_1572qxv_el7ql6 ads-ui-atm_1cy737e_1u3842e ads-ui-atm_1wk20nh_an4usv ads-ui-atm_lwc7bh_1627y59 ads-ui-atm_xqvnq0_1627y59 ads-ui-atm_zcdh3r_1627y59 ads-ui-atm_1v17wzg_1627y59 ads-ui-atm_slwk8h_usvi9m ads-ui-atm_wff9mi_idpfg4 ads-ui-atm_qa2xf5_1h68f9y ads-ui-atm_1gs8m6q_dcxj7s ads-ui-atm_182o3w2_dcxj7s ads-ui-atm_djadco_1byhj8 ads-ui-atm_1qyueau_1byhj8 ads-ui-atm_mqx2g0_1ohcsmr ads-ui-atm_hxkgl1_1ohcsmr ads-ui-atm_1kzrgyk_1ohcsmr ads-ui-atm_18hjsv2_1ohcsmr ads-ui-atm_12l71nd_evuusw ads-ui-atm_14tcd9n_idpfg4",children:[!n&&m("div",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_10lap3l",children:[m("h1",{className:"ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1heflvk ads-ui-atm_1tf621q_1l8tyb9 ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_1imonbj_idpfg4",children:e.title??"Icons"},void 0,!1,void 0,this),m("p",{className:"icons-summary ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m("input",{className:"icons-search",type:"search",value:t,onInput:(p)=>a(p.currentTarget.value),placeholder:"Search name or alias","aria-label":"Search glyphs by name or alias"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.findings.map((p,v)=>m(dw,{finding:p},v,!1,void 0,this)),m("div",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_z99rxc",children:[m("h2",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_1imonbj_idpfg4 ads-ui-atm_1d9xrg0_rhlbdi ads-ui-atm_1f3xrdb_1ye8rbs ads-ui-atm_1itffwh_jnvr1u ads-ui-atm_15z90c_1d1fc98 ads-ui-atm_l01mg9_1r1dq30 ads-ui-atm_vs2zhb_rhlbdi ads-ui-atm_1bev6qx_1m800s6 ads-ui-atm_nbabpf_1phvqmz ads-ui-atm_10ivcz9_el7ql6 ads-ui-atm_m6w3cu_1mqbmot",children:[m("span",{className:"icons-heading-title",children:"At text size"},void 0,!1,void 0,this),m("small",{className:"icons-heading-note",children:["Every glyph at ",o,"px, the size used beside text"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),m("div",{className:"icons-set ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_1yjf2zc ads-ui-atm_ei944y_1osqo2v",role:"list","aria-label":"At text size",children:i.map((p)=>m("span",{className:"icons-set-item ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1wf0rum_1p59u9q ads-ui-atm_h5r38d_1p59u9q ads-ui-atm_12itgy1_1p59u9q ads-ui-atm_1o7ozsh_1p59u9q ads-ui-atm_ei944y_1osqo2v","data-glyph":p.name,role:"listitem",children:m(uw,{glyph:p,px:o,label:p.name,kind:"text"},void 0,!1,void 0,this)},p.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m("div",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_z99rxc",children:[m("h2",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_1imonbj_idpfg4 ads-ui-atm_1d9xrg0_rhlbdi ads-ui-atm_1f3xrdb_1ye8rbs ads-ui-atm_1itffwh_jnvr1u ads-ui-atm_15z90c_1d1fc98 ads-ui-atm_l01mg9_1r1dq30 ads-ui-atm_vs2zhb_rhlbdi ads-ui-atm_1bev6qx_1m800s6 ads-ui-atm_nbabpf_1phvqmz ads-ui-atm_10ivcz9_el7ql6 ads-ui-atm_m6w3cu_1mqbmot",children:[m("span",{className:"icons-heading-title",children:"Each one"},void 0,!1,void 0,this),m("small",{className:"icons-heading-note",children:"Enlarged on its construction grid, then at every artwork size"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u&&m("p",{className:"icons-empty ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:d},void 0,!1,void 0,this),m("div",{className:"icons-cards ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_571fqe ads-ui-atm_1t3vapq_571fqe ads-ui-atm_198vcvx_1numadt",children:i.map((p)=>m(ax,{glyph:p,sizes:e.sizes},p.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h&&m("h2",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_1imonbj_idpfg4 ads-ui-atm_1d9xrg0_rhlbdi ads-ui-atm_1f3xrdb_1ye8rbs ads-ui-atm_1itffwh_jnvr1u ads-ui-atm_15z90c_1d1fc98 ads-ui-atm_l01mg9_1r1dq30 ads-ui-atm_vs2zhb_rhlbdi ads-ui-atm_1bev6qx_1m800s6 ads-ui-atm_nbabpf_1phvqmz ads-ui-atm_10ivcz9_el7ql6 ads-ui-atm_m6w3cu_1mqbmot",children:[m("span",{className:"icons-heading-title",children:"Other products’ logos"},void 0,!1,void 0,this),m("small",{className:"icons-heading-note",children:l?.source},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h&&m("div",{className:"icons-logos ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_1yjf2zc ads-ui-atm_ei944y_1osqo2v",children:(l?.files??[]).map((p)=>m(sx,{file:p},p.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var rx=[{name:"brand",label:"Brand",icon:"brand"},{name:"artwork",label:"Artwork",icon:"icons"},{name:"tokens",label:"Tokens",icon:"tokens"},{name:"profiles",label:"Profiles",icon:"profiles"},{name:"components",label:"Components",icon:"components"},{name:"patterns",label:"Patterns",icon:"patterns"},{name:"mocks",label:"Mock",icon:"mocks"},{name:"drafts",label:"Drafts",icon:"drafts"}];function nx({section:e="tokens",hiddenSections:t=[],onSection:a}){return m("div",{className:"ux-section-menu ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_1wf0rum_1p59u9q ads-ui-atm_h5r38d_1p59u9q ads-ui-atm_12itgy1_1p59u9q ads-ui-atm_1o7ozsh_1p59u9q ads-ui-atm_ei944y_1osqo2v",children:rx.map((s)=>m(Ze,{label:s.label,icon:s.icon,section:s.name,current:e===s.name,hidden:t.includes(s.name),onClick:()=>a?.(s.name)},s.name,!1,void 0,this))},void 0,!1,void 0,this)}function cx({id:e,label:t,children:a}){return m("nav",{id:e,className:"ux-navigation-menu ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck","aria-label":t,children:a},void 0,!1,void 0,this)}function ux({label:e,open:t=!0,onToggle:a,children:s}){let[i,o]=ow(t);return YS(()=>o(t),[t]),m("details",{className:"entry-group ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck",open:t,onToggle:(r)=>{let n=r.currentTarget.open;if(o(n),n!==t)a?.(n)},children:[m("summary",{className:"ux-navigation-summary ads-ui-atm_11oxoha_glywfm ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_dcxj7s ads-ui-atm_1o7ozsh_dcxj7s ads-ui-atm_9pzzkz_1wdkmbo ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_1xp3v54_glywfm ads-ui-atm_1shwamd_tlke0l ads-ui-atm_1yl5u20_1krx8ie ads-ui-atm_ds0lo3_rhlbdi ads-ui-atm_cgicqi_1m800s6 ads-ui-atm_1a0iad9_1phvqmz ads-ui-atm_812bqf_1d1fc98",children:[m(DS,{name:i?"chevron-down":"chevron-right"},void 0,!1,void 0,this),m("span",{className:"ux-navigation-group-label",children:e},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m("div",{className:"ux-navigation-entries ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl",role:"group","aria-label":e,"data-slot":"entries",children:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function dx(e){let[t="",...a]=e.split(`
|
|
251
|
+
`),s=/^(.+?\.)\s+(.+)$/.exec(t),i=s?s[1]:t,o=[],r=[];for(let n of[...s?[s[2]]:[],...a].map((u)=>u.trim()).filter(Boolean)){let u=/^(\S+?:\d+(?::\d+)?|[\w./-]+\.\w+):\s+(?:([a-z][a-z0-9-]*):\s+)?(.+)$/.exec(n);if(!u){r.push(n);continue}let d=u[3],l=/^(.+?[.!?])\s+(.+)$/.exec(d);o.push({location:u[1],rule:u[2],summary:l?l[1]:d,detail:l?.[2]})}return{title:i,problems:o,notes:r}}function lx({message:e}){let{title:t,problems:a,notes:s}=dx(e),i=a.length>1?` ${a.length} problems`:"";return m("div",{className:"ux-status-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ozlz3u_rhlbdi ads-ui-atm_132esew_1m800s6 ads-ui-atm_146nvi2_1phvqmz ads-ui-atm_1f51wi3_1d1fc98 ads-ui-atm_7o3xp_1r1dq30 ads-ui-atm_1nvt3ys_1ffux1g ads-ui-atm_1k1oiq6_idpfg4 ads-ui-atm_1oz6kpe_glywfm ads-ui-atm_15cx07y_idpfg4 ads-ui-atm_1hmcsz1_idpfg4",children:[m("p",{className:"ux-status-title ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_f0eiw9 ads-ui-atm_h5r38d_f0eiw9 ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1imonbj_idpfg4",children:[t,m("span",{className:"ux-status-count ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6",children:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m("ul",{className:"ux-status-problems",tabIndex:0,"aria-label":"Problems",children:a.map((o,r)=>m(mx,{...o},r,!1,void 0,this))},void 0,!1,void 0,this),s.map((o,r)=>m("p",{className:"ux-status-note ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_f0eiw9 ads-ui-atm_h5r38d_f0eiw9 ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:o},r,!1,void 0,this))]},void 0,!0,void 0,this)}function mx({location:e,rule:t,summary:a,detail:s}){return m("li",{className:"ux-status-problem ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_1wf0rum_f0eiw9 ads-ui-atm_h5r38d_f0eiw9 ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_1cm89v7_1ohcsmr ads-ui-atm_prxrza_nqa18y ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1dwkn0r_glywfm ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb",children:[m("div",{className:"ux-status-where ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1q9ycp6 ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_ei944y_1osqo2v ads-ui-atm_boohjf_l6f2xw ads-ui-atm_tvtc1n_10of7rf ads-ui-atm_1u2s23m_l05n6q ads-ui-atm_1ug0ad4_el7ql6 ads-ui-atm_1pluyf7_1mqbmot ads-ui-atm_1at4h9f_idpfg4 ads-ui-atm_9jlw6_fg65tv",children:[e&&m("span",{className:"ux-status-file",children:e},void 0,!1,void 0,this),t&&m("span",{className:"ux-status-rule ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_12itgy1_dxndoj ads-ui-atm_1o7ozsh_dxndoj ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_l6f2xw ads-ui-atm_13uplcb_10of7rf ads-ui-atm_1tf621q_l05n6q ads-ui-atm_1jm3u9r_el7ql6",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m("p",{className:"ux-status-summary ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:a},void 0,!1,void 0,this),s&&m("details",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_1wnhlda_1mqbmot",children:[m("summary",{className:"ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1shwamd_tlke0l ads-ui-atm_1yl5u20_53hpxf",children:"Why and how to fix"},void 0,!1,void 0,this),m("p",{className:"ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var _x={ready:"state-ready",checking:"state-checking",reloading:"state-building",compiling:"state-building",reverting:"state-building",error:"warning"},px={ready:"ready",checking:"checking",reloading:"building",compiling:"building",reverting:"building",error:"error"};function hx({idPrefix:e="",phase:t="ready",message:a="Preview is up to date.",warmup:s,warmupState:i,title:o,failure:r,onRetry:n}){let u=(l)=>e+l,d=t==="error";return m("div",{className:"ux-preview-status ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_ei944y_1osqo2v",children:[m("button",{id:u("preview-status"),type:"button",className:"ds-toolbar-button ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_xypucb ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_9pzzkz_1cf0bhj ads-ui-atm_12itgy1_10dwebu ads-ui-atm_1o7ozsh_10dwebu ads-ui-atm_1wf0rum_9ihi2p ads-ui-atm_h5r38d_9ihi2p ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_1b8d50m_tx1for ads-ui-atm_1ft0qzd_hnzbge ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_168r6ku_hnzbge ads-ui-atm_smau91_1wskm3t ads-ui-atm_jwwj6z_pt45zb ads-ui-atm_1qd811_pt45zb ads-ui-atm_p68de7_pt45zb ads-ui-atm_4jiwlx_pt45zb ads-ui-atm_16ku829_moeofi ads-ui-atm_4luhvg_2iq75o ads-ui-atm_6zeuib_15wi45 ads-ui-atm_14bywhv_nqa18y ads-ui-atm_126jqyz_116y0ak ads-ui-atm_1f03g4g_idpfg4 ads-ui-atm_iayrbe_idpfg4 ads-ui-atm_irjrjx_1wugsn5 ads-ui-atm_10v5oas_1h6ojuz ads-ui-atm_17mqz9g_1h6ojuz ads-ui-atm_196rep2_5mvnfr ads-ui-atm_qhhzoy_5mvnfr ads-ui-atm_17ay2qw_1ulexfb ads-ui-atm_1dn53on_idpfg4 ads-ui-atm_1i9ihs9_5mvnfr ads-ui-atm_1ue7711_1aou828 ads-ui-atm_sq98cb_13zt0f8","aria-label":`Preview status: ${a.split(`
|
|
252
|
+
`)[0]}`,title:o??a,popoverTarget:u("status-details"),"data-phase":t,"data-warmup":i,children:m("span",{className:d===!1?"ds-preview-indicator":"ds-preview-indicator preview-warning","data-state":px[t],"data-variant":"toolbar","aria-hidden":"true",dangerouslySetInnerHTML:{__html:{brand:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 1.5 9.9 5.6l4.4.5-3.3 3 .9 4.4L8 11.3l-3.9 2.2.9-4.4-3.3-3 4.4-.5L8 1.5Z"/></svg>
|
|
253
|
+
`,"chevron-down":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 6 4 4 4-4"/></svg>
|
|
254
|
+
`,"chevron-left":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4l-4 4 4 4"/></svg>
|
|
255
|
+
`,"chevron-right":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 4 4 4-4 4"/></svg>
|
|
256
|
+
`,"chevron-up":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 10 4-4 4 4"/></svg>
|
|
257
|
+
`,close:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m4 4 8 8M12 4l-8 8"/></svg>
|
|
258
|
+
`,components:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7L8 1Zm-6 3.5 6 3.5 6-3.5M8 8v7"/></svg>
|
|
259
|
+
`,mocks:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>
|
|
260
|
+
`,drafts:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 1h7l3 3v11H3zM10 1v4h3M5 8h6M5 11h4"/></svg>
|
|
261
|
+
`,"guide-bounds":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3.5" width="12" height="9"/></svg>
|
|
262
|
+
`,"guide-gaps":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="3" width="3.5" height="10"/><rect x="6.25" y="3" width="3.5" height="10"/><rect x="11" y="3" width="3.5" height="10"/></svg>
|
|
263
|
+
`,"guide-margins":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11" stroke-dasharray="1.5 1.5"/><rect x="4.5" y="5.5" width="7" height="5"/></svg>
|
|
264
|
+
`,"guide-mini":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 2v12M6 2v12M10 2v12M14 2v12M2 2h12M2 6h12M2 10h12M2 14h12" stroke-width="1"/></svg>
|
|
265
|
+
`,"guide-padding":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1.5" y="2.5" width="13" height="11"/><rect x="4.5" y="5.5" width="7" height="5" stroke-dasharray="1.5 1.5"/></svg>
|
|
266
|
+
`,"guide-tracks":`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 2v12M6 2v12M10 2v12M13.5 2v12"/></svg>
|
|
267
|
+
`,icons:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="5" r="2.5"/><rect x="9.5" y="2.5" width="4" height="5" rx="1"/><path d="m2.5 13.5 2.5-4 2.5 4ZM9.5 11.5h4M11.5 9.5v4"/></svg>
|
|
268
|
+
`,layout:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v12M6.5 2v12M9.5 2v12M13 2v12"/></svg>
|
|
269
|
+
`,moon:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg>
|
|
270
|
+
`,patterns:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>
|
|
271
|
+
`,phone:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg>
|
|
272
|
+
`,profiles:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h8v5H2V3Zm4 5v2.5h8V14H6v-3.5"/></svg>
|
|
273
|
+
`,source:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m5 4-4 4 4 4m6-8 4 4-4 4M9 2 7 14"/></svg>
|
|
274
|
+
`,split:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="1" y="2" width="14" height="12" rx="1"/><path d="M8 2v12"/></svg>
|
|
275
|
+
`,"state-building":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="building" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="22 10"/></svg>
|
|
276
|
+
`,"state-checking":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="checking" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="3 3"/></svg>
|
|
277
|
+
`,"state-error":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="error" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" fill="currentColor" stroke="none"/></svg>
|
|
278
|
+
`,"state-ready":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="ready" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5"/></svg>
|
|
279
|
+
`,"state-stale":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="stale" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="5" stroke-dasharray="2 3"/></svg>
|
|
280
|
+
`,"state-unreported":`<svg xmlns="http://www.w3.org/2000/svg" data-mark="unreported" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/></svg>
|
|
281
|
+
`,sun:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="3"/><path d="M8 1v1M8 14v1M1 8h1M14 8h1M3 3l1 1M12 12l1 1M3 13l1-1M12 4l1-1"/></svg>
|
|
282
|
+
`,tokens:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 6 3-6 3-6-3 6-3Zm-6 6 6 3 6-3M2 11l6 3 6-3"/></svg>
|
|
283
|
+
`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m8 2 7 12H1L8 2Z"/><path d="M8 6v3M8 11v.5"/></svg>
|
|
284
|
+
`}[_x[t]]}},void 0,!1,void 0,this)},void 0,!1,void 0,this),m(ew,{id:u("status-details"),width:"wide",flush:!0,children:m("div",{className:"ux-status-details ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck",children:[m("div",{id:u("status"),className:"ux-status-message ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck",role:d?"alert":"status","data-error":String(d),"data-error-category":d?r?.category:void 0,"data-error-code":d?r?.code:void 0,"data-resource-uri":d?r?.resourceUri:void 0,children:m(lx,{message:a},void 0,!1,void 0,this)},void 0,!1,void 0,this),(s||d)&&m("div",{className:"ux-status-footer ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_1i51wq9 ads-ui-atm_1wf0rum_f0eiw9 ads-ui-atm_h5r38d_f0eiw9 ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_1cm89v7_1ohcsmr ads-ui-atm_prxrza_nqa18y ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1dwkn0r_glywfm ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_82yulm_1osqo2v ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1n58fz4_rhlbdi ads-ui-atm_1emi9br_1m800s6 ads-ui-atm_lxedld_1phvqmz ads-ui-atm_1tafpql_el7ql6 ads-ui-atm_3ze007_1mqbmot ads-ui-atm_1tc9uc6_kb7nvz ads-ui-atm_z461fm_kb7nvz ads-ui-atm_17j1bxo_idpfg4 ads-ui-atm_1mp4j1u_idpfg4",children:[s&&m("p",{id:u("warmup-status"),className:"ux-status-warmup",children:s},void 0,!1,void 0,this),d&&m("div",{id:u("preview-error"),className:"preview-retry ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_h9n0ih ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_ei944y_1osqo2v",children:m(Ze,{id:u("retry-preview"),label:"Retry preview",variant:"outlined",onClick:n},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function jn({title:e,description:t,searchable:a=!1,onSearch:s,children:i}){return m("section",{className:"ux-specimen-page ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_tv4kfj ads-ui-atm_1wnhlda_an4usv ads-ui-atm_1wf0rum_2sml4p ads-ui-atm_h5r38d_2sml4p ads-ui-atm_12itgy1_2sml4p ads-ui-atm_1o7ozsh_2sml4p ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1c8rstr ads-ui-atm_1tf621q_1d7pcef ads-ui-atm_1jm3u9r_el7ql6","aria-label":e,children:[m("header",{className:"ux-specimen-header ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_10lap3l",children:[m("div",{className:"ux-specimen-heading ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_1i51wq9 ads-ui-atm_ei944y_1osqo2v ads-ui-atm_174y7yc_moeofi ads-ui-atm_20ddh5_2iq75o ads-ui-atm_1smpjqa_15wi45 ads-ui-atm_8jreg0_nqa18y ads-ui-atm_1dp00g7_rhlbdi ads-ui-atm_1lo3mq2_1m800s6 ads-ui-atm_1dj1saw_1phvqmz ads-ui-atm_1e4p12g_el7ql6 ads-ui-atm_t0nv0d_hnzbge ads-ui-atm_1hj762t_an4usv ads-ui-atm_rlvj2v_1627y59 ads-ui-atm_fhxb6m_1627y59 ads-ui-atm_5h6ue9_1627y59 ads-ui-atm_w6xhz0_1627y59 ads-ui-atm_1xd67w_usvi9m ads-ui-atm_10qem9s_idpfg4 ads-ui-atm_pzjzfy_1h68f9y ads-ui-atm_1frnja5_dcxj7s ads-ui-atm_1nmshrk_dcxj7s ads-ui-atm_ciimy2_1byhj8 ads-ui-atm_yiuku5_1byhj8 ads-ui-atm_xbefe7_1ohcsmr ads-ui-atm_f5te1_1ohcsmr ads-ui-atm_w5mv8j_1ohcsmr ads-ui-atm_19edguz_1ohcsmr ads-ui-atm_176lrki_evuusw ads-ui-atm_1sws9ke_idpfg4",children:[m("h1",{className:"ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1heflvk ads-ui-atm_1tf621q_1l8tyb9 ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_1imonbj_idpfg4",children:e},void 0,!1,void 0,this),a&&m("input",{className:"ux-specimen-search",type:"search","aria-label":"Find token",placeholder:"Find a token",onInput:(o)=>s?.(o.currentTarget.value)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),t&&m("p",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_ei944y_1agt12q ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m("div",{className:"ux-specimen-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_tv4kfj","data-slot":"content",children:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function lw({title:e,id:t,description:a,arrangement:s="stack",width:i="full",children:o}){return m("section",{className:"ux-specimen-section ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1w0p0wo",id:t,children:[m("h2",{className:"ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1ye8rbs ads-ui-atm_1tf621q_jnvr1u ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_1imonbj_idpfg4",children:e},void 0,!1,void 0,this),a&&m("p",{className:"ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:a},void 0,!1,void 0,this),m("div",{className:s==="row"?i==="full"?"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_1osqo2v":i==="medium"?"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_tkroio_1g80g66 ads-ui-atm_ei944y_1vbofhn":"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_tkroio_1g80g66 ads-ui-atm_ei944y_1nc88z9":s==="row-center"?i==="full"?"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_1osqo2v":i==="medium"?"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_ei944y_1vbofhn":"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_ei944y_1nc88z9":s==="row-end"?i==="full"?"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_h9n0ih ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_1osqo2v":i==="medium"?"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_h9n0ih ads-ui-atm_tkroio_1g80g66 ads-ui-atm_ei944y_1vbofhn":"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_h9n0ih ads-ui-atm_tkroio_1g80g66 ads-ui-atm_ei944y_1nc88z9":i==="full"?"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_z99rxc":i==="medium"?"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_ei944y_1by8x7b":"ux-specimen-section-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_ei944y_mt9npp","data-slot":"content",children:o},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function fx({label:e,columns:t,rows:a}){return m("div",{className:"ads-ui-atm_1p75dy7_1qrv8r3 ads-ui-atm_833615_idpfg4 ads-ui-atm_c9yqdj_rhlbdi ads-ui-atm_1oi4l4i_1m800s6 ads-ui-atm_1aeds48_1phvqmz ads-ui-atm_1nr13m_el7ql6 ads-ui-atm_y60jgy_an4usv ads-ui-atm_1k86d0k_cfaqiv",tabIndex:0,"aria-label":e,children:m("table",{className:"ux-specimen-table","aria-label":e,children:[m("thead",{children:m("tr",{children:t.map((s)=>m(Bv,{role:"column",align:s.align,children:s.label},s.label,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),m("tbody",{children:a.map((s)=>m("tr",{"data-key":s.key,children:t.map((i,o)=>m(Bv,{role:i.rowHeader===!0?"row":"cell",align:i.align,children:i.sample===!0?m("div",{"data-slot":"sample","data-key":s.key,"aria-hidden":"true"},void 0,!1,void 0,this):s.cells[o]},o,!1,void 0,this))},s.key,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function Bv({role:e,align:t="start",children:a}){if(e==="column")return m("th",{scope:"col",className:t==="center"?"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_1ohcsmr ads-ui-atm_1dwkn0r_nqa18y ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_ut27rk_1h6ojuz ads-ui-atm_n3jkfn_nkobfv":"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_1ohcsmr ads-ui-atm_1dwkn0r_nqa18y ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_n3jkfn_nkobfv ads-ui-atm_ut27rk_v2br90",children:a},void 0,!1,void 0,this);if(e==="row")return m("th",{scope:"row",className:t==="center"?"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_1ohcsmr ads-ui-atm_1dwkn0r_nqa18y ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_ut27rk_1h6ojuz ads-ui-atm_n3jkfn_nkobfv":"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_1ohcsmr ads-ui-atm_1dwkn0r_nqa18y ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_n3jkfn_nkobfv ads-ui-atm_ut27rk_v2br90",children:a},void 0,!1,void 0,this);return m("td",{className:t==="center"?"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_1ohcsmr ads-ui-atm_1dwkn0r_nqa18y ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_ut27rk_1h6ojuz ads-ui-atm_n3jkfn_nkobfv":"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_1ohcsmr ads-ui-atm_1dwkn0r_nqa18y ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_1wnhlda_an4usv ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_n3jkfn_nkobfv ads-ui-atm_ut27rk_v2br90",children:a},void 0,!1,void 0,this)}function Tu({label:e,choices:t,chosen:a,onChoose:s}){return m("div",{className:"ux-specimen-choices ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_1osqo2v",role:"group","aria-label":e,children:t.map((i)=>m(Ze,{label:i.label,pressed:i.id===a,onClick:()=>s?.(i.id)},i.id,!1,void 0,this))},void 0,!1,void 0,this)}var wm="(width < 47.5rem)";function gx({collapsed:e=!1,capture:t=!1,headerHidden:a=!1,viewport:s="auto",loading:i=!1,previewLoading:o=!1,previewBusy:r=!1,brand:n,sections:u,actions:d,navigation:l,overlays:h,previewTools:p,previewToolsHidden:v=!1,children:b}){let g=!t&&!a,w=e||t,R=!t&&p!==void 0;return m("div",{id:"workspace",className:"ux-workspace ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1gbo270_kb7nvz ads-ui-atm_19pszo6_kb7nvz ads-ui-atm_1eohyr_idpfg4 ads-ui-atm_1l4booy_idpfg4","data-loading":String(i),"data-collapsed":String(e),"data-capture":String(t),"data-viewport":s,"aria-busy":i,children:[g&&m("header",{id:"header",className:e===!1?"ux-workspace-header ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_idpfg4 ads-ui-atm_1t3vapq_idpfg4 ads-ui-atm_198vcvx_lbgdkc ads-ui-atm_1mdd4zy_grho7r ads-ui-atm_ei944y_glywfm ads-ui-atm_mrwrxb_1210cad ads-ui-atm_165a258_idpfg4 ads-ui-atm_ndcbtc_idpfg4 ads-ui-atm_1ywdvs7_idpfg4 ads-ui-atm_7bg9zp_107lskt ads-ui-atm_qjzyof_idpfg4 ads-ui-atm_15n9hsn_idpfg4 ads-ui-atm_gpq1w8_idpfg4 ads-ui-atm_4nyljr_q96o5s ads-ui-atm_kivprt_grho7r ads-ui-atm_9vjuy7_glywfm ads-ui-atm_lz7qdd_6s8zn8 ads-ui-atm_134y5xe_1ncjpb7 ads-ui-atm_1bc6r1s_q96o5s ads-ui-atm_1goeq7f_grho7r ads-ui-atm_1besvjn_glywfm ads-ui-atm_1t1wofs_6s8zn8 ads-ui-atm_133rkoe_1ncjpb7 ads-ui-atm_9pzzkz_1nl5zyk ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_zzfiyx_yiyuq9":"ux-workspace-header ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_idpfg4 ads-ui-atm_1t3vapq_idpfg4 ads-ui-atm_198vcvx_1i3vle2 ads-ui-atm_1mdd4zy_grho7r ads-ui-atm_ei944y_glywfm ads-ui-atm_mrwrxb_6s8zn8 ads-ui-atm_165a258_idpfg4 ads-ui-atm_ndcbtc_idpfg4 ads-ui-atm_1ywdvs7_idpfg4 ads-ui-atm_7bg9zp_h3ouum ads-ui-atm_qjzyof_idpfg4 ads-ui-atm_15n9hsn_idpfg4 ads-ui-atm_gpq1w8_idpfg4 ads-ui-atm_4nyljr_1i3vle2 ads-ui-atm_kivprt_grho7r ads-ui-atm_9vjuy7_glywfm ads-ui-atm_lz7qdd_6s8zn8 ads-ui-atm_134y5xe_h3ouum ads-ui-atm_1bc6r1s_1i3vle2 ads-ui-atm_1goeq7f_grho7r ads-ui-atm_1besvjn_glywfm ads-ui-atm_1t1wofs_6s8zn8 ads-ui-atm_133rkoe_h3ouum ads-ui-atm_9pzzkz_1nl5zyk ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_zzfiyx_yiyuq9",children:[m("div",{id:"brand",className:e===!1?"ux-workspace-brand ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_tx1for ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1dwkn0r_glywfm ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_1ohcsmr ads-ui-atm_1hlx6az_nqa18y ads-ui-atm_ei944y_1osqo2v":"ux-workspace-brand ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1dwkn0r_glywfm ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_1ohcsmr ads-ui-atm_1hlx6az_nqa18y ads-ui-atm_ei944y_1osqo2v",children:n},void 0,!1,void 0,this),m("div",{className:e===!1?"ux-workspace-bar ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_rlc0ar_h9n0ih ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_82yulm_1osqo2v ads-ui-atm_vajvhz_1d7ynzx ads-ui-atm_samwau_1d7ynzx ads-ui-atm_9z25xx_1qrv8r3 ads-ui-atm_1c77ke4_idpfg4 ads-ui-atm_c884dg_kb7nvz ads-ui-atm_1gx9sub_kb7nvz ads-ui-atm_vkxp9v_idpfg4 ads-ui-atm_1mfn7uh_glywfm":"ux-workspace-bar ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_82yulm_1osqo2v ads-ui-atm_vajvhz_1d7ynzx ads-ui-atm_samwau_1d7ynzx ads-ui-atm_9z25xx_1qrv8r3 ads-ui-atm_1c77ke4_idpfg4 ads-ui-atm_c884dg_kb7nvz ads-ui-atm_1gx9sub_kb7nvz ads-ui-atm_vkxp9v_idpfg4",children:[!i&&m("nav",{id:"sections",className:"ux-workspace-sections ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_ei944y_1osqo2v","aria-label":"Showcase sections",children:u},void 0,!1,void 0,this),m("div",{className:"ux-workspace-actions ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1wf0rum_1p59u9q ads-ui-atm_h5r38d_1p59u9q ads-ui-atm_12itgy1_1p59u9q ads-ui-atm_1o7ozsh_1p59u9q ads-ui-atm_ei944y_1osqo2v",children:d},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h,m("main",{className:w===!1?"ux-workspace-main ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_idpfg4 ads-ui-atm_1t3vapq_idpfg4 ads-ui-atm_61a05l_i47zc9 ads-ui-atm_198vcvx_lbgdkc ads-ui-atm_1mdd4zy_grho7r ads-ui-atm_ei944y_glywfm ads-ui-atm_1xr9v27_1210cad ads-ui-atm_1p86dp8_6s8zn8 ads-ui-atm_f3wayr_idpfg4 ads-ui-atm_mgqw9w_idpfg4 ads-ui-atm_8iopdn_idpfg4 ads-ui-atm_x9z4xg_107lskt ads-ui-atm_1ko645t_6s8zn8 ads-ui-atm_1wohlm_idpfg4 ads-ui-atm_u9g1y7_idpfg4 ads-ui-atm_1orm0qo_idpfg4 ads-ui-atm_4nyljr_q96o5s ads-ui-atm_kivprt_grho7r ads-ui-atm_9vjuy7_glywfm ads-ui-atm_zryume_6s8zn8 ads-ui-atm_1p2n7hl_6s8zn8 ads-ui-atm_1ngmxnq_1ncjpb7 ads-ui-atm_glob4a_6s8zn8 ads-ui-atm_1bc6r1s_q96o5s ads-ui-atm_1goeq7f_grho7r ads-ui-atm_1besvjn_glywfm ads-ui-atm_1ihyz4e_6s8zn8 ads-ui-atm_obg2af_6s8zn8 ads-ui-atm_oqqbrf_1ncjpb7 ads-ui-atm_q7dqah_6s8zn8":"ux-workspace-main ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_idpfg4 ads-ui-atm_1t3vapq_idpfg4 ads-ui-atm_61a05l_i47zc9 ads-ui-atm_198vcvx_vfatus ads-ui-atm_1mdd4zy_grho7r ads-ui-atm_ei944y_glywfm ads-ui-atm_1xr9v27_6s8zn8 ads-ui-atm_1p86dp8_6s8zn8 ads-ui-atm_f3wayr_idpfg4 ads-ui-atm_mgqw9w_idpfg4 ads-ui-atm_8iopdn_idpfg4 ads-ui-atm_x9z4xg_h3ouum ads-ui-atm_1ko645t_6s8zn8 ads-ui-atm_1wohlm_idpfg4 ads-ui-atm_u9g1y7_idpfg4 ads-ui-atm_1orm0qo_idpfg4 ads-ui-atm_4nyljr_vfatus ads-ui-atm_kivprt_grho7r ads-ui-atm_9vjuy7_glywfm ads-ui-atm_zryume_6s8zn8 ads-ui-atm_1p2n7hl_6s8zn8 ads-ui-atm_1ngmxnq_h3ouum ads-ui-atm_glob4a_6s8zn8 ads-ui-atm_1bc6r1s_vfatus ads-ui-atm_1goeq7f_grho7r ads-ui-atm_1besvjn_glywfm ads-ui-atm_1ihyz4e_6s8zn8 ads-ui-atm_obg2af_6s8zn8 ads-ui-atm_oqqbrf_h3ouum ads-ui-atm_q7dqah_6s8zn8 ads-ui-atm_16fs1mr_glywfm",children:[m("aside",{id:"sidebar",className:"ux-workspace-sidebar ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1wf0rum_130efy9 ads-ui-atm_h5r38d_130efy9 ads-ui-atm_12itgy1_130efy9 ads-ui-atm_1o7ozsh_130efy9 ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1dwkn0r_glywfm ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_1ohcsmr ads-ui-atm_1hlx6az_nqa18y ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_dyjv7d_1ffux1g ads-ui-atm_u71oqy_idpfg4 ads-ui-atm_16mb99s_kb7nvz ads-ui-atm_d5rfph_kb7nvz ads-ui-atm_zvm2xk_idpfg4",children:m("div",{className:"ux-workspace-entries",children:l},void 0,!1,void 0,this)},void 0,!1,void 0,this),m("section",{id:"preview-workspace",className:"ux-workspace-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_1ihrj5f_15wbn57 ads-ui-atm_ggmxbo_1pzsloo ads-ui-atm_zlaayd_kb7nvz ads-ui-atm_rcum8a_kb7nvz ads-ui-atm_vx1wsh_idpfg4 ads-ui-atm_alv8oi_idpfg4","aria-label":"Preview workspace",children:m("section",{id:"preview",className:s==="auto"?"ux-workspace-preview ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_198vcvx_i47zc9 ads-ui-atm_61a05l_i47zc9 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_1kvw5eg_usvi9m ads-ui-atm_1a3a6t5_idpfg4 ads-ui-atm_1b3y068_1txwivl ads-ui-atm_8r1amv_1bp4okc ads-ui-atm_1hd84vz_1fhbwtr ads-ui-atm_x0no62_1nvpqck ads-ui-atm_1pvzj51_kb7nvz ads-ui-atm_1pirady_kb7nvz ads-ui-atm_kvzleo_kb7nvz ads-ui-atm_1ywdi38_kb7nvz ads-ui-atm_1ik21ae_idpfg4 ads-ui-atm_fjib8r_idpfg4 ads-ui-atm_3yr383_kb7nvz ads-ui-atm_ugnyxg_kb7nvz":"ux-workspace-preview ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_198vcvx_i47zc9 ads-ui-atm_61a05l_i47zc9 ads-ui-atm_1p75dy7_zryt35 ads-ui-atm_1kvw5eg_usvi9m ads-ui-atm_1a3a6t5_idpfg4 ads-ui-atm_1b3y068_1txwivl ads-ui-atm_8r1amv_1bp4okc ads-ui-atm_1hd84vz_1h6ojuz ads-ui-atm_x0no62_1nvpqck ads-ui-atm_1pvzj51_kb7nvz ads-ui-atm_1pirady_kb7nvz ads-ui-atm_kvzleo_kb7nvz ads-ui-atm_1ywdi38_kb7nvz ads-ui-atm_1ik21ae_idpfg4 ads-ui-atm_fjib8r_idpfg4 ads-ui-atm_3yr383_kb7nvz ads-ui-atm_ugnyxg_kb7nvz","aria-label":"Preview","aria-busy":r,children:[m("div",{className:"ux-workspace-stage",children:[R&&m("div",{className:"ux-workspace-preview-tools ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_h9n0ih ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1wf0rum_dxndoj ads-ui-atm_h5r38d_dxndoj ads-ui-atm_12itgy1_1p59u9q ads-ui-atm_1o7ozsh_1p59u9q ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_prxrza_glywfm ads-ui-atm_18iq3ml_1ohcsmr ads-ui-atm_1dwkn0r_nqa18y ads-ui-atm_1xg8yzr_idpfg4 ads-ui-atm_9uxezr_glywfm ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_1hlx6az_glywfm ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1vppilz_glywfm",role:"toolbar","aria-label":"Preview tools",hidden:v,children:p},void 0,!1,void 0,this),m("div",{id:"frame-slot",className:s==="auto"?"ux-workspace-slot":"ux-workspace-slot ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1ytd9ll ads-ui-atm_ei944y_jub8wz",children:b},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o&&m("div",{id:"loader",className:"ux-workspace-loader ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_ei944y_1osqo2v",role:"status","aria-label":"Loading preview",children:m("span",{className:"ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_833615_idpfg4 ads-ui-atm_1beo7lr_116y0ak ads-ui-atm_1pqp5k3_idpfg4 ads-ui-atm_19naxxx_idpfg4 ads-ui-atm_8ljjzq_1wugsn5 ads-ui-atm_1k2t294_1h6ojuz ads-ui-atm_f5ukuq_1h6ojuz ads-ui-atm_1r7jhu0_igxdd5 ads-ui-atm_1jgkcoi_igxdd5 ads-ui-atm_16g9vdv_1ulexfb ads-ui-atm_nbbu_idpfg4 ads-ui-atm_zek01z_igxdd5 ads-ui-atm_1wqh01x_14k5dlv ads-ui-atm_1yv0dr1_1q9vzh7 ads-ui-atm_8acyy2_1ruaace ads-ui-atm_3d931j_1t1u72n ads-ui-atm_adqfxx_w8wldp ads-ui-atm_wmezde_12ltuzy ads-ui-atm_1d0901v_1i45qpu ads-ui-atm_1mz8a9e_12c5xpv ads-ui-atm_j5moh8_1urp235 ads-ui-atm_1hj7yhf_glywfm ads-ui-atm_1pegtbr_1i1ep1k","aria-busy":"true",children:m("span",{className:"ux-workspace-spinner","aria-hidden":"true",dangerouslySetInnerHTML:{__html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-width="2"><circle cx="12" cy="12" r="11" stroke="var(--asset-track)"/><path d="M12 1a11 11 0 0 1 11 11" stroke="var(--asset-arc)"/></svg>
|
|
285
|
+
`}},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function vx({viewportAvailable:e=!0,title:t="Design system",titleHint:a,section:s="tokens",hiddenSections:i=[],navigationLabel:o="Entries",navigation:r=[],previewStatus:n,guides:u={available:!1},guideOptions:d,theme:l={label:"Use dark theme",next:"dark"},brands:h,split:p,comparison:v=!1,onSection:b,onEntry:g,onGroupToggle:w,onPaneToggle:R,onViewport:j,onTheme:x,onBrand:P,onSplit:S,onMinimize:k,children:N,...X}){let K=X.collapsed===!0,se=X.viewport==="phone",we=h!==void 0&&h.names.length>0,te=p?.available===!0,ie=(B)=>m(HS,{scenario:B.id,label:B.title,href:B.href,current:B.current,previewState:B.previewState,previewLabel:B.previewLabel,draftLabel:B.draftLabel,draftDescription:B.draftDescription,onClick:(re)=>g?.(B.id,re)},B.id,!1,void 0,this);return m(gx,{...X,viewport:se&&!v?"phone":"auto",brand:m(Ra,{children:[!K&&m("span",{className:"ux-workspace-name ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_tx1for ads-ui-atm_82yulm_jub8wz ads-ui-atm_ei944y_1osqo2v ads-ui-atm_wxd62j_rhlbdi ads-ui-atm_jmuii0_1m800s6 ads-ui-atm_1tjxarl_1phvqmz ads-ui-atm_104xeiq_1d1fc98 ads-ui-atm_16kj8qp_h68d5v ads-ui-atm_1f0tdmb_24x154 ads-ui-atm_163y2ea_1r1dq30 ads-ui-atm_1bug0jb_1q9ccgz ads-ui-atm_56xvpv_h68d5v ads-ui-atm_ghiz1k_24x154 ads-ui-atm_ujci4t_1q9ccgz ads-ui-atm_y4s808_15vqwwr ads-ui-atm_mchhpw_1l2sidv ads-ui-atm_1h1x5xm_idpfg4 ads-ui-atm_16qmio2_glywfm",children:[m(AS,{},void 0,!1,void 0,this),m("span",{className:"ux-workspace-mark",children:"ADS"},void 0,!1,void 0,this),m("span",{id:"title",className:"ux-workspace-title",title:a,children:X.loading?"":t},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m(Ze,{id:"pane-toggle",label:K?"Show navigation pane":"Hide navigation pane",iconOnly:!0,icon:K?"chevron-right":"chevron-left",expanded:!K,controls:"sidebar",onClick:R},void 0,!1,void 0,this)]},void 0,!0,void 0,this),sections:m(nx,{section:s,hiddenSections:i,...b===void 0?{}:{onSection:b}},void 0,!1,void 0,this),actions:m(Ra,{children:[we&&m("select",{id:"brand-select",className:"ux-workspace-brand-select ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_12itgy1_dcxj7s ads-ui-atm_1o7ozsh_dcxj7s ads-ui-atm_9pzzkz_1wdkmbo ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_ei944y_1nb92vq ads-ui-atm_1ft0qzd_hnzbge ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_hnzbge ads-ui-atm_140esw6_hnzbge ads-ui-atm_1fpt21x_hnzbge ads-ui-atm_3v15jc_hnzbge ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4 ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_1tgqd35_hnzbge ads-ui-atm_18uqgji_1wskm3t ads-ui-atm_8qy9fs_pt45zb ads-ui-atm_yxpng4_pt45zb ads-ui-atm_1l8puf7_pt45zb ads-ui-atm_ny1oq5_pt45zb ads-ui-atm_1yl5u20_53hpxf","aria-label":"Preview brand",title:h?.value?`Brand: ${h.value}`:void 0,value:h?.value,onChange:(B)=>P?.(B.currentTarget.value),children:(h?.names??[]).map((B)=>m("option",{value:B,children:B},B,!1,void 0,this))},void 0,!1,void 0,this),m(Ze,{id:"theme",label:l.label,iconOnly:!0,icon:l.next==="dark"?"moon":"sun",disabled:l.disabled,onClick:x},void 0,!1,void 0,this),m(hx,{...n},void 0,!1,void 0,this),m(Ze,{id:"viewport",label:"Phone viewport",iconOnly:!0,icon:"phone",hidden:!e,pressed:se,controls:"frame-slot",title:se?"Use available preview width":"Preview at phone width (390 px)",onClick:j},void 0,!1,void 0,this),m(Ze,{id:"grid-overlay",label:"Layout guides",iconOnly:!0,icon:"layout",controls:"grid-options",popoverTarget:"grid-options",hidden:!u.available,enabled:u.available&&u.enabled===!0,expanded:u.open===!0},void 0,!1,void 0,this),m(Ze,{id:"minimize",label:"Minimize showcase menu",iconOnly:!0,icon:"chevron-up",onClick:k},void 0,!1,void 0,this)]},void 0,!0,void 0,this),overlays:m(GS,{...d},void 0,!1,void 0,this),navigation:m(cx,{id:"entries",label:o,children:r.map((B)=>B.label===void 0?B.entries.map(ie):m(ux,{label:B.label,open:B.open,onToggle:(re)=>w?.(B.key,re),children:B.entries.map(ie)},B.key,!1,void 0,this))},void 0,!1,void 0,this),previewTools:m(Ze,{id:"split-view",label:"Split view",iconOnly:!0,icon:"split",pressed:te&&p?.pressed===!0,disabled:!te,hidden:!te,title:p?.title,onClick:S},void 0,!1,void 0,this),previewToolsHidden:!te,children:N},void 0,!1,void 0,this)}function mw({control:e,onControl:t}){return m("div",{className:"ux-scenario-control ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1a4pbg6_rhlbdi ads-ui-atm_dagt1d_1m800s6 ads-ui-atm_1dxy0oa_1phvqmz ads-ui-atm_c69iif_el7ql6 ads-ui-atm_1pwmmps_1mqbmot ads-ui-atm_11b92n4_usvi9m ads-ui-atm_1j9jwx9_1gugb78",children:[m("span",{className:"ux-scenario-control-name",children:e.prop},void 0,!1,void 0,this),m("select",{className:"ux-scenario-control-list ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_12itgy1_dcxj7s ads-ui-atm_1o7ozsh_dcxj7s ads-ui-atm_9pzzkz_1wdkmbo ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_evuusw ads-ui-atm_ei944y_1nb92vq ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wnhlda_1wskm3t ads-ui-atm_snw50q_1627y59 ads-ui-atm_140esw6_1627y59 ads-ui-atm_1fpt21x_1627y59 ads-ui-atm_3v15jc_1627y59 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4 ads-ui-atm_13prmim_nqa18y ads-ui-atm_1shwamd_tlke0l ads-ui-atm_1yl5u20_53hpxf","aria-label":e.prop,value:e.chosen,onChange:(a)=>t?.(e.prop,a.currentTarget.value),children:e.options.map((a)=>m("option",{value:a,children:a},a,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function wx({control:e,onControl:t}){return m("div",{className:"ux-scenario-control ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1a4pbg6_rhlbdi ads-ui-atm_dagt1d_1m800s6 ads-ui-atm_1dxy0oa_1phvqmz ads-ui-atm_c69iif_el7ql6 ads-ui-atm_1pwmmps_1mqbmot ads-ui-atm_11b92n4_usvi9m ads-ui-atm_1j9jwx9_1gugb78",children:[m("span",{className:"ux-scenario-control-name",children:e.prop},void 0,!1,void 0,this),m(Tu,{label:e.prop,choices:e.options.map((a)=>({id:a,label:a})),chosen:e.chosen,onChoose:(a)=>t?.(e.prop,a)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function _w({controls:e,onControl:t}){return m("div",{className:"ux-scenario-controls ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_1b8d50m_z99rxc",role:"group","aria-label":"Props",children:e.map((a)=>a.as==="list"?m(mw,{control:a,onControl:t},a.prop,!1,void 0,this):m(wx,{control:a,onControl:t},a.prop,!1,void 0,this))},void 0,!1,void 0,this)}function bx({controls:e,onControl:t}){return m("aside",{className:"ux-scenario-settings ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_f8mqky_rhlbdi ads-ui-atm_10unpe3_1m800s6 ads-ui-atm_1grpm4k_1phvqmz ads-ui-atm_13qj9t6_19dj2kj ads-ui-atm_1bn21k0_1mqbmot","aria-label":"Showcase settings",children:[m("span",{className:"ux-scenario-settings-caption",children:"Showcase settings · not part of what is shown"},void 0,!1,void 0,this),m(_w,{controls:e,onControl:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function yx({title:e,description:t,frame:a="inline",states:s=[],state:i,onState:o,controls:r=[],onControl:n,specimens:u}){let d=s.length>0,l=r.length>0,h=s.length>3,p=m("aside",{className:"ux-scenario-settings ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_9hjmgu_nqa18y ads-ui-atm_b2dvrb_nqa18y ads-ui-atm_b1oj9_nqa18y ads-ui-atm_1b0n3gz_nqa18y ads-ui-atm_f8mqky_rhlbdi ads-ui-atm_10unpe3_1m800s6 ads-ui-atm_1grpm4k_1phvqmz ads-ui-atm_13qj9t6_19dj2kj ads-ui-atm_1bn21k0_1mqbmot","aria-label":"Showcase settings",children:[m("span",{className:"ux-scenario-settings-caption",children:"Showcase settings · not part of what is shown"},void 0,!1,void 0,this),d&&!h&&m("div",{className:"ux-scenario-control ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1a4pbg6_rhlbdi ads-ui-atm_dagt1d_1m800s6 ads-ui-atm_1dxy0oa_1phvqmz ads-ui-atm_c69iif_el7ql6 ads-ui-atm_1pwmmps_1mqbmot ads-ui-atm_11b92n4_usvi9m ads-ui-atm_1j9jwx9_1gugb78",children:[m("span",{className:"ux-scenario-control-name",children:"State"},void 0,!1,void 0,this),m(Tu,{label:"State",choices:s.map((b)=>({id:b,label:b})),chosen:i,onChoose:o},void 0,!1,void 0,this)]},void 0,!0,void 0,this),d&&h&&m(mw,{control:{prop:"State",options:s,...i===void 0?{}:{chosen:i},as:"list"},onControl:(b,g)=>o?.(g)},void 0,!1,void 0,this),l&&m(_w,{controls:r,onControl:n},void 0,!1,void 0,this)]},void 0,!0,void 0,this),[v]=u;if(a==="screen")return m("section",{className:"ux-scenario-page ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_jub8wz ads-ui-atm_37dn98_kb7nvz ads-ui-atm_1t4vcka_kb7nvz ads-ui-atm_10rstk0_idpfg4 ads-ui-atm_16azfbd_idpfg4","data-frame":"screen","aria-label":e,children:[(d||l)&&m("div",{className:"ux-scenario-bar ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_5eyon5 ads-ui-atm_h5r38d_5eyon5 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30",children:p},void 0,!1,void 0,this),m("div",{className:"ux-scenario-specimen","data-slot":"specimen","data-frame":"screen","data-key":v?.key??""},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(a==="phone")return m(jn,{title:e,description:t,children:[(d||l)&&p,m("div",{className:"ux-scenario-specimen ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_1ytd9ll ads-ui-atm_ei944y_jub8wz ads-ui-atm_b1mxoe_1ry41j7 ads-ui-atm_1p75dy7_1ffux1g ads-ui-atm_9pzzkz_idpfg4","data-slot":"specimen","data-frame":"phone","data-key":v?.key??""},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return m(jn,{title:e,description:t,children:[(d||l)&&p,u.map((b)=>m(kx,{name:b.key,title:b.title,text:b.note,headed:b.headed,arrangement:b.arrangement,width:b.width},b.key,!1,void 0,this))]},void 0,!0,void 0,this)}function kx({name:e,title:t,text:a,headed:s=!1,arrangement:i,width:o}){return m("section",{className:"ux-scenario-section ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1w0p0wo",children:[s&&m("div",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_10lap3l",children:[t&&m("h2",{className:"ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1ye8rbs ads-ui-atm_1tf621q_jnvr1u ads-ui-atm_1jm3u9r_1d1fc98 ads-ui-atm_1imonbj_idpfg4",children:t},void 0,!1,void 0,this),a&&m("p",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_ei944y_1agt12q ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:a},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m(zx,{name:e,arrangement:i,width:o},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function zx({name:e,arrangement:t="stack",width:a="content"}){return m("div",{className:a==="content"?"ux-scenario-measure ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_v2br90 ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_ei944y_1osqo2v":a==="full"?"ux-scenario-measure":a==="medium"?"ux-scenario-measure ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_ei944y_1by8x7b":"ux-scenario-measure ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_ei944y_mt9npp",children:m("div",{className:t==="row"?"ux-scenario-specimen ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_tkroio_1g80g66 ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_1wf0rum_46k31b ads-ui-atm_h5r38d_46k31b ads-ui-atm_12itgy1_46k31b ads-ui-atm_1o7ozsh_46k31b ads-ui-atm_ei944y_1osqo2v":t==="stack"?"ux-scenario-specimen ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_1wf0rum_46k31b ads-ui-atm_h5r38d_46k31b ads-ui-atm_12itgy1_46k31b ads-ui-atm_1o7ozsh_46k31b":"ux-scenario-specimen ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_z99rxc ads-ui-atm_1t3vapq_z99rxc ads-ui-atm_198vcvx_1numadt ads-ui-atm_1wf0rum_46k31b ads-ui-atm_h5r38d_46k31b ads-ui-atm_12itgy1_46k31b ads-ui-atm_1o7ozsh_46k31b","data-slot":"specimen","data-key":e},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var Sx={fill:"the line",pane:"280px",column:"360px",page:"720px"},xx={content:"its content",short:"160px",medium:"320px",tall:"560px"};function Rx({inline:e="fill",block:t="content",label:a,direction:s}){return m("div",{className:e==="column"?"ux-kit-container ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_82yulm_12rxxdh ads-ui-atm_ei944y_jub8wz":e==="fill"?"ux-kit-container ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_10lap3l":e==="page"?"ux-kit-container ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_82yulm_lylphg ads-ui-atm_ei944y_jub8wz":"ux-kit-container ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_82yulm_r9f903 ads-ui-atm_ei944y_jub8wz",children:[m("p",{className:"ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_1imonbj_idpfg4",children:`${a??"Container"} · ${Sx[e]} × ${xx[t]}`},void 0,!1,void 0,this),m("div",{className:t==="content"?"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1ihrj5f_15wbn57 ads-ui-atm_ggmxbo_1pzsloo ads-ui-atm_1p75dy7_1ffux1g ads-ui-atm_9pzzkz_idpfg4 ads-ui-atm_13prmim_nqa18y":t==="medium"?"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_b1mxoe_dzmyjm ads-ui-atm_1ihrj5f_15wbn57 ads-ui-atm_ggmxbo_1pzsloo ads-ui-atm_1p75dy7_1ffux1g ads-ui-atm_9pzzkz_idpfg4 ads-ui-atm_13prmim_nqa18y":t==="short"?"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_b1mxoe_p4w8r0 ads-ui-atm_1ihrj5f_15wbn57 ads-ui-atm_ggmxbo_1pzsloo ads-ui-atm_1p75dy7_1ffux1g ads-ui-atm_9pzzkz_idpfg4 ads-ui-atm_13prmim_nqa18y":"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_b1mxoe_1de26fi ads-ui-atm_1ihrj5f_15wbn57 ads-ui-atm_ggmxbo_1pzsloo ads-ui-atm_1p75dy7_1ffux1g ads-ui-atm_9pzzkz_idpfg4 ads-ui-atm_13prmim_nqa18y","data-slot":"content",dir:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function qx({label:e,tone:t="neutral"}){return m("div",{className:t==="accent"?"ux-kit-placeholder ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_z9e1cl ads-ui-atm_h5r38d_z9e1cl ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_9pzzkz_19st5cd ads-ui-atm_1ft0qzd_uqc78k ads-ui-atm_1wnhlda_an4usv ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_ut27rk_1h6ojuz":"ux-kit-placeholder ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_z9e1cl ads-ui-atm_h5r38d_z9e1cl ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_9pzzkz_19st5cd ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30 ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_ut27rk_1h6ojuz",children:e},void 0,!1,void 0,this)}function jx({label:e,expanded:t,onPress:a}){return m(Ze,{label:e,variant:"outlined",expanded:t,onClick:a},void 0,!1,void 0,this)}function Px({events:e}){return m("div",{className:"ux-kit-event-log ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_10lap3l ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1wf0rum_z9e1cl ads-ui-atm_h5r38d_z9e1cl ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_13prmim_nqa18y ads-ui-atm_1eb585x_l6f2xw ads-ui-atm_wql62g_1m800s6 ads-ui-atm_ipbbgu_1phvqmz ads-ui-atm_1fcgz8u_19dj2kj ads-ui-atm_1r12m9e_1r1dq30 ads-ui-atm_1yrm3gv_l6f2xw ads-ui-atm_zbumss_1m800s6 ads-ui-atm_1x4wytz_1phvqmz ads-ui-atm_6wuwh2_el7ql6 ads-ui-atm_1syodo4_1mqbmot ads-ui-atm_1w6etlf_idpfg4 ads-ui-atm_6cl2fl_fg65tv",role:"log","aria-label":"Events",children:e.map((t)=>m("div",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1q9ycp6 ads-ui-atm_1b8d50m_10lap3l ads-ui-atm_ei944y_1osqo2v",children:[m("span",{className:"ux-kit-event-name",children:t.name},void 0,!1,void 0,this),m("span",{className:"ux-kit-event-detail",children:t.detail},void 0,!1,void 0,this)]},t.key,!0,void 0,this))},void 0,!1,void 0,this)}function Tx({title:e,size:t="medium",children:a}){return m("section",{className:"ux-card-group ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_10lap3l",children:[m("h3",{className:"ads-ui-atm_1wnhlda_1mqbmot ads-ui-atm_1cgskd2_rhlbdi ads-ui-atm_13uplcb_10of7rf ads-ui-atm_1tf621q_l05n6q ads-ui-atm_1jm3u9r_19dj2kj ads-ui-atm_8ad820_angws6 ads-ui-atm_1imonbj_idpfg4",children:e},void 0,!1,void 0,this),m("div",{className:t==="full"?"ux-card-group-cards ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1i51wq9":t==="large"?"ux-card-group-cards ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_1i51wq9 ads-ui-atm_1t3vapq_1i51wq9 ads-ui-atm_198vcvx_bgoten":t==="medium"?"ux-card-group-cards ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_1i51wq9 ads-ui-atm_1t3vapq_1i51wq9 ads-ui-atm_198vcvx_1numadt":"ux-card-group-cards ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_11p5wf0 ads-ui-atm_80xbhx_1i51wq9 ads-ui-atm_1t3vapq_1i51wq9 ads-ui-atm_198vcvx_1pp8hrc","data-slot":"cards",children:a},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Cx({eyebrow:e,name:t,code:a=!1,note:s,bare:i=!1,id:o,children:r}){return m("article",{className:"ux-sample-card ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_1ft0qzd_1u3842e ads-ui-atm_snw50q_pt45zb ads-ui-atm_140esw6_pt45zb ads-ui-atm_1fpt21x_pt45zb ads-ui-atm_3v15jc_pt45zb ads-ui-atm_1wf0rum_z9e1cl ads-ui-atm_h5r38d_z9e1cl ads-ui-atm_12itgy1_z9e1cl ads-ui-atm_1o7ozsh_z9e1cl ads-ui-atm_rke6hk_1ohcsmr ads-ui-atm_6hwe7p_1ohcsmr ads-ui-atm_1tc06ke_1ohcsmr ads-ui-atm_1o6fuj3_1ohcsmr ads-ui-atm_1be842k_2l199o ads-ui-atm_13prmim_nqa18y","data-key":o,children:[!i&&m("div",{className:"ux-sample-card-stage ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_rlc0ar_1h6ojuz ads-ui-atm_1b8d50m_z99rxc ads-ui-atm_1ft0qzd_1bplolx ads-ui-atm_1wf0rum_xc0f30 ads-ui-atm_h5r38d_xc0f30 ads-ui-atm_12itgy1_xc0f30 ads-ui-atm_1o7ozsh_xc0f30 ads-ui-atm_9pzzkz_13u612w ads-ui-atm_1be842k_mrub5a","data-slot":"stage","data-key":o,children:r},void 0,!1,void 0,this),m("div",{className:"ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_z7mod2_1bp4okc ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_w1d03b ads-ui-atm_16gr1xd_rhlbdi ads-ui-atm_1m4bdqs_10of7rf ads-ui-atm_1ahnuei_l05n6q ads-ui-atm_rono60_19dj2kj ads-ui-atm_1ilg8dj_angws6 ads-ui-atm_17kzk17_1mqbmot ads-ui-atm_12m5cya_rhlbdi ads-ui-atm_1b18ubr_1m800s6 ads-ui-atm_ijc71k_1phvqmz ads-ui-atm_bcsqom_1d1fc98 ads-ui-atm_11m6ris_1r1dq30 ads-ui-atm_1odkxpt_idpfg4 ads-ui-atm_13ewgku_fg65tv ads-ui-atm_1e1hyhx_l6f2xw ads-ui-atm_17eoz8v_1m800s6 ads-ui-atm_13lwy4g_1phvqmz ads-ui-atm_momsab_19dj2kj ads-ui-atm_tchx9x_1r1dq30 ads-ui-atm_1fip98q_idpfg4 ads-ui-atm_1vhw075_fg65tv ads-ui-atm_5362v1_rhlbdi ads-ui-atm_k4762h_1m800s6 ads-ui-atm_pff66i_1phvqmz ads-ui-atm_z73dbr_el7ql6 ads-ui-atm_e52eux_1mqbmot ads-ui-atm_plqxni_idpfg4 ads-ui-atm_6099l5_fg65tv",children:[e&&m("span",{className:"ux-sample-card-eyebrow",children:e},void 0,!1,void 0,this),m("h4",{className:a===!1?"ux-sample-card-name ads-ui-atm_1imonbj_idpfg4":"ux-sample-card-code ads-ui-atm_1imonbj_idpfg4",children:t},void 0,!1,void 0,this),s&&m("p",{className:"ux-sample-card-note ads-ui-atm_1imonbj_idpfg4",children:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Ex({columns:e,content:t=!1,label:a}){let s=Array.from({length:e},(i,o)=>o);return m("div",{className:"ux-grid-mini ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_1txwivl ads-ui-atm_ek0mgt_1fhbwtr ads-ui-atm_1b8d50m_1nvpqck ads-ui-atm_b1mxoe_1n4ea0m ads-ui-atm_82yulm_1osqo2v",role:"img","aria-label":a,"data-slot":"grid",children:s.map((i)=>m("span",{className:"ux-grid-mini-column ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_krmq3d_116y0ak ads-ui-atm_ek0mgt_1h6ojuz ads-ui-atm_1cm89v7_idpfg4 ads-ui-atm_18iq3ml_idpfg4 ads-ui-atm_1xg8yzr_1ohcsmr ads-ui-atm_2w1kdk_idpfg4 ads-ui-atm_ei944y_1osqo2v ads-ui-atm_1ft0qzd_xktkfw ads-ui-atm_snw50q_1b6oztu ads-ui-atm_140esw6_1b6oztu ads-ui-atm_1fpt21x_1b6oztu ads-ui-atm_3v15jc_1b6oztu ads-ui-atm_13prmim_nqa18y",children:t&&m("span",{className:"ux-grid-mini-content ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_82yulm_jub8wz ads-ui-atm_b1mxoe_9aaq3a ads-ui-atm_1ft0qzd_1ln42kv ads-ui-atm_1wnhlda_1r1dq30","data-slot":"fill"},void 0,!1,void 0,this)},i,!1,void 0,this))},void 0,!1,void 0,this)}function pw(e,t){ju(m(vx,{...t},void 0,!1,void 0,this),e)}function qe(e){return(t,a)=>ju(m(e,{...a},void 0,!1,void 0,this),t)}var hw=qe(WS),fw=qe(jn),gw=qe(({title:e,description:t,choices:a,sections:s})=>m(jn,{title:e,...t===void 0?{}:{description:t},children:[a&&m(Tu,{...a},void 0,!1,void 0,null),s.map((i)=>m(lw,{title:i.title,...i.id===void 0?{}:{id:i.id},...i.arrangement===void 0?{}:{arrangement:i.arrangement},...i.description===void 0?{}:{description:i.description},children:[i.tables.map((o)=>m(fx,{...o},o.label,!1,void 0,null)),i.more&&m(Ze,{label:i.more.label,variant:"outlined",onClick:i.more.onClick},void 0,!1,void 0,null)]},i.key,!0,void 0,null))]},void 0,!0,void 0,null)),f5=qe(({title:e,description:t,choices:a,settings:s,sections:i})=>m(jn,{title:e,...t===void 0?{}:{description:t},children:[a&&m(Tu,{...a},void 0,!1,void 0,null),s&&m(bx,{...s},void 0,!1,void 0,null),i.map((o)=>m(lw,{title:o.title,...o.id===void 0?{}:{id:o.id},...o.description===void 0?{}:{description:o.description},children:[o.groups.map((r)=>m(Tx,{title:r.title,...r.size===void 0?{}:{size:r.size},children:r.cards.map(({key:n,miniature:u,...d})=>m(Cx,{id:n,...d,children:u&&m(Ex,{...u},void 0,!1,void 0,null)},n,!1,void 0,null))},r.key,!1,void 0,null)),o.more&&m(Ze,{label:o.more.label,variant:"outlined",onClick:o.more.onClick},void 0,!1,void 0,null)]},o.key,!0,void 0,null))]},void 0,!0,void 0,null)),g5=qe(({themes:e})=>m(Ra,{children:e.map(({theme:t,value:a})=>m(OS,{theme:t,value:a},t,!1,void 0,null))},void 0,!1,void 0,null)),v5=qe(({gaps:e})=>m(Ra,{children:e.map(({name:t,value:a})=>m(MS,{name:t,value:a},t,!1,void 0,null))},void 0,!1,void 0,null)),w5=qe(ix),b5=qe(IS),y5=qe(jS),k5=qe(PS),z5=qe(TS),S5=qe(NS),x5=qe(qS),R5=qe(yx),q5=qe(Rx),j5=qe(qx),P5=qe(jx),T5=qe(Px);function vw(e){ju(null,e)}function bm(e){let t=document.createElement("div");return ju(m(VS,{...e},void 0,!1,void 0,this),t),t.firstElementChild}var yw=(e)=>document.getElementById(e);function Ai(e){let t=yw(e);if(!t)throw Error(`The showcase page has no #${e}.`);return t}var $x=Ai("app"),Be=new URLSearchParams(location.search),Au=Be.get("capture")==="1",ww=Be.get("scenario"),Mx=["brand","artwork","tokens","profiles","components","patterns","mocks","drafts"],Nx=(e)=>Mx.some((t)=>t===e),Tn={foundation:"profiles",profiles:"profiles",assets:"artwork"},Tm=(e,t)=>`${e}#${t}`;function bw(e){return e.flatMap((t)=>t.choices?.length?t.choices.map(({id:a,label:s,group:i})=>({...t,id:Tm(t.id,a),title:s,group:i,previewId:t.id,choice:a,choices:void 0})):[t])}var Ix=(e)=>Tn[e]??e,ys=[],Ke,Ci=Be.get("view")==="approval"?null:Be.get("draft"),Cm=[],kw=[],Em=new Map,Ta=Be.get("split")==="1",zm=Sv(Be),Cu={kind:"idle"},ym,Sm,Zt=[],ta=0,Lu;async function Uu(){let e=Zt;Zt=[],await Promise.allSettled(e.map((t)=>t.close()))}var Q="brand",Se={},zw=new Map,Ri=!0,Du=[],ks=[],Zu=[],Sw,$n,Ne,ne,qi,Cn,Ei,xm,ji,bt=0,Eu=!Au&&Be.get("viewport")==="phone",xw=()=>["components","patterns","mocks","drafts"].includes(Q)&&!window.matchMedia(wm).matches,Rw=()=>Eu&&xw(),ye={loading:!0,title:"",titleHint:void 0,collapsed:!1,headerHidden:!1,previewLoading:!1,previewBusy:!1,guideMenuOpen:!1},$u={phase:"ready",message:"Preview is up to date.",failure:void 0},sa=[{name:"light",scheme:"light"},{name:"dark",scheme:"dark"}],ia=Au&&Be.get("theme")||"light",Bu=()=>sa.find((e)=>e.name===ia)?.scheme??"light",qw=()=>sa[(sa.findIndex((e)=>e.name===ia)+1)%sa.length]??{name:ia,scheme:Bu()};function Ox(){let e=qw();return{label:sa.length>1?`Use ${e.name} theme`:`Theme: ${ia}`,next:Bu()==="dark"?"light":"dark",disabled:sa.length<2}}function jw(){document.documentElement.dataset.theme=Bu(),Ie()}document.documentElement.dataset.theme="light";var Pn=[],zs=Au&&Be.get("brand")||null,Hu=mv(async(e)=>{if(e)await Um();await yt(),await Bw()},{onError:ot}),Pw,Mn=!1,Ni=!1,$m=!1,ja,Pa,km=0,$i,Pi=!1,Ea=new AbortController;window.addEventListener("blur",()=>setTimeout(()=>{if(document.activeElement?.tagName==="IFRAME")for(let e of document.querySelectorAll(":popover-open"))e.hidePopover()},0));var Tw=uv(),kt=Tw.client,Cw=(e,t={},a={})=>kt.callTool({name:e,arguments:t},{signal:Ea.signal,...a}),Nu=dv((e)=>kt.readResource(e,{signal:Ea.signal}),{signal:Ea.signal,onDiagnostic:(e)=>{if(e.state==="retry")document.documentElement.dataset.adsResourceRetries=String(Number(document.documentElement.dataset.adsResourceRetries??0)+1);console.warn("ADS resource transport",e)}}),Ew=async(e)=>hu(await Nu({uri:e}));function $w(e){let t=Zu.find((a)=>a.name===e.name);if(!t||!(t._meta?.ui?.visibility??["model","app"]).includes("app"))throw Error("This tool is not callable from an App.");return kt.callTool(e)}var Ii=(e)=>e.structuredContent,Oi=(e,t)=>Je(e)?e[t]:void 0,Ax=(e)=>String(Oi(e,"message")),Lx=(e,t)=>(e??(e===null?0:Number.NaN))<=(t??(t===null?0:Number.NaN)),Rm=(e,...t)=>e!==void 0&&t.includes(e),Mm="",Iu=null,Ou;function me(e,t=!1,a=t?"error":e?"checking":"ready"){if($m)e="Connection interrupted. Reconnecting… The retained preview may be stale.",t=!0,a="error";else if(Iu&&a==="ready"&&Ne?.kind!=="draft")e=Iu,t=!0,a="error";let s=e||"Preview is up to date.";if(!t)Ou=void 0;Mm=s,$u={phase:t?"error":a,message:s,failure:Ou},Ie()}function Ux(){let e=$n?.warmup;return{text:e?`Background views: ${e.completed}/${e.total} compiled${e.failed?`; ${e.failed} failed`:""}.`:void 0,state:e?.state??"disabled"}}function Dx(){Ie()}function Mw(){me(Ne?"Updating preview…":"Opening preview…",!1,"reloading")}function Ye(){return $a().find((e)=>e.id===Se[Q])}function Li(e=Ye()){let t=ys.find((a)=>a.id===Ci&&Em.get(a.id)?.scenario===e?.id);return e?.drafts?.find((a)=>a.id===Ci)??t??e?.drafts?.[0]}function Nm(){return Boolean(Li()&&(Q==="drafts"||Ye()?.draftOnly||Ta))}function xs(){return Q==="drafts"?Ye()?.previewId:Ye()?.previewId??Se[Q]}function En(){return`${Q}:${Q==="drafts"?Se[Q]:xs()}${Nm()?`:draft:${Li()?.id}:split:${Ta}`:""}`}function Mu(e=Ne){return e?.key===En()}function Nw(e=$n){if(Nm()){let t=e?.drafts?.find((a)=>a.id===Li()?.id);return t?.scenarios?.find((a)=>a.id===xs())??t}return e?.previews?.find((t)=>t.id===xs())}var Iw=(e)=>JSON.stringify(e&&[e.session,e.revision,e.current,e.live]);function Ow(){({scenarios:ks,categories:Du}=gv(Cm,kw,ys,Em))}function Zx(e){let t=Ii(e);Em.set(t.id,t),Ow()}async function qm(e,t,a=Ea.signal){let s=(Sw?.compiler?.buildTimeoutMs??300000)+15000;try{return await Cw(e,t,{signal:AbortSignal.any([Ea.signal,a]),timeout:s})}catch(i){if(Oi(i,"code")!=="REQUEST_TIMEOUT")throw i;throw Object.assign(Error(`The preview request timed out after ${Math.ceil(s/1000)} seconds. No preview result was received. Retry the preview.`,{cause:i}),{code:"ADS_PREVIEW_REQUEST_TIMEOUT",category:"transport"})}}async function Im(e,t,a){let s=(Ye()?.id===t||Q==="drafts")&&Ye()?.pendingDraftScenario||t!=null&&e.units?.includes(t)&&!Cm.some((o)=>o.id===t),i=await qm("ads_show_draft",{id:e.id,...!s&&t?{scenario:t}:{}},a);if(i.isError)throw Error(Sn(i)??"Draft preview failed.");if(s){let o=Ii(i),r=o.scenarios.find((n)=>t==="tokens"?n.kind==="tokens":n.unit?n.unit===t:t!=null&&vu(t,n.id));if(!r)throw Error("Draft owner has no scenario yet. Add an independently mountable scenario before previewing it.");if(r.id!==o.scenario)i=await qm("ads_show_draft",{id:e.id,scenario:r.id},a);if(i.isError)throw Error(Sn(i)??"Draft preview failed.")}return Zx(i),i}function aa(e=!1){if(e)ji=Ne?.key;Ei=void 0,ye.previewLoading=!1,ye.previewBusy=!1,Ie()}function Om(e){let t=new URL(location.href);for(let i of["scenario","draft","split","section","state"])t.searchParams.delete(i);if(Q==="drafts"){t.searchParams.set("section","drafts");let i=$a().find((r)=>r.id===e),o=i?.drafts?.[0];if(o)t.searchParams.set("draft",o.id);if(i?.previewId)t.searchParams.set("scenario",i.previewId);if(Ta)t.searchParams.set("split","1");return t.pathname+t.search+t.hash}let a=$a().find((i)=>i.id===e),s=Li(a);if(t.searchParams.delete("choice"),e)t.searchParams.set("scenario",a?.previewId??e);if(e&&Mi?.scenario===(a?.previewId??e))t.searchParams.set("state",Mi.name);if(a?.choice!==void 0)t.searchParams.set("choice",a.choice);if(s&&a&&(a.draftOnly||Ta)){if(t.searchParams.set("draft",s.id),!a.draftOnly)t.searchParams.set("split","1")}return t.pathname+t.search+t.hash}function $a(){if(Q==="drafts")return wv(ks,ys);let e=bw(ks.filter((i)=>Tn[i.kind]===Q)),t=bw(Q==="tokens"?Du:ks.filter((i)=>i.kind===Q&&Tn[i.kind]===void 0)),a=(i)=>i.choice==="summary",s=e.filter((i)=>i.choice===void 0);return[...t.filter(a),...e.filter(a),...s,...e.filter((i)=>!a(i)&&i.choice!==void 0),...t.filter((i)=>!a(i))]}function Bx(){let e=$a(),t=(s)=>{let i=zv(s.previewId?{...s,id:s.previewId}:s,$n,Ci),o=s.drafts??[],r=o.length>0&&Q!=="drafts";return{id:s.id,title:s.title,href:Om(s.id),current:s.id===Se[Q],previewState:i.state,previewLabel:i.label,draftLabel:r?o.length>1?`Drafts ${o.length}`:"Draft":void 0,draftDescription:r?s.draftOnly?"Draft only; no accepted version yet":"Draft available; use Split view to compare":void 0}},a=_v(e);if(Q==="drafts"){let s=Object.values(xn);a.sort((i,o)=>s.indexOf(i.label??"")-s.indexOf(o.label??""))}return a.map((s)=>{if(!s.label)return{key:"ungrouped",entries:s.entries.map(t)};let i=`${Q}:${s.label}`;return{key:i,label:s.label,open:zw.get(i)??!0,entries:s.entries.map(t)}})}var Fu={...bv},Hx=()=>Q==="drafts"?Ye()?.kind:Q,Am=()=>{let e=Hx();return e!==void 0&&["components","patterns","mocks"].includes(e)||Ye()?.kind==="foundation"};function bs(){return Fu}function Fx(){return yv(bs())}function Aw(){return kv(bs())}function Lw(){let e=yw("grid-options");if(!Am()&&e?.matches(":popover-open"))e.hidePopover();Ie()}function Vx(){let{mode:e,...t}=bs(),a=(s)=>{Fu=s,Hm()};return{mode:e,layers:t,onModeChange:(s)=>a({...bs(),mode:s}),onLayerChange:(s,i)=>a({...bs(),[s]:i}),onPreset:(s)=>{let i=bs();a({...i,...sw(s),mode:i.mode==="off"?"hover":i.mode})},onOpenChange:(s)=>{ye.guideMenuOpen=s,Ie()}}}var Ti,Mi=(()=>{let e=Be.get("state"),t=Be.get("scenario");return e&&t?{scenario:t,name:e}:void 0})();function dt(){let e=Ai("frame-slot"),t=Q==="drafts"?void 0:Ye(),a=t?.choice!==void 0&&t.previewId!==void 0?{target:t.previewId,token:t.choice,nonce:t.id}:void 0,s=Ti&&Ti.target===xs()&&Ti.token!==t?.choice?Ti:a,i=Mi&&Mi.scenario===xs()?Mi.name:void 0;return{...s?{adsFocus:s}:{},adsChoices:"host",adsState:i??null,theme:Bu(),adsTheme:ia,...zs?{adsBrand:zs}:{},gridOverlay:Am()&&Aw(),gridGuides:Fx(),gridGuideChoices:bs(),displayMode:"inline",containerDimensions:{width:e.clientWidth,height:e.clientHeight}}}function Uw(){return["brand"].filter((e)=>!ks.some((t)=>t.kind===e))}function Ss(){if(ye.loading=!1,Uw().includes(Q))Q="tokens";document.body.dataset.activeSection=Q;let e=$a();if(!e.some((t)=>t.id===Se[Q]))Se[Q]=(e.find((t)=>t.previewId===Se[Q])??e[0])?.id??null;Lw(),ne?.setHostContext(dt()),history.replaceState(null,"",Om(Se[Q])),jm()}function Jx(){let e=Am(),t=Boolean(Li(Ye()))&&!Ye()?.draftOnly,a=Ux();return{title:ye.title,titleHint:ye.titleHint,loading:ye.loading,collapsed:ye.collapsed,capture:Au,headerHidden:ye.headerHidden,viewport:Rw()?"phone":"auto",viewportAvailable:xw(),previewLoading:ye.previewLoading,previewBusy:ye.previewBusy,section:Q,hiddenSections:Uw(),navigationLabel:Q.charAt(0).toUpperCase()+Q.slice(1),navigation:ye.loading?[]:Bx(),previewStatus:{phase:$u.phase,message:$u.message,failure:$u.failure,warmup:a.text,warmupState:a.state,title:[Mm,a.text].filter(Boolean).join(`
|
|
286
|
+
`)||void 0,onRetry:eR},guides:{available:e,enabled:e&&Aw(),open:ye.guideMenuOpen},guideOptions:Vx(),theme:Ox(),brands:Pn.length?{names:Pn.map((s)=>s.name),value:zs??void 0}:void 0,comparison:Dt==="comparison",split:{available:t,pressed:t&&Ta,title:Ye()?.draftOnly?"No accepted version yet":t?"Compare accepted and draft versions":"No draft for this entry"},onSection:(s)=>{Q=s,Ss(),yt().catch(ot)},onEntry:(s,i)=>{if(i.button||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey)return;i.preventDefault(),Se[Q]=s,Ss(),yt().catch(ot)},onGroupToggle:(s,i)=>{zw.set(s,i),Ie()},onPaneToggle:()=>Pm(!ye.collapsed),onViewport:Qx,onTheme:()=>{ia=qw().name,jw(),ne?.setHostContext(dt());for(let s of Zt)s.refreshContext()},onBrand:(s)=>{zs=s,Ie(),ne?.setHostContext(dt());for(let i of Zt)i.refreshContext()},onSplit:()=>{Ta=!Ta,Ss(),yt().catch(ot)},onMinimize:()=>{ye.headerHidden=!0,Pm(!0)}}}function Ie(){pw($x,Jx()),document.querySelector('#sections [aria-current="page"]')?.scrollIntoView({block:"nearest",inline:"nearest"})}var Dt=null;function Vu(...e){let t=Ai("frame-slot"),a=Dt;if(Dt)vw(t),Dt=null;if(t.replaceChildren(...e),a==="comparison")Ie()}function Lm(e,t,a){let s=Dt!==e;if(s)Vu();if(t(Ai("frame-slot"),a),Dt=e,s)Ie()}async function Wx(){if(!zm)return;let e=zm,t=Cu.kind==="accepted"&&ym?ym:ym=await Rv(e,Ea.signal),a=()=>Lm("page",gw,jv(t,Cu,()=>void s()));async function s(){Cu={kind:"working"},a(),Cu=await qv(e),a()}a(),me("")}function ot(e){if(!Mn&&!Ni){aa();let t=Oi(e,"category"),a=Oi(e,"code"),s=(i)=>i===void 0||i===null?void 0:String(i);Ou={category:s(t)??(a==="ADS_RESOURCE_TRANSPORT"?"transport":"runner"),code:s(a)??"ADS_HOST_STARTUP"},me(`${Ax(e)}${Ne?`
|
|
287
|
+
The retained preview is not verified against the current source.`:""}`,!0)}}async function Ca(e){if(!e)return;try{await e.teardownResource({},{timeout:500})}catch{}await e.close()}function Dw(){if(Mn||Ni)return;$m=!1,Ni=!0,Ea.abort(),++bt,Hu.close(),aa(),me(`${kn?"HTTP showcase":"MCP"} disconnected. The retained preview is stale. Refresh the page after restarting ADS.`,!0);let e=ne;ne=void 0,Ca(e),++ta,Uu()}async function Um(){let e=await Ew("ads://project/explorer"),t=e.status;if(Sw=t,$n=t.build,Zu=e.tools,t.themes?.length){if(sa=t.themes,!sa.some((l)=>l.name===ia))ia=sa[0]?.name??ia;jw(),ne?.setHostContext(dt())}Pn=t.brands??[],zs=Pn.some((l)=>l.name===zs)?zs:Pn[0]?.name??null,Ie(),ne?.setHostContext(dt()),kw=e.categories,Cm=e.scenarios,ys=e.drafts,ye.title=(t.drafts?.previewOnly?"Draft · ":"")+t.project.showcase.title,ye.titleHint=t.projectRoot,Ow();let a=Ri?ww:Se[Q],s=Ri?ys.find((l)=>l.id===Ci):void 0,i=Ne,o=i?.kind==="draft"?ys.find((l)=>l.id===i.draftId):void 0,r=Ke,n=s??(o&&r&&(o.revision!==r.revision||r.discovery?.state==="pending")?o:void 0);if(n){let l=await Im(n,s?ww:r?.scenario);if(s)a=Ii(l).scenario;if(Ne?.kind==="draft"&&o){Ke=Ii(l),Lu=l;for(let h of Zt)if(h.side==="draft")await h.updateResult(l)}}let u=ks.find((l)=>l.id===a),d=u&&Ix(u.kind);if(Q==="drafts"||Ri&&Be.get("section")==="drafts"){Q="drafts";let l=$a(),h=l.find((p)=>p.drafts?.[0]?.id===Ci&&p.previewId===a)??l.find((p)=>p.id===Se.drafts)??l.find((p)=>p.drafts?.[0]?.id===Ci);Se.drafts=h?.id??l[0]?.id}else if(u&&d!==void 0&&Nx(d)){Q=d;let l=Ri?Be.get("choice"):null,h=u.choices?.find((v)=>v.id===l)??u.choices?.[0],p=h?Tm(u.id,h.id):u.id;if(!h||Ye()?.previewId!==u.id||l!==null)Se[Q]=p}else if(Ri&&Du.some((l)=>l.id===a))Q="tokens",Se.tokens=a;Ri=!1,Ss()}function yt({force:e=!1}={}){if(Ni)return Promise.resolve();let t=xs(),a=En();if(qi?.key===a)return qi.promise;if(!e&&Cn?.key===a)return Promise.resolve();if(!e&&!qi&&Ne?.key===a)return Promise.resolve();Cn=void 0;let s={key:a,promise:Promise.resolve()};return qi=s,s.promise=Gx(t,a).finally(()=>{if(qi===s)qi=void 0}),s.promise}async function Gx(e,t){xm?.abort();let a=xm=new AbortController,s=++bt;Ei=!0,ye.previewLoading=t!==ji,ye.previewBusy=!0,Ie();try{if(++ta,await Uu(),s!==bt)return;if(zm){if(await Ca(ne),s!==bt)return;ne=void 0,Ne=void 0,ji=void 0,ja=void 0,Pa=void 0,aa(),await Wx();return}let i=Nm()?Li():void 0;if(i){await Ca(ne),ne=void 0,ja=void 0,Pa=void 0;let p=await Im(i,e,a.signal);if(s!==bt)return;let v=Ke=Ii(p);if(Lu=p,Q==="drafts"){let b=$a().find((g)=>g.drafts?.[0]?.id===i.id&&g.previewId===v.scenario);if(b)Se.drafts=b.id}else if(Ye()?.pendingDraftScenario||!$a().some((b)=>b.id===e))Se[Q]=v.scenario;Ne={kind:"draft",key:En(),id:v.scenario,draftId:i.id,generation:s},jm(),await Xx(),Ss(),aa(!0),me("Draft preview only. Acceptance checks have not run.",!1,"ready");return}if(Ke=void 0,jm(),!e){if(await Ca(ne),s!==bt)return;if(ne=void 0,Ne=void 0,ji=void 0,ja=void 0,Pa=void 0,Vu(),aa(),Q==="drafts"){Lm("page",fw,{title:"Drafts",description:"No active drafts."}),me("");return}me("No scenarios discovered. Colocate an independently mountable scenario and fixture with the public implementation.");return}let o=Zu.find((p)=>p.name==="ads_show_scenario"),r=o?._meta?.ui?.resourceUri;if(!o||!r)throw Error("The server did not expose a preview App tool.");let n={id:e};if(o.inputSchema?.properties?.waitFor)n.waitFor=Be.get("capture")==="1"||Be.get("waitFor")==="verified"?"verified":"compiled";Mw();let u=await qm(o.name,n,a.signal);if(s!==bt)return;let d=Si(u);if(u.isError)throw Object.assign(Error(Sn(u)??"Preview build failed."),d?.failure);let l={kind:"accepted",key:t,id:e,generation:s,build:d?.build,manifestRevision:d?.manifestRevision};Ne=l;let h=await Yx(r);if(s!==bt)return;if(ja==="ui://ads/preview"&&!l.manifestRevision)throw Error("The resource preview has no manifest revision.");if(ji!==t)ji=void 0;if(await h.sendToolInput({arguments:n}),await h.sendToolResult(u),s===bt&&!d?.manifestUri)aa(!0),me("")}catch(i){if(s===bt)Cn={key:En(),build:Iw(Nw())},ot(i)}}function Kx(e,t){let a=Ne;if(e!==ne||t.logger!=="ads-preview"||a?.generation!==bt||!Mu()||a.kind!=="accepted")return;let s=fu(t.data);if(s.id!==a.id)return;if(s.state==="guide-options"){Fu=Rn(s.options),Hm();return}if(s.state==="scenario-state"){if(typeof s.name==="string"&&typeof a.id==="string")Mi={scenario:a.id,name:s.name},history.replaceState(null,"",Om(Se[Q])),ne?.setHostContext(dt());return}if(s.state==="navigate"){let o=Du.find((d)=>d.id===s.target),r=o??ks.find((d)=>d.id===s.target&&Tn[d.kind]!==void 0),n=o?"tokens":r&&Tn[r.kind];if(!r||n===void 0)return;Ti={target:r.id,token:typeof s.token==="string"?s.token:void 0,nonce:Date.now()};let u=typeof s.token==="string"?r.choices?.find((d)=>d.id===s.token):void 0;if(u){Ti=void 0,Q=n,Se[n]=Tm(r.id,u.id),Ss(),yt().catch(ot);return}if(xs()===r.id&&Q===n){ne?.setHostContext(dt());return}if(Q=n,!r.choices?.length)Se[n]=r.id;Ss(),yt().catch(ot);return}let i=s.revision===a.manifestRevision||s.selectionRevision===a.manifestRevision;if(s.state==="ready"&&i)a.manifestRevision=s.revision,aa(!0),me("");else if(s.state==="checking"&&(!Ei||i))aa(!0),me("Checking changes…");else if(s.state==="loading")me("Updating preview…",!1,"reloading");else if(s.state==="reverting")me("Restoring the last verified preview…",!1,"reverting");else if(s.code==="ADS_PREVIEW_REOPEN")ne=void 0,ja=void 0,Pa=void 0,Mw(),Ca(e).then(()=>yt({force:!0})).catch(ot);else if(s.state==="error")aa(),Ou={category:s.category??"build",code:s.code??"ADS_PREVIEW_BUILD",...s.resourceUri?{resourceUri:s.resourceUri}:{}},me([s.message,s.code,s.resourceUri].filter(Boolean).join(`
|
|
288
|
+
`),!0)}async function Yx(e){if(ja===e&&Pa)return Pa;let t=++km,a=ne;ne=void 0,ja=e;let s=Pa=(async()=>{await Ca(a);let i=Pi?void 0:await Nu({uri:e});if(t!==km||Mn||Ni)throw Error("Preview opening was superseded.");let o=i&&_u(i);if(!Pi&&!o)throw Error("The preview resource contains no MCP App.");let r=bm({title:"Design-system preview"});if(!Pi&&$i!==void 0)r.src=$i;Vu(r);let n=Pi?gu({frame:r,context:dt()}):new(zn()).AppBridge(null,{name:"ADS showcase",version:"1.0.0"},{serverResources:{},serverTools:{},logging:{}},{hostContext:dt()});ne=n,n.onreadresource=(l)=>Nu(l),n.oncalltool=$w,n.onloggingmessage=(l)=>Kx(n,l),n.onerror=ot;let u,d=new Promise((l,h)=>{u=setTimeout(()=>h(Error("MCP App initialization timed out.")),15000),n.oninitialized=()=>{clearTimeout(u),l()}});if(!Ut(n)&&o)n.onsandboxready=()=>n.sendSandboxResourceReady({html:o.html,...o.csp===void 0?{}:{csp:o.csp},sandbox:"allow-scripts allow-forms"});try{await Promise.all([Ut(n)?n.connect():n.connect(pu(r)),d])}catch(l){throw await Ca(n),l}finally{clearTimeout(u)}return n})();try{return await s}catch(i){if(t===km)ja=void 0,Pa=void 0;throw i}}function Zw(e,t){if(ne&&Ut(ne))ne.receiveBuild(e,t);for(let a of Zt)a.receiveBuild(e,t)}async function Bw(e){let t=Ne,a=e??await Ew("ads://project/build");Zw("ads://project/build",a),$n=a,Dx();let s=Vm(a.freshness);if(s!==Iu){if(Iu=s,t?.kind!=="draft")me("")}if(Ie(),Cn?.key===En()){let o=Nw(a);if(o&&(o.current||o.live)&&Iw(o)!==Cn.build)await yt({force:!0});return}if(!t||Ei||!Mu(t))return;if(t.kind==="draft"){let o=a.drafts?.find((u)=>u.id===t.draftId),r=o?.scenarios?.find((u)=>u.id===Ke?.scenario)??o,n=r&&JSON.stringify([o?.session,r.revision,r.live?.revision,r.current]);if(r&&(r.current||r.live)&&t.buildSignature!==n){t.buildSignature=n;let u=ys.find((l)=>l.id===t.draftId),d=Ke;if(u&&d){let l=await Im(u,d.scenario);if(Ne!==t||Ei||!Mu(t))return;Ke=Ii(l),Lu=l;for(let h of Zt)if(h.side==="draft")await h.updateResult(l)}}if(r?.state==="error")me("Draft preview build failed. Showing the previous preview.",!0);else if(r?.building)me(r.live||r.state==="checking"?"Draft preview compiled; checking changes…":"Building draft preview… Showing the previous preview.",!1,r.live||r.state==="checking"?"checking":"compiling");else if(r?.current&&Sm?.state==="ready")me("Draft preview ready · unaccepted.");return}if(Ne!==t||Ei||!Mu(t))return;let i=a.previews.find((o)=>o.id===t.id);if(!i){me("The selected scenario is no longer registered.",!0);return}if(Rm(i.state,"idle","building")&&t.build?.current&&i.session===t.build.session&&Lx(i.revision,t.build.revision))return;if(i.state==="error"){me(`${Yn(i)}. Showing an earlier view.
|
|
289
|
+
${Ku(i.diagnostics)}`,!0);return}if(Rm(i.state,"idle","building")){me(i.live?"Checking changes…":"Compiling changes… The current view is the previous preview.",!1,i.live?"checking":"compiling");return}if(i.current&&(i.revision!==t.build?.revision||i.session!==t.build?.session))await yt({force:!0});else if(i.current&&document.documentElement.dataset.adsConnection==="connected"&&Mm.startsWith("Connection restored."))me("")}function Ju(e=!1){Hu.schedule(e)}async function Xx(){if(!Ke)return;let e=Ke,t=Lu;Sm=void 0;let a=++ta;if(await Uu(),a!==ta)return;Hw=Ta&&e.acceptedExists===!0,Vu(),Dm(),await Promise.all([...Ai("frame-slot").querySelectorAll(".draft-stage")].map(async(s)=>{let i=s.dataset.version==="draft"?"draft":"accepted",o=i==="draft"?t:await Cw("ads_show_scenario",{id:e.scenario,waitFor:"compiled"});if(!o)throw Error("The draft preview has no result.");if(o.isError)throw Error(Sn(o)??"Comparison build failed.");if(a!==ta)return;let n=Zu.find((d)=>d.name===(i==="draft"?"ads_show_draft":"ads_show_scenario"))?._meta?.ui?.resourceUri;if(!n)throw Error("The server did not expose a preview App tool.");let u=await fv({slot:s,title:i==="draft"?"Draft version":"Accepted version",createFrame:(d)=>bm({title:d}),sandboxUrl:$i,httpPreview:Pi,resourceUri:n,result:o,readResource:Nu,callTool:$w,context:(d)=>({...dt(),containerDimensions:{width:d.clientWidth,height:d.clientHeight}}),onError:(d)=>{if(a===ta)ot(d)},onState:(d)=>{if(a!==ta)return;if(d.state==="guide-options"){Fu=Rn(d.options),Hm();return}if(i!=="draft")return;if(Sm=d,d.state==="ready")me("Draft preview ready · unaccepted.");else if(d.state==="checking")me("Draft preview compiled; checking changes…",!1,"checking");else if(Rm(d.state,"loading","reverting"))me("Updating draft preview…",!1,"reloading")}});if(a!==ta)await u.close();else Zt.push({...u,side:i})}))}var Hw=!1;function Dm(){if(!Ke||Dt!==null&&Dt!=="comparison")return;let e={draft:"unaccepted",checking:"checking acceptance",failed:"acceptance failed",conflict:"source conflict",interrupted:"acceptance interrupted","dependency-error":"dependency needs attention"};Lm("comparison",hw,{split:Hw,phone:Rw(),accepted:{side:"accepted",heading:"Accepted"},draft:{side:"draft",heading:`Draft · ${e[Ke.state]??Ke.state}`,title:Ke.dependencies?.length?`Draft dependencies: ${Ke.dependencies.join(", ")}`:void 0}})}function jm(){if(Ie(),Dt==="comparison")Dm()}var Zm=window.matchMedia(wm);function Pm(e){ye.collapsed=e,Ie()}var Bm=()=>Pm(Zm.matches||ye.headerHidden);Bm();Zm.addEventListener("change",Bm);function Qx(){if(Eu=!Eu,Ie(),Dt==="comparison")Dm();let e=new URL(location.href);if(Eu)e.searchParams.set("viewport","phone");else e.searchParams.delete("viewport");history.replaceState(null,"",e.pathname+e.search+e.hash)}function Hm(){Lw(),ne?.setHostContext(dt());for(let e of Zt)e.refreshContext()}var Fw=new ResizeObserver(()=>ne?.setHostContext(dt()));Fw.observe(Ai("frame-slot"));function eR(){(async()=>{await Um(),await yt({force:!0})})().catch(ot)}window.addEventListener("pagehide",()=>{Mn=!0,xm?.abort(),Ea.abort(),Hu.close(),Fw.disconnect(),Zm.removeEventListener("change",Bm),Ca(ne),++ta,Uu(),Pw?.close(),kt.close()},{once:!0});kt.onclose=Dw;kt.onconnectionchange=({connected:e,reconnected:t})=>{if(Mn||Ni)return;if($m=!e,document.documentElement.dataset.adsConnection=e?"connected":"reconnecting",!e){me("");return}if(t){if(me("Connection restored. Checking the current preview…",!1,"checking"),Ju(!0),ne&&Ut(ne))ne.reconcileBuild();for(let a of Zt)a.reconcileBuild()}};kt.onBuildReport?.((e,t)=>{if(e==="ads://project/build")Bw(t).catch(ot);else Zw(e,t)});kt.setNotificationHandler("notifications/resources/list_changed",()=>Ju(!0));kt.setNotificationHandler("notifications/tools/list_changed",()=>Ju(!0));kt.setNotificationHandler("notifications/resources/updated",({params:e})=>{if(kn&&e.uri==="ads://project/build")return;Ju(e.uri==="ads://project/explorer")});try{let e=await fetch("host.json").then((s)=>s.json()),t=Oi(e,"sandboxUrl");if($i=typeof t==="string"?t:void 0,Pi=kn,kn&&!Oi(e,"httpPreview"))throw Error("HTTP showcase delivery is unavailable.");if(!$i||new URL($i).origin===location.origin)throw Error("The separate-origin preview sandbox is unavailable.");await Tw.connect(),(Pw=await kt.listen({resourcesListChanged:!0,toolsListChanged:!0,resourceSubscriptions:["ads://project/build","ads://project/tokens","ads://project/explorer"]})).closed.then((s)=>{if(s!=="local")Dw()}),await Um(),Hu.start(),await yt()}catch(e){ot(e)}
|