import{RELATION_NORMALIZATION_MAP as r}from"../database/constants/relation-normalization.js";function o(e){const s=r[e.type];return s?e.type===s?{type:s,sourceKey:e.sourceKey,targetKey:e.targetKey,sourceVersion:e.sourceVersion??null,targetVersion:e.targetVersion??null,sourceRevision:e.sourceRevision??null,targetRevision:e.targetRevision??null}:{type:s,sourceKey:e.targetKey,targetKey:e.sourceKey,sourceVersion:e.targetVersion??null,targetVersion:e.sourceVersion??null,sourceRevision:e.targetRevision??null,targetRevision:e.sourceRevision??null}:{type:e.type,sourceKey:e.sourceKey,targetKey:e.targetKey,sourceVersion:e.sourceVersion??null,targetVersion:e.targetVersion??null,sourceRevision:e.sourceRevision??null,targetRevision:e.targetRevision??null}}export{o as normalizeRelation};
