function s(r) {
  return r == null ? !1 : typeof r == "object" && (Array.isArray(r) || r.constructor === Object);
}
function c(r, e) {
  const o = Object.keys(r), n = { ...r };
  for (const t of o) {
    if (!(t in n))
      continue;
    const i = n[t];
    s(i) && (n[t] = JSON.stringify(i));
  }
  return n;
}
export {
  c as stringifyJsonFieldsForSubmit
};
