node-red-contrib-tak-registration 0.11.1 → 0.11.4

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.
Files changed (249) hide show
  1. package/node_modules/@types/node/LICENSE +0 -0
  2. package/node_modules/@types/node/README.md +4 -5
  3. package/node_modules/@types/node/assert/strict.d.ts +4 -4
  4. package/node_modules/@types/node/assert.d.ts +50 -26
  5. package/node_modules/@types/node/async_hooks.d.ts +13 -6
  6. package/node_modules/@types/node/buffer.d.ts +46 -38
  7. package/node_modules/@types/node/child_process.d.ts +278 -138
  8. package/node_modules/@types/node/cluster.d.ts +107 -89
  9. package/node_modules/@types/node/console.d.ts +18 -15
  10. package/node_modules/@types/node/constants.d.ts +12 -11
  11. package/node_modules/@types/node/crypto.d.ts +746 -268
  12. package/node_modules/@types/node/dgram.d.ts +82 -46
  13. package/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
  14. package/node_modules/@types/node/dns/promises.d.ts +37 -26
  15. package/node_modules/@types/node/dns.d.ts +204 -63
  16. package/node_modules/@types/node/dom-events.d.ts +67 -71
  17. package/node_modules/@types/node/domain.d.ts +4 -4
  18. package/node_modules/@types/node/events.d.ts +99 -8
  19. package/node_modules/@types/node/fs/promises.d.ts +122 -85
  20. package/node_modules/@types/node/fs.d.ts +520 -316
  21. package/node_modules/@types/node/globals.d.ts +346 -286
  22. package/node_modules/@types/node/globals.global.d.ts +0 -0
  23. package/node_modules/@types/node/http.d.ts +321 -189
  24. package/node_modules/@types/node/http2.d.ts +630 -377
  25. package/node_modules/@types/node/https.d.ts +221 -112
  26. package/node_modules/@types/node/index.d.ts +0 -45
  27. package/node_modules/@types/node/inspector.d.ts +0 -1
  28. package/node_modules/@types/node/module.d.ts +75 -31
  29. package/node_modules/@types/node/net.d.ts +149 -93
  30. package/node_modules/@types/node/os.d.ts +10 -9
  31. package/node_modules/@types/node/package.json +88 -90
  32. package/node_modules/@types/node/path.d.ts +13 -13
  33. package/node_modules/@types/node/perf_hooks.d.ts +19 -18
  34. package/node_modules/@types/node/process.d.ts +170 -126
  35. package/node_modules/@types/node/punycode.d.ts +4 -4
  36. package/node_modules/@types/node/querystring.d.ts +14 -4
  37. package/node_modules/@types/node/readline/promises.d.ts +12 -7
  38. package/node_modules/@types/node/readline.d.ts +69 -56
  39. package/node_modules/@types/node/repl.d.ts +67 -61
  40. package/node_modules/@types/node/stream/consumers.d.ts +10 -10
  41. package/node_modules/@types/node/stream/promises.d.ts +56 -15
  42. package/node_modules/@types/node/stream/web.d.ts +40 -20
  43. package/node_modules/@types/node/stream.d.ts +365 -232
  44. package/node_modules/@types/node/string_decoder.d.ts +8 -8
  45. package/node_modules/@types/node/test.d.ts +133 -212
  46. package/node_modules/@types/node/timers/promises.d.ts +4 -4
  47. package/node_modules/@types/node/timers.d.ts +26 -11
  48. package/node_modules/@types/node/tls.d.ts +152 -72
  49. package/node_modules/@types/node/trace_events.d.ts +3 -3
  50. package/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
  51. package/node_modules/@types/node/ts4.8/assert.d.ts +50 -26
  52. package/node_modules/@types/node/ts4.8/async_hooks.d.ts +13 -6
  53. package/node_modules/@types/node/ts4.8/buffer.d.ts +47 -39
  54. package/node_modules/@types/node/ts4.8/child_process.d.ts +278 -138
  55. package/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
  56. package/node_modules/@types/node/ts4.8/console.d.ts +18 -15
  57. package/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
  58. package/node_modules/@types/node/ts4.8/crypto.d.ts +746 -268
  59. package/node_modules/@types/node/ts4.8/dgram.d.ts +82 -46
  60. package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
  61. package/node_modules/@types/node/ts4.8/dns/promises.d.ts +37 -26
  62. package/node_modules/@types/node/ts4.8/dns.d.ts +204 -63
  63. package/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
  64. package/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
  65. package/node_modules/@types/node/ts4.8/events.d.ts +99 -8
  66. package/node_modules/@types/node/ts4.8/fs/promises.d.ts +122 -85
  67. package/node_modules/@types/node/ts4.8/fs.d.ts +520 -316
  68. package/node_modules/@types/node/ts4.8/globals.d.ts +346 -286
  69. package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
  70. package/node_modules/@types/node/ts4.8/http.d.ts +321 -189
  71. package/node_modules/@types/node/ts4.8/http2.d.ts +630 -377
  72. package/node_modules/@types/node/ts4.8/https.d.ts +221 -112
  73. package/node_modules/@types/node/ts4.8/index.d.ts +0 -0
  74. package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -1
  75. package/node_modules/@types/node/ts4.8/module.d.ts +75 -31
  76. package/node_modules/@types/node/ts4.8/net.d.ts +149 -93
  77. package/node_modules/@types/node/ts4.8/os.d.ts +10 -9
  78. package/node_modules/@types/node/ts4.8/path.d.ts +13 -13
  79. package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
  80. package/node_modules/@types/node/ts4.8/process.d.ts +170 -126
  81. package/node_modules/@types/node/ts4.8/punycode.d.ts +4 -4
  82. package/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
  83. package/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
  84. package/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
  85. package/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
  86. package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
  87. package/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
  88. package/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
  89. package/node_modules/@types/node/ts4.8/stream.d.ts +494 -223
  90. package/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
  91. package/node_modules/@types/node/ts4.8/test.d.ts +135 -214
  92. package/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
  93. package/node_modules/@types/node/ts4.8/timers.d.ts +26 -11
  94. package/node_modules/@types/node/ts4.8/tls.d.ts +152 -72
  95. package/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
  96. package/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
  97. package/node_modules/@types/node/ts4.8/url.d.ts +26 -14
  98. package/node_modules/@types/node/ts4.8/util.d.ts +187 -120
  99. package/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
  100. package/node_modules/@types/node/ts4.8/vm.d.ts +58 -50
  101. package/node_modules/@types/node/ts4.8/wasi.d.ts +10 -4
  102. package/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -86
  103. package/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
  104. package/node_modules/@types/node/tty.d.ts +10 -10
  105. package/node_modules/@types/node/url.d.ts +26 -14
  106. package/node_modules/@types/node/util.d.ts +187 -120
  107. package/node_modules/@types/node/v8.d.ts +4 -4
  108. package/node_modules/@types/node/vm.d.ts +58 -50
  109. package/node_modules/@types/node/wasi.d.ts +10 -4
  110. package/node_modules/@types/node/worker_threads.d.ts +83 -86
  111. package/node_modules/@types/node/zlib.d.ts +9 -9
  112. package/node_modules/axios/CHANGELOG.md +225 -0
  113. package/node_modules/axios/README.md +273 -9
  114. package/node_modules/axios/dist/axios.js +249 -178
  115. package/node_modules/axios/dist/axios.js.map +1 -1
  116. package/node_modules/axios/dist/axios.min.js +1 -1
  117. package/node_modules/axios/dist/axios.min.js.map +1 -1
  118. package/node_modules/axios/dist/browser/axios.cjs +213 -193
  119. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  120. package/node_modules/axios/dist/esm/axios.js +213 -193
  121. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  122. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  123. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  124. package/node_modules/axios/dist/node/axios.cjs +297 -213
  125. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  126. package/node_modules/axios/index.d.cts +20 -11
  127. package/node_modules/axios/index.d.ts +21 -12
  128. package/node_modules/axios/lib/adapters/adapters.js +33 -15
  129. package/node_modules/axios/lib/adapters/http.js +25 -12
  130. package/node_modules/axios/lib/adapters/xhr.js +17 -10
  131. package/node_modules/axios/lib/core/mergeConfig.js +1 -0
  132. package/node_modules/axios/lib/defaults/index.js +1 -1
  133. package/node_modules/axios/lib/env/data.js +1 -1
  134. package/node_modules/axios/lib/helpers/cookies.js +39 -49
  135. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +2 -2
  136. package/node_modules/axios/lib/platform/browser/index.js +0 -51
  137. package/node_modules/axios/lib/platform/common/utils.js +47 -0
  138. package/node_modules/axios/lib/platform/index.js +5 -1
  139. package/node_modules/axios/package.json +2 -1
  140. package/node_modules/call-bind/.eslintrc +0 -1
  141. package/node_modules/call-bind/.nycrc +0 -4
  142. package/node_modules/call-bind/CHANGELOG.md +35 -0
  143. package/node_modules/call-bind/README.md +63 -1
  144. package/node_modules/call-bind/index.js +10 -13
  145. package/node_modules/call-bind/package.json +33 -23
  146. package/node_modules/call-bind/test/callBound.js +0 -1
  147. package/node_modules/call-bind/test/index.js +18 -4
  148. package/node_modules/{function-bind → deep-equal}/.editorconfig +1 -1
  149. package/node_modules/deep-equal/.eslintrc +6 -0
  150. package/node_modules/deep-equal/.nycrc +17 -0
  151. package/node_modules/deep-equal/CHANGELOG.md +204 -4
  152. package/node_modules/deep-equal/assert.js +3 -0
  153. package/node_modules/deep-equal/package.json +39 -17
  154. package/node_modules/deep-equal/readme.markdown +28 -12
  155. package/node_modules/deep-equal/test/_tape.js +24 -3
  156. package/node_modules/deep-equal/test/cmp.js +1047 -48
  157. package/node_modules/define-data-property/CHANGELOG.md +10 -0
  158. package/node_modules/define-data-property/index.d.ts.map +1 -1
  159. package/node_modules/define-data-property/index.js +8 -0
  160. package/node_modules/define-data-property/package.json +11 -9
  161. package/node_modules/define-data-property/test/index.js +6 -11
  162. package/node_modules/define-data-property/tsconfig.json +1 -0
  163. package/node_modules/fast-xml-parser/CHANGELOG.md +11 -0
  164. package/node_modules/fast-xml-parser/package.json +5 -5
  165. package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +1 -0
  166. package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +4 -0
  167. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +6 -3
  168. package/node_modules/follow-redirects/index.js +16 -4
  169. package/node_modules/follow-redirects/package.json +2 -3
  170. package/node_modules/function-bind/.eslintrc +11 -5
  171. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  172. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  173. package/node_modules/function-bind/.nycrc +13 -0
  174. package/node_modules/function-bind/CHANGELOG.md +136 -0
  175. package/node_modules/function-bind/README.md +25 -27
  176. package/node_modules/function-bind/implementation.js +44 -12
  177. package/node_modules/function-bind/package.json +38 -14
  178. package/node_modules/get-intrinsic/CHANGELOG.md +8 -0
  179. package/node_modules/get-intrinsic/index.js +1 -1
  180. package/node_modules/get-intrinsic/package.json +11 -11
  181. package/node_modules/has-property-descriptors/CHANGELOG.md +11 -0
  182. package/node_modules/has-property-descriptors/package.json +13 -6
  183. package/node_modules/hasown/.eslintrc +5 -0
  184. package/node_modules/hasown/.github/FUNDING.yml +12 -0
  185. package/node_modules/hasown/.nycrc +13 -0
  186. package/node_modules/hasown/CHANGELOG.md +20 -0
  187. package/node_modules/hasown/LICENSE +21 -0
  188. package/node_modules/hasown/README.md +40 -0
  189. package/node_modules/hasown/index.d.ts +3 -0
  190. package/node_modules/hasown/index.d.ts.map +1 -0
  191. package/node_modules/hasown/index.js +8 -0
  192. package/node_modules/hasown/package.json +91 -0
  193. package/node_modules/hasown/tsconfig.json +49 -0
  194. package/node_modules/set-function-length/.eslintrc +27 -0
  195. package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
  196. package/node_modules/set-function-length/.nycrc +13 -0
  197. package/node_modules/set-function-length/CHANGELOG.md +41 -0
  198. package/node_modules/set-function-length/LICENSE +21 -0
  199. package/node_modules/set-function-length/README.md +56 -0
  200. package/node_modules/set-function-length/env.js +19 -0
  201. package/node_modules/set-function-length/index.js +41 -0
  202. package/node_modules/set-function-length/package.json +84 -0
  203. package/node_modules/undici-types/README.md +6 -0
  204. package/node_modules/undici-types/agent.d.ts +31 -0
  205. package/node_modules/undici-types/api.d.ts +43 -0
  206. package/node_modules/undici-types/balanced-pool.d.ts +18 -0
  207. package/node_modules/undici-types/cache.d.ts +36 -0
  208. package/node_modules/undici-types/client.d.ts +97 -0
  209. package/node_modules/undici-types/connector.d.ts +34 -0
  210. package/node_modules/undici-types/content-type.d.ts +21 -0
  211. package/node_modules/undici-types/cookies.d.ts +28 -0
  212. package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  213. package/node_modules/undici-types/dispatcher.d.ts +241 -0
  214. package/node_modules/undici-types/errors.d.ts +128 -0
  215. package/node_modules/undici-types/fetch.d.ts +209 -0
  216. package/node_modules/undici-types/file.d.ts +39 -0
  217. package/node_modules/undici-types/filereader.d.ts +54 -0
  218. package/node_modules/undici-types/formdata.d.ts +108 -0
  219. package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  220. package/node_modules/undici-types/global-origin.d.ts +7 -0
  221. package/node_modules/undici-types/handlers.d.ts +9 -0
  222. package/node_modules/undici-types/header.d.ts +4 -0
  223. package/node_modules/undici-types/index.d.ts +63 -0
  224. package/node_modules/undici-types/interceptors.d.ts +5 -0
  225. package/node_modules/undici-types/mock-agent.d.ts +50 -0
  226. package/node_modules/undici-types/mock-client.d.ts +25 -0
  227. package/node_modules/undici-types/mock-errors.d.ts +12 -0
  228. package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  229. package/node_modules/undici-types/mock-pool.d.ts +25 -0
  230. package/node_modules/undici-types/package.json +55 -0
  231. package/node_modules/undici-types/patch.d.ts +71 -0
  232. package/node_modules/undici-types/pool-stats.d.ts +19 -0
  233. package/node_modules/undici-types/pool.d.ts +28 -0
  234. package/node_modules/undici-types/proxy-agent.d.ts +30 -0
  235. package/node_modules/undici-types/readable.d.ts +61 -0
  236. package/node_modules/undici-types/webidl.d.ts +220 -0
  237. package/node_modules/undici-types/websocket.d.ts +131 -0
  238. package/package.json +3 -3
  239. package/tak-ingest.js +39 -24
  240. package/tak-registration.html +4 -4
  241. package/node_modules/define-data-property/tsinit +0 -109
  242. package/node_modules/function-bind/.jscs.json +0 -176
  243. package/node_modules/function-bind/.npmignore +0 -22
  244. package/node_modules/function-bind/.travis.yml +0 -168
  245. package/node_modules/has/LICENSE-MIT +0 -22
  246. package/node_modules/has/README.md +0 -18
  247. package/node_modules/has/package.json +0 -48
  248. package/node_modules/has/src/index.js +0 -5
  249. package/node_modules/has/test/index.js +0 -10
@@ -1,4 +1,4 @@
1
- // Axios v1.5.0 Copyright (c) 2023 Matt Zabriskie and contributors
1
+ // Axios v1.6.2 Copyright (c) 2023 Matt Zabriskie and contributors
2
2
  'use strict';
3
3
 
4
4
  const FormData$1 = require('form-data');
@@ -696,7 +696,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
696
696
  const isThenable = (thing) =>
697
697
  thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
698
698
 
699
- const utils = {
699
+ const utils$1 = {
700
700
  isArray,
701
701
  isArrayBuffer,
702
702
  isBuffer,
@@ -778,7 +778,7 @@ function AxiosError(message, code, config, request, response) {
778
778
  response && (this.response = response);
779
779
  }
780
780
 
781
- utils.inherits(AxiosError, Error, {
781
+ utils$1.inherits(AxiosError, Error, {
782
782
  toJSON: function toJSON() {
783
783
  return {
784
784
  // Standard
@@ -793,7 +793,7 @@ utils.inherits(AxiosError, Error, {
793
793
  columnNumber: this.columnNumber,
794
794
  stack: this.stack,
795
795
  // Axios
796
- config: utils.toJSONObject(this.config),
796
+ config: utils$1.toJSONObject(this.config),
797
797
  code: this.code,
798
798
  status: this.response && this.response.status ? this.response.status : null
799
799
  };
@@ -828,7 +828,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
828
828
  AxiosError.from = (error, code, config, request, response, customProps) => {
829
829
  const axiosError = Object.create(prototype$1);
830
830
 
831
- utils.toFlatObject(error, axiosError, function filter(obj) {
831
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
832
832
  return obj !== Error.prototype;
833
833
  }, prop => {
834
834
  return prop !== 'isAxiosError';
@@ -853,7 +853,7 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
853
853
  * @returns {boolean}
854
854
  */
855
855
  function isVisitable(thing) {
856
- return utils.isPlainObject(thing) || utils.isArray(thing);
856
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
857
857
  }
858
858
 
859
859
  /**
@@ -864,7 +864,7 @@ function isVisitable(thing) {
864
864
  * @returns {string} the key without the brackets.
865
865
  */
866
866
  function removeBrackets(key) {
867
- return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
867
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
868
868
  }
869
869
 
870
870
  /**
@@ -893,10 +893,10 @@ function renderKey(path, key, dots) {
893
893
  * @returns {boolean}
894
894
  */
895
895
  function isFlatArray(arr) {
896
- return utils.isArray(arr) && !arr.some(isVisitable);
896
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
897
897
  }
898
898
 
899
- const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
899
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
900
900
  return /^is[A-Z]/.test(prop);
901
901
  });
902
902
 
@@ -924,7 +924,7 @@ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
924
924
  * @returns
925
925
  */
926
926
  function toFormData(obj, formData, options) {
927
- if (!utils.isObject(obj)) {
927
+ if (!utils$1.isObject(obj)) {
928
928
  throw new TypeError('target must be an object');
929
929
  }
930
930
 
@@ -932,13 +932,13 @@ function toFormData(obj, formData, options) {
932
932
  formData = formData || new (FormData__default["default"] || FormData)();
933
933
 
934
934
  // eslint-disable-next-line no-param-reassign
935
- options = utils.toFlatObject(options, {
935
+ options = utils$1.toFlatObject(options, {
936
936
  metaTokens: true,
937
937
  dots: false,
938
938
  indexes: false
939
939
  }, false, function defined(option, source) {
940
940
  // eslint-disable-next-line no-eq-null,eqeqeq
941
- return !utils.isUndefined(source[option]);
941
+ return !utils$1.isUndefined(source[option]);
942
942
  });
943
943
 
944
944
  const metaTokens = options.metaTokens;
@@ -947,24 +947,24 @@ function toFormData(obj, formData, options) {
947
947
  const dots = options.dots;
948
948
  const indexes = options.indexes;
949
949
  const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
950
- const useBlob = _Blob && utils.isSpecCompliantForm(formData);
950
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
951
951
 
952
- if (!utils.isFunction(visitor)) {
952
+ if (!utils$1.isFunction(visitor)) {
953
953
  throw new TypeError('visitor must be a function');
954
954
  }
955
955
 
956
956
  function convertValue(value) {
957
957
  if (value === null) return '';
958
958
 
959
- if (utils.isDate(value)) {
959
+ if (utils$1.isDate(value)) {
960
960
  return value.toISOString();
961
961
  }
962
962
 
963
- if (!useBlob && utils.isBlob(value)) {
963
+ if (!useBlob && utils$1.isBlob(value)) {
964
964
  throw new AxiosError('Blob is not supported. Use a Buffer instead.');
965
965
  }
966
966
 
967
- if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
967
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
968
968
  return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
969
969
  }
970
970
 
@@ -985,20 +985,20 @@ function toFormData(obj, formData, options) {
985
985
  let arr = value;
986
986
 
987
987
  if (value && !path && typeof value === 'object') {
988
- if (utils.endsWith(key, '{}')) {
988
+ if (utils$1.endsWith(key, '{}')) {
989
989
  // eslint-disable-next-line no-param-reassign
990
990
  key = metaTokens ? key : key.slice(0, -2);
991
991
  // eslint-disable-next-line no-param-reassign
992
992
  value = JSON.stringify(value);
993
993
  } else if (
994
- (utils.isArray(value) && isFlatArray(value)) ||
995
- ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
994
+ (utils$1.isArray(value) && isFlatArray(value)) ||
995
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
996
996
  )) {
997
997
  // eslint-disable-next-line no-param-reassign
998
998
  key = removeBrackets(key);
999
999
 
1000
1000
  arr.forEach(function each(el, index) {
1001
- !(utils.isUndefined(el) || el === null) && formData.append(
1001
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
1002
1002
  // eslint-disable-next-line no-nested-ternary
1003
1003
  indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
1004
1004
  convertValue(el)
@@ -1026,7 +1026,7 @@ function toFormData(obj, formData, options) {
1026
1026
  });
1027
1027
 
1028
1028
  function build(value, path) {
1029
- if (utils.isUndefined(value)) return;
1029
+ if (utils$1.isUndefined(value)) return;
1030
1030
 
1031
1031
  if (stack.indexOf(value) !== -1) {
1032
1032
  throw Error('Circular reference detected in ' + path.join('.'));
@@ -1034,9 +1034,9 @@ function toFormData(obj, formData, options) {
1034
1034
 
1035
1035
  stack.push(value);
1036
1036
 
1037
- utils.forEach(value, function each(el, key) {
1038
- const result = !(utils.isUndefined(el) || el === null) && visitor.call(
1039
- formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
1037
+ utils$1.forEach(value, function each(el, key) {
1038
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
1039
+ formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
1040
1040
  );
1041
1041
 
1042
1042
  if (result === true) {
@@ -1047,7 +1047,7 @@ function toFormData(obj, formData, options) {
1047
1047
  stack.pop();
1048
1048
  }
1049
1049
 
1050
- if (!utils.isObject(obj)) {
1050
+ if (!utils$1.isObject(obj)) {
1051
1051
  throw new TypeError('data must be an object');
1052
1052
  }
1053
1053
 
@@ -1151,7 +1151,7 @@ function buildURL(url, params, options) {
1151
1151
  if (serializeFn) {
1152
1152
  serializedParams = serializeFn(params, options);
1153
1153
  } else {
1154
- serializedParams = utils.isURLSearchParams(params) ?
1154
+ serializedParams = utils$1.isURLSearchParams(params) ?
1155
1155
  params.toString() :
1156
1156
  new AxiosURLSearchParams(params, options).toString(_encode);
1157
1157
  }
@@ -1226,7 +1226,7 @@ class InterceptorManager {
1226
1226
  * @returns {void}
1227
1227
  */
1228
1228
  forEach(fn) {
1229
- utils.forEach(this.handlers, function forEachHandler(h) {
1229
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
1230
1230
  if (h !== null) {
1231
1231
  fn(h);
1232
1232
  }
@@ -1244,7 +1244,7 @@ const transitionalDefaults = {
1244
1244
 
1245
1245
  const URLSearchParams = url__default["default"].URLSearchParams;
1246
1246
 
1247
- const platform = {
1247
+ const platform$1 = {
1248
1248
  isNode: true,
1249
1249
  classes: {
1250
1250
  URLSearchParams,
@@ -1254,10 +1254,64 @@ const platform = {
1254
1254
  protocols: [ 'http', 'https', 'file', 'data' ]
1255
1255
  };
1256
1256
 
1257
+ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
1258
+
1259
+ /**
1260
+ * Determine if we're running in a standard browser environment
1261
+ *
1262
+ * This allows axios to run in a web worker, and react-native.
1263
+ * Both environments support XMLHttpRequest, but not fully standard globals.
1264
+ *
1265
+ * web workers:
1266
+ * typeof window -> undefined
1267
+ * typeof document -> undefined
1268
+ *
1269
+ * react-native:
1270
+ * navigator.product -> 'ReactNative'
1271
+ * nativescript
1272
+ * navigator.product -> 'NativeScript' or 'NS'
1273
+ *
1274
+ * @returns {boolean}
1275
+ */
1276
+ const hasStandardBrowserEnv = (
1277
+ (product) => {
1278
+ return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
1279
+ })(typeof navigator !== 'undefined' && navigator.product);
1280
+
1281
+ /**
1282
+ * Determine if we're running in a standard browser webWorker environment
1283
+ *
1284
+ * Although the `isStandardBrowserEnv` method indicates that
1285
+ * `allows axios to run in a web worker`, the WebWorker will still be
1286
+ * filtered out due to its judgment standard
1287
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1288
+ * This leads to a problem when axios post `FormData` in webWorker
1289
+ */
1290
+ const hasStandardBrowserWebWorkerEnv = (() => {
1291
+ return (
1292
+ typeof WorkerGlobalScope !== 'undefined' &&
1293
+ // eslint-disable-next-line no-undef
1294
+ self instanceof WorkerGlobalScope &&
1295
+ typeof self.importScripts === 'function'
1296
+ );
1297
+ })();
1298
+
1299
+ const utils = /*#__PURE__*/Object.freeze({
1300
+ __proto__: null,
1301
+ hasBrowserEnv: hasBrowserEnv,
1302
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1303
+ hasStandardBrowserEnv: hasStandardBrowserEnv
1304
+ });
1305
+
1306
+ const platform = {
1307
+ ...utils,
1308
+ ...platform$1
1309
+ };
1310
+
1257
1311
  function toURLEncodedForm(data, options) {
1258
1312
  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
1259
1313
  visitor: function(value, key, path, helpers) {
1260
- if (utils.isBuffer(value)) {
1314
+ if (platform.isNode && utils$1.isBuffer(value)) {
1261
1315
  this.append(key, value.toString('base64'));
1262
1316
  return false;
1263
1317
  }
@@ -1279,7 +1333,7 @@ function parsePropPath(name) {
1279
1333
  // foo.x.y.z
1280
1334
  // foo-x-y-z
1281
1335
  // foo x y z
1282
- return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1336
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1283
1337
  return match[0] === '[]' ? '' : match[1] || match[0];
1284
1338
  });
1285
1339
  }
@@ -1316,10 +1370,10 @@ function formDataToJSON(formData) {
1316
1370
  let name = path[index++];
1317
1371
  const isNumericKey = Number.isFinite(+name);
1318
1372
  const isLast = index >= path.length;
1319
- name = !name && utils.isArray(target) ? target.length : name;
1373
+ name = !name && utils$1.isArray(target) ? target.length : name;
1320
1374
 
1321
1375
  if (isLast) {
1322
- if (utils.hasOwnProp(target, name)) {
1376
+ if (utils$1.hasOwnProp(target, name)) {
1323
1377
  target[name] = [target[name], value];
1324
1378
  } else {
1325
1379
  target[name] = value;
@@ -1328,23 +1382,23 @@ function formDataToJSON(formData) {
1328
1382
  return !isNumericKey;
1329
1383
  }
1330
1384
 
1331
- if (!target[name] || !utils.isObject(target[name])) {
1385
+ if (!target[name] || !utils$1.isObject(target[name])) {
1332
1386
  target[name] = [];
1333
1387
  }
1334
1388
 
1335
1389
  const result = buildPath(path, value, target[name], index);
1336
1390
 
1337
- if (result && utils.isArray(target[name])) {
1391
+ if (result && utils$1.isArray(target[name])) {
1338
1392
  target[name] = arrayToObject(target[name]);
1339
1393
  }
1340
1394
 
1341
1395
  return !isNumericKey;
1342
1396
  }
1343
1397
 
1344
- if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
1398
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
1345
1399
  const obj = {};
1346
1400
 
1347
- utils.forEachEntry(formData, (name, value) => {
1401
+ utils$1.forEachEntry(formData, (name, value) => {
1348
1402
  buildPath(parsePropPath(name), value, obj, 0);
1349
1403
  });
1350
1404
 
@@ -1365,10 +1419,10 @@ function formDataToJSON(formData) {
1365
1419
  * @returns {string} A stringified version of the rawValue.
1366
1420
  */
1367
1421
  function stringifySafely(rawValue, parser, encoder) {
1368
- if (utils.isString(rawValue)) {
1422
+ if (utils$1.isString(rawValue)) {
1369
1423
  try {
1370
1424
  (parser || JSON.parse)(rawValue);
1371
- return utils.trim(rawValue);
1425
+ return utils$1.trim(rawValue);
1372
1426
  } catch (e) {
1373
1427
  if (e.name !== 'SyntaxError') {
1374
1428
  throw e;
@@ -1383,18 +1437,18 @@ const defaults = {
1383
1437
 
1384
1438
  transitional: transitionalDefaults,
1385
1439
 
1386
- adapter: 'http' ,
1440
+ adapter: ['xhr', 'http'],
1387
1441
 
1388
1442
  transformRequest: [function transformRequest(data, headers) {
1389
1443
  const contentType = headers.getContentType() || '';
1390
1444
  const hasJSONContentType = contentType.indexOf('application/json') > -1;
1391
- const isObjectPayload = utils.isObject(data);
1445
+ const isObjectPayload = utils$1.isObject(data);
1392
1446
 
1393
- if (isObjectPayload && utils.isHTMLForm(data)) {
1447
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
1394
1448
  data = new FormData(data);
1395
1449
  }
1396
1450
 
1397
- const isFormData = utils.isFormData(data);
1451
+ const isFormData = utils$1.isFormData(data);
1398
1452
 
1399
1453
  if (isFormData) {
1400
1454
  if (!hasJSONContentType) {
@@ -1403,18 +1457,18 @@ const defaults = {
1403
1457
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1404
1458
  }
1405
1459
 
1406
- if (utils.isArrayBuffer(data) ||
1407
- utils.isBuffer(data) ||
1408
- utils.isStream(data) ||
1409
- utils.isFile(data) ||
1410
- utils.isBlob(data)
1460
+ if (utils$1.isArrayBuffer(data) ||
1461
+ utils$1.isBuffer(data) ||
1462
+ utils$1.isStream(data) ||
1463
+ utils$1.isFile(data) ||
1464
+ utils$1.isBlob(data)
1411
1465
  ) {
1412
1466
  return data;
1413
1467
  }
1414
- if (utils.isArrayBufferView(data)) {
1468
+ if (utils$1.isArrayBufferView(data)) {
1415
1469
  return data.buffer;
1416
1470
  }
1417
- if (utils.isURLSearchParams(data)) {
1471
+ if (utils$1.isURLSearchParams(data)) {
1418
1472
  headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1419
1473
  return data.toString();
1420
1474
  }
@@ -1426,7 +1480,7 @@ const defaults = {
1426
1480
  return toURLEncodedForm(data, this.formSerializer).toString();
1427
1481
  }
1428
1482
 
1429
- if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1483
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1430
1484
  const _FormData = this.env && this.env.FormData;
1431
1485
 
1432
1486
  return toFormData(
@@ -1450,7 +1504,7 @@ const defaults = {
1450
1504
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1451
1505
  const JSONRequested = this.responseType === 'json';
1452
1506
 
1453
- if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
1507
+ if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
1454
1508
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
1455
1509
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
1456
1510
 
@@ -1498,7 +1552,7 @@ const defaults = {
1498
1552
  }
1499
1553
  };
1500
1554
 
1501
- utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
1555
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
1502
1556
  defaults.headers[method] = {};
1503
1557
  });
1504
1558
 
@@ -1506,7 +1560,7 @@ const defaults$1 = defaults;
1506
1560
 
1507
1561
  // RawAxiosHeaders whose duplicates are ignored by node
1508
1562
  // c.f. https://nodejs.org/api/http.html#http_message_headers
1509
- const ignoreDuplicateOf = utils.toObjectSet([
1563
+ const ignoreDuplicateOf = utils$1.toObjectSet([
1510
1564
  'age', 'authorization', 'content-length', 'content-type', 'etag',
1511
1565
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1512
1566
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
@@ -1567,7 +1621,7 @@ function normalizeValue(value) {
1567
1621
  return value;
1568
1622
  }
1569
1623
 
1570
- return utils.isArray(value) ? value.map(normalizeValue) : String(value);
1624
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
1571
1625
  }
1572
1626
 
1573
1627
  function parseTokens(str) {
@@ -1585,7 +1639,7 @@ function parseTokens(str) {
1585
1639
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1586
1640
 
1587
1641
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1588
- if (utils.isFunction(filter)) {
1642
+ if (utils$1.isFunction(filter)) {
1589
1643
  return filter.call(this, value, header);
1590
1644
  }
1591
1645
 
@@ -1593,13 +1647,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1593
1647
  value = header;
1594
1648
  }
1595
1649
 
1596
- if (!utils.isString(value)) return;
1650
+ if (!utils$1.isString(value)) return;
1597
1651
 
1598
- if (utils.isString(filter)) {
1652
+ if (utils$1.isString(filter)) {
1599
1653
  return value.indexOf(filter) !== -1;
1600
1654
  }
1601
1655
 
1602
- if (utils.isRegExp(filter)) {
1656
+ if (utils$1.isRegExp(filter)) {
1603
1657
  return filter.test(value);
1604
1658
  }
1605
1659
  }
@@ -1612,7 +1666,7 @@ function formatHeader(header) {
1612
1666
  }
1613
1667
 
1614
1668
  function buildAccessors(obj, header) {
1615
- const accessorName = utils.toCamelCase(' ' + header);
1669
+ const accessorName = utils$1.toCamelCase(' ' + header);
1616
1670
 
1617
1671
  ['get', 'set', 'has'].forEach(methodName => {
1618
1672
  Object.defineProperty(obj, methodName + accessorName, {
@@ -1639,7 +1693,7 @@ class AxiosHeaders {
1639
1693
  throw new Error('header name must be a non-empty string');
1640
1694
  }
1641
1695
 
1642
- const key = utils.findKey(self, lHeader);
1696
+ const key = utils$1.findKey(self, lHeader);
1643
1697
 
1644
1698
  if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
1645
1699
  self[key || _header] = normalizeValue(_value);
@@ -1647,11 +1701,11 @@ class AxiosHeaders {
1647
1701
  }
1648
1702
 
1649
1703
  const setHeaders = (headers, _rewrite) =>
1650
- utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1704
+ utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1651
1705
 
1652
- if (utils.isPlainObject(header) || header instanceof this.constructor) {
1706
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
1653
1707
  setHeaders(header, valueOrRewrite);
1654
- } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1708
+ } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1655
1709
  setHeaders(parseHeaders(header), valueOrRewrite);
1656
1710
  } else {
1657
1711
  header != null && setHeader(valueOrRewrite, header, rewrite);
@@ -1664,7 +1718,7 @@ class AxiosHeaders {
1664
1718
  header = normalizeHeader(header);
1665
1719
 
1666
1720
  if (header) {
1667
- const key = utils.findKey(this, header);
1721
+ const key = utils$1.findKey(this, header);
1668
1722
 
1669
1723
  if (key) {
1670
1724
  const value = this[key];
@@ -1677,11 +1731,11 @@ class AxiosHeaders {
1677
1731
  return parseTokens(value);
1678
1732
  }
1679
1733
 
1680
- if (utils.isFunction(parser)) {
1734
+ if (utils$1.isFunction(parser)) {
1681
1735
  return parser.call(this, value, key);
1682
1736
  }
1683
1737
 
1684
- if (utils.isRegExp(parser)) {
1738
+ if (utils$1.isRegExp(parser)) {
1685
1739
  return parser.exec(value);
1686
1740
  }
1687
1741
 
@@ -1694,7 +1748,7 @@ class AxiosHeaders {
1694
1748
  header = normalizeHeader(header);
1695
1749
 
1696
1750
  if (header) {
1697
- const key = utils.findKey(this, header);
1751
+ const key = utils$1.findKey(this, header);
1698
1752
 
1699
1753
  return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1700
1754
  }
@@ -1710,7 +1764,7 @@ class AxiosHeaders {
1710
1764
  _header = normalizeHeader(_header);
1711
1765
 
1712
1766
  if (_header) {
1713
- const key = utils.findKey(self, _header);
1767
+ const key = utils$1.findKey(self, _header);
1714
1768
 
1715
1769
  if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
1716
1770
  delete self[key];
@@ -1720,7 +1774,7 @@ class AxiosHeaders {
1720
1774
  }
1721
1775
  }
1722
1776
 
1723
- if (utils.isArray(header)) {
1777
+ if (utils$1.isArray(header)) {
1724
1778
  header.forEach(deleteHeader);
1725
1779
  } else {
1726
1780
  deleteHeader(header);
@@ -1749,8 +1803,8 @@ class AxiosHeaders {
1749
1803
  const self = this;
1750
1804
  const headers = {};
1751
1805
 
1752
- utils.forEach(this, (value, header) => {
1753
- const key = utils.findKey(headers, header);
1806
+ utils$1.forEach(this, (value, header) => {
1807
+ const key = utils$1.findKey(headers, header);
1754
1808
 
1755
1809
  if (key) {
1756
1810
  self[key] = normalizeValue(value);
@@ -1779,8 +1833,8 @@ class AxiosHeaders {
1779
1833
  toJSON(asStrings) {
1780
1834
  const obj = Object.create(null);
1781
1835
 
1782
- utils.forEach(this, (value, header) => {
1783
- value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
1836
+ utils$1.forEach(this, (value, header) => {
1837
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
1784
1838
  });
1785
1839
 
1786
1840
  return obj;
@@ -1827,7 +1881,7 @@ class AxiosHeaders {
1827
1881
  }
1828
1882
  }
1829
1883
 
1830
- utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1884
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1831
1885
 
1832
1886
  return this;
1833
1887
  }
@@ -1836,7 +1890,7 @@ class AxiosHeaders {
1836
1890
  AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
1837
1891
 
1838
1892
  // reserved names hotfix
1839
- utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
1893
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
1840
1894
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
1841
1895
  return {
1842
1896
  get: () => value,
@@ -1846,7 +1900,7 @@ utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
1846
1900
  }
1847
1901
  });
1848
1902
 
1849
- utils.freezeMethods(AxiosHeaders);
1903
+ utils$1.freezeMethods(AxiosHeaders);
1850
1904
 
1851
1905
  const AxiosHeaders$1 = AxiosHeaders;
1852
1906
 
@@ -1864,7 +1918,7 @@ function transformData(fns, response) {
1864
1918
  const headers = AxiosHeaders$1.from(context.headers);
1865
1919
  let data = context.data;
1866
1920
 
1867
- utils.forEach(fns, function transform(fn) {
1921
+ utils$1.forEach(fns, function transform(fn) {
1868
1922
  data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
1869
1923
  });
1870
1924
 
@@ -1892,7 +1946,7 @@ function CanceledError(message, config, request) {
1892
1946
  this.name = 'CanceledError';
1893
1947
  }
1894
1948
 
1895
- utils.inherits(CanceledError, AxiosError, {
1949
+ utils$1.inherits(CanceledError, AxiosError, {
1896
1950
  __CANCEL__: true
1897
1951
  });
1898
1952
 
@@ -1965,7 +2019,7 @@ function buildFullPath(baseURL, requestedURL) {
1965
2019
  return requestedURL;
1966
2020
  }
1967
2021
 
1968
- const VERSION = "1.5.0";
2022
+ const VERSION = "1.6.2";
1969
2023
 
1970
2024
  function parseProtocol(url) {
1971
2025
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -2106,7 +2160,7 @@ const kInternals = Symbol('internals');
2106
2160
 
2107
2161
  class AxiosTransformStream extends stream__default["default"].Transform{
2108
2162
  constructor(options) {
2109
- options = utils.toFlatObject(options, {
2163
+ options = utils$1.toFlatObject(options, {
2110
2164
  maxRate: 0,
2111
2165
  chunkSize: 64 * 1024,
2112
2166
  minChunkSize: 100,
@@ -2114,7 +2168,7 @@ class AxiosTransformStream extends stream__default["default"].Transform{
2114
2168
  ticksRate: 2,
2115
2169
  samplesCount: 15
2116
2170
  }, null, (prop, source) => {
2117
- return !utils.isUndefined(source[prop]);
2171
+ return !utils$1.isUndefined(source[prop]);
2118
2172
  });
2119
2173
 
2120
2174
  super({
@@ -2303,7 +2357,7 @@ const readBlob = async function* (blob) {
2303
2357
 
2304
2358
  const readBlob$1 = readBlob;
2305
2359
 
2306
- const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';
2360
+ const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';
2307
2361
 
2308
2362
  const textEncoder = new util.TextEncoder();
2309
2363
 
@@ -2314,7 +2368,7 @@ const CRLF_BYTES_COUNT = 2;
2314
2368
  class FormDataPart {
2315
2369
  constructor(name, value) {
2316
2370
  const {escapeName} = this.constructor;
2317
- const isStringValue = utils.isString(value);
2371
+ const isStringValue = utils$1.isString(value);
2318
2372
 
2319
2373
  let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
2320
2374
  !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
@@ -2341,7 +2395,7 @@ class FormDataPart {
2341
2395
 
2342
2396
  const {value} = this;
2343
2397
 
2344
- if(utils.isTypedArray(value)) {
2398
+ if(utils$1.isTypedArray(value)) {
2345
2399
  yield value;
2346
2400
  } else {
2347
2401
  yield* readBlob$1(value);
@@ -2363,10 +2417,10 @@ const formDataToStream = (form, headersHandler, options) => {
2363
2417
  const {
2364
2418
  tag = 'form-data-boundary',
2365
2419
  size = 25,
2366
- boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET)
2420
+ boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)
2367
2421
  } = options || {};
2368
2422
 
2369
- if(!utils.isFormData(form)) {
2423
+ if(!utils$1.isFormData(form)) {
2370
2424
  throw TypeError('FormData instance required');
2371
2425
  }
2372
2426
 
@@ -2386,7 +2440,7 @@ const formDataToStream = (form, headersHandler, options) => {
2386
2440
 
2387
2441
  contentLength += boundaryBytes.byteLength * parts.length;
2388
2442
 
2389
- contentLength = utils.toFiniteNumber(contentLength);
2443
+ contentLength = utils$1.toFiniteNumber(contentLength);
2390
2444
 
2391
2445
  const computedHeaders = {
2392
2446
  'Content-Type': `multipart/form-data; boundary=${boundary}`
@@ -2436,7 +2490,7 @@ class ZlibHeaderTransformStream extends stream__default["default"].Transform {
2436
2490
  const ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
2437
2491
 
2438
2492
  const callbackify = (fn, reducer) => {
2439
- return utils.isAsyncFn(fn) ? function (...args) {
2493
+ return utils$1.isAsyncFn(fn) ? function (...args) {
2440
2494
  const cb = args.pop();
2441
2495
  fn.apply(this, args).then((value) => {
2442
2496
  try {
@@ -2460,7 +2514,7 @@ const brotliOptions = {
2460
2514
  finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH
2461
2515
  };
2462
2516
 
2463
- const isBrotliSupported = utils.isFunction(zlib__default["default"].createBrotliDecompress);
2517
+ const isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress);
2464
2518
 
2465
2519
  const {http: httpFollow, https: httpsFollow} = followRedirects__default["default"];
2466
2520
 
@@ -2540,7 +2594,7 @@ function setProxy(options, configProxy, location) {
2540
2594
  };
2541
2595
  }
2542
2596
 
2543
- const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';
2597
+ const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process';
2544
2598
 
2545
2599
  // temporary hotfix
2546
2600
 
@@ -2569,6 +2623,18 @@ const wrapAsync = (asyncExecutor) => {
2569
2623
  })
2570
2624
  };
2571
2625
 
2626
+ const resolveFamily = ({address, family}) => {
2627
+ if (!utils$1.isString(address)) {
2628
+ throw TypeError('address must be a string');
2629
+ }
2630
+ return ({
2631
+ address,
2632
+ family: family || (address.indexOf('.') < 0 ? 6 : 4)
2633
+ });
2634
+ };
2635
+
2636
+ const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family});
2637
+
2572
2638
  /*eslint consistent-return:0*/
2573
2639
  const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2574
2640
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
@@ -2579,15 +2645,16 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2579
2645
  let rejected = false;
2580
2646
  let req;
2581
2647
 
2582
- if (lookup && utils.isAsyncFn(lookup)) {
2583
- lookup = callbackify$1(lookup, (entry) => {
2584
- if(utils.isString(entry)) {
2585
- entry = [entry, entry.indexOf('.') < 0 ? 6 : 4];
2586
- } else if (!utils.isArray(entry)) {
2587
- throw new TypeError('lookup async function must return an array [ip: string, family: number]]')
2588
- }
2589
- return entry;
2590
- });
2648
+ if (lookup) {
2649
+ const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
2650
+ // hotfix to support opt.all option which is required for node 20.x
2651
+ lookup = (hostname, opt, cb) => {
2652
+ _lookup(hostname, opt, (err, arg0, arg1) => {
2653
+ const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
2654
+
2655
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
2656
+ });
2657
+ };
2591
2658
  }
2592
2659
 
2593
2660
  // temporary internal emitter until the AxiosRequest class will be implemented
@@ -2655,7 +2722,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2655
2722
  convertedData = convertedData.toString(responseEncoding);
2656
2723
 
2657
2724
  if (!responseEncoding || responseEncoding === 'utf8') {
2658
- convertedData = utils.stripBOM(convertedData);
2725
+ convertedData = utils$1.stripBOM(convertedData);
2659
2726
  }
2660
2727
  } else if (responseType === 'stream') {
2661
2728
  convertedData = stream__default["default"].Readable.from(convertedData);
@@ -2693,7 +2760,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2693
2760
  let maxDownloadRate = undefined;
2694
2761
 
2695
2762
  // support for spec compliant FormData objects
2696
- if (utils.isSpecCompliantForm(data)) {
2763
+ if (utils$1.isSpecCompliantForm(data)) {
2697
2764
  const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
2698
2765
 
2699
2766
  data = formDataToStream$1(data, (formHeaders) => {
@@ -2703,7 +2770,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2703
2770
  boundary: userBoundary && userBoundary[1] || undefined
2704
2771
  });
2705
2772
  // support for https://www.npmjs.com/package/form-data api
2706
- } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
2773
+ } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
2707
2774
  headers.set(data.getHeaders());
2708
2775
 
2709
2776
  if (!headers.hasContentLength()) {
@@ -2714,14 +2781,14 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2714
2781
  } catch (e) {
2715
2782
  }
2716
2783
  }
2717
- } else if (utils.isBlob(data)) {
2784
+ } else if (utils$1.isBlob(data)) {
2718
2785
  data.size && headers.setContentType(data.type || 'application/octet-stream');
2719
2786
  headers.setContentLength(data.size || 0);
2720
2787
  data = stream__default["default"].Readable.from(readBlob$1(data));
2721
- } else if (data && !utils.isStream(data)) {
2722
- if (Buffer.isBuffer(data)) ; else if (utils.isArrayBuffer(data)) {
2788
+ } else if (data && !utils$1.isStream(data)) {
2789
+ if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) {
2723
2790
  data = Buffer.from(new Uint8Array(data));
2724
- } else if (utils.isString(data)) {
2791
+ } else if (utils$1.isString(data)) {
2725
2792
  data = Buffer.from(data, 'utf-8');
2726
2793
  } else {
2727
2794
  return reject(new AxiosError(
@@ -2743,9 +2810,9 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2743
2810
  }
2744
2811
  }
2745
2812
 
2746
- const contentLength = utils.toFiniteNumber(headers.getContentLength());
2813
+ const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
2747
2814
 
2748
- if (utils.isArray(maxRate)) {
2815
+ if (utils$1.isArray(maxRate)) {
2749
2816
  maxUploadRate = maxRate[0];
2750
2817
  maxDownloadRate = maxRate[1];
2751
2818
  } else {
@@ -2753,14 +2820,14 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2753
2820
  }
2754
2821
 
2755
2822
  if (data && (onUploadProgress || maxUploadRate)) {
2756
- if (!utils.isStream(data)) {
2823
+ if (!utils$1.isStream(data)) {
2757
2824
  data = stream__default["default"].Readable.from(data, {objectMode: false});
2758
2825
  }
2759
2826
 
2760
2827
  data = stream__default["default"].pipeline([data, new AxiosTransformStream$1({
2761
2828
  length: contentLength,
2762
- maxRate: utils.toFiniteNumber(maxUploadRate)
2763
- })], utils.noop);
2829
+ maxRate: utils$1.toFiniteNumber(maxUploadRate)
2830
+ })], utils$1.noop);
2764
2831
 
2765
2832
  onUploadProgress && data.on('progress', progress => {
2766
2833
  onUploadProgress(Object.assign(progress, {
@@ -2819,7 +2886,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2819
2886
  };
2820
2887
 
2821
2888
  // cacheable-lookup integration hotfix
2822
- !utils.isUndefined(lookup) && (options.lookup = lookup);
2889
+ !utils$1.isUndefined(lookup) && (options.lookup = lookup);
2823
2890
 
2824
2891
  if (config.socketPath) {
2825
2892
  options.socketPath = config.socketPath;
@@ -2867,8 +2934,8 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2867
2934
 
2868
2935
  if (onDownloadProgress) {
2869
2936
  const transformStream = new AxiosTransformStream$1({
2870
- length: utils.toFiniteNumber(responseLength),
2871
- maxRate: utils.toFiniteNumber(maxDownloadRate)
2937
+ length: utils$1.toFiniteNumber(responseLength),
2938
+ maxRate: utils$1.toFiniteNumber(maxDownloadRate)
2872
2939
  });
2873
2940
 
2874
2941
  onDownloadProgress && transformStream.on('progress', progress => {
@@ -2894,7 +2961,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2894
2961
  delete res.headers['content-encoding'];
2895
2962
  }
2896
2963
 
2897
- switch (res.headers['content-encoding']) {
2964
+ switch ((res.headers['content-encoding'] || '').toLowerCase()) {
2898
2965
  /*eslint default-case:0*/
2899
2966
  case 'gzip':
2900
2967
  case 'x-gzip':
@@ -2923,7 +2990,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2923
2990
  }
2924
2991
  }
2925
2992
 
2926
- responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils.noop) : streams[0];
2993
+ responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0];
2927
2994
 
2928
2995
  const offListeners = stream__default["default"].finished(responseStream, () => {
2929
2996
  offListeners();
@@ -2985,12 +3052,12 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2985
3052
  if (responseType !== 'arraybuffer') {
2986
3053
  responseData = responseData.toString(responseEncoding);
2987
3054
  if (!responseEncoding || responseEncoding === 'utf8') {
2988
- responseData = utils.stripBOM(responseData);
3055
+ responseData = utils$1.stripBOM(responseData);
2989
3056
  }
2990
3057
  }
2991
3058
  response.data = responseData;
2992
3059
  } catch (err) {
2993
- reject(AxiosError.from(err, null, config, response.request, response));
3060
+ return reject(AxiosError.from(err, null, config, response.request, response));
2994
3061
  }
2995
3062
  settle(resolve, reject, response);
2996
3063
  });
@@ -3027,7 +3094,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3027
3094
  // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
3028
3095
  const timeout = parseInt(config.timeout, 10);
3029
3096
 
3030
- if (isNaN(timeout)) {
3097
+ if (Number.isNaN(timeout)) {
3031
3098
  reject(new AxiosError(
3032
3099
  'error trying to parse `config.timeout` to int',
3033
3100
  AxiosError.ERR_BAD_OPTION_VALUE,
@@ -3062,7 +3129,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3062
3129
 
3063
3130
 
3064
3131
  // Send the request
3065
- if (utils.isStream(data)) {
3132
+ if (utils$1.isStream(data)) {
3066
3133
  let ended = false;
3067
3134
  let errored = false;
3068
3135
 
@@ -3088,55 +3155,46 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3088
3155
  });
3089
3156
  };
3090
3157
 
3091
- const cookies = platform.isStandardBrowserEnv ?
3158
+ const cookies = platform.hasStandardBrowserEnv ?
3092
3159
 
3093
- // Standard browser envs support document.cookie
3094
- (function standardBrowserEnv() {
3095
- return {
3096
- write: function write(name, value, expires, path, domain, secure) {
3097
- const cookie = [];
3098
- cookie.push(name + '=' + encodeURIComponent(value));
3160
+ // Standard browser envs support document.cookie
3161
+ {
3162
+ write(name, value, expires, path, domain, secure) {
3163
+ const cookie = [name + '=' + encodeURIComponent(value)];
3099
3164
 
3100
- if (utils.isNumber(expires)) {
3101
- cookie.push('expires=' + new Date(expires).toGMTString());
3102
- }
3165
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
3103
3166
 
3104
- if (utils.isString(path)) {
3105
- cookie.push('path=' + path);
3106
- }
3167
+ utils$1.isString(path) && cookie.push('path=' + path);
3107
3168
 
3108
- if (utils.isString(domain)) {
3109
- cookie.push('domain=' + domain);
3110
- }
3169
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
3111
3170
 
3112
- if (secure === true) {
3113
- cookie.push('secure');
3114
- }
3171
+ secure === true && cookie.push('secure');
3115
3172
 
3116
- document.cookie = cookie.join('; ');
3117
- },
3173
+ document.cookie = cookie.join('; ');
3174
+ },
3118
3175
 
3119
- read: function read(name) {
3120
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
3121
- return (match ? decodeURIComponent(match[3]) : null);
3122
- },
3176
+ read(name) {
3177
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
3178
+ return (match ? decodeURIComponent(match[3]) : null);
3179
+ },
3123
3180
 
3124
- remove: function remove(name) {
3125
- this.write(name, '', Date.now() - 86400000);
3126
- }
3127
- };
3128
- })() :
3181
+ remove(name) {
3182
+ this.write(name, '', Date.now() - 86400000);
3183
+ }
3184
+ }
3129
3185
 
3130
- // Non standard browser env (web workers, react-native) lack needed support.
3131
- (function nonStandardBrowserEnv() {
3132
- return {
3133
- write: function write() {},
3134
- read: function read() { return null; },
3135
- remove: function remove() {}
3136
- };
3137
- })();
3186
+ :
3138
3187
 
3139
- const isURLSameOrigin = platform.isStandardBrowserEnv ?
3188
+ // Non-standard browser env (web workers, react-native) lack needed support.
3189
+ {
3190
+ write() {},
3191
+ read() {
3192
+ return null;
3193
+ },
3194
+ remove() {}
3195
+ };
3196
+
3197
+ const isURLSameOrigin = platform.hasStandardBrowserEnv ?
3140
3198
 
3141
3199
  // Standard browser envs have full support of the APIs needed to test
3142
3200
  // whether the request URL is of the same origin as current location.
@@ -3146,7 +3204,7 @@ const isURLSameOrigin = platform.isStandardBrowserEnv ?
3146
3204
  let originURL;
3147
3205
 
3148
3206
  /**
3149
- * Parse a URL to discover it's components
3207
+ * Parse a URL to discover its components
3150
3208
  *
3151
3209
  * @param {String} url The URL to be parsed
3152
3210
  * @returns {Object}
@@ -3186,7 +3244,7 @@ const isURLSameOrigin = platform.isStandardBrowserEnv ?
3186
3244
  * @returns {boolean} True if URL shares the same origin, otherwise false
3187
3245
  */
3188
3246
  return function isURLSameOrigin(requestURL) {
3189
- const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
3247
+ const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
3190
3248
  return (parsed.protocol === originURL.protocol &&
3191
3249
  parsed.host === originURL.host);
3192
3250
  };
@@ -3234,7 +3292,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
3234
3292
  return new Promise(function dispatchXhrRequest(resolve, reject) {
3235
3293
  let requestData = config.data;
3236
3294
  const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
3237
- const responseType = config.responseType;
3295
+ let {responseType, withXSRFToken} = config;
3238
3296
  let onCanceled;
3239
3297
  function done() {
3240
3298
  if (config.cancelToken) {
@@ -3246,11 +3304,15 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
3246
3304
  }
3247
3305
  }
3248
3306
 
3249
- if (utils.isFormData(requestData)) {
3250
- if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
3307
+ let contentType;
3308
+
3309
+ if (utils$1.isFormData(requestData)) {
3310
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
3251
3311
  requestHeaders.setContentType(false); // Let the browser set it
3252
- } else {
3253
- requestHeaders.setContentType('multipart/form-data;', false); // mobile/desktop app frameworks
3312
+ } else if ((contentType = requestHeaders.getContentType()) !== false) {
3313
+ // fix semicolon duplication issue for ReactNative FormData implementation
3314
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
3315
+ requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
3254
3316
  }
3255
3317
  }
3256
3318
 
@@ -3366,13 +3428,16 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
3366
3428
  // Add xsrf header
3367
3429
  // This is only done if running in a standard browser environment.
3368
3430
  // Specifically not if we're in a web worker, or react-native.
3369
- if (platform.isStandardBrowserEnv) {
3370
- // Add xsrf header
3371
- const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
3372
- && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
3431
+ if(platform.hasStandardBrowserEnv) {
3432
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
3433
+
3434
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
3435
+ // Add xsrf header
3436
+ const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
3373
3437
 
3374
- if (xsrfValue) {
3375
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
3438
+ if (xsrfValue) {
3439
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
3440
+ }
3376
3441
  }
3377
3442
  }
3378
3443
 
@@ -3381,13 +3446,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
3381
3446
 
3382
3447
  // Add headers to the request
3383
3448
  if ('setRequestHeader' in request) {
3384
- utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
3449
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
3385
3450
  request.setRequestHeader(key, val);
3386
3451
  });
3387
3452
  }
3388
3453
 
3389
3454
  // Add withCredentials to request if needed
3390
- if (!utils.isUndefined(config.withCredentials)) {
3455
+ if (!utils$1.isUndefined(config.withCredentials)) {
3391
3456
  request.withCredentials = !!config.withCredentials;
3392
3457
  }
3393
3458
 
@@ -3442,8 +3507,8 @@ const knownAdapters = {
3442
3507
  xhr: xhrAdapter
3443
3508
  };
3444
3509
 
3445
- utils.forEach(knownAdapters, (fn, value) => {
3446
- if(fn) {
3510
+ utils$1.forEach(knownAdapters, (fn, value) => {
3511
+ if (fn) {
3447
3512
  try {
3448
3513
  Object.defineProperty(fn, 'name', {value});
3449
3514
  } catch (e) {
@@ -3453,38 +3518,56 @@ utils.forEach(knownAdapters, (fn, value) => {
3453
3518
  }
3454
3519
  });
3455
3520
 
3521
+ const renderReason = (reason) => `- ${reason}`;
3522
+
3523
+ const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
3524
+
3456
3525
  const adapters = {
3457
3526
  getAdapter: (adapters) => {
3458
- adapters = utils.isArray(adapters) ? adapters : [adapters];
3527
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
3459
3528
 
3460
3529
  const {length} = adapters;
3461
3530
  let nameOrAdapter;
3462
3531
  let adapter;
3463
3532
 
3533
+ const rejectedReasons = {};
3534
+
3464
3535
  for (let i = 0; i < length; i++) {
3465
3536
  nameOrAdapter = adapters[i];
3466
- if((adapter = utils.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {
3537
+ let id;
3538
+
3539
+ adapter = nameOrAdapter;
3540
+
3541
+ if (!isResolvedHandle(nameOrAdapter)) {
3542
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
3543
+
3544
+ if (adapter === undefined) {
3545
+ throw new AxiosError(`Unknown adapter '${id}'`);
3546
+ }
3547
+ }
3548
+
3549
+ if (adapter) {
3467
3550
  break;
3468
3551
  }
3552
+
3553
+ rejectedReasons[id || '#' + i] = adapter;
3469
3554
  }
3470
3555
 
3471
3556
  if (!adapter) {
3472
- if (adapter === false) {
3473
- throw new AxiosError(
3474
- `Adapter ${nameOrAdapter} is not supported by the environment`,
3475
- 'ERR_NOT_SUPPORT'
3557
+
3558
+ const reasons = Object.entries(rejectedReasons)
3559
+ .map(([id, state]) => `adapter ${id} ` +
3560
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
3476
3561
  );
3477
- }
3478
3562
 
3479
- throw new Error(
3480
- utils.hasOwnProp(knownAdapters, nameOrAdapter) ?
3481
- `Adapter '${nameOrAdapter}' is not available in the build` :
3482
- `Unknown adapter '${nameOrAdapter}'`
3483
- );
3484
- }
3563
+ let s = length ?
3564
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
3565
+ 'as no adapter specified';
3485
3566
 
3486
- if (!utils.isFunction(adapter)) {
3487
- throw new TypeError('adapter is not a function');
3567
+ throw new AxiosError(
3568
+ `There is no suitable adapter to dispatch the request ` + s,
3569
+ 'ERR_NOT_SUPPORT'
3570
+ );
3488
3571
  }
3489
3572
 
3490
3573
  return adapter;
@@ -3582,11 +3665,11 @@ function mergeConfig(config1, config2) {
3582
3665
  const config = {};
3583
3666
 
3584
3667
  function getMergedValue(target, source, caseless) {
3585
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
3586
- return utils.merge.call({caseless}, target, source);
3587
- } else if (utils.isPlainObject(source)) {
3588
- return utils.merge({}, source);
3589
- } else if (utils.isArray(source)) {
3668
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
3669
+ return utils$1.merge.call({caseless}, target, source);
3670
+ } else if (utils$1.isPlainObject(source)) {
3671
+ return utils$1.merge({}, source);
3672
+ } else if (utils$1.isArray(source)) {
3590
3673
  return source.slice();
3591
3674
  }
3592
3675
  return source;
@@ -3594,25 +3677,25 @@ function mergeConfig(config1, config2) {
3594
3677
 
3595
3678
  // eslint-disable-next-line consistent-return
3596
3679
  function mergeDeepProperties(a, b, caseless) {
3597
- if (!utils.isUndefined(b)) {
3680
+ if (!utils$1.isUndefined(b)) {
3598
3681
  return getMergedValue(a, b, caseless);
3599
- } else if (!utils.isUndefined(a)) {
3682
+ } else if (!utils$1.isUndefined(a)) {
3600
3683
  return getMergedValue(undefined, a, caseless);
3601
3684
  }
3602
3685
  }
3603
3686
 
3604
3687
  // eslint-disable-next-line consistent-return
3605
3688
  function valueFromConfig2(a, b) {
3606
- if (!utils.isUndefined(b)) {
3689
+ if (!utils$1.isUndefined(b)) {
3607
3690
  return getMergedValue(undefined, b);
3608
3691
  }
3609
3692
  }
3610
3693
 
3611
3694
  // eslint-disable-next-line consistent-return
3612
3695
  function defaultToConfig2(a, b) {
3613
- if (!utils.isUndefined(b)) {
3696
+ if (!utils$1.isUndefined(b)) {
3614
3697
  return getMergedValue(undefined, b);
3615
- } else if (!utils.isUndefined(a)) {
3698
+ } else if (!utils$1.isUndefined(a)) {
3616
3699
  return getMergedValue(undefined, a);
3617
3700
  }
3618
3701
  }
@@ -3637,6 +3720,7 @@ function mergeConfig(config1, config2) {
3637
3720
  timeout: defaultToConfig2,
3638
3721
  timeoutMessage: defaultToConfig2,
3639
3722
  withCredentials: defaultToConfig2,
3723
+ withXSRFToken: defaultToConfig2,
3640
3724
  adapter: defaultToConfig2,
3641
3725
  responseType: defaultToConfig2,
3642
3726
  xsrfCookieName: defaultToConfig2,
@@ -3657,10 +3741,10 @@ function mergeConfig(config1, config2) {
3657
3741
  headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
3658
3742
  };
3659
3743
 
3660
- utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
3744
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
3661
3745
  const merge = mergeMap[prop] || mergeDeepProperties;
3662
3746
  const configValue = merge(config1[prop], config2[prop], prop);
3663
- (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
3747
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
3664
3748
  });
3665
3749
 
3666
3750
  return config;
@@ -3802,7 +3886,7 @@ class Axios {
3802
3886
  }
3803
3887
 
3804
3888
  if (paramsSerializer != null) {
3805
- if (utils.isFunction(paramsSerializer)) {
3889
+ if (utils$1.isFunction(paramsSerializer)) {
3806
3890
  config.paramsSerializer = {
3807
3891
  serialize: paramsSerializer
3808
3892
  };
@@ -3818,12 +3902,12 @@ class Axios {
3818
3902
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
3819
3903
 
3820
3904
  // Flatten headers
3821
- let contextHeaders = headers && utils.merge(
3905
+ let contextHeaders = headers && utils$1.merge(
3822
3906
  headers.common,
3823
3907
  headers[config.method]
3824
3908
  );
3825
3909
 
3826
- headers && utils.forEach(
3910
+ headers && utils$1.forEach(
3827
3911
  ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
3828
3912
  (method) => {
3829
3913
  delete headers[method];
@@ -3910,7 +3994,7 @@ class Axios {
3910
3994
  }
3911
3995
 
3912
3996
  // Provide aliases for supported request methods
3913
- utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3997
+ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3914
3998
  /*eslint func-names:0*/
3915
3999
  Axios.prototype[method] = function(url, config) {
3916
4000
  return this.request(mergeConfig(config || {}, {
@@ -3921,7 +4005,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
3921
4005
  };
3922
4006
  });
3923
4007
 
3924
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
4008
+ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3925
4009
  /*eslint func-names:0*/
3926
4010
 
3927
4011
  function generateHTTPMethod(isForm) {
@@ -4097,7 +4181,7 @@ function spread(callback) {
4097
4181
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
4098
4182
  */
4099
4183
  function isAxiosError(payload) {
4100
- return utils.isObject(payload) && (payload.isAxiosError === true);
4184
+ return utils$1.isObject(payload) && (payload.isAxiosError === true);
4101
4185
  }
4102
4186
 
4103
4187
  const HttpStatusCode = {
@@ -4184,10 +4268,10 @@ function createInstance(defaultConfig) {
4184
4268
  const instance = bind(Axios$1.prototype.request, context);
4185
4269
 
4186
4270
  // Copy axios.prototype to instance
4187
- utils.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
4271
+ utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
4188
4272
 
4189
4273
  // Copy context to instance
4190
- utils.extend(instance, context, null, {allOwnKeys: true});
4274
+ utils$1.extend(instance, context, null, {allOwnKeys: true});
4191
4275
 
4192
4276
  // Factory for creating new instances
4193
4277
  instance.create = function create(instanceConfig) {
@@ -4231,7 +4315,7 @@ axios.mergeConfig = mergeConfig;
4231
4315
 
4232
4316
  axios.AxiosHeaders = AxiosHeaders$1;
4233
4317
 
4234
- axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
4318
+ axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
4235
4319
 
4236
4320
  axios.getAdapter = adapters.getAdapter;
4237
4321