import s from"@redocly/ajv";import l from"ajv-formats";import{removeDeepProperty as c}from"../../../utils/object/remove-deep-property.js";function F(t,e){const i=JSON.parse(JSON.stringify(e)),a=d(t);return a(i||{})||(a.errors?.map(o=>o.instancePath.slice(1))?.forEach(o=>{const n=o.split("/");c(i,n)}),a(i||{})),i||{}}function d(t){if(!t.$id)return r.compile(t);const e=r.getSchema(t.$id);return e||(r.addSchema(t),r.compile(t))}const r=new s({strictSchema:!1,allowUnionTypes:!0,useDefaults:!0,allErrors:!0,discriminator:!0,strictTypes:!1,verbose:!0});l(r);export{r as ajv,F as safeParsePartial};
