import i from "./index.es226.js";
import h from "./index.es240.js";
const c = (s) => s instanceof h ? { ...s } : s;
function v(s, d) {
  d = d || {};
  const u = {};
  function o(t, e, r, a) {
    return i.isPlainObject(t) && i.isPlainObject(e) ? i.merge.call({ caseless: a }, t, e) : i.isPlainObject(e) ? i.merge({}, e) : i.isArray(e) ? e.slice() : e;
  }
  function l(t, e, r, a) {
    if (i.isUndefined(e)) {
      if (!i.isUndefined(t))
        return o(void 0, t, r, a);
    } else return o(t, e, r, a);
  }
  function f(t, e) {
    if (!i.isUndefined(e))
      return o(void 0, e);
  }
  function n(t, e) {
    if (i.isUndefined(e)) {
      if (!i.isUndefined(t))
        return o(void 0, t);
    } else return o(void 0, e);
  }
  function m(t, e, r) {
    if (r in d)
      return o(t, e);
    if (r in s)
      return o(void 0, t);
  }
  const g = {
    url: f,
    method: f,
    data: f,
    baseURL: n,
    transformRequest: n,
    transformResponse: n,
    paramsSerializer: n,
    timeout: n,
    timeoutMessage: n,
    withCredentials: n,
    withXSRFToken: n,
    adapter: n,
    responseType: n,
    xsrfCookieName: n,
    xsrfHeaderName: n,
    onUploadProgress: n,
    onDownloadProgress: n,
    decompress: n,
    maxContentLength: n,
    maxBodyLength: n,
    beforeRedirect: n,
    transport: n,
    httpAgent: n,
    httpsAgent: n,
    cancelToken: n,
    socketPath: n,
    responseEncoding: n,
    validateStatus: m,
    headers: (t, e, r) => l(c(t), c(e), r, !0)
  };
  return i.forEach(Object.keys(Object.assign({}, s, d)), function(e) {
    const r = g[e] || l, a = r(s[e], d[e], e);
    i.isUndefined(a) && r !== m || (u[e] = a);
  }), u;
}
export {
  v as default
};
//# sourceMappingURL=index.es229.js.map
