{"version":3,"sources":["jsdelivr-header.js","/npm/@scalar/api-reference@1.55.1/src/helpers/openapi.ts","/npm/@scalar/api-reference@1.55.1/dist/_virtual/_plugin-vue_export-helper.js","/npm/@scalar/api-reference@1.55.1/src/features/Search/helpers/create-search-index.ts","/npm/@scalar/api-reference@1.55.1/src/features/Search/hooks/useSearchIndex.ts","/npm/@scalar/api-reference@1.55.1/src/features/Search/helpers/create-fuse-instance.ts","/npm/@scalar/api-reference@1.55.1/src/features/Search/components/SearchResult.vue","/npm/@scalar/api-reference@1.55.1/src/features/Search/components/SearchModal.vue","/npm/@scalar/api-reference@1.55.1/src/features/Search/components/SearchButton.vue","/npm/@scalar/api-reference@1.55.1/src/hooks/use-agent.ts","/npm/@scalar/api-reference@1.55.1/src/components/AgentScalar/AgentScalarButton.vue","/npm/@scalar/api-reference@1.55.1/src/components/AgentScalar/AgentScalarDrawer.vue","/npm/@scalar/api-reference@1.55.1/src/helpers/upload-temp-document.ts","/npm/@scalar/api-reference@1.55.1/src/components/AgentScalar/OpenMCPButton.vue","/npm/@scalar/api-reference@1.55.1/src/components/ClassicHeader.vue","/npm/@scalar/api-reference@1.55.1/src/hooks/use-intersection.ts","/npm/@scalar/api-reference@1.55.1/src/plugins/plugin-manager.ts","/npm/@scalar/api-reference@1.55.1/src/plugins/hooks/usePluginManager.ts","/npm/@scalar/api-reference@1.55.1/src/helpers/storage.ts","/npm/@scalar/api-reference@1.55.1/src/plugins/persistance-plugin.ts","/npm/@scalar/api-reference@1.55.1/src/helpers/id-routing.ts","/npm/@scalar/api-reference@1.55.1/src/helpers/lazy-bus.ts","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-client-selector-block/helpers/featured-clients.ts","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-client-selector-block/components/ClientDropdown.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-client-selector-block/components/ClientSelector.vue","/npm/@scalar/api-reference@1.55.1/src/features/specification-extension/helpers.ts","/npm/@scalar/api-reference@1.55.1/src/components/Badge/Badge.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/DownloadLink.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/IntroductionCard.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/Section.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/SectionColumn.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/SectionColumns.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/SectionContainer.vue","/npm/@scalar/api-reference@1.55.1/src/components/LoadingSkeleton.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/SectionContent.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/SectionHeader.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/SectionHeaderTag.vue","/npm/@scalar/api-reference@1.55.1/src/features/specification-extension/SpecificationExtension.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/InfoMarkdownSection.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/InfoDescription.vue","/npm/@scalar/api-reference@1.55.1/src/components/LinkList/LinkList.vue","/npm/@scalar/api-reference@1.55.1/src/features/external-docs/ExternalDocs.vue","/npm/@scalar/api-reference@1.55.1/src/features/info-object/Contact.vue","/npm/@scalar/api-reference@1.55.1/src/features/info-object/License.vue","/npm/@scalar/api-reference@1.55.1/src/features/info-object/TermsOfService.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/InfoLinks.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/InfoVersion.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/OpenApiVersion.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/IntroductionLayout.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/InfoBlock.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-info-block/components/IntroductionCardItem.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-server-selector-block/components/Selector.vue","/npm/@scalar/api-reference@1.55.1/src/blocks/scalar-server-selector-block/components/ServerSelector.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Auth/Auth.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/SectionAccordion.vue","/npm/@scalar/api-reference@1.55.1/src/components/ScreenReader.vue","/npm/@scalar/api-reference@1.55.1/src/components/Anchor/Anchor.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/is-type-object.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaHeading.vue","/npm/@scalar/api-reference@1.55.1/src/components/Anchor/WithBreadcrumb.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/has-complex-array-items.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/schema-composition.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/get-compositions-to-render.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/should-render-array-item-composition.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/get-property-description.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/should-display-description.ts","/npm/@scalar/api-reference@1.55.1/src/features/Operation/request-body-composition-index.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/get-schema-type.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/merge-all-of-schemas.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/get-ref-name.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/schema-name.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/is-empty-schema-object.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/sort-property-names.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaObjectProperties.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/Schema.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaComposition.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaEnumPropertyItem.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaEnums.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/LinkButton.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/RenderString.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/format-value.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaPropertyDefault.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaPropertyDetail.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/format-example.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaPropertyExamples.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaPropertyHeading.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/SchemaProperty.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/optimize-value-for-display.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/get-enum-values.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Schema/helpers/should-display-heading.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Models/components/ClassicLayout.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/CompactSection.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Models/components/ModernLayout.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Models/Model.vue","/npm/@scalar/api-reference@1.55.1/src/components/Section/SectionContainerAccordion.vue","/npm/@scalar/api-reference@1.55.1/src/components/ShowMoreButton.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Models/ModelTag.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Tags/components/ClassicLayout.vue","/npm/@scalar/api-reference@1.55.1/src/components/HttpMethod/HttpMethod.vue","/npm/@scalar/api-reference@1.55.1/src/components/OperationsList/OperationsListItem.vue","/npm/@scalar/api-reference@1.55.1/src/components/OperationsList/OperationsList.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Tags/components/TagSection.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Tags/components/ModernLayout.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Tags/Tag.vue","/npm/@scalar/api-reference@1.55.1/src/components/Lazy/Lazy.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/helpers/filter-selected-security.ts","/npm/@scalar/api-reference@1.55.1/src/components/OperationPath.vue","/npm/@scalar/api-reference@1.55.1/src/features/example-responses/ExampleSchema.vue","/npm/@scalar/api-reference@1.55.1/src/features/example-responses/ExampleResponse.vue","/npm/@scalar/api-reference@1.55.1/src/features/example-responses/ExampleResponseTab.vue","/npm/@scalar/api-reference@1.55.1/src/features/example-responses/ExampleResponseTabList.vue","/npm/@scalar/api-reference@1.55.1/src/features/example-responses/helpers/normalize-mime-type-object.ts","/npm/@scalar/api-reference@1.55.1/src/features/example-responses/helpers/normalize-mime-type.ts","/npm/@scalar/api-reference@1.55.1/src/features/example-responses/helpers/has-response-content.ts","/npm/@scalar/api-reference@1.55.1/src/features/example-responses/ExampleResponses.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/helpers/flatten-deep-object-query-parameter.ts","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/ContentTypeSelect.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/Header.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/Headers.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/helpers/get-parameter-examples.ts","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/ParameterListItem.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/ParameterList.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/RequestBody.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/OperationParameters.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/helpers/should-ignore-entity.ts","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/OperationResponses.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/callbacks/Callback.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/callbacks/Callbacks.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/SecurityRequirementBadgeScheme.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/components/SecurityRequirementBadge.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/helpers/operation-stability.ts","/npm/@scalar/api-reference@1.55.1/src/features/test-request-button/TestRequestButton.vue","/npm/@scalar/api-reference@1.55.1/src/features/x-badges/XBadges.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/layouts/ClassicLayout.vue","/npm/@scalar/api-reference@1.55.1/src/features/ask-agent-button/AskAgentButton.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/layouts/ModernLayout.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/Operation.vue","/npm/@scalar/api-reference@1.55.1/src/features/Operation/helpers/get-first-server.ts","/npm/@scalar/api-reference@1.55.1/src/features/Operation/helpers/get-required-security.ts","/npm/@scalar/api-reference@1.55.1/src/components/Content/Operations/TraversedEntry.vue","/npm/@scalar/api-reference@1.55.1/src/components/RenderPlugins/RenderPlugins.vue","/npm/@scalar/api-reference@1.55.1/src/components/SectionFlare/SectionFlare.vue","/npm/@scalar/api-reference@1.55.1/src/components/Content/Content.vue","/npm/@scalar/api-reference@1.55.1/src/components/MobileHeader.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ApiReferenceToolbarPopover.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ApiReferenceToolbarTitle.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ApiReferenceToolbarBlurb.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/DeployApiReference.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ApiReferenceToolbarConfigLayout.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ApiReferenceToolbarConfigLayoutOptions.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ApiReferenceToolbarConfigTheme.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ModifyConfiguration.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/components/ShareApiReference.vue","/npm/@scalar/api-reference@1.55.1/src/features/developer-tools/DeveloperTools.vue","/npm/@scalar/api-reference@1.55.1/src/features/multiple-documents/DocumentSelector.vue","/npm/@scalar/api-reference@1.55.1/src/helpers/download.ts","/npm/@scalar/api-reference@1.55.1/src/helpers/load-from-perssistance.ts","/npm/@scalar/api-reference@1.55.1/src/helpers/map-config-plugins.ts","/npm/@scalar/api-reference@1.55.1/src/helpers/map-config-to-workspace-store.ts","/npm/@scalar/api-reference@1.55.1/src/helpers/normalize-configurations.ts","/npm/@scalar/api-reference@1.55.1/src/components/ApiReference.vue","/npm/@scalar/api-reference@1.55.1/src/helpers/safe-deep-clone.ts","/npm/@scalar/api-reference@1.55.1/src/helpers/color-mode.ts","/npm/@scalar/api-reference@1.55.1/src/components/GettingStarted.vue","/npm/@scalar/api-reference@1.55.1/src/standalone/lib/html-api.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,8nPCYA,IAEM,GAAsB,GACpB,SAAU,EAIW,iBAAhB,EAAO,KACT,EAAO,KAGT,MAAM,QAAQ,EAAO,MAAQ,EAAO,KAAK,KAAK,KAAO,GAPnD,GAcX,SAAS,GAAiB,GACxB,MAAmB,iBAAR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AEG,EAAM,cACT,OAIF,MAAM,EACiC,iBAA9B,EACH,SAAS,cAAc,GACtB,EAEF,IAKD,IAAmB,SAAS,KAAK,SAAS,IAC5C,SAAS,KAAK,YAAY,GAI5B,EAAI,UACJ,EAAM,IACN,EAAI,MAAM,GAAe,IAE3B,GAIF,MAAM,EAAgB,KACpB,EAAM,cAAgB,GACtB,EAAI,SAAS,EAiCE,OA1BjB,SAAS,iBACP,6BACM,KACJ,QAAQ,KAAK,mGACJ,GAAA,IAEX,GAOO,SAAA,iBACP,mCACC,IACC,QAAQ,KACN,qHAEE,WAAY,GACd,OAAO,OAAO,EAAO,EAAG,OAAO,IAGnC,GAGe,CACf,MACA,iBAAwB,IAAA,EAAM,eAAiB,GAC/C,oBAAsB,IACpB,EAAM,cAAgB,CAAA,EAExB,UACD,S","file":"/npm/@scalar/api-reference@1.55.1/dist/index.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/@scalar/api-reference@1.55.1/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { MediaTypeObject } from '@scalar/workspace-store/schemas/v3.1/strict/media-type'\nimport type {\n  OpenApiDocument,\n  OperationObject,\n  ParameterObject,\n  ReferenceType,\n  SchemaObject,\n  SchemaReferenceType,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isObjectSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/** Object schema shape with properties, used when logging request body. */\ntype ObjectSchemaWithProperties = {\n  properties: Record<string, SchemaReferenceType<SchemaObject>>\n  required?: string[]\n}\n\nconst isSchemaObject = (value: unknown): value is SchemaObject => typeof value === 'object' && value !== null\n\nconst schemaTypeToString = (schema: SchemaObject): string => {\n  if (!('type' in schema)) {\n    return ''\n  }\n\n  if (typeof schema.type === 'string') {\n    return schema.type\n  }\n\n  return Array.isArray(schema.type) ? schema.type.join('|') : ''\n}\n\n/**\n * Resolves a schema reference from workspace-store to a SchemaObject.\n * Returns undefined when a reference exists but has not been resolved yet.\n */\nfunction resolveSchemaRef(ref: SchemaReferenceType<SchemaObject>): SchemaObject | undefined {\n  if (typeof ref === 'object' && ref !== null && '$ref' in ref) {\n    return isSchemaObject(ref['$ref-value']) ? ref['$ref-value'] : undefined\n  }\n\n  return ref\n}\n\n/**\n * Formats a property object into a string.\n */\nfunction formatProperty(key: string, obj: ObjectSchemaWithProperties): string {\n  let output = key\n  const isRequired = obj.required?.includes(key)\n  output += isRequired ? ' REQUIRED ' : ' optional '\n  const propRef = obj.properties[key]\n  if (!propRef) {\n    return output\n  }\n  const property = resolveSchemaRef(propRef)\n\n  if (property) {\n    output += schemaTypeToString(property)\n\n    if ('description' in property && typeof property.description === 'string') {\n      output += ` ${property.description}`\n    }\n  }\n\n  return output\n}\n\n/**\n * Recursively logs the properties of an object.\n */\nfunction recursiveLogger(obj: MediaTypeObject): string[] {\n  const results: string[] = ['Body']\n  const schema = getResolvedRef(obj?.schema)\n\n  if (!schema || !isObjectSchema(schema) || !schema.properties) {\n    return results\n  }\n\n  const properties = schema.properties\n  const schemaWithProps: ObjectSchemaWithProperties = {\n    properties,\n    required: schema.required,\n  }\n  Object.keys(properties).forEach((key) => {\n    if (!obj.schema) {\n      return\n    }\n\n    results.push(formatProperty(key, schemaWithProps))\n\n    const propRef = properties[key]\n    if (!propRef) {\n      return\n    }\n    const property = resolveSchemaRef(propRef)\n    if (property && isObjectSchema(property) && property.properties) {\n      const nestedProperties = property.properties\n      Object.keys(nestedProperties).forEach((subKey) => {\n        const ref = nestedProperties[subKey]\n        if (!ref) {\n          return\n        }\n        const nested = resolveSchemaRef(ref)\n        const typeStr = nested ? schemaTypeToString(nested) : ''\n        results.push(`${subKey} ${typeStr}`)\n      })\n    }\n  })\n\n  return results\n}\n\n/**\n * Extracts the request body from an operation.\n */\nexport function extractRequestBody(operation: OperationObject): string[] | null {\n  const content = getResolvedRef(operation?.requestBody)?.content\n  const contentValue = Object.values(content ?? {})\n  if (contentValue.length === 0) {\n    // No content found\n    return null\n  }\n\n  return contentValue.flatMap((media) => recursiveLogger(media))\n}\n\n/**\n * Formats a parameter into a searchable string.\n */\nfunction formatParameter(param: ParameterObject): string {\n  const output = [param.name]\n  output.push(param.required ? 'REQUIRED' : 'optional')\n  output.push(param.in)\n\n  if ('schema' in param && param.schema) {\n    const schema = getResolvedRef(param.schema)\n    if (schema) {\n      output.push(schemaTypeToString(schema))\n    }\n  }\n\n  if (param.description) {\n    output.push(param.description)\n  }\n\n  return output.join(' ')\n}\n\n/**\n * Extracts parameters from an operation into searchable strings.\n */\nexport function extractParameters(parameters: ReferenceType<ParameterObject>[]): string[] | null {\n  return parameters.map((parameter) => formatParameter(getResolvedRef(parameter)))\n}\n\n/**\n * Deep merge for objects\n */\nexport function deepMerge(source: Record<any, any>, target: Record<any, any>) {\n  for (const [key, val] of Object.entries(source)) {\n    if (val !== null && typeof val === 'object') {\n      target[key] ??= new val.__proto__.constructor()\n      deepMerge(val, target[key])\n    } else if (typeof val !== 'undefined') {\n      target[key] = val\n    }\n  }\n\n  return target\n}\n\n/**\n * Creates an empty specification object.\n * The returning object has the same structure as a valid OpenAPI specification, but everything is empty.\n */\nexport function createEmptySpecification(partialSpecification?: Partial<OpenApiDocument>) {\n  const emptySpecification = {\n    openapi: '3.1.0',\n    info: {\n      title: '',\n      description: '',\n      termsOfService: '',\n      version: '',\n      license: {\n        name: '',\n        url: '',\n      },\n      contact: {\n        email: '',\n      },\n    },\n    servers: [],\n    tags: [],\n    'x-scalar-original-document-hash': '',\n  }\n\n  if (!partialSpecification) {\n    return emptySpecification as OpenApiDocument\n  }\n\n  deepMerge(partialSpecification, emptySpecification)\n\n  return emptySpecification as OpenApiDocument\n}\n","//#region \\0plugin-vue:export-helper\nvar _plugin_vue_export_helper_default = (sfc, props) => {\n\tconst target = sfc.__vccOpts || sfc;\n\tfor (const [key, val] of props) target[key] = val;\n\treturn target;\n};\n//#endregion\nexport { _plugin_vue_export_helper_default as default };\n","import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { combineParams } from '@scalar/workspace-store/request-example'\nimport type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'\nimport type {\n  MediaTypeObject,\n  OpenApiDocument,\n  OperationObject,\n  ResponsesObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport type { FuseData } from '@/features/Search/types'\nimport { extractParameters, extractRequestBody } from '@/helpers/openapi'\n\nfunction responseExampleValueToString(value: unknown): string {\n  if (typeof value === 'string') {\n    return value\n  }\n\n  try {\n    return JSON.stringify(value)\n  } catch (_error) {\n    return ''\n  }\n}\n\nfunction mediaTypeExamplesToStrings(mediaType: MediaTypeObject): string[] {\n  const examplesFromNamedMap = Object.values(mediaType.examples ?? {})\n    .flatMap((example) => {\n      const resolvedExample = getResolvedRef(example)\n\n      if (!resolvedExample || !('value' in resolvedExample)) {\n        return []\n      }\n\n      return responseExampleValueToString(resolvedExample.value)\n    })\n    .filter((value) => value.length > 0)\n\n  const mediaTypeExample =\n    'example' in mediaType && mediaType.example !== undefined ? responseExampleValueToString(mediaType.example) : ''\n\n  return mediaTypeExample ? [mediaTypeExample, ...examplesFromNamedMap] : examplesFromNamedMap\n}\n\nfunction extractResponseExamples(responses: ResponsesObject | undefined): string[] {\n  if (!responses) {\n    return []\n  }\n\n  return Object.values(responses)\n    .flatMap((response) => {\n      const resolvedResponse = getResolvedRef(response)\n      if (!resolvedResponse?.content) {\n        return []\n      }\n\n      return Object.values(resolvedResponse.content).flatMap((mediaType) => {\n        const resolvedMediaType = getResolvedRef(mediaType)\n        if (!resolvedMediaType) {\n          return []\n        }\n\n        return mediaTypeExamplesToStrings(resolvedMediaType)\n      })\n    })\n    .filter((value) => value.length > 0)\n}\n\n/**\n * Create a search index from a list of entries.\n */\nexport function createSearchIndex(document: OpenApiDocument | undefined): FuseData[] {\n  const index: FuseData[] = []\n\n  /**\n   * Recursively processes entries and their children to build the search index.\n   */\n  function processEntries(entriesToProcess: TraversedEntry[]): void {\n    entriesToProcess.forEach((entry) => {\n      addEntryToIndex(entry, index, document)\n\n      // Recursively process children if they exist\n      if ('children' in entry && entry.children) {\n        processEntries(entry.children)\n      }\n    })\n  }\n\n  processEntries(document?.['x-scalar-navigation']?.children ?? [])\n\n  return index\n}\n\n/**\n * Adds a single entry to the search index, handling all entry types recursively.\n */\nfunction addEntryToIndex(entry: TraversedEntry, index: FuseData[], document?: OpenApiDocument): void {\n  // Operation\n  if (entry.type === 'operation') {\n    const pathItem = getResolvedRef(document?.paths?.[entry.path])\n    const operation = (getResolvedRef(pathItem?.[entry.method]) ?? {}) as OperationObject\n    const operationWithPathParams = {\n      ...operation,\n      parameters: combineParams(pathItem?.parameters, operation.parameters),\n    }\n\n    const parameters = extractParameters(operationWithPathParams.parameters ?? [])\n    const body = extractRequestBody(operationWithPathParams)\n    const responseExamples = extractResponseExamples(operationWithPathParams.responses)\n\n    index.push({\n      type: 'operation',\n      title: entry.title,\n      id: entry.id,\n      description: operationWithPathParams.description || '',\n      method: entry.method,\n      path: entry.path,\n      body: body || '',\n      parameters: parameters ?? '',\n      responseExamples,\n      operationId: operationWithPathParams.operationId,\n      entry,\n    })\n\n    return\n  }\n\n  // Webhook\n  if (entry.type === 'webhook') {\n    const webhook = getResolvedRef(document?.webhooks?.[entry.name]?.[entry.method]) ?? {}\n\n    index.push({\n      id: entry.id,\n      type: 'webhook',\n      title: entry.title,\n      description: 'Webhook',\n      method: entry.method,\n      body: webhook.description || '',\n      operationId: webhook.operationId,\n      entry,\n    })\n\n    return\n  }\n\n  // Model\n  if (entry.type === 'model') {\n    const schema = getResolvedRef(document?.components?.schemas?.[entry.name])\n\n    const description = schema?.description ?? ''\n\n    index.push({\n      type: 'model',\n      title: entry.title,\n      description: 'Model',\n      id: entry.id,\n      body: description,\n      entry,\n    })\n\n    return\n  }\n\n  // Models heading\n  if (entry.type === 'models') {\n    index.push({\n      id: entry.id,\n      type: 'heading',\n      title: 'Models',\n      description: 'Heading',\n      body: '',\n      entry,\n    })\n\n    return\n  }\n\n  // Tag\n  if (entry.type === 'tag' && entry.isWebhooks === true) {\n    index.push({\n      id: entry.id,\n      type: 'heading',\n      title: 'Webhooks',\n      description: 'Heading',\n      body: '',\n      entry,\n    })\n\n    return\n  }\n\n  if (entry.type === 'tag' && entry.isGroup === false) {\n    index.push({\n      id: entry.id,\n      title: entry.title,\n      description: entry.description || '',\n      type: 'tag',\n      body: '',\n      entry,\n    })\n\n    return\n  }\n\n  // Tag group\n  if (entry.type === 'tag' && entry.isGroup === true) {\n    index.push({\n      id: entry.id,\n      title: entry.title,\n      description: 'Tag Group',\n      type: 'tag',\n      body: '',\n      entry,\n    })\n\n    return\n  }\n\n  // Headings from info.description\n  if (entry.type === 'text') {\n    index.push({\n      id: entry.id,\n      type: 'heading',\n      title: entry.title ?? '',\n      description: 'Heading',\n      body: '',\n      entry,\n    })\n\n    return\n  }\n}\n","import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { FuseResult } from 'fuse.js'\nimport { type MaybeRefOrGetter, computed, ref, toValue } from 'vue'\n\nimport { createFuseInstance } from '../helpers/create-fuse-instance'\nimport { createSearchIndex } from '../helpers/create-search-index'\nimport type { FuseData } from '../types'\n\nconst MAX_SEARCH_RESULTS = 25\n\n/**\n * Creates the search index from an OpenAPI document.\n */\nexport function useSearchIndex(document: MaybeRefOrGetter<OpenApiDocument | undefined>) {\n  const searchIndex = computed<FuseData[]>(() => createSearchIndex(toValue(document)))\n\n  /** When the document changes we replace the search index */\n  const fuse = computed(() => {\n    const instance = createFuseInstance()\n    instance.setCollection(searchIndex.value)\n    return instance\n  })\n\n  const query = ref<string>('')\n\n  const results = computed(() => {\n    if (query.value.length !== 0) {\n      return fuse.value.search(query.value, {\n        limit: MAX_SEARCH_RESULTS,\n      })\n    }\n\n    // Show a few entries as a placeholder\n    return searchIndex.value.slice(0, MAX_SEARCH_RESULTS).map(\n      (item: FuseData, index: number) =>\n        ({\n          item,\n          refIndex: index,\n        }) satisfies FuseResult<FuseData>,\n    )\n  })\n\n  return {\n    results,\n    query,\n  }\n}\n","import Fuse from 'fuse.js'\n\nimport type { FuseData } from '@/features/Search/types'\n\n/**\n * Create a Fuse instance for searching the API reference.\n *\n * Doesn't have any data yet, so it's empty.\n */\nexport function createFuseInstance(): Fuse<FuseData> {\n  return new Fuse([], {\n    // Define searchable fields with weights to prioritize more important matches\n    keys: [\n      // Highest weight - titles are most descriptive\n      { name: 'title', weight: 0.7 },\n      // Medium weight - helpful but often verbose\n      { name: 'description', weight: 0.3 },\n      // Lowest weight - parameters are searchable but they can be very long and noisy\n      { name: 'parameters', weight: 0.2 },\n      // Lowest weight - can be very long and noisy\n      { name: 'body', weight: 0.2 },\n      // Low-medium weight - response examples can help full-text matching\n      { name: 'responseExamples', weight: 0.25 },\n      // High weight - unique identifiers for operations\n      { name: 'operationId', weight: 0.6 },\n      // Good weight - endpoint paths are searchable\n      { name: 'path', weight: 0.5 },\n      // Medium-high weight - helps with categorization\n      { name: 'tag', weight: 0.4 },\n      // Medium weight - useful for filtering by method\n      { name: 'method', weight: 0.3 },\n    ],\n\n    // Threshold controls how strict the matching is (0.0 = perfect match, 1.0 = very loose)\n    // 0.3 allows for some typos and partial matches while maintaining relevance\n    threshold: 0.3,\n\n    // Maximum distance between characters that can be matched\n    // Higher values allow matches even when characters are far apart in long text\n    distance: 100,\n\n    // Include the match score in results for debugging and potential UI enhancements\n    includeScore: true,\n\n    // Include detailed match information showing which parts of the text matched\n    includeMatches: true,\n\n    // Don't require matches to be at the beginning of strings\n    // Makes search more flexible and user-friendly\n    ignoreLocation: true,\n\n    // Enable advanced search syntax like 'exact' for exact matches or !exclude for exclusions\n    useExtendedSearch: true,\n\n    // Find all possible matches in each item, not just the first one\n    // Ensures comprehensive search results\n    findAllMatches: true,\n  })\n}\n","<script setup lang=\"ts\">\nimport { ScalarSearchResultItem } from '@scalar/components'\nimport {\n  ScalarIconBracketsCurly,\n  ScalarIconTag,\n  ScalarIconTerminalWindow,\n  ScalarIconTextAlignLeft,\n} from '@scalar/icons'\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { HttpMethod } from '@scalar/sidebar'\nimport type { FuseResult } from 'fuse.js'\n\nimport type { EntryType, FuseData } from '@/features/Search/types'\n\ndefineProps<{\n  id: string\n  isSelected: boolean\n  result: FuseResult<FuseData>\n}>()\n\nconst ENTRY_ICONS: { [x in EntryType]: ScalarIconComponent } = {\n  heading: ScalarIconTextAlignLeft,\n  model: ScalarIconBracketsCurly,\n  operation: ScalarIconTerminalWindow,\n  tag: ScalarIconTag,\n  webhook: ScalarIconTerminalWindow,\n}\n\nconst ENTRY_LABELS: { [x in EntryType]: string } = {\n  heading: 'Heading',\n  operation: 'Operation',\n  tag: 'Tag',\n  model: 'Model',\n  webhook: 'Webhook',\n}\n</script>\n\n<template>\n  <ScalarSearchResultItem\n    :id=\"id\"\n    :icon=\"ENTRY_ICONS[result.item.type]\"\n    :selected=\"isSelected\">\n    <span\n      :class=\"{\n        'text-decoration-line':\n          result.item.entry.type === 'operation' &&\n          result.item.entry.isDeprecated,\n      }\">\n      <span class=\"sr-only\">\n        {{ ENTRY_LABELS[result.item.type] }}:&nbsp;\n        <template\n          v-if=\"\n            result.item.entry.type === 'operation' &&\n            result.item.entry.isDeprecated\n          \">\n          (Deprecated)&nbsp;\n        </template>\n      </span>\n      {{ result.item.title }}\n      <span class=\"sr-only\">,</span>\n    </span>\n    <template\n      v-if=\"\n        result.item.type !== 'webhook' &&\n        (result.item.method || result.item.path) &&\n        result.item.path !== result.item.title\n      \"\n      #description>\n      <span class=\"inline-flex items-center gap-1\">\n        <template v-if=\"result.item.type === 'operation'\">\n          <HttpMethod\n            aria-hidden=\"true\"\n            :method=\"result.item.method ?? 'get'\" />\n          <span class=\"sr-only\">\n            HTTP Method: {{ result.item.method ?? 'get' }}\n          </span>\n        </template>\n        <span class=\"sr-only\">Path:&nbsp;</span>\n        {{ result.item.path }}\n      </span>\n    </template>\n    <template\n      v-else-if=\"result.item.description\"\n      #description>\n      <span class=\"sr-only\">Description:&nbsp;</span>\n      {{ result.item.description }}\n    </template>\n  </ScalarSearchResultItem>\n</template>\n","<script setup lang=\"ts\">\nimport {\n  ScalarModal,\n  ScalarSearchInput,\n  ScalarSearchResultList,\n  type ModalState,\n} from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nanoid } from 'nanoid'\nimport { computed, ref, watch } from 'vue'\n\nimport { useSearchIndex } from '@/features/Search/hooks/useSearchIndex'\n\nimport SearchResult from './SearchResult.vue'\n\nconst props = defineProps<{\n  modalState: ModalState\n  document: OpenApiDocument | undefined\n  eventBus: WorkspaceEventBus\n}>()\n\n/** Base id for the search form */\nconst id = nanoid()\n/** An id for the results listbox */\nconst listboxId = `${id}-search-result`\n/** An id for the results instructions */\nconst instructionsId = `${id}-search-instructions`\n\nconst { query, results } = useSearchIndex(() => props.document)\n\nconst selectedIndex = ref<number | undefined>(undefined)\n\n/** Clear the query value when the modal is opened */\nwatch(\n  () => props.modalState.open,\n  (open) => {\n    if (open) {\n      query.value = ''\n    }\n  },\n)\n\n/** Keyboard navigation */\nconst navigateSearchResults = (direction: 'up' | 'down') => {\n  const offset = direction === 'up' ? -1 : 1\n  const length = results.value.length\n\n  if (typeof selectedIndex.value === 'number') {\n    // Ensures we loop around the array by using the remainder\n    selectedIndex.value = (selectedIndex.value + offset + length) % length\n  } else {\n    // If no index is selected, we select the first or last item depending on the direction\n\n    selectedIndex.value = offset === -1 ? length - 1 : 0\n  }\n}\n\n/** Handle the selection of a search result */\nfunction handleSelect(idx: number | undefined) {\n  if (typeof idx !== 'number' || !results.value[idx]) {\n    return\n  }\n\n  const result = results.value[idx]\n  props.modalState.hide()\n  props.eventBus.emit('scroll-to:nav-item', { id: result.item.id })\n}\n\n/**\n * Active descendant id for the search input\n * NOTE: Result items MUST share this id for the aria-activedescendant attribute to work correctly\n */\nconst activeDescendantId = computed(() => {\n  const selectedResult = results.value[selectedIndex.value ?? -1]\n\n  return selectedResult ? `search-result-${selectedResult.item.id}` : undefined\n})\n</script>\n<template>\n  <ScalarModal\n    aria-label=\"Reference Search\"\n    :state=\"modalState\"\n    variant=\"search\">\n    <div\n      class=\"mb-0 flex flex-col\"\n      role=\"search\">\n      <ScalarSearchInput\n        v-model=\"query\"\n        :aria-activedescendant=\"activeDescendantId\"\n        aria-autocomplete=\"list\"\n        :aria-controls=\"listboxId\"\n        :aria-describedby=\"instructionsId\"\n        role=\"combobox\"\n        @blur=\"selectedIndex = undefined\"\n        @keydown.down.stop.prevent=\"navigateSearchResults('down')\"\n        @keydown.enter.stop.prevent=\"() => handleSelect(selectedIndex)\"\n        @keydown.up.stop.prevent=\"navigateSearchResults('up')\" />\n    </div>\n    <ScalarSearchResultList\n      :id=\"listboxId\"\n      aria-label=\"Reference Search Results\"\n      class=\"custom-scroll px-1 pb-1\"\n      :noResults=\"!results.length\">\n      <template #query>\n        {{ query }}\n      </template>\n      <SearchResult\n        v-for=\"(result, idx) in results\"\n        :id=\"`search-result-${result.item.id}`\"\n        :key=\"result.refIndex\"\n        :isSelected=\"selectedIndex === idx\"\n        :result=\"result\"\n        @click.prevent=\"() => handleSelect(idx)\" />\n    </ScalarSearchResultList>\n    <div\n      :id=\"instructionsId\"\n      class=\"ref-search-meta\">\n      <span\n        aria-hidden=\"true\"\n        class=\"contents\">\n        <span>↑↓ Navigate</span>\n        <span>⏎ Select</span>\n      </span>\n      <span class=\"sr-only\">\n        Press up arrow / down arrow to navigate, enter to select, type to filter\n        results\n      </span>\n    </div>\n  </ScalarModal>\n</template>\n<style scoped>\n.ref-search-meta {\n  background: var(--scalar-background-1);\n  border-bottom-left-radius: var(--scalar-radius-lg);\n  border-bottom-right-radius: var(--scalar-radius-lg);\n  padding: 6px 12px;\n  font-size: var(--scalar-font-size-4);\n  color: var(--scalar-color-3);\n  font-weight: var(--scalar-semibold);\n  display: flex;\n  gap: 12px;\n  border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n</style>\n","<script setup lang=\"ts\">\nimport {\n  ScalarIconButton,\n  ScalarSidebarSearchButton,\n  useModal,\n} from '@scalar/components'\nimport { isMacOS } from '@scalar/helpers/general/is-mac-os'\nimport { ScalarIconMagnifyingGlass } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport SearchModal from './SearchModal.vue'\n\nconst { searchHotKey = 'k', hideModels = false } = defineProps<{\n  forceIcon?: boolean\n  searchHotKey?: string\n  hideModels?: boolean\n  document?: OpenApiDocument\n  eventBus: WorkspaceEventBus\n}>()\n\nconst button = ref<InstanceType<typeof ScalarSidebarSearchButton>>()\nconst modalState = useModal()\n\nconst handleHotKey = (e: KeyboardEvent) => {\n  if ((isMacOS() ? e.metaKey : e.ctrlKey) && e.key === searchHotKey) {\n    e.preventDefault()\n    e.stopPropagation()\n\n    if (modalState.open) {\n      modalState.hide()\n    } else {\n      modalState.show()\n    }\n  }\n}\n\nwatch(\n  () => modalState.open,\n  async (next, prev) => {\n    // Return focus to the button when the modal is closed\n    if (!next && prev) {\n      await nextTick()\n      button.value?.$el.focus()\n    }\n  },\n)\n\n// Handle keyboard shortcuts\n// TODO: we can move this to the hotkey event bus but we would need to set up a custom key from the searchHotKey config\n// and make sure it works correctly inside the references first\nonMounted(() => window.addEventListener('keydown', handleHotKey))\nonBeforeUnmount(() => window.removeEventListener('keydown', handleHotKey))\n\nfunction handleClick() {\n  modalState.show()\n}\n</script>\n<template>\n  <ScalarIconButton\n    v-if=\"forceIcon\"\n    :icon=\"ScalarIconMagnifyingGlass\"\n    label=\"Search\"\n    @click=\"handleClick\" />\n  <ScalarSidebarSearchButton\n    v-else\n    ref=\"button\"\n    class=\"w-full\"\n    :class=\"$attrs.class\"\n    @click=\"handleClick\">\n    <span class=\"sr-only\">Open Search</span>\n    <span\n      aria-hidden=\"true\"\n      class=\"sidebar-search-placeholder\">\n      Search\n    </span>\n    <template #shortcut>\n      <template v-if=\"isMacOS()\">\n        <span class=\"sr-only\">Command</span>\n        <span aria-hidden=\"true\">⌘</span>\n      </template>\n      <template v-else>\n        <span class=\"sr-only\">CTRL</span>\n        <span aria-hidden=\"true\">⌃</span>\n      </template>\n      {{ searchHotKey }}\n    </template>\n  </ScalarSidebarSearchButton>\n\n  <SearchModal\n    :document\n    :eventBus=\"eventBus\"\n    :hideModels=\"hideModels\"\n    :modalState=\"modalState\" />\n</template>\n","import { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type { ComputedRef, Ref } from 'vue'\nimport { type InjectionKey, computed, inject, ref } from 'vue'\n\ntype UseAgentOptions = {\n  /** Optional. When provided, controls whether the agent UI is enabled (e.g. from doc config). Defaults to isLocalUrl. */\n  agentEnabled?: ComputedRef<boolean>\n}\n\ntype UseAgentReturn = {\n  showAgent: Ref<boolean>\n  agentEnabled: ComputedRef<boolean>\n  /** Ref used to pass a prefill message into the agent when opening. Cleared on close. */\n  prefilledMessage: Ref<string>\n  openAgent: (message?: string) => void\n  closeAgent: () => void\n  toggleAgent: () => void\n}\n\nexport const AGENT_CONTEXT_SYMBOL = Symbol() as InjectionKey<UseAgentReturn>\n\n/**\n * Module-level ref so useAgentContext() can resolve context even when inject fails\n * (e.g. async component boundary or mount order). Set when ApiReference calls useAgent().\n */\nconst agentStateRef: Ref<UseAgentReturn | null> = ref(null)\n\n/**\n * Hook for agent visibility and enabled state.\n * Call from the API Reference root (e.g. ApiReference.vue) with options to create the state, then provide it so descendants can inject it.\n *\n * Returns:\n * - showAgent: whether the agent panel is visible\n * - agentEnabled: whether the agent is enabled\n * - openAgent, closeAgent, toggleAgent: imperative controls\n */\nexport function useAgent(options: UseAgentOptions): UseAgentReturn {\n  const showAgent = ref(false)\n  const prefilledMessage = ref('')\n\n  const agentEnabled = options.agentEnabled ?? computed(() => isLocalUrl(window.location.href))\n\n  const openAgent = (message?: string) => {\n    prefilledMessage.value = message ?? ''\n    showAgent.value = true\n  }\n\n  const closeAgent = () => {\n    showAgent.value = false\n    prefilledMessage.value = ''\n  }\n\n  const toggleAgent = () => {\n    showAgent.value = !showAgent.value\n    if (!showAgent.value) {\n      prefilledMessage.value = ''\n    }\n  }\n\n  const state: UseAgentReturn = {\n    showAgent,\n    agentEnabled,\n    prefilledMessage,\n    openAgent,\n    closeAgent,\n    toggleAgent,\n  }\n  agentStateRef.value = state\n  return state\n}\n\n/**\n * Inject the agent context provided by ApiReference.\n * Falls back to module-level state when inject is undefined (e.g. async boundary or mount order).\n * Use in descendant components (e.g. AskAgentButton) to open the agent or check if it is enabled.\n *\n * Returns a computed ref; use v-if=\"agentContext?.agentEnabled\" so the button only renders when context exists and agent is enabled.\n */\nexport function useAgentContext(): ComputedRef<UseAgentReturn | undefined> {\n  const injected = inject(AGENT_CONTEXT_SYMBOL, undefined)\n  return computed((): UseAgentReturn | undefined => injected ?? agentStateRef.value ?? undefined)\n}\n","<script setup lang=\"ts\">\nimport { ScalarIconSparkle } from '@scalar/icons'\n\nimport { useAgentContext } from '@/hooks/use-agent'\n\nconst agentContext = useAgentContext()\n</script>\n\n<template>\n  <button\n    class=\"bg-sidebar-b-search text-sidebar-c-2 hover:text-sidebar-c-1 flex items-center gap-1.5 rounded border px-2 text-base whitespace-nowrap\"\n    type=\"button\"\n    @click=\"agentContext?.toggleAgent()\">\n    <ScalarIconSparkle />\n    Ask AI\n  </button>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIconButton } from '@scalar/components'\nimport { ScalarIconX } from '@scalar/icons'\nimport type {\n  ApiReferenceConfigurationWithSource,\n  ExternalUrls,\n} from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { defineAsyncComponent } from 'vue'\n\nimport { useAgentContext } from '@/hooks/use-agent'\n\ndefineProps<{\n  agentScalarConfiguration: ApiReferenceConfigurationWithSource['agent']\n  externalUrls: ExternalUrls\n  workspaceStore: WorkspaceStore\n}>()\n\nconst agentContext = useAgentContext()\n\nconst AgentScalarChatInterface = defineAsyncComponent(\n  async () => import('./AgentScalarChatInterface.vue'),\n)\n</script>\n\n<template>\n  <Transition\n    enterActiveClass=\"transition-opacity duration-500\"\n    enterFromClass=\"opacity-0\"\n    enterToClass=\"opacity-100\"\n    leaveActiveClass=\"transition-opacity duration-200\"\n    leaveFromClass=\"opacity-100\"\n    leaveToClass=\"opacity-0\">\n    <div\n      v-show=\"agentContext?.showAgent.value\"\n      class=\"agent-scalar-overlay bg-backdrop fixed inset-0 z-10 ease-[cubic-bezier(0.77,0,0.175,1)]\"\n      @click=\"agentContext?.closeAgent()\" />\n  </Transition>\n  <Transition\n    enterActiveClass=\"transition-transform duration-300\"\n    enterFromClass=\"-translate-x-full\"\n    enterToClass=\"translate-x-0\"\n    leaveActiveClass=\"transition-transform duration-200\"\n    leaveFromClass=\"translate-x-0\"\n    leaveToClass=\"-translate-x-full\">\n    <div\n      v-show=\"agentContext?.showAgent.value\"\n      class=\"agent-scalar left-w-sidebar bg-b-1 fixed inset-y-0 right-12 z-10 grid border-r shadow-lg\"\n      @keydown.escape=\"agentContext?.closeAgent()\">\n      <div\n        class=\"agent-scalar-container custom-scroll custom-scroll-self-contain-overflow overflow-auto px-6\">\n        <AgentScalarChatInterface\n          :agentScalarConfiguration\n          :externalUrls\n          :prefilledMessage=\"agentContext?.prefilledMessage\"\n          :workspaceStore />\n      </div>\n      <ScalarIconButton\n        class=\"agent-scalar-exit-button absolute top-2 right-2\"\n        :icon=\"ScalarIconX\"\n        label=\"Close Client\"\n        weight=\"bold\"\n        @click=\"agentContext?.closeAgent()\" />\n    </div>\n  </Transition>\n</template>\n\n<style scoped>\n@reference \"../../style.css\";\n\n@media (max-width: 1000px) {\n  .agent-scalar.agent-scalar {\n    @apply inset-x-0 top-12 rounded-t-lg;\n  }\n  .agent-scalar.agent-scalar,\n  .agent-scalar-overlay.agent-scalar-overlay {\n    @apply z-15;\n  }\n}\n</style>\n","import { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\n\n/** Type guard for the response body */\nfunction isResponseBody(data: unknown): data is { url: string } {\n  return !!data && typeof data === 'object' && 'url' in data && typeof (data as any).url === 'string'\n}\n\n/** Upload a document and return a temporary URL */\nexport async function uploadTempDocument(\n  document: string,\n  urls: Pick<ExternalUrls, 'proxyUrl' | 'apiBaseUrl'>,\n): Promise<string> {\n  const body = JSON.stringify({ document })\n  const uploadUrl = `${urls.apiBaseUrl}/core/share/upload/apis`\n\n  // Proxy the request to avoid localhost CORS issues\n  const response = await fetch(redirectToProxy(urls.proxyUrl, uploadUrl), {\n    method: 'POST',\n    headers: { 'Content-Type': 'application/json' },\n    body,\n  })\n\n  if (!response.ok) {\n    throw new Error(` Failed to generate temporary link, server responded with ${response.status}`)\n  }\n  const data = (await response.json()) as unknown\n\n  if (!isResponseBody(data)) {\n    throw new Error('Failed to generate temporary link, invalid response from server')\n  }\n\n  return data.url\n}\n","<script setup lang=\"ts\">\nimport { useLoadingState } from '@scalar/components'\nimport { isValidUrl } from '@scalar/helpers/url/is-valid-url'\nimport { ScalarIconArrowUpRight } from '@scalar/icons'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { nextTick } from 'vue'\n\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nconst props = defineProps<{\n  config?: {\n    name?: string\n    url?: string\n  }\n  externalUrls: ExternalUrls\n  url?: string\n  workspace: WorkspaceStore\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\nconst { toast } = useToasts()\n\nconst loader = useLoadingState()\n\nconst hasConfig = props.config?.name || props.config?.url\n\nconst encoded = btoa(JSON.stringify(props.config ?? {}))\n\nconst name = encodeURIComponent(props.config?.name ?? '')\nconst cursorLink = `cursor://anysphere.cursor-deeplink/mcp/install?name=${name}&config=${encoded}`\nconst vscodeLink = `vscode:mcp/install?${encodeURIComponent(JSON.stringify(props.config ?? {}))}`\n\nconst docUrl = defineModel<string>('url')\n\n/** Generate and open the registration link */\nasync function generateRegisterLink() {\n  if (loader.isLoading || !props.workspace) {\n    return\n  }\n\n  // If we have already have a document URL that is valid\n  if (docUrl.value && isValidUrl(docUrl.value)) {\n    openRegisterLink(docUrl.value)\n    return\n  }\n\n  loader.start()\n\n  const document = props.workspace.exportActiveDocument('json')\n\n  if (!document) {\n    toast('Unable to export active document', 'error')\n    await loader.invalidate()\n    return\n  }\n\n  try {\n    docUrl.value = await uploadTempDocument(document, props.externalUrls)\n    await loader.validate()\n    openRegisterLink(docUrl.value)\n\n    await nextTick()\n\n    await loader.clear()\n  } catch (error) {\n    const message =\n      error instanceof Error ? error.message : 'An unknown error occurred'\n    toast(message, 'error')\n    await loader.invalidate()\n  }\n}\n\n/** Open the registration link in a new tab */\nfunction openRegisterLink(documentUrl: string) {\n  const url = new URL(`${props.externalUrls.dashboardUrl}/register`)\n  url.searchParams.set('url', documentUrl)\n  url.searchParams.set('createMcp', 'true')\n\n  window.open(url.toString(), '_blank')\n}\n</script>\n\n<template>\n  <div class=\"scalar-mcp-layer\">\n    <a\n      class=\"scalar-mcp-layer-link\"\n      :href=\"hasConfig ? vscodeLink : undefined\"\n      :target=\"hasConfig ? '_blank' : undefined\"\n      @click=\"\n        (e) => {\n          if (!hasConfig) {\n            e.preventDefault()\n            generateRegisterLink()\n          }\n        }\n      \">\n      <svg\n        class=\"mcp-logo\"\n        fill=\"currentColor\"\n        height=\"800\"\n        viewBox=\"0 0 32 32\"\n        width=\"800\"\n        xmlns=\"http://www.w3.org/2000/svg\">\n        <path\n          d=\"M30.865 3.448 24.282.281a1.99 1.99 0 0 0-2.276.385L9.397 12.171 3.902 8.004a1.33 1.33 0 0 0-1.703.073L.439 9.681a1.33 1.33 0 0 0-.005 1.969L5.2 15.999.434 20.348a1.33 1.33 0 0 0 .005 1.969l1.76 1.604a1.33 1.33 0 0 0 1.703.073l5.495-4.172 12.615 11.51a1.98 1.98 0 0 0 2.271.385l6.589-3.172a1.99 1.99 0 0 0 1.13-1.802V5.248c0-.766-.443-1.469-1.135-1.802zm-6.86 19.818L14.432 16l9.573-7.266z\" />\n      </svg>\n      VS Code\n      <ScalarIconArrowUpRight class=\"mcp-nav ml-auto size-4\" />\n    </a>\n    <a\n      class=\"scalar-mcp-layer-link\"\n      :href=\"hasConfig ? cursorLink : undefined\"\n      :target=\"hasConfig ? '_blank' : undefined\"\n      @click=\"\n        (e) => {\n          if (!hasConfig) {\n            e.preventDefault()\n            generateRegisterLink()\n          }\n        }\n      \">\n      <svg\n        class=\"mcp-logo\"\n        viewBox=\"0 0 466.73 532.09\"\n        xmlns=\"http://www.w3.org/2000/svg\">\n        <path\n          d=\"M457.43 125.94 244.42 2.96a22.13 22.13 0 0 0-22.12 0L9.3 125.94C3.55 129.26 0 135.4 0 142.05v247.99c0 6.65 3.55 12.79 9.3 16.11l213.01 122.98a22.13 22.13 0 0 0 22.12 0l213.01-122.98c5.75-3.32 9.3-9.46 9.3-16.11V142.05c0-6.65-3.55-12.79-9.3-16.11zm-13.38 26.05L238.42 508.15c-1.39 2.4-5.06 1.42-5.06-1.36V273.58c0-4.66-2.49-8.97-6.53-11.31L24.87 145.67c-2.4-1.39-1.42-5.06 1.36-5.06h411.26c5.84 0 9.49 6.33 6.57 11.39h-.01Z\"\n          style=\"fill: currentColor\" />\n      </svg>\n      Cursor\n      <ScalarIconArrowUpRight class=\"mcp-nav ml-auto size-4\" />\n    </a>\n    <!-- localhost + you don't have a MCP added -->\n    <div\n      v-if=\"!hasConfig\"\n      class=\"scalar-mcp-layer-link\"\n      @click=\"generateRegisterLink\">\n      <svg\n        class=\"mcp-logo\"\n        fill=\"none\"\n        height=\"173\"\n        viewBox=\"0 0 156 173\"\n        width=\"156\"\n        xmlns=\"http://www.w3.org/2000/svg\">\n        <path\n          d=\"m6 80.912 67.882-67.883c9.373-9.372 24.569-9.372 33.941 0s9.373 24.569 0 33.942L56.558 98.236\"\n          stroke=\"currentColor\"\n          stroke-linecap=\"round\"\n          stroke-width=\"12\" />\n        <path\n          d=\"m57.265 97.529 50.558-50.558c9.373-9.373 24.569-9.373 33.942 0l.353.353c9.373 9.373 9.373 24.569 0 33.941L80.725 142.66a8 8 0 0 0 0 11.313l12.606 12.607\"\n          stroke=\"currentColor\"\n          stroke-linecap=\"round\"\n          stroke-width=\"12\" />\n        <path\n          d=\"M90.853 30 40.648 80.205c-9.372 9.372-9.372 24.568 0 33.941 9.373 9.372 24.569 9.372 33.941 0l50.205-50.205\"\n          stroke=\"currentColor\"\n          stroke-linecap=\"round\"\n          stroke-width=\"12\" />\n      </svg>\n      Generate MCP\n      <ScalarIconArrowUpRight class=\"mcp-nav ml-auto size-4\" />\n    </div>\n    <!-- you do have an MCP added -->\n    <div\n      v-else\n      class=\"scalar-mcp-layer-link\"\n      @click=\"copyToClipboard(config?.url ?? '')\">\n      Connect MCP\n      <svg\n        class=\"mcp-logo ml-auto\"\n        fill=\"none\"\n        height=\"173\"\n        viewBox=\"0 0 156 173\"\n        width=\"156\"\n        xmlns=\"http://www.w3.org/2000/svg\">\n        <path\n          d=\"m6 80.912 67.882-67.883c9.373-9.372 24.569-9.372 33.941 0s9.373 24.569 0 33.942L56.558 98.236\"\n          stroke=\"currentColor\"\n          stroke-linecap=\"round\"\n          stroke-width=\"12\" />\n        <path\n          d=\"m57.265 97.529 50.558-50.558c9.373-9.373 24.569-9.373 33.942 0l.353.353c9.373 9.373 9.373 24.569 0 33.941L80.725 142.66a8 8 0 0 0 0 11.313l12.606 12.607\"\n          stroke=\"currentColor\"\n          stroke-linecap=\"round\"\n          stroke-width=\"12\" />\n        <path\n          d=\"M90.853 30 40.648 80.205c-9.372 9.372-9.372 24.568 0 33.941 9.373 9.372 24.569 9.372 33.941 0l50.205-50.205\"\n          stroke=\"currentColor\"\n          stroke-linecap=\"round\"\n          stroke-width=\"12\" />\n      </svg>\n    </div>\n  </div>\n</template>\n\n<style scoped>\n.scalar-mcp-layer {\n  gap: 2px;\n  display: flex;\n  flex-direction: column;\n  background: transparent;\n  position: relative;\n  justify-content: flex-end;\n  transition: all 0.4s ease-in-out;\n  height: 32px;\n}\n.scalar-mcp-layer:hover {\n  height: 172px;\n}\n.scalar-mcp-layer-link:hover {\n  cursor: pointer !important;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link {\n  cursor: pointer;\n  width: 100%;\n  padding: 9px 6px;\n  height: 31px;\n  display: block;\n  text-align: center;\n  display: flex;\n  align-items: center;\n  white-space: nowrap;\n  font-size: var(--scalar-small);\n  line-height: 1.385;\n  text-decoration: none;\n  border-radius: var(--scalar-radius);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  gap: 6px;\n  color: var(--scalar-sidebar-color-1);\n  background: var(--scalar-background-1);\n  transition: transform 0.2s ease-in-out;\n  position: absolute;\n  bottom: 0;\n}\n/* increase click area for gap */\n.scalar-mcp-layer-link:after {\n  content: '';\n  position: absolute;\n  bottom: -2px;\n  height: 2px;\n  width: 100%;\n  left: 0;\n}\n.scalar-mcp-layer div.scalar-mcp-layer-link {\n  cursor: default;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(1) {\n  transform: translate3d(0, 0, 0);\n  position: relative;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(2) {\n  transform: translate3d(0, -2px, 0) scale(0.99);\n}\n.scalar-mcp-layer:hover a:nth-last-child(2) {\n  transform: translate3d(0, calc(-100% - 2px), 0) scale(0.99);\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(3) {\n  transform: translate3d(0, -4px, 0) scale(0.98);\n}\n.scalar-mcp-layer:hover a:nth-last-child(3) {\n  transform: translate3d(0, calc(-200% - 4px), 0) scale(1);\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(4) {\n  transform: translate3d(0, -6px, 0) scale(0.97);\n}\n.scalar-mcp-layer:hover a:nth-last-child(4) {\n  transform: translate3d(0, calc(-300% - 6px), 0) scale(1);\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:nth-last-child(5) {\n  transform: translate3d(0, -8px, 0) scale(0.96);\n}\n.scalar-mcp-layer:hover .scalar-mcp-layer-link:nth-last-child(5) {\n  transform: translate3d(0, calc(-400% - 8px), 0) scale(1);\n}\n.scalar-mcp-layer:hover .scalar-mcp-layer-link {\n  transition: transform 0.2s ease-in-out 0.1s;\n}\n.scalar-mcp-layer .scalar-mcp-layer-link:hover {\n  background: var(--scalar-background-2);\n}\n.scalar-mcp-layer .mcp-logo {\n  width: 16px;\n  height: 16px;\n  color: var(--scalar-sidebar-color-1);\n}\n.mcp-nav {\n  color: var(--scalar-sidebar-color-2);\n}\n</style>\n","<script setup lang=\"ts\"></script>\n<template>\n  <div class=\"references-classic-header-container\">\n    <div class=\"references-classic-header\">\n      <div class=\"references-classic-header-content\">\n        <slot />\n      </div>\n      <slot name=\"dark-mode-toggle\" />\n    </div>\n  </div>\n</template>\n<style scoped>\n.references-classic-header {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n\n  max-width: var(--refs-content-max-width);\n  margin: auto;\n  padding: 12px 0;\n}\n.references-classic-header-content {\n  display: flex;\n  gap: 12px;\n  flex-grow: 1;\n}\n\n.references-classic-header-container {\n  position: relative;\n  padding: 0 60px;\n}\n@container narrow-references-container (max-width: 900px) {\n  .references-classic-header {\n    padding: 12px 24px;\n  }\n  .references-classic-header-container {\n    padding: 0;\n  }\n}\n.references-classic-header-icon {\n  height: 24px;\n  color: var(--scalar-color-1);\n}\n</style>\n","import { useIntersectionObserver } from '@vueuse/core'\nimport { type TemplateRef, onMounted } from 'vue'\n\n/**\n * Shrinks the observation root to a thin horizontal strip at the vertical middle of\n * the viewport (~2% of viewport height). Emits only while the target overlaps that line.\n */\nconst VIEWPORT_VERTICAL_CENTER_ROOT_MARGIN = '-49% 0px -49% 0px'\n\ntype UseIntersectionOptions = {\n  /** Called when the element stops intersecting. */\n  onExit?: () => void\n  /**\n   * Whether to immediately fire the intersection as soon as the element is on the screen.\n   *\n   * When false (default) we use a root margin that is 2% of the viewport height on the middle of the viewport.\n   */\n  immediate?: boolean\n}\n\nexport const useIntersection = (\n  el: TemplateRef<HTMLElement | undefined>,\n  onIntersect: () => void,\n  options?: UseIntersectionOptions,\n) => {\n  onMounted(() => {\n    const observerOptions = {\n      rootMargin: options?.immediate ? '0px 0px 0px 0px' : VIEWPORT_VERTICAL_CENTER_ROOT_MARGIN,\n      threshold: 0,\n    } as const\n\n    if (el.value) {\n      useIntersectionObserver(\n        el,\n        ([entry]) => {\n          if (entry?.isIntersecting) {\n            onIntersect()\n          } else {\n            options?.onExit?.()\n          }\n        },\n        observerOptions,\n      )\n    }\n  })\n}\n","import type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type {\n  ApiReferencePlugin as OriginalApiReferencePlugin,\n  SpecificationExtension,\n  ViewComponent,\n} from '@scalar/types/api-reference'\n\nexport type ApiReferencePlugin = OriginalApiReferencePlugin\n\ntype CreatePluginManagerParams = {\n  plugins?: ApiReferencePlugin[]\n}\n\n/**\n * Create the plugin manager store\n *\n * This store manages all plugins registered with the API client\n */\nexport const createPluginManager = ({ plugins = [] }: CreatePluginManagerParams) => {\n  const registeredPlugins = new Map<string, ReturnType<ApiReferencePlugin>>()\n\n  // Register initial plugins\n  plugins.forEach((plugin) => {\n    const pluginInstance = plugin()\n    registeredPlugins.set(pluginInstance.name, pluginInstance)\n  })\n\n  return {\n    /**\n     * Get all extensions with the given name from registered plugins\n     */\n    getSpecificationExtensions: (name: `x-${string}`): SpecificationExtension[] => {\n      const extensions: SpecificationExtension[] = []\n\n      for (const plugin of registeredPlugins.values()) {\n        for (const extension of plugin.extensions) {\n          if (extension.name === name) {\n            extensions.push(extension)\n          }\n        }\n      }\n\n      return extensions\n    },\n\n    /**\n     * Get all components for a specific view from registered plugins\n     */\n    getViewComponents: (viewName: 'content.end'): ViewComponent[] => {\n      const components: ViewComponent[] = []\n\n      for (const plugin of registeredPlugins.values()) {\n        const viewComponents = plugin.views?.[viewName]\n        if (viewComponents) {\n          components.push(...viewComponents)\n        }\n      }\n\n      return components\n    },\n\n    /**\n     * Notify all plugins that the API Reference has been initialized\n     */\n    notifyInit: (config: Record<string, unknown>): void => {\n      for (const plugin of registeredPlugins.values()) {\n        plugin.hooks?.onInit?.({ config })\n      }\n    },\n\n    /**\n     * Notify all plugins that the configuration has changed\n     */\n    notifyConfigChange: (config: Record<string, unknown>): void => {\n      for (const plugin of registeredPlugins.values()) {\n        plugin.hooks?.onConfigChange?.({ config })\n      }\n    },\n\n    /**\n     * Notify all plugins that the API Reference is being destroyed\n     */\n    notifyDestroy: (): void => {\n      for (const plugin of registeredPlugins.values()) {\n        plugin.hooks?.onDestroy?.()\n      }\n    },\n\n    /**\n     * Get all client plugins provided by registered plugins\n     */\n    getApiClientPlugins: (): ClientPlugin[] => {\n      const apiClientPlugins: ClientPlugin[] = []\n\n      for (const plugin of registeredPlugins.values()) {\n        if (plugin.apiClientPlugins) {\n          apiClientPlugins.push(...(plugin.apiClientPlugins as ClientPlugin[]))\n        }\n      }\n\n      return apiClientPlugins\n    },\n  }\n}\n\nexport type PluginManager = ReturnType<typeof createPluginManager>\n","import { type PluginManager, createPluginManager } from '@/plugins/plugin-manager'\nimport { type InjectionKey, inject } from 'vue'\n\nexport const PLUGIN_MANAGER_SYMBOL = Symbol() as InjectionKey<PluginManager>\n\n/**\n * Hook to access the plugin manager\n */\nexport const usePluginManager = (): PluginManager => {\n  const manager = inject(PLUGIN_MANAGER_SYMBOL)\n\n  // No plugin manager provided, creating a new one.\n  if (!manager) {\n    return createPluginManager({})\n  }\n\n  return manager\n}\n","import { REFERENCE_LS_KEYS, safeLocalStorage } from '@scalar/helpers/object/local-storage'\nimport { type Auth, AuthSchema } from '@scalar/workspace-store/entities/auth'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\n// Local storage helper instance, safely wrapped.\nconst storage = safeLocalStorage()\n\n/**\n * Provides an interface to store and retrieve the selected client value\n * in local storage.\n */\nexport const clientStorage = () => {\n  const key = REFERENCE_LS_KEYS.SELECTED_CLIENT\n  return {\n    /**\n     * Gets the stored selected client from local storage.\n     */\n    get: () => {\n      return storage.getItem(key)\n    },\n    /**\n     * Stores the selected client value in local storage.\n     * @param value The value to store\n     */\n    set: (value: string) => {\n      storage.setItem(key, value as string)\n    },\n  }\n}\n\n/**\n * Provides an interface to store and retrieve authentication scheme\n * information in local storage, including both the available schemes and\n * the user's selected schemes.\n */\nexport const authStorage = () => {\n  const getKey = (slug: string) => {\n    return `${REFERENCE_LS_KEYS.AUTH}-${slug}`\n  }\n\n  return {\n    /**\n     * Retrieves and coerces the authentication schemes stored in local storage.\n     */\n    getAuth: (slug: string) => {\n      const parsed = JSON.parse(storage.getItem(getKey(slug)) ?? '{}')\n      return coerceValue(AuthSchema, parsed)\n    },\n    /**\n     * Stores the authentication schemes in local storage.\n     * @param value The Auth object to stringify and store.\n     */\n    setAuth: (slug: string, value: Auth) => {\n      storage.setItem(getKey(slug), JSON.stringify(value))\n    },\n  }\n}\n","import { debounce } from '@scalar/helpers/general/debounce'\nimport type { WorkspacePlugin } from '@scalar/workspace-store/workspace-plugin'\n\nimport { authStorage, clientStorage } from '@/helpers/storage'\n\n/**\n * Plugin to persist workspace state changes with debounced writes.\n */\nexport const persistencePlugin = ({\n  debounceDelay = 500,\n  maxWait = 10000,\n  prefix = '',\n  persistAuth = false,\n}: {\n  debounceDelay?: number\n  /** Maximum time in milliseconds to wait before forcing execution, even with continuous calls. */\n  maxWait?: number\n  /**\n   * Prefix to use for local storage keys.\n   * This can be a string or a function returning a string.\n   * For example, to persist data per document, use the document name as the prefix.\n   */\n  prefix?: string | (() => string)\n  /**\n   * Determines whether authentication details should be persisted.\n   * Accepts a boolean or a function that returns a boolean.\n   * Allows for conditional persistence logic, e.g., based on environment or user settings.\n   */\n  persistAuth?: boolean | (() => boolean)\n}): WorkspacePlugin => {\n  // Debounced execute function for batching similar state changes\n  const { execute } = debounce({ delay: debounceDelay, maxWait })\n  const authPersistence = authStorage()\n  const clientPersistence = clientStorage()\n\n  /**\n   * Resolves the prefix to use for local storage keys.\n   * If 'prefix' is a string, returns it directly.\n   * If 'prefix' is a function, calls and returns its value.\n   */\n  const getPrefix = () => {\n    if (typeof prefix === 'string') {\n      return prefix\n    }\n\n    return prefix()\n  }\n\n  const getPersistAuth = () => {\n    if (typeof persistAuth === 'function') {\n      return persistAuth()\n    }\n\n    return persistAuth\n  }\n\n  return {\n    hooks: {\n      /**\n       * Handles all workspace state change events.\n       * Each write is debounced by a key to prevent frequent writes for the same entity.\n       */\n      onWorkspaceStateChanges(event) {\n        // If the event is for workspace meta data, debounce by workspaceId\n        if (event.type === 'meta') {\n          // Persist the meta fields\n          const defaultClient = event.value['x-scalar-default-client']\n          if (defaultClient !== undefined) {\n            execute('x-scalar-default-client', () => clientPersistence.set(defaultClient))\n          }\n          return\n        }\n\n        // Persist auth and [server](TODO)\n        if (getPersistAuth() && event.type === 'auth') {\n          execute('auth', () => authPersistence.setAuth(getPrefix(), event.value))\n        }\n\n        // No action for other event types\n        return\n      },\n    },\n  }\n}\n","export const sanitizeBasePath = (basePath: string) => {\n  return basePath.replace(/^\\/+|\\/+$/g, '')\n}\n\nconst isHashBasePath = (basePath: string) => basePath.startsWith('#')\n\nconst sanitizeHashBasePath = (basePath: string) => {\n  return basePath.replace(/^#+/, '').replace(/\\/+$/g, '')\n}\n\nconst applySlugPrefix = (base: string, slugPrefix: string | undefined) => {\n  return slugPrefix ? `${slugPrefix}${base ? '/' : ''}${base}` : base\n}\n\nconst stripBasePathPrefix = (value: string, basePath: string) => {\n  if (value === basePath) {\n    return ''\n  }\n\n  if (value.startsWith(`${basePath}/`)) {\n    return value.slice(basePath.length + 1)\n  }\n\n  return null\n}\n\n/** Extracts an element id from the hash when using hash routing */\nexport const getIdFromHash = (location: string | URL, slugPrefix: string | undefined) => {\n  const url = typeof location === 'string' ? new URL(location) : location\n\n  const base = decodeURIComponent(url.hash.slice(1))\n\n  return applySlugPrefix(base, slugPrefix)\n}\n/** Extracts an element id from the path when using path routing */\nexport const getIdFromPath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n  const url = typeof location === 'string' ? new URL(location) : location\n  const sanitized = sanitizeBasePath(basePath)\n\n  // Construct the full basePath with leading slash and encode it for matching\n  // We need to encode each segment separately to match how URLs encode pathnames\n  const basePathWithSlash = sanitized\n    ? `/${sanitized\n        .split('/')\n        .map((segment) => encodeURIComponent(segment))\n        .join('/')}`\n    : ''\n\n  // Extract the portion after the basePath\n  if (url.pathname.startsWith(basePathWithSlash)) {\n    const remainder = url.pathname.slice(basePathWithSlash.length)\n    const base = decodeURIComponent(remainder.startsWith('/') ? remainder.slice(1) : remainder)\n    return applySlugPrefix(base, slugPrefix)\n  }\n\n  return slugPrefix ?? ''\n}\n\n/** Extracts an element id from a hash-prefixed basePath */\nexport const getIdFromHashBasePath = (location: string | URL, basePath: string, slugPrefix: string | undefined) => {\n  const url = typeof location === 'string' ? new URL(location) : location\n  const hash = decodeURIComponent(url.hash.slice(1))\n  const sanitized = sanitizeHashBasePath(basePath)\n\n  const remainder = stripBasePathPrefix(hash, sanitized)\n  if (remainder !== null) {\n    return applySlugPrefix(remainder, slugPrefix)\n  }\n\n  return slugPrefix ?? ''\n}\n\n/** Determines whether a URL matches the provided basePath. */\nexport const matchesBasePath = (location: string | URL, basePath: string) => {\n  const url = typeof location === 'string' ? new URL(location) : location\n\n  if (isHashBasePath(basePath)) {\n    const hash = decodeURIComponent(url.hash)\n    return hash === basePath || hash.startsWith(`${basePath}/`)\n  }\n\n  const sanitized = sanitizeBasePath(basePath)\n  const basePathWithSlash = sanitized\n    ? `/${sanitized\n        .split('/')\n        .map((segment) => encodeURIComponent(segment))\n        .join('/')}`\n    : ''\n\n  return url.pathname === basePathWithSlash || url.pathname.startsWith(`${basePathWithSlash}/`)\n}\n\n/**\n * Extracts a navigation id from a URL based on the routing type\n *\n * @param url - The URL to extract the id from\n * @param basePath - The base path used in path routing\n * @param slugPrefix - If the document slug is not expected in the URL then we must prefix it\n */\nexport const getIdFromUrl = (url: string | URL, basePath: string | undefined, slugPrefix: string | undefined) => {\n  if (typeof basePath !== 'string') {\n    return getIdFromHash(url, slugPrefix)\n  }\n\n  return isHashBasePath(basePath)\n    ? getIdFromHashBasePath(url, basePath, slugPrefix)\n    : getIdFromPath(url, basePath, slugPrefix)\n}\n\n/**\n * Strips the first segment from an id and preserves trailing slashes\n * Used in single-document mode where the document slug is not needed in the URL\n *\n * @param id - The full id to process\n * @returns The id with the first segment removed, preserving trailing slash if present\n */\nconst stripFirstSegment = (id: string): string => {\n  // For preserving trailing slash in the id\n  const hasTrailingSlash = id.endsWith('/')\n  const segments = id.split('/').filter(Boolean).slice(1)\n  const result = segments.join('/')\n\n  // Only preserve trailing slash if there's actual content\n  return hasTrailingSlash && result ? `${result}/` : result\n}\n\n/**\n * Generate a new URL and applies the ID to the path or hash\n * depending on the type of routing used\n *\n * @param id - The id to apply to the URL\n * @param basePath - The base path used in path routing\n * @param isMultiDocument - Whether the document is multi-document or single-document. Single-document documents will strip the document slug from the id\n */\nexport const makeUrlFromId = (_id: string, basePath: string | undefined, isMultiDocument: boolean) => {\n  if (typeof window === 'undefined') {\n    return undefined\n  }\n\n  /** When there is only 1 document we don't need to include the document name in the URL */\n  const id = isMultiDocument ? _id : stripFirstSegment(_id)\n  const url = new URL(window.location.href)\n\n  if (typeof basePath === 'string') {\n    if (isHashBasePath(basePath)) {\n      const base = sanitizeHashBasePath(basePath)\n      url.hash = [base, id].filter(Boolean).join('/')\n    } else {\n      const base = sanitizeBasePath(basePath)\n      url.pathname = `${base}/${id}`\n    }\n  } else {\n    url.hash = id\n  }\n\n  return url\n}\n\n/** Extracts the schema parameters from the id if they are present */\nexport const getSchemaParamsFromId = (id: string): { rawId: string; params: string } => {\n  const matcher = id.match(/(.*)(\\.body\\.|\\.path\\.|\\.query\\.|\\.header\\.)(.*)/)\n\n  if (matcher && typeof matcher[1] === 'string' && typeof matcher[2] === 'string') {\n    return {\n      rawId: matcher[1],\n      params: matcher[2].slice(1) + matcher[3],\n    }\n  }\n  return {\n    rawId: id,\n    params: '',\n  }\n}\n","import { watchDebounced } from '@vueuse/core'\nimport { nanoid } from 'nanoid'\nimport { computed, nextTick, onBeforeUnmount, reactive, ref } from 'vue'\n\nimport { getSchemaParamsFromId } from './id-routing'\n\n/**\n * List of items that are in the priority queue and will be rendered first (e.g. scroll target).\n */\nconst priorityQueue = reactive<Set<string>>(new Set())\n/** List of items that are pending to be loaded (in viewport overscan). */\nconst pendingQueue = reactive<Set<string>>(new Set())\n/** List of items that are already loaded and stay mounted (no eviction). */\nconst readyQueue = reactive<Set<string>>(new Set())\n/**\n * Flag to indicate if the lazy bus is currently running\n * Blocks ID changes while running\n */\nconst isRunning = ref(false)\n\n/** How long tryScroll keeps retrying to find the element (ms). */\nconst SCROLL_RETRY_MS = 3000\n\n/** Tracks when the initial load is complete. */\nexport const firstLazyLoadComplete = ref(false)\n\n/** List of unique identifiers that are blocking intersection */\nconst intersectionBlockers = reactive<Set<string>>(new Set())\n\nconst onRenderComplete = new Set<() => void>()\n\n/** Cached content heights so placeholders can match when not rendered. */\nconst lazyPlaceholderHeights = reactive<Map<string, number>>(new Map())\n\nexport const getLazyPlaceholderHeight = (id: string): number | undefined => lazyPlaceholderHeights.get(id)\n\nexport const setLazyPlaceholderHeight = (id: string, height: number): void => {\n  if (!Number.isFinite(height) || height <= 0) {\n    return\n  }\n  lazyPlaceholderHeights.set(id, Math.round(height))\n}\n\n/** Adds a one time callback to be executed when the lazy bus has finished loading */\nconst addLazyCompleteCallback = (callback: (() => void) | undefined) => {\n  if (callback) {\n    onRenderComplete.add(callback)\n  }\n}\n\ntype UnblockFn = () => void\n\n/**\n * Blocks intersection until the returned unblock callback is run.\n * Prevents scroll jump while we render new lazy content.\n */\nexport const blockIntersection = (): UnblockFn => {\n  const blockId = nanoid()\n  intersectionBlockers.add(blockId)\n\n  /** Unblock uses a small delay to ensure the scroll is complete before enabling intersection */\n  return () => setTimeout(() => intersectionBlockers.delete(blockId), 100)\n}\n\n/** If there are any pending blocking operations we disable intersection */\nexport const intersectionEnabled = computed(() => intersectionBlockers.size === 0)\n\n/**\n * Processes the full queue: priority first, then pending. Blocks intersection while\n * rendering so the viewport does not jump. No eviction — items stay in readyQueue.\n */\nconst runLazyBus = () => {\n  // We always render the lazy bus when the window is undefined (see useLazyBus)\n  if (typeof window === 'undefined') {\n    return\n  }\n\n  if (isRunning.value) {\n    return\n  }\n\n  isRunning.value = true\n\n  /**\n   * Sets all the pending elements into the ready queue\n   * After waiting for Vue to update the DOM we execute the callbacks and unblock intersection\n   */\n  const processQueue = async () => {\n    const priorityIds = [...priorityQueue]\n    const pendingIds = [...pendingQueue]\n\n    if (priorityIds.length === 0 && pendingIds.length === 0) {\n      onRenderComplete.forEach((fn) => fn())\n      onRenderComplete.clear()\n      isRunning.value = false\n      firstLazyLoadComplete.value = true\n      return\n    }\n\n    for (const id of priorityIds) {\n      readyQueue.add(id)\n      priorityQueue.delete(id)\n    }\n    for (const id of pendingIds) {\n      readyQueue.add(id)\n      pendingQueue.delete(id)\n    }\n\n    await nextTick()\n\n    onRenderComplete.forEach((fn) => fn())\n    onRenderComplete.clear()\n    isRunning.value = false\n    firstLazyLoadComplete.value = true\n  }\n\n  if (window.requestIdleCallback) {\n    window.requestIdleCallback(processQueue, { timeout: 1500 })\n  } else {\n    // biome-ignore lint/nursery/noFloatingPromises: Expected floating promise\n    nextTick(processQueue)\n  }\n}\n\n/**\n * Run the lazy bus when the queue changes and is not currently running\n * Debounce so that multiple changes to the queue are batched together\n *\n * We must run when the priority queue changes because we rely on finish callbacks\n * anytime we request potentially lazy elements. If we don't run when the priority queue changes\n * we may not have a finish callback even though the element is set to load.\n */\nwatchDebounced(\n  [() => pendingQueue.size, () => priorityQueue.size, () => isRunning.value],\n  () => {\n    if ((pendingQueue.size > 0 || priorityQueue.size > 0) && !isRunning.value) {\n      runLazyBus()\n    }\n  },\n  { debounce: 300, maxWait: 1500 },\n)\n\n/**\n * We only make elements pending if they are not already in the priority or ready queue\n */\nconst addToPendingQueue = (id: string | undefined) => {\n  if (id && !readyQueue.has(id) && !priorityQueue.has(id)) {\n    pendingQueue.add(id)\n  }\n}\n\n/**\n * Add elements to the priority queue for immediate rendering.\n * We allow adding items already in readyQueue so that callbacks are still triggered,\n * but processQueue will skip actual re-rendering for items already ready.\n */\nexport const addToPriorityQueue = (id: string | undefined) => {\n  if (id && !priorityQueue.has(id)) {\n    priorityQueue.add(id)\n  }\n}\n\n/**\n * Request an item to be rendered (e.g. when it re-enters the overscan zone).\n */\nexport const requestLazyRender = (id: string | undefined, priority = false): void => {\n  if (!id || readyQueue.has(id)) {\n    return\n  }\n  if (priority) {\n    addToPriorityQueue(id)\n  } else {\n    addToPendingQueue(id)\n  }\n  if (!isRunning.value) {\n    runLazyBus()\n  }\n}\n\n/**\n * Schedules a single run of the lazy bus so that documents with no Lazy components\n * (e.g. no operations, tags, or models) still get firstLazyLoadComplete set and the\n * full-viewport placeholder can be hidden. Call from content root on mount.\n */\nexport const scheduleInitialLoadComplete = (): void => {\n  if (typeof window === 'undefined') {\n    return\n  }\n  const delay = 400\n  window.setTimeout(() => runLazyBus(), delay)\n}\n\n/** When an element is unmounted we remove it from all queues */\nconst resetLazyElement = (id: string) => {\n  priorityQueue.delete(id)\n  pendingQueue.delete(id)\n  readyQueue.delete(id)\n  lazyPlaceholderHeights.delete(id)\n}\n\n// ---------------------------------------------------------------------------\n\n/**\n * Tracks the lazy loading state of an element.\n * Use isReady (or expanded) to decide whether to render the slot or show a placeholder.\n * The element is only added to the queue when it enters the viewport overscan (see Lazy.vue).\n */\nexport function useLazyBus(id: string) {\n  onBeforeUnmount(() => {\n    resetLazyElement(id)\n  })\n\n  return {\n    isReady: computed(() => typeof window === 'undefined' || priorityQueue.has(id) || readyQueue.has(id)),\n  }\n}\n\n/**\n * Scroll to a possibly lazy-loaded element. Expands parents and adds target (and\n * parents) to the priority queue, then scrolls after Vue has flushed.\n */\nexport const scrollToLazy = (\n  id: string,\n  setExpanded: (id: string, value: boolean) => void,\n  getEntryById: (id: string) => { id: string; parent?: { id: string }; children?: { id: string }[] } | undefined,\n) => {\n  const item = getEntryById(id)\n\n  /**\n   * If the element is lazy we must freeze the element so that it does not move until after the next lazy bus run\n   * If the element never loads then the scroll onFailure callback will be run to unfreeze the element\n   *\n   * If the readyQueue does not have the item we must freeze it while it renders\n   * If the item has lazy children we must freeze the item while the children are (potentially) loaded\n   */\n  const isLazy = !readyQueue.has(id) || item?.children?.some((child) => !readyQueue.has(child.id))\n\n  const unfreeze = isLazy ? freeze(id) : undefined\n  addLazyCompleteCallback(unfreeze)\n\n  // Disable intersection while we scroll to the element\n  const unblock = blockIntersection()\n  const { rawId } = getSchemaParamsFromId(id)\n\n  addToPriorityQueue(id)\n  addToPriorityQueue(rawId)\n\n  // When there are children we ensure the first 2 are loaded\n  if (item?.children) {\n    item.children.slice(0, 2).forEach((child) => addToPriorityQueue(child.id))\n  }\n\n  // When there are sibling items we attempt to load the next 2 to better fill the viewport\n  if (item?.parent) {\n    const parent = getEntryById(item.parent.id)\n    const elementIdx = parent?.children?.findIndex((child) => child.id === id)\n    if (elementIdx !== undefined && elementIdx >= 0) {\n      parent?.children?.slice(elementIdx, elementIdx + 2).forEach((child) => addToPriorityQueue(child.id))\n    }\n  }\n\n  setExpanded(rawId, true)\n  /**\n   * Recursively expand the parents and set them as a loading priority\n   * This ensures all parents will be immediately loaded and open\n   */\n  const addParents = (currentId: string) => {\n    const parent = getEntryById(currentId)?.parent\n    if (parent) {\n      addToPriorityQueue(parent.id)\n      setExpanded(parent.id, true)\n      addParents(parent.id)\n    }\n  }\n  /** Must use the rawId as schema params are not in the navigation tree */\n  addParents(rawId)\n\n  void nextTick(() => {\n    tryScroll(id, Date.now() + SCROLL_RETRY_MS, unblock, unfreeze)\n  })\n}\n\n/**\n * Tiny wrapper around the scrollIntoView API\n * Retries up to the stopTime in case the element is not yet rendered\n *\n * @param id - The id of the element to scroll to\n * @param stopTime - The time to stop retrying in unix milliseconds\n */\nconst tryScroll = (id: string, stopTime: number, onComplete: UnblockFn, onFailure?: () => void): void => {\n  const element = document.getElementById(id)\n  if (element) {\n    element.scrollIntoView({ block: 'start' })\n    onComplete()\n  } else if (Date.now() < stopTime) {\n    requestAnimationFrame(() => tryScroll(id, stopTime, onComplete, onFailure))\n  } else {\n    // If the scroll has expired we enable intersection again\n    onComplete()\n    onFailure?.()\n  }\n}\n\nconst freeze = (id: string): (() => void) => {\n  let stop = false\n\n  /**\n   * Runs until the stop flag is set\n   * Executes the final frame after stop changes to true\n   */\n  const runFrame = (stopAfterFrame: boolean) => {\n    const element = document.getElementById(id)\n    if (element) {\n      element.scrollIntoView({ block: 'start' })\n    }\n    if (!stopAfterFrame) {\n      requestAnimationFrame(() => runFrame(stop))\n    }\n  }\n\n  runFrame(false)\n\n  return () => {\n    stop = true\n  }\n}\n","import type { ClientOption, ClientOptionGroup } from '@scalar/api-client/blocks/operation-code-sample'\nimport type { AvailableClients } from '@scalar/snippetz'\n\n/** Hard coded list of default featured clients */\nconst FEATURED_CLIENTS = [\n  'shell/curl',\n  'ruby/native',\n  'node/undici',\n  'php/guzzle',\n  'python/python3',\n] satisfies AvailableClients[number][]\n\n/** Whether or not a client is in the featured list */\nexport const isFeaturedClient = (\n  clientId: AvailableClients[number] | undefined,\n  featuredClients: AvailableClients[number][] = FEATURED_CLIENTS,\n) => Boolean(clientId && featuredClients.includes(clientId as (typeof featuredClients)[number]))\n\n/**\n * Maps featured client IDs to their corresponding ClientOption objects.\n * Returns an array of ClientOption objects that match the featured clients list,\n * maintaining the order of the featured clients.\n */\nexport const getFeaturedClients = (\n  clientOptions: ClientOptionGroup[],\n  featuredClients: AvailableClients[number][] = FEATURED_CLIENTS,\n): ClientOption[] => {\n  // Create a map of all available client options for quick lookup\n  const clientMap = new Map<string, ClientOption>()\n\n  // Using the map means we only have to loop through once\n  for (const group of clientOptions) {\n    for (const option of group.options) {\n      clientMap.set(option.id, option)\n    }\n  }\n\n  // Map featured clients to their corresponding options, maintaining order\n  return featuredClients.flatMap((clientId) => {\n    const client = clientMap.get(clientId)\n    return client ?? []\n  })\n}\n","<script setup lang=\"ts\">\nimport { Tab } from '@headlessui/vue'\nimport {\n  filterClientsByQuery,\n  findClient,\n  type ClientOption,\n  type ClientOptionGroup,\n  type CustomClientOption,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCombobox, ScalarIcon } from '@scalar/components'\nimport { freezeElement } from '@scalar/helpers/dom/freeze-element'\nimport type { AvailableClients, TargetId } from '@scalar/types/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed, ref } from 'vue'\n\nimport { isFeaturedClient } from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nconst { clientOptions, featuredClients, eventBus, selectedClient } =\n  defineProps<{\n    /** Client options */\n    clientOptions: ClientOptionGroup[]\n    /** The currently selected Http Client */\n    selectedClient?: AvailableClients[number]\n    /** List of featured clients */\n    featuredClients: ClientOption[]\n    /** Event bus */\n    eventBus: WorkspaceEventBus\n  }>()\n\nconst containerRef = ref<HTMLElement>()\n\n/**\n * Icons have longer names to appear in icon searches, e.g. \"javascript-js\" instead of just \"javascript\". This function\n * maps the language key to the icon name.\n */\nconst getIconByLanguageKey = (targetKey: TargetId) =>\n  `programming-language-${targetKey === 'js' ? 'javascript' : targetKey}` as const\n\n/** Set custom example, or update the selected HTTP client globally */\nconst selectClient = (option: ClientOption | CustomClientOption) => {\n  if (!containerRef.value) {\n    return\n  }\n\n  // We need to freeze the ui to prevent scrolling as the clients change\n  const unfreeze = freezeElement(containerRef.value)\n  setTimeout(() => {\n    unfreeze()\n  }, 300)\n\n  // Update the store\n  if (option.clientKey !== 'custom') {\n    eventBus.emit('workspace:update:selected-client', option.id)\n  }\n}\n\n/** Calculates the targetKey from the selected client id */\nconst selectedTargetKey = computed(\n  () => selectedClient?.split('/')[0] as TargetId | undefined,\n)\n</script>\n<template>\n  <div\n    ref=\"containerRef\"\n    class=\"client-libraries-content\">\n    <Tab\n      v-for=\"featuredClient in featuredClients\"\n      :key=\"featuredClient.clientKey\"\n      class=\"client-libraries rendered-code-sdks\"\n      :class=\"{\n        'client-libraries__active': featuredClient.id === selectedClient,\n      }\">\n      <div :class=\"`client-libraries-icon__${featuredClient.targetKey}`\">\n        <ScalarIcon\n          class=\"client-libraries-icon\"\n          :icon=\"getIconByLanguageKey(featuredClient.targetKey)\" />\n      </div>\n      <span class=\"client-libraries-text\">{{\n        featuredClient.targetTitle\n      }}</span>\n    </Tab>\n\n    <!-- Client Dropdown -->\n    <ScalarCombobox\n      :filterFn=\"filterClientsByQuery\"\n      :modelValue=\"findClient(clientOptions, selectedClient)\"\n      :options=\"clientOptions\"\n      placement=\"bottom-end\"\n      teleport\n      @update:modelValue=\"selectClient($event as ClientOption)\">\n      <button\n        class=\"client-libraries client-libraries__select\"\n        :class=\"{\n          'client-libraries__active':\n            selectedClient && !isFeaturedClient(selectedClient),\n        }\"\n        type=\"button\">\n        <div\n          aria-hidden=\"true\"\n          class=\"client-libraries-icon__more\">\n          <template v-if=\"selectedClient && !isFeaturedClient(selectedClient)\">\n            <div :class=\"`client-libraries-icon__${selectedTargetKey}`\">\n              <ScalarIcon\n                v-if=\"selectedTargetKey\"\n                class=\"client-libraries-icon\"\n                :icon=\"getIconByLanguageKey(selectedTargetKey)\" />\n            </div>\n          </template>\n          <template v-else>\n            <svg\n              class=\"client-libraries-icon\"\n              height=\"50\"\n              role=\"presentation\"\n              viewBox=\"0 0 50 50\"\n              width=\"50\"\n              xmlns=\"http://www.w3.org/2000/svg\">\n              <g\n                fill=\"currentColor\"\n                fill-rule=\"nonzero\">\n                <path\n                  d=\"M10.71 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M21.13 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0M31.55 25.3a3.87 3.87 0 1 0 7.74 0 3.87 3.87 0 0 0-7.74 0\" />\n              </g>\n            </svg>\n          </template>\n        </div>\n        <span\n          v-if=\"clientOptions.length\"\n          class=\"client-libraries-text client-libraries-text-more\">\n          More\n        </span>\n        <span class=\"sr-only\">Select from all clients</span>\n      </button>\n    </ScalarCombobox>\n  </div>\n</template>\n<style scoped>\n.client-libraries-content {\n  container: client-libraries-content / inline-size;\n  display: flex;\n  justify-content: center;\n  overflow: hidden;\n  padding: 0 12px;\n  background-color: var(--scalar-background-1);\n  border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.client-libraries {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 100%;\n  position: relative;\n  cursor: pointer;\n  white-space: nowrap;\n  padding: 8px 2px;\n  gap: 6px;\n  color: var(--scalar-color-3);\n  border-bottom: 1px solid transparent;\n  user-select: none;\n}\n\n.client-libraries:not(.client-libraries__active):hover:before {\n  content: '';\n  position: absolute;\n  width: calc(100% - 4px);\n  height: calc(100% - 4px);\n  background: var(--scalar-background-2);\n  left: 2px;\n  top: 2px;\n  z-index: 0;\n  border-radius: var(--scalar-radius);\n}\n.client-libraries:active {\n  color: var(--scalar-color-1);\n}\n.client-libraries:focus-visible {\n  outline: none;\n  box-shadow: inset 0 0 0 1px var(--scalar-color-accent);\n}\n/* remove php and c on mobile */\n@media screen and (max-width: 450px) {\n  .client-libraries:nth-of-type(4),\n  .client-libraries:nth-of-type(5) {\n    display: none;\n  }\n}\n.client-libraries-icon {\n  max-width: 14px;\n  max-height: 14px;\n  min-width: 14px;\n  width: 100%;\n  aspect-ratio: 1;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: relative;\n  box-sizing: border-box;\n  color: currentColor;\n}\n.client-libraries-icon__more svg {\n  height: initial;\n}\n@container client-libraries-content (width < 400px) {\n  .client-libraries__select {\n    width: fit-content;\n\n    .client-libraries-icon__more + span {\n      display: none;\n    }\n  }\n}\n@container client-libraries-content (width < 380px) {\n  .client-libraries {\n    width: 100%;\n  }\n  .client-libraries span {\n    display: none;\n  }\n}\n.client-libraries__active {\n  color: var(--scalar-color-1);\n  border-bottom: 1px solid var(--scalar-color-1);\n}\n@keyframes codeloader {\n  0% {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(1turn);\n  }\n}\n.client-libraries .client-libraries-text {\n  font-size: var(--scalar-small);\n  position: relative;\n  display: flex;\n  align-items: center;\n}\n.client-libraries__active .client-libraries-text {\n  color: var(--scalar-color-1);\n  font-weight: var(--scalar-semibold);\n}\n@media screen and (max-width: 600px) {\n  .references-classic .client-libraries {\n    flex-direction: column;\n  }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/vue'\nimport {\n  DEFAULT_CLIENT,\n  type ClientOptionGroup,\n} from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock, ScalarMarkdown } from '@scalar/components'\nimport type { AvailableClient } from '@scalar/snippetz'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\nimport { computed, useId, useTemplateRef } from 'vue'\n\nimport {\n  getFeaturedClients,\n  isFeaturedClient,\n} from '@/blocks/scalar-client-selector-block/helpers/featured-clients'\n\nimport ClientDropdown from './ClientDropdown.vue'\n\nconst {\n  clientOptions,\n  xScalarSdkInstallation,\n  eventBus,\n  selectedClient = DEFAULT_CLIENT,\n} = defineProps<{\n  /** Selected SDK installation instructions */\n  xScalarSdkInstallation?: XScalarSdkInstallation['x-scalar-sdk-installation']\n  /** Computed list of all available Http Client options */\n  clientOptions: ClientOptionGroup[]\n  /** The currently selected Http Client */\n  selectedClient?: AvailableClient\n  /** Event bus */\n  eventBus: WorkspaceEventBus\n}>()\n\nconst headingId = useId()\nconst morePanel = useId()\n\n/** Grab the option for the currently selected Http Client */\nconst selectedClientOption = computed(\n  () =>\n    clientOptions.flatMap(\n      (optionGroup) =>\n        optionGroup.options.find((option) => option.id === selectedClient) ??\n        [],\n    )[0],\n)\n\n/** List of featured clients */\nconst featuredClients = computed(() => getFeaturedClients(clientOptions))\n\n/** Currently selected tab index */\nconst tabIndex = computed(() =>\n  featuredClients.value.findIndex(\n    (featuredClient) => selectedClient === featuredClient.id,\n  ),\n)\n\nconst wrapper = useTemplateRef('wrapper-ref')\n\n/** Emit the selected client event on tab */\nconst onTabSelect = (i: number) => {\n  const client = featuredClients.value[i]\n\n  if (!client || !wrapper.value) {\n    return\n  }\n\n  eventBus.emit('workspace:update:selected-client', client.id)\n}\n\nconst installationInstructions = computed(() => {\n  // Check whether we have instructions at all\n  if (\n    !Array.isArray(xScalarSdkInstallation) ||\n    !xScalarSdkInstallation?.length\n  ) {\n    return undefined\n  }\n\n  // Find the instructions for the current language\n  const instruction = xScalarSdkInstallation.find((instruction) => {\n    const targetKey = selectedClient?.split('/')[0]?.toLowerCase()\n    return instruction.lang.toLowerCase() === targetKey\n  })\n\n  // Nothing found?\n  if (!instruction) {\n    return undefined\n  }\n\n  // Got it!\n  return instruction\n})\n\ndefineExpose({\n  selectedClientOption,\n})\n</script>\n<template>\n  <div\n    v-if=\"clientOptions.length\"\n    ref=\"wrapper-ref\">\n    <TabGroup\n      manual\n      :selectedIndex=\"tabIndex\"\n      @change=\"onTabSelect\">\n      <div\n        :id=\"headingId\"\n        class=\"client-libraries-heading\">\n        Client Libraries\n      </div>\n\n      <!-- Tabs -->\n      <TabList\n        :aria-labelledby=\"headingId\"\n        class=\"client-libraries-list\">\n        <ClientDropdown\n          :clientOptions\n          :eventBus\n          :featuredClients\n          :morePanel\n          :selectedClient />\n      </TabList>\n\n      <!-- Content -->\n      <TabPanels>\n        <template\n          v-if=\"\n            installationInstructions?.source ||\n            installationInstructions?.description\n          \">\n          <div\n            v-if=\"installationInstructions.description\"\n            class=\"selected-client card-footer -outline-offset-2\"\n            :class=\"installationInstructions.source && 'rounded-b-none'\"\n            role=\"tabpanel\"\n            tabindex=\"0\">\n            <ScalarMarkdown :value=\"installationInstructions.description\" />\n          </div>\n          <div\n            v-if=\"installationInstructions.source\"\n            class=\"selected-client card-footer border-t-0 p-0\"\n            role=\"tabpanel\"\n            tabindex=\"1\">\n            <ScalarCodeBlock\n              class=\"rounded-b-lg *:first:p-3\"\n              :content=\"installationInstructions.source\"\n              copy=\"always\"\n              lang=\"shell\" />\n          </div>\n        </template>\n        <template v-else-if=\"isFeaturedClient(selectedClient)\">\n          <TabPanel\n            v-for=\"client in featuredClients\"\n            :key=\"client.id\"\n            class=\"selected-client card-footer -outline-offset-2\">\n            {{ client.title }}\n          </TabPanel>\n        </template>\n        <div\n          v-else\n          :id=\"morePanel\"\n          class=\"selected-client card-footer -outline-offset-2\"\n          role=\"tabpanel\"\n          tabindex=\"0\">\n          {{ selectedClientOption?.title }}\n        </div>\n      </TabPanels>\n    </TabGroup>\n  </div>\n</template>\n<style scoped>\n.selected-client {\n  color: var(--scalar-color-1);\n  font-size: var(--scalar-small);\n  font-family: var(--scalar-font-code);\n  padding: 9px 12px;\n  border-top: none;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  background: var(--scalar-background-1);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-bottom-left-radius: var(--scalar-radius-xl);\n  border-bottom-right-radius: var(--scalar-radius-xl);\n  min-height: fit-content;\n}\n.client-libraries-heading {\n  font-size: var(--scalar-small);\n  font-weight: var(--scalar-font-medium);\n  color: var(--scalar-color-1);\n  padding: 9px 12px;\n  background-color: var(--scalar-background-2);\n  display: flex;\n  align-items: center;\n  max-height: 32px;\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-top-left-radius: var(--scalar-radius-xl);\n  border-top-right-radius: var(--scalar-radius-xl);\n}\n:deep(.scalar-codeblock-pre .hljs) {\n  margin-top: 8px;\n}\n</style>\n","/**\n * Utility function to extract all keys starting with 'x-' (OpenAPI extensions) from an object.\n *\n * @param object - The object from which to extract extension keys.\n * @returns An object containing only the entries whose keys start with 'x-'.\n */\nexport const getXKeysFromObject = (object?: Record<string, unknown>) => {\n  if (!object) {\n    // Return an empty object if input is undefined or null\n    return {}\n  }\n  // Filter and return only the entries whose keys start with 'x-'\n  return Object.fromEntries(Object.entries(object).filter(([key]) => key.startsWith('x-')))\n}\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst { color } = defineProps<{\n  color?: string\n}>()\n\nconst badgeStyle = computed(() =>\n  color\n    ? {\n        '--badge-background-color': color,\n        '--badge-text-color': `color-mix(in srgb, ${color}, black 40%)`,\n      }\n    : {},\n)\n</script>\n\n<template>\n  <div\n    class=\"badge\"\n    :style=\"badgeStyle\">\n    <slot />\n  </div>\n</template>\n\n<style scoped>\n.badge {\n  color: var(--badge-text-color, var(--scalar-color-2));\n  font-size: var(--scalar-mini);\n  background: var(--badge-background-color, var(--scalar-background-2));\n  border: var(--scalar-border-width) solid\n    var(--badge-border-color, var(--scalar-border-color));\n  padding: 2px 6px;\n  border-radius: 12px;\n  display: inline-block;\n}\n.badge.text-orange {\n  background: color-mix(in srgb, var(--scalar-color-orange), transparent 90%);\n  border: transparent;\n}\n.badge.text-yellow {\n  background: color-mix(in srgb, var(--scalar-color-yellow), transparent 90%);\n  border: transparent;\n}\n.badge.text-red {\n  background: color-mix(in srgb, var(--scalar-color-red), transparent 90%);\n  border: transparent;\n}\n.badge.text-purple {\n  background: color-mix(in srgb, var(--scalar-color-purple), transparent 90%);\n  border: transparent;\n}\n.badge.text-green {\n  background: color-mix(in srgb, var(--scalar-color-green), transparent 90%);\n  border: transparent;\n}\n</style>\n","<script lang=\"ts\" setup>\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { type WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport Badge from '@/components/Badge/Badge.vue'\n\nconst { eventBus, documentDownloadType, documentUrl } = defineProps<{\n  /** The document download type. */\n  documentDownloadType: ApiReferenceConfiguration['documentDownloadType']\n  /** The event bus for the handling all events. */\n  eventBus: WorkspaceEventBus\n  /**\n   * URL of the OpenAPI document. Required when documentDownloadType is 'direct'\n   * so the link can point to the document.\n   */\n  documentUrl?: string\n}>()\n\n// The id is retrieved at the layout level.\nconst handleDownloadClick = (format: 'json' | 'yaml') => {\n  eventBus.emit('ui:download:document', { format })\n}\n</script>\n<template>\n  <div\n    v-if=\"\n      ['yaml', 'json', 'both'].includes(documentDownloadType) ||\n      (documentDownloadType === 'direct' && documentUrl)\n    \"\n    class=\"download-container group\"\n    :class=\"{\n      'download-both': documentDownloadType === 'both',\n    }\">\n    <!-- Direct link to the document -->\n    <a\n      v-if=\"documentDownloadType === 'direct' && documentUrl\"\n      class=\"download-link download-button\"\n      :href=\"documentUrl\">\n      <span> Download OpenAPI Document </span>\n    </a>\n\n    <!-- JSON  -->\n    <button\n      v-if=\"documentDownloadType === 'json' || documentDownloadType === 'both'\"\n      class=\"download-button\"\n      type=\"button\"\n      @click.prevent=\"() => handleDownloadClick('json')\">\n      <span> Download OpenAPI Document </span>\n      <Badge class=\"extension hidden group-hover:flex\">json</Badge>\n    </button>\n\n    <!-- YAML -->\n    <button\n      v-if=\"documentDownloadType === 'yaml' || documentDownloadType === 'both'\"\n      class=\"download-button\"\n      type=\"button\"\n      @click.prevent=\"() => handleDownloadClick('yaml')\">\n      <span> Download OpenAPI Document </span>\n      <Badge class=\"extension hidden group-hover:flex\">yaml</Badge>\n    </button>\n  </div>\n</template>\n\n<style scoped>\n@reference '@/style.css';\n\n.download-container {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  margin: 0 0.5px 8px;\n  position: relative;\n  width: fit-content;\n  z-index: 1;\n}\n\n.download-container:has(:focus-visible)::before,\n.download-container.download-both:hover::before {\n  content: '';\n  width: calc(100% + 24px);\n  height: 90px;\n  position: absolute;\n  top: -11px;\n  left: -12px;\n  border-radius: var(--scalar-radius-lg);\n  box-shadow: var(--scalar-shadow-2);\n  pointer-events: none;\n  background: var(--scalar-background-1);\n}\n\n.download-button {\n  color: var(--scalar-link-color);\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 4px;\n  height: fit-content;\n  padding: 0;\n  position: relative;\n  white-space: nowrap !important;\n\n  outline: none;\n}\n\n.download-button::before {\n  border-radius: var(--scalar-radius);\n  content: '';\n  height: calc(100% + 16px);\n  left: -9px;\n  position: absolute;\n  top: -8px;\n  width: calc(100% + 18px);\n}\n\n.download-button:last-of-type::before {\n  width: calc(100% + 15px);\n}\n\n.download-button:hover::before {\n  background: var(--scalar-background-2);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.download-button:focus-visible::before {\n  background: var(--scalar-background-2);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  @apply outline;\n}\n\n.download-button span {\n  --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n  --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n  text-decoration: var(--scalar-text-decoration);\n  color: var(--font-color);\n  font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n  text-underline-offset: 0.25rem;\n  text-decoration-thickness: 1px;\n  text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n  align-items: center;\n  display: flex;\n  gap: 6px;\n  line-height: 1.625;\n  z-index: 1;\n}\n\n.download-button:hover span {\n  text-decoration-color: var(--scalar-color-1, currentColor);\n  color: var(--scalar-link-color-hover, var(--scalar-color-accent));\n  -webkit-text-decoration: var(--scalar-text-decoration-hover);\n  text-decoration: var(--scalar-text-decoration-hover);\n}\n\n/* Second button displayed when hovering over the download container */\n.download-button:nth-of-type(2) {\n  @apply sr-only;\n}\n\n.download-container:has(:focus-visible) .download-button:nth-of-type(2),\n.download-container:hover .download-button:nth-of-type(2) {\n  @apply not-sr-only;\n\n  position: absolute;\n  top: 42px;\n}\n\n.extension {\n  z-index: 1;\n  background: var(--scalar-link-color, var(--scalar-color-accent));\n  color: var(--scalar-background-1);\n}\n.download-container:has(:focus-visible) .extension,\n.download-container:hover .extension {\n  opacity: 1;\n}\n\n.download-link {\n  --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n  --font-visited: var(--scalar-link-color-visited, var(--scalar-color-2));\n\n  text-decoration: var(--scalar-text-decoration);\n  color: var(--font-color);\n  font-weight: var(--scalar-link-font-weight, var(--scalar-semibold));\n  text-underline-offset: 0.25rem;\n  text-decoration-thickness: 1px;\n  text-decoration-color: color-mix(in srgb, var(--font-color) 30%, transparent);\n}\n\n.download-link:hover {\n  --font-color: var(--scalar-link-color, var(--scalar-color-accent));\n  text-decoration-color: var(--font-color);\n}\n</style>\n","<script setup lang=\"ts\">\nconst { row } = defineProps<{\n  row?: boolean\n}>()\n</script>\n\n<template>\n  <div\n    class=\"introduction-card\"\n    :class=\"{ 'introduction-card-row': row }\">\n    <slot />\n  </div>\n</template>\n\n<style scoped>\n/* Modern layout */\n.introduction-card {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n}\n.introduction-card-row {\n  gap: 24px;\n}\n/* Classic layout */\n@media (min-width: 600px) {\n  .introduction-card-row {\n    flex-flow: row wrap;\n  }\n}\n.introduction-card-row > * {\n  flex: 1;\n}\n@media (min-width: 600px) {\n  .introduction-card-row > * {\n    min-width: min-content;\n  }\n}\n@media (max-width: 600px) {\n  .introduction-card-row > * {\n    max-width: 100%;\n  }\n}\n@container (max-width: 900px) {\n  .introduction-card-row {\n    flex-direction: column;\n    align-items: stretch;\n    gap: 0px;\n  }\n}\n.introduction-card :deep(.security-scheme-label) {\n  text-transform: uppercase;\n  font-weight: var(--scalar-semibold);\n}\n.introduction-card-row :deep(.scalar-card:nth-of-type(2) .scalar-card-header) {\n  display: none;\n}\n.introduction-card-row :deep(.scalar-card:nth-of-type(2) .scalar-card-header) {\n  display: none;\n}\n.introduction-card-row\n  :deep(\n    .scalar-card:nth-of-type(2)\n      .scalar-card-header.scalar-card--borderless\n      + .scalar-card-content\n  ) {\n  margin-top: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nconst emit = defineEmits<{\n  (e: 'intersecting'): void\n}>()\n\nconst section = useTemplateRef<HTMLElement>('section')\n\nuseIntersection(section, () => emit('intersecting'))\n</script>\n<template>\n  <section\n    ref=\"section\"\n    class=\"section\">\n    <slot />\n  </section>\n</template>\n\n<style scoped>\n.section {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n\n  max-width: var(--refs-content-max-width);\n  margin: auto;\n\n  padding: 90px 0;\n\n  /* Offset by header height to line up scroll position */\n  scroll-margin-top: var(--refs-viewport-offset);\n}\n.section:has(~ div.contents) {\n  border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.references-classic .section {\n  padding: 48px 0;\n  gap: 24px;\n}\n@container narrow-references-container (max-width: 900px) {\n  .references-classic .section,\n  .section {\n    padding: 48px 24px;\n  }\n}\n.section:not(:last-of-type) {\n  border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n</style>\n","<template>\n  <div class=\"section-column\"><slot /></div>\n</template>\n\n<style scoped>\n.section-column {\n  flex: 1;\n  min-width: 0;\n}\n@container narrow-references-container (max-width: 900px) {\n  .section-column:nth-of-type(2) {\n    padding-top: 0;\n  }\n}\n</style>\n","<template>\n  <div class=\"section-columns\">\n    <slot />\n  </div>\n</template>\n\n<style scoped>\n.section-columns {\n  display: flex;\n  gap: 48px;\n}\n@container narrow-references-container (max-width: 900px) {\n  .section-columns {\n    flex-direction: column;\n    gap: 24px;\n  }\n}\n</style>\n","<script setup lang=\"ts\">\ndefineProps<{\n  /**\n   * Skips rendering the section container div and its styles, rendering only the slot directly.\n   */\n  omit?: boolean\n}>()\n</script>\n\n<template>\n  <slot v-if=\"omit\" />\n  <div\n    v-else\n    class=\"section-container\">\n    <slot />\n  </div>\n</template>\n\n<style scoped>\n.section-container {\n  position: relative;\n  padding: 0 60px;\n  width: 100%;\n  border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.section-container:has(.introduction-section) {\n  border-top: none;\n}\n@container narrow-references-container (max-width: 900px) {\n  .section-container {\n    padding: 0;\n  }\n}\n</style>\n","<script lang=\"ts\" setup>\nwithDefaults(defineProps<{ lines?: number }>(), {\n  lines: 1,\n})\n</script>\n\n<template>\n  <div\n    v-for=\"idx in [...Array(lines).keys()]\"\n    :key=\"idx\"\n    class=\"loading\"\n    :class=\"{ 'single-line': lines === 1 }\" />\n</template>\n\n<style scoped>\n.loading {\n  background: var(--scalar-background-3);\n  animation: loading-skeleton 1.5s infinite alternate;\n  border-radius: var(--scalar-radius-lg);\n  min-height: 1.6em;\n  margin: 0.6em 0;\n  max-width: 100%;\n}\n.loading:first-of-type {\n  min-height: 3em;\n  margin-bottom: 24px;\n  margin-top: 0;\n}\n.loading:last-of-type {\n  width: 60%;\n}\n\n.loading.single-line {\n  min-height: 3em;\n  margin: 0.6em 0;\n  max-width: 80%;\n}\n\n@keyframes loading-skeleton {\n  from {\n    opacity: 1;\n  }\n  to {\n    opacity: 0.33;\n  }\n}\n</style>\n","<script setup lang=\"ts\">\nimport LoadingSkeleton from '../LoadingSkeleton.vue'\n\nwithDefaults(\n  defineProps<{\n    loading?: boolean\n  }>(),\n  {\n    loading: false,\n  },\n)\n</script>\n\n<template>\n  <div class=\"section-content\">\n    <slot v-if=\"!loading\" />\n    <template v-else>\n      <LoadingSkeleton :lines=\"8\" />\n    </template>\n  </div>\n</template>\n\n<style scoped>\n@container narrow-references-container (max-width: 900px) {\n  .section-content--with-columns {\n    flex-direction: column;\n    gap: 24px;\n  }\n}\n</style>\n","<script setup lang=\"ts\">\nimport LoadingSkeleton from '../LoadingSkeleton.vue'\n\nconst {\n  loading,\n  tight,\n  removeMargin = false,\n} = defineProps<{\n  loading?: boolean\n  tight?: boolean\n  removeMargin?: boolean\n}>()\n</script>\n\n<template>\n  <div class=\"section-header-wrapper xl:gap-12\">\n    <LoadingSkeleton v-if=\"loading\" />\n    <div\n      v-else\n      class=\"section-header\"\n      :class=\"{ tight, 'mb-3': !removeMargin }\">\n      <slot />\n    </div>\n    <slot\n      v-if=\"$slots.links\"\n      name=\"links\" />\n  </div>\n</template>\n\n<style scoped>\n@reference \"@/style.css\";\n\n.section-header-wrapper {\n  display: grid;\n  grid-template-columns: 1fr;\n}\n\n@variant xl {\n  .section-header-wrapper {\n    grid-template-columns: repeat(2, 1fr);\n  }\n}\n\n.section-header {\n  font-size: var(--font-size, var(--scalar-heading-1));\n  font-weight: var(--font-weight, var(--scalar-bold));\n  /* prettier-ignore */\n  color: var(--scalar-color-1);\n  word-wrap: break-word;\n  line-height: 1.45;\n  margin-top: 0;\n}\n\n.section-header.tight {\n  margin-bottom: 6px;\n}\n\n.section-header.loading {\n  width: 80%;\n}\n</style>\n","<script setup lang=\"ts\">\nconst { level = 1 } = defineProps<{ level?: 1 | 2 | 3 | 4 | 5 | 6 }>()\n</script>\n<template>\n  <component\n    :is=\"`h${level}`\"\n    class=\"section-header-label\">\n    <slot />\n  </component>\n</template>\n<style scoped>\n.section-header-label {\n  display: inline;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarErrorBoundary } from '@scalar/components'\nimport { computed } from 'vue'\n\nimport { usePluginManager } from '@/plugins'\n\nconst { value } = defineProps<{\n  /**\n   * Any value that can contain OpenAPI specification extensions.\n   */\n  value: Record<string, unknown> | undefined\n}>()\n\nconst { getSpecificationExtensions } = usePluginManager()\n\n/**\n * Extract registered OpenAPI extension names\n */\nfunction getCustomExtensionNames(\n  value: Record<string, any> | undefined,\n): `x-${string}`[] {\n  return Object.keys(value ?? {}).filter((item) =>\n    item.startsWith('x-'),\n  ) as `x-${string}`[]\n}\n\n/**\n * Get the components for the specification extensions\n */\nfunction getCustomOpenApiExtensionComponents(extensionNames: `x-${string}`[]) {\n  return extensionNames\n    .flatMap((name) => getSpecificationExtensions(name))\n    .filter((extension) => extension.component)\n}\n\n/**\n * Get the names of custom extensions from the provided value.\n */\nconst customExtensionNames = computed(() => getCustomExtensionNames(value))\n\n/**\n * Get the components for the custom extensions.\n */\nconst customExtensions = computed(() =>\n  getCustomOpenApiExtensionComponents(customExtensionNames.value),\n)\n</script>\n\n<template>\n  <template v-if=\"typeof value === 'object' && customExtensions.length\">\n    <div class=\"text-base\">\n      <template v-for=\"extension in customExtensions\">\n        <ScalarErrorBoundary>\n          <template v-if=\"extension.renderer\">\n            <!-- Custom rendering -->\n            <component\n              :is=\"extension.renderer\"\n              v-bind=\"{\n                [extension.name]: value?.[extension.name],\n                component: extension.component,\n              }\" />\n          </template>\n          <template v-else>\n            <!-- Vue rendering -->\n            <component\n              :is=\"extension.component\"\n              v-bind=\"{ [extension.name]: value?.[extension.name] }\" />\n          </template>\n        </ScalarErrorBoundary>\n      </template>\n    </div>\n  </template>\n</template>\n","<script setup lang=\"ts\">\nimport type { Node } from '@scalar/code-highlight'\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nconst { eventBus, id } = defineProps<{\n  id?: string\n  content: string\n  transformHeading: (node: Node) => Node\n  eventBus: WorkspaceEventBus | null\n}>()\n\nconst element = useTemplateRef<HTMLElement>('element')\n\nuseIntersection(element, () =>\n  id ? eventBus?.emit('intersecting:nav-item', { id }) : undefined,\n)\n</script>\n\n<template>\n  <div\n    :id\n    ref=\"element\"\n    class=\"introduction-description-heading scroll-mt-16\">\n    <ScalarMarkdown\n      :transform=\"transformHeading\"\n      transformType=\"heading\"\n      :value=\"content\"\n      withImages />\n  </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n  getHeadings,\n  isHeading,\n  splitContent,\n  textFromNode,\n  type Node,\n} from '@scalar/code-highlight/markdown'\nimport { slugger } from '@scalar/helpers/string/slugger'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { computed } from 'vue'\n\nimport InfoMarkdownSection from './InfoMarkdownSection.vue'\n\nconst { description, headingSlugGenerator } = defineProps<{\n  eventBus: WorkspaceEventBus | null\n  headingSlugGenerator: (heading: Heading) => string\n  /** Markdown document */\n  description?: string\n}>()\n\n/**\n * Descriptions, but split into multiple sections.\n * We need this to wrap the headings in IntersectionObserver components.\n */\nconst sections = computed(() => {\n  if (!description) {\n    return []\n  }\n\n  const { slug } = slugger()\n\n  const items = splitContent(description).map((markdown) => {\n    // Get “first” (and only) heading, if available\n    const headings = getHeadings(markdown)\n    const heading = headings[0]\n\n    // Generate an id for the heading\n    const id = heading\n      ? headingSlugGenerator({\n          ...heading,\n          slug: slug(heading.value),\n        })\n      : undefined\n\n    return {\n      id,\n      content: markdown,\n    }\n  })\n\n  return items\n})\n\n/** Add ids to all headings */\nconst transformHeading = (node: Node) => {\n  if (!isHeading(node)) {\n    return node\n  }\n\n  const { slug } = slugger()\n\n  const value = textFromNode(node)\n\n  node.data = {\n    hProperties: {\n      id: headingSlugGenerator({\n        depth: node.depth,\n        value,\n        slug: slug(value),\n      }),\n    },\n  }\n\n  return node\n}\n</script>\n\n<template>\n  <div\n    v-if=\"description\"\n    class=\"introduction-description mt-6 flex flex-col\">\n    <InfoMarkdownSection\n      v-for=\"section in sections\"\n      :id=\"section.id\"\n      :key=\"section.id\"\n      :content=\"section.content\"\n      :eventBus=\"eventBus\"\n      :transformHeading=\"transformHeading\" />\n  </div>\n</template>\n\n<style scoped>\n.references-classic .introduction-description :deep(img) {\n  max-width: 720px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { onMounted, onUnmounted, ref } from 'vue'\n\nconst containerRef = ref<HTMLDivElement>()\n\n/** Whether the container needs to scroll */\nconst needsScroll = ref(false)\n\n/** Check if the container can scroll in either direction */\nconst checkScrollability = () => {\n  if (!containerRef.value) {\n    return\n  }\n\n  const { scrollWidth, clientWidth } = containerRef.value\n  needsScroll.value = scrollWidth > clientWidth\n}\n\n/** MutationObserver to watch for changes in child elements */\nlet mutationObserver: MutationObserver | null = null\n\n/**\n * We use the mutation observer to watch for changes and check if we need to scroll,\n * if we do need to scroll we apply the icons-only class to the container\n */\nonMounted(() => {\n  checkScrollability()\n\n  // Re-check on window resize\n  window.addEventListener('resize', checkScrollability)\n\n  // Watch for changes in child elements\n  if (containerRef.value) {\n    mutationObserver = new MutationObserver(() => {\n      checkScrollability()\n    })\n\n    mutationObserver.observe(containerRef.value, {\n      childList: true,\n      subtree: true,\n    })\n  }\n})\n\nonUnmounted(() => {\n  // Clean up event listeners and observer\n  window.removeEventListener('resize', checkScrollability)\n\n  if (mutationObserver) {\n    mutationObserver.disconnect()\n    mutationObserver = null\n  }\n})\n</script>\n\n<template>\n  <div\n    ref=\"containerRef\"\n    :class=\"{ 'icons-only': needsScroll }\"\n    class=\"custom-scroll mb-3 flex h-auto min-h-8 max-w-full items-center gap-2 overflow-x-auto text-base whitespace-nowrap xl:mb-1.5\">\n    <slot />\n  </div>\n</template>\n\n<style scoped>\n.icons-only :deep(span) {\n  display: none;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarIconBook } from '@scalar/icons'\nimport type { ExternalDocumentationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\ndefineProps<{\n  value?: ExternalDocumentationObject\n}>()\n</script>\n\n<template>\n  <template v-if=\"value\">\n    <div\n      class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n      <a\n        :href=\"value.url\"\n        class=\"text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none\"\n        target=\"_blank\"\n        rel=\"noopener noreferrer\">\n        <ScalarIconBook\n          weight=\"bold\"\n          class=\"size-3 text-current\" />\n        <span\n          class=\"ml-1 empty:hidden\"\n          v-if=\"value.description\">\n          {{ value.description }}\n        </span>\n        <span\n          class=\"ml-1 empty:hidden\"\n          v-else>\n          {{ value.url }}\n        </span>\n      </a>\n    </div>\n  </template>\n</template>\n","<script setup lang=\"ts\">\nimport { cva } from '@scalar/components'\nimport { ScalarIconEnvelopeSimple } from '@scalar/icons'\nimport type { ContactObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nconst variants = cva({\n  base: 'text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none',\n  variants: {\n    link: {\n      true: 'no-underline hover:bg-b-2',\n    },\n  },\n})\n\ndefineProps<{\n  value?: ContactObject\n}>()\n</script>\n\n<template>\n  <template v-if=\"value\">\n    <div\n      class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n      <a\n        v-if=\"value?.email\"\n        :class=\"variants({ link: true })\"\n        :href=\"`mailto:${value?.email}`\">\n        <ScalarIconEnvelopeSimple\n          weight=\"bold\"\n          class=\"size-3 text-current\" />\n        <span class=\"ml-1 empty:hidden\">{{ value.name }}</span>\n      </a>\n      <span\n        v-else-if=\"value?.name\"\n        :class=\"variants({ link: false })\">\n        {{ value.name }}\n      </span>\n    </div>\n  </template>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIconGavel } from '@scalar/icons'\nimport type { LicenseObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\ndefineProps<{\n  value?: LicenseObject\n}>()\n</script>\n\n<template>\n  <div\n    class=\"group flex h-fit items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n    <a\n      class=\"text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none\"\n      v-if=\"value?.url\"\n      :href=\"value.url\"\n      target=\"_blank\"\n      rel=\"noopener noreferrer\">\n      <ScalarIconGavel\n        weight=\"bold\"\n        class=\"size-3 text-current\" />\n      <span class=\"ml-1 empty:hidden\">{{\n        value?.name || value.identifier || value.url\n      }}</span>\n    </a>\n    <template v-else>\n      <ScalarIconGavel\n        weight=\"bold\"\n        class=\"size-3 text-current\" />\n      <span class=\"ml-1 empty:hidden\">{{ value?.name }}</span>\n    </template>\n  </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarIconScroll } from '@scalar/icons'\nimport type { InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\ndefineProps<{\n  value?: InfoObject['termsOfService']\n}>()\n</script>\n\n<template>\n  <template v-if=\"value\">\n    <div\n      class=\"group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto\">\n      <a\n        class=\"text-c-1 hover:bg-b-2 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 no-underline group-last:mr-0 xl:border-none\"\n        :href=\"value\"\n        target=\"_blank\"\n        rel=\"noopener noreferrer\">\n        <ScalarIconScroll\n          weight=\"bold\"\n          class=\"size-3 text-current\" />\n        <span class=\"ml-1 empty:hidden\">Terms of Service</span>\n      </a>\n    </div>\n  </template>\n</template>\n","<script setup lang=\"ts\">\nimport type {\n  ExternalDocumentationObject,\n  InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { LinkList } from '@/components/LinkList'\nimport { ExternalDocs } from '@/features/external-docs'\nimport { Contact, License, TermsOfService } from '@/features/info-object'\n\ndefineProps<{\n  info: InfoObject\n  externalDocs?: ExternalDocumentationObject\n}>()\n</script>\n\n<template>\n  <LinkList>\n    <ExternalDocs :value=\"externalDocs\" />\n    <Contact\n      v-if=\"info.contact\"\n      :value=\"info.contact\" />\n    <License\n      v-if=\"info.license\"\n      :value=\"info.license\" />\n    <TermsOfService\n      v-if=\"info.termsOfService\"\n      :value=\"info.termsOfService\" />\n  </LinkList>\n</template>\n","<script setup lang=\"ts\">\nimport type { InfoObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Badge } from '@/components/Badge'\n\nconst { version } = defineProps<{\n  version: InfoObject['version']\n}>()\n\n/** Format the version number to be displayed in the badge */\nconst prefixedVersion = computed(() => {\n  if (version == null) {\n    return version\n  }\n\n  const versionString = String(version)\n\n  // Prefix with \"v\" if the first character is a number\n  return /^\\d/.test(versionString) ? `v${versionString}` : versionString\n})\n</script>\n<template>\n  <Badge v-if=\"prefixedVersion\">{{ prefixedVersion }}</Badge>\n</template>\n","<script setup lang=\"ts\">\nimport { Badge } from '@/components/Badge'\n\ndefineProps<{\n  oasVersion?: string\n}>()\n</script>\n\n<template>\n  <Badge v-if=\"oasVersion\">OAS {{ oasVersion }}</Badge>\n</template>\n","<script setup lang=\"ts\">\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n  ExternalDocumentationObject,\n  InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport {\n  Section,\n  SectionColumn,\n  SectionColumns,\n  SectionContainer,\n  SectionContent,\n  SectionHeader,\n  SectionHeaderTag,\n} from '@/components/Section'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport InfoDescription from './InfoDescription.vue'\nimport InfoLinks from './InfoLinks.vue'\nimport InfoVersion from './InfoVersion.vue'\nimport OpenApiVersion from './OpenApiVersion.vue'\n\ndefineProps<{\n  id: string | undefined\n  oasVersion: string | undefined\n  info: InfoObject | undefined\n  externalDocs?: ExternalDocumentationObject\n  documentExtensions?: Record<string, unknown>\n  infoExtensions?: Record<string, unknown>\n  headingSlugGenerator: (heading: Heading) => string\n  eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n  <SectionContainer>\n    <!-- If the #after slot is used, we need to add a gap to the section. -->\n    <Section\n      :id=\"id\"\n      aria-label=\"Introduction\"\n      class=\"introduction-section z-1 gap-12\"\n      @intersecting=\"\n        () => id && eventBus?.emit('intersecting:nav-item', { id })\n      \">\n      <SectionContent :loading=\"!info\">\n        <div class=\"flex gap-1.5\">\n          <InfoVersion\n            v-if=\"info\"\n            :version=\"info?.version\" />\n          <OpenApiVersion :oasVersion=\"oasVersion\" />\n        </div>\n        <SectionHeader\n          :loading=\"!info?.title\"\n          tight>\n          <SectionHeaderTag :level=\"1\">\n            {{ info?.title }}\n          </SectionHeaderTag>\n          <template #links>\n            <InfoLinks\n              v-if=\"info\"\n              :externalDocs=\"externalDocs\"\n              :info=\"info\" />\n          </template>\n        </SectionHeader>\n        <SectionColumns>\n          <SectionColumn>\n            <slot name=\"download-link\" />\n            <InfoDescription\n              :description=\"info?.description\"\n              :eventBus=\"eventBus\"\n              :headingSlugGenerator=\"headingSlugGenerator\" />\n          </SectionColumn>\n          <SectionColumn v-if=\"$slots.aside\">\n            <div class=\"sticky-cards\">\n              <slot name=\"aside\" />\n            </div>\n          </SectionColumn>\n        </SectionColumns>\n        <SpecificationExtension :value=\"documentExtensions\" />\n        <SpecificationExtension :value=\"infoExtensions\" />\n      </SectionContent>\n      <slot name=\"after\" />\n    </Section>\n  </SectionContainer>\n</template>\n\n<style scoped>\n.sticky-cards {\n  display: flex;\n  flex-direction: column;\n  position: sticky;\n  top: calc(var(--refs-viewport-offset) + 24px);\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n  ExternalDocumentationObject,\n  InfoObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport DownloadLink from '@/blocks/scalar-info-block/components/DownloadLink.vue'\n\nimport IntroductionCard from './IntroductionCard.vue'\nimport IntroductionLayout from './IntroductionLayout.vue'\n\nconst {\n  headingSlugGenerator,\n  layout,\n  eventBus,\n  documentDownloadType = 'both',\n  documentUrl,\n} = defineProps<{\n  /** Optional unique identifier for the info block. */\n  id?: string\n  /** Original openapi version of the input document */\n  oasVersion?: string\n  /** The Info object from the OpenAPI document. */\n  info: InfoObject | undefined\n  /** The external documentation object from the OpenAPI document, if present. */\n  externalDocs?: ExternalDocumentationObject\n  /** OpenAPI extension fields at the document level. */\n  documentExtensions?: Record<string, unknown>\n  /** OpenAPI extension fields at the info object level. */\n  infoExtensions?: Record<string, unknown>\n  /** The event bus for the handling all events. */\n  eventBus: WorkspaceEventBus\n  /** Heading id generator for Markdown headings */\n  headingSlugGenerator: (heading: Heading) => string\n  /** Determines the layout style for the info block ('modern' or 'classic'). */\n  layout?: 'modern' | 'classic'\n  /** The document download type. */\n  documentDownloadType?: ApiReferenceConfiguration['documentDownloadType']\n  /** URL of the OpenAPI document. Used when documentDownloadType is 'direct'. */\n  documentUrl?: string\n}>()\n\n/**\n * Put the selectors in\n * - the after slot for classic layout,\n * - and the aside slot for other layouts.\n */\nconst introCardsSlot = computed(() =>\n  layout === 'classic' ? 'after' : 'aside',\n)\n</script>\n\n<template>\n  <IntroductionLayout\n    :id\n    :documentExtensions\n    :eventBus=\"eventBus\"\n    :externalDocs\n    :headingSlugGenerator\n    :info\n    :infoExtensions\n    :oasVersion>\n    <template #[introCardsSlot]>\n      <IntroductionCard :row=\"layout === 'classic'\">\n        <slot name=\"selectors\" />\n      </IntroductionCard>\n    </template>\n    <template #download-link>\n      <DownloadLink\n        :documentDownloadType\n        :documentUrl\n        :eventBus />\n    </template>\n  </IntroductionLayout>\n</template>\n","<template>\n  <div class=\"introduction-card-item\">\n    <slot />\n  </div>\n</template>\n\n<style scoped>\n.introduction-card-item {\n  display: flex;\n  flex-direction: column;\n  justify-content: flex-start;\n}\n.introduction-card-item:empty {\n  display: none;\n}\n.introduction-card-item:has(.description) :deep(.server-form-container) {\n  border-bottom-left-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.introduction-card-item :deep(.request-item) {\n  border-bottom: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { target, servers, selectedServer } = defineProps<{\n  /** The selected server URL */\n  selectedServer: ServerObject | null\n  /** Available servers */\n  servers: ServerObject[]\n  /** The id of the target to use for the popover (e.g. address bar) */\n  target: string\n}>()\n\nconst emit = defineEmits<{\n  /** Emitted when the selected server changes */\n  (e: 'update:modelValue', value: string): void\n}>()\n\nconst serverOptions = computed(() =>\n  servers.map((server) => ({\n    id: server.url,\n    label: server.url,\n  })),\n)\n\nconst serverUrlWithoutTrailingSlash = computed(\n  () => selectedServer?.url?.replace(/\\/$/, '') || '',\n)\n\nconst selectedServerOption = computed(() =>\n  serverOptions.value.find((opt) => opt.id === selectedServer?.url),\n)\n\n// For testing\ndefineExpose({\n  servers,\n  serverUrlWithoutTrailingSlash,\n  serverOptions,\n  selectedServer,\n})\n</script>\n<template>\n  <ScalarListbox\n    v-if=\"serverOptions.length > 1\"\n    ref=\"elem\"\n    class=\"group\"\n    :modelValue=\"selectedServerOption\"\n    :options=\"serverOptions\"\n    placement=\"bottom-start\"\n    resize\n    :target=\"target\"\n    @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n    <ScalarButton\n      class=\"bg-b-1 text-c-1 h-auto w-full justify-start gap-1.5 overflow-x-auto rounded-t-none !rounded-b-xl px-3 py-1.5 text-base/5.25 font-normal whitespace-nowrap -outline-offset-1\"\n      variant=\"ghost\">\n      <span class=\"sr-only\">Server:</span>\n      <span class=\"overflow-x-auto\">{{\n        serverUrlWithoutTrailingSlash || 'Select a server'\n      }}</span>\n      <ScalarIconCaretDown\n        class=\"text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100\"\n        weight=\"bold\" />\n    </ScalarButton>\n  </ScalarListbox>\n  <div\n    v-else\n    class=\"text-c-1 flex h-auto w-full items-center gap-0.75 !rounded-b-xl px-3 py-1.5 text-base leading-[20px] whitespace-nowrap\">\n    <span class=\"sr-only\">Server:</span>\n    <span class=\"overflow-x-auto\">{{ serverUrlWithoutTrailingSlash }}</span>\n  </div>\n</template>\n","<script lang=\"ts\">\ntype SelectorProps = {\n  /** The event bus to use for emitting events */\n  eventBus: WorkspaceEventBus\n  /** The selected server  */\n  selectedServer: ServerObject | null\n  /** Available servers */\n  servers: ServerObject[]\n}\n\n/**\n * ServerSelector\n *\n * Core component for rendering a server selector block.\n * Handles server selection and emits a 'server:update:selected' event when the selected server changes.\n *\n * @event server:update:selected - Emitted when the selected server changes\n * @event server:update:variables - Emitted when a server variable changes\n */\nexport default {}\n</script>\n\n<script lang=\"ts\" setup>\nimport { ServerVariablesForm } from '@scalar/api-client/components/Server'\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport Selector from './Selector.vue'\n\nconst { eventBus, servers, selectedServer } = defineProps<SelectorProps>()\n\nconst id = useId()\n\n/** Update the selected server */\nconst updateServer = (newServer: string) => {\n  eventBus.emit('server:update:selected', {\n    url: selectedServer?.url === newServer ? '' : newServer,\n    meta: {\n      type: 'document',\n    },\n  })\n}\n\n/** Update the server variable */\nconst updateServerVariable = (key: string, value: string) => {\n  /** Find the index of the selected server */\n  const index = servers.findIndex((s) => s.url === selectedServer?.url)\n  if (index === -1) {\n    return\n  }\n\n  eventBus.emit('server:update:variables', {\n    index,\n    key,\n    value,\n    meta: {\n      type: 'document',\n    },\n  })\n}\n</script>\n\n<template>\n  <label\n    class=\"bg-b-2 flex h-8 items-center rounded-t-xl border-x border-t px-3 py-2.5 font-medium\">\n    Server\n  </label>\n  <div\n    :id=\"id\"\n    class=\"border\"\n    :class=\"{\n      'rounded-b-xl':\n        !selectedServer?.description && !selectedServer?.variables,\n    }\">\n    <Selector\n      v-if=\"servers.length\"\n      :selectedServer\n      :servers=\"servers\"\n      :target=\"id\"\n      @update:modelValue=\"updateServer\" />\n  </div>\n  <ServerVariablesForm\n    layout=\"reference\"\n    :variables=\"selectedServer?.variables\"\n    @update:variable=\"updateServerVariable\" />\n\n  <!-- Description -->\n  <ScalarMarkdown\n    v-if=\"selectedServer?.description\"\n    class=\"text-c-3 rounded-b-xl border-x border-b px-3 py-1.5\"\n    :value=\"selectedServer.description\" />\n</template>\n","<script setup lang=\"ts\">\nimport { AuthSelector } from '@scalar/api-client/blocks/scalar-auth-selector-block'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n  getSecurityRequirements,\n  getSelectedSecurity,\n  type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace'\nimport { computed } from 'vue'\n\nconst { document, environment, eventBus, options, securitySchemes, authStore } =\n  defineProps<{\n    options: Pick<\n      ApiReferenceConfigurationRaw,\n      'authentication' | 'persistAuth' | 'proxyUrl'\n    >\n    authStore: AuthStore\n    document: WorkspaceDocument | undefined\n    eventBus: WorkspaceEventBus\n    securitySchemes: MergedSecuritySchemes\n    selectedServer: ServerObject | null\n    environment: XScalarEnvironment\n  }>()\n\n/** Compute what the security requirements should be for the document */\nconst securityRequirements = computed(() =>\n  getSecurityRequirements(document?.security),\n)\n\n/** Grab the selected security for the document from the auth store */\nconst documentSelectedSecurity = computed(() =>\n  authStore.getAuthSelectedSchemas({\n    type: 'document',\n    documentName: document?.['x-scalar-navigation']?.name ?? '',\n  }),\n)\n\n/** The selected security keys for the document */\nconst selectedSecurity = computed(() =>\n  getSelectedSecurity(\n    documentSelectedSecurity.value,\n    undefined,\n    securityRequirements.value,\n    securitySchemes,\n    options.authentication?.preferredSecurityScheme,\n  ),\n)\n</script>\n<template>\n  <AuthSelector\n    v-if=\"Object.keys(securitySchemes).length\"\n    :createAnySecurityScheme=\"\n      options.authentication?.createAnySecurityScheme ?? false\n    \"\n    :environment\n    :eventBus\n    isStatic\n    layout=\"reference\"\n    :meta=\"{ type: 'document' }\"\n    :persistAuth=\"options.persistAuth\"\n    :proxyUrl=\"options.proxyUrl ?? ''\"\n    :securityRequirements\n    :securitySchemes\n    :selectedSecurity\n    :server=\"selectedServer\"\n    title=\"Authentication\" />\n</template>\n","<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIconCaretRight } from '@scalar/icons'\nimport { useElementHover } from '@vueuse/core'\nimport { ref } from 'vue'\n\ndefineProps<{\n  transparent?: boolean\n  modelValue: boolean\n}>()\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst button = ref()\nconst isHovered = useElementHover(button)\n</script>\n<template>\n  <Disclosure\n    as=\"section\"\n    class=\"section-accordion\"\n    :class=\"{ 'section-accordion-transparent': transparent }\">\n    <DisclosureButton\n      ref=\"button\"\n      class=\"section-accordion-button\"\n      @click=\"() => emit('update:modelValue', !modelValue)\">\n      <div class=\"section-accordion-button-content\">\n        <slot name=\"title\" />\n      </div>\n      <div\n        v-if=\"$slots.actions\"\n        class=\"section-accordion-button-actions\">\n        <slot\n          :active=\"isHovered || modelValue\"\n          name=\"actions\" />\n      </div>\n      <ScalarIconCaretRight\n        class=\"section-accordion-chevron size-4.5 transition-transform\"\n        :class=\"{ 'rotate-90': modelValue }\" />\n    </DisclosureButton>\n    <DisclosurePanel\n      v-if=\"modelValue\"\n      class=\"section-accordion-content\"\n      static>\n      <div\n        v-if=\"$slots.description\"\n        class=\"section-accordion-description\">\n        <slot name=\"description\" />\n      </div>\n      <div class=\"section-accordion-content-card\">\n        <slot />\n      </div>\n    </DisclosurePanel>\n  </Disclosure>\n</template>\n<style scoped>\n.section-wrapper {\n  color: var(--scalar-color-1);\n\n  padding-top: 12px;\n  margin-top: -12px;\n}\n.section-accordion {\n  display: flex;\n  flex-direction: column;\n\n  border-radius: var(--scalar-radius-lg);\n  background: var(--scalar-background-2);\n\n  /* Offset by header height to line up scroll position */\n  scroll-margin-top: var(--refs-viewport-offset);\n}\n\n.section-accordion-transparent {\n  background: transparent;\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.section-accordion-button {\n  padding: 6px;\n}\n.section-accordion-button {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  cursor: pointer;\n}\n\n.section-accordion-button-content {\n  flex: 1;\n  min-width: 0;\n}\n.section-accordion-button-actions {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  color: var(--scalar-color-3);\n}\n\n.section-accordion-chevron {\n  margin-right: 4px;\n  cursor: pointer;\n  opacity: 1;\n  color: var(--scalar-color-3);\n}\n.section-accordion-button:hover .section-accordion-chevron {\n  color: var(--scalar-color-1);\n}\n.section-accordion-content {\n  border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n  display: flex;\n  flex-direction: column;\n}\n\n.section-accordion-description {\n  font-weight: var(--scalar-semibold);\n  font-size: var(--scalar-mini);\n  color: var(--scalar-color--1);\n  padding: 10px 12px 0px 12px;\n}\n.section-accordion-content-card :deep(.property:last-of-type) {\n  padding-bottom: 9px;\n}\n</style>\n","<script setup lang=\"ts\">\nwithDefaults(\n  defineProps<{\n    if?: boolean\n  }>(),\n  {\n    if: true,\n  },\n)\n</script>\n<template>\n  <span\n    v-if=\"$props.if\"\n    class=\"screenreader-only\">\n    <slot />\n  </span>\n  <slot v-else />\n</template>\n<style scoped>\n.screenreader-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton, useBindCx } from '@scalar/components'\nimport { ScalarIconHash } from '@scalar/icons'\nimport { useId } from 'vue'\n\nimport ScreenReader from '../ScreenReader.vue'\n\nconst emit = defineEmits<{\n  (e: 'copyAnchorUrl'): void\n}>()\n\nconst labelId = useId()\n\nconst { cx } = useBindCx()\n</script>\n<template>\n  <span v-bind=\"cx('group/heading word-break-all relative')\">\n    <span\n      :id=\"labelId\"\n      class=\"contents\">\n      <slot />\n    </span>\n    <span class=\"relative\">\n      <!-- Position anchor to align the copy button to the last line of text  -->\n      <span>&ZeroWidthSpace;</span>\n      <ScalarButton\n        :aria-describedby=\"labelId\"\n        class=\"absolute top-1/2 left-0 inline-block h-fit -translate-y-1/2 px-1.5 py-1 opacity-0 group-hover/heading:opacity-100 group-has-focus-visible/heading:opacity-100\"\n        variant=\"ghost\"\n        @click.stop=\"() => emit('copyAnchorUrl')\">\n        <ScalarIconHash\n          aria-hidden=\"true\"\n          class=\"size-4.5\" />\n        <ScreenReader>Copy link</ScreenReader>\n      </ScalarButton>\n    </span>\n  </span>\n</template>\n","import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/*\n * Checks whether a JSON schema is of type object\n */\nexport const isTypeObject = (schema: unknown): schema is Extract<SchemaObject, { type: 'object' }> => {\n  // null, primitive types, arrays\n  if (schema === null || typeof schema !== 'object' || Array.isArray(schema)) {\n    return false\n  }\n\n  // Check for composition keywords - if present, this should be handled by composition logic\n  const hasComposition = 'oneOf' in schema || 'anyOf' in schema || 'allOf' in schema || 'not' in schema\n\n  // If it has composition keywords, it should not be treated as a simple object schema\n  if (hasComposition) {\n    return false\n  }\n\n  const hasType = 'type' in schema\n\n  // Handle union types (type: ['object', 'null'])\n  if (hasType && Array.isArray(schema.type)) {\n    return schema.type.includes('object')\n  }\n\n  const hasTypeObject = hasType && schema.type === 'object'\n\n  // type: object\n  if (hasTypeObject) {\n    return true\n  }\n\n  // type: string, number, boolean, array, etc.\n  if (hasType && !hasTypeObject) {\n    return false\n  }\n\n  const hasProperties = 'properties' in schema\n  const hasAdditionalProperties = 'additionalProperties' in schema\n  const hasPatternProperties = 'patternProperties' in schema\n\n  return hasProperties || hasAdditionalProperties || hasPatternProperties\n}\n","<script lang=\"ts\" setup>\nimport { ScalarWrappingText } from '@scalar/components'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\n\nconst { value } = defineProps<{\n  value: SchemaObject\n  name?: string\n}>()\n\n/** Generate a failsafe type from the properties when we don't have one */\nconst failsafeType = computed(() => {\n  if ('type' in value) {\n    return value.type\n  }\n\n  if (value.enum) {\n    return 'enum'\n  }\n\n  if (isArraySchema(value) && value.items) {\n    return 'array'\n  }\n\n  if (isTypeObject(value) && (value.properties || value.additionalProperties)) {\n    return 'object'\n  }\n\n  return 'unknown'\n})\n</script>\n\n<template>\n  <span\n    v-if=\"typeof value === 'object'\"\n    class=\"schema-type\">\n    <span\n      class=\"schema-type-icon\"\n      :title=\"\n        'type' in value && typeof value.type === 'string'\n          ? value.type\n          : 'type' in value && Array.isArray(value.type)\n            ? value.type.join(' | ')\n            : 'unknown type'\n      \">\n      <template v-if=\"isTypeObject(value)\"> {} </template>\n      <template v-if=\"isArraySchema(value)\"> [] </template>\n      <template v-if=\"value.enum\"> enum </template>\n    </span>\n    <template v-if=\"name\">\n      <ScalarWrappingText\n        :text=\"name\"\n        preset=\"property\" />\n    </template>\n    <template v-else>\n      {{ failsafeType }}\n    </template>\n  </span>\n</template>\n<style scoped>\n/* Style the \"icon\" */\n.schema-type-icon {\n  color: var(--scalar-color-1);\n  display: none;\n}\n.schema-type {\n  font-family: var(--scalar-font-code);\n  color: var(--scalar-color-1);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarIconLink } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nconst { breadcrumb } = defineProps<{\n  breadcrumb?: string[]\n  eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n  <template v-if=\"breadcrumb && breadcrumb.length > 0\">\n    <div\n      :id=\"breadcrumb.join('.')\"\n      class=\"relative scroll-mt-24\">\n      <!-- Content -->\n      <slot />\n      <button\n        class=\"text-c-3 hover:text-c-1 absolute -top-2 -left-4.5 flex h-[calc(100%+16px)] w-4.5 cursor-pointer items-center justify-center pr-1.5 opacity-0 group-hover:opacity-100 focus-visible:opacity-100\"\n        type=\"button\"\n        @click=\"\n          () =>\n            eventBus?.emit('copy-url:nav-item', { id: breadcrumb.join('.') })\n        \">\n        <!-- Copy button -->\n        <ScalarIconLink\n          class=\"size-3\"\n          weight=\"bold\" />\n        <span class=\"sr-only\">\n          <slot name=\"sr-label\">Copy link to <slot /></slot>\n        </span>\n      </button>\n    </div>\n  </template>\n  <template v-else>\n    <slot />\n  </template>\n</template>\n","import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/** Composition keywords that indicate complex schema structure */\nconst COMPOSITION_KEYWORDS = ['allOf', 'oneOf', 'anyOf'] as const\n\n/**\n * Checks if a schema has object type (either explicit type: 'object' or has properties)\n */\nconst isObjectType = (schema: SchemaObject): boolean => {\n  // Check for explicit object type\n  if ('type' in schema && schema.type) {\n    if (Array.isArray(schema.type)) {\n      return schema.type.includes('object')\n    }\n    return schema.type === 'object'\n  }\n\n  // Check for properties (implicit object type)\n  return 'properties' in schema\n}\n\n/**\n * Checks if a schema has complex features (refs, compositions, discriminators)\n */\nconst hasComplexFeatures = (schema: SchemaObject): boolean =>\n  '$ref' in schema || 'discriminator' in schema || COMPOSITION_KEYWORDS.some((keyword) => keyword in schema)\n\n/**\n * Checks if nested array items are complex\n */\nconst hasComplexNestedArrayItems = (items: SchemaObject): boolean => {\n  if (!isArraySchema(items) || typeof items.items !== 'object') {\n    return false\n  }\n\n  // Check for $ref in original nested items before resolving\n  if ('$ref' in items.items) {\n    return true\n  }\n\n  const nestedItems = getResolvedRef(items.items)\n  if (!nestedItems) {\n    return false\n  }\n\n  // Check if nested items are complex (objects, refs, compositions, or further nested arrays)\n  return isObjectType(nestedItems) || hasComplexFeatures(nestedItems) || isArraySchema(nestedItems)\n}\n\n/**\n * Checks if array items have complex structure\n * like: objects, references, discriminators, compositions, or nested arrays with complex items\n *\n * @param value - The schema object to check\n * @returns true if the array has complex items, false otherwise\n */\nexport const hasComplexArrayItems = (value: SchemaObject | undefined): boolean => {\n  // Early return for invalid inputs\n  if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n    return false\n  }\n\n  // Check for $ref in original items before resolving (in case ref can't be resolved)\n  if ('$ref' in value.items) {\n    return true\n  }\n\n  const items = getResolvedRef(value.items)\n  if (!items) {\n    return false\n  }\n\n  // Check for complex features (refs, compositions, discriminators)\n  if (hasComplexFeatures(items)) {\n    return true\n  }\n\n  // Check if items are objects\n  if (isObjectType(items)) {\n    return true\n  }\n\n  // Check if items are nested arrays with complex items\n  return hasComplexNestedArrayItems(items)\n}\n","/** Composition */\nexport type CompositionKeyword = 'oneOf' | 'anyOf' | 'allOf' | 'not'\n\nexport const compositions: CompositionKeyword[] = ['oneOf', 'anyOf', 'allOf', 'not']\n","import { isDefined } from '@scalar/helpers/array/is-defined'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\nimport { type CompositionKeyword, compositions } from './schema-composition'\nimport { shouldRenderArrayItemComposition } from './should-render-array-item-composition'\n\ntype CompositionToRender = {\n  composition: CompositionKeyword\n  value: SchemaObject\n}\n\n/**\n * Computes which compositions should be rendered and with which values\n *\n * @param value - The schema object to check for compositions\n * @returns Array of compositions to render with their values\n */\nexport const getCompositionsToRender = (value: SchemaObject | undefined): CompositionToRender[] => {\n  if (!value) {\n    return []\n  }\n\n  return compositions\n    .map((composition) => {\n      // Check for array item-level composition first (more specific case)\n      if (shouldRenderArrayItemComposition(value, composition) && isArraySchema(value) && value.items) {\n        return {\n          composition,\n          value: resolve.schema(value.items),\n        }\n      }\n\n      // Check for property-level composition\n      if (value[composition]) {\n        // Skip if array items have this composition (even if complex/not rendered)\n        const hasArrayItemComposition =\n          isArraySchema(value) && value.items && typeof value.items === 'object' && composition in value.items\n\n        if (!hasArrayItemComposition) {\n          return {\n            composition,\n            value: resolve.schema(value),\n          }\n        }\n      }\n\n      return null\n    })\n    .filter(isDefined)\n}\n","import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\nimport { hasComplexArrayItems } from './has-complex-array-items'\n\n/**\n * Check if array item composition should be rendered\n *\n * @param schema - The schema object to check\n * @param composition - The composition keyword to check for\n * @returns true if array item composition should be rendered, false otherwise\n */\nexport const shouldRenderArrayItemComposition = (schema: SchemaObject | undefined, composition: string): boolean => {\n  // Early return if schema is invalid or not an array\n  if (!schema || !isArraySchema(schema)) {\n    return false\n  }\n\n  // Check if items exist and have the composition keyword\n  const items = schema.items\n  if (!items || typeof items !== 'object' || !(composition in items)) {\n    return false\n  }\n\n  // Only render if items are not complex (complex items are handled differently)\n  return !hasComplexArrayItems(schema)\n}\n","import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n// Type descriptions for built-in types\nconst TYPE_DESCRIPTIONS: Record<string, Record<string, string>> = {\n  integer: {\n    _default: 'Integer numbers.',\n    int32: 'Signed 32-bit integers (commonly used integer type).',\n    int64: 'Signed 64-bit integers (long type).',\n  },\n  string: {\n    'date': 'full-date notation as defined by RFC 3339, section 5.6, for example, 2017-07-21',\n    'date-time': 'the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z',\n    'password': 'a hint to UIs to mask the input',\n    'base64': 'base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==',\n    'byte': 'base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==',\n    'binary': 'binary data, used to describe files',\n  },\n} as const\n\n/**\n * Generate property description from type/format\n *\n * @param value - The schema object to generate description from\n * @returns Description string or null if no description available\n */\nexport const getPropertyDescription = (value: SchemaObject | undefined): string | null => {\n  if (!isSchema(value)) {\n    return null\n  }\n  /** Just grab the first type from the array if it's an array */\n  const type = Array.isArray(value.type) ? value.type[0] : value.type\n  if (!type) {\n    return null\n  }\n\n  const typeDescriptions = TYPE_DESCRIPTIONS[type]\n  if (!typeDescriptions) {\n    return null\n  }\n\n  const format =\n    ('format' in value && value.format) || ('contentEncoding' in value && value.contentEncoding) || '_default'\n  return typeDescriptions[format] ?? null\n}\n","import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/**\n * Determine if description should be displayed\n *\n * @param schema - The schema object to check\n * @param propDescription - Optional description from props\n * @returns Description string to display, or null if should not be displayed\n */\nexport const shouldDisplayDescription = (schema: SchemaObject | undefined, propDescription?: string): string | null => {\n  if (!schema) {\n    return null\n  }\n\n  // Don't show description for schemas with compositions to avoid duplicate descriptions\n  if (schema.allOf) {\n    return null\n  }\n\n  if (propDescription && schema.description && (schema.oneOf || schema.anyOf)) {\n    return propDescription === schema.description ? propDescription : `${propDescription}\\n\\n${schema.description}`\n  }\n\n  return propDescription || schema.description || null\n}\n","import type { InjectionKey, Ref } from 'vue'\n\nexport type RequestBodyCompositionSelection = Record<string, number>\n\n/**\n * Shares the selected request-body composition variants between the schema\n * dropdowns and the generated request snippet for a single operation layout.\n */\nexport const REQUEST_BODY_COMPOSITION_INDEX_SYMBOL = Symbol() as InjectionKey<Ref<RequestBodyCompositionSelection>>\n","import { resolve } from '@scalar/workspace-store/resolve'\nimport type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/**\n * Formats an array type string with proper wrapping for union types.\n */\nconst formatArrayType = (itemType: string): string => {\n  if (!itemType) {\n    return 'array'\n  }\n\n  const wrappedItemType = itemType.includes(' | ') ? `(${itemType})` : itemType\n  return `array ${wrappedItemType}[]`\n}\n\n/**\n * Handles array type processing for both single array types and union types containing array.\n */\nconst processArrayType = (value: Extract<SchemaObject, { type: 'array' }>, isUnionType: boolean = false): string => {\n  if (!value.items) {\n    return 'array'\n  }\n\n  const itemType = getSchemaType(resolve.schema(value.items))\n  const baseType = formatArrayType(itemType)\n\n  if (isUnionType) {\n    return baseType\n  }\n\n  // Handle nullable arrays for non-union types\n  return (value as any).nullable ? `${baseType} | null` : baseType\n}\n\n/**\n * Computes the structural type for a schema.\n * This helper always returns type information, never schema titles or ref names.\n *\n * Priority order:\n * 1. const values\n * 2. Array types (with special handling for items)\n * 3. type with contentEncoding\n * 4. raw type\n */\nexport const getSchemaType = (valueOrRef: SchemaObject | ReferenceType<SchemaObject>): string => {\n  // Early return for falsy values\n  if (!valueOrRef) {\n    return ''\n  }\n\n  const value = resolve.schema(valueOrRef)\n\n  // Handle const values first (highest priority)\n  if (value.const !== undefined) {\n    return 'const'\n  }\n\n  // Handle union types (array of types)\n  if ('type' in value && Array.isArray(value.type)) {\n    // Special case: union types containing 'array'\n    // TODO: Correctly type array of types in SchemaObject\n    if (value.type.includes('array') && (value as Extract<SchemaObject, { type: 'array' }>).items) {\n      const arrayType = processArrayType(value as Extract<SchemaObject, { type: 'array' }>, true)\n      const otherTypes = value.type.filter((t) => t !== 'array')\n\n      return otherTypes.length > 0 ? `${arrayType} | ${otherTypes.join(' | ')}` : arrayType\n    }\n\n    // Regular union types\n    return value.type.join(' | ')\n  }\n\n  // Handle single array type\n  if (isArraySchema(value)) {\n    return processArrayType(value, false)\n  }\n\n  // Handle type with content encoding\n  if ('type' in value && value.type && value.contentEncoding) {\n    return `${value.type} • ${value.contentEncoding}`\n  }\n\n  // Fallback to raw type\n  return 'type' in value ? (value.type as string) : ''\n}\n","import { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/**\n * Merges multiple OpenAPI schema objects into a single schema object.\n * Handles nested allOf compositions and merges properties recursively.\n *\n * @param schemas - Array of OpenAPI schema objects to merge\n * @param rootSchema - Optional root schema to merge with the result\n * @returns Merged schema object\n */\nexport const mergeAllOfSchemas = (schemas: SchemaObject | undefined, rootSchema?: SchemaObject): SchemaObject => {\n  // Handle max depth, empty or invalid input\n  if (!schemas?.allOf?.length || !Array.isArray(schemas.allOf)) {\n    return rootSchema || ({} as SchemaObject)\n  }\n\n  // Initialize result object once\n  const result = {} as SchemaObject\n\n  // Extract base schema properties (everything except allOf)\n  const { allOf: _, ...baseSchema } = schemas\n\n  // Process allOf schemas first\n  for (const _schema of schemas.allOf) {\n    if (!_schema || typeof _schema !== 'object') {\n      continue\n    }\n\n    // Resolve ref if present\n    const schema = resolve.schema(_schema)\n\n    // Handle nested allOf recursively\n    if (schema.allOf) {\n      const nestedMerged = mergeAllOfSchemas(schema)\n      mergeSchemaIntoResult(result, nestedMerged)\n      continue\n    }\n\n    mergeSchemaIntoResult(result, schema)\n  }\n\n  // Apply base schema properties with precedence over allOf properties\n  if (Object.keys(baseSchema).length > 0) {\n    mergeSchemaIntoResult(result, baseSchema, true)\n  }\n\n  // Process root schema last if provided\n  if (rootSchema && typeof rootSchema === 'object') {\n    if (rootSchema.allOf) {\n      const nestedMerged = mergeAllOfSchemas(rootSchema)\n      mergeSchemaIntoResult(result, nestedMerged, true)\n    } else {\n      mergeSchemaIntoResult(result, rootSchema, true)\n    }\n  }\n\n  return result\n}\n\n/**\n * Efficiently merges a source schema into a target result object.\n * Handles all schema merging logic in a single optimized function.\n *\n * @param result - The target schema object to merge into\n * @param schema - The source schema object to merge from\n * @param override - Whether to override existing properties (default: false)\n */\nconst mergeSchemaIntoResult = (result: SchemaObject, schema: SchemaObject, override: boolean = false): void => {\n  // Early return if schema is empty\n  const schemaKeys = objectKeys(schema)\n  if (schemaKeys.length === 0) {\n    return\n  }\n\n  // Loop through all schema properties and handle them appropriately\n  for (const key of schemaKeys) {\n    const value = getResolvedRef(schema[key]) as any\n\n    if (value === undefined) {\n      continue\n    }\n\n    // Required\n    if ((key as string) === 'required') {\n      // Merge required fields with deduplication\n      if (Array.isArray(value) && value.length > 0) {\n        // @ts-expect-error\n        if (result.required?.length) {\n          // @ts-expect-error\n          result.required = [...new Set([...result.required, ...value])]\n        } else {\n          // @ts-expect-error\n          result.required = value.slice()\n        }\n      }\n    }\n    // Properties\n    else if ((key as string) === 'properties') {\n      // Merge properties recursively\n      if (value && typeof value === 'object') {\n        // @ts-expect-error\n        if (!result.properties) {\n          // @ts-expect-error\n          result.properties = {}\n        }\n\n        // @ts-expect-error\n        mergePropertiesIntoResult(result.properties, value)\n      }\n    }\n    // Items\n    else if ((key as string) === 'items') {\n      // Handle items (for both arrays and objects with items)\n      const items = resolve.schema(value)\n      if (items) {\n        if (isArraySchema(schema)) {\n          // @ts-expect-error\n          if (!result.items) {\n            // @ts-expect-error\n            result.items = {}\n          }\n\n          // Handle allOf within array items\n          if (items.allOf) {\n            const mergedItems = mergeAllOfSchemas(items)\n            // @ts-expect-error\n            Object.assign(result.items, mergedItems)\n          } else {\n            // @ts-expect-error\n            mergeItemsIntoResult(getResolvedRef(result.items), items)\n          }\n        }\n        // For non-array types with items.allOf, merge into properties\n        else if (items.allOf) {\n          const mergedItems = mergeAllOfSchemas(items)\n          if ('properties' in mergedItems) {\n            if (!('properties' in result)) {\n              // @ts-expect-error\n              result.properties = {}\n            }\n\n            'properties' in result && mergePropertiesIntoResult(result.properties, mergedItems.properties)\n          }\n        }\n        // For non-array types without allOf, still set items if not already set\n        else if (!('items' in result)) {\n          // @ts-expect-error\n          result.items = items\n        }\n      }\n    }\n    // Enum\n    else if (key === 'enum') {\n      if (Array.isArray(value) && value.length > 0) {\n        result.enum = [...new Set([...(result.enum || []), ...value])]\n      }\n    }\n    // OneOf/AnyOf\n    else if (key === 'oneOf' || key === 'anyOf') {\n      // Merge oneOf/anyOf subschema\n      if (Array.isArray(value)) {\n        if (!('properties' in result)) {\n          // @ts-expect-error\n          result.properties = {}\n        }\n        for (const _option of value) {\n          const option = resolve.schema(_option)\n          if (option && 'properties' in option && 'properties' in result) {\n            mergePropertiesIntoResult(result.properties, option.properties)\n          }\n        }\n      }\n    }\n    // Skip allOf as it's handled at a higher level\n    else if (key === 'allOf') {\n      continue\n    }\n    // For all other properties, preserve the first occurrence or override if specified\n    else {\n      if (override || result[key] === undefined) {\n        result[key] = value\n      }\n    }\n  }\n}\n\n/**\n * Efficiently merges properties into a result object without creating new objects.\n */\nconst mergePropertiesIntoResult = (\n  result: Extract<SchemaObject, { type: 'object' }>['properties'],\n  properties: Extract<SchemaObject, { type: 'object' }>['properties'],\n): void => {\n  const propertyKeys = Object.keys(properties ?? {})\n  if (!properties || !result || propertyKeys.length === 0) {\n    return\n  }\n\n  for (const key of propertyKeys) {\n    const schema = resolve.schema(properties[key])\n    if (!schema) {\n      delete result[key]\n      continue\n    }\n\n    if (typeof schema !== 'object') {\n      result[key] = schema\n      continue\n    }\n\n    if (!result[key]) {\n      // Handle new property with allOf\n      if (schema.allOf) {\n        result[key] = mergeAllOfSchemas(schema)\n      } else if (isArraySchema(schema) && resolve.schema(schema.items)?.allOf) {\n        result[key] = {\n          ...schema,\n          items: mergeAllOfSchemas(resolve.schema(schema.items)),\n        }\n      } else if (properties[key]) {\n        result[key] = properties[key]\n      }\n      continue\n    }\n\n    // Merge existing property\n    const existing = resolve.schema(result[key])\n\n    if (schema.allOf) {\n      result[key] = mergeAllOfSchemas({ allOf: [existing, ...schema.allOf] } as SchemaObject)\n    } else if (isArraySchema(schema) && isArraySchema(existing) && schema.items) {\n      const existingItems = resolve.schema(existing.items)\n      result[key] = {\n        ...existing,\n        type: 'array',\n        items: existingItems ? mergeItems(existingItems, resolve.schema(schema.items)) : resolve.schema(schema.items),\n      }\n    } else {\n      // Create merged object with properties handled separately\n      if ('properties' in existing && 'properties' in schema) {\n        const merged = { ...existing, ...schema }\n        merged.properties = { ...existing.properties }\n        mergePropertiesIntoResult(merged.properties, schema.properties)\n        result[key] = merged\n      }\n      // Simple merge without property recursion\n      else {\n        result[key] = { ...schema, ...existing }\n      }\n    }\n  }\n}\n\n/**\n * Efficiently merges array items into a result object.\n */\nconst mergeItemsIntoResult = (result: SchemaObject, items: SchemaObject): void => {\n  // Handle allOf in items\n  if (items.allOf || result.allOf) {\n    // Build array without spreads for better performance\n    const allOfSchemas: SchemaObject[] = []\n\n    if (result.allOf) {\n      for (const schema of result.allOf) {\n        allOfSchemas.push(resolve.schema(schema))\n      }\n    } else {\n      allOfSchemas.push(result)\n    }\n\n    if (items.allOf) {\n      for (const schema of items.allOf) {\n        allOfSchemas.push(resolve.schema(schema))\n      }\n    } else {\n      allOfSchemas.push(items)\n    }\n\n    const merged = mergeAllOfSchemas({ allOf: allOfSchemas } as SchemaObject)\n    Object.assign(result, merged)\n    return\n  }\n\n  // Regular merge\n  Object.assign(result, items)\n\n  // Merge properties if both have them\n  if ('properties' in result && 'properties' in items) {\n    mergePropertiesIntoResult(result.properties, items.properties)\n  }\n}\n\n/**\n * Helper function for merging items that returns a new object.\n */\nconst mergeItems = (existing: SchemaObject, incoming: SchemaObject): SchemaObject => {\n  // Handle allOf in either schema\n  if (existing.allOf || incoming.allOf) {\n    // Build array without spreads for better performance\n    const allOfSchemas: SchemaObject[] = []\n\n    if (existing.allOf) {\n      for (const schema of existing.allOf) {\n        allOfSchemas.push(resolve.schema(schema))\n      }\n    } else {\n      allOfSchemas.push(existing)\n    }\n\n    if (incoming.allOf) {\n      for (const schema of incoming.allOf) {\n        allOfSchemas.push(resolve.schema(schema))\n      }\n    } else {\n      allOfSchemas.push(incoming)\n    }\n\n    return mergeAllOfSchemas({ allOf: allOfSchemas } as SchemaObject)\n  }\n\n  const merged = { ...existing, ...incoming }\n\n  // Recursively merge properties if both have properties\n  if ('properties' in existing && 'properties' in incoming) {\n    // @ts-expect-error\n    merged.properties = { ...existing.properties }\n    // @ts-expect-error\n    mergePropertiesIntoResult(merged.properties, incoming.properties)\n  }\n\n  return merged as SchemaObject\n}\n","import { REGEX } from '@scalar/helpers/regex/regex-helpers'\n\n/**\n * Gets the \"name\" of the schema from the ref path\n * TODO: this will change so fix it when the new refs are out\n * Then add tests\n *\n * @example SchemaName from #/components/schemas/SchemaName\n */\nexport const getRefName = (ref: string) => {\n  if (!ref) {\n    return null\n  }\n\n  const match = ref.match(REGEX.REF_NAME)\n  if (match) {\n    return match[1]\n  }\n\n  return null\n}\n","import { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject, SchemaReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { getRefName } from './get-ref-name'\n\n/**\n * Extract schema name from various schema formats\n *\n * Handles $ref, title, name, type, and schema dictionary lookup\n */\nexport const getModelNameFromSchema = (\n  schemaOrRef: SchemaObject | SchemaReferenceType<SchemaObject>,\n): {\n  /** The key in components.schemas (extracted from $ref), used for sidebar navigation. */\n  schemaKey: string | null\n  /** The human-readable name to display (schema.title, schema.name, or ref key). */\n  label: string\n} | null => {\n  if (!schemaOrRef) {\n    return null\n  }\n\n  const schema = resolve.schema(schemaOrRef)\n\n  const schemaKey = '$ref' in schemaOrRef ? (getRefName(schemaOrRef.$ref) ?? null) : null\n\n  if (schema.title) {\n    return { schemaKey, label: schema.title }\n  }\n\n  if (schema.name) {\n    return { schemaKey, label: schema.name }\n  }\n\n  if ('$ref' in schemaOrRef) {\n    if (schemaKey) {\n      return { schemaKey, label: schemaKey }\n    }\n  }\n\n  return null\n}\n","import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\n\n/**\n * Determines if the given schema is an empty object schema.\n * An empty object schema is defined as a schema with type 'object'\n * and no defined properties, no additionalProperties (or set to false), and no patternProperties.\n */\nexport const isEmptySchemaObject = (schema: SchemaObject | undefined): boolean => {\n  if (!isTypeObject(schema)) {\n    return false\n  }\n\n  const hasNoProperties = Object.keys(schema.properties ?? {}).length === 0\n  const hasNoAdditionalProperties = schema.additionalProperties === undefined || schema.additionalProperties === false\n  const hasNoPatternProperties = Object.keys(schema.patternProperties ?? {}).length === 0\n\n  return hasNoProperties && hasNoAdditionalProperties && hasNoPatternProperties\n}\n","import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { isTypeObject } from './is-type-object'\n\n/** Extract the type of properties */\ntype Properties = NonNullable<Extract<SchemaObject, { type: 'object' }>['properties']>\n\ntype Options = Partial<\n  Pick<ApiReferenceConfiguration, 'orderSchemaPropertiesBy' | 'orderRequiredPropertiesFirst'> & {\n    hideReadOnly: boolean\n    hideWriteOnly: boolean\n  }\n>\n\n/** Take a list of property names and reduce it back into an object */\nexport const reduceNamesToObject = (names: string[], properties: Properties): Properties =>\n  names.reduce((acc, name) => {\n    const prop = properties?.[name]\n    if (prop) {\n      acc[name] = prop\n    }\n    return acc\n  }, {} as Properties)\n\n/** Sort property names in an object schema */\nexport const sortPropertyNames = (\n  schema: SchemaObject,\n  discriminator?: DiscriminatorObject,\n  {\n    hideReadOnly = false,\n    hideWriteOnly = false,\n    orderSchemaPropertiesBy = 'alpha',\n    orderRequiredPropertiesFirst = true,\n  }: Options = {},\n): string[] => {\n  if (!isTypeObject(schema) || !schema.properties) {\n    return []\n  }\n\n  const propertyNames = Object.keys(schema.properties)\n  const requiredPropertiesSet = new Set(schema.required || [])\n\n  return propertyNames\n    .sort((a, b) => {\n      const aDiscriminator = a === discriminator?.propertyName\n      const bDiscriminator = b === discriminator?.propertyName\n\n      const aRequired = requiredPropertiesSet.has(a)\n      const bRequired = requiredPropertiesSet.has(b)\n\n      // Discriminator comes first always\n      if (aDiscriminator && !bDiscriminator) {\n        return -1\n      }\n      if (!aDiscriminator && bDiscriminator) {\n        return 1\n      }\n\n      // Sort by x-order specification extension when present\n      const aSchema = schema.properties?.[a]\n      const bSchema = schema.properties?.[b]\n      const aOrder =\n        aSchema && typeof aSchema === 'object' && 'x-order' in aSchema\n          ? (aSchema as Record<string, unknown>)['x-order']\n          : undefined\n      const bOrder =\n        bSchema && typeof bSchema === 'object' && 'x-order' in bSchema\n          ? (bSchema as Record<string, unknown>)['x-order']\n          : undefined\n\n      if (aOrder !== undefined && bOrder !== undefined) {\n        return Number(aOrder) - Number(bOrder)\n      }\n      if (aOrder !== undefined && bOrder === undefined) {\n        return -1\n      }\n      if (aOrder === undefined && bOrder !== undefined) {\n        return 1\n      }\n\n      // Order required properties first\n      if (orderRequiredPropertiesFirst) {\n        // If one is required and the other isn't, required comes first\n        if (aRequired && !bRequired) {\n          return -1\n        }\n        if (!aRequired && bRequired) {\n          return 1\n        }\n      }\n\n      // If both have the same required status, sort alphabetically\n      if (orderSchemaPropertiesBy === 'alpha') {\n        return a.localeCompare(b)\n      }\n\n      return 0\n    })\n    .filter((property) => {\n      const resolved = schema.properties && resolve.schema(schema.properties[property])\n\n      // If hideReadOnly is true, filter out properties that are readOnly\n      if (hideReadOnly && resolved?.readOnly === true) {\n        return false\n      }\n      // If hideWriteOnly is true, filter out properties that are writeOnly\n      if (hideWriteOnly && resolved?.writeOnly === true) {\n        return false\n      }\n      return true\n    })\n}\n","<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n  DiscriminatorObject,\n  SchemaObject,\n  SchemaReferenceType,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { sortPropertyNames } from '@/components/Content/Schema/helpers/sort-property-names'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\n\nimport SchemaProperty from './SchemaProperty.vue'\n\nconst { schema, discriminator, options, schemaContext, compositionPath } =\n  defineProps<{\n    schema: SchemaObject\n    discriminator?: DiscriminatorObject\n    compact?: boolean\n    hideHeading?: boolean\n    level?: number\n    hideModelNames?: boolean\n    breadcrumb?: string[]\n    eventBus: WorkspaceEventBus | null\n    options: SchemaOptions\n    schemaContext?: string\n    compositionPath?: string[]\n  }>()\n\n/**\n * Sorts properties by required status first, then alphabetically.\n * Required properties appear first, followed by optional properties.\n */\nconst sortedProperties = computed(() =>\n  sortPropertyNames(schema, discriminator, options),\n)\n\n/**\n * Get the display name for additional properties.\n *\n * Checks x-additionalPropertiesName extension first, then falls back to the\n * propertyNames schema title if available.\n */\nconst getAdditionalPropertiesName = (\n  _additionalProperties: Extract<\n    SchemaObject,\n    { type: 'object' }\n  >['additionalProperties'],\n  _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n) => {\n  const additionalProperties =\n    typeof _additionalProperties === 'boolean'\n      ? _additionalProperties\n      : resolve.schema(_additionalProperties)\n\n  if (\n    typeof additionalProperties === 'object' &&\n    typeof additionalProperties['x-additionalPropertiesName'] === 'string' &&\n    additionalProperties['x-additionalPropertiesName'].trim().length > 0\n  ) {\n    return `${additionalProperties['x-additionalPropertiesName'].trim()}`\n  }\n\n  // Fall back to the propertyNames title when available\n  if (_propertyNames) {\n    const resolved = resolve.schema(_propertyNames)\n    if (resolved?.title) {\n      return resolved.title\n    }\n  }\n\n  return 'propertyName'\n}\n\n/**\n * Extract enum values from the propertyNames schema.\n *\n * JSON Schema's propertyNames keyword constrains which keys are valid\n * in an object with additionalProperties. When it contains an enum,\n * these are the allowed key names.\n */\nconst getPropertyNamesEnum = (\n  _propertyNames?: Extract<SchemaObject, { type: 'object' }>['propertyNames'],\n): string[] | undefined => {\n  if (!_propertyNames) {\n    return undefined\n  }\n\n  const resolved = resolve.schema(_propertyNames)\n  if (\n    resolved &&\n    'enum' in resolved &&\n    Array.isArray(resolved.enum) &&\n    resolved.enum.length > 0\n  ) {\n    return resolved.enum as string[]\n  }\n\n  return undefined\n}\n\n/** Enum values for the property keys, derived from propertyNames if present. */\nconst additionalPropertiesEnum = computed(() => {\n  if (!isTypeObject(schema) || !schema.additionalProperties) {\n    return undefined\n  }\n  return getPropertyNamesEnum(schema.propertyNames)\n})\n\n/**\n * Keep sibling property descriptions separate from the referenced schema.\n *\n * This allows us to render both:\n * - the property-specific description written next to the $ref, and\n * - the referenced schema's own description (for example discriminator parent docs)\n */\nconst getPropertySchema = (\n  property: SchemaReferenceType<SchemaObject> | undefined,\n): SchemaObject | undefined => {\n  if (!property) {\n    return undefined\n  }\n\n  if ('$ref' in property && typeof property.$ref === 'string') {\n    return getResolvedRef(property) as SchemaObject\n  }\n\n  return resolve.schema(property)\n}\n\nconst getPropertyDescription = (\n  property: SchemaReferenceType<SchemaObject> | undefined,\n): string | undefined => {\n  if (!property) {\n    return undefined\n  }\n\n  return typeof property.description === 'string'\n    ? property.description\n    : undefined\n}\n\n/**\n * Get the value for additional properties.\n *\n * When additionalProperties is true or an empty object, it should render as { type: 'anything' }.\n */\nconst getAdditionalPropertiesValue = (\n  additionalProperties: Extract<\n    SchemaObject,\n    { type: 'object' }\n  >['additionalProperties'],\n): SchemaObject => {\n  if (\n    additionalProperties === true ||\n    (typeof additionalProperties === 'object' &&\n      Object.keys(additionalProperties).length === 0) ||\n    typeof additionalProperties !== 'object' ||\n    !('type' in additionalProperties)\n  ) {\n    return {\n      // @ts-expect-error - ask hans\n      type: 'anything',\n      ...(typeof additionalProperties === 'object' ? additionalProperties : {}),\n    }\n  }\n\n  return additionalProperties\n}\n</script>\n\n<template>\n  <!-- Properties -->\n  <template v-if=\"isTypeObject(schema) && schema.properties\">\n    <SchemaProperty\n      v-for=\"property in sortedProperties\"\n      :key=\"property\"\n      :breadcrumb\n      :compact\n      :compositionPath=\"compositionPath\"\n      :compositionPathSegment=\"property\"\n      :discriminator\n      :eventBus=\"eventBus\"\n      :hideHeading\n      :hideModelNames\n      :level\n      :name=\"property\"\n      :options=\"options\"\n      :required=\"schema.required?.includes(property)\"\n      :description=\"getPropertyDescription(schema.properties[property])\"\n      :schema=\"getPropertySchema(schema.properties[property])\"\n      :schemaContext=\"schemaContext\" />\n  </template>\n\n  <!-- patternProperties -->\n  <template v-if=\"isTypeObject(schema) && schema.patternProperties\">\n    <SchemaProperty\n      v-for=\"[key, property] in Object.entries(schema.patternProperties)\"\n      :key=\"key\"\n      :breadcrumb\n      :compact\n      :compositionPath=\"compositionPath\"\n      :compositionPathSegment=\"key\"\n      :discriminator\n      :eventBus=\"eventBus\"\n      :hideHeading\n      :hideModelNames=\"hideModelNames\"\n      :level\n      :name=\"key\"\n      :options=\"options\"\n      :description=\"getPropertyDescription(property)\"\n      :schema=\"getPropertySchema(property)\"\n      :schemaContext=\"schemaContext\" />\n  </template>\n\n  <!-- additionalProperties -->\n  <template v-if=\"isTypeObject(schema) && schema.additionalProperties\">\n    <SchemaProperty\n      :breadcrumb\n      :compact\n      :compositionPath=\"compositionPath\"\n      :compositionPathSegment=\"\n        getAdditionalPropertiesName(\n          schema.additionalProperties,\n          schema.propertyNames,\n        )\n      \"\n      :discriminator\n      :eventBus=\"eventBus\"\n      :hideHeading\n      :hideModelNames\n      :level\n      :name=\"\n        getAdditionalPropertiesName(\n          schema.additionalProperties,\n          schema.propertyNames,\n        )\n      \"\n      noncollapsible\n      :options=\"options\"\n      :propertyNamesEnum=\"additionalPropertiesEnum\"\n      :schema=\"getAdditionalPropertiesValue(schema.additionalProperties)\"\n      :schemaContext=\"schemaContext\"\n      variant=\"additionalProperties\" />\n  </template>\n</template>\n","<script lang=\"ts\" setup>\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIcon, ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n  DiscriminatorObject,\n  SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nimport { isEmptySchemaObject } from './helpers/is-empty-schema-object'\nimport { isTypeObject } from './helpers/is-type-object'\nimport SchemaHeading from './SchemaHeading.vue'\nimport SchemaObjectProperties from './SchemaObjectProperties.vue'\nimport SchemaProperty from './SchemaProperty.vue'\n\nconst {\n  schema,\n  level = 0,\n  name,\n  compact,\n  noncollapsible = false,\n  hideHeading,\n  additionalProperties,\n  discriminator,\n  breadcrumb,\n  hideModelNames = false,\n  options,\n  schemaContext,\n  compositionPath,\n} = defineProps<{\n  schema?: SchemaObject\n  /** Track how deep we've gone */\n  level?: number\n  /* Show as a heading */\n  name?: string\n  /** A tighter layout with less borders and without a heading */\n  compact?: boolean\n  /** Shows a toggle to hide/show children */\n  noncollapsible?: boolean\n  /** Hide the heading */\n  hideHeading?: boolean\n  /** Show a special one way toggle for additional properties, also has a top border when open */\n  additionalProperties?: boolean\n  /** Hide model names in type display */\n  hideModelNames?: boolean\n  /** Discriminator object */\n  discriminator?: DiscriminatorObject\n  /** Breadcrumb for the schema */\n  breadcrumb?: string[]\n  /** Event bus emitting actions */\n  eventBus: WorkspaceEventBus | null\n  /** Move the options into a single prop so they are easy to pass around */\n  options: SchemaOptions\n  /** When \"requestBody\", composition dropdown selection is synced with the example snippet */\n  schemaContext?: string\n  /** Internal path used to sync nested request body compositions with the code sample */\n  compositionPath?: string[]\n}>()\n\n/**\n * Determines whether to show the collapse/expand toggle button.\n * We hide the toggle for non-collapsible schemas and root-level schemas.\n */\nconst shouldShowToggle = computed((): boolean => {\n  return !noncollapsible && level > 0\n})\n\n/** Gets the description to show for the schema */\nconst schemaDescription = computed(() => {\n  // For the request body we want to show the base description or the first allOf schema description\n  if (schema?.allOf && schema.allOf.length > 0 && name === 'Request Body') {\n    return schema.description || schema.allOf[0]?.description || null\n  }\n\n  // Don't show description if there's no description or it's not a string\n  if (!schema?.description || typeof schema.description !== 'string') {\n    return null\n  }\n\n  // Don't show description for enum schemas (they have special handling)\n  if (schema.enum) {\n    return null\n  }\n\n  // Will be shown in the properties anyway\n  if (\n    !('properties' in schema) &&\n    !('patternProperties' in schema) &&\n    !('additionalProperties' in schema)\n  ) {\n    return null\n  }\n\n  // Return the schema's own description\n  return schema.description\n})\n\n// Prevent click action if noncollapsible\nconst handleClick = (e: MouseEvent) => noncollapsible && e.stopPropagation()\n</script>\n<template>\n  <Disclosure\n    v-if=\"typeof schema === 'object' && Object.keys(schema).length\"\n    v-slot=\"{ open }\"\n    :defaultOpen=\"noncollapsible\">\n    <div\n      class=\"schema-card\"\n      :class=\"[\n        `schema-card--level-${level}`,\n        { 'schema-card--compact': compact, 'schema-card--open': open },\n        { 'border-t': additionalProperties && open },\n      ]\">\n      <!-- Schema description -->\n      <div\n        v-if=\"schemaDescription\"\n        class=\"schema-card-description\">\n        <ScalarMarkdown :value=\"schemaDescription\" />\n      </div>\n      <div\n        v-if=\"isEmptySchemaObject(schema)\"\n        class=\"pt-2\">\n        Empty object\n      </div>\n      <div\n        class=\"schema-properties\"\n        :class=\"{\n          'schema-properties-open': open,\n        }\">\n        <!-- Toggle to collapse/expand long lists of properties -->\n        <div\n          v-if=\"additionalProperties\"\n          v-show=\"!open\"\n          class=\"schema-properties\">\n          <DisclosureButton\n            as=\"button\"\n            class=\"schema-card-title schema-card-title--compact\"\n            @click.capture=\"handleClick\">\n            <ScalarIcon\n              class=\"schema-card-title-icon\"\n              icon=\"Add\"\n              size=\"sm\" />\n            Show additional properties\n            <ScreenReader v-if=\"name\">for {{ name }}</ScreenReader>\n          </DisclosureButton>\n        </div>\n\n        <DisclosureButton\n          v-else-if=\"shouldShowToggle\"\n          v-show=\"!hideHeading && !(noncollapsible && compact)\"\n          :as=\"noncollapsible ? 'div' : 'button'\"\n          class=\"schema-card-title\"\n          :class=\"{ 'schema-card-title--compact': compact }\"\n          :style=\"{\n            top: `calc(var(--refs-viewport-offset) +  calc(var(--schema-title-height) * ${level}))`,\n          }\"\n          @click.capture=\"handleClick\">\n          <template v-if=\"compact\">\n            <ScalarIcon\n              class=\"schema-card-title-icon\"\n              :class=\"{ 'schema-card-title-icon--open': open }\"\n              icon=\"Add\"\n              size=\"sm\" />\n            <template v-if=\"open\">\n              Hide {{ schema?.title ?? 'Child Attributes' }}\n            </template>\n            <template v-else>\n              Show {{ schema?.title ?? 'Child Attributes' }}\n            </template>\n            <ScreenReader v-if=\"name\">for {{ name }}</ScreenReader>\n          </template>\n          <template v-else>\n            <ScalarIcon\n              class=\"schema-card-title-icon\"\n              :class=\"{ 'schema-card-title-icon--open': open }\"\n              icon=\"Add\"\n              size=\"sm\" />\n            <SchemaHeading\n              :name=\"schema?.title ?? name\"\n              :value=\"schema\" />\n          </template>\n        </DisclosureButton>\n        <DisclosurePanel\n          v-if=\"!additionalProperties || open\"\n          as=\"ul\"\n          :static=\"!shouldShowToggle\">\n          <!-- Object properties -->\n          <SchemaObjectProperties\n            v-if=\"isTypeObject(schema)\"\n            :breadcrumb\n            :compact\n            :compositionPath=\"compositionPath\"\n            :discriminator\n            :eventBus=\"eventBus\"\n            :hideHeading\n            :hideModelNames\n            :level=\"level + 1\"\n            :options\n            :schema\n            :schemaContext=\"schemaContext\" />\n          <!-- Not an object -->\n          <template v-else>\n            <SchemaProperty\n              v-if=\"schema\"\n              :breadcrumb\n              :compact\n              :compositionPath=\"compositionPath\"\n              :eventBus=\"eventBus\"\n              :hideHeading\n              :hideModelNames\n              :level\n              :options\n              :schema\n              :schemaContext=\"schemaContext\" />\n          </template>\n        </DisclosurePanel>\n      </div>\n    </div>\n  </Disclosure>\n</template>\n<style scoped>\n.error {\n  background-color: var(--scalar-color-red);\n}\n.schema-card {\n  font-size: var(--scalar-font-size-4);\n  color: var(--scalar-color-1);\n}\n.schema-card-title {\n  height: var(--schema-title-height);\n\n  padding: 6px 8px;\n\n  display: flex;\n  align-items: center;\n  gap: 4px;\n\n  color: var(--scalar-color-2);\n  font-weight: var(--scalar-semibold);\n  font-size: var(--scalar-mini);\n  border-bottom: var(--scalar-border-width) solid transparent;\n}\nbutton.schema-card-title {\n  cursor: pointer;\n}\nbutton.schema-card-title:hover {\n  color: var(--scalar-color-1);\n}\n.schema-card-title-icon--open {\n  transform: rotate(45deg);\n}\n.schema-properties-open > .schema-card-title {\n  border-bottom-left-radius: 0;\n  border-bottom-right-radius: 0;\n  border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.schema-properties-open > .schema-properties {\n  width: fit-content;\n}\n.schema-card-description {\n  color: var(--scalar-color-2);\n}\n.schema-card-description + .schema-properties {\n  width: fit-content;\n}\n.schema-card-description + .schema-properties {\n  margin-top: 8px;\n}\n.schema-card--level-0:nth-of-type(1)\n  > .schema-card-description:has(+ .schema-properties) {\n  margin-bottom: -8px;\n  padding-bottom: 8px;\n  border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.schema-card--level-0\n  ~ .schema-card--level-0\n  > .schema-card-description:has(+ .schema-properties) {\n  padding-top: 8px;\n}\n\n.schema-properties-open.schema-properties,\n.schema-properties-open > .schema-card--open {\n  width: 100%;\n}\n.schema-properties {\n  display: flex;\n  flex-direction: column;\n\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-radius: var(--scalar-radius-lg);\n  width: fit-content;\n}\n.schema-properties-name {\n  width: 100%;\n}\n.schema-properties .schema-properties {\n  border-radius: 13.5px;\n}\n.schema-properties .schema-properties.schema-properties-open {\n  border-radius: var(--scalar-radius-lg);\n}\n.schema-properties-open {\n  width: 100%;\n}\n.schema-card--compact {\n  align-self: flex-start;\n}\n.schema-card--compact.schema-card--open {\n  align-self: initial;\n}\n.schema-card-title--compact {\n  color: var(--scalar-color-2);\n  padding: 6px 10px 6px 8px;\n  height: auto;\n  border-bottom: none;\n}\n.schema-card-title--compact > .schema-card-title-icon {\n  margin: 0;\n}\n.schema-card-title--compact > .schema-card-title-icon--open {\n  transform: rotate(45deg);\n}\n.schema-properties-open > .schema-card-title--compact {\n  position: static;\n}\n.property--level-0\n  > .schema-properties\n  > .schema-card--level-0\n  > .schema-properties {\n  border: none;\n}\n.property--level-0\n  .schema-card--level-0:not(.schema-card--compact)\n  .property--level-1 {\n  padding: 0 0 8px;\n}\n:not(.composition-panel)\n  > .schema-card--compact.schema-card--level-0\n  > .schema-properties {\n  border: none;\n}\n:deep(.schema-card-description) p {\n  font-size: var(--scalar-small, var(--scalar-paragraph));\n  color: var(--scalar-color-2);\n  line-height: 1.5;\n  margin-bottom: 0;\n  display: block;\n  margin-bottom: 6px;\n}\n.children .schema-card-description:first-of-type {\n  padding-top: 0;\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { ScalarListbox, type ScalarListboxOption } from '@scalar/components'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n  DiscriminatorObject,\n  SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, inject, ref, watch } from 'vue'\n\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport {\n  REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n  type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\n\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { mergeAllOfSchemas } from './helpers/merge-all-of-schemas'\nimport { type CompositionKeyword } from './helpers/schema-composition'\nimport { getModelNameFromSchema } from './helpers/schema-name'\nimport Schema from './Schema.vue'\n\nconst props = withDefaults(\n  defineProps<{\n    /** The composition keyword (oneOf, anyOf, allOf) */\n    composition: CompositionKeyword\n    /** Optional discriminator object for polymorphic schemas */\n    discriminator?: DiscriminatorObject\n    /** Optional name for the schema */\n    name?: string\n    /** The schema value containing the composition */\n    schema: SchemaObject\n    /** Nesting level for proper indentation */\n    level: number\n    /** Whether to use compact layout */\n    compact?: boolean\n    /** Whether to hide the heading */\n    hideHeading?: boolean\n    /** Hide model names in type display */\n    hideModelNames?: boolean\n    /** Breadcrumb for navigation */\n    breadcrumb?: string[]\n    /** Event bus emitting actions */\n    eventBus: WorkspaceEventBus | null\n    /** Move the options into  single prop so they are easy to pass around */\n    options: SchemaOptions\n    /** When \"requestBody\", sync selected index with the example snippet */\n    schemaContext?: string\n    /** Internal path used to sync nested request body compositions with the code sample */\n    compositionPath?: string[]\n  }>(),\n  {\n    compact: false,\n    hideHeading: false,\n  },\n)\n\n/** The current composition */\nconst composition = computed(() =>\n  [props.schema[props.composition]]\n    .flat()\n    .map((schema) => ({ value: resolve.schema(schema), original: schema }))\n    .filter((it) => isDefined(it.value)),\n)\n\n/**\n * Generate listbox options for the composition selector.\n * Each option represents a schema in the composition with a human-readable label.\n * Prefers schema title/name over structural type when present.\n */\nconst listboxOptions = computed((): ScalarListboxOption[] =>\n  composition.value.map((schema, index: number) => {\n    const resolved = resolve.schema(schema.original!)\n    const label =\n      (getModelNameFromSchema(resolved)?.label ?? getSchemaType(resolved)) ||\n      'Schema'\n    return { id: String(index), label }\n  }),\n)\n\nconst compositionSelectionKey = computed(() =>\n  props.compositionPath?.length\n    ? [...props.compositionPath, props.composition].join('.')\n    : '',\n)\n\n/** When this composition is in the request body, sync selection with the example snippet */\nconst requestBodyCompositionSelectionRef = inject(\n  REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n  undefined,\n)\n\nconst initialSelectedIndex = computed(() => {\n  if (\n    props.schemaContext !== 'requestBody' ||\n    !requestBodyCompositionSelectionRef?.value ||\n    !compositionSelectionKey.value\n  ) {\n    return 0\n  }\n\n  const selectedIndex =\n    requestBodyCompositionSelectionRef.value[compositionSelectionKey.value]\n\n  if (typeof selectedIndex !== 'number' || Number.isNaN(selectedIndex)) {\n    return 0\n  }\n\n  return Math.max(0, Math.min(selectedIndex, listboxOptions.value.length - 1))\n})\n\n/**\n * Two-way computed property for the selected option.\n * Handles conversion between the selected index and the listbox option format.\n */\nconst selectedOption = ref<ScalarListboxOption | undefined>()\n\nwatch(\n  [listboxOptions, initialSelectedIndex],\n  ([options, selectedIndex]) => {\n    if (\n      !selectedOption.value ||\n      !options.some((option) => option.id === selectedOption.value?.id)\n    ) {\n      selectedOption.value = options[selectedIndex] ?? options[0]\n    }\n  },\n  { immediate: true },\n)\n\n/**\n * Humanize composition keyword name for display.\n * Converts camelCase to Title Case (e.g., oneOf -> One of).\n */\nconst humanizeType = (type: CompositionKeyword): string =>\n  type\n    .replace(/([A-Z])/g, ' $1')\n    .replace(/^./, (str) => str.toUpperCase())\n    .toLowerCase()\n    .replace(/^(\\w)/, (c) => c.toUpperCase())\n\n/** Inside the currently selected composition */\nconst selectedComposition = computed(\n  () => composition.value[Number(selectedOption.value?.id ?? '0')]?.value,\n)\n\n/** Controls whether the nested schema is displayed */\nconst showNestedSchema = ref(false)\n\nif (\n  requestBodyCompositionSelectionRef &&\n  props.schemaContext === 'requestBody' &&\n  compositionSelectionKey.value\n) {\n  watch(\n    selectedOption,\n    (option) => {\n      const index = option ? Number(option.id) : 0\n      if (!Number.isNaN(index)) {\n        requestBodyCompositionSelectionRef.value = {\n          ...requestBodyCompositionSelectionRef.value,\n          [compositionSelectionKey.value]: index,\n        } satisfies RequestBodyCompositionSelection\n      }\n    },\n    { immediate: true },\n  )\n}\n</script>\n\n<template>\n  <div class=\"property-rule\">\n    <!-- We merge allOf schemas into a single schema -->\n    <Schema\n      v-if=\"props.composition === 'allOf'\"\n      :breadcrumb=\"breadcrumb\"\n      :compact=\"compact\"\n      :compositionPath=\"compositionPath\"\n      :discriminator=\"discriminator\"\n      :eventBus=\"eventBus\"\n      :hideHeading=\"hideHeading\"\n      :hideModelNames\n      :level=\"level + 1\"\n      :name=\"name\"\n      :noncollapsible=\"true\"\n      :options=\"options\"\n      :schema=\"mergeAllOfSchemas(schema)\"\n      :schemaContext=\"schemaContext\" />\n\n    <template v-else>\n      <!-- Composition selector and panel for nested compositions -->\n      <ScalarListbox\n        v-model=\"selectedOption\"\n        :options=\"listboxOptions\"\n        resize>\n        <button\n          class=\"composition-selector bg-b-1.5 hover:bg-b-2 flex w-full cursor-pointer items-center gap-1 rounded-t-lg border px-2.5 py-2.5 pr-3 text-left\"\n          type=\"button\">\n          <span class=\"text-c-2\">{{ humanizeType(props.composition) }}</span>\n          <span\n            class=\"composition-selector-label text-c-1\"\n            :class=\"{\n              'line-through': selectedComposition?.deprecated,\n            }\">\n            {{ selectedOption?.label || 'Schema' }}\n          </span>\n          <div\n            v-if=\"selectedComposition?.deprecated\"\n            class=\"text-red\">\n            deprecated\n          </div>\n          <ScalarIconCaretDown />\n        </button>\n      </ScalarListbox>\n\n      <div class=\"composition-panel\">\n        <!-- Button to toggle nested schema display -->\n        <button\n          v-if=\"!showNestedSchema && level > 2\"\n          class=\"bg-b-1 hover:bg-b-2 text-c-1 flex w-full items-center justify-center gap-2 rounded-b-lg border border-t-0 px-2 py-2 text-sm font-medium transition-colors\"\n          type=\"button\"\n          @click=\"showNestedSchema = true\">\n          Show Schema Details\n          <ScalarIconCaretDown class=\"h-3 w-3\" />\n        </button>\n\n        <!-- Render the selected schema if it has content to display -->\n        <Schema\n          v-else\n          :breadcrumb=\"breadcrumb\"\n          :compact=\"compact\"\n          :compositionPath=\"compositionPath\"\n          :discriminator=\"discriminator\"\n          :eventBus=\"eventBus\"\n          :hideHeading=\"hideHeading\"\n          :hideModelNames\n          :level=\"level + 1\"\n          :name=\"name\"\n          :noncollapsible=\"true\"\n          :options=\"options\"\n          :schema=\"selectedComposition\"\n          :schemaContext=\"schemaContext\" />\n      </div>\n    </template>\n  </div>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarMarkdown, ScalarWrappingText } from '@scalar/components'\n\ndefineProps<{\n  label: string\n  description?: string\n}>()\n</script>\n\n<template>\n  <li class=\"property-enum-value\">\n    <div class=\"property-enum-value-content\">\n      <span class=\"property-enum-value-label\">\n        <ScalarWrappingText\n          :text=\"label\"\n          preset=\"property\" />\n      </span>\n      <span\n        v-if=\"description\"\n        class=\"property-enum-value-description\">\n        <ScalarMarkdown :value=\"description\" />\n      </span>\n    </div>\n  </li>\n</template>\n\n<style scoped>\n.property-enum-value {\n  color: var(--scalar-color-3);\n  line-height: 1.5;\n  overflow-wrap: break-word;\n  display: flex;\n  align-items: stretch;\n  position: relative;\n\n  --decorator-width: 1px;\n  --decorator-color: color-mix(\n    in srgb,\n    var(--scalar-background-1),\n    var(--scalar-color-1) 25%\n  );\n}\n\n.property-enum-value-content {\n  display: flex;\n  flex-direction: column;\n  padding: 3px 0;\n}\n\n.property-enum-value-label {\n  font-family: var(--scalar-font-code);\n  color: var(--scalar-color-1);\n  font-size: var(--scalar-font-size-4);\n  position: relative;\n}\n\n.property-enum-value:last-of-type .property-enum-value-label {\n  padding-bottom: 0;\n}\n\n.property-enum-value::before {\n  content: '';\n  margin-right: 12px;\n  width: var(--decorator-width);\n  display: block;\n  background-color: var(--decorator-color);\n}\n\n.property-enum-value:last-of-type::before,\n.property-enum-values:has(.enum-toggle-button)\n  .property-enum-value:nth-last-child(2)::before {\n  height: calc(0.5lh + 4px);\n}\n\n.property-enum-value-label::after {\n  content: '';\n  position: absolute;\n  top: calc(0.5lh);\n  left: -12px;\n  width: 8px;\n  height: var(--decorator-width);\n  background-color: var(--decorator-color);\n}\n\n.property-enum-value:last-of-type::after {\n  bottom: 0;\n  height: 50%;\n  background: var(--scalar-background-1);\n  border-top: var(--scalar-border-width) solid var(--decorator-color);\n}\n\n.property-enum-value-description {\n  color: var(--scalar-color-3);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { ScalarIconPlus } from '@scalar/icons'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, ref } from 'vue'\n\nimport SchemaEnumPropertyItem from './SchemaEnumPropertyItem.vue'\n\nconst { value } = defineProps<{\n  /** The schema object containing enum values and metadata */\n  value: SchemaObject | undefined\n  /** Whether to display the enum for property names */\n  propertyNames?: boolean\n}>()\n\nconst ENUM_DISPLAY_THRESHOLD = 9\nconst INITIAL_VISIBLE_COUNT = 5\nconst THIN_SPACE = '\\u2009'\n\n/**\n * Extracts enum values from the schema object.\n * Handles both direct enum values and nested enum arrays.\n */\nconst enumValues = computed(() => {\n  if (!value) {\n    return []\n  }\n  return (\n    value.enum ||\n    (isArraySchema(value) && resolve.schema(value.items)?.enum) ||\n    []\n  )\n})\n\n/**\n * Determines if we should show the long enum list UI.\n * When there are many enum values, we initially show only a subset.\n */\nconst shouldUseLongListDisplay = computed(\n  () => enumValues.value.length > ENUM_DISPLAY_THRESHOLD,\n)\n\nconst initialVisibleCount = computed(() =>\n  shouldUseLongListDisplay.value\n    ? INITIAL_VISIBLE_COUNT\n    : enumValues.value.length,\n)\n\nconst visibleEnumValues = computed(() =>\n  enumValues.value.slice(0, initialVisibleCount.value),\n)\n\nconst hiddenEnumValues = computed(() =>\n  enumValues.value.slice(initialVisibleCount.value),\n)\n\n/**\n * Gets the description for an enum value.\n * Supports both array and object formats for x-enumDescriptions.\n */\nconst getEnumValueDescription = (\n  enumValue: any,\n  index: number,\n): string | undefined => {\n  const descriptions =\n    value?.['x-enumDescriptions'] ?? value?.['x-enum-descriptions']\n\n  if (!descriptions) {\n    return undefined\n  }\n\n  if (Array.isArray(descriptions)) {\n    return descriptions[index]\n  }\n\n  if (typeof descriptions === 'object' && descriptions !== null) {\n    return (descriptions as Record<string, string>)[String(enumValue)]\n  }\n\n  return undefined\n}\n\n/**\n * Formats an enum value with its variable name if available.\n * This supports both x-enum-varnames and x-enumNames extensions.\n */\nconst formatEnumValueWithName = (enumValue: any, index: number): string => {\n  const varNames = value?.['x-enum-varnames'] ?? value?.['x-enumNames']\n  const varName = Array.isArray(varNames) ? varNames[index] : undefined\n  return varName\n    ? `${enumValue}${THIN_SPACE}=${THIN_SPACE}${varName}`\n    : String(enumValue)\n}\n\n/**\n * Controls whether the hidden enum values are visible.\n */\nconst isExpanded = ref(false)\n\nconst toggleExpanded = () => {\n  isExpanded.value = !isExpanded.value\n}\n</script>\n\n<template>\n  <div\n    v-if=\"enumValues.length > 0\"\n    class=\"property-enum\">\n    <div\n      v-if=\"propertyNames\"\n      class=\"property-enum-property-names\">\n      property names\n    </div>\n    <div\n      v-else\n      class=\"property-enum-property-names\">\n      values\n    </div>\n    <ul class=\"property-enum-values\">\n      <!-- Visible enum values -->\n      <SchemaEnumPropertyItem\n        v-for=\"(enumValue, index) in visibleEnumValues\"\n        :key=\"String(enumValue)\"\n        :description=\"getEnumValueDescription(enumValue, index)\"\n        :label=\"formatEnumValueWithName(enumValue, index)\" />\n\n      <!-- Hidden enum values (when expanded) -->\n      <template v-if=\"shouldUseLongListDisplay && isExpanded\">\n        <SchemaEnumPropertyItem\n          v-for=\"(enumValue, index) in hiddenEnumValues\"\n          :key=\"String(enumValue)\"\n          :description=\"\n            getEnumValueDescription(enumValue, initialVisibleCount + index)\n          \"\n          :label=\"\n            formatEnumValueWithName(enumValue, initialVisibleCount + index)\n          \" />\n      </template>\n\n      <!-- Toggle button for long lists -->\n      <li v-if=\"shouldUseLongListDisplay\">\n        <ScalarButton\n          class=\"enum-toggle-button my-2 flex h-fit gap-1 rounded-full border py-1.5 pr-2.5 pl-2 leading-none\"\n          variant=\"ghost\"\n          @click=\"toggleExpanded\">\n          <ScalarIconPlus\n            :class=\"{ 'rotate-45': isExpanded }\"\n            weight=\"bold\" />\n          {{ isExpanded ? 'Hide values' : 'Show all values' }}\n        </ScalarButton>\n      </li>\n    </ul>\n  </div>\n</template>\n\n<style scoped>\n.property-heading:empty + .property-description:last-of-type,\n.property-description:first-of-type:last-of-type {\n  margin-top: 0;\n}\n\n.property-list {\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-radius: var(--scalar-radius);\n  margin-top: 10px;\n}\n\n.property-list .property:last-of-type {\n  padding-bottom: 10px;\n}\n\n.property-enum-values {\n  font-size: var(--scalar-font-size-3);\n  list-style: none;\n  margin-top: 8px;\n  padding-left: 2px;\n}\n\n.enum-toggle-button:hover {\n  color: var(--scalar-color-1);\n}\n\n.property-enum-property-names {\n  font-size: var(--scalar-font-size-4);\n  color: var(--scalar-color-2);\n  display: inline-block;\n  padding: 0 2px;\n  margin-top: 8px;\n}\n</style>\n","<template>\n  <button\n    class=\"text-c-3 hover:text-c-1 underline\"\n    type=\"button\">\n    <slot />\n  </button>\n</template>\n","<script setup lang=\"ts\">\n/**\n * Give this component any data, and it tries to render a meaningful string.\n *\n * @example\n * <RenderString :value=\"1\" /> => \"1\"\n * <RenderString :value=\"true\" /> => \"true\"\n * <RenderString :value=\"false\" /> => \"false\"\n * <RenderString :value=\"null\" /> => \"null\"\n * <RenderString :value=\"undefined\" /> => \"undefined\"\n * <RenderString :value=\"{}\" /> => \"{}\"\n * <RenderString :value=\"[]\" /> => \"[]\"\n * <RenderString :value=\"['a', 'b', 'c']\" /> => \"['a', 'b', 'c']\"\n * <RenderString :value=\"() => 'hello'\" /> => \"() => 'hello'\"\n * <RenderString :value=\"Symbol('test')\" /> => \"Symbol(test)\"\n **/\nimport { computed } from 'vue'\n\nconst { value } = defineProps<{\n  value: any\n}>()\n\nconst valueAsString = computed(() => {\n  if (value === '') {\n    return `''`\n  }\n\n  if (value === null) {\n    return 'null'\n  }\n\n  if (value === undefined) {\n    return 'undefined'\n  }\n\n  // We don't need to cover all cases, Vue does a good job of rendering objects, arrays and functions.\n  return value\n})\n</script>\n\n<template>\n  {{ valueAsString }}\n</template>\n","/**\n * Converts a value to a string that can be displayed in the UI.\n */\nexport function formatValue(value: unknown): string | number {\n  if (Array.isArray(value)) {\n    return `[${value\n      .map((item) => {\n        if (typeof item === 'string') {\n          return `\"${item.toString().trim()}\"`\n        }\n\n        if (typeof item === 'object') {\n          return JSON.stringify(item)\n        }\n\n        if (item === undefined) {\n          return 'undefined'\n        }\n\n        if (item === null) {\n          return 'null'\n        }\n\n        return item\n      })\n      .join(', ')}]`\n  }\n\n  if (value === null) {\n    return 'null'\n  }\n\n  if (typeof value === 'object') {\n    return JSON.stringify(value)\n  }\n\n  if (value === undefined) {\n    return 'undefined'\n  }\n\n  if (typeof value === 'string') {\n    return value.trim()\n  }\n\n  return value.toString().trim()\n}\n","<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport { formatValue } from './helpers/format-value'\n\ndefineProps<{\n  value?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n  <template v-if=\"value !== undefined\">\n    <div class=\"property-default\">\n      <button\n        class=\"property-default-label\"\n        type=\"button\">\n        <span>Default</span>\n      </button>\n      <div class=\"property-default-value-list\">\n        <button\n          class=\"property-default-value group\"\n          type=\"button\"\n          @click=\"copyToClipboard(formatValue(value))\">\n          <span>\n            {{ formatValue(value) }}\n          </span>\n          <ScalarIcon\n            class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n            icon=\"Clipboard\"\n            size=\"xs\" />\n        </button>\n      </div>\n    </div>\n  </template>\n</template>\n\n<style scoped>\n.property-default {\n  display: flex;\n  flex-direction: column;\n  font-size: var(--scalar-mini);\n  position: relative;\n}\n.property-default:hover:before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 20px;\n  border-radius: var(--scalar-radius);\n}\n.property-default:hover .property-default-label span {\n  color: var(--scalar-color-1);\n}\n.property-default-label span {\n  color: var(--scalar-color-3);\n  position: relative;\n  border-bottom: var(--scalar-border-width) dotted currentColor;\n}\n.property-default-value {\n  font-family: var(--scalar-font-code);\n  display: flex;\n  gap: 8px;\n  align-items: center;\n  width: 100%;\n  padding: 6px;\n}\n.property-default-value span {\n  display: block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.property-default-value :deep(svg) {\n  color: var(--scalar-color-3);\n}\n\n.property-default-value:hover :deep(svg) {\n  color: var(--scalar-color-1);\n}\n\n.property-default-value {\n  background: var(--scalar-background-2);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-radius: var(--scalar-radius);\n}\n.property-default-value-list {\n  position: absolute;\n  top: 18px;\n  left: 50%;\n  transform: translate3d(-50%, 0, 0);\n  overflow: auto;\n  background-color: var(--scalar-background-1);\n  box-shadow: var(--scalar-shadow-1);\n  border-radius: var(--scalar-radius-lg);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  padding: 9px;\n  min-width: 200px;\n  max-width: 300px;\n  flex-direction: column;\n  gap: 3px;\n  display: none;\n  z-index: 2;\n}\n.property-default:hover .property-default-value-list,\n.property-default:focus-within .property-default-value-list {\n  display: flex;\n}\n</style>\n","<script lang=\"ts\" setup>\ndefineProps<{\n  truncate?: boolean\n  code?: boolean\n}>()\n</script>\n<template>\n  <span\n    class=\"property-detail\"\n    :class=\"{ 'property-detail-truncate': truncate }\">\n    <div\n      v-if=\"$slots.prefix\"\n      class=\"property-detail-prefix\">\n      <slot name=\"prefix\" />&nbsp;\n    </div>\n    <code\n      v-if=\"code\"\n      class=\"property-detail-value\">\n      <slot />\n    </code>\n    <span\n      v-else\n      class=\"property-detail-value\">\n      <slot />\n    </span>\n  </span>\n</template>\n<style scoped>\n.property-detail {\n  display: inline-flex;\n}\n.property-detail + .property-detail:before {\n  display: block;\n  content: '·';\n  margin: 0 0.5ch;\n}\n.property-detail-truncate {\n  overflow: hidden;\n}\n\n.property-detail-truncate > .property-detail-value {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.property-detail-prefix {\n  color: var(--scalar-color-2);\n}\n\ncode.property-detail-value {\n  font-family: var(--scalar-font-code);\n  font-size: var(--scalar-font-size-3);\n  color: var(--scalar-color-2);\n  background: color-mix(\n    in srgb,\n    var(--scalar-background-2),\n    var(--scalar-background-1)\n  );\n  padding: 0 4px;\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-radius: var(--scalar-radius);\n}\n</style>\n","/**\n * Converts an example value to a string that can be displayed in the UI.\n */\nexport function formatExample(example: unknown): string | number {\n  if (Array.isArray(example)) {\n    return `[${example\n      .map((item) => {\n        if (typeof item === 'string') {\n          return `\"${item.toString().trim()}\"`\n        }\n\n        if (typeof item === 'object') {\n          return JSON.stringify(item)\n        }\n\n        if (item === undefined) {\n          return 'undefined'\n        }\n\n        if (item === null) {\n          return 'null'\n        }\n\n        return item\n      })\n      .join(', ')}]`\n  }\n\n  if (example === null) {\n    return 'null'\n  }\n\n  if (typeof example === 'object') {\n    if ('value' in example) {\n      return example.value as string | number\n    }\n\n    if ('externalValue' in example) {\n      return example.externalValue as string | number\n    }\n\n    return JSON.stringify(example)\n  }\n\n  if (example === undefined) {\n    return 'undefined'\n  }\n\n  if (typeof example === 'string') {\n    return example.trim()\n  }\n\n  return example.toString().trim()\n}\n","<script setup lang=\"ts\">\nimport { ScalarIcon } from '@scalar/components'\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { computed } from 'vue'\n\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\n\nimport { formatExample } from './helpers/format-example'\n\nconst { examples, example } = defineProps<{\n  examples?: unknown\n  example?: unknown\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\nconst hasSingleExample = computed(() => isDefined(example))\n\nconst normalizedExamples = computed<Record<string, unknown>>(() => {\n  if (examples && typeof examples === 'object') {\n    return examples as Record<string, unknown>\n  }\n\n  return {}\n})\n\nconst hasMultipleExamples = computed(\n  () => Object.keys(normalizedExamples.value).length > 0,\n)\n\nconst multipleExamplesLabel = computed(() =>\n  Object.keys(normalizedExamples.value).length === 1 ? 'Example' : 'Examples',\n)\n</script>\n<template>\n  <!-- single example (deprecated) -->\n  <template v-if=\"hasSingleExample\">\n    <div class=\"property-example\">\n      <LinkButton class=\"decoration-dotted\">Example</LinkButton>\n      <div class=\"property-example-value-list\">\n        <button\n          class=\"property-example-value group\"\n          type=\"button\"\n          @click=\"copyToClipboard(formatExample(example))\">\n          <span>\n            {{ formatExample(example) }}\n          </span>\n          <ScalarIcon\n            class=\"group-hover:text-c-1 text-c-3 ml-auto min-h-3 min-w-3\"\n            icon=\"Clipboard\"\n            size=\"xs\" />\n        </button>\n      </div>\n    </div>\n  </template>\n\n  <!-- multiple examples -->\n  <template v-if=\"hasMultipleExamples\">\n    <div class=\"property-example\">\n      <LinkButton class=\"decoration-dotted\">\n        {{ multipleExamplesLabel }}\n      </LinkButton>\n      <div class=\"property-example-value-list\">\n        <button\n          v-for=\"(ex, key) in normalizedExamples\"\n          :key=\"key\"\n          class=\"property-example-value group\"\n          type=\"button\"\n          @click=\"copyToClipboard(formatExample(ex))\">\n          <span>{{ formatExample(ex) }} </span>\n          <ScalarIcon\n            class=\"text-c-3 group-hover:text-c-1 ml-auto min-h-3 min-w-3\"\n            icon=\"Clipboard\"\n            size=\"xs\" />\n        </button>\n      </div>\n    </div>\n  </template>\n</template>\n\n<style scoped>\n@reference \"../../../style.css\";\n\n.property-example {\n  display: flex;\n  flex-direction: column;\n  font-size: var(--scalar-mini);\n  position: relative;\n}\n.property-example:hover:before {\n  content: '';\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 20px;\n  border-radius: var(--scalar-radius);\n}\n.property-example-value {\n  font-family: var(--scalar-font-code);\n  display: flex;\n  gap: 8px;\n  align-items: center;\n  width: 100%;\n  padding: 6px;\n}\n.property-example-value span {\n  display: block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.property-example-value :deep(svg) {\n  color: var(--scalar-color-3);\n}\n\n.property-example-value:hover :deep(svg) {\n  color: var(--scalar-color-1);\n}\n\n.property-example-value {\n  background: var(--scalar-background-2);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-radius: var(--scalar-radius);\n}\n.property-example-value-list {\n  position: absolute;\n  top: 18px;\n  left: 50%;\n  transform: translate3d(-50%, 0, 0);\n  overflow: auto;\n  background-color: var(--scalar-background-1);\n  box-shadow: var(--scalar-shadow-1);\n  border-radius: var(--scalar-radius-lg);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  padding: 9px;\n  min-width: 200px;\n  max-width: 300px;\n  flex-direction: column;\n  gap: 3px;\n  display: none;\n  @apply z-context;\n}\n.property-example:hover .property-example-value-list,\n.property-example:focus-within .property-example-value-list {\n  display: flex;\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { isDefined } from '@scalar/helpers/array/is-defined'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport {\n  isArraySchema,\n  isNumberSchema,\n  isStringSchema,\n} from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, toRef } from 'vue'\n\nimport { Badge } from '@/components/Badge'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nimport { getSchemaType } from './helpers/get-schema-type'\nimport { getModelNameFromSchema } from './helpers/schema-name'\nimport RenderString from './RenderString.vue'\nimport SchemaPropertyDefault from './SchemaPropertyDefault.vue'\nimport SchemaPropertyDetail from './SchemaPropertyDetail.vue'\nimport SchemaPropertyExamples from './SchemaPropertyExamples.vue'\n\nconst props = withDefaults(\n  defineProps<{\n    value: SchemaObject | undefined\n    enum?: boolean\n    isDiscriminator?: boolean\n    required?: boolean\n    additional?: boolean\n    withExamples?: boolean\n    hideModelNames?: boolean\n    /** When the schema was resolved from a $ref, pass the ref name so it displays as e.g. \"Data\" instead of \"object\". */\n    modelName?: string | null\n    eventBus?: WorkspaceEventBus | null\n  }>(),\n  {\n    isDiscriminator: false,\n    required: false,\n    withExamples: true,\n    hideModelNames: false,\n    eventBus: null,\n  },\n)\n\n// Convert to reactive refs for composables\nconst valueRef = toRef(props, 'value')\n\nconst constValue = computed(() => {\n  if (!valueRef.value) {\n    return undefined\n  }\n\n  const schema = valueRef.value\n\n  // Direct const value\n  if (schema.const !== undefined) {\n    return schema.const\n  }\n\n  // Single-item enum acts as const\n  if (schema.enum?.length === 1) {\n    return schema.enum[0]\n  }\n\n  // Check items for const values (for arrays)\n  if (isArraySchema(schema) && schema.items) {\n    const items = resolve.schema(schema.items)\n\n    if (isDefined(items.const)) {\n      return items.const\n    }\n\n    if (items.enum?.length === 1) {\n      return items.enum[0]\n    }\n  }\n\n  return undefined\n})\n\nconst validationProperties = computed(() => {\n  if (!valueRef.value) {\n    return []\n  }\n\n  const schema = valueRef.value\n  const properties = []\n\n  // Array validation properties\n  if (isArraySchema(schema)) {\n    if (schema.minItems || schema.maxItems) {\n      properties.push({\n        key: 'array-range',\n        value: `${schema.minItems || ''}…${schema.maxItems || ''}`,\n      })\n    }\n\n    // Unique items\n    if (schema.uniqueItems) {\n      properties.push({\n        key: 'unique-items',\n        value: 'unique!',\n      })\n    }\n  }\n\n  // String length properties\n  if (isStringSchema(schema)) {\n    if (schema.minLength) {\n      properties.push({\n        key: 'min-length',\n        prefix: 'min length: ',\n        value: schema.minLength,\n      })\n    }\n\n    if (schema.maxLength) {\n      properties.push({\n        key: 'max-length',\n        prefix: 'max length: ',\n        value: schema.maxLength,\n      })\n    }\n\n    // Pattern\n    if (schema.pattern) {\n      properties.push({\n        key: 'pattern',\n        value: schema.pattern,\n        code: true,\n        truncate: true,\n      })\n    }\n  }\n\n  // Format\n  if (isStringSchema(schema) || isNumberSchema(schema)) {\n    if (schema.format) {\n      properties.push({\n        key: 'format',\n        value: schema.format,\n        truncate: true,\n      })\n    }\n  }\n\n  // Numeric validation properties\n  if (isNumberSchema(schema)) {\n    if (isDefined(schema.exclusiveMinimum)) {\n      properties.push({\n        key: 'exclusive-minimum',\n        prefix: 'greater than: ',\n        value: schema.exclusiveMinimum,\n      })\n    }\n\n    if (isDefined(schema.minimum)) {\n      properties.push({\n        key: 'minimum',\n        prefix: 'min: ',\n        value: schema.minimum,\n      })\n    }\n\n    if (isDefined(schema.exclusiveMaximum)) {\n      properties.push({\n        key: 'exclusive-maximum',\n        prefix: 'less than: ',\n        value: schema.exclusiveMaximum,\n      })\n    }\n\n    if (isDefined(schema.maximum)) {\n      properties.push({\n        key: 'maximum',\n        prefix: 'max: ',\n        value: schema.maximum,\n      })\n    }\n\n    if (isDefined(schema.multipleOf)) {\n      properties.push({\n        key: 'multiple-of',\n        prefix: 'multiple of: ',\n        value: schema.multipleOf,\n      })\n    }\n  }\n\n  return properties\n})\n\n/** Link data for navigating to the referenced model in the sidebar. */\nconst modelLink = computed(() => {\n  if (!props.value) {\n    return null\n  }\n\n  if (props.hideModelNames) {\n    return null\n  }\n\n  if (props.modelName) {\n    return { schemaKey: props.modelName, label: props.modelName }\n  }\n\n  const modelName = getModelNameFromSchema(props.value)\n  if (modelName) {\n    return { schemaKey: modelName.schemaKey, label: modelName.label }\n  }\n\n  if (isArraySchema(props.value) && props.value.items) {\n    const itemName = getModelNameFromSchema(props.value.items)\n    return itemName\n      ? { schemaKey: itemName.schemaKey, label: `${itemName.label}[]` }\n      : null\n  }\n\n  return null\n})\n\n/** Check if we should show the type information */\nconst shouldShowType = computed(() => {\n  if (!props.value || !('type' in props.value)) {\n    return false\n  }\n\n  // Always show type for arrays, even when items have const values\n  if (props.value.type === 'array') {\n    return true\n  }\n\n  // For non-arrays, only show if no const value at the schema level\n  return !constValue.value\n})\n\n/** Get the display type */\nconst displayType = computed(() => {\n  if (!props.value) {\n    return ''\n  }\n  return getSchemaType(props.value)\n})\n\nconst exampleValue = computed(() => {\n  if (isDefined(props.value?.example)) {\n    return props.value.example\n  }\n\n  if (props.value && isArraySchema(props.value)) {\n    const itemsExample = resolve.schema(props.value.items)?.example\n    return isDefined(itemsExample) ? itemsExample : undefined\n  }\n\n  return undefined\n})\n</script>\n<template>\n  <div class=\"property-heading\">\n    <div\n      v-if=\"$slots.name\"\n      class=\"property-name\"\n      :class=\"{ deprecated: props.value?.deprecated }\">\n      <slot name=\"name\" />\n    </div>\n    <div\n      v-if=\"props.isDiscriminator\"\n      class=\"property-discriminator\">\n      Discriminator\n    </div>\n    <template v-if=\"props.value\">\n      <!-- Type information -->\n      <SchemaPropertyDetail\n        v-if=\"shouldShowType\"\n        truncate>\n        <ScreenReader>Type: </ScreenReader>{{ displayType\n        }}<template v-if=\"modelLink\">\n          ·\n          <LinkButton\n            v-if=\"props.eventBus && modelLink.schemaKey\"\n            @click=\"\n              props.eventBus.emit('scroll-to:model-by-name', {\n                name: modelLink.schemaKey,\n              })\n            \">\n            {{ modelLink.label }}\n          </LinkButton>\n          <template v-else>{{ modelLink.label }}</template>\n        </template>\n      </SchemaPropertyDetail>\n\n      <!-- Dynamic validation properties from composable -->\n      <SchemaPropertyDetail\n        v-for=\"property in validationProperties\"\n        :key=\"property.key\"\n        :code=\"property.code\"\n        :truncate=\"property.truncate\">\n        <ScreenReader v-if=\"property.key === 'format'\">Format:</ScreenReader>\n        <ScreenReader v-else-if=\"property.key === 'pattern'\">\n          Pattern:\n        </ScreenReader>\n        <template\n          v-if=\"property.prefix\"\n          #prefix>\n          {{ property.prefix }}\n        </template>\n        {{ property.value }}\n      </SchemaPropertyDetail>\n\n      <!-- Enum indicator -->\n      <SchemaPropertyDetail v-if=\"props.enum\">enum</SchemaPropertyDetail>\n    </template>\n    <div\n      v-if=\"props.additional\"\n      class=\"property-additional\">\n      <template v-if=\"props.value?.['x-additionalPropertiesName']\">\n        {{ props.value['x-additionalPropertiesName'] }}\n      </template>\n      <template v-else>additional properties</template>\n    </div>\n    <div\n      v-if=\"props.value?.deprecated\"\n      class=\"property-deprecated\">\n      <Badge>deprecated</Badge>\n    </div>\n    <!-- Don't use `isDefined` here, we want to show `const` when the value is `null` -->\n    <div\n      v-if=\"constValue !== undefined\"\n      class=\"property-const\">\n      <SchemaPropertyDetail truncate>\n        <template #prefix>const: </template>\n        <RenderString :value=\"constValue\" />\n      </SchemaPropertyDetail>\n    </div>\n    <template v-else>\n      <!-- Shows only when a composition is used (so props.value?.type is undefined) -->\n      <SchemaPropertyDetail v-if=\"(props.value as any)?.nullable === true\">\n        nullable\n      </SchemaPropertyDetail>\n    </template>\n    <div\n      v-if=\"props.value?.writeOnly\"\n      class=\"property-write-only\">\n      write-only\n    </div>\n    <div\n      v-else-if=\"props.value?.readOnly\"\n      class=\"property-read-only\">\n      read-only\n    </div>\n    <div\n      v-if=\"props.required\"\n      class=\"property-required\">\n      required\n    </div>\n    <SchemaPropertyDefault :value=\"props.value?.default\" />\n    <SchemaPropertyExamples\n      v-if=\"props.withExamples\"\n      :example=\"exampleValue\"\n      :examples=\"props.value?.examples\" />\n  </div>\n</template>\n<style scoped>\n.property-heading {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: baseline;\n  row-gap: 9px;\n  white-space: nowrap;\n}\n\n.property-heading:has(+ .children),\n.property-heading:has(+ .property-rule) {\n  margin-bottom: 9px;\n}\n\n.property-heading > * {\n  margin-right: 9px;\n}\n\n.property-heading:last-child {\n  margin-right: 0;\n}\n\n.property-heading > .property-detail:not(:last-of-type) {\n  margin-right: 0;\n}\n\n.property-name {\n  max-width: 100%;\n  font-family: var(--scalar-font-code);\n  font-weight: var(--scalar-bold);\n  font-size: var(--scalar-font-size-4);\n  white-space: normal;\n  overflow-wrap: break-word;\n}\n\n.property-additional {\n  font-family: var(--scalar-font-code);\n}\n\n.property-required,\n.property-optional {\n  color: var(--scalar-color-2);\n}\n\n.property-required {\n  font-size: var(--scalar-mini);\n  color: var(--scalar-color-orange);\n}\n\n.property-read-only {\n  font-size: var(--scalar-mini);\n  color: var(--scalar-color-blue);\n}\n\n.property-write-only {\n  font-size: var(--scalar-mini);\n  color: var(--scalar-color-green);\n}\n\n.property-discriminator {\n  font-size: var(--scalar-mini);\n  color: var(--scalar-color-purple);\n}\n\n.property-detail {\n  font-size: var(--scalar-mini);\n  color: var(--scalar-color-2);\n  display: flex;\n  align-items: center;\n\n  min-width: 0;\n}\n\n.property-const {\n  color: var(--scalar-color-1);\n}\n\n.deprecated {\n  text-decoration: line-through;\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { ScalarMarkdown, ScalarWrappingText } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type {\n  DiscriminatorObject,\n  SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\nimport { computed, type Component } from 'vue'\n\nimport { WithBreadcrumb } from '@/components/Anchor'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport type { SchemaOptions } from '@/components/Content/Schema/types'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nimport { getCompositionsToRender } from './helpers/get-compositions-to-render'\nimport { getEnumValues } from './helpers/get-enum-values'\nimport { getPropertyDescription } from './helpers/get-property-description'\nimport { hasComplexArrayItems } from './helpers/has-complex-array-items'\nimport { optimizeValueForDisplay } from './helpers/optimize-value-for-display'\nimport { shouldDisplayDescription } from './helpers/should-display-description'\nimport { shouldDisplayHeading } from './helpers/should-display-heading'\nimport Schema from './Schema.vue'\nimport SchemaComposition from './SchemaComposition.vue'\nimport SchemaEnums from './SchemaEnums.vue'\nimport SchemaPropertyHeading from './SchemaPropertyHeading.vue'\n\n/**\n * Note: We're taking in a prop called `value` which should be a JSON Schema.\n *\n * We're using `optimizeValueForDisplay` to merge null types in compositions (anyOf, allOf, oneOf, not).\n * So you should basically use the optimizedValue everywhere in the component.\n */\n\nconst props = withDefaults(\n  defineProps<{\n    is?: string | Component\n    schema: SchemaObject | undefined\n    noncollapsible?: boolean\n    level?: number\n    name?: string\n    required?: boolean\n    compact?: boolean\n    discriminator?: DiscriminatorObject\n    description?: string\n    hideModelNames?: boolean\n    hideHeading?: boolean\n    /** When the root schema was resolved from a $ref, pass the ref name for display (e.g. \"Data\"). */\n    modelName?: string | null\n    variant?: 'additionalProperties' | 'patternProperties'\n    breadcrumb?: string[]\n    eventBus: WorkspaceEventBus | null\n    options: SchemaOptions\n    /** Enum values for property names (from JSON Schema propertyNames keyword). */\n    propertyNamesEnum?: string[]\n    /** When \"requestBody\", composition selection is synced with the example snippet */\n    schemaContext?: string\n    /** Internal path used to sync nested request body compositions with the code sample */\n    compositionPath?: string[]\n    /** Internal path segment for this property when building nested composition keys */\n    compositionPathSegment?: string\n  }>(),\n  {\n    level: 0,\n    required: false,\n    compact: false,\n    hideModelNames: false,\n  },\n)\n\n/** Simplified composition with `null` type. */\nconst optimizedValue = computed(() => optimizeValueForDisplay(props.schema))\n\nconst childBreadcrumb = computed<string[] | undefined>(() =>\n  props.breadcrumb && props.name\n    ? [...props.breadcrumb, props.name]\n    : undefined,\n)\n\nconst currentCompositionPath = computed<string[]>(() =>\n  props.compositionPathSegment\n    ? [...(props.compositionPath ?? []), props.compositionPathSegment]\n    : (props.compositionPath ?? []),\n)\n\nconst arrayItemsCompositionPath = computed<string[]>(() => [\n  ...currentCompositionPath.value,\n  'items',\n])\n\nconst shouldHaveLink = computed(() => props.level <= 2)\n\n/** Checks if array items have complex structure */\nconst hasComplexArrayItemsComputed = computed(() =>\n  hasComplexArrayItems(optimizedValue.value),\n)\n\n/** Check if enum should be displayed (from value schema or from propertyNames) */\nconst hasEnum = computed(() => enumValues.value.length > 0)\n\n/** Determine if object properties should be displayed */\nconst shouldRenderObjectProperties = computed(() => {\n  const value = optimizedValue.value\n  if (!value) {\n    return false\n  }\n\n  return (\n    isTypeObject(value) &&\n    ('properties' in value || 'additionalProperties' in value)\n  )\n})\n\n/** Determine if array of objects should be rendered */\nconst shouldRenderArrayOfObjects = computed(() => {\n  const value = optimizedValue.value\n  if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n    return false\n  }\n\n  return hasComplexArrayItemsComputed.value\n})\n\n/** Extract enum values from schema or array items */\nconst enumValues = computed(() => getEnumValues(optimizedValue.value))\n\n/** Generate property description from type/format */\nconst propertyDescription = computed(() =>\n  getPropertyDescription(optimizedValue.value),\n)\n\n/** Determine if description should be displayed */\nconst displayDescription = computed(() =>\n  shouldDisplayDescription(optimizedValue.value, props.description),\n)\n\n/**\n * When the property already renders the description, avoid repeating it in the nested object schema card.\n */\nconst objectSchemaForChildren = computed(() => {\n  const value = optimizedValue.value\n  if (!value || !displayDescription.value || !('description' in value)) {\n    return value\n  }\n\n  const { description: _description, ...schemaWithoutDescription } = value\n  return schemaWithoutDescription as SchemaObject\n})\n\n/** Determine if property heading should be displayed */\nconst shouldDisplayHeadingComputed = computed(() =>\n  shouldDisplayHeading(optimizedValue.value, props.name, props.required),\n)\n\n/** Computes which compositions should be rendered and with which values */\nconst compositionsToRender = computed(() =>\n  getCompositionsToRender(optimizedValue.value),\n)\n\n/** Get resolved array items for rendering */\nconst resolvedArrayItems = computed(() => {\n  const value = optimizedValue.value\n  if (!value || !isArraySchema(value) || typeof value.items !== 'object') {\n    return undefined\n  }\n  return resolve.schema(value.items)\n})\n\n/** Check if discriminator matches current property */\nconst isDiscriminatorProperty = computed(() =>\n  Boolean(props.name && props.discriminator?.propertyName === props.name),\n)\n</script>\n<template>\n  <component\n    :is=\"is ?? 'li'\"\n    class=\"property\"\n    :class=\"[\n      `property--level-${level}`,\n      {\n        'property--compact': compact,\n        'property--deprecated': optimizedValue?.deprecated,\n      },\n    ]\">\n    <SchemaPropertyHeading\n      v-if=\"shouldDisplayHeadingComputed\"\n      class=\"group\"\n      :enum=\"hasEnum\"\n      :eventBus=\"eventBus\"\n      :hideModelNames\n      :isDiscriminator=\"isDiscriminatorProperty\"\n      :modelName=\"modelName\"\n      :required\n      :value=\"optimizedValue\">\n      <template\n        v-if=\"name\"\n        #name>\n        <WithBreadcrumb\n          :breadcrumb=\"shouldHaveLink ? childBreadcrumb : undefined\"\n          :eventBus=\"eventBus\">\n          <span\n            v-if=\"variant === 'patternProperties'\"\n            class=\"property-name-pattern-properties\">\n            <ScalarWrappingText\n              preset=\"property\"\n              :text=\"name\" />\n          </span>\n          <span\n            v-else-if=\"variant === 'additionalProperties'\"\n            class=\"property-name-additional-properties\">\n            <ScalarWrappingText\n              preset=\"property\"\n              :text=\"name\" />\n          </span>\n          <ScalarWrappingText\n            v-else\n            preset=\"property\"\n            :text=\"name\" />\n        </WithBreadcrumb>\n      </template>\n      <template\n        v-if=\"optimizedValue?.example !== undefined\"\n        #example>\n        Example:\n        {{ optimizedValue.example }}\n      </template>\n    </SchemaPropertyHeading>\n\n    <!-- Description -->\n    <div\n      v-if=\"displayDescription || propertyDescription\"\n      class=\"property-description\">\n      <ScalarMarkdown\n        :value=\"displayDescription || propertyDescription || ''\" />\n    </div>\n\n    <!-- Enum for property names -->\n    <SchemaEnums\n      v-if=\"propertyNamesEnum && propertyNamesEnum.length > 0\"\n      propertyNames\n      :value=\"{ enum: propertyNamesEnum } as SchemaObject\" />\n\n    <!-- Enum values -->\n    <SchemaEnums\n      v-if=\"enumValues.length > 0\"\n      :value=\"optimizedValue\" />\n\n    <!-- Object -->\n    <div\n      v-if=\"shouldRenderObjectProperties\"\n      class=\"children\">\n      <Schema\n        :breadcrumb=\"childBreadcrumb\"\n        :compact=\"compact\"\n        :compositionPath=\"currentCompositionPath\"\n        :eventBus=\"eventBus\"\n        :hideModelNames\n        :level=\"level + 1\"\n        :name=\"name\"\n        :noncollapsible=\"noncollapsible\"\n        :options=\"options\"\n        :schema=\"objectSchemaForChildren\"\n        :schemaContext=\"schemaContext\" />\n    </div>\n\n    <!-- Array of objects or nested arrays -->\n    <div\n      v-if=\"shouldRenderArrayOfObjects && resolvedArrayItems\"\n      class=\"children\">\n      <Schema\n        :compact=\"compact\"\n        :compositionPath=\"arrayItemsCompositionPath\"\n        :eventBus=\"eventBus\"\n        :hideModelNames\n        :level=\"level + 1\"\n        :name=\"name\"\n        :noncollapsible=\"noncollapsible\"\n        :options=\"options\"\n        :schema=\"resolve.schema(resolvedArrayItems)\"\n        :schemaContext=\"schemaContext\" />\n    </div>\n\n    <!-- Compositions -->\n    <SchemaComposition\n      v-for=\"compositionData in compositionsToRender\"\n      :key=\"compositionData.composition\"\n      :breadcrumb=\"breadcrumb\"\n      :compact=\"compact\"\n      :composition=\"compositionData.composition\"\n      :compositionPath=\"currentCompositionPath\"\n      :discriminator=\"schema?.discriminator\"\n      :eventBus=\"eventBus\"\n      :hideHeading=\"hideHeading\"\n      :hideModelNames\n      :level=\"level\"\n      :name=\"name\"\n      :noncollapsible=\"noncollapsible\"\n      :options=\"options\"\n      :schema=\"compositionData.value\"\n      :schemaContext=\"schemaContext\" />\n    <SpecificationExtension :value=\"optimizedValue\" />\n  </component>\n</template>\n\n<style scoped>\n.property {\n  color: var(--scalar-color-1);\n  display: flex;\n  flex-direction: column;\n  padding: 10px;\n  font-size: var(--scalar-small);\n  position: relative;\n}\n\n/** Remove top padding for top level schema card */\n.property.property--level-0:has(\n    > .property-rule\n      > .schema-card\n      > .schema-properties.schema-properties-open\n      > ul\n      > li.property\n  ) {\n  padding-top: 0;\n}\n\n.property--compact.property--level-0,\n.property--compact.property--level-1 {\n  padding: 10px 0;\n}\n\n.composition-panel .property.property.property.property--level-0 {\n  padding: 0px;\n}\n\n.property--compact.property--level-0\n  .composition-panel\n  .property--compact.property--level-1 {\n  padding: 8px;\n}\n\n/*  if a property doesn't have a heading, remove the top padding */\n.property:has(> .property-rule:nth-of-type(1)):not(.property--compact) {\n  padding-top: 8px;\n  padding-bottom: 8px;\n}\n\n.property--deprecated {\n  background: repeating-linear-gradient(\n    -45deg,\n    var(--scalar-background-2) 0,\n    var(--scalar-background-2) 2px,\n    transparent 2px,\n    transparent 5px\n  );\n  background-size: 100%;\n}\n\n.property--deprecated > * {\n  opacity: 0.75;\n}\n\n.property-description {\n  margin-top: 6px;\n  line-height: 1.4;\n  font-size: var(--scalar-small);\n}\n\n.property-description:has(+ .property-rule) {\n  margin-bottom: 9px;\n}\n\n:deep(.property-description) * {\n  color: var(--scalar-color-2) !important;\n}\n\n.property:not(:last-of-type) {\n  border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-description + .children,\n.children + .property-rule {\n  margin-top: 9px;\n}\n\n.children {\n  display: flex;\n  flex-direction: column;\n}\n\n.children .property--compact.property--level-1 {\n  padding: 12px;\n}\n\n.property-example-value {\n  all: unset;\n  font-family: var(--scalar-font-code);\n  padding: 6px;\n  border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.property-rule {\n  border-radius: var(--scalar-radius-lg);\n  display: flex;\n  flex-direction: column;\n}\n\n.property--level-2 :deep(.relative > button) {\n  left: -2rem;\n}\n\n.property-rule\n  :deep(\n    .composition-panel\n      .schema-card--level-1\n      > .schema-properties.schema-properties-open\n  ) {\n  border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n\n.property-rule\n  :deep(.composition-panel > .schema-card > .schema-card-description) {\n  padding: 10px;\n  border-left: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-right: var(--scalar-border-width) solid var(--scalar-border-color);\n\n  & + .schema-properties {\n    margin-top: 0;\n  }\n}\n\n.property-example {\n  background: transparent;\n  border: none;\n  display: flex;\n  flex-direction: row;\n  gap: 8px;\n}\n\n.property-example-label,\n.property-example-value {\n  padding: 3px 0 0 0;\n}\n\n.property-example-value {\n  background: var(--scalar-background-2);\n  border-top: 0;\n  border-radius: var(--scalar-radius);\n  padding: 3px 4px;\n}\n\n.property-name {\n  font-family: var(--scalar-font-code);\n  font-weight: var(--scalar-semibold);\n}\n\n.property-name-additional-properties::before,\n.property-name-pattern-properties::before {\n  text-transform: uppercase;\n  font-size: var(--scalar-micro);\n  display: inline-block;\n  padding: 2px 4px;\n  border-radius: var(--scalar-radius);\n  color: var(--scalar-color-1);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  background-color: var(--scalar-background-2);\n  margin-right: 4px;\n}\n\n.property-name-pattern-properties::before {\n  content: 'regex';\n}\n\n.property-name-additional-properties,\n.property-name-pattern-properties {\n  border: 1px dashed var(--scalar-border-color);\n  color: var(--scalar-color-accent);\n  display: inline-block;\n  padding: 2px;\n  border-radius: var(--scalar-radius);\n}\n</style>\n","import { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { compositions } from './schema-composition'\n\n/**\n * Optimize the value by removing nulls from compositions and merging root properties.\n *\n * TODO: figure out what this does\n */\nexport function optimizeValueForDisplay(value: SchemaObject | undefined): SchemaObject | undefined {\n  if (!value || typeof value !== 'object') {\n    return value\n  }\n\n  // Find the composition keyword early to avoid unnecessary work\n  const composition = compositions.find((keyword) => keyword in value && keyword !== 'not')\n\n  // If there's no relevant composition keyword, return a shallow copy\n  if (!composition) {\n    return { ...value }\n  }\n\n  const schemas = value[composition]\n  if (!Array.isArray(schemas)) {\n    return { ...value }\n  }\n\n  // Extract root properties efficiently (excluding composition and nullable)\n  const { [composition]: _, nullable: originalNullable, ...rootProperties } = value as any\n  const hasRootProperties = Object.keys(rootProperties).length > 0\n\n  // Check for null schemas and filter them out in one pass\n  const { filteredSchemas, hasNullSchema } = schemas.reduce(\n    (acc, _schema) => {\n      const schema = resolve.schema(_schema)\n\n      if ('type' in schema && schema.type === 'null') {\n        acc.hasNullSchema = true\n      } else {\n        acc.filteredSchemas.push(schema)\n      }\n      return acc\n    },\n    { filteredSchemas: [] as SchemaObject[], hasNullSchema: false },\n  )\n\n  // Determine if nullable should be set\n  const shouldBeNullable = hasNullSchema || originalNullable === true\n\n  // If only one schema remains after filtering, merge with root properties\n  if (filteredSchemas.length === 1) {\n    const mergedSchema = { ...rootProperties, ...filteredSchemas[0] }\n    if (shouldBeNullable) {\n      mergedSchema.nullable = true\n    }\n    return mergedSchema\n  }\n\n  // Check if root properties should be merged into schemas\n  const shouldMergeRootProperties =\n    (composition === 'oneOf' || composition === 'anyOf') &&\n    (hasRootProperties || filteredSchemas.some((schema) => schema.allOf))\n\n  if (shouldMergeRootProperties) {\n    const mergedSchemas = filteredSchemas.map((_schema) => {\n      const schema = resolve.schema(_schema)\n\n      // Flatten single-item allOf and merge with root properties\n      if (schema.allOf?.length === 1) {\n        const { allOf, ...otherProps } = schema\n        return { ...rootProperties, ...otherProps, ...resolve.schema(allOf[0]) }\n      }\n      return { ...rootProperties, ...schema }\n    })\n\n    // @ts-expect-error - We avoid using coerceValue here as it may be dangerous, so we type cast\n    const result = { [composition]: mergedSchemas } as SchemaObject\n    if (typeof value.description === 'string') {\n      result.description = value.description\n    }\n    if (shouldBeNullable) {\n      // @ts-expect-error We use nullable\n      result.nullable = true\n    }\n    return result\n  }\n\n  // Return with filtered schemas if any nulls were removed\n  if (filteredSchemas.length !== schemas.length) {\n    const result: SchemaObject = { ...value, [composition]: filteredSchemas }\n    if (shouldBeNullable) {\n      // @ts-expect-error We use nullable\n      result.nullable = true\n    }\n    return result\n  }\n\n  return { ...value }\n}\n","import { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isArraySchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\n/**\n * Extract enum values from schema or array items\n *\n * @param value - The schema object to extract enum values from\n * @returns Array of enum values, or empty array if no enum found\n */\nexport const getEnumValues = (value: SchemaObject | undefined): unknown[] => {\n  if (!value) {\n    return []\n  }\n\n  // Check for enum directly on the schema\n  if (value.enum) {\n    return value.enum\n  }\n\n  // Check for enum in array items (resolving $ref if present)\n  if (isArraySchema(value) && typeof value.items === 'object') {\n    const resolvedItems = resolve.schema(value.items)\n    if (resolvedItems && 'enum' in resolvedItems && resolvedItems.enum) {\n      return resolvedItems.enum\n    }\n  }\n\n  return []\n}\n","import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/**\n * Determine if property heading should be displayed\n *\n * @param schema - The schema object to check\n * @param name - Optional property name\n * @param required - Whether the property is required\n * @returns true if heading should be displayed, false otherwise\n */\nexport const shouldDisplayHeading = (schema: SchemaObject | undefined, name?: string, required = false): boolean => {\n  // Early return for simple cases\n  if (name || required) {\n    return true\n  }\n\n  // If schema is undefined, return false\n  if (!schema) {\n    return false\n  }\n\n  // Check schema properties that warrant a heading\n  return (\n    schema.deprecated === true ||\n    schema.const !== undefined ||\n    schema.enum?.length === 1 ||\n    ('type' in schema && schema.type !== undefined) ||\n    ('nullable' in schema && schema.nullable === true) ||\n    schema.writeOnly === true ||\n    schema.readOnly === true\n  )\n}\n","<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { resolve } from '@scalar/workspace-store/resolve'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { Anchor } from '@/components/Anchor'\nimport { SectionAccordion, SectionHeaderTag } from '@/components/Section'\n\nimport { SchemaHeading, SchemaProperty } from '../../Schema'\n\nconst { eventBus, id } = defineProps<{\n  id: string\n  name: string\n  schema: SchemaObject\n  isCollapsed: boolean\n  eventBus: WorkspaceEventBus\n  options: Pick<\n    ApiReferenceConfigurationRaw,\n    'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy' | 'hideModels'\n  >\n}>()\n</script>\n<template>\n  <SectionAccordion\n    :aria-label=\"schema.title ?? name\"\n    :modelValue=\"!isCollapsed\"\n    @update:modelValue=\"\n      (value) => eventBus?.emit('toggle:nav-item', { id, open: value })\n    \">\n    <template #title>\n      <Anchor\n        class=\"reference-models-anchor\"\n        :eventBus=\"eventBus\"\n        @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\">\n        <SectionHeaderTag :level=\"3\">\n          <SchemaHeading\n            class=\"reference-models-label\"\n            :name=\"schema.title ?? name\"\n            :value=\"schema\" />\n        </SectionHeaderTag>\n      </Anchor>\n    </template>\n    <!-- Schema -->\n    <div\n      v-if=\"'properties' in schema\"\n      class=\"properties\">\n      <SchemaProperty\n        v-for=\"[property, value] in Object.entries(schema.properties ?? {})\"\n        :key=\"property\"\n        :eventBus=\"eventBus\"\n        :hideModelNames=\"options.hideModels\"\n        :name=\"property\"\n        :options\n        :required=\"schema.required?.includes(property)\"\n        :schema=\"resolve.schema(value)\" />\n    </div>\n    <div v-else>\n      <SchemaProperty\n        :eventBus=\"eventBus\"\n        :hideModelNames=\"options.hideModels\"\n        :options\n        :schema=\"schema\" />\n    </div>\n  </SectionAccordion>\n</template>\n<style scoped>\n.reference-models-anchor {\n  display: flex;\n  align-items: center;\n  font-size: 20px;\n  padding-left: 6px;\n  color: var(--scalar-color-1);\n}\n.reference-models-label {\n  display: block;\n  font-size: var(--scalar-mini);\n}\n\n/* Style the \"icon\" */\n.reference-models-label :deep(em) {\n  font-weight: var(--scalar-bold);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarIconCaretRight } from '@scalar/icons'\n\nimport { Anchor } from '@/components/Anchor'\n\nimport Section from './Section.vue'\n\nconst { id } = defineProps<{\n  id: string\n  label?: string\n  modelValue: boolean\n}>()\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', value: boolean): void\n  (e: 'copyAnchorUrl'): void\n}>()\n</script>\n<template>\n  <section\n    :aria-label=\"label\"\n    class=\"collapsible-section\">\n    <button\n      :id=\"id\"\n      :aria-controls=\"id\"\n      :aria-expanded=\"modelValue\"\n      class=\"collapsible-section-trigger\"\n      :class=\"{ 'collapsible-section-trigger-open': modelValue }\"\n      type=\"button\"\n      @click=\"emit('update:modelValue', !modelValue)\">\n      <ScalarIconCaretRight\n        class=\"size-3 transition-transform duration-100\"\n        :class=\"{ 'rotate-90': modelValue }\"\n        weight=\"bold\" />\n      <Anchor\n        class=\"collapsible-section-header\"\n        @copyAnchorUrl=\"() => emit('copyAnchorUrl')\">\n        <slot name=\"heading\" />\n      </Anchor>\n    </button>\n    <Section\n      v-if=\"modelValue\"\n      class=\"collapsible-section-content\"\n      :label=\"label\">\n      <slot />\n    </Section>\n  </section>\n</template>\n<style scoped>\n.collapsible-section {\n  border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n  position: relative;\n}\n.collapsible-section-header {\n  color: var(--scalar-color-1);\n}\n.collapsible-section .collapsible-section-trigger {\n  display: flex;\n  align-items: center;\n  cursor: pointer;\n  padding: 10px 0;\n  font-size: var(--scalar-font-size-3);\n  z-index: 1;\n  position: relative;\n}\n.collapsible-section-trigger svg {\n  color: var(--scalar-color-3);\n  position: absolute;\n  left: -19px;\n}\n.collapsible-section:hover .collapsible-section-trigger svg {\n  color: var(--scalar-color-1);\n}\n.collapsible-section .collapsible-section-trigger :deep(.anchor-copy) {\n  line-height: 18.5px;\n}\n.collapsible-section-content {\n  padding: 0;\n  margin: 0;\n  margin-bottom: 10px;\n  scroll-margin-top: 140px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarErrorBoundary } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { CompactSection, SectionHeaderTag } from '@/components/Section'\n\nimport { Schema, SchemaHeading } from '../../Schema'\n\nconst { schema, options } = defineProps<{\n  id: string\n  name: string\n  schema: SchemaObject\n  isCollapsed: boolean\n  eventBus: WorkspaceEventBus\n  options: {\n    orderRequiredPropertiesFirst: boolean | undefined\n    orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n    hideModels: boolean | undefined\n  }\n}>()\n</script>\n<template>\n  <CompactSection\n    :id=\"id\"\n    :key=\"name\"\n    :label=\"name\"\n    :modelValue=\"!isCollapsed\"\n    @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\"\n    @update:modelValue=\"\n      (value) => eventBus?.emit('toggle:nav-item', { id, open: value })\n    \">\n    <template #heading>\n      <SectionHeaderTag :level=\"3\">\n        <SchemaHeading\n          :name=\"schema.title ?? name\"\n          :value=\"schema\" />\n      </SectionHeaderTag>\n    </template>\n    <ScalarErrorBoundary>\n      <Schema\n        :eventBus\n        :hideModelNames=\"options.hideModels\"\n        hideHeading\n        :level=\"1\"\n        noncollapsible\n        :options=\"options\"\n        :schema=\"schema\" />\n    </ScalarErrorBoundary>\n  </CompactSection>\n</template>\n","<script setup lang=\"ts\">\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useTemplateRef } from 'vue'\n\nimport { useIntersection } from '@/hooks/use-intersection'\n\nimport ClassicLayout from './components/ClassicLayout.vue'\nimport ModernLayout from './components/ModernLayout.vue'\n\nconst { schema, isCollapsed, id, options, eventBus } = defineProps<{\n  id: string\n  name: string\n  options: Pick<\n    ApiReferenceConfigurationRaw,\n    | 'layout'\n    | 'orderRequiredPropertiesFirst'\n    | 'orderSchemaPropertiesBy'\n    | 'hideModels'\n  >\n  schema: SchemaObject | undefined\n  isCollapsed: boolean\n  eventBus: WorkspaceEventBus\n}>()\n\nconst section = useTemplateRef<HTMLElement>('section')\n\nuseIntersection(section, () => eventBus?.emit('intersecting:nav-item', { id }))\n</script>\n<template>\n  <div\n    v-if=\"schema\"\n    ref=\"section\">\n    <ClassicLayout\n      v-if=\"options.layout === 'classic'\"\n      :id\n      :eventBus\n      :isCollapsed\n      :name\n      :options\n      :schema />\n    <ModernLayout\n      v-else\n      :id\n      :eventBus\n      :isCollapsed\n      :name\n      :options\n      :schema />\n  </div>\n</template>\n","<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIconCaretRight } from '@scalar/icons'\n\ndefineProps<{\n  modelValue: boolean\n}>()\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', value: boolean): void\n}>()\n</script>\n<template>\n  <section class=\"section-accordion-wrapper\">\n    <Disclosure\n      as=\"div\"\n      class=\"section-accordion\">\n      <DisclosureButton\n        class=\"section-accordion-button\"\n        @click=\"emit('update:modelValue', !modelValue)\">\n        <ScalarIconCaretRight\n          class=\"section-accordion-chevron size-5 transition-transform\"\n          :class=\"{ 'rotate-90': modelValue }\" />\n        <div class=\"section-accordion-title\">\n          <slot name=\"title\" />\n        </div>\n      </DisclosureButton>\n      <DisclosurePanel\n        v-if=\"modelValue\"\n        class=\"section-accordion-content\"\n        static>\n        <slot />\n      </DisclosurePanel>\n    </Disclosure>\n  </section>\n</template>\n<style scoped>\n.section-accordion-wrapper {\n  padding: 0 60px;\n}\n.section-accordion {\n  position: relative;\n  width: 100%;\n  max-width: var(--refs-content-max-width);\n  margin: auto;\n}\n.section-accordion-content {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n\n  padding-top: 12px;\n}\n.section-accordion-button {\n  width: 100%;\n  display: flex;\n\n  cursor: pointer;\n\n  padding: 6px 0 6px 0;\n  margin: -6px 0 -6px 0;\n  border-radius: var(--scalar-radius);\n}\n.section-accordion-chevron {\n  position: absolute;\n  left: -22px;\n  top: 12px;\n  color: var(--scalar-color-3);\n}\n\n.section-accordion-button:hover .section-accordion-chevron {\n  color: var(--scalar-color-1);\n}\n.section-accordion-title {\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  flex: 1;\n  padding: 0 6px;\n}\n.section-accordion-title :deep(.section-header-wrapper) {\n  grid-template-columns: 1fr;\n}\n.section-accordion-title :deep(.section-header) {\n  margin-bottom: 0;\n}\n@container narrow-references-container (max-width: 900px) {\n  .section-accordion-chevron {\n    width: 16px;\n    left: -16px;\n    top: 14px;\n  }\n  .section-accordion-wrapper {\n    padding: calc(var(--refs-viewport-offset)) 24px 0 24px;\n  }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarIconCaretDown } from '@scalar/icons'\n</script>\n\n<template>\n  <button\n    class=\"show-more\"\n    type=\"button\">\n    Show More\n    <ScalarIconCaretDown\n      class=\"text-c-2 mt-0.25 size-3\"\n      weight=\"bold\" />\n  </button>\n</template>\n\n<style scoped>\n.show-more {\n  appearance: none;\n  border: none;\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  margin: auto;\n  padding: 8px 12px 8px 16px;\n  border-radius: 30px;\n  color: var(--scalar-color-1);\n  font-weight: var(--scalar-semibold);\n  font-size: var(--scalar-small);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: relative;\n  gap: 6px;\n  top: -48px;\n}\n\n.show-more:hover {\n  background: var(--scalar-background-2);\n  cursor: pointer;\n}\n\n.show-more:active {\n  box-shadow: 0 0 0 1px var(--scalar-border-color);\n}\n\n@container narrow-references-container (max-width: 900px) {\n  .show-more {\n    top: -24px;\n  }\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport { Section, SectionHeader } from '@/components/Section'\nimport SectionContainer from '@/components/Section/SectionContainer.vue'\nimport SectionContainerAccordion from '@/components/Section/SectionContainerAccordion.vue'\nimport SectionHeaderTag from '@/components/Section/SectionHeaderTag.vue'\nimport ShowMoreButton from '@/components/ShowMoreButton.vue'\n\ndefineProps<{\n  id: string\n  isCollapsed: boolean\n  eventBus: WorkspaceEventBus\n  layout: 'classic' | 'modern'\n}>()\n</script>\n<template>\n  <!-- Modern Layout Model Container -->\n  <SectionContainer\n    v-if=\"layout === 'modern'\"\n    id=\"model\">\n    <Section\n      :id=\"id\"\n      aria-label=\"Models\"\n      @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n      <SectionHeader>\n        <SectionHeaderTag :level=\"2\"> Models </SectionHeaderTag>\n      </SectionHeader>\n      <template v-if=\"!isCollapsed\">\n        <slot />\n      </template>\n      <template v-else>\n        <ShowMoreButton\n          :id\n          class=\"top-0\"\n          @click=\"() => eventBus.emit('toggle:nav-item', { id, open: true })\">\n        </ShowMoreButton>\n      </template>\n    </Section>\n  </SectionContainer>\n  <!-- Classic Layout Model Container -->\n  <SectionContainerAccordion\n    v-else\n    aria-label=\"Models\"\n    class=\"pb-12\"\n    :modelValue=\"!isCollapsed\"\n    @update:modelValue=\"\n      () => eventBus?.emit('toggle:nav-item', { id, open: isCollapsed })\n    \">\n    <template #title>\n      <SectionHeader :level=\"2\">Models</SectionHeader>\n    </template>\n    <slot />\n  </SectionContainerAccordion>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { TraversedTag } from '@scalar/workspace-store/schemas/navigation'\n\nimport { Anchor } from '@/components/Anchor'\nimport {\n  SectionContainerAccordion,\n  SectionHeader,\n  SectionHeaderTag,\n} from '@/components/Section'\n\nconst { tag, isCollapsed } = defineProps<{\n  tag: TraversedTag\n  isCollapsed: boolean\n  eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n  <SectionContainerAccordion\n    :aria-label=\"tag.title\"\n    class=\"tag-section\"\n    :class=\"{ 'tag-section-group': tag.isGroup }\"\n    :modelValue=\"!isCollapsed\"\n    @update:modelValue=\"\n      (value) => eventBus?.emit('toggle:nav-item', { id: tag.id, open: value })\n    \">\n    <template #title>\n      <SectionHeader\n        class=\"tag-name\"\n        :class=\"{ 'tag-group-name': tag.isGroup }\">\n        <Anchor\n          @copyAnchorUrl=\"\n            () => eventBus?.emit('copy-url:nav-item', { id: tag.id })\n          \">\n          <SectionHeaderTag :level=\"2\">\n            {{ tag.title }}\n          </SectionHeaderTag>\n        </Anchor>\n      </SectionHeader>\n      <ScalarMarkdown\n        class=\"tag-description\"\n        :value=\"tag?.description\"\n        withImages />\n    </template>\n    <slot />\n  </SectionContainerAccordion>\n</template>\n\n<style scoped>\n.tag-section {\n  margin-bottom: 48px;\n}\n.tag-name {\n  text-transform: capitalize;\n}\n.tag-description {\n  padding-bottom: 4px;\n  text-align: left;\n}\n\n/* Tag Groups */\n.tag-section-group .tag-group-name {\n  gap: 12px;\n  align-self: stretch;\n  grid-template-columns: auto 1fr;\n}\n.tag-group-name:after {\n  content: '';\n  display: block;\n  height: 1px;\n  align-self: center;\n  background: var(--scalar-border-color);\n}\n.tag-group-name:has(* > *:hover),\n.tag-group-name:has(:focus-visible) {\n  gap: 32px;\n}\n.tag-section-group .tag-section {\n  padding-inline: 0;\n  margin-bottom: 24px;\n}\n.tag-section-group .tag-section:last-of-type {\n  margin-bottom: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { normalizeHttpMethod } from '@scalar/helpers/http/normalize-http-method'\nimport { computed, type Component } from 'vue'\n\nconst props = defineProps<{\n  /** The type of element to render as, defaults to `span` */\n  as?: Component | string\n  /** The css style property or variable that will be set to the request method color, defaults to `color` */\n  property?: string\n  /** Whether or not to abbreviated the slot content */\n  short?: boolean\n  /** The HTTP method to show */\n  method: HttpMethod | string\n}>()\n\n/** Grabs the method info object which contains abbreviation, color, and background color etc */\nconst httpMethodInfo = computed(() =>\n  getHttpMethodInfo(String(props.method || '')),\n)\n\n/** Full method name */\nconst normalized = computed(() => normalizeHttpMethod(props.method))\n</script>\n\n<template>\n  <component\n    :is=\"as ?? 'span'\"\n    class=\"uppercase\"\n    :style=\"{ [property || 'color']: httpMethodInfo.colorVar }\">\n    <slot />\n    {{ short ? httpMethodInfo.short : normalized }}\n  </component>\n</template>\n","<script setup lang=\"ts\">\nimport { getHttpMethodInfo } from '@scalar/helpers/http/http-info'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type {\n  TraversedEntry,\n  TraversedOperation,\n  TraversedWebhook,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { computed } from 'vue'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { SectionHeaderTag } from '@/components/Section'\n\nconst { operation } = defineProps<{\n  operation: TraversedOperation | TraversedWebhook\n  isCollapsed?: boolean\n  eventBus: WorkspaceEventBus | null\n}>()\n\nconst pathOrTitle = computed(() => {\n  if ('path' in operation) {\n    return operation.path\n  }\n\n  return operation.title\n})\n\nconst isWebhook = (\n  _operation: TraversedEntry,\n): _operation is TraversedWebhook => _operation.type === 'webhook'\n</script>\n\n<template>\n  <li\n    :key=\"operation.id\"\n    class=\"contents\">\n    <!-- If collapsed add hidden headers so they show up for screen readers -->\n    <SectionHeaderTag\n      v-if=\"isCollapsed\"\n      class=\"sr-only\"\n      :level=\"3\">\n      {{ operation.title }} (Hidden)\n    </SectionHeaderTag>\n    <a\n      class=\"endpoint\"\n      @click.prevent=\"\n        () => eventBus?.emit('scroll-to:nav-item', { id: operation.id })\n      \">\n      <HttpMethod\n        class=\"endpoint-method items-center justify-end gap-2\"\n        :method=\"operation.method\">\n        <ScalarIconWebhooksLogo\n          v-if=\"isWebhook(operation)\"\n          class=\"size-3.5\"\n          :style=\"{\n            color: getHttpMethodInfo(operation.method).colorVar,\n          }\" />\n      </HttpMethod>\n      <span\n        class=\"endpoint-path\"\n        :class=\"{ deprecated: operation.isDeprecated }\">\n        {{ pathOrTitle }}\n      </span>\n    </a>\n  </li>\n</template>\n\n<style scoped>\n.endpoint {\n  display: flex;\n  white-space: nowrap;\n  cursor: pointer;\n  text-decoration: none;\n}\n.endpoint:hover .endpoint-path,\n.endpoint:focus-visible .endpoint-path {\n  text-decoration: underline;\n}\n.endpoint .post,\n.endpoint .get,\n.endpoint .delete,\n.endpoint .put {\n  white-space: nowrap;\n}\n\n.endpoint-method,\n.endpoint-path {\n  color: var(--scalar-color-1);\n  min-width: 62px;\n  display: inline-flex;\n  line-height: 1.55;\n  font-family: var(--scalar-font-code);\n  font-size: var(--scalar-small);\n  cursor: pointer;\n}\n\n.endpoint-method {\n  text-align: right;\n}\n\n.endpoint-path {\n  margin-left: 12px;\n  text-transform: initial;\n}\n\n.deprecated {\n  text-decoration: line-through;\n}\n</style>\n","<script setup lang=\"ts\">\nimport {\n  ScalarCard,\n  ScalarCardHeader,\n  ScalarCardSection,\n} from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { TraversedTag } from '@scalar/workspace-store/schemas/navigation'\nimport { computed } from 'vue'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nimport OperationsListItem from './OperationsListItem.vue'\n\nconst { tag } = defineProps<{\n  tag: TraversedTag\n  eventBus: WorkspaceEventBus | null\n}>()\n\nconst operationsAndWebhooks = computed(() => {\n  return (\n    tag.children?.filter(\n      (child) => child.type === 'operation' || child.type === 'webhook',\n    ) ?? []\n  )\n})\n</script>\n\n<template>\n  <template v-if=\"tag.children && tag.children?.length > 0\">\n    <ScalarCard class=\"endpoints-card\">\n      <ScalarCardHeader muted>\n        <ScreenReader>{{ tag.title }}</ScreenReader>\n        {{ tag.isWebhooks ? 'Webhooks' : 'Operations' }}\n      </ScalarCardHeader>\n      <ScalarCardSection class=\"custom-scroll max-h-[60vh]\">\n        <ul\n          :aria-label=\"`${tag.title} endpoints`\"\n          class=\"endpoints\">\n          <OperationsListItem\n            v-for=\"operationOrWebhook in operationsAndWebhooks\"\n            :key=\"operationOrWebhook.id\"\n            :eventBus=\"eventBus\"\n            :operation=\"operationOrWebhook\" />\n        </ul>\n      </ScalarCardSection>\n    </ScalarCard>\n  </template>\n</template>\n\n<style scoped>\n.endpoints-card {\n  position: sticky;\n  top: calc(var(--refs-viewport-offset) + 24px);\n  font-size: var(--scalar-font-size-3);\n}\n.endpoints {\n  overflow: auto;\n  background: var(--scalar-background-2);\n  padding: 10px 12px;\n  width: 100%;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { TraversedTag } from '@scalar/workspace-store/schemas/navigation'\n\nimport { Anchor } from '@/components/Anchor'\nimport { OperationsList } from '@/components/OperationsList'\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport {\n  Section,\n  SectionColumn,\n  SectionColumns,\n  SectionContent,\n  SectionHeader,\n  SectionHeaderTag,\n} from '@/components/Section'\nimport { SpecificationExtension } from '@/features/specification-extension'\n\nconst { tag, headerId, isCollapsed } = defineProps<{\n  tag: TraversedTag\n  headerId?: string\n  isCollapsed?: boolean\n  isLoading?: boolean\n  eventBus: WorkspaceEventBus | null\n}>()\n</script>\n<template>\n  <Section\n    v-if=\"tag\"\n    :id=\"tag.id\"\n    role=\"none\"\n    @intersecting=\"\n      () => eventBus?.emit('intersecting:nav-item', { id: tag.id })\n    \">\n    <SectionHeader v-show=\"!isLoading\">\n      <Anchor\n        @copyAnchorUrl=\"\n          () => eventBus?.emit('copy-url:nav-item', { id: tag.id })\n        \">\n        <SectionHeaderTag\n          :id=\"headerId\"\n          :level=\"2\">\n          {{ tag.title }}\n          <ScreenReader v-if=\"isCollapsed\"> (Collapsed)</ScreenReader>\n        </SectionHeaderTag>\n      </Anchor>\n    </SectionHeader>\n    <SectionContent :loading=\"isLoading\">\n      <SectionColumns>\n        <SectionColumn>\n          <ScalarMarkdown\n            :clamp=\"isCollapsed ? 7 : undefined\"\n            :value=\"tag?.description ?? ''\"\n            withImages />\n        </SectionColumn>\n        <SectionColumn>\n          <OperationsList\n            :eventBus=\"eventBus\"\n            :tag=\"tag\" />\n        </SectionColumn>\n      </SectionColumns>\n    </SectionContent>\n    <SpecificationExtension :value=\"tag.xKeys\" />\n  </Section>\n</template>\n","<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { TraversedTag } from '@scalar/workspace-store/schemas/navigation'\nimport { computed, useId } from 'vue'\n\nimport { SectionContainer } from '@/components/Section'\nimport ShowMoreButton from '@/components/ShowMoreButton.vue'\n\nimport TagSection from './TagSection.vue'\n\nconst { tag, moreThanOneTag } = defineProps<{\n  tag: TraversedTag\n  moreThanOneTag: boolean\n  isLoading: boolean\n  isCollapsed: boolean\n  eventBus: WorkspaceEventBus | null\n}>()\n\nconst headerId = useId()\n\nconst moreThanOneDefaultTag = computed(\n  () => moreThanOneTag || tag?.title !== 'default' || tag?.description !== '',\n)\n\nconst hasChildren = computed(() => (tag?.children?.length ?? 0) > 0)\n</script>\n\n<template>\n  <SectionContainer\n    :aria-labelledby=\"headerId\"\n    class=\"tag-section-container\"\n    role=\"region\">\n    <TagSection\n      v-if=\"moreThanOneDefaultTag\"\n      :eventBus=\"eventBus\"\n      :headerId=\"headerId\"\n      :isCollapsed=\"isCollapsed\"\n      :isLoading=\"isLoading\"\n      :tag=\"tag\" />\n    <ShowMoreButton\n      v-if=\"isCollapsed && moreThanOneTag && hasChildren\"\n      :id=\"tag.id\"\n      :aria-label=\"`Show all ${tag.title} endpoints`\"\n      @click=\"\n        () => eventBus?.emit('toggle:nav-item', { id: tag.id, open: true })\n      \" />\n\n    <!-- Show slot when section is expanded or single-tag (inverse of ShowMoreButton visibility). -->\n    <div\n      v-if=\"!(isCollapsed && moreThanOneTag)\"\n      class=\"contents divide-y\">\n      <slot />\n    </div>\n  </SectionContainer>\n</template>\n\n<style scoped>\n.section-container {\n  border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.section-container:has(.show-more) {\n  background-color: color-mix(in srgb, var(--scalar-background-2), transparent);\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { TraversedTag } from '@scalar/workspace-store/schemas/navigation'\n\nimport ClassicLayout from './components/ClassicLayout.vue'\nimport ModernLayout from './components/ModernLayout.vue'\n\nconst { tag, layout, moreThanOneTag, isLoading } = defineProps<{\n  tag: TraversedTag\n  layout: 'classic' | 'modern'\n  moreThanOneTag: boolean\n  isLoading: boolean\n  isCollapsed: boolean\n  eventBus: WorkspaceEventBus | null\n}>()\n</script>\n\n<template>\n  <template v-if=\"layout === 'classic'\">\n    <ClassicLayout\n      :eventBus=\"eventBus\"\n      :isCollapsed=\"isCollapsed\"\n      :layout=\"layout\"\n      :tag=\"tag\">\n      <slot />\n    </ClassicLayout>\n  </template>\n  <template v-else>\n    <ModernLayout\n      :eventBus=\"eventBus\"\n      :isCollapsed=\"isCollapsed\"\n      :isLoading=\"isLoading\"\n      :layout=\"layout\"\n      :moreThanOneTag=\"moreThanOneTag\"\n      :tag=\"tag\">\n      <slot />\n    </ModernLayout>\n  </template>\n</template>\n","<script lang=\"ts\" setup>\n/**\n * Lazily renders content when the element is within the viewport overscan.\n * Uses a fixed-height placeholder so layout is stable while we block during render.\n *\n * When server-side rendering, content renders immediately.\n *\n * @link https://medium.com/js-dojo/lazy-rendering-in-vue-to-improve-performance-dcccd445d5f\n */\n\nimport { useIntersectionObserver } from '@vueuse/core'\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'\n\nimport {\n  getLazyPlaceholderHeight,\n  requestLazyRender,\n  setLazyPlaceholderHeight,\n  useLazyBus,\n} from '@/helpers/lazy-bus'\n\nconst { id, expanded = false } = defineProps<{\n  /** Identifier for this lazy section; used for scroll-to and bus registration. */\n  id: string\n  /** When true, render the slot so child Lazy placeholders mount (e.g. for navigation). */\n  expanded?: boolean\n}>()\n\n/** Fixed height for all placeholders so we do not measure or jump. */\nconst PLACEHOLDER_HEIGHT_PX = 760\n\n/** Overscan: render items within this many pixels above and below the viewport. */\nconst VIEWPORT_OVERSCAN_PX = 1200\nconst VIEWPORT_ROOT_MARGIN = `${VIEWPORT_OVERSCAN_PX}px 0px`\n\nconst { isReady } = useLazyBus(id)\nconst lazyContainerRef = ref<HTMLElement | null>(null)\n\nconst placeholderHeight = ref(\n  getLazyPlaceholderHeight(id) ?? PLACEHOLDER_HEIGHT_PX,\n)\nlet contentResizeObserver: ResizeObserver | null = null\n\n/** Once ready we always show (no eviction). Otherwise show when expanded (e.g. so child Lazy placeholders mount). */\nconst shouldRender = computed(() => isReady.value || expanded)\n\nonMounted(() => {\n  if (typeof window === 'undefined') {\n    return\n  }\n\n  if (!('IntersectionObserver' in window)) {\n    requestLazyRender(id, true)\n    return\n  }\n\n  useIntersectionObserver(\n    lazyContainerRef,\n    ([entry]) => {\n      if (entry?.isIntersecting && !isReady.value) {\n        requestLazyRender(id, true)\n      }\n    },\n    { rootMargin: VIEWPORT_ROOT_MARGIN },\n  )\n})\n\n/**\n * Capture content height right before we switch to placeholder (pre-flush so content\n * is still in the DOM). Ensures we never measure the container or leave the cache stale.\n */\nwatch(\n  () => shouldRender.value,\n  (rendered, wasRendered) => {\n    if (wasRendered && !rendered && lazyContainerRef.value) {\n      const h = lazyContainerRef.value.offsetHeight\n      if (Number.isFinite(h) && h > 0) {\n        placeholderHeight.value = h\n        setLazyPlaceholderHeight(id, h)\n      }\n    }\n  },\n  { flush: 'pre' },\n)\n\n/** When content is visible, set up ResizeObserver and measure. */\nwatch(\n  () => shouldRender.value,\n  (rendered) => {\n    if (!rendered) {\n      contentResizeObserver?.disconnect()\n      contentResizeObserver = null\n      return\n    }\n    void nextTick(() => {\n      if (!lazyContainerRef.value || typeof ResizeObserver === 'undefined') {\n        return\n      }\n      if (!contentResizeObserver) {\n        contentResizeObserver = new ResizeObserver(() => {\n          if (!lazyContainerRef.value) {\n            return\n          }\n          const h = lazyContainerRef.value.offsetHeight\n          if (Number.isFinite(h) && h > 0) {\n            placeholderHeight.value = h\n            setLazyPlaceholderHeight(id, h)\n          }\n        })\n      }\n      contentResizeObserver.observe(lazyContainerRef.value)\n      const h = lazyContainerRef.value.offsetHeight\n      if (Number.isFinite(h) && h > 0) {\n        placeholderHeight.value = h\n        setLazyPlaceholderHeight(id, h)\n      }\n    })\n  },\n  { immediate: true },\n)\n\nonBeforeUnmount(() => {\n  contentResizeObserver?.disconnect()\n})\n</script>\n<template>\n  <div\n    :id=\"!shouldRender ? id : undefined\"\n    ref=\"lazyContainerRef\"\n    :data-placeholder=\"!shouldRender\"\n    data-testid=\"lazy-container\"\n    :style=\"{ height: shouldRender ? undefined : `${placeholderHeight}px` }\">\n    <slot v-if=\"shouldRender\" />\n  </div>\n</template>\n","import type { SelectedSecurity } from '@scalar/workspace-store/entities/auth'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport {\n  type MergedSecuritySchemes,\n  getSecuritySchemes,\n  getSelectedSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type {\n  OpenApiDocument,\n  OperationObject,\n  SecurityRequirementObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/** Builds a quick cache key from the sorted object keys */\nconst getKey = (requirement: SecurityRequirementObject) => Object.keys(requirement).sort().join(',')\n\n/**\n * Find the intersection between which security is selected on the document and what this operation requires\n *\n * If there is no overlap, we return the first requirement\n */\nexport const filterSelectedSecurity = (\n  document: OpenApiDocument,\n  operation: OperationObject | null,\n  selectedSecurityDocument?: SelectedSecurity,\n  selectedSecurityOperation?: SelectedSecurity,\n  securitySchemes: MergedSecuritySchemes = {},\n): SecuritySchemeObjectSecret[] => {\n  const securityRequirements = operation?.security ?? document.security ?? []\n\n  /** The selected security keys for the document */\n  const selectedSecurity = getSelectedSecurity(\n    selectedSecurityDocument,\n    selectedSecurityOperation,\n    securityRequirements,\n  )\n\n  /** Build a set for O(1) lookup */\n  const requirementSet = new Set(securityRequirements.map((r) => getKey(r)))\n\n  // Lets check the selectedIndex first\n  const selectedRequirement = selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex]\n  if (selectedRequirement && requirementSet.has(getKey(selectedRequirement))) {\n    return getSecuritySchemes(securitySchemes, selectedRequirement)\n  }\n\n  // Otherwise lets loop over all selected\n  for (const selected of selectedSecurity.selectedSchemes) {\n    if (requirementSet.has(getKey(selected))) {\n      return getSecuritySchemes(securitySchemes, selected)\n    }\n  }\n\n  /**\n   * If we are selected security on the document,\n   * we should show the first requirement of the operation to show auth is required\n   */\n  if (operation?.security?.length) {\n    return getSecuritySchemes(securitySchemes, securityRequirements[0] ?? {})\n  }\n\n  return []\n}\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n  path: string\n  deprecated?: boolean\n}>()\n\nconst isVariable = (part: string) => part.startsWith('{') && part.endsWith('}')\n\n// Split on the path variables\nconst pathParts = computed<string[]>(() => props.path.split(/({[^}]+})/))\n</script>\n<template>\n  <span\n    class=\"operation-path\"\n    :class=\"{ deprecated: deprecated }\">\n    <template\n      v-for=\"(part, i) in pathParts\"\n      :key=\"i\">\n      <em v-if=\"isVariable(part)\">{{ part }}</em>\n      <template v-else>{{ part }}</template>\n    </template>\n  </span>\n</template>\n<style scoped>\n.operation-path {\n  overflow: hidden;\n  word-wrap: break-word;\n  font-weight: var(--scalar-semibold);\n  line-break: anywhere;\n}\n.deprecated {\n  text-decoration: line-through;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock, ScalarVirtualText } from '@scalar/components'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport type { ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/reference'\nimport type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/schema'\nimport { computed } from 'vue'\n\nconst { id, schema } = defineProps<{\n  id: string\n  schema: ReferenceType<SchemaObject>\n}>()\n\nconst schemaContent = computed(() => {\n  if (!schema) {\n    return undefined\n  }\n\n  return prettyPrintJson(getResolvedRefDeep(schema))\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\nconst shouldVirtualizeSchema = computed(() => {\n  return (schemaContent.value?.length ?? 0) > VIRTUALIZATION_THRESHOLD\n})\n</script>\n\n<template>\n  <ScalarCodeBlock\n    v-if=\"!shouldVirtualizeSchema\"\n    :id=\"id\"\n    class=\"bg-b-2\"\n    lang=\"json\"\n    :prettyPrintedContent=\"schemaContent ?? ''\" />\n  <ScalarVirtualText\n    v-else\n    :id=\"id\"\n    containerClass=\"custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen\"\n    contentClass=\"language-plaintext whitespace-pre font-code text-base\"\n    :lineHeight=\"20\"\n    :text=\"schemaContent ?? ''\" />\n</template>\n","<script lang=\"ts\" setup>\nimport { getResolvedRefDeep } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarCodeBlock, ScalarVirtualText } from '@scalar/components'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { getExampleFromSchema } from '@scalar/workspace-store/request-example'\nimport type {\n  ExampleObject,\n  MediaTypeObject,\n  SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nconst { example, response } = defineProps<{\n  response: MediaTypeObject | undefined\n  example: ExampleObject | undefined\n}>()\n\n/** Get content from the appropriate source */\nconst getContent = () => {\n  if (example !== undefined) {\n    return getResolvedRefDeep(example)?.value ?? ''\n  }\n\n  if (response?.schema) {\n    return getExampleFromSchema(\n      // Should be safe to deep resolve the schema here because we don't have to do any sibling resolution for example generation\n      getResolvedRefDeep(response.schema) as SchemaObject,\n      {\n        emptyString: 'string',\n        mode: 'read',\n      },\n    )\n  }\n\n  return undefined\n}\n\n/** Pre-pretty printed content string, avoids multiple pretty prints*/\nconst prettyPrintedContent = computed(() => {\n  const content = getContent()\n  if (content === undefined) {\n    return undefined\n  }\n  return prettyPrintJson(content)\n})\n\nconst VIRTUALIZATION_THRESHOLD = 20_000\n\n// Virtualize the code block if it's too large\nconst shouldVirtualize = computed(() => {\n  if (prettyPrintedContent.value === undefined) {\n    return false\n  }\n  return prettyPrintedContent.value.length > VIRTUALIZATION_THRESHOLD\n})\n</script>\n<template>\n  <!-- Example -->\n  <ScalarCodeBlock\n    v-if=\"prettyPrintedContent !== undefined && !shouldVirtualize\"\n    class=\"bg-b-2\"\n    lang=\"json\"\n    :prettyPrintedContent=\"prettyPrintedContent\" />\n\n  <ScalarVirtualText\n    v-else-if=\"prettyPrintedContent !== undefined && shouldVirtualize\"\n    containerClass=\"custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen\"\n    contentClass=\"language-plaintext whitespace-pre font-code text-base\"\n    :lineHeight=\"20\"\n    :text=\"prettyPrintedContent\" />\n\n  <div\n    v-else\n    class=\"empty-state\">\n    No Body\n  </div>\n</template>\n\n<style scoped>\n.empty-state {\n  margin: 10px 0 10px 12px;\n  text-align: center;\n  font-size: var(--scalar-mini);\n  min-height: 56px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  border-radius: var(--scalar-radius-lg);\n  color: var(--scalar-color-2);\n}\n\n.rule-title {\n  font-family: var(--scalar-font-code);\n  color: var(--scalar-color-1);\n  display: inline-block;\n  margin: 12px 0 6px;\n  border-radius: var(--scalar-radius);\n}\n\n.rule {\n  margin: 0 12px 0;\n  border-radius: var(--scalar-radius-lg);\n}\n\n.rule-items {\n  counter-reset: list-number;\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  border-left: 1px solid var(--scalar-border-color);\n  padding: 12px 0 12px;\n}\n.rule-item {\n  counter-increment: list-number;\n  border: 1px solid var(--scalar-border-color);\n  border-radius: var(--scalar-radius-lg);\n  overflow: hidden;\n  margin-left: 24px;\n}\n.rule-item:before {\n  /* content: counter(list-number); */\n  border: 1px solid var(--scalar-border-color);\n  border-top: 0;\n  border-right: 0;\n  content: ' ';\n  display: block;\n  width: 24px;\n  height: 6px;\n  border-radius: 0 0 0 var(--scalar-radius-lg);\n  margin-top: 6px;\n  color: var(--scalar-color-2);\n  transform: translateX(-25px);\n  color: var(--scalar-color-1);\n  position: absolute;\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { Tab } from '@headlessui/vue'\n</script>\n<template>\n  <Tab\n    v-slot=\"{ selected }\"\n    as=\"template\">\n    <button\n      class=\"tab\"\n      :class=\"{ 'tab-selected': selected }\"\n      type=\"button\">\n      <span>\n        <slot />\n      </span>\n    </button>\n  </Tab>\n</template>\n<style scoped>\n.tab {\n  background: none;\n  border: none;\n  font-size: var(--scalar-small);\n  font-family: var(--scalar-font);\n  font-weight: var(--scalar-font-normal);\n  color: var(--scalar-color-2);\n  line-height: calc(var(--scalar-small) + 2px);\n  white-space: nowrap;\n  cursor: pointer;\n  padding: 0;\n  margin-right: 3px;\n  text-transform: uppercase;\n  position: relative;\n  line-height: 22px;\n}\n.tab:before {\n  content: '';\n  position: absolute;\n  z-index: 0;\n  left: -6px;\n  top: -2px;\n  width: calc(100% + 12px);\n  height: calc(100% + 4px);\n  border-radius: var(--scalar-radius);\n  background: var(--scalar-background-3);\n  opacity: 0;\n}\n.tab:hover:before,\n.tab:focus-visible:before {\n  opacity: 1;\n}\n.tab:focus-visible:before {\n  outline: 1px solid var(--scalar-color-accent);\n}\n.tab span {\n  z-index: 1;\n  position: relative;\n}\n.tab-selected {\n  color: var(--scalar-color-1);\n  font-weight: var(--scalar-semibold);\n}\n.tab-selected:after {\n  content: '';\n  position: absolute;\n  background: currentColor;\n  width: 100%;\n  left: 0;\n  height: 1px;\n  bottom: calc(var(--tab-list-padding-y) * -1);\n}\n</style>\n","<script lang=\"ts\" setup>\nimport { TabGroup, TabList } from '@headlessui/vue'\nimport { ScalarCardHeader } from '@scalar/components'\n\nconst emit = defineEmits<{\n  (e: 'change', index: number): void\n}>()\n\nconst changeTab = (index: number) => {\n  emit('change', index)\n}\n</script>\n<template>\n  <ScalarCardHeader class=\"scalar-card-header scalar-card-header-tabs\">\n    <TabGroup @change=\"changeTab\">\n      <TabList class=\"tab-list custom-scroll\">\n        <slot />\n      </TabList>\n    </TabGroup>\n    <template #actions>\n      <slot name=\"actions\" />\n    </template>\n  </ScalarCardHeader>\n</template>\n<style scoped>\n.tab-list {\n  display: flex;\n  gap: 6px;\n  position: relative;\n  flex: 1;\n  --tab-list-padding-y: 7px;\n  --tab-list-padding-x: 12px;\n  padding: var(--tab-list-padding-y) var(--tab-list-padding-x);\n  overflow: auto;\n}\n.scalar-card-header.scalar-card-header-tabs {\n  padding: 0;\n}\n</style>\n","import type { ResponseObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { normalizeMimeType } from './normalize-mime-type'\n\n/**\n * Remove charset from content types\n *\n * Example: `application/json; charset=utf-8` -> `application/json`\n */\nexport function normalizeMimeTypeObject(content?: ResponseObject['content']): ResponseObject['content'] {\n  if (!content) {\n    return content\n  }\n\n  const newContent: ResponseObject['content'] = {\n    ...content,\n  }\n\n  Object.entries(newContent).forEach(([key, value]) => {\n    const normalizedKey = normalizeMimeType(key)\n    if (normalizedKey) {\n      newContent[normalizedKey] = value\n    }\n  })\n\n  return newContent\n}\n","import type { ContentType } from '@scalar/types/legacy'\n\n/**\n * Normalizes a MIME type to a standard format.\n *\n * Input: application/problem+json; charset=utf-8\n * Output: application/json\n */\nexport function normalizeMimeType(contentType: undefined): undefined\nexport function normalizeMimeType(contentType: string): ContentType\nexport function normalizeMimeType(contentType: string | undefined): ContentType | undefined {\n  if (typeof contentType !== 'string') {\n    return undefined\n  }\n\n  return (\n    contentType\n      // Remove '; charset=utf-8'\n      .replace(/;.*$/, '')\n      // Remove 'problem+' but keep vendor-specific vnd and fhir mime types\n      .replace(/\\/(?!.*vnd\\.|fhir\\+).*\\+/, '/')\n      // Remove whitespace\n      .trim() as ContentType\n  )\n}\n","import { objectKeys } from '@scalar/helpers/object/object-keys'\nimport type { MediaTypeObject, ResponseObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { normalizeMimeTypeObject } from './normalize-mime-type-object'\n\n/**\n * Checks if a media type object has any displayable content.\n * This includes having a schema, a single example, or multiple examples.\n *\n * Note: We use explicit property checks for `example` because falsy values\n * like `0`, `false`, and `\"\"` are valid JSON examples that should be displayed.\n * We still treat `null` as \"no content\" since it explicitly indicates absence.\n */\nfunction hasMediaTypeContent(mediaType: MediaTypeObject | undefined): boolean {\n  if (!mediaType) {\n    return false\n  }\n\n  const hasSchema = Boolean(mediaType.schema)\n  const hasExample = 'example' in mediaType && mediaType.example !== null\n  const hasExamples = Boolean(mediaType.examples)\n\n  return hasSchema || hasExample || hasExamples\n}\n\nfunction isResponseKey(responseKey: string): boolean {\n  return responseKey === 'default' || /^[1-5][0-9]{2}$/.test(responseKey) || /^[1-5]XX$/.test(responseKey)\n}\n\n/**\n * Checks if a response object has body content (schema, example, or examples).\n * Looks through common media types in priority order.\n */\nexport function hasResponseContent(response: ResponseObject | undefined, responseKey?: string): boolean {\n  if (responseKey !== undefined) {\n    if (!isResponseKey(responseKey)) {\n      return false\n    }\n\n    return Boolean(response)\n  }\n\n  const normalizedContent = normalizeMimeTypeObject(response?.content)\n  const keys = objectKeys(normalizedContent ?? {})\n\n  const mediaType =\n    normalizedContent?.['application/json'] ??\n    normalizedContent?.['application/xml'] ??\n    normalizedContent?.['text/plain'] ??\n    normalizedContent?.['text/html'] ??\n    normalizedContent?.['*/*'] ??\n    normalizedContent?.[keys[0] ?? '']\n\n  return hasMediaTypeContent(mediaType)\n}\n","<script lang=\"ts\" setup>\nimport { ExamplePicker } from '@scalar/api-client/blocks/operation-code-sample'\nimport {\n  ScalarCard,\n  ScalarCardFooter,\n  ScalarCardSection,\n  ScalarIcon,\n  ScalarMarkdown,\n} from '@scalar/components'\nimport { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { getExample } from '@scalar/workspace-store/request-example'\nimport type {\n  MediaTypeObject,\n  ResponsesObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref, toValue, useId, watch } from 'vue'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\nimport ExampleSchema from '@/features/example-responses/ExampleSchema.vue'\n\nimport ExampleResponse from './ExampleResponse.vue'\nimport ExampleResponseTab from './ExampleResponseTab.vue'\nimport ExampleResponseTabList from './ExampleResponseTabList.vue'\nimport { hasResponseContent } from './helpers/has-response-content'\nimport { normalizeMimeTypeObject } from './helpers/normalize-mime-type-object'\n\n/**\n * TODO: copyToClipboard isn't using the right content if there are multiple examples\n */\n\nconst { responses } = defineProps<{\n  responses: ResponsesObject\n}>()\n\nconst id = useId()\nconst { copyToClipboard } = useClipboard()\n\n// Bring the status codes in the right order.\nconst orderedStatusCodes = computed<string[]>(() =>\n  Object.keys(responses ?? {}).sort(),\n)\n\n// Filter to only valid response keys that should render in the example responses panel\nconst statusCodesWithContent = computed<string[]>(() =>\n  orderedStatusCodes.value.filter((statusCode) =>\n    hasResponseContent(getResolvedRef(responses?.[statusCode]), statusCode),\n  ),\n)\n\n// Keep track of the current selected tab\nconst selectedResponseIndex = ref<number>(0)\n\n/**\n * Clamp the selected index when the filtered list shrinks.\n * Without this, the index can become out of bounds and cause a mismatch\n * between the visible tabs and the displayed content.\n *\n * We also reset `selectedExampleKey` to match the behavior of `changeTab`,\n * since the new response may not have the same example keys.\n */\nwatch(statusCodesWithContent, (codes) => {\n  if (codes.length === 0) {\n    selectedResponseIndex.value = 0\n    selectedExampleKey.value = ''\n  } else if (selectedResponseIndex.value >= codes.length) {\n    selectedResponseIndex.value = codes.length - 1\n    selectedExampleKey.value = ''\n  }\n})\n\n// Return the whole response object\nconst currentResponse = computed(() => {\n  const currentStatusCode =\n    toValue(statusCodesWithContent)[toValue(selectedResponseIndex)] ?? ''\n\n  return getResolvedRef(responses?.[currentStatusCode])\n})\n\nconst currentResponseContent = computed<MediaTypeObject | undefined>(() => {\n  const normalizedContent = normalizeMimeTypeObject(\n    currentResponse.value?.content,\n  )\n\n  /** All the keys of the normalized content */\n  const keys = objectKeys(normalizedContent ?? {})\n  return normalizedContent?.[keys[0] ?? '']\n})\n\nconst hasMultipleExamples = computed<boolean>(\n  () =>\n    !!currentResponseContent.value?.examples &&\n    Object.keys(currentResponseContent.value?.examples ?? {}).length > 1,\n)\n\nconst selectedExampleKey = ref<string>(\n  Object.keys(currentResponseContent.value?.examples ?? {})[0] ?? '',\n)\n\n/** Get the current example to display */\nconst currentExample = computed(() => {\n  if (!currentResponseContent.value) {\n    return undefined\n  }\n\n  // When multiple examples exist and one is selected, we access it directly\n  if (hasMultipleExamples.value && selectedExampleKey.value) {\n    return currentResponseContent.value.examples?.[selectedExampleKey.value]\n  }\n\n  // Otherwise, we use getExample with an undefined exampleKey to handle fallbacks\n  return getExample(currentResponseContent.value, undefined, undefined)\n})\n\nconst changeTab = (index: number) => {\n  selectedResponseIndex.value = index\n  selectedExampleKey.value = ''\n}\n\nconst showSchema = ref(false)\n</script>\n<template>\n  <ScalarCard\n    v-if=\"statusCodesWithContent.length\"\n    aria-label=\"Example Responses\"\n    class=\"response-card\"\n    role=\"region\">\n    <ExampleResponseTabList @change=\"changeTab\">\n      <ExampleResponseTab\n        v-for=\"statusCode in statusCodesWithContent\"\n        :key=\"statusCode\"\n        :aria-controls=\"id\">\n        <ScreenReader>Status:</ScreenReader>\n        {{ statusCode }}\n      </ExampleResponseTab>\n\n      <template #actions>\n        <button\n          v-if=\"currentResponseContent?.example\"\n          class=\"code-copy\"\n          type=\"button\"\n          @click=\"() => copyToClipboard(currentResponseContent?.example)\">\n          <ScalarIcon\n            icon=\"Clipboard\"\n            width=\"12px\" />\n        </button>\n        <label\n          v-if=\"currentResponseContent?.schema\"\n          class=\"scalar-card-checkbox\">\n          Show Schema\n          <input\n            v-model=\"showSchema\"\n            :aria-controls=\"id\"\n            class=\"scalar-card-checkbox-input\"\n            type=\"checkbox\" />\n          <span class=\"scalar-card-checkbox-checkmark\" />\n        </label>\n      </template>\n    </ExampleResponseTabList>\n    <ScalarCardSection class=\"grid flex-1\">\n      <!-- Schema -->\n      <ExampleSchema\n        v-if=\"currentResponseContent?.schema && showSchema\"\n        :id=\"id\"\n        :schema=\"currentResponseContent?.schema\" />\n\n      <!-- Example -->\n      <ExampleResponse\n        v-else\n        :id=\"id\"\n        :example=\"currentExample\"\n        :response=\"currentResponseContent\" />\n    </ScalarCardSection>\n    <ScalarCardFooter\n      v-if=\"currentResponse?.description || hasMultipleExamples\"\n      class=\"response-card-footer\">\n      <ExamplePicker\n        v-if=\"hasMultipleExamples\"\n        v-model=\"selectedExampleKey\"\n        class=\"response-example-selector px-0\"\n        :examples=\"currentResponseContent?.examples\" />\n      <div class=\"response-description\">\n        <ScalarMarkdown\n          v-if=\"currentResponse?.description\"\n          class=\"response-description-markdown\"\n          :value=\"currentResponse.description\" />\n      </div>\n    </ScalarCardFooter>\n  </ScalarCard>\n</template>\n\n<style scoped>\n.response-card {\n  font-size: var(--scalar-font-size-3);\n}\n\n.code-copy {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  appearance: none;\n  -webkit-appearance: none;\n  outline: none;\n  background: transparent;\n  cursor: pointer;\n  color: var(--scalar-color-3);\n  border: none;\n  padding: 0;\n  margin-right: 12px;\n}\n.code-copy:hover {\n  color: var(--scalar-color-1);\n}\n.code-copy svg {\n  width: 13px;\n  height: 13px;\n}\n.response-card-footer {\n  display: flex;\n  flex-direction: row-reverse;\n  flex-wrap: wrap;\n  justify-content: start;\n  flex-shrink: 0;\n  padding: 7px 12px;\n  column-gap: 8px;\n}\n.response-example-selector {\n  flex-shrink: 0;\n  margin: -4px;\n}\n.response-description {\n  font-weight: var(--scalar-semibold);\n  font-size: var(--scalar-small);\n  color: var(--scalar-color--1);\n\n  box-sizing: border-box;\n\n  flex-grow: 1;\n}\n.response-description-markdown {\n  max-height: 3lh;\n}\n\n.response-description-markdown :deep(*) {\n  margin: 0;\n}\n.schema-type {\n  font-size: var(--scalar-micro);\n  color: var(--scalar-color-2);\n  font-weight: var(--scalar-semibold);\n  background: var(--scalar-background-3);\n  padding: 2px 4px;\n  border-radius: 4px;\n  margin-right: 4px;\n}\n.schema-example {\n  font-size: var(--scalar-micro);\n  color: var(--scalar-color-2);\n  font-weight: var(--scalar-semibold);\n}\n\n.example-response-tab {\n  display: block;\n  margin: 6px;\n}\n\n.scalar-card-checkbox {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  position: relative;\n  min-height: 17px;\n  cursor: pointer;\n  user-select: none;\n  font-size: var(--scalar-small);\n  font-weight: var(--scalar-font-normal);\n  color: var(--scalar-color-2);\n  width: fit-content;\n  white-space: nowrap;\n  gap: 6px;\n  padding: 7px 6px;\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:focus-visible)\n  .scalar-card-checkbox-checkmark {\n  outline: 1px solid var(--scalar-color-accent);\n}\n.scalar-card-checkbox:hover {\n  color: var(--scalar-color--1);\n}\n.scalar-card-checkbox .scalar-card-checkbox-input {\n  position: absolute;\n  opacity: 0;\n  cursor: pointer;\n  height: 0;\n  width: 0;\n}\n\n.scalar-card-checkbox-checkmark {\n  height: 16px;\n  width: 16px;\n  border-radius: var(--scalar-radius);\n  background-color: transparent;\n  background-color: var(--scalar-background-3);\n  box-shadow: inset 0 0 0 var(--scalar-border-width) var(--scalar-border-color);\n}\n.scalar-card-checkbox:has(.scalar-card-checkbox-input:checked) {\n  color: var(--scalar-color-1);\n  font-weight: var(--scalar-semibold);\n}\n\n.scalar-card-checkbox\n  .scalar-card-checkbox-input:checked\n  ~ .scalar-card-checkbox-checkmark {\n  background-color: var(--scalar-button-1);\n  box-shadow: none;\n}\n\n.scalar-card-checkbox-checkmark:after {\n  content: '';\n  position: absolute;\n  display: none;\n}\n\n.scalar-card-checkbox\n  .scalar-card-checkbox-input:checked\n  ~ .scalar-card-checkbox-checkmark:after {\n  display: block;\n}\n\n.scalar-card-checkbox .scalar-card-checkbox-checkmark:after {\n  right: 11.5px;\n  top: 12.5px;\n  width: 5px;\n  height: 9px;\n  border: solid 1px var(--scalar-button-1-color);\n  border-width: 0 1.5px 1.5px 0;\n  transform: rotate(45deg);\n}\n</style>\n","import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n  ParameterObject,\n  ParameterWithSchemaObject,\n  ReferenceType,\n  SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isObjectSchema } from '@scalar/workspace-store/schemas/v3.1/strict/type-guards'\n\ntype ParameterWithRequiredSchema = ParameterWithSchemaObject & {\n  schema: ReferenceType<SchemaObject>\n}\n\nconst isParameterWithSchema = (parameter: ParameterObject): parameter is ParameterWithRequiredSchema =>\n  'schema' in parameter && parameter.schema !== undefined\n\nconst resolveSchema = (schema: unknown): SchemaObject | undefined => {\n  const resolvedSchema = getResolvedRef(schema as SchemaObject | { '$ref': string; '$ref-value': SchemaObject })\n\n  return resolvedSchema as SchemaObject | undefined\n}\n\nconst toFlattenedDeepObjectParameter = (\n  parameter: ParameterWithRequiredSchema,\n  name: string,\n  description: string | undefined,\n  required: boolean,\n  schema: SchemaObject,\n): ParameterWithRequiredSchema => {\n  const { example: _example, examples: _examples, ...parameterWithoutExamples } = parameter\n\n  return {\n    ...parameterWithoutExamples,\n    name,\n    description,\n    required,\n    schema,\n  }\n}\n\nconst flattenDeepObjectProperties = (\n  parameter: ParameterWithRequiredSchema,\n  schema: Extract<SchemaObject, { type: 'object' }>,\n  namePrefix: string,\n): ParameterObject[] => {\n  if (!schema.properties) {\n    return [parameter]\n  }\n\n  const requiredProperties = new Set(schema.required ?? [])\n  const flattenedParameters = Object.entries(schema.properties).flatMap(([propertyName, propertySchema]) => {\n    const resolvedPropertySchema = resolveSchema(propertySchema)\n    if (!resolvedPropertySchema) {\n      return []\n    }\n\n    const nestedName = `${namePrefix}[${propertyName}]`\n    const nestedParameter = toFlattenedDeepObjectParameter(\n      parameter,\n      nestedName,\n      resolvedPropertySchema.description ?? parameter.description,\n      requiredProperties.has(propertyName),\n      resolvedPropertySchema,\n    )\n\n    if (isObjectSchema(resolvedPropertySchema) && resolvedPropertySchema.properties) {\n      return flattenDeepObjectProperties(nestedParameter, resolvedPropertySchema, nestedName)\n    }\n\n    return [nestedParameter]\n  })\n\n  return flattenedParameters.length > 0 ? flattenedParameters : [parameter]\n}\n\n/**\n * Deep object query parameters serialize as name[prop] pairs in URLs.\n * Rendering the same shape keeps docs aligned with the request UI.\n */\nexport const flattenDeepObjectQueryParameter = (parameter: ParameterObject): ParameterObject[] => {\n  if (parameter.in !== 'query' || !isParameterWithSchema(parameter) || parameter.style !== 'deepObject') {\n    return [parameter]\n  }\n\n  const resolvedSchema = resolveSchema(parameter.schema)\n  if (!resolvedSchema || !isObjectSchema(resolvedSchema)) {\n    return [parameter]\n  }\n\n  return flattenDeepObjectProperties(parameter, resolvedSchema, parameter.name)\n}\n","<script setup lang=\"ts\">\nimport { cva, ScalarButton, ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport type { MediaTypeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nconst { content } = defineProps<{\n  content: Record<string, MediaTypeObject> | undefined\n}>()\n\n/** The selected content type with two-way binding */\nconst selectedContentType = defineModel<string>({ required: true })\n\ndefineOptions({ inheritAttrs: false })\n\nconst contentTypes = computed(() => Object.keys(content ?? {}))\n\nconst selectedOption = computed({\n  get: () =>\n    options.value.find((option) => option.id === selectedContentType.value),\n  set: (option) => {\n    if (option) {\n      selectedContentType.value = option.id\n    }\n  },\n})\n\nconst options = computed(() => {\n  return contentTypes.value.map((type) => ({\n    id: type,\n    label: type,\n  }))\n})\n\n// Content type select style variant based on dropdown availability\nconst contentTypeSelect = cva({\n  base: 'font-normal text-c-2 bg-b-1 py-1 flex items-center gap-1 rounded-full text-xs leading-none border',\n  variants: {\n    dropdown: {\n      true: 'hover:text-c-1 pl-2 pr-1.5 font-medium cursor-pointer',\n      false: 'px-2',\n    },\n  },\n})\n</script>\n<template>\n  <ScalarListbox\n    v-if=\"contentTypes.length > 1\"\n    v-slot=\"{ open }\"\n    v-model=\"selectedOption\"\n    :options=\"options\"\n    placement=\"bottom-end\"\n    teleport\n    @click.stop>\n    <ScalarButton\n      class=\"h-fit\"\n      :class=\"contentTypeSelect({ dropdown: true })\"\n      variant=\"ghost\"\n      v-bind=\"$attrs\"\n      @click.stop>\n      <ScreenReader>Selected Content Type:</ScreenReader>\n      <span>{{ selectedContentType }}</span>\n      <ScalarIconCaretDown\n        class=\"size-2.75 transition-transform duration-100\"\n        :class=\"{ 'rotate-180': open }\"\n        weight=\"bold\" />\n    </ScalarButton>\n  </ScalarListbox>\n  <div\n    v-else\n    class=\"selected-content-type\"\n    :class=\"contentTypeSelect({ dropdown: false })\"\n    v-bind=\"$attrs\"\n    tabindex=\"0\">\n    <span>{{ selectedContentType }}</span>\n  </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { HeaderObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport SchemaProperty from '@/components/Content/Schema/SchemaProperty.vue'\n\nconst { name, header, breadcrumb } = defineProps<{\n  header: HeaderObject\n  name: string\n  breadcrumb?: string[]\n  eventBus: WorkspaceEventBus | null\n  orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n  orderRequiredPropertiesFirst: boolean | undefined\n}>()\n</script>\n<template>\n  <SchemaProperty\n    v-if=\"'schema' in header && header.schema\"\n    :breadcrumb=\"breadcrumb ? [...breadcrumb, 'headers'] : undefined\"\n    :description=\"header.description\"\n    :eventBus=\"eventBus\"\n    :name=\"name\"\n    :options=\"{\n      orderRequiredPropertiesFirst: orderRequiredPropertiesFirst,\n      orderSchemaPropertiesBy: orderSchemaPropertiesBy,\n    }\"\n    :schema=\"getResolvedRef(header.schema)\" />\n</template>\n","<script lang=\"ts\" setup>\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport { ScalarIcon } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { HeaderObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport Header from './Header.vue'\n\nconst { headers, breadcrumb } = defineProps<{\n  headers: Record<string, HeaderObject>\n  breadcrumb?: string[]\n  eventBus: WorkspaceEventBus | null\n  orderRequiredPropertiesFirst: boolean | undefined\n  orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n}>()\n</script>\n<template>\n  <Disclosure v-slot=\"{ open }\">\n    <div\n      class=\"headers-card headers-card--compact\"\n      :class=\"[{ 'headers-card--open': open }]\">\n      <div\n        class=\"headers-properties\"\n        :class=\"{ 'headers-properties-open': open }\">\n        <DisclosureButton\n          class=\"headers-card-title headers-card-title--compact\"\n          :style=\"{\n            top: `calc(var(--refs-viewport-offset)))`,\n          }\">\n          <ScalarIcon\n            class=\"headers-card-title-icon\"\n            :class=\"{ 'headers-card-title-icon--open': open }\"\n            icon=\"Add\"\n            size=\"sm\" />\n          <template v-if=\"open\"> Hide Headers </template>\n          <template v-else> Show Headers </template>\n        </DisclosureButton>\n        <DisclosurePanel>\n          <template\n            v-for=\"(header, key) in headers\"\n            :key=\"key\">\n            <Header\n              :breadcrumb=\"breadcrumb ? [...breadcrumb, 'headers'] : undefined\"\n              :eventBus=\"eventBus\"\n              :header=\"getResolvedRef(header)\"\n              :name=\"key\"\n              :orderRequiredPropertiesFirst=\"orderRequiredPropertiesFirst\"\n              :orderSchemaPropertiesBy=\"orderSchemaPropertiesBy\" />\n          </template>\n        </DisclosurePanel>\n      </div>\n    </div>\n  </Disclosure>\n</template>\n<style scoped>\n.headers-card {\n  z-index: 0;\n  margin-top: 12px;\n  margin-bottom: 6px;\n  position: relative;\n  font-size: var(--scalar-font-size-4);\n  color: var(--scalar-color-1);\n\n  align-self: flex-start;\n}\n.headers-card.headers-card--open {\n  align-self: initial;\n}\n.headers-card-title {\n  padding: 6px 10px;\n\n  display: flex;\n  align-items: center;\n  gap: 4px;\n\n  color: var(--scalar-color-3);\n  font-weight: var(--scalar-semibold);\n  font-size: var(--scalar-micro);\n\n  border-radius: 13.5px;\n}\nbutton.headers-card-title {\n  cursor: pointer;\n}\nbutton.headers-card-title:hover {\n  color: var(--scalar-color-1);\n}\n.headers-card-title-icon--open {\n  transform: rotate(45deg);\n}\n.headers-properties {\n  display: flex;\n  flex-direction: column;\n\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n\n  border-radius: 13.5px;\n  width: fit-content;\n}\n.headers-properties-open > .headers-card-title {\n  border-bottom-left-radius: 0;\n  border-bottom-right-radius: 0;\n  border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.headers-properties-open {\n  border-radius: var(--scalar-radius-lg);\n  width: 100%;\n}\n.headers-card .property:last-of-type {\n  padding-bottom: 10px;\n}\n.headers-card-title > .headers-card-title-icon {\n  width: 14px;\n  height: 14px;\n  margin: 0;\n}\n.headers-card-title > .headers-card-title-icon--open {\n  transform: rotate(45deg);\n}\n</style>\n","import type { ParameterObject, ResponseObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { isObjectLike } from '@scalar/helpers/object/is-object'\n\nconst filterUndefined = (example: unknown): example is unknown => example !== undefined\n\ntype GetParameterExamplesArgs = {\n  parameter: ParameterObject | ResponseObject\n  schemaExamples?: unknown[]\n  contentExamples?: unknown\n}\n\n/**\n * Build a normalized examples array from parameter/content/schema examples.\n * Undefined values are removed so the UI does not render \"undefined\" entries.\n */\nexport const getParameterExamples = ({\n  parameter,\n  schemaExamples,\n  contentExamples,\n}: GetParameterExamplesArgs): unknown[] => {\n  const paramExamples = 'examples' in parameter && isObjectLike(parameter.examples) ? parameter.examples : {}\n\n  const recordExamples = Object.values({\n    ...paramExamples,\n    ...(isObjectLike(contentExamples) ? contentExamples : {}),\n  }).filter(filterUndefined)\n\n  const fallbackExample =\n    recordExamples.length === 0 && 'example' in parameter && parameter.example !== undefined ? [parameter.example] : []\n\n  const arrayExamples = (schemaExamples ?? fallbackExample).filter(filterUndefined)\n\n  return [...recordExamples, ...arrayExamples]\n}\n","<script setup lang=\"ts\">\nimport { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/vue'\nimport {\n  ScalarMarkdown,\n  ScalarMarkdownSummary,\n  ScalarWrappingText,\n} from '@scalar/components'\nimport { ScalarIconCaretRight } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n  ParameterObject,\n  ResponseObject,\n  SchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, ref } from 'vue'\n\nimport { getRefName } from '@/components/Content/Schema/helpers/get-ref-name'\nimport SchemaProperty from '@/components/Content/Schema/SchemaProperty.vue'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\nimport Headers from './Headers.vue'\nimport { getParameterExamples } from './helpers/get-parameter-examples'\n\nconst { name, parameter, options, collapsableItems } = defineProps<{\n  parameter: ParameterObject | ResponseObject\n  name: string\n  breadcrumb?: string[]\n  eventBus: WorkspaceEventBus | null\n  collapsableItems?: boolean\n  options: Pick<\n    OperationProps['options'],\n    'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n  >\n}>()\n\n/** Whether the markdown summary is being truncated */\nconst truncated = ref(false)\n\n/** Responses and params may both have a schema */\nconst schema = computed<SchemaObject | null>(() =>\n  'schema' in parameter && parameter.schema\n    ? getResolvedRef(parameter.schema)\n    : null,\n)\n\n/** Response and params may both have content */\nconst content = computed(() => {\n  if (!('content' in parameter) || !parameter.content) {\n    return null\n  }\n  const keys = Object.keys(parameter.content)\n  if (keys.length === 0) {\n    return null\n  }\n  return parameter.content\n})\n\nconst selectedContentType = ref<string>(\n  Object.keys(content.value || {})[0] ?? '',\n)\n\n/** Response headers */\nconst headers = computed<ResponseObject['headers'] | null>(() =>\n  'headers' in parameter && parameter.headers ? parameter.headers : null,\n)\n\n/** Raw schema (possibly with $ref) for the selected content type or param. */\nconst baseSchema = computed(() =>\n  content.value\n    ? content.value?.[selectedContentType.value]?.schema\n    : 'schema' in parameter && parameter.schema\n      ? parameter.schema\n      : null,\n)\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst schemaModelName = computed(() => {\n  const raw = baseSchema.value\n  if (!raw) {\n    return null\n  }\n\n  if ('$ref' in raw) {\n    return getRefName(raw.$ref)\n  }\n\n  return null\n})\n\n/** Computed value from the combined schema param and content param */\nconst value = computed(() => {\n  const base = baseSchema.value\n  const resolvedBase = content.value ? getResolvedRef(base) : schema.value\n\n  const deprecated =\n    'deprecated' in parameter ? parameter.deprecated : schema.value?.deprecated\n\n  /** Combine param/content/schema examples while ignoring undefined values. */\n  const examples = getParameterExamples({\n    parameter,\n    schemaExamples: schema.value?.examples,\n    contentExamples: content.value?.[selectedContentType.value]?.examples,\n  })\n\n  return {\n    ...resolvedBase,\n    deprecated: deprecated,\n    examples,\n  } as SchemaObject\n})\n\n/**\n * Determines whether this parameter item should be rendered as a collapsible disclosure.\n * Only collapses when collapsableItems is enabled and the parameter has additional\n * content to display (content types, headers, or schema details).\n */\nconst shouldCollapse = computed<boolean>(() =>\n  Boolean(content.value || headers.value || schema.value || truncated.value),\n)\n</script>\n<template>\n  <li class=\"parameter-item group/parameter-item\">\n    <Disclosure v-slot=\"{ open }\">\n      <component\n        :is=\"shouldCollapse ? DisclosureButton : 'div'\"\n        v-if=\"collapsableItems\"\n        class=\"parameter-item-trigger\"\n        :class=\"{ 'parameter-item-trigger-open': open }\">\n        <div class=\"parameter-item-name min-w-0\">\n          <ScalarIconCaretRight\n            v-if=\"shouldCollapse\"\n            class=\"parameter-item-icon size-3 transition-transform duration-100\"\n            :class=\"{ 'rotate-90': open }\"\n            weight=\"bold\" />\n          <div>\n            <ScalarWrappingText\n              preset=\"property\"\n              :text=\"name\" />\n          </div>\n        </div>\n        <ScalarMarkdownSummary\n          v-if=\"!open && parameter.description\"\n          v-model:truncated=\"truncated\"\n          class=\"parameter-item-description-summary min-w-0 flex-1\"\n          controlled\n          :value=\"parameter.description\" />\n        <div\n          v-else\n          class=\"flex-1\" />\n      </component>\n      <div\n        v-if=\"shouldCollapse && content\"\n        class=\"absolute top-[calc(10px+0.5lh)] right-0 z-0 flex -translate-y-1/2 items-center text-base\"\n        :class=\"{\n          'opacity-0 group-focus-within/parameter-item:opacity-100 group-hover/parameter-item:opacity-100':\n            !open,\n        }\">\n        <div\n          class=\"from-b-1 absolute inset-y-0 -left-6 -z-1 w-8 bg-linear-to-l from-40% to-transparent\" />\n        <ContentTypeSelect\n          v-model=\"selectedContentType\"\n          :content=\"content\" />\n      </div>\n      <DisclosurePanel\n        class=\"parameter-item-container parameter-item-container-markdown\"\n        :static=\"!collapsableItems\">\n        <ScalarMarkdown\n          v-if=\"collapsableItems && parameter.description\"\n          class=\"parameter-item-description\"\n          :value=\"parameter.description\" />\n        <!-- Headers -->\n        <Headers\n          v-if=\"headers\"\n          :breadcrumb=\"breadcrumb\"\n          :eventBus=\"eventBus\"\n          :headers=\"headers\"\n          :orderRequiredPropertiesFirst=\"options.orderRequiredPropertiesFirst\"\n          :orderSchemaPropertiesBy=\"options.orderSchemaPropertiesBy\" />\n\n        <!-- Schema -->\n        <SchemaProperty\n          is=\"div\"\n          :breadcrumb=\"breadcrumb\"\n          compact\n          :description=\"collapsableItems ? '' : parameter.description\"\n          :eventBus=\"eventBus\"\n          :hideWriteOnly=\"true\"\n          :modelName=\"schemaModelName\"\n          :name=\"collapsableItems ? '' : name\"\n          :noncollapsible=\"true\"\n          :options=\"{\n            hideWriteOnly: true,\n            orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n            orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n          }\"\n          :required=\"'required' in parameter && parameter.required\"\n          :schema=\"value\" />\n      </DisclosurePanel>\n    </Disclosure>\n  </li>\n</template>\n\n<style scoped>\n.parameter-item {\n  display: flex;\n  flex-direction: column;\n  position: relative;\n  border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.parameter-item:last-of-type .parameter-schema {\n  padding-bottom: 0;\n}\n\n.parameter-item-container {\n  padding: 0;\n}\n\n.parameter-item-headers {\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.parameter-item-name {\n  position: relative;\n  font-weight: var(--scalar-bold);\n  font-size: var(--scalar-font-size-4);\n  font-family: var(--scalar-font-code);\n  color: var(--scalar-color-1);\n  overflow-wrap: break-word;\n}\n\n.parameter-item-description,\n.parameter-item-description-summary {\n  font-size: var(--scalar-mini);\n  color: var(--scalar-color-2);\n}\n\n.parameter-item-description-summary.parameter-item-description-summary > * {\n  --markdown-line-height: var(--scalar-line-height-5);\n}\n\n/* Match font size of markdown for property-detail-value since first child within accordian is displayed as if it were in the markdown section */\n.parameter-item-trigger\n  ~ .parameter-item-container\n  :deep(.property--level-0 > .property-heading .property-detail-value) {\n  font-size: var(--scalar-micro);\n}\n\n.parameter-item-required-optional {\n  color: var(--scalar-color-2);\n  font-weight: var(--scalar-semibold);\n  margin-right: 6px;\n  position: relative;\n}\n\n.parameter-item--required {\n  text-transform: uppercase;\n  font-size: var(--scalar-micro);\n  font-weight: var(--scalar-semibold);\n  color: var(--scalar-color-orange);\n}\n\n.parameter-item-description {\n  margin-top: 6px;\n  font-size: var(--scalar-small);\n  color: var(--scalar-color-2);\n  line-height: 1.4;\n}\n\n.parameter-item-description :deep(p) {\n  margin-top: 4px;\n  font-size: var(--scalar-small);\n  color: var(--scalar-color-2);\n  line-height: 1.4;\n}\n\n.parameter-schema {\n  padding-bottom: 9px;\n  margin-top: 3px;\n}\n\n.parameter-item-trigger {\n  display: flex;\n  align-items: baseline;\n  line-height: var(--scalar-line-height-5);\n  gap: 6px;\n  flex-wrap: wrap;\n  padding: 10px 0;\n  outline: none;\n}\n\n.parameter-item-trigger-open {\n  padding-bottom: 0;\n}\n\n.parameter-item-icon {\n  color: var(--scalar-color-3);\n  left: -19px;\n  top: 0.5lh;\n  translate: 0 -50%;\n  position: absolute;\n}\n\n.parameter-item-trigger:hover .parameter-item-icon,\n.parameter-item-trigger:focus-visible .parameter-item-icon {\n  color: var(--scalar-color-1);\n}\n\n.parameter-item-trigger:focus-visible .parameter-item-icon {\n  outline: 1px solid var(--scalar-color-accent);\n  outline-offset: 2px;\n  border-radius: var(--scalar-radius);\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { useId } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { parameters } = defineProps<{\n  parameters: ParameterObject[]\n  breadcrumb?: string[]\n  eventBus: WorkspaceEventBus | null\n  collapsableItems?: boolean\n  options: Pick<\n    OperationProps['options'],\n    'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n  >\n}>()\n\n/** Accessible id for the heading */\nconst id = useId()\n</script>\n<template>\n  <div\n    v-if=\"parameters?.length\"\n    class=\"mt-6\">\n    <div\n      :id\n      class=\"text-c-1 mt-3 mb-3 text-lg leading-[1.45] font-medium\">\n      <slot name=\"title\" />\n    </div>\n    <ul\n      :aria-labelledby=\"id\"\n      class=\"mb-3 list-none p-0 text-sm\">\n      <ParameterListItem\n        v-for=\"item in parameters\"\n        :key=\"item.name\"\n        :breadcrumb=\"breadcrumb\"\n        :collapsableItems\n        :eventBus=\"eventBus\"\n        :name=\"item.name\"\n        :options=\"options\"\n        :parameter=\"item\" />\n    </ul>\n  </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarMarkdown } from '@scalar/components'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { Schema } from '@/components/Content/Schema'\nimport { isTypeObject } from '@/components/Content/Schema/helpers/is-type-object'\nimport { getModelNameFromSchema } from '@/components/Content/Schema/helpers/schema-name'\nimport {\n  reduceNamesToObject,\n  sortPropertyNames,\n} from '@/components/Content/Schema/helpers/sort-property-names'\nimport LinkButton from '@/components/Content/Schema/LinkButton.vue'\n\nimport ContentTypeSelect from './ContentTypeSelect.vue'\n\nconst { requestBody, options } = defineProps<{\n  breadcrumb?: string[]\n  requestBody?: RequestBodyObject\n  eventBus: WorkspaceEventBus | null\n  options: {\n    orderRequiredPropertiesFirst: boolean | undefined\n    orderSchemaPropertiesBy: 'alpha' | 'preserve' | undefined\n    hideModels: boolean | undefined\n  }\n}>()\n\n/**\n * The maximum number of properties to show in the request body schema.\n */\nconst MAX_VISIBLE_PROPERTIES = 12\n\nconst availableContentTypes = computed(() =>\n  Object.keys(requestBody?.content ?? {}),\n)\n\nconst selectedContentType = defineModel<string>('selectedContentType', {\n  default: 'application/json',\n})\n\nif (requestBody?.content) {\n  if (availableContentTypes.value[0]) {\n    selectedContentType.value = availableContentTypes.value[0]\n  }\n}\n\n/** Raw schema (possibly with $ref) for the selected content type */\nconst rawSchema = computed(\n  () => requestBody?.content?.[selectedContentType.value]?.schema,\n)\n\nconst schema = computed(() => getResolvedRef(rawSchema.value))\n\n/** When the schema is a $ref, preserve its name so the UI can show the ref name instead of just the type. */\nconst modelLink = computed(\n  () => (rawSchema.value && getModelNameFromSchema(rawSchema.value)) ?? null,\n)\n\n/**\n * Splits schema properties into visible and collapsed sections when there are more than 12 properties.\n * Returns null for schemas with fewer properties or non-object schemas.\n */\nconst partitionedSchema = computed(() => {\n  // Early return if not an object schema\n  if (!schema.value || !isTypeObject(schema.value)) {\n    return null\n  }\n\n  // Lets sort the names first\n  const sortedNames = sortPropertyNames(\n    schema.value,\n    schema.value.discriminator,\n    {\n      hideReadOnly: true,\n      orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n      orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n    },\n  )\n\n  if (sortedNames.length <= MAX_VISIBLE_PROPERTIES) {\n    return null\n  }\n\n  // Destructure everything except properties\n  const { properties, ...schemaMetadata } = schema.value\n  if (!properties) {\n    return null\n  }\n\n  return {\n    visibleProperties: {\n      ...schemaMetadata,\n      properties: reduceNamesToObject(\n        sortedNames.slice(0, MAX_VISIBLE_PROPERTIES),\n        properties,\n      ),\n    },\n    collapsedProperties: {\n      ...schemaMetadata,\n      properties: reduceNamesToObject(\n        sortedNames.slice(MAX_VISIBLE_PROPERTIES),\n        properties,\n      ),\n    },\n  }\n})\n\n/**\n * We don't want to render the request body if its completely empty\n * @example\n * {\n *   \"content\": {},\n * }\n */\nconst shouldRenderRequestBody = computed(\n  () =>\n    Object.keys(requestBody?.content ?? {}).length > 0 ||\n    requestBody?.description ||\n    requestBody?.required,\n)\n</script>\n<template>\n  <div\n    v-if=\"requestBody && shouldRenderRequestBody\"\n    aria-label=\"Request Body\"\n    class=\"request-body\"\n    role=\"group\">\n    <div class=\"request-body-header\">\n      <div class=\"request-body-title\">\n        <slot name=\"title\" />\n        <span\n          v-if=\"modelLink\"\n          class=\"text-c-2 text-xs leading-none font-normal\"\n          data-testid=\"request-body-schema-name\">\n          <span class=\"text-c-3 mx-1.5\">·</span>\n          <LinkButton\n            v-if=\"eventBus && modelLink.schemaKey\"\n            @click=\"\n              eventBus.emit('scroll-to:model-by-name', {\n                name: modelLink.schemaKey,\n              })\n            \">\n            {{ modelLink.label }}\n          </LinkButton>\n          <template v-else>{{ modelLink.label }}</template>\n        </span>\n      </div>\n      <div class=\"flex items-center gap-2\">\n        <div\n          v-if=\"requestBody.required\"\n          class=\"request-body-required\">\n          required\n        </div>\n        <ContentTypeSelect\n          v-model=\"selectedContentType\"\n          :content=\"requestBody.content\" />\n      </div>\n      <div\n        v-if=\"requestBody.description\"\n        class=\"request-body-description\">\n        <ScalarMarkdown :value=\"requestBody.description\" />\n      </div>\n    </div>\n\n    <!-- For over 12 properties we want to show 12 and collapse the rest -->\n    <div\n      v-if=\"partitionedSchema\"\n      class=\"request-body-schema\">\n      <Schema\n        :breadcrumb\n        compact\n        :compositionPath=\"['requestBody']\"\n        :eventBus=\"eventBus\"\n        name=\"Request Body\"\n        noncollapsible\n        :options=\"{\n          hideReadOnly: true,\n          orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n          orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n        }\"\n        :schema=\"partitionedSchema.visibleProperties\"\n        schemaContext=\"requestBody\" />\n\n      <Schema\n        additionalProperties\n        :breadcrumb\n        compact\n        :compositionPath=\"['requestBody']\"\n        :eventBus=\"eventBus\"\n        name=\"Request Body\"\n        :options=\"{\n          hideReadOnly: true,\n          orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n          orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n        }\"\n        :schema=\"partitionedSchema.collapsedProperties\"\n        schemaContext=\"requestBody\" />\n    </div>\n\n    <!-- Show em all 12 and under -->\n    <div\n      v-else-if=\"schema\"\n      class=\"request-body-schema\">\n      <Schema\n        :breadcrumb\n        compact\n        :compositionPath=\"['requestBody']\"\n        :eventBus=\"eventBus\"\n        :hideReadOnly=\"true\"\n        name=\"Request Body\"\n        noncollapsible\n        :options=\"{\n          hideReadOnly: true,\n          orderRequiredPropertiesFirst: options.orderRequiredPropertiesFirst,\n          orderSchemaPropertiesBy: options.orderSchemaPropertiesBy,\n        }\"\n        :schema=\"schema\"\n        schemaContext=\"requestBody\" />\n    </div>\n  </div>\n</template>\n\n<style scoped>\n.request-body {\n  margin-top: 24px;\n}\n.request-body-header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding-bottom: 12px;\n  border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n  flex-flow: wrap;\n}\n.request-body-title {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  font-size: var(--scalar-font-size-2);\n  font-weight: var(--scalar-semibold);\n  color: var(--scalar-color-1);\n}\n.request-body-required {\n  font-size: var(--scalar-micro);\n  color: var(--scalar-color-orange);\n  font-weight: normal;\n  border-radius: 16px;\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  padding: 2px 8px;\n  height: 20px;\n}\n.request-body-description {\n  margin-top: 6px;\n  font-size: var(--scalar-small);\n  width: 100%;\n}\n\n.request-body-header\n  + .request-body-schema:has(> .schema-card > .schema-card-description),\n.request-body-header\n  + .request-body-schema:has(\n    > .schema-card > .schema-properties > * > .property--level-0\n  ) {\n  /** Add a bit of space between the heading border and the schema description or properties */\n  padding-top: 8px;\n}\n.request-body-description :deep(.markdown) * {\n  color: var(--scalar-color-2) !important;\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n  ParameterObject,\n  ReferenceType,\n  RequestBodyObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { flattenDeepObjectQueryParameter } from '@/features/Operation/helpers/flatten-deep-object-query-parameter'\nimport { shouldIgnoreEntity } from '@/features/Operation/helpers/should-ignore-entity'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterList from './ParameterList.vue'\nimport RequestBody from './RequestBody.vue'\n\nconst { parameters = [], requestBody } = defineProps<{\n  breadcrumb?: string[]\n  parameters?: ReferenceType<ParameterObject>[]\n  requestBody?: RequestBodyObject | undefined\n  eventBus: WorkspaceEventBus | null\n  options: Pick<\n    OperationProps['options'],\n    'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n  >\n}>()\n\n/** Thread the selected request body content type up to the layout */\nconst selectedContentType = defineModel<string>('selectedContentType')\n\ntype ParameterLocation = 'cookie' | 'header' | 'path' | 'query'\n\n/** Use a single loop to reduce parameters by type(in) */\nconst splitParameters = computed(() =>\n  (parameters ?? []).reduce(\n    (acc, p) => {\n      const parameter = getResolvedRef(p)\n      // Filter out ignored parameters\n      if (!shouldIgnoreEntity(parameter)) {\n        const flattenedParameters = flattenDeepObjectQueryParameter(parameter)\n        flattenedParameters.forEach((flattenedParameter) => {\n          acc[flattenedParameter.in as ParameterLocation].push(\n            flattenedParameter,\n          )\n        })\n      }\n      return acc\n    },\n    { cookie: [], header: [], path: [], query: [] } as Record<\n      'cookie' | 'header' | 'path' | 'query',\n      ParameterObject[]\n    >,\n  ),\n)\n</script>\n<template>\n  <!-- Path parameters-->\n  <ParameterList\n    :breadcrumb=\"breadcrumb ? [...breadcrumb, 'path'] : undefined\"\n    :eventBus=\"eventBus\"\n    :options=\"options\"\n    :parameters=\"splitParameters['path']\">\n    <template #title>Path Parameters</template>\n  </ParameterList>\n\n  <!-- Query parameters -->\n  <ParameterList\n    :breadcrumb=\"breadcrumb ? [...breadcrumb, 'query'] : undefined\"\n    :eventBus=\"eventBus\"\n    :options=\"options\"\n    :parameters=\"splitParameters['query']\">\n    <template #title>Query Parameters</template>\n  </ParameterList>\n\n  <!-- Headers -->\n  <ParameterList\n    :breadcrumb=\"breadcrumb ? [...breadcrumb, 'headers'] : undefined\"\n    :eventBus=\"eventBus\"\n    :options=\"options\"\n    :parameters=\"splitParameters['header']\">\n    <template #title>Headers</template>\n  </ParameterList>\n\n  <!-- Cookies -->\n  <ParameterList\n    :breadcrumb=\"breadcrumb ? [...breadcrumb, 'cookies'] : undefined\"\n    :eventBus=\"eventBus\"\n    :options=\"options\"\n    :parameters=\"splitParameters['cookie']\">\n    <template #title>Cookies</template>\n  </ParameterList>\n\n  <!-- Request body -->\n  <RequestBody\n    v-if=\"requestBody\"\n    v-model:selectedContentType=\"selectedContentType\"\n    :breadcrumb=\"breadcrumb ? [...breadcrumb, 'body'] : undefined\"\n    :eventBus=\"eventBus\"\n    :options=\"options\"\n    :requestBody=\"requestBody\">\n    <template #title>Body</template>\n  </RequestBody>\n</template>\n","/**\n * Check if an entity should be ignored\n */\nexport const shouldIgnoreEntity = (data: { 'x-internal'?: boolean; 'x-scalar-ignore'?: boolean }) =>\n  Boolean(data?.['x-internal'] || data?.['x-scalar-ignore'])\n","<script setup lang=\"ts\">\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport ParameterListItem from './ParameterListItem.vue'\n\nconst { responses } = defineProps<{\n  responses: OperationObject['responses']\n  breadcrumb?: string[]\n  collapsableItems?: boolean\n  eventBus: WorkspaceEventBus | null\n  options: Pick<\n    OperationProps['options'],\n    'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n  >\n}>()\n</script>\n<template>\n  <div\n    v-if=\"Object.keys(responses ?? {}).length\"\n    class=\"mt-6\">\n    <div class=\"text-c-1 mt-3 mb-3 leading-[1.45] font-medium\">Responses</div>\n    <ul\n      aria-label=\"Responses\"\n      class=\"mb-3 list-none p-0 text-sm\">\n      <ParameterListItem\n        v-for=\"(response, status) in responses\"\n        :key=\"status\"\n        :breadcrumb\n        :collapsableItems\n        :eventBus\n        :name=\"status\"\n        :options\n        :parameter=\"getResolvedRef(response)\" />\n    </ul>\n  </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconCaretRight } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { type OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { HttpMethod } from '@/components/HttpMethod'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nconst { method, name, url, options } = defineProps<{\n  callback: OperationObject\n  method: HttpMethodType\n  name: string\n  url: string\n  eventBus: WorkspaceEventBus | null\n  options: Pick<\n    OperationProps['options'],\n    'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n  >\n}>()\n</script>\n\n<template>\n  <details class=\"group callback-list-item\">\n    <!-- Title -->\n    <summary\n      class=\"font-code bg-b-1 callback-sticky-offset callback-list-item-title sticky flex cursor-pointer flex-row items-start gap-2 border-t py-2.5 text-sm group-open:flex-wrap\">\n      <ScalarIconCaretRight\n        class=\"callback-list-item-icon text-c-3 group-hover:text-c-1 absolute top-3.5 -left-5 size-3 transition-transform duration-100 group-open:rotate-90\"\n        weight=\"bold\" />\n      <HttpMethod\n        as=\"span\"\n        class=\"request-method py-0.75 font-bold\"\n        :method=\"method\" />\n      <div\n        class=\"text-c-1 min-w-0 flex-1 truncate text-sm leading-5 font-bold group-open:whitespace-normal\">\n        {{ name }}\n        <span class=\"text-c-2 font-normal\">\n          {{ url }}\n        </span>\n      </div>\n    </summary>\n\n    <!-- Body -->\n    <div class=\"callback-operation-container flex flex-col gap-2\">\n      <OperationParameters\n        :eventBus=\"eventBus\"\n        :options=\"options\"\n        :parameters=\"\n          callback.parameters?.map((param) => getResolvedRef(param)) ?? []\n        \"\n        :requestBody=\"getResolvedRef(callback.requestBody)\" />\n\n      <!-- Responses -->\n      <OperationResponses\n        :collapsableItems=\"false\"\n        :eventBus\n        :options\n        :responses=\"callback.responses\" />\n    </div>\n  </details>\n</template>\n<style scoped>\n.callback-sticky-offset {\n  top: var(--refs-viewport-offset, 0px);\n  z-index: 1;\n}\n.callback-operation-container :deep(.request-body),\n.callback-operation-container :deep(.request-body-description),\n.callback-operation-container :deep(.request-body-header) {\n  margin-top: 0;\n}\n.callback-operation-container :deep(.request-body-header) {\n  --scalar-font-size-2: var(--scalar-font-size-4);\n  padding: 10px;\n  border-bottom: none;\n  border: 0.5px solid var(--scalar-border-color);\n  border-radius: var(--scalar-radius-lg) var(--scalar-radius-lg) 0 0;\n  background: color-mix(in srgb, var(--scalar-background-2) 50%, transparent);\n}\n.callback-operation-container\n  :deep(.request-body-schema > .schema-card > .schema-card-description) {\n  padding-inline: 8px;\n}\n.callback-operation-container :deep(ul li.property.property--level-1) {\n  padding: 10px;\n}\n.callback-operation-container :deep(.request-body-schema) {\n  background-color: var(--scalar-background-1);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-top: none;\n  overflow: hidden;\n  border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n.callback-operation-container :deep(.parameter-list) {\n  margin-top: 0;\n}\n.callback-operation-container :deep(.parameter-list-title) {\n  background: color-mix(in srgb, var(--scalar-background-2) 50%, transparent);\n  border-radius: var(--scalar-radius-lg) var(--scalar-radius-lg) 0 0;\n  padding: 10px;\n  margin-bottom: 0;\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-bottom: none;\n  --scalar-font-size-2: var(--scalar-font-size-4);\n}\n.callback-operation-container :deep(.parameter-list-items) {\n  /* background: pink; */\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n.callback-operation-container :deep(.parameter-list-items > li:first-of-type) {\n  border-top: none;\n}\n.callback-operation-container :deep(.parameter-list-items > li) {\n  padding: 0 8px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { isHttpMethod } from '@scalar/helpers/http/is-http-method'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n  CallbackObject,\n  OperationObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\n\nimport Callback from './Callback.vue'\n\nconst { path, callbacks, options } = defineProps<{\n  path: string\n  callbacks: CallbackObject\n  eventBus: WorkspaceEventBus | null\n  options: Pick<\n    OperationProps['options'],\n    'hideModels' | 'orderRequiredPropertiesFirst' | 'orderSchemaPropertiesBy'\n  >\n}>()\n\ntype CallbackType = {\n  name: string\n  url: string\n  method: HttpMethod\n  callback: OperationObject\n}\n\n/** Extract the callbacks with method, url, and name */\nconst flattenedCallbacks = computed<CallbackType[]>(() => {\n  const _callbacks: CallbackType[] = []\n\n  // Loop over the name level\n  objectEntries(callbacks).forEach(([name, pathItem]) => {\n    // Loop over the url level\n    objectEntries(getResolvedRef(pathItem)).forEach(([url, methods]) => {\n      if (typeof methods !== 'object' || !methods) {\n        return\n      }\n\n      // Loop over the method level\n      objectEntries(methods).forEach(([callbackMethod, callback]) => {\n        if (!isHttpMethod(callbackMethod)) {\n          return\n        }\n\n        _callbacks.push({\n          name,\n          url,\n          method: callbackMethod,\n          callback: callback,\n        })\n      })\n    })\n  })\n\n  return _callbacks\n})\n</script>\n\n<template>\n  <div\n    aria-label=\"Callbacks\"\n    class=\"callbacks-list gap-3\"\n    role=\"group\">\n    <div class=\"callbacks-title text-c-1 my-3 text-lg font-medium\">\n      Callbacks\n    </div>\n    <Callback\n      v-for=\"{ callback, method, name, url } in flattenedCallbacks\"\n      :key=\"`${name}-${url}-${method}`\"\n      :callback\n      :eventBus\n      :method\n      :name\n      :options\n      :path\n      :url />\n  </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { Component } from 'vue'\n\nimport type { RequiredSecurityScheme } from '@/features/Operation/helpers/get-required-security'\n\nconst { is = 'li', scheme } = defineProps<{\n  is?: Component | string\n  scheme: RequiredSecurityScheme\n}>()\n</script>\n<template>\n  <component\n    :is\n    class=\"markdown\">\n    {{ scheme.name }}\n    <code v-if=\"scheme.scheme?.type\">{{ scheme.scheme.type }}</code>\n    <ul v-if=\"scheme.scopes.length\">\n      <li\n        v-for=\"scope in scheme.scopes\"\n        :key=\"scope\"\n        class=\"font-code text-c-2\">\n        {{ scope }}\n      </li>\n    </ul>\n  </component>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarPopover } from '@scalar/components'\nimport { ScalarIconLockSimple, ScalarIconLockSimpleOpen } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport SecurityRequirementBadgeScheme from '@/features/Operation/components/SecurityRequirementBadgeScheme.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\n\nconst { requiredSecurity, hideLabel = false } = defineProps<{\n  requiredSecurity: RequiredSecurity\n  hideLabel?: boolean\n}>()\n\nconst label = computed(() =>\n  requiredSecurity.state === 'required' ? 'Auth Required' : 'Auth Optional',\n)\n\nconst verb = computed(() =>\n  requiredSecurity.state === 'required' ? 'Requires' : 'Accepts',\n)\n\n/** Single group, single scheme — shown inline in the header. */\nconst isSingleScheme = computed(\n  () =>\n    requiredSecurity.requirements.length === 1 &&\n    requiredSecurity.requirements[0]?.schemes.length === 1,\n)\n\n/** Single group with multiple schemes — all must be satisfied (AND). */\nconst isAndGroup = computed(\n  () =>\n    requiredSecurity.requirements.length === 1 &&\n    (requiredSecurity.requirements[0]?.schemes.length ?? 0) > 1,\n)\n\n/** Multiple groups — any one group satisfies authentication (OR). */\nconst isOrAlternatives = computed(\n  () => requiredSecurity.requirements.length > 1,\n)\n</script>\n\n<template>\n  <ScalarPopover\n    v-if=\"requiredSecurity.state !== 'none'\"\n    placement=\"bottom-end\">\n    <button\n      class=\"security-requirement-badge inline-flex w-fit items-center justify-center gap-1 text-sm\"\n      :class=\"\n        requiredSecurity.state === 'optional'\n          ? 'text-c-2'\n          : 'text-c-1 font-medium'\n      \"\n      type=\"button\"\n      @click.stop>\n      <ScalarIconLockSimple\n        v-if=\"requiredSecurity.state === 'required'\"\n        class=\"size-3\"\n        weight=\"bold\" />\n      <ScalarIconLockSimpleOpen\n        v-else\n        class=\"size-3\"\n        weight=\"bold\" />\n      <span v-if=\"!hideLabel\">{{ label }}</span>\n    </button>\n    <template #popover>\n      <div class=\"flex max-w-xs min-w-48 flex-col gap-1.5 p-2 text-sm\">\n        <div class=\"font-medium\">\n          {{ verb }}\n          <template v-if=\"isSingleScheme\">\n            <SecurityRequirementBadgeScheme\n              is=\"span\"\n              class=\"contents\"\n              :scheme=\"requiredSecurity.requirements[0]!.schemes[0]!\" />\n          </template>\n          <template v-else-if=\"isOrAlternatives\">one of:</template>\n          <template v-else-if=\"isAndGroup\">all of:</template>\n          <template v-else>authentication</template>\n        </div>\n\n        <!-- Multiple OR alternatives -->\n        <ul\n          v-if=\"isOrAlternatives\"\n          class=\"contents\">\n          <li\n            v-for=\"(group, gi) in requiredSecurity.requirements\"\n            :key=\"gi\"\n            class=\"markdown\">\n            <!-- Single scheme in this OR branch -->\n            <SecurityRequirementBadgeScheme\n              is=\"span\"\n              v-if=\"group.schemes.length === 1\"\n              class=\"contents\"\n              :scheme=\"group.schemes[0]!\" />\n            <!-- Multiple AND schemes in this OR branch -->\n            <template v-else>\n              <ul class=\"contents\">\n                <SecurityRequirementBadgeScheme\n                  v-for=\"(scheme, si) in group.schemes\"\n                  :key=\"si\"\n                  :scheme />\n              </ul>\n            </template>\n          </li>\n        </ul>\n\n        <!-- Single group, multiple AND schemes -->\n        <ul\n          v-else-if=\"isAndGroup\"\n          class=\"contents\">\n          <SecurityRequirementBadgeScheme\n            v-for=\"(scheme, key) in requiredSecurity.requirements[0]!.schemes\"\n            :key\n            :scheme />\n        </ul>\n      </div>\n    </template>\n  </ScalarPopover>\n</template>\n","import { XScalarStability } from '@scalar/types/legacy'\n\ntype OperationStability = {\n  deprecated?: boolean\n  'x-scalar-stability'?: unknown\n}\n\n/**\n * Returns true if an operation is considered deprecated.\n */\nexport const isOperationDeprecated = (operation: OperationStability): boolean =>\n  operation.deprecated || operation['x-scalar-stability'] === XScalarStability.Deprecated\n\n/**\n * Get operation stability from deprecated or x-scalar-stability\n */\nexport const getOperationStability = (operation: OperationStability): XScalarStability | undefined =>\n  operation.deprecated ? XScalarStability.Deprecated : (operation['x-scalar-stability'] as XScalarStability | undefined)\n\n/**\n * Get Operation stability tailwind color class\n */\nexport const getOperationStabilityColor = (operation: OperationStability): string => {\n  switch (getOperationStability(operation)) {\n    case XScalarStability.Deprecated:\n      return 'text-red'\n    case XScalarStability.Experimental:\n      return 'text-orange'\n    case XScalarStability.Stable:\n      return 'text-green'\n    default:\n      return ''\n  }\n}\n","<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nconst {\n  id,\n  method,\n  path,\n  eventBus,\n  exampleName,\n  requestBodyCompositionSelection,\n} = defineProps<{\n  id: string\n  method: HttpMethod\n  path: string\n  eventBus: WorkspaceEventBus\n  exampleName?: string\n  requestBodyCompositionSelection?: Record<string, number>\n}>()\n\n/** Route via ID and optionally with example name */\nconst handleClick = () => {\n  // Include exampleName in payload if provided\n  const payload = {\n    id,\n    ...(exampleName && { exampleName }),\n    ...(requestBodyCompositionSelection &&\n      Object.keys(requestBodyCompositionSelection).length > 0 && {\n        requestBodyCompositionSelection,\n      }),\n  }\n  eventBus.emit('ui:open:client-modal', payload)\n}\n</script>\n<template>\n  <!-- Render the Test Request Button -->\n  <button\n    class=\"show-api-client-button\"\n    :method=\"method\"\n    type=\"button\"\n    @click.stop=\"handleClick\">\n    <ScalarIconPlay\n      class=\"size-3\"\n      weight=\"fill\" />\n    <span>Test Request</span>\n    <ScreenReader>({{ method }} {{ path }})</ScreenReader>\n  </button>\n</template>\n<style scoped>\n.show-api-client-button {\n  appearance: none;\n  border: none;\n  padding: 1px 6px;\n  white-space: nowrap;\n  border-radius: var(--scalar-radius);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  font-weight: var(--scalar-semibold);\n  font-size: var(--scalar-small);\n  line-height: 22px;\n  color: var(--scalar-background-2);\n  font-family: var(--scalar-font);\n  background: var(--scalar-button-1);\n  position: relative;\n  cursor: pointer;\n  box-sizing: border-box;\n  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n\n  outline-offset: 2px;\n}\n.show-api-client-button span,\n.show-api-client-button svg {\n  fill: currentColor;\n  color: var(--scalar-button-1-color);\n  z-index: 1;\n}\n.show-api-client-button:hover {\n  background: var(--scalar-button-1-hover);\n}\n.show-api-client-button svg {\n  margin-right: 4px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { XBadge } from '@scalar/workspace-store/schemas/extensions/operation'\nimport { computed } from 'vue'\n\nimport { Badge } from '@/components/Badge'\n\nconst { position, badges } = defineProps<{\n  position: 'before' | 'after'\n  badges: XBadge[] | unknown\n}>()\n\nconst filteredBadges = computed<XBadge[]>(() => {\n  if (Array.isArray(badges)) {\n    return badges.filter(\n      (badge) =>\n        badge.position === position ||\n        (position === 'after' && !badge.position),\n    )\n  }\n\n  return []\n})\n</script>\n\n<template>\n  <template v-if=\"filteredBadges.length\">\n    <template\n      v-for=\"badge in filteredBadges\"\n      :key=\"badge.name\">\n      <Badge :color=\"badge.color\">\n        {{ badge.name }}\n      </Badge>\n    </template>\n  </template>\n</template>\n","<script setup lang=\"ts\">\nimport { OperationCodeSample } from '@scalar/api-client/blocks/operation-code-sample'\nimport {\n  ScalarErrorBoundary,\n  ScalarIconButton,\n  ScalarMarkdown,\n} from '@scalar/components'\nimport {\n  ScalarIconCopy,\n  ScalarIconPlay,\n  ScalarIconWebhooksLogo,\n} from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n  OperationObject,\n  ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { HttpMethod } from '@/components/HttpMethod'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport { SectionAccordion } from '@/components/Section'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n  getOperationStability,\n  getOperationStabilityColor,\n  isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n  REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n  type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n  clientOptions,\n  eventBus,\n  isWebhook,\n  method,\n  operation,\n  options,\n  path,\n  requiredSecurity,\n  selectedServer,\n  selectedSecuritySchemes,\n  selectedClient,\n} = defineProps<\n  Omit<\n    OperationProps,\n    'document' | 'pathValue' | 'server' | 'securitySchemes' | 'authStore'\n  > & {\n    /** Operation object with path params */\n    operation: OperationObject\n    /** The selected server for the operation */\n    selectedServer: ServerObject | null\n    /** The selected security schemes for the operation */\n    selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n    /** Required/optional security state for the badge next to the path */\n    requiredSecurity: RequiredSecurity\n  }\n>()\n\nconst operationTitle = computed(() => operation.summary || path || '')\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the currently selected example for passing to the modal */\nconst selectedExampleKey = ref<string>('')\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n  (): RequestBodyCompositionSelection => ({\n    ...requestBodyCompositionSelection.value,\n  }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n  JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n  <SectionAccordion\n    :id=\"id\"\n    :aria-label=\"operationTitle\"\n    class=\"reference-endpoint\"\n    :modelValue=\"!isCollapsed\"\n    transparent\n    @update:modelValue=\"\n      (value) => eventBus?.emit('toggle:nav-item', { id, open: value })\n    \">\n    <template #title>\n      <div class=\"operation-title\">\n        <div class=\"operation-details\">\n          <HttpMethod\n            class=\"endpoint-type\"\n            :method=\"method\"\n            short />\n          <Anchor\n            class=\"endpoint-anchor\"\n            @copyAnchorUrl=\"() => eventBus?.emit('copy-url:nav-item', { id })\">\n            <h3 class=\"endpoint-label\">\n              <div class=\"endpoint-label-path\">\n                <OperationPath\n                  :deprecated=\"isOperationDeprecated(operation)\"\n                  :path=\"path\" />\n              </div>\n              <div class=\"endpoint-label-name\">\n                {{ operationTitle }}\n              </div>\n              <!-- Stability badge -->\n              <Badge\n                v-if=\"getOperationStability(operation)\"\n                class=\"capitalize\"\n                :class=\"getOperationStabilityColor(operation)\">\n                {{ getOperationStability(operation) }}\n              </Badge>\n\n              <!-- Webhook badge -->\n              <Badge\n                v-if=\"isWebhook\"\n                class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n                <ScalarIconWebhooksLogo weight=\"bold\" />Webhook\n              </Badge>\n\n              <!-- x-badges before -->\n              <XBadges\n                :badges=\"operation['x-badges']\"\n                position=\"before\" />\n            </h3>\n          </Anchor>\n        </div>\n      </div>\n    </template>\n    <template #actions=\"{ active }\">\n      <!-- Required auth indicator -->\n      <SecurityRequirementBadge\n        hideLabel\n        :requiredSecurity />\n      <!-- x-badges after -->\n      <XBadges\n        :badges=\"operation['x-badges']\"\n        position=\"after\" />\n      <template v-if=\"!options.hideTestRequestButton\">\n        <TestRequestButton\n          v-if=\"active && !isWebhook\"\n          :id\n          :eventBus\n          :exampleName=\"selectedExampleKey\"\n          :method\n          :path\n          :requestBodyCompositionSelection=\"\n            requestBodyCompositionSelectionForCodeSample\n          \" />\n        <ScalarIconPlay\n          v-else\n          class=\"endpoint-try-hint size-4.5\" />\n      </template>\n      <span\n        v-if=\"options.showOperationId && operation.operationId\"\n        class=\"font-code text-sm\">\n        {{ operation.operationId }}\n      </span>\n      <ScalarIconButton\n        class=\"endpoint-copy p-0.5\"\n        :icon=\"ScalarIconCopy\"\n        label=\"Copy endpoint URL\"\n        size=\"xs\"\n        variant=\"ghost\"\n        @click.stop=\"copyToClipboard(path)\" />\n    </template>\n    <template\n      v-if=\"operation.description\"\n      #description>\n      <ScalarMarkdown\n        :anchorPrefix=\"id\"\n        aria-label=\"Operation Description\"\n        role=\"group\"\n        transformType=\"heading\"\n        :value=\"operation.description\"\n        withAnchors\n        withImages />\n    </template>\n    <div class=\"endpoint-content\">\n      <div class=\"operation-details-card\">\n        <div\n          v-if=\"Object.keys(operationExtensions).length > 0\"\n          class=\"operation-details-card-item\">\n          <SpecificationExtension :value=\"operationExtensions\" />\n        </div>\n        <div class=\"operation-details-card-item\">\n          <OperationParameters\n            v-model:selectedContentType=\"selectedRequestBodyContentType\"\n            :eventBus\n            :options\n            :parameters=\"operation.parameters\"\n            :requestBody=\"getResolvedRef(operation.requestBody)\" />\n        </div>\n        <div class=\"operation-details-card-item\">\n          <OperationResponses\n            :eventBus\n            :options\n            :responses=\"operation.responses\" />\n        </div>\n\n        <!-- Callbacks -->\n        <div\n          v-if=\"operation?.callbacks\"\n          class=\"operation-details-card-item\">\n          <Callbacks\n            :callbacks=\"operation.callbacks\"\n            :eventBus\n            :options\n            :path />\n        </div>\n      </div>\n\n      <ExampleResponses\n        v-if=\"operation.responses\"\n        class=\"operation-example-card\"\n        :responses=\"operation.responses\" />\n\n      <!-- New Example Request -->\n      <div>\n        <!-- External Docs -->\n        <LinkList v-if=\"operation.externalDocs\">\n          <ExternalDocs :value=\"operation.externalDocs\" />\n        </LinkList>\n        <!-- Request Example -->\n        <ScalarErrorBoundary>\n          <OperationCodeSample\n            :key=\"requestBodyCompositionSelectionKey\"\n            v-model:selectedExample=\"selectedExampleKey\"\n            class=\"operation-example-card\"\n            :clientOptions\n            :eventBus\n            fallback\n            :isWebhook\n            :method\n            :operation\n            :path\n            :requestBodyCompositionSelection=\"\n              requestBodyCompositionSelectionForCodeSample\n            \"\n            :securitySchemes=\"selectedSecuritySchemes\"\n            :selectedClient\n            :selectedContentType=\"selectedRequestBodyContentType\"\n            :selectedServer />\n        </ScalarErrorBoundary>\n      </div>\n    </div>\n  </SectionAccordion>\n</template>\n\n<style scoped>\n@reference \"@/style.css\";\n\n.operation-title {\n  display: flex;\n  justify-content: space-between;\n}\n.operation-details {\n  display: flex;\n  align-items: center;\n  margin-top: 0;\n  gap: 9px;\n\n  min-width: 0;\n  flex-shrink: 1;\n}\n.operation-details :deep(.endpoint-anchor .scalar-button svg) {\n  width: 16px;\n  height: 16px;\n}\n.endpoint-type {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n\n  position: relative;\n  z-index: 0;\n\n  width: 60px;\n  padding: 6px;\n  flex-shrink: 0;\n\n  font-size: var(--scalar-small);\n\n  text-transform: uppercase;\n  font-weight: var(--scalar-bold);\n  font-family: var(--scalar-font);\n}\n.endpoint-type::after {\n  content: '';\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n\n  background: currentColor;\n  opacity: 0.15;\n\n  border-radius: var(--scalar-radius);\n}\n\n.endpoint-anchor {\n  display: flex;\n  align-items: center;\n  min-width: 0;\n  flex-shrink: 1;\n}\n.endpoint-anchor.label {\n  display: flex;\n}\n.endpoint-label {\n  display: flex;\n  align-items: baseline;\n  gap: 9px;\n\n  min-width: 0;\n  flex-shrink: 1;\n\n  color: var(--scalar-color-1);\n}\n\n.endpoint-label-path {\n  font-family: var(--scalar-font-code);\n  font-size: var(--scalar-mini);\n\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n}\n.endpoint-label-path :deep(em) {\n  color: var(--scalar-color-2);\n}\n.endpoint-label-name {\n  color: var(--scalar-color-2);\n  font-size: var(--scalar-small);\n\n  /* Concatenate the name before we shrink the path */\n  flex-shrink: 1000000000;\n\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  overflow: hidden;\n}\n\n.endpoint-try-hint {\n  padding: 2px;\n  flex-shrink: 0;\n}\n.endpoint-copy {\n  color: currentColor;\n}\n.endpoint-copy :deep(svg) {\n  stroke-width: 2px;\n}\n\n.endpoint-content {\n  display: grid;\n  grid-auto-columns: 1fr;\n  grid-auto-flow: row;\n  gap: 9px;\n  padding: 9px;\n}\n\n@variant lg {\n  .endpoint-content {\n    grid-auto-flow: column;\n  }\n}\n\n@container (max-width: 900px) {\n  .endpoint-content {\n    grid-template-columns: 1fr;\n  }\n}\n\n.endpoint-content > * {\n  min-width: 0;\n}\n\n.operation-details-card {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  min-width: 0;\n}\n.operation-details-card-item :deep(.parameter-list),\n.operation-details-card-item :deep(.callbacks-list) {\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n  border-radius: var(--scalar-radius-lg);\n  margin-top: 0;\n}\n\n.operation-details-card-item {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n}\n\n.operation-details-card-item :deep(.parameter-list-items) {\n  margin-bottom: 0;\n}\n.operation-details-card :deep(.parameter-item:last-of-type .parameter-schema) {\n  padding-bottom: 12px;\n}\n.operation-details-card :deep(.parameter-list .parameter-list) {\n  margin-bottom: 12px;\n}\n.operation-details-card :deep(.parameter-item) {\n  margin: 0;\n  padding: 0;\n}\n.operation-details-card :deep(.property) {\n  padding: 9px;\n  margin: 0;\n}\n.operation-details-card :deep(.parameter-list-title),\n.operation-details-card :deep(.request-body-title),\n.operation-details-card :deep(.callbacks-title) {\n  text-transform: uppercase;\n  font-weight: var(--scalar-bold);\n  font-size: var(--scalar-mini);\n  color: var(--scalar-color-2);\n  line-height: 1.33;\n  padding: 9px;\n  margin: 0;\n}\n\n.operation-details-card :deep(.callback-list-item-title) {\n  padding-left: 28px;\n  padding-right: 12px;\n}\n\n.operation-details-card :deep(.callback-list-item-icon) {\n  left: 6px;\n}\n\n.operation-details-card :deep(.callback-operation-container) {\n  padding-inline: 9px;\n  padding-bottom: 9px;\n}\n\n.operation-details-card :deep(.callback-operation-container > .request-body),\n.operation-details-card :deep(.callback-operation-container > .parameter-list) {\n  border: none;\n}\n\n.operation-details-card\n  :deep(.callback-operation-container > .request-body > .request-body-header) {\n  padding: 0;\n  padding-bottom: 9px;\n  border-bottom: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.operation-details-card :deep(.request-body-description) {\n  margin-top: 0;\n  padding: 9px 9px 0 9px;\n  border-top: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n\n.operation-details-card :deep(.request-body) {\n  margin-top: 0;\n  border-radius: var(--scalar-radius-lg);\n  border: var(--scalar-border-width) solid var(--scalar-border-color);\n}\n.operation-details-card\n  :deep(.request-body .schema-card--level-0 > .schema-card-description) {\n  padding-inline: 9px;\n}\n\n.operation-details-card :deep(.request-body-header) {\n  padding-bottom: 0;\n  border-bottom: 0;\n}\n\n.operation-details-card :deep(.contents button) {\n  margin-right: 9px;\n}\n\n.operation-details-card\n  :deep(.schema-card--open + .schema-card:not(.schema-card--open)) {\n  margin-inline: 9px;\n  margin-bottom: 9px;\n}\n.operation-details-card :deep(.request-body-schema .property--level-0) {\n  padding: 0;\n}\n.operation-details-card :deep(.request-body-schema .property--level-0) {\n  padding: 0;\n}\n\n.operation-details-card :deep(.selected-content-type) {\n  margin-right: 9px;\n}\n\n.operation-example-card {\n  position: sticky;\n  top: calc(var(--refs-viewport-offset) + 24px);\n  max-height: calc(var(--refs-viewport-height) - 48px);\n}\n\n@media (max-width: 600px) {\n  .operation-example-card {\n    max-height: unset;\n    position: static;\n  }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { ScalarIconArrowUp, ScalarIconSparkle } from '@scalar/icons'\nimport { ref } from 'vue'\n\nimport { useAgentContext } from '@/hooks/use-agent'\n\nconst agentContext = useAgentContext()\n\nconst message = ref('')\nconst inputRef = ref<HTMLInputElement>()\n\nfunction handleSubmit() {\n  agentContext.value?.openAgent(message.value)\n  message.value = ''\n}\n</script>\n<template>\n  <form\n    v-if=\"agentContext?.agentEnabled.value\"\n    class=\"agent-button-container\"\n    @click=\"inputRef?.focus()\"\n    @submit.prevent=\"handleSubmit()\">\n    <ScalarIconSparkle\n      class=\"size-3 shrink-0\"\n      weight=\"fill\" />\n    <div class=\"ask-agent-scalar-input-label\">Ask AI Agent</div>\n    <input\n      ref=\"inputRef\"\n      v-model=\"message\"\n      class=\"ask-agent-scalar-input\"\n      :class=\"{ 'ask-agent-scalar-input-not-empty': message.length > 0 }\"\n      placeholder=\"Ask AI Agent\" />\n    <button\n      class=\"ask-agent-scalar-send\"\n      type=\"submit\">\n      <ScalarIconArrowUp\n        class=\"size-3\"\n        weight=\"bold\" />\n    </button>\n  </form>\n</template>\n<style scoped>\n/** Container */\n.agent-button-container {\n  position: relative;\n  color: var(--scalar-color-1);\n  background: color-mix(in srgb, var(--scalar-background-3), white 15%);\n  display: flex;\n  align-items: center;\n  cursor: pointer;\n  padding: 1px 6px;\n  margin-right: 4px;\n  border-radius: var(--scalar-radius);\n  z-index: 2;\n  height: 100%;\n}\n.agent-button-container:hover:not(:focus-within) {\n  background: color-mix(in srgb, var(--scalar-background-3), white 20%);\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty),\n.agent-button-container:focus-within {\n  position: absolute;\n  inset: 2px;\n  border-radius: var(--scalar-radius-lg);\n  margin-right: 0;\n  height: auto;\n}\n.agent-button-container:has(.ask-agent-scalar-input:focus-visible) {\n  outline-style: solid;\n}\n/** Input */\n.ask-agent-scalar-input {\n  width: 0px;\n  opacity: 0;\n  font-size: 0px;\n  border: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n  .ask-agent-scalar-input,\n.agent-button-container:focus-within .ask-agent-scalar-input {\n  width: 100%;\n  font-size: inherit;\n  opacity: 1;\n  line-height: 20px;\n  outline: none;\n  padding-inline: 4px;\n}\n.ask-agent-scalar-input::placeholder {\n  color: var(--scalar-color-2);\n  font-family: inherit;\n}\n/** Input label */\n.ask-agent-scalar-input-label {\n  /** Shown by default */\n  color: var(--scalar-color-1);\n  font-weight: var(--scalar-semibold);\n  margin-left: 4px;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n  .ask-agent-scalar-input-label,\n.agent-button-container:focus-within .ask-agent-scalar-input-label {\n  /** Hidden when input is focused */\n  display: none;\n}\n/** Send button */\n.ask-agent-scalar-send {\n  background: var(--scalar-color-blue);\n  color: #fff;\n  width: 24px;\n  height: 24px;\n  flex-shrink: 0;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  border-radius: var(--scalar-radius);\n  outline-offset: 1px;\n  /* Hidden by default */\n  display: none;\n}\n.agent-button-container:has(.ask-agent-scalar-input-not-empty)\n  .ask-agent-scalar-send {\n  /** Show when input is not empty */\n  display: flex;\n}\n.ask-agent-scalar-send:hover {\n  background: color-mix(in srgb, var(--scalar-color-blue), transparent 10%);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { OperationCodeSample } from '@scalar/api-client/blocks/operation-code-sample'\nimport { ScalarErrorBoundary, ScalarMarkdown } from '@scalar/components'\nimport { ScalarIconWebhooksLogo } from '@scalar/icons'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { SecuritySchemeObjectSecret } from '@scalar/workspace-store/request-example'\nimport type {\n  OperationObject,\n  ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed, provide, ref, useId } from 'vue'\n\nimport { Anchor } from '@/components/Anchor'\nimport { Badge } from '@/components/Badge'\nimport { LinkList } from '@/components/LinkList'\nimport OperationPath from '@/components/OperationPath.vue'\nimport {\n  Section,\n  SectionColumn,\n  SectionColumns,\n  SectionContent,\n  SectionHeader,\n  SectionHeaderTag,\n} from '@/components/Section'\nimport AskAgentButton from '@/features/ask-agent-button/AskAgentButton.vue'\nimport { ExampleResponses } from '@/features/example-responses'\nimport { ExternalDocs } from '@/features/external-docs'\nimport Callbacks from '@/features/Operation/components/callbacks/Callbacks.vue'\nimport OperationParameters from '@/features/Operation/components/OperationParameters.vue'\nimport OperationResponses from '@/features/Operation/components/OperationResponses.vue'\nimport SecurityRequirementBadge from '@/features/Operation/components/SecurityRequirementBadge.vue'\nimport type { RequiredSecurity } from '@/features/Operation/helpers/get-required-security'\nimport {\n  getOperationStability,\n  getOperationStabilityColor,\n  isOperationDeprecated,\n} from '@/features/Operation/helpers/operation-stability'\nimport type { OperationProps } from '@/features/Operation/Operation.vue'\nimport {\n  REQUEST_BODY_COMPOSITION_INDEX_SYMBOL,\n  type RequestBodyCompositionSelection,\n} from '@/features/Operation/request-body-composition-index'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport SpecificationExtension from '@/features/specification-extension/SpecificationExtension.vue'\nimport { TestRequestButton } from '@/features/test-request-button'\nimport { XBadges } from '@/features/x-badges'\n\nconst {\n  clientOptions,\n  eventBus,\n  isWebhook,\n  method,\n  operation,\n  options,\n  path,\n  requiredSecurity,\n  selectedServer,\n  selectedSecuritySchemes,\n  selectedClient,\n} = defineProps<\n  Omit<\n    OperationProps,\n    | 'document'\n    | 'pathValue'\n    | 'server'\n    | 'isCollapsed'\n    | 'securitySchemes'\n    | 'authStore'\n  > & {\n    /** Operation object with path params */\n    operation: OperationObject\n    /** The selected server for the operation */\n    selectedServer: ServerObject | null\n    /** The selected security schemes for the operation */\n    selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n    /** Required/optional security state for the badge next to the path */\n    requiredSecurity: RequiredSecurity\n  }\n>()\n\nconst operationTitle = computed(() => operation.summary || path || '')\n\nconst labelId = useId()\n\nconst operationExtensions = computed(() => getXKeysFromObject(operation))\n\n/** Track the selected request body content type so the code sample stays in sync */\nconst selectedRequestBodyContentType = ref<string | undefined>()\n\n/** Selected request body oneOf/anyOf variants; synced with schema dropdowns and code sample */\nconst requestBodyCompositionSelection = ref<RequestBodyCompositionSelection>({})\n\nconst requestBodyCompositionSelectionForCodeSample = computed(\n  (): RequestBodyCompositionSelection => ({\n    ...requestBodyCompositionSelection.value,\n  }),\n)\n\nconst requestBodyCompositionSelectionKey = computed(() =>\n  JSON.stringify(requestBodyCompositionSelectionForCodeSample.value),\n)\n\nprovide(REQUEST_BODY_COMPOSITION_INDEX_SYMBOL, requestBodyCompositionSelection)\n</script>\n\n<template>\n  <Section\n    :id=\"id\"\n    :aria-labelledby=\"labelId\"\n    :label=\"operationTitle\"\n    tabindex=\"-1\"\n    @intersecting=\"() => eventBus?.emit('intersecting:nav-item', { id })\">\n    <SectionContent>\n      <!-- Badges -->\n      <div class=\"flex flex-row justify-between gap-1\">\n        <!-- Left -->\n        <div class=\"flex gap-1\">\n          <!-- Operation ID -->\n          <Badge v-if=\"options?.showOperationId && operation.operationId\">\n            {{ operation.operationId }}\n          </Badge>\n          <!-- Stability badge -->\n          <Badge\n            v-if=\"getOperationStability(operation)\"\n            class=\"capitalize\"\n            :class=\"getOperationStabilityColor(operation)\">\n            {{ getOperationStability(operation) }}\n          </Badge>\n          <!-- Webhook badge -->\n          <Badge\n            v-if=\"isWebhook\"\n            class=\"font-code text-green flex w-fit items-center justify-center gap-1\">\n            <ScalarIconWebhooksLogo weight=\"bold\" />Webhook\n          </Badge>\n          <!-- x-badges before -->\n          <XBadges\n            :badges=\"operation['x-badges']\"\n            position=\"before\" />\n        </div>\n        <!-- Right -->\n        <div class=\"flex gap-1\">\n          <!-- x-badges after -->\n          <XBadges\n            :badges=\"operation['x-badges']\"\n            position=\"after\" />\n        </div>\n      </div>\n      <div class=\"operation-header\">\n        <div :class=\"isOperationDeprecated(operation) && 'deprecated'\">\n          <SectionHeader removeMargin>\n            <Anchor\n              @copyAnchorUrl=\"\n                () => eventBus?.emit('copy-url:nav-item', { id })\n              \">\n              <SectionHeaderTag\n                :id=\"labelId\"\n                :level=\"3\">\n                {{ operationTitle }}\n              </SectionHeaderTag>\n            </Anchor>\n          </SectionHeader>\n        </div>\n\n        <!-- Required auth badge -->\n        <SecurityRequirementBadge :requiredSecurity />\n      </div>\n\n      <SectionColumns>\n        <SectionColumn>\n          <div class=\"operation-details\">\n            <SpecificationExtension :value=\"operationExtensions\" />\n            <ScalarMarkdown\n              :anchorPrefix=\"id\"\n              aria-label=\"Operation Description\"\n              role=\"group\"\n              transformType=\"heading\"\n              :value=\"operation.description\"\n              withAnchors\n              withImages />\n            <OperationParameters\n              v-model:selectedContentType=\"selectedRequestBodyContentType\"\n              :breadcrumb=\"[id]\"\n              :eventBus\n              :options\n              :parameters=\"operation.parameters\"\n              :requestBody=\"getResolvedRef(operation.requestBody)\" />\n            <OperationResponses\n              :breadcrumb=\"[id]\"\n              :collapsableItems=\"!options.expandAllResponses\"\n              :eventBus\n              :options\n              :responses=\"operation.responses\" />\n\n            <!-- Callbacks -->\n            <ScalarErrorBoundary>\n              <Callbacks\n                v-if=\"operation.callbacks\"\n                :callbacks=\"operation.callbacks\"\n                class=\"mt-6\"\n                :eventBus\n                :options\n                :path />\n            </ScalarErrorBoundary>\n          </div>\n        </SectionColumn>\n        <SectionColumn>\n          <div class=\"examples\">\n            <!-- External Docs -->\n            <LinkList v-if=\"operation.externalDocs\">\n              <ExternalDocs :value=\"operation.externalDocs\" />\n            </LinkList>\n\n            <!-- New Example Request -->\n            <ScalarErrorBoundary>\n              <OperationCodeSample\n                :key=\"requestBodyCompositionSelectionKey\"\n                :clientOptions\n                :eventBus\n                fallback\n                :isWebhook\n                :method\n                :operation\n                :path\n                :requestBodyCompositionSelection=\"\n                  requestBodyCompositionSelectionForCodeSample\n                \"\n                :securitySchemes=\"selectedSecuritySchemes\"\n                :selectedClient\n                :selectedContentType=\"selectedRequestBodyContentType\"\n                :selectedServer>\n                <template #header>\n                  <OperationPath\n                    class=\"font-code text-c-2 [&_em]:text-c-1 min-w-0 [&_em]:not-italic\"\n                    :deprecated=\"operation?.deprecated\"\n                    :path=\"path\" />\n                </template>\n                <template\n                  v-if=\"!isWebhook\"\n                  #footer=\"{ exampleName }\">\n                  <div class=\"flex\">\n                    <AskAgentButton />\n                    <TestRequestButton\n                      v-if=\"!options.hideTestRequestButton\"\n                      :id\n                      :eventBus\n                      :exampleName\n                      :method\n                      :path\n                      :requestBodyCompositionSelection=\"\n                        requestBodyCompositionSelectionForCodeSample\n                      \" />\n                  </div>\n                </template>\n              </OperationCodeSample>\n            </ScalarErrorBoundary>\n\n            <ScalarErrorBoundary>\n              <ExampleResponses\n                v-if=\"operation.responses\"\n                :responses=\"operation.responses\"\n                style=\"margin-top: 12px\" />\n            </ScalarErrorBoundary>\n          </div>\n        </SectionColumn>\n      </SectionColumns>\n    </SectionContent>\n  </Section>\n</template>\n\n<style scoped>\n.examples {\n  position: sticky;\n  top: calc(var(--refs-viewport-offset) + 24px);\n}\n\n.examples > * {\n  max-height: calc((var(--refs-viewport-height) - 60px) / 2);\n  position: relative;\n}\n\n.examples > *:first-of-type:last-of-type {\n  max-height: calc((var(--refs-viewport-height) - 60px));\n}\n\n/*\n * Don't constrain card height on mobile\n * (or zoomed in screens)\n */\n@media (max-width: 600px) {\n  .examples > * {\n    max-height: unset;\n  }\n}\n.deprecated * {\n  text-decoration: line-through;\n}\n\n.operation-header {\n  margin-bottom: 12px;\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  justify-content: space-between;\n  gap: 4px;\n\n  @media (min-width: 600px) {\n    flex-direction: row;\n    align-items: center;\n  }\n}\n</style>\n","<script lang=\"ts\">\n/**\n * References Operation \"block\"\n */\nexport default {}\n\nexport type OperationProps = {\n  id: string\n  method: HttpMethod\n  /** The subset of the configuration object required for the operation component */\n  options: Pick<\n    ApiReferenceConfigurationRaw,\n    | 'expandAllResponses'\n    | 'hideModels'\n    | 'hideTestRequestButton'\n    | 'layout'\n    | 'orderRequiredPropertiesFirst'\n    | 'orderSchemaPropertiesBy'\n    | 'showOperationId'\n  >\n  /** Document object */\n  document: OpenApiDocument\n  /** Key of the operations path in the document.paths object */\n  path: string\n  /** OpenAPI path object that will include the operation */\n  pathValue: PathItemObject | undefined\n  /** Currently selected server for the document */\n  server: ServerObject | null\n  /** The merged security schemes for the document and the authentication configuration */\n  securitySchemes: MergedSecuritySchemes\n  /** The http client options for the dropdown */\n  clientOptions: ClientOptionGroup[]\n  /** Whether the Classic layout operation is collapsed */\n  isCollapsed: boolean\n  /** Whether the operation is a webhook */\n  isWebhook: boolean\n  /** The currently selected client for the document */\n  selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n  /** The event bus */\n  eventBus: WorkspaceEventBus\n  /** The auth store */\n  authStore: AuthStore\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport type { ClientOptionGroup } from '@scalar/api-client/blocks/operation-code-sample'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n  combineParams,\n  type MergedSecuritySchemes,\n} from '@scalar/workspace-store/request-example'\nimport type {\n  OpenApiDocument,\n  PathItemObject,\n  ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport { filterSelectedSecurity } from '@/features/Operation/helpers/filter-selected-security'\n\nimport { getFirstServer } from './helpers/get-first-server'\nimport {\n  getRequiredSecurity,\n  type RequiredSecurity,\n} from './helpers/get-required-security'\nimport ClassicLayout from './layouts/ClassicLayout.vue'\nimport ModernLayout from './layouts/ModernLayout.vue'\n\nconst {\n  authStore,\n  clientOptions,\n  document,\n  eventBus,\n  isCollapsed,\n  isWebhook,\n  method,\n  options,\n  path,\n  pathValue,\n  securitySchemes,\n  server,\n} = defineProps<OperationProps>()\n\n/**\n * Operation from the new workspace store, ensure we are de-reference\n *\n * Also adds in params from the pathItemObject\n */\nconst operation = computed(() => {\n  const entity = getResolvedRef(pathValue?.[method])\n\n  if (!entity) {\n    return null\n  }\n\n  // Combine params from the pathItem and the operation\n  const parameters = combineParams(pathValue?.parameters, entity.parameters)\n  return { ...entity, parameters }\n})\n\n/**\n * Determine the effective server for the code examples.\n */\nconst selectedServer = computed<ServerObject | null>(() =>\n  getFirstServer(\n    // 1) Operation\n    operation.value?.servers ?? null,\n    // 2) Path Item\n    pathValue?.servers ?? null,\n    // 3) Document\n    server,\n  ),\n)\n\nconst requiredSecurity = computed<RequiredSecurity>(() =>\n  getRequiredSecurity(operation.value, document),\n)\n\n/** We must ensure the selected security schemes are required on this operation */\nconst selectedSecuritySchemes = computed(() =>\n  filterSelectedSecurity(\n    document,\n    operation.value,\n    authStore.getAuthSelectedSchemas({\n      type: 'document',\n      documentName: document?.['x-scalar-navigation']?.name ?? '',\n    }),\n    authStore.getAuthSelectedSchemas({\n      type: 'operation',\n      documentName: document?.['x-scalar-navigation']?.name ?? '',\n      path,\n      method,\n    }),\n    securitySchemes,\n  ),\n)\n</script>\n\n<template>\n  <template v-if=\"operation\">\n    <ClassicLayout\n      v-if=\"options.layout === 'classic'\"\n      :id\n      :clientOptions\n      :eventBus\n      :isCollapsed\n      :isWebhook\n      :method\n      :operation\n      :options\n      :path\n      :requiredSecurity\n      :selectedClient\n      :selectedSecuritySchemes\n      :selectedServer />\n    <ModernLayout\n      v-else\n      :id\n      :clientOptions\n      :eventBus\n      :isWebhook\n      :method\n      :operation\n      :options\n      :path\n      :requiredSecurity\n      :selectedClient\n      :selectedSecuritySchemes\n      :selectedServer />\n  </template>\n</template>\n","import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/**\n * Iterate through all available servers and pick the first one\n *\n * @example\n * getFirstServer([operation.servers, pathItem.servers, server])\n */\nexport const getFirstServer = (...availableServers: (ServerObject[] | ServerObject | null)[]): ServerObject | null => {\n  for (const serverSource of availableServers) {\n    if (!serverSource) {\n      continue\n    }\n\n    // Handle single server object\n    if (!Array.isArray(serverSource)) {\n      const resolvedServer = getResolvedRef(serverSource) as ServerObject\n      if (resolvedServer?.url) {\n        return resolvedServer\n      }\n      continue\n    }\n\n    // Handle array of servers, pick the first one with a URL\n    for (const server of serverSource) {\n      const resolvedServer = getResolvedRef(server) as ServerObject\n      if (resolvedServer?.url) {\n        return resolvedServer\n      }\n    }\n  }\n\n  return null\n}\n","import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport { isNonOptionalSecurityRequirement } from '@scalar/workspace-store/helpers/is-non-optional-security-requirement'\nimport type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\nimport type { SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/security-scheme'\n\nexport type RequiredSecurityState = 'required' | 'optional' | 'none'\n\nexport type RequiredSecurityScheme = {\n  /** Scheme key as declared in `components.securitySchemes`. */\n  name: string\n  /** Resolved scheme object. `undefined` if the referenced scheme isn't defined on the document. */\n  scheme: SecuritySchemeObject | undefined\n  /** Scopes required by the operation for this scheme (OAuth2 / OpenID Connect). Empty otherwise. */\n  scopes: string[]\n}\n\n/**\n * One alternative in the security requirement list.\n * All schemes within a group must be satisfied simultaneously (AND semantics).\n */\nexport type RequiredSecurityGroup = {\n  schemes: RequiredSecurityScheme[]\n}\n\nexport type RequiredSecurity = {\n  state: RequiredSecurityState\n  /**\n   * Each element is one alternative (OR semantics). Within each group, all schemes\n   * must be satisfied simultaneously (AND semantics). Empty when `state === 'none'`.\n   *\n   * Mirrors the OpenAPI `security` array structure:\n   * - outer array  → OR  (satisfy any one group)\n   * - inner object → AND (all schemes in a group are required together)\n   */\n  requirements: RequiredSecurityGroup[]\n}\n\n/**\n * Determine whether an operation requires authentication, using `operation.security ?? document.security`\n * as the source of truth. Operation-level `security` fully overrides document-level — including `security: []`,\n * which explicitly opts the operation out of auth.\n *\n * OpenAPI encodes \"auth is optional\" by including an empty requirement object `{}`. Whenever `{}`\n * appears — whether alongside real requirements or as the only entry — auth is treated as optional (state: 'optional').\n */\nexport const getRequiredSecurity = (\n  operation: Pick<OperationObject, 'security'> | null | undefined,\n  document: Pick<OpenApiDocument, 'security' | 'components'>,\n): RequiredSecurity => {\n  const securityList = operation?.security ?? document.security ?? []\n  const definedSchemes = document.components?.securitySchemes ?? {}\n\n  let hasEmpty = false\n  const groups: RequiredSecurityGroup[] = []\n\n  for (const requirement of securityList) {\n    if (!isNonOptionalSecurityRequirement(requirement)) {\n      hasEmpty = true\n      continue\n    }\n\n    const schemes: RequiredSecurityScheme[] = Object.entries(requirement).map(([name, scopes]) => ({\n      name,\n      scheme: getResolvedRef(definedSchemes[name]),\n      scopes: scopes.filter((s) => s.length > 0),\n    }))\n\n    if (schemes.length > 0) {\n      groups.push({ schemes })\n    }\n  }\n\n  if (groups.length === 0) {\n    return { state: hasEmpty ? 'optional' : 'none', requirements: [] }\n  }\n\n  return {\n    state: hasEmpty ? 'optional' : 'required',\n    requirements: groups,\n  }\n}\n","<script setup lang=\"ts\">\nimport type { ClientOptionGroup } from '@scalar/api-client/blocks/operation-code-sample'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { MergedSecuritySchemes } from '@scalar/workspace-store/request-example'\nimport type { WorkspaceDocument } from '@scalar/workspace-store/schemas'\nimport type {\n  TraversedEntry,\n  TraversedModels,\n  TraversedOperation,\n  TraversedSchema,\n  TraversedTag,\n  TraversedWebhook,\n} from '@scalar/workspace-store/schemas/navigation'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport Model from '@/components/Content/Models/Model.vue'\nimport ModelTag from '@/components/Content/Models/ModelTag.vue'\nimport { Tag } from '@/components/Content/Tags'\nimport Lazy from '@/components/Lazy/Lazy.vue'\nimport { SectionContainer } from '@/components/Section'\nimport { Operation } from '@/features/Operation'\n\nconst {\n  level = 0,\n  clientOptions,\n  document,\n  authStore,\n  entries,\n} = defineProps<{\n  /** The auth store */\n  authStore: AuthStore\n  /** The level of depth */\n  level?: number\n  /** Traversed entries to render */\n  entries: TraversedEntry[]\n  /** The document object */\n  document: WorkspaceDocument\n  /** The http client options for the dropdown */\n  clientOptions: ClientOptionGroup[]\n  /** The subset of the configuration object required for the operation component */\n  options: Pick<\n    ApiReferenceConfigurationRaw,\n    | 'expandAllResponses'\n    | 'hideTestRequestButton'\n    | 'layout'\n    | 'orderRequiredPropertiesFirst'\n    | 'orderSchemaPropertiesBy'\n    | 'showOperationId'\n    | 'hideModels'\n  >\n  /** Currently selected server for the document */\n  selectedServer: ServerObject | null\n  /** The merged security schemes for the document and the authentication configuration */\n  securitySchemes: MergedSecuritySchemes\n  /** Currently selected http client for the document */\n  selectedClient: WorkspaceStore['workspace']['x-scalar-default-client']\n  /** Used to determine if an entry is collapsed */\n  expandedItems: Record<string, boolean>\n  /** The event bus for the handling all events. */\n  eventBus: WorkspaceEventBus\n}>()\n\n/**\n * Type guards for different entry types\n */\nconst isTagGroup = (\n  entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: true } =>\n  entry['type'] === 'tag' && entry.isGroup === true\n\nconst isTag = (\n  entry: TraversedEntry,\n): entry is TraversedTag & { isGroup: false } =>\n  entry['type'] === 'tag' && !isTagGroup(entry) && entry.id !== 'models'\n\nconst isOperation = (entry: TraversedEntry): entry is TraversedOperation =>\n  entry['type'] === 'operation'\n\nconst isWebhook = (entry: TraversedEntry): entry is TraversedWebhook =>\n  entry['type'] === 'webhook'\n\n/** Models are special form of tag entry */\nconst isModelsTag = (entry: TraversedEntry): entry is TraversedModels =>\n  entry['type'] === 'models'\n\nconst isModel = (entry: TraversedEntry): entry is TraversedSchema =>\n  entry['type'] === 'model'\n\nfunction getPathValue(entry: TraversedOperation | TraversedWebhook) {\n  return isWebhook(entry)\n    ? document.webhooks?.[entry.name]\n    : document.paths?.[entry.path]\n}\n</script>\n\n<template>\n  <!-- The key must be joined with the layout to force a re-render when the layout changes -->\n  <!-- Without this we get a timing issue where the lazy bus is reset and the element is not rendered -->\n  <Lazy\n    v-for=\"entry in entries\"\n    :id=\"entry.id\"\n    :key=\"`${entry.id}-${options.layout}`\"\n    :expanded=\"!!expandedItems[entry.id]\">\n    <!-- Operation or Webhook -->\n    <SectionContainer\n      v-if=\"isOperation(entry) || isWebhook(entry)\"\n      :omit=\"level !== 0\">\n      <Operation\n        :id=\"entry.id\"\n        :authStore\n        :clientOptions\n        :document\n        :eventBus\n        :isCollapsed=\"!expandedItems[entry.id]\"\n        :isWebhook=\"isWebhook(entry)\"\n        :method=\"entry.method\"\n        :options=\"options\"\n        :path=\"isWebhook(entry) ? entry.name : entry.path\"\n        :pathValue=\"getPathValue(entry)\"\n        :securitySchemes=\"securitySchemes\"\n        :selectedClient=\"selectedClient\"\n        :server=\"selectedServer\" />\n    </SectionContainer>\n\n    <!-- Webhook Group, Tag or Tag Group (only in classic layout) -->\n    <Tag\n      v-else-if=\"\n        isTag(entry) || (isTagGroup(entry) && options.layout === 'classic')\n      \"\n      :eventBus\n      :isCollapsed=\"!expandedItems[entry.id]\"\n      :isLoading=\"false\"\n      :layout=\"options.layout\"\n      :moreThanOneTag=\"entries.filter(isTag).length > 1\"\n      :tag=\"entry\">\n      <template v-if=\"'children' in entry && entry.children?.length\">\n        <TraversedEntry\n          :authStore\n          :clientOptions\n          :document\n          :entries=\"entry.children\"\n          :eventBus\n          :expandedItems\n          :level=\"level + 1\"\n          :options\n          :securitySchemes\n          :selectedClient\n          :selectedServer>\n        </TraversedEntry>\n      </template>\n    </Tag>\n\n    <!-- Display tag grop entries for modern layout (flattened) -->\n    <TraversedEntry\n      v-else-if=\"isTagGroup(entry)\"\n      :authStore\n      :clientOptions\n      :document\n      :entries=\"entry.children || []\"\n      :eventBus\n      :expandedItems\n      :level=\"level + 1\"\n      :options\n      :securitySchemes\n      :selectedClient\n      :selectedServer>\n    </TraversedEntry>\n\n    <!-- Models -->\n    <ModelTag\n      v-else-if=\"isModelsTag(entry) && document.components?.schemas\"\n      :id=\"entry.id\"\n      :eventBus\n      :isCollapsed=\"!expandedItems[entry.id]\"\n      :layout=\"options.layout\">\n      <TraversedEntry\n        :authStore\n        :clientOptions\n        :document\n        :entries=\"entry.children || []\"\n        :eventBus\n        :expandedItems=\"expandedItems\"\n        :level=\"level + 1\"\n        :options\n        :securitySchemes\n        :selectedClient\n        :selectedServer>\n      </TraversedEntry>\n    </ModelTag>\n\n    <Model\n      v-else-if=\"isModel(entry) && document.components?.schemas?.[entry.name]\"\n      :id=\"entry.id\"\n      :eventBus\n      :isCollapsed=\"!expandedItems[entry.id]\"\n      :name=\"entry.name\"\n      :options\n      :schema=\"getResolvedRef(document.components.schemas[entry.name])\">\n    </Model>\n  </Lazy>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarErrorBoundary } from '@scalar/components'\n\nimport { usePluginManager } from '@/plugins'\n\nconst { viewName, options } = defineProps<{\n  viewName: 'content.end'\n  options: Record<string, any>\n}>()\n\nconst { getViewComponents } = usePluginManager()\nconst components = getViewComponents(viewName)\n</script>\n\n<template>\n  <template v-if=\"components.length\">\n    <div class=\"plugin-view\">\n      <template\n        v-for=\"(item, _index) in components\"\n        :key=\"_index\">\n        <ScalarErrorBoundary>\n          <template v-if=\"item.renderer\">\n            <!-- Custom renderer (e.g. React) -->\n            <component\n              :is=\"item.renderer\"\n              v-bind=\"{\n                component: item.component,\n                options,\n                ...item.props,\n              }\" />\n          </template>\n          <template v-else>\n            <!-- Vue component -->\n            <component\n              :is=\"item.component\"\n              v-bind=\"{ options, ...item.props }\" />\n          </template>\n        </ScalarErrorBoundary>\n      </template>\n    </div>\n  </template>\n</template>\n","<template>\n  <!-- For adding gradients + animations to introduction of documents that :before / :after won't work for -->\n  <div class=\"section-flare\">\n    <div class=\"section-flare-item\"></div>\n    <div class=\"section-flare-item\"></div>\n    <div class=\"section-flare-item\"></div>\n    <div class=\"section-flare-item\"></div>\n    <div class=\"section-flare-item\"></div>\n    <div class=\"section-flare-item\"></div>\n    <div class=\"section-flare-item\"></div>\n    <div class=\"section-flare-item\"></div>\n  </div>\n</template>\n\n<style scoped>\n.section-flare {\n  position: fixed;\n  top: 0;\n  right: 0;\n  pointer-events: none;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { generateClientOptions } from '@scalar/api-client/blocks/operation-code-sample'\nimport { mapHiddenClientsConfig } from '@scalar/api-client/modal'\nimport { ScalarErrorBoundary } from '@scalar/components'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { Heading } from '@scalar/types/legacy'\nimport type { AuthStore } from '@scalar/workspace-store/entities/auth'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n  getSelectedServer,\n  getServers,\n  mergeSecurity,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { TraversedEntry as TraversedEntryType } from '@scalar/workspace-store/schemas/navigation'\nimport type {\n  Workspace,\n  WorkspaceDocument,\n} from '@scalar/workspace-store/schemas/workspace'\nimport { computed, onMounted } from 'vue'\n\nimport { ClientSelector } from '@/blocks/scalar-client-selector-block'\nimport { InfoBlock } from '@/blocks/scalar-info-block'\nimport { IntroductionCardItem } from '@/blocks/scalar-info-block/'\nimport { ServerSelector } from '@/blocks/scalar-server-selector-block'\nimport { Auth } from '@/components/Content/Auth'\nimport TraversedEntry from '@/components/Content/Operations/TraversedEntry.vue'\nimport { RenderPlugins } from '@/components/RenderPlugins'\nimport { SectionFlare } from '@/components/SectionFlare'\nimport { getXKeysFromObject } from '@/features/specification-extension'\nimport {\n  firstLazyLoadComplete,\n  scheduleInitialLoadComplete,\n} from '@/helpers/lazy-bus'\n\nconst {\n  document,\n  clientDocument,\n  items,\n  environment,\n  eventBus,\n  options,\n  authStore,\n} = defineProps<{\n  infoSectionId: string\n  /** The subset of the configuration object required for the content component */\n  options: Pick<\n    ApiReferenceConfigurationRaw,\n    | 'authentication'\n    | 'baseServerURL'\n    | 'documentDownloadType'\n    | 'expandAllResponses'\n    | 'hiddenClients'\n    | 'hideTestRequestButton'\n    | 'layout'\n    | 'orderRequiredPropertiesFirst'\n    | 'orderSchemaPropertiesBy'\n    | 'persistAuth'\n    | 'proxyUrl'\n    | 'servers'\n    | 'showOperationId'\n    | 'hideModels'\n  >\n  document: WorkspaceDocument | undefined\n  clientDocument: WorkspaceDocument | undefined\n  authStore: AuthStore\n  xScalarDefaultClient: Workspace['x-scalar-default-client']\n  items: TraversedEntryType[]\n  expandedItems: Record<string, boolean>\n  eventBus: WorkspaceEventBus\n  environment: XScalarEnvironment\n  /** Heading id generator for Markdown headings */\n  headingSlugGenerator: (heading: Heading) => string\n}>()\n\n/** Generate all client options so that it can be shared between the top client picker and the operations */\nconst clientOptions = computed(() =>\n  generateClientOptions(mapHiddenClientsConfig(options.hiddenClients)),\n)\n\n/** Computed property to get all OpenAPI extension fields from the root document object */\nconst documentExtensions = computed(() => getXKeysFromObject(document))\n\n/** Computed property to get all OpenAPI extension fields from the document's info object */\nconst infoExtensions = computed(() => getXKeysFromObject(document?.info))\n\n/** Compute the servers for the document */\nconst servers = computed(() =>\n  getServers(options?.servers ?? clientDocument?.servers, {\n    baseServerUrl: options?.baseServerURL,\n    documentUrl: clientDocument?.['x-scalar-original-source-url'],\n  }),\n)\n\n/** Compute the selected server for the document only (for now) */\nconst selectedServer = computed(() =>\n  getSelectedServer(clientDocument ?? null, null, null, servers.value),\n)\n\n/** Merge authentication config with the document security schemes */\nconst securitySchemes = computed(() =>\n  mergeSecurity(\n    clientDocument?.components?.securitySchemes,\n    options.authentication?.securitySchemes,\n    authStore,\n    clientDocument?.['x-scalar-navigation']?.name ?? '',\n  ),\n)\n\n/** Ensures firstLazyLoadComplete is set for documents with no Lazy sections (e.g. no operations/tags/models). */\nonMounted(() => {\n  scheduleInitialLoadComplete()\n})\n</script>\n<template>\n  <SectionFlare />\n\n  <div class=\"narrow-references-container\">\n    <slot name=\"start\" />\n\n    <!-- Introduction -->\n\n    <InfoBlock\n      :id=\"infoSectionId\"\n      :documentDownloadType=\"options.documentDownloadType\"\n      :documentExtensions\n      :documentUrl=\"document?.['x-scalar-original-source-url']\"\n      :eventBus\n      :externalDocs=\"document?.externalDocs\"\n      :headingSlugGenerator\n      :info=\"document?.info\"\n      :infoExtensions\n      :layout=\"options.layout\"\n      :oasVersion=\"document?.['x-original-oas-version']\">\n      <template #selectors>\n        <!-- Server Selector -->\n        <ScalarErrorBoundary>\n          <IntroductionCardItem\n            v-if=\"servers?.length\"\n            class=\"scalar-reference-intro-server scalar-client introduction-card-item text-base leading-normal [--scalar-address-bar-height:0px]\">\n            <ServerSelector\n              :eventBus\n              :selectedServer\n              :servers />\n          </IntroductionCardItem>\n        </ScalarErrorBoundary>\n\n        <!-- Auth selector -->\n        <ScalarErrorBoundary>\n          <IntroductionCardItem\n            v-if=\"document && !options.hideTestRequestButton\"\n            class=\"scalar-reference-intro-auth scalar-client introduction-card-item leading-normal\">\n            <Auth\n              :authStore\n              :document=\"clientDocument\"\n              :environment\n              :eventBus\n              :options\n              :securitySchemes\n              :selectedServer />\n          </IntroductionCardItem>\n        </ScalarErrorBoundary>\n\n        <!-- Client selector -->\n        <ScalarErrorBoundary>\n          <IntroductionCardItem\n            v-if=\"clientOptions.length\"\n            class=\"introduction-card-item scalar-reference-intro-clients\">\n            <ClientSelector\n              class=\"introduction-card-item scalar-reference-intro-clients\"\n              :clientOptions\n              :eventBus\n              :selectedClient=\"xScalarDefaultClient\"\n              :xScalarSdkInstallation=\"\n                document?.info?.['x-scalar-sdk-installation']\n              \" />\n          </IntroductionCardItem>\n        </ScalarErrorBoundary>\n      </template>\n    </InfoBlock>\n\n    <!-- Render traversed operations and webhooks -->\n    <!-- Use recursive component for cleaner rendering -->\n    <TraversedEntry\n      v-if=\"items.length && document\"\n      :authStore\n      :clientOptions\n      :document\n      :entries=\"items\"\n      :eventBus\n      :expandedItems\n      :options\n      :securitySchemes\n      :selectedClient=\"xScalarDefaultClient\"\n      :selectedServer>\n    </TraversedEntry>\n\n    <!-- Render plugins at content.end view -->\n    <RenderPlugins\n      :options\n      viewName=\"content.end\" />\n\n    <slot name=\"end\" />\n    <!-- Placeholder content to allow the active item to be scrolled to the top while the rest of the content is lazy loaded -->\n    <div\n      v-if=\"!firstLazyLoadComplete\"\n      class=\"h-dvh\"></div>\n  </div>\n</template>\n\n<style>\n.narrow-references-container {\n  container-name: narrow-references-container;\n  container-type: inline-size;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { cva, ScalarIconButton } from '@scalar/components'\nimport { ScalarIconList, ScalarIconX } from '@scalar/icons'\n\ndefineProps<{\n  breadcrumb: string\n  isSidebarOpen: boolean\n  showSidebar: boolean\n}>()\n\nconst emit = defineEmits<{\n  (e: 'toggleSidebar'): void\n}>()\n\ndefineSlots<{\n  actions?(): never\n  sidebar?(props: { sidebarClasses: string }): never\n  search?(): never\n}>()\n\nconst variants = cva({\n  base: 'lg:hidden items-center bg-b-1 sticky top-(--scalar-custom-header-height,0) z-10 [grid-area:header]',\n  variants: {\n    open: {\n      true: 'h-(--refs-sidebar-height) custom-scrollbar flex flex-col',\n    },\n  },\n})\n</script>\n<template>\n  <!-- Always render the desktop sidebar slot and let CSS handle breakpoints -->\n  <slot\n    v-bind=\"{\n      sidebarClasses:\n        'hidden lg:flex sticky top-(--refs-header-height) h-(--refs-sidebar-height) w-(--refs-sidebar-width) [grid-area:navigation]',\n    }\"\n    name=\"sidebar\" />\n  <div\n    class=\"t-doc__header\"\n    :class=\"variants({ open: isSidebarOpen })\">\n    <header\n      class=\"flex h-(--scalar-header-height) w-full items-center border-b bg-inherit px-2\">\n      <ScalarIconButton\n        v-if=\"showSidebar\"\n        :icon=\"isSidebarOpen ? ScalarIconX : ScalarIconList\"\n        :label=\"isSidebarOpen ? 'Close Menu' : 'Open Menu'\"\n        size=\"md\"\n        @click=\"emit('toggleSidebar')\" />\n\n      <span\n        v-if=\"showSidebar\"\n        class=\"flex-1 text-sm font-medium whitespace-nowrap\">\n        {{ breadcrumb }}\n      </span>\n      <slot\n        v-else\n        name=\"search\" />\n\n      <div class=\"flex h-6 items-center gap-1 pl-1\">\n        <slot name=\"actions\" />\n      </div>\n    </header>\n    <!-- In mobile layout, render the sidebar slot into the header panel -->\n    <slot\n      v-if=\"isSidebarOpen\"\n      v-bind=\"{\n        sidebarClasses:\n          'overflow-y-auto custom-scrollbar min-h-0 flex-1 w-full border-none',\n      }\"\n      name=\"sidebar\" />\n  </div>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarFloatingBackdrop, ScalarPopover } from '@scalar/components'\nimport { ScalarIconCaretDown, ScalarIconInfo } from '@scalar/icons'\n</script>\n\n<template>\n  <ScalarPopover\n    class=\"max-h-[inherit] max-w-[inherit] p-0 text-base\"\n    placement=\"bottom-end\"\n    teleport>\n    <template #default=\"{ open }\">\n      <slot\n        name=\"button\"\n        :open>\n        <button\n          class=\"text-c-2 hover:text-c-1 hover:bg-b-2 flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n          type=\"button\">\n          <slot name=\"label\" />\n          <ScalarIconCaretDown\n            class=\"size-3\"\n            :class=\"{ 'rotate-180': open }\" />\n        </button>\n      </slot>\n    </template>\n    <template #popover=\"props\">\n      <div class=\"custom-scroll bg-b-1 flex flex-col gap-7 rounded-lg p-7 pb-6\">\n        <slot v-bind=\"props\" />\n      </div>\n      <div class=\"text-c-2 flex items-center justify-center gap-1 p-2 text-sm\">\n        <ScalarIconInfo class=\"size-3.5 shrink-0\" />\n        <div>\n          <slot name=\"info\">\n            \"<slot name=\"label\" />\" will only appear when running on localhost.\n          </slot>\n        </div>\n      </div>\n    </template>\n    <template #backdrop>\n      <ScalarFloatingBackdrop class=\"bg-b-2 rounded-lg\" />\n    </template>\n  </ScalarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarIconButton } from '@scalar/components'\nimport { ScalarIconCopy, ScalarIconInfo } from '@scalar/icons'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst CONFIG_SETTING = 'showDeveloperTools: \"never\"'\n\nconst { copyToClipboard } = useClipboard()\n</script>\n<template>\n  <ApiReferenceToolbarPopover\n    class=\"w-120\"\n    placement=\"bottom-start\">\n    <template #button>\n      <button\n        class=\"text-c-2 hover:text-c-1 hover:bg-b-2 ml-auto flex items-center gap-1 rounded px-2 py-2.25 text-base leading-none\"\n        type=\"button\">\n        <ScalarIconInfo />\n        Developer Tools\n      </button>\n    </template>\n    <div class=\"-m-2 flex flex-col gap-2 leading-relaxed\">\n      <div>\n        The developer tools allow you to customize the appearance and behavior\n        of your documentation. You can also share your documentation using the\n        Scalar Registry.\n      </div>\n      <div>\n        To disable the toolbar, set\n        <div\n          class=\"bg-b-2 inline-flex items-center gap-0.5 rounded border px-1 py-0.5 text-sm\">\n          <code class=\"font-code\">{{ CONFIG_SETTING }}</code>\n          <ScalarIconButton\n            class=\"-m-1 p-1.25\"\n            :icon=\"ScalarIconCopy\"\n            label=\"Copy link to clipboard\"\n            size=\"sm\"\n            @click=\"copyToClipboard(CONFIG_SETTING)\" />\n        </div>\n        in your configuration.\n      </div>\n    </div>\n    <template #info>\n      The developer tools will only appear when running on localhost.\n    </template>\n  </ApiReferenceToolbarPopover>\n</template>\n","<script setup lang=\"ts\"></script>\n<template>\n  <p\n    class=\"text-c-3 [&_code]:font-code [&_a:hover]:text-c-1 text-center leading-normal [&_a]:underline\">\n    <slot />\n  </p>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarButton, useLoadingState } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { nextTick } from 'vue'\n\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nconst {\n  sdks = [],\n  workspace,\n  externalUrls,\n} = defineProps<{\n  workspace: WorkspaceStore\n  externalUrls: ExternalUrls\n  sdks?: string[]\n}>()\n\nconst tempDocUrl = defineModel<string>('url')\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\n/** Open the registration link in a new tab */\nfunction openRegisterLink(docUrl: string) {\n  const url = new URL(`${externalUrls.dashboardUrl}/register`)\n  url.searchParams.set('url', docUrl)\n  sdks.forEach((sdk) => url.searchParams.append('sdk', sdk))\n\n  window.open(url.toString(), '_blank')\n}\n\n/** Generate and open the registration link */\nasync function generateRegisterLink() {\n  if (loader.isLoading || !workspace) {\n    return\n  }\n\n  // If we have already have a temporary document URL, use it\n  if (tempDocUrl.value) {\n    openRegisterLink(tempDocUrl.value)\n    return\n  }\n\n  loader.start()\n\n  const document = workspace.exportActiveDocument('json')\n\n  if (!document) {\n    toast('Unable to export active document', 'error')\n    await loader.invalidate()\n    return\n  }\n\n  try {\n    tempDocUrl.value = await uploadTempDocument(document, externalUrls)\n    await loader.validate()\n    openRegisterLink(tempDocUrl.value)\n\n    await nextTick()\n\n    await loader.clear()\n  } catch (error) {\n    const message =\n      error instanceof Error ? error.message : 'An unknown error occurred'\n    toast(message, 'error')\n    await loader.invalidate()\n  }\n}\n</script>\n<template>\n  <ScalarButton\n    class=\"h-auto p-2.5\"\n    :loader\n    @click=\"generateRegisterLink\">\n    <slot>Generate</slot>\n  </ScalarButton>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n  ScalarIconBookOpen,\n  ScalarIconBracketsCurly,\n  ScalarIconCloud,\n  ScalarIconFileMd,\n  ScalarIconGitBranch,\n  ScalarIconGlobeSimple,\n  ScalarIconLockSimple,\n  ScalarIconWarningOctagon,\n} from '@scalar/icons'\nimport { type ScalarIconComponent } from '@scalar/icons/types'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\nimport ApiReferenceToolbarRegisterButton from './ApiReferenceToolbarRegisterButton.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n  workspace: WorkspaceStore\n  externalUrls: ExternalUrls\n}>()\n\nconst FEATURES = [\n  { icon: ScalarIconLockSimple, label: 'Password Protection' },\n  { icon: ScalarIconGlobeSimple, label: 'Custom Domains' },\n  { icon: ScalarIconBookOpen, label: 'Free-form content' },\n  { icon: ScalarIconCloud, label: 'CDN Infrastructure' },\n  { icon: ScalarIconGitBranch, label: 'Pull from GitHub' },\n  { icon: ScalarIconFileMd, label: 'Markdown/MDX' },\n  { icon: ScalarIconWarningOctagon, label: 'Spectral Linting' },\n  { icon: ScalarIconBracketsCurly, label: 'JSON Schema Hosting' },\n] as const satisfies ReadonlyArray<{\n  icon: ScalarIconComponent\n  label: string\n}>\n</script>\n<template>\n  <ul class=\"text-c-2 mb-2 grid grid-cols-2 gap-2.5 font-medium\">\n    <li\n      v-for=\"feature in FEATURES\"\n      :key=\"feature.label\"\n      class=\"flex items-center gap-2\">\n      <component\n        :is=\"feature.icon\"\n        class=\"text-c-3 size-3.5\"\n        weight=\"bold\" />\n      {{ feature.label }}\n    </li>\n  </ul>\n  <ApiReferenceToolbarRegisterButton\n    :externalUrls\n    :workspace>\n    Deploy on Scalar\n  </ApiReferenceToolbarRegisterButton>\n  <ApiReferenceToolbarBlurb>\n    Deploy your documentation for free. <br />\n    Additional features might require\n    <a\n      href=\"https://scalar.com/products/docs/getting-started\"\n      target=\"_blank\"\n      >Scalar Pro</a\n    >.\n  </ApiReferenceToolbarBlurb>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n  workspace: WorkspaceStore\n  externalUrls: ExternalUrls\n}>()\n</script>\n\n<template>\n  <ApiReferenceToolbarPopover class=\"w-120\">\n    <template #label>Deploy</template>\n    <ScalarFormSection>\n      <template #label>Scalar Docs</template>\n      <p class=\"text-c-2 mb-2 leading-normal\">\n        Deploy your documentation on Scalar, the modern documentation platform\n        for your API and everything else.\n      </p>\n      <ApiReferenceToolbarShareRegister\n        :externalUrls\n        :workspace />\n    </ScalarFormSection>\n  </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n  ScalarCheckboxRadioGroup,\n  type ScalarCheckboxOption,\n} from '@scalar/components'\nimport { computed } from 'vue'\n\nconst ModernOption = { label: 'Modern', value: 'modern' } as const\nconst ClassicOption = { label: 'Classic', value: 'classic' } as const\n\nconst options = [\n  ModernOption,\n  ClassicOption,\n] as const satisfies ScalarCheckboxOption[]\n\nconst model = defineModel<'modern' | 'classic'>()\n\nconst selected = computed<(typeof options)[number]>({\n  get: () => (model.value === 'modern' ? ModernOption : ClassicOption),\n  set: (option) => (model.value = option.value),\n})\n</script>\n<template>\n  <ScalarCheckboxRadioGroup\n    v-model=\"selected\"\n    :options />\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarFormInputGroup, ScalarToggleInput } from '@scalar/components'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n\ntype LayoutOptions = {\n  showSidebar?: boolean\n  defaultOpenFirstTag?: boolean\n  defaultOpenAllTags?: boolean\n  expandAllModelSections?: boolean\n  expandAllResponses?: boolean\n  hideClientButton?: boolean\n  hideDarkModeToggle?: boolean\n  hideModels?: boolean\n  hideSearch?: boolean\n  hideTestRequestButton?: boolean\n  showOperationId?: boolean\n}\n\nconst { configuration } = defineProps<{\n  configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst model = defineModel<LayoutOptions>({\n  default: {},\n})\n\nfunction getValue(key: keyof LayoutOptions, defaultValue: boolean = false) {\n  return model.value[key] ?? configuration?.[key] ?? defaultValue\n}\n\nfunction setValue(\n  key: keyof LayoutOptions,\n  value: boolean,\n  defaultValue: boolean = false,\n) {\n  if (value !== defaultValue) {\n    model.value = { ...model.value, [key]: value }\n  } else {\n    model.value = Object.fromEntries(\n      Object.entries(model.value).filter(([k]) => key !== k),\n    )\n  }\n}\n</script>\n<template>\n  <ScalarFormInputGroup>\n    <ScalarToggleInput\n      :modelValue=\"getValue('showSidebar', true)\"\n      @update:modelValue=\"(v) => setValue('showSidebar', !!v, true)\">\n      Show Sidebar\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('defaultOpenFirstTag', true)\"\n      @update:modelValue=\"(v) => setValue('defaultOpenFirstTag', !!v, true)\">\n      Default Open First Tag\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('defaultOpenAllTags')\"\n      @update:modelValue=\"(v) => setValue('defaultOpenAllTags', !!v)\">\n      Default Open All Tags\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('expandAllModelSections')\"\n      @update:modelValue=\"(v) => setValue('expandAllModelSections', !!v)\">\n      Expand All Model Sections\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('expandAllResponses')\"\n      @update:modelValue=\"(v) => setValue('expandAllResponses', !!v)\">\n      Expand All Responses\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('hideClientButton')\"\n      @update:modelValue=\"(v) => setValue('hideClientButton', !!v)\">\n      Hide Client Button\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('hideDarkModeToggle')\"\n      @update:modelValue=\"(v) => setValue('hideDarkModeToggle', !!v)\">\n      Hide Dark Mode Toggle\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('hideModels')\"\n      @update:modelValue=\"(v) => setValue('hideModels', !!v)\">\n      Hide Models\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('hideSearch')\"\n      @update:modelValue=\"(v) => setValue('hideSearch', !!v)\">\n      Hide Search\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('showOperationId')\"\n      @update:modelValue=\"(v) => setValue('showOperationId', !!v)\">\n      Show Operation ID\n    </ScalarToggleInput>\n    <ScalarToggleInput\n      :modelValue=\"getValue('hideTestRequestButton')\"\n      @update:modelValue=\"(v) => setValue('hideTestRequestButton', !!v)\">\n      Hide Test Request Button\n    </ScalarToggleInput>\n  </ScalarFormInputGroup>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n  ScalarCombobox,\n  ScalarFormInput,\n  ScalarListboxCheckbox,\n  ScalarThemeSwatches,\n} from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { presets, themeIds, themeLabels, type ThemeId } from '@scalar/themes'\nimport { computed } from 'vue'\n\ntype ThemeOption = {\n  id: Exclude<ThemeId, 'none'>\n  label: string\n  css: string\n}\n\nconst model = defineModel<ThemeId>()\n\nconst options = computed<ThemeOption[]>(() =>\n  themeIds\n    .filter((id) => id !== 'none')\n    .map((id) => ({\n      id,\n      label: themeLabels[id],\n      css: presets[id].theme,\n    })),\n)\nconst selected = computed<ThemeOption>({\n  get: () => {\n    const theme = model.value ?? 'default'\n    return (\n      options.value.find((o) => o.id === theme) ??\n      (options.value[0] as ThemeOption)\n    )\n  },\n  set: (option) => (model.value = option.id),\n})\n</script>\n<template>\n  <ScalarCombobox\n    v-model=\"selected\"\n    :options\n    resize>\n    <template #default=\"{ open }\">\n      <ScalarFormInput>\n        <div class=\"min-w-0 flex-1 truncate text-left\">\n          {{ selected.label }}\n        </div>\n        <ScalarThemeSwatches\n          class=\"mr-2\"\n          :css=\"selected.css\" />\n        <ScalarIconCaretDown\n          class=\"size-3.5 transition-transform\"\n          :class=\"{ 'rotate-180': open }\" />\n      </ScalarFormInput>\n    </template>\n    <template #option=\"{ selected, option }\">\n      <ScalarListboxCheckbox :selected />\n      <span class=\"text-c-1 inline-block min-w-0 flex-1 truncate\">\n        {{ option.label }}\n      </span>\n      <ScalarThemeSwatches :css=\"option.css\" />\n    </template>\n  </ScalarCombobox>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n  ScalarCodeBlock,\n  ScalarFormField,\n  ScalarFormSection,\n} from '@scalar/components'\nimport { prettyPrintJson } from '@scalar/helpers/json/pretty-print-json'\nimport { type ThemeId } from '@scalar/themes'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarConfigLayout from './ApiReferenceToolbarConfigLayout.vue'\nimport ApiReferenceToolbarConfigLayoutOptions from './ApiReferenceToolbarConfigLayoutOptions.vue'\nimport ApiReferenceToolbarConfigTheme from './ApiReferenceToolbarConfigTheme.vue'\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\n\nconst { configuration } = defineProps<{\n  configuration?: Partial<ApiReferenceConfiguration>\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst snippet = computed<string>(() => {\n  return prettyPrintJson({\n    ...overrides.value, // Make sure the overrides are first\n    ...configuration,\n    ...overrides.value, // But also that they override the configuration\n  })\n})\n\nconst theme = computed<ThemeId>({\n  get: () => overrides.value?.theme ?? configuration?.theme ?? 'default',\n  set: (t) => (overrides.value = { ...overrides.value, theme: t }),\n})\n\nconst layout = computed<'modern' | 'classic'>({\n  get: () => overrides.value?.layout ?? configuration?.layout ?? 'modern',\n  set: (l) => (overrides.value = { ...overrides.value, layout: l }),\n})\n</script>\n<template>\n  <ApiReferenceToolbarPopover class=\"w-120\">\n    <template #label>Configure</template>\n    <ScalarFormSection>\n      <template #label>Scalar Configuration</template>\n      <ScalarCodeBlock\n        class=\"bg-b-1.5 flex max-h-40 flex-col rounded border text-sm\"\n        :content=\"snippet\"\n        lang=\"json\" />\n    </ScalarFormSection>\n    <div class=\"flex flex-col gap-4\">\n      <ScalarFormField>\n        <template #label>Theme</template>\n        <ApiReferenceToolbarConfigTheme v-model=\"theme\" />\n      </ScalarFormField>\n      <ScalarFormField>\n        <template #label>Layout</template>\n        <ApiReferenceToolbarConfigLayout v-model=\"layout\" />\n      </ScalarFormField>\n      <ScalarFormField is=\"div\">\n        <template #label>Layout Options</template>\n        <ApiReferenceToolbarConfigLayoutOptions\n          v-model=\"overrides\"\n          :configuration />\n      </ScalarFormField>\n    </div>\n  </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport {\n  ScalarButton,\n  ScalarTextInputCopy,\n  useLoadingState,\n} from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n  workspace: WorkspaceStore\n  externalUrls: ExternalUrls\n}>()\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\nconst tempDocUrl = defineModel<string>('url')\n\nasync function generateTemporaryLink() {\n  if (loader.isLoading || !workspace || !!tempDocUrl.value) {\n    return\n  }\n\n  loader.start()\n\n  const document = workspace.exportActiveDocument('json')\n\n  if (!document) {\n    toast('Unable to export active document', 'error')\n    await loader.invalidate()\n    return\n  }\n\n  try {\n    const url = await uploadTempDocument(document, externalUrls)\n    await loader.validate({ duration: 900, persist: true }) // Wait to show the success state\n    tempDocUrl.value = url\n  } catch (error) {\n    const message =\n      error instanceof Error ? error.message : 'An unknown error occurred'\n    toast(message, 'error')\n    await loader.invalidate()\n  }\n}\n</script>\n<template>\n  <template v-if=\"tempDocUrl\">\n    <ScalarTextInputCopy\n      immediate\n      :modelValue=\"tempDocUrl\"\n      name=\"temporary-link\"\n      :placeholder=\"`${externalUrls.registryUrl}/share/apis/…`\">\n    </ScalarTextInputCopy>\n  </template>\n  <template v-else>\n    <ScalarButton\n      class=\"h-auto p-2.5\"\n      :loader\n      variant=\"gradient\"\n      @click=\"generateTemporaryLink\">\n      Upload Document\n    </ScalarButton>\n  </template>\n  <ApiReferenceToolbarBlurb class=\"-mt-1\">\n    Your document will automatically be deleted after 7 days.\n  </ApiReferenceToolbarBlurb>\n</template>\n","<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n  workspace: WorkspaceStore\n  externalUrls: ExternalUrls\n}>()\n</script>\n<template>\n  <ApiReferenceToolbarPopover class=\"w-120\">\n    <template #label>Share</template>\n    <ScalarFormSection>\n      <template #label>Share your API Reference</template>\n      <p class=\"text-c-2 mb-2 leading-normal\">\n        Upload your OpenAPI document to share your API Reference with others. As\n        easy as pressing a button.\n      </p>\n      <ApiReferenceToolbarShareTemporary\n        :externalUrls\n        :workspace />\n    </ScalarFormSection>\n  </ApiReferenceToolbarPopover>\n</template>\n","<script lang=\"ts\" setup>\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport type {\n  ApiReferenceConfiguration,\n  ExternalUrls,\n} from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { computed } from 'vue'\n\nimport ApiReferenceToolbarTitle from './components/ApiReferenceToolbarTitle.vue'\nimport DeployApiReference from './components/DeployApiReference.vue'\nimport ModifyConfiguration from './components/ModifyConfiguration.vue'\nimport ShareApiReference from './components/ShareApiReference.vue'\n\nconst { configuration, externalUrls } = defineProps<{\n  workspace?: WorkspaceStore\n  configuration?: Partial<ApiReferenceConfiguration>\n  externalUrls: ExternalUrls\n}>()\n\nconst overrides = defineModel<Partial<ApiReferenceConfiguration>>('overrides')\n\nconst showDeveloperTools = computed<boolean>(() => {\n  if (configuration?.showDeveloperTools === 'always') {\n    return true\n  }\n\n  if (configuration?.showDeveloperTools === 'never') {\n    return false\n  }\n\n  if (typeof window === 'undefined') {\n    return false\n  }\n\n  return isLocalUrl(window.location.href)\n})\n</script>\n<template>\n  <header\n    v-if=\"showDeveloperTools\"\n    aria-label=\"Developer Tools\"\n    class=\"api-reference-toolbar bg-b-1 relative z-1 flex h-10 justify-center border-b px-15\">\n    <div\n      class=\"-mx-2 flex max-w-(--refs-content-max-width) flex-1 items-center\">\n      <div class=\"flex flex-1 items-center\">\n        <ApiReferenceToolbarTitle />\n      </div>\n      <ModifyConfiguration\n        v-model:overrides=\"overrides\"\n        :configuration />\n      <template v-if=\"workspace\">\n        <ShareApiReference\n          :externalUrls\n          :workspace />\n        <DeployApiReference\n          :externalUrls\n          :workspace />\n      </template>\n    </div>\n  </header>\n</template>\n","<script setup lang=\"ts\">\nimport { ScalarListbox } from '@scalar/components'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n  options: { label: string; id: string }[]\n  modelValue?: string\n}>()\n\nconst emit = defineEmits<{\n  (e: 'update:modelValue', id: string): void\n}>()\n\nconst formattedOptions = computed(() =>\n  props.options.map((o) => ({ id: o.id, label: o.label })),\n)\n\nconst selected = computed(() =>\n  formattedOptions.value.find((o) => o.id === props.modelValue),\n)\n</script>\n\n<template>\n  <div\n    v-if=\"options.length > 1\"\n    class=\"document-selector px-3 pt-3\">\n    <ScalarListbox\n      v-slot=\"{ open }\"\n      :modelValue=\"selected\"\n      :options=\"formattedOptions\"\n      resize\n      @update:modelValue=\"(e) => emit('update:modelValue', e.id)\">\n      <button\n        class=\"group/dropdown-label text-c-2 hover:text-c-1 flex w-full cursor-pointer items-center gap-1 font-medium\"\n        type=\"button\">\n        <span class=\"overflow-hidden text-base text-ellipsis\">\n          {{ selected?.label || 'Select API' }}\n        </span>\n        <ScalarIconCaretDown\n          class=\"size-3 text-current transition-transform\"\n          :class=\"{ 'rotate-180': open }\"\n          weight=\"bold\" />\n      </button>\n    </ScalarListbox>\n  </div>\n</template>\n","/**\n * Create a click event that works in both browser and test environments\n */\nfunction createClickEvent() {\n  try {\n    return new MouseEvent('click', {\n      bubbles: true,\n      cancelable: true,\n      view: window,\n    })\n  } catch {\n    // Fallback for test environment\n    return new MouseEvent('click', {\n      bubbles: true,\n      cancelable: true,\n    })\n  }\n}\n\n/**\n * Parse YAML or JSON content into a JavaScript object\n */\nasync function parseContent(content: string) {\n  try {\n    return JSON.parse(content)\n  } catch {\n    const { parse } = await import('yaml')\n    return parse(content, {\n      maxAliasCount: 10000,\n      merge: true,\n    })\n  }\n}\n\n/**\n * Detect if content is JSON or YAML using lightweight string heuristics\n * to avoid the cost of a full JSON.parse call.\n */\nfunction detectFormat(content: string): 'json' | 'yaml' {\n  const trimmed = content.trimStart()\n  if (trimmed.startsWith('{') || trimmed.startsWith('[')) {\n    return 'json'\n  }\n  return 'yaml'\n}\n\n/**\n * Convert content to the target format, returning the original string when\n * no conversion is needed so that YAML comments, custom formatting, and key\n * ordering are preserved.\n */\nasync function formatContent(\n  content: string,\n  inputFormat: 'json' | 'yaml',\n  outputFormat: 'json' | 'yaml',\n): Promise<string> {\n  if (inputFormat === outputFormat) {\n    return content\n  }\n\n  const parsed = await parseContent(content)\n\n  if (outputFormat === 'json') {\n    return JSON.stringify(parsed, null, 2)\n  }\n\n  const { stringify } = await import('yaml')\n  return stringify(parsed)\n}\n\n/**\n * Trigger the download of the OpenAPI document\n */\nexport async function downloadDocument(content: string, filename?: string, format?: 'json' | 'yaml') {\n  const inputFormat = detectFormat(content)\n  const outputFormat = format ?? inputFormat\n  const contentFilename = `${filename ?? 'openapi'}.${outputFormat}`\n  const mimeType = outputFormat === 'json' ? 'application/json' : 'application/x-yaml'\n\n  const formattedContent = await formatContent(content, inputFormat, outputFormat)\n  const blob = new Blob([formattedContent], { type: mimeType })\n\n  const data = URL.createObjectURL(blob)\n  const link = document.createElement('a')\n\n  link.href = data\n  link.download = contentFilename\n\n  // this is necessary as link.click() does not work on the latest firefox\n  link.dispatchEvent(createClickEvent())\n\n  // For Firefox it is necessary to delay revoking the ObjectURL\n  setTimeout(() => {\n    window.URL.revokeObjectURL(data)\n    link.remove()\n  }, 100)\n}\n","import { isClient } from '@scalar/api-client/blocks/operation-code-sample'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { authStorage, clientStorage } from '@/helpers/storage'\n\n/**\n * Loads the default HTTP client from storage and applies it to the workspace.\n * Only updates if no default client is already set.\n */\nexport const loadClientFromStorage = (store: WorkspaceStore): void => {\n  const storedClient = clientStorage().get()\n\n  if (isClient(storedClient) && !store.workspace['x-scalar-default-client']) {\n    store.update('x-scalar-default-client', storedClient)\n  }\n}\n\n/**\n * Loads the authentication data from storage and applies it to the workspace.\n * Only updates if no authentication data is already set.\n */\nexport const loadAuthFromStorage = (store: WorkspaceStore, slug: string): void => {\n  const authPersistence = authStorage()\n  const auth = authPersistence.getAuth(slug)\n  store.auth.load({ [slug]: auth })\n}\n","import { buildSafeBodyRequest } from '@scalar/helpers/http/can-method-have-body'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { buildRequest, getEnvironmentVariables } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { type ComputedRef, watch } from 'vue'\n\n/**\n * Maps API reference configuration callbacks to client plugins.\n *\n * This function transforms the legacy onBeforeRequest and onRequestSent callbacks\n * into the new plugin hook system. The mapping is reactive, so changes to the\n * configuration will automatically update the plugin hooks.\n *\n * Note: onRequestSent is mapped to responseReceived hook. This is not a perfect\n * one-to-one mapping, but it maintains backward compatibility with the old API.\n * The old callback receives only the URL string, while the new hook receives\n * the full response object.\n *\n * @param config - Reactive configuration object containing optional hook callbacks\n * @returns Array containing a single plugin with the mapped hooks\n */\nexport const mapConfigPlugins = (\n  config: ComputedRef<ApiReferenceConfiguration>,\n  environment: ComputedRef<XScalarEnvironment>,\n): ClientPlugin[] => {\n  // Create a new plugin with the hooks which is going to be updated by the watcher when config changes\n  const plugin: ClientPlugin = { hooks: {} }\n\n  watch(\n    [() => config.value.onBeforeRequest, () => config.value.onRequestSent, () => environment.value],\n    ([onBeforeRequest, onRequestSent, environment]) => {\n      // Get the environment variables for the current environment\n      const envVariables = getEnvironmentVariables(environment)\n\n      // Initialize the hooks object if it doesn't exist\n      if (!plugin.hooks) {\n        plugin.hooks = {}\n      }\n\n      plugin.hooks.beforeRequest = onBeforeRequest\n        ? async (payload) => {\n            await onBeforeRequest({\n              // We need to build the request to get the fetch `Request`\n              request: buildSafeBodyRequest(...buildRequest(payload.requestBuilder, { envVariables }).requestPayload),\n              requestBuilder: payload.requestBuilder,\n              envVariables,\n            })\n          }\n        : undefined\n\n      /**\n       * Maps onRequestSent to responseReceived hook.\n       * The old API only passed the URL string, so we extract it from the request.\n       */\n      plugin.hooks.responseReceived = onRequestSent\n        ? (payload) => {\n            onRequestSent(payload.request.url)\n          }\n        : undefined\n    },\n    { immediate: true },\n  )\n\n  return [plugin]\n}\n","import { isClient } from '@scalar/api-client/blocks/operation-code-sample'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\nimport { useSeoMeta } from '@unhead/vue'\nimport { useFavicon } from '@vueuse/core'\nimport { type MaybeRefOrGetter, type Ref, computed, toValue, watch } from 'vue'\n\nexport const mapConfigToWorkspaceStore = ({\n  config,\n  store,\n  isDarkMode,\n}: {\n  config: MaybeRefOrGetter<ApiReferenceConfigurationRaw>\n  store: WorkspaceStore\n  isDarkMode: Ref<boolean>\n}) => {\n  // Update the workspace store if default client changes\n  watch(\n    () => toValue(config).defaultHttpClient,\n    (newValue) => {\n      if (newValue) {\n        const { targetKey, clientKey } = newValue\n\n        const clientId = `${targetKey}/${clientKey}`\n        if (isClient(clientId)) {\n          store.update('x-scalar-default-client', clientId)\n        }\n      }\n    },\n    { immediate: true },\n  )\n\n  /** Update the dark mode state when props change */\n  watch(\n    () => toValue(config).darkMode,\n    (isDark) => store.update('x-scalar-color-mode', isDark ? 'dark' : 'light'),\n  )\n\n  // Temporary mapping of isDarkMode until we update the standalone component\n  watch(\n    () => isDarkMode.value,\n    (newIsDark) => store.update('x-scalar-color-mode', newIsDark ? 'dark' : 'light'),\n    { immediate: true },\n  )\n\n  if (toValue(config).metaData) {\n    useSeoMeta(toValue(config).metaData)\n  }\n\n  // Update the active proxy when the proxyUrl changes\n  watch(\n    () => toValue(config).proxyUrl,\n    (newProxyUrl) => store.update('x-scalar-active-proxy', newProxyUrl),\n    { immediate: true },\n  )\n\n  const favicon = computed(() => toValue(config).favicon)\n  useFavicon(favicon)\n}\n","import { slugger } from '@scalar/helpers/string/slugger'\nimport { parseJsonOrYaml } from '@scalar/oas-utils/helpers'\nimport {\n  type AnyApiReferenceConfiguration,\n  type ApiReferenceConfigurationRaw,\n  type ApiReferenceConfigurationWithSource,\n  apiReferenceConfigurationWithSourceSchema,\n  isConfigurationWithSources,\n} from '@scalar/types/api-reference'\n\n/** Processed API Reference Configuration\n *\n * Creates the required title and slug for the API Reference.\n * Separate the source into a dedicated object\n * Returns the raw configuration to pass to components\n */\nexport type NormalizedConfiguration = {\n  title: string\n  slug: string\n  config: ApiReferenceConfigurationRaw\n  default: boolean\n  agent: ApiReferenceConfigurationWithSource['agent']\n  source: { url: string; content?: never } | { content: Record<string, unknown>; url?: never }\n}\n\ntype NormalizedConfigurations = Record<string, NormalizedConfiguration>\n\ntype ConfigWithRequiredSource = Omit<ApiReferenceConfigurationWithSource, 'url' | 'content'> &\n  ({ url: string; content?: never } | { content: Record<string, unknown>; url?: never })\n\n/**\n * Take any configuration and return a flat array of configurations.\n */\nexport const normalizeConfigurations = (\n  configuration: AnyApiReferenceConfiguration | undefined,\n): NormalizedConfigurations => {\n  const { slug } = slugger()\n\n  const normalized: NormalizedConfigurations = {}\n\n  if (!configuration) {\n    return normalized\n  }\n\n  const configList = Array.isArray(configuration) ? configuration : [configuration]\n\n  configList\n    /** Create a flat array of configurations with their document source data integrated. */\n    .flatMap((c) => {\n      // Check if this config has a 'sources' array property\n      if (isConfigurationWithSources(c)) {\n        // Destructure to separate sources array from other config properties\n        const { sources: configSources, ...rest } = c\n\n        // For each source in the array:\n        // - Merge the source with the parent config properties\n        // - Handle undefined sources by returning empty array via ?? []\n        return configSources?.map((source) => ({ ...rest, ...source })) ?? []\n      }\n\n      // If config doesn't have sources array, treat the config itself as a source\n      return [c]\n    })\n    .map((source) => {\n      /** Validation with migrate deprecated attributes to their new format */\n      const validated = apiReferenceConfigurationWithSourceSchema.safeParse(source)\n      return validated.success ? validated.data : null\n    })\n    /** Filter out configurations that failed validation or don't have a url or content */\n    .filter((c): c is ConfigWithRequiredSource => !!c && (!!c.url || !!c.content))\n    /** Add required attributes to the source */\n    .map((source, index) => addSlugAndTitle(source, index, slug))\n    /** Separate the configuration and sources by slug */\n    .forEach((c) => {\n      const { url, content, ...config } = c\n      normalized[c.slug] = {\n        config,\n        title: c.title,\n        slug: c.slug,\n        default: !!c?.default,\n        agent: c.agent,\n        source: content ? { content: normalizeContent(content) ?? {} } : { url },\n      }\n    })\n\n  // Process them and return normalized\n  return normalized\n}\n\n/** Normalize content into a JS object or return null if it is falsey */\nexport const normalizeContent = (\n  content: string | Record<string, unknown> | (() => string | Record<string, unknown>),\n): Record<string, unknown> | null => {\n  if (!content) {\n    return null\n  }\n\n  if (typeof content === 'function') {\n    return normalizeContent(content())\n  }\n\n  if (typeof content === 'string') {\n    return parseJsonOrYaml(content)\n  }\n\n  return content\n}\n\n/** Process a single spec configuration so that it has a title and a slug */\nconst addSlugAndTitle = (\n  source: ConfigWithRequiredSource,\n  index = 0,\n  slug: (v: string) => string,\n): ConfigWithRequiredSource & { slug: string; title: string } => {\n  // Case 1: Title exists, generate slug from it\n  if (source.title) {\n    return {\n      ...source,\n      slug: source.slug || slug(source.title),\n      title: source.title,\n    }\n  }\n\n  // Case 2: Slug exists but no title, use slug as title\n  if (source.slug) {\n    return {\n      ...source,\n      slug: slug(source.slug),\n      title: source.slug,\n    }\n  }\n\n  // Case 3: Neither exists, use index\n  return {\n    ...source,\n    slug: `api-${index + 1}`,\n    title: `API #${index + 1}`,\n  }\n}\n","<script lang=\"ts\">\n// Injected by Vite at build time (see vite.config.ts and vite.standalone.config.ts).\n// Read via process.env so the constant is replaced inline without pulling package.json\n// into the TypeScript program — that would expand rootDir and emit declarations under dist/src/.\nconst version = PACKAGE_VERSION\n\nif (version && typeof window !== 'undefined') {\n  console.info(`@scalar/api-reference@${version}`)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { provideUseId } from '@headlessui/vue'\nimport { OpenApiClientButton } from '@scalar/api-client/blocks/operation-block'\nimport {\n  createApiClientModal,\n  type ApiClientModal,\n} from '@scalar/api-client/modal'\nimport {\n  addScalarClassesToHeadless,\n  ScalarColorModeToggleButton,\n  ScalarColorModeToggleIcon,\n  ScalarSidebarFooter,\n} from '@scalar/components'\nimport { isLocalUrl } from '@scalar/helpers/url/is-local-url'\nimport {\n  createSidebarState,\n  ScalarSidebar,\n  scrollSidebarToTop,\n} from '@scalar/sidebar'\nimport { getThemeStyles, hasObtrusiveScrollbars } from '@scalar/themes'\nimport {\n  apiReferenceConfigurationSchema,\n  type AnyApiReferenceConfiguration,\n  type ApiReferenceConfiguration,\n  type ApiReferenceConfigurationRaw,\n} from '@scalar/types/api-reference'\nimport { useClipboard } from '@scalar/use-hooks/useClipboard'\nimport { useColorMode } from '@scalar/use-hooks/useColorMode'\nimport { ScalarToasts } from '@scalar/use-toasts'\nimport { createWorkspaceStore } from '@scalar/workspace-store/client'\nimport { createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport {\n  getActiveEnvironment,\n  getServers,\n} from '@scalar/workspace-store/request-example'\nimport type {\n  TraversedEntry,\n  TraversedTag,\n} from '@scalar/workspace-store/schemas/navigation'\nimport { useScrollLock } from '@vueuse/core'\nimport diff from 'microdiff'\nimport {\n  computed,\n  onBeforeMount,\n  onBeforeUnmount,\n  onMounted,\n  onServerPrefetch,\n  provide,\n  ref,\n  useId,\n  useTemplateRef,\n  watch,\n} from 'vue'\n\nimport {\n  AgentScalarButton,\n  AgentScalarDrawer,\n  OpenMCPButton,\n} from '@/components/AgentScalar'\nimport ClassicHeader from '@/components/ClassicHeader.vue'\nimport Content from '@/components/Content/Content.vue'\nimport MobileHeader from '@/components/MobileHeader.vue'\nimport { DeveloperTools } from '@/features/developer-tools'\nimport DocumentSelector from '@/features/multiple-documents/DocumentSelector.vue'\nimport SearchButton from '@/features/Search/components/SearchButton.vue'\nimport { getSystemModePreference } from '@/helpers/color-mode'\nimport { downloadDocument } from '@/helpers/download'\nimport {\n  getIdFromUrl,\n  makeUrlFromId,\n  matchesBasePath,\n} from '@/helpers/id-routing'\nimport {\n  scrollToLazy as _scrollToLazy,\n  addToPriorityQueue,\n  blockIntersection,\n  intersectionEnabled,\n} from '@/helpers/lazy-bus'\nimport {\n  loadAuthFromStorage,\n  loadClientFromStorage,\n} from '@/helpers/load-from-perssistance'\nimport { mapConfigPlugins } from '@/helpers/map-config-plugins'\nimport { mapConfigToWorkspaceStore } from '@/helpers/map-config-to-workspace-store'\nimport {\n  normalizeConfigurations,\n  type NormalizedConfiguration,\n} from '@/helpers/normalize-configurations'\nimport { safeDeepClone } from '@/helpers/safe-deep-clone'\nimport { AGENT_CONTEXT_SYMBOL, useAgent } from '@/hooks/use-agent'\nimport { useIntersection } from '@/hooks/use-intersection'\nimport { createPluginManager, PLUGIN_MANAGER_SYMBOL } from '@/plugins'\nimport { persistencePlugin } from '@/plugins/persistance-plugin'\n\nconst props = defineProps<{\n  /**\n   * Configuration for the API reference.\n   * Can be a single configuration or an array of configurations for multiple documents.\n   */\n  configuration?: AnyApiReferenceConfiguration\n}>()\n\ndefineSlots<{\n  'content-start'?(): { breadcrumb: string }\n  'content-end'?(): { breadcrumb: string }\n  'sidebar-start'?(): { breadcrumb: string }\n  'sidebar-end'?(): { breadcrumb: string }\n  'editor-placeholder'?(): { breadcrumb: string }\n  footer?(): { breadcrumb: string }\n}>()\n\nconst { copyToClipboard } = useClipboard()\n\n/**\n * Used to inject the environment into built packages\n *\n * Primary use case is the open-in-client button\n */\nconst isDevelopment = import.meta.env.DEV\n\nconst obtrusiveScrollbars = computed(hasObtrusiveScrollbars)\n\nconst eventBus = createWorkspaceEventBus({ debug: isDevelopment })\nconst isSidebarOpen = ref(false)\n\n/**\n * Due to a bug in headless UI, we need to set an ID here that can be shared across server/client\n * TODO remove this once the bug is fixed\n *\n * @see https://github.com/tailwindlabs/headlessui/issues/2979\n */\nprovideUseId(() => useId())\n\n// ---------------------------------------------------------------------------\n/**\n * Configuration Handling\n *\n * We will normalize the configurations and store them in a computed property.\n * The active configuration will be associated with the active document.\n */\nconst configList = computed(() => normalizeConfigurations(props.configuration))\n\nconst isMultiDocument = computed(() => Object.keys(configList.value).length > 1)\n\n/** Search for the source with a default attribute or use the first one */\nconst activeSlug = ref<string>(\n  Object.values(configList.value).find((c) => c.default)?.slug ??\n    configList.value[Object.keys(configList.value)?.[0] ?? '']?.slug ??\n    '',\n)\n\n/**\n * On initial page load we need to determine if there is a valid document slug in the URL\n *\n * If there is we set the active slug to the document slug\n */\nif (typeof window !== 'undefined') {\n  const url = new URL(window.location.href)\n\n  // To handle legacy query parameter multi-document support we redirect\n  // to the new path routing format\n  const apiParam = url.searchParams.get('api')\n  if (apiParam && configList.value[apiParam]) {\n    activeSlug.value = apiParam\n    const idFromUrl = getIdFromUrl(\n      url,\n      configList.value[apiParam].config.pathRouting?.basePath,\n      apiParam,\n    )\n    const newUrl = makeUrlFromId(\n      idFromUrl,\n      configList.value[apiParam].config.pathRouting?.basePath,\n      isMultiDocument.value,\n    )\n    if (newUrl) {\n      newUrl.searchParams.delete('api')\n      window.history.replaceState({}, '', newUrl.toString())\n    }\n  }\n\n  /**\n   * For path routing on initial load we do not know which basePath to check for\n   * we need to search the configs to see if any of the base paths match the URL\n   * and then use that basePath to get the initial id\n   *\n   * With this approach we cannot support multi-document mode with one of configs having\n   * an empty basePath\n   *\n   * Other conflicts are possible.\n   */\n  const basePaths = Object.values(configList.value).map(\n    (c) => c.config.pathRouting?.basePath,\n  )\n\n  const initialId = getIdFromUrl(\n    url,\n    basePaths.find((p) => (p ? matchesBasePath(url, p) : false)),\n    isMultiDocument.value ? undefined : activeSlug.value,\n  )\n  const documentSlug = initialId.split('/')[0]\n\n  if (documentSlug && configList.value[documentSlug]) {\n    activeSlug.value = documentSlug\n  }\n}\n\n/** Computed document options list for the selector logic */\nconst documentOptionList = computed(() =>\n  Object.values(configList.value).map((c) => ({\n    label: c.title,\n    id: c.slug,\n  })),\n)\n\n/** Configuration overrides to apply to the selected document (from the localhost toolbar) */\nconst configurationOverrides = ref<\n  Partial<Omit<ApiReferenceConfiguration, 'slug' | 'title' | ''>>\n>({})\n\n/** Any dev toolbar modifications are merged with the active configuration */\nconst mergedConfig = computed<ApiReferenceConfiguration>(() => ({\n  // Provides a default set of values when the lookup fails\n  ...apiReferenceConfigurationSchema.parse({}),\n  // The active configuration based on the slug\n  ...configList.value[activeSlug.value]?.config,\n  // Any overrides from the localhost toolbar\n  ...configurationOverrides.value,\n}))\n\n/** Convenience break out var to determine which routing mode we are using */\nconst basePath = computed(() => mergedConfig.value.pathRouting?.basePath)\n\nconst themeStyle = computed(() =>\n  getThemeStyles(mergedConfig.value.theme, {\n    fonts: mergedConfig.value.withDefaultFonts,\n  }),\n)\n\n/** Plugin injection is not reactive. All plugins must be provided at first render */\nconst pluginManager = createPluginManager({\n  plugins: Object.values(configList.value).flatMap(\n    (c) => c.config.plugins ?? [],\n  ),\n})\nprovide(PLUGIN_MANAGER_SYMBOL, pluginManager)\n\npluginManager.notifyInit(mergedConfig.value)\n\nwatch(mergedConfig, (config) => pluginManager.notifyConfigChange(config))\n// ---------------------------------------------------------------------------\n/** Navigation State Handling */\n\n// Front-end redirect\nif (mergedConfig.value.redirect && typeof window !== 'undefined') {\n  const newPath = mergedConfig.value.redirect(\n    (mergedConfig.value.pathRouting ? window.location.pathname : '') +\n      window.location.hash,\n  )\n  if (newPath) {\n    window.history.replaceState({}, '', newPath)\n  }\n}\n\n/**\n * Sets the active slug and updates the URL with the selected document slug\n *\n * If an element ID is passed in we will configure the path or hash routing\n */\nfunction syncSlugAndUrlWithDocument(\n  slug: string,\n  elementId: string | undefined,\n  config: ApiReferenceConfigurationRaw,\n) {\n  // We create a new URL and go to the root element if an ID is not provided\n  const url = makeUrlFromId(\n    elementId || slug,\n    config.pathRouting?.basePath,\n    isMultiDocument.value,\n  )\n\n  if (url) {\n    window.history.replaceState({}, '', url.toString())\n  }\n\n  // Update the active slug\n  activeSlug.value = slug\n}\n\n// ---------------------------------------------------------------------------\n/** Workspace Store Initialization */\n\n/**\n * Initializes the new client workspace store.\n */\nconst workspaceStore = createWorkspaceStore({\n  verbose: isDevelopment,\n})\n\n/**\n * We need to keep the client store separate from the workspace store\n * This is because we want the client store to be a playground where users can test out their requests without affecting the references store\n */\nconst clientStore = createWorkspaceStore({\n  verbose: isDevelopment,\n  plugins: [\n    persistencePlugin({\n      prefix: () => activeSlug.value,\n      persistAuth: () => mergedConfig.value.persistAuth ?? false,\n    }),\n  ],\n})\n\n// TODO: persistence should be hoisted into standalone\n// Client side integrations will want to handle dark mode externally\nconst { toggleColorMode, isDarkMode } = useColorMode({\n  initialColorMode: {\n    true: 'dark' as const,\n    false: 'light' as const,\n    undefined: 'system' as const,\n  }[String(mergedConfig.value.darkMode)],\n  overrideColorMode: mergedConfig.value.forceDarkModeState,\n})\n\n/**\n * Create top level sidebar entries for each document\n * This allows sharing a single sidebar state for across the workspace\n */\nconst itemsFromWorkspace = computed<TraversedEntry[]>(() => {\n  return Object.entries(workspaceStore.workspace.documents).map(\n    ([slug, document]) => ({\n      id: slug,\n      type: 'document',\n      description: document.info.description,\n      name: document.info.title ?? slug,\n      title: document.info.title ?? slug,\n      children: document?.['x-scalar-navigation']?.children ?? [],\n    }),\n  )\n})\n\n/** Initialize the sidebar */\nconst sidebarState = createSidebarState<TraversedEntry>(itemsFromWorkspace, {\n  hooks: {},\n})\n\n/** Recursively set all children of the given items to open */\nconst setChildrenOpen = (items: TraversedEntry[]): void => {\n  items.forEach((item) => {\n    if (item.type === 'tag' || item.type === 'models') {\n      sidebarState.setExpanded(item.id, true)\n    }\n    if ('children' in item && item.children) {\n      setChildrenOpen(item.children)\n    }\n  })\n}\n\n/** We get the sub items for the sidebar based on the configuration/document slug */\nconst sidebarItems = computed<TraversedEntry[]>(() => {\n  const config = mergedConfig.value\n\n  if (!config) {\n    return []\n  }\n\n  const docItems =\n    sidebarState.items.value.find(\n      (item): item is TraversedTag => item.id === activeSlug.value,\n    )?.children ?? []\n\n  // When the default open all tags configuration is enabled we open all the children of the document\n  if (config.defaultOpenAllTags) {\n    setChildrenOpen(docItems)\n  }\n\n  // When the expand all model sections configuration is enabled we open all the children of the models tag\n  if (config.expandAllModelSections) {\n    const models = docItems.find(\n      (item): item is TraversedTag => item.type === 'models',\n    )\n    if (models) {\n      sidebarState.setExpanded(models.id, true)\n      models.children?.forEach((child) => {\n        sidebarState.setExpanded(child.id, true)\n      })\n    }\n  }\n\n  return docItems\n})\n\n/** Find the sidebar entry that represents the introduction section */\nconst infoSectionId = computed(\n  () =>\n    sidebarItems.value.find(\n      (item) => item.type === 'text' && item.title === 'Introduction',\n    )?.id ?? `${activeSlug.value}/description/introduction`,\n)\n\n/** User for mobile navigation */\nconst breadcrumb = ref('')\n\nconst slotProps = computed(() => ({\n  breadcrumb: breadcrumb.value,\n}))\n\nconst setBreadcrumb = (id: string) => {\n  const item = sidebarState.getEntryById(id)\n\n  if (!item || item.type === 'document') {\n    breadcrumb.value = ''\n  } else {\n    breadcrumb.value = item.title\n  }\n}\n\nconst scrollToLazyElement = (id: string) => {\n  setBreadcrumb(id)\n  sidebarState.setSelected(id)\n  _scrollToLazy(id, sidebarState.setExpanded, sidebarState.getEntryById)\n}\n\n/** Maps some config values to the workspace store to keep it reactive */\nmapConfigToWorkspaceStore({\n  config: () => mergedConfig.value,\n  store: workspaceStore,\n  isDarkMode,\n})\n\nmapConfigToWorkspaceStore({\n  config: () => mergedConfig.value,\n  store: clientStore,\n  isDarkMode,\n})\n\n/** Merged environment variables from workspace and document levels */\nconst environment = computed(\n  () =>\n    getActiveEnvironment(\n      workspaceStore,\n      workspaceStore.workspace.activeDocument ?? null,\n    ).environment,\n)\n\nif (typeof window !== 'undefined') {\n  // @ts-expect-error - For debugging purposes expose the store\n  window.dataDumpWorkspace = () => workspaceStore\n}\n\n// For testing\ndefineExpose({\n  eventBus,\n  workspaceStore,\n  sidebarItems,\n})\n\n/**\n * Computes a mapping from model names to their sidebar entry IDs.\n * This is used for quick lookups and navigation within the sidebar.\n */\nconst modelsIndex = computed(() => {\n  return sidebarItems.value\n    .filter((item) => item.type === 'models')\n    .flatMap((item) => item.children ?? [])\n    .filter((item) => item.type === 'model')\n    .reduce(\n      (acc, item) => {\n        acc[item.name] = item.id\n        return acc\n      },\n      {} as Record<string, string>,\n    )\n})\n\neventBus.on('scroll-to:model-by-name', ({ name }) => {\n  /** Find the model in the models index */\n  const model = modelsIndex.value[name]\n\n  if (model) {\n    scrollToLazyElement(model)\n  }\n})\n\nconst addDocument: typeof workspaceStore.addDocument = async (\n  input,\n  navigationOptions,\n) => {\n  const result = await workspaceStore.addDocument(input, navigationOptions)\n  // Now add it to the client store\n  const state = workspaceStore.exportWorkspace()\n  clientStore.loadWorkspace({\n    auth: {},\n    documents: {\n      [input.name]: safeDeepClone(state.documents[input.name]) ?? {\n        'openapi': '3.1.0',\n        'info': {\n          title: '',\n          version: '',\n        },\n        'x-scalar-original-document-hash': '',\n      },\n    },\n    intermediateDocuments: {},\n    originalDocuments: {},\n    overrides: {},\n    history: {},\n    meta: {},\n  })\n  return result\n}\n\n// ---------------------------------------------------------------------------\n// Document Management\n\n/**\n * Handle changing the active document\n *\n * 1. If the document has not be loaded to the workspace store we set it to empty and asynchronously load it\n * 2. If the document has been loaded to the workspace store we just set it to active\n * 3. If the content from the configuration has changes we need to update the document in the workspace store\n */\nconst changeSelectedDocument = async (\n  slug: string,\n  elementId?: string | undefined,\n) => {\n  const normalized = configList.value[slug]\n\n  if (!normalized) {\n    console.warn(`Document ${slug} not found in configList`)\n    return\n  }\n\n  const config = {\n    ...normalized.config,\n    ...configurationOverrides.value,\n  }\n\n  // Store `onDocumentSelect` result to await its execution later, before calling `onLoaded`\n  const onDocumentSelectPromise = config.onDocumentSelect?.()\n\n  // Set the active slug and update any routing\n  syncSlugAndUrlWithDocument(slug, elementId, config)\n\n  // Update the document on the route as well, the method and path don't matter as we update them before opening\n  apiClient.value?.route({\n    documentSlug: slug,\n    method: 'get',\n    path: '/',\n  })\n\n  const isFirstLoad = !workspaceStore.workspace.documents[slug]\n\n  // If the document is not in the store, we asynchronously load it\n  if (isFirstLoad) {\n    const result = await addDocument(\n      normalized.source.url\n        ? {\n            name: slug,\n            url: normalized.source.url,\n            fetch: config.fetch,\n          }\n        : {\n            name: slug,\n            document: normalized.source.content ?? {},\n          },\n      config,\n    )\n\n    const document = clientStore.workspace.documents[slug]\n\n    // If the document does not have a selected server we set it to the first server\n    if (\n      result === true &&\n      document !== undefined &&\n      document['x-scalar-selected-server'] === undefined\n    ) {\n      // Set the active server if the document is loaded successfully\n      const servers = getServers(\n        normalized.config.servers ?? document.servers,\n        {\n          baseServerUrl: mergedConfig.value.baseServerURL,\n          documentUrl: normalized.source.url,\n        },\n      )\n      if (servers.length > 0) {\n        clientStore.updateDocument(\n          slug,\n          'x-scalar-selected-server',\n          servers[0]!.url,\n        )\n      }\n    }\n  }\n\n  // Always set it to active; if the document is null we show a loading state\n  workspaceStore.update('x-scalar-active-document', slug)\n  clientStore.update('x-scalar-active-document', slug)\n\n  // If the document has persistence enabled we load the auth schemes from storage\n  if (config.persistAuth) {\n    loadAuthFromStorage(clientStore, slug)\n  }\n\n  // ensure that `onLoaded` hook doesn't block execution but is executed after `onDocumentSelect`\n  void (async () => {\n    await onDocumentSelectPromise\n    void config.onLoaded?.(slug)\n  })()\n\n  // When loading to a specified element we need to freeze and scroll\n  if (elementId && elementId !== slug) {\n    scrollToLazyElement(elementId)\n  }\n  // If there is no child element of the document specified and defaultOpenFirstTag is enabled, we expand the first tag\n  else if (config.defaultOpenFirstTag) {\n    const firstTag = sidebarItems.value.find((item) => item.type === 'tag')\n    if (firstTag) {\n      sidebarState.setExpanded(firstTag.id, true)\n    }\n  }\n}\n\n/**\n * TODO:Move this to a dedicated updateDocument function in the future and\n * away from vue-reactivity based updates\n */\nwatch(\n  () => Object.values(configList.value),\n  async (newConfigList, oldConfigList) => {\n    /**\n     * Handles replacing and updating documents within the workspace store\n     * when we detect configuration changes.\n     */\n    const updateSource = async (\n      updated: NormalizedConfiguration,\n      previous: NormalizedConfiguration | undefined,\n    ) => {\n      /** If we have not loaded the document previously we don't need to handle any updates to store */\n      if (!workspaceStore.workspace.documents[updated.slug]) {\n        return\n      }\n      /** If the URL has changed we fetch and rebase */\n      if (updated.source.url && updated.source.url !== previous?.source.url) {\n        await addDocument(\n          {\n            name: updated.slug,\n            url: updated.source.url,\n            fetch: updated.config.fetch,\n          },\n          updated.config,\n        )\n\n        return\n      }\n\n      // If the was not a URL change then we require a document to continue\n      if (!updated.source.content) {\n        return\n      }\n\n      /**\n       * We need to deeply check for document changes. Parse documents and then only rebase\n       * if we detect deep changes in the two sources\n       */\n      if (\n        diff(\n          updated.source.content,\n          previous && 'content' in previous.source\n            ? (previous.source.content ?? {})\n            : {},\n        ).length\n      ) {\n        await addDocument(\n          {\n            name: updated.slug,\n            document: updated.source.content,\n          },\n          updated.config,\n        )\n      }\n    }\n\n    newConfigList.forEach((newConfig, index) =>\n      updateSource(newConfig, oldConfigList[index]),\n    )\n\n    const newSlugs = newConfigList.map((c) => c.slug)\n    const oldSlugs = oldConfigList.map((c) => c.slug)\n\n    // If the slugs have changed, we need to update the active document and the URL query param\n    if (\n      newSlugs.length !== oldSlugs.length ||\n      !newSlugs.every((slug, index) => slug === oldSlugs[index])\n    ) {\n      await changeSelectedDocument(newSlugs[0] ?? '')\n    }\n  },\n  {\n    deep: true,\n  },\n)\n\n/** Preload the first document during SSR */\nonServerPrefetch(() => changeSelectedDocument(activeSlug.value))\n\n/** Load the first document on page load */\nonBeforeMount(async () => {\n  // We read the client from the client store so we need to set it to the client store\n  loadClientFromStorage(clientStore)\n\n  await changeSelectedDocument(\n    activeSlug.value,\n    getIdFromUrl(\n      window.location.href,\n      configList.value[activeSlug.value]?.config.pathRouting?.basePath,\n      isMultiDocument.value ? undefined : activeSlug.value,\n    ),\n  )\n})\n\nconst documentUrl = computed(() => {\n  return configList.value[activeSlug.value]?.source?.url\n})\n\n// --------------------------------------------------------------------------- */\n// Agent Scalar\n\n/**\n * Determines if Agent Scalar should be enabled based on the configuration and the current URL\n *\n * - If the agent is disabled in the configuration, it should not be enabled\n * - If the current URL is a local URL, it should be enabled\n * - If the agent key is set, it should be enabled\n */\nconst agent = useAgent({\n  agentEnabled: computed(() => {\n    const currentConfiguration = configList.value[activeSlug.value]\n\n    if (currentConfiguration?.agent?.disabled) {\n      return false\n    }\n\n    if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n      return true\n    }\n\n    return Boolean(configList.value[activeSlug.value]?.agent?.key)\n  }),\n})\nprovide(AGENT_CONTEXT_SYMBOL, agent)\n\n// --------------------------------------------------------------------------- */\n// Api Client Modal\n\n// Setup the ApiClient on mount\nconst modal = useTemplateRef<HTMLElement>('modal')\nconst apiClient = ref<ApiClientModal | null>(null)\nonMounted(() => {\n  if (!modal.value) {\n    return\n  }\n\n  apiClient.value = createApiClientModal({\n    el: modal.value,\n    eventBus,\n    workspaceStore: clientStore,\n    options: mergedConfig,\n    plugins: [\n      ...pluginManager.getApiClientPlugins(),\n      ...mapConfigPlugins(mergedConfig, environment),\n    ],\n  })\n})\nonBeforeUnmount(() => {\n  pluginManager.notifyDestroy()\n  apiClient.value?.app.unmount()\n})\n\n// ---------------------------------------------------------------------------\n// Top level event handlers and user specified callbacks\n\n/** Ensure we call the onServerChange callback */\neventBus.on('server:update:selected', ({ url }) =>\n  mergedConfig.value.onServerChange?.(url),\n)\n\n/** Download the document from the store */\neventBus.on('ui:download:document', ({ format }) => {\n  const document = workspaceStore.exportActiveDocument(format)\n\n  if (!document) {\n    console.error('No document found to download')\n    return\n  }\n\n  void downloadDocument(document, activeSlug.value ?? 'openapi', format)\n})\n\n// ---------------------------------------------------------------------------\n// Local event and scroll handling\n\n/**\n * Handler for a direct navigation event such as a sidebar or search click\n *\n * Depending on the item type we handle a selection event differently:\n *\n * - Tag: If a tag is closed we open it and all its parents and scroll to it\n *        If a tag is open we just close the tag\n * - Operation:\n *        Open all parents and scroll to the operation\n */\nconst handleSelectSidebarEntry = (id: string, caller?: 'sidebar') => {\n  const item = sidebarState.getEntryById(id)\n\n  if (\n    (item?.type === 'tag' ||\n      item?.type === 'models' ||\n      item?.type === 'text') &&\n    sidebarState.isExpanded(id) && // Only close if the item is expanded\n    sidebarState.selectedItem.value === id // Only close if the item is not the currently selected item\n  ) {\n    // hack until we fix intersection logic\n    const unblock = blockIntersection()\n\n    sidebarState.setExpanded(id, false)\n\n    unblock()\n\n    return\n  }\n\n  // Close the mobile menu upon selecting any item that's not a tag or model\n  if (item?.type !== 'tag' && item?.type !== 'models') {\n    isSidebarOpen.value = false\n  }\n\n  scrollToLazyElement(id)\n\n  const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n  if (url) {\n    window.history.pushState({}, '', url)\n\n    // Trigger the onSidebarClick callback if the caller is sidebar\n    if (caller === 'sidebar') {\n      mergedConfig.value.onSidebarClick?.(url.toString())\n    }\n  }\n\n  if (agent.showAgent.value) {\n    agent.closeAgent()\n  }\n}\n\n/** Handle a navigation item selection event */\neventBus.on('select:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle a scroll to navigation item event */\neventBus.on('scroll-to:nav-item', ({ id }) => handleSelectSidebarEntry(id))\n\n/** Handle an intersecting navigation item event */\neventBus.on('intersecting:nav-item', ({ id }) => {\n  if (!intersectionEnabled.value) {\n    return\n  }\n\n  sidebarState.setSelected(id)\n  setBreadcrumb(id)\n\n  // Scroll the sidebar to keep the selected element near the top\n  scrollSidebarToTop(id)\n\n  const url = makeUrlFromId(id, basePath.value, isMultiDocument.value)\n  if (url && workspaceStore.workspace.activeDocument) {\n    window.history.replaceState({}, '', url.toString())\n  }\n})\n\neventBus.on('toggle:nav-item', ({ id, open }) => {\n  if (open) {\n    mergedConfig.value.onShowMore?.(id)\n\n    // Pre-queue first child so it renders immediately when the tag expands\n    const entry = sidebarState.getEntryById(id)\n    if (entry && 'children' in entry && entry.children) {\n      const first = entry.children[0]\n\n      if (first) {\n        addToPriorityQueue(first.id)\n      }\n    }\n  }\n  sidebarState.setExpanded(id, open ?? !sidebarState.isExpanded(id))\n})\n\neventBus.on('copy-url:nav-item', ({ id }) => {\n  const url = makeUrlFromId(\n    id,\n    basePath.value,\n    isMultiDocument.value,\n  )?.toString()\n  return url && copyToClipboard(url)\n})\n\n// ---------------------------------------------------------------------------\n// History and scroll restoration\n\nonBeforeMount(() => {\n  window.history.scrollRestoration = 'manual'\n  // Ensure we add our scalar wrapper class to the headless ui root, mounted is too late\n  addScalarClassesToHeadless()\n\n  // When we detect a back button press we scroll to the new id\n  window.addEventListener('popstate', () => {\n    const id = getIdFromUrl(\n      window.location.href,\n      mergedConfig.value.pathRouting?.basePath,\n      isMultiDocument.value ? undefined : activeSlug.value,\n    )\n    if (id) {\n      scrollToLazyElement(id)\n    }\n  })\n})\n\n// ---------------------------------------------------------------------------\n// Document start intersection observer\n\nconst documentStartRef = useTemplateRef<HTMLElement>('documentStartRef')\n\n/**\n * Uses `immediate` so the sentinel fires as soon as it enters the viewport (not just at the center strip).\n * When the user scrolls away from the top, both this observer and the first section's center-strip\n * observer are intersecting simultaneously, so the section observer does not re-fire on its own.\n * The `onExit` callback bridges that gap by finding whichever section is at the viewport center\n * and re-emitting the nav event for it.\n */\nuseIntersection(\n  documentStartRef,\n  () => {\n    eventBus.emit('intersecting:nav-item', { id: activeSlug.value })\n  },\n  {\n    onExit: () => {\n      const centerY = window.innerHeight / 2\n      const section = document\n        .elementsFromPoint(window.innerWidth / 2, centerY)\n        .find((el) => el.tagName === 'SECTION' && el.id)\n\n      if (section?.id) {\n        eventBus.emit('intersecting:nav-item', { id: section.id })\n      }\n    },\n    immediate: true,\n  },\n)\n\nconst colorMode = computed(() => {\n  const mode = workspaceStore.workspace['x-scalar-color-mode']\n\n  if (mode === 'system') {\n    return getSystemModePreference()\n  }\n\n  return mode\n})\n\nconst bodyScrollLocked = useScrollLock(\n  typeof document !== 'undefined' ? document.body : null,\n)\n\nwatch(agent.showAgent, () => (bodyScrollLocked.value = agent.showAgent.value))\n\nconst showMCPButton = computed(() => {\n  if (mergedConfig.value.mcp?.disabled) {\n    return false\n  }\n\n  if (typeof window !== 'undefined' && isLocalUrl(window.location.href)) {\n    return true\n  }\n\n  if (mergedConfig.value.mcp) {\n    return true\n  }\n\n  return false\n})\n</script>\n\n<template>\n  <!-- SingleApiReference -->\n  <div>\n    <!-- Inject any custom CSS directly into a style tag -->\n    <component :is=\"'style'\">\n      {{ mergedConfig.customCss }}\n      {{ themeStyle }}\n    </component>\n    <div\n      ref=\"documentEl\"\n      class=\"scalar-app scalar-api-reference references-layout\"\n      :class=\"[\n        {\n          'scalar-api-references-standalone-mobile': mergedConfig.showSidebar,\n          'scalar-scrollbars-obtrusive': obtrusiveScrollbars,\n          'references-editable': mergedConfig.isEditable,\n          'references-sidebar': mergedConfig.showSidebar,\n          'references-sidebar-mobile-open': isSidebarOpen,\n          'references-classic': mergedConfig.layout === 'classic',\n        },\n        $attrs.class,\n      ]\">\n      <!-- Agent Scalar -->\n      <AgentScalarDrawer\n        v-if=\"agent.agentEnabled.value\"\n        :agentScalarConfiguration=\"configList[activeSlug]?.agent\"\n        :externalUrls=\"mergedConfig.externalUrls\"\n        :workspaceStore />\n\n      <!-- Mobile Header and Sidebar when in modern layout -->\n\n      <MobileHeader\n        v-if=\"mergedConfig.layout === 'modern'\"\n        :breadcrumb=\"breadcrumb\"\n        :isSidebarOpen=\"isSidebarOpen\"\n        :showSidebar=\"mergedConfig.showSidebar\"\n        @toggleSidebar=\"() => (isSidebarOpen = !isSidebarOpen)\">\n        <template #search>\n          <SearchButton\n            v-if=\"!mergedConfig.hideSearch\"\n            class=\"my-2\"\n            :document=\"workspaceStore.workspace.activeDocument\"\n            :eventBus=\"eventBus\"\n            :hideModels=\"mergedConfig.hideModels\"\n            :searchHotKey=\"mergedConfig.searchHotKey\"\n            :showSidebar=\"mergedConfig.showSidebar\" />\n        </template>\n        <template #sidebar=\"{ sidebarClasses }\">\n          <ScalarSidebar\n            v-if=\"mergedConfig.showSidebar && mergedConfig.layout === 'modern'\"\n            :aria-label=\"`Sidebar for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n            class=\"t-doc__sidebar\"\n            :class=\"sidebarClasses\"\n            :isExpanded=\"sidebarState.isExpanded\"\n            :isSelected=\"sidebarState.isSelected\"\n            :items=\"sidebarItems\"\n            layout=\"reference\"\n            :options=\"mergedConfig\"\n            role=\"navigation\"\n            @selectItem=\"(id) => handleSelectSidebarEntry(id, 'sidebar')\"\n            @toggleGroup=\"\n              (id: string) =>\n                sidebarState.setExpanded(id, !sidebarState.isExpanded(id))\n            \">\n            <template #header>\n              <!-- Wrap in a div when slot is filled -->\n              <DocumentSelector\n                v-if=\"documentOptionList.length > 1\"\n                :modelValue=\"activeSlug\"\n                :options=\"documentOptionList\"\n                @update:modelValue=\"changeSelectedDocument\" />\n\n              <!-- Search -->\n              <div\n                v-if=\"!mergedConfig.hideSearch\"\n                class=\"flex gap-1.5 px-3 pt-3\">\n                <SearchButton\n                  :document=\"workspaceStore.workspace.activeDocument\"\n                  :eventBus=\"eventBus\"\n                  :hideModels=\"mergedConfig.hideModels\"\n                  :searchHotKey=\"mergedConfig.searchHotKey\" />\n\n                <AgentScalarButton v-if=\"agent.agentEnabled.value\" />\n              </div>\n              <!-- Sidebar Start -->\n              <slot\n                name=\"sidebar-start\"\n                v-bind=\"slotProps\" />\n            </template>\n            <template #footer>\n              <slot\n                name=\"sidebar-end\"\n                v-bind=\"slotProps\">\n                <!-- We default the sidebar footer to the standard scalar elements -->\n                <ScalarSidebarFooter class=\"darklight-reference\">\n                  <OpenApiClientButton\n                    v-if=\"!mergedConfig.hideClientButton && !showMCPButton\"\n                    buttonSource=\"sidebar\"\n                    :integration=\"mergedConfig._integration\"\n                    :isDevelopment=\"isDevelopment\"\n                    :url=\"documentUrl\" />\n                  <OpenMCPButton\n                    v-if=\"showMCPButton\"\n                    :config=\"mergedConfig.mcp\"\n                    :externalUrls=\"mergedConfig.externalUrls\"\n                    :isDevelopment=\"isDevelopment\"\n                    :url=\"documentUrl\"\n                    :workspace=\"workspaceStore\" />\n                  <!-- Override the dark mode toggle slot to hide it -->\n                  <template #toggle>\n                    <ScalarColorModeToggleButton\n                      v-if=\"\n                        !mergedConfig.hideDarkModeToggle &&\n                        !mergedConfig.forceDarkModeState\n                      \"\n                      :modelValue=\"colorMode === 'dark'\"\n                      @update:modelValue=\"() => toggleColorMode()\" />\n                    <span v-else />\n                  </template>\n                </ScalarSidebarFooter>\n              </slot>\n            </template>\n          </ScalarSidebar>\n        </template>\n      </MobileHeader>\n\n      <!-- Primary Content -->\n      <main\n        :aria-label=\"`Open API Documentation for ${workspaceStore.workspace.activeDocument?.info?.title}`\"\n        class=\"references-rendered\"\n        :inert=\"agent.showAgent.value\">\n        <Content\n          :authStore=\"clientStore.auth\"\n          :clientDocument=\"clientStore.workspace.activeDocument\"\n          :document=\"workspaceStore.workspace.activeDocument\"\n          :environment\n          :eventBus\n          :expandedItems=\"sidebarState.expandedItems.value\"\n          :headingSlugGenerator=\"\n            mergedConfig.generateHeadingSlug ??\n            ((heading) => `${activeSlug}/description/${heading.slug}`)\n          \"\n          :infoSectionId\n          :items=\"sidebarItems\"\n          :options=\"mergedConfig\"\n          :xScalarDefaultClient=\"\n            clientStore.workspace['x-scalar-default-client']\n          \">\n          <template #start>\n            <!-- Placeholder intersection observer that emits an empty string to clear the hash when scrolled to the top -->\n            <div ref=\"documentStartRef\" />\n\n            <DeveloperTools\n              v-if=\"workspaceStore.workspace.activeDocument\"\n              v-model:overrides=\"configurationOverrides\"\n              class=\"references-developer-tools\"\n              :configuration=\"mergedConfig\"\n              :externalUrls=\"mergedConfig.externalUrls\"\n              :workspace=\"workspaceStore\" />\n\n            <ClassicHeader v-if=\"mergedConfig.layout === 'classic'\">\n              <div class=\"w-64 empty:hidden\">\n                <DocumentSelector\n                  v-if=\"documentOptionList.length > 1\"\n                  :modelValue=\"activeSlug\"\n                  :options=\"documentOptionList\"\n                  @update:modelValue=\"changeSelectedDocument\" />\n              </div>\n              <SearchButton\n                v-if=\"!mergedConfig.hideSearch\"\n                class=\"t-doc__sidebar max-w-64\"\n                :document=\"workspaceStore.workspace.activeDocument\"\n                :eventBus=\"eventBus\"\n                :hideModels=\"mergedConfig.hideModels\"\n                :searchHotKey=\"mergedConfig.searchHotKey\" />\n              <template #dark-mode-toggle>\n                <ScalarColorModeToggleIcon\n                  v-if=\"\n                    !mergedConfig.hideDarkModeToggle &&\n                    !mergedConfig.forceDarkModeState\n                  \"\n                  class=\"text-c-2 hover:text-c-1\"\n                  :mode=\"colorMode\"\n                  style=\"transform: scale(1.4)\"\n                  variant=\"icon\"\n                  @click=\"() => toggleColorMode()\" />\n              </template>\n            </ClassicHeader>\n            <slot\n              name=\"content-start\"\n              v-bind=\"slotProps\" />\n          </template>\n          <!-- TODO: Remove this; we no longer directly support an inline editor -->\n          <template\n            v-if=\"mergedConfig.isEditable\"\n            #empty-state>\n            <slot\n              name=\"editor-placeholder\"\n              v-bind=\"slotProps\" />\n          </template>\n          <template #end>\n            <slot\n              name=\"content-end\"\n              v-bind=\"slotProps\" />\n          </template>\n        </Content>\n      </main>\n      <!-- Optional Footer -->\n      <div\n        v-if=\"$slots.footer\"\n        class=\"references-footer\">\n        <slot\n          name=\"footer\"\n          v-bind=\"slotProps\" />\n      </div>\n      <!-- Client Modal mount point -->\n      <div ref=\"modal\" />\n    </div>\n    <ScalarToasts />\n  </div>\n</template>\n\n<style>\n@import '@/style.css';\n\n/* Add base styles to the body. Removed browser default margins for a better experience. */\n@layer scalar-base {\n  body {\n    margin: 0;\n    background-color: var(--scalar-background-1);\n  }\n}\n/** Used to check if css is loaded */\n:root {\n  --scalar-loaded-api-reference: true;\n}\n</style>\n<style scoped>\n/* Configurable Layout Variables */\n@layer scalar-config {\n  .scalar-api-reference {\n    /* The header height */\n    --refs-header-height: calc(\n      var(--scalar-custom-header-height, 0px) + var(--scalar-header-height, 0px)\n    );\n    /* The offset of visible references content (minus headers) */\n    --refs-viewport-offset: calc(\n      var(--refs-header-height, 0px) + var(--refs-content-offset, 0px)\n    );\n    /* The calculated height of visible references content (minus headers) */\n    --refs-viewport-height: calc(\n      var(--full-height, 100dvh) - var(--refs-viewport-offset, 0px)\n    );\n    /* The width of the sidebar */\n    --refs-sidebar-width: var(--scalar-sidebar-width, 0px);\n    /* The height of the sidebar */\n    --refs-sidebar-height: calc(\n      var(--full-height, 100dvh) - var(--refs-header-height, 0px)\n    );\n    /* The maximum width of the content column */\n    --refs-content-max-width: var(--scalar-content-max-width, 1540px);\n  }\n\n  .scalar-api-reference.references-classic {\n    /* Classic layout is wider */\n    --refs-content-max-width: var(--scalar-content-max-width, 1420px);\n    min-height: 100dvh;\n    --refs-sidebar-width: 0;\n  }\n}\n.t-doc__sidebar {\n  z-index: 10;\n}\n\n/* ----------------------------------------------------- */\n/* References Layout */\n.references-layout {\n  /* Try to fill the container */\n  min-height: 100dvh;\n  min-width: 100%;\n  max-width: 100%;\n  flex: 1;\n\n  /*\n  Calculated by a resize observer and set in the style attribute\n  Falls back to the viewport height\n  */\n  --full-height: 100dvh;\n\n  /* Grid layout */\n  display: grid;\n  grid-template-rows: var(--scalar-header-height, 0px) repeat(2, auto);\n  grid-template-columns: auto 1fr;\n  grid-template-areas:\n    'header header'\n    'navigation rendered'\n    'footer footer';\n\n  background: var(--scalar-background-1);\n}\n\n.references-editor {\n  grid-area: editor;\n  display: flex;\n  min-width: 0;\n  background: var(--scalar-background-1);\n}\n\n.references-rendered {\n  position: relative;\n  grid-area: rendered;\n  min-width: 0;\n  background: var(--scalar-background-1);\n}\n.scalar-api-reference.references-classic,\n.references-classic .references-rendered {\n  height: initial !important;\n  max-height: initial !important;\n}\n\n@layer scalar-config {\n  .references-sidebar {\n    /* Set a default width if references are enabled */\n    --refs-sidebar-width: var(--scalar-sidebar-width, 288px);\n  }\n}\n\n/* Footer */\n.references-footer {\n  grid-area: footer;\n}\n/* ----------------------------------------------------- */\n/* Responsive / Mobile Layout */\n\n@media (max-width: 1000px) {\n  /* Keep toolbar hidden on mobile without forcing desktop display mode. */\n  .references-developer-tools {\n    display: none;\n  }\n\n  /* Stack view on mobile */\n  .references-layout {\n    /* Adjust the sidebar height to the viewport height minus the header height */\n    --refs-sidebar-height: calc(\n      var(--full-height, 100dvh) - var(--scalar-custom-header-height, 0px)\n    );\n\n    grid-template-columns: 100%;\n    grid-template-rows: var(--scalar-header-height, 0px) 0px auto auto;\n\n    grid-template-areas:\n      'header'\n      'navigation'\n      'rendered'\n      'footer';\n  }\n  .references-editable {\n    grid-template-areas:\n      'header'\n      'navigation'\n      'editor';\n  }\n\n  .references-rendered {\n    position: static;\n  }\n}\n</style>\n<style scoped>\n/**\n* Sidebar CSS for standalone\n* TODO: @brynn move this to the sidebar block OR the ApiReferenceStandalone component\n* when the new elements are available\n*/\n@media (max-width: 1000px) {\n  .scalar-api-references-standalone-mobile:not(.references-classic) {\n    --scalar-header-height: 50px;\n  }\n}\n</style>\n<style scoped>\n.darklight-reference {\n  width: 100%;\n  margin-top: auto;\n}\n</style>\n","import { deepClone } from '@scalar/workspace-store/helpers/deep-clone'\n\n/**\n * Deep-clones plain data for use where mutation must not affect the source.\n *\n * In the browser we use `structuredClone`, which preserves `Date`, `Map`, `Set`,\n * typed arrays, and other structured types. During SSR there is no `window`, so\n * we fall back to `JSON.parse(JSON.stringify(...))`, which only supports JSON\n * values (functions, `undefined` in objects, symbols, etc. are dropped or altered).\n *\n * @example\n * ```ts\n * const copy = safeDeepClone(spec)\n * copy.info.title = 'Draft'\n * // original spec is unchanged\n * ```\n */\nexport const safeDeepClone = <T>(value: T): T => {\n  if (typeof window === 'undefined') {\n    return deepClone(value)\n  }\n  return window.structuredClone(value) as T\n}\n","/**\n * Gets the system color mode preference from the browser.\n * Falls back to 'light' if running in a non-browser environment.\n *\n * @returns The system preference for dark or light mode.\n */\nexport const getSystemModePreference = (): 'dark' | 'light' => {\n  if (typeof window === 'undefined' || typeof window?.matchMedia !== 'function') {\n    return 'light'\n  }\n\n  return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n}\n","<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components'\nimport { themeLabels, type ThemeId } from '@scalar/themes'\n\ndefineProps<{\n  theme: ThemeId\n}>()\n\nconst emits = defineEmits<{\n  (e: 'changeTheme', { id, label }: { id: ThemeId; label: string }): void\n  (e: 'loadSwaggerFile'): void\n  (e: 'linkSwaggerFile'): void\n  (e: 'updateContent', value: string): void\n}>()\n\nconst themeIds: ThemeId[] = [\n  'default',\n  'alternate',\n  'moon',\n  'purple',\n  'solarized',\n  'bluePlanet',\n  'saturn',\n  'kepler',\n  'mars',\n  'deepSpace',\n]\n\nasync function fetchExampleSpecification() {\n  const response = await fetch(\n    'https://registry.scalar.com/@scalar/apis/galaxy?format=yaml',\n  )\n\n  emits('updateContent', await response.text())\n}\n</script>\n<template>\n  <div class=\"custom-scroll start\">\n    <div class=\"start-copy\">\n      <div class=\"start-logo\">\n        <svg\n          height=\"36\"\n          viewBox=\"0 0 36 36\"\n          width=\"36\"\n          xmlns=\"http://www.w3.org/2000/svg\">\n          <path\n            d=\"M18 0a18 18 0 1 1 0 36 18 18 0 0 1 0-36Zm11.2 6.5c-3.3-3.3-11.1-1-17.4 5.3-6.2 6.3-8.6 14-5.3 17.4 3.3 3.3 11 .9 17.3-5.4 6.3-6.2 8.7-14 5.4-17.3ZM17.6 12a6.3 6.3 0 1 1 0 12.7 6.3 6.3 0 0 1 0-12.7Z\"\n            fill=\"currentColor\"\n            fill-rule=\"evenodd\" />\n        </svg>\n      </div>\n      <h1 class=\"start-h1\">Swagger Editor</h1>\n      <p class=\"start-p\">\n        Welcome to the Scalar API References + Swagger Editor, a Free &\n        Open-Source tool that takes your Swagger/OAS file and generates\n        Beautiful API references.\n      </p>\n      <div class=\"start-cta\">\n        <ScalarButton\n          class=\"w-full\"\n          @click=\"fetchExampleSpecification\">\n          Show Example\n        </ScalarButton>\n        <ScalarButton\n          class=\"w-full\"\n          variant=\"outlined\"\n          @click=\"$emit('loadSwaggerFile')\">\n          Upload File\n        </ScalarButton>\n      </div>\n    </div>\n    <div class=\"start-row\">\n      <div class=\"start-section start-section-integrations\">\n        <div class=\"start-h2\">INTEGRATIONS</div>\n        <a\n          class=\"start-item\"\n          href=\"https://github.com/scalar/scalar/tree/main/integrations/fastify#readme\"\n          target=\"_blank\">\n          <svg\n            fill=\"currentColor\"\n            height=\"16\"\n            viewBox=\"0 0 19 16\"\n            width=\"19\"\n            xmlns=\"http://www.w3.org/2000/svg\">\n            <path\n              d=\"m18.2 3.1.8-2V.9l-4.7 1.3C15.2 1 15 0 15 0s-2.5 1.6-4.3 1.5c-2 0-3.6.8-4 1-1.8 1.2-2.5 3.3-3.2 3.8L0 8.9 2.3 8l-2 2.5c.2.3 1.2 1.6 2.1 1.3l.4-.1 1.6.5-.7-1 .2-.2.9.3-.1-.8.9.3-.1-.8.3-.1 1-3.5 3.7-2.6-.3.7A4 4 0 0 1 8 7l-.6.2c-.5.5-.7.7-.8 2.5a2 2 0 0 1 1 0c1.6.4 2.2 2.3 1.7 2.9l-.7.6H8v.6h-.7v.5l-.2.2c-.7 0-1.4-.6-1.4-.6 0 .5.4 1.3.4 1.3s1.7 1.1 2.7.7c1-.4.7-2.3 2.8-3.2l3.3-.9.8-2.2-1.7.5v-2l2.5-.6.9-2.2-3.4.9v-2l4.2-1.1Z\"\n              fill=\"currentColor\"\n              fill-rule=\"nonzero\" />\n          </svg>\n          <span>Fastify</span>\n        </a>\n        <a\n          class=\"start-item\"\n          href=\"https://github.com/scalar/scalar/blob/main/documentation/integrations/html-js.md#html\"\n          target=\"_blank\">\n          <svg\n            fill=\"currentColor\"\n            viewBox=\"0 0 24 24\"\n            xmlns=\"http://www.w3.org/2000/svg\">\n            <g>\n              <path\n                d=\"M22.5 1.5h-21A1.5 1.5 0 0 0 0 3v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 6V3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3A1.25 1.25 0 1 1 4.5 5.75 1.25 1.25 0 0 1 3.25 4.5ZM8.5 5.75A1.25 1.25 0 1 1 9.75 4.5 1.25 1.25 0 0 1 8.5 5.75Z\"\n                fill=\"currentColor\" />\n              <path\n                d=\"M22.5 9h-21A1.5 1.5 0 0 0 0 10.5v3A1.5 1.5 0 0 0 1.5 15h21a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 22.5 9ZM3.25 12a1.25 1.25 0 1 1 1.25 1.25A1.25 1.25 0 0 1 3.25 12Zm5.25 1.25A1.25 1.25 0 1 1 9.75 12a1.25 1.25 0 0 1-1.25 1.25Z\"\n                fill=\"currentColor\" />\n              <path\n                d=\"M22.5 16.5h-21A1.5 1.5 0 0 0 0 18v3a1.5 1.5 0 0 0 1.5 1.5h21A1.5 1.5 0 0 0 24 21v-3a1.5 1.5 0 0 0-1.5-1.5Zm-19.25 3a1.25 1.25 0 1 1 1.25 1.25 1.25 1.25 0 0 1-1.25-1.25Zm5.25 1.25a1.25 1.25 0 1 1 1.25-1.25 1.25 1.25 0 0 1-1.25 1.25Z\"\n                fill=\"currentColor\" />\n            </g>\n          </svg>\n          <span>CDN</span>\n        </a>\n        <a\n          class=\"start-item\"\n          href=\"https://github.com/scalar/scalar/blob/main/packages/api-reference/README.md#vuejs\"\n          target=\"_blank\">\n          <svg\n            height=\"170\"\n            viewBox=\"0 0 196.3 170\"\n            width=\"196.3\"\n            xmlns=\"http://www.w3.org/2000/svg\">\n            <g\n              fill=\"currentColor\"\n              fill-rule=\"nonzero\">\n              <polygon\n                points=\"39.23 0 0 0 2.9450761 5.1010782 98.16 170.02 196.32 0 157.06 0 98.16 102.01 42.175701 5.0991171\" />\n              <polygon\n                points=\"75.5 2.009956e-14 0 2.009956e-14 2.94 5.1 78.44871 5.1 98.16 39.26 117.87937 5.1 193.38 5.1 196.325 0 120.82 7.8065636e-15 114.97322 2.009956e-14 98.16 29.037153 81.35 2.009956e-14\" />\n            </g>\n          </svg>\n          <span>Vue</span>\n        </a>\n        <a\n          class=\"start-item\"\n          href=\"https://github.com/scalar/scalar/blob/main/packages/api-reference-react/README.md#usage\"\n          target=\"_blank\">\n          <svg\n            height=\"23.3\"\n            viewBox=\"0 0 22 23.3\"\n            width=\"22\"\n            xmlns=\"http://www.w3.org/2000/svg\">\n            <g\n              fill=\"none\"\n              fill-rule=\"evenodd\">\n              <circle\n                cx=\"11\"\n                cy=\"11.6\"\n                fill=\"currentColor\"\n                fill-rule=\"nonzero\"\n                r=\"2\" />\n              <g stroke=\"currentColor\">\n                <ellipse\n                  cx=\"11\"\n                  cy=\"11.6\"\n                  rx=\"11\"\n                  ry=\"4.2\" />\n                <ellipse\n                  cx=\"11\"\n                  cy=\"11.6\"\n                  rx=\"11\"\n                  ry=\"4.2\"\n                  transform=\"rotate(60 11 11.6)\" />\n                <ellipse\n                  cx=\"11\"\n                  cy=\"11.6\"\n                  rx=\"11\"\n                  ry=\"4.2\"\n                  transform=\"rotate(120 11 11.6)\" />\n              </g>\n            </g>\n          </svg>\n          <span>React</span>\n        </a>\n      </div>\n      <div class=\"start-section start-section-colors\">\n        <p class=\"start-h2\">THEMING</p>\n        <div\n          v-for=\"themeId in themeIds\"\n          :key=\"themeId\"\n          class=\"start-item\"\n          :class=\"{ 'start-item-active': themeId === theme }\"\n          @click=\"\n            $emit('changeTheme', { id: themeId, label: themeLabels[themeId] })\n          \">\n          {{ themeLabels[themeId] }}\n        </div>\n      </div>\n    </div>\n    <p class=\"start-h1\">Features</p>\n    <ul class=\"start-ul\">\n      <li>\n        <p class=\"start-h3\">Customize</p>\n        Bring your typography & color palettes, or use our themes!\n      </li>\n      <li>\n        <p class=\"start-h3\">Testing</p>\n        A deeply integrated Rest API Client (Also Free & Open-Source)\n      </li>\n      <li>\n        <p class=\"start-h3\">Search</p>\n        Fully integrated Search (Using fuse.js)\n      </li>\n      <li>\n        <p class=\"start-h3\">Hosting</p>\n        Free subdomain hosting on https://apidocumentation.com\n      </li>\n      <li>\n        <p class=\"start-h3\">OpenAPI & Swagger</p>\n        Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0\n      </li>\n      <li>\n        <p class=\"start-h3\">Code Samples</p>\n        Code samples to show off your API in most popular languages\n      </li>\n    </ul>\n  </div>\n</template>\n<style scoped>\n.start {\n  padding: 24px;\n  display: flex;\n  flex-flow: wrap;\n  justify-content: space-between;\n  position: relative;\n  z-index: 0;\n}\n.swagger-editor .start {\n  padding-top: 24px;\n}\n.start-h1 {\n  font-size: var(--scalar-heading-2);\n  margin-top: 0;\n  line-height: 1.45;\n  margin-bottom: 0;\n  font-weight: var(--scalar-bold);\n  color: var(--scalar-color-1);\n  width: 100%;\n  position: relative;\n}\n.start-h3 {\n  font-size: var(--scalar-paragraph);\n  margin-top: 0;\n  margin-bottom: 6px;\n  display: block;\n  line-height: 1.45;\n  font-weight: var(--scalar-bold);\n  color: var(--scalar-color-1);\n  width: 100%;\n}\n.start-h1:not(:first-of-type) {\n  margin-top: 24px;\n}\n.start-p {\n  font-size: var(--scalar-paragraph);\n  color: var(--scalar-color-2);\n  line-height: 1.5;\n  width: 100%;\n  margin-top: 12px;\n}\n.start-ul {\n  margin-top: 12px;\n  font-size: var(--scalar-paragraph);\n  line-height: 1.5;\n  padding-left: 0;\n  list-style: initial;\n  display: flex;\n  flex-flow: wrap;\n  gap: 24px;\n}\n.start-ul li {\n  margin: 0;\n  padding: 0;\n  list-style: none;\n  width: calc(50% - 24px);\n  color: var(--scalar-color-2);\n}\n.start-ul li:first-of-type {\n  margin-top: 0;\n}\n.start-section {\n  width: 100%;\n  margin-bottom: 12px;\n  display: flex;\n  flex-flow: wrap;\n}\n.start-section:last-of-type {\n  margin-bottom: 48px;\n}\n.start-h2 {\n  background: var(--scalar-background-2);\n  border-top-left-radius: var(--scalar-radius-lg);\n  border-top-right-radius: var(--scalar-radius-lg);\n  border: 1px solid var(--scalar-border-color);\n  color: var(--scalar-color-3);\n  font-size: var(--scalar-mini);\n  font-weight: var(--scalar-semibold);\n  padding: 9px;\n  width: 100%;\n}\n.start-item {\n  align-items: center;\n  background: var(--scalar-background-2);\n  border-right: 1px solid var(--scalar-border-color);\n  border-bottom: 1px solid var(--scalar-border-color);\n  color: var(--scalar-color-1);\n  cursor: pointer;\n  display: flex;\n  flex: 1;\n  font-size: var(--scalar-mini);\n  font-weight: var(--scalar-semibold);\n  padding: 9px;\n  text-transform: capitalize;\n  user-select: none;\n}\n.start-section-integrations .start-item:first-of-type {\n  border-bottom-left-radius: var(--scalar-radius-lg);\n  border-left: 1px solid var(--scalar-border-color);\n}\n.start-section-integrations .start-item:last-of-type {\n  border-bottom-right-radius: var(--scalar-radius-lg);\n}\n.start-section-colors .start-item {\n  min-width: 33.33%;\n}\n.start-section-colors .start-item:nth-child(3n + 2) {\n  border-left: 1px solid var(--scalar-border-color);\n}\n.start-section-colors .start-item:last-of-type,\n.start-section-colors .start-item-active:last-of-type::before {\n  border-radius: 0 0 var(--scalar-radius-lg) var(--scalar-radius-lg);\n}\n.start-item:empty {\n  pointer-events: none;\n}\n.start-item svg {\n  width: 14px;\n  height: 14px;\n  margin-right: 6px;\n}\n.start-item:hover {\n  background: var(--scalar-background-3);\n}\n.start-item-active {\n  z-index: 10;\n  position: relative;\n  color: var(--scalar-color-1);\n}\n.start-item-active::before {\n  border: 1px solid var(--scalar-color-1);\n  content: '';\n  inset: -1px -1px -1px -1px;\n  pointer-events: none;\n  position: absolute;\n}\n.start-section-color .start-item {\n  text-transform: capitalize;\n}\n.start-cta {\n  display: flex;\n  gap: 12px;\n  width: 100%;\n  margin-top: 24px;\n  margin-bottom: 0;\n}\n.start-row {\n  width: 100%;\n  margin-top: 12px;\n  overflow: hidden;\n}\n.start-hero-copy {\n  background: var(--scalar-background-2);\n  padding: 12px;\n  border-radius: var(--scalar-radius-lg);\n}\n.start-p-small {\n  font-weight: var(--scalar-semibold);\n  font-size: var(--scalar-mini);\n  color: var(--scalar-color-2);\n  margin-bottom: 12px;\n  line-height: 1.4;\n}\n.start-cta {\n  margin-bottom: 12px;\n  width: fit-content;\n  white-space: nowrap;\n}\n.start-copy {\n  padding: 76px 48px 48px 48px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-direction: column;\n  text-align: center;\n}\n.start-logo {\n  color: var(--scalar-color-1);\n  margin-bottom: 24px;\n  width: 72px;\n  aspect-ratio: 1;\n  position: relative;\n  box-shadow: var(--scalar-shadow-2);\n  border-radius: 50%;\n}\n.start-logo:before {\n  content: '';\n  width: 300%;\n  aspect-ratio: 1;\n  left: -100%;\n  top: -100%;\n  position: absolute;\n  z-index: -1;\n  border-radius: 50%;\n  background-size: 24px 24px;\n  box-shadow:\n    inset 0 0 50px var(--scalar-background-1),\n    inset 0 0 50px var(--scalar-background-1);\n  background-image:\n    linear-gradient(to right, var(--scalar-border-color) 1px, transparent 1px),\n    linear-gradient(to bottom, var(--scalar-border-color) 1px, transparent 1px);\n}\n.start-logo svg {\n  width: 100%;\n  height: auto;\n  background: var(--scalar-background-1);\n  padding: 3px;\n  border-radius: 50%;\n  position: relative;\n}\n@media screen and (max-width: 600px) {\n  .start-section-colors .start-item,\n  .start-item {\n    width: 100%;\n    border-radius: 0;\n    border-right: none;\n    border-top: 1px solid var(--scalar-border-color);\n  }\n  .start-item:empty {\n    display: none;\n  }\n  .start-h2 {\n    border-bottom: none;\n  }\n  .start li {\n    width: 100%;\n  }\n  .start-copy {\n    padding: 48px 0 24px 0;\n  }\n}\n@media screen and (max-width: 1000px) {\n  .start {\n    padding: 0;\n    overflow: auto;\n  }\n}\n</style>\n","import type {\n  AnyApiReferenceConfiguration,\n  ApiReferenceConfigurationWithSource,\n  CreateApiReference,\n} from '@scalar/types/api-reference'\nimport { apiReferenceConfigurationWithSourceSchema } from '@scalar/types/api-reference'\nimport { createHead } from '@unhead/vue/client'\nimport { createApp, createSSRApp, h, reactive } from 'vue'\n\nimport { default as ApiReference } from '@/components/ApiReference.vue'\n\nconst getSpecScriptTag = (doc: Document) => doc.getElementById('api-reference')\n\n/**\n * Reading the configuration from the data-attributes.\n */\nexport function getConfigurationFromDataAttributes(doc: Document): ApiReferenceConfigurationWithSource {\n  const specElement = doc.querySelector('[data-spec]')\n  const specUrlElement = doc.querySelector('[data-spec-url]')\n  const configurationScriptElement = doc.querySelector('#api-reference[data-configuration]')\n\n  const getConfiguration = () => {\n    // <script data-configuration=\"{ … }\" />\n    if (configurationScriptElement) {\n      const configurationFromElement = configurationScriptElement.getAttribute('data-configuration')\n\n      if (configurationFromElement) {\n        return {\n          _integration: 'html',\n          ...JSON.parse(configurationFromElement.split('&quot;').join('\"')),\n        }\n      }\n    }\n\n    return apiReferenceConfigurationWithSourceSchema.parse({ _integration: 'html' })\n  }\n\n  const getUrl = () => {\n    // Let's first check if the user passed a spec URL in the configuration.\n    if (getConfiguration().url) {\n      return getConfiguration().url\n    }\n\n    if (getConfiguration().spec?.url) {\n      return getConfiguration().spec?.url\n    }\n\n    // <script id=\"api-reference\" data-url=\"/scalar.json\" />\n    const specScriptTag = getSpecScriptTag(doc)\n    if (specScriptTag) {\n      const urlFromScriptTag = specScriptTag.getAttribute('data-url')?.trim()\n\n      if (urlFromScriptTag) {\n        return urlFromScriptTag\n      }\n    }\n\n    // <div data-spec-url=\"/scalar.json\" />\n    if (specUrlElement) {\n      console.warn(\n        '[@scalar/api-reference] The [data-spec-url] HTML API is deprecated. Use the new <script id=\"api-reference\" data-url=\"/scalar.json\" /> API instead.',\n      )\n      const urlFromSpecUrlElement = specUrlElement.getAttribute('data-spec-url')\n\n      if (urlFromSpecUrlElement) {\n        return urlFromSpecUrlElement\n      }\n    }\n\n    return undefined\n  }\n\n  const getContent = (): string | undefined => {\n    // <script id=\"api-reference\" type=\"application/json\">{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Example\"},\"paths\":{}}</script>\n    const specScriptTag = getSpecScriptTag(doc)\n    if (specScriptTag) {\n      const specFromScriptTag = specScriptTag.innerHTML?.trim()\n\n      if (specFromScriptTag) {\n        return specFromScriptTag\n      }\n    }\n\n    // <div data-spec='{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Example\"},\"paths\":{}}' />\n    if (specElement) {\n      console.warn(\n        '[@scalar/api-reference] The [data-spec] HTML API is deprecated. Use the new <script id=\"api-reference\" type=\"application/json\">{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"Example\"},\"paths\":{}}</script> API instead.',\n      )\n      const specFromSpecElement = specElement.getAttribute('data-spec')?.trim()\n\n      if (specFromSpecElement) {\n        return specFromSpecElement\n      }\n    }\n\n    return undefined\n  }\n\n  const getProxyUrl = () => {\n    // <script id=\"api-reference\" data-proxy-url=\"https://proxy.scalar.com\">…</script>\n    const specScriptTag = getSpecScriptTag(doc)\n    if (specScriptTag) {\n      const proxyUrl = specScriptTag.getAttribute('data-proxy-url')\n\n      if (proxyUrl) {\n        return proxyUrl.trim()\n      }\n    }\n\n    return undefined\n  }\n\n  // Ensure Reference Props are reactive\n  if (!specUrlElement && !specElement && !getSpecScriptTag(doc)) {\n    // Stay quiet.\n  } else {\n    const urlOrContent = getContent() ? { content: getContent() } : { url: getUrl() }\n\n    return apiReferenceConfigurationWithSourceSchema.parse({\n      _integration: 'html',\n      proxyUrl: getProxyUrl(),\n      ...getConfiguration(),\n      ...urlOrContent,\n    })\n  }\n\n  return apiReferenceConfigurationWithSourceSchema.parse({ _integration: 'html' })\n}\n\n/**\n * Mount the Scalar API Reference on a given document.\n * Read the HTML data-attributes for configuration.\n */\nexport function findDataAttributes(doc: Document, configuration: ApiReferenceConfigurationWithSource) {\n  /** @deprecated Use the new <script id=\"api-reference\" data-url=\"/scalar.json\" /> API instead. */\n  const specElement = doc.querySelector('[data-spec]')\n  /** @deprecated Use the new <script id=\"api-reference\" data-url=\"/scalar.json\" /> API instead. */\n  const specUrlElement = doc.querySelector('[data-spec-url]')\n\n  if (configuration?.darkMode) {\n    doc.body?.classList.add('dark-mode')\n  } else {\n    doc.body?.classList.add('light-mode')\n  }\n\n  const container = createContainer(doc, specElement || specUrlElement)\n\n  if (container) {\n    createApiReference(container, configuration)\n  }\n}\n\n// If it's a script tag, we can't mount the Vue.js app inside that tag.\n// We need to add a new container element before the script tag.\nexport const createContainer = (doc: Document, element?: Element | null) => {\n  let _container: Element | null = null\n\n  const specScriptTag = getSpecScriptTag(doc)\n\n  if (specScriptTag) {\n    _container = doc.createElement('div')\n    specScriptTag?.parentNode?.insertBefore(_container, specScriptTag)\n  } else if (element) {\n    _container = element\n  }\n\n  return _container\n}\n\n/**\n * Create (and mount) a new Scalar API Reference\n *\n * @example createApiReference({ url: '/scalar.json' }).mount('#app')\n * @example createApiReference('#app', { url: '/scalar.json' })\n * @example createApiReference(document.getElementById('app'), { url: '/scalar.json' })\n */\nexport const createApiReference: CreateApiReference = (\n  elementOrSelectorOrConfig,\n  optionalConfiguration?: AnyApiReferenceConfiguration,\n) => {\n  // Create an id prefix for useId so we don't have collisions with other Vue apps\n  const idPrefix = 'scalar-refs'\n\n  const props = reactive<{ configuration: AnyApiReferenceConfiguration }>({\n    // Either the configuration will be the second argument or it MUST be the first (configuration only)\n    configuration: optionalConfiguration ?? (elementOrSelectorOrConfig as AnyApiReferenceConfiguration) ?? {},\n  })\n\n  const createReferenceApp = (isSsr = false) => {\n    const referenceApp = isSsr ? createSSRApp(() => h(ApiReference, props)) : createApp(() => h(ApiReference, props))\n\n    // Meta tags, etc.\n    referenceApp.use(createHead())\n    referenceApp.config.idPrefix = idPrefix\n\n    return referenceApp\n  }\n\n  // If we have an optional config, then we must mount the element immediately (not sure why type is not narrowing)\n  const mountElement = optionalConfiguration\n    ? typeof elementOrSelectorOrConfig === 'string'\n      ? document.querySelector(elementOrSelectorOrConfig)\n      : (elementOrSelectorOrConfig as Element)\n    : null\n\n  // Detect server-rendered content and use createSSRApp for hydration\n  const shouldHydrate = !!optionalConfiguration && !!mountElement && mountElement.children.length > 0\n  let app = createReferenceApp(shouldHydrate)\n\n  if (optionalConfiguration) {\n    if (mountElement) {\n      app.mount(mountElement)\n    } else {\n      console.error('Could not find a mount point for API References:', elementOrSelectorOrConfig)\n    }\n  }\n\n  /**\n   * Reload the API Reference\n   * @deprecated\n   */\n  document.addEventListener(\n    'scalar:reload-references',\n    () => {\n      console.warn(\n        'scalar:reload-references event has been deprecated, please use the scalarInstance.app.mount method instead.',\n      )\n      if (!props.configuration) {\n        return\n      }\n\n      // Snag the current element\n      const currentElement =\n        typeof elementOrSelectorOrConfig === 'string'\n          ? document.querySelector(elementOrSelectorOrConfig)\n          : (elementOrSelectorOrConfig as Element)\n\n      if (!currentElement) {\n        return\n      }\n\n      // Ensure we re-attach the element if it was unmounted\n      if (currentElement && !document.body.contains(currentElement)) {\n        document.body.appendChild(currentElement)\n      }\n\n      // Create a new Vue app instance\n      app.unmount()\n      app = createReferenceApp()\n      app.mount(currentElement)\n    },\n    false,\n  )\n\n  /** Destroy the current API Reference instance */\n  const destroy = () => {\n    props.configuration = {}\n    app.unmount()\n  }\n\n  /**\n   * Allow user to destroy the API Reference\n   * @deprecated\n   */\n  document.addEventListener(\n    'scalar:destroy-references',\n    () => {\n      console.warn('scalar:destroy-references event has been deprecated, please use scalarInstance.destroy instead.')\n      destroy()\n    },\n    false,\n  )\n\n  /**\n   * Allow user to update configuration\n   * @deprecated\n   */\n  document.addEventListener(\n    'scalar:update-references-config',\n    (ev) => {\n      console.warn(\n        'scalar:update-references-config event has been deprecated, please use scalarInstance.updateConfiguration instead.',\n      )\n      if ('detail' in ev) {\n        Object.assign(props, ev.detail)\n      }\n    },\n    false,\n  )\n\n  const instance = {\n    app,\n    getConfiguration: () => props.configuration ?? {},\n    updateConfiguration: (newConfig: AnyApiReferenceConfiguration) => {\n      props.configuration = newConfig\n    },\n    destroy,\n  }\n\n  return instance\n}\n"]}