autoql-fe-utils 1.0.30 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,9 +61,9 @@
61
61
  return void 0 === t2;
62
62
  } }, g = "en", D = {};
63
63
  D[g] = M;
64
- var p = function(t2) {
65
- return t2 instanceof b;
66
- }, S = function t2(e3, n2, r2) {
64
+ var p = "$isDayjsObject", S = function(t2) {
65
+ return t2 instanceof _ || !(!t2 || !t2[p]);
66
+ }, w = function t2(e3, n2, r2) {
67
67
  var i2;
68
68
  if (!e3)
69
69
  return g;
@@ -78,18 +78,18 @@
78
78
  D[a2] = e3, i2 = a2;
79
79
  }
80
80
  return !r2 && i2 && (g = i2), i2 || !r2 && g;
81
- }, w = function(t2, e3) {
82
- if (p(t2))
81
+ }, O = function(t2, e3) {
82
+ if (S(t2))
83
83
  return t2.clone();
84
84
  var n2 = "object" == typeof e3 ? e3 : {};
85
- return n2.date = t2, n2.args = arguments, new b(n2);
86
- }, O = v;
87
- O.l = S, O.i = p, O.w = function(t2, e3) {
88
- return w(t2, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
85
+ return n2.date = t2, n2.args = arguments, new _(n2);
86
+ }, b = v;
87
+ b.l = w, b.i = S, b.w = function(t2, e3) {
88
+ return O(t2, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
89
89
  };
90
- var b = function() {
90
+ var _ = function() {
91
91
  function M2(t2) {
92
- this.$L = S(t2.locale, null, true), this.parse(t2);
92
+ this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
93
93
  }
94
94
  var m2 = M2.prototype;
95
95
  return m2.parse = function(t2) {
@@ -97,7 +97,7 @@
97
97
  var e3 = t3.date, n2 = t3.utc;
98
98
  if (null === e3)
99
99
  return /* @__PURE__ */ new Date(NaN);
100
- if (O.u(e3))
100
+ if (b.u(e3))
101
101
  return /* @__PURE__ */ new Date();
102
102
  if (e3 instanceof Date)
103
103
  return new Date(e3);
@@ -109,33 +109,33 @@
109
109
  }
110
110
  }
111
111
  return new Date(e3);
112
- }(t2), this.$x = t2.x || {}, this.init();
112
+ }(t2), this.init();
113
113
  }, m2.init = function() {
114
114
  var t2 = this.$d;
115
115
  this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
116
116
  }, m2.$utils = function() {
117
- return O;
117
+ return b;
118
118
  }, m2.isValid = function() {
119
119
  return !(this.$d.toString() === l);
120
120
  }, m2.isSame = function(t2, e3) {
121
- var n2 = w(t2);
121
+ var n2 = O(t2);
122
122
  return this.startOf(e3) <= n2 && n2 <= this.endOf(e3);
123
123
  }, m2.isAfter = function(t2, e3) {
124
- return w(t2) < this.startOf(e3);
124
+ return O(t2) < this.startOf(e3);
125
125
  }, m2.isBefore = function(t2, e3) {
126
- return this.endOf(e3) < w(t2);
126
+ return this.endOf(e3) < O(t2);
127
127
  }, m2.$g = function(t2, e3, n2) {
128
- return O.u(t2) ? this[e3] : this.set(n2, t2);
128
+ return b.u(t2) ? this[e3] : this.set(n2, t2);
129
129
  }, m2.unix = function() {
130
130
  return Math.floor(this.valueOf() / 1e3);
131
131
  }, m2.valueOf = function() {
132
132
  return this.$d.getTime();
133
133
  }, m2.startOf = function(t2, e3) {
134
- var n2 = this, r2 = !!O.u(e3) || e3, f2 = O.p(t2), l2 = function(t3, e4) {
135
- var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e4, t3) : new Date(n2.$y, e4, t3), n2);
134
+ var n2 = this, r2 = !!b.u(e3) || e3, f2 = b.p(t2), l2 = function(t3, e4) {
135
+ var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e4, t3) : new Date(n2.$y, e4, t3), n2);
136
136
  return r2 ? i2 : i2.endOf(a);
137
137
  }, $2 = function(t3, e4) {
138
- return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2);
138
+ return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2);
139
139
  }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
140
140
  switch (f2) {
141
141
  case h:
@@ -160,7 +160,7 @@
160
160
  }, m2.endOf = function(t2) {
161
161
  return this.startOf(t2, false);
162
162
  }, m2.$set = function(t2, e3) {
163
- var n2, o2 = O.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e3 - this.$W) : e3;
163
+ var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e3 - this.$W) : e3;
164
164
  if (o2 === c || o2 === h) {
165
165
  var y2 = this.clone().set(d, 1);
166
166
  y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
@@ -170,13 +170,13 @@
170
170
  }, m2.set = function(t2, e3) {
171
171
  return this.clone().$set(t2, e3);
172
172
  }, m2.get = function(t2) {
173
- return this[O.p(t2)]();
173
+ return this[b.p(t2)]();
174
174
  }, m2.add = function(r2, f2) {
175
175
  var d2, l2 = this;
176
176
  r2 = Number(r2);
177
- var $2 = O.p(f2), y2 = function(t2) {
178
- var e3 = w(l2);
179
- return O.w(e3.date(e3.date() + Math.round(t2 * r2)), l2);
177
+ var $2 = b.p(f2), y2 = function(t2) {
178
+ var e3 = O(l2);
179
+ return b.w(e3.date(e3.date() + Math.round(t2 * r2)), l2);
180
180
  };
181
181
  if ($2 === c)
182
182
  return this.set(c, this.$M + r2);
@@ -187,17 +187,17 @@
187
187
  if ($2 === o)
188
188
  return y2(7);
189
189
  var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
190
- return O.w(m3, this);
190
+ return b.w(m3, this);
191
191
  }, m2.subtract = function(t2, e3) {
192
192
  return this.add(-1 * t2, e3);
193
193
  }, m2.format = function(t2) {
194
194
  var e3 = this, n2 = this.$locale();
195
195
  if (!this.isValid())
196
196
  return n2.invalidDate || l;
197
- var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
197
+ var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
198
198
  return t3 && (t3[n3] || t3(e3, r2)) || i3[n3].slice(0, s3);
199
199
  }, d2 = function(t3) {
200
- return O.s(s2 % 12 || 12, t3, "0");
200
+ return b.s(s2 % 12 || 12, t3, "0");
201
201
  }, $2 = f2 || function(t3, e4, n3) {
202
202
  var r3 = t3 < 12 ? "AM" : "PM";
203
203
  return n3 ? r3.toLowerCase() : r3;
@@ -208,11 +208,11 @@
208
208
  case "YY":
209
209
  return String(e3.$y).slice(-2);
210
210
  case "YYYY":
211
- return O.s(e3.$y, 4, "0");
211
+ return b.s(e3.$y, 4, "0");
212
212
  case "M":
213
213
  return a2 + 1;
214
214
  case "MM":
215
- return O.s(a2 + 1, 2, "0");
215
+ return b.s(a2 + 1, 2, "0");
216
216
  case "MMM":
217
217
  return h2(n2.monthsShort, a2, c2, 3);
218
218
  case "MMMM":
@@ -220,7 +220,7 @@
220
220
  case "D":
221
221
  return e3.$D;
222
222
  case "DD":
223
- return O.s(e3.$D, 2, "0");
223
+ return b.s(e3.$D, 2, "0");
224
224
  case "d":
225
225
  return String(e3.$W);
226
226
  case "dd":
@@ -232,7 +232,7 @@
232
232
  case "H":
233
233
  return String(s2);
234
234
  case "HH":
235
- return O.s(s2, 2, "0");
235
+ return b.s(s2, 2, "0");
236
236
  case "h":
237
237
  return d2(1);
238
238
  case "hh":
@@ -244,13 +244,13 @@
244
244
  case "m":
245
245
  return String(u2);
246
246
  case "mm":
247
- return O.s(u2, 2, "0");
247
+ return b.s(u2, 2, "0");
248
248
  case "s":
249
249
  return String(e3.$s);
250
250
  case "ss":
251
- return O.s(e3.$s, 2, "0");
251
+ return b.s(e3.$s, 2, "0");
252
252
  case "SSS":
253
- return O.s(e3.$ms, 3, "0");
253
+ return b.s(e3.$ms, 3, "0");
254
254
  case "Z":
255
255
  return i2;
256
256
  }
@@ -260,8 +260,8 @@
260
260
  }, m2.utcOffset = function() {
261
261
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
262
262
  }, m2.diff = function(r2, d2, l2) {
263
- var $2, y2 = this, M3 = O.p(d2), m3 = w(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
264
- return O.m(y2, m3);
263
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
264
+ return b.m(y2, m3);
265
265
  };
266
266
  switch (M3) {
267
267
  case h:
@@ -291,7 +291,7 @@
291
291
  default:
292
292
  $2 = g2;
293
293
  }
294
- return l2 ? $2 : O.a($2);
294
+ return l2 ? $2 : b.a($2);
295
295
  }, m2.daysInMonth = function() {
296
296
  return this.endOf(c).$D;
297
297
  }, m2.$locale = function() {
@@ -299,10 +299,10 @@
299
299
  }, m2.locale = function(t2, e3) {
300
300
  if (!t2)
301
301
  return this.$L;
302
- var n2 = this.clone(), r2 = S(t2, e3, true);
302
+ var n2 = this.clone(), r2 = w(t2, e3, true);
303
303
  return r2 && (n2.$L = r2), n2;
304
304
  }, m2.clone = function() {
305
- return O.w(this.$d, this);
305
+ return b.w(this.$d, this);
306
306
  }, m2.toDate = function() {
307
307
  return new Date(this.valueOf());
308
308
  }, m2.toJSON = function() {
@@ -312,16 +312,16 @@
312
312
  }, m2.toString = function() {
313
313
  return this.$d.toUTCString();
314
314
  }, M2;
315
- }(), _ = b.prototype;
316
- return w.prototype = _, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
317
- _[t2[1]] = function(e3) {
315
+ }(), k = _.prototype;
316
+ return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
317
+ k[t2[1]] = function(e3) {
318
318
  return this.$g(e3, t2[0], t2[1]);
319
319
  };
320
- }), w.extend = function(t2, e3) {
321
- return t2.$i || (t2(e3, b, w), t2.$i = true), w;
322
- }, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
323
- return w(1e3 * t2);
324
- }, w.en = D[g], w.Ls = D, w.p = {}, w;
320
+ }), O.extend = function(t2, e3) {
321
+ return t2.$i || (t2(e3, _, O), t2.$i = true), O;
322
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
323
+ return O(1e3 * t2);
324
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
325
325
  });
326
326
  }
327
327
  });
@@ -513,12 +513,12 @@
513
513
  var f2 = i2[u2], s2 = f2.type, m = f2.value, c = t[s2];
514
514
  c >= 0 && (r2[c] = parseInt(m, 10));
515
515
  }
516
- var d = r2[3], l = 24 === d ? 0 : d, v = r2[0] + "-" + r2[1] + "-" + r2[2] + " " + l + ":" + r2[4] + ":" + r2[5] + ":000", h = +e3;
517
- return (o.utc(v).valueOf() - (h -= h % 1e3)) / 6e4;
516
+ var d = r2[3], l = 24 === d ? 0 : d, h = r2[0] + "-" + r2[1] + "-" + r2[2] + " " + l + ":" + r2[4] + ":" + r2[5] + ":000", v = +e3;
517
+ return (o.utc(h).valueOf() - (v -= v % 1e3)) / 6e4;
518
518
  }, f = i.prototype;
519
519
  f.tz = function(t2, e3) {
520
520
  void 0 === t2 && (t2 = r);
521
- var n2 = this.utcOffset(), i2 = this.toDate(), a2 = i2.toLocaleString("en-US", { timeZone: t2 }), u2 = Math.round((i2 - new Date(a2)) / 1e3 / 60), f2 = o(a2).$set("millisecond", this.$ms).utcOffset(15 * -Math.round(i2.getTimezoneOffset() / 15) - u2, true);
521
+ var n2 = this.utcOffset(), i2 = this.toDate(), a2 = i2.toLocaleString("en-US", { timeZone: t2 }), u2 = Math.round((i2 - new Date(a2)) / 1e3 / 60), f2 = o(a2, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(15 * -Math.round(i2.getTimezoneOffset() / 15) - u2, true);
522
522
  if (e3) {
523
523
  var s2 = f2.utcOffset();
524
524
  f2 = f2.add(n2 - s2, "minute");
@@ -534,7 +534,7 @@
534
534
  f.startOf = function(t2, e3) {
535
535
  if (!this.$x || !this.$x.$timezone)
536
536
  return s.call(this, t2, e3);
537
- var n2 = o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));
537
+ var n2 = o(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
538
538
  return s.call(n2, t2, e3).tz(this.$x.$timezone, true);
539
539
  }, o.tz = function(t2, e3, n2) {
540
540
  var i2 = n2 && e3, a2 = n2 || e3 || r, f2 = u(+o(), a2);
@@ -13097,6 +13097,7 @@
13097
13097
  "ERR_STREAM_WRITE_AFTER_END",
13098
13098
  "write after end"
13099
13099
  );
13100
+ var destroy = Writable.prototype.destroy || noop3;
13100
13101
  function RedirectableRequest(options, responseCallback) {
13101
13102
  Writable.call(this);
13102
13103
  this._sanitizeOptions(options);
@@ -13118,9 +13119,15 @@
13118
13119
  }
13119
13120
  RedirectableRequest.prototype = Object.create(Writable.prototype);
13120
13121
  RedirectableRequest.prototype.abort = function() {
13121
- abortRequest(this._currentRequest);
13122
+ destroyRequest(this._currentRequest);
13123
+ this._currentRequest.abort();
13122
13124
  this.emit("abort");
13123
13125
  };
13126
+ RedirectableRequest.prototype.destroy = function(error) {
13127
+ destroyRequest(this._currentRequest, error);
13128
+ destroy.call(this, error);
13129
+ return this;
13130
+ };
13124
13131
  RedirectableRequest.prototype.write = function(data, encoding, callback) {
13125
13132
  if (this._ending) {
13126
13133
  throw new WriteAfterEndError();
@@ -13201,6 +13208,7 @@
13201
13208
  self2.removeListener("abort", clearTimer);
13202
13209
  self2.removeListener("error", clearTimer);
13203
13210
  self2.removeListener("response", clearTimer);
13211
+ self2.removeListener("close", clearTimer);
13204
13212
  if (callback) {
13205
13213
  self2.removeListener("timeout", callback);
13206
13214
  }
@@ -13220,6 +13228,7 @@
13220
13228
  this.on("abort", clearTimer);
13221
13229
  this.on("error", clearTimer);
13222
13230
  this.on("response", clearTimer);
13231
+ this.on("close", clearTimer);
13223
13232
  return this;
13224
13233
  };
13225
13234
  [
@@ -13317,7 +13326,7 @@
13317
13326
  this._requestBodyBuffers = [];
13318
13327
  return;
13319
13328
  }
13320
- abortRequest(this._currentRequest);
13329
+ destroyRequest(this._currentRequest);
13321
13330
  response.destroy();
13322
13331
  if (++this._redirectCount > this._options.maxRedirects) {
13323
13332
  this.emit("error", new TooManyRedirectsError());
@@ -13482,12 +13491,12 @@
13482
13491
  CustomError.prototype.name = "Error [" + code + "]";
13483
13492
  return CustomError;
13484
13493
  }
13485
- function abortRequest(request) {
13494
+ function destroyRequest(request, error) {
13486
13495
  for (var event of events) {
13487
13496
  request.removeListener(event, eventHandlers[event]);
13488
13497
  }
13489
13498
  request.on("error", noop3);
13490
- request.abort();
13499
+ request.destroy(error);
13491
13500
  }
13492
13501
  function isSubdomain(subdomain, domain) {
13493
13502
  assert(isString2(subdomain) && isString2(domain));
@@ -13584,7 +13593,7 @@
13584
13593
  byteToHex.push((i + 256).toString(16).slice(1));
13585
13594
  }
13586
13595
  function unsafeStringify(arr, offset = 0) {
13587
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
13596
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
13588
13597
  }
13589
13598
 
13590
13599
  // node_modules/uuid/dist/esm-node/native.js
@@ -14225,7 +14234,7 @@
14225
14234
  this.isValueLabel = () => isValueLabel(obj);
14226
14235
  this.isPlainText = () => isPlainText(obj);
14227
14236
  this.isAggSeed = () => {
14228
- return this.isSubject && !this.displayName.toLowerCase().endsWith("by day") && !this.displayName.toLowerCase().endsWith("by week") && !this.displayName.toLowerCase().endsWith("by month") && !this.displayName.toLowerCase().endsWith("by year");
14237
+ return this.isSubject && (this.displayName.toLowerCase().endsWith("by day") || this.displayName.toLowerCase().endsWith("by week") || this.displayName.toLowerCase().endsWith("by month") || this.displayName.toLowerCase().endsWith("by year"));
14229
14238
  };
14230
14239
  }
14231
14240
  };
@@ -24819,7 +24828,7 @@
24819
24828
  }
24820
24829
  var defaults = {
24821
24830
  transitional: transitional_default,
24822
- adapter: node_default2.isNode ? "http" : "xhr",
24831
+ adapter: ["xhr", "http"],
24823
24832
  transformRequest: [function transformRequest(data, headers) {
24824
24833
  const contentType = headers.getContentType() || "";
24825
24834
  const hasJSONContentType = contentType.indexOf("application/json") > -1;
@@ -25246,7 +25255,7 @@
25246
25255
  var import_zlib = __toESM(__require("zlib"), 1);
25247
25256
 
25248
25257
  // node_modules/axios/lib/env/data.js
25249
- var VERSION = "1.5.0";
25258
+ var VERSION = "1.5.1";
25250
25259
 
25251
25260
  // node_modules/axios/lib/helpers/parseProtocol.js
25252
25261
  function parseProtocol(url2) {
@@ -25973,7 +25982,7 @@
25973
25982
  if (method === "HEAD" || res.statusCode === 204) {
25974
25983
  delete res.headers["content-encoding"];
25975
25984
  }
25976
- switch (res.headers["content-encoding"]) {
25985
+ switch ((res.headers["content-encoding"] || "").toLowerCase()) {
25977
25986
  case "gzip":
25978
25987
  case "x-gzip":
25979
25988
  case "compress":
@@ -26078,7 +26087,7 @@
26078
26087
  });
26079
26088
  if (config.timeout) {
26080
26089
  const timeout = parseInt(config.timeout, 10);
26081
- if (isNaN(timeout)) {
26090
+ if (Number.isNaN(timeout)) {
26082
26091
  reject(new AxiosError_default(
26083
26092
  "error trying to parse `config.timeout` to int",
26084
26093
  AxiosError_default.ERR_BAD_OPTION_VALUE,
@@ -26252,11 +26261,14 @@
26252
26261
  config.signal.removeEventListener("abort", onCanceled);
26253
26262
  }
26254
26263
  }
26264
+ let contentType;
26255
26265
  if (utils_default.isFormData(requestData)) {
26256
26266
  if (node_default2.isStandardBrowserEnv || node_default2.isStandardBrowserWebWorkerEnv) {
26257
26267
  requestHeaders.setContentType(false);
26258
- } else {
26259
- requestHeaders.setContentType("multipart/form-data;", false);
26268
+ } else if (!requestHeaders.getContentType(/^\s*multipart\/form-data/)) {
26269
+ requestHeaders.setContentType("multipart/form-data");
26270
+ } else if (utils_default.isString(contentType = requestHeaders.getContentType())) {
26271
+ requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, "$1"));
26260
26272
  }
26261
26273
  }
26262
26274
  let request = new XMLHttpRequest();
@@ -26392,31 +26404,39 @@
26392
26404
  Object.defineProperty(fn, "adapterName", { value });
26393
26405
  }
26394
26406
  });
26407
+ var renderReason = (reason) => `- ${reason}`;
26408
+ var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
26395
26409
  var adapters_default = {
26396
26410
  getAdapter: (adapters) => {
26397
26411
  adapters = utils_default.isArray(adapters) ? adapters : [adapters];
26398
26412
  const { length } = adapters;
26399
26413
  let nameOrAdapter;
26400
26414
  let adapter;
26415
+ const rejectedReasons = {};
26401
26416
  for (let i = 0; i < length; i++) {
26402
26417
  nameOrAdapter = adapters[i];
26403
- if (adapter = utils_default.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter) {
26418
+ let id;
26419
+ adapter = nameOrAdapter;
26420
+ if (!isResolvedHandle(nameOrAdapter)) {
26421
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
26422
+ if (adapter === void 0) {
26423
+ throw new AxiosError_default(`Unknown adapter '${id}'`);
26424
+ }
26425
+ }
26426
+ if (adapter) {
26404
26427
  break;
26405
26428
  }
26429
+ rejectedReasons[id || "#" + i] = adapter;
26406
26430
  }
26407
26431
  if (!adapter) {
26408
- if (adapter === false) {
26409
- throw new AxiosError_default(
26410
- `Adapter ${nameOrAdapter} is not supported by the environment`,
26411
- "ERR_NOT_SUPPORT"
26412
- );
26413
- }
26414
- throw new Error(
26415
- utils_default.hasOwnProp(knownAdapters, nameOrAdapter) ? `Adapter '${nameOrAdapter}' is not available in the build` : `Unknown adapter '${nameOrAdapter}'`
26432
+ const reasons = Object.entries(rejectedReasons).map(
26433
+ ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
26434
+ );
26435
+ let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
26436
+ throw new AxiosError_default(
26437
+ `There is no suitable adapter to dispatch the request ` + s,
26438
+ "ERR_NOT_SUPPORT"
26416
26439
  );
26417
- }
26418
- if (!utils_default.isFunction(adapter)) {
26419
- throw new TypeError("adapter is not a function");
26420
26440
  }
26421
26441
  return adapter;
26422
26442
  },