import { MissingDependencyError } from './chunk-B5MDFOOY.js';

// ../../node_modules/.pnpm/@standard-community+standard-json@0.3.5_@standard-schema+spec@1.1.0_@types+json-schema@_4158936703affc1ffa39c8f9970780bb/node_modules/@standard-community/standard-json/dist/zod-Bwrt9trS.js
var zodv4Error = new MissingDependencyError("zod v4");
async function getToJsonSchemaFn() {
  return async (schema, options) => {
    let handler;
    if ("_zod" in schema) {
      try {
        const mod = await import('zod/v4/core');
        handler = mod.toJSONSchema;
      } catch {
        throw zodv4Error;
      }
    } else {
      try {
        const mod = await import('./esm-QZXXQQYB.js');
        handler = mod.zodToJsonSchema;
      } catch {
        throw new MissingDependencyError("zod-to-json-schema");
      }
    }
    return handler(schema, options);
  };
}

export { getToJsonSchemaFn as default };
//# sourceMappingURL=zod-Bwrt9trS-6WLQRJO3.js.map
//# sourceMappingURL=zod-Bwrt9trS-6WLQRJO3.js.map