@reqvire-org/ads 0.5.0 → 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.
Files changed (510) hide show
  1. package/README.md +9 -6
  2. package/dist/ads-errors.mjs +275 -12
  3. package/dist/ads-views.mjs +4 -4
  4. package/dist/analysis/design-usage.mjs +20 -4
  5. package/dist/analysis/mock-check.mjs +5 -4
  6. package/dist/analysis/owner-analysis-key.mjs +1 -1
  7. package/dist/analysis/owner-choices.mjs +172 -39
  8. package/dist/analysis/owner-composition.mjs +37 -13
  9. package/dist/analysis/owner-controls.mjs +27 -0
  10. package/dist/analysis/owner-source.mjs +67 -18
  11. package/dist/analysis/prose-owners.mjs +57 -0
  12. package/dist/analysis/styling-ownership.mjs +22 -0
  13. package/dist/check.mjs +7 -1
  14. package/dist/cli-arguments.mjs +2 -2
  15. package/dist/cli.mjs +3 -3
  16. package/dist/composed-contrast.mjs +28 -8
  17. package/dist/composed-keyline.mjs +107 -0
  18. package/dist/construction-output.mjs +146 -18
  19. package/dist/construction-spec.d.mts +212 -9
  20. package/dist/construction-spec.mjs +297 -56
  21. package/dist/corner-overpaint.mjs +53 -0
  22. package/dist/design-foundation.mjs +6 -1
  23. package/dist/design-usage.mjs +8 -2
  24. package/dist/emit/emission.mjs +11 -4
  25. package/dist/emit/font-emission.mjs +21 -1
  26. package/dist/emit/foundation-sheet.mjs +6 -5
  27. package/dist/emit/preview-tree.mjs +1 -1
  28. package/dist/finding-rules.mjs +7 -0
  29. package/dist/font-checks.mjs +42 -0
  30. package/dist/font-declaration.d.mts +10 -0
  31. package/dist/font-declaration.mjs +25 -3
  32. package/dist/font-fallback.d.mts +37 -0
  33. package/dist/font-fallback.mjs +25 -0
  34. package/dist/font-macro.d.mts +10 -0
  35. package/dist/font-metrics.d.mts +34 -0
  36. package/dist/font-metrics.mjs +314 -0
  37. package/dist/font-model.mjs +28 -2
  38. package/dist/foundation-macro.d.mts +1 -1
  39. package/dist/frame-regions.mjs +66 -3
  40. package/dist/grid-facts.mjs +72 -16
  41. package/dist/grid-lowering.mjs +11 -5
  42. package/dist/init.mjs +14 -23
  43. package/dist/lowering-enter.mjs +31 -0
  44. package/dist/lowering-properties.mjs +22 -1
  45. package/dist/lowering-region-layout.mjs +42 -8
  46. package/dist/lowering-sequence.mjs +89 -0
  47. package/dist/lowering-session.mjs +7 -0
  48. package/dist/lowering-transitions.mjs +22 -8
  49. package/dist/mcp/preview-http.bundle.js +2 -2
  50. package/dist/mcp/preview-widget.bundle.js +5 -5
  51. package/dist/motion-model.mjs +2 -0
  52. package/dist/owner-analysis-check.mjs +67 -7
  53. package/dist/owner-errors.mjs +16 -0
  54. package/dist/owner-lowering.mjs +36 -16
  55. package/dist/owner-scenarios.mjs +25 -3
  56. package/dist/ownership-model.mjs +23 -4
  57. package/dist/paint-contrast.mjs +5 -0
  58. package/dist/placeholder-contrast.mjs +1 -0
  59. package/dist/platform-features.mjs +26 -2
  60. package/dist/preview-bun.mjs +17 -16
  61. package/dist/preview-controls.mjs +35 -0
  62. package/dist/preview-incremental.mjs +1 -1
  63. package/dist/preview-source.mjs +2 -2
  64. package/dist/profile-macro.d.mts +15 -0
  65. package/dist/profile-model.mjs +3 -3
  66. package/dist/profile-view-facts.mjs +55 -4
  67. package/dist/prose-model.d.mts +81 -0
  68. package/dist/prose-model.mjs +101 -0
  69. package/dist/recipe-macro.d.mts +105 -3
  70. package/dist/recipe-model.mjs +31 -7
  71. package/dist/region-lowering.mjs +241 -41
  72. package/dist/render-audit/corner-overpaint.page.mjs +54 -0
  73. package/dist/render-audit/worker.mjs +6 -1
  74. package/dist/render-audit.mjs +25 -0
  75. package/dist/role-vocabulary.d.mts +38 -2
  76. package/dist/role-vocabulary.mjs +39 -4
  77. package/dist/scenario-kit.d.mts +6 -0
  78. package/dist/scenario-registry.mjs +1 -1
  79. package/dist/scheme-switch.d.mts +8 -0
  80. package/dist/scheme-switch.mjs +1 -0
  81. package/dist/showcase/ads-views.mjs +116 -53
  82. package/dist/showcase/assets-view.mjs +117 -86
  83. package/dist/showcase/client.bundle.js +65 -65
  84. package/dist/showcase/http-client.bundle.js +17 -17
  85. package/dist/showcase/preview-frame.css +2 -0
  86. package/dist/showcase/profiles-view.mjs +163 -122
  87. package/dist/showcase/scenario-page.d.mts +11 -1
  88. package/dist/showcase/scenario-page.mjs +18 -3
  89. package/dist/showcase/token-sample.mjs +47 -4
  90. package/dist/showcase/tokens-view.mjs +82 -34
  91. package/dist/showcase/ui/ui.css +1 -1
  92. package/dist/showcase/ui/ui.js +5 -5
  93. package/dist/skills/README.md +5 -5
  94. package/dist/skills/ads-designer/README.md +1 -1
  95. package/dist/skills/ads-designer/SKILL.md +13 -12
  96. package/dist/skills/ads-designer/references/accessibility.md +2 -2
  97. package/dist/skills/ads-designer/references/atomic-styles.md +8 -1
  98. package/dist/skills/ads-designer/references/branding.md +7 -2
  99. package/dist/skills/ads-designer/references/cli.md +4 -4
  100. package/dist/skills/ads-designer/references/contracts.md +9 -2
  101. package/dist/skills/ads-designer/references/design-craft.md +1 -1
  102. package/dist/skills/ads-designer/references/design-data.md +3 -3
  103. package/dist/skills/ads-designer/references/forms.md +6 -6
  104. package/dist/skills/ads-designer/references/layout.md +42 -3
  105. package/dist/skills/ads-designer/references/motion.md +37 -1
  106. package/dist/skills/ads-designer/references/performance.md +7 -1
  107. package/dist/skills/ads-designer/references/recipes.md +67 -6
  108. package/dist/skills/ads-designer/references/runtimes.md +1 -1
  109. package/dist/skills/ads-designer/references/scenarios.md +1 -0
  110. package/dist/skills/ads-import/references/atomic-styles.md +8 -1
  111. package/dist/skills/ads-import/references/cli.md +4 -4
  112. package/dist/skills/ads-import/references/contracts.md +9 -2
  113. package/dist/skills/ads-import/references/design-data.md +3 -3
  114. package/dist/skills/ads-import/references/forms.md +6 -6
  115. package/dist/skills/ads-import/references/layout.md +42 -3
  116. package/dist/skills/ads-import/references/recipes.md +67 -6
  117. package/dist/skills/ads-import/references/runtimes.md +1 -1
  118. package/dist/skills/ads-import/references/scenarios.md +1 -0
  119. package/dist/skills/ads-migrate/SKILL.md +2 -1
  120. package/dist/skills/ads-migrate/references/0.5.0-to-0.5.1.md +239 -0
  121. package/dist/skills/ads-port/references/atomic-styles.md +8 -1
  122. package/dist/skills/ads-port/references/cli.md +4 -4
  123. package/dist/skills/ads-port/references/contracts.md +9 -2
  124. package/dist/skills/ads-port/references/design-data.md +3 -3
  125. package/dist/skills/ads-port/references/forms.md +6 -6
  126. package/dist/skills/ads-port/references/layout.md +42 -3
  127. package/dist/skills/ads-port/references/recipes.md +67 -6
  128. package/dist/skills/ads-port/references/runtimes.md +1 -1
  129. package/dist/skills/ads-port/references/scenarios.md +1 -0
  130. package/dist/spatial-model.mjs +20 -4
  131. package/dist/state-conditions.d.mts +29 -0
  132. package/dist/state-conditions.mjs +42 -2
  133. package/dist/surface-contrast.mjs +68 -10
  134. package/dist/surface-effects.mjs +98 -0
  135. package/dist/target-size.mjs +1 -1
  136. package/dist/task-cache.mjs +1 -1
  137. package/dist/token-dtcg.mjs +1 -0
  138. package/dist/token-view-facts.mjs +54 -5
  139. package/dist/unreached-sources.mjs +5 -0
  140. package/dist/validation.mjs +1 -1
  141. package/docs/ADS.md +36 -13
  142. package/docs/ARCHITECTURE.md +160 -16
  143. package/docs/ASSETS.md +81 -10
  144. package/docs/CACHING.md +1 -1
  145. package/docs/CHANGELOG.md +346 -21
  146. package/docs/DESIGN-REFERENCES.md +5 -5
  147. package/docs/GUIDE.md +241 -72
  148. package/docs/LANGUAGE.md +287 -21
  149. package/docs/LOWERING.md +13 -1
  150. package/docs/MOTION.md +233 -7
  151. package/docs/PROFILE-KINDS.md +167 -13
  152. package/docs/PROFILES.md +2 -2
  153. package/docs/RULES.md +49 -18
  154. package/docs/TOKEN-ROLES.md +9 -7
  155. package/package.json +1 -1
  156. package/dist/starter-files.mjs +0 -155
  157. package/dist/starter-overlay.mjs +0 -189
  158. package/dist/starters/preact/design-system/assets/avatars/avatar.ads.ts +0 -10
  159. package/dist/starters/preact/design-system/assets/avatars/member.svg +0 -1
  160. package/dist/starters/preact/design-system/assets/brand/emblem.ads.ts +0 -18
  161. package/dist/starters/preact/design-system/assets/brand/emblem.svg +0 -4
  162. package/dist/starters/preact/design-system/assets/brand/iris-emblem.ads.ts +0 -14
  163. package/dist/starters/preact/design-system/assets/brand/iris-emblem.svg +0 -4
  164. package/dist/starters/preact/design-system/assets/brand/mark.ads.ts +0 -14
  165. package/dist/starters/preact/design-system/assets/brand/mark.svg +0 -1
  166. package/dist/starters/preact/design-system/assets/glyphs/arrow.ads.ts +0 -14
  167. package/dist/starters/preact/design-system/assets/glyphs/arrow.svg +0 -1
  168. package/dist/starters/preact/design-system/assets/glyphs/chevron-20.svg +0 -1
  169. package/dist/starters/preact/design-system/assets/glyphs/chevron-24.svg +0 -1
  170. package/dist/starters/preact/design-system/assets/glyphs/chevron.ads.ts +0 -20
  171. package/dist/starters/preact/design-system/assets/glyphs/close.ads.ts +0 -13
  172. package/dist/starters/preact/design-system/assets/glyphs/close.svg +0 -1
  173. package/dist/starters/preact/design-system/assets/glyphs/favorite.ads.ts +0 -23
  174. package/dist/starters/preact/design-system/assets/glyphs/favorite.normal.svg +0 -1
  175. package/dist/starters/preact/design-system/assets/glyphs/favorite.selected.svg +0 -1
  176. package/dist/starters/preact/design-system/assets/glyphs/search.ads.ts +0 -10
  177. package/dist/starters/preact/design-system/assets/glyphs/search.svg +0 -1
  178. package/dist/starters/preact/design-system/assets/illustrations/journey.ads.ts +0 -32
  179. package/dist/starters/preact/design-system/assets/illustrations/journey.contrast.svg +0 -6
  180. package/dist/starters/preact/design-system/assets/illustrations/journey.dark.svg +0 -13
  181. package/dist/starters/preact/design-system/assets/illustrations/journey.light.svg +0 -13
  182. package/dist/starters/preact/design-system/assets/logos/harbor-pay.ads.ts +0 -17
  183. package/dist/starters/preact/design-system/assets/logos/harbor-pay.dark.svg +0 -10
  184. package/dist/starters/preact/design-system/assets/logos/harbor-pay.light.svg +0 -10
  185. package/dist/starters/preact/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
  186. package/dist/starters/preact/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
  187. package/dist/starters/preact/design-system/assets/logos/lumen-cloud.light.svg +0 -9
  188. package/dist/starters/preact/design-system/assets/status/error.svg +0 -1
  189. package/dist/starters/preact/design-system/assets/status/outcomes.ads.ts +0 -31
  190. package/dist/starters/preact/design-system/assets/status/status.ads.ts +0 -16
  191. package/dist/starters/preact/design-system/assets/status/success.svg +0 -1
  192. package/dist/starters/preact/design-system/assets/status/sync-status.ads.ts +0 -14
  193. package/dist/starters/preact/design-system/assets/status/sync-status.svg +0 -7
  194. package/dist/starters/preact/design-system/assets/status/warning.svg +0 -1
  195. package/dist/starters/preact/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
  196. package/dist/starters/preact/design-system/components/Actions/Button/Button.tsx +0 -198
  197. package/dist/starters/preact/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
  198. package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
  199. package/dist/starters/preact/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
  200. package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
  201. package/dist/starters/preact/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
  202. package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
  203. package/dist/starters/preact/design-system/components/Content/Artwork/Artwork.tsx +0 -110
  204. package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
  205. package/dist/starters/preact/design-system/components/Content/BarChart/BarChart.tsx +0 -72
  206. package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
  207. package/dist/starters/preact/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
  208. package/dist/starters/preact/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
  209. package/dist/starters/preact/design-system/components/Content/Icon/Icon.tsx +0 -41
  210. package/dist/starters/preact/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
  211. package/dist/starters/preact/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
  212. package/dist/starters/preact/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
  213. package/dist/starters/preact/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
  214. package/dist/starters/preact/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
  215. package/dist/starters/preact/design-system/components/Content/Image/Image.tsx +0 -83
  216. package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
  217. package/dist/starters/preact/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
  218. package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
  219. package/dist/starters/preact/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
  220. package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
  221. package/dist/starters/preact/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
  222. package/dist/starters/preact/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
  223. package/dist/starters/preact/design-system/components/Forms/TextField/TextField.tsx +0 -173
  224. package/dist/starters/preact/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
  225. package/dist/starters/preact/design-system/components/Identity/Identity.tsx +0 -146
  226. package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
  227. package/dist/starters/preact/design-system/components/Overlays/Menu/Menu.tsx +0 -194
  228. package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
  229. package/dist/starters/preact/design-system/components/Overlays/Popover/Popover.tsx +0 -37
  230. package/dist/starters/preact/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
  231. package/dist/starters/preact/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
  232. package/dist/starters/preact/design-system/controllers/FormField/FormField.ts +0 -343
  233. package/dist/starters/preact/design-system/controllers/FormField/useFormField.ts +0 -70
  234. package/dist/starters/preact/design-system/controllers/Palette/Palette.ts +0 -165
  235. package/dist/starters/preact/design-system/foundation.ads.ts +0 -22
  236. package/dist/starters/preact/design-system/index.ts +0 -51
  237. package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
  238. package/dist/starters/preact/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
  239. package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
  240. package/dist/starters/preact/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
  241. package/dist/starters/preact/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
  242. package/dist/starters/preact/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
  243. package/dist/starters/preact/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
  244. package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
  245. package/dist/starters/preact/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
  246. package/dist/starters/preact/design-system/mocks/Workspace/media/ads.svg +0 -1
  247. package/dist/starters/preact/design-system/palette.generated.ts +0 -188
  248. package/dist/starters/preact/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
  249. package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
  250. package/dist/starters/preact/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
  251. package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
  252. package/dist/starters/preact/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
  253. package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
  254. package/dist/starters/preact/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
  255. package/dist/starters/preact/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
  256. package/dist/starters/preact/design-system/patterns/Shell/Shell.tsx +0 -268
  257. package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
  258. package/dist/starters/preact/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
  259. package/dist/starters/preact/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
  260. package/dist/starters/preact/design-system/profiles/Containers/containers.ads.ts +0 -67
  261. package/dist/starters/preact/design-system/profiles/Containers/frames.ads.ts +0 -32
  262. package/dist/starters/preact/design-system/profiles/Containers/geometry.ads.ts +0 -30
  263. package/dist/starters/preact/design-system/profiles/Containers/spacing.ads.ts +0 -26
  264. package/dist/starters/preact/design-system/profiles/Controls/controls.ads.ts +0 -157
  265. package/dist/starters/preact/design-system/profiles/Controls/frames.ads.ts +0 -50
  266. package/dist/starters/preact/design-system/profiles/Controls/spacing.ads.ts +0 -29
  267. package/dist/starters/preact/design-system/profiles/Focus/keyboard.ads.ts +0 -13
  268. package/dist/starters/preact/design-system/profiles/Identity/identity.ads.ts +0 -25
  269. package/dist/starters/preact/design-system/profiles/Identity/spacing.ads.ts +0 -22
  270. package/dist/starters/preact/design-system/profiles/Layout/grid.ads.ts +0 -69
  271. package/dist/starters/preact/design-system/profiles/Layout/inspector.ads.ts +0 -146
  272. package/dist/starters/preact/design-system/profiles/Layout/overlays.ads.ts +0 -94
  273. package/dist/starters/preact/design-system/profiles/Layout/regions.ads.ts +0 -296
  274. package/dist/starters/preact/design-system/profiles/Motion/feedback.ads.ts +0 -92
  275. package/dist/starters/preact/design-system/profiles/Surfaces/controls.ads.ts +0 -142
  276. package/dist/starters/preact/design-system/profiles/Surfaces/document.ads.ts +0 -2
  277. package/dist/starters/preact/design-system/profiles/Surfaces/materials.ads.ts +0 -18
  278. package/dist/starters/preact/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
  279. package/dist/starters/preact/design-system/profiles/Typography/details.ads.ts +0 -19
  280. package/dist/starters/preact/design-system/profiles/Typography/document.ads.ts +0 -2
  281. package/dist/starters/preact/design-system/profiles/Typography/headings.ads.ts +0 -15
  282. package/dist/starters/preact/design-system/profiles/Typography/text.ads.ts +0 -73
  283. package/dist/starters/preact/design-system/profiles/Visuals/artwork.ads.ts +0 -46
  284. package/dist/starters/preact/design-system/profiles/Visuals/charts.ads.ts +0 -31
  285. package/dist/starters/preact/design-system/profiles/Visuals/content.ads.ts +0 -52
  286. package/dist/starters/preact/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
  287. package/dist/starters/preact/design-system/profiles/Visuals/identity.ads.ts +0 -24
  288. package/dist/starters/preact/design-system/tokens/Artwork/paint.ads.css +0 -7
  289. package/dist/starters/preact/design-system/tokens/Artwork/visual-size.ads.css +0 -12
  290. package/dist/starters/preact/design-system/tokens/Brand/paint.ads.css +0 -7
  291. package/dist/starters/preact/design-system/tokens/Charts/paint.ads.css +0 -19
  292. package/dist/starters/preact/design-system/tokens/Containers/border-width.ads.css +0 -1
  293. package/dist/starters/preact/design-system/tokens/Containers/content-gap.ads.css +0 -5
  294. package/dist/starters/preact/design-system/tokens/Containers/frame-inset.ads.css +0 -6
  295. package/dist/starters/preact/design-system/tokens/Containers/frame-size.ads.css +0 -11
  296. package/dist/starters/preact/design-system/tokens/Containers/radius.ads.css +0 -1
  297. package/dist/starters/preact/design-system/tokens/Controls/border-width.ads.css +0 -4
  298. package/dist/starters/preact/design-system/tokens/Controls/content-gap.ads.css +0 -6
  299. package/dist/starters/preact/design-system/tokens/Controls/control-min-size.ads.css +0 -17
  300. package/dist/starters/preact/design-system/tokens/Controls/frame-inset.ads.css +0 -21
  301. package/dist/starters/preact/design-system/tokens/Controls/radius.ads.css +0 -1
  302. package/dist/starters/preact/design-system/tokens/Controls/target-min-size.ads.css +0 -2
  303. package/dist/starters/preact/design-system/tokens/Controls/visual-size.ads.css +0 -2
  304. package/dist/starters/preact/design-system/tokens/Focus/border-width.ads.css +0 -1
  305. package/dist/starters/preact/design-system/tokens/Focus/focus-offset.ads.css +0 -1
  306. package/dist/starters/preact/design-system/tokens/Foundation/spacing.ads.css +0 -20
  307. package/dist/starters/preact/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
  308. package/dist/starters/preact/design-system/tokens/Grid/layer.ads.css +0 -2
  309. package/dist/starters/preact/design-system/tokens/Grid/layout-size.ads.css +0 -15
  310. package/dist/starters/preact/design-system/tokens/Grid/spacing.ads.css +0 -12
  311. package/dist/starters/preact/design-system/tokens/Grid/track-count.ads.css +0 -1
  312. package/dist/starters/preact/design-system/tokens/Identity/content-gap.ads.css +0 -6
  313. package/dist/starters/preact/design-system/tokens/Identity/visual-size.ads.css +0 -1
  314. package/dist/starters/preact/design-system/tokens/Motion/duration.ads.css +0 -6
  315. package/dist/starters/preact/design-system/tokens/Motion/easing.ads.css +0 -5
  316. package/dist/starters/preact/design-system/tokens/Motion/motion-angle.ads.css +0 -1
  317. package/dist/starters/preact/design-system/tokens/Motion/motion-distance.ads.css +0 -2
  318. package/dist/starters/preact/design-system/tokens/Motion/motion-scale.ads.css +0 -9
  319. package/dist/starters/preact/design-system/tokens/Surfaces/blur.ads.css +0 -2
  320. package/dist/starters/preact/design-system/tokens/Surfaces/gradient.ads.css +0 -2
  321. package/dist/starters/preact/design-system/tokens/Surfaces/opacity.ads.css +0 -2
  322. package/dist/starters/preact/design-system/tokens/Surfaces/paint.ads.css +0 -58
  323. package/dist/starters/preact/design-system/tokens/Surfaces/shadow.ads.css +0 -20
  324. package/dist/starters/preact/design-system/tokens/Typography/font-family.ads.css +0 -1
  325. package/dist/starters/preact/design-system/tokens/Typography/font-features.ads.css +0 -1
  326. package/dist/starters/preact/design-system/tokens/Typography/font-size.ads.css +0 -9
  327. package/dist/starters/preact/design-system/tokens/Typography/font-stretch.ads.css +0 -1
  328. package/dist/starters/preact/design-system/tokens/Typography/font-variations.ads.css +0 -1
  329. package/dist/starters/preact/design-system/tokens/Typography/font-weight.ads.css +0 -1
  330. package/dist/starters/preact/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
  331. package/dist/starters/preact/design-system/tokens/Typography/line-height.ads.css +0 -11
  332. package/dist/starters/preact/design-system/tokens/Typography/word-spacing.ads.css +0 -1
  333. package/dist/starters/preact/starter.json +0 -11
  334. package/dist/starters/react/design-system/assets/avatars/avatar.ads.ts +0 -10
  335. package/dist/starters/react/design-system/assets/avatars/member.svg +0 -1
  336. package/dist/starters/react/design-system/assets/brand/emblem.ads.ts +0 -18
  337. package/dist/starters/react/design-system/assets/brand/emblem.svg +0 -4
  338. package/dist/starters/react/design-system/assets/brand/iris-emblem.ads.ts +0 -14
  339. package/dist/starters/react/design-system/assets/brand/iris-emblem.svg +0 -4
  340. package/dist/starters/react/design-system/assets/brand/mark.ads.ts +0 -14
  341. package/dist/starters/react/design-system/assets/brand/mark.svg +0 -1
  342. package/dist/starters/react/design-system/assets/glyphs/arrow.ads.ts +0 -14
  343. package/dist/starters/react/design-system/assets/glyphs/arrow.svg +0 -1
  344. package/dist/starters/react/design-system/assets/glyphs/chevron-20.svg +0 -1
  345. package/dist/starters/react/design-system/assets/glyphs/chevron-24.svg +0 -1
  346. package/dist/starters/react/design-system/assets/glyphs/chevron.ads.ts +0 -20
  347. package/dist/starters/react/design-system/assets/glyphs/close.ads.ts +0 -13
  348. package/dist/starters/react/design-system/assets/glyphs/close.svg +0 -1
  349. package/dist/starters/react/design-system/assets/glyphs/favorite.ads.ts +0 -23
  350. package/dist/starters/react/design-system/assets/glyphs/favorite.normal.svg +0 -1
  351. package/dist/starters/react/design-system/assets/glyphs/favorite.selected.svg +0 -1
  352. package/dist/starters/react/design-system/assets/glyphs/search.ads.ts +0 -10
  353. package/dist/starters/react/design-system/assets/glyphs/search.svg +0 -1
  354. package/dist/starters/react/design-system/assets/illustrations/journey.ads.ts +0 -32
  355. package/dist/starters/react/design-system/assets/illustrations/journey.contrast.svg +0 -6
  356. package/dist/starters/react/design-system/assets/illustrations/journey.dark.svg +0 -13
  357. package/dist/starters/react/design-system/assets/illustrations/journey.light.svg +0 -13
  358. package/dist/starters/react/design-system/assets/logos/harbor-pay.ads.ts +0 -17
  359. package/dist/starters/react/design-system/assets/logos/harbor-pay.dark.svg +0 -10
  360. package/dist/starters/react/design-system/assets/logos/harbor-pay.light.svg +0 -10
  361. package/dist/starters/react/design-system/assets/logos/lumen-cloud.ads.ts +0 -15
  362. package/dist/starters/react/design-system/assets/logos/lumen-cloud.dark.svg +0 -9
  363. package/dist/starters/react/design-system/assets/logos/lumen-cloud.light.svg +0 -9
  364. package/dist/starters/react/design-system/assets/status/error.svg +0 -1
  365. package/dist/starters/react/design-system/assets/status/outcomes.ads.ts +0 -31
  366. package/dist/starters/react/design-system/assets/status/status.ads.ts +0 -16
  367. package/dist/starters/react/design-system/assets/status/success.svg +0 -1
  368. package/dist/starters/react/design-system/assets/status/sync-status.ads.ts +0 -14
  369. package/dist/starters/react/design-system/assets/status/sync-status.svg +0 -7
  370. package/dist/starters/react/design-system/assets/status/warning.svg +0 -1
  371. package/dist/starters/react/design-system/components/Actions/Button/Button.ads.scenario.tsx +0 -12
  372. package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +0 -198
  373. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +0 -95
  374. package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.ads.scenario.tsx +0 -22
  375. package/dist/starters/react/design-system/components/Actions/ToggleTile/ToggleTile.tsx +0 -60
  376. package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.ads.scenario.tsx +0 -24
  377. package/dist/starters/react/design-system/components/Containers/Disclosure/Disclosure.tsx +0 -50
  378. package/dist/starters/react/design-system/components/Content/Artwork/Artwork.ads.scenario.tsx +0 -8
  379. package/dist/starters/react/design-system/components/Content/Artwork/Artwork.tsx +0 -110
  380. package/dist/starters/react/design-system/components/Content/BarChart/BarChart.ads.scenario.tsx +0 -25
  381. package/dist/starters/react/design-system/components/Content/BarChart/BarChart.tsx +0 -72
  382. package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.ads.scenario.tsx +0 -8
  383. package/dist/starters/react/design-system/components/Content/GuideGrid/GuideGrid.tsx +0 -43
  384. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +0 -21
  385. package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +0 -41
  386. package/dist/starters/react/design-system/components/Content/Icon/glyphs/arrow.tsx +0 -10
  387. package/dist/starters/react/design-system/components/Content/Icon/glyphs/close.tsx +0 -10
  388. package/dist/starters/react/design-system/components/Content/Icon/glyphs/search.tsx +0 -10
  389. package/dist/starters/react/design-system/components/Content/Image/Image.ads.fixture.ts +0 -9
  390. package/dist/starters/react/design-system/components/Content/Image/Image.ads.scenario.tsx +0 -12
  391. package/dist/starters/react/design-system/components/Content/Image/Image.tsx +0 -83
  392. package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.ads.scenario.tsx +0 -27
  393. package/dist/starters/react/design-system/components/Content/InspectedGlyph/InspectedGlyph.tsx +0 -46
  394. package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.ads.scenario.tsx +0 -17
  395. package/dist/starters/react/design-system/components/Content/PartnerLogo/PartnerLogo.tsx +0 -41
  396. package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.ads.scenario.tsx +0 -20
  397. package/dist/starters/react/design-system/components/Content/StatusIcon/StatusIcon.tsx +0 -37
  398. package/dist/starters/react/design-system/components/Forms/TextField/TextField.ads.scenario.tsx +0 -24
  399. package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +0 -173
  400. package/dist/starters/react/design-system/components/Identity/Identity.ads.scenario.tsx +0 -13
  401. package/dist/starters/react/design-system/components/Identity/Identity.tsx +0 -146
  402. package/dist/starters/react/design-system/components/Overlays/Menu/Menu.ads.scenario.tsx +0 -27
  403. package/dist/starters/react/design-system/components/Overlays/Menu/Menu.tsx +0 -194
  404. package/dist/starters/react/design-system/components/Overlays/Popover/Popover.ads.scenario.tsx +0 -19
  405. package/dist/starters/react/design-system/components/Overlays/Popover/Popover.tsx +0 -37
  406. package/dist/starters/react/design-system/controllers/FormField/FormField.ads.behavior.ts +0 -70
  407. package/dist/starters/react/design-system/controllers/FormField/FormField.behavior.spec.ts +0 -237
  408. package/dist/starters/react/design-system/controllers/FormField/FormField.ts +0 -343
  409. package/dist/starters/react/design-system/controllers/FormField/useFormField.ts +0 -70
  410. package/dist/starters/react/design-system/controllers/Palette/Palette.ts +0 -165
  411. package/dist/starters/react/design-system/foundation.ads.ts +0 -22
  412. package/dist/starters/react/design-system/index.ts +0 -51
  413. package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.fixture.ts +0 -5
  414. package/dist/starters/react/design-system/mocks/ConstructionProofs/ConstructionProofs.ads.scenario.tsx +0 -22
  415. package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.fixture.ts +0 -12
  416. package/dist/starters/react/design-system/mocks/Inspector/Inspector.ads.scenario.tsx +0 -21
  417. package/dist/starters/react/design-system/mocks/Workspace/Layouts.ads.scenario.tsx +0 -24
  418. package/dist/starters/react/design-system/mocks/Workspace/Media.ads.scenario.tsx +0 -24
  419. package/dist/starters/react/design-system/mocks/Workspace/Stress.ads.scenario.tsx +0 -36
  420. package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.fixture.ts +0 -13
  421. package/dist/starters/react/design-system/mocks/Workspace/Workspace.ads.scenario.tsx +0 -27
  422. package/dist/starters/react/design-system/mocks/Workspace/media/ads.svg +0 -1
  423. package/dist/starters/react/design-system/palette.generated.ts +0 -188
  424. package/dist/starters/react/design-system/patterns/ArtworkCatalogue/ArtworkCatalogue/ArtworkCatalogue.tsx +0 -73
  425. package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.ads.scenario.tsx +0 -23
  426. package/dist/starters/react/design-system/patterns/ConstructionWorkbench/ConstructionWorkbench/ConstructionWorkbench.tsx +0 -94
  427. package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.ads.scenario.tsx +0 -21
  428. package/dist/starters/react/design-system/patterns/Forms/InviteMember/InviteMember.tsx +0 -137
  429. package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.ads.scenario.tsx +0 -22
  430. package/dist/starters/react/design-system/patterns/Inspector/Inspector/Inspector.tsx +0 -248
  431. package/dist/starters/react/design-system/patterns/Shell/Shell.ads.scenario.tsx +0 -26
  432. package/dist/starters/react/design-system/patterns/Shell/Shell.tsx +0 -268
  433. package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.ads.scenario.tsx +0 -28
  434. package/dist/starters/react/design-system/patterns/Workspace/Workspace/Workspace.tsx +0 -105
  435. package/dist/starters/react/design-system/patterns/Workspace/Workspace/WorkspacePanels.tsx +0 -179
  436. package/dist/starters/react/design-system/profiles/Containers/containers.ads.ts +0 -67
  437. package/dist/starters/react/design-system/profiles/Containers/frames.ads.ts +0 -32
  438. package/dist/starters/react/design-system/profiles/Containers/geometry.ads.ts +0 -30
  439. package/dist/starters/react/design-system/profiles/Containers/spacing.ads.ts +0 -26
  440. package/dist/starters/react/design-system/profiles/Controls/controls.ads.ts +0 -157
  441. package/dist/starters/react/design-system/profiles/Controls/frames.ads.ts +0 -50
  442. package/dist/starters/react/design-system/profiles/Controls/spacing.ads.ts +0 -29
  443. package/dist/starters/react/design-system/profiles/Focus/keyboard.ads.ts +0 -13
  444. package/dist/starters/react/design-system/profiles/Identity/identity.ads.ts +0 -25
  445. package/dist/starters/react/design-system/profiles/Identity/spacing.ads.ts +0 -22
  446. package/dist/starters/react/design-system/profiles/Layout/grid.ads.ts +0 -69
  447. package/dist/starters/react/design-system/profiles/Layout/inspector.ads.ts +0 -146
  448. package/dist/starters/react/design-system/profiles/Layout/overlays.ads.ts +0 -94
  449. package/dist/starters/react/design-system/profiles/Layout/regions.ads.ts +0 -296
  450. package/dist/starters/react/design-system/profiles/Motion/feedback.ads.ts +0 -92
  451. package/dist/starters/react/design-system/profiles/Surfaces/controls.ads.ts +0 -142
  452. package/dist/starters/react/design-system/profiles/Surfaces/document.ads.ts +0 -2
  453. package/dist/starters/react/design-system/profiles/Surfaces/materials.ads.ts +0 -18
  454. package/dist/starters/react/design-system/profiles/Surfaces/surfaces.ads.ts +0 -48
  455. package/dist/starters/react/design-system/profiles/Typography/details.ads.ts +0 -19
  456. package/dist/starters/react/design-system/profiles/Typography/document.ads.ts +0 -2
  457. package/dist/starters/react/design-system/profiles/Typography/headings.ads.ts +0 -15
  458. package/dist/starters/react/design-system/profiles/Typography/text.ads.ts +0 -73
  459. package/dist/starters/react/design-system/profiles/Visuals/artwork.ads.ts +0 -46
  460. package/dist/starters/react/design-system/profiles/Visuals/charts.ads.ts +0 -31
  461. package/dist/starters/react/design-system/profiles/Visuals/content.ads.ts +0 -52
  462. package/dist/starters/react/design-system/profiles/Visuals/glyphs.ads.ts +0 -35
  463. package/dist/starters/react/design-system/profiles/Visuals/identity.ads.ts +0 -24
  464. package/dist/starters/react/design-system/tokens/Artwork/paint.ads.css +0 -7
  465. package/dist/starters/react/design-system/tokens/Artwork/visual-size.ads.css +0 -12
  466. package/dist/starters/react/design-system/tokens/Brand/paint.ads.css +0 -7
  467. package/dist/starters/react/design-system/tokens/Charts/paint.ads.css +0 -19
  468. package/dist/starters/react/design-system/tokens/Containers/border-width.ads.css +0 -1
  469. package/dist/starters/react/design-system/tokens/Containers/content-gap.ads.css +0 -5
  470. package/dist/starters/react/design-system/tokens/Containers/frame-inset.ads.css +0 -6
  471. package/dist/starters/react/design-system/tokens/Containers/frame-size.ads.css +0 -11
  472. package/dist/starters/react/design-system/tokens/Containers/radius.ads.css +0 -1
  473. package/dist/starters/react/design-system/tokens/Controls/border-width.ads.css +0 -4
  474. package/dist/starters/react/design-system/tokens/Controls/content-gap.ads.css +0 -6
  475. package/dist/starters/react/design-system/tokens/Controls/control-min-size.ads.css +0 -17
  476. package/dist/starters/react/design-system/tokens/Controls/frame-inset.ads.css +0 -21
  477. package/dist/starters/react/design-system/tokens/Controls/radius.ads.css +0 -1
  478. package/dist/starters/react/design-system/tokens/Controls/target-min-size.ads.css +0 -2
  479. package/dist/starters/react/design-system/tokens/Controls/visual-size.ads.css +0 -2
  480. package/dist/starters/react/design-system/tokens/Focus/border-width.ads.css +0 -1
  481. package/dist/starters/react/design-system/tokens/Focus/focus-offset.ads.css +0 -1
  482. package/dist/starters/react/design-system/tokens/Foundation/spacing.ads.css +0 -20
  483. package/dist/starters/react/design-system/tokens/Grid/grid-gutter.ads.css +0 -6
  484. package/dist/starters/react/design-system/tokens/Grid/layer.ads.css +0 -2
  485. package/dist/starters/react/design-system/tokens/Grid/layout-size.ads.css +0 -15
  486. package/dist/starters/react/design-system/tokens/Grid/spacing.ads.css +0 -12
  487. package/dist/starters/react/design-system/tokens/Grid/track-count.ads.css +0 -1
  488. package/dist/starters/react/design-system/tokens/Identity/content-gap.ads.css +0 -6
  489. package/dist/starters/react/design-system/tokens/Identity/visual-size.ads.css +0 -1
  490. package/dist/starters/react/design-system/tokens/Motion/duration.ads.css +0 -6
  491. package/dist/starters/react/design-system/tokens/Motion/easing.ads.css +0 -5
  492. package/dist/starters/react/design-system/tokens/Motion/motion-angle.ads.css +0 -1
  493. package/dist/starters/react/design-system/tokens/Motion/motion-distance.ads.css +0 -2
  494. package/dist/starters/react/design-system/tokens/Motion/motion-scale.ads.css +0 -9
  495. package/dist/starters/react/design-system/tokens/Surfaces/blur.ads.css +0 -2
  496. package/dist/starters/react/design-system/tokens/Surfaces/gradient.ads.css +0 -2
  497. package/dist/starters/react/design-system/tokens/Surfaces/opacity.ads.css +0 -2
  498. package/dist/starters/react/design-system/tokens/Surfaces/paint.ads.css +0 -58
  499. package/dist/starters/react/design-system/tokens/Surfaces/shadow.ads.css +0 -20
  500. package/dist/starters/react/design-system/tokens/Typography/font-family.ads.css +0 -1
  501. package/dist/starters/react/design-system/tokens/Typography/font-features.ads.css +0 -1
  502. package/dist/starters/react/design-system/tokens/Typography/font-size.ads.css +0 -9
  503. package/dist/starters/react/design-system/tokens/Typography/font-stretch.ads.css +0 -1
  504. package/dist/starters/react/design-system/tokens/Typography/font-variations.ads.css +0 -1
  505. package/dist/starters/react/design-system/tokens/Typography/font-weight.ads.css +0 -1
  506. package/dist/starters/react/design-system/tokens/Typography/letter-spacing.ads.css +0 -1
  507. package/dist/starters/react/design-system/tokens/Typography/line-height.ads.css +0 -11
  508. package/dist/starters/react/design-system/tokens/Typography/word-spacing.ads.css +0 -1
  509. package/dist/starters/react/starter.json +0 -11
  510. package/docs/STARTER.md +0 -167
@@ -1,92 +1,92 @@
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 Gu(e=[]){return e.map((t)=>{let o=t.file?t.file+(t.line?`:${t.line}`:"")+(t.column?`:${t.column}`:""):"";return(o?`${o}: `:"")+t.message}).join(`
2
- `)}var Wu=12;function Hm(e){if(e?.kind!=="stale"||e.reason.kind==="emitting")return null;let t=e.reason.failure,o=e.shown===null?"No earlier revision is available to show.":"Showing the last good revision.",r=t?.kind==="check-failed"?`The current source fails its check. ${o}`:e.reason.kind==="tree-failed"?`The preview tree could not be written${t?.message??t?.reason?`: ${t.message??t.reason}`:""}. ${o}`:`The current source could not be emitted. ${o}`,s=t?.diagnostics??[],a=Gu(s.slice(0,Wu)),i=s.length>Wu?`
3
- … and ${s.length-Wu} more (ads check lists them all).`:"";return`${r}${a===""?"":`
4
- ${a}`}${i}`}var Ve=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof Map);var{create:Uw,defineProperty:Xn,getOwnPropertyDescriptor:Dw,getOwnPropertyNames:Zw,getPrototypeOf:Bw}=Object,Hw=Object.prototype.hasOwnProperty,Fm=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vm=(e,t)=>{let o={};for(var r in e)Xn(o,r,{get:e[r],enumerable:!0});if(t)Xn(o,Symbol.toStringTag,{value:"Module"});return o},Fw=(e,t,o,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(var s=Zw(t),a=0,i=s.length,n;a<i;a++)if(n=s[a],!Hw.call(e,n)&&n!==o)Xn(e,n,{get:((u)=>t[u]).bind(null,n),enumerable:!(r=Dw(t,n))||r.enumerable})}return e},Jm=(e,t,o)=>(o=e!=null?Uw(Bw(e)):{},Fw(t||!e||!e.__esModule?Xn(o,"default",{value:e,enumerable:!0}):o,e));var Vw=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),Wm=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),Jw=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),Ww=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function Gm(e){return typeof e==="string"&&Wm.has(e.replace(/#$/,""))}function Km(e,t){if(!("$schema"in e)||typeof e.$schema!=="string")return"2020-12";let o=e.$schema.replace(/#$/,"");if(Vw.has(o))return"2020-12";if(Wm.has(o))return"2019-09";if(Jw.has(o)||Ww.has(o))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 Ym,Ku=Object.freeze({status:"aborted"});function S(e,t,o){function r(n,u){if(!n._zod)Object.defineProperty(n,"_zod",{value:{def:u,constr:i,traits:new Set},enumerable:!1});if(n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,u);let d=i.prototype,l=Object.keys(d);for(let p=0;p<l.length;p++){let h=l[p];if(!(h in n))n[h]=d[h].bind(n)}}let s=o?.Parent??Object;class a extends s{}Object.defineProperty(a,"name",{value:e});function i(n){var u;let d=o?.Parent?new a:this;r(d,n),(u=d._zod).deferred??(u.deferred=[]);for(let l of d._zod.deferred)l();return d}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:(n)=>{if(o?.Parent&&n instanceof o.Parent)return!0;return n?._zod?.traits?.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}var Gw=Symbol("zod_brand");class Ft extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class _a extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}(Ym=globalThis).__zod_globalConfig??(Ym.__zod_globalConfig={});var Or=globalThis.__zod_globalConfig;function Je(e){if(e)Object.assign(Or,e);return Or}function ec(e){let t=Object.values(e).filter((r)=>typeof r==="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function Xu(e,t="|"){return e.map((o)=>od(o)).join(t)}function fa(e,t){if(typeof t==="bigint")return t.toString();return t}function ga(e){return{get value(){{let o=e();return Object.defineProperty(this,"value",{value:o}),o}throw Error("cached value already set")}}}function tc(e){return e===null||e===void 0}function oc(e){let t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}function Qm(e,t){let o=e/t,r=Math.round(o),s=Number.EPSILON*Math.max(Math.abs(o),1);if(Math.abs(o-r)<s)return 0;return o-r}var Xm=Symbol("evaluating");function re(e,t,o){let r=void 0;Object.defineProperty(e,t,{get(){if(r===Xm)return;if(r===void 0)r=Xm,r=o();return r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function Fo(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function uo(...e){let t={};for(let o of e){let r=Object.getOwnPropertyDescriptors(o);Object.assign(t,r)}return Object.defineProperties({},t)}function Qu(e){return JSON.stringify(e)}function ep(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var ed="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ar(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var tp=ga(()=>{if(Or.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Vo(e){if(Ar(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let o=t.prototype;if(Ar(o)===!1)return!1;if(Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)return!1;return!0}function td(e){if(Vo(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 lo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pt(e,t,o){let r=new e._zod.constr(t??e._zod.def);if(!t||o?.parent)r._zod.parent=e;return r}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 od(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function rp(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var sp={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 Kw(e,t){let o=e._zod.def,r=o.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let a=uo(e._zod.def,{get shape(){let i={};for(let n in t){if(!(n in o.shape))throw Error(`Unrecognized key: "${n}"`);if(!t[n])continue;i[n]=o.shape[n]}return Fo(this,"shape",i),i},checks:[]});return pt(e,a)}function Yw(e,t){let o=e._zod.def,r=o.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let a=uo(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let n in t){if(!(n in o.shape))throw Error(`Unrecognized key: "${n}"`);if(!t[n])continue;delete i[n]}return Fo(this,"shape",i),i},checks:[]});return pt(e,a)}function Xw(e,t){if(!Vo(t))throw Error("Invalid input to extend: expected a plain object");let o=e._zod.def.checks;if(o&&o.length>0){let a=e._zod.def.shape;for(let i in t)if(Object.getOwnPropertyDescriptor(a,i)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let s=uo(e._zod.def,{get shape(){let a={...e._zod.def.shape,...t};return Fo(this,"shape",a),a}});return pt(e,s)}function Qw(e,t){if(!Vo(t))throw Error("Invalid input to safeExtend: expected a plain object");let o=uo(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return Fo(this,"shape",r),r}});return pt(e,o)}function ey(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let o=uo(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return Fo(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return pt(e,o)}function ty(e,t,o){let s=t._zod.def.checks;if(s&&s.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let i=uo(t._zod.def,{get shape(){let n=t._zod.def.shape,u={...n};if(o)for(let d in o){if(!(d in n))throw Error(`Unrecognized key: "${d}"`);if(!o[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 Fo(this,"shape",u),u},checks:[]});return pt(t,i)}function oy(e,t,o){let r=uo(t._zod.def,{get shape(){let s=t._zod.def.shape,a={...s};if(o)for(let i in o){if(!(i in a))throw Error(`Unrecognized key: "${i}"`);if(!o[i])continue;a[i]=new e({type:"nonoptional",innerType:s[i]})}else for(let i in s)a[i]=new e({type:"nonoptional",innerType:s[i]});return Fo(this,"shape",a),a}});return pt(t,r)}function Jo(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function ap(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue===!1)return!0;return!1}function mo(e,t){return t.map((o)=>{var r;return(r=o).path??(r.path=[]),o.path.unshift(e),o})}function Qn(e){return typeof e==="string"?e:e?.message}function ht(e,t,o){let r=e.message?e.message:Qn(e.inst?._zod.def?.error?.(e))??Qn(t?.error?.(e))??Qn(o.customError?.(e))??Qn(o.localeError?.(e))??"Invalid input",{inst:s,continue:a,input:i,...n}=e;if(n.path??(n.path=[]),n.message=r,t?.reportInput)n.input=i;return n}function rc(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function ip(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 o=e;if(o&&Object.getPrototypeOf(o)!==Object.prototype&&"constructor"in o&&o.constructor)return o.constructor.name}}return t}function Wo(...e){let[t,o,r]=e;if(typeof t==="string")return{message:t,code:"custom",input:o,inst:r};return{...t}}var np=(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,fa,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},sc=S("$ZodError",np),rd=S("$ZodError",np,{Parent:Error});function sd(e,t=(o)=>o.message){let o={},r=[];for(let s of e.issues)if(s.path.length>0)o[s.path[0]]=o[s.path[0]]||[],o[s.path[0]].push(t(s));else r.push(t(s));return{formErrors:r,fieldErrors:o}}function ad(e,t=(o)=>o.message){let o={_errors:[]},r=(s,a=[])=>{for(let i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map((n)=>r({issues:n},[...a,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...a,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...a,...i.path]);else{let n=[...a,...i.path];if(n.length===0)o._errors.push(t(i));else{let u=o,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(i));u=u[l],d++}}}};return r(e),o}var ac=(e)=>(t,o,r,s)=>{let a=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise)throw new Ft;if(i.issues.length){let n=new(s?.Err??e)(i.issues.map((u)=>ht(u,a,Je())));throw ed(n,s?.callee),n}return i.value};var ic=(e)=>async(t,o,r,s)=>{let a=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise)i=await i;if(i.issues.length){let n=new(s?.Err??e)(i.issues.map((u)=>ht(u,a,Je())));throw ed(n,s?.callee),n}return i.value};var va=(e)=>(t,o,r)=>{let s=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:o,issues:[]},s);if(a instanceof Promise)throw new Ft;return a.issues.length?{success:!1,error:new(e??sc)(a.issues.map((i)=>ht(i,s,Je())))}:{success:!0,data:a.value}},cp=va(rd),wa=(e)=>async(t,o,r)=>{let s=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:o,issues:[]},s);if(a instanceof Promise)a=await a;return a.issues.length?{success:!1,error:new e(a.issues.map((i)=>ht(i,s,Je())))}:{success:!0,data:a.value}},up=wa(rd),dp=(e)=>(t,o,r)=>{let s=r?{...r,direction:"backward"}:{direction:"backward"};return ac(e)(t,o,s)};var lp=(e)=>(t,o,r)=>ac(e)(t,o,r);var mp=(e)=>async(t,o,r)=>{let s=r?{...r,direction:"backward"}:{direction:"backward"};return ic(e)(t,o,s)};var pp=(e)=>async(t,o,r)=>ic(e)(t,o,r);var hp=(e)=>(t,o,r)=>{let s=r?{...r,direction:"backward"}:{direction:"backward"};return va(e)(t,o,s)};var _p=(e)=>(t,o,r)=>va(e)(t,o,r);var fp=(e)=>async(t,o,r)=>{let s=r?{...r,direction:"backward"}:{direction:"backward"};return wa(e)(t,o,s)};var gp=(e)=>async(t,o,r)=>wa(e)(t,o,r);var vp=/^[cC][0-9a-z]{6,}$/,wp=/^[0-9a-z]+$/,yp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,bp=/^[0-9a-vA-V]{20}$/,zp=/^[A-Za-z0-9]{27}$/,Sp=/^[a-zA-Z0-9_-]{21}$/,kp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var xp=/^([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})$/,id=(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 Rp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var sy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function qp(){return new RegExp(sy,"u")}var Pp=/^(?:(?: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])$/,jp=/^(([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 Tp=/^((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])$/,Cp=/^(([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])$/,Ep=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nd=/^[A-Za-z0-9_-]*$/;var $p=/^https?$/,Mp=/^\+[1-9]\d{6,14}$/,Ip="(?:(?:\\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])))",Np=new RegExp(`^${Ip}$`);function Op(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 Ap(e){return new RegExp(`^${Op(e)}$`)}function Lp(e){let t=Op({precision:e.precision}),o=["Z"];if(e.local)o.push("");if(e.offset)o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${o.join("|")})`;return new RegExp(`^${Ip}T(?:${r})$`)}var Up=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};var Dp=/^-?\d+$/,cd=/^-?\d+(?:\.\d+)?$/,Zp=/^(?:true|false)$/i,Bp=/^null$/i;var Hp=/^undefined$/i;var Fp=/^[^A-Z]*$/,Vp=/^[^a-z]*$/;var qe=S("$ZodCheck",(e,t)=>{var o;e._zod??(e._zod={}),e._zod.def=t,(o=e._zod).onattach??(o.onattach=[])}),Jp={number:"number",bigint:"bigint",object:"date"},ud=S("$ZodCheckLessThan",(e,t)=>{qe.init(e,t);let o=Jp[typeof t.value];e._zod.onattach.push((r)=>{let s=r._zod.bag,a=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<a)if(t.inclusive)s.maximum=t.value;else s.exclusiveMaximum=t.value}),e._zod.check=(r)=>{if(t.inclusive?r.value<=t.value:r.value<t.value)return;r.issues.push({origin:o,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),dd=S("$ZodCheckGreaterThan",(e,t)=>{qe.init(e,t);let o=Jp[typeof t.value];e._zod.onattach.push((r)=>{let s=r._zod.bag,a=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>a)if(t.inclusive)s.minimum=t.value;else s.exclusiveMinimum=t.value}),e._zod.check=(r)=>{if(t.inclusive?r.value>=t.value:r.value>t.value)return;r.issues.push({origin:o,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wp=S("$ZodCheckMultipleOf",(e,t)=>{qe.init(e,t),e._zod.onattach.push((o)=>{var r;(r=o._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=(o)=>{if(typeof o.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof o.value==="bigint"?o.value%t.value===BigInt(0):Qm(o.value,t.value)===0)return;o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:t.value,input:o.value,inst:e,continue:!t.abort})}}),Gp=S("$ZodCheckNumberFormat",(e,t)=>{qe.init(e,t),t.format=t.format||"float64";let o=t.format?.includes("int"),r=o?"int":"number",[s,a]=sp[t.format];e._zod.onattach.push((i)=>{let n=i._zod.bag;if(n.format=t.format,n.minimum=s,n.maximum=a,o)n.pattern=Dp}),e._zod.check=(i)=>{let n=i.value;if(o){if(!Number.isInteger(n)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:n,inst:e});return}if(!Number.isSafeInteger(n)){if(n>0)i.issues.push({input:n,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});else i.issues.push({input:n,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}if(n<s)i.issues.push({origin:"number",input:n,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort});if(n>a)i.issues.push({origin:"number",input:n,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}});var Kp=S("$ZodCheckMaxLength",(e,t)=>{var o;qe.init(e,t),(o=e._zod.def).when??(o.when=(r)=>{let s=r.value;return!tc(s)&&s.length!==void 0}),e._zod.onattach.push((r)=>{let s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<s)r._zod.bag.maximum=t.maximum}),e._zod.check=(r)=>{let s=r.value;if(s.length<=t.maximum)return;let i=rc(s);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Yp=S("$ZodCheckMinLength",(e,t)=>{var o;qe.init(e,t),(o=e._zod.def).when??(o.when=(r)=>{let s=r.value;return!tc(s)&&s.length!==void 0}),e._zod.onattach.push((r)=>{let s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>s)r._zod.bag.minimum=t.minimum}),e._zod.check=(r)=>{let s=r.value;if(s.length>=t.minimum)return;let i=rc(s);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Xp=S("$ZodCheckLengthEquals",(e,t)=>{var o;qe.init(e,t),(o=e._zod.def).when??(o.when=(r)=>{let s=r.value;return!tc(s)&&s.length!==void 0}),e._zod.onattach.push((r)=>{let s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=(r)=>{let s=r.value,a=s.length;if(a===t.length)return;let i=rc(s),n=a>t.length;r.issues.push({origin:i,...n?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ba=S("$ZodCheckStringFormat",(e,t)=>{var o,r;if(qe.init(e,t),e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,t.pattern)a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern)}),t.pattern)(o=e._zod).check??(o.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(r=e._zod).check??(r.check=()=>{})}),Qp=S("$ZodCheckRegex",(e,t)=>{ba.init(e,t),e._zod.check=(o)=>{if(t.pattern.lastIndex=0,t.pattern.test(o.value))return;o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eh=S("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Fp),ba.init(e,t)}),th=S("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Vp),ba.init(e,t)}),oh=S("$ZodCheckIncludes",(e,t)=>{qe.init(e,t);let o=lo(t.includes),r=new RegExp(typeof t.position==="number"?`^.{${t.position}}${o}`:o);t.pattern=r,e._zod.onattach.push((s)=>{let a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),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})}}),rh=S("$ZodCheckStartsWith",(e,t)=>{qe.init(e,t);let o=new RegExp(`^${lo(t.prefix)}.*`);t.pattern??(t.pattern=o),e._zod.onattach.push((r)=>{let s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(o)}),e._zod.check=(r)=>{if(r.value.startsWith(t.prefix))return;r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),sh=S("$ZodCheckEndsWith",(e,t)=>{qe.init(e,t);let o=new RegExp(`.*${lo(t.suffix)}$`);t.pattern??(t.pattern=o),e._zod.onattach.push((r)=>{let s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(o)}),e._zod.check=(r)=>{if(r.value.endsWith(t.suffix))return;r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});var ah=S("$ZodCheckOverwrite",(e,t)=>{qe.init(e,t),e._zod.check=(o)=>{o.value=t.tx(o.value)}});class ld{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 o=e.split(`
5
- `).filter((a)=>a),r=Math.min(...o.map((a)=>a.length-a.trimStart().length)),s=o.map((a)=>a.slice(r)).map((a)=>" ".repeat(this.indent*2)+a);for(let a of s)this.content.push(a)}compile(){let e=Function,t=this?.args,r=[...(this?.content??[""]).map((s)=>` ${s}`)];return new e(...t,r.join(`
6
- `))}}var nh={major:4,minor:4,patch:3};var ne=S("$ZodType",(e,t)=>{var o;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nh;let r=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))r.unshift(e);for(let s of r)for(let a of s._zod.onattach)a(e);if(r.length===0)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let s=(i,n,u)=>{let d=Jo(i),l;for(let p of n){if(p._zod.def.when){if(ap(i))continue;if(!p._zod.def.when(i))continue}else if(d)continue;let h=i.issues.length,v=p._zod.check(i);if(v instanceof Promise&&u?.async===!1)throw new Ft;if(l||v instanceof Promise)l=(l??Promise.resolve()).then(async()=>{if(await v,i.issues.length===h)return;if(!d)d=Jo(i,h)});else{if(i.issues.length===h)continue;if(!d)d=Jo(i,h)}}if(l)return l.then(()=>i);return i},a=(i,n,u)=>{if(Jo(i))return i.aborted=!0,i;let d=s(n,r,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=(i,n)=>{if(n.skipChecks)return e._zod.parse(i,n);if(n.direction==="backward"){let d=e._zod.parse({value:i.value,issues:[]},{...n,skipChecks:!0});if(d instanceof Promise)return d.then((l)=>a(l,i,n));return a(d,i,n)}let u=e._zod.parse(i,n);if(u instanceof Promise){if(n.async===!1)throw new Ft;return u.then((d)=>s(d,r,n))}return s(u,r,n)}}re(e,"~standard",()=>({validate:(s)=>{try{let a=cp(e,s);return a.success?{value:a.data}:{issues:a.error?.issues}}catch(a){return up(e,s).then((i)=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),uc=S("$ZodString",(e,t)=>{ne.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Up(e._zod.bag),e._zod.parse=(o,r)=>{if(t.coerce)try{o.value=String(o.value)}catch(s){}if(typeof o.value==="string")return o;return o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),he=S("$ZodStringFormat",(e,t)=>{ba.init(e,t),uc.init(e,t)}),fh=S("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=xp),he.init(e,t)}),gh=S("$ZodUUID",(e,t)=>{if(t.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=id(r))}else t.pattern??(t.pattern=id());he.init(e,t)}),vh=S("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rp),he.init(e,t)}),wh=S("$ZodURL",(e,t)=>{he.init(e,t),e._zod.check=(o)=>{try{let r=o.value.trim();if(!t.normalize&&t.protocol?.source===$p.source){if(!/^https?:\/\//i.test(r)){o.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:o.value,inst:e,continue:!t.abort});return}}let s=new URL(r);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(s.hostname))o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:o.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))o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:o.value,inst:e,continue:!t.abort})}if(t.normalize)o.value=s.href;else o.value=r;return}catch(r){o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!t.abort})}}}),yh=S("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=qp()),he.init(e,t)}),bh=S("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Sp),he.init(e,t)}),zh=S("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=vp),he.init(e,t)}),Sh=S("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=wp),he.init(e,t)}),kh=S("$ZodULID",(e,t)=>{t.pattern??(t.pattern=yp),he.init(e,t)}),xh=S("$ZodXID",(e,t)=>{t.pattern??(t.pattern=bp),he.init(e,t)}),Rh=S("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=zp),he.init(e,t)}),qh=S("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Lp(t)),he.init(e,t)}),Ph=S("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Np),he.init(e,t)}),jh=S("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ap(t)),he.init(e,t)}),Th=S("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=kp),he.init(e,t)}),Ch=S("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Pp),he.init(e,t),e._zod.bag.format="ipv4"}),Eh=S("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=jp),he.init(e,t),e._zod.bag.format="ipv6",e._zod.check=(o)=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!t.abort})}}});var $h=S("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Tp),he.init(e,t)}),Mh=S("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Cp),he.init(e,t),e._zod.check=(o)=>{let r=o.value.split("/");try{if(r.length!==2)throw Error();let[s,a]=r;if(!a)throw Error();let i=Number(a);if(`${i}`!==a)throw Error();if(i<0||i>128)throw Error();new URL(`http://[${s}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!t.abort})}}});function Ih(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 Nh=S("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ep),he.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=(o)=>{if(Ih(o.value))return;o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!t.abort})}});function ay(e){if(!nd.test(e))return!1;let t=e.replace(/[-_]/g,(r)=>r==="-"?"+":"/"),o=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ih(o)}var Oh=S("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=nd),he.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=(o)=>{if(ay(o.value))return;o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!t.abort})}}),Ah=S("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Mp),he.init(e,t)});function iy(e,t=null){try{let o=e.split(".");if(o.length!==3)return!1;let[r]=o;if(!r)return!1;let s=JSON.parse(atob(r));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 Lh=S("$ZodJWT",(e,t)=>{he.init(e,t),e._zod.check=(o)=>{if(iy(o.value,t.alg))return;o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!t.abort})}});var pd=S("$ZodNumber",(e,t)=>{ne.init(e,t),e._zod.pattern=e._zod.bag.pattern??cd,e._zod.parse=(o,r)=>{if(t.coerce)try{o.value=Number(o.value)}catch(i){}let s=o.value;if(typeof s==="number"&&!Number.isNaN(s)&&Number.isFinite(s))return o;let a=typeof s==="number"?Number.isNaN(s)?"NaN":!Number.isFinite(s)?"Infinity":void 0:void 0;return o.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...a?{received:a}:{}}),o}}),Uh=S("$ZodNumberFormat",(e,t)=>{Gp.init(e,t),pd.init(e,t)}),Dh=S("$ZodBoolean",(e,t)=>{ne.init(e,t),e._zod.pattern=Zp,e._zod.parse=(o,r)=>{if(t.coerce)try{o.value=Boolean(o.value)}catch(a){}let s=o.value;if(typeof s==="boolean")return o;return o.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),o}});var Zh=S("$ZodUndefined",(e,t)=>{ne.init(e,t),e._zod.pattern=Hp,e._zod.values=new Set([void 0]),e._zod.parse=(o,r)=>{let s=o.value;if(typeof s>"u")return o;return o.issues.push({expected:"undefined",code:"invalid_type",input:s,inst:e}),o}}),Bh=S("$ZodNull",(e,t)=>{ne.init(e,t),e._zod.pattern=Bp,e._zod.values=new Set([null]),e._zod.parse=(o,r)=>{let s=o.value;if(s===null)return o;return o.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),o}}),Hh=S("$ZodAny",(e,t)=>{ne.init(e,t),e._zod.parse=(o)=>o}),Fh=S("$ZodUnknown",(e,t)=>{ne.init(e,t),e._zod.parse=(o)=>o}),Vh=S("$ZodNever",(e,t)=>{ne.init(e,t),e._zod.parse=(o,r)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)});function ch(e,t,o){if(e.issues.length)t.issues.push(...mo(o,e.issues));t.value[o]=e.value}var Jh=S("$ZodArray",(e,t)=>{ne.init(e,t),e._zod.parse=(o,r)=>{let s=o.value;if(!Array.isArray(s))return o.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),o;o.value=Array(s.length);let a=[];for(let i=0;i<s.length;i++){let n=s[i],u=t.element._zod.run({value:n,issues:[]},r);if(u instanceof Promise)a.push(u.then((d)=>ch(d,o,i)));else ch(u,o,i)}if(a.length)return Promise.all(a).then(()=>o);return o}});function cc(e,t,o,r,s,a){let i=o in r;if(e.issues.length){if(s&&a&&!i)return;t.issues.push(...mo(o,e.issues))}if(!i&&!s){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[o]});return}if(e.value===void 0){if(i)t.value[o]=void 0}else t.value[o]=e.value}function Wh(e){let t=Object.keys(e.shape);for(let r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${r}": expected a Zod schema`);let o=rp(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function Gh(e,t,o,r,s,a){let i=[],n=s.keySet,u=s.catchall._zod,d=u.def.type,l=u.optin==="optional",p=u.optout==="optional";for(let h in t){if(h==="__proto__")continue;if(n.has(h))continue;if(d==="never"){i.push(h);continue}let v=u.run({value:t[h],issues:[]},r);if(v instanceof Promise)e.push(v.then((b)=>cc(b,o,h,t,l,p)));else cc(v,o,h,t,l,p)}if(i.length)o.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:a});if(!e.length)return o;return Promise.all(e).then(()=>o)}var ny=S("$ZodObject",(e,t)=>{if(ne.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 r=ga(()=>Wh(t));re(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 p of l.values)u[d].add(p)}}return u});let s=Ar,a=t.catchall,i;e._zod.parse=(n,u)=>{i??(i=r.value);let d=n.value;if(!s(d))return n.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),n;n.value={};let l=[],p=i.shape;for(let h of i.keys){let v=p[h],b=v._zod.optin==="optional",g=v._zod.optout==="optional",w=v._zod.run({value:d[h],issues:[]},u);if(w instanceof Promise)l.push(w.then((R)=>cc(R,n,h,d,b,g)));else cc(w,n,h,d,b,g)}if(!a)return l.length?Promise.all(l).then(()=>n):n;return Gh(l,d,n,u,r.value,e)}}),Kh=S("$ZodObjectJIT",(e,t)=>{ny.init(e,t);let o=e._zod.parse,r=ga(()=>Wh(t)),s=(h)=>{let v=new ld(["shape","payload","ctx"]),b=r.value,g=(x)=>{let j=Qu(x);return`shape[${j}]._zod.run({ value: input[${j}], 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 j=w[x],k=Qu(x),z=h[x],M=z?._zod?.optin==="optional",X=z?._zod?.optout==="optional";if(v.write(`const ${j} = ${g(x)};`),M&&X)v.write(`
7
- if (${j}.issues.length) {
8
- if (${k} in input) {
9
- payload.issues = payload.issues.concat(${j}.issues.map(iss => ({
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(`
7
+ if (${P}.issues.length) {
8
+ if (${S} in input) {
9
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
10
10
  ...iss,
11
- path: iss.path ? [${k}, ...iss.path] : [${k}]
11
+ path: iss.path ? [${S}, ...iss.path] : [${S}]
12
12
  })));
13
13
  }
14
14
  }
15
15
 
16
- if (${j}.value === undefined) {
17
- if (${k} in input) {
18
- newResult[${k}] = undefined;
16
+ if (${P}.value === undefined) {
17
+ if (${S} in input) {
18
+ newResult[${S}] = undefined;
19
19
  }
20
20
  } else {
21
- newResult[${k}] = ${j}.value;
21
+ newResult[${S}] = ${P}.value;
22
22
  }
23
23
 
24
- `);else if(!M)v.write(`
25
- const ${j}_present = ${k} in input;
26
- if (${j}.issues.length) {
27
- payload.issues = payload.issues.concat(${j}.issues.map(iss => ({
24
+ `);else if(!N)v.write(`
25
+ const ${P}_present = ${S} in input;
26
+ if (${P}.issues.length) {
27
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
28
28
  ...iss,
29
- path: iss.path ? [${k}, ...iss.path] : [${k}]
29
+ path: iss.path ? [${S}, ...iss.path] : [${S}]
30
30
  })));
31
31
  }
32
- if (!${j}_present && !${j}.issues.length) {
32
+ if (!${P}_present && !${P}.issues.length) {
33
33
  payload.issues.push({
34
34
  code: "invalid_type",
35
35
  expected: "nonoptional",
36
36
  input: undefined,
37
- path: [${k}]
37
+ path: [${S}]
38
38
  });
39
39
  }
40
40
 
41
- if (${j}_present) {
42
- if (${j}.value === undefined) {
43
- newResult[${k}] = undefined;
41
+ if (${P}_present) {
42
+ if (${P}.value === undefined) {
43
+ newResult[${S}] = undefined;
44
44
  } else {
45
- newResult[${k}] = ${j}.value;
45
+ newResult[${S}] = ${P}.value;
46
46
  }
47
47
  }
48
48
 
49
49
  `);else v.write(`
50
- if (${j}.issues.length) {
51
- payload.issues = payload.issues.concat(${j}.issues.map(iss => ({
50
+ if (${P}.issues.length) {
51
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
52
52
  ...iss,
53
- path: iss.path ? [${k}, ...iss.path] : [${k}]
53
+ path: iss.path ? [${S}, ...iss.path] : [${S}]
54
54
  })));
55
55
  }
56
56
 
57
- if (${j}.value === undefined) {
58
- if (${k} in input) {
59
- newResult[${k}] = undefined;
57
+ if (${P}.value === undefined) {
58
+ if (${S} in input) {
59
+ newResult[${S}] = undefined;
60
60
  }
61
61
  } else {
62
- newResult[${k}] = ${j}.value;
62
+ newResult[${S}] = ${P}.value;
63
63
  }
64
64
 
65
- `)}v.write("payload.value = newResult;"),v.write("return payload;");let P=v.compile();return(x,j)=>P(h,x,j)},a,i=Ar,n=!Or.jitless,d=n&&tp.value,l=t.catchall,p;e._zod.parse=(h,v)=>{p??(p=r.value);let b=h.value;if(!i(b))return h.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),h;if(n&&d&&v?.async===!1&&v.jitless!==!0){if(!a)a=s(t.shape);if(h=a(h,v),!l)return h;return Gh([],b,h,v,p,e)}return o(h,v)}});function uh(e,t,o,r){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let s=e.filter((a)=>!Jo(a));if(s.length===1)return t.value=s[0].value,s[0];return t.issues.push({code:"invalid_union",input:t.value,inst:o,errors:e.map((a)=>a.issues.map((i)=>ht(i,r,Je())))}),t}var hd=S("$ZodUnion",(e,t)=>{ne.init(e,t),re(e._zod,"optin",()=>t.options.some((r)=>r._zod.optin==="optional")?"optional":void 0),re(e._zod,"optout",()=>t.options.some((r)=>r._zod.optout==="optional")?"optional":void 0),re(e._zod,"values",()=>{if(t.options.every((r)=>r._zod.values))return new Set(t.options.flatMap((r)=>Array.from(r._zod.values)));return}),re(e._zod,"pattern",()=>{if(t.options.every((r)=>r._zod.pattern)){let r=t.options.map((s)=>s._zod.pattern);return new RegExp(`^(${r.map((s)=>oc(s.source)).join("|")})$`)}return});let o=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,s)=>{if(o)return o(r,s);let a=!1,i=[];for(let n of t.options){let u=n._zod.run({value:r.value,issues:[]},s);if(u instanceof Promise)i.push(u),a=!0;else{if(u.issues.length===0)return u;i.push(u)}}if(!a)return uh(i,r,e,s);return Promise.all(i).then((n)=>uh(n,r,e,s))}});var Yh=S("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,hd.init(e,t);let o=e._zod.parse;re(e._zod,"propValues",()=>{let s={};for(let a of t.options){let i=a._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let[n,u]of Object.entries(i)){if(!s[n])s[n]=new Set;for(let d of u)s[n].add(d)}}return s});let r=ga(()=>{let s=t.options,a=new Map;for(let i of s){let n=i._zod.propValues?.[t.discriminator];if(!n||n.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let u of n){if(a.has(u))throw Error(`Duplicate discriminator value "${String(u)}"`);a.set(u,i)}}return a});e._zod.parse=(s,a)=>{let i=s.value;if(!Ar(i))return s.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),s;let n=r.value.get(i?.[t.discriminator]);if(n)return n._zod.run(s,a);if(t.unionFallback||a.direction==="backward")return o(s,a);return s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:i,path:[t.discriminator],inst:e}),s}}),Xh=S("$ZodIntersection",(e,t)=>{ne.init(e,t),e._zod.parse=(o,r)=>{let s=o.value,a=t.left._zod.run({value:s,issues:[]},r),i=t.right._zod.run({value:s,issues:[]},r);if(a instanceof Promise||i instanceof Promise)return Promise.all([a,i]).then(([u,d])=>dh(o,u,d));return dh(o,a,i)}});function md(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(Vo(e)&&Vo(t)){let o=Object.keys(t),r=Object.keys(e).filter((a)=>o.indexOf(a)!==-1),s={...e,...t};for(let a of r){let i=md(e[a],t[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};s[a]=i.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let o=[];for(let r=0;r<e.length;r++){let s=e[r],a=t[r],i=md(s,a);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};o.push(i.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function dh(e,t,o){let r=new Map,s;for(let n of t.issues)if(n.code==="unrecognized_keys"){s??(s=n);for(let u of n.keys){if(!r.has(u))r.set(u,{});r.get(u).l=!0}}else e.issues.push(n);for(let n of o.issues)if(n.code==="unrecognized_keys")for(let u of n.keys){if(!r.has(u))r.set(u,{});r.get(u).r=!0}else e.issues.push(n);let a=[...r].filter(([,n])=>n.l&&n.r).map(([n])=>n);if(a.length&&s)e.issues.push({...s,keys:a});if(Jo(e))return e;let i=md(t.value,o.value);if(!i.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}var Qh=S("$ZodRecord",(e,t)=>{ne.init(e,t),e._zod.parse=(o,r)=>{let s=o.value;if(!Vo(s))return o.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),o;let a=[],i=t.keyType._zod.values;if(i){o.value={};let n=new Set;for(let d of i)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:[]},r);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(l.issues.length){o.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map((v)=>ht(v,r,Je())),input:d,path:[d],inst:e});continue}let p=l.value,h=t.valueType._zod.run({value:s[d],issues:[]},r);if(h instanceof Promise)a.push(h.then((v)=>{if(v.issues.length)o.issues.push(...mo(d,v.issues));o.value[p]=v.value}));else{if(h.issues.length)o.issues.push(...mo(d,h.issues));o.value[p]=h.value}}let u;for(let d in s)if(!n.has(d))u=u??[],u.push(d);if(u&&u.length>0)o.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:u})}else{o.value={};for(let n of Reflect.ownKeys(s)){if(n==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(s,n))continue;let u=t.keyType._zod.run({value:n,issues:[]},r);if(u instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof n==="string"&&cd.test(n)&&u.issues.length){let p=t.keyType._zod.run({value:Number(n),issues:[]},r);if(p instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(p.issues.length===0)u=p}if(u.issues.length){if(t.mode==="loose")o.value[n]=s[n];else o.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map((p)=>ht(p,r,Je())),input:n,path:[n],inst:e});continue}let l=t.valueType._zod.run({value:s[n],issues:[]},r);if(l instanceof Promise)a.push(l.then((p)=>{if(p.issues.length)o.issues.push(...mo(n,p.issues));o.value[u.value]=p.value}));else{if(l.issues.length)o.issues.push(...mo(n,l.issues));o.value[u.value]=l.value}}}if(a.length)return Promise.all(a).then(()=>o);return o}});var e_=S("$ZodEnum",(e,t)=>{ne.init(e,t);let o=ec(t.entries),r=new Set(o);e._zod.values=r,e._zod.pattern=new RegExp(`^(${o.filter((s)=>op.has(typeof s)).map((s)=>typeof s==="string"?lo(s):s.toString()).join("|")})$`),e._zod.parse=(s,a)=>{let i=s.value;if(r.has(i))return s;return s.issues.push({code:"invalid_value",values:o,input:i,inst:e}),s}}),t_=S("$ZodLiteral",(e,t)=>{if(ne.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let o=new Set(t.values);e._zod.values=o,e._zod.pattern=new RegExp(`^(${t.values.map((r)=>typeof r==="string"?lo(r):r?lo(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,s)=>{let a=r.value;if(o.has(a))return r;return r.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),r}});var o_=S("$ZodTransform",(e,t)=>{ne.init(e,t),e._zod.optin="optional",e._zod.parse=(o,r)=>{if(r.direction==="backward")throw new _a(e.constructor.name);let s=t.transform(o.value,o);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then((i)=>(o.value=i,o.fallback=!0,o));if(s instanceof Promise)throw new Ft;return o.value=s,o.fallback=!0,o}});function lh(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var _d=S("$ZodOptional",(e,t)=>{ne.init(e,t),e._zod.optin="optional",e._zod.optout="optional",re(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),re(e._zod,"pattern",()=>{let o=t.innerType._zod.pattern;return o?new RegExp(`^(${oc(o.source)})?$`):void 0}),e._zod.parse=(o,r)=>{if(t.innerType._zod.optin==="optional"){let s=o.value,a=t.innerType._zod.run(o,r);if(a instanceof Promise)return a.then((i)=>lh(i,s));return lh(a,s)}if(o.value===void 0)return o;return t.innerType._zod.run(o,r)}}),r_=S("$ZodExactOptional",(e,t)=>{_d.init(e,t),re(e._zod,"values",()=>t.innerType._zod.values),re(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(o,r)=>t.innerType._zod.run(o,r)}),s_=S("$ZodNullable",(e,t)=>{ne.init(e,t),re(e._zod,"optin",()=>t.innerType._zod.optin),re(e._zod,"optout",()=>t.innerType._zod.optout),re(e._zod,"pattern",()=>{let o=t.innerType._zod.pattern;return o?new RegExp(`^(${oc(o.source)}|null)$`):void 0}),re(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(o,r)=>{if(o.value===null)return o;return t.innerType._zod.run(o,r)}}),a_=S("$ZodDefault",(e,t)=>{ne.init(e,t),e._zod.optin="optional",re(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,r)=>{if(r.direction==="backward")return t.innerType._zod.run(o,r);if(o.value===void 0)return o.value=t.defaultValue,o;let s=t.innerType._zod.run(o,r);if(s instanceof Promise)return s.then((a)=>mh(a,t));return mh(s,t)}});function mh(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var i_=S("$ZodPrefault",(e,t)=>{ne.init(e,t),e._zod.optin="optional",re(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,r)=>{if(r.direction==="backward")return t.innerType._zod.run(o,r);if(o.value===void 0)o.value=t.defaultValue;return t.innerType._zod.run(o,r)}}),n_=S("$ZodNonOptional",(e,t)=>{ne.init(e,t),re(e._zod,"values",()=>{let o=t.innerType._zod.values;return o?new Set([...o].filter((r)=>r!==void 0)):void 0}),e._zod.parse=(o,r)=>{let s=t.innerType._zod.run(o,r);if(s instanceof Promise)return s.then((a)=>ph(a,e));return ph(s,e)}});function ph(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 c_=S("$ZodCatch",(e,t)=>{ne.init(e,t),e._zod.optin="optional",re(e._zod,"optout",()=>t.innerType._zod.optout),re(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,r)=>{if(r.direction==="backward")return t.innerType._zod.run(o,r);let s=t.innerType._zod.run(o,r);if(s instanceof Promise)return s.then((a)=>{if(o.value=a.value,a.issues.length)o.value=t.catchValue({...o,error:{issues:a.issues.map((i)=>ht(i,r,Je()))},input:o.value}),o.issues=[],o.fallback=!0;return o});if(o.value=s.value,s.issues.length)o.value=t.catchValue({...o,error:{issues:s.issues.map((a)=>ht(a,r,Je()))},input:o.value}),o.issues=[],o.fallback=!0;return o}});var fd=S("$ZodPipe",(e,t)=>{ne.init(e,t),re(e._zod,"values",()=>t.in._zod.values),re(e._zod,"optin",()=>t.in._zod.optin),re(e._zod,"optout",()=>t.out._zod.optout),re(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(o,r)=>{if(r.direction==="backward"){let a=t.out._zod.run(o,r);if(a instanceof Promise)return a.then((i)=>nc(i,t.in,r));return nc(a,t.in,r)}let s=t.in._zod.run(o,r);if(s instanceof Promise)return s.then((a)=>nc(a,t.out,r));return nc(s,t.out,r)}});function nc(e,t,o){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},o)}var u_=S("$ZodPreprocess",(e,t)=>{fd.init(e,t)}),d_=S("$ZodReadonly",(e,t)=>{ne.init(e,t),re(e._zod,"propValues",()=>t.innerType._zod.propValues),re(e._zod,"values",()=>t.innerType._zod.values),re(e._zod,"optin",()=>t.innerType?._zod?.optin),re(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(o,r)=>{if(r.direction==="backward")return t.innerType._zod.run(o,r);let s=t.innerType._zod.run(o,r);if(s instanceof Promise)return s.then(hh);return hh(s)}});function hh(e){return e.value=Object.freeze(e.value),e}var l_=S("$ZodLazy",(e,t)=>{ne.init(e,t),re(e._zod,"innerType",()=>{let o=t;if(!o._cachedInner)o._cachedInner=t.getter();return o._cachedInner}),re(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),re(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),re(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),re(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(o,r)=>e._zod.innerType._zod.run(o,r)}),m_=S("$ZodCustom",(e,t)=>{qe.init(e,t),ne.init(e,t),e._zod.parse=(o,r)=>o,e._zod.check=(o)=>{let r=o.value,s=t.fn(r);if(s instanceof Promise)return s.then((a)=>_h(a,o,r,e));_h(s,o,r,e);return}});function _h(e,t,o,r){if(!e){let s={code:"custom",input:o,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};if(r._zod.def.params)s.params=r._zod.def.params;t.issues.push(Wo(s))}}var cy=()=>{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 o={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"},r={nan:"NaN"};return(s)=>{switch(s.code){case"invalid_type":{let a=r[s.expected]??s.expected,i=ip(s.input),n=r[i]??i;return`Invalid input: expected ${a}, received ${n}`}case"invalid_value":if(s.values.length===1)return`Invalid input: expected ${od(s.values[0])}`;return`Invalid option: expected one of ${Xu(s.values,"|")}`;case"too_big":{let a=s.inclusive?"<=":"<",i=t(s.origin);if(i)return`Too big: expected ${s.origin??"value"} to have ${a}${s.maximum.toString()} ${i.unit??"elements"}`;return`Too big: expected ${s.origin??"value"} to be ${a}${s.maximum.toString()}`}case"too_small":{let a=s.inclusive?">=":">",i=t(s.origin);if(i)return`Too small: expected ${s.origin} to have ${a}${s.minimum.toString()} ${i.unit}`;return`Too small: expected ${s.origin} to be ${a}${s.minimum.toString()}`}case"invalid_format":{let a=s;if(a.format==="starts_with")return`Invalid string: must start with "${a.prefix}"`;if(a.format==="ends_with")return`Invalid string: must end with "${a.suffix}"`;if(a.format==="includes")return`Invalid string: must include "${a.includes}"`;if(a.format==="regex")return`Invalid string: must match pattern ${a.pattern}`;return`Invalid ${o[a.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":""}: ${Xu(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 gd(){return{localeError:cy()}}var p_,uy=Symbol("ZodOutput"),dy=Symbol("ZodInput");class h_{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let o=t[0];if(this._map.set(e,o),o&&typeof o==="object"&&"id"in o)this._idmap.set(o.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 o={...this.get(t)??{}};delete o.id;let r={...o,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function __(){return new h_}(p_=globalThis).__zod_globalRegistry??(p_.__zod_globalRegistry=__());var po=globalThis.__zod_globalRegistry;function f_(e,t){return new e({type:"string",...Z(t)})}function vd(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Z(t)})}function wd(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Z(t)})}function g_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Z(t)})}function v_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Z(t)})}function w_(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Z(t)})}function y_(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 b_(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Z(t)})}function z_(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Z(t)})}function S_(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Z(t)})}function k_(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Z(t)})}function x_(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Z(t)})}function R_(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Z(t)})}function q_(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Z(t)})}function P_(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Z(t)})}function j_(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Z(t)})}function T_(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Z(t)})}function C_(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Z(t)})}function E_(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Z(t)})}function $_(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Z(t)})}function M_(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Z(t)})}function I_(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Z(t)})}function N_(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Z(t)})}function O_(e,t){return new e({type:"string",format:"date",check:"string_format",...Z(t)})}function A_(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Z(t)})}function L_(e,t){return new e({type:"string",format:"duration",check:"string_format",...Z(t)})}function U_(e,t){return new e({type:"number",checks:[],...Z(t)})}function D_(e,t){return new e({type:"number",coerce:!0,checks:[],...Z(t)})}function Z_(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(t)})}function B_(e,t){return new e({type:"boolean",...Z(t)})}function H_(e,t){return new e({type:"undefined",...Z(t)})}function F_(e,t){return new e({type:"null",...Z(t)})}function V_(e){return new e({type:"any"})}function J_(e){return new e({type:"unknown"})}function W_(e,t){return new e({type:"never",...Z(t)})}function dc(e,t){return new ud({check:"less_than",...Z(t),value:e,inclusive:!1})}function za(e,t){return new ud({check:"less_than",...Z(t),value:e,inclusive:!0})}function lc(e,t){return new dd({check:"greater_than",...Z(t),value:e,inclusive:!1})}function Sa(e,t){return new dd({check:"greater_than",...Z(t),value:e,inclusive:!0})}function mc(e,t){return new Wp({check:"multiple_of",...Z(t),value:e})}function pc(e,t){return new Kp({check:"max_length",...Z(t),maximum:e})}function Lr(e,t){return new Yp({check:"min_length",...Z(t),minimum:e})}function hc(e,t){return new Xp({check:"length_equals",...Z(t),length:e})}function bd(e,t){return new Qp({check:"string_format",format:"regex",...Z(t),pattern:e})}function zd(e){return new eh({check:"string_format",format:"lowercase",...Z(e)})}function Sd(e){return new th({check:"string_format",format:"uppercase",...Z(e)})}function kd(e,t){return new oh({check:"string_format",format:"includes",...Z(t),includes:e})}function xd(e,t){return new rh({check:"string_format",format:"starts_with",...Z(t),prefix:e})}function Rd(e,t){return new sh({check:"string_format",format:"ends_with",...Z(t),suffix:e})}function ho(e){return new ah({check:"overwrite",tx:e})}function qd(e){return ho((t)=>t.normalize(e))}function Pd(){return ho((e)=>e.trim())}function jd(){return ho((e)=>e.toLowerCase())}function Td(){return ho((e)=>e.toUpperCase())}function Cd(){return ho((e)=>ep(e))}function G_(e,t,o){return new e({type:"array",element:t,...Z(o)})}function K_(e,t,o){return new e({type:"custom",check:"custom",fn:t,...Z(o)})}function Y_(e,t){let o=ly((r)=>(r.addIssue=(s)=>{if(typeof s==="string")r.issues.push(Wo(s,r.value,o._zod.def));else{let a=s;if(a.fatal)a.continue=!1;a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=o),a.continue??(a.continue=!o._zod.def.abort),r.issues.push(Wo(a))}},e(r.value,r)),t);return o}function ly(e,t){let o=new qe({check:"custom",...Z(t)});return o._zod.check=e,o}function xa(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??po,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,o={path:[],schemaPath:[]}){var r;let s=e._zod.def,a=t.seen.get(e);if(a){if(a.count++,o.schemaPath.includes(e))a.cycle=o.path;return a.schema}let i={schema:{},count:1,cycle:void 0,path:o.path};t.seen.set(e,i);let n=e._zod.toJSONSchema?.();if(n)i.schema=n;else{let l={...o,schemaPath:[...o.schemaPath,e],path:o.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,l);else{let h=i.schema,v=t.processors[s.type];if(!v)throw Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);v(e,t,h,l)}let p=e._zod.parent;if(p){if(!i.ref)i.ref=p;ce(p,t,l),t.seen.get(p).isParent=!0}}let u=t.metadataRegistry.get(e);if(u)Object.assign(i.schema,u);if(t.io==="input"&&Ue(e))delete i.schema.examples,delete i.schema.default;if(t.io==="input"&&"_prefault"in i.schema)(r=i.schema).default??(r.default=i.schema._prefault);return delete i.schema._prefault,t.seen.get(e).schema}function Ra(e,t){let o=e.seen.get(t);if(!o)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let i of e.seen.entries()){let n=e.metadataRegistry.get(i[0])?.id;if(n){let u=r.get(n);if(u&&u!==i[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,i[0])}}let s=(i)=>{let n=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(i[0])?.id,h=e.external.uri??((b)=>b);if(p)return{ref:h(p)};let v=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=v,{defId:v,ref:`${h("__shared")}#/${n}/${v}`}}if(i[1]===o)return{ref:"#"};let d=`${"#"}/${n}/`,l=i[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:d+l}},a=(i)=>{if(i[1].schema.$ref)return;let n=i[1],{ref:u,defId:d}=s(i);if(n.def={...n.schema},d)n.defId=d;let l=n.schema;for(let p in l)delete l[p];l.$ref=u};if(e.cycles==="throw")for(let i of e.seen.entries()){let n=i[1];if(n.cycle)throw Error(`Cycle detected: #/${n.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>
66
66
 
67
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let n=i[1];if(t===i[0]){a(i);continue}if(e.external){let d=e.external.registry.get(i[0])?.id;if(t!==i[0]&&d){a(i);continue}}if(e.metadataRegistry.get(i[0])?.id){a(i);continue}if(n.cycle){a(i);continue}if(n.count>1){if(e.reused==="ref"){a(i);continue}}}}function qa(e,t){let o=e.seen.get(t);if(!o)throw Error("Unprocessed schema. This is a bug in Zod.");let r=(n)=>{let u=e.seen.get(n);if(u.ref===null)return;let d=u.def??u.schema,l={...d},p=u.ref;if(u.ref=null,p){r(p);let v=e.seen.get(p),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===p)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 h=n._zod.parent;if(h&&h!==p){r(h);let v=e.seen.get(h);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())r(n[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 n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");s.$id=e.external.uri(n)}Object.assign(s,o.def??o.schema);let a=e.metadataRegistry.get(t)?.id;if(a!==void 0&&s.id===a)delete s.id;let i=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;i[u.defId]=u.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 n=JSON.parse(JSON.stringify(s));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:ka(t,"input",e.processors),output:ka(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(n){throw Error("Error converting schema to JSON.")}}function Ue(e,t){let o=t??{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Ue(r.element,o);if(r.type==="set")return Ue(r.valueType,o);if(r.type==="lazy")return Ue(r.getter(),o);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Ue(r.innerType,o);if(r.type==="intersection")return Ue(r.left,o)||Ue(r.right,o);if(r.type==="record"||r.type==="map")return Ue(r.keyType,o)||Ue(r.valueType,o);if(r.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return Ue(r.in,o)||Ue(r.out,o)}if(r.type==="object"){for(let s in r.shape)if(Ue(r.shape[s],o))return!0;return!1}if(r.type==="union"){for(let s of r.options)if(Ue(s,o))return!0;return!1}if(r.type==="tuple"){for(let s of r.items)if(Ue(s,o))return!0;if(r.rest&&Ue(r.rest,o))return!0;return!1}return!1}var X_=(e,t={})=>(o)=>{let r=xa({...o,processors:t});return ce(e,r),Ra(r,e),qa(r,e)},ka=(e,t,o={})=>(r)=>{let{libraryOptions:s,target:a}=r??{},i=xa({...s??{},target:a,io:t,processors:o});return ce(e,i),Ra(i,e),qa(i,e)};var my={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ed=(e,t,o,r)=>{let s=o;s.type="string";let{minimum:a,maximum:i,format:n,patterns:u,contentEncoding:d}=e._zod.bag;if(typeof a==="number")s.minLength=a;if(typeof i==="number")s.maxLength=i;if(n){if(s.format=my[n]??n,s.format==="")delete s.format;if(n==="time")delete s.format}if(d)s.contentEncoding=d;if(u&&u.size>0){let l=[...u];if(l.length===1)s.pattern=l[0].source;else if(l.length>1)s.allOf=[...l.map((p)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))]}},$d=(e,t,o,r)=>{let s=o,{minimum:a,maximum:i,format:n,multipleOf:u,exclusiveMaximum:d,exclusiveMinimum:l}=e._zod.bag;if(typeof n==="string"&&n.includes("int"))s.type="integer";else s.type="number";let p=typeof l==="number"&&l>=(a??Number.NEGATIVE_INFINITY),h=typeof d==="number"&&d<=(i??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";if(p)if(v)s.minimum=l,s.exclusiveMinimum=!0;else s.exclusiveMinimum=l;else if(typeof a==="number")s.minimum=a;if(h)if(v)s.maximum=d,s.exclusiveMaximum=!0;else s.exclusiveMaximum=d;else if(typeof i==="number")s.maximum=i;if(typeof u==="number")s.multipleOf=u},Md=(e,t,o,r)=>{o.type="boolean"},ef=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},tf=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},Id=(e,t,o,r)=>{if(t.target==="openapi-3.0")o.type="string",o.nullable=!0,o.enum=[null];else o.type="null"},Nd=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},of=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},Od=(e,t,o,r)=>{o.not={}},Ad=(e,t,o,r)=>{},Ld=(e,t,o,r)=>{},rf=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},Ud=(e,t,o,r)=>{let s=e._zod.def,a=ec(s.entries);if(a.every((i)=>typeof i==="number"))o.type="number";if(a.every((i)=>typeof i==="string"))o.type="string";o.enum=a},Dd=(e,t,o,r)=>{let s=e._zod.def,a=[];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 a.push(Number(i));else a.push(i);if(a.length===0);else if(a.length===1){let i=a[0];if(o.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0")o.enum=[i];else o.const=i}else{if(a.every((i)=>typeof i==="number"))o.type="number";if(a.every((i)=>typeof i==="string"))o.type="string";if(a.every((i)=>typeof i==="boolean"))o.type="boolean";if(a.every((i)=>i===null))o.type="null";o.enum=a}},sf=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},af=(e,t,o,r)=>{let s=o,a=e._zod.pattern;if(!a)throw Error("Pattern not found in template literal");s.type="string",s.pattern=a.source},nf=(e,t,o,r)=>{let s=o,a={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:n,mime:u}=e._zod.bag;if(i!==void 0)a.minLength=i;if(n!==void 0)a.maxLength=n;if(u)if(u.length===1)a.contentMediaType=u[0],Object.assign(s,a);else Object.assign(s,a),s.anyOf=u.map((d)=>({contentMediaType:d}));else Object.assign(s,a)},cf=(e,t,o,r)=>{o.type="boolean"},Zd=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},uf=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},Bd=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},df=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},lf=(e,t,o,r)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},Hd=(e,t,o,r)=>{let s=o,a=e._zod.def,{minimum:i,maximum:n}=e._zod.bag;if(typeof i==="number")s.minItems=i;if(typeof n==="number")s.maxItems=n;s.type="array",s.items=ce(a.element,t,{...r,path:[...r.path,"items"]})},Fd=(e,t,o,r)=>{let s=o,a=e._zod.def;s.type="object",s.properties={};let i=a.shape;for(let d in i)s.properties[d]=ce(i[d],t,{...r,path:[...r.path,"properties",d]});let n=new Set(Object.keys(i)),u=new Set([...n].filter((d)=>{let l=a.shape[d]._zod;if(t.io==="input")return l.optin===void 0;else return l.optout===void 0}));if(u.size>0)s.required=Array.from(u);if(a.catchall?._zod.def.type==="never")s.additionalProperties=!1;else if(!a.catchall){if(t.io==="output")s.additionalProperties=!1}else if(a.catchall)s.additionalProperties=ce(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})},Vd=(e,t,o,r)=>{let s=e._zod.def,a=s.inclusive===!1,i=s.options.map((n,u)=>ce(n,t,{...r,path:[...r.path,a?"oneOf":"anyOf",u]}));if(a)o.oneOf=i;else o.anyOf=i},Jd=(e,t,o,r)=>{let s=e._zod.def,a=ce(s.left,t,{...r,path:[...r.path,"allOf",0]}),i=ce(s.right,t,{...r,path:[...r.path,"allOf",1]}),n=(d)=>("allOf"in d)&&Object.keys(d).length===1,u=[...n(a)?a.allOf:[a],...n(i)?i.allOf:[i]];o.allOf=u},mf=(e,t,o,r)=>{let s=o,a=e._zod.def;s.type="array";let i=t.target==="draft-2020-12"?"prefixItems":"items",n=t.target==="draft-2020-12"?"items":t.target==="openapi-3.0"?"items":"additionalItems",u=a.items.map((h,v)=>ce(h,t,{...r,path:[...r.path,i,v]})),d=a.rest?ce(a.rest,t,{...r,path:[...r.path,n,...t.target==="openapi-3.0"?[a.items.length]:[]]}):null;if(t.target==="draft-2020-12"){if(s.prefixItems=u,d)s.items=d}else if(t.target==="openapi-3.0"){if(s.items={anyOf:u},d)s.items.anyOf.push(d);if(s.minItems=u.length,!d)s.maxItems=u.length}else if(s.items=u,d)s.additionalItems=d;let{minimum:l,maximum:p}=e._zod.bag;if(typeof l==="number")s.minItems=l;if(typeof p==="number")s.maxItems=p},Wd=(e,t,o,r)=>{let s=o,a=e._zod.def;s.type="object";let i=a.keyType,u=i._zod.bag?.patterns;if(a.mode==="loose"&&u&&u.size>0){let l=ce(a.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});s.patternProperties={};for(let p of u)s.patternProperties[p.source]=l}else{if(t.target==="draft-07"||t.target==="draft-2020-12")s.propertyNames=ce(a.keyType,t,{...r,path:[...r.path,"propertyNames"]});s.additionalProperties=ce(a.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let d=i._zod.values;if(d){let l=[...d].filter((p)=>typeof p==="string"||typeof p==="number");if(l.length>0)s.required=l}},Gd=(e,t,o,r)=>{let s=e._zod.def,a=ce(s.innerType,t,r),i=t.seen.get(e);if(t.target==="openapi-3.0")i.ref=s.innerType,o.nullable=!0;else o.anyOf=[a,{type:"null"}]},Kd=(e,t,o,r)=>{let s=e._zod.def;ce(s.innerType,t,r);let a=t.seen.get(e);a.ref=s.innerType},Yd=(e,t,o,r)=>{let s=e._zod.def;ce(s.innerType,t,r);let a=t.seen.get(e);a.ref=s.innerType,o.default=JSON.parse(JSON.stringify(s.defaultValue))},Xd=(e,t,o,r)=>{let s=e._zod.def;ce(s.innerType,t,r);let a=t.seen.get(e);if(a.ref=s.innerType,t.io==="input")o._prefault=JSON.parse(JSON.stringify(s.defaultValue))},Qd=(e,t,o,r)=>{let s=e._zod.def;ce(s.innerType,t,r);let a=t.seen.get(e);a.ref=s.innerType;let i;try{i=s.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}o.default=i},el=(e,t,o,r)=>{let s=e._zod.def,a=s.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?a?s.out:s.in:s.out;ce(i,t,r);let n=t.seen.get(e);n.ref=i},tl=(e,t,o,r)=>{let s=e._zod.def;ce(s.innerType,t,r);let a=t.seen.get(e);a.ref=s.innerType,o.readOnly=!0},pf=(e,t,o,r)=>{let s=e._zod.def;ce(s.innerType,t,r);let a=t.seen.get(e);a.ref=s.innerType},_c=(e,t,o,r)=>{let s=e._zod.def;ce(s.innerType,t,r);let a=t.seen.get(e);a.ref=s.innerType},ol=(e,t,o,r)=>{let s=e._zod.innerType;ce(s,t,r);let a=t.seen.get(e);a.ref=s},Q_={string:Ed,number:$d,boolean:Md,bigint:ef,symbol:tf,null:Id,undefined:Nd,void:of,never:Od,any:Ad,unknown:Ld,date:rf,enum:Ud,literal:Dd,nan:sf,template_literal:af,file:nf,success:cf,custom:Zd,function:uf,transform:Bd,map:df,set:lf,array:Hd,object:Fd,union:Vd,intersection:Jd,tuple:mf,record:Wd,nullable:Gd,nonoptional:Kd,default:Yd,prefault:Xd,catch:Qd,pipe:el,readonly:tl,promise:pf,optional:_c,lazy:ol};function fc(e,t){if("_idmap"in e){let r=e,s=xa({...t,processors:Q_}),a={};for(let u of r._idmap.entries()){let[d,l]=u;ce(l,s)}let i={},n={registry:r,uri:t?.uri,defs:a};s.external=n;for(let u of r._idmap.entries()){let[d,l]=u;Ra(s,l),i[d]=qa(s,l)}if(Object.keys(a).length>0){let u=s.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[u]:a}}return{schemas:i}}let o=xa({...t,processors:Q_});return ce(e,o),Ra(o,e),qa(o,e)}var yy=S("ZodISODateTime",(e,t)=>{qh.init(e,t),_e.init(e,t)});function Dr(e){return N_(yy,e)}var by=S("ZodISODate",(e,t)=>{Ph.init(e,t),_e.init(e,t)});function rl(e){return O_(by,e)}var zy=S("ZodISOTime",(e,t)=>{jh.init(e,t),_e.init(e,t)});function hf(e){return A_(zy,e)}var Sy=S("ZodISODuration",(e,t)=>{Th.init(e,t),_e.init(e,t)});function _f(e){return L_(Sy,e)}var ky=(e,t)=>{sc.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(o)=>ad(e,o)},flatten:{value:(o)=>sd(e,o)},addIssue:{value:(o)=>{e.issues.push(o),e.message=JSON.stringify(e.issues,fa,2)}},addIssues:{value:(o)=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,fa,2)}},isEmpty:{get(){return e.issues.length===0}}})};var rt=S("ZodError",ky,{Parent:Error});var gf=ac(rt),vf=ic(rt),vc=va(rt),wf=wa(rt),yf=dp(rt),bf=lp(rt),zf=mp(rt),Sf=pp(rt),kf=hp(rt),xf=_p(rt),Rf=fp(rt),qf=gp(rt);var Pf=new WeakMap;function Pa(e,t,o){let r=Object.getPrototypeOf(e),s=Pf.get(r);if(!s)s=new Set,Pf.set(r,s);if(s.has(t))return;s.add(t);for(let a in o){let i=o[a];Object.defineProperty(r,a,{configurable:!0,enumerable:!1,get(){let n=i.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(n){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:n})}})}}var ue=S("ZodType",(e,t)=>(ne.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ka(e,"input"),output:ka(e,"output")}}),e.toJSONSchema=X_(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(o,r)=>gf(e,o,r,{callee:e.parse}),e.safeParse=(o,r)=>vc(e,o,r),e.parseAsync=async(o,r)=>vf(e,o,r,{callee:e.parseAsync}),e.safeParseAsync=async(o,r)=>wf(e,o,r),e.spa=e.safeParseAsync,e.encode=(o,r)=>yf(e,o,r),e.decode=(o,r)=>bf(e,o,r),e.encodeAsync=async(o,r)=>zf(e,o,r),e.decodeAsync=async(o,r)=>Sf(e,o,r),e.safeEncode=(o,r)=>kf(e,o,r),e.safeDecode=(o,r)=>xf(e,o,r),e.safeEncodeAsync=async(o,r)=>Rf(e,o,r),e.safeDecodeAsync=async(o,r)=>qf(e,o,r),Pa(e,"ZodType",{check(...o){let r=this.def;return this.clone(uo(r,{checks:[...r.checks??[],...o.map((s)=>typeof s==="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...o){return this.check(...o)},clone(o,r){return pt(this,o,r)},brand(){return this},register(o,r){return o.add(this,r),this},refine(o,r){return this.check(pb(o,r))},superRefine(o,r){return this.check(hb(o,r))},overwrite(o){return this.check(ho(o))},optional(){return B(this)},exactOptional(){return Qy(this)},nullable(){return Ef(this)},nullish(){return B(Ef(this))},nonoptional(o){return ab(this,o)},array(){return y(this)},or(o){return E([this,o])},and(o){return Vt(this,o)},transform(o){return $f(this,Zf(o))},default(o){return ob(this,o)},prefault(o){return sb(this,o)},catch(o){return nb(this,o)},pipe(o){return $f(this,o)},readonly(){return db(this)},describe(o){let r=this.clone();return po.add(r,{description:o}),r},meta(...o){if(o.length===0)return po.get(this);let r=this.clone();return po.add(r,o[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(o){return o(this)}}),Object.defineProperty(e,"description",{get(){return po.get(e)?.description},configurable:!0}),e)),Mf=S("_ZodString",(e,t)=>{uc.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,s,a)=>Ed(e,r,s,a);let o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,Pa(e,"_ZodString",{regex(...r){return this.check(bd(...r))},includes(...r){return this.check(kd(...r))},startsWith(...r){return this.check(xd(...r))},endsWith(...r){return this.check(Rd(...r))},min(...r){return this.check(Lr(...r))},max(...r){return this.check(pc(...r))},length(...r){return this.check(hc(...r))},nonempty(...r){return this.check(Lr(1,...r))},lowercase(r){return this.check(zd(r))},uppercase(r){return this.check(Sd(r))},trim(){return this.check(Pd())},normalize(...r){return this.check(qd(...r))},toLowerCase(){return this.check(jd())},toUpperCase(){return this.check(Td())},slugify(){return this.check(Cd())}})}),If=S("ZodString",(e,t)=>{uc.init(e,t),Mf.init(e,t),e.email=(o)=>e.check(vd(Nf,o)),e.url=(o)=>e.check(yd(Af,o)),e.jwt=(o)=>e.check(I_(Uy,o)),e.emoji=(o)=>e.check(b_(Ry,o)),e.guid=(o)=>e.check(wd(jf,o)),e.uuid=(o)=>e.check(g_(wc,o)),e.uuidv4=(o)=>e.check(v_(wc,o)),e.uuidv6=(o)=>e.check(w_(wc,o)),e.uuidv7=(o)=>e.check(y_(wc,o)),e.nanoid=(o)=>e.check(z_(qy,o)),e.guid=(o)=>e.check(wd(jf,o)),e.cuid=(o)=>e.check(S_(Py,o)),e.cuid2=(o)=>e.check(k_(jy,o)),e.ulid=(o)=>e.check(x_(Ty,o)),e.base64=(o)=>e.check(E_(Oy,o)),e.base64url=(o)=>e.check($_(Ay,o)),e.xid=(o)=>e.check(R_(Cy,o)),e.ksuid=(o)=>e.check(q_(Ey,o)),e.ipv4=(o)=>e.check(P_($y,o)),e.ipv6=(o)=>e.check(j_(My,o)),e.cidrv4=(o)=>e.check(T_(Iy,o)),e.cidrv6=(o)=>e.check(C_(Ny,o)),e.e164=(o)=>e.check(M_(Ly,o)),e.datetime=(o)=>e.check(Dr(o)),e.date=(o)=>e.check(rl(o)),e.time=(o)=>e.check(hf(o)),e.duration=(o)=>e.check(_f(o))});function c(e){return f_(If,e)}var _e=S("ZodStringFormat",(e,t)=>{he.init(e,t),Mf.init(e,t)}),Nf=S("ZodEmail",(e,t)=>{vh.init(e,t),_e.init(e,t)});function Of(e){return vd(Nf,e)}var jf=S("ZodGUID",(e,t)=>{fh.init(e,t),_e.init(e,t)});var wc=S("ZodUUID",(e,t)=>{gh.init(e,t),_e.init(e,t)});var Af=S("ZodURL",(e,t)=>{wh.init(e,t),_e.init(e,t)});function yc(e){return yd(Af,e)}var Ry=S("ZodEmoji",(e,t)=>{yh.init(e,t),_e.init(e,t)});var qy=S("ZodNanoID",(e,t)=>{bh.init(e,t),_e.init(e,t)});var Py=S("ZodCUID",(e,t)=>{zh.init(e,t),_e.init(e,t)});var jy=S("ZodCUID2",(e,t)=>{Sh.init(e,t),_e.init(e,t)});var Ty=S("ZodULID",(e,t)=>{kh.init(e,t),_e.init(e,t)});var Cy=S("ZodXID",(e,t)=>{xh.init(e,t),_e.init(e,t)});var Ey=S("ZodKSUID",(e,t)=>{Rh.init(e,t),_e.init(e,t)});var $y=S("ZodIPv4",(e,t)=>{Ch.init(e,t),_e.init(e,t)});var My=S("ZodIPv6",(e,t)=>{Eh.init(e,t),_e.init(e,t)});var Iy=S("ZodCIDRv4",(e,t)=>{$h.init(e,t),_e.init(e,t)});var Ny=S("ZodCIDRv6",(e,t)=>{Mh.init(e,t),_e.init(e,t)});var Oy=S("ZodBase64",(e,t)=>{Nh.init(e,t),_e.init(e,t)});var Ay=S("ZodBase64URL",(e,t)=>{Oh.init(e,t),_e.init(e,t)});var Ly=S("ZodE164",(e,t)=>{Ah.init(e,t),_e.init(e,t)});var Uy=S("ZodJWT",(e,t)=>{Lh.init(e,t),_e.init(e,t)});var bc=S("ZodNumber",(e,t)=>{pd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,s,a)=>$d(e,r,s,a),Pa(e,"ZodNumber",{gt(r,s){return this.check(lc(r,s))},gte(r,s){return this.check(Sa(r,s))},min(r,s){return this.check(Sa(r,s))},lt(r,s){return this.check(dc(r,s))},lte(r,s){return this.check(za(r,s))},max(r,s){return this.check(za(r,s))},int(r){return this.check(Tf(r))},safe(r){return this.check(Tf(r))},positive(r){return this.check(lc(0,r))},nonnegative(r){return this.check(Sa(0,r))},negative(r){return this.check(dc(0,r))},nonpositive(r){return this.check(za(0,r))},multipleOf(r,s){return this.check(mc(r,s))},step(r,s){return this.check(mc(r,s))},finite(){return this}});let o=e._zod.bag;e.minValue=Math.max(o.minimum??Number.NEGATIVE_INFINITY,o.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(o.maximum??Number.POSITIVE_INFINITY,o.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(o.format??"").includes("int")||Number.isSafeInteger(o.multipleOf??0.5),e.isFinite=!0,e.format=o.format??null});function q(e){return U_(bc,e)}var Dy=S("ZodNumberFormat",(e,t)=>{Uh.init(e,t),bc.init(e,t)});function Tf(e){return Z_(Dy,e)}var Lf=S("ZodBoolean",(e,t)=>{Dh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Md(e,o,r,s)});function C(e){return B_(Lf,e)}var Zy=S("ZodUndefined",(e,t)=>{Zh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Nd(e,o,r,s)});function al(e){return H_(Zy,e)}var By=S("ZodNull",(e,t)=>{Bh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Id(e,o,r,s)});function Go(e){return F_(By,e)}var Hy=S("ZodAny",(e,t)=>{Hh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Ad(e,o,r,s)});function zc(){return V_(Hy)}var Fy=S("ZodUnknown",(e,t)=>{Fh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Ld(e,o,r,s)});function D(){return J_(Fy)}var Vy=S("ZodNever",(e,t)=>{Vh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Od(e,o,r,s)});function il(e){return W_(Vy,e)}var Jy=S("ZodArray",(e,t)=>{Jh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Hd(e,o,r,s),e.element=t.element,Pa(e,"ZodArray",{min(o,r){return this.check(Lr(o,r))},nonempty(o){return this.check(Lr(1,o))},max(o,r){return this.check(pc(o,r))},length(o,r){return this.check(hc(o,r))},unwrap(){return this.element}})});function y(e,t){return G_(Jy,e,t)}var Uf=S("ZodObject",(e,t)=>{Kh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Fd(e,o,r,s),re(e,"shape",()=>t.shape),Pa(e,"ZodObject",{keyof(){return Y(Object.keys(this._zod.def.shape))},catchall(o){return this.clone({...this._zod.def,catchall:o})},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:il()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(o){return Xw(this,o)},safeExtend(o){return Qw(this,o)},merge(o){return ey(this,o)},pick(o){return Kw(this,o)},omit(o){return Yw(this,o)},partial(...o){return ty(Bf,this,o[0])},required(...o){return oy(Hf,this,o[0])}})});function m(e,t){let o={type:"object",shape:e??{},...Z(t)};return new Uf(o)}function H(e,t){return new Uf({type:"object",shape:e,catchall:D(),...Z(t)})}var Df=S("ZodUnion",(e,t)=>{hd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Vd(e,o,r,s),e.options=t.options});function E(e,t){return new Df({type:"union",options:e,...Z(t)})}var Wy=S("ZodDiscriminatedUnion",(e,t)=>{Df.init(e,t),Yh.init(e,t)});function Zr(e,t,o){return new Wy({type:"union",options:t,discriminator:e,...Z(o)})}var Gy=S("ZodIntersection",(e,t)=>{Xh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Jd(e,o,r,s)});function Vt(e,t){return new Gy({type:"intersection",left:e,right:t})}var Cf=S("ZodRecord",(e,t)=>{Qh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Wd(e,o,r,s),e.keyType=t.keyType,e.valueType=t.valueType});function T(e,t,o){if(!t||!t._zod)return new Cf({type:"record",keyType:c(),valueType:e,...Z(t)});return new Cf({type:"record",keyType:e,valueType:t,...Z(o)})}var sl=S("ZodEnum",(e,t)=>{e_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,s,a)=>Ud(e,r,s,a),e.enum=t.entries,e.options=Object.values(t.entries);let o=new Set(Object.keys(t.entries));e.extract=(r,s)=>{let a={};for(let i of r)if(o.has(i))a[i]=t.entries[i];else throw Error(`Key ${i} not found in enum`);return new sl({...t,checks:[],...Z(s),entries:a})},e.exclude=(r,s)=>{let a={...t.entries};for(let i of r)if(o.has(i))delete a[i];else throw Error(`Key ${i} not found in enum`);return new sl({...t,checks:[],...Z(s),entries:a})}});function Y(e,t){let o=Array.isArray(e)?Object.fromEntries(e.map((r)=>[r,r])):e;return new sl({type:"enum",entries:o,...Z(t)})}var Ky=S("ZodLiteral",(e,t)=>{t_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Dd(e,o,r,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 f(e,t){return new Ky({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}var Yy=S("ZodTransform",(e,t)=>{o_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Bd(e,o,r,s),e._zod.parse=(o,r)=>{if(r.direction==="backward")throw new _a(e.constructor.name);o.addIssue=(a)=>{if(typeof a==="string")o.issues.push(Wo(a,o.value,t));else{let i=a;if(i.fatal)i.continue=!1;i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=e),o.issues.push(Wo(i))}};let s=t.transform(o.value,o);if(s instanceof Promise)return s.then((a)=>(o.value=a,o.fallback=!0,o));return o.value=s,o.fallback=!0,o}});function Zf(e){return new Yy({type:"transform",transform:e})}var Bf=S("ZodOptional",(e,t)=>{_d.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>_c(e,o,r,s),e.unwrap=()=>e._zod.def.innerType});function B(e){return new Bf({type:"optional",innerType:e})}var Xy=S("ZodExactOptional",(e,t)=>{r_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>_c(e,o,r,s),e.unwrap=()=>e._zod.def.innerType});function Qy(e){return new Xy({type:"optional",innerType:e})}var eb=S("ZodNullable",(e,t)=>{s_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Gd(e,o,r,s),e.unwrap=()=>e._zod.def.innerType});function Ef(e){return new eb({type:"nullable",innerType:e})}var tb=S("ZodDefault",(e,t)=>{a_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Yd(e,o,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ob(e,t){return new tb({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():td(t)}})}var rb=S("ZodPrefault",(e,t)=>{i_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Xd(e,o,r,s),e.unwrap=()=>e._zod.def.innerType});function sb(e,t){return new rb({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():td(t)}})}var Hf=S("ZodNonOptional",(e,t)=>{n_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Kd(e,o,r,s),e.unwrap=()=>e._zod.def.innerType});function ab(e,t){return new Hf({type:"nonoptional",innerType:e,...Z(t)})}var ib=S("ZodCatch",(e,t)=>{c_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Qd(e,o,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nb(e,t){return new ib({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}var Ff=S("ZodPipe",(e,t)=>{fd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>el(e,o,r,s),e.in=t.in,e.out=t.out});function $f(e,t){return new Ff({type:"pipe",in:e,out:t})}var cb=S("ZodPreprocess",(e,t)=>{Ff.init(e,t),u_.init(e,t)}),ub=S("ZodReadonly",(e,t)=>{d_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>tl(e,o,r,s),e.unwrap=()=>e._zod.def.innerType});function db(e){return new ub({type:"readonly",innerType:e})}var lb=S("ZodLazy",(e,t)=>{l_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>ol(e,o,r,s),e.unwrap=()=>e._zod.def.getter()});function ja(e){return new lb({type:"lazy",getter:e})}var mb=S("ZodCustom",(e,t)=>{m_.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,r,s)=>Zd(e,o,r,s)});function pb(e,t={}){return K_(mb,e,t)}function hb(e,t){return Y_(e,t)}function Ko(e,t){return new cb({type:"pipe",in:Zf(e),out:t})}var Jf={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 Vf;(function(e){})(Vf||(Vf={}));function _b(e){return D_(bc,e)}Je(gd());var Yo="2025-11-25";var Sc=[Yo,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],kc="io.modelcontextprotocol/related-task",Wt="io.modelcontextprotocol/protocolVersion",Br="io.modelcontextprotocol/clientInfo",$t="io.modelcontextprotocol/serverInfo",Xo="io.modelcontextprotocol/clientCapabilities",Hr="io.modelcontextprotocol/subscriptionId",Fr="io.modelcontextprotocol/logLevel";var Qo="2.0";var Jt=ja(()=>E([c(),q(),C(),Go(),T(c(),Jt),y(Jt)])),fe=T(c(),Jt),xc=y(Jt),Vr=E([c(),q().int()]),Jr=c(),Ta=m({ttl:q().optional()}),Ca=m({taskId:c()}),Wr=H({progressToken:Vr.optional(),[kc]:Ca.optional()}),xe=m({_meta:Wr.optional()}),fo=xe.extend({task:Ta.optional()}),ge=m({method:c(),params:xe.loose().optional()}),$e=m({_meta:Wr.optional()}),Pe=m({method:c(),params:$e.loose().optional()}),Gr=H({get[$t](){return Mt.optional().catch(void 0)}}),ve=H({_meta:Gr.optional()}),_t=E([c(),q().int()]),Kr=m({jsonrpc:f(Qo),id:_t,...ge.shape}).strict(),Yr=m({jsonrpc:f(Qo),...Pe.shape}).strict(),er=m({jsonrpc:f(Qo),id:_t,result:ve}).strict(),tr=m({jsonrpc:f(Qo),id:_t.optional(),error:m({code:q().int(),message:c(),data:D().optional()})}).strict(),ft=E([Kr,Yr,er,tr]),Rc=E([er,tr]),go=ve.strict(),Ea=$e.extend({requestId:_t.optional(),reason:c().optional()}),Xr=Pe.extend({method:f("notifications/cancelled"),params:Ea}),$a=m({src:c(),mimeType:c().optional(),sizes:y(c()).optional(),theme:Y(["light","dark"]).optional()}),Gt=m({icons:y($a).optional()}),Et=m({name:c(),title:c().optional()}),Mt=Et.extend({...Et.shape,...Gt.shape,version:c(),websiteUrl:c().optional(),description:c().optional()}),fb=Vt(m({applyDefaults:C().optional()}),fe),gb=Ko((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)&&Object.keys(e).length===0)return{form:{}};return e},Vt(m({form:fb.optional(),url:fe.optional()}),fe.optional())),qc=H({list:fe.optional(),cancel:fe.optional(),requests:H({sampling:H({createMessage:fe.optional()}).optional(),elicitation:H({create:fe.optional()}).optional()}).optional()}),Pc=H({list:fe.optional(),cancel:fe.optional(),requests:H({tools:H({call:fe.optional()}).optional()}).optional()}),Ma=m({experimental:T(c(),fe).optional(),sampling:m({context:fe.optional(),tools:fe.optional()}).optional(),elicitation:gb.optional(),roots:m({listChanged:C().optional()}).optional(),tasks:qc.optional(),extensions:T(c(),fe).optional()}),Ia=xe.extend({protocolVersion:c(),capabilities:Ma,clientInfo:Mt}),Qr=ge.extend({method:f("initialize"),params:Ia}),es=m({experimental:T(c(),fe).optional(),logging:fe.optional(),completions:fe.optional(),prompts:m({listChanged:C().optional()}).optional(),resources:m({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:m({listChanged:C().optional()}).optional(),tasks:Pc.optional(),extensions:T(c(),fe).optional()}),Na=ve.extend({protocolVersion:c(),capabilities:es,serverInfo:Mt,instructions:c().optional()}),ts=Pe.extend({method:f("notifications/initialized"),params:$e.optional()}),Oa=ge.extend({method:f("server/discover"),params:xe.optional()}),vo=ve.extend({supportedVersions:y(c()),capabilities:es,instructions:c().optional()}),os=ge.extend({method:f("ping"),params:xe.optional()}),Aa=m({progress:q(),total:B(q()),message:B(c())}),La=m({...$e.shape,...Aa.shape,progressToken:Vr}),rs=Pe.extend({method:f("notifications/progress"),params:La}),Ua=xe.extend({cursor:Jr.optional()}),Kt=ge.extend({params:Ua.optional()}),Yt=ve.extend({nextCursor:Jr.optional()}),ss=m({uri:c(),mimeType:B(c()),_meta:T(c(),D()).optional()}),as=ss.extend({text:c()}),nl=c().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),is=ss.extend({blob:nl}),Xt=Y(["user","assistant"]),It=m({audience:y(Xt).optional(),priority:q().min(0).max(1).optional(),lastModified:Dr({offset:!0}).optional()}),ns=m({...Et.shape,...Gt.shape,uri:c(),description:B(c()),mimeType:B(c()),size:B(q()),annotations:It.optional(),_meta:B(H({}))}),Da=m({...Et.shape,...Gt.shape,uriTemplate:c(),description:B(c()),mimeType:B(c()),annotations:It.optional(),_meta:B(H({}))}),Za=Kt.extend({method:f("resources/list")}),Ba=Yt.extend({resources:y(ns)}),Ha=Kt.extend({method:f("resources/templates/list")}),Fa=Yt.extend({resourceTemplates:y(Da)}),or=xe.extend({uri:c()}),Va=or,Ja=ge.extend({method:f("resources/read"),params:Va}),Wa=ve.extend({contents:y(E([as,is]))}),Ga=Pe.extend({method:f("notifications/resources/list_changed"),params:$e.optional()}),Ka=or,Ya=ge.extend({method:f("resources/subscribe"),params:Ka}),Xa=or,Qa=ge.extend({method:f("resources/unsubscribe"),params:Xa}),cs=m({toolsListChanged:C().optional(),promptsListChanged:C().optional(),resourcesListChanged:C().optional(),resourceSubscriptions:y(c()).optional()}),ei=xe.extend({notifications:cs}),ti=ge.extend({method:f("subscriptions/listen"),params:ei}),oi=$e.extend({notifications:cs}),ri=Pe.extend({method:f("notifications/subscriptions/acknowledged"),params:oi}),si=Gr.extend({[Hr]:_t}),ai=ve.extend({_meta:si}),ii=$e.extend({uri:c()}),ni=Pe.extend({method:f("notifications/resources/updated"),params:ii}),ci=m({name:c(),description:B(c()),required:B(C())}),ui=m({...Et.shape,...Gt.shape,description:B(c()),arguments:B(y(ci)),_meta:B(H({}))}),di=Kt.extend({method:f("prompts/list")}),li=Yt.extend({prompts:y(ui)}),mi=xe.extend({name:c(),arguments:T(c(),c()).optional()}),pi=ge.extend({method:f("prompts/get"),params:mi}),rr=m({type:f("text"),text:c(),annotations:It.optional(),_meta:T(c(),D()).optional()}),sr=m({type:f("image"),data:nl,mimeType:c(),annotations:It.optional(),_meta:T(c(),D()).optional()}),ar=m({type:f("audio"),data:nl,mimeType:c(),annotations:It.optional(),_meta:T(c(),D()).optional()}),hi=m({type:f("tool_use"),name:c(),id:c(),input:T(c(),D()),_meta:T(c(),D()).optional()}),ir=m({type:f("resource"),resource:E([as,is]),annotations:It.optional(),_meta:T(c(),D()).optional()}),nr=ns.extend({type:f("resource_link")}),Nt=E([rr,sr,ar,nr,ir]),_i=m({role:Xt,content:Nt}),fi=ve.extend({description:c().optional(),messages:y(_i)}),gi=Pe.extend({method:f("notifications/prompts/list_changed"),params:$e.optional()}),vi=m({title:c().optional(),readOnlyHint:C().optional(),destructiveHint:C().optional(),idempotentHint:C().optional(),openWorldHint:C().optional()}),wi=m({taskSupport:Y(["required","optional","forbidden"]).optional()}),wo=m({...Et.shape,...Gt.shape,description:c().optional(),inputSchema:m({type:f("object"),properties:T(c(),Jt).optional(),required:y(c()).optional()}).catchall(D()),outputSchema:H({$schema:c().optional()}).optional(),annotations:vi.optional(),execution:wi.optional(),_meta:T(c(),D()).optional()}),yi=Kt.extend({method:f("tools/list")}),bi=Yt.extend({tools:y(wo)}),yo=ve.extend({content:y(Nt).default([]),structuredContent:D().optional(),isError:C().optional()}),jc=yo.or(ve.extend({toolResult:D()})),zi=fo.extend({name:c(),arguments:T(c(),D()).optional()}),Si=ge.extend({method:f("tools/call"),params:zi}),ki=Pe.extend({method:f("notifications/tools/list_changed"),params:$e.optional()}),xi=m({autoRefresh:C().default(!0),debounceMs:q().int().nonnegative().default(300)}),us=Y(["debug","info","notice","warning","error","critical","alert","emergency"]),Ri=xe.extend({level:us}),qi=ge.extend({method:f("logging/setLevel"),params:Ri}),Pi=$e.extend({level:us,logger:c().optional(),data:D()}),cr=Pe.extend({method:f("notifications/message"),params:Pi}),ji=m({name:c().optional()}),Ti=m({hints:y(ji).optional(),costPriority:q().min(0).max(1).optional(),speedPriority:q().min(0).max(1).optional(),intelligencePriority:q().min(0).max(1).optional()}),Ci=m({mode:Y(["auto","required","none"]).optional()}),Ei=m({type:f("tool_result"),toolUseId:c().describe("The unique identifier for the corresponding tool call."),content:y(Nt),structuredContent:D().optional(),isError:C().optional(),_meta:T(c(),D()).optional()}),$i=Zr("type",[rr,sr,ar]),_o=Zr("type",[rr,sr,ar,hi,Ei]),Mi=m({role:Xt,content:E([_o,y(_o)]),_meta:T(c(),D()).optional()}),Ii=fo.extend({messages:y(Mi),modelPreferences:Ti.optional(),systemPrompt:c().optional(),includeContext:Y(["none","thisServer","allServers"]).optional(),temperature:q().optional(),maxTokens:q().int(),stopSequences:y(c()).optional(),metadata:fe.optional(),tools:y(wo).optional(),toolChoice:Ci.optional()}),Ni=ge.extend({method:f("sampling/createMessage"),params:Ii}),Oi=ve.extend({model:c(),stopReason:B(Y(["endTurn","stopSequence","maxTokens"]).or(c())),role:Xt,content:$i}),Ai=ve.extend({model:c(),stopReason:B(Y(["endTurn","stopSequence","maxTokens","toolUse"]).or(c())),role:Xt,content:E([_o,y(_o)])}),ds=m({type:f("boolean"),title:c().optional(),description:c().optional(),default:C().optional()}),ur=m({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()}),dr=m({type:Y(["number","integer"]),title:c().optional(),description:c().optional(),minimum:q().optional(),maximum:q().optional(),default:q().optional()}),ls=m({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),default:c().optional()}),ms=m({type:f("string"),title:c().optional(),description:c().optional(),oneOf:y(m({const:c(),title:c()})),default:c().optional()}),ps=m({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),enumNames:y(c()).optional(),default:c().optional()}),Li=E([ls,ms]),hs=m({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:m({type:f("string"),enum:y(c())}),default:y(c()).optional()}),_s=m({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:m({anyOf:y(m({const:c(),title:c()}))}),default:y(c()).optional()}),Ui=E([hs,_s]),Di=E([ps,Li,Ui]),fs=E([Di,ds,ur,dr]),lr=fo.extend({mode:f("form").optional(),message:c(),requestedSchema:m({type:f("object"),properties:T(c(),fs),required:y(c()).optional()}).catchall(D())}),Zi=fo.extend({mode:f("url"),message:c(),elicitationId:c(),url:c().url()}),Bi=E([lr,Zi]),Hi=ge.extend({method:f("elicitation/create"),params:Bi}),Fi=$e.extend({elicitationId:c()}),Vi=Pe.extend({method:f("notifications/elicitation/complete"),params:Fi}),Ji=ve.extend({action:Y(["accept","decline","cancel"]),content:Ko((e)=>e===null?void 0:e,T(c(),E([c(),q(),C(),y(c())])).optional())}),Wi=m({type:f("ref/resource"),uri:c()}),Gi=m({type:f("ref/prompt"),name:c()}),Ki=xe.extend({ref:E([Gi,Wi]),argument:m({name:c(),value:c()}),context:m({arguments:T(c(),c()).optional()}).optional()}),Yi=ge.extend({method:f("completion/complete"),params:Ki}),Xi=ve.extend({completion:H({values:y(c()).max(100),total:B(q().int()),hasMore:B(C())})}),Qi=m({uri:c().startsWith("file://"),name:c().optional(),_meta:T(c(),D()).optional()}),en=ge.extend({method:f("roots/list"),params:xe.optional()}),tn=ve.extend({roots:y(Qi)}),on=Pe.extend({method:f("notifications/roots/list_changed"),params:$e.optional()}),Tc=H({ttl:q().optional(),pollInterval:q().optional()}),rn=Y(["working","input_required","completed","failed","cancelled"]),Qt=m({taskId:c(),status:rn,ttl:E([q(),Go()]),createdAt:c(),lastUpdatedAt:c(),pollInterval:B(q()),statusMessage:B(c())}),Cc=ve.extend({task:Qt}),sn=$e.merge(Qt),Ec=Pe.extend({method:f("notifications/tasks/status"),params:sn}),$c=ge.extend({method:f("tasks/get"),params:xe.extend({taskId:c()})}),Mc=ve.merge(Qt),Ic=ge.extend({method:f("tasks/result"),params:xe.extend({taskId:c()})}),Nc=ve.loose(),Oc=Kt.extend({method:f("tasks/list")}),Ac=Yt.extend({tasks:y(Qt)}),Lc=ge.extend({method:f("tasks/cancel"),params:xe.extend({taskId:c()})}),Uc=ve.merge(Qt),Dc=E([os,Qr,Oa,Yi,qi,pi,di,Za,Ha,Ja,Ya,Qa,ti,Si,yi]),Zc=E([Xr,rs,ts,on]),Bc=E([go,Oi,Ai,Ji,tn]),Hc=E([os,Ni,Hi,en]),Fc=E([Xr,rs,cr,ni,Ga,ki,gi,ri,Vi]),Vc=E([go,Na,vo,Xi,fi,li,Ba,Fa,Wa,yo,bi,ai]);var Re=yc().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Jf.custom,message:"URL must be parseable",fatal:!0}),Ku}).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"}),gs=H({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()}),mr=H({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()}),an=H({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)}),vs=m({...an.shape,...mr.pick({code_challenge_methods_supported:!0}).shape}),pr=m({access_token:c(),id_token:c().optional(),token_type:c(),expires_in:_b().optional(),scope:c().optional(),refresh_token:c().optional(),issuer:c().optional().catch(void 0)}).strip(),nn=m({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(),hr=m({error:c(),error_description:c().optional(),error_uri:c().optional()}),cl=Re.optional().or(f("").transform(()=>{return})),cn=m({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:cl,scope:c().optional(),contacts:y(c()).optional(),tos_uri:cl,policy_uri:c().optional(),jwks_uri:Re.optional(),jwks:zc().optional(),software_id:c().optional(),software_version:c().optional(),software_statement:c().optional()}).strip(),un=m({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(),ws=cn.merge(un),Jc=m({error:c(),error_description:c().optional()}).strip(),Wc=m({token:c(),token_type_hint:c().optional()}).strip();var pl=Symbol.for("mcp.sdk.errorBrands");function zo(e,t){let o=new Set,r=t;while(typeof r==="function"){let s=r.mcpBrand;if(Object.prototype.hasOwnProperty.call(r,"mcpBrand")&&typeof s==="string")o.add(s);r=Object.getPrototypeOf(r)}if(o.size===0)return;Object.defineProperty(e,pl,{value:o,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,pl)){let o=t[pl];if(o&&typeof o.has==="function"&&o.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}({}),So=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,o,r){super(o);this.code=t,this.errorUri=r,this.name="OAuthError",zo(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,o,r){super(t,r);this.code=e,this.data=o,this.name="SdkError",zo(this,new.target)}},gt=class extends L{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,o,r){super(e,t,o,r);this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function vl(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 wl({requestedResource:e,configuredResource:t}){let o=typeof e==="string"?new URL(e):new URL(e.href),r=typeof t==="string"?new URL(t):new URL(t.href);if(o.origin!==r.origin)return!1;if(o.pathname.length<r.pathname.length)return!1;let s=o.pathname.endsWith("/")?o.pathname:o.pathname+"/",a=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return s.startsWith(a)}var yg="2026-07-28",yl=[yg];function At(e){return e>=yg}function bl(e){return e.filter((t)=>!At(t))}function _n(e){return e.filter((t)=>At(t))}function bg(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((o)=>o.type==="text")??!1)return e;return{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var zg=["task","inputRequests","requestState"];function vb(e){if(e===null||typeof e!=="object"||Array.isArray(e)||e.content!==void 0||zg.some((t)=>(t in e)))return e;return{...e,content:[]}}function wb(){let e=ja(()=>E([c(),q(),C(),Go(),T(c(),e),y(e)])),t=T(c(),e),o=E([c(),q().int()]),r=c(),s=m({ttl:q().optional()}),a=m({taskId:c()}),i=H({progressToken:o.optional(),"io.modelcontextprotocol/related-task":a.optional()}),n=m({_meta:i.optional()}),u=n.extend({task:s.optional()}),d=m({method:c(),params:n.loose().optional()}),l=m({_meta:i.optional()}),p=m({method:c(),params:l.loose().optional()}),h=H({_meta:i.optional()}),v=E([c(),q().int()]),b=h.strict(),g=l.extend({requestId:v.optional(),reason:c().optional()}),w=p.extend({method:f("notifications/cancelled"),params:g}),R=m({src:c(),mimeType:c().optional(),sizes:y(c()).optional(),theme:Y(["light","dark"]).optional()}),P=m({icons:y(R).optional()}),x=m({name:c(),title:c().optional()}),j=x.extend({...x.shape,...P.shape,version:c(),websiteUrl:c().optional(),description:c().optional()}),k=Vt(m({applyDefaults:C().optional()}),t),z=Ko((Ee)=>{if(Ee&&typeof Ee==="object"&&!Array.isArray(Ee)&&Object.keys(Ee).length===0)return{form:{}};return Ee},Vt(m({form:k.optional(),url:t.optional()}),t.optional())),M=H({list:t.optional(),cancel:t.optional(),requests:H({sampling:H({createMessage:t.optional()}).optional(),elicitation:H({create:t.optional()}).optional()}).optional()}),X=H({list:t.optional(),cancel:t.optional(),requests:H({tools:H({call:t.optional()}).optional()}).optional()}),K=m({experimental:T(c(),t).optional(),sampling:m({context:t.optional(),tools:t.optional()}).optional(),elicitation:z.optional(),roots:m({listChanged:C().optional()}).optional(),tasks:M.optional(),extensions:T(c(),t).optional()}),se=n.extend({protocolVersion:c(),capabilities:K,clientInfo:j}),pe=d.extend({method:f("initialize"),params:se}),oe=m({experimental:T(c(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:m({listChanged:C().optional()}).optional(),resources:m({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:m({listChanged:C().optional()}).optional(),tasks:X.optional(),extensions:T(c(),t).optional()}),V=h.extend({protocolVersion:c(),capabilities:oe,serverInfo:j,instructions:c().optional()}),te=p.extend({method:f("notifications/initialized"),params:l.optional()}),le=d.extend({method:f("ping"),params:n.optional()}),St=m({progress:q(),total:B(q()),message:B(c())}),Be=m({...l.shape,...St.shape,progressToken:o}),it=p.extend({method:f("notifications/progress"),params:Be}),kt=n.extend({cursor:r.optional()}),Xe=d.extend({params:kt.optional()}),Ne=h.extend({nextCursor:r.optional()}),Bt=m({uri:c(),mimeType:B(c()),_meta:T(c(),D()).optional()}),Ht=Bt.extend({text:c()}),xt=c().refine((Ee)=>{try{return atob(Ee),!0}catch{return!1}},{message:"Invalid Base64 string"}),Te=Bt.extend({blob:xt}),Oe=Y(["user","assistant"]),Ae=m({audience:y(Oe).optional(),priority:q().min(0).max(1).optional(),lastModified:Dr({offset:!0}).optional()}),lt=m({...x.shape,...P.shape,uri:c(),description:B(c()),mimeType:B(c()),size:B(q()),annotations:Ae.optional(),_meta:B(H({}))}),Mo=m({...x.shape,...P.shape,uriTemplate:c(),description:B(c()),mimeType:B(c()),annotations:Ae.optional(),_meta:B(H({}))}),Qe=Xe.extend({method:f("resources/list")}),et=Ne.extend({resources:y(lt)}),He=Xe.extend({method:f("resources/templates/list")}),nt=Ne.extend({resourceTemplates:y(Mo)}),ct=n.extend({uri:c()}),Rt=ct,qt=d.extend({method:f("resources/read"),params:Rt}),ao=h.extend({contents:y(E([Ht,Te]))}),Pt=p.extend({method:f("notifications/resources/list_changed"),params:l.optional()}),Io=ct,N=d.extend({method:f("resources/subscribe"),params:Io}),jt=ct,F=d.extend({method:f("resources/unsubscribe"),params:jt}),U=l.extend({uri:c()}),Q=p.extend({method:f("notifications/resources/updated"),params:U}),O=m({name:c(),description:B(c()),required:B(C())}),I=m({...x.shape,...P.shape,description:B(c()),arguments:B(y(O)),_meta:B(H({}))}),G=Xe.extend({method:f("prompts/list")}),J=Ne.extend({prompts:y(I)}),ze=n.extend({name:c(),arguments:T(c(),c()).optional()}),No=d.extend({method:f("prompts/get"),params:ze}),Tt=m({type:f("text"),text:c(),annotations:Ae.optional(),_meta:T(c(),D()).optional()}),Oo=m({type:f("image"),data:xt,mimeType:c(),annotations:Ae.optional(),_meta:T(c(),D()).optional()}),Ao=m({type:f("audio"),data:xt,mimeType:c(),annotations:Ae.optional(),_meta:T(c(),D()).optional()}),Ds=m({type:f("tool_use"),name:c(),id:c(),input:T(c(),D()),_meta:T(c(),D()).optional()}),io=m({type:f("resource"),resource:E([Ht,Te]),annotations:Ae.optional(),_meta:T(c(),D()).optional()}),Zs=lt.extend({type:f("resource_link")}),ut=E([Tt,Oo,Ao,Zs,io]),Rr=m({role:Oe,content:ut}),qr=h.extend({description:c().optional(),messages:y(Rr)}),Lo=p.extend({method:f("notifications/prompts/list_changed"),params:l.optional()}),Bs=m({title:c().optional(),readOnlyHint:C().optional(),destructiveHint:C().optional(),idempotentHint:C().optional(),openWorldHint:C().optional()}),Pr=m({taskSupport:Y(["required","optional","forbidden"]).optional()}),Uo=m({...x.shape,...P.shape,description:c().optional(),inputSchema:m({type:f("object"),properties:T(c(),e).optional(),required:y(c()).optional()}).catchall(D()),outputSchema:m({type:f("object"),properties:T(c(),e).optional(),required:y(c()).optional()}).catchall(D()).optional(),annotations:Bs.optional(),execution:Pr.optional(),_meta:T(c(),D()).optional()}),jr=Xe.extend({method:f("tools/list")}),Tr=Ne.extend({tools:y(Uo)}),Cr=h.extend({content:y(ut),structuredContent:T(c(),D()).optional(),isError:C().optional()}),Ce=u.extend({name:c(),arguments:T(c(),D()).optional()}),Hs=d.extend({method:f("tools/call"),params:Ce}),In=p.extend({method:f("notifications/tools/list_changed"),params:l.optional()}),Er=Y(["debug","info","notice","warning","error","critical","alert","emergency"]),Fs=n.extend({level:Er}),Vs=d.extend({method:f("logging/setLevel"),params:Fs}),Js=l.extend({level:Er,logger:c().optional(),data:D()}),Ws=p.extend({method:f("notifications/message"),params:Js}),Gs=m({name:c().optional()}),Ks=m({hints:y(Gs).optional(),costPriority:q().min(0).max(1).optional(),speedPriority:q().min(0).max(1).optional(),intelligencePriority:q().min(0).max(1).optional()}),Ys=m({mode:Y(["auto","required","none"]).optional()}),Nn=m({type:f("tool_result"),toolUseId:c().describe("The unique identifier for the corresponding tool call."),content:y(ut),structuredContent:m({}).loose().optional(),isError:C().optional(),_meta:T(c(),D()).optional()}),Xs=Zr("type",[Tt,Oo,Ao]),no=Zr("type",[Tt,Oo,Ao,Ds,Nn]),Qs=m({role:Oe,content:E([no,y(no)]),_meta:T(c(),D()).optional()}),ea=u.extend({messages:y(Qs),modelPreferences:Ks.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(Uo).optional(),toolChoice:Ys.optional()}),ta=d.extend({method:f("sampling/createMessage"),params:ea}),oa=h.extend({model:c(),stopReason:B(Y(["endTurn","stopSequence","maxTokens"]).or(c())),role:Oe,content:Xs}),ra=h.extend({model:c(),stopReason:B(Y(["endTurn","stopSequence","maxTokens","toolUse"]).or(c())),role:Oe,content:E([no,y(no)])}),sa=m({type:f("boolean"),title:c().optional(),description:c().optional(),default:C().optional()}),aa=m({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()}),ia=m({type:Y(["number","integer"]),title:c().optional(),description:c().optional(),minimum:q().optional(),maximum:q().optional(),default:q().optional()}),na=m({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),default:c().optional()}),ca=m({type:f("string"),title:c().optional(),description:c().optional(),oneOf:y(m({const:c(),title:c()})),default:c().optional()}),ua=m({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),enumNames:y(c()).optional(),default:c().optional()}),da=E([na,ca]),Do=m({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:m({type:f("string"),enum:y(c())}),default:y(c()).optional()}),Zo=m({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:m({anyOf:y(m({const:c(),title:c()}))}),default:y(c()).optional()}),On=E([Do,Zo]),An=E([ua,da,On]),tt=E([An,sa,aa,ia]),ot=u.extend({mode:f("form").optional(),message:c(),requestedSchema:m({type:f("object"),properties:T(c(),tt),required:y(c()).optional()}).catchall(D())}),la=u.extend({mode:f("url"),message:c(),elicitationId:c(),url:c().url()}),mt=E([ot,la]),Ln=d.extend({method:f("elicitation/create"),params:mt}),Un=l.extend({elicitationId:c()}),Dn=p.extend({method:f("notifications/elicitation/complete"),params:Un}),Zn=h.extend({action:Y(["accept","decline","cancel"]),content:Ko((Ee)=>Ee===null?void 0:Ee,T(c(),E([c(),q(),C(),y(c())])).optional())}),Bn=m({type:f("ref/resource"),uri:c()}),Hn=m({type:f("ref/prompt"),name:c()}),Fn=n.extend({ref:E([Hn,Bn]),argument:m({name:c(),value:c()}),context:m({arguments:T(c(),c()).optional()}).optional()}),ma=d.extend({method:f("completion/complete"),params:Fn}),Vn=h.extend({completion:H({values:y(c()).max(100),total:B(q().int()),hasMore:B(C())})}),Jn=m({uri:c().startsWith("file://"),name:c().optional(),_meta:T(c(),D()).optional()}),$r=d.extend({method:f("roots/list"),params:n.optional()}),pa=h.extend({roots:y(Jn)}),Wn=p.extend({method:f("notifications/roots/list_changed"),params:l.optional()}),Gn=H({ttl:q().optional(),pollInterval:q().optional()}),ha=Y(["working","input_required","completed","failed","cancelled"]),co=m({taskId:c(),status:ha,ttl:E([q(),Go()]),createdAt:c(),lastUpdatedAt:c(),pollInterval:B(q()),statusMessage:B(c())}),Fe=h.extend({task:co}),Kn=l.merge(co),Bo=p.extend({method:f("notifications/tasks/status"),params:Kn}),Mr=d.extend({method:f("tasks/get"),params:n.extend({taskId:c()})}),Ir=h.merge(co),Nr=d.extend({method:f("tasks/result"),params:n.extend({taskId:c()})}),Ju=h.loose(),Le=Xe.extend({method:f("tasks/list")}),ye=Ne.extend({tasks:y(co)}),Ho=d.extend({method:f("tasks/cancel"),params:n.extend({taskId:c()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:o,CursorSchema:r,TaskMetadataSchema:s,RelatedTaskMetadataSchema:a,RequestMetaSchema:i,BaseRequestParamsSchema:n,TaskAugmentedRequestParamsSchema:u,RequestSchema:d,NotificationsParamsSchema:l,NotificationSchema:p,ResultSchema:h,RequestIdSchema:v,EmptyResultSchema:b,CancelledNotificationParamsSchema:g,CancelledNotificationSchema:w,IconSchema:R,IconsSchema:P,BaseMetadataSchema:x,ImplementationSchema:j,ClientTasksCapabilitySchema:M,ServerTasksCapabilitySchema:X,ClientCapabilitiesSchema:K,InitializeRequestParamsSchema:se,InitializeRequestSchema:pe,ServerCapabilitiesSchema:oe,InitializeResultSchema:V,InitializedNotificationSchema:te,PingRequestSchema:le,ProgressSchema:St,ProgressNotificationParamsSchema:Be,ProgressNotificationSchema:it,PaginatedRequestParamsSchema:kt,PaginatedRequestSchema:Xe,PaginatedResultSchema:Ne,ResourceContentsSchema:Bt,TextResourceContentsSchema:Ht,BlobResourceContentsSchema:Te,RoleSchema:Oe,AnnotationsSchema:Ae,ResourceSchema:lt,ResourceTemplateSchema:Mo,ListResourcesRequestSchema:Qe,ListResourcesResultSchema:et,ListResourceTemplatesRequestSchema:He,ListResourceTemplatesResultSchema:nt,ResourceRequestParamsSchema:ct,ReadResourceRequestParamsSchema:Rt,ReadResourceRequestSchema:qt,ReadResourceResultSchema:ao,ResourceListChangedNotificationSchema:Pt,SubscribeRequestParamsSchema:Io,SubscribeRequestSchema:N,UnsubscribeRequestParamsSchema:jt,UnsubscribeRequestSchema:F,ResourceUpdatedNotificationParamsSchema:U,ResourceUpdatedNotificationSchema:Q,PromptArgumentSchema:O,PromptSchema:I,ListPromptsRequestSchema:G,ListPromptsResultSchema:J,GetPromptRequestParamsSchema:ze,GetPromptRequestSchema:No,TextContentSchema:Tt,ImageContentSchema:Oo,AudioContentSchema:Ao,ToolUseContentSchema:Ds,EmbeddedResourceSchema:io,ResourceLinkSchema:Zs,ContentBlockSchema:ut,PromptMessageSchema:Rr,GetPromptResultSchema:qr,PromptListChangedNotificationSchema:Lo,ToolAnnotationsSchema:Bs,ToolExecutionSchema:Pr,ToolSchema:Uo,ListToolsRequestSchema:jr,ListToolsResultSchema:Tr,CallToolResultSchema:Cr,CallToolRequestParamsSchema:Ce,CallToolRequestSchema:Hs,ToolListChangedNotificationSchema:In,LoggingLevelSchema:Er,SetLevelRequestParamsSchema:Fs,SetLevelRequestSchema:Vs,LoggingMessageNotificationParamsSchema:Js,LoggingMessageNotificationSchema:Ws,ModelHintSchema:Gs,ModelPreferencesSchema:Ks,ToolChoiceSchema:Ys,ToolResultContentSchema:Nn,SamplingContentSchema:Xs,SamplingMessageContentBlockSchema:no,SamplingMessageSchema:Qs,CreateMessageRequestParamsSchema:ea,CreateMessageRequestSchema:ta,CreateMessageResultSchema:oa,CreateMessageResultWithToolsSchema:ra,BooleanSchemaSchema:sa,StringSchemaSchema:aa,NumberSchemaSchema:ia,UntitledSingleSelectEnumSchemaSchema:na,TitledSingleSelectEnumSchemaSchema:ca,LegacyTitledEnumSchemaSchema:ua,SingleSelectEnumSchemaSchema:da,UntitledMultiSelectEnumSchemaSchema:Do,TitledMultiSelectEnumSchemaSchema:Zo,MultiSelectEnumSchemaSchema:On,EnumSchemaSchema:An,PrimitiveSchemaDefinitionSchema:tt,ElicitRequestFormParamsSchema:ot,ElicitRequestURLParamsSchema:la,ElicitRequestParamsSchema:mt,ElicitRequestSchema:Ln,ElicitationCompleteNotificationParamsSchema:Un,ElicitationCompleteNotificationSchema:Dn,ElicitResultSchema:Zn,ResourceTemplateReferenceSchema:Bn,PromptReferenceSchema:Hn,CompleteRequestParamsSchema:Fn,CompleteRequestSchema:ma,CompleteResultSchema:Vn,RootSchema:Jn,ListRootsRequestSchema:$r,ListRootsResultSchema:pa,RootsListChangedNotificationSchema:Wn,TaskCreationParamsSchema:Gn,TaskStatusSchema:ha,TaskSchema:co,CreateTaskResultSchema:Fe,TaskStatusNotificationParamsSchema:Kn,TaskStatusNotificationSchema:Bo,GetTaskRequestSchema:Mr,GetTaskResultSchema:Ir,GetTaskPayloadRequestSchema:Nr,GetTaskPayloadResultSchema:Ju,ListTasksRequestSchema:Le,ListTasksResultSchema:ye,CancelTaskRequestSchema:Ho,CancelTaskResultSchema:h.merge(co),ClientRequestSchema:E([le,pe,ma,Vs,No,G,Qe,He,qt,N,F,Hs,jr,Mr,Nr,Le,Ho]),ClientNotificationSchema:E([w,it,te,Wn,Bo]),ClientResultSchema:E([b,oa,ra,Zn,pa,Ir,ye,Fe]),ServerRequestSchema:E([le,ta,Ln,$r,Mr,Nr,Le,Ho]),ServerNotificationSchema:E([w,it,Ws,Q,Pt,In,Lo,Bo,Dn]),ServerResultSchema:E([b,V,Vn,qr,J,et,nt,ao,Cr,Tr,Ir,ye,Fe]),CallToolResultWireSchema:D().superRefine((Ee,Lw)=>{if(typeof Ee!=="object"||Ee===null||Array.isArray(Ee)||Ee.content!==void 0)return;for(let Bm of zg)if(Bm in Ee){Lw.addIssue({code:"custom",message:`content is required when the body carries '${Bm}' — another result family cannot default into an empty tools/call success`});return}}).transform(vb).pipe(Cr)}}var yb;function Sg(){return yb??=wb()}function kg(e){return e.type!=="object"}var bb=new Set(["const","enum","default","examples"]),zb=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function ig(e){return e!==void 0&&!(typeof e==="string"&&e.startsWith("#"))}function Sb(e){let t=typeof e.$schema==="string"?e.$schema:void 0;if(ig(e.$id))return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let o=Gm(e.$schema)&&e.$recursiveAnchor!==!0,r=(s,a)=>{if(Array.isArray(s))return s.map((u)=>r(u,!1));if(s===null||typeof s!=="object")return s;if(!a&&ig(s.$id))return s;let i={},n=!1;for(let[u,d]of Object.entries(s))if(a)i[u]=r(d,!1);else if((u==="$ref"||u==="$dynamicRef")&&typeof d==="string")i[u]=d==="#"?"#/properties/result":d.startsWith("#/")?`#/properties/result${d.slice(1)}`:d;else if(u==="$recursiveRef"&&d==="#"&&o)n=!0;else if(bb.has(u))i[u]=d;else if(zb.has(u))i[u]=r(d,!0);else i[u]=r(d,!1);if(n)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:r(e,!1)},required:["result"]}}var xg={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},Rg={"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},kb={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=Sg();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 qg(e){return Object.prototype.hasOwnProperty.call(xg,e)}function Pg(e){return Object.prototype.hasOwnProperty.call(Rg,e)}function xb(e){return Object.prototype.hasOwnProperty.call(kb,e)}function Rb(e){return xb(e)?zl().resultSchemas[e]:void 0}function qb(e){return qg(e)?zl().requestSchemas[e]:void 0}function Pb(e){return Pg(e)?zl().notificationSchemas[e]:void 0}var tq=Object.keys(xg),oq=Object.keys(Rg);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 o=e.safeParse(t);return o.success?{ok:!0,value:o.data}:{ok:!1,reason:"invalid",message:String(o.error)}}var ng={ok:!1,reason:"not-in-era"};function cg(e){return hl(e)&&hl(e.outputSchema)&&kg(e.outputSchema)}function ug(e){return e}var Sl={era:"2025-11-25",hasRequestMethod:qg,hasNotificationMethod:Pg,validateRequest:(e,t)=>Kc(qb(e),t),validateResult:(e,t)=>Kc(Rb(e),t),validateNotification:(e,t)=>Kc(Pb(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>ng,validateInputResponse:()=>ng,samplingResultVariant:(e,t)=>{let o=Sg();return Kc(e?o.CreateMessageResultWithToolsSchema:o.CreateMessageResultSchema,t)},outboundEnvelope:(e)=>{return},validateEnvelopeMeta:(e)=>[],projectCallToolResult(e,t){let o=bg(e),r=o.structuredContent;if(r===void 0)return o;let s=typeof r!=="object"||r===null||Array.isArray(r),a=t!==void 0&&kg(t);if(!s&&!a)return o;return{...o,structuredContent:{result:r}}},decodeResult(e,t){if(hl(t)&&"resultType"in t){let o={...t};return delete o.resultType,{kind:"complete",result:ug(o)}}return{kind:"complete",result:ug(t)}},encodeResult(e,t){if(e!=="tools/list")return t;let o=t.tools;if(!Array.isArray(o)||!o.some((r)=>cg(r)))return t;return{...t,tools:o.map((r)=>cg(r)?{...r,outputSchema:Sb(r.outputSchema)}:r)}},encodeErrorCode:(e)=>e===-32002?-32602:e,checkInboundEnvelope:(e)=>{return}};function jb(){let e=ja(()=>E([c(),q(),C(),Go(),T(c(),e),y(e)])),t=T(c(),e),o=E([c(),q().int()]),r=c(),s=E([c(),q().int()]),a=Y(["user","assistant"]),i=Y(["debug","info","notice","warning","error","critical","alert","emergency"]),n=c().refine((ye)=>{try{return atob(ye),!0}catch{return!1}},{message:"Invalid Base64 string"}),u=m({ttl:q().optional()}),d=m({taskId:c()}),l=H({progressToken:o.optional(),"io.modelcontextprotocol/related-task":d.optional()}),p=m({_meta:l.optional()}),h=p.extend({task:u.optional()}),v=m({_meta:l.optional()}),b=m({method:c(),params:v.loose().optional()}),g=m({src:c(),mimeType:c().optional(),sizes:y(c()).optional(),theme:Y(["light","dark"]).optional()}),w=m({icons:y(g).optional()}),R=m({name:c(),title:c().optional()}),P=R.extend({...R.shape,...w.shape,version:c(),websiteUrl:c().optional(),description:c().optional()}),x=Vt(m({applyDefaults:C().optional()}),t),j=Ko((ye)=>{if(ye&&typeof ye==="object"&&!Array.isArray(ye)&&Object.keys(ye).length===0)return{form:{}};return ye},Vt(m({form:x.optional(),url:t.optional()}),t.optional())),k=H({list:t.optional(),cancel:t.optional(),requests:H({sampling:H({createMessage:t.optional()}).optional(),elicitation:H({create:t.optional()}).optional()}).optional()}),z=H({list:t.optional(),cancel:t.optional(),requests:H({tools:H({call:t.optional()}).optional()}).optional()}),M=m({experimental:T(c(),t).optional(),sampling:m({context:t.optional(),tools:t.optional()}).optional(),elicitation:j.optional(),roots:m({listChanged:C().optional()}).optional(),tasks:k.optional(),extensions:T(c(),t).optional()}),X=m({experimental:T(c(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:m({listChanged:C().optional()}).optional(),resources:m({subscribe:C().optional(),listChanged:C().optional()}).optional(),tools:m({listChanged:C().optional()}).optional(),tasks:z.optional(),extensions:T(c(),t).optional()}),K=m({progress:q(),total:B(q()),message:B(c())}),se=m({...v.shape,...K.shape,progressToken:o}),pe=b.extend({method:f("notifications/progress"),params:se}),oe=v.extend({level:i,logger:c().optional(),data:D()}),V=b.extend({method:f("notifications/message"),params:oe}),te=m({uri:c(),mimeType:B(c()),_meta:T(c(),D()).optional()}),le=te.extend({text:c()}),St=te.extend({blob:n}),Be=m({audience:y(a).optional(),priority:q().min(0).max(1).optional(),lastModified:Dr({offset:!0}).optional()}),it=m({...R.shape,...w.shape,uri:c(),description:B(c()),mimeType:B(c()),size:B(q()),annotations:Be.optional(),_meta:B(H({}))}),kt=m({...R.shape,...w.shape,uriTemplate:c(),description:B(c()),mimeType:B(c()),annotations:Be.optional(),_meta:B(H({}))}),Xe=b.extend({method:f("notifications/resources/list_changed"),params:v.optional()}),Ne=v.extend({uri:c()}),Bt=b.extend({method:f("notifications/resources/updated"),params:Ne}),Ht=m({name:c(),description:B(c()),required:B(C())}),xt=m({...R.shape,...w.shape,description:B(c()),arguments:B(y(Ht)),_meta:B(H({}))}),Te=b.extend({method:f("notifications/prompts/list_changed"),params:v.optional()}),Oe=m({type:f("text"),text:c(),annotations:Be.optional(),_meta:T(c(),D()).optional()}),Ae=m({type:f("image"),data:n,mimeType:c(),annotations:Be.optional(),_meta:T(c(),D()).optional()}),lt=m({type:f("audio"),data:n,mimeType:c(),annotations:Be.optional(),_meta:T(c(),D()).optional()}),Mo=m({type:f("tool_use"),name:c(),id:c(),input:T(c(),D()),_meta:T(c(),D()).optional()}),Qe=m({type:f("resource"),resource:E([le,St]),annotations:Be.optional(),_meta:T(c(),D()).optional()}),et=it.extend({type:f("resource_link")}),He=E([Oe,Ae,lt,et,Qe]),nt=m({role:a,content:He}),ct=m({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=m({name:c().optional()}),ao=m({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()}),Pt=m({mode:Y(["auto","required","none"]).optional()}),Io=m({type:f("boolean"),title:c().optional(),description:c().optional(),default:C().optional()}),N=m({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()}),jt=m({type:Y(["number","integer"]),title:c().optional(),description:c().optional(),minimum:q().optional(),maximum:q().optional(),default:q().optional()}),F=m({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),default:c().optional()}),U=m({type:f("string"),title:c().optional(),description:c().optional(),oneOf:y(m({const:c(),title:c()})),default:c().optional()}),Q=m({type:f("string"),title:c().optional(),description:c().optional(),enum:y(c()),enumNames:y(c()).optional(),default:c().optional()}),O=E([F,U]),I=m({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:m({type:f("string"),enum:y(c())}),default:y(c()).optional()}),G=m({type:f("array"),title:c().optional(),description:c().optional(),minItems:q().optional(),maxItems:q().optional(),items:m({anyOf:y(m({const:c(),title:c()}))}),default:y(c()).optional()}),J=E([I,G]),ze=E([Q,O,J]),No=E([ze,Io,N,jt]),Tt=h.extend({mode:f("form").optional(),message:c(),requestedSchema:m({type:f("object"),properties:T(c(),No),required:y(c()).optional()}).catchall(D())}),Oo=m({type:f("ref/resource"),uri:c()}),Ao=m({type:f("ref/prompt"),name:c()}),Ds=m({uri:c().startsWith("file://"),name:c().optional(),_meta:T(c(),D()).optional()}),io=M.shape,Zs=m({experimental:io.experimental,sampling:io.sampling,elicitation:io.elicitation,roots:io.roots,extensions:io.extensions}),ut=X.shape,Rr=m({experimental:ut.experimental,logging:ut.logging,completions:ut.completions,prompts:ut.prompts,resources:ut.resources,tools:ut.tools,extensions:ut.extensions}),qr=H({progressToken:o.optional(),[Wt]:c(),[Br]:P.optional(),[Xo]:Zs,[Fr]:i.optional()}),Lo=m({...R.shape,...w.shape,description:c().optional(),inputSchema:H({$schema:c().optional(),type:f("object")}),outputSchema:H({$schema:c().optional()}).optional(),annotations:ct.optional(),_meta:T(c(),D()).optional()}),Bs=m({type:f("tool_result"),toolUseId:c(),content:y(He),structuredContent:D().optional(),isError:C().optional(),_meta:T(c(),D()).optional()}),Pr=E([Oe,Ae,lt,Mo,Bs]),Uo=m({role:a,content:E([Pr,y(Pr)]),_meta:T(c(),D()).optional()}),jr=c(),Tr=H({[$t]:P.optional().catch(void 0)}),Cr=Tr.optional();function Ce(ye){return H({_meta:Cr,resultType:jr.default("complete"),...ye})}let Hs=Ce({}),In=Ce({nextCursor:r.optional()}),Er=Ce({content:y(He),structuredContent:D().optional(),isError:C().optional()}),Fs=Ce({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),tools:y(Lo),nextCursor:r.optional()}),Vs=Ce({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),prompts:y(xt),nextCursor:r.optional()}),Js=Ce({description:c().optional(),messages:y(nt)}),Ws=Ce({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),resources:y(it),nextCursor:r.optional()}),Gs=Ce({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),resourceTemplates:y(kt),nextCursor:r.optional()}),Ks=Ce({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),contents:y(E([le,St]))}),Ys=Ce({completion:m({values:y(c()).max(100),total:q().int().optional(),hasMore:C().optional()}).loose()}),Nn=Ce({ttlMs:q().int().min(0),cacheScope:Y(["public","private"])}),Xs=Ce({ttlMs:q().int().min(0).catch(0),cacheScope:Y(["public","private"]).catch("private"),supportedVersions:y(c()),capabilities:Rr,instructions:c().optional()}),no=m({messages:y(Uo),modelPreferences:ao.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(Lo).optional(),toolChoice:Pt.optional()}),Qs=m({method:f("sampling/createMessage"),params:no}),ea=m({method:f("roots/list"),params:m({_meta:T(c(),D()).optional()}).optional()}),ta=m({...Uo.shape,model:c(),stopReason:c().optional()}),oa=m({roots:y(Ds)}),ra=m({action:Y(["accept","decline","cancel"]),content:T(c(),E([c(),q(),C(),y(c())])).optional()}),sa=m({mode:f("url"),message:c(),url:c().url()}),aa=E([Tt,sa]),ia=m({method:f("elicitation/create"),params:aa}),na=E([Qs,ea,ia]),ca=E([ta,oa,ra]),ua=T(c(),na),da=T(c(),ca),Do=Ce({inputRequests:ua.optional(),requestState:c().optional()}),Zo={inputResponses:da.optional(),requestState:c().optional()},On=m({_meta:qr,...Zo}),An=H({progressToken:o.optional()});function tt(ye,Ho){return m({method:f(ye),params:m({_meta:qr,...Ho})})}function ot(ye,Ho){return m({method:f(ye),params:m({_meta:An.optional(),...Ho}).optional()})}let la={name:c(),arguments:T(c(),D()).optional(),...Zo},mt={cursor:r.optional()},Ln=tt("tools/call",la),Un=tt("tools/list",mt),Dn=tt("prompts/list",mt),Zn=tt("prompts/get",{name:c(),arguments:T(c(),c()).optional(),...Zo}),Bn=tt("resources/list",mt),Hn=tt("resources/templates/list",mt),Fn=tt("resources/read",{uri:c(),...Zo}),ma={ref:E([Ao,Oo]),argument:m({name:c(),value:c()}),context:m({arguments:T(c(),c()).optional()}).optional()},Vn=tt("completion/complete",ma),Jn=tt("server/discover",{}),$r=m({toolsListChanged:C().optional(),promptsListChanged:C().optional(),resourcesListChanged:C().optional(),resourceSubscriptions:y(c()).optional()}),pa={notifications:$r},Wn=tt("subscriptions/listen",pa),Gn=Tr.extend({"io.modelcontextprotocol/subscriptionId":s}),ha=H({_meta:Gn,resultType:jr.default("complete")}),co={"tools/call":ot("tools/call",la),"tools/list":ot("tools/list",mt),"prompts/get":ot("prompts/get",{name:c(),arguments:T(c(),c()).optional()}),"prompts/list":ot("prompts/list",mt),"resources/list":ot("resources/list",mt),"resources/templates/list":ot("resources/templates/list",mt),"resources/read":ot("resources/read",{uri:c()}),"completion/complete":ot("completion/complete",ma),"server/discover":ot("server/discover",{}),"subscriptions/listen":ot("subscriptions/listen",pa)};function Fe(ye){return H({_meta:Cr,...ye})}let Kn={"tools/call":Fe({content:y(He),structuredContent:D().optional(),isError:C().optional()}),"tools/list":Fe({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),tools:y(Lo),nextCursor:r.optional()}),"prompts/get":Fe({description:c().optional(),messages:y(nt)}),"prompts/list":Fe({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),prompts:y(xt),nextCursor:r.optional()}),"resources/list":Fe({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),resources:y(it),nextCursor:r.optional()}),"resources/templates/list":Fe({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),resourceTemplates:y(kt),nextCursor:r.optional()}),"resources/read":Fe({ttlMs:q().int().min(0),cacheScope:Y(["public","private"]),contents:y(E([le,St]))}),"completion/complete":Fe({completion:m({values:y(c()).max(100),total:q().int().optional(),hasMore:C().optional()}).loose()}),"server/discover":Fe({ttlMs:q().int().min(0).catch(0),cacheScope:Y(["public","private"]).catch("private"),supportedVersions:y(c()),capabilities:Rr,instructions:c().optional()}),"subscriptions/listen":Fe({})},Bo=H({"io.modelcontextprotocol/subscriptionId":s.optional()}),Mr=m({method:f("notifications/subscriptions/acknowledged"),params:m({_meta:Bo.optional(),notifications:$r})}),Ir=m({_meta:Bo.optional(),requestId:s,reason:c().optional()}),Nr=m({method:f("notifications/cancelled"),params:Ir}),Ju={"notifications/cancelled":Nr,"notifications/progress":pe,"notifications/message":V,"notifications/resources/updated":Bt,"notifications/resources/list_changed":Xe,"notifications/tools/list_changed":Rt,"notifications/prompts/list_changed":Te,"notifications/subscriptions/acknowledged":Mr},Le=(ye)=>m({jsonrpc:f("2.0"),id:E([c(),q().int()]),result:ye}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:o,CursorSchema:r,RequestIdSchema:s,RoleSchema:a,LoggingLevelSchema:i,TaskMetadataSchema:u,RelatedTaskMetadataSchema:d,RequestMetaSchema:l,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:h,NotificationsParamsSchema:v,NotificationSchema:b,IconSchema:g,IconsSchema:w,BaseMetadataSchema:R,ImplementationSchema:P,ClientTasksCapabilitySchema:k,ServerTasksCapabilitySchema:z,ClientCapabilitiesSchema:M,ServerCapabilitiesSchema:X,ProgressSchema:K,ProgressNotificationParamsSchema:se,ProgressNotificationSchema:pe,LoggingMessageNotificationParamsSchema:oe,LoggingMessageNotificationSchema:V,ResourceContentsSchema:te,TextResourceContentsSchema:le,BlobResourceContentsSchema:St,AnnotationsSchema:Be,ResourceSchema:it,ResourceTemplateSchema:kt,ResourceListChangedNotificationSchema:Xe,ResourceUpdatedNotificationParamsSchema:Ne,ResourceUpdatedNotificationSchema:Bt,PromptArgumentSchema:Ht,PromptSchema:xt,PromptListChangedNotificationSchema:Te,TextContentSchema:Oe,ImageContentSchema:Ae,AudioContentSchema:lt,ToolUseContentSchema:Mo,EmbeddedResourceSchema:Qe,ResourceLinkSchema:et,ContentBlockSchema:He,PromptMessageSchema:nt,ToolAnnotationsSchema:ct,ToolListChangedNotificationSchema:Rt,ModelHintSchema:qt,ModelPreferencesSchema:ao,ToolChoiceSchema:Pt,BooleanSchemaSchema:Io,StringSchemaSchema:N,NumberSchemaSchema:jt,UntitledSingleSelectEnumSchemaSchema:F,TitledSingleSelectEnumSchemaSchema:U,LegacyTitledEnumSchemaSchema:Q,SingleSelectEnumSchemaSchema:O,UntitledMultiSelectEnumSchemaSchema:I,TitledMultiSelectEnumSchemaSchema:G,MultiSelectEnumSchemaSchema:J,EnumSchemaSchema:ze,PrimitiveSchemaDefinitionSchema:No,ElicitRequestFormParamsSchema:Tt,ResourceTemplateReferenceSchema:Oo,PromptReferenceSchema:Ao,RootSchema:Ds,ClientCapabilities2026Schema:Zs,ServerCapabilities2026Schema:Rr,RequestMetaEnvelopeSchema:qr,ToolSchema:Lo,ToolResultContentSchema:Bs,SamplingMessageContentBlockSchema:Pr,SamplingMessageSchema:Uo,ResultTypeSchema:jr,ResultMetaSchema:Tr,ResultSchema:Hs,PaginatedResultSchema:In,CallToolResultSchema:Er,ListToolsResultSchema:Fs,ListPromptsResultSchema:Vs,GetPromptResultSchema:Js,ListResourcesResultSchema:Ws,ListResourceTemplatesResultSchema:Gs,ReadResourceResultSchema:Ks,CompleteResultSchema:Ys,CacheableResultSchema:Nn,DiscoverResultSchema:Xs,CreateMessageRequestParamsSchema:no,CreateMessageRequestSchema:Qs,ListRootsRequestSchema:ea,CreateMessageResultSchema:ta,ListRootsResultSchema:oa,ElicitResultSchema:ra,ElicitRequestURLParamsSchema:sa,ElicitRequestParamsSchema:aa,ElicitRequestSchema:ia,InputRequestSchema:na,InputResponseSchema:ca,InputRequestsSchema:ua,InputResponsesSchema:da,InputRequiredResultSchema:Do,InputResponseRequestParamsSchema:On,CallToolRequestSchema:Ln,ListToolsRequestSchema:Un,ListPromptsRequestSchema:Dn,GetPromptRequestSchema:Zn,ListResourcesRequestSchema:Bn,ListResourceTemplatesRequestSchema:Hn,ReadResourceRequestSchema:Fn,CompleteRequestSchema:Vn,DiscoverRequestSchema:Jn,SubscriptionFilterSchema:$r,SubscriptionsListenRequestSchema:Wn,SubscriptionsListenResultMetaSchema:Gn,SubscriptionsListenResultSchema:ha,dispatchRequestSchemas:co,dispatchResultSchemas:Kn,NotificationMetaSchema:Bo,SubscriptionsAcknowledgedNotificationSchema:Mr,CancelledNotificationParamsSchema:Ir,CancelledNotificationSchema:Nr,notificationSchemas2026:Ju,JSONRPCResultResponseSchema:Le(Hs),CallToolResultResponseSchema:Le(E([Er,Do])),ListToolsResultResponseSchema:Le(Fs),ListPromptsResultResponseSchema:Le(Vs),GetPromptResultResponseSchema:Le(E([Js,Do])),ListResourcesResultResponseSchema:Le(Ws),ListResourceTemplatesResultResponseSchema:Le(Gs),ReadResourceResultResponseSchema:Le(E([Ks,Do])),CompleteResultResponseSchema:Le(Ys),DiscoverResultResponseSchema:Le(Xs),SubscriptionsListenResultResponseSchema:Le(ha)}}var Tb;function bo(){return Tb??=jb()}var Cb=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function Eb(e){return Cb.includes(e)}var kl=Symbol("modelcontextprotocol.resultCacheHintFallback");function $b(e){return e[kl]}function jg(e){return typeof e==="number"&&Number.isSafeInteger(e)&&e>=0}function Tg(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}({}),ae=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,o,r){super(o);this.code=t,this.data=r,this.name="ProtocolError",zo(this,new.target)}static fromError(t,o,r){if(t===W.UrlElicitationRequired&&r){let s=r;if(s.elicitations)return new Eg(s.elicitations,o)}if(t===W.UnsupportedProtocolVersion&&r){let s=r;if(Array.isArray(s.supported)&&typeof s.requested==="string")return new fn({supported:s.supported,requested:s.requested},o)}if(t===W.InvalidParams||t===W.ResourceNotFound){let s=r;if(typeof s?.uri==="string"&&(t===W.ResourceNotFound||Object.keys(s).length===1))return new Cg(s.uri,o)}if(t===W.MissingRequiredClientCapability&&r){let s=r;if(s.requiredCapabilities!==null&&typeof s.requiredCapabilities==="object"&&!Array.isArray(s.requiredCapabilities))return new $g({requiredCapabilities:s.requiredCapabilities},o)}return new e(t,o,r)}},Cg=class extends ae{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}},Eg=class extends ae{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 ae{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}},$g=class extends ae{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}},Mb=0,Ib="private",Nb=["tools/call","prompts/get","resources/read"];function Ob(e,t){let o=t.resultType;if(o===void 0)return{...t,resultType:"complete"};if(o==="complete")return t;if(Nb.includes(e))return t;throw new ae(W.InternalError,`Handler for ${e} returned resultType '${String(o)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Ab(e,t){let o=$b(t);if(t.resultType!=="complete"||!Eb(e))return o===void 0?t:Bb(t);let r=t,s=jg(r.ttlMs)?r.ttlMs:Db(o),a=Tg(r.cacheScope)?r.cacheScope:Zb(o),i={...r,ttlMs:s,cacheScope:a};return delete i[kl],i}function Lb(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function Ub(e,t){if(t===void 0)return e;let o=e._meta;if(o===void 0)return{...e,_meta:{[$t]:t}};if(!Lb(o))return e;if(o[$t]!==void 0)return e;return{...e,_meta:{...o,[$t]:t}}}function Db(e){return e!==void 0&&jg(e.ttlMs)?e.ttlMs:Mb}function Zb(e){return e!==void 0&&Tg(e.cacheScope)?e.cacheScope:Ib}function Bb(e){let t={...e};return delete t[kl],t}var Hb=["elicitation/create","sampling/createMessage","roots/list"],Yc;function Mg(){if(Yc)return Yc;let e=bo();return Yc={request:{"elicitation/create":m({method:f("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":m({method:f("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":m({method:f("roots/list"),params:H({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Yc}function Ig(e){return Hb.includes(e)}function ul(e){return Ig(e)?Mg().request[e]:void 0}function Fb(e){return Ig(e)?Mg().response[e]:void 0}var xl={"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},Ng={"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 Og(e){return Object.prototype.hasOwnProperty.call(xl,e)}function Ag(e){return Object.prototype.hasOwnProperty.call(Ng,e)}function Vb(e){return Object.prototype.hasOwnProperty.call(xl,e)}function Jb(e){return Og(e)?bo().dispatchRequestSchemas[e]:void 0}function Wb(e){return Vb(e)?bo().dispatchResultSchemas[e]:void 0}function Gb(e){return Ag(e)?bo().notificationSchemas2026[e]:void 0}var rq=Object.keys(xl),sq=Object.keys(Ng);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 o=e.safeParse(t);return o.success?{ok:!0,value:o.data}:{ok:!1,reason:"invalid",message:String(o.error)}}var Kb={ok:!1,reason:"not-in-era"},Yb=[Wt,Xo];function Xb(e,t){let o=t,r=!1,s=()=>{if(!r)o={...o},r=!0;return o},a=t.tools;if(e==="tools/list"&&Array.isArray(a)&&a.some((n)=>mn(n)&&("execution"in n)))s().tools=a.map((n)=>{if(!mn(n)||!("execution"in n))return n;let u={...n};return delete u.execution,u});let i=t.capabilities;if(mn(i)&&"tasks"in i){let n={...i};delete n.tasks,s().capabilities=n}return o}var Rl={era:"2026-07-28",hasRequestMethod:Og,hasNotificationMethod:Ag,hasInputRequestMethod:(e)=>ul(e)!==void 0,validateRequest:(e,t)=>dn(Jb(e),t),validateResult:(e,t)=>dn(Wb(e),t),validateNotification:(e,t)=>dn(Gb(e),t),validateInputRequest:(e,t)=>dn(ul(e),t),validateInputResponse:(e,t)=>dn(Fb(e),t),samplingResultVariant:()=>Kb,outboundEnvelope(e){return{[Wt]:e.protocolVersion,[Br]:e.clientInfo,[Xo]:e.clientCapabilities,...e.logLevel!==void 0&&{[Fr]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let r of Yb)if(!(r in e))t.push({key:r,problem:"missing"});let o=bo().RequestMetaEnvelopeSchema.safeParse(e);if(!o.success)for(let r of o.error.issues){let s=r.path.map(String),a=s.length>0?s.join("."):"_meta";if(s.length===1&&t.some((i)=>i.key===a&&i.problem==="missing"))continue;t.push({key:a,problem:r.message})}return t},projectCallToolResult:(e)=>bg(e),inputRequestSchema:ul,decodeResult(e,t){if(!mn(t))return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let o=t.resultType;if(o===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 o!=="string")return{kind:"invalid",error:new L(A.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:o})};if(o==="input_required"){let i=t.inputRequests,n=mn(i)?i:{},u=t.requestState,d=t._meta===void 0?void 0:bo().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(o!=="complete")return{kind:"invalid",error:new L(A.UnsupportedResultType,`Unsupported result type '${o}' for ${e}`,{resultType:o,method:e})};let r=Qb(),s=Object.hasOwn(r,e)?r[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 a={...t};return delete a.resultType,{kind:"complete",result:a}},encodeResult(e,t,o){return Ub(Ab(e,Ob(e,Xb(e,t))),o)},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=bo().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map((o)=>o.message).join("; ")}`}},Xc;function Qb(){if(Xc)return Xc;let e=bo();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 ou="2026-07-28";function eo(e){return e!==void 0&&At(e)?Rl:Sl}function dg(e){if(e.revision!==void 0)return eo(e.revision).era;return e.era==="modern"?Rl.era:Sl.era}function dl(e){return Lg.some((t)=>t.hasRequestMethod(e))}function ll(e){return Lg.some((t)=>t.hasNotificationMethod(e))}function lg(e){return e==="tasks/get"||e==="tasks/cancel"}var Lg=[Sl,Rl],e0=Vm({AnnotationsSchema:()=>It,AudioContentSchema:()=>ar,BaseMetadataSchema:()=>Et,BaseRequestParamsSchema:()=>xe,BlobResourceContentsSchema:()=>is,BooleanSchemaSchema:()=>ds,CallToolRequestParamsSchema:()=>zi,CallToolRequestSchema:()=>Si,CallToolResultSchema:()=>yo,CancelTaskRequestSchema:()=>Lc,CancelTaskResultSchema:()=>Uc,CancelledNotificationParamsSchema:()=>Ea,CancelledNotificationSchema:()=>Xr,ClientCapabilitiesSchema:()=>Ma,ClientNotificationSchema:()=>Zc,ClientRequestSchema:()=>Dc,ClientResultSchema:()=>Bc,ClientTasksCapabilitySchema:()=>qc,CompatibilityCallToolResultSchema:()=>jc,CompleteRequestParamsSchema:()=>Ki,CompleteRequestSchema:()=>Yi,CompleteResultSchema:()=>Xi,ContentBlockSchema:()=>Nt,CreateMessageRequestParamsSchema:()=>Ii,CreateMessageRequestSchema:()=>Ni,CreateMessageResultSchema:()=>Oi,CreateMessageResultWithToolsSchema:()=>Ai,CreateTaskResultSchema:()=>Cc,CursorSchema:()=>Jr,DiscoverRequestSchema:()=>Oa,DiscoverResultSchema:()=>vo,ElicitRequestFormParamsSchema:()=>lr,ElicitRequestParamsSchema:()=>Bi,ElicitRequestSchema:()=>Hi,ElicitRequestURLParamsSchema:()=>Zi,ElicitResultSchema:()=>Ji,ElicitationCompleteNotificationParamsSchema:()=>Fi,ElicitationCompleteNotificationSchema:()=>Vi,EmbeddedResourceSchema:()=>ir,EmptyResultSchema:()=>go,EnumSchemaSchema:()=>Di,GetPromptRequestParamsSchema:()=>mi,GetPromptRequestSchema:()=>pi,GetPromptResultSchema:()=>fi,GetTaskPayloadRequestSchema:()=>Ic,GetTaskPayloadResultSchema:()=>Nc,GetTaskRequestSchema:()=>$c,GetTaskResultSchema:()=>Mc,IconSchema:()=>$a,IconsSchema:()=>Gt,ImageContentSchema:()=>sr,ImplementationSchema:()=>Mt,InitializeRequestParamsSchema:()=>Ia,InitializeRequestSchema:()=>Qr,InitializeResultSchema:()=>Na,InitializedNotificationSchema:()=>ts,JSONArraySchema:()=>xc,JSONObjectSchema:()=>fe,JSONRPCErrorResponseSchema:()=>tr,JSONRPCMessageSchema:()=>ft,JSONRPCNotificationSchema:()=>Yr,JSONRPCRequestSchema:()=>Kr,JSONRPCResponseSchema:()=>Rc,JSONRPCResultResponseSchema:()=>er,JSONValueSchema:()=>Jt,LegacyTitledEnumSchemaSchema:()=>ps,ListChangedOptionsBaseSchema:()=>xi,ListPromptsRequestSchema:()=>di,ListPromptsResultSchema:()=>li,ListResourceTemplatesRequestSchema:()=>Ha,ListResourceTemplatesResultSchema:()=>Fa,ListResourcesRequestSchema:()=>Za,ListResourcesResultSchema:()=>Ba,ListRootsRequestSchema:()=>en,ListRootsResultSchema:()=>tn,ListTasksRequestSchema:()=>Oc,ListTasksResultSchema:()=>Ac,ListToolsRequestSchema:()=>yi,ListToolsResultSchema:()=>bi,LoggingLevelSchema:()=>us,LoggingMessageNotificationParamsSchema:()=>Pi,LoggingMessageNotificationSchema:()=>cr,ModelHintSchema:()=>ji,ModelPreferencesSchema:()=>Ti,MultiSelectEnumSchemaSchema:()=>Ui,NotificationSchema:()=>Pe,NotificationsParamsSchema:()=>$e,NumberSchemaSchema:()=>dr,PaginatedRequestParamsSchema:()=>Ua,PaginatedRequestSchema:()=>Kt,PaginatedResultSchema:()=>Yt,PingRequestSchema:()=>os,PrimitiveSchemaDefinitionSchema:()=>fs,ProgressNotificationParamsSchema:()=>La,ProgressNotificationSchema:()=>rs,ProgressSchema:()=>Aa,ProgressTokenSchema:()=>Vr,PromptArgumentSchema:()=>ci,PromptListChangedNotificationSchema:()=>gi,PromptMessageSchema:()=>_i,PromptReferenceSchema:()=>Gi,PromptSchema:()=>ui,ReadResourceRequestParamsSchema:()=>Va,ReadResourceRequestSchema:()=>Ja,ReadResourceResultSchema:()=>Wa,RelatedTaskMetadataSchema:()=>Ca,RequestIdSchema:()=>_t,RequestMetaSchema:()=>Wr,RequestSchema:()=>ge,ResourceContentsSchema:()=>ss,ResourceLinkSchema:()=>nr,ResourceListChangedNotificationSchema:()=>Ga,ResourceRequestParamsSchema:()=>or,ResourceSchema:()=>ns,ResourceTemplateReferenceSchema:()=>Wi,ResourceTemplateSchema:()=>Da,ResourceUpdatedNotificationParamsSchema:()=>ii,ResourceUpdatedNotificationSchema:()=>ni,ResultMetaObjectSchema:()=>Gr,ResultSchema:()=>ve,RoleSchema:()=>Xt,RootSchema:()=>Qi,RootsListChangedNotificationSchema:()=>on,SamplingContentSchema:()=>$i,SamplingMessageContentBlockSchema:()=>_o,SamplingMessageSchema:()=>Mi,ServerCapabilitiesSchema:()=>es,ServerNotificationSchema:()=>Fc,ServerRequestSchema:()=>Hc,ServerResultSchema:()=>Vc,ServerTasksCapabilitySchema:()=>Pc,SetLevelRequestParamsSchema:()=>Ri,SetLevelRequestSchema:()=>qi,SingleSelectEnumSchemaSchema:()=>Li,StringSchemaSchema:()=>ur,SubscribeRequestParamsSchema:()=>Ka,SubscribeRequestSchema:()=>Ya,SubscriptionFilterSchema:()=>cs,SubscriptionsAcknowledgedNotificationParamsSchema:()=>oi,SubscriptionsAcknowledgedNotificationSchema:()=>ri,SubscriptionsListenRequestParamsSchema:()=>ei,SubscriptionsListenRequestSchema:()=>ti,SubscriptionsListenResultMetaSchema:()=>si,SubscriptionsListenResultSchema:()=>ai,TaskAugmentedRequestParamsSchema:()=>fo,TaskCreationParamsSchema:()=>Tc,TaskMetadataSchema:()=>Ta,TaskSchema:()=>Qt,TaskStatusNotificationParamsSchema:()=>sn,TaskStatusNotificationSchema:()=>Ec,TaskStatusSchema:()=>rn,TextContentSchema:()=>rr,TextResourceContentsSchema:()=>as,TitledMultiSelectEnumSchemaSchema:()=>_s,TitledSingleSelectEnumSchemaSchema:()=>ms,ToolAnnotationsSchema:()=>vi,ToolChoiceSchema:()=>Ci,ToolExecutionSchema:()=>wi,ToolListChangedNotificationSchema:()=>ki,ToolResultContentSchema:()=>Ei,ToolSchema:()=>wo,ToolUseContentSchema:()=>hi,UnsubscribeRequestParamsSchema:()=>Xa,UnsubscribeRequestSchema:()=>Qa,UntitledMultiSelectEnumSchemaSchema:()=>hs,UntitledSingleSelectEnumSchemaSchema:()=>ls});var ko=(e)=>Kr.safeParse(e).success,Ug=(e)=>Yr.safeParse(e).success,_r=(e)=>er.safeParse(e).success,fr=(e)=>tr.safeParse(e).success;var Dg=(e)=>typeof e==="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";var ql=(e)=>Qr.safeParse(e).success,Zg=(e)=>ts.safeParse(e).success;var t0="Mcp-Param-",mg="x-mcp-header",o0=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,r0=new Set(["string","integer","boolean"]);function Pl(e){let t=[],o=new Map,r,s=(i,n,u)=>{if(i===null||typeof i!=="object")return;let d=i;if(mg 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 p=d[mg];if(typeof p!=="string"||p.length===0)return`${Qc(n)}: x-mcp-header MUST be a non-empty string`;if(!o0.test(p))return`${Qc(n)}: x-mcp-header '${p}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let h=typeof d.type==="string"?d.type:void 0;if(h===void 0||!r0.has(h)){let g=`${Qc(n)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${h??"<none>"}`;if(h!=="number")return g;r??=g}let v=p.toLowerCase(),b=o.get(v);if(b!==void 0)return`x-mcp-header '${p}' is not case-insensitively unique (also declared as '${b}')`;o.set(v,p),t.push({path:n,headerName:p,type:h})}let l=d.properties;if(l!==null&&typeof l==="object")for(let[p,h]of Object.entries(l)){let v=s(h,[...n,p],u);if(v!==void 0)return v}for(let p of s0){let h=d[p];if(h===void 0)continue;let v=Array.isArray(h)?h:h!==null&&typeof h==="object"&&a0.has(p)?Object.values(h):[h];for(let b of v){let g=s(b,[...n,`<${p}>`],!1);if(g!==void 0)return g}}},a=s(e,[],!0);if(a!==void 0)return{valid:!1,reason:r??a};return r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r,declarations:t}}var s0=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],a0=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Qc(e){return e.length===0?"<root>":e.join(".")}var Bg="=?base64?",Hg="?=";function i0(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 n0(e){if(e.length===0)return!0;if(e.startsWith(Bg)&&e.endsWith(Hg))return!0;if(e!==e.trim())return!0;for(let t=0;t<e.length;t++){let o=e.codePointAt(t);if(o===9||o>=32&&o<=126)continue;return!0}return!1}function c0(e){let t=new TextEncoder().encode(e),o="";for(let r of t)o+=String.fromCodePoint(r);return btoa(o)}function jl(e){return n0(e)?`${Bg}${c0(e)}${Hg}`:e}function u0(e,t){let o=e;for(let r of t){if(o===null||typeof o!=="object")return;o=o[r]}return o}function Fg(e,t){let o={};for(let r of e){let s=u0(t,r.path);if(s===void 0||s===null)continue;let a=i0(s);if(a===void 0)continue;o[`${t0}${r.headerName}`]=jl(a)}return o}var ys=-32020,aq=[{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:[ys,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:[ys],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:[ys],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."}],iq={[W.ParseError]:400,[W.InvalidRequest]:400,[W.MethodNotFound]:404,[W.UnsupportedProtocolVersion]:400,[W.MissingRequiredClientCapability]:400,[ys]:400},pg={"tools/call":"name","prompts/get":"name","resources/read":"uri","tasks/get":"taskId","tasks/update":"taskId","tasks/cancel":"taskId"};function Vg(e,t){let o=Object.hasOwn(pg,e)?pg[e]:void 0;if(o===void 0)return;let r=d0(t)?t[o]:void 0;return{field:o,value:typeof r==="string"?r:void 0}}function d0(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function ru(e,t){return vc(e,t)}function ln(e){return new Set(e.flatMap((t)=>Object.keys(t.shape)))}function _l(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 hg=!1,fl="draft-2020-12";function l0(e,t="input"){let o=e["~standard"],r;if(o.jsonSchema)r=o.jsonSchema[t]({target:fl});else if(o.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(!hg)hg=!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.");r=fc(e,{target:fl,io:t})}else throw Error(`Schema library "${o.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output"){if(r.type!==void 0)return r;return Jg(r)?{type:"object",...r}:r}if(r.type!==void 0&&r.type!=="object")throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}var m0=/^#\/(\$defs|definitions)\/([^/~%]+)$/;function Jg(e,t=e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;let o=typeof e.$ref==="string"&&m0.exec(e.$ref);if(o&&t[o[1]]?.[o[2]]?.type==="object")return!0;for(let r of["oneOf","anyOf","allOf"]){let s=e[r];if(Array.isArray(s)&&s.length>0)return s.every((a)=>a!==null&&typeof a==="object"&&(a.type==="object"||Jg(a,"$id"in a?{}:t)))}return!1}function p0(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 ml(e,t){let o=await e["~standard"].validate(t);if(o.issues&&o.issues.length>0)return{success:!1,error:o.issues.map((r)=>p0(r)).join(", ")};return{success:!0,data:o.value}}function h0(e){let t=fc(e,{target:fl,io:"input"});return typeof t.pattern==="string"?t.pattern:void 0}var _0=/\\\.\\d\{(\d+)\}/;function f0(e){let t=_0.exec(e),o=[void 0,-1,0];if(t)o.push(Number(t[1]));return[!1,!0].flatMap((r)=>[!1,!0].flatMap((s)=>o.map((a)=>Dr({local:r,offset:s,precision:a}))))}function g0(e,t){let o;switch(e){case"email":o=[Of()];break;case"uri":o=[yc()];break;case"date":o=[rl()];break;case"date-time":o=f0(t);break}return new Set(o.map((r)=>h0(r)).filter((r)=>r!==void 0))}function v0(e,t,o){if(o!=="zod")return!0;return g0(e,t).has(t)}function hn(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function w0(e){try{return l0(e,"input")}catch(t){let o=t instanceof Error?t.message:String(t);throw new ae(W.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${o}`)}}var y0=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function Tl(e){return y0.has(e)||e.startsWith("x-")}var b0=new Set(["$schema",...Object.keys(lr.shape.requestedSchema.shape)]),_g={string:ln([ur,ls,ms,ps]),number:ln([dr]),integer:ln([dr]),boolean:ln([ds]),array:ln([hs,_s])},z0=new Set(ur.shape.format.unwrap().options);function S0(e,t,o,r){if(!hn(e))return e;let s=typeof e.type==="string"&&Object.hasOwn(_g,e.type)?_g[e.type]:void 0;if(s===void 0)return e;let a={};for(let[i,n]of Object.entries(e))if(s.has(i)||Tl(i))a[i]=n;else if(i==="pattern"&&e.type==="string"&&typeof e.format==="string"){if(!z0.has(e.format))a[i]=n;else if(typeof n!=="string"||!v0(e.format,n,o))r.push(`${t}.${i}`)}else r.push(`${t}.${i}`);return a}function k0(e,t){let o={},r=[];for(let[s,a]of Object.entries(e))if(s==="properties"&&hn(a))o[s]=Object.fromEntries(Object.entries(a).map(([i,n])=>[i,S0(n,`properties.${i}`,t,r)]));else if(b0.has(s))o[s]=a;else if(!Tl(s))r.push(s);if(r.length>0)throw new ae(W.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);return o}function x0(e,t){if(!hn(e.properties))return t;let o=Object.entries(e.properties).filter(([,r])=>!ru(fs,r).success).map(([r])=>`properties.${r}`);return o.length>0?o.join(", "):t}function gl(e,t,o=""){if(Array.isArray(e)&&Array.isArray(t))return e.flatMap((r,s)=>gl(r,t[s],`${o}[${s}]`));if(!hn(e)||!hn(t))return[];return Object.entries(e).flatMap(([r,s])=>{let a=o?`${o}.${r}`:r;if(!Object.prototype.hasOwnProperty.call(t,r))return Tl(r)?[]:[a];return gl(s,t[r],a)})}function R0(e){if(!_l(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,o=k0(w0(e.requestedSchema),t),r=ru(lr.shape.requestedSchema,o);if(!r.success)throw new ae(W.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${x0(o,r.error.message)}`);let s=gl(o,r.data);if(s.length>0)throw new ae(W.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${s.join(", ")}`);let a=(r.data.required??[]).filter((i)=>!Object.prototype.hasOwnProperty.call(r.data.properties,i));if(a.length>0)throw new ae(W.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(", ")}`);return{...e,mode:"form",requestedSchema:r.data}}function q0(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,o=typeof e.requestState==="string";if(!t&&!o)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 nq=Object.assign(q0,{elicit(e){try{return{method:"elicitation/create",params:R0(e)}}catch(t){throw t instanceof ae?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 P0=!0,j0=10,T0=250;function Wg(e){return{autoFulfill:e?.autoFulfill??P0,maxRounds:e?.maxRounds??j0}}function C0(e,t,o){let r=t!==void 0&&Object.keys(t).length>0;if(!r&&o===void 0)return e;return{...e,...r&&{inputResponses:t},...o!==void 0&&{requestState:o}}}function E0(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function $0(e,t){return new Promise((o,r)=>{if(t?.aborted){r(t.reason instanceof L?t.reason:new L(A.RequestTimeout,String(t.reason)));return}let s=setTimeout(()=>{t?.removeEventListener("abort",a),o()},e),a=()=>{clearTimeout(s),r(t?.reason instanceof L?t.reason:new L(A.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",a,{once:!0})})}function M0(e){let t=new AbortController,o=()=>t.abort(e?.reason);if(e?.addEventListener("abort",o,{once:!0}),e?.aborted)t.abort(e.reason);return{signal:t.signal,abort:(r)=>t.abort(r),dispose:()=>e?.removeEventListener("abort",o)}}async function I0(e){let{config:t,method:o,originalParams:r,requestOptions:s,hooks:a,signal:i}=e,n=e.flowStartedAt??Date.now(),u=e.firstPayload,d=0;while(!0){if(d+=1,d>t.maxRounds)throw new L(A.InputRequiredRoundsExceeded,E0(o,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:u.inputRequests,...u.requestState!==void 0&&{requestState:u.requestState}}});s.onprogress?.({progress:d,message:`Fulfilling input required by '${o}' (round ${d})`});let l=Object.entries(u.inputRequests??{}),p;if(l.length>0){let b=M0(i);try{let g=await Promise.all(l.map(async([w,R])=>{try{return[w,await a.dispatchInputRequest(w,R,b.signal)]}catch(P){throw b.abort(P),P}}));p=Object.fromEntries(g)}finally{b.dispose()}}else await $0(T0,i);let h={...s.timeout!==void 0&&{timeout:s.timeout}};if(s.maxTotalTimeout!==void 0){let b=Date.now()-n,g=s.maxTotalTimeout-b;if(g<=0)throw new L(A.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:s.maxTotalTimeout,totalElapsed:b});h.maxTotalTimeout=g}let v=await a.retry(C0(r,p,u.requestState),h);if(Dg(v)){u={inputRequests:v.inputRequests??{},...v.requestState!==void 0&&{requestState:v.requestState}};continue}return v}}var N0=["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"],O0={IdJagTokenExchangeResponseSchema:nn,OAuthClientInformationFullSchema:ws,OAuthClientInformationSchema:un,OAuthClientMetadataSchema:cn,OAuthClientRegistrationErrorSchema:Jc,OAuthErrorResponseSchema:hr,OAuthMetadataSchema:mr,OAuthProtectedResourceMetadataSchema:gs,OAuthTokenRevocationRequestSchema:Wc,OAuthTokensSchema:pr,OpenIdProviderDiscoveryMetadataSchema:vs,OpenIdProviderMetadataSchema:an},Gg={},Kg={};function Yg(e,t){let o=e.slice(0,-6);Gg[o]=t,Kg[o]=(r)=>t.safeParse(r).success}for(let e of N0)Yg(e,e0[e]);for(let[e,t]of Object.entries(O0))Yg(e,t);var A0=Object.freeze(Gg),Cl=Object.freeze(Kg);function L0(e){switch(e){case"initialize":case"notifications/initialized":return eo(void 0);case"server/discover":return eo(ou);default:return}}var gn=60000,U0=[Wt,Br,Xo,Fr],D0=["inputResponses","requestState"];function fg(e,t){let o=e.params;if(!pn(o))return{message:e,lifted:{}};let r=o._meta,s=pn(r)?U0.filter((u)=>(u in r)):[],a=t==="request"?D0.filter((u)=>(u in o)):[];if(s.length===0&&a.length===0)return{message:e,lifted:{}};let i={},n={...o};if(s.length>0&&pn(r)){let u={},d={...r};for(let l of s)u[l]=r[l],delete d[l];if(i.envelope=u,Object.keys(d).length>0)n._meta=d;else delete n._meta}for(let u of a){if(u==="inputResponses")i.inputResponses=n[u];if(u==="requestState")i.requestState=n[u];delete n[u]}return{message:{...e,params:n},lifted:i}}function gg(e,t){let o=e.validateResult(t,void 0);if(!o.ok&&o.reason==="not-in-era")return;return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let s=e.validateResult(t,r);if(s.ok)return{value:s.value};return{issues:[{message:s.reason==="invalid"?s.message:`not-in-era: ${t}`}]}}}}}function El(e){return()=>e}var Z0=El(void 0),B0,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{B0=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Sc,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 o=e.params??{};return{...e,params:{...o,_meta:{...t,...o._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,o,r,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:o,resetTimeoutOnProgress:s,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let o=Date.now()-t.startTime;if(t.maxTotalTimeout&&o>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new L(A.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:o});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 o=this.transport?.onerror;this._transport.onerror=(s)=>{o?.(s),this._onerror(s)};let r=this._transport?.onmessage;this._transport.onmessage=(s,a)=>{if(r?.(s,a),_r(s)||fr(s))this._onresponse(s);else if(ko(s))this._onrequest(s,a);else if(Ug(s))this._onnotification(s,a);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 r of this._timeoutInfo.values())clearTimeout(r.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let o=new L(A.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let r of e.values())r(o);for(let r of t.values())r.abort(o)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:o}=fg(e,"notification"),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let i=dg(t.classification);if(i!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${o.method}': classified as ${i} but this instance serves ${r.era}`));return}}if(ll(o.method)&&!r.hasNotificationMethod(o.method))return;let s=this._notificationHandlers.get(o.method),a=this.fallbackNotificationHandler;if(s===void 0&&a===void 0)return;Promise.resolve().then(()=>s===void 0?a(o):s(o,r)).catch((i)=>this._onerror(Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(e,t){let{message:o,lifted:r}=fg(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 a=this._transport,i=(g,w,R)=>{let P={jsonrpc:"2.0",id:o.id,error:{code:g,message:w,...R!==void 0&&{data:R}}};a?.send(P).catch((x)=>this._onerror(Error(`Failed to send an error response: ${x}`)))};if(t?.classification!==void 0){let g=dg(t.classification);if(g!==s.era){this._onerror(Error(`Era mismatch on inbound request '${o.method}': classified as ${g} but this instance serves ${s.era}`));let w=t.classification.revision??g;i(W.UnsupportedProtocolVersion,`Unsupported protocol version: ${w}`,{supported:this._supportedProtocolVersions,requested:w});return}}if(dl(o.method)&&!s.hasRequestMethod(o.method)&&!(lg(o.method)&&this._customSchemaRequestMethods.has(o.method))){i(W.MethodNotFound,"Method not found");return}let n=this._requestHandlers.get(o.method)??this.fallbackRequestHandler;if(n===void 0){i(W.MethodNotFound,"Method not found");return}let u=s.checkInboundEnvelope(r);if(u!==void 0){i(W.InvalidParams,u);return}let d=(g,w)=>this._notificationViaCodec(this._resolveOutboundCodec(g.method),g,{...w,relatedRequestId:o.id}),l=(g,w,R)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(g.method),g,w,{...R,relatedRequestId:o.id}),p=new AbortController;this._requestHandlerAbortControllers.set(o.id,p);let h=r.inputResponses===void 0?void 0:H0(r.inputResponses),v={sessionId:a?.sessionId,mcpReq:{id:o.id,method:o.method,_meta:o.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...h!==void 0&&{inputResponses:h.accepted},...h!==void 0&&h.droppedKeys.length>0&&{droppedInputResponseKeys:h.droppedKeys},requestState:r.requestState===void 0?Z0:El(r.requestState),signal:p.signal,send:(g,w,R)=>{let P=this._resolveOutboundCodec(g.method);if(this._assertOutboundRequestInEra(P,g.method),_l(w))return l(g,w,R);let x=gg(P,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(o,b)).then(async(g)=>{if(p.signal.aborted)return;let w;try{w=s.encodeResult(o.method,g,this._outboundServerInfo())}catch(P){this._onerror(Error(`Failed to encode result for ${o.method}: ${P}`)),i(W.InternalError,"Internal error");return}let R={result:w,jsonrpc:"2.0",id:o.id};await a?.send(R)},async(g)=>{if(p.signal.aborted)return;let w=Number.isSafeInteger(g.code)?g.code:W.InternalError,R={jsonrpc:"2.0",id:o.id,error:{code:s.encodeErrorCode(w),message:g.message??"Internal error",...g.data!==void 0&&{data:g.data}}};await a?.send(R)}).catch((g)=>this._onerror(Error(`Failed to send response: ${g}`))).finally(()=>{if(this._requestHandlerAbortControllers.get(o.id)===p)this._requestHandlerAbortControllers.delete(o.id)})}_onprogress(e){let{progressToken:t,...o}=e.params,r=Number(t),s=this._progressHandlers.get(r);if(!s){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),i=this._timeoutInfo.get(r);if(i&&a&&i.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(n){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(n);return}s(o)}_onresponse(e){let t=Number(e.id),o=this._responseHandlers.get(t);if(o===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),_r(e))o(e);else o(ae.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,o){let r=this._resolveOutboundCodec(e.method);if(_l(t)){if(!lg(e.method))this._assertOutboundRequestInEra(r,e.method);return this._requestWithSchemaViaCodec(r,e,t,o)}this._assertOutboundRequestInEra(r,e.method);let s=gg(r,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(r,e,s,t)}_negotiatedWireCodec(){return eo(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=L0(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(dl(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,o){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,o)}_requestWithSchemaViaCodec(e,t,o,r){let{relatedRequestId:s,resumptionToken:a,onresumptiontoken:i,headers:n}=r??{},u=Date.now(),d,l;return new Promise((p,h)=>{let v=(z)=>{h(z)};if(!this._transport){v(Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(z){v(z);return}if(r?.signal?.aborted){let z=r.signal.reason;throw z instanceof L?z:new L(A.RequestTimeout,String(z))}let b=e.era===ou&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,g=this._requestMessageId++;l=g;let w={...t,jsonrpc:"2.0",id:g};if(r?.onprogress)this._progressHandlers.set(g,r.onprogress),w.params={...t.params,_meta:{...t.params?._meta,progressToken:g}};let R=this._envelopeOutbound(w),P=!1,x=(z)=>{if(P)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(z)}}),{relatedRequestId:s,resumptionToken:a,onresumptiontoken:i}).catch((M)=>this._onerror(Error(`Failed to send cancellation: ${M}`)))}else b.abort();h(z instanceof L?z:new L(A.RequestTimeout,String(z)))};this._responseHandlers.set(g,(z)=>{if(r?.signal?.aborted)return;if(P=!0,z instanceof Error)return h(z);let M;try{M=e.decodeResult(t.method,z.result)}catch(K){return h(K instanceof Error?K:Error(String(K)))}if(M.kind==="invalid")return h(M.error);if(M.kind==="input_required"){if(r?.allowInputRequired===!0)return p(W0(M));let K={codec:e,request:t,resultSchema:o,options:r,flowStartedAt:u,retry:(se,pe)=>this._requestWithSchemaViaCodec(e,se===void 0?{method:t.method}:{method:t.method,params:se},o,pe)};return p(this._resolveNonCompleteResult(M,K))}let X=M.result;ml(o,X).then((K)=>{if(K.success)p(K.data);else h(new L(A.InvalidResult,`Invalid result for ${t.method}: ${K.error}`))},h)}),d=()=>x(r?.signal?.reason),r?.signal?.addEventListener("abort",d,{once:!0});let j=r?.timeout??gn,k=()=>x(new L(A.RequestTimeout,"Request timed out",{timeout:j}));this._setupTimeout(g,j,r?.maxTotalTimeout,k,r?.resetTimeoutOnProgress??!1),this._transport.send(R,{relatedRequestId:s,resumptionToken:a,onresumptiontoken:i,headers:n,requestSignal:b?.signal}).catch((z)=>{this._progressHandlers.delete(g),h(z)})}).finally(()=>{if(d)r?.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,o){if(!this._transport)throw new L(A.NotConnected,"Not connected");if(ll(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 r=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&o?.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(r,o).catch((s)=>this._onerror(s))});return}await this._transport.send(r,o)}setRequestHandler(e,t,o){this.assertRequestHandlerCapability(e);let r;if(typeof t==="function"){if(!dl(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(s,a)=>{let i=this._negotiatedWireCodec(),n=i.validateRequest(e,s);if(!n.ok&&n.reason==="not-in-era")n=i.validateInputRequest(e,s);if(!n.ok){if(n.reason==="not-in-era")throw new ae(W.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(n.message)}return Promise.resolve(t(n.value,a))}}else if(o)r=async(s,a)=>{let i=await ml(t.params,{...s.params});if(!i.success)throw new ae(W.InvalidParams,`Invalid params for ${e}: ${i.error}`);return o(i.data,a)};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,r))}_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,o){if(typeof t==="function"){if(!ll(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(r,s)=>{let a=s.validateNotification(e,r);if(!a.ok){if(a.reason==="not-in-era")throw new ae(W.InternalError,`No wire schema for ${e} in the resolved era`);throw Error(a.message)}return Promise.resolve(t(a.value))});return}if(!o)throw TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async(r)=>{let s=await ml(t.params,{...r.params});if(!s.success)throw new ae(W.InvalidParams,`Invalid params for notification ${e}: ${s.error}`);await o(s.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function pn(e){return e!==null&&typeof e==="object"&&!Array.isArray(e)}function $l(e,t){let o={...e};for(let r in t){let s=r,a=t[s];if(a===void 0)continue;let i=o[s];o[s]=pn(i)&&pn(a)?{...i,...a}:a}return o}function eu(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function H0(e){let t={},o=[];if(!eu(e))return{accepted:t,droppedKeys:o};for(let[r,s]of Object.entries(e)){if(!eu(s)||"method"in s||"result"in s){o.push(r);continue}t[r]=s}return{accepted:t,droppedKeys:o}}function vg(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 F0(e,t,o,r,s){return{sessionId:s,mcpReq:{id:e,method:t,_meta:o?._meta,requestState:El(void 0),signal:r,send:()=>vg("send"),notify:()=>vg("notify")}}}async function V0(e,t,o,r,s){if(!eu(r)||typeof r.method!=="string")throw new L(A.InvalidResult,`Invalid input request '${o}': each inputRequests entry must be an embedded request object with a method`,{key:o});let a=r.method;if(!t.hasInputRequestMethod(a))throw new L(A.InvalidResult,`Invalid input request '${o}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:o,method:a});let i=e.getRequestHandler(a);if(i===void 0)throw new L(A.CapabilityNotSupported,`Cannot fulfil input request '${o}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:o,method:a});let n=eu(r.params)?r.params:void 0;return await i({jsonrpc:"2.0",id:o,method:a,...n!==void 0&&{params:n}},e.buildContext(F0(o,a,n,s,e.sessionId)))}function J0(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 Xg(e,t,o,r){let{codec:s,request:a,options:i,flowStartedAt:n}=r,u={inputRequests:o.inputRequests,...o.requestState!==void 0&&{requestState:o.requestState}},d={dispatchInputRequest:(l,p,h)=>V0(e,s,l,p,h),retry:(l,p)=>r.retry(l,J0(i,p))};return I0({config:t,method:a.method,originalParams:a.params,firstPayload:u,flowStartedAt:n,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:d})}function W0(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}}}/*!
68
68
  * content-type
69
69
  * Copyright(c) 2015 Douglas Christopher Wilson
70
70
  * MIT Licensed
71
- */var G0=Fm((e)=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,o=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=s;function s(n){if(!n)throw TypeError("argument string is required");var u=typeof n==="object"?a(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(!r.test(l))throw TypeError("invalid media type");var p=new i(l.toLowerCase());if(d!==-1){var h,v,b;t.lastIndex=d;while(v=t.exec(u)){if(v.index!==d)throw TypeError("invalid parameter format");if(d+=v[0].length,h=v[1].toLowerCase(),b=v[2],b.charCodeAt(0)===34){if(b=b.slice(1,-1),b.indexOf("\\")!==-1)b=b.replace(o,"$1")}p.parameters[h]=b}if(d!==u.length)throw TypeError("invalid parameter format")}return p}function a(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 i(n){this.parameters=Object.create(null),this.type=n}}),K0=Jm(G0(),1);function Qg(e){if(!e)return;try{return K0.parse(e).type}catch{let t=(e.split(";",1)[0]??"").trim().toLowerCase();if(t===""||e.slice(t.length).includes(","))return;return t}}function wg(e){if(!e)return{};if(e instanceof Headers)return Object.fromEntries(e.entries());if(Array.isArray(e))return Object.fromEntries(e);return{...e}}function e1(e=fetch,t){if(!t)return e;return async(o,r)=>e(o,{...t,...r,headers:r?.headers?{...wg(t.headers),...wg(r.headers)}:t.headers})}var Y0=new Set([301,302,303,307,308]),X0=5;function Q0(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 t1(e,t){let o=Y0.has(t.status)?t.headers?.get("location"):void 0;if(!o)return;try{return new URL(o,e)}catch{return}}var o1=new WeakSet;function r1(e){let t=(o,r)=>e(o,r);return o1.add(t),t}function bs(e){if(o1.has(e))return e;return async(t,o)=>{if(o?.redirect==="error"||o?.redirect==="manual")return e(t,o);let r=(o?.method??"GET").toUpperCase(),s=t;for(let a=0;;a++){let i=await e(s,{...o,redirect:"manual"}),n=t1(s,i);if(!n||a===X0)return i;let u=new URL(s),d=r==="GET"||i.status===307||i.status===308,l=!(n.username||n.password)||n.username===u.username&&n.password===u.password;if(!d||!l||!Q0(u,n))return i;await i.text?.().catch(()=>{}),s=n}}}function s1(e,t){if(t.type==="opaqueredirect")return"Redirect not followed: this runtime does not expose where it points";let o=t1(t.url||e,t);if(!o)return;if(o.username=o.password=o.search=o.hash="",o.protocol==="http:"&&new URL(t.url||e).protocol==="https:")return o.protocol="https:",`Redirect from https to plain http not followed; try ${o.href} as the endpoint`;return`Redirect to ${o.href} not followed; use that URL as the endpoint if it is the intended server`}function wn(e,t){let o=typeof e;if(o!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=e.length;if(r!==t.length)return!1;for(let s=0;s<r;s++)if(!wn(e[s],t[s]))return!1;return!0}if(o==="object"){if(!e||!t)return e===t;let r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(let a of r)if(!wn(e[a],t[a]))return!1;return!0}return e===t}function vt(e){return encodeURI(ez(e))}function ez(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var tz={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},oz={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},rz={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},sz=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 gr(e,t=Object.create(null),o=sz,r=""){if(e&&typeof e==="object"&&!Array.isArray(e)){let a=e.$id||e.id;if(a){let i=new URL(a,o.href);if(i.hash.length>1)t[i.href]=e;else if(i.hash="",r==="")o=i;else gr(e,t,o)}}else if(e!==!0&&e!==!1)return t;let s=o.href+(r?"#"+r:"");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 a=new URL(e.$ref,o.href);a.hash=a.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:a.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let a=new URL(e.$recursiveRef,o.href);a.hash=a.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:a.href})}if(e.$anchor){let a=new URL("#"+e.$anchor,o.href);t[a.href]=e}for(let a in e){if(rz[a])continue;let i=`${r}/${vt(a)}`,n=e[a];if(Array.isArray(n)){if(tz[a]){let u=n.length;for(let d=0;d<u;d++)gr(n[d],t,o,`${i}/${d}`)}}else if(oz[a])for(let u in n)gr(n[u],t,o,`${i}/${vt(u)}`);else gr(n,t,o,i)}return t}var az=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,iz=[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,cz=/^(?=.{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,uz=/^(?:[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,dz=/^(?:(?:[^\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,mz=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,pz=/^(?:\/(?:[^~/]|~0|~1)*)*$/,hz=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,_z=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,fz=(e)=>{if(e[0]==='"')return!1;let[t,o,...r]=e.split("@");if(!t||!o||r.length!==0||t.length>64||o.length>253)return!1;if(t[0]==="."||t.endsWith(".")||t.includes(".."))return!1;if(!/^[a-z0-9.-]+$/i.test(o)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t))return!1;return o.split(".").every((s)=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(s))},gz=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,vz=/^((([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,wz=(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 a1={date:i1,time:n1.bind(void 0,!1),"date-time":zz,duration:wz,uri:xz,"uri-reference":Lt(uz),"uri-template":Lt(dz),url:Lt(lz),email:fz,hostname:Lt(cz),ipv4:Lt(gz),ipv6:Lt(vz),regex:qz,uuid:Lt(mz),"json-pointer":Lt(pz),"json-pointer-uri-fragment":Lt(hz),"relative-json-pointer":Lt(_z)};function yz(e){return e%4===0&&(e%100!==0||e%400===0)}function i1(e){let t=e.match(az);if(!t)return!1;let o=+t[1],r=+t[2],s=+t[3];return r>=1&&r<=12&&s>=1&&s<=(r==2&&yz(o)?29:iz[r])}function n1(e,t){let o=t.match(nz);if(!o)return!1;let r=+o[1],s=+o[2],a=+o[3],i=!!o[5];return(r<=23&&s<=59&&a<=59||r==23&&s==59&&a==60)&&(!e||i)}var bz=/t|\s/i;function zz(e){let t=e.split(bz);return t.length==2&&i1(t[0])&&n1(!0,t[1])}var Sz=/\/|:/,kz=/^(?:[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 xz(e){return Sz.test(e)&&kz.test(e)}var Rz=/[^\\]\\Z/;function qz(e){if(Rz.test(e))return!1;try{return new RegExp(e,"u"),!0}catch(t){return!1}}function Pz(e){let t=0,o=e.length,r=0,s;while(r<o)if(t++,s=e.charCodeAt(r++),s>=55296&&s<=56319&&r<o){if(s=e.charCodeAt(r),(s&64512)==56320)r++}return t}function we(e,t,o="2019-09",r=gr(t),s=!0,a=null,i="#",n="#",u=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 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:p,$recursiveRef:h,$recursiveAnchor:v,type:b,const:g,enum:w,required:R,not:P,anyOf:x,allOf:j,oneOf:k,if:z,then:M,else:X,format:K,properties:se,patternProperties:pe,additionalProperties:oe,unevaluatedProperties:V,minProperties:te,maxProperties:le,propertyNames:St,dependentRequired:Be,dependentSchemas:it,dependencies:kt,prefixItems:Xe,items:Ne,additionalItems:Bt,unevaluatedItems:Ht,contains:xt,minContains:Te,maxContains:Oe,minItems:Ae,maxItems:lt,uniqueItems:Mo,minimum:Qe,maximum:et,exclusiveMinimum:He,exclusiveMaximum:nt,multipleOf:ct,minLength:Rt,maxLength:qt,pattern:ao,__absolute_ref__:Pt,__absolute_recursive_ref__:Io}=t,N=[];if(v===!0&&a===null)a=t;if(h==="#"){let F=a===null?r[Io]:a,U=`${n}/$recursiveRef`,Q=we(e,a===null?t:a,o,r,s,F,i,U,u);if(!Q.valid)N.push({instanceLocation:i,keyword:"$recursiveRef",keywordLocation:U,error:"A subschema had errors."},...Q.errors)}if(p!==void 0){let F=r[Pt||p];if(F===void 0){let O=`Unresolved $ref "${p}".`;if(Pt&&Pt!==p)O+=` Absolute URI "${Pt}".`;throw O+=`
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+=`
72
72
  Known schemas:
73
- - ${Object.keys(r).join(`
74
- - `)}`,Error(O)}let U=`${n}/$ref`,Q=we(e,F,o,r,s,a,i,U,u);if(!Q.valid)N.push({instanceLocation:i,keyword:"$ref",keywordLocation:U,error:"A subschema had errors."},...Q.errors);if(o==="4"||o==="7")return{valid:N.length===0,errors:N}}if(Array.isArray(b)){let F=b.length,U=!1;for(let Q=0;Q<F;Q++)if(l===b[Q]||b[Q]==="integer"&&l==="number"&&e%1===0&&e===e){U=!0;break}if(!U)N.push({instanceLocation:i,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)N.push({instanceLocation:i,keyword:"type",keywordLocation:`${n}/type`,error:`Instance type "${l}" is invalid. Expected "${b}".`})}else if(b!==void 0&&l!==b)N.push({instanceLocation:i,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))N.push({instanceLocation:i,keyword:"const",keywordLocation:`${n}/const`,error:`Instance does not match ${JSON.stringify(g)}.`})}else if(e!==g)N.push({instanceLocation:i,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((F)=>wn(e,F)))N.push({instanceLocation:i,keyword:"enum",keywordLocation:`${n}/enum`,error:`Instance does not match any of ${JSON.stringify(w)}.`})}else if(!w.some((F)=>e===F))N.push({instanceLocation:i,keyword:"enum",keywordLocation:`${n}/enum`,error:`Instance does not match any of ${JSON.stringify(w)}.`})}if(P!==void 0){let F=`${n}/not`;if(we(e,P,o,r,s,a,i,F).valid)N.push({instanceLocation:i,keyword:"not",keywordLocation:F,error:'Instance matched "not" schema.'})}let jt=[];if(x!==void 0){let F=`${n}/anyOf`,U=N.length,Q=!1;for(let O=0;O<x.length;O++){let I=x[O],G=Object.create(u),J=we(e,I,o,r,s,v===!0?a:null,i,`${F}/${O}`,G);if(N.push(...J.errors),Q=Q||J.valid,J.valid)jt.push(G)}if(Q)N.length=U;else N.splice(U,0,{instanceLocation:i,keyword:"anyOf",keywordLocation:F,error:"Instance does not match any subschemas."})}if(j!==void 0){let F=`${n}/allOf`,U=N.length,Q=!0;for(let O=0;O<j.length;O++){let I=j[O],G=Object.create(u),J=we(e,I,o,r,s,v===!0?a:null,i,`${F}/${O}`,G);if(N.push(...J.errors),Q=Q&&J.valid,J.valid)jt.push(G)}if(Q)N.length=U;else N.splice(U,0,{instanceLocation:i,keyword:"allOf",keywordLocation:F,error:"Instance does not match every subschema."})}if(k!==void 0){let F=`${n}/oneOf`,U=N.length,Q=k.filter((O,I)=>{let G=Object.create(u),J=we(e,O,o,r,s,v===!0?a:null,i,`${F}/${I}`,G);if(N.push(...J.errors),J.valid)jt.push(G);return J.valid}).length;if(Q===1)N.length=U;else N.splice(U,0,{instanceLocation:i,keyword:"oneOf",keywordLocation:F,error:`Instance does not match exactly one subschema (${Q} matches).`})}if(l==="object"||l==="array")Object.assign(u,...jt);if(z!==void 0){let F=`${n}/if`;if(we(e,z,o,r,s,a,i,F,u).valid){if(M!==void 0){let U=we(e,M,o,r,s,a,i,`${n}/then`,u);if(!U.valid)N.push({instanceLocation:i,keyword:"if",keywordLocation:F,error:'Instance does not match "then" schema.'},...U.errors)}}else if(X!==void 0){let U=we(e,X,o,r,s,a,i,`${n}/else`,u);if(!U.valid)N.push({instanceLocation:i,keyword:"if",keywordLocation:F,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))N.push({instanceLocation:i,keyword:"required",keywordLocation:`${n}/required`,error:`Instance does not have required property "${O}".`})}let F=Object.keys(e);if(te!==void 0&&F.length<te)N.push({instanceLocation:i,keyword:"minProperties",keywordLocation:`${n}/minProperties`,error:`Instance does not have at least ${te} properties.`});if(le!==void 0&&F.length>le)N.push({instanceLocation:i,keyword:"maxProperties",keywordLocation:`${n}/maxProperties`,error:`Instance does not have at least ${le} properties.`});if(St!==void 0){let O=`${n}/propertyNames`;for(let I in e){let G=`${i}/${vt(I)}`,J=we(I,St,o,r,s,a,G,O);if(!J.valid)N.push({instanceLocation:i,keyword:"propertyNames",keywordLocation:O,error:`Property name "${I}" does not match schema.`},...J.errors)}}if(Be!==void 0){let O=`${n}/dependantRequired`;for(let I in Be)if(I in e){let G=Be[I];for(let J of G)if(!(J in e))N.push({instanceLocation:i,keyword:"dependentRequired",keywordLocation:O,error:`Instance has "${I}" but does not have "${J}".`})}}if(it!==void 0)for(let O in it){let I=`${n}/dependentSchemas`;if(O in e){let G=we(e,it[O],o,r,s,a,i,`${I}/${vt(O)}`,u);if(!G.valid)N.push({instanceLocation:i,keyword:"dependentSchemas",keywordLocation:I,error:`Instance has "${O}" but does not match dependant schema.`},...G.errors)}}if(kt!==void 0){let O=`${n}/dependencies`;for(let I in kt)if(I in e){let G=kt[I];if(Array.isArray(G)){for(let J of G)if(!(J in e))N.push({instanceLocation:i,keyword:"dependencies",keywordLocation:O,error:`Instance has "${I}" but does not have "${J}".`})}else{let J=we(e,G,o,r,s,a,i,`${O}/${vt(I)}`);if(!J.valid)N.push({instanceLocation:i,keyword:"dependencies",keywordLocation:O,error:`Instance has "${I}" but does not match dependant schema.`},...J.errors)}}}let U=Object.create(null),Q=!1;if(se!==void 0){let O=`${n}/properties`;for(let I in se){if(!(I in e))continue;let G=`${i}/${vt(I)}`,J=we(e[I],se[I],o,r,s,a,G,`${O}/${vt(I)}`);if(J.valid)u[I]=U[I]=!0;else if(Q=s,N.push({instanceLocation:i,keyword:"properties",keywordLocation:O,error:`Property "${I}" does not match schema.`},...J.errors),Q)break}}if(!Q&&pe!==void 0){let O=`${n}/patternProperties`;for(let I in pe){let G=new RegExp(I,"u"),J=pe[I];for(let ze in e){if(!G.test(ze))continue;let No=`${i}/${vt(ze)}`,Tt=we(e[ze],J,o,r,s,a,No,`${O}/${vt(I)}`);if(Tt.valid)u[ze]=U[ze]=!0;else Q=s,N.push({instanceLocation:i,keyword:"patternProperties",keywordLocation:O,error:`Property "${ze}" matches pattern "${I}" but does not match associated schema.`},...Tt.errors)}}}if(!Q&&oe!==void 0){let O=`${n}/additionalProperties`;for(let I in e){if(U[I])continue;let G=`${i}/${vt(I)}`,J=we(e[I],oe,o,r,s,a,G,O);if(J.valid)u[I]=!0;else Q=s,N.push({instanceLocation:i,keyword:"additionalProperties",keywordLocation:O,error:`Property "${I}" does not match additional properties schema.`},...J.errors)}}else if(!Q&&V!==void 0){let O=`${n}/unevaluatedProperties`;for(let I in e)if(!u[I]){let G=`${i}/${vt(I)}`,J=we(e[I],V,o,r,s,a,G,O);if(J.valid)u[I]=!0;else N.push({instanceLocation:i,keyword:"unevaluatedProperties",keywordLocation:O,error:`Property "${I}" does not match unevaluated properties schema.`},...J.errors)}}}else if(l==="array"){if(lt!==void 0&&e.length>lt)N.push({instanceLocation:i,keyword:"maxItems",keywordLocation:`${n}/maxItems`,error:`Array has too many items (${e.length} > ${lt}).`});if(Ae!==void 0&&e.length<Ae)N.push({instanceLocation:i,keyword:"minItems",keywordLocation:`${n}/minItems`,error:`Array has too few items (${e.length} < ${Ae}).`});let F=e.length,U=0,Q=!1;if(Xe!==void 0){let O=`${n}/prefixItems`,I=Math.min(Xe.length,F);for(;U<I;U++){let G=we(e[U],Xe[U],o,r,s,a,`${i}/${U}`,`${O}/${U}`);if(u[U]=!0,!G.valid){if(Q=s,N.push({instanceLocation:i,keyword:"prefixItems",keywordLocation:O,error:"Items did not match schema."},...G.errors),Q)break}}}if(Ne!==void 0){let O=`${n}/items`;if(Array.isArray(Ne)){let I=Math.min(Ne.length,F);for(;U<I;U++){let G=we(e[U],Ne[U],o,r,s,a,`${i}/${U}`,`${O}/${U}`);if(u[U]=!0,!G.valid){if(Q=s,N.push({instanceLocation:i,keyword:"items",keywordLocation:O,error:"Items did not match schema."},...G.errors),Q)break}}}else for(;U<F;U++){let I=we(e[U],Ne,o,r,s,a,`${i}/${U}`,O);if(u[U]=!0,!I.valid){if(Q=s,N.push({instanceLocation:i,keyword:"items",keywordLocation:O,error:"Items did not match schema."},...I.errors),Q)break}}if(!Q&&Bt!==void 0){let I=`${n}/additionalItems`;for(;U<F;U++){let G=we(e[U],Bt,o,r,s,a,`${i}/${U}`,I);if(u[U]=!0,!G.valid)Q=s,N.push({instanceLocation:i,keyword:"additionalItems",keywordLocation:I,error:"Items did not match additional items schema."},...G.errors)}}}if(xt!==void 0)if(F===0&&Te===void 0)N.push({instanceLocation:i,keyword:"contains",keywordLocation:`${n}/contains`,error:"Array is empty. It must contain at least one item matching the schema."});else if(Te!==void 0&&F<Te)N.push({instanceLocation:i,keyword:"minContains",keywordLocation:`${n}/minContains`,error:`Array has less items (${F}) than minContains (${Te}).`});else{let O=`${n}/contains`,I=N.length,G=0;for(let J=0;J<F;J++){let ze=we(e[J],xt,o,r,s,a,`${i}/${J}`,O);if(ze.valid)u[J]=!0,G++;else N.push(...ze.errors)}if(G>=(Te||0))N.length=I;if(Te===void 0&&Oe===void 0&&G===0)N.splice(I,0,{instanceLocation:i,keyword:"contains",keywordLocation:O,error:"Array does not contain item matching schema."});else if(Te!==void 0&&G<Te)N.push({instanceLocation:i,keyword:"minContains",keywordLocation:`${n}/minContains`,error:`Array must contain at least ${Te} items matching schema. Only ${G} items were found.`});else if(Oe!==void 0&&G>Oe)N.push({instanceLocation:i,keyword:"maxContains",keywordLocation:`${n}/maxContains`,error:`Array may contain at most ${Oe} items matching schema. ${G} items were found.`})}if(!Q&&Ht!==void 0){let O=`${n}/unevaluatedItems`;for(;U<F;U++){if(u[U])continue;let I=we(e[U],Ht,o,r,s,a,`${i}/${U}`,O);if(u[U]=!0,!I.valid)N.push({instanceLocation:i,keyword:"unevaluatedItems",keywordLocation:O,error:"Items did not match unevaluated items schema."},...I.errors)}}if(Mo)for(let O=0;O<F;O++){let I=e[O],G=typeof I==="object"&&I!==null;for(let J=0;J<F;J++){if(O===J)continue;let ze=e[J];if(I===ze||G&&typeof ze==="object"&&ze!==null&&wn(I,ze))N.push({instanceLocation:i,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(o==="4"){if(Qe!==void 0&&(He===!0&&e<=Qe||e<Qe))N.push({instanceLocation:i,keyword:"minimum",keywordLocation:`${n}/minimum`,error:`${e} is less than ${He?"or equal to ":""} ${Qe}.`});if(et!==void 0&&(nt===!0&&e>=et||e>et))N.push({instanceLocation:i,keyword:"maximum",keywordLocation:`${n}/maximum`,error:`${e} is greater than ${nt?"or equal to ":""} ${et}.`})}else{if(Qe!==void 0&&e<Qe)N.push({instanceLocation:i,keyword:"minimum",keywordLocation:`${n}/minimum`,error:`${e} is less than ${Qe}.`});if(et!==void 0&&e>et)N.push({instanceLocation:i,keyword:"maximum",keywordLocation:`${n}/maximum`,error:`${e} is greater than ${et}.`});if(He!==void 0&&e<=He)N.push({instanceLocation:i,keyword:"exclusiveMinimum",keywordLocation:`${n}/exclusiveMinimum`,error:`${e} is less than ${He}.`});if(nt!==void 0&&e>=nt)N.push({instanceLocation:i,keyword:"exclusiveMaximum",keywordLocation:`${n}/exclusiveMaximum`,error:`${e} is greater than or equal to ${nt}.`})}if(ct!==void 0){let F=e%ct;if(Math.abs(0-F)>=0.00000011920929&&Math.abs(ct-F)>=0.00000011920929)N.push({instanceLocation:i,keyword:"multipleOf",keywordLocation:`${n}/multipleOf`,error:`${e} is not a multiple of ${ct}.`})}}else if(l==="string"){let F=Rt===void 0&&qt===void 0?0:Pz(e);if(Rt!==void 0&&F<Rt)N.push({instanceLocation:i,keyword:"minLength",keywordLocation:`${n}/minLength`,error:`String is too short (${F} < ${Rt}).`});if(qt!==void 0&&F>qt)N.push({instanceLocation:i,keyword:"maxLength",keywordLocation:`${n}/maxLength`,error:`String is too long (${F} > ${qt}).`});if(ao!==void 0&&!new RegExp(ao,"u").test(e))N.push({instanceLocation:i,keyword:"pattern",keywordLocation:`${n}/pattern`,error:"String does not match pattern."});if(K!==void 0&&a1[K]&&!a1[K](e))N.push({instanceLocation:i,keyword:"format",keywordLocation:`${n}/format`,error:`String does not match format "${K}".`})}return{valid:N.length===0,errors:N}}var jz=class{schema;draft;shortCircuit;lookup;constructor(e,t="2019-09",o=!0){this.schema=e,this.draft=t,this.shortCircuit=o,this.lookup=gr(e)}validate(e){return we(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){if(t)e={...e,$id:t};gr(e,this.lookup)}},su=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=Km(e,"pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.");return t==="draft-7"?"7":t}getValidator(e){let t=new jz(e,this.draft??this._draftFor(e),this.shortcircuit);return(o)=>{let r=t.validate(o);return r.valid?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:r.errors.map((s)=>`${s.instanceLocation}: ${s.error}`).join("; ")}}}};var c1=!0;var Ml;Ml=globalThis.crypto;async function Tz(e){return(await Ml).getRandomValues(new Uint8Array(e))}async function Cz(e){let o=Math.pow(2,8)-Math.pow(2,8)%66,r="";while(r.length<e){let s=await Tz(e-r.length);for(let a of s)if(a<o)r+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"[a%66]}return r}async function Ez(e){return await Cz(e)}async function $z(e){let t=await(await Ml).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 Ez(e),o=await $z(t);return{code_verifier:t,code_challenge:o}}var zs=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,zo(this,new.target)}},cu=class extends zs{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.IssuerMismatchError"})}kind;expected;received;constructor(e,t,o){super(`Issuer mismatch in ${e==="metadata"?"authorization server metadata (RFC 8414 §3.3)":"authorization response (RFC 9207)"}: expected ${JSON.stringify(t)}, received ${JSON.stringify(o)}`);this.kind=e,this.expected=t,this.received=o}},v1=class extends zs{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}},Fl=class extends zs{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}},yn=class extends zs{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}},Vl=class extends zs{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 Zl(e,t,o){if(!e)return;if(typeof e.issuer!=="string"){if(o?.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 w1(e.issuer,t)?e:void 0}function w1(e,t){return e===t||e.endsWith("/")&&e.slice(0,-1)===t||t.endsWith("/")&&t.slice(0,-1)===e}function y1(e){if(e==null)return!1;let t=e;return typeof t.tokens==="function"&&typeof t.clientInformation==="function"}async function Mz(e,t,o){let{resourceMetadataUrl:r,scope:s}=Ss(t.response);if(await lu(e,{serverUrl:t.serverUrl,resourceMetadataUrl:r,scope:s,fetchFn:t.fetchFn,...o})!=="AUTHORIZED")throw new wt}function b1(e,t){return{token:async()=>(await e.tokens())?.access_token,onUnauthorized:async(o)=>Mz(e,o,t)}}var wt=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",zo(this,new.target)}};function Jl(e){return e?.authorization_response_iss_parameter_supported===!0}function uu({iss:e,expectedIssuer:t,issParameterSupported:o}){if(t===void 0)return;if(e===void 0){if(o)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 o of e){if(!o)continue;for(let r of o.split(/\s+/))if(r)t.add(r)}return t.size>0?[...t].join(" "):void 0}function z1(e,t){if(!e)return!1;let o=new Set((t??"").split(/\s+/).filter(Boolean));for(let r of e.split(/\s+/))if(r&&!o.has(r))return!0;return!1}async function S1(e,t,o,r,s){if(typeof e==="string")return{authorizationCode:e,iss:t};let a=e.get("iss")??void 0,i=e.get("code");if(i)return{authorizationCode:i,iss:a};let n=(await o.discoveryState?.())?.authorizationServerMetadata;if(!n)try{n=(await Kl(r,s)).authorizationServerMetadata}catch{n=void 0}if(!n)throw new wt("Authorization callback failed and the issuer could not be verified");uu({iss:a,expectedIssuer:n.issuer,issParameterSupported:Jl(n)});let u=e.get("error");if(u)throw new So(u,e.get("error_description")??u,e.get("error_uri")??void 0);throw new wt("Authorization callback contained neither `code` nor `error`")}function Iz(e){return["client_secret_basic","client_secret_post","none"].includes(e)}var Nl="code",Ol="S256";function k1(e,t){let o=e.client_secret!==void 0;if("token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Iz(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 o?"client_secret_basic":"none";if(o&&t.includes("client_secret_basic"))return"client_secret_basic";if(o&&t.includes("client_secret_post"))return"client_secret_post";if(t.includes("none"))return"none";return o?"client_secret_post":"none"}function x1(e,t,o,r){let{client_id:s,client_secret:a}=t;switch(e){case"client_secret_basic":Nz(s,a,o);return;case"client_secret_post":Oz(s,a,r);return;case"none":Az(s,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function Nz(e,t,o){if(!t)throw Error("client_secret_basic authentication requires a client_secret");let r=btoa(`${e}:${t}`);o.set("Authorization",`Basic ${r}`)}function Oz(e,t,o){if(o.set("client_id",e),t)o.set("client_secret",t)}function Az(e,t){t.set("client_id",e)}function R1(e){return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="[::1]"||e==="::1"}function q1(e){let t=new URL(String(e));if(t.protocol!=="https:"&&!R1(t.hostname))throw new Fl(t.href);return t}function Lz(e){for(let t of e??[]){let o;try{o=new URL(t)}catch{continue}if(o.protocol!=="http:"&&o.protocol!=="https:")return"native";if(R1(o.hostname))return"native"}return"web"}function P1(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??Lz(t.redirect_uris)}}async function Bl(e){let t=e instanceof Response?e.status:void 0,o=e instanceof Response?await e.text():e;try{let r=hr.parse(JSON.parse(o));return So.fromResponse(r)}catch(r){let s=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${o}`;return new So(Ot.ServerError,s)}}function u1(e,t,o){let r=e.invalidateCredentials===void 0?`retrying authorization without discarding the stored ${o} (provider implements no invalidateCredentials())`:`invalidating the stored ${o} and retrying authorization`;console.warn(`[mcp-sdk] OAuth ${JSON.stringify(t.code)} — ${r}. Cause: ${JSON.stringify(t.message)}`)}async function lu(e,t){try{return await Al(e,t)}catch(o){if(o instanceof So){if(o.code===Ot.InvalidClient||o.code===Ot.UnauthorizedClient)return u1(e,o,"client credentials and tokens"),await e.invalidateCredentials?.("client"),await e.invalidateCredentials?.("tokens"),await Al(e,t);else if(o.code===Ot.InvalidGrant||o.code===Ot.InvalidDpopProof)return u1(e,o,"tokens"),await e.invalidateCredentials?.("tokens"),await Al(e,t)}throw o}}function Uz(e){let{requestedScope:t,resourceMetadata:o,authServerMetadata:r,clientMetadata:s}=e,a=t||o?.scopes_supported?.join(" ")||s.scope;if(a&&r?.scopes_supported?.includes("offline_access")&&!a.split(" ").includes("offline_access")&&s.grant_types?.includes("refresh_token"))a=`${a} offline_access`;return a}async function Al(e,{serverUrl:t,authorizationCode:o,iss:r,scope:s,resourceMetadataUrl:a,fetchFn:i,skipIssuerMetadataValidation:n,forceReauthorization:u}){let d=P1(e),l=await e.discoveryState?.(),p,h,v,b,g=a;if(!g&&l?.resourceMetadataUrl)g=new URL(l.resourceMetadataUrl);if(l?.authorizationServerUrl){if(h=l.authorizationServerUrl,p=l.resourceMetadata,v=l.authorizationServerMetadata??await Gl(h,{fetchFn:i,skipIssuerValidation:n}),!p)try{p=await Wl(t,{resourceMetadataUrl:g},i)}catch(oe){if(oe instanceof TypeError)throw oe}if(v!==l.authorizationServerMetadata||p!==l.resourceMetadata)await e.saveDiscoveryState?.({authorizationServerUrl:String(h),resourceMetadataUrl:g?.toString(),resourceMetadata:p,authorizationServerMetadata:v})}else{let oe=await Kl(t,{resourceMetadataUrl:g,fetchFn:i,skipIssuerMetadataValidation:n});h=oe.authorizationServerUrl,v=oe.authorizationServerMetadata,p=oe.resourceMetadata,b={authorizationServerUrl:String(h),resourceMetadataUrl:g?.toString(),resourceMetadata:p,authorizationServerMetadata:v}}let w=v?.issuer??String(h),R={issuer:w};if(await e.saveAuthorizationServerUrl?.(w),o!==void 0){let oe=l?.authorizationServerMetadata?.issuer??l?.authorizationServerUrl;if(oe===void 0){if(e.saveDiscoveryState!==void 0)throw new yn("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(!w1(oe,w))throw new yn(oe,w)}if(b)await e.saveDiscoveryState?.(b);let P=await T1(t,e,p),x=P&&p&&!e.validateResourceURL?p.resource:P;if(x)await e.saveResourceUrl?.(Yl(x));let j=Uz({requestedScope:s,resourceMetadata:p,authServerMetadata:v,clientMetadata:e.clientMetadata}),k=await Promise.resolve(e.clientInformation(R)),z=Zl(k,w,{canPersistStamp:e.saveClientInformation!==void 0});if(z===void 0&&k?.issuer&&e.saveClientInformation===void 0)throw new yn(k.issuer,w);if(z&&z.issuer===void 0)z={...z,issuer:w},await e.saveClientInformation?.(z,R);if(!z){if(o!==void 0)throw Error("Existing OAuth client information is required when exchanging an authorization code");let oe=v?.client_id_metadata_document_supported===!0,V=e.clientMetadataUrl;if(V&&!j1(V))throw new So(Ot.InvalidClientMetadata,`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${V}`);if(oe&&V)z={client_id:V,issuer:w},await e.saveClientInformation?.(z,R);else{if(!e.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");z={...await A1(h,{metadata:v,clientMetadata:d,scope:j,fetchFn:i}),issuer:w},await e.saveClientInformation(z,R)}}let M=!e.redirectUrl;if(o!==void 0||M){if(o!==void 0)uu({iss:r,expectedIssuer:v?.issuer,issParameterSupported:Jl(v)});let oe=await O1(e,h,{metadata:v,resource:x,authorizationCode:o,iss:r,scope:j,fetchFn:i});return await e.saveTokens({...oe,issuer:w},R),"AUTHORIZED"}let X=Zl(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 oe=await e.scopeForRefresh?.(X),V;try{V=await N1(h,{metadata:v,clientInformation:z,refreshToken:X.refresh_token,scope:oe,resource:x,addClientAuthentication:e.addClientAuthentication,dpop:await e.dpop?.(),fetchFn:i})}catch(te){if(te instanceof Fl)throw te;if(!(te instanceof So)||te.code===Ot.ServerError)console.warn(`[mcp-sdk] Could not refresh OAuth tokens; falling back to a new authorization request. Cause: ${JSON.stringify(te instanceof Error?te.message:String(te))}`);else throw te}if(V)return await e.saveTokens({...V,issuer:w},R),"AUTHORIZED"}let K=e.state?await e.state():void 0,{authorizationUrl:se,codeVerifier:pe}=await $1(h,{metadata:v,clientInformation:z,state:K,redirectUrl:e.redirectUrl,scope:j,resource:x});return await e.saveCodeVerifier(pe),await e.redirectToAuthorization(se),"REDIRECT"}function j1(e){if(!e)return!1;try{let t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function T1(e,t,o){let r=vl(e);if(t.validateResourceURL)return await t.validateResourceURL(r,o?.resource);if(!o)return;if(!wl({requestedResource:r,configuredResource:o.resource}))throw Error(`Protected resource ${o.resource} does not match expected ${r} (or origin)`);return new URL(o.resource)}var Dz=new Set(["bearer","dpop"]);function Ss(e){let t=e.headers.get("WWW-Authenticate");if(!t)return{};let[o,r]=t.split(" ");if(!o||!Dz.has(o.toLowerCase())||!r)return{};let s=au(e,"resource_metadata")||void 0,a;if(s)try{a=new URL(s)}catch{}let i=au(e,"scope")||void 0,n=au(e,"error")||void 0,u=au(e,"error_description")||void 0;return{resourceMetadataUrl:a,scope:i,error:n,errorDescription:u}}function au(e,t){let o=e.headers.get("WWW-Authenticate");if(!o)return null;let r=new RegExp(String.raw`${t}=(?:"([^"]+)"|([^\s,]+))`),s=o.match(r);if(s){let a=s[1]||s[2];if(a)return a}return null}async function Wl(e,t,o=fetch){let r=await Hz(e,"oauth-protected-resource",o,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.text?.().catch(()=>{}),Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.text?.().catch(()=>{}),Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return gs.parse(await r.json())}async function C1(e,t,o=fetch){let r=bs(o);try{return await r(e,{headers:t})}catch(s){if(!(s instanceof TypeError)||!c1)throw s;if(t)try{return await r(e,{})}catch(a){if(!(a instanceof TypeError))throw a;return}return}}function Zz(e,t="",o={}){if(t.endsWith("/"))t=t.slice(0,-1);return o.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function d1(e,t,o=fetch){return await C1(e,{"MCP-Protocol-Version":t},o)}function Bz(e,t){if(!e)return!0;if(t==="/")return!1;return!e.ok&&e.status<500||e.status===502}async function Hz(e,t,o,r){let s=new URL(e),a=r?.protocolVersion??Yo,i;if(r?.metadataUrl)i=new URL(r.metadataUrl);else{let u=Zz(t,s.pathname);i=new URL(u,r?.metadataServerUrl??s),i.search=s.search}let n=await d1(i,a,o);if(!r?.metadataUrl&&Bz(n,s.pathname))n=await d1(new URL(`/.well-known/${t}`,s),a,o);return n}function E1(e){let t=typeof e==="string"?new URL(e):e,o=t.pathname!=="/",r=[];if(!o)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"},{url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let s=t.pathname;if(s.endsWith("/"))s=s.slice(0,-1);return r.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"}),r}async function Gl(e,{fetchFn:t=fetch,protocolVersion:o=Yo,skipIssuerValidation:r=!1}={}){let s={"MCP-Protocol-Version":o,Accept:"application/json"},a=E1(e);for(let{url:i,type:n}of a){let u=await C1(i,s,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 ${i}`)}let d=n==="oauth"?mr.parse(await u.json()):vs.parse(await u.json());if(!r){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 Kl(e,t){let o,r;try{if(o=await Wl(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),o.authorization_servers&&o.authorization_servers.length>0)r=o.authorization_servers[0]}catch(a){if(a instanceof TypeError)throw a}if(!r)r=String(new URL("/",e));let s=await Gl(r,{fetchFn:t?.fetchFn,skipIssuerValidation:t?.skipIssuerMetadataValidation});return{authorizationServerUrl:r,authorizationServerMetadata:s,resourceMetadata:o}}function Yl(e){return typeof e==="string"?e:e.href}async function $1(e,{metadata:t,clientInformation:o,redirectUrl:r,scope:s,state:a,resource:i}){let n;if(t){if(n=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Nl))throw Error(`Incompatible auth server: does not support response type ${Nl}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Ol))throw Error(`Incompatible auth server: does not support code challenge method ${Ol}`)}else n=new URL("/authorize",e);let u=await Il(),{code_verifier:d,code_challenge:l}=u;if(n.searchParams.set("response_type",Nl),n.searchParams.set("client_id",o.client_id),n.searchParams.set("code_challenge",l),n.searchParams.set("code_challenge_method",Ol),n.searchParams.set("redirect_uri",String(r)),a)n.searchParams.set("state",a);if(s)n.searchParams.set("scope",s);if(s?.split(" ").includes("offline_access"))n.searchParams.append("prompt","consent");if(i)n.searchParams.set("resource",Yl(i));return{authorizationUrl:n,codeVerifier:d}}function M1(e,t,o){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(o)})}async function I1(e,{metadata:t,tokenRequestParams:o,clientInformation:r,addClientAuthentication:s,resource:a,dpop:i,fetchFn:n}){let u=q1(t?.token_endpoint??new URL("/token",e)),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(a)o.set("resource",Yl(a));if(!s&&r)x1(k1(r,t?.token_endpoint_auth_methods_supported??[]),r,d,o);let l=async()=>{let v=new Headers(d);if(s)await s(v,o,u,t);if(i)v.set("DPoP",await i.buildProof({htm:"POST",htu:u}));return bs(n??fetch)(u,{method:"POST",headers:v,body:o})},p=await l();if(i&&p.status===400){if((await p.clone().json().catch(()=>{}))?.error===Ot.UseDpopNonce)i.observeNonce(p,u),p=await l()}if(i?.observeNonce(p,u),!p.ok)throw await Bl(p);let h=await p.json();try{return pr.parse(tu(h))}catch(v){if(typeof h==="object"&&h!==null&&"error"in h)throw await Bl(JSON.stringify(h));throw v}}async function N1(e,{metadata:t,clientInformation:o,refreshToken:r,scope:s,resource:a,addClientAuthentication:i,dpop:n,fetchFn:u}){let d=new URLSearchParams({grant_type:"refresh_token",refresh_token:r});if(s)d.set("scope",s);let l=await I1(e,{metadata:t,tokenRequestParams:d,clientInformation:o,addClientAuthentication:i,resource:a,dpop:n,fetchFn:u});return{refresh_token:r,...l,...s&&!l.scope&&{scope:s}}}async function O1(e,t,{metadata:o,resource:r,authorizationCode:s,iss:a,scope:i,fetchFn:n}={}){if(s!==void 0)uu({iss:a,expectedIssuer:o?.issuer,issParameterSupported:Jl(o)});let u=o?.issuer??String(t),d=async()=>{let v=await e.clientInformation({issuer:u}),b=Zl(v,u,{canPersistStamp:!1});if(v&&b===void 0)throw new yn(String(v.issuer),u);return b},l=await d(),p=i??e.clientMetadata.scope,h;if(e.prepareTokenRequest)h=await e.prepareTokenRequest(p);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=M1(s,await e.codeVerifier(),e.redirectUrl)}return l??=await d(),I1(t,{metadata:o,tokenRequestParams:h,clientInformation:l,addClientAuthentication:e.addClientAuthentication,resource:r,dpop:await e.dpop?.(),fetchFn:n})}async function A1(e,{metadata:t,clientMetadata:o,scope:r,fetchFn:s}){let a;if(t){if(!t.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");a=new URL(t.registration_endpoint)}else a=new URL("/register",e);let i={...o,...r===void 0?{}:{scope:r}},n=await bs(s??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!n.ok)throw new v1({status:n.status,body:await n.text(),submittedMetadata:i});return ws.parse(tu(await n.json()))}var iu=new Set(["tools/list","prompts/list","resources/list","resources/templates/list","server/discover"]),L1=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(Ll(e))}set(e,t){let o=Ll(e),r=iu.has(e.method),s=!this._entries.has(o);if(!r&&s&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let i of this._entries.keys())if(!iu.has(i.slice(0,i.indexOf("\x00")))){this._entries.delete(i),this._cappedSize--;break}}let a=++this._stamp;if(this._entries.set(o,{...t,stamp:a}),s&&!r)this._cappedSize++;return a}delete(e){if(this._entries.delete(Ll(e))&&!iu.has(e.method))this._cappedSize--}evict(e){let t=`${e}\x00`,o=iu.has(e);for(let r of this._entries.keys())if(r.startsWith(t)){if(this._entries.delete(r),!o)this._cappedSize--}}clear(){this._entries.clear(),this._cappedSize=0}};function Ll(e){return`${e.method}\x00${JSON.stringify([e.partition??"",e.params??""])}`}function Ul(e,t){return t===void 0?e:`${e}\x00${t}`}var U1=86400000,Fz=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity="";constructor(e,t,o=()=>{},r="",s=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=o,this._cachePartition=r,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 o={method:e,params:t??""},r=this._partitionFor("private"),s=await this._store.get({...o,partition:r});if(s!==void 0)return s;let a=this._partitionFor("public");if(a===r)return;let i=await this._store.get({...o,partition:a});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 o=this._partitionFor("private"),r=this._partitionFor("public");try{await this._store.delete({method:e,params:t,partition:o})}catch(s){this._reportError(s)}if(r!==o)try{await this._store.delete({method:e,params:t,partition:r})}catch(s){this._reportError(s)}}async evictKey(e,t){let o=Ul(e,t),r=this._evictionGeneration.get(o);if(r!==void 0)this._evictionGeneration.set(o,r+1);await this._deleteBoth(e,t)}captureGeneration(e,t){let o=Ul(e,t),r=this._evictionGeneration.get(o)??0;return this._evictionGeneration.set(o,r),r}async write(e,t,o,r){if((this._evictionGeneration.get(Ul(e,r?.params))??0)!==o)return;let s=r?.params??"",a=this._partitionFor("private"),i=this._partitionFor("public"),n=(r?.scope??"private")==="public"?i:a;try{await this._store.set({method:e,params:s,partition:n},{value:Vz(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(u){this._reportError(u)}if(i!==a)try{await this._store.delete({method:e,params:s,partition:n===a?i:a})}catch(u){this._reportError(u)}}async read(e,t){let o=await this._probe(e,t);if(o?.expiresAt===void 0||!(o.expiresAt>this.now()))return;try{let r=JSON.parse(o.value);if(typeof r!=="object"||r===null||Array.isArray(r))throw TypeError("cached document is not an object");return{value:r}}catch(r){this._reportError(r),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 o=this._decodeListTools(t),r=new Map;if(o!==void 0)for(let s of o.tools)r.set(s.name,s);this._toolIndex={stamp:t.stamp,byName:r}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let o=await this._probe("tools/list");if(o===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==o.stamp){let r=this._decodeListTools(o)??{tools:[]},s=new Map;for(let a of r.tools){let i=t(a);if(i!==void 0)s.set(a.name,i)}this._toolOutputValidatorIndex={stamp:o.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((o)=>o!==null&&typeof o==="object"))throw TypeError("cached tools/list document has a malformed tools array");return t}catch(t){this._reportError(t);return}}};function Vz(e){let t;try{t=JSON.stringify(e)}catch(o){throw TypeError(`cache value is not JSON-serializable: ${o instanceof Error?o.message:String(o)}`)}if(typeof t!=="string")throw TypeError("cache value is not JSON-serializable: it has no JSON representation");return t}var D1=Symbol.for("mcp.authSeamEscape");function st(e){if(typeof e==="object"&&e!==null||typeof e==="function")try{Object.defineProperty(e,D1,{value:!0,configurable:!0})}catch{}return e}function Jz(e){return(typeof e==="object"&&e!==null||typeof e==="function")&&e[D1]===!0}var Wz=-32022,Gz=new Set([-32001,-32020,-32021]);function Kz(e,t){switch(e.kind){case"result":return Yz(e.result,t);case"rpc-error":return Z1(e,t);case"http-error":return Xz(e,t);case"network-error":return l1(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 (${B1(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 l1(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 Yz(e,t){let o=eo(ou).validateResult("server/discover",e);if(!o.ok)return{kind:"legacy"};let r=o.value.supportedVersions,s=t.clientModernVersions.find((a)=>r.includes(a));if(s!==void 0)return{kind:"modern",version:s,discover:o.value};if(t.fallbackAvailable)return{kind:"legacy"};return{kind:"error",error:new fn({supported:[...r],requested:t.requestedVersion})}}function Z1(e,t){let{code:o,message:r,data:s}=e;if(o===Wz){let a=eS(s);if(a===void 0)return{kind:"legacy"};let i=new fn({supported:a,requested:tS(s)??t.requestedVersion},r),n=_n(a),u=t.clientModernVersions.find((d)=>n.includes(d));if(u!==void 0)return{kind:"corrective",version:u,error:i};if(n.length>0)return{kind:"error",error:i};return t.fallbackAvailable?{kind:"legacy"}:{kind:"error",error:i}}if(Gz.has(o))return{kind:"legacy"};return{kind:"legacy"}}function Xz(e,t){if(e.status===401||e.status===403){let r=e.status===403;return{kind:"error",error:new gt(r?A.ClientHttpForbidden:A.ClientHttpAuthentication,`Version negotiation failed: ${r?"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 o=oS(e.body);if(o!==void 0)return Z1(o,t);return{kind:"legacy"}}function l1(e,t){if(t.environment==="browser"&&Qz(e))return{kind:"legacy"};return{kind:"error",error:new L(A.EraNegotiationFailed,`Version negotiation probe failed: ${B1(e)}`,{cause:e},{cause:e})}}function Qz(e){return e instanceof TypeError||e instanceof Error&&e.name==="TypeError"}function B1(e){return e instanceof Error?e.message:String(e)}function eS(e){if(typeof e!=="object"||e===null)return;let t=e.supported;if(!Array.isArray(t)||t.length===0||!t.every((o)=>typeof o==="string"))return;return t}function tS(e){if(typeof e!=="object"||e===null)return;let t=e.requested;return typeof t==="string"?t:void 0}function oS(e){if(e===void 0||e==="")return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=="object"||t===null)return;let o=t.error;if(typeof o!=="object"||o===null)return;let{code:r,message:s,data:a}=o;if(typeof r!=="number")return;return{code:r,message:typeof s==="string"?s:"",data:a}}var rS="legacy";function sS(e,t){let o=e?.mode??rS;if(o==="legacy")return{kind:"legacy"};let r=e?.probe??{};if(typeof o==="object"){if(!At(o.pin))throw TypeError(`versionNegotiation: { pin: '${o.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:o.pin,probe:r}}let s=t?_n(t):[];return{kind:"auto",modernVersions:s.length>0?s:[...yl],fallbackAvailable:t?bl(t).length>0:!0,probe:r}}function m1(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?"browser":"node"}function p1(e){return"stderr"in e&&"pid"in e?"stdio":"http"}var aS=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 o=new e(t);t.onmessage=(r)=>{let s=o._pending;if(s!==void 0&&(_r(r)||fr(r))&&r.id===s.id){if(o._pending=void 0,_r(r))s.resolve({kind:"response",result:r.result});else s.resolve({kind:"response",error:r.error});return}},t.onerror=(r)=>{o._savedOnError?.(r)},t.onclose=()=>{let r=o._pending;if(r!==void 0)o._pending=void 0,r.resolve({kind:"closed"});o._closeDelivered=!0,o._savedOnClose?.()};try{await t.start()}catch(r){throw o.detach(),r}return o}async exchange(t,o){let r=`server-discover-probe-${++this._probeCounter}`;return new Promise((s)=>{let a=!1,i=(u)=>{if(a)return;if(a=!0,clearTimeout(n),this._pending?.id===r)this._pending=void 0;s(u)},n=setTimeout(()=>i({kind:"timeout"}),o);this._pending={id:r,resolve:i},this._transport.send(t(r)).catch((u)=>i({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,o=this._transport,r=!1,s=()=>{if(!r){r=!0;return}t()};o.onclose=s,Hl.set(o,()=>{if(o.onclose===s)o.onclose=t})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let t=this._transport,o=t.start,r=!0;t.start=async function(){if(r){r=!1,t.start=o;return}return o.call(t)}}},Hl=new WeakMap;function h1(e){let t=Hl.get(e);Hl.delete(e),t?.()}function iS(e,t,o,r){return{jsonrpc:"2.0",id:e,method:"server/discover",params:{_meta:eo(t).outboundEnvelope({protocolVersion:t,clientInfo:o,clientCapabilities:r})}}}function nS(e){if(e instanceof L&&e.code===A.ClientHttpUnexpectedContent)return!0;return e instanceof Error&&e.name==="SyntaxError"}function cS(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 o=e.error;if(Jz(o)||o instanceof wt||o instanceof Error&&o.name==="UnauthorizedError")return{kind:"auth-required",error:o};if(o instanceof gt){let r=o.data?.text;return{kind:"http-error",status:o.data.status,body:typeof r==="string"?r:void 0,statusText:o.data.statusText}}if(nS(o))return{kind:"unusable-reply",error:o};return{kind:"network-error",error:o}}case"closed":return{kind:"closed"};case"timeout":return{kind:"timeout",timeoutMs:t}}}async function H1(e,t){let o=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),s=e.kind==="pin"?[e.version]:e.modernVersions,a=e.kind==="auto"&&e.fallbackAvailable,i=await aS.open(t.transport),n=async()=>{let d=s[0],l=!1,p=r;for(;;){let h=await i.exchange((g)=>iS(g,d,t.clientInfo,t.capabilities),o);if(h.kind==="timeout"&&p>0){p--;continue}let v=cS(h,o),b=Kz(v,{clientModernVersions:s,requestedVersion:d,fallbackAvailable:a,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 i.detach(),d}return i.release(),u}function uS(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,"_dispose"))return;let o=e._serverParams;return typeof o==="object"&&o!==null&&typeof o.command==="string"?o:void 0}async function dS(e,t,o,r){let a=new t.constructor({...o,stderr:"ignore"}),i=t.close,n=!1,u,d=new Promise((p,h)=>{u=()=>h(_1())});t.close=async function(){return n=!0,u?.(),i.call(t)};let l;try{let p=H1(e,{...r,transport:a,transportKind:"stdio",disposableProbe:!0});p.catch(()=>{}),l=await Promise.race([p,d])}finally{await lS(a),t.close=i}if(n)throw _1();return l}function _1(){return new L(A.EraNegotiationFailed,"Version negotiation failed: the transport was closed during the server/discover probe")}async function lS(e){try{let t=e._dispose;await(typeof t==="function"?t.call(e):e.close())}catch{}}function f1(e){let t=e._meta?.[$t];return Cl.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 o=t,r=e.properties;for(let s of Object.keys(r)){let a=r[s];if(o[s]===void 0&&Object.prototype.hasOwnProperty.call(a,"default"))o[s]=a.default;if(o[s]!==void 0)nu(a,o[s])}}if(Array.isArray(e.anyOf)){for(let o of e.anyOf)if(typeof o!=="boolean")nu(o,t)}if(Array.isArray(e.oneOf)){for(let o of e.oneOf)if(typeof o!=="boolean")nu(o,t)}}function F1(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,o=e.url!==void 0;return{supportsFormMode:t||!t&&!o,supportsUrlMode:o}}function mS(e){if(typeof e==="object"&&e!==null){if(e.kind==="legacy"&&!("supportedVersions"in e)&&!("discover"in e))return e;if(e.kind==="modern"&&vo.safeParse(e.discover).success)return e}throw new L(A.EraNegotiationFailed,"connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }")}var g1={"notifications/tools/list_changed":["tools/list"],"notifications/prompts/list_changed":["prompts/list"],"notifications/resources/list_changed":["resources/list","resources/templates/list"]},pS=64,Dl={},Xl=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{Dl.enforceStrictCapabilities=(e)=>e._enforceStrictCapabilities,Dl.walkPages=(e,t,o,r)=>e._walkPages(t,o,r),Dl.readResource=(e,t,o)=>e._readResource(t,o)}_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 su,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=Wg(t?.inputRequired),this._cache=new Fz(t?.responseCacheStore??new L1,t?.responseCacheStore!==void 0,(o)=>this._reportStoreError(o),t?.cachePartition??""),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??pS,t?.listChanged)this._listChangedConfig=t.listChanged}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&At(this._negotiatedProtocolVersion)&&ko(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 Xg({getRequestHandler:(o)=>this._getRequestHandler(o),buildContext:(o)=>this.buildContext(o,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=$l(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(o,r)=>{let s=eo(this._negotiatedProtocolVersion),a=s.validateRequest("elicitation/create",o);if(!a.ok&&a.reason==="not-in-era")a=s.validateInputRequest("elicitation/create",o);if(!a.ok)throw new ae(a.reason==="not-in-era"?W.InternalError:W.InvalidParams,a.reason==="not-in-era"?"No wire schema for elicitation/create in the resolved era":`Invalid elicitation request: ${a.message}`);let{params:i}=a.value;i.mode=i.mode??"form";let{supportsFormMode:n,supportsUrlMode:u}=F1(this._capabilities.elicitation);if(i.mode==="form"&&!n)throw new ae(W.InvalidParams,"Client does not support form-mode elicitation requests");if(i.mode==="url"&&!u)throw new ae(W.InvalidParams,"Client does not support URL-mode elicitation requests");let d=await t(o,r),l=s.validateResult("elicitation/create",d);if(!l.ok&&l.reason==="not-in-era")l=s.validateInputResponse("elicitation/create",d);if(!l.ok)throw new ae(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 p=l.value,h=i.mode==="form"?i.requestedSchema:void 0;if(i.mode==="form"&&p.action==="accept"&&p.content&&h&&this._capabilities.elicitation?.form?.applyDefaults)try{nu(h,p.content)}catch{}return p};if(e==="sampling/createMessage")return async(o,r)=>{let s=eo(this._negotiatedProtocolVersion),a=s.validateRequest("sampling/createMessage",o);if(!a.ok&&a.reason==="not-in-era")a=s.validateInputRequest("sampling/createMessage",o);if(!a.ok)throw new ae(a.reason==="not-in-era"?W.InternalError:W.InvalidParams,a.reason==="not-in-era"?"No wire schema for sampling/createMessage in the resolved era":`Invalid sampling request: ${a.message}`);let{params:i}=a.value,n=await t(o,r),u=Boolean(i.tools||i.toolChoice),d=s.samplingResultVariant(u,n);if(!d.ok&&d.reason==="not-in-era")d=s.validateInputResponse("sampling/createMessage",n);if(!d.ok)throw new ae(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,mS(t.prior),t);let o=sS(this._versionNegotiation,this._supportedProtocolVersionsOption);if(o.kind!=="legacy")return this._connectNegotiated(e,o,t);return this._connectPlainLegacy(e,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let o=this._negotiatedProtocolVersion;if(o!==void 0)e.setProtocolVersion?.(o);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let o=bl(this._supportedProtocolVersions);try{let r=o[0];if(r===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:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(s===void 0)throw Error(`Server sent invalid initialize result: ${s}`);if(!o.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(r){throw this.close(),r}}async _connectNegotiated(e,t,o){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 r;try{let s=p1(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:m1(),defaultTimeoutMs:o?.timeout??gn},i=s==="stdio"?uS(e):void 0;r=i===void 0?await H1(t,{...a,transport:e,transportKind:s}):await dS(t,e,i,a)}catch(s){throw await e.close().catch(()=>{}),h1(e),s}if(h1(e),await super.connect(e),r.era==="legacy"){await this._legacyHandshake(e,o);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=f1(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion)e.setProtocolVersion(r.version);if(this._listChangedConfig){let s=this._listChangedConfig,a=this._serverCapabilities,i={...s.tools&&a?.tools?.listChanged&&{tools:s.tools},...s.prompts&&a?.prompts?.listChanged&&{prompts:s.prompts},...s.resources&&a?.resources?.listChanged&&{resources:s.resources}},n=!0;try{this._setupListChangedHandlers(i)}catch(d){n=!1,this.onerror?.(d instanceof Error?d:Error(String(d)))}let u=n?{...i.tools&&{toolsListChanged:!0},...i.prompts&&{promptsListChanged:!0},...i.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(u).length>0){let d=new AbortController,l=()=>d.abort(o?.signal?.reason);if(o?.signal?.aborted)l();o?.signal?.addEventListener("abort",l);try{this._autoOpenedSubscription=await this.listen(u,{timeout:o?.timeout,signal:d.signal})}catch(p){if(o?.signal?.aborted)throw await this.close().catch(()=>{}),p;this.onerror?.(p instanceof Error?p:Error(String(p)))}finally{o?.signal?.removeEventListener("abort",l)}}}}async _connectFromPrior(e,t,o){if(t.kind==="legacy")return this._connectPlainLegacy(e,o);let r=t.discover;this._resetConnectionState();let s=this._supportedProtocolVersionsOption,a=(s&&_n(s).length>0?_n(s):yl).find((i)=>r.supportedVersions.includes(i));if(a===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=r,this._serverCapabilities=r.capabilities,this._serverVersion=f1(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),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 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"},vo,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 o=await this._serveFromCache("prompts/list",void 0,t);if(o!==void 0)return o;return this._listAllPages("prompts/list",e,t,(r)=>r.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 o=await this._serveFromCache("resources/list",void 0,t);if(o!==void 0)return o;return this._listAllPages("resources/list",e,t,(r)=>r.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 o=await this._serveFromCache("resources/templates/list",void 0,t);if(o!==void 0)return o;return this._listAllPages("resources/templates/list",e,t,(r)=>r.resourceTemplates)}async _listAllPages(e,t,o,r,s){let a=o?.cacheMode==="bypass",i=this._cache.captureGeneration(e),n=(d)=>{let l=d===void 0?t&&{...t}:{...t,cursor:d};return this.request({method:e,...l&&{params:l}},o)},u=await this._walkPages(e,n,r);if(delete u.nextCursor,s?.(u),a)return u;return await this._cache.write(e,u,i,this._freshness(u)),u}async _walkPages(e,t,o){let r=await t(void 0),s=r.nextCursor,a=r,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 n=await t(s);if(n.nextCursor===s&&JSON.stringify(o(n))===JSON.stringify(o(a)))break;o(r).push(...o(n)),a=n,s=n.nextCursor,i++}return r}_freshness(e,t){let o=e,r=typeof o.ttlMs==="number"?o.ttlMs:this._defaultCacheTtlMs,s=o.cacheScope==="public"?"public":"private";return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),U1),scope:s,params:t}}async _serveFromCache(e,t,o){if(o?.cacheMode==="bypass"||o?.cacheMode==="refresh")return;let r=await this._cache.read(e,t).catch((s)=>void this._reportStoreError(s));if(r!==void 0){if(o?.signal?.aborted){let s=o.signal.reason;throw s instanceof L?s:new L(A.RequestTimeout,String(s))}return r.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 o=t??await this._cache.toolDefinition(e);return o===void 0?void 0:Pl(o.inputSchema)}async readResource(e,t){let{result:o}=await this._readResource(e,t);return o}async _readResource(e,t){let o=await this._serveFromCache("resources/read",e.uri,t);if(o!==void 0)return{result:o,cached:!0};let r=this._cache.captureGeneration("resources/read",e.uri),s=await this.request({method:"resources/read",params:e},t);if(t?.cacheMode!=="bypass"){let a=this._freshness(s,e.uri);if(a.expiresAt>this._cache.now())await this._cache.write("resources/read",s,r,a);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 o=this._negotiatedProtocolVersion;if(o===void 0||!At(o))throw new L(A.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${o??"none"}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:"subscriptions/listen",protocolVersion:o});if(t?.signal?.aborted){let x=t.signal.reason;throw x instanceof L?x:new L(A.RequestTimeout,String(x))}let r=new AbortController,s=`listen:${this._nextListenId++}`,a="opening",i,n,u,d,l=new Promise((x,j)=>{u=x,d=j}),p,h=new Promise((x)=>{p=x}),v=(x)=>{if(a==="closed")return;let j=a==="opening";if(i!==void 0)clearTimeout(i),i=void 0;if("ack"in x){a="open",u(x.ack);return}if(a="closed",n!==void 0)t?.signal?.removeEventListener("abort",n);if(this._listenState.delete(s),r.abort(),p(x.cause),j)d(x.error??new L(A.ConnectionClosed,"subscriptions/listen closed before the server acknowledged"))},b=async()=>{r.abort(),await this.notification({method:"notifications/cancelled",params:{requestId:s}}).catch(()=>{})},g=async()=>{if(a==="closed")return;v({cause:"local"}),await b()};this._listenState.set(s,{settle:v});let w=t?.timeout??gn;if(i=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(a==="closed")return;let j=x.reason;v({cause:"local",error:j instanceof Error?j:Error(String(j??"Aborted"))}),b().catch(()=>{})},x.addEventListener("abort",n,{once:!0})}let R={jsonrpc:"2.0",id:s,method:"subscriptions/listen",params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},P=(x)=>{v({cause:"remote",error:x instanceof Error?x:Error(String(x))})};try{this.transport.send(R,{requestSignal:r.signal,onRequestStreamEnd:()=>v({cause:"remote",error:Error("subscriptions/listen: stream ended")})}).catch(P)}catch(x){P(x)}return{honoredFilter:await l,close:g,closed:h}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let o=Object.hasOwn(g1,e.method)?g1[e.method]:void 0;if(e.method==="notifications/resources/updated"){let r=e.params?.uri;if(typeof r==="string")this._cache.evictKey("resources/read",r)}else if(o!==void 0)for(let r of o)this._cache.evict(r);if(e.method==="notifications/subscriptions/acknowledged"){let r=e.params?._meta?.[Hr],s=typeof r==="string"?this._listenState.get(r):void 0;if(s!==void 0){let a=this._wireCodec().validateNotification("notifications/subscriptions/acknowledged",e);s.settle({ack:a.ok?a.value.params.notifications:{}});return}}if(e.method==="notifications/cancelled"){let r=e.params?.requestId,s=typeof r==="string"?this._listenState.get(r):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,o=typeof t==="string"?this._listenState.get(t):void 0;if(o!==void 0){if(fr(e))o.settle({cause:"remote",error:ae.fromError(e.error.code,e.error.message,e.error.data)});else o.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 o=this.getProtocolEra()==="modern"&&m1()!=="browser",r=async()=>{if(!o)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=Fg(u.declarations,e.arguments);return Object.keys(d).length===0?t:{...t,headers:{...t?.headers,...d}}},s=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,(u)=>this._compileOutputValidator(u)).catch((u)=>void this._reportStoreError(u)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(s===void 0||s.ok)return;let u=s.compileError,d=(u instanceof Error?u.message:String(u)).slice(0,200);throw new ae(W.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${d}`)};a();let i;try{i=await this.request({method:"tools/call",params:e},await r())}catch(u){let d=u instanceof ae&&u.code===ys;if(!o||!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((p)=>this._reportStoreError(p)),s=await this._cache.outputValidator(e.name,(p)=>this._compileOutputValidator(p)).catch((p)=>void this._reportStoreError(p)),a(),i=await this.request({method:"tools/call",params:e},await r())}let n=s!==void 0&&s.ok?s.validator:void 0;if(n){if(i.structuredContent===void 0&&!i.isError)throw new ae(W.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(i.structuredContent!==void 0&&!i.isError)try{let u=n(i.structuredContent);if(!u.valid)throw new ae(W.InvalidParams,`Structured content does not match the tool's output schema: ${u.errorMessage}`)}catch(u){if(u instanceof ae)throw u;throw new ae(W.InvalidParams,`Failed to validate structured content: ${u instanceof Error?u.message:String(u)}`)}}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 r=await this.request({method:"tools/list",params:e},t);return this._excludeInvalidXMcpHeaderTools(r),r}let o=await this._serveFromCache("tools/list",void 0,t);if(o!==void 0)return o;return this._listAllPages("tools/list",e,t,(r)=>r.tools,(r)=>this._excludeInvalidXMcpHeaderTools(r))}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!=="modern"||!this.transport||p1(this.transport)==="stdio")return;let t=e.tools.filter((o)=>{let r=Pl(o.inputSchema);if(!r.valid)return console.warn(`[mcp-sdk] excluding tool '${o.name}' from tools/list: invalid x-mcp-header declaration — ${r.reason}`),!1;return!0});if(t.length!==e.tools.length)e.tools=t}_setupListChangedHandler(e,t,o,r){let s=ru(xi,o);if(!s.success)throw Error(`Invalid ${e} listChanged options: ${s.error.message}`);if(typeof o.onChanged!=="function")throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:i}=s.data,{onChanged:n}=o,u=async()=>{if(!a){n(null,null);return}try{n(null,await r())}catch(l){n(l instanceof Error?l:Error(String(l)),null)}},d=()=>{if(i){let l=this._listChangedDebounceTimers.get(e);if(l)clearTimeout(l);let p=setTimeout(u,i);this._listChangedDebounceTimers.set(e,p)}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 V1=10,hS=13,vr=32;function Ql(e){}function G1(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=Ql,onError:o=Ql,onRetry:r=Ql,onComment:s,maxBufferSize:a}=e,i=[],n=0,u=!0,d,l="",p=0,h,v=!1;function b(k){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,k.charCodeAt(0)===239&&k.charCodeAt(1)===187&&k.charCodeAt(2)===191&&(k=k.slice(3))),i.length===0){let X=w(k);X!==""&&(i.push(X),n=X.length),g();return}if(k.indexOf(`
75
- `)===-1&&k.indexOf("\r")===-1){i.push(k),n+=k.length,g();return}i.push(k);let z=i.join("");i.length=0,n=0;let M=w(z);M!==""&&(i.push(M),n=M.length),g()}function g(){a!==void 0&&(n+l.length<=a||(v=!0,i.length=0,n=0,d=void 0,l="",p=0,h=void 0,o(new mu(`Buffered data exceeded max buffer size of ${a} characters`,{type:"max-buffer-size-exceeded"}))))}function w(k){let z=0;if(k.indexOf("\r")===-1){let M=k.indexOf(`
76
- `,z);for(;M!==-1;){if(z===M){p>0&&t({id:d,event:h,data:l}),d=void 0,l="",p=0,h=void 0,z=M+1,M=k.indexOf(`
77
- `,z);continue}let X=k.charCodeAt(z);if(J1(k,z,X)){let K=k.charCodeAt(z+5)===vr?z+6:z+5,se=k.slice(K,M);if(p===0&&k.charCodeAt(M+1)===V1){t({id:d,event:h,data:se}),d=void 0,l="",h=void 0,z=M+2,M=k.indexOf(`
78
- `,z);continue}l=p===0?se:`${l}
79
- ${se}`,p++}else W1(k,z,X)?h=k.slice(k.charCodeAt(z+6)===vr?z+7:z+6,M)||void 0:R(k,z,M);z=M+1,M=k.indexOf(`
80
- `,z)}return k.slice(z)}for(;z<k.length;){let M=k.indexOf("\r",z),X=k.indexOf(`
81
- `,z),K=-1;if(M!==-1&&X!==-1?K=M<X?M:X:M!==-1?M===k.length-1?K=-1:K=M:X!==-1&&(K=X),K===-1)break;R(k,z,K),z=K+1,k.charCodeAt(z-1)===hS&&k.charCodeAt(z)===V1&&z++}return k.slice(z)}function R(k,z,M){if(z===M){x();return}let X=k.charCodeAt(z);if(J1(k,z,X)){let te=k.charCodeAt(z+5)===vr?z+6:z+5,le=k.slice(te,M);l=p===0?le:`${l}
82
- ${le}`,p++;return}if(W1(k,z,X)){h=k.slice(k.charCodeAt(z+6)===vr?z+7:z+6,M)||void 0;return}if(X===105&&k.charCodeAt(z+1)===100&&k.charCodeAt(z+2)===58){let te=k.slice(k.charCodeAt(z+3)===vr?z+4:z+3,M);te.includes("\x00")||(d=te);return}if(X===58){if(s){let te=k.slice(z,M);s(te.slice(k.charCodeAt(z+1)===vr?2:1))}return}let K=k.slice(z,M),se=K.indexOf(":");if(se===-1){P(K,"",K);return}let pe=K.slice(0,se),oe=K.charCodeAt(se+1)===vr?2:1,V=K.slice(se+oe);P(pe,V,K)}function P(k,z,M){switch(k){case"event":h=z||void 0;break;case"data":l=p===0?z:`${l}
83
- ${z}`,p++;break;case"id":z.includes("\x00")||(d=z);break;case"retry":/^\d+$/.test(z)?r(parseInt(z,10)):o(new mu(`Invalid \`retry\` value: "${z}"`,{type:"invalid-retry",value:z,line:M}));break;default:o(new mu(`Unknown field "${k.length>20?`${k.slice(0,20)}…`:k}"`,{type:"unknown-field",field:k,value:z,line:M}));break}}function x(){p>0&&t({id:d,event:h,data:l}),d=void 0,l="",p=0,h=void 0}function j(k={}){if(k.consume&&i.length>0){let z=i.join("");R(z,0,z.length)}u=!0,d=void 0,l="",p=0,h=void 0,i.length=0,n=0,v=!1}return{feed:b,reset:j}}function J1(e,t,o){return o===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function W1(e,t,o){return o===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 em extends TransformStream{constructor({onError:e,onRetry:t,onComment:o,maxBufferSize:r}={}){let s;super({start(a){s=G1({onEvent:(i)=>{a.enqueue(i)},onError(i){typeof e=="function"&&e(i),(e==="terminate"||i.type==="max-buffer-size-exceeded")&&a.error(i)},onRetry:t,onComment:o,maxBufferSize:r})},transform(a){s.feed(a)}})}}function _S(e){return/(?:^|,)\s*dpop(?:\s|$|,)/i.test(e)}function fS(e){if(e.status!==401)return!1;let t=e.headers.get("www-authenticate")??"";return _S(t)&&/use_dpop_nonce/i.test(t)}var gS=(e,t)=>(o)=>{let r=typeof e==="function"?e:()=>e;return async(s,a)=>{let i=(a?.method??"GET").toUpperCase(),n=new URL(s.toString()),u=await r();if(!u)return o(s,a);let d=async()=>{let p=await t();if(!p)return o(s,a);let h=new Headers(a?.headers),v=await u.buildProof({htm:i,htu:n,accessToken:p});return h.set("Authorization",`DPoP ${p}`),h.set("DPoP",v),o(s,{...a,headers:h})},l=await d();if(fS(l)&&l.headers.has("dpop-nonce"))u.observeNonce(l,n),await l.text?.().catch(()=>{}),l=await d();return u.observeNonce(l,n),l}},vS=(e)=>gS(async()=>{try{return await e.dpop?.()}catch(t){throw st(t)}},async()=>{let t;try{t=await e.tokens()}catch(o){throw st(o)}return t?.token_type?.toLowerCase()==="dpop"?t.access_token:void 0});var l4=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,o){super(`SSE error: ${t}`);this.code=e,this.event=o,zo(this,new.target)}};var wS=1,yS={initialReconnectionDelay:1000,maxReconnectionDelay:30000,reconnectionDelayGrowFactor:1.5,maxRetries:2},bS=new Set(["authorization","dpop","content-type","mcp-protocol-version","mcp-method","mcp-name","mcp-session-id"]);function K1(e,t){if(typeof AbortSignal.any==="function")return AbortSignal.any([e,t]);let o=new AbortController;if(e.aborted)return o.abort(e.reason),o.signal;if(t.aborted)return o.abort(t.reason),o.signal;let r=()=>{e.removeEventListener("abort",s),t.removeEventListener("abort",a)};function s(){r(),o.abort(e.reason)}function a(){r(),o.abort(t.reason)}return e.addEventListener("abort",s,{once:!0}),t.addEventListener("abort",a,{once:!0}),o.signal}var Y1=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,y1(t?.authProvider)){if(this._oauthProvider=t.authProvider,this._authProvider=b1(t.authProvider,{skipIssuerMetadataValidation:t.skipIssuerMetadataValidation}),t.authProvider.dpop)this._fetch=vS(t.authProvider)(t.fetch??fetch)}else this._authProvider=t?.authProvider;if(this._redirectPolicy=t?.redirectPolicy,this._fetchWithInit=e1(t?.fetch,t?.requestInit),this._redirectPolicy==="follow")this._fetchWithInit=r1(this._fetchWithInit);this._sessionId=t?.sessionId,this._protocolVersion=t?.protocolVersion,this._reconnectionOptions=t?.reconnectionOptions??yS,this._reconnectionScheduler=t?.reconnectionScheduler,this._onInsufficientScope=t?.onInsufficientScope??"reauthorize",this._maxStepUpRetries=Math.max(0,t?.maxStepUpRetries??wS)}async _stepUpAuthorize(e,t){try{return await this._stepUpAuthorizeInner(e,t)}catch(o){throw st(o)}}async _stepUpAuthorizeInner(e,t){if(this._onInsufficientScope==="throw")throw new Vl({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(!this._oauthProvider)throw new Vl({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 o=await this._oauthProvider.tokens(),r=du(this._scope,o?.scope,e.scope);this._scope=r;let s=z1(r,o?.scope);return lu(this._oauthProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:r,forceReauthorization:s,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})}_redirects(e){return this._redirectPolicy==="follow"?e:bs(e)}_unfollowedRedirect(e,t){let o=this._redirectPolicy==="follow"?void 0:s1(e,t);return o&&`${o} (redirectPolicy: 'same-origin')`}async _commonHeaders(){let e=new Headers(this._requestInit?.headers||void 0),t;try{t=await this._authProvider?.token()}catch(o){throw st(o)}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)||!ko(t))return;let o=t.params?._meta?.[Wt];if(typeof o!=="string")return;e.set("mcp-protocol-version",o),e.set("mcp-method",t.method);let r=Vg(t.method,t.params);if(r?.value!==void 0)e.set("mcp-name",jl(r.value))}_isModernEnvelopedRequest(e){if(Array.isArray(e)||!ko(e))return!1;let t=e.params?._meta?.[Wt];return typeof t==="string"&&At(t)}async _startOrAuthSse(e,t=!1,o=0){let{resumptionToken:r,requestSignal:s}=e,a=()=>this._abortController?.signal.aborted===!0||s?.aborted===!0;try{let i=await this._commonHeaders(),n=[...i.get("accept")?.split(",").map((p)=>p.trim().toLowerCase())??[],"text/event-stream"];if(i.set("accept",[...new Set(n)].join(", ")),r)i.set("last-event-id",r);let u=this._abortController?.signal,d=s!==void 0&&u!==void 0?K1(u,s):s??u,l=await this._redirects(this._fetch??fetch)(this._url,{...this._requestInit,method:"GET",headers:i,signal:d});if(!l.ok){if(l.status===401&&this._authProvider){if(l.headers.has("www-authenticate")){let{resourceMetadataUrl:h,scope:v}=Ss(l);this._resourceMetadataUrl=h,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(h){throw st(h)}return await l.text?.().catch(()=>{}),this._startOrAuthSse(e,!0,o)}if(await l.text?.().catch(()=>{}),t)throw st(new gt(A.ClientHttpAuthentication,"Server returned 401 after re-authentication",{status:401,statusText:l.statusText}));throw st(new wt)}if(l.status===403){let{resourceMetadataUrl:h,scope:v,error:b,errorDescription:g}=Ss(l);if(b==="insufficient_scope"){let w=await l.text?.().catch(()=>null);if(await this._stepUpAuthorize({scope:v,resourceMetadataUrl:h,errorDescription:g,statusText:l.statusText,text:w},o)!=="AUTHORIZED")throw st(new wt);return this._startOrAuthSse(e,t,o+1)}}if(await l.text?.().catch(()=>{}),l.status===405){e.onRequestStreamEnd?.();return}let p=this._unfollowedRedirect(this._url,l)??l.statusText;throw new gt(A.ClientHttpFailedToOpenStream,`Failed to open SSE stream: ${p}`,{status:l.status,statusText:l.statusText})}this._handleSseStream(l.body,e,!0)}catch(i){if(!a())this.onerror?.(i);throw i}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,o=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*Math.pow(o,e),r)}_scheduleReconnection(e,t=0){let o=this._reconnectionOptions.maxRetries;if(t>=o){this.onerror?.(Error(`Maximum reconnection attempts (${o}) exceeded.`)),e.onRequestStreamEnd?.();return}let r=this._getNextReconnectionDelay(t),s=()=>{if(this._cancelReconnection=void 0,this._abortController?.signal.aborted||e.requestSignal?.aborted)return;this._startOrAuthSse(e).catch((a)=>{if(this._abortController?.signal.aborted||e.requestSignal?.aborted)return;this.onerror?.(Error(`Failed to reconnect SSE stream: ${a instanceof Error?a.message:String(a)}`));try{this._scheduleReconnection(e,t+1)}catch(i){this.onerror?.(i instanceof Error?i:Error(String(i)))}})};if(this._reconnectionScheduler){let a=this._reconnectionScheduler(s,r,t);this._cancelReconnection=typeof a==="function"?a:void 0}else{let a=setTimeout(s,r);this._cancelReconnection=()=>clearTimeout(a)}}_handleSseStream(e,t,o){if(!e){t.onRequestStreamEnd?.();return}let{onresumptiontoken:r,replayMessageId:s,requestSignal:a,onRequestStreamEnd:i}=t,n=()=>this._abortController?.signal.aborted===!0||a?.aborted===!0,u,d=!1,l=!1;(async()=>{try{let h=e.pipeThrough(new TextDecoderStream).pipeThrough(new em({onRetry:(v)=>{this._serverRetryMs=v}})).getReader();while(!0){let{value:v,done:b}=await h.read();if(b)break;if(v.id)u=v.id,d=!0,r?.(v.id);if(!v.data)continue;if(!v.event||v.event==="message")try{let g=ft.parse(JSON.parse(v.data));if(_r(g)||fr(g)){if(l=!0,s!==void 0)g.id=s}this.onmessage?.(g)}catch(g){this.onerror?.(g)}}if((o||d)&&!l&&this._abortController&&!n())this._scheduleReconnection({resumptionToken:u,onresumptiontoken:r,replayMessageId:s,requestSignal:a,onRequestStreamEnd:i},0);else if(!n())i?.()}catch(h){if(n())return;if(this.onerror?.(Error(`SSE stream disconnected: ${h}`)),(o||d)&&!l&&this._abortController&&!n())try{this._scheduleReconnection({resumptionToken:u,onresumptiontoken:r,replayMessageId:s,requestSignal:a,onRequestStreamEnd:i},0)}catch(v){this.onerror?.(Error(`Failed to reconnect: ${v instanceof Error?v.message:String(v)}`)),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 wt("finishAuth requires an OAuthClientProvider");let{authorizationCode:o,iss:r}=await S1(e,t,this._oauthProvider,this._url,{fetchFn:this._fetchWithInit,resourceMetadataUrl:this._resourceMetadataUrl});if(await lu(this._oauthProvider,{serverUrl:this._url,authorizationCode:o,iss:r,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,o,r=0){try{let{resumptionToken:s,onresumptiontoken:a}=t||{};if(s){this._startOrAuthSse({resumptionToken:s,replayMessageId:ko(e)?e.id:void 0,requestSignal:t?.requestSignal}).catch((w)=>this.onerror?.(w));return}let i=await this._commonHeaders();this._applyBodyDerivedHeaders(i,e);let n=Array.isArray(e)?e.some((w)=>ql(w)):ql(e);if(n)i.delete("mcp-session-id");if(t?.headers!==void 0)for(let[w,R]of Object.entries(t.headers)){if(bS.has(w.toLowerCase()))continue;i.set(w,R)}i.set("content-type","application/json");let u=[...i.get("accept")?.split(",").map((w)=>w.trim().toLowerCase())??[],"application/json","text/event-stream"];i.set("accept",[...new Set(u)].join(", "));let d=this._abortController?.signal,l=t?.requestSignal!==void 0&&d!==void 0?K1(d,t.requestSignal):t?.requestSignal??d,p={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(e),signal:l},h=await this._redirects(this._fetch??fetch)(this._url,p);if(n&&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:P,scope:x}=Ss(h);this._resourceMetadataUrl=P,this._scope=du(this._scope,x)}if(this._authProvider.onUnauthorized&&!o){try{await this._authProvider.onUnauthorized({response:h,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(P){throw st(P)}return await h.text?.().catch(()=>{}),this._send(e,t,!0,r)}if(await h.text?.().catch(()=>{}),o)throw st(new gt(A.ClientHttpAuthentication,"Server returned 401 after re-authentication",{status:401,statusText:h.statusText}));throw st(new wt)}let w=await h.text?.().catch(()=>null);if(h.status===403){let{resourceMetadataUrl:P,scope:x,error:j,errorDescription:k}=Ss(h);if(j==="insufficient_scope"){if(await this._stepUpAuthorize({scope:x,resourceMetadataUrl:P,errorDescription:k,statusText:h.statusText,text:w},r)!=="AUTHORIZED")throw st(new wt);return this._send(e,t,o,r+1)}}if(h.status===400&&typeof w==="string"&&this._isModernEnvelopedRequest(e))try{let P=ft.parse(JSON.parse(w)),x=(Array.isArray(e)?e:[e]).filter((j)=>ko(j));if(fr(P)&&x.some((j)=>j.id===P.id)){this.onmessage?.(P);return}}catch{}let R=this._unfollowedRedirect(this._url,h)??w;throw new gt(A.ClientHttpNotImplemented,`Error POSTing to endpoint: ${R}`,{status:h.status,statusText:h.statusText,text:w})}if(h.status===202){if(await h.text?.().catch(()=>{}),Zg(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=h.headers.get("content-type"),g=Qg(b);if(v)if(g==="text/event-stream")this._handleSseStream(h.body,{onresumptiontoken:a,requestSignal:t?.requestSignal,onRequestStreamEnd:t?.onRequestStreamEnd},!1);else if(g==="application/json"){let w=await h.json(),R=Array.isArray(w)?w.map((P)=>ft.parse(P)):[ft.parse(w)];for(let P of R)this.onmessage?.(P)}else throw await h.text?.().catch(()=>{}),new L(A.ClientHttpUnexpectedContent,`Unexpected content type: ${b}`,{contentType:b});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},o=await this._redirects(this._fetch??fetch)(this._url,t);if(await o.text?.().catch(()=>{}),!o.ok&&o.status!==405)throw new gt(A.ClientHttpFailedToTerminateSession,`Failed to terminate session: ${this._unfollowedRedirect(this._url,o)??o.statusText}`,{status:o.status,statusText:o.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 rv{_eventSlots=new Map;setHandler(e,t){let o=this._ensureEventSlot(e);if(o.onHandler&&t)console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`);o.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let o=this._eventSlots.get(e);if(!o)return;let r=o.listeners.indexOf(t);if(r!==-1)o.listeners.splice(r,1)}dispatch(e,t){let o=this._eventSlots.get(e);if(!o)return;o.onHandler?.(t);for(let r of[...o.listeners])r(t)}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t)t={listeners:[]},this._eventSlots.set(e,t);return t}}class sv{_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 X1=new Set;function Q1(e,t){let[o,r]=t,s=o?.shape;if(typeof s?.method?.value!=="string")return;let a=s.method.value,i=e==="request"?"setRequestHandler":"setNotificationHandler";if(!X1.has(i))X1.add(i),console.warn(`[ext-apps] ${i}(Schema, handler) is deprecated; use ${i}("${a}", { params: Schema.shape.params }, handler).`);let n=r;return[a,{params:s.params},e==="request"?(u,d)=>n({method:a,params:u},zS(d)):(u)=>n({method:a,params:u})]}function zS(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 av="2026-01-26";var SS="ui/notifications/tool-input-partial";var kS=E([f("light"),f("dark")]).describe("Color theme preference for the host environment."),bn=E([f("inline"),f("fullscreen"),f("pip")]).describe("Display mode for UI presentation."),xS=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."),RS=T(xS.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.
84
84
 
85
85
  Individual style keys are optional - hosts may provide any subset of these values.
86
86
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
87
87
 
88
88
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
89
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),E([c(),al()]).describe(`Style variables for theming MCP apps.
89
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),E([c(),rl()]).describe(`Style variables for theming MCP apps.
90
90
 
91
91
  Individual style keys are optional - hosts may provide any subset of these values.
92
92
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -98,10 +98,10 @@ Individual style keys are optional - hosts may provide any subset of these value
98
98
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
99
99
 
100
100
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
101
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),qS=m({method:f("ui/open-link"),params:m({url:c().describe("URL to open in the host's browser")})}),PS=m({isError:C().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),jS=m({isError:C().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),TS=m({isError:C().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),CS=m({method:f("ui/notifications/sandbox-proxy-ready"),params:m({})}),tm=m({connectDomains:y(c()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
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).
102
102
 
103
103
  - Maps to CSP \`connect-src\` directive
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'`)")}),om=m({camera:m({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:m({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:m({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:m({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")}),ES=m({method:f("ui/notifications/size-changed"),params:m({width:q().optional().describe("New width in pixels."),height:q().optional().describe("New height in pixels.")})}),z4=m({method:f("ui/notifications/tool-input"),params:m({arguments:T(c(),D().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),S4=m({method:f("ui/notifications/tool-input-partial"),params:m({arguments:T(c(),D().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),k4=m({method:f("ui/notifications/tool-cancelled"),params:m({reason:c().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),$S=m({fonts:c().optional()}),MS=m({variables:RS.optional().describe("CSS variables for theming the app."),css:$S.optional().describe("CSS blocks that apps can inject.")}),x4=m({method:f("ui/resource-teardown"),params:m({})}),IS=T(c(),D()),ev=m({text:m({}).optional().describe("Host supports text content blocks."),image:m({}).optional().describe("Host supports image content blocks."),audio:m({}).optional().describe("Host supports audio content blocks."),resource:m({}).optional().describe("Host supports resource content blocks."),resourceLink:m({}).optional().describe("Host supports resource link content blocks."),structuredContent:m({}).optional().describe("Host supports structured content.")}),NS=m({method:f("ui/notifications/request-teardown"),params:m({}).optional()}),OS=m({experimental:T(c(),T(c(),zc()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:m({}).optional().describe("Host supports opening external URLs."),downloadFile:m({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:m({listChanged:C().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:m({listChanged:C().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:m({}).optional().describe("Host accepts log messages."),sandbox:m({permissions:om.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:tm.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:ev.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:ev.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:m({tools:m({}).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.")}),AS=m({experimental:T(c(),T(c(),zc()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:m({listChanged:C().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:y(bn).optional().describe("Display modes the app supports.")}),LS=m({method:f("ui/notifications/initialized"),params:m({}).optional()}),R4=m({csp:tm.optional().describe("Content Security Policy configuration for UI resources."),permissions:om.optional().describe("Sandbox permissions requested by the UI resource."),domain:c().optional().describe(`Dedicated origin for view sandbox.
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.
105
105
 
106
106
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
107
107
 
@@ -115,10 +115,10 @@ Boolean requesting whether a visible border and background is provided by the ho
115
115
 
116
116
  - \`true\`: request visible border + background
117
117
  - \`false\`: request no visible border + background
118
- - omitted: host decides border`)}),tv=m({method:f("ui/request-display-mode"),params:m({mode:bn.describe("The display mode being requested.")})}),ov=m({mode:bn.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),US=E([f("model"),f("app")]).describe("Tool visibility scope - who can access the tool."),q4=m({resourceUri:c().optional(),visibility:y(US).optional().describe(`Who can access this tool. Default: ["model", "app"]
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"]
119
119
  - "model": Tool visible to and callable by the agent
120
- - "app": Tool callable by the app from this server only`),csp:il().optional(),permissions:il().optional()}),P4=m({mimeTypes:y(c()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),DS=m({method:f("ui/download-file"),params:m({contents:y(E([ir,nr])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),ZS=m({method:f("ui/message"),params:m({role:f("user").describe('Message role, currently only "user" is supported.'),content:y(Nt).describe("Message content blocks (text, image, etc.).")})}),j4=m({method:f("ui/notifications/sandbox-resource-ready"),params:m({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:tm.optional().describe("CSP configuration from resource metadata."),permissions:om.optional().describe("Sandbox permissions from resource metadata.")})}),T4=m({method:f("ui/notifications/tool-result"),params:yo.describe("Standard MCP tool execution result.")}),iv=m({toolInfo:m({id:_t.optional().describe("JSON-RPC id of the tools/call request."),tool:wo.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:kS.optional().describe("Current color theme preference."),styles:MS.optional().describe("Style configuration for theming the app."),displayMode:bn.optional().describe("How the UI is currently displayed."),availableDisplayModes:y(bn).optional().describe("Display modes the host supports."),containerDimensions:E([m({height:q().describe("Fixed container height in pixels.")}),m({maxHeight:E([q(),al()]).optional().describe("Maximum container height in pixels.")})]).and(E([m({width:q().describe("Fixed container width in pixels.")}),m({maxWidth:E([q(),al()]).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:m({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:m({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(),C4=m({method:f("ui/notifications/host-context-changed"),params:iv.describe("Partial context update containing only changed fields.")}),BS=m({method:f("ui/update-model-context"),params:m({content:y(Nt).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.")})}),HS=m({method:f("ui/initialize"),params:m({appInfo:Mt.describe("App identification (name and version)."),appCapabilities:AS.describe("Features and capabilities this app provides."),protocolVersion:c().describe("Protocol version this app supports.")})}),FS=m({protocolVersion:c().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Mt.describe("Host application identification and version."),hostCapabilities:OS.describe("Features and capabilities provided by the host."),hostContext:iv.describe("Rich context about the host environment.")}).passthrough();class rm{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=(o)=>{if(t&&o.source!==this.eventSource){console.debug("Ignoring message from unknown source",o);return}let r=ft.safeParse(o.data);if(r.success)console.debug("Parsed message",r.data),this.onmessage?.(r.data);else if(o.data?.jsonrpc!=="2.0")console.debug("Ignoring non-JSON-RPC message",r.error.message,o);else console.error("Failed to parse message",r.error.message,o),this.onerror?.(Error("Invalid JSON-RPC message received: "+r.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,t){if(e.method!==SS)console.debug("Sending message",e);this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var VS=[av];class sm extends vn{_client;_hostInfo;_hostCapabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_registeredEvents=new Set;_events=new rv;_methods=new sv;setRequestHandler=(...e)=>{let[t,...o]=Q1("request",e)??e;this._methods.claim(t,"setRequestHandler"),super.setRequestHandler.call(this,t,...o)};setNotificationHandler=(...e)=>{let[t,...o]=Q1("notification",e)??e;this._methods.claim(t,"setNotificationHandler"),super.setNotificationHandler.call(this,t,...o)};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 o=super._wrapHandler(e,t);if(e==="ui/initialize"||e==="ping")return o;return async(r,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 o(r,s)}}eventSchemas={sizechange:ES,sandboxready:CS,initialized:LS,requestteardown:NS,loggingmessage:cr};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 o=(r)=>{if(e==="initialized")this._initializedReceived=!0;this._events.dispatch(e,r)};if(e==="loggingmessage")this.setNotificationHandler("notifications/message",(r)=>{o(r.params)});else this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},(r)=>o(r));this._registeredEvents.add(e)}warnIfRequestHandlerReplaced(e,t,o){if(t&&o)console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t,o,r){super(r);this._client=e,this._hostInfo=t,this._hostCapabilities=o,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),this._ensureEventSlot("initialized"),this._hostContext=r?.hostContext||{},this.replaceRequestHandler("ui/initialize",{params:HS.shape.params,result:FS},(s)=>this._onAppsInitialize(s)),this.replaceRequestHandler("ping",(s,a)=>(this.onping?.(s.params,a),{})),this.replaceRequestHandler("ui/request-display-mode",{params:tv.shape.params,result:ov},()=>({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:ZS.shape.params,result:TS},async(t,o)=>{if(!this._onmessage)throw Error("No onmessage handler set");return this._onmessage(t,o)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced("onopenlink",this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler("ui/open-link",{params:qS.shape.params,result:PS},async(t,o)=>{if(!this._onopenlink)throw Error("No onopenlink handler set");return this._onopenlink(t,o)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced("ondownloadfile",this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler("ui/download-file",{params:DS.shape.params,result:jS},async(t,o)=>{if(!this._ondownloadfile)throw Error("No ondownloadfile handler set");return this._ondownloadfile(t,o)})}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:tv.shape.params,result:ov},async(t,o)=>{if(!this._onrequestdisplaymode)throw Error("No onrequestdisplaymode handler set");return this._onrequestdisplaymode(t,o)})}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:BS.shape.params,result:go},async(t,o)=>{if(!this._onupdatemodelcontext)throw Error("No onupdatemodelcontext handler set");return this._onupdatemodelcontext(t,o)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",async(t,o)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(t.params,o)})}_oncreatesamplingmessage;get oncreatesamplingmessage(){return this._oncreatesamplingmessage}set oncreatesamplingmessage(e){this.warnIfRequestHandlerReplaced("oncreatesamplingmessage",this._oncreatesamplingmessage,e),this._oncreatesamplingmessage=e,this.replaceRequestHandler("sampling/createMessage",async(t,o)=>{if(!this._oncreatesamplingmessage)throw Error("No oncreatesamplingmessage handler set");return this._oncreatesamplingmessage(t.params,o)})}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,o)=>{if(!this._onlistresources)throw Error("No onlistresources handler set");return this._onlistresources(t.params,o)})}_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,o)=>{if(!this._onlistresourcetemplates)throw Error("No onlistresourcetemplates handler set");return this._onlistresourcetemplates(t.params,o)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced("onreadresource",this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler("resources/read",async(t,o)=>{if(!this._onreadresource)throw Error("No onreadresource handler set");return this._onreadresource(t.params,o)})}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,o)=>{if(!this._onlistprompts)throw Error("No onlistprompts handler set");return this._onlistprompts(t.params,o)})}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:VS.includes(t)?t:av,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},o=!1;for(let r of Object.keys(e)){let s=this._hostContext[r],a=e[r];if(JS(s,a))continue;t[r]=a,o=!0}if(o)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},IS,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(o,r)=>this._client.request({method:"tools/call",params:o},{signal:r.mcpReq.signal}),t.tools.listChanged)this._client.setNotificationHandler("notifications/tools/list_changed",(o)=>this.sendToolListChanged(o.params))}if(t.resources){if(this.onlistresources=async(o,r)=>this._client.request({method:"resources/list",params:o},{signal:r.mcpReq.signal}),this.onlistresourcetemplates=async(o,r)=>this._client.request({method:"resources/templates/list",params:o},{signal:r.mcpReq.signal}),this.onreadresource=async(o,r)=>this._client.request({method:"resources/read",params:o},{signal:r.mcpReq.signal}),t.resources.listChanged)this._client.setNotificationHandler("notifications/resources/list_changed",(o)=>this.sendResourceListChanged(o.params))}if(t.prompts){if(this.onlistprompts=async(o,r)=>this._client.request({method:"prompts/list",params:o},{signal:r.mcpReq.signal}),t.prompts.listChanged)this._client.setNotificationHandler("notifications/prompts/list_changed",(o)=>this.sendPromptListChanged(o.params))}}return super.connect(e)}}function JS(e,t){return JSON.stringify(e)===JSON.stringify(t)}var zn=!1,am=sm,im=rm;function nv(){let e=new Xl({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 Y1(new URL("mcp",location.href)))}}var WS=[200,800],GS=(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 KS(e,t){return new Promise((o,r)=>{t?.throwIfAborted();let a=setTimeout(()=>{t?.removeEventListener("abort",i),o()},e),i=()=>{clearTimeout(a),t?.removeEventListener("abort",i),r(t?.reason)};t?.addEventListener("abort",i,{once:!0})})}function cv(e,{signal:t,onDiagnostic:o,wait:r=KS}={}){return async(s)=>{for(let a=1;;a++){t?.throwIfAborted();try{let i=await e(s);if(t?.throwIfAborted(),a>1)o?.({state:"recovered",uri:s.uri,attempt:a});return i}catch(i){if(t?.throwIfAborted(),!GS(i))throw i;let n=WS[a-1];if(n===void 0)throw o?.({state:"exhausted",uri:s.uri,attempt:a,message:i.message}),Object.assign(Error(`MCP resource transport failed for ${s.uri} after ${a} 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"});o?.({state:"retry",uri:s.uri,attempt:a,nextAttempt:a+1,delayMs:n,message:i.message}),await r(n,t)}}}}var YS={setTimer:(e,t)=>setTimeout(e,t),clearTimer:(e)=>clearTimeout(e)};function uv({setTimer:e,clearTimer:t}){let o;return{get armed(){return o!==void 0},arm(r,s){o=e(()=>{o=void 0,r()},s)},clear(){t(o),o=void 0}}}function dv(e,t={}){let{onError:o,delay:r=150}=t,s=t.setTimer&&t.clearTimer?uv({setTimer:t.setTimer,clearTimer:t.clearTimer}):uv(YS),a=!1,i=!1,n=!1,u=!1,d=!1;function l(){if(!a||i||n||!u||s.armed)return;s.arm(()=>{n=!0;let p=d;u=d=!1,Promise.resolve().then(()=>e(p)).catch((h)=>{if(!i)o?.(h)}).finally(()=>{n=!1,l()})},r)}return{schedule(p=!1){if(i)return;u=!0,d||=p,l()},start(){a=!0,l()},close(){i=!0,u=d=!1,s.clear()}}}function lv(e){let t=[],o=new Map;for(let r of e){if(!r.group){t.push(r);continue}let s=o.get(r.group)??[];if(!o.has(r.group))o.set(r.group,s);s.push(r)}return[...t.length?[{label:null,entries:t}]:[],...[...o].sort(([r],[s])=>r.localeCompare(s)).map(([r,s])=>({label:r,entries:s}))]}var Ut=(e)=>("receiveBuild"in e);function Sn(){if(!am||!im)throw Error("MCP Apps are not available in the HTTP showcase.");return{AppBridge:am,PostMessageTransport:im}}function pu(e){for(let t of e.contents){if(t.mimeType!=="text/html;profile=mcp-app"||!("text"in t)||typeof t.text!=="string")continue;let o=Ve(t._meta)?t._meta.ui:void 0;return{html:t.text,csp:Ve(o)?o.csp:void 0}}return}function hu(e){let t=e.contentWindow;if(!t)throw Error("The preview frame has no window.");return new(Sn()).PostMessageTransport(t,t)}var ks=(e)=>typeof e.structuredContent==="object"&&e.structuredContent!==null?e.structuredContent:void 0,kn=(e)=>e.content?.find((t)=>t.type==="text")?.text;function _u(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 XS=(e)=>typeof e==="string"&&/^(?:ads:\/\/project\/build|ads:\/\/preview\/(?:manifest|live)(?:\?from=[a-f0-9]{64})?)$/.test(e);function QS(e,t){if(!Ve(e)||e.channel!=="ads-preview-http"||t===void 0||e.instance!==t.id)return;let{method:o,epoch:r,request:s,params:a}=e;if(o==="ready")return{method:o};if(o==="log")return{method:o,epoch:r,params:Ve(a)?a:{}};if((o==="read"||o==="prepare")&&typeof s==="number"&&Number.isSafeInteger(s))return{method:o,epoch:r,request:s,params:Ve(a)?a:void 0};return}var mv=(e)=>Ve(e)?e.code:void 0,ek=(e)=>Ve(e)?e.message:void 0;function gu({frame:e,context:t,draftScope:o}){let r,s=0,a=!1,i,n,u,d=new AbortController;async function l(w,R=!1){let P=await fetch("preview-http",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w),...R?{keepalive:!0}:{signal:d.signal}}),x=await P.json();if(!P.ok)throw Object.assign(Error(Ve(x)&&typeof x.error==="string"?x.error:"HTTP preview control failed."),{code:Ve(x)?x.code:void 0});return x}function p(w,R,P={}){if(!a&&r)e.contentWindow?.postMessage({channel:"ads-preview-http",instance:r.id,epoch:s,method:w,params:R,...P},"*")}async function h(w){if(a||w.source!==e.contentWindow||w.origin!=="null")return;let R=QS(w.data,r);if(R===void 0)return;if(R.method==="ready"){p("init",t),clearTimeout(n),i?.(),g.oninitialized?.();return}if(R.epoch!==s)return;if(R.method==="log"){g.onloggingmessage?.(R.params);return}let P=s,x=r;try{let j;if(R.method==="prepare")j=await l({...R.params,op:"prepare",id:x?.id});else{let k=R.params?.uri,z=o&&typeof k==="string"&&k.startsWith(o)?decodeURIComponent(k.slice(o.length)):k;if(!XS(z)||o&&k===z||typeof k!=="string"||!g.onreadresource)throw Error("Unexpected HTTP preview control resource.");j=await g.onreadresource({uri:k})}if(!a&&s===P)p("response",void 0,{request:R.request,result:j})}catch(j){if(!a&&s===P)p("response",void 0,{request:R.request,error:ek(j),code:mv(j)})}}let v=(w)=>{h(w)},b=()=>o?o+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(a||!r)return;try{await l({op:"keepalive",id:r.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,_u(R))}catch(w){if(a)return;if(mv(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())p("build",R)},setHostContext(w){t=w,p("context",w)},async sendToolInput(){},async sendToolResult(w){let R=ks(w);if(R?.draftScope!==o)throw Error("Cannot change the scope of an HTTP preview instance.");let P=(R?.previewResult?.structuredContent??R)?.scenario;u=typeof P==="object"&&P!==null?P.id:void 0,s++,p("select",w)},async connect(){let w=await l({op:"open",draftScope:o});if(!Ve(w)||typeof w.id!=="string"||typeof w.url!=="string")throw Error("HTTP preview control failed.");if(r={id:w.id,url:w.url},a){await l({op:"close",id:r.id},!0);return}window.addEventListener("message",v);let R=new Promise((P,x)=>{i=P,n=setTimeout(()=>x(Error("HTTP preview initialization timed out.")),15000)});e.setAttribute("sandbox","allow-scripts allow-forms"),e.dataset.previewDelivery="http",e.src=r.url,await R},async teardownResource(){p("teardown",void 0)},async close(){if(a)return;if(p("teardown",void 0),a=!0,clearTimeout(n),window.removeEventListener("message",v),d.abort(),r)await l({op:"close",id:r.id},!0).catch(()=>{});e.remove()}};return g}async function hv({slot:e,title:t,createFrame:o,sandboxUrl:r,httpPreview:s=!1,resourceUri:a,result:i,readResource:n,callTool:u,context:d,onError:l,onState:p}){let h={slot:e,title:t,createFrame:o,sandboxUrl:r,httpPreview:s,resourceUri:a,readResource:n,callTool:u,context:d,onError:l,onState:p},v=i,b,g,w,R=!1;function P(){if(R||w)return;p?.({state:"loading"}),w=Promise.resolve().then(async()=>{if(await g,await b?.close(),R)return;g=pv({...h,result:v,onReopen:P});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=pv({...h,result:v,onReopen:P});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,j){if(!R&&!w)b?.receiveBuild(x,j)},reconcileBuild(){if(!R&&!w)return b?.reconcileBuild();return},async close(){R=!0,await w,await b?.close()}}}async function pv({slot:e,title:t,createFrame:o,sandboxUrl:r,httpPreview:s,resourceUri:a,result:i,readResource:n,callTool:u,context:d,onError:l,onState:p,onReopen:h}){let v=!1,b=s?void 0:await n({uri:a}),g=b&&pu(b);if(!s&&!g)throw Error("Comparison preview App is unavailable.");let w=o(t);if(!s&&r!==void 0)w.src=r;e.append(w);let R=ks(i)?.draftScope,P=s?gu({frame:w,context:d(w),draftScope:R}):new(Sn()).AppBridge(null,{name:"ADS showcase",version:"1.0.0"},{serverResources:{},serverTools:{},logging:{}},{hostContext:d(w)});P.onreadresource=(z)=>n(z),P.oncalltool=(z)=>u(z),P.onerror=(z)=>{if(!v)l(z)},P.onloggingmessage=(z)=>{if(v||z.logger!=="ads-preview")return;let M=fu(z.data);if(M.code==="ADS_PREVIEW_REOPEN"){h();return}if(p?.(M),M.state==="error")l(Error(M.message))};let x,j=new Promise((z,M)=>{x=setTimeout(()=>M(Error("Comparison App initialization timed out.")),15000),P.oninitialized=()=>{clearTimeout(x),z()}});if(!Ut(P)&&g)P.onsandboxready=()=>P.sendSandboxResourceReady({html:g.html,...g.csp===void 0?{}:{csp:g.csp},sandbox:"allow-scripts allow-forms"});let k=new ResizeObserver(()=>P.setHostContext(d(w)));try{await Promise.all([Ut(P)?P.connect():P.connect(hu(w)),j]),k.observe(w),await P.sendToolInput({arguments:{}}),await P.sendToolResult(i)}catch(z){throw k.disconnect(),w.remove(),await P.close(),z}finally{clearTimeout(x)}return{updateResult:async(z)=>{await P.sendToolResult(z)},refreshContext:()=>P.setHostContext(d(w)),receiveBuild:(z,M)=>{if(Ut(P))P.receiveBuild(z,M)},reconcileBuild:()=>Ut(P)?P.reconcileBuild():void 0,async close(){v=!0,k.disconnect();try{await P.teardownResource({},{timeout:500})}catch{}await P.close(),w.remove()}}}function vu(e,t){return t===e||t.startsWith(e+"/")||t.startsWith(e+".")}function _v(e,t,o,r=new Map){let s=new Map(o.map(({id:d,title:l,revision:p,state:h,preview:v})=>[d,{id:d,title:l,revision:p,state:h,...v?{preview:v}:{}}])),a=(d)=>{let l=s.get(d);return l?[l]:[]},i=new Map(e.map((d)=>[d.id,{...d,drafts:(d.drafts??[]).flatMap((l)=>a(l.id))}]));for(let d of t){let l=i.get(d.id);i.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((p)=>p.id===l.id))d.drafts.push(...a(l.id))};for(let d of o){let l=r.get(d.id);for(let p of l?.scenarios??[]){if(!d.units.some((v)=>n(v,p)))continue;let h=i.get(p.id);if(!h)h={...p,draftOnly:!0,drafts:[]},i.set(p.id,h);u(h,d)}}for(let d of o)for(let l of d.units){let p=l.split("/")[0]??"";if(!["brand","tokens","components","patterns","mocks"].includes(p))continue;let h=[...i.values()].filter((v)=>n(l,v));if(h.length)for(let v of h)u(v,d);else i.set(l,{id:l,unit:l,title:l.split("/").at(-1)??l,kind:p,draftOnly:!0,pendingDraftScenario:!0,drafts:a(d.id)})}return{scenarios:[...i.values()],categories:[...i.values()].filter((d)=>d.kind==="tokens")}}var xn={brand:"Brand",artwork:"Artwork",tokens:"Tokens",components:"Components",patterns:"Patterns",mocks:"Mocks",other:"Other"},fv=(e)=>Object.hasOwn(xn,e);function tk(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)&&fv(t)?t:"other"}var ok=(e)=>fv(e)?xn[e]:"Other";function gv(e,t){let o=[];for(let r of t){let s=e.filter((a)=>a.drafts?.some((i)=>i.id===r.id));for(let a of s)o.push({...a,id:`drafts/${encodeURIComponent(r.id)}/${encodeURIComponent(a.id)}`,previewId:a.id,title:`${r.title||r.id} · ${a.title}`,group:ok(a.kind),drafts:[r]});for(let a of r.units??[]){if(s.some((n)=>a==="tokens"&&n.kind==="tokens"||n.unit===a||!n.unit&&vu(a,n.id)))continue;let i=tk(a);o.push({id:`drafts/${encodeURIComponent(r.id)}/${encodeURIComponent(a)}`,unit:a,kind:i,title:`${r.title||r.id} · ${a.split("/").at(-1)??a}`,group:xn[i],drafts:[r]})}if(!s.length&&!r.units?.length)o.push({id:`drafts/${encodeURIComponent(r.id)}`,kind:"other",title:r.title||r.id,group:"Other",drafts:[r]})}return o}var rk=["off","hover","always"];var vv=Object.freeze({mode:"off",bounds:!0,tracks:!1,gaps:!1,padding:!0,margins:!0,mini:!1}),sk=(e)=>rk.some((t)=>t===e),xo=(e,t)=>typeof e==="object"&&e!==null?e[t]:void 0;function Rn(e){let t=xo(e,"mode");return{mode:sk(t)?t:xo(e,"all")===!0?"always":"off",bounds:xo(e,"bounds")===!0,tracks:xo(e,"tracks")===!0,gaps:xo(e,"gaps")===!0,padding:xo(e,"padding")===!0,margins:xo(e,"margins")===!0,mini:xo(e,"mini")===!0}}function wv(e){let{mode:t,...o}=Rn(e);return{all:t==="always",...o}}function yv(e){let{mode:t,...o}=Rn(e);return t!=="off"&&Object.values(o).some(Boolean)}function ak(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 ik(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 bv(e,t,o){let r=e.drafts?.find((n)=>n.id===o)??e.drafts?.[0],s=r&&(t?.drafts?.find((n)=>n.id===r.id)??r.preview),a=r?s?.scenarios?.find((n)=>n.id===e.id)??s:t?.previews?.find((n)=>n.id===e.id)??e.build,i=ak(a);return{state:i,label:`${r?"Draft · ":""}${ik(i,a)}${r&&i==="ready"?" · unaccepted":""}`}}function zv(e){let t=e.get("draft"),o=e.get("revision");return e.get("view")==="approval"&&t&&o?{draft:t,revision:o}:null}var nk=(e)=>e==="visible-label"?"Its visible label":"A boundary shown on hover and focus",ck=(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 Sv(e){let t=await e.json().catch(()=>({}));if(!e.ok){let o=t!==null&&typeof t==="object"?Reflect.get(t,"error"):void 0,r=o!==null&&typeof o==="object"?Reflect.get(o,"message"):void 0;throw Error(typeof r==="string"?r:`The approval request failed (${e.status}).`)}return t}async function kv(e,t){let o=new URL("api/approval",location.href);return o.search=new URLSearchParams({draft:e.draft,revision:e.revision}).toString(),await Sv(await fetch(o,{signal:t??null,headers:{Accept:"application/json"}}))}async function xv(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})}),o=await Sv(t);return o!==null&&typeof o==="object"&&Reflect.get(o,"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 Rv(e,t,o){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 s=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",nk(n.boundary)]},{key:"reason",cells:["Reason",n.reason]},{key:"verified",cells:["ADS verifies",ck(n.boundary)]}]}]})),a=s.length-1,i={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:o}}};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:a>=0?[...s,i]:[i]}}var de,Dv,uk,Ro,qv,Su,Zv,yu,Bv,mm,cm,dk,ku={},xu=[],lk=/^m(i|n|o|s|text|space)$/,pm=Array.isArray,Hv=xu.slice,wr=Object.assign;function Ru(e){e&&e.parentNode&&e.remove()}function bu(e,t,o,r,s){var a={type:e,props:t,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s||++Dv,__i:-1,__u:0};return!s&&de.vnode&&de.vnode(a),a}function xs(e){return e.children}function zu(e,t){this.props=e,this.context=t,this.__g=0}function qo(e,t){if(t==null)return e.__?qo(e.__,e.__i+1):null;for(var o;t<e.__k.length;t++)if((o=e.__k[t])&&o.__e)return o.__e;return typeof e.type!="function"||e.props.__P?null:qo(e)}function Fv(e){if((e=e.__)&&e.__c&&!e.props.__P)return e.__e=null,e.__k.some(function(t){return t&&(e.__e=t.__e)}),Fv(e)}function Pv(e){(8&e.__g||!(e.__g|=8)||!Ro.push(e)||Su++)&&qv==de.debounceRendering||((qv=de.debounceRendering)||queueMicrotask)(mk)}function mk(){var e,t,o,r,s,a,i,n,u;try{for(t=1;Ro.length;)Ro.length>t&&Ro.sort(Zv),e=Ro.shift(),t=Ro.length,8&e.__g&&(r=void 0,s=void 0,a=(s=(o=e).__v).__e,i=[],n=[],(u=o.__P)&&((r=wr({constructor:void 0},s)).__v=s.__v+1,de.vnode&&de.vnode(r),hm(u,r,s,o.__n,u.namespaceURI,32&s.__u?[a]:null,i,a||qo(s),32&s.__u,n),r.__v=s.__v,r.__.__k[r.__i]=r,Gv(i,r,n),s.__=s.__e=null,r.__e!=a&&Fv(r)))}finally{Ro.length=Su=0}}function Vv(e,t,o,r,s,a,i,n,u,d,l){var p,h,v,b,g,w,R=r.__k||xu,P=t.length;for(u=pk(o,t,R,u,P),p=0;p<P;p++)(v=o.__k[p])!=null&&(h=~v.__i&&R[v.__i]||ku,v.__i=p,w=hm(e,v,h,s,a,i,n,u,d,l),b=v.__e,(h.ref!=v.ref||8&h.__u)&&(h.ref&&_m(h.ref,null,v,h),v.ref&&l.push(v.ref,v.__c||b,v)),g=g||b,4&v.__u?(u=Jv(v,u,e,!h.__v),h.__e&&(h.__e=null)):typeof v.type=="function"&&w!==void 0?u=w:b&&(u=b.nextSibling),v.__u&=-7);return o.__e=g,u}function pk(e,t,o,r,s){var a,i,n,u,d,l,p,h,v,b,g=o.length,w=g,R=0,P=!1,x=e.__k=Array(s);for(a=0;a<s;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(typeof i!="object"||i.constructor==String?i=x[a]=bu(null,i):pm(i)?i=x[a]=bu(xs,{children:i}):i.constructor===void 0&&i.__b?i=x[a]=bu(i.type,i.props,i.key,i.ref,i.__v):x[a]=i,u=a+R,i.__=e,i.__b=e.__b+1,n=null,~(d=i.__i=hk(i,o,u,w))&&(w--,(n=o[d])&&(n.__u|=2)),n&&n.__v?(i.__u|=2,d==u-1?R--:d==u+1?R++:d!=u&&(d>u?R--:R++,P=!0)):(~d||(s>g?R--:s<g&&R++),typeof i.type!="function"&&(i.__u|=4))):x[a]=null;if(P){for(l=[],p=[],a=0;a<s;a++)if((i=x[a])&&2&i.__u){for(h=0,v=l.length;h<v;)l[b=h+v>>1]<i.__i?h=b+1:v=b;l[h]=i.__i,p[a]=h+1}for(R=l.length;a--;)p[a]&&(p[a]==R?R--:x[a].__u|=4)}if(w)for(a=0;a<g;a++)!(n=o[a])||2&n.__u||(n.__e==r&&(r=qo(n)),fm(n,n));return r}function Jv(e,t,o,r){var s,a,i;if(typeof e.type=="function"){if(e.props.__P)return t;if(s=e.__k)for(a=0;a<s.length;a++)s[a]&&(s[a].__=e,t=Jv(s[a],t,o,!1));return t}for(t&&!t.parentNode&&(t=qo(e))&&!t.parentNode&&(t=null),i=t;i&&i.nodeType==8;)i=i.nextSibling;for(e.__e!=i&&(!r&&o.moveBefore&&e.__e.parentNode?o.moveBefore(e.__e,t):o.insertBefore(e.__e,t||null)),t=e.__e;(t=t&&t.nextSibling)&&t.nodeType==8;);return t}function hk(e,t,o,r){var s,a,i,{key:n,type:u}=e,d=t[o],l=d&&!(2&d.__u);if(d===null&&n==null||l&&n==d.key&&u==d.type)return o;if(r>(l?1:0)){for(s=o-1,a=o+1;s>=0||a<t.length;)if((d=t[i=s>=0?s--:a++])&&!(2&d.__u)&&n==d.key&&u==d.type)return i}return-1}function jv(e,t,o){o==null&&(o=""),t[0]=="-"?e.setProperty(t,o):e[t]=o}function wu(e,t,o,r,s){var a,i;e:if(t=="style")if(typeof o=="string")e.style.cssText=o;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)o&&t in o||jv(e.style,t,"");if(o)for(t in o)r&&o[t]==r[t]||jv(e.style,t,o[t])}else if(t[0]=="o"&&t[1]=="n")(e.__e||(e.__e={}))[t]=o,o&&r||(i=cm[t]||(cm[t]=_k(t)),(e.__a||(e.__a={}))[t]=mm,a=t!=(t=t.replace(Bv,"$1")),(t=t.slice(2))[0]<"a"&&(t=t.toLowerCase()),o?e.addEventListener(t,i,a):e.removeEventListener(t,i,a));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]=o==null?"":o;break e}catch(n){}typeof o=="function"||(o==null||o===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&o==1?"":o))}}function _k(e){return function(t){if(this.__e){var o=this.__e[e];if(t[yu]==null)t[yu]=mm++;else if(t[yu]<this.__a[e])return;return o(de.event?de.event(t):t)}}}function hm(e,t,o,r,s,a,i,n,u,d){var l,p,h,v,b,g,w,R,P,x,j,k,z,M,X,K,se,pe,oe,V,te=t.type;if(t.constructor!==void 0)return null;if(128&o.__u&&(u=32&o.__u,l=o.__c.__z)){if(t.__u|=u,p=a=[],l.nodeType==8)for(h=1,v=l.nextSibling;v;v=v.nextSibling){if(v.nodeType==8){if(v.data.startsWith("$s"))h++;else if(v.data.startsWith("/$s")&&!--h)break}a.push(v)}else a.push(l);n=a[0]}(l=de.__b)&&l(t);e:if(typeof te=="function"){b=i.length;try{if(x=t.props,j=(l=te.prototype)&&l.render,k=(l=te.contextType)&&r[l.__c],z=l?k?k.props.value:l.__:r,o.__c?2&(g=t.__c=o.__c).__g&&(g.__g|=1):(j?t.__c=g=new te(x,z):(t.__c=g=new zu(x,z),g.constructor=te,g.render=gk),k&&k.sub(g),g.state||(g.state={}),g.__n=r,g.__g|=8,g.__h=[],g.__k=[]),j&&(g.__s||(g.__s=g.state),te.getDerivedStateFromProps&&(g.__s==g.state&&(g.__s=wr({},g.__s)),wr(g.__s,te.getDerivedStateFromProps(x,g.__s)))),w=g.props,R=g.state,g.__v=t,o.__c){if(j&&!te.getDerivedStateFromProps&&x!==w&&g.componentWillReceiveProps&&g.componentWillReceiveProps(x,z),t.__v==o.__v&&!(8&g.__g)||!(4&g.__g)&&g.shouldComponentUpdate&&g.shouldComponentUpdate(x,g.__s,z)===!1){t.__v!=o.__v&&(g.props=x,g.state=g.__s,g.__g&=-9),t.__e=o.__e,t.__k=o.__k,t.__k.some(function(le){le&&(le.__=t)}),xu.push.apply(g.__h,g.__k),g.__k=[],g.__h.length&&i.push(g),n=qo(o);break e}g.componentWillUpdate&&g.componentWillUpdate(x,g.__s,z),j&&g.componentDidUpdate&&g.__h.push(function(){g.componentDidUpdate(w,R,P)})}else j&&!te.getDerivedStateFromProps&&g.componentWillMount&&g.componentWillMount(),j&&g.componentDidMount&&g.__h.push(g.componentDidMount);if(g.context=z,g.props=x,g.__P=e,g.__g&=-5,M=de.__r,X=0,j)g.state=g.__s,g.__g&=-9,M&&M(t),l=g.render(g.props,g.state,g.context),xu.push.apply(g.__h,g.__k),g.__k=[];else do g.__g&=-9,M&&M(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&&(r=wr({},r,g.getChildContext())),j&&o.__c&&g.getSnapshotBeforeUpdate&&(P=g.getSnapshotBeforeUpdate(w,R)),K=l&&l.type===xs&&l.key==null?l.props.children:l,x.__P&&(l=n,s=(e=x.__P).namespaceURI,u=a=null,o.props&&o.props.__P!=e&&(o.__k.some(function(le){le&&fm(le,le)}),o.__k=null),n=o.__k?qo(o,0):null),n=Vv(e,pm(K)?K:[K],t,o,r,s,a,i,n,u,d),x.__P&&(t.__e=null,n=l),t.__u&=-161,128&o.__u&&(g.__z=null),p&&p.some(Ru),g.__h.length&&i.push(g),1&g.__g&&(g.__g&=-4)}catch(le){if(i.length=b,t.__v=null,u||a)if(le.then){if(se=0,t.__u|=u?160:128,a){for(~(oe=a.indexOf(n||void 0))||(oe=a.length);(V=a[oe-1])&&V.nodeType==8;)oe--;for(;oe<a.length;oe++)if(V=a[oe]){if(a[oe]=null,V.nodeType==8){if(V.data.startsWith("$s"))se++||(pe=V);else if(se&&V.data.startsWith("/$s")&&!--se){n=V;break}}else if(!se)break}}if(!pe){for(;n&&n.nodeType==8&&n.nextSibling;)n=n.nextSibling;pe=n}t.__c.__z||(t.__c.__z=pe),t.__e=n}else a&&a.some(Ru);else t.__e=o.__e;t.__k||(t.__k=o.__k||[]),le.then||Wv(t),de.__e(le,t,o)}}else n=t.__e=fk(o.__e,t,o,r,s,a,i,u,d,e);return(l=de.diffed)&&l(t),128&t.__u?void 0:n}function Wv(e){e&&(e.__c&&(e.__c.__g|=4),e.__k&&e.__k.some(Wv))}function Gv(e,t,o){for(var r=0;r<o.length;)_m(o[r++],o[r++],o[r++]);de.__c&&de.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(a){a.call(s)})}catch(a){de.__e(a,s.__v)}})}function fk(e,t,o,r,s,a,i,n,u,d){var l,p,h,v,b,g,w,R,P,x=o.props||ku,{props:j,type:k}=t;if(k=="svg"?s="http://www.w3.org/2000/svg":k=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),a){for(l=0;l<a.length;l++)if((b=a[l])&&(k?b.localName==k:b.nodeType==3)){e=b,a[l]=null;break}}if(!e){if(R=d.ownerDocument||document,!k)return R.createTextNode(j);e=R.createElementNS(s,k,j.is&&j),n&&(de.__m&&de.__m(t,a),n=!1),a=null}if(k){if(d=k=="template"?e.content:e,a=k=="textarea"&&j.defaultValue!=null?null:a&&Hv.call(d.childNodes),!n&&a)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"?h=b:l=="children"||(l in j)||l=="value"&&("defaultValue"in j)||l=="checked"&&("defaultChecked"in j)||wu(e,l,null,b,s);for(l in P=1&o.__u,j)b=j[l],l=="children"?v=b:l=="dangerouslySetInnerHTML"?p=b:l=="value"?g=b:l=="checked"?w=b:n&&typeof b!="function"||!(x[l]!==b||P&&b!=null)||wu(e,l,b,x[l],s);p?(n||h&&(p.__html==h.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[]):(h&&(e.textContent=""),(k=="foreignObject"||s=="http://www.w3.org/1998/Math/MathML"&&lk.test(k))&&(s="http://www.w3.org/1999/xhtml"),Vv(d,pm(v)?v:[v],t,o,r,s,a,i,a?a[0]:o.__k&&qo(o,0),n,u),a&&a.some(Ru)),n&&k!="textarea"||(l="value",k=="progress"&&g==null?e.removeAttribute(l):g==null||g===e[l]&&(k!="progress"||g)||wu(e,l,g,x[l],s),l="checked",w!=null&&w!=e[l]&&wu(e,l,w,x[l],s))}else x===j||n&&e.data==j||(e.data=j);return e}function _m(e,t,o,r){try{typeof e=="function"?t?t.__x=e(t)||1:r&&(r=r.__c||r.__e)&&(t=r.__x)&&(r.__x=null,typeof t=="function"?t():e(null)):e.current=t}catch(s){de.__e(s,o)}}function fm(e,t,o){var r,s;if(de.unmount&&de.unmount(e),!(r=e.ref)||r.current&&r.current!=e.__e||_m(r,null,t,e),r=e.__c){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){de.__e(a,t)}r.__P=r.__n=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&fm(r[s],t,typeof e.type!="function"||o&&!e.props.__P);(r=e.__e)&&(o||Ru(r),r.__e&&(r.__e=null)),e.__e=e.__c=e.__=null}function gk(e,t,o){return this.constructor(e,o)}function ju(e,t){var o,r,s,a;de.__&&de.__(e,t),t.nodeType==9&&(t=t.documentElement),r=(o=e&&32&e.__u)?null:t.__k,t.__k=bu(xs,{children:[e]}),s=[],a=[],hm(t,t.__k,r||ku,ku,t.namespaceURI,r?null:t.firstChild?Hv.call(t.childNodes):null,s,r?r.__e:t.firstChild,o,a),Gv(s,t.__k,a),t.__k.props.children=null}de={__e:function(e,t,o,r){for(var s,a,i;t=t.__;)if((s=t.__c)&&!(1&s.__g)){s.__g|=4;try{if((a=s.constructor)&&a.getDerivedStateFromError&&(s.setState(a.getDerivedStateFromError(e)),i=8&s.__g),s.componentDidCatch&&(s.componentDidCatch(e,r||{}),i=8&s.__g),i)return void(s.__g|=2)}catch(n){e=n,i=0}}throw Su=0,e}},Dv=0,uk=function(e){return e!=null&&e.constructor===void 0},zu.prototype.setState=function(e,t){var o=this.__s;o&&o!=this.state||(o=this.__s=wr({},this.state)),typeof e=="function"&&(e=e(wr({},o),this.props)),e&&(wr(o,e),this.__v&&(t&&this.__k.push(t),Pv(this)))},zu.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),Pv(this))},zu.prototype.render=xs,Ro=[],Su=0,Zv=function(e,t){return e.__v.__b-t.__v.__b},yu=Symbol(),Bv=/(PointerCapture)$|Capture$/i,mm=0,cm={},dk=0;var vk=0;function _(e,t,o,r,s,a){t||(t={});var i,n,u=t;if("ref"in u&&typeof e!="function")for(n in u={},t)n=="ref"?i=t[n]:u[n]=t[n];var d={type:e,props:u,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vk,__i:-1,__u:0};return(s||a)&&(d.__source=s,d.__self=a),de.vnode&&de.vnode(d),d}function wk({box:e,preserveAspectRatio:t="xMidYMid meet",axes:o=!0}){if(!([e.x,e.y,e.width,e.height].every(Number.isFinite)&&e.width>0&&e.height>0))return null;let r=Math.max(1,Math.ceil(Math.max(e.width,e.height)/48)),s=(a)=>[...new Set([...Array.from({length:Math.floor(a/r)+1},(i,n)=>n*r),a])].filter((i)=>!o||i*2!==a).sort((i,n)=>i-n);return _("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",viewBox:`${e.x} ${e.y} ${e.width} ${e.height}`,"data-step":r,preserveAspectRatio:t,"aria-hidden":"true",focusable:"false",children:[s(e.width).map((a)=>_("line",{className:"ds-artwork-grid-line",x1:e.x+a,x2:e.x+a,y1:e.y,y2:e.y+e.height},`x${a}`,!1,void 0,this)),s(e.height).map((a)=>_("line",{className:"ds-artwork-grid-line",x1:e.x,x2:e.x+e.width,y1:e.y+a,y2:e.y+a},`y${a}`,!1,void 0,this)),o&&_("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),o&&_("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)]},void 0,!0,void 0,this)}function Ge({id:e,label:t,icon:o,iconOnly:r=!1,title:s,disabled:a,hidden:i,pressed:n,current:u,enabled:d,expanded:l,controls:p,popoverTarget:h,section:v,variant:b="quiet",onClick:g}){return _("button",{id:e,type:"button",className:r===!1?b==="outlined"?o===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":o===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":r?t:void 0,title:s??(r?t:void 0),disabled:a,hidden:i,"aria-pressed":n,"aria-current":u?"page":void 0,"aria-expanded":l,"aria-controls":p,popoverTarget:h,"data-section":v,"data-enabled":d===void 0?void 0:String(d),onClick:g,children:[o!==void 0&&_("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>
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
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
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
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>
@@ -150,7 +150,7 @@ container holding the app. Specify either width or maxWidth, and either height o
150
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
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
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
- `}[o]}},void 0,!1,void 0,this),!r&&_("span",{className:"ds-toolbar-label",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function yk({id:e,label:t,icon:o,pressed:r=!1,disabled:s,quiet:a=!1,className:i,onClick:n}){let u=a===!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 _("button",{id:e,type:"button",className:i?u+" "+i:u,"aria-pressed":r,disabled:s,onClick:n,children:[_("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>
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
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
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
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>
@@ -182,8 +182,8 @@ container holding the app. Specify either width or maxWidth, and either height o
182
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
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
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
- `}[o]}},void 0,!1,void 0,this),_("span",{className:"ds-tile-label",children:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function bk({label:e,onReplay:t}){return _("span",{className:"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:[_("span",{className:"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:_("span",{className:"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,!1,void 0,this),_(Ge,{label:"Replay",title:`Replay ${e}`,variant:"outlined",onClick:t},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function zk({profile:e,columns:t,caption:o}){let r=Array.from({length:t},(s,a)=>a+1);return _("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:[_("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:o},void 0,!1,void 0,this),_("section",{className:"ads-grid-example ads-ui-atm_1jowkr6_usvi9m ads-ui-atm_833615_idpfg4 ads-ui-atm_1wf0rum_z9e1cl ads-ui-atm_h5r38d_z9e1cl","data-ads-profile":e,"data-ads-source":`ads-preview-facts.json#grids/${e}`,"aria-label":`${e} grid example`,children:r.map((s)=>_("div",{className:"ads-grid-cell 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_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_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_1cgskd2_l6f2xw ads-ui-atm_13uplcb_1m800s6 ads-ui-atm_1tf621q_1phvqmz ads-ui-atm_1jm3u9r_el7ql6 ads-ui-atm_13prmim_nqa18y",children:s},s,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Sk({profile:e,token:t,label:o}){return _("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:_("span",{className:"ux-grid-unit-label",children:o},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function kk({failed:e=!1,problem:t}){return _("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&&_("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 xk="",Rk="";function qk({content:e,outlined:t=!1}){let o=t?Rk:xk;switch(e){case"fill":return _("div",{className:"ds-applied-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"blocks":return _("span",{className:t===!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":"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_13prmim_nqa18y","data-slot":"value",children:[_("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_d3l4uo 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",children:"One"},void 0,!1,void 0,this),_("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_d3l4uo 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",children:"Two"},void 0,!1,void 0,this),_("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_d3l4uo 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",children:"Three"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);case"block":return _("span",{className:t===!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":"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_13prmim_nqa18y","data-slot":"value",children:_("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_d3l4uo 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",children:"content"},void 0,!1,void 0,this)},void 0,!1,void 0,this);case"text":return _("span",{className:t===!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":"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_13prmim_nqa18y","data-slot":"value",children:"Ag 123 The quick brown fox"},void 0,!1,void 0,this);case"label":return _("span",{className:t===!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":"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_13prmim_nqa18y","data-slot":"value",children:"Sample"},void 0,!1,void 0,this)}}function Pk({kind:e,curve:t=[0,0,1,1]}){switch(e){case"value":return null;case"paint":case"gradient":return _("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_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","data-slot":"value"},void 0,!1,void 0,this);case"shadow":return _("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_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","data-slot":"value"},void 0,!1,void 0,this);case"opacity":return _("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"radius":return _("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 _("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 _("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:[_("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 _("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:_("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"letter-spacing":return _("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:_("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 o=(r,s)=>`${+(r*40).toFixed(2)} ${+(40-s*40).toFixed(2)}`;return _("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:[_("path",{className:"ds-token-curve-axes",d:"M0 0V40H40",fill:"none"},void 0,!1,void 0,this),_("path",{className:"ds-token-curve-path",d:`M${o(0,0)} C${o(t[0],t[1])} ${o(t[2],t[3])} ${o(1,1)}`,fill:"none"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}}}function jk({label:e}){return _("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:_("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 Tk={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"]},oP=[...Tk.names].sort(),Ck={sm:{},md:{},lg:{},xl:{}};function Ek({name:e,size:t="sm",label:o}){let r=Ck[t];return _("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:o?"img":void 0,"aria-label":o,"aria-hidden":o?void 0:!0,children:_("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>
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
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
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
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>
@@ -215,7 +215,7 @@ container holding the app. Specify either width or maxWidth, and either height o
215
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
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
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 $k={unreported:"state-unreported",building:"state-building",checking:"state-checking",ready:"state-ready",stale:"state-stale",error:"state-error"};function Mk({state:e="unreported",variant:t="navigation",label:o,hint:r}){let s=t==="toolbar"&&e==="error";return _("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:o?"img":void 0,"aria-label":o,"aria-hidden":o?void 0:!0,title:o??r,children:_("span",{className:s===!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>
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
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
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
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>
@@ -247,9 +247,9 @@ container holding the app. Specify either width or maxWidth, and either height o
247
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
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
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
- `}[s?"warning":$k[e]]}},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Ik({label:e,href:t,current:o=!1,previewState:r,previewLabel:s,draftLabel:a,draftDescription:i,scenario:n,onClick:u}){return _("a",{className:o===!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_gat7eg_idpfg4 ads-ui-atm_1yv1cff_fg65tv 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_gat7eg_idpfg4 ads-ui-atm_1yv1cff_fg65tv 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":o?"page":void 0,"aria-description":s,"data-scenario":n,"data-build-state":r,onClick:u,children:[_("span",{className:"ds-navigation-label",children:e},void 0,!1,void 0,this),a&&_("span",{className:"draft-badge",title:i,children:[" ",a]},void 0,!0,void 0,this),r&&_(Mk,{state:r,hint:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Nk={narrow:void 0,wide:"","narrow-flush":"","wide-flush":""};function Kv({id:e,label:t,role:o,width:r="narrow",inline:s=!1,flush:a=!1,onToggle:i,children:n}){let u=Nk[a?r==="wide"?"wide-flush":"narrow-flush":r]??"";if(s)return _("div",{id:e,className:a===!1?r==="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":r==="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:o,"aria-label":t,children:n},void 0,!1,void 0,this);return _("div",{id:e,className:a===!1?r==="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":r==="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:o,"aria-label":t,onToggle:(d)=>i?.(d.newState==="open"),children:n},void 0,!1,void 0,this)}function Ok({title:e,sandbox:t="allow-scripts allow-same-origin allow-forms",viewport:o="auto"}){return _("iframe",{className:o==="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 Ak={auto:"",phone:""};function Lk({split:e=!1,accepted:t,draft:o,phone:r=!1}){let s=e&&t!==void 0,a=Ak[r?"phone":"auto"];return _("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(s),children:[s&&_("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:[_("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),_("div",{className:"draft-stage-area",children:_("div",{className:r===!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),_("section",{className:s===!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:[_("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:o.title,children:o.heading},void 0,!1,void 0,this),_("div",{className:"draft-stage-area",children:_("div",{className:r===!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 Tv=[{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."}],Yv=[{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"}],Xv=[{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 Qv(e){let t=Xv.find((o)=>o.name===e)?.layers??[];return Object.fromEntries(Yv.map((o)=>[o.name,t.includes(o.name)]))}function Uk({id:e="grid-options",inline:t=!1,mode:o="off",layers:r={},onModeChange:s,onLayerChange:a,onPreset:i,onOpenChange:n}){let u=Tv.find((d)=>d.name===o)?.hint;return _(Kv,{id:e,label:"Layout guides",role:"dialog",inline:t,onToggle:n,children:_("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":o,children:[_("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),_("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:Tv.map((d)=>_(Ge,{id:`${e}-mode-${d.name}`,label:d.label,pressed:o===d.name,onClick:()=>s?.(d.name)},d.name,!1,void 0,this))},void 0,!1,void 0,this),_("p",{id:`${e}-hint`,className:"ux-guide-hint","aria-live":"polite",children:u},void 0,!1,void 0,this),_("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:Yv.map((d)=>_(yk,{className:"ux-guide-tile",id:`${e}-layer-${d.name}`,label:d.label,icon:d.icon,pressed:r[d.name]===!0,quiet:o==="off",onClick:()=>a?.(d.name,r[d.name]!==!0)},d.name,!1,void 0,this))},void 0,!1,void 0,this),_("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:[_("span",{className:"ux-guide-presets-label",children:"Presets"},void 0,!1,void 0,this),Xv.map((d)=>_(Ge,{id:`${e}-preset-${d.name}`,label:d.label,onClick:()=>i?.(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 Rs,Se,nm,Cv,um=Object.is,qu=0,ew=[],dm=[],je=de,{__b:Ev,__r:$v,diffed:Mv,__c:Iv,unmount:Nv,__:Ov}=je;function Tu(e,t){je.__h&&je.__h(Se,e,qu||t),qu=0;var o=Se.__H||(Se.__H={__:[],__h:[]});return e>=o.__.length&&o.__.push({}),o.__[e]}function tw(e){return qu=1,Dk(sw,e)}function Dk(e,t,o){var r=Tu(Rs++,2);if(r.t=e,!r.__c&&(r.__=[o?o(t):sw(void 0,t),function(a){var i=r.__N?r.__N[0]:r.__[0],n=r.t(i,a);um(i,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Se,!Se.__f)){Se.__f=!0;var s=Se.shouldComponentUpdate;Se.shouldComponentUpdate=function(a,i,n){var u=this.__H;if(!u)return!0;var d=!1,l=this.props!=a;if(u.__.some(function(h){h.__N&&(d=!0,um(h.__[0],h.__N[0])||(l=!0))}),s){var p=s.call(this,a,i,n);return d?p||l:p}return!d||l}}return r.__}function Zk(e,t){var o=Tu(Rs++,3);!je.__s&&gm(o.__H,t)&&(o.__P=!0,o.__=e,o.u=t,Se.__H.__h.push(o))}function ow(e,t){var o=Tu(Rs++,4);!je.__s&&gm(o.__H,t)&&(o.__P=!1,o.__=e,o.u=t,Se.__h.push(o))}function rw(e){return qu=5,Bk(function(){return{current:e}},[])}function Bk(e,t){var o=Tu(Rs++,7);return gm(o.__H,t)&&(o.__=e(),o.__H=t),o.__}function Hk(){var e;do{for(;e=dm.shift();)try{qn(e)}catch(o){je.__e(o,{__:(e=e.__P)&&e.__v})}for(;e=ew.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(qn),t.__h.some(lm),t.__h=[]}catch(o){t.__h=[],je.__e(o,e.__v)}}}while(dm.length)}je.__b=function(e){Se=null,Ev&&Ev(e)},je.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ov&&Ov(e,t)},je.__r=function(e){$v&&$v(e),Rs=0;var t=(Se=e.__c).__H;t&&(nm==Se?Se.__h=[]:(t.__h.some(qn),t.__h.some(lm),Rs=0),t.__h=[],t.__.some(function(o){o.__N&&(o.__=o.__N),o.u=o.__N=void 0})),nm=Se},je.diffed=function(e){Mv&&Mv(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&Lv(ew.push(t)),t.__H.__.some(function(o){o.u&&(o.__H=o.u)})),nm=Se=null},je.__c=function(e,t){t.some(function(o){try{o.__h.some(qn),o.__h=o.__h.filter(function(r){return!r.__||lm(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],je.__e(r,o.__v)}}),Iv&&Iv(e,t)},je.unmount=function(e){Nv&&Nv(e);var t,o,r=e.__c;r&&r.__H&&(r.__H.__.some(function(s){try{if(s.__P&&s.__c){if(o===void 0){for(o=e.__;o&&(!o.__c||!o.__c.__P);)o=o.__;o=o&&o.__c}s.__P=o,Lv(dm.push(s))}else qn(s)}catch(a){t=a}}),r.__H=void 0,t&&je.__e(t,r.__v))};var Av=typeof requestAnimationFrame=="function";function Fk(e){var t,o=function(){clearTimeout(r),Av&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(o,35);Av&&(t=requestAnimationFrame(o))}function Lv(e){e!=1&&Cv==je.requestAnimationFrame||((Cv=je.requestAnimationFrame)||Fk)(Hk)}function qn(e){var t=Se,o=e.__c;typeof o=="function"&&(e.__c=void 0,o()),Se=t}function lm(e){var t=Se;e.__c=e.__(),Se=t}function gm(e,t){return!e||e.length!=t.length||t.some(function(o,r){return!um(o,e[r])})}function sw(e,t){return typeof t=="function"?t(e):t}function aw({glyph:e,px:t,label:o,kind:r}){let s=rw(null);return ow(()=>{let a=s.current,i=e.drawing(t);if(a===null||i===null)return;return a.replaceChildren(i),()=>a.replaceChildren()},[e,t]),_("span",{className:r==="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:o?"img":void 0,"aria-label":o,title:o,"aria-hidden":o?void 0:"true",children:_("span",{ref:s,className:"icons-glyph"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Vk({glyph:e,flagged:t}){let o=rw(null);ow(()=>{let s=o.current,a=e.drawing(96);if(s===null||a===null)return;return s.replaceChildren(a),()=>s.replaceChildren()},[e]);let r=e.grid!==null;return _("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:[r&&_("span",{className:"icons-mag-grid",children:_(wk,{box:e.grid},void 0,!1,void 0,this)},void 0,!1,void 0,this),_("span",{ref:o,className:"icons-glyph"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function iw({finding:e}){return _("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:[_("strong",{children:e.rule},void 0,!1,void 0,this)," ",e.message]},void 0,!0,void 0,this)}function Jk({glyph:e,sizes:t}){let o=e.findings.length>0,r=`${e.findings.length} ${e.findings.every((a)=>a.severity==="error")?"error":"issue"}${e.findings.length===1?"":"s"}`,s=e.aliases.length?`alias: ${e.aliases.join(", ")}`:"";return _("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 ads-ui-atm_1m17nwq_u7e1hh","data-glyph":e.name,"data-findings":o?e.findings.length:void 0,"aria-label":e.name,children:[_("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:[_("h3",{className:"icons-card-name ads-ui-atm_1imonbj_idpfg4",children:e.name},void 0,!1,void 0,this),o&&_("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:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_("p",{className:"icons-alias",children:s},void 0,!1,void 0,this),_(Vk,{glyph:e,flagged:o},void 0,!1,void 0,this),_("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((a)=>_("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:[_(aw,{glyph:e,px:a.px,kind:"size"},void 0,!1,void 0,this),_("small",{className:"icons-size-px",title:a.token,children:a.px},void 0,!1,void 0,this)]},a.token,!0,void 0,this))},void 0,!1,void 0,this),e.findings.map((a,i)=>_(iw,{finding:a},i,!1,void 0,this))]},void 0,!0,void 0,this)}function Wk({file:e}){let t=e.tooLarge!==!0;return _("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&&_("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:_("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&&_("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:_("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),_("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 Gk({data:e}){let[t,o]=tw("");if(!e.configured)return _("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_z99rxc 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:[_("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),_("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 _(Kk,{data:e,query:t,onQuery:o},void 0,!1,void 0,this)}function Kk({data:e,query:t,onQuery:o}){let r=t.trim().toLowerCase(),s=e.glyphs.filter((p)=>[p.name,...p.aliases].some((h)=>h.toLowerCase().includes(r))),a=e.textSize?.px??16,i=`${e.source??""} · ${e.glyphs.length} glyphs${e.grid?` · ${e.grid.width} × ${e.grid.height} grid`:e.mixed?" · Mixed grids":""} · ${e.aliasCount} aliases`,n=s.length===0,u=e.glyphs.length?`No glyph matches “${t.trim()}”.`:"No glyphs in this set.",d=e.logos??null,l=d!==null;return _("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_z99rxc 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:[_("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:[_("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:[_("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),_("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:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_("input",{className:"icons-search",type:"search",value:t,onInput:(p)=>o(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,h)=>_(iw,{finding:p},h,!1,void 0,this)),_("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:[_("span",{className:"icons-heading-title",children:"At text size"},void 0,!1,void 0,this),_("small",{className:"icons-heading-note",children:["Every glyph at ",a,"px, the size used beside text"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_("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:s.map((p)=>_("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:_(aw,{glyph:p,px:a,label:p.name,kind:"text"},void 0,!1,void 0,this)},p.name,!1,void 0,this))},void 0,!1,void 0,this),_("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:[_("span",{className:"icons-heading-title",children:"Glyphs"},void 0,!1,void 0,this),_("small",{className:"icons-heading-note",children:"Enlarged construction grid and actual icon sizes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n&&_("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:u},void 0,!1,void 0,this),_("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:s.map((p)=>_(Jk,{glyph:p,sizes:e.sizes},p.name,!1,void 0,this))},void 0,!1,void 0,this),l&&_("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:[_("span",{className:"icons-heading-title",children:"Other products’ logos"},void 0,!1,void 0,this),_("small",{className:"icons-heading-note",children:d?.source},void 0,!1,void 0,this)]},void 0,!0,void 0,this),l&&_("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:(d?.files??[]).map((p)=>_(Wk,{file:p},p.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var Yk=[{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 Xk({section:e="tokens",hiddenSections:t=[],onSection:o}){return _("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:Yk.map((r)=>_(Ge,{label:r.label,icon:r.icon,section:r.name,current:e===r.name,hidden:t.includes(r.name),onClick:()=>o?.(r.name)},r.name,!1,void 0,this))},void 0,!1,void 0,this)}function Qk({id:e,label:t,children:o}){return _("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:o},void 0,!1,void 0,this)}function ex({label:e,open:t=!0,onToggle:o,children:r}){let[s,a]=tw(t);return Zk(()=>a(t),[t]),_("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:(i)=>{let n=i.currentTarget.open;if(a(n),n!==t)o?.(n)},children:[_("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:[_(Ek,{name:s?"chevron-down":"chevron-right"},void 0,!1,void 0,this),_("span",{className:"ux-navigation-group-label",children:e},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_("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:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function tx(e){let[t="",...o]=e.split(`
251
- `),r=/^(.+?\.)\s+(.+)$/.exec(t),s=r?r[1]:t,a=[],i=[];for(let n of[...r?[r[2]]:[],...o].map((u)=>u.trim()).filter(Boolean)){let u=/^(\S+?:\d+(?::\d+)?|[\w./-]+\.\w+):\s+(?:([a-z][a-z0-9-]*):\s+)?(.+)$/.exec(n);if(!u){i.push(n);continue}let d=u[3],l=/^(.+?[.!?])\s+(.+)$/.exec(d);a.push({location:u[1],rule:u[2],summary:l?l[1]:d,detail:l?.[2]})}return{title:s,problems:a,notes:i}}function ox({message:e}){let{title:t,problems:o,notes:r}=tx(e),s=o.length>1?` ${o.length} problems`:"";return _("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:[_("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,_("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:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_("ul",{className:"ux-status-problems",tabIndex:0,"aria-label":"Problems",children:o.map((a,i)=>_(rx,{...a},i,!1,void 0,this))},void 0,!1,void 0,this),r.map((a,i)=>_("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:a},i,!1,void 0,this))]},void 0,!0,void 0,this)}function rx({location:e,rule:t,summary:o,detail:r}){return _("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:[_("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&&_("span",{className:"ux-status-file",children:e},void 0,!1,void 0,this),t&&_("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),_("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:o},void 0,!1,void 0,this),r&&_("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:[_("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),_("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:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var sx={ready:"state-ready",checking:"state-checking",reloading:"state-building",compiling:"state-building",reverting:"state-building",error:"warning"},ax={ready:"ready",checking:"checking",reloading:"building",compiling:"building",reverting:"building",error:"error"};function ix({idPrefix:e="",phase:t="ready",message:o="Preview is up to date.",warmup:r,warmupState:s,title:a,failure:i,onRetry:n}){let u=(l)=>e+l,d=t==="error";return _("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:[_("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: ${o.split(`
252
- `)[0]}`,title:a??o,popoverTarget:u("status-details"),"data-phase":t,"data-warmup":s,children:_("span",{className:d===!1?"ds-preview-indicator":"ds-preview-indicator preview-warning","data-state":ax[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>
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
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
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
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>
@@ -281,9 +281,9 @@ container holding the app. Specify either width or maxWidth, and either height o
281
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
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
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
- `}[sx[t]]}},void 0,!1,void 0,this)},void 0,!1,void 0,this),_(Kv,{id:u("status-details"),width:"wide",flush:!0,children:_("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:[_("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?i?.category:void 0,"data-error-code":d?i?.code:void 0,"data-resource-uri":d?i?.resourceUri:void 0,children:_(ox,{message:o},void 0,!1,void 0,this)},void 0,!1,void 0,this),(r||d)&&_("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:[r&&_("p",{id:u("warmup-status"),className:"ux-status-warmup",children:r},void 0,!1,void 0,this),d&&_("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:_(Ge,{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 Pu({title:e,description:t,searchable:o=!1,onSearch:r,children:s}){return _("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:[_("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:[_("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:[_("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),o&&_("input",{className:"ux-specimen-search",type:"search","aria-label":"Find token",placeholder:"Find a token",onInput:(a)=>r?.(a.currentTarget.value)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),t&&_("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),_("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:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function nx({title:e,id:t,description:o,arrangement:r="stack",width:s="full",children:a}){return _("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:[_("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),o&&_("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:o},void 0,!1,void 0,this),_("div",{className:r==="row"?s==="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":s==="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":r==="row-center"?s==="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":s==="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":r==="row-end"?s==="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":s==="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":s==="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":s==="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:a},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function cx({label:e,columns:t,rows:o}){return _("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:_("table",{className:"ux-specimen-table","aria-label":e,children:[_("thead",{children:_("tr",{children:t.map((r)=>_(Uv,{role:"column",align:r.align,children:r.label},r.label,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),_("tbody",{children:o.map((r)=>_("tr",{"data-key":r.key,children:t.map((s,a)=>_(Uv,{role:s.rowHeader===!0?"row":"cell",align:s.align,children:s.sample===!0?_("div",{"data-slot":"sample","data-key":r.key,"aria-hidden":"true"},void 0,!1,void 0,this):r.cells[a]},a,!1,void 0,this))},r.key,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function Uv({role:e,align:t="start",children:o}){if(e==="column")return _("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:o},void 0,!1,void 0,this);if(e==="row")return _("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:o},void 0,!1,void 0,this);return _("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:o},void 0,!1,void 0,this)}function nw({label:e,choices:t,chosen:o,onChoose:r}){return _("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((s)=>_(Ge,{label:s.label,pressed:s.id===o,onClick:()=>r?.(s.id)},s.id,!1,void 0,this))},void 0,!1,void 0,this)}var cw="(width < 47.5rem)";function ux({collapsed:e=!1,capture:t=!1,headerHidden:o=!1,viewport:r="auto",loading:s=!1,previewLoading:a=!1,previewBusy:i=!1,brand:n,sections:u,actions:d,navigation:l,overlays:p,previewTools:h,previewToolsHidden:v=!1,children:b}){let g=!t&&!o,w=e||t,R=!t&&h!==void 0;return _("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(s),"data-collapsed":String(e),"data-capture":String(t),"data-viewport":r,"aria-busy":s,children:[g&&_("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:[_("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),_("div",{className:"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_9z25xx_1qrv8r3 ads-ui-atm_1c77ke4_idpfg4 ads-ui-atm_c884dg_kb7nvz ads-ui-atm_1gx9sub_kb7nvz ads-ui-atm_vkxp9v_idpfg4",children:[!s&&_("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),_("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),p,_("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:[_("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:_("div",{className:"ux-workspace-entries",children:l},void 0,!1,void 0,this)},void 0,!1,void 0,this),_("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:_("section",{id:"preview",className:r==="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":i,children:[_("div",{className:"ux-workspace-stage",children:[R&&_("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:h},void 0,!1,void 0,this),_("div",{id:"frame-slot",className:r==="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),a&&_("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:_("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:_("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 dx({title:e="Design system",titleHint:t,section:o="tokens",hiddenSections:r=[],navigationLabel:s="Entries",navigation:a=[],previewStatus:i,guides:n={available:!1},guideOptions:u,theme:d={label:"Use dark theme",next:"dark"},brands:l,split:p,comparison:h=!1,onSection:v,onEntry:b,onGroupToggle:g,onPaneToggle:w,onViewport:R,onTheme:P,onBrand:x,onSplit:j,onMinimize:k,children:z,...M}){let X=M.collapsed===!0,K=M.viewport==="phone",se=l!==void 0&&l.names.length>0,pe=p?.available===!0,oe=(V)=>_(Ik,{scenario:V.id,label:V.title,href:V.href,current:V.current,previewState:V.previewState,previewLabel:V.previewLabel,draftLabel:V.draftLabel,draftDescription:V.draftDescription,onClick:(te)=>b?.(V.id,te)},V.id,!1,void 0,this);return _(ux,{...M,viewport:K&&!h?"phone":"auto",brand:_(xs,{children:[!X&&_("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:[_(jk,{},void 0,!1,void 0,this),_("span",{className:"ux-workspace-mark",children:"ADS"},void 0,!1,void 0,this),_("span",{id:"title",className:"ux-workspace-title",title:t,children:M.loading?"":e},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_(Ge,{id:"pane-toggle",label:X?"Show navigation pane":"Hide navigation pane",iconOnly:!0,icon:X?"chevron-right":"chevron-left",expanded:!X,controls:"sidebar",onClick:w},void 0,!1,void 0,this)]},void 0,!0,void 0,this),sections:_(Xk,{section:o,hiddenSections:r,...v===void 0?{}:{onSection:v}},void 0,!1,void 0,this),actions:_(xs,{children:[_(ix,{...i},void 0,!1,void 0,this),_(Ge,{id:"viewport",label:"Phone viewport",iconOnly:!0,icon:"phone",pressed:K,controls:"frame-slot",title:K?"Use available preview width":"Preview at phone width (390 px)",onClick:R},void 0,!1,void 0,this),_(Ge,{id:"grid-overlay",label:"Layout guides",iconOnly:!0,icon:"layout",controls:"grid-options",popoverTarget:"grid-options",hidden:!n.available,enabled:n.available&&n.enabled===!0,expanded:n.open===!0},void 0,!1,void 0,this),se&&_("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_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":"Preview brand",title:l?.value?`Brand: ${l.value}`:void 0,value:l?.value,onChange:(V)=>x?.(V.currentTarget.value),children:(l?.names??[]).map((V)=>_("option",{value:V,children:V},V,!1,void 0,this))},void 0,!1,void 0,this),_(Ge,{id:"theme",label:d.label,iconOnly:!0,icon:d.next==="dark"?"moon":"sun",disabled:d.disabled,onClick:P},void 0,!1,void 0,this),_(Ge,{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:_(Uk,{...u},void 0,!1,void 0,this),navigation:_(Qk,{id:"entries",label:s,children:a.map((V)=>V.label===void 0?V.entries.map(oe):_(ex,{label:V.label,open:V.open,onToggle:(te)=>g?.(V.key,te),children:V.entries.map(oe)},V.key,!1,void 0,this))},void 0,!1,void 0,this),previewTools:_(Ge,{id:"split-view",label:"Split view",iconOnly:!0,icon:"split",pressed:pe&&p?.pressed===!0,disabled:!pe,hidden:!pe,title:p?.title,onClick:j},void 0,!1,void 0,this),previewToolsHidden:!pe,children:z},void 0,!1,void 0,this)}function lx({title:e,description:t,frame:o="inline",states:r=[],state:s,onState:a,specimens:i}){let n=r.length>0,u=_(nw,{label:"State",choices:r.map((l)=>({id:l,label:l})),chosen:s,onChoose:a},void 0,!1,void 0,this),[d]=i;if(o==="screen")return _("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","data-frame":"screen","aria-label":e,children:[n&&_("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:u},void 0,!1,void 0,this),_("div",{className:"ux-scenario-specimen","data-slot":"specimen","data-frame":"screen","data-key":d?.key??""},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(o==="phone")return _(Pu,{title:e,description:t,children:[n&&u,_("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":d?.key??""},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return _(Pu,{title:e,description:t,children:[n&&u,i.map((l)=>_(mx,{name:l.key,title:l.title,text:l.note,headed:l.headed,arrangement:l.arrangement,width:l.width},l.key,!1,void 0,this))]},void 0,!0,void 0,this)}function mx({name:e,title:t,text:o,headed:r=!1,arrangement:s,width:a}){return _("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:[r&&_("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&&_("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),o&&_("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:o},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_(px,{name:e,arrangement:s,width:a},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function px({name:e,arrangement:t="stack",width:o="content"}){return _("div",{className:o==="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":o==="full"?"ux-scenario-measure":o==="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:_("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 hx={fill:"the line",pane:"280px",column:"360px",page:"720px"},_x={content:"its content",short:"160px",medium:"320px",tall:"560px"};function fx({inline:e="fill",block:t="content",label:o,direction:r}){return _("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:[_("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:`${o??"Container"} · ${hx[e]} × ${_x[t]}`},void 0,!1,void 0,this),_("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:r},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function gx({label:e,tone:t="neutral"}){return _("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_d3l4uo 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",children:e},void 0,!1,void 0,this)}function vx({label:e,expanded:t,onPress:o}){return _(Ge,{label:e,variant:"outlined",expanded:t,onClick:o},void 0,!1,void 0,this)}function wx({events:e}){return _("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)=>_("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:[_("span",{className:"ux-kit-event-name",children:t.name},void 0,!1,void 0,this),_("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 uw(e,t){ju(_(dx,{...t},void 0,!1,void 0,this),e)}function De(e){return(t,o)=>ju(_(e,{...o},void 0,!1,void 0,this),t)}var dw=De(Lk),lw=De(Pu),mw=De(({title:e,description:t,choices:o,sections:r})=>_(Pu,{title:e,...t===void 0?{}:{description:t},children:[o&&_(nw,{...o},void 0,!1,void 0,null),r.map((s)=>_(nx,{title:s.title,...s.id===void 0?{}:{id:s.id},...s.arrangement===void 0?{}:{arrangement:s.arrangement},...s.description===void 0?{}:{description:s.description},children:[s.tables.map((a)=>_(cx,{...a},a.label,!1,void 0,null)),s.more&&_(Ge,{label:s.more.label,variant:"outlined",onClick:s.more.onClick},void 0,!1,void 0,null)]},s.key,!0,void 0,null))]},void 0,!0,void 0,null)),rP=De(Gk),sP=De(Pk),aP=De(zk),iP=De(Sk),nP=De(kk),cP=De(qk),uP=De(bk),dP=De(lx),lP=De(fx),mP=De(gx),pP=De(vx),hP=De(wx);function pw(e){ju(null,e)}function vm(e){let t=document.createElement("div");return ju(_(Ok,{...e},void 0,!1,void 0,this),t),t.firstElementChild}var fw=(e)=>document.getElementById(e);function Ls(e){let t=fw(e);if(!t)throw Error(`The showcase page has no #${e}.`);return t}var yx=Ls("app"),Ze=new URLSearchParams(location.search),Ou=Ze.get("capture")==="1",hw=Ze.get("scenario"),bx=["brand","artwork","tokens","profiles","components","patterns","mocks","drafts"],zx=(e)=>bx.some((t)=>t===e),Tn={foundation:"tokens",profiles:"profiles",assets:"artwork"},Pm=(e,t)=>`${e}#${t}`;function _w(e){return e.flatMap((t)=>t.choices?.length?t.choices.map(({id:o,label:r,group:s})=>({...t,id:Pm(t.id,o),title:r,group:s,previewId:t.id,choice:o,choices:void 0})):[t])}var Sx=(e)=>Tn[e]??e,br=[],Ke,Es=Ze.get("view")==="approval"?null:Ze.get("draft"),jm=[],gw=[],Tm=new Map,To=Ze.get("split")==="1",bm=zv(Ze),Cu={kind:"idle"},wm,zm,Zt=[],to=0,Au;async function Lu(){let e=Zt;Zt=[],await Promise.allSettled(e.map((t)=>t.close()))}var ee="brand",ke={},vw=new Map,qs=!0,Uu=[],zr=[],Du=[],ww,$n,Me,ie,Ps,Cn,$s,Sm,js,yt=0,Pn=!Ou&&Ze.get("viewport")==="phone",be={loading:!0,title:"",titleHint:void 0,collapsed:!1,headerHidden:!1,previewLoading:!1,previewBusy:!1,guideMenuOpen:!1},Eu={phase:"ready",message:"Preview is up to date.",failure:void 0},ro=[{name:"light",scheme:"light"},{name:"dark",scheme:"dark"}],so=Ou&&Ze.get("theme")||"light",Zu=()=>ro.find((e)=>e.name===so)?.scheme??"light",yw=()=>ro[(ro.findIndex((e)=>e.name===so)+1)%ro.length]??{name:so,scheme:Zu()};function kx(){let e=yw();return{label:ro.length>1?`Use ${e.name} theme`:`Theme: ${so}`,next:Zu()==="dark"?"light":"dark",disabled:ro.length<2}}function bw(){document.documentElement.dataset.theme=Zu(),Ie()}document.documentElement.dataset.theme="light";var jn=[],Sr=Ou&&Ze.get("brand")||null,Bu=dv(async(e)=>{if(e)await Am();await bt(),await Nw()},{onError:at}),zw,Mn=!1,Ns=!1,Cm=!1,Po,jo,ym=0,Ms,Ts=!1,Eo=new AbortController;window.addEventListener("blur",()=>setTimeout(()=>{if(document.activeElement?.tagName==="IFRAME")for(let e of document.querySelectorAll(":popover-open"))e.hidePopover()},0));var Sw=nv(),zt=Sw.client,kw=(e,t={},o={})=>zt.callTool({name:e,arguments:t},{signal:Eo.signal,...o}),Mu=cv((e)=>zt.readResource(e,{signal:Eo.signal}),{signal:Eo.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)}}),xw=async(e)=>_u(await Mu({uri:e}));function Rw(e){let t=Du.find((o)=>o.name===e.name);if(!t||!(t._meta?.ui?.visibility??["model","app"]).includes("app"))throw Error("This tool is not callable from an App.");return zt.callTool(e)}var Os=(e)=>e.structuredContent,As=(e,t)=>Ve(e)?e[t]:void 0,xx=(e)=>String(As(e,"message")),Rx=(e,t)=>(e??(e===null?0:Number.NaN))<=(t??(t===null?0:Number.NaN)),km=(e,...t)=>e!==void 0&&t.includes(e),Em="",Iu=null,Nu;function me(e,t=!1,o=t?"error":e?"checking":"ready"){if(Cm)e="Connection interrupted. Reconnecting… The retained preview may be stale.",t=!0,o="error";else if(Iu&&o==="ready"&&Me?.kind!=="draft")e=Iu,t=!0,o="error";let r=e||"Preview is up to date.";if(!t)Nu=void 0;Em=r,Eu={phase:t?"error":o,message:r,failure:Nu},Ie()}function qx(){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 Px(){Ie()}function qw(){me(Me?"Updating preview…":"Opening preview…",!1,"reloading")}function Ye(){return $o().find((e)=>e.id===ke[ee])}function Us(e=Ye()){let t=br.find((o)=>o.id===Es&&Tm.get(o.id)?.scenario===e?.id);return e?.drafts?.find((o)=>o.id===Es)??t??e?.drafts?.[0]}function $m(){return Boolean(Us()&&(ee==="drafts"||Ye()?.draftOnly||To))}function xr(){return ee==="drafts"?Ye()?.previewId:Ye()?.previewId??ke[ee]}function En(){return`${ee}:${ee==="drafts"?ke[ee]:xr()}${$m()?`:draft:${Us()?.id}:split:${To}`:""}`}function $u(e=Me){return e?.key===En()}function Pw(e=$n){if($m()){let t=e?.drafts?.find((o)=>o.id===Us()?.id);return t?.scenarios?.find((o)=>o.id===xr())??t}return e?.previews?.find((t)=>t.id===xr())}var jw=(e)=>JSON.stringify(e&&[e.session,e.revision,e.current,e.live]);function Tw(){({scenarios:zr,categories:Uu}=_v(jm,gw,br,Tm))}function jx(e){let t=Os(e);Tm.set(t.id,t),Tw()}async function xm(e,t,o=Eo.signal){let r=(ww?.compiler?.buildTimeoutMs??300000)+15000;try{return await kw(e,t,{signal:AbortSignal.any([Eo.signal,o]),timeout:r})}catch(s){if(As(s,"code")!=="REQUEST_TIMEOUT")throw s;throw Object.assign(Error(`The preview request timed out after ${Math.ceil(r/1000)} seconds. No preview result was received. Retry the preview.`,{cause:s}),{code:"ADS_PREVIEW_REQUEST_TIMEOUT",category:"transport"})}}async function Mm(e,t,o){let r=(Ye()?.id===t||ee==="drafts")&&Ye()?.pendingDraftScenario||t!=null&&e.units?.includes(t)&&!jm.some((a)=>a.id===t),s=await xm("ads_show_draft",{id:e.id,...!r&&t?{scenario:t}:{}},o);if(s.isError)throw Error(kn(s)??"Draft preview failed.");if(r){let a=Os(s),i=a.scenarios.find((n)=>t==="tokens"?n.kind==="tokens":n.unit?n.unit===t:t!=null&&vu(t,n.id));if(!i)throw Error("Draft owner has no scenario yet. Add an independently mountable scenario before previewing it.");if(i.id!==a.scenario)s=await xm("ads_show_draft",{id:e.id,scenario:i.id},o);if(s.isError)throw Error(kn(s)??"Draft preview failed.")}return jx(s),s}function oo(e=!1){if(e)js=Me?.key;$s=void 0,be.previewLoading=!1,be.previewBusy=!1,Ie()}function Im(e){let t=new URL(location.href);for(let s of["scenario","draft","split","section","state"])t.searchParams.delete(s);if(ee==="drafts"){t.searchParams.set("section","drafts");let s=$o().find((i)=>i.id===e),a=s?.drafts?.[0];if(a)t.searchParams.set("draft",a.id);if(s?.previewId)t.searchParams.set("scenario",s.previewId);if(To)t.searchParams.set("split","1");return t.pathname+t.search+t.hash}let o=$o().find((s)=>s.id===e),r=Us(o);if(t.searchParams.delete("choice"),e)t.searchParams.set("scenario",o?.previewId??e);if(e&&Is?.scenario===(o?.previewId??e))t.searchParams.set("state",Is.name);if(o?.choice!==void 0)t.searchParams.set("choice",o.choice);if(r&&o&&(o.draftOnly||To)){if(t.searchParams.set("draft",r.id),!o.draftOnly)t.searchParams.set("split","1")}return t.pathname+t.search+t.hash}function $o(){if(ee==="drafts")return gv(zr,br);let e=_w(zr.filter((r)=>Tn[r.kind]===ee)),t=_w(ee==="tokens"?Uu:zr.filter((r)=>r.kind===ee&&Tn[r.kind]===void 0));return[...t.filter((r)=>r.choice==="summary"),...e,...t.filter((r)=>r.choice!=="summary")]}function Tx(){let e=$o(),t=(r)=>{let s=bv(r.previewId?{...r,id:r.previewId}:r,$n,Es),a=r.drafts??[],i=a.length>0&&ee!=="drafts";return{id:r.id,title:r.title,href:Im(r.id),current:r.id===ke[ee],previewState:s.state,previewLabel:s.label,draftLabel:i?a.length>1?`Drafts ${a.length}`:"Draft":void 0,draftDescription:i?r.draftOnly?"Draft only; no accepted version yet":"Draft available; use Split view to compare":void 0}},o=lv(e);if(ee==="drafts"){let r=Object.values(xn);o.sort((s,a)=>r.indexOf(s.label??"")-r.indexOf(a.label??""))}return o.map((r)=>{if(!r.label)return{key:"ungrouped",entries:r.entries.map(t)};let s=`${ee}:${r.label}`;return{key:s,label:r.label,open:vw.get(s)??!0,entries:r.entries.map(t)}})}var Hu={...vv},Cx=()=>ee==="drafts"?Ye()?.kind:ee,Nm=()=>{let e=Cx();return e!==void 0&&["components","patterns","mocks"].includes(e)||Ye()?.kind==="foundation"};function yr(){return Hu}function Ex(){return wv(yr())}function Cw(){return yv(yr())}function Ew(){let e=fw("grid-options");if(!Nm()&&e?.matches(":popover-open"))e.hidePopover();Ie()}function $x(){let{mode:e,...t}=yr(),o=(r)=>{Hu=r,Zm()};return{mode:e,layers:t,onModeChange:(r)=>o({...yr(),mode:r}),onLayerChange:(r,s)=>o({...yr(),[r]:s}),onPreset:(r)=>{let s=yr();o({...s,...Qv(r),mode:s.mode==="off"?"hover":s.mode})},onOpenChange:(r)=>{be.guideMenuOpen=r,Ie()}}}var Cs,Is=(()=>{let e=Ze.get("state"),t=Ze.get("scenario");return e&&t?{scenario:t,name:e}:void 0})();function dt(){let e=Ls("frame-slot"),t=ee==="drafts"?void 0:Ye(),o=t?.choice!==void 0&&t.previewId!==void 0?{target:t.previewId,token:t.choice,nonce:t.id}:void 0,r=Cs&&Cs.target===xr()&&Cs.token!==t?.choice?Cs:o,s=Is&&Is.scenario===xr()?Is.name:void 0;return{...r?{adsFocus:r}:{},adsState:s??null,theme:Zu(),adsTheme:so,...Sr?{adsBrand:Sr}:{},gridOverlay:Nm()&&Cw(),gridGuides:Ex(),gridGuideChoices:yr(),displayMode:"inline",containerDimensions:{width:e.clientWidth,height:e.clientHeight}}}function $w(){return["brand"].filter((e)=>!zr.some((t)=>t.kind===e))}function kr(){if(be.loading=!1,$w().includes(ee))ee="tokens";document.body.dataset.activeSection=ee;let e=$o();if(!e.some((t)=>t.id===ke[ee]))ke[ee]=(e.find((t)=>t.previewId===ke[ee])??e[0])?.id??null;Ew(),ie?.setHostContext(dt()),history.replaceState(null,"",Im(ke[ee])),Rm()}function Mx(){let e=Nm(),t=Boolean(Us(Ye()))&&!Ye()?.draftOnly,o=qx();return{title:be.title,titleHint:be.titleHint,loading:be.loading,collapsed:be.collapsed,capture:Ou,headerHidden:be.headerHidden,viewport:Pn?"phone":"auto",previewLoading:be.previewLoading,previewBusy:be.previewBusy,section:ee,hiddenSections:$w(),navigationLabel:ee.charAt(0).toUpperCase()+ee.slice(1),navigation:be.loading?[]:Tx(),previewStatus:{phase:Eu.phase,message:Eu.message,failure:Eu.failure,warmup:o.text,warmupState:o.state,title:[Em,o.text].filter(Boolean).join(`
286
- `)||void 0,onRetry:Dx},guides:{available:e,enabled:e&&Cw(),open:be.guideMenuOpen},guideOptions:$x(),theme:kx(),brands:jn.length?{names:jn.map((r)=>r.name),value:Sr??void 0}:void 0,comparison:Dt==="comparison",split:{available:t,pressed:t&&To,title:Ye()?.draftOnly?"No accepted version yet":t?"Compare accepted and draft versions":"No draft for this entry"},onSection:(r)=>{ee=r,kr(),bt().catch(at)},onEntry:(r,s)=>{if(s.button||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)return;s.preventDefault(),ke[ee]=r,kr(),bt().catch(at)},onGroupToggle:(r,s)=>{vw.set(r,s),Ie()},onPaneToggle:()=>qm(!be.collapsed),onViewport:Ux,onTheme:()=>{so=yw().name,bw(),ie?.setHostContext(dt());for(let r of Zt)r.refreshContext()},onBrand:(r)=>{Sr=r,Ie(),ie?.setHostContext(dt());for(let s of Zt)s.refreshContext()},onSplit:()=>{To=!To,kr(),bt().catch(at)},onMinimize:()=>{be.headerHidden=!0,qm(!0)}}}function Ie(){uw(yx,Mx())}var Dt=null;function Fu(...e){let t=Ls("frame-slot"),o=Dt;if(Dt)pw(t),Dt=null;if(t.replaceChildren(...e),o==="comparison")Ie()}function Om(e,t,o){let r=Dt!==e;if(r)Fu();if(t(Ls("frame-slot"),o),Dt=e,r)Ie()}async function Ix(){if(!bm)return;let e=bm,t=Cu.kind==="accepted"&&wm?wm:wm=await kv(e,Eo.signal),o=()=>Om("page",mw,Rv(t,Cu,()=>void r()));async function r(){Cu={kind:"working"},o(),Cu=await xv(e),o()}o(),me("")}function at(e){if(!Mn&&!Ns){oo();let t=As(e,"category"),o=As(e,"code"),r=(s)=>s===void 0||s===null?void 0:String(s);Nu={category:r(t)??(o==="ADS_RESOURCE_TRANSPORT"?"transport":"runner"),code:r(o)??"ADS_HOST_STARTUP"},me(`${xx(e)}${Me?`
287
- The retained preview is not verified against the current source.`:""}`,!0)}}async function Co(e){if(!e)return;try{await e.teardownResource({},{timeout:500})}catch{}await e.close()}function Mw(){if(Mn||Ns)return;Cm=!1,Ns=!0,Eo.abort(),++yt,Bu.close(),oo(),me(`${zn?"HTTP showcase":"MCP"} disconnected. The retained preview is stale. Refresh the page after restarting ADS.`,!0);let e=ie;ie=void 0,Co(e),++to,Lu()}async function Am(){let e=await xw("ads://project/explorer"),t=e.status;if(ww=t,$n=t.build,Du=e.tools,t.themes?.length){if(ro=t.themes,!ro.some((l)=>l.name===so))so=ro[0]?.name??so;bw(),ie?.setHostContext(dt())}jn=t.brands??[],Sr=jn.some((l)=>l.name===Sr)?Sr:jn[0]?.name??null,Ie(),ie?.setHostContext(dt()),gw=e.categories,jm=e.scenarios,br=e.drafts,be.title=(t.drafts?.previewOnly?"Draft · ":"")+t.project.showcase.title,be.titleHint=t.projectRoot,Tw();let o=qs?hw:ke[ee],r=qs?br.find((l)=>l.id===Es):void 0,s=Me,a=s?.kind==="draft"?br.find((l)=>l.id===s.draftId):void 0,i=Ke,n=r??(a&&i&&(a.revision!==i.revision||i.discovery?.state==="pending")?a:void 0);if(n){let l=await Mm(n,r?hw:i?.scenario);if(r)o=Os(l).scenario;if(Me?.kind==="draft"&&a){Ke=Os(l),Au=l;for(let p of Zt)if(p.side==="draft")await p.updateResult(l)}}let u=zr.find((l)=>l.id===o),d=u&&Sx(u.kind);if(ee==="drafts"||qs&&Ze.get("section")==="drafts"){ee="drafts";let l=$o(),p=l.find((h)=>h.drafts?.[0]?.id===Es&&h.previewId===o)??l.find((h)=>h.id===ke.drafts)??l.find((h)=>h.drafts?.[0]?.id===Es);ke.drafts=p?.id??l[0]?.id}else if(u&&d!==void 0&&zx(d)){ee=d;let l=qs?Ze.get("choice"):null,p=u.choices?.find((v)=>v.id===l)??u.choices?.[0],h=p?Pm(u.id,p.id):u.id;if(!p||Ye()?.previewId!==u.id||l!==null)ke[ee]=h}else if(qs&&Uu.some((l)=>l.id===o))ee="tokens",ke.tokens=o;qs=!1,kr()}function bt({force:e=!1}={}){if(Ns)return Promise.resolve();let t=xr(),o=En();if(Ps?.key===o)return Ps.promise;if(!e&&Cn?.key===o)return Promise.resolve();if(!e&&!Ps&&Me?.key===o)return Promise.resolve();Cn=void 0;let r={key:o,promise:Promise.resolve()};return Ps=r,r.promise=Nx(t,o).finally(()=>{if(Ps===r)Ps=void 0}),r.promise}async function Nx(e,t){Sm?.abort();let o=Sm=new AbortController,r=++yt;$s=!0,be.previewLoading=t!==js,be.previewBusy=!0,Ie();try{if(++to,await Lu(),r!==yt)return;if(bm){if(await Co(ie),r!==yt)return;ie=void 0,Me=void 0,js=void 0,Po=void 0,jo=void 0,oo(),await Ix();return}let s=$m()?Us():void 0;if(s){await Co(ie),ie=void 0,Po=void 0,jo=void 0;let h=await Mm(s,e,o.signal);if(r!==yt)return;let v=Ke=Os(h);if(Au=h,ee==="drafts"){let b=$o().find((g)=>g.drafts?.[0]?.id===s.id&&g.previewId===v.scenario);if(b)ke.drafts=b.id}else if(Ye()?.pendingDraftScenario||!$o().some((b)=>b.id===e))ke[ee]=v.scenario;Me={kind:"draft",key:En(),id:v.scenario,draftId:s.id,generation:r},Rm(),await Lx(),kr(),oo(!0),me("Draft preview only. Acceptance checks have not run.",!1,"ready");return}if(Ke=void 0,Rm(),!e){if(await Co(ie),r!==yt)return;if(ie=void 0,Me=void 0,js=void 0,Po=void 0,jo=void 0,Fu(),oo(),ee==="drafts"){Om("page",lw,{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 a=Du.find((h)=>h.name==="ads_show_scenario"),i=a?._meta?.ui?.resourceUri;if(!a||!i)throw Error("The server did not expose a preview App tool.");let n={id:e};if(a.inputSchema?.properties?.waitFor)n.waitFor=Ze.get("capture")==="1"||Ze.get("waitFor")==="verified"?"verified":"compiled";qw();let u=await xm(a.name,n,o.signal);if(r!==yt)return;let d=ks(u);if(u.isError)throw Object.assign(Error(kn(u)??"Preview build failed."),d?.failure);let l={kind:"accepted",key:t,id:e,generation:r,build:d?.build,manifestRevision:d?.manifestRevision};Me=l;let p=await Ax(i);if(r!==yt)return;if(Po==="ui://ads/preview"&&!l.manifestRevision)throw Error("The resource preview has no manifest revision.");if(js!==t)js=void 0;if(await p.sendToolInput({arguments:n}),await p.sendToolResult(u),r===yt&&!d?.manifestUri)oo(!0),me("")}catch(s){if(r===yt)Cn={key:En(),build:jw(Pw())},at(s)}}function Ox(e,t){let o=Me;if(e!==ie||t.logger!=="ads-preview"||o?.generation!==yt||!$u()||o.kind!=="accepted")return;let r=fu(t.data);if(r.id!==o.id)return;if(r.state==="guide-options"){Hu=Rn(r.options),Zm();return}if(r.state==="scenario-state"){if(typeof r.name==="string"&&typeof o.id==="string")Is={scenario:o.id,name:r.name},history.replaceState(null,"",Im(ke[ee])),ie?.setHostContext(dt());return}if(r.state==="navigate"){let a=Uu.find((d)=>d.id===r.target),i=a??zr.find((d)=>d.id===r.target&&Tn[d.kind]!==void 0),n=a?"tokens":i&&Tn[i.kind];if(!i||n===void 0)return;Cs={target:i.id,token:typeof r.token==="string"?r.token:void 0,nonce:Date.now()};let u=typeof r.token==="string"?i.choices?.find((d)=>d.id===r.token):void 0;if(u){Cs=void 0,ee=n,ke[n]=Pm(i.id,u.id),kr(),bt().catch(at);return}if(xr()===i.id&&ee===n){ie?.setHostContext(dt());return}if(ee=n,!i.choices?.length)ke[n]=i.id;kr(),bt().catch(at);return}let s=r.revision===o.manifestRevision||r.selectionRevision===o.manifestRevision;if(r.state==="ready"&&s)o.manifestRevision=r.revision,oo(!0),me("");else if(r.state==="checking"&&(!$s||s))oo(!0),me("Checking changes…");else if(r.state==="loading")me("Updating preview…",!1,"reloading");else if(r.state==="reverting")me("Restoring the last verified preview…",!1,"reverting");else if(r.code==="ADS_PREVIEW_REOPEN")ie=void 0,Po=void 0,jo=void 0,qw(),Co(e).then(()=>bt({force:!0})).catch(at);else if(r.state==="error")oo(),Nu={category:r.category??"build",code:r.code??"ADS_PREVIEW_BUILD",...r.resourceUri?{resourceUri:r.resourceUri}:{}},me([r.message,r.code,r.resourceUri].filter(Boolean).join(`
288
- `),!0)}async function Ax(e){if(Po===e&&jo)return jo;let t=++ym,o=ie;ie=void 0,Po=e;let r=jo=(async()=>{await Co(o);let s=Ts?void 0:await Mu({uri:e});if(t!==ym||Mn||Ns)throw Error("Preview opening was superseded.");let a=s&&pu(s);if(!Ts&&!a)throw Error("The preview resource contains no MCP App.");let i=vm({title:"Design-system preview"});if(!Ts&&Ms!==void 0)i.src=Ms;Fu(i);let n=Ts?gu({frame:i,context:dt()}):new(Sn()).AppBridge(null,{name:"ADS showcase",version:"1.0.0"},{serverResources:{},serverTools:{},logging:{}},{hostContext:dt()});ie=n,n.onreadresource=(l)=>Mu(l),n.oncalltool=Rw,n.onloggingmessage=(l)=>Ox(n,l),n.onerror=at;let u,d=new Promise((l,p)=>{u=setTimeout(()=>p(Error("MCP App initialization timed out.")),15000),n.oninitialized=()=>{clearTimeout(u),l()}});if(!Ut(n)&&a)n.onsandboxready=()=>n.sendSandboxResourceReady({html:a.html,...a.csp===void 0?{}:{csp:a.csp},sandbox:"allow-scripts allow-forms"});try{await Promise.all([Ut(n)?n.connect():n.connect(hu(i)),d])}catch(l){throw await Co(n),l}finally{clearTimeout(u)}return n})();try{return await r}catch(s){if(t===ym)Po=void 0,jo=void 0;throw s}}function Iw(e,t){if(ie&&Ut(ie))ie.receiveBuild(e,t);for(let o of Zt)o.receiveBuild(e,t)}async function Nw(e){let t=Me,o=e??await xw("ads://project/build");Iw("ads://project/build",o),$n=o,Px();let r=Hm(o.freshness);if(r!==Iu){if(Iu=r,t?.kind!=="draft")me("")}if(Ie(),Cn?.key===En()){let a=Pw(o);if(a&&(a.current||a.live)&&jw(a)!==Cn.build)await bt({force:!0});return}if(!t||$s||!$u(t))return;if(t.kind==="draft"){let a=o.drafts?.find((u)=>u.id===t.draftId),i=a?.scenarios?.find((u)=>u.id===Ke?.scenario)??a,n=i&&JSON.stringify([a?.session,i.revision,i.live?.revision,i.current]);if(i&&(i.current||i.live)&&t.buildSignature!==n){t.buildSignature=n;let u=br.find((l)=>l.id===t.draftId),d=Ke;if(u&&d){let l=await Mm(u,d.scenario);if(Me!==t||$s||!$u(t))return;Ke=Os(l),Au=l;for(let p of Zt)if(p.side==="draft")await p.updateResult(l)}}if(i?.state==="error")me("Draft preview build failed. Showing the previous preview.",!0);else if(i?.building)me(i.live||i.state==="checking"?"Draft preview compiled; checking changes…":"Building draft preview… Showing the previous preview.",!1,i.live||i.state==="checking"?"checking":"compiling");else if(i?.current&&zm?.state==="ready")me("Draft preview ready · unaccepted.");return}if(Me!==t||$s||!$u(t))return;let s=o.previews.find((a)=>a.id===t.id);if(!s){me("The selected scenario is no longer registered.",!0);return}if(km(s.state,"idle","building")&&t.build?.current&&s.session===t.build.session&&Rx(s.revision,t.build.revision))return;if(s.state==="error"){me(`${Yn(s)}. Showing an earlier view.
289
- ${Gu(s.diagnostics)}`,!0);return}if(km(s.state,"idle","building")){me(s.live?"Checking changes…":"Compiling changes… The current view is the previous preview.",!1,s.live?"checking":"compiling");return}if(s.current&&(s.revision!==t.build?.revision||s.session!==t.build?.session))await bt({force:!0});else if(s.current&&document.documentElement.dataset.adsConnection==="connected"&&Em.startsWith("Connection restored."))me("")}function Vu(e=!1){Bu.schedule(e)}async function Lx(){if(!Ke)return;let e=Ke,t=Au;zm=void 0;let o=++to;if(await Lu(),o!==to)return;Ow=To&&e.acceptedExists===!0,Fu(),Lm(),await Promise.all([...Ls("frame-slot").querySelectorAll(".draft-stage")].map(async(r)=>{let s=r.dataset.version==="draft"?"draft":"accepted",a=s==="draft"?t:await kw("ads_show_scenario",{id:e.scenario,waitFor:"compiled"});if(!a)throw Error("The draft preview has no result.");if(a.isError)throw Error(kn(a)??"Comparison build failed.");if(o!==to)return;let n=Du.find((d)=>d.name===(s==="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 hv({slot:r,title:s==="draft"?"Draft version":"Accepted version",createFrame:(d)=>vm({title:d}),sandboxUrl:Ms,httpPreview:Ts,resourceUri:n,result:a,readResource:Mu,callTool:Rw,context:(d)=>({...dt(),containerDimensions:{width:d.clientWidth,height:d.clientHeight}}),onError:(d)=>{if(o===to)at(d)},onState:(d)=>{if(o!==to)return;if(d.state==="guide-options"){Hu=Rn(d.options),Zm();return}if(s!=="draft")return;if(zm=d,d.state==="ready")me("Draft preview ready · unaccepted.");else if(d.state==="checking")me("Draft preview compiled; checking changes…",!1,"checking");else if(km(d.state,"loading","reverting"))me("Updating draft preview…",!1,"reloading")}});if(o!==to)await u.close();else Zt.push({...u,side:s})}))}var Ow=!1;function Lm(){if(!Ke||Dt!==null&&Dt!=="comparison")return;Om("comparison",dw,{split:Ow,phone:Pn,accepted:{side:"accepted",heading:"Accepted"},draft:{side:"draft",heading:`Draft · ${{draft:"unaccepted",checking:"checking acceptance",failed:"acceptance failed",conflict:"source conflict",interrupted:"acceptance interrupted","dependency-error":"dependency needs attention"}[Ke.state]??Ke.state}`,title:Ke.dependencies?.length?`Draft dependencies: ${Ke.dependencies.join(", ")}`:void 0}})}function Rm(){if(Ie(),Dt==="comparison")Lm()}var Um=window.matchMedia(cw);function qm(e){be.collapsed=e,Ie()}var Dm=()=>qm(Um.matches||be.headerHidden);Dm();Um.addEventListener("change",Dm);function Ux(){if(Pn=!Pn,Ie(),Dt==="comparison")Lm();let e=new URL(location.href);if(Pn)e.searchParams.set("viewport","phone");else e.searchParams.delete("viewport");history.replaceState(null,"",e.pathname+e.search+e.hash)}function Zm(){Ew(),ie?.setHostContext(dt());for(let e of Zt)e.refreshContext()}var Aw=new ResizeObserver(()=>ie?.setHostContext(dt()));Aw.observe(Ls("frame-slot"));function Dx(){(async()=>{await Am(),await bt({force:!0})})().catch(at)}window.addEventListener("pagehide",()=>{Mn=!0,Sm?.abort(),Eo.abort(),Bu.close(),Aw.disconnect(),Um.removeEventListener("change",Dm),Co(ie),++to,Lu(),zw?.close(),zt.close()},{once:!0});zt.onclose=Mw;zt.onconnectionchange=({connected:e,reconnected:t})=>{if(Mn||Ns)return;if(Cm=!e,document.documentElement.dataset.adsConnection=e?"connected":"reconnecting",!e){me("");return}if(t){if(me("Connection restored. Checking the current preview…",!1,"checking"),Vu(!0),ie&&Ut(ie))ie.reconcileBuild();for(let o of Zt)o.reconcileBuild()}};zt.onBuildReport?.((e,t)=>{if(e==="ads://project/build")Nw(t).catch(at);else Iw(e,t)});zt.setNotificationHandler("notifications/resources/list_changed",()=>Vu(!0));zt.setNotificationHandler("notifications/tools/list_changed",()=>Vu(!0));zt.setNotificationHandler("notifications/resources/updated",({params:e})=>{if(zn&&e.uri==="ads://project/build")return;Vu(e.uri==="ads://project/explorer")});try{let e=await fetch("host.json").then((r)=>r.json()),t=As(e,"sandboxUrl");if(Ms=typeof t==="string"?t:void 0,Ts=zn,zn&&!As(e,"httpPreview"))throw Error("HTTP showcase delivery is unavailable.");if(!Ms||new URL(Ms).origin===location.origin)throw Error("The separate-origin preview sandbox is unavailable.");await Sw.connect(),(zw=await zt.listen({resourcesListChanged:!0,toolsListChanged:!0,resourceSubscriptions:["ads://project/build","ads://project/tokens","ads://project/explorer"]})).closed.then((r)=>{if(r!=="local")Mw()}),await Am(),Bu.start(),await bt()}catch(e){at(e)}
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)}