var o;
(function(e) {
  e.merge = (n, i) => s(s({}, n), i);
})(o || (o = {}));
function g(e, n, i, r, t, c, a, y, d) {
  const w = [e, n, i, r, t, c, a, y, d].reduce(s, {});
  return l(w);
}
const P = Symbol("isProxy");
function l(e, n) {
  const i = new Proxy({}, {
    deleteProperty: () => !1,
    set: () => {
      throw new Error("Cannot set property on injected service container");
    },
    get: (r, t) => t === P ? !0 : f(r, t, e, n || i),
    getOwnPropertyDescriptor: (r, t) => (f(r, t, e, n || i), Object.getOwnPropertyDescriptor(r, t)),
    // used by for..in
    has: (r, t) => t in e,
    // used by ..in..
    ownKeys: () => [...Object.getOwnPropertyNames(e)]
    // used by for..in
  });
  return i;
}
const u = Symbol();
function f(e, n, i, r) {
  if (n in e) {
    if (e[n] instanceof Error)
      throw new Error("Construction failure. Please make sure that your dependencies are constructable.", { cause: e[n] });
    if (e[n] === u)
      throw new Error('Cycle detected. Please make "' + String(n) + '" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');
    return e[n];
  } else if (n in i) {
    const t = i[n];
    e[n] = u;
    try {
      e[n] = typeof t == "function" ? t(r) : l(t, r);
    } catch (c) {
      throw e[n] = c instanceof Error ? c : void 0, c;
    }
    return e[n];
  } else
    return;
}
function s(e, n) {
  if (n) {
    for (const [i, r] of Object.entries(n))
      if (r !== void 0) {
        const t = e[i];
        t !== null && r !== null && typeof t == "object" && typeof r == "object" ? e[i] = s(t, r) : e[i] = r;
      }
  }
  return e;
}
export {
  o as Module,
  g as inject
};
