// Ported from js-yaml v3.13.1:
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { CORE_SCHEMA } from "./core.ts";
import { DEFAULT_SCHEMA } from "./default.ts";
import { EXTENDED_SCHEMA } from "./extended.ts";
import { FAILSAFE_SCHEMA } from "./failsafe.ts";
import { JSON_SCHEMA } from "./json.ts";
export {
  CORE_SCHEMA,
  DEFAULT_SCHEMA,
  EXTENDED_SCHEMA,
  FAILSAFE_SCHEMA,
  JSON_SCHEMA,
};

export function replaceSchemaNameWithSchemaClass(
  options?: {
    schema?: "core" | "default" | "failsafe" | "json" | "extended" | unknown;
  },
) {
  switch (options?.schema) {
    case "core":
      options.schema = CORE_SCHEMA;
      break;
    case "default":
      options.schema = DEFAULT_SCHEMA;
      break;
    case "failsafe":
      options.schema = FAILSAFE_SCHEMA;
      break;
    case "json":
      options.schema = JSON_SCHEMA;
      break;
    case "extended":
      options.schema = EXTENDED_SCHEMA;
      break;
  }
}

// denoCacheMetadata={"headers":{"server":"cloudflare","cache-control":"public, max-age=31536000, immutable","access-control-expose-headers":"*","content-security-policy":"default-src 'none'; script-src 'none'; style-src 'none'; img-src 'none'; font-src 'none'; connect-src 'none'; frame-src 'none'; object-src 'none'; frame-ancestors 'none'; sandbox; form-action 'none';","cross-origin-resource-policy":"cross-origin","date":"Tue, 28 Jul 2026 12:31:15 GMT","x-jsr-backend":"modules","nel":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}","content-type":"text/typescript","age":"889257","cf-cache-status":"HIT","vary":"Origin","x-content-type-options":"nosniff","content-length":"1170","set-cookie":"__cf_bm=.9rnTkNQrV2Wg3XFqAVm3RnE1cfEDdD0mzY2aytIf5o-1785241874.9971554-1.0.1.1-aQssZyR.93HXmUE6WESV6_OznAlwSwpbnumiMwPlaBC.iV4M6UrBbVBuDBXYYzgfnbQVPzQ_rhUc_WnaGYlNZrOsg0xetzbcBh_XSlbtX6CdxgxZlGwzdkWlgBpu78zM; HttpOnly; SameSite=None; Secure; Path=/; Domain=jsr.io; Expires=Tue, 28 Jul 2026 13:01:15 GMT","etag":"\"14d868c824b7ee9ff9795cfa608079cb\"","report-to":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=wUbrOwIMvhlwbNz5mwG2ho0y4ABPzeYO9YKsjOsNsp8RJuot6Vznd%2BRsLOBxgWoVpB%2FgRNr1yLTQ%2BSZ5Cll7uT8ShXUF847TA%2FQhR7XFveeEX8YD%2F4gNHz4%3D\"}]}","accept-ranges":"bytes","cf-ray":"a223e656afd37db6-LAX","x-robots-tag":"noindex","alt-svc":"h3=\":443\"; ma=86400","access-control-allow-origin":"*"},"url":"https://jsr.io/@std/yaml/0.224.3/schema/mod.ts","time":1785241875}