"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.patch = void 0;
function removeEvaluationPolicy(value) {
    if (Array.isArray(value)) {
        return value.map((entry) => removeEvaluationPolicy(entry));
    }
    if (value === null || typeof value !== "object") {
        return value;
    }
    const next = Object.fromEntries(Object.entries(value).map(([key, entry]) => [
        key,
        removeEvaluationPolicy(entry),
    ]));
    Reflect.deleteProperty(next, "evaluationPolicy");
    return next;
}
exports.patch = {
    version: 16,
    changes: [
        {
            op: "custom",
            name: "remove-evaluation-policy",
            apply: (state) => removeEvaluationPolicy(state),
        },
    ],
};
