const e=require(`./serialize.utils.cjs`);function t(e,t){return Object.values(e).includes(t)}function n(n,r,i=!1){if(t(n,r))return r;let a=`Value ${e.safeJsonStringify(r)} is not a valid member of enum ${e.safeJsonStringify(n)}.`;if(i)throw Error(a)}exports.toEnumValue=n;