import { addDays as p } from "./addDays.js";
import { addMonths as D } from "./addMonths.js";
import { constructFrom as T } from "./constructFrom.js";
import { toDate as y } from "./toDate.js";
function w(o, r) {
  const {
    years: t = 0,
    months: s = 0,
    weeks: n = 0,
    days: d = 0,
    hours: c = 0,
    minutes: m = 0,
    seconds: i = 0
  } = r, e = y(o), a = s || t ? D(e, s + t * 12) : e, f = d || n ? p(a, d + n * 7) : a, u = m + c * 60, h = (i + u * 60) * 1e3;
  return T(o, f.getTime() + h);
}
export {
  w as add,
  w as default
};
