@nocobase/plugin-ai-gigachat 2.2.17 → 2.2.19

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 (518) hide show
  1. package/dist/externalVersion.js +5 -5
  2. package/dist/node_modules/gigachat/index.js +1 -1
  3. package/dist/node_modules/gigachat/node_modules/axios/dist/axios.js +2165 -1269
  4. package/dist/node_modules/gigachat/node_modules/axios/dist/axios.min.js +3 -3
  5. package/dist/node_modules/gigachat/node_modules/axios/dist/browser/axios.cjs +2771 -1604
  6. package/dist/node_modules/gigachat/node_modules/axios/dist/esm/axios.js +2784 -1619
  7. package/dist/node_modules/gigachat/node_modules/axios/dist/esm/axios.min.js +2 -2
  8. package/dist/node_modules/gigachat/node_modules/axios/dist/node/axios.cjs +3201 -2520
  9. package/dist/node_modules/gigachat/node_modules/axios/index.d.cts +270 -123
  10. package/dist/node_modules/gigachat/node_modules/axios/index.d.ts +176 -231
  11. package/dist/node_modules/gigachat/node_modules/axios/index.js +5 -3
  12. package/dist/node_modules/gigachat/node_modules/axios/lib/adapters/adapters.js +23 -17
  13. package/dist/node_modules/gigachat/node_modules/axios/lib/adapters/fetch.js +467 -112
  14. package/dist/node_modules/gigachat/node_modules/axios/lib/adapters/http.js +1158 -639
  15. package/dist/node_modules/gigachat/node_modules/axios/lib/adapters/xhr.js +192 -164
  16. package/dist/node_modules/gigachat/node_modules/axios/lib/axios.js +6 -6
  17. package/dist/node_modules/gigachat/node_modules/axios/lib/cancel/CancelToken.js +4 -4
  18. package/dist/node_modules/gigachat/node_modules/axios/lib/core/Axios.js +84 -50
  19. package/dist/node_modules/gigachat/node_modules/axios/lib/core/AxiosError.js +161 -46
  20. package/dist/node_modules/gigachat/node_modules/axios/lib/core/AxiosHeaders.js +65 -28
  21. package/dist/node_modules/gigachat/node_modules/axios/lib/core/InterceptorManager.js +1 -1
  22. package/dist/node_modules/gigachat/node_modules/axios/lib/core/buildFullPath.js +30 -2
  23. package/dist/node_modules/gigachat/node_modules/axios/lib/core/dispatchRequest.js +37 -29
  24. package/dist/node_modules/gigachat/node_modules/axios/lib/core/mergeConfig.js +65 -25
  25. package/dist/node_modules/gigachat/node_modules/axios/lib/core/settle.js +1 -1
  26. package/dist/node_modules/gigachat/node_modules/axios/lib/defaults/index.js +92 -76
  27. package/dist/node_modules/gigachat/node_modules/axios/lib/defaults/transitional.js +3 -1
  28. package/dist/node_modules/gigachat/node_modules/axios/lib/env/data.js +1 -1
  29. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/AxiosTransformStream.js +37 -24
  30. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +10 -9
  31. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
  32. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +5 -4
  33. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/buildURL.js +24 -19
  34. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/callbackify.js +13 -11
  35. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/composeSignals.js +42 -33
  36. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/cookies.js +55 -44
  37. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/deprecatedMethod.js +9 -4
  38. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +37 -5
  39. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/formDataToJSON.js +29 -5
  40. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/formDataToStream.js +34 -27
  41. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/fromDataURI.js +22 -7
  42. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -1
  43. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/isAxiosError.js +1 -1
  44. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/isURLSameOrigin.js +13 -11
  45. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/parseHeaders.js +34 -20
  46. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/parseProtocol.js +2 -2
  47. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/progressEventReducer.js +30 -20
  48. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/readBlob.js +4 -4
  49. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/resolveConfig.js +87 -29
  50. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  51. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/shouldBypassProxy.js +210 -0
  52. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/speedometer.js +1 -1
  53. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/throttle.js +4 -4
  54. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/toFormData.js +94 -32
  55. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/toURLEncodedForm.js +2 -2
  56. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/trackStream.js +33 -31
  57. package/dist/node_modules/gigachat/node_modules/axios/lib/helpers/validator.js +20 -7
  58. package/dist/node_modules/gigachat/node_modules/axios/lib/platform/browser/classes/Blob.js +2 -2
  59. package/dist/node_modules/gigachat/node_modules/axios/lib/platform/browser/index.js +5 -5
  60. package/dist/node_modules/gigachat/node_modules/axios/lib/platform/common/utils.js +6 -5
  61. package/dist/node_modules/gigachat/node_modules/axios/lib/platform/index.js +2 -2
  62. package/dist/node_modules/gigachat/node_modules/axios/lib/platform/node/index.js +9 -10
  63. package/dist/node_modules/gigachat/node_modules/axios/lib/utils.js +270 -116
  64. package/dist/node_modules/gigachat/node_modules/axios/package.json +113 -132
  65. package/dist/node_modules/gigachat/node_modules/follow-redirects/index.js +24 -1
  66. package/dist/node_modules/gigachat/node_modules/follow-redirects/package.json +1 -1
  67. package/dist/node_modules/gigachat/node_modules/proxy-from-env/index.cjs +105 -0
  68. package/dist/node_modules/gigachat/node_modules/proxy-from-env/index.js +103 -0
  69. package/dist/node_modules/gigachat/node_modules/proxy-from-env/package.json +43 -0
  70. package/dist/node_modules/gigachat/package.json +1 -1
  71. package/dist/node_modules/langchain-gigachat/index.cjs +2 -2
  72. package/dist/node_modules/langchain-gigachat/package.json +1 -1
  73. package/package.json +2 -2
  74. package/dist/node_modules/gigachat/node_modules/es-define-property/.eslintrc +0 -13
  75. package/dist/node_modules/gigachat/node_modules/es-define-property/.github/FUNDING.yml +0 -12
  76. package/dist/node_modules/gigachat/node_modules/es-define-property/.nycrc +0 -9
  77. package/dist/node_modules/gigachat/node_modules/es-define-property/index.d.ts +0 -3
  78. package/dist/node_modules/gigachat/node_modules/es-define-property/index.js +0 -14
  79. package/dist/node_modules/gigachat/node_modules/es-define-property/package.json +0 -81
  80. package/dist/node_modules/gigachat/node_modules/es-define-property/test/index.js +0 -56
  81. package/dist/node_modules/gigachat/node_modules/es-object-atoms/.eslintrc +0 -16
  82. package/dist/node_modules/gigachat/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
  83. package/dist/node_modules/gigachat/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
  84. package/dist/node_modules/gigachat/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
  85. package/dist/node_modules/gigachat/node_modules/es-object-atoms/ToObject.d.ts +0 -7
  86. package/dist/node_modules/gigachat/node_modules/es-object-atoms/ToObject.js +0 -10
  87. package/dist/node_modules/gigachat/node_modules/es-object-atoms/index.d.ts +0 -3
  88. package/dist/node_modules/gigachat/node_modules/es-object-atoms/index.js +0 -4
  89. package/dist/node_modules/gigachat/node_modules/es-object-atoms/isObject.d.ts +0 -3
  90. package/dist/node_modules/gigachat/node_modules/es-object-atoms/isObject.js +0 -6
  91. package/dist/node_modules/gigachat/node_modules/es-object-atoms/package.json +0 -80
  92. package/dist/node_modules/gigachat/node_modules/es-object-atoms/test/index.js +0 -38
  93. package/dist/node_modules/gigachat/node_modules/es-set-tostringtag/.eslintrc +0 -13
  94. package/dist/node_modules/gigachat/node_modules/es-set-tostringtag/.nycrc +0 -9
  95. package/dist/node_modules/gigachat/node_modules/es-set-tostringtag/index.d.ts +0 -10
  96. package/dist/node_modules/gigachat/node_modules/es-set-tostringtag/index.js +0 -35
  97. package/dist/node_modules/gigachat/node_modules/es-set-tostringtag/package.json +0 -78
  98. package/dist/node_modules/gigachat/node_modules/es-set-tostringtag/test/index.js +0 -85
  99. package/dist/node_modules/gigachat/node_modules/form-data/License +0 -19
  100. package/dist/node_modules/gigachat/node_modules/form-data/index.d.ts +0 -62
  101. package/dist/node_modules/gigachat/node_modules/form-data/lib/browser.js +0 -4
  102. package/dist/node_modules/gigachat/node_modules/form-data/lib/form_data.js +0 -494
  103. package/dist/node_modules/gigachat/node_modules/form-data/lib/populate.js +0 -10
  104. package/dist/node_modules/gigachat/node_modules/form-data/package.json +0 -82
  105. package/dist/node_modules/gigachat/node_modules/get-intrinsic/.eslintrc +0 -42
  106. package/dist/node_modules/gigachat/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
  107. package/dist/node_modules/gigachat/node_modules/get-intrinsic/.nycrc +0 -9
  108. package/dist/node_modules/gigachat/node_modules/get-intrinsic/index.js +0 -378
  109. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/.eslintrc +0 -11
  110. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/.github/FUNDING.yml +0 -12
  111. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/.nycrc +0 -9
  112. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/index.d.ts +0 -3
  113. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/index.js +0 -14
  114. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/package.json +0 -111
  115. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/shams.d.ts +0 -3
  116. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/shams.js +0 -45
  117. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/test/index.js +0 -22
  118. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/core-js.js +0 -29
  119. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
  120. package/dist/node_modules/gigachat/node_modules/get-intrinsic/node_modules/has-symbols/test/tests.js +0 -58
  121. package/dist/node_modules/gigachat/node_modules/get-intrinsic/package.json +0 -97
  122. package/dist/node_modules/gigachat/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
  123. package/dist/node_modules/gigachat/node_modules/gopd/.eslintrc +0 -16
  124. package/dist/node_modules/gigachat/node_modules/gopd/.github/FUNDING.yml +0 -12
  125. package/dist/node_modules/gigachat/node_modules/gopd/gOPD.d.ts +0 -1
  126. package/dist/node_modules/gigachat/node_modules/gopd/gOPD.js +0 -4
  127. package/dist/node_modules/gigachat/node_modules/gopd/index.d.ts +0 -5
  128. package/dist/node_modules/gigachat/node_modules/gopd/index.js +0 -15
  129. package/dist/node_modules/gigachat/node_modules/gopd/package.json +0 -77
  130. package/dist/node_modules/gigachat/node_modules/gopd/test/index.js +0 -36
  131. package/dist/node_modules/gigachat/node_modules/has-tostringtag/.eslintrc +0 -5
  132. package/dist/node_modules/gigachat/node_modules/has-tostringtag/.github/FUNDING.yml +0 -12
  133. package/dist/node_modules/gigachat/node_modules/has-tostringtag/.nycrc +0 -13
  134. package/dist/node_modules/gigachat/node_modules/has-tostringtag/index.d.ts +0 -3
  135. package/dist/node_modules/gigachat/node_modules/has-tostringtag/index.js +0 -8
  136. package/dist/node_modules/gigachat/node_modules/has-tostringtag/package.json +0 -108
  137. package/dist/node_modules/gigachat/node_modules/has-tostringtag/shams.d.ts +0 -3
  138. package/dist/node_modules/gigachat/node_modules/has-tostringtag/shams.js +0 -8
  139. package/dist/node_modules/gigachat/node_modules/has-tostringtag/test/index.js +0 -21
  140. package/dist/node_modules/gigachat/node_modules/has-tostringtag/test/shams/core-js.js +0 -31
  141. package/dist/node_modules/gigachat/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +0 -30
  142. package/dist/node_modules/gigachat/node_modules/has-tostringtag/test/tests.js +0 -15
  143. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/index.d.ts +0 -15
  144. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/index.js +0 -31
  145. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/max.d.ts +0 -2
  146. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/max.js +0 -3
  147. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
  148. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/md5.js +0 -13
  149. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/native.d.ts +0 -6
  150. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/native.js +0 -4
  151. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
  152. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/nil.js +0 -3
  153. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/package.json +0 -1
  154. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
  155. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/parse.js +0 -11
  156. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
  157. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/regex.js +0 -3
  158. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
  159. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/rng.js +0 -13
  160. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
  161. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/sha1.js +0 -13
  162. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
  163. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/stringify.js +0 -39
  164. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/types.d.ts +0 -21
  165. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/types.js +0 -2
  166. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
  167. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
  168. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
  169. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v1.js +0 -87
  170. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
  171. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
  172. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
  173. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v3.js +0 -14
  174. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
  175. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v35.js +0 -44
  176. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
  177. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v4.js +0 -29
  178. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
  179. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v5.js +0 -14
  180. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
  181. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v6.js +0 -22
  182. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
  183. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
  184. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
  185. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/v7.js +0 -69
  186. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
  187. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/validate.js +0 -7
  188. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/version.d.ts +0 -2
  189. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs/version.js +0 -10
  190. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/index.d.ts +0 -15
  191. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/index.js +0 -31
  192. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/max.d.ts +0 -2
  193. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/max.js +0 -3
  194. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/md5.d.ts +0 -2
  195. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
  196. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/native.d.ts +0 -4
  197. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/native.js +0 -4
  198. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/nil.d.ts +0 -2
  199. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
  200. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/package.json +0 -1
  201. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/parse.d.ts +0 -2
  202. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
  203. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/regex.d.ts +0 -2
  204. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
  205. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/rng.d.ts +0 -1
  206. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
  207. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/sha1.d.ts +0 -2
  208. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
  209. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/stringify.d.ts +0 -3
  210. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
  211. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/types.d.ts +0 -21
  212. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/types.js +0 -2
  213. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +0 -1
  214. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
  215. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v1.d.ts +0 -11
  216. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
  217. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +0 -2
  218. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
  219. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v3.d.ts +0 -9
  220. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
  221. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v35.d.ts +0 -7
  222. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v35.js +0 -44
  223. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v4.d.ts +0 -4
  224. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
  225. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v5.d.ts +0 -9
  226. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
  227. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v6.d.ts +0 -4
  228. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v6.js +0 -22
  229. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +0 -2
  230. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
  231. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v7.d.ts +0 -9
  232. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
  233. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/validate.d.ts +0 -2
  234. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
  235. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/version.d.ts +0 -2
  236. package/dist/node_modules/gigachat/node_modules/uuid/dist/cjs-browser/version.js +0 -10
  237. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/bin/uuid +0 -2
  238. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/index.d.ts +0 -15
  239. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/index.js +0 -14
  240. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/max.d.ts +0 -2
  241. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/max.js +0 -1
  242. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/md5.d.ts +0 -4
  243. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/md5.js +0 -11
  244. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/native.d.ts +0 -6
  245. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/native.js +0 -2
  246. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/nil.d.ts +0 -2
  247. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/nil.js +0 -1
  248. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/parse.d.ts +0 -2
  249. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/parse.js +0 -9
  250. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/regex.d.ts +0 -2
  251. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/regex.js +0 -1
  252. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/rng.d.ts +0 -1
  253. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/rng.js +0 -10
  254. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
  255. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/sha1.js +0 -11
  256. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
  257. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/stringify.js +0 -35
  258. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/types.d.ts +0 -21
  259. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/types.js +0 -1
  260. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
  261. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/uuid-bin.js +0 -70
  262. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v1.d.ts +0 -11
  263. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v1.js +0 -83
  264. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
  265. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v1ToV6.js +0 -10
  266. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v3.d.ts +0 -9
  267. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v3.js +0 -9
  268. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v35.d.ts +0 -7
  269. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v35.js +0 -39
  270. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v4.d.ts +0 -4
  271. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v4.js +0 -27
  272. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v5.d.ts +0 -9
  273. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v5.js +0 -9
  274. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v6.d.ts +0 -4
  275. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v6.js +0 -20
  276. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
  277. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v6ToV1.js +0 -10
  278. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v7.d.ts +0 -9
  279. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/v7.js +0 -65
  280. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/validate.d.ts +0 -2
  281. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/validate.js +0 -5
  282. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/version.d.ts +0 -2
  283. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm/version.js +0 -8
  284. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
  285. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/index.js +0 -14
  286. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
  287. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/max.js +0 -1
  288. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
  289. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/md5.js +0 -135
  290. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
  291. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/native.js +0 -2
  292. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
  293. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  294. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
  295. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/parse.js +0 -9
  296. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
  297. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  298. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
  299. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/rng.js +0 -11
  300. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
  301. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/sha1.js +0 -70
  302. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
  303. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/stringify.js +0 -35
  304. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
  305. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/types.js +0 -1
  306. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
  307. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/uuid-bin.js +0 -70
  308. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
  309. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v1.js +0 -83
  310. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
  311. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v1ToV6.js +0 -10
  312. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
  313. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v3.js +0 -9
  314. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
  315. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v35.js +0 -39
  316. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
  317. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v4.js +0 -27
  318. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
  319. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v5.js +0 -9
  320. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
  321. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v6.js +0 -20
  322. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
  323. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v6ToV1.js +0 -10
  324. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
  325. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/v7.js +0 -65
  326. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
  327. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/validate.js +0 -5
  328. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
  329. package/dist/node_modules/gigachat/node_modules/uuid/dist/esm-browser/version.js +0 -8
  330. package/dist/node_modules/gigachat/node_modules/uuid/package.json +0 -132
  331. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/index.d.ts +0 -15
  332. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/index.js +0 -31
  333. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/max.d.ts +0 -2
  334. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/max.js +0 -3
  335. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
  336. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/md5.js +0 -13
  337. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/native.d.ts +0 -6
  338. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/native.js +0 -4
  339. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
  340. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/nil.js +0 -3
  341. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/package.json +0 -1
  342. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
  343. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/parse.js +0 -11
  344. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
  345. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/regex.js +0 -3
  346. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
  347. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/rng.js +0 -13
  348. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
  349. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/sha1.js +0 -13
  350. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
  351. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/stringify.js +0 -39
  352. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/types.d.ts +0 -21
  353. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/types.js +0 -2
  354. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
  355. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
  356. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
  357. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v1.js +0 -87
  358. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
  359. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
  360. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
  361. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v3.js +0 -14
  362. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
  363. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v35.js +0 -44
  364. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
  365. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v4.js +0 -29
  366. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
  367. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v5.js +0 -14
  368. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
  369. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v6.js +0 -22
  370. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
  371. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
  372. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
  373. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/v7.js +0 -69
  374. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
  375. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/validate.js +0 -7
  376. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/version.d.ts +0 -2
  377. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs/version.js +0 -10
  378. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/index.d.ts +0 -15
  379. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/index.js +0 -31
  380. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/max.d.ts +0 -2
  381. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/max.js +0 -3
  382. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/md5.d.ts +0 -2
  383. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
  384. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/native.d.ts +0 -4
  385. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/native.js +0 -4
  386. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/nil.d.ts +0 -2
  387. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
  388. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/package.json +0 -1
  389. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/parse.d.ts +0 -2
  390. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
  391. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/regex.d.ts +0 -2
  392. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
  393. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/rng.d.ts +0 -1
  394. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
  395. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/sha1.d.ts +0 -2
  396. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
  397. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/stringify.d.ts +0 -3
  398. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
  399. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/types.d.ts +0 -21
  400. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/types.js +0 -2
  401. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +0 -1
  402. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
  403. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v1.d.ts +0 -11
  404. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
  405. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +0 -2
  406. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
  407. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v3.d.ts +0 -9
  408. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
  409. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v35.d.ts +0 -7
  410. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v35.js +0 -44
  411. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v4.d.ts +0 -4
  412. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
  413. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v5.d.ts +0 -9
  414. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
  415. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v6.d.ts +0 -4
  416. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v6.js +0 -22
  417. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +0 -2
  418. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
  419. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v7.d.ts +0 -9
  420. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
  421. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/validate.d.ts +0 -2
  422. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
  423. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/version.d.ts +0 -2
  424. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/cjs-browser/version.js +0 -10
  425. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/bin/uuid +0 -2
  426. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/index.d.ts +0 -15
  427. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/index.js +0 -14
  428. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/max.d.ts +0 -2
  429. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/max.js +0 -1
  430. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/md5.d.ts +0 -4
  431. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/md5.js +0 -11
  432. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/native.d.ts +0 -6
  433. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/native.js +0 -2
  434. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/nil.d.ts +0 -2
  435. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/nil.js +0 -1
  436. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/parse.d.ts +0 -2
  437. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/parse.js +0 -9
  438. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/regex.d.ts +0 -2
  439. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/regex.js +0 -1
  440. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/rng.d.ts +0 -1
  441. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/rng.js +0 -10
  442. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
  443. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/sha1.js +0 -11
  444. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
  445. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/stringify.js +0 -35
  446. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/types.d.ts +0 -21
  447. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/types.js +0 -1
  448. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
  449. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/uuid-bin.js +0 -70
  450. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v1.d.ts +0 -11
  451. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v1.js +0 -83
  452. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
  453. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v1ToV6.js +0 -10
  454. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v3.d.ts +0 -9
  455. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v3.js +0 -9
  456. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v35.d.ts +0 -7
  457. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v35.js +0 -39
  458. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v4.d.ts +0 -4
  459. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v4.js +0 -27
  460. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v5.d.ts +0 -9
  461. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v5.js +0 -9
  462. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v6.d.ts +0 -4
  463. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v6.js +0 -20
  464. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
  465. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v6ToV1.js +0 -10
  466. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v7.d.ts +0 -9
  467. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/v7.js +0 -65
  468. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/validate.d.ts +0 -2
  469. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/validate.js +0 -5
  470. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/version.d.ts +0 -2
  471. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm/version.js +0 -8
  472. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
  473. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/index.js +0 -14
  474. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
  475. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/max.js +0 -1
  476. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
  477. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/md5.js +0 -135
  478. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
  479. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/native.js +0 -2
  480. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
  481. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  482. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
  483. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/parse.js +0 -9
  484. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
  485. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  486. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
  487. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/rng.js +0 -11
  488. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
  489. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/sha1.js +0 -70
  490. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
  491. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/stringify.js +0 -35
  492. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
  493. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/types.js +0 -1
  494. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
  495. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/uuid-bin.js +0 -70
  496. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
  497. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v1.js +0 -83
  498. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
  499. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v1ToV6.js +0 -10
  500. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
  501. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v3.js +0 -9
  502. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
  503. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v35.js +0 -39
  504. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
  505. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v4.js +0 -27
  506. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
  507. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v5.js +0 -9
  508. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
  509. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v6.js +0 -20
  510. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
  511. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v6ToV1.js +0 -10
  512. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
  513. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/v7.js +0 -65
  514. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
  515. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/validate.js +0 -5
  516. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
  517. package/dist/node_modules/langchain-gigachat/node_modules/uuid/dist/esm-browser/version.js +0 -8
  518. package/dist/node_modules/langchain-gigachat/node_modules/uuid/package.json +0 -132
@@ -1,4 +1,4 @@
1
- /*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors */
1
+ /*! Axios v1.18.1 Copyright (c) 2026 Matt Zabriskie and contributors */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -25,24 +25,24 @@
25
25
  }
26
26
  function _asyncGeneratorDelegate(t) {
27
27
  var e = {},
28
- n = !1;
28
+ n = false;
29
29
  function pump(e, r) {
30
- return n = !0, r = new Promise(function (n) {
30
+ return n = true, r = new Promise(function (n) {
31
31
  n(t[e](r));
32
32
  }), {
33
- done: !1,
33
+ done: false,
34
34
  value: new _OverloadYield(r, 1)
35
35
  };
36
36
  }
37
37
  return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
38
38
  return this;
39
39
  }, e.next = function (t) {
40
- return n ? (n = !1, t) : pump("next", t);
40
+ return n ? (n = false, t) : pump("next", t);
41
41
  }, "function" == typeof t.throw && (e.throw = function (t) {
42
- if (n) throw n = !1, t;
42
+ if (n) throw n = false, t;
43
43
  return pump("throw", t);
44
44
  }), "function" == typeof t.return && (e.return = function (t) {
45
- return n ? (n = !1, t) : pump("return", t);
45
+ return n ? (n = false, t) : pump("return", t);
46
46
  }), e;
47
47
  }
48
48
  function _asyncIterator(r) {
@@ -80,7 +80,7 @@
80
80
  var n = this.s.return;
81
81
  return void 0 === n ? Promise.resolve({
82
82
  value: r,
83
- done: !0
83
+ done: true
84
84
  }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
85
85
  },
86
86
  throw: function (r) {
@@ -133,18 +133,18 @@
133
133
  function _defineProperties(e, r) {
134
134
  for (var t = 0; t < r.length; t++) {
135
135
  var o = r[t];
136
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
136
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
137
137
  }
138
138
  }
139
139
  function _createClass(e, r, t) {
140
140
  return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
141
- writable: !1
141
+ writable: false
142
142
  }), e;
143
143
  }
144
144
  function _createForOfIteratorHelper(r, e) {
145
145
  var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
146
146
  if (!t) {
147
- if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
147
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
148
148
  t && (r = t);
149
149
  var n = 0,
150
150
  F = function () {};
@@ -152,9 +152,9 @@
152
152
  s: F,
153
153
  n: function () {
154
154
  return n >= r.length ? {
155
- done: !0
155
+ done: true
156
156
  } : {
157
- done: !1,
157
+ done: false,
158
158
  value: r[n++]
159
159
  };
160
160
  },
@@ -167,8 +167,8 @@
167
167
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
168
168
  }
169
169
  var o,
170
- a = !0,
171
- u = !1;
170
+ a = true,
171
+ u = false;
172
172
  return {
173
173
  s: function () {
174
174
  t = t.call(r);
@@ -178,7 +178,7 @@
178
178
  return a = r.done, r;
179
179
  },
180
180
  e: function (r) {
181
- u = !0, o = r;
181
+ u = true, o = r;
182
182
  },
183
183
  f: function () {
184
184
  try {
@@ -192,9 +192,9 @@
192
192
  function _defineProperty(e, r, t) {
193
193
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
194
194
  value: t,
195
- enumerable: !0,
196
- configurable: !0,
197
- writable: !0
195
+ enumerable: true,
196
+ configurable: true,
197
+ writable: true
198
198
  }) : e[r] = t, e;
199
199
  }
200
200
  function _getPrototypeOf(t) {
@@ -207,11 +207,11 @@
207
207
  t.prototype = Object.create(e && e.prototype, {
208
208
  constructor: {
209
209
  value: t,
210
- writable: !0,
211
- configurable: !0
210
+ writable: true,
211
+ configurable: true
212
212
  }
213
213
  }), Object.defineProperty(t, "prototype", {
214
- writable: !1
214
+ writable: false
215
215
  }), e && _setPrototypeOf(t, e);
216
216
  }
217
217
  function _isNativeFunction(t) {
@@ -240,15 +240,15 @@
240
240
  i,
241
241
  u,
242
242
  a = [],
243
- f = !0,
244
- o = !1;
243
+ f = true,
244
+ o = false;
245
245
  try {
246
246
  if (i = (t = t.call(r)).next, 0 === l) {
247
247
  if (Object(t) !== t) return;
248
248
  f = !1;
249
249
  } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
250
250
  } catch (r) {
251
- o = !0, n = r;
251
+ o = true, n = r;
252
252
  } finally {
253
253
  try {
254
254
  if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
@@ -278,7 +278,7 @@
278
278
  function _objectSpread2(e) {
279
279
  for (var r = 1; r < arguments.length; r++) {
280
280
  var t = null != arguments[r] ? arguments[r] : {};
281
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
281
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
282
282
  _defineProperty(e, r, t[r]);
283
283
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
284
284
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
@@ -307,7 +307,7 @@
307
307
  u,
308
308
  f = 0,
309
309
  p = o || [],
310
- y = !1,
310
+ y = false,
311
311
  G = {
312
312
  p: 0,
313
313
  n: 0,
@@ -327,7 +327,7 @@
327
327
  r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
328
328
  }
329
329
  if (o || r > 1) return a;
330
- throw y = !0, n;
330
+ throw y = true, n;
331
331
  }
332
332
  return function (o, p, l) {
333
333
  if (f > 1) throw TypeError("Generator is already running");
@@ -353,7 +353,7 @@
353
353
  done: y
354
354
  };
355
355
  };
356
- }(r, o, i), !0), u;
356
+ }(r, o, i), true), u;
357
357
  }
358
358
  var a = {};
359
359
  function Generator() {}
@@ -431,7 +431,7 @@
431
431
  if ("object" != typeof t || !t) return t;
432
432
  var e = t[Symbol.toPrimitive];
433
433
  if (void 0 !== e) {
434
- var i = e.call(t, r || "default");
434
+ var i = e.call(t, r);
435
435
  if ("object" != typeof i) return i;
436
436
  throw new TypeError("@@toPrimitive must return a primitive value.");
437
437
  }
@@ -463,55 +463,42 @@
463
463
  };
464
464
  }
465
465
  function AsyncGenerator(e) {
466
- var r, t;
467
- function resume(r, t) {
466
+ var t, n;
467
+ function resume(t, n) {
468
468
  try {
469
- var n = e[r](t),
470
- o = n.value,
469
+ var r = e[t](n),
470
+ o = r.value,
471
471
  u = o instanceof _OverloadYield;
472
- Promise.resolve(u ? o.v : o).then(function (t) {
472
+ Promise.resolve(u ? o.v : o).then(function (n) {
473
473
  if (u) {
474
- var i = "return" === r ? "return" : "next";
475
- if (!o.k || t.done) return resume(i, t);
476
- t = e[i](t).value;
474
+ var i = "return" === t && o.k ? t : "next";
475
+ if (!o.k || n.done) return resume(i, n);
476
+ n = e[i](n).value;
477
477
  }
478
- settle(n.done ? "return" : "normal", t);
478
+ settle(!!r.done, n);
479
479
  }, function (e) {
480
480
  resume("throw", e);
481
481
  });
482
482
  } catch (e) {
483
- settle("throw", e);
483
+ settle(2, e);
484
484
  }
485
485
  }
486
- function settle(e, n) {
487
- switch (e) {
488
- case "return":
489
- r.resolve({
490
- value: n,
491
- done: !0
492
- });
493
- break;
494
- case "throw":
495
- r.reject(n);
496
- break;
497
- default:
498
- r.resolve({
499
- value: n,
500
- done: !1
501
- });
502
- }
503
- (r = r.next) ? resume(r.key, r.arg) : t = null;
486
+ function settle(e, r) {
487
+ 2 === e ? t.reject(r) : t.resolve({
488
+ value: r,
489
+ done: e
490
+ }), (t = t.next) ? resume(t.key, t.arg) : n = null;
504
491
  }
505
- this._invoke = function (e, n) {
492
+ this._invoke = function (e, r) {
506
493
  return new Promise(function (o, u) {
507
494
  var i = {
508
495
  key: e,
509
- arg: n,
496
+ arg: r,
510
497
  resolve: o,
511
498
  reject: u,
512
499
  next: null
513
500
  };
514
- t ? t = t.next = i : (r = t = i, resume(e, n));
501
+ n ? n = n.next = i : (t = n = i, resume(e, r));
515
502
  });
516
503
  }, "function" != typeof e.return && (this.return = void 0);
517
504
  }
@@ -539,9 +526,9 @@
539
526
  return Wrapper.prototype = Object.create(t.prototype, {
540
527
  constructor: {
541
528
  value: Wrapper,
542
- enumerable: !1,
543
- writable: !0,
544
- configurable: !0
529
+ enumerable: false,
530
+ writable: true,
531
+ configurable: true
545
532
  }
546
533
  }), _setPrototypeOf(Wrapper, t);
547
534
  }, _wrapNativeSuper(t);
@@ -566,6 +553,57 @@
566
553
  var getPrototypeOf = Object.getPrototypeOf;
567
554
  var iterator = Symbol.iterator,
568
555
  toStringTag = Symbol.toStringTag;
556
+
557
+ /* Creating a function that will check if an object has a property. */
558
+ var hasOwnProperty = function (_ref) {
559
+ var hasOwnProperty = _ref.hasOwnProperty;
560
+ return function (obj, prop) {
561
+ return hasOwnProperty.call(obj, prop);
562
+ };
563
+ }(Object.prototype);
564
+
565
+ /**
566
+ * Walk the prototype chain (excluding the shared Object.prototype) looking for
567
+ * an own `prop`. This distinguishes genuine own/inherited members — including
568
+ * class accessors and template prototypes — from members injected via
569
+ * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
570
+ * live on Object.prototype itself and are therefore never matched.
571
+ *
572
+ * @param {*} thing The value whose chain to inspect
573
+ * @param {string|symbol} prop The property key to look for
574
+ *
575
+ * @returns {boolean} True when `prop` is owned below Object.prototype
576
+ */
577
+ var hasOwnInPrototypeChain = function hasOwnInPrototypeChain(thing, prop) {
578
+ var obj = thing;
579
+ var seen = [];
580
+ while (obj != null && obj !== Object.prototype) {
581
+ if (seen.indexOf(obj) !== -1) {
582
+ return false;
583
+ }
584
+ seen.push(obj);
585
+ if (hasOwnProperty(obj, prop)) {
586
+ return true;
587
+ }
588
+ obj = getPrototypeOf(obj);
589
+ }
590
+ return false;
591
+ };
592
+
593
+ /**
594
+ * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own
595
+ * properties and members inherited from a non-Object.prototype source (a class
596
+ * instance or template object) are honored; a value reachable only through a
597
+ * polluted Object.prototype is ignored and `undefined` is returned.
598
+ *
599
+ * @param {*} obj The source object
600
+ * @param {string|symbol} prop The property key to read
601
+ *
602
+ * @returns {*} The resolved value, or undefined when unsafe/absent
603
+ */
604
+ var getSafeProp = function getSafeProp(obj, prop) {
605
+ return obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
606
+ };
569
607
  var kindOf = function (cache) {
570
608
  return function (thing) {
571
609
  var str = toString.call(thing);
@@ -600,7 +638,7 @@
600
638
  *
601
639
  * @returns {boolean} True if the value is undefined, otherwise false
602
640
  */
603
- var isUndefined = typeOfTest("undefined");
641
+ var isUndefined = typeOfTest('undefined');
604
642
 
605
643
  /**
606
644
  * Determine if a value is a Buffer
@@ -620,7 +658,7 @@
620
658
  *
621
659
  * @returns {boolean} True if value is an ArrayBuffer, otherwise false
622
660
  */
623
- var isArrayBuffer = kindOfTest("ArrayBuffer");
661
+ var isArrayBuffer = kindOfTest('ArrayBuffer');
624
662
 
625
663
  /**
626
664
  * Determine if a value is a view on an ArrayBuffer
@@ -631,7 +669,7 @@
631
669
  */
632
670
  function isArrayBufferView(val) {
633
671
  var result;
634
- if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
672
+ if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
635
673
  result = ArrayBuffer.isView(val);
636
674
  } else {
637
675
  result = val && val.buffer && isArrayBuffer(val.buffer);
@@ -646,7 +684,7 @@
646
684
  *
647
685
  * @returns {boolean} True if value is a String, otherwise false
648
686
  */
649
- var isString = typeOfTest("string");
687
+ var isString = typeOfTest('string');
650
688
 
651
689
  /**
652
690
  * Determine if a value is a Function
@@ -654,7 +692,7 @@
654
692
  * @param {*} val The value to test
655
693
  * @returns {boolean} True if value is a Function, otherwise false
656
694
  */
657
- var isFunction$1 = typeOfTest("function");
695
+ var isFunction$1 = typeOfTest('function');
658
696
 
659
697
  /**
660
698
  * Determine if a value is a Number
@@ -663,7 +701,7 @@
663
701
  *
664
702
  * @returns {boolean} True if value is a Number, otherwise false
665
703
  */
666
- var isNumber = typeOfTest("number");
704
+ var isNumber = typeOfTest('number');
667
705
 
668
706
  /**
669
707
  * Determine if a value is an Object
@@ -673,7 +711,7 @@
673
711
  * @returns {boolean} True if value is an Object, otherwise false
674
712
  */
675
713
  var isObject = function isObject(thing) {
676
- return thing !== null && _typeof(thing) === "object";
714
+ return thing !== null && _typeof(thing) === 'object';
677
715
  };
678
716
 
679
717
  /**
@@ -694,11 +732,15 @@
694
732
  * @returns {boolean} True if value is a plain Object, otherwise false
695
733
  */
696
734
  var isPlainObject = function isPlainObject(val) {
697
- if (kindOf(val) !== "object") {
735
+ if (!isObject(val)) {
698
736
  return false;
699
737
  }
700
738
  var prototype = getPrototypeOf(val);
701
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
739
+ return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&
740
+ // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
741
+ // Symbol.iterator as evidence the value is a tagged/iterable type rather
742
+ // than a plain object, while ignoring keys injected onto Object.prototype.
743
+ !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
702
744
  };
703
745
 
704
746
  /**
@@ -728,7 +770,7 @@
728
770
  *
729
771
  * @returns {boolean} True if value is a Date, otherwise false
730
772
  */
731
- var isDate = kindOfTest("Date");
773
+ var isDate = kindOfTest('Date');
732
774
 
733
775
  /**
734
776
  * Determine if a value is a File
@@ -737,7 +779,34 @@
737
779
  *
738
780
  * @returns {boolean} True if value is a File, otherwise false
739
781
  */
740
- var isFile = kindOfTest("File");
782
+ var isFile = kindOfTest('File');
783
+
784
+ /**
785
+ * Determine if a value is a React Native Blob
786
+ * React Native "blob": an object with a `uri` attribute. Optionally, it can
787
+ * also have a `name` and `type` attribute to specify filename and content type
788
+ *
789
+ * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
790
+ *
791
+ * @param {*} value The value to test
792
+ *
793
+ * @returns {boolean} True if value is a React Native Blob, otherwise false
794
+ */
795
+ var isReactNativeBlob = function isReactNativeBlob(value) {
796
+ return !!(value && typeof value.uri !== 'undefined');
797
+ };
798
+
799
+ /**
800
+ * Determine if environment is React Native
801
+ * ReactNative `FormData` has a non-standard `getParts()` method
802
+ *
803
+ * @param {*} formData The formData to test
804
+ *
805
+ * @returns {boolean} True if environment is React Native, otherwise false
806
+ */
807
+ var isReactNative = function isReactNative(formData) {
808
+ return formData && typeof formData.getParts !== 'undefined';
809
+ };
741
810
 
742
811
  /**
743
812
  * Determine if a value is a Blob
@@ -746,16 +815,16 @@
746
815
  *
747
816
  * @returns {boolean} True if value is a Blob, otherwise false
748
817
  */
749
- var isBlob = kindOfTest("Blob");
818
+ var isBlob = kindOfTest('Blob');
750
819
 
751
820
  /**
752
821
  * Determine if a value is a FileList
753
822
  *
754
823
  * @param {*} val The value to test
755
824
  *
756
- * @returns {boolean} True if value is a File, otherwise false
825
+ * @returns {boolean} True if value is a FileList, otherwise false
757
826
  */
758
- var isFileList = kindOfTest("FileList");
827
+ var isFileList = kindOfTest('FileList');
759
828
 
760
829
  /**
761
830
  * Determine if a value is a Stream
@@ -775,11 +844,26 @@
775
844
  *
776
845
  * @returns {boolean} True if value is an FormData, otherwise false
777
846
  */
847
+ function getGlobal() {
848
+ if (typeof globalThis !== 'undefined') return globalThis;
849
+ if (typeof self !== 'undefined') return self;
850
+ if (typeof window !== 'undefined') return window;
851
+ if (typeof global !== 'undefined') return global;
852
+ return {};
853
+ }
854
+ var G = getGlobal();
855
+ var FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
778
856
  var isFormData = function isFormData(thing) {
779
- var kind;
780
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" ||
857
+ if (!thing) return false;
858
+ if (FormDataCtor && thing instanceof FormDataCtor) return true;
859
+ // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.
860
+ var proto = getPrototypeOf(thing);
861
+ if (!proto || proto === Object.prototype) return false;
862
+ if (!isFunction$1(thing.append)) return false;
863
+ var kind = kindOf(thing);
864
+ return kind === 'formdata' ||
781
865
  // detect form-data instance
782
- kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
866
+ kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]';
783
867
  };
784
868
 
785
869
  /**
@@ -789,8 +873,8 @@
789
873
  *
790
874
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
791
875
  */
792
- var isURLSearchParams = kindOfTest("URLSearchParams");
793
- var _map = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest),
876
+ var isURLSearchParams = kindOfTest('URLSearchParams');
877
+ var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest),
794
878
  _map2 = _slicedToArray(_map, 4),
795
879
  isReadableStream = _map2[0],
796
880
  isRequest = _map2[1],
@@ -805,9 +889,8 @@
805
889
  * @returns {String} The String freed of excess whitespace
806
890
  */
807
891
  var trim = function trim(str) {
808
- return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
892
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
809
893
  };
810
-
811
894
  /**
812
895
  * Iterate over an Array or an Object invoking a function for each item.
813
896
  *
@@ -825,18 +908,18 @@
825
908
  * @returns {any}
826
909
  */
827
910
  function forEach(obj, fn) {
828
- var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
829
- _ref$allOwnKeys = _ref.allOwnKeys,
830
- allOwnKeys = _ref$allOwnKeys === void 0 ? false : _ref$allOwnKeys;
911
+ var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
912
+ _ref2$allOwnKeys = _ref2.allOwnKeys,
913
+ allOwnKeys = _ref2$allOwnKeys === void 0 ? false : _ref2$allOwnKeys;
831
914
  // Don't bother if no value provided
832
- if (obj === null || typeof obj === "undefined") {
915
+ if (obj === null || typeof obj === 'undefined') {
833
916
  return;
834
917
  }
835
918
  var i;
836
919
  var l;
837
920
 
838
921
  // Force an array if not already something iterable
839
- if (_typeof(obj) !== "object") {
922
+ if (_typeof(obj) !== 'object') {
840
923
  /*eslint no-param-reassign:0*/
841
924
  obj = [obj];
842
925
  }
@@ -861,6 +944,15 @@
861
944
  }
862
945
  }
863
946
  }
947
+
948
+ /**
949
+ * Finds a key in an object, case-insensitive, returning the actual key name.
950
+ * Returns null if the object is a Buffer or if no match is found.
951
+ *
952
+ * @param {Object} obj - The object to search.
953
+ * @param {string} key - The key to find (case-insensitive).
954
+ * @returns {?string} The actual key name if found, otherwise null.
955
+ */
864
956
  function findKey(obj, key) {
865
957
  if (isBuffer(obj)) {
866
958
  return null;
@@ -879,8 +971,8 @@
879
971
  }
880
972
  var _global = function () {
881
973
  /*eslint no-undef:0*/
882
- if (typeof globalThis !== "undefined") return globalThis;
883
- return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
974
+ if (typeof globalThis !== 'undefined') return globalThis;
975
+ return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
884
976
  }();
885
977
  var isContextDefined = function isContextDefined(context) {
886
978
  return !isUndefined(context) && context !== _global;
@@ -904,20 +996,26 @@
904
996
  *
905
997
  * @returns {Object} Result of all merge properties
906
998
  */
907
- function merge(/* obj1, obj2, obj3, ... */
908
- ) {
909
- var _ref2 = isContextDefined(this) && this || {},
910
- caseless = _ref2.caseless,
911
- skipUndefined = _ref2.skipUndefined;
999
+ function merge() {
1000
+ var _ref3 = isContextDefined(this) && this || {},
1001
+ caseless = _ref3.caseless,
1002
+ skipUndefined = _ref3.skipUndefined;
912
1003
  var result = {};
913
1004
  var assignValue = function assignValue(val, key) {
914
1005
  // Skip dangerous property names to prevent prototype pollution
915
- if (key === "__proto__" || key === "constructor" || key === "prototype") {
1006
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
916
1007
  return;
917
1008
  }
918
- var targetKey = caseless && findKey(result, key) || key;
919
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
920
- result[targetKey] = merge(result[targetKey], val);
1009
+
1010
+ // findKey lowercases the key, so caseless lookup only applies to strings —
1011
+ // symbol keys are identity-matched.
1012
+ var targetKey = caseless && typeof key === 'string' && findKey(result, key) || key;
1013
+ // Read via own-prop only — a bare `result[targetKey]` walks the prototype
1014
+ // chain, so a polluted Object.prototype value could surface here and get
1015
+ // copied into the merged result.
1016
+ var existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;
1017
+ if (isPlainObject(existing) && isPlainObject(val)) {
1018
+ result[targetKey] = merge(existing, val);
921
1019
  } else if (isPlainObject(val)) {
922
1020
  result[targetKey] = merge({}, val);
923
1021
  } else if (isArray(val)) {
@@ -927,7 +1025,21 @@
927
1025
  }
928
1026
  };
929
1027
  for (var i = 0, l = arguments.length; i < l; i++) {
930
- arguments[i] && forEach(arguments[i], assignValue);
1028
+ var source = i < 0 || arguments.length <= i ? undefined : arguments[i];
1029
+ if (!source || isBuffer(source)) {
1030
+ continue;
1031
+ }
1032
+ forEach(source, assignValue);
1033
+ if (_typeof(source) !== 'object' || isArray(source)) {
1034
+ continue;
1035
+ }
1036
+ var symbols = Object.getOwnPropertySymbols(source);
1037
+ for (var j = 0; j < symbols.length; j++) {
1038
+ var symbol = symbols[j];
1039
+ if (propertyIsEnumerable.call(source, symbol)) {
1040
+ assignValue(source[symbol], symbol);
1041
+ }
1042
+ }
931
1043
  }
932
1044
  return result;
933
1045
  }
@@ -944,11 +1056,14 @@
944
1056
  * @returns {Object} The resulting value of object a
945
1057
  */
946
1058
  var extend = function extend(a, b, thisArg) {
947
- var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
948
- allOwnKeys = _ref3.allOwnKeys;
1059
+ var _ref4 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
1060
+ allOwnKeys = _ref4.allOwnKeys;
949
1061
  forEach(b, function (val, key) {
950
1062
  if (thisArg && isFunction$1(val)) {
951
1063
  Object.defineProperty(a, key, {
1064
+ // Null-proto descriptor so a polluted Object.prototype.get cannot
1065
+ // hijack defineProperty's accessor-vs-data resolution.
1066
+ __proto__: null,
952
1067
  value: bind(val, thisArg),
953
1068
  writable: true,
954
1069
  enumerable: true,
@@ -956,6 +1071,7 @@
956
1071
  });
957
1072
  } else {
958
1073
  Object.defineProperty(a, key, {
1074
+ __proto__: null,
959
1075
  value: val,
960
1076
  writable: true,
961
1077
  enumerable: true,
@@ -993,13 +1109,15 @@
993
1109
  */
994
1110
  var inherits = function inherits(constructor, superConstructor, props, descriptors) {
995
1111
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
996
- Object.defineProperty(constructor.prototype, "constructor", {
1112
+ Object.defineProperty(constructor.prototype, 'constructor', {
1113
+ __proto__: null,
997
1114
  value: constructor,
998
1115
  writable: true,
999
1116
  enumerable: false,
1000
1117
  configurable: true
1001
1118
  });
1002
- Object.defineProperty(constructor, "super", {
1119
+ Object.defineProperty(constructor, 'super', {
1120
+ __proto__: null,
1003
1121
  value: superConstructor.prototype
1004
1122
  });
1005
1123
  props && Object.assign(constructor.prototype, props);
@@ -1089,7 +1207,7 @@
1089
1207
  return function (thing) {
1090
1208
  return TypedArray && thing instanceof TypedArray;
1091
1209
  };
1092
- }(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
1210
+ }(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
1093
1211
 
1094
1212
  /**
1095
1213
  * For each entry in the object, call the function with the key and value.
@@ -1127,20 +1245,13 @@
1127
1245
  };
1128
1246
 
1129
1247
  /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
1130
- var isHTMLForm = kindOfTest("HTMLFormElement");
1248
+ var isHTMLForm = kindOfTest('HTMLFormElement');
1131
1249
  var toCamelCase = function toCamelCase(str) {
1132
1250
  return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
1133
1251
  return p1.toUpperCase() + p2;
1134
1252
  });
1135
1253
  };
1136
-
1137
- /* Creating a function that will check if an object has a property. */
1138
- var hasOwnProperty = function (_ref4) {
1139
- var hasOwnProperty = _ref4.hasOwnProperty;
1140
- return function (obj, prop) {
1141
- return hasOwnProperty.call(obj, prop);
1142
- };
1143
- }(Object.prototype);
1254
+ var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
1144
1255
 
1145
1256
  /**
1146
1257
  * Determine if a value is a RegExp object
@@ -1149,7 +1260,7 @@
1149
1260
  *
1150
1261
  * @returns {boolean} True if value is a RegExp object, otherwise false
1151
1262
  */
1152
- var isRegExp = kindOfTest("RegExp");
1263
+ var isRegExp = kindOfTest('RegExp');
1153
1264
  var reduceDescriptors = function reduceDescriptors(obj, reducer) {
1154
1265
  var descriptors = Object.getOwnPropertyDescriptors(obj);
1155
1266
  var reducedDescriptors = {};
@@ -1170,13 +1281,13 @@
1170
1281
  var freezeMethods = function freezeMethods(obj) {
1171
1282
  reduceDescriptors(obj, function (descriptor, name) {
1172
1283
  // skip restricted props in strict mode
1173
- if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
1284
+ if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].includes(name)) {
1174
1285
  return false;
1175
1286
  }
1176
1287
  var value = obj[name];
1177
1288
  if (!isFunction$1(value)) return;
1178
1289
  descriptor.enumerable = false;
1179
- if ("writable" in descriptor) {
1290
+ if ('writable' in descriptor) {
1180
1291
  descriptor.writable = false;
1181
1292
  return;
1182
1293
  }
@@ -1187,6 +1298,15 @@
1187
1298
  }
1188
1299
  });
1189
1300
  };
1301
+
1302
+ /**
1303
+ * Converts an array or a delimited string into an object set with values as keys and true as values.
1304
+ * Useful for fast membership checks.
1305
+ *
1306
+ * @param {Array|string} arrayOrString - The array or string to convert.
1307
+ * @param {string} delimiter - The delimiter to use if input is a string.
1308
+ * @returns {Object} An object with keys from the array or string, values set to true.
1309
+ */
1190
1310
  var toObjectSet = function toObjectSet(arrayOrString, delimiter) {
1191
1311
  var obj = {};
1192
1312
  var define = function define(arr) {
@@ -1210,13 +1330,20 @@
1210
1330
  * @returns {boolean}
1211
1331
  */
1212
1332
  function isSpecCompliantForm(thing) {
1213
- return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
1333
+ return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
1214
1334
  }
1335
+
1336
+ /**
1337
+ * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
1338
+ *
1339
+ * @param {Object} obj - The object to convert.
1340
+ * @returns {Object} The JSON-compatible object.
1341
+ */
1215
1342
  var toJSONObject = function toJSONObject(obj) {
1216
- var stack = new Array(10);
1217
- var _visit = function visit(source, i) {
1343
+ var visited = new WeakSet();
1344
+ var _visit = function visit(source) {
1218
1345
  if (isObject(source)) {
1219
- if (stack.indexOf(source) >= 0) {
1346
+ if (visited.has(source)) {
1220
1347
  return;
1221
1348
  }
1222
1349
 
@@ -1224,22 +1351,37 @@
1224
1351
  if (isBuffer(source)) {
1225
1352
  return source;
1226
1353
  }
1227
- if (!("toJSON" in source)) {
1228
- stack[i] = source;
1354
+ if (!('toJSON' in source)) {
1355
+ // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
1356
+ visited.add(source);
1229
1357
  var target = isArray(source) ? [] : {};
1230
1358
  forEach(source, function (value, key) {
1231
- var reducedValue = _visit(value, i + 1);
1359
+ var reducedValue = _visit(value);
1232
1360
  !isUndefined(reducedValue) && (target[key] = reducedValue);
1233
1361
  });
1234
- stack[i] = undefined;
1362
+ visited["delete"](source);
1235
1363
  return target;
1236
1364
  }
1237
1365
  }
1238
1366
  return source;
1239
1367
  };
1240
- return _visit(obj, 0);
1368
+ return _visit(obj);
1241
1369
  };
1242
- var isAsyncFn = kindOfTest("AsyncFunction");
1370
+
1371
+ /**
1372
+ * Determines if a value is an async function.
1373
+ *
1374
+ * @param {*} thing - The value to test.
1375
+ * @returns {boolean} True if value is an async function, otherwise false.
1376
+ */
1377
+ var isAsyncFn = kindOfTest('AsyncFunction');
1378
+
1379
+ /**
1380
+ * Determines if a value is thenable (has then and catch methods).
1381
+ *
1382
+ * @param {*} thing - The value to test.
1383
+ * @returns {boolean} True if value is thenable, otherwise false.
1384
+ */
1243
1385
  var isThenable = function isThenable(thing) {
1244
1386
  return thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing["catch"]);
1245
1387
  };
@@ -1247,12 +1389,20 @@
1247
1389
  // original code
1248
1390
  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
1249
1391
 
1392
+ /**
1393
+ * Provides a cross-platform setImmediate implementation.
1394
+ * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
1395
+ *
1396
+ * @param {boolean} setImmediateSupported - Whether setImmediate is supported.
1397
+ * @param {boolean} postMessageSupported - Whether postMessage is supported.
1398
+ * @returns {Function} A function to schedule a callback asynchronously.
1399
+ */
1250
1400
  var _setImmediate = function (setImmediateSupported, postMessageSupported) {
1251
1401
  if (setImmediateSupported) {
1252
1402
  return setImmediate;
1253
1403
  }
1254
1404
  return postMessageSupported ? function (token, callbacks) {
1255
- _global.addEventListener("message", function (_ref5) {
1405
+ _global.addEventListener('message', function (_ref5) {
1256
1406
  var source = _ref5.source,
1257
1407
  data = _ref5.data;
1258
1408
  if (source === _global && data === token) {
@@ -1261,19 +1411,41 @@
1261
1411
  }, false);
1262
1412
  return function (cb) {
1263
1413
  callbacks.push(cb);
1264
- _global.postMessage(token, "*");
1414
+ _global.postMessage(token, '*');
1265
1415
  };
1266
1416
  }("axios@".concat(Math.random()), []) : function (cb) {
1267
1417
  return setTimeout(cb);
1268
1418
  };
1269
- }(typeof setImmediate === "function", isFunction$1(_global.postMessage));
1270
- var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
1419
+ }(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
1420
+
1421
+ /**
1422
+ * Schedules a microtask or asynchronous callback as soon as possible.
1423
+ * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
1424
+ *
1425
+ * @type {Function}
1426
+ */
1427
+ var asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate;
1271
1428
 
1272
1429
  // *********************
1273
1430
 
1274
1431
  var isIterable = function isIterable(thing) {
1275
1432
  return thing != null && isFunction$1(thing[iterator]);
1276
1433
  };
1434
+
1435
+ /**
1436
+ * Determine if a value is iterable via an iterator that is NOT sourced solely
1437
+ * from a polluted Object.prototype. Use this instead of `isIterable` whenever
1438
+ * the iterable comes from untrusted input (e.g. user-supplied header sources),
1439
+ * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object
1440
+ * into an attacker-controlled entries iterator.
1441
+ *
1442
+ * @param {*} thing The value to test
1443
+ *
1444
+ * @returns {boolean} True if value has a non-polluted iterator
1445
+ */
1446
+ var isSafeIterable = function isSafeIterable(thing) {
1447
+ return thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
1448
+ };
1277
1449
  var utils$1 = {
1278
1450
  isArray: isArray,
1279
1451
  isArrayBuffer: isArrayBuffer,
@@ -1293,6 +1465,8 @@
1293
1465
  isUndefined: isUndefined,
1294
1466
  isDate: isDate,
1295
1467
  isFile: isFile,
1468
+ isReactNativeBlob: isReactNativeBlob,
1469
+ isReactNative: isReactNative,
1296
1470
  isBlob: isBlob,
1297
1471
  isRegExp: isRegExp,
1298
1472
  isFunction: isFunction$1,
@@ -1317,6 +1491,8 @@
1317
1491
  hasOwnProperty: hasOwnProperty,
1318
1492
  hasOwnProp: hasOwnProperty,
1319
1493
  // an alias to avoid ESLint no-prototype-builtins detection
1494
+ hasOwnInPrototypeChain: hasOwnInPrototypeChain,
1495
+ getSafeProp: getSafeProp,
1320
1496
  reduceDescriptors: reduceDescriptors,
1321
1497
  freezeMethods: freezeMethods,
1322
1498
  toObjectSet: toObjectSet,
@@ -1332,1057 +1508,1276 @@
1332
1508
  isThenable: isThenable,
1333
1509
  setImmediate: _setImmediate,
1334
1510
  asap: asap,
1335
- isIterable: isIterable
1511
+ isIterable: isIterable,
1512
+ isSafeIterable: isSafeIterable
1336
1513
  };
1337
1514
 
1338
- var AxiosError = /*#__PURE__*/function (_Error) {
1339
- /**
1340
- * Create an Error with the specified message, config, error code, request and response.
1341
- *
1342
- * @param {string} message The error message.
1343
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
1344
- * @param {Object} [config] The config.
1345
- * @param {Object} [request] The request.
1346
- * @param {Object} [response] The response.
1347
- *
1348
- * @returns {Error} The created error.
1349
- */
1350
- function AxiosError(message, code, config, request, response) {
1351
- var _this;
1352
- _classCallCheck(this, AxiosError);
1353
- _this = _callSuper(this, AxiosError, [message]);
1354
- _this.name = 'AxiosError';
1355
- _this.isAxiosError = true;
1356
- code && (_this.code = code);
1357
- config && (_this.config = config);
1358
- request && (_this.request = request);
1359
- if (response) {
1360
- _this.response = response;
1361
- _this.status = response.status;
1362
- }
1363
- return _this;
1364
- }
1365
- _inherits(AxiosError, _Error);
1366
- return _createClass(AxiosError, [{
1367
- key: "toJSON",
1368
- value: function toJSON() {
1369
- return {
1370
- // Standard
1371
- message: this.message,
1372
- name: this.name,
1373
- // Microsoft
1374
- description: this.description,
1375
- number: this.number,
1376
- // Mozilla
1377
- fileName: this.fileName,
1378
- lineNumber: this.lineNumber,
1379
- columnNumber: this.columnNumber,
1380
- stack: this.stack,
1381
- // Axios
1382
- config: utils$1.toJSONObject(this.config),
1383
- code: this.code,
1384
- status: this.status
1385
- };
1386
- }
1387
- }], [{
1388
- key: "from",
1389
- value: function from(error, code, config, request, response, customProps) {
1390
- var axiosError = new AxiosError(error.message, code || error.code, config, request, response);
1391
- axiosError.cause = error;
1392
- axiosError.name = error.name;
1393
- customProps && Object.assign(axiosError, customProps);
1394
- return axiosError;
1395
- }
1396
- }]);
1397
- }(/*#__PURE__*/_wrapNativeSuper(Error)); // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
1398
- AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
1399
- AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
1400
- AxiosError.ECONNABORTED = 'ECONNABORTED';
1401
- AxiosError.ETIMEDOUT = 'ETIMEDOUT';
1402
- AxiosError.ERR_NETWORK = 'ERR_NETWORK';
1403
- AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
1404
- AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
1405
- AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
1406
- AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
1407
- AxiosError.ERR_CANCELED = 'ERR_CANCELED';
1408
- AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
1409
- AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
1410
- var AxiosError$1 = AxiosError;
1411
-
1412
- // eslint-disable-next-line strict
1413
- var httpAdapter = null;
1515
+ // RawAxiosHeaders whose duplicates are ignored by node
1516
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
1517
+ var ignoreDuplicateOf = utils$1.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']);
1414
1518
 
1415
1519
  /**
1416
- * Determines if the given thing is a array or js object.
1417
- *
1418
- * @param {string} thing - The object or array to be visited.
1520
+ * Parse headers into an object
1419
1521
  *
1420
- * @returns {boolean}
1421
- */
1422
- function isVisitable(thing) {
1423
- return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
1424
- }
1425
-
1426
- /**
1427
- * It removes the brackets from the end of a string
1522
+ * ```
1523
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
1524
+ * Content-Type: application/json
1525
+ * Connection: keep-alive
1526
+ * Transfer-Encoding: chunked
1527
+ * ```
1428
1528
  *
1429
- * @param {string} key - The key of the parameter.
1529
+ * @param {String} rawHeaders Headers needing to be parsed
1430
1530
  *
1431
- * @returns {string} the key without the brackets.
1531
+ * @returns {Object} Headers parsed into an object
1432
1532
  */
1433
- function removeBrackets(key) {
1434
- return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
1435
- }
1533
+ var parseHeaders = (function (rawHeaders) {
1534
+ var parsed = {};
1535
+ var key;
1536
+ var val;
1537
+ var i;
1538
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
1539
+ i = line.indexOf(':');
1540
+ key = line.substring(0, i).trim().toLowerCase();
1541
+ val = line.substring(i + 1).trim();
1542
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
1543
+ return;
1544
+ }
1545
+ if (key === 'set-cookie') {
1546
+ if (parsed[key]) {
1547
+ parsed[key].push(val);
1548
+ } else {
1549
+ parsed[key] = [val];
1550
+ }
1551
+ } else {
1552
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1553
+ }
1554
+ });
1555
+ return parsed;
1556
+ });
1436
1557
 
1437
- /**
1438
- * It takes a path, a key, and a boolean, and returns a string
1439
- *
1440
- * @param {string} path - The path to the current key.
1441
- * @param {string} key - The key of the current object being iterated over.
1442
- * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
1443
- *
1444
- * @returns {string} The path to the current key.
1445
- */
1446
- function renderKey(path, key, dots) {
1447
- if (!path) return key;
1448
- return path.concat(key).map(function each(token, i) {
1449
- // eslint-disable-next-line no-param-reassign
1450
- token = removeBrackets(token);
1451
- return !dots && i ? '[' + token + ']' : token;
1452
- }).join(dots ? '.' : '');
1558
+ function trimSPorHTAB(str) {
1559
+ var start = 0;
1560
+ var end = str.length;
1561
+ while (start < end) {
1562
+ var code = str.charCodeAt(start);
1563
+ if (code !== 0x09 && code !== 0x20) {
1564
+ break;
1565
+ }
1566
+ start += 1;
1567
+ }
1568
+ while (end > start) {
1569
+ var _code = str.charCodeAt(end - 1);
1570
+ if (_code !== 0x09 && _code !== 0x20) {
1571
+ break;
1572
+ }
1573
+ end -= 1;
1574
+ }
1575
+ return start === 0 && end === str.length ? str : str.slice(start, end);
1453
1576
  }
1454
1577
 
1455
- /**
1456
- * If the array is an array and none of its elements are visitable, then it's a flat array.
1457
- *
1458
- * @param {Array<any>} arr - The array to check
1459
- *
1460
- * @returns {boolean}
1461
- */
1462
- function isFlatArray(arr) {
1463
- return utils$1.isArray(arr) && !arr.some(isVisitable);
1578
+ // The control-code ranges are intentional: header sanitization strips C0/DEL bytes.
1579
+ // eslint-disable-next-line no-control-regex
1580
+ var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", 'g');
1581
+ // eslint-disable-next-line no-control-regex
1582
+ var INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", 'g');
1583
+ function sanitizeValue(value, invalidChars) {
1584
+ if (utils$1.isArray(value)) {
1585
+ return value.map(function (item) {
1586
+ return sanitizeValue(item, invalidChars);
1587
+ });
1588
+ }
1589
+ return trimSPorHTAB(String(value).replace(invalidChars, ''));
1590
+ }
1591
+ var sanitizeHeaderValue = function sanitizeHeaderValue(value) {
1592
+ return sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
1593
+ };
1594
+ var sanitizeByteStringHeaderValue = function sanitizeByteStringHeaderValue(value) {
1595
+ return sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
1596
+ };
1597
+ function toByteStringHeaderObject(headers) {
1598
+ var byteStringHeaders = Object.create(null);
1599
+ utils$1.forEach(headers.toJSON(), function (value, header) {
1600
+ byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
1601
+ });
1602
+ return byteStringHeaders;
1464
1603
  }
1465
- var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
1466
- return /^is[A-Z]/.test(prop);
1467
- });
1468
-
1469
- /**
1470
- * Convert a data object to FormData
1471
- *
1472
- * @param {Object} obj
1473
- * @param {?Object} [formData]
1474
- * @param {?Object} [options]
1475
- * @param {Function} [options.visitor]
1476
- * @param {Boolean} [options.metaTokens = true]
1477
- * @param {Boolean} [options.dots = false]
1478
- * @param {?Boolean} [options.indexes = false]
1479
- *
1480
- * @returns {Object}
1481
- **/
1482
1604
 
1483
- /**
1484
- * It converts an object into a FormData object
1485
- *
1486
- * @param {Object<any, any>} obj - The object to convert to form data.
1487
- * @param {string} formData - The FormData object to append to.
1488
- * @param {Object<string, any>} options
1489
- *
1490
- * @returns
1491
- */
1492
- function toFormData(obj, formData, options) {
1493
- if (!utils$1.isObject(obj)) {
1494
- throw new TypeError('target must be an object');
1605
+ var $internals = Symbol('internals');
1606
+ function normalizeHeader(header) {
1607
+ return header && String(header).trim().toLowerCase();
1608
+ }
1609
+ function normalizeValue(value) {
1610
+ if (value === false || value == null) {
1611
+ return value;
1495
1612
  }
1496
-
1497
- // eslint-disable-next-line no-param-reassign
1498
- formData = formData || new (FormData)();
1499
-
1500
- // eslint-disable-next-line no-param-reassign
1501
- options = utils$1.toFlatObject(options, {
1502
- metaTokens: true,
1503
- dots: false,
1504
- indexes: false
1505
- }, false, function defined(option, source) {
1506
- // eslint-disable-next-line no-eq-null,eqeqeq
1507
- return !utils$1.isUndefined(source[option]);
1613
+ return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
1614
+ }
1615
+ function parseTokens(str) {
1616
+ var tokens = Object.create(null);
1617
+ var tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1618
+ var match;
1619
+ while (match = tokensRE.exec(str)) {
1620
+ tokens[match[1]] = match[2];
1621
+ }
1622
+ return tokens;
1623
+ }
1624
+ var isValidHeaderName = function isValidHeaderName(str) {
1625
+ return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1626
+ };
1627
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1628
+ if (utils$1.isFunction(filter)) {
1629
+ return filter.call(this, value, header);
1630
+ }
1631
+ if (isHeaderNameFilter) {
1632
+ value = header;
1633
+ }
1634
+ if (!utils$1.isString(value)) return;
1635
+ if (utils$1.isString(filter)) {
1636
+ return value.indexOf(filter) !== -1;
1637
+ }
1638
+ if (utils$1.isRegExp(filter)) {
1639
+ return filter.test(value);
1640
+ }
1641
+ }
1642
+ function formatHeader(header) {
1643
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (w, _char, str) {
1644
+ return _char.toUpperCase() + str;
1508
1645
  });
1509
- var metaTokens = options.metaTokens;
1510
- // eslint-disable-next-line no-use-before-define
1511
- var visitor = options.visitor || defaultVisitor;
1512
- var dots = options.dots;
1513
- var indexes = options.indexes;
1514
- var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
1515
- var useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
1516
- if (!utils$1.isFunction(visitor)) {
1517
- throw new TypeError('visitor must be a function');
1646
+ }
1647
+ function buildAccessors(obj, header) {
1648
+ var accessorName = utils$1.toCamelCase(' ' + header);
1649
+ ['get', 'set', 'has'].forEach(function (methodName) {
1650
+ Object.defineProperty(obj, methodName + accessorName, {
1651
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
1652
+ // this data descriptor into an accessor descriptor on the way in.
1653
+ __proto__: null,
1654
+ value: function value(arg1, arg2, arg3) {
1655
+ return this[methodName].call(this, header, arg1, arg2, arg3);
1656
+ },
1657
+ configurable: true
1658
+ });
1659
+ });
1660
+ }
1661
+ var AxiosHeaders = /*#__PURE__*/function () {
1662
+ function AxiosHeaders(headers) {
1663
+ _classCallCheck(this, AxiosHeaders);
1664
+ headers && this.set(headers);
1518
1665
  }
1519
- function convertValue(value) {
1520
- if (value === null) return '';
1521
- if (utils$1.isDate(value)) {
1522
- return value.toISOString();
1666
+ return _createClass(AxiosHeaders, [{
1667
+ key: "set",
1668
+ value: function set(header, valueOrRewrite, rewrite) {
1669
+ var self = this;
1670
+ function setHeader(_value, _header, _rewrite) {
1671
+ var lHeader = normalizeHeader(_header);
1672
+ if (!lHeader) {
1673
+ return;
1674
+ }
1675
+ var key = utils$1.findKey(self, lHeader);
1676
+ if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
1677
+ self[key || _header] = normalizeValue(_value);
1678
+ }
1679
+ }
1680
+ var setHeaders = function setHeaders(headers, _rewrite) {
1681
+ return utils$1.forEach(headers, function (_value, _header) {
1682
+ return setHeader(_value, _header, _rewrite);
1683
+ });
1684
+ };
1685
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
1686
+ setHeaders(header, valueOrRewrite);
1687
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1688
+ setHeaders(parseHeaders(header), valueOrRewrite);
1689
+ } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) {
1690
+ var obj = Object.create(null),
1691
+ dest,
1692
+ key;
1693
+ var _iterator = _createForOfIteratorHelper(header),
1694
+ _step;
1695
+ try {
1696
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1697
+ var entry = _step.value;
1698
+ if (!utils$1.isArray(entry)) {
1699
+ throw new TypeError('Object iterator must return a key-value pair');
1700
+ }
1701
+ key = entry[0];
1702
+ if (utils$1.hasOwnProp(obj, key)) {
1703
+ dest = obj[key];
1704
+ obj[key] = utils$1.isArray(dest) ? [].concat(_toConsumableArray(dest), [entry[1]]) : [dest, entry[1]];
1705
+ } else {
1706
+ obj[key] = entry[1];
1707
+ }
1708
+ }
1709
+ } catch (err) {
1710
+ _iterator.e(err);
1711
+ } finally {
1712
+ _iterator.f();
1713
+ }
1714
+ setHeaders(obj, valueOrRewrite);
1715
+ } else {
1716
+ header != null && setHeader(valueOrRewrite, header, rewrite);
1717
+ }
1718
+ return this;
1523
1719
  }
1524
- if (utils$1.isBoolean(value)) {
1525
- return value.toString();
1720
+ }, {
1721
+ key: "get",
1722
+ value: function get(header, parser) {
1723
+ header = normalizeHeader(header);
1724
+ if (header) {
1725
+ var key = utils$1.findKey(this, header);
1726
+ if (key) {
1727
+ var value = this[key];
1728
+ if (!parser) {
1729
+ return value;
1730
+ }
1731
+ if (parser === true) {
1732
+ return parseTokens(value);
1733
+ }
1734
+ if (utils$1.isFunction(parser)) {
1735
+ return parser.call(this, value, key);
1736
+ }
1737
+ if (utils$1.isRegExp(parser)) {
1738
+ return parser.exec(value);
1739
+ }
1740
+ throw new TypeError('parser must be boolean|regexp|function');
1741
+ }
1742
+ }
1526
1743
  }
1527
- if (!useBlob && utils$1.isBlob(value)) {
1528
- throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
1744
+ }, {
1745
+ key: "has",
1746
+ value: function has(header, matcher) {
1747
+ header = normalizeHeader(header);
1748
+ if (header) {
1749
+ var key = utils$1.findKey(this, header);
1750
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1751
+ }
1752
+ return false;
1529
1753
  }
1530
- if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
1531
- return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1754
+ }, {
1755
+ key: "delete",
1756
+ value: function _delete(header, matcher) {
1757
+ var self = this;
1758
+ var deleted = false;
1759
+ function deleteHeader(_header) {
1760
+ _header = normalizeHeader(_header);
1761
+ if (_header) {
1762
+ var key = utils$1.findKey(self, _header);
1763
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
1764
+ delete self[key];
1765
+ deleted = true;
1766
+ }
1767
+ }
1768
+ }
1769
+ if (utils$1.isArray(header)) {
1770
+ header.forEach(deleteHeader);
1771
+ } else {
1772
+ deleteHeader(header);
1773
+ }
1774
+ return deleted;
1532
1775
  }
1533
- return value;
1534
- }
1535
-
1536
- /**
1537
- * Default visitor.
1538
- *
1539
- * @param {*} value
1540
- * @param {String|Number} key
1541
- * @param {Array<String|Number>} path
1542
- * @this {FormData}
1543
- *
1544
- * @returns {boolean} return true to visit the each prop of the value recursively
1545
- */
1546
- function defaultVisitor(value, key, path) {
1547
- var arr = value;
1548
- if (value && !path && _typeof(value) === 'object') {
1549
- if (utils$1.endsWith(key, '{}')) {
1550
- // eslint-disable-next-line no-param-reassign
1551
- key = metaTokens ? key : key.slice(0, -2);
1552
- // eslint-disable-next-line no-param-reassign
1553
- value = JSON.stringify(value);
1554
- } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) {
1555
- // eslint-disable-next-line no-param-reassign
1556
- key = removeBrackets(key);
1557
- arr.forEach(function each(el, index) {
1558
- !(utils$1.isUndefined(el) || el === null) && formData.append(
1559
- // eslint-disable-next-line no-nested-ternary
1560
- indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el));
1561
- });
1562
- return false;
1776
+ }, {
1777
+ key: "clear",
1778
+ value: function clear(matcher) {
1779
+ var keys = Object.keys(this);
1780
+ var i = keys.length;
1781
+ var deleted = false;
1782
+ while (i--) {
1783
+ var key = keys[i];
1784
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1785
+ delete this[key];
1786
+ deleted = true;
1787
+ }
1563
1788
  }
1789
+ return deleted;
1564
1790
  }
1565
- if (isVisitable(value)) {
1566
- return true;
1791
+ }, {
1792
+ key: "normalize",
1793
+ value: function normalize(format) {
1794
+ var self = this;
1795
+ var headers = {};
1796
+ utils$1.forEach(this, function (value, header) {
1797
+ var key = utils$1.findKey(headers, header);
1798
+ if (key) {
1799
+ self[key] = normalizeValue(value);
1800
+ delete self[header];
1801
+ return;
1802
+ }
1803
+ var normalized = format ? formatHeader(header) : String(header).trim();
1804
+ if (normalized !== header) {
1805
+ delete self[header];
1806
+ }
1807
+ self[normalized] = normalizeValue(value);
1808
+ headers[normalized] = true;
1809
+ });
1810
+ return this;
1567
1811
  }
1568
- formData.append(renderKey(path, key, dots), convertValue(value));
1569
- return false;
1570
- }
1571
- var stack = [];
1572
- var exposedHelpers = Object.assign(predicates, {
1573
- defaultVisitor: defaultVisitor,
1574
- convertValue: convertValue,
1575
- isVisitable: isVisitable
1576
- });
1577
- function build(value, path) {
1578
- if (utils$1.isUndefined(value)) return;
1579
- if (stack.indexOf(value) !== -1) {
1580
- throw Error('Circular reference detected in ' + path.join('.'));
1812
+ }, {
1813
+ key: "concat",
1814
+ value: function concat() {
1815
+ var _this$constructor;
1816
+ for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) {
1817
+ targets[_key] = arguments[_key];
1818
+ }
1819
+ return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(targets));
1820
+ }
1821
+ }, {
1822
+ key: "toJSON",
1823
+ value: function toJSON(asStrings) {
1824
+ var obj = Object.create(null);
1825
+ utils$1.forEach(this, function (value, header) {
1826
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
1827
+ });
1828
+ return obj;
1829
+ }
1830
+ }, {
1831
+ key: Symbol.iterator,
1832
+ value: function value() {
1833
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1834
+ }
1835
+ }, {
1836
+ key: "toString",
1837
+ value: function toString() {
1838
+ return Object.entries(this.toJSON()).map(function (_ref) {
1839
+ var _ref2 = _slicedToArray(_ref, 2),
1840
+ header = _ref2[0],
1841
+ value = _ref2[1];
1842
+ return header + ': ' + value;
1843
+ }).join('\n');
1844
+ }
1845
+ }, {
1846
+ key: "getSetCookie",
1847
+ value: function getSetCookie() {
1848
+ return this.get('set-cookie') || [];
1849
+ }
1850
+ }, {
1851
+ key: Symbol.toStringTag,
1852
+ get: function get() {
1853
+ return 'AxiosHeaders';
1854
+ }
1855
+ }], [{
1856
+ key: "from",
1857
+ value: function from(thing) {
1858
+ return thing instanceof this ? thing : new this(thing);
1859
+ }
1860
+ }, {
1861
+ key: "concat",
1862
+ value: function concat(first) {
1863
+ var computed = new this(first);
1864
+ for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1865
+ targets[_key2 - 1] = arguments[_key2];
1866
+ }
1867
+ targets.forEach(function (target) {
1868
+ return computed.set(target);
1869
+ });
1870
+ return computed;
1581
1871
  }
1582
- stack.push(value);
1583
- utils$1.forEach(value, function each(el, key) {
1584
- var result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
1585
- if (result === true) {
1586
- build(el, path ? path.concat(key) : [key]);
1872
+ }, {
1873
+ key: "accessor",
1874
+ value: function accessor(header) {
1875
+ var internals = this[$internals] = this[$internals] = {
1876
+ accessors: {}
1877
+ };
1878
+ var accessors = internals.accessors;
1879
+ var prototype = this.prototype;
1880
+ function defineAccessor(_header) {
1881
+ var lHeader = normalizeHeader(_header);
1882
+ if (!accessors[lHeader]) {
1883
+ buildAccessors(prototype, _header);
1884
+ accessors[lHeader] = true;
1885
+ }
1587
1886
  }
1588
- });
1589
- stack.pop();
1590
- }
1591
- if (!utils$1.isObject(obj)) {
1592
- throw new TypeError('data must be an object');
1593
- }
1594
- build(obj);
1595
- return formData;
1596
- }
1887
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1888
+ return this;
1889
+ }
1890
+ }]);
1891
+ }();
1892
+ AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
1597
1893
 
1598
- /**
1599
- * It encodes a string by replacing all characters that are not in the unreserved set with
1600
- * their percent-encoded equivalents
1601
- *
1602
- * @param {string} str - The string to encode.
1603
- *
1604
- * @returns {string} The encoded string.
1605
- */
1606
- function encode$1(str) {
1607
- var charMap = {
1608
- '!': '%21',
1609
- "'": '%27',
1610
- '(': '%28',
1611
- ')': '%29',
1612
- '~': '%7E',
1613
- '%20': '+',
1614
- '%00': '\x00'
1894
+ // reserved names hotfix
1895
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
1896
+ var value = _ref3.value;
1897
+ var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
1898
+ return {
1899
+ get: function get() {
1900
+ return value;
1901
+ },
1902
+ set: function set(headerValue) {
1903
+ this[mapped] = headerValue;
1904
+ }
1615
1905
  };
1616
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
1617
- return charMap[match];
1618
- });
1619
- }
1620
-
1621
- /**
1622
- * It takes a params object and converts it to a FormData object
1623
- *
1624
- * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
1625
- * @param {Object<string, any>} options - The options object passed to the Axios constructor.
1626
- *
1627
- * @returns {void}
1628
- */
1629
- function AxiosURLSearchParams(params, options) {
1630
- this._pairs = [];
1631
- params && toFormData(params, this, options);
1632
- }
1633
- var prototype = AxiosURLSearchParams.prototype;
1634
- prototype.append = function append(name, value) {
1635
- this._pairs.push([name, value]);
1636
- };
1637
- prototype.toString = function toString(encoder) {
1638
- var _encode = encoder ? function (value) {
1639
- return encoder.call(this, value, encode$1);
1640
- } : encode$1;
1641
- return this._pairs.map(function each(pair) {
1642
- return _encode(pair[0]) + '=' + _encode(pair[1]);
1643
- }, '').join('&');
1644
- };
1645
-
1646
- /**
1647
- * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
1648
- * URI encoded counterparts
1649
- *
1650
- * @param {string} val The value to be encoded.
1651
- *
1652
- * @returns {string} The encoded value.
1653
- */
1654
- function encode(val) {
1655
- return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+');
1656
- }
1906
+ });
1907
+ utils$1.freezeMethods(AxiosHeaders);
1657
1908
 
1658
- /**
1659
- * Build a URL by appending params to the end
1660
- *
1661
- * @param {string} url The base of the url (e.g., http://www.google.com)
1662
- * @param {object} [params] The params to be appended
1663
- * @param {?(object|Function)} options
1664
- *
1665
- * @returns {string} The formatted url
1666
- */
1667
- function buildURL(url, params, options) {
1668
- if (!params) {
1669
- return url;
1670
- }
1671
- var _encode = options && options.encode || encode;
1672
- var _options = utils$1.isFunction(options) ? {
1673
- serialize: options
1674
- } : options;
1675
- var serializeFn = _options && _options.serialize;
1676
- var serializedParams;
1677
- if (serializeFn) {
1678
- serializedParams = serializeFn(params, _options);
1679
- } else {
1680
- serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
1909
+ var REDACTED = '[REDACTED ****]';
1910
+ function hasOwnOrPrototypeToJSON(source) {
1911
+ if (utils$1.hasOwnProp(source, 'toJSON')) {
1912
+ return true;
1681
1913
  }
1682
- if (serializedParams) {
1683
- var hashmarkIndex = url.indexOf("#");
1684
- if (hashmarkIndex !== -1) {
1685
- url = url.slice(0, hashmarkIndex);
1914
+ var prototype = Object.getPrototypeOf(source);
1915
+ while (prototype && prototype !== Object.prototype) {
1916
+ if (utils$1.hasOwnProp(prototype, 'toJSON')) {
1917
+ return true;
1686
1918
  }
1687
- url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1919
+ prototype = Object.getPrototypeOf(prototype);
1688
1920
  }
1689
- return url;
1921
+ return false;
1690
1922
  }
1691
1923
 
1692
- var InterceptorManager = /*#__PURE__*/function () {
1693
- function InterceptorManager() {
1694
- _classCallCheck(this, InterceptorManager);
1695
- this.handlers = [];
1696
- }
1697
-
1924
+ // Build a plain-object snapshot of `config` and replace the value of any key
1925
+ // (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays
1926
+ // and AxiosHeaders, and short-circuits on circular references.
1927
+ function redactConfig(config, redactKeys) {
1928
+ var lowerKeys = new Set(redactKeys.map(function (k) {
1929
+ return String(k).toLowerCase();
1930
+ }));
1931
+ var seen = [];
1932
+ var _visit = function visit(source) {
1933
+ if (source === null || _typeof(source) !== 'object') return source;
1934
+ if (utils$1.isBuffer(source)) return source;
1935
+ if (seen.indexOf(source) !== -1) return undefined;
1936
+ if (source instanceof AxiosHeaders) {
1937
+ source = source.toJSON();
1938
+ }
1939
+ seen.push(source);
1940
+ var result;
1941
+ if (utils$1.isArray(source)) {
1942
+ result = [];
1943
+ source.forEach(function (v, i) {
1944
+ var reducedValue = _visit(v);
1945
+ if (!utils$1.isUndefined(reducedValue)) {
1946
+ result[i] = reducedValue;
1947
+ }
1948
+ });
1949
+ } else {
1950
+ if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
1951
+ seen.pop();
1952
+ return source;
1953
+ }
1954
+ result = Object.create(null);
1955
+ for (var _i = 0, _Object$entries = Object.entries(source); _i < _Object$entries.length; _i++) {
1956
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
1957
+ key = _Object$entries$_i[0],
1958
+ value = _Object$entries$_i[1];
1959
+ var reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : _visit(value);
1960
+ if (!utils$1.isUndefined(reducedValue)) {
1961
+ result[key] = reducedValue;
1962
+ }
1963
+ }
1964
+ }
1965
+ seen.pop();
1966
+ return result;
1967
+ };
1968
+ return _visit(config);
1969
+ }
1970
+ var AxiosError = /*#__PURE__*/function (_Error) {
1698
1971
  /**
1699
- * Add a new interceptor to the stack
1972
+ * Create an Error with the specified message, config, error code, request and response.
1700
1973
  *
1701
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
1702
- * @param {Function} rejected The function to handle `reject` for a `Promise`
1703
- * @param {Object} options The options for the interceptor, synchronous and runWhen
1974
+ * @param {string} message The error message.
1975
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
1976
+ * @param {Object} [config] The config.
1977
+ * @param {Object} [request] The request.
1978
+ * @param {Object} [response] The response.
1704
1979
  *
1705
- * @return {Number} An ID used to remove interceptor later
1980
+ * @returns {Error} The created error.
1706
1981
  */
1707
- return _createClass(InterceptorManager, [{
1708
- key: "use",
1709
- value: function use(fulfilled, rejected, options) {
1710
- this.handlers.push({
1711
- fulfilled: fulfilled,
1712
- rejected: rejected,
1713
- synchronous: options ? options.synchronous : false,
1714
- runWhen: options ? options.runWhen : null
1715
- });
1716
- return this.handlers.length - 1;
1717
- }
1718
-
1719
- /**
1720
- * Remove an interceptor from the stack
1721
- *
1722
- * @param {Number} id The ID that was returned by `use`
1723
- *
1724
- * @returns {void}
1725
- */
1726
- }, {
1727
- key: "eject",
1728
- value: function eject(id) {
1729
- if (this.handlers[id]) {
1730
- this.handlers[id] = null;
1731
- }
1732
- }
1982
+ function AxiosError(message, code, config, request, response) {
1983
+ var _this;
1984
+ _classCallCheck(this, AxiosError);
1985
+ _this = _callSuper(this, AxiosError, [message]);
1733
1986
 
1734
- /**
1735
- * Clear all interceptors from the stack
1736
- *
1737
- * @returns {void}
1738
- */
1739
- }, {
1740
- key: "clear",
1741
- value: function clear() {
1742
- if (this.handlers) {
1743
- this.handlers = [];
1744
- }
1987
+ // Make message enumerable to maintain backward compatibility
1988
+ // The native Error constructor sets message as non-enumerable,
1989
+ // but axios < v1.13.3 had it as enumerable
1990
+ Object.defineProperty(_this, 'message', {
1991
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
1992
+ // this data descriptor into an accessor descriptor on the way in.
1993
+ __proto__: null,
1994
+ value: message,
1995
+ enumerable: true,
1996
+ writable: true,
1997
+ configurable: true
1998
+ });
1999
+ _this.name = 'AxiosError';
2000
+ _this.isAxiosError = true;
2001
+ code && (_this.code = code);
2002
+ config && (_this.config = config);
2003
+ request && (_this.request = request);
2004
+ if (response) {
2005
+ _this.response = response;
2006
+ _this.status = response.status;
1745
2007
  }
1746
-
1747
- /**
1748
- * Iterate over all the registered interceptors
1749
- *
1750
- * This method is particularly useful for skipping over any
1751
- * interceptors that may have become `null` calling `eject`.
1752
- *
1753
- * @param {Function} fn The function to call for each interceptor
1754
- *
1755
- * @returns {void}
1756
- */
1757
- }, {
1758
- key: "forEach",
1759
- value: function forEach(fn) {
1760
- utils$1.forEach(this.handlers, function forEachHandler(h) {
1761
- if (h !== null) {
1762
- fn(h);
1763
- }
2008
+ return _this;
2009
+ }
2010
+ _inherits(AxiosError, _Error);
2011
+ return _createClass(AxiosError, [{
2012
+ key: "toJSON",
2013
+ value: function toJSON() {
2014
+ // Opt-in redaction: when the request config carries a `redact` array, the
2015
+ // value of any matching key (case-insensitive, at any depth) is replaced
2016
+ // with REDACTED in the serialized snapshot. Undefined or empty leaves the
2017
+ // existing serialization behavior unchanged.
2018
+ var config = this.config;
2019
+ var redactKeys = config && utils$1.hasOwnProp(config, 'redact') ? config.redact : undefined;
2020
+ var serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config);
2021
+ return {
2022
+ // Standard
2023
+ message: this.message,
2024
+ name: this.name,
2025
+ // Microsoft
2026
+ description: this.description,
2027
+ number: this.number,
2028
+ // Mozilla
2029
+ fileName: this.fileName,
2030
+ lineNumber: this.lineNumber,
2031
+ columnNumber: this.columnNumber,
2032
+ stack: this.stack,
2033
+ // Axios
2034
+ config: serializedConfig,
2035
+ code: this.code,
2036
+ status: this.status
2037
+ };
2038
+ }
2039
+ }], [{
2040
+ key: "from",
2041
+ value: function from(error, code, config, request, response, customProps) {
2042
+ var axiosError = new AxiosError(error.message, code || error.code, config, request, response);
2043
+ // Match native `Error` `cause` semantics: non-enumerable. The wrapped
2044
+ // error often carries circular internals (sockets, requests, agents), so
2045
+ // an enumerable `cause` makes structured loggers (pino/winston) and any
2046
+ // own-property walk throw "Converting circular structure to JSON".
2047
+ // Regression from #6982; see #7205. `__proto__: null` mirrors the
2048
+ // `message` descriptor below (prototype-pollution-safe descriptor).
2049
+ Object.defineProperty(axiosError, 'cause', {
2050
+ __proto__: null,
2051
+ value: error,
2052
+ writable: true,
2053
+ enumerable: false,
2054
+ configurable: true
1764
2055
  });
2056
+ axiosError.name = error.name;
2057
+
2058
+ // Preserve status from the original error if not already set from response
2059
+ if (error.status != null && axiosError.status == null) {
2060
+ axiosError.status = error.status;
2061
+ }
2062
+ customProps && Object.assign(axiosError, customProps);
2063
+ return axiosError;
1765
2064
  }
1766
2065
  }]);
1767
- }();
1768
- var InterceptorManager$1 = InterceptorManager;
1769
-
1770
- var transitionalDefaults = {
1771
- silentJSONParsing: true,
1772
- forcedJSONParsing: true,
1773
- clarifyTimeoutError: false,
1774
- legacyInterceptorReqResOrdering: true
1775
- };
1776
-
1777
- var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
1778
-
1779
- var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1780
-
1781
- var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
2066
+ }(/*#__PURE__*/_wrapNativeSuper(Error)); // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
2067
+ AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
2068
+ AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
2069
+ AxiosError.ECONNABORTED = 'ECONNABORTED';
2070
+ AxiosError.ETIMEDOUT = 'ETIMEDOUT';
2071
+ AxiosError.ECONNREFUSED = 'ECONNREFUSED';
2072
+ AxiosError.ERR_NETWORK = 'ERR_NETWORK';
2073
+ AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
2074
+ AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
2075
+ AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
2076
+ AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
2077
+ AxiosError.ERR_CANCELED = 'ERR_CANCELED';
2078
+ AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
2079
+ AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
2080
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
1782
2081
 
1783
- var platform$1 = {
1784
- isBrowser: true,
1785
- classes: {
1786
- URLSearchParams: URLSearchParams$1,
1787
- FormData: FormData$1,
1788
- Blob: Blob$1
1789
- },
1790
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1791
- };
2082
+ // eslint-disable-next-line strict
2083
+ var httpAdapter = null;
1792
2084
 
1793
- var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
1794
- var _navigator = (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && navigator || undefined;
2085
+ // Default nesting limit shared with the inverse transform (formDataToJSON) so
2086
+ // the FormData <-> JSON round-trip stays symmetric.
2087
+ var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
1795
2088
 
1796
2089
  /**
1797
- * Determine if we're running in a standard browser environment
1798
- *
1799
- * This allows axios to run in a web worker, and react-native.
1800
- * Both environments support XMLHttpRequest, but not fully standard globals.
1801
- *
1802
- * web workers:
1803
- * typeof window -> undefined
1804
- * typeof document -> undefined
2090
+ * Determines if the given thing is a array or js object.
1805
2091
  *
1806
- * react-native:
1807
- * navigator.product -> 'ReactNative'
1808
- * nativescript
1809
- * navigator.product -> 'NativeScript' or 'NS'
2092
+ * @param {string} thing - The object or array to be visited.
1810
2093
  *
1811
2094
  * @returns {boolean}
1812
2095
  */
1813
- var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
2096
+ function isVisitable(thing) {
2097
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
2098
+ }
1814
2099
 
1815
2100
  /**
1816
- * Determine if we're running in a standard browser webWorker environment
2101
+ * It removes the brackets from the end of a string
1817
2102
  *
1818
- * Although the `isStandardBrowserEnv` method indicates that
1819
- * `allows axios to run in a web worker`, the WebWorker will still be
1820
- * filtered out due to its judgment standard
1821
- * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1822
- * This leads to a problem when axios post `FormData` in webWorker
2103
+ * @param {string} key - The key of the parameter.
2104
+ *
2105
+ * @returns {string} the key without the brackets.
1823
2106
  */
1824
- var hasStandardBrowserWebWorkerEnv = function () {
1825
- return typeof WorkerGlobalScope !== 'undefined' &&
1826
- // eslint-disable-next-line no-undef
1827
- self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
1828
- }();
1829
- var origin = hasBrowserEnv && window.location.href || 'http://localhost';
1830
-
1831
- var utils = /*#__PURE__*/Object.freeze({
1832
- __proto__: null,
1833
- hasBrowserEnv: hasBrowserEnv,
1834
- hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1835
- hasStandardBrowserEnv: hasStandardBrowserEnv,
1836
- navigator: _navigator,
1837
- origin: origin
1838
- });
1839
-
1840
- var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
1841
-
1842
- function toURLEncodedForm(data, options) {
1843
- return toFormData(data, new platform.classes.URLSearchParams(), _objectSpread2({
1844
- visitor: function visitor(value, key, path, helpers) {
1845
- if (platform.isNode && utils$1.isBuffer(value)) {
1846
- this.append(key, value.toString('base64'));
1847
- return false;
1848
- }
1849
- return helpers.defaultVisitor.apply(this, arguments);
1850
- }
1851
- }, options));
2107
+ function removeBrackets(key) {
2108
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
1852
2109
  }
1853
2110
 
1854
2111
  /**
1855
- * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
2112
+ * It takes a path, a key, and a boolean, and returns a string
1856
2113
  *
1857
- * @param {string} name - The name of the property to get.
2114
+ * @param {string} path - The path to the current key.
2115
+ * @param {string} key - The key of the current object being iterated over.
2116
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
1858
2117
  *
1859
- * @returns An array of strings.
2118
+ * @returns {string} The path to the current key.
1860
2119
  */
1861
- function parsePropPath(name) {
1862
- // foo[x][y][z]
1863
- // foo.x.y.z
1864
- // foo-x-y-z
1865
- // foo x y z
1866
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(function (match) {
1867
- return match[0] === '[]' ? '' : match[1] || match[0];
1868
- });
2120
+ function renderKey(path, key, dots) {
2121
+ if (!path) return key;
2122
+ return path.concat(key).map(function each(token, i) {
2123
+ // eslint-disable-next-line no-param-reassign
2124
+ token = removeBrackets(token);
2125
+ return !dots && i ? '[' + token + ']' : token;
2126
+ }).join(dots ? '.' : '');
1869
2127
  }
1870
2128
 
1871
2129
  /**
1872
- * Convert an array to an object.
2130
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
1873
2131
  *
1874
- * @param {Array<any>} arr - The array to convert to an object.
2132
+ * @param {Array<any>} arr - The array to check
1875
2133
  *
1876
- * @returns An object with the same keys and values as the array.
2134
+ * @returns {boolean}
1877
2135
  */
1878
- function arrayToObject(arr) {
1879
- var obj = {};
1880
- var keys = Object.keys(arr);
1881
- var i;
1882
- var len = keys.length;
1883
- var key;
1884
- for (i = 0; i < len; i++) {
1885
- key = keys[i];
1886
- obj[key] = arr[key];
1887
- }
1888
- return obj;
2136
+ function isFlatArray(arr) {
2137
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
1889
2138
  }
2139
+ var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
2140
+ return /^is[A-Z]/.test(prop);
2141
+ });
1890
2142
 
1891
2143
  /**
1892
- * It takes a FormData object and returns a JavaScript object
2144
+ * Convert a data object to FormData
1893
2145
  *
1894
- * @param {string} formData The FormData object to convert to JSON.
2146
+ * @param {Object} obj
2147
+ * @param {?Object} [formData]
2148
+ * @param {?Object} [options]
2149
+ * @param {Function} [options.visitor]
2150
+ * @param {Boolean} [options.metaTokens = true]
2151
+ * @param {Boolean} [options.dots = false]
2152
+ * @param {?Boolean} [options.indexes = false]
1895
2153
  *
1896
- * @returns {Object<string, any> | null} The converted object.
1897
- */
1898
- function formDataToJSON(formData) {
1899
- function buildPath(path, value, target, index) {
1900
- var name = path[index++];
1901
- if (name === '__proto__') return true;
1902
- var isNumericKey = Number.isFinite(+name);
1903
- var isLast = index >= path.length;
1904
- name = !name && utils$1.isArray(target) ? target.length : name;
1905
- if (isLast) {
1906
- if (utils$1.hasOwnProp(target, name)) {
1907
- target[name] = [target[name], value];
1908
- } else {
1909
- target[name] = value;
1910
- }
1911
- return !isNumericKey;
1912
- }
1913
- if (!target[name] || !utils$1.isObject(target[name])) {
1914
- target[name] = [];
1915
- }
1916
- var result = buildPath(path, value, target[name], index);
1917
- if (result && utils$1.isArray(target[name])) {
1918
- target[name] = arrayToObject(target[name]);
1919
- }
1920
- return !isNumericKey;
1921
- }
1922
- if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
1923
- var obj = {};
1924
- utils$1.forEachEntry(formData, function (name, value) {
1925
- buildPath(parsePropPath(name), value, obj, 0);
1926
- });
1927
- return obj;
1928
- }
1929
- return null;
1930
- }
2154
+ * @returns {Object}
2155
+ **/
1931
2156
 
1932
2157
  /**
1933
- * It takes a string, tries to parse it, and if it fails, it returns the stringified version
1934
- * of the input
2158
+ * It converts an object into a FormData object
1935
2159
  *
1936
- * @param {any} rawValue - The value to be stringified.
1937
- * @param {Function} parser - A function that parses a string into a JavaScript object.
1938
- * @param {Function} encoder - A function that takes a value and returns a string.
2160
+ * @param {Object<any, any>} obj - The object to convert to form data.
2161
+ * @param {string} formData - The FormData object to append to.
2162
+ * @param {Object<string, any>} options
1939
2163
  *
1940
- * @returns {string} A stringified version of the rawValue.
2164
+ * @returns
1941
2165
  */
1942
- function stringifySafely(rawValue, parser, encoder) {
1943
- if (utils$1.isString(rawValue)) {
1944
- try {
1945
- (parser || JSON.parse)(rawValue);
1946
- return utils$1.trim(rawValue);
1947
- } catch (e) {
1948
- if (e.name !== 'SyntaxError') {
1949
- throw e;
1950
- }
1951
- }
2166
+ function toFormData(obj, formData, options) {
2167
+ if (!utils$1.isObject(obj)) {
2168
+ throw new TypeError('target must be an object');
1952
2169
  }
1953
- return (encoder || JSON.stringify)(rawValue);
1954
- }
1955
- var defaults = {
1956
- transitional: transitionalDefaults,
1957
- adapter: ['xhr', 'http', 'fetch'],
1958
- transformRequest: [function transformRequest(data, headers) {
1959
- var contentType = headers.getContentType() || '';
1960
- var hasJSONContentType = contentType.indexOf('application/json') > -1;
1961
- var isObjectPayload = utils$1.isObject(data);
1962
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
1963
- data = new FormData(data);
1964
- }
1965
- var isFormData = utils$1.isFormData(data);
1966
- if (isFormData) {
1967
- return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1968
- }
1969
- if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
1970
- return data;
2170
+
2171
+ // eslint-disable-next-line no-param-reassign
2172
+ formData = formData || new (FormData)();
2173
+
2174
+ // eslint-disable-next-line no-param-reassign
2175
+ options = utils$1.toFlatObject(options, {
2176
+ metaTokens: true,
2177
+ dots: false,
2178
+ indexes: false
2179
+ }, false, function defined(option, source) {
2180
+ // eslint-disable-next-line no-eq-null,eqeqeq
2181
+ return !utils$1.isUndefined(source[option]);
2182
+ });
2183
+ var metaTokens = options.metaTokens;
2184
+ // eslint-disable-next-line no-use-before-define
2185
+ var visitor = options.visitor || defaultVisitor;
2186
+ var dots = options.dots;
2187
+ var indexes = options.indexes;
2188
+ var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
2189
+ var maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
2190
+ var useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
2191
+ var stack = [];
2192
+ if (!utils$1.isFunction(visitor)) {
2193
+ throw new TypeError('visitor must be a function');
2194
+ }
2195
+ function convertValue(value) {
2196
+ if (value === null) return '';
2197
+ if (utils$1.isDate(value)) {
2198
+ return value.toISOString();
1971
2199
  }
1972
- if (utils$1.isArrayBufferView(data)) {
1973
- return data.buffer;
2200
+ if (utils$1.isBoolean(value)) {
2201
+ return value.toString();
1974
2202
  }
1975
- if (utils$1.isURLSearchParams(data)) {
1976
- headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1977
- return data.toString();
2203
+ if (!useBlob && utils$1.isBlob(value)) {
2204
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.');
1978
2205
  }
1979
- var isFileList;
1980
- if (isObjectPayload) {
1981
- if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
1982
- return toURLEncodedForm(data, this.formSerializer).toString();
2206
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
2207
+ if (useBlob && typeof _Blob === 'function') {
2208
+ return new _Blob([value]);
1983
2209
  }
1984
- if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1985
- var _FormData = this.env && this.env.FormData;
1986
- return toFormData(isFileList ? {
1987
- 'files[]': data
1988
- } : data, _FormData && new _FormData(), this.formSerializer);
2210
+ if (typeof Buffer !== 'undefined') {
2211
+ return Buffer.from(value);
1989
2212
  }
2213
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.', AxiosError.ERR_NOT_SUPPORT);
1990
2214
  }
1991
- if (isObjectPayload || hasJSONContentType) {
1992
- headers.setContentType('application/json', false);
1993
- return stringifySafely(data);
2215
+ return value;
2216
+ }
2217
+ function throwIfMaxDepthExceeded(depth) {
2218
+ if (depth > maxDepth) {
2219
+ throw new AxiosError('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
1994
2220
  }
1995
- return data;
1996
- }],
1997
- transformResponse: [function transformResponse(data) {
1998
- var transitional = this.transitional || defaults.transitional;
1999
- var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
2000
- var JSONRequested = this.responseType === 'json';
2001
- if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
2002
- return data;
2221
+ }
2222
+ function stringifyWithDepthLimit(value, depth) {
2223
+ if (maxDepth === Infinity) {
2224
+ return JSON.stringify(value);
2003
2225
  }
2004
- if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
2005
- var silentJSONParsing = transitional && transitional.silentJSONParsing;
2006
- var strictJSONParsing = !silentJSONParsing && JSONRequested;
2007
- try {
2008
- return JSON.parse(data, this.parseReviver);
2009
- } catch (e) {
2010
- if (strictJSONParsing) {
2011
- if (e.name === 'SyntaxError') {
2012
- throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
2013
- }
2014
- throw e;
2015
- }
2226
+ var ancestors = [];
2227
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
2228
+ if (!utils$1.isObject(currentValue)) {
2229
+ return currentValue;
2016
2230
  }
2017
- }
2018
- return data;
2019
- }],
2231
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
2232
+ ancestors.pop();
2233
+ }
2234
+ ancestors.push(currentValue);
2235
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
2236
+ return currentValue;
2237
+ });
2238
+ }
2239
+
2020
2240
  /**
2021
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
2022
- * timeout is not created.
2241
+ * Default visitor.
2242
+ *
2243
+ * @param {*} value
2244
+ * @param {String|Number} key
2245
+ * @param {Array<String|Number>} path
2246
+ * @this {FormData}
2247
+ *
2248
+ * @returns {boolean} return true to visit the each prop of the value recursively
2023
2249
  */
2024
- timeout: 0,
2025
- xsrfCookieName: 'XSRF-TOKEN',
2026
- xsrfHeaderName: 'X-XSRF-TOKEN',
2027
- maxContentLength: -1,
2028
- maxBodyLength: -1,
2029
- env: {
2030
- FormData: platform.classes.FormData,
2031
- Blob: platform.classes.Blob
2032
- },
2033
- validateStatus: function validateStatus(status) {
2034
- return status >= 200 && status < 300;
2035
- },
2036
- headers: {
2037
- common: {
2038
- 'Accept': 'application/json, text/plain, */*',
2039
- 'Content-Type': undefined
2250
+ function defaultVisitor(value, key, path) {
2251
+ var arr = value;
2252
+ if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
2253
+ formData.append(renderKey(path, key, dots), convertValue(value));
2254
+ return false;
2255
+ }
2256
+ if (value && !path && _typeof(value) === 'object') {
2257
+ if (utils$1.endsWith(key, '{}')) {
2258
+ // eslint-disable-next-line no-param-reassign
2259
+ key = metaTokens ? key : key.slice(0, -2);
2260
+ // eslint-disable-next-line no-param-reassign
2261
+ value = stringifyWithDepthLimit(value, 1);
2262
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) {
2263
+ // eslint-disable-next-line no-param-reassign
2264
+ key = removeBrackets(key);
2265
+ arr.forEach(function each(el, index) {
2266
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
2267
+ // eslint-disable-next-line no-nested-ternary
2268
+ indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el));
2269
+ });
2270
+ return false;
2271
+ }
2272
+ }
2273
+ if (isVisitable(value)) {
2274
+ return true;
2040
2275
  }
2276
+ formData.append(renderKey(path, key, dots), convertValue(value));
2277
+ return false;
2041
2278
  }
2042
- };
2043
- utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
2044
- defaults.headers[method] = {};
2045
- });
2046
- var defaults$1 = defaults;
2047
-
2048
- // RawAxiosHeaders whose duplicates are ignored by node
2049
- // c.f. https://nodejs.org/api/http.html#http_message_headers
2050
- var ignoreDuplicateOf = utils$1.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']);
2279
+ var exposedHelpers = Object.assign(predicates, {
2280
+ defaultVisitor: defaultVisitor,
2281
+ convertValue: convertValue,
2282
+ isVisitable: isVisitable
2283
+ });
2284
+ function build(value, path) {
2285
+ var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
2286
+ if (utils$1.isUndefined(value)) return;
2287
+ throwIfMaxDepthExceeded(depth);
2288
+ if (stack.indexOf(value) !== -1) {
2289
+ throw new Error('Circular reference detected in ' + path.join('.'));
2290
+ }
2291
+ stack.push(value);
2292
+ utils$1.forEach(value, function each(el, key) {
2293
+ var result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
2294
+ if (result === true) {
2295
+ build(el, path ? path.concat(key) : [key], depth + 1);
2296
+ }
2297
+ });
2298
+ stack.pop();
2299
+ }
2300
+ if (!utils$1.isObject(obj)) {
2301
+ throw new TypeError('data must be an object');
2302
+ }
2303
+ build(obj);
2304
+ return formData;
2305
+ }
2051
2306
 
2052
2307
  /**
2053
- * Parse headers into an object
2054
- *
2055
- * ```
2056
- * Date: Wed, 27 Aug 2014 08:58:49 GMT
2057
- * Content-Type: application/json
2058
- * Connection: keep-alive
2059
- * Transfer-Encoding: chunked
2060
- * ```
2308
+ * It encodes a string by replacing all characters that are not in the unreserved set with
2309
+ * their percent-encoded equivalents
2061
2310
  *
2062
- * @param {String} rawHeaders Headers needing to be parsed
2311
+ * @param {string} str - The string to encode.
2063
2312
  *
2064
- * @returns {Object} Headers parsed into an object
2313
+ * @returns {string} The encoded string.
2065
2314
  */
2066
- var parseHeaders = (function (rawHeaders) {
2067
- var parsed = {};
2068
- var key;
2069
- var val;
2070
- var i;
2071
- rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
2072
- i = line.indexOf(':');
2073
- key = line.substring(0, i).trim().toLowerCase();
2074
- val = line.substring(i + 1).trim();
2075
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
2076
- return;
2077
- }
2078
- if (key === 'set-cookie') {
2079
- if (parsed[key]) {
2080
- parsed[key].push(val);
2081
- } else {
2082
- parsed[key] = [val];
2083
- }
2084
- } else {
2085
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
2086
- }
2315
+ function encode$1(str) {
2316
+ var charMap = {
2317
+ '!': '%21',
2318
+ "'": '%27',
2319
+ '(': '%28',
2320
+ ')': '%29',
2321
+ '~': '%7E',
2322
+ '%20': '+'
2323
+ };
2324
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
2325
+ return charMap[match];
2087
2326
  });
2088
- return parsed;
2089
- });
2090
-
2091
- var $internals = Symbol('internals');
2092
- function normalizeHeader(header) {
2093
- return header && String(header).trim().toLowerCase();
2094
- }
2095
- function normalizeValue(value) {
2096
- if (value === false || value == null) {
2097
- return value;
2098
- }
2099
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
2100
2327
  }
2101
- function parseTokens(str) {
2102
- var tokens = Object.create(null);
2103
- var tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
2104
- var match;
2105
- while (match = tokensRE.exec(str)) {
2106
- tokens[match[1]] = match[2];
2107
- }
2108
- return tokens;
2328
+
2329
+ /**
2330
+ * It takes a params object and converts it to a FormData object
2331
+ *
2332
+ * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
2333
+ * @param {Object<string, any>} options - The options object passed to the Axios constructor.
2334
+ *
2335
+ * @returns {void}
2336
+ */
2337
+ function AxiosURLSearchParams(params, options) {
2338
+ this._pairs = [];
2339
+ params && toFormData(params, this, options);
2109
2340
  }
2110
- var isValidHeaderName = function isValidHeaderName(str) {
2111
- return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
2341
+ var prototype = AxiosURLSearchParams.prototype;
2342
+ prototype.append = function append(name, value) {
2343
+ this._pairs.push([name, value]);
2112
2344
  };
2113
- function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
2114
- if (utils$1.isFunction(filter)) {
2115
- return filter.call(this, value, header);
2116
- }
2117
- if (isHeaderNameFilter) {
2118
- value = header;
2345
+ prototype.toString = function toString(encoder) {
2346
+ var _this = this;
2347
+ var _encode = encoder ? function (value) {
2348
+ return encoder.call(_this, value, encode$1);
2349
+ } : encode$1;
2350
+ return this._pairs.map(function each(pair) {
2351
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
2352
+ }, '').join('&');
2353
+ };
2354
+
2355
+ /**
2356
+ * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
2357
+ * their plain counterparts (`:`, `$`, `,`, `+`).
2358
+ *
2359
+ * @param {string} val The value to be encoded.
2360
+ *
2361
+ * @returns {string} The encoded value.
2362
+ */
2363
+ function encode(val) {
2364
+ return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+');
2365
+ }
2366
+
2367
+ /**
2368
+ * Build a URL by appending params to the end
2369
+ *
2370
+ * @param {string} url The base of the url (e.g., http://www.google.com)
2371
+ * @param {object} [params] The params to be appended
2372
+ * @param {?(object|Function)} options
2373
+ *
2374
+ * @returns {string} The formatted url
2375
+ */
2376
+ function buildURL(url, params, options) {
2377
+ if (!params) {
2378
+ return url;
2119
2379
  }
2120
- if (!utils$1.isString(value)) return;
2121
- if (utils$1.isString(filter)) {
2122
- return value.indexOf(filter) !== -1;
2380
+ url = url || '';
2381
+ var _options = utils$1.isFunction(options) ? {
2382
+ serialize: options
2383
+ } : options;
2384
+
2385
+ // Read serializer options pollution-safely: own properties and methods on a
2386
+ // class/template prototype are honored, but values injected onto a polluted
2387
+ // Object.prototype are ignored.
2388
+ var _encode = utils$1.getSafeProp(_options, 'encode') || encode;
2389
+ var serializeFn = utils$1.getSafeProp(_options, 'serialize');
2390
+ var serializedParams;
2391
+ if (serializeFn) {
2392
+ serializedParams = serializeFn(params, _options);
2393
+ } else {
2394
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
2123
2395
  }
2124
- if (utils$1.isRegExp(filter)) {
2125
- return filter.test(value);
2396
+ if (serializedParams) {
2397
+ var hashmarkIndex = url.indexOf('#');
2398
+ if (hashmarkIndex !== -1) {
2399
+ url = url.slice(0, hashmarkIndex);
2400
+ }
2401
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
2126
2402
  }
2403
+ return url;
2127
2404
  }
2128
- function formatHeader(header) {
2129
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (w, _char, str) {
2130
- return _char.toUpperCase() + str;
2131
- });
2132
- }
2133
- function buildAccessors(obj, header) {
2134
- var accessorName = utils$1.toCamelCase(' ' + header);
2135
- ['get', 'set', 'has'].forEach(function (methodName) {
2136
- Object.defineProperty(obj, methodName + accessorName, {
2137
- value: function value(arg1, arg2, arg3) {
2138
- return this[methodName].call(this, header, arg1, arg2, arg3);
2139
- },
2140
- configurable: true
2141
- });
2142
- });
2143
- }
2144
- var AxiosHeaders = /*#__PURE__*/function () {
2145
- function AxiosHeaders(headers) {
2146
- _classCallCheck(this, AxiosHeaders);
2147
- headers && this.set(headers);
2405
+
2406
+ var InterceptorManager = /*#__PURE__*/function () {
2407
+ function InterceptorManager() {
2408
+ _classCallCheck(this, InterceptorManager);
2409
+ this.handlers = [];
2148
2410
  }
2149
- return _createClass(AxiosHeaders, [{
2150
- key: "set",
2151
- value: function set(header, valueOrRewrite, rewrite) {
2152
- var self = this;
2153
- function setHeader(_value, _header, _rewrite) {
2154
- var lHeader = normalizeHeader(_header);
2155
- if (!lHeader) {
2156
- throw new Error('header name must be a non-empty string');
2157
- }
2158
- var key = utils$1.findKey(self, lHeader);
2159
- if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
2160
- self[key || _header] = normalizeValue(_value);
2161
- }
2162
- }
2163
- var setHeaders = function setHeaders(headers, _rewrite) {
2164
- return utils$1.forEach(headers, function (_value, _header) {
2165
- return setHeader(_value, _header, _rewrite);
2166
- });
2167
- };
2168
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
2169
- setHeaders(header, valueOrRewrite);
2170
- } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2171
- setHeaders(parseHeaders(header), valueOrRewrite);
2172
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
2173
- var obj = {},
2174
- dest,
2175
- key;
2176
- var _iterator = _createForOfIteratorHelper(header),
2177
- _step;
2178
- try {
2179
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
2180
- var entry = _step.value;
2181
- if (!utils$1.isArray(entry)) {
2182
- throw TypeError('Object iterator must return a key-value pair');
2183
- }
2184
- obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [].concat(_toConsumableArray(dest), [entry[1]]) : [dest, entry[1]] : entry[1];
2185
- }
2186
- } catch (err) {
2187
- _iterator.e(err);
2188
- } finally {
2189
- _iterator.f();
2190
- }
2191
- setHeaders(obj, valueOrRewrite);
2192
- } else {
2193
- header != null && setHeader(valueOrRewrite, header, rewrite);
2194
- }
2195
- return this;
2411
+
2412
+ /**
2413
+ * Add a new interceptor to the stack
2414
+ *
2415
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
2416
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
2417
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
2418
+ *
2419
+ * @return {Number} An ID used to remove interceptor later
2420
+ */
2421
+ return _createClass(InterceptorManager, [{
2422
+ key: "use",
2423
+ value: function use(fulfilled, rejected, options) {
2424
+ this.handlers.push({
2425
+ fulfilled: fulfilled,
2426
+ rejected: rejected,
2427
+ synchronous: options ? options.synchronous : false,
2428
+ runWhen: options ? options.runWhen : null
2429
+ });
2430
+ return this.handlers.length - 1;
2196
2431
  }
2432
+
2433
+ /**
2434
+ * Remove an interceptor from the stack
2435
+ *
2436
+ * @param {Number} id The ID that was returned by `use`
2437
+ *
2438
+ * @returns {void}
2439
+ */
2197
2440
  }, {
2198
- key: "get",
2199
- value: function get(header, parser) {
2200
- header = normalizeHeader(header);
2201
- if (header) {
2202
- var key = utils$1.findKey(this, header);
2203
- if (key) {
2204
- var value = this[key];
2205
- if (!parser) {
2206
- return value;
2207
- }
2208
- if (parser === true) {
2209
- return parseTokens(value);
2210
- }
2211
- if (utils$1.isFunction(parser)) {
2212
- return parser.call(this, value, key);
2213
- }
2214
- if (utils$1.isRegExp(parser)) {
2215
- return parser.exec(value);
2216
- }
2217
- throw new TypeError('parser must be boolean|regexp|function');
2218
- }
2441
+ key: "eject",
2442
+ value: function eject(id) {
2443
+ if (this.handlers[id]) {
2444
+ this.handlers[id] = null;
2219
2445
  }
2220
2446
  }
2447
+
2448
+ /**
2449
+ * Clear all interceptors from the stack
2450
+ *
2451
+ * @returns {void}
2452
+ */
2221
2453
  }, {
2222
- key: "has",
2223
- value: function has(header, matcher) {
2224
- header = normalizeHeader(header);
2225
- if (header) {
2226
- var key = utils$1.findKey(this, header);
2227
- return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
2454
+ key: "clear",
2455
+ value: function clear() {
2456
+ if (this.handlers) {
2457
+ this.handlers = [];
2228
2458
  }
2229
- return false;
2230
2459
  }
2460
+
2461
+ /**
2462
+ * Iterate over all the registered interceptors
2463
+ *
2464
+ * This method is particularly useful for skipping over any
2465
+ * interceptors that may have become `null` calling `eject`.
2466
+ *
2467
+ * @param {Function} fn The function to call for each interceptor
2468
+ *
2469
+ * @returns {void}
2470
+ */
2231
2471
  }, {
2232
- key: "delete",
2233
- value: function _delete(header, matcher) {
2234
- var self = this;
2235
- var deleted = false;
2236
- function deleteHeader(_header) {
2237
- _header = normalizeHeader(_header);
2238
- if (_header) {
2239
- var key = utils$1.findKey(self, _header);
2240
- if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
2241
- delete self[key];
2242
- deleted = true;
2243
- }
2472
+ key: "forEach",
2473
+ value: function forEach(fn) {
2474
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
2475
+ if (h !== null) {
2476
+ fn(h);
2244
2477
  }
2478
+ });
2479
+ }
2480
+ }]);
2481
+ }();
2482
+
2483
+ var transitionalDefaults = {
2484
+ silentJSONParsing: true,
2485
+ forcedJSONParsing: true,
2486
+ clarifyTimeoutError: false,
2487
+ legacyInterceptorReqResOrdering: true,
2488
+ advertiseZstdAcceptEncoding: false,
2489
+ validateStatusUndefinedResolves: true
2490
+ };
2491
+
2492
+ var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
2493
+
2494
+ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
2495
+
2496
+ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
2497
+
2498
+ var platform$1 = {
2499
+ isBrowser: true,
2500
+ classes: {
2501
+ URLSearchParams: URLSearchParams$1,
2502
+ FormData: FormData$1,
2503
+ Blob: Blob$1
2504
+ },
2505
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
2506
+ };
2507
+
2508
+ var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
2509
+ var _navigator = (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && navigator || undefined;
2510
+
2511
+ /**
2512
+ * Determine if we're running in a standard browser environment
2513
+ *
2514
+ * This allows axios to run in a web worker, and react-native.
2515
+ * Both environments support XMLHttpRequest, but not fully standard globals.
2516
+ *
2517
+ * web workers:
2518
+ * typeof window -> undefined
2519
+ * typeof document -> undefined
2520
+ *
2521
+ * react-native:
2522
+ * navigator.product -> 'ReactNative'
2523
+ * nativescript
2524
+ * navigator.product -> 'NativeScript' or 'NS'
2525
+ *
2526
+ * @returns {boolean}
2527
+ */
2528
+ var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
2529
+
2530
+ /**
2531
+ * Determine if we're running in a standard browser webWorker environment
2532
+ *
2533
+ * Although the `isStandardBrowserEnv` method indicates that
2534
+ * `allows axios to run in a web worker`, the WebWorker will still be
2535
+ * filtered out due to its judgment standard
2536
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
2537
+ * This leads to a problem when axios post `FormData` in webWorker
2538
+ */
2539
+ var hasStandardBrowserWebWorkerEnv = function () {
2540
+ return typeof WorkerGlobalScope !== 'undefined' &&
2541
+ // eslint-disable-next-line no-undef
2542
+ self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
2543
+ }();
2544
+ var origin = hasBrowserEnv && window.location.href || 'http://localhost';
2545
+
2546
+ var utils = /*#__PURE__*/Object.freeze({
2547
+ __proto__: null,
2548
+ hasBrowserEnv: hasBrowserEnv,
2549
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
2550
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
2551
+ navigator: _navigator,
2552
+ origin: origin
2553
+ });
2554
+
2555
+ var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
2556
+
2557
+ function toURLEncodedForm(data, options) {
2558
+ return toFormData(data, new platform.classes.URLSearchParams(), _objectSpread2({
2559
+ visitor: function visitor(value, key, path, helpers) {
2560
+ if (platform.isNode && utils$1.isBuffer(value)) {
2561
+ this.append(key, value.toString('base64'));
2562
+ return false;
2245
2563
  }
2246
- if (utils$1.isArray(header)) {
2247
- header.forEach(deleteHeader);
2564
+ return helpers.defaultVisitor.apply(this, arguments);
2565
+ }
2566
+ }, options));
2567
+ }
2568
+
2569
+ var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
2570
+ function throwIfDepthExceeded(index) {
2571
+ if (index > MAX_DEPTH) {
2572
+ throw new AxiosError('FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
2573
+ }
2574
+ }
2575
+
2576
+ /**
2577
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
2578
+ *
2579
+ * @param {string} name - The name of the property to get.
2580
+ *
2581
+ * @returns An array of strings.
2582
+ */
2583
+ function parsePropPath(name) {
2584
+ // foo[x][y][z]
2585
+ // foo.x.y.z
2586
+ // foo-x-y-z
2587
+ // foo x y z
2588
+ var path = [];
2589
+ var pattern = /\w+|\[(\w*)]/g;
2590
+ var match;
2591
+ while ((match = pattern.exec(name)) !== null) {
2592
+ throwIfDepthExceeded(path.length);
2593
+ path.push(match[0] === '[]' ? '' : match[1] || match[0]);
2594
+ }
2595
+ return path;
2596
+ }
2597
+
2598
+ /**
2599
+ * Convert an array to an object.
2600
+ *
2601
+ * @param {Array<any>} arr - The array to convert to an object.
2602
+ *
2603
+ * @returns An object with the same keys and values as the array.
2604
+ */
2605
+ function arrayToObject(arr) {
2606
+ var obj = {};
2607
+ var keys = Object.keys(arr);
2608
+ var i;
2609
+ var len = keys.length;
2610
+ var key;
2611
+ for (i = 0; i < len; i++) {
2612
+ key = keys[i];
2613
+ obj[key] = arr[key];
2614
+ }
2615
+ return obj;
2616
+ }
2617
+
2618
+ /**
2619
+ * It takes a FormData object and returns a JavaScript object
2620
+ *
2621
+ * @param {string} formData The FormData object to convert to JSON.
2622
+ *
2623
+ * @returns {Object<string, any> | null} The converted object.
2624
+ */
2625
+ function formDataToJSON(formData) {
2626
+ function buildPath(path, value, target, index) {
2627
+ throwIfDepthExceeded(index);
2628
+ var name = path[index++];
2629
+ if (name === '__proto__') return true;
2630
+ var isNumericKey = Number.isFinite(+name);
2631
+ var isLast = index >= path.length;
2632
+ name = !name && utils$1.isArray(target) ? target.length : name;
2633
+ if (isLast) {
2634
+ if (utils$1.hasOwnProp(target, name)) {
2635
+ target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
2248
2636
  } else {
2249
- deleteHeader(header);
2637
+ target[name] = value;
2250
2638
  }
2251
- return deleted;
2639
+ return !isNumericKey;
2252
2640
  }
2253
- }, {
2254
- key: "clear",
2255
- value: function clear(matcher) {
2256
- var keys = Object.keys(this);
2257
- var i = keys.length;
2258
- var deleted = false;
2259
- while (i--) {
2260
- var key = keys[i];
2261
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
2262
- delete this[key];
2263
- deleted = true;
2264
- }
2265
- }
2266
- return deleted;
2641
+ if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) {
2642
+ target[name] = [];
2267
2643
  }
2268
- }, {
2269
- key: "normalize",
2270
- value: function normalize(format) {
2271
- var self = this;
2272
- var headers = {};
2273
- utils$1.forEach(this, function (value, header) {
2274
- var key = utils$1.findKey(headers, header);
2275
- if (key) {
2276
- self[key] = normalizeValue(value);
2277
- delete self[header];
2278
- return;
2279
- }
2280
- var normalized = format ? formatHeader(header) : String(header).trim();
2281
- if (normalized !== header) {
2282
- delete self[header];
2283
- }
2284
- self[normalized] = normalizeValue(value);
2285
- headers[normalized] = true;
2286
- });
2287
- return this;
2644
+ var result = buildPath(path, value, target[name], index);
2645
+ if (result && utils$1.isArray(target[name])) {
2646
+ target[name] = arrayToObject(target[name]);
2288
2647
  }
2289
- }, {
2290
- key: "concat",
2291
- value: function concat() {
2292
- var _this$constructor;
2293
- for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) {
2294
- targets[_key] = arguments[_key];
2648
+ return !isNumericKey;
2649
+ }
2650
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
2651
+ var obj = {};
2652
+ utils$1.forEachEntry(formData, function (name, value) {
2653
+ buildPath(parsePropPath(name), value, obj, 0);
2654
+ });
2655
+ return obj;
2656
+ }
2657
+ return null;
2658
+ }
2659
+
2660
+ var own = function own(obj, key) {
2661
+ return obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined;
2662
+ };
2663
+
2664
+ /**
2665
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
2666
+ * of the input
2667
+ *
2668
+ * @param {any} rawValue - The value to be stringified.
2669
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
2670
+ * @param {Function} encoder - A function that takes a value and returns a string.
2671
+ *
2672
+ * @returns {string} A stringified version of the rawValue.
2673
+ */
2674
+ function stringifySafely(rawValue, parser, encoder) {
2675
+ if (utils$1.isString(rawValue)) {
2676
+ try {
2677
+ (parser || JSON.parse)(rawValue);
2678
+ return utils$1.trim(rawValue);
2679
+ } catch (e) {
2680
+ if (e.name !== 'SyntaxError') {
2681
+ throw e;
2295
2682
  }
2296
- return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(targets));
2297
- }
2298
- }, {
2299
- key: "toJSON",
2300
- value: function toJSON(asStrings) {
2301
- var obj = Object.create(null);
2302
- utils$1.forEach(this, function (value, header) {
2303
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
2304
- });
2305
- return obj;
2306
2683
  }
2307
- }, {
2308
- key: Symbol.iterator,
2309
- value: function value() {
2310
- return Object.entries(this.toJSON())[Symbol.iterator]();
2684
+ }
2685
+ return (encoder || JSON.stringify)(rawValue);
2686
+ }
2687
+ var defaults = {
2688
+ transitional: transitionalDefaults,
2689
+ adapter: ['xhr', 'http', 'fetch'],
2690
+ transformRequest: [function transformRequest(data, headers) {
2691
+ var contentType = headers.getContentType() || '';
2692
+ var hasJSONContentType = contentType.indexOf('application/json') > -1;
2693
+ var isObjectPayload = utils$1.isObject(data);
2694
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
2695
+ data = new FormData(data);
2311
2696
  }
2312
- }, {
2313
- key: "toString",
2314
- value: function toString() {
2315
- return Object.entries(this.toJSON()).map(function (_ref) {
2316
- var _ref2 = _slicedToArray(_ref, 2),
2317
- header = _ref2[0],
2318
- value = _ref2[1];
2319
- return header + ': ' + value;
2320
- }).join('\n');
2697
+ var isFormData = utils$1.isFormData(data);
2698
+ if (isFormData) {
2699
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
2321
2700
  }
2322
- }, {
2323
- key: "getSetCookie",
2324
- value: function getSetCookie() {
2325
- return this.get("set-cookie") || [];
2701
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
2702
+ return data;
2326
2703
  }
2327
- }, {
2328
- key: Symbol.toStringTag,
2329
- get: function get() {
2330
- return 'AxiosHeaders';
2704
+ if (utils$1.isArrayBufferView(data)) {
2705
+ return data.buffer;
2331
2706
  }
2332
- }], [{
2333
- key: "from",
2334
- value: function from(thing) {
2335
- return thing instanceof this ? thing : new this(thing);
2707
+ if (utils$1.isURLSearchParams(data)) {
2708
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
2709
+ return data.toString();
2336
2710
  }
2337
- }, {
2338
- key: "concat",
2339
- value: function concat(first) {
2340
- var computed = new this(first);
2341
- for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2342
- targets[_key2 - 1] = arguments[_key2];
2711
+ var isFileList;
2712
+ if (isObjectPayload) {
2713
+ var formSerializer = own(this, 'formSerializer');
2714
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
2715
+ return toURLEncodedForm(data, formSerializer).toString();
2716
+ }
2717
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
2718
+ var env = own(this, 'env');
2719
+ var _FormData = env && env.FormData;
2720
+ return toFormData(isFileList ? {
2721
+ 'files[]': data
2722
+ } : data, _FormData && new _FormData(), formSerializer);
2343
2723
  }
2344
- targets.forEach(function (target) {
2345
- return computed.set(target);
2346
- });
2347
- return computed;
2348
2724
  }
2349
- }, {
2350
- key: "accessor",
2351
- value: function accessor(header) {
2352
- var internals = this[$internals] = this[$internals] = {
2353
- accessors: {}
2354
- };
2355
- var accessors = internals.accessors;
2356
- var prototype = this.prototype;
2357
- function defineAccessor(_header) {
2358
- var lHeader = normalizeHeader(_header);
2359
- if (!accessors[lHeader]) {
2360
- buildAccessors(prototype, _header);
2361
- accessors[lHeader] = true;
2725
+ if (isObjectPayload || hasJSONContentType) {
2726
+ headers.setContentType('application/json', false);
2727
+ return stringifySafely(data);
2728
+ }
2729
+ return data;
2730
+ }],
2731
+ transformResponse: [function transformResponse(data) {
2732
+ var transitional = own(this, 'transitional') || defaults.transitional;
2733
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
2734
+ var responseType = own(this, 'responseType');
2735
+ var JSONRequested = responseType === 'json';
2736
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
2737
+ return data;
2738
+ }
2739
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
2740
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
2741
+ var strictJSONParsing = !silentJSONParsing && JSONRequested;
2742
+ try {
2743
+ return JSON.parse(data, own(this, 'parseReviver'));
2744
+ } catch (e) {
2745
+ if (strictJSONParsing) {
2746
+ if (e.name === 'SyntaxError') {
2747
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));
2748
+ }
2749
+ throw e;
2362
2750
  }
2363
2751
  }
2364
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2365
- return this;
2366
2752
  }
2367
- }]);
2368
- }();
2369
- AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
2370
-
2371
- // reserved names hotfix
2372
- utils$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
2373
- var value = _ref3.value;
2374
- var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
2375
- return {
2376
- get: function get() {
2377
- return value;
2378
- },
2379
- set: function set(headerValue) {
2380
- this[mapped] = headerValue;
2753
+ return data;
2754
+ }],
2755
+ /**
2756
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
2757
+ * timeout is not created.
2758
+ */
2759
+ timeout: 0,
2760
+ xsrfCookieName: 'XSRF-TOKEN',
2761
+ xsrfHeaderName: 'X-XSRF-TOKEN',
2762
+ maxContentLength: -1,
2763
+ maxBodyLength: -1,
2764
+ env: {
2765
+ FormData: platform.classes.FormData,
2766
+ Blob: platform.classes.Blob
2767
+ },
2768
+ validateStatus: function validateStatus(status) {
2769
+ return status >= 200 && status < 300;
2770
+ },
2771
+ headers: {
2772
+ common: {
2773
+ Accept: 'application/json, text/plain, */*',
2774
+ 'Content-Type': undefined
2381
2775
  }
2382
- };
2776
+ }
2777
+ };
2778
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], function (method) {
2779
+ defaults.headers[method] = {};
2383
2780
  });
2384
- utils$1.freezeMethods(AxiosHeaders);
2385
- var AxiosHeaders$1 = AxiosHeaders;
2386
2781
 
2387
2782
  /**
2388
2783
  * Transform the data for a request or a response
@@ -2393,9 +2788,9 @@
2393
2788
  * @returns {*} The resulting transformed data
2394
2789
  */
2395
2790
  function transformData(fns, response) {
2396
- var config = this || defaults$1;
2791
+ var config = this || defaults;
2397
2792
  var context = response || config;
2398
- var headers = AxiosHeaders$1.from(context.headers);
2793
+ var headers = AxiosHeaders.from(context.headers);
2399
2794
  var data = context.data;
2400
2795
  utils$1.forEach(fns, function transform(fn) {
2401
2796
  data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
@@ -2421,15 +2816,14 @@
2421
2816
  function CanceledError(message, config, request) {
2422
2817
  var _this;
2423
2818
  _classCallCheck(this, CanceledError);
2424
- _this = _callSuper(this, CanceledError, [message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request]);
2819
+ _this = _callSuper(this, CanceledError, [message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request]);
2425
2820
  _this.name = 'CanceledError';
2426
2821
  _this.__CANCEL__ = true;
2427
2822
  return _this;
2428
2823
  }
2429
2824
  _inherits(CanceledError, _AxiosError);
2430
2825
  return _createClass(CanceledError);
2431
- }(AxiosError$1);
2432
- var CanceledError$1 = CanceledError;
2826
+ }(AxiosError);
2433
2827
 
2434
2828
  /**
2435
2829
  * Resolve or reject a Promise based on response status.
@@ -2445,12 +2839,12 @@
2445
2839
  if (!response.status || !validateStatus || validateStatus(response.status)) {
2446
2840
  resolve(response);
2447
2841
  } else {
2448
- reject(new AxiosError$1('Request failed with status code ' + response.status, [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
2842
+ reject(new AxiosError('Request failed with status code ' + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response));
2449
2843
  }
2450
2844
  }
2451
2845
 
2452
2846
  function parseProtocol(url) {
2453
- var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2847
+ var match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
2454
2848
  return match && match[1] || '';
2455
2849
  }
2456
2850
 
@@ -2544,19 +2938,22 @@
2544
2938
  var bytesNotified = 0;
2545
2939
  var _speedometer = speedometer(50, 250);
2546
2940
  return throttle(function (e) {
2547
- var loaded = e.loaded;
2941
+ if (!e || typeof e.loaded !== 'number') {
2942
+ return;
2943
+ }
2944
+ var rawLoaded = e.loaded;
2548
2945
  var total = e.lengthComputable ? e.total : undefined;
2549
- var progressBytes = loaded - bytesNotified;
2946
+ var loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
2947
+ var progressBytes = Math.max(0, loaded - bytesNotified);
2550
2948
  var rate = _speedometer(progressBytes);
2551
- var inRange = loaded <= total;
2552
- bytesNotified = loaded;
2949
+ bytesNotified = Math.max(bytesNotified, loaded);
2553
2950
  var data = _defineProperty({
2554
2951
  loaded: loaded,
2555
2952
  total: total,
2556
2953
  progress: total ? loaded / total : undefined,
2557
2954
  bytes: progressBytes,
2558
2955
  rate: rate ? rate : undefined,
2559
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2956
+ estimated: rate && total ? (total - loaded) / rate : undefined,
2560
2957
  event: e,
2561
2958
  lengthComputable: total != null
2562
2959
  }, isDownloadStream ? 'download' : 'upload', true);
@@ -2618,8 +3015,24 @@
2618
3015
  },
2619
3016
  read: function read(name) {
2620
3017
  if (typeof document === 'undefined') return null;
2621
- var match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
2622
- return match ? decodeURIComponent(match[1]) : null;
3018
+ // Match name=value by splitting on the semicolon separator instead of building a
3019
+ // RegExp from `name` — interpolating an unescaped string into a RegExp would let
3020
+ // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or
3021
+ // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or
3022
+ // "; ", so ignore optional whitespace before each cookie name.
3023
+ var cookies = document.cookie.split(';');
3024
+ for (var i = 0; i < cookies.length; i++) {
3025
+ var cookie = cookies[i].replace(/^\s+/, '');
3026
+ var eq = cookie.indexOf('=');
3027
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
3028
+ try {
3029
+ return decodeURIComponent(cookie.slice(eq + 1));
3030
+ } catch (e) {
3031
+ return cookie.slice(eq + 1);
3032
+ }
3033
+ }
3034
+ }
3035
+ return null;
2623
3036
  },
2624
3037
  remove: function remove(name) {
2625
3038
  this.write(name, '', Date.now() - 86400000, '/');
@@ -2663,6 +3076,24 @@
2663
3076
  return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
2664
3077
  }
2665
3078
 
3079
+ var malformedHttpProtocol = /^https?:(?!\/\/)/i;
3080
+ var httpProtocolControlCharacters = /[\t\n\r]/g;
3081
+ function stripLeadingC0ControlOrSpace(url) {
3082
+ var i = 0;
3083
+ while (i < url.length && url.charCodeAt(i) <= 0x20) {
3084
+ i++;
3085
+ }
3086
+ return url.slice(i);
3087
+ }
3088
+ function normalizeURLForProtocolCheck(url) {
3089
+ return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, '');
3090
+ }
3091
+ function assertValidHttpProtocolURL(url, config) {
3092
+ if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
3093
+ throw new AxiosError('Invalid URL: missing "//" after protocol', AxiosError.ERR_INVALID_URL, config);
3094
+ }
3095
+ }
3096
+
2666
3097
  /**
2667
3098
  * Creates a new URL by combining the baseURL with the requestedURL,
2668
3099
  * only when the requestedURL is not already an absolute URL.
@@ -2673,16 +3104,18 @@
2673
3104
  *
2674
3105
  * @returns {string} The combined full path
2675
3106
  */
2676
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
3107
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
3108
+ assertValidHttpProtocolURL(requestedURL, config);
2677
3109
  var isRelativeUrl = !isAbsoluteURL(requestedURL);
2678
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
3110
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
3111
+ assertValidHttpProtocolURL(baseURL, config);
2679
3112
  return combineURLs(baseURL, requestedURL);
2680
3113
  }
2681
3114
  return requestedURL;
2682
3115
  }
2683
3116
 
2684
3117
  var headersToObject = function headersToObject(thing) {
2685
- return thing instanceof AxiosHeaders$1 ? _objectSpread2({}, thing) : thing;
3118
+ return thing instanceof AxiosHeaders ? _objectSpread2({}, thing) : thing;
2686
3119
  };
2687
3120
 
2688
3121
  /**
@@ -2696,8 +3129,23 @@
2696
3129
  */
2697
3130
  function mergeConfig(config1, config2) {
2698
3131
  // eslint-disable-next-line no-param-reassign
3132
+ config1 = config1 || {};
2699
3133
  config2 = config2 || {};
2700
- var config = {};
3134
+
3135
+ // Use a null-prototype object so that downstream reads such as `config.auth`
3136
+ // or `config.baseURL` cannot inherit polluted values from Object.prototype.
3137
+ // `hasOwnProperty` is restored as a non-enumerable own slot to preserve
3138
+ // ergonomics for user code that relies on it.
3139
+ var config = Object.create(null);
3140
+ Object.defineProperty(config, 'hasOwnProperty', {
3141
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
3142
+ // this data descriptor into an accessor descriptor on the way in.
3143
+ __proto__: null,
3144
+ value: Object.prototype.hasOwnProperty,
3145
+ enumerable: false,
3146
+ writable: true,
3147
+ configurable: true
3148
+ });
2701
3149
  function getMergedValue(target, source, prop, caseless) {
2702
3150
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2703
3151
  return utils$1.merge.call({
@@ -2733,12 +3181,29 @@
2733
3181
  return getMergedValue(undefined, a);
2734
3182
  }
2735
3183
  }
3184
+ function getMergedTransitionalOption(prop) {
3185
+ var transitional2 = utils$1.hasOwnProp(config2, 'transitional') ? config2.transitional : undefined;
3186
+ if (!utils$1.isUndefined(transitional2)) {
3187
+ if (utils$1.isPlainObject(transitional2)) {
3188
+ if (utils$1.hasOwnProp(transitional2, prop)) {
3189
+ return transitional2[prop];
3190
+ }
3191
+ } else {
3192
+ return undefined;
3193
+ }
3194
+ }
3195
+ var transitional1 = utils$1.hasOwnProp(config1, 'transitional') ? config1.transitional : undefined;
3196
+ if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) {
3197
+ return transitional1[prop];
3198
+ }
3199
+ return undefined;
3200
+ }
2736
3201
 
2737
3202
  // eslint-disable-next-line consistent-return
2738
3203
  function mergeDirectKeys(a, b, prop) {
2739
- if (prop in config2) {
3204
+ if (utils$1.hasOwnProp(config2, prop)) {
2740
3205
  return getMergedValue(a, b);
2741
- } else if (prop in config1) {
3206
+ } else if (utils$1.hasOwnProp(config1, prop)) {
2742
3207
  return getMergedValue(undefined, a);
2743
3208
  }
2744
3209
  }
@@ -2769,6 +3234,7 @@
2769
3234
  httpsAgent: defaultToConfig2,
2770
3235
  cancelToken: defaultToConfig2,
2771
3236
  socketPath: defaultToConfig2,
3237
+ allowedSocketPaths: defaultToConfig2,
2772
3238
  responseEncoding: defaultToConfig2,
2773
3239
  validateStatus: mergeDirectKeys,
2774
3240
  headers: function headers(a, b, prop) {
@@ -2776,45 +3242,88 @@
2776
3242
  }
2777
3243
  };
2778
3244
  utils$1.forEach(Object.keys(_objectSpread2(_objectSpread2({}, config1), config2)), function computeConfigValue(prop) {
2779
- if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
3245
+ if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
2780
3246
  var merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
2781
- var configValue = merge(config1[prop], config2[prop], prop);
3247
+ var a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : undefined;
3248
+ var b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : undefined;
3249
+ var configValue = merge(a, b, prop);
2782
3250
  utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
2783
3251
  });
3252
+ if (utils$1.hasOwnProp(config2, 'validateStatus') && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption('validateStatusUndefinedResolves') === false) {
3253
+ if (utils$1.hasOwnProp(config1, 'validateStatus')) {
3254
+ config.validateStatus = getMergedValue(undefined, config1.validateStatus);
3255
+ } else {
3256
+ delete config.validateStatus;
3257
+ }
3258
+ }
2784
3259
  return config;
2785
3260
  }
2786
3261
 
2787
- var resolveConfig = (function (config) {
3262
+ var FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
3263
+ function setFormDataHeaders(headers, formHeaders, policy) {
3264
+ if (policy !== 'content-only') {
3265
+ headers.set(formHeaders);
3266
+ return;
3267
+ }
3268
+ Object.entries(formHeaders || {}).forEach(function (_ref) {
3269
+ var _ref2 = _slicedToArray(_ref, 2),
3270
+ key = _ref2[0],
3271
+ val = _ref2[1];
3272
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
3273
+ headers.set(key, val);
3274
+ }
3275
+ });
3276
+ }
3277
+
3278
+ /**
3279
+ * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
3280
+ * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
3281
+ *
3282
+ * @param {string} str The string to encode
3283
+ *
3284
+ * @returns {string} UTF-8 bytes as a Latin-1 string
3285
+ */
3286
+ var encodeUTF8$1 = function encodeUTF8(str) {
3287
+ return encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, function (_, hex) {
3288
+ return String.fromCharCode(parseInt(hex, 16));
3289
+ });
3290
+ };
3291
+ function resolveConfig(config) {
2788
3292
  var newConfig = mergeConfig({}, config);
2789
- var data = newConfig.data,
2790
- withXSRFToken = newConfig.withXSRFToken,
2791
- xsrfHeaderName = newConfig.xsrfHeaderName,
2792
- xsrfCookieName = newConfig.xsrfCookieName,
2793
- headers = newConfig.headers,
2794
- auth = newConfig.auth;
2795
- newConfig.headers = headers = AxiosHeaders$1.from(headers);
2796
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
3293
+
3294
+ // Read only own properties to prevent prototype pollution gadgets
3295
+ // (e.g. Object.prototype.baseURL = 'https://evil.com').
3296
+ var own = function own(key) {
3297
+ return utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : undefined;
3298
+ };
3299
+ var data = own('data');
3300
+ var withXSRFToken = own('withXSRFToken');
3301
+ var xsrfHeaderName = own('xsrfHeaderName');
3302
+ var xsrfCookieName = own('xsrfCookieName');
3303
+ var headers = own('headers');
3304
+ var auth = own('auth');
3305
+ var baseURL = own('baseURL');
3306
+ var allowAbsoluteUrls = own('allowAbsoluteUrls');
3307
+ var url = own('url');
3308
+ newConfig.headers = headers = AxiosHeaders.from(headers);
3309
+ newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), own('params'), own('paramsSerializer'));
2797
3310
 
2798
3311
  // HTTP basic authentication
2799
3312
  if (auth) {
2800
- headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));
3313
+ var username = utils$1.getSafeProp(auth, 'username') || '';
3314
+ var password = utils$1.getSafeProp(auth, 'password') || '';
3315
+ try {
3316
+ headers.set('Authorization', 'Basic ' + btoa(username + ':' + (password ? encodeUTF8$1(password) : '')));
3317
+ } catch (e) {
3318
+ throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);
3319
+ }
2801
3320
  }
2802
3321
  if (utils$1.isFormData(data)) {
2803
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2804
- headers.setContentType(undefined); // browser handles it
3322
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
3323
+ headers.setContentType(undefined); // browser/web worker/RN handles it
2805
3324
  } else if (utils$1.isFunction(data.getHeaders)) {
2806
3325
  // Node.js FormData (like form-data package)
2807
- var formHeaders = data.getHeaders();
2808
- // Only set safe headers to avoid overwriting security headers
2809
- var allowedHeaders = ['content-type', 'content-length'];
2810
- Object.entries(formHeaders).forEach(function (_ref) {
2811
- var _ref2 = _slicedToArray(_ref, 2),
2812
- key = _ref2[0],
2813
- val = _ref2[1];
2814
- if (allowedHeaders.includes(key.toLowerCase())) {
2815
- headers.set(key, val);
2816
- }
2817
- });
3326
+ setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
2818
3327
  }
2819
3328
  }
2820
3329
 
@@ -2823,9 +3332,15 @@
2823
3332
  // Specifically not if we're in a web worker, or react-native.
2824
3333
 
2825
3334
  if (platform.hasStandardBrowserEnv) {
2826
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
2827
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
2828
- // Add xsrf header
3335
+ if (utils$1.isFunction(withXSRFToken)) {
3336
+ withXSRFToken = withXSRFToken(newConfig);
3337
+ }
3338
+
3339
+ // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
3340
+ // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
3341
+ // the XSRF token cross-origin.
3342
+ var shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin(newConfig.url);
3343
+ if (shouldSendXSRF) {
2829
3344
  var xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
2830
3345
  if (xsrfValue) {
2831
3346
  headers.set(xsrfHeaderName, xsrfValue);
@@ -2833,14 +3348,14 @@
2833
3348
  }
2834
3349
  }
2835
3350
  return newConfig;
2836
- });
3351
+ }
2837
3352
 
2838
3353
  var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2839
3354
  var xhrAdapter = isXHRAdapterSupported && function (config) {
2840
3355
  return new Promise(function dispatchXhrRequest(resolve, reject) {
2841
3356
  var _config = resolveConfig(config);
2842
3357
  var requestData = _config.data;
2843
- var requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
3358
+ var requestHeaders = AxiosHeaders.from(_config.headers).normalize();
2844
3359
  var responseType = _config.responseType,
2845
3360
  onUploadProgress = _config.onUploadProgress,
2846
3361
  onDownloadProgress = _config.onDownloadProgress;
@@ -2864,7 +3379,7 @@
2864
3379
  return;
2865
3380
  }
2866
3381
  // Prepare the response
2867
- var responseHeaders = AxiosHeaders$1.from('getAllResponseHeaders' in request && request.getAllResponseHeaders());
3382
+ var responseHeaders = AxiosHeaders.from('getAllResponseHeaders' in request && request.getAllResponseHeaders());
2868
3383
  var responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response;
2869
3384
  var response = {
2870
3385
  data: responseData,
@@ -2899,7 +3414,7 @@
2899
3414
  // handled by onerror instead
2900
3415
  // With one exception: request that using file: protocol, most browsers
2901
3416
  // will return status as 0 even though it's a successful request
2902
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
3417
+ if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith('file:'))) {
2903
3418
  return;
2904
3419
  }
2905
3420
  // readystate handler is calling before onerror or ontimeout handlers,
@@ -2913,7 +3428,8 @@
2913
3428
  if (!request) {
2914
3429
  return;
2915
3430
  }
2916
- reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
3431
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
3432
+ done();
2917
3433
 
2918
3434
  // Clean up request
2919
3435
  request = null;
@@ -2925,10 +3441,11 @@
2925
3441
  // (message may be empty; when present, surface it)
2926
3442
  // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
2927
3443
  var msg = event && event.message ? event.message : 'Network Error';
2928
- var err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
3444
+ var err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
2929
3445
  // attach the underlying event for consumers who want details
2930
3446
  err.event = event || null;
2931
3447
  reject(err);
3448
+ done();
2932
3449
  request = null;
2933
3450
  };
2934
3451
 
@@ -2939,7 +3456,8 @@
2939
3456
  if (_config.timeoutErrorMessage) {
2940
3457
  timeoutErrorMessage = _config.timeoutErrorMessage;
2941
3458
  }
2942
- reject(new AxiosError$1(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, request));
3459
+ reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
3460
+ done();
2943
3461
 
2944
3462
  // Clean up request
2945
3463
  request = null;
@@ -2950,7 +3468,7 @@
2950
3468
 
2951
3469
  // Add headers to the request
2952
3470
  if ('setRequestHeader' in request) {
2953
- utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
3471
+ utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
2954
3472
  request.setRequestHeader(key, val);
2955
3473
  });
2956
3474
  }
@@ -2990,8 +3508,9 @@
2990
3508
  if (!request) {
2991
3509
  return;
2992
3510
  }
2993
- reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
3511
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
2994
3512
  request.abort();
3513
+ done();
2995
3514
  request = null;
2996
3515
  };
2997
3516
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
@@ -3000,8 +3519,9 @@
3000
3519
  }
3001
3520
  }
3002
3521
  var protocol = parseProtocol(_config.url);
3003
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
3004
- reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
3522
+ if (protocol && !platform.protocols.includes(protocol)) {
3523
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
3524
+ done();
3005
3525
  return;
3006
3526
  }
3007
3527
 
@@ -3011,44 +3531,46 @@
3011
3531
  };
3012
3532
 
3013
3533
  var composeSignals = function composeSignals(signals, timeout) {
3014
- var _signals = signals = signals ? signals.filter(Boolean) : [],
3015
- length = _signals.length;
3016
- if (timeout || length) {
3017
- var controller = new AbortController();
3018
- var aborted;
3019
- var onabort = function onabort(reason) {
3020
- if (!aborted) {
3021
- aborted = true;
3022
- unsubscribe();
3023
- var err = reason instanceof Error ? reason : this.reason;
3024
- controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
3025
- }
3026
- };
3027
- var timer = timeout && setTimeout(function () {
3028
- timer = null;
3029
- onabort(new AxiosError$1("timeout of ".concat(timeout, "ms exceeded"), AxiosError$1.ETIMEDOUT));
3030
- }, timeout);
3031
- var unsubscribe = function unsubscribe() {
3032
- if (signals) {
3033
- timer && clearTimeout(timer);
3034
- timer = null;
3035
- signals.forEach(function (signal) {
3036
- signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
3037
- });
3038
- signals = null;
3039
- }
3040
- };
3534
+ signals = signals ? signals.filter(Boolean) : [];
3535
+ if (!timeout && !signals.length) {
3536
+ return;
3537
+ }
3538
+ var controller = new AbortController();
3539
+ var aborted = false;
3540
+ var onabort = function onabort(reason) {
3541
+ if (!aborted) {
3542
+ aborted = true;
3543
+ unsubscribe();
3544
+ var err = reason instanceof Error ? reason : this.reason;
3545
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
3546
+ }
3547
+ };
3548
+ var timer = timeout && setTimeout(function () {
3549
+ timer = null;
3550
+ onabort(new AxiosError("timeout of ".concat(timeout, "ms exceeded"), AxiosError.ETIMEDOUT));
3551
+ }, timeout);
3552
+ var unsubscribe = function unsubscribe() {
3553
+ if (!signals) {
3554
+ return;
3555
+ }
3556
+ timer && clearTimeout(timer);
3557
+ timer = null;
3041
3558
  signals.forEach(function (signal) {
3042
- return signal.addEventListener('abort', onabort);
3559
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
3043
3560
  });
3044
- var signal = controller.signal;
3045
- signal.unsubscribe = function () {
3046
- return utils$1.asap(unsubscribe);
3047
- };
3048
- return signal;
3049
- }
3561
+ signals = null;
3562
+ };
3563
+ signals.forEach(function (signal) {
3564
+ return signal.addEventListener('abort', onabort, {
3565
+ once: true
3566
+ });
3567
+ });
3568
+ var signal = controller.signal;
3569
+ signal.unsubscribe = function () {
3570
+ return utils$1.asap(unsubscribe);
3571
+ };
3572
+ return signal;
3050
3573
  };
3051
- var composeSignals$1 = composeSignals;
3052
3574
 
3053
3575
  var streamChunk = /*#__PURE__*/_regenerator().m(function streamChunk(chunk, chunkSize) {
3054
3576
  var len, pos, end;
@@ -3253,19 +3775,137 @@
3253
3775
  });
3254
3776
  };
3255
3777
 
3778
+ /**
3779
+ * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
3780
+ * - For base64: compute exact decoded size using length and padding;
3781
+ * handle %XX at the character-count level (no string allocation).
3782
+ * - For non-base64: compute the exact percent-decoded UTF-8 byte length.
3783
+ *
3784
+ * @param {string} url
3785
+ * @returns {number}
3786
+ */
3787
+ var isHexDigit = function isHexDigit(charCode) {
3788
+ return charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
3789
+ };
3790
+ var isPercentEncodedByte = function isPercentEncodedByte(str, i, len) {
3791
+ return i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
3792
+ };
3793
+ function estimateDataURLDecodedBytes(url) {
3794
+ if (!url || typeof url !== 'string') return 0;
3795
+ if (!url.startsWith('data:')) return 0;
3796
+ var comma = url.indexOf(',');
3797
+ if (comma < 0) return 0;
3798
+ var meta = url.slice(5, comma);
3799
+ var body = url.slice(comma + 1);
3800
+ var isBase64 = /;base64/i.test(meta);
3801
+ if (isBase64) {
3802
+ var effectiveLen = body.length;
3803
+ var len = body.length; // cache length
3804
+
3805
+ for (var i = 0; i < len; i++) {
3806
+ if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
3807
+ var a = body.charCodeAt(i + 1);
3808
+ var b = body.charCodeAt(i + 2);
3809
+ var isHex = isHexDigit(a) && isHexDigit(b);
3810
+ if (isHex) {
3811
+ effectiveLen -= 2;
3812
+ i += 2;
3813
+ }
3814
+ }
3815
+ }
3816
+ var pad = 0;
3817
+ var idx = len - 1;
3818
+ var tailIsPct3D = function tailIsPct3D(j) {
3819
+ return j >= 2 && body.charCodeAt(j - 2) === 37 &&
3820
+ // '%'
3821
+ body.charCodeAt(j - 1) === 51 && (
3822
+ // '3'
3823
+ body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
3824
+ }; // 'D' or 'd'
3825
+
3826
+ if (idx >= 0) {
3827
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
3828
+ pad++;
3829
+ idx--;
3830
+ } else if (tailIsPct3D(idx)) {
3831
+ pad++;
3832
+ idx -= 3;
3833
+ }
3834
+ }
3835
+ if (pad === 1 && idx >= 0) {
3836
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
3837
+ pad++;
3838
+ } else if (tailIsPct3D(idx)) {
3839
+ pad++;
3840
+ }
3841
+ }
3842
+ var groups = Math.floor(effectiveLen / 4);
3843
+ var _bytes = groups * 3 - (pad || 0);
3844
+ return _bytes > 0 ? _bytes : 0;
3845
+ }
3846
+
3847
+ // Compute UTF-8 byte length directly from UTF-16 code units without allocating
3848
+ // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
3849
+ // Valid %XX triplets count as one decoded byte; this matches the bytes that
3850
+ // decodeURIComponent(body) would produce before Buffer re-encodes the string.
3851
+ var bytes = 0;
3852
+ for (var _i = 0, _len = body.length; _i < _len; _i++) {
3853
+ var c = body.charCodeAt(_i);
3854
+ if (c === 37 /* '%' */ && isPercentEncodedByte(body, _i, _len)) {
3855
+ bytes += 1;
3856
+ _i += 2;
3857
+ } else if (c < 0x80) {
3858
+ bytes += 1;
3859
+ } else if (c < 0x800) {
3860
+ bytes += 2;
3861
+ } else if (c >= 0xd800 && c <= 0xdbff && _i + 1 < _len) {
3862
+ var next = body.charCodeAt(_i + 1);
3863
+ if (next >= 0xdc00 && next <= 0xdfff) {
3864
+ bytes += 4;
3865
+ _i++;
3866
+ } else {
3867
+ bytes += 3;
3868
+ }
3869
+ } else {
3870
+ bytes += 3;
3871
+ }
3872
+ }
3873
+ return bytes;
3874
+ }
3875
+
3876
+ var VERSION = "1.18.1";
3877
+
3256
3878
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
3257
3879
  var isFunction = utils$1.isFunction;
3258
- var globalFetchAPI = function (_ref) {
3259
- var Request = _ref.Request,
3260
- Response = _ref.Response;
3261
- return {
3262
- Request: Request,
3263
- Response: Response
3264
- };
3265
- }(utils$1.global);
3266
- var _utils$global = utils$1.global,
3267
- ReadableStream$1 = _utils$global.ReadableStream,
3268
- TextEncoder = _utils$global.TextEncoder;
3880
+
3881
+ /**
3882
+ * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
3883
+ * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
3884
+ *
3885
+ * @param {string} str The string to encode
3886
+ *
3887
+ * @returns {string} UTF-8 bytes as a Latin-1 string
3888
+ */
3889
+ var encodeUTF8 = function encodeUTF8(str) {
3890
+ return encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, function (_, hex) {
3891
+ return String.fromCharCode(parseInt(hex, 16));
3892
+ });
3893
+ };
3894
+
3895
+ // Node's WHATWG URL parser returns `username` and `password` percent-encoded.
3896
+ // Decode before composing the `auth` option so credentials such as
3897
+ // `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
3898
+ // original value for malformed input so a bad encoding never throws.
3899
+ var decodeURIComponentSafe = function decodeURIComponentSafe(value) {
3900
+ if (!utils$1.isString(value)) {
3901
+ return value;
3902
+ }
3903
+ try {
3904
+ return decodeURIComponent(value);
3905
+ } catch (error) {
3906
+ return value;
3907
+ }
3908
+ };
3269
3909
  var test = function test(fn) {
3270
3910
  try {
3271
3911
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
@@ -3276,10 +3916,24 @@
3276
3916
  return false;
3277
3917
  }
3278
3918
  };
3919
+ var maybeWithAuthCredentials = function maybeWithAuthCredentials(url) {
3920
+ var protocolIndex = url.indexOf('://');
3921
+ var urlToCheck = url;
3922
+ if (protocolIndex !== -1) {
3923
+ urlToCheck = urlToCheck.slice(protocolIndex + 3);
3924
+ }
3925
+ return urlToCheck.includes('@') || urlToCheck.includes(':');
3926
+ };
3279
3927
  var factory = function factory(env) {
3928
+ var globalObject = utils$1.global !== undefined && utils$1.global !== null ? utils$1.global : globalThis;
3929
+ var ReadableStream = globalObject.ReadableStream,
3930
+ TextEncoder = globalObject.TextEncoder;
3280
3931
  env = utils$1.merge.call({
3281
3932
  skipUndefined: true
3282
- }, globalFetchAPI, env);
3933
+ }, {
3934
+ Request: globalObject.Request,
3935
+ Response: globalObject.Response
3936
+ }, env);
3283
3937
  var _env = env,
3284
3938
  envFetch = _env.fetch,
3285
3939
  Request = _env.Request,
@@ -3290,13 +3944,13 @@
3290
3944
  if (!isFetchSupported) {
3291
3945
  return false;
3292
3946
  }
3293
- var isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
3947
+ var isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);
3294
3948
  var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) {
3295
3949
  return function (str) {
3296
3950
  return encoder.encode(str);
3297
3951
  };
3298
3952
  }(new TextEncoder()) : (/*#__PURE__*/function () {
3299
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(str) {
3953
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(str) {
3300
3954
  var _t, _t2;
3301
3955
  return _regenerator().w(function (_context) {
3302
3956
  while (1) switch (_context.n) {
@@ -3311,19 +3965,23 @@
3311
3965
  }, _callee);
3312
3966
  }));
3313
3967
  return function (_x) {
3314
- return _ref2.apply(this, arguments);
3968
+ return _ref.apply(this, arguments);
3315
3969
  };
3316
3970
  }()));
3317
3971
  var supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(function () {
3318
3972
  var duplexAccessed = false;
3319
- var hasContentType = new Request(platform.origin, {
3320
- body: new ReadableStream$1(),
3973
+ var request = new Request(platform.origin, {
3974
+ body: new ReadableStream(),
3321
3975
  method: 'POST',
3322
3976
  get duplex() {
3323
3977
  duplexAccessed = true;
3324
3978
  return 'half';
3325
3979
  }
3326
- }).headers.has('Content-Type');
3980
+ });
3981
+ var hasContentType = request.headers.has('Content-Type');
3982
+ if (request.body != null) {
3983
+ request.body.cancel();
3984
+ }
3327
3985
  return duplexAccessed && !hasContentType;
3328
3986
  });
3329
3987
  var supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(function () {
@@ -3341,12 +3999,12 @@
3341
3999
  if (method) {
3342
4000
  return method.call(res);
3343
4001
  }
3344
- throw new AxiosError$1("Response type '".concat(type, "' is not supported"), AxiosError$1.ERR_NOT_SUPPORT, config);
4002
+ throw new AxiosError("Response type '".concat(type, "' is not supported"), AxiosError.ERR_NOT_SUPPORT, config);
3345
4003
  });
3346
4004
  });
3347
4005
  }();
3348
4006
  var getBodyLength = /*#__PURE__*/function () {
3349
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(body) {
4007
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(body) {
3350
4008
  var _request;
3351
4009
  return _regenerator().w(function (_context2) {
3352
4010
  while (1) switch (_context2.n) {
@@ -3399,11 +4057,11 @@
3399
4057
  }, _callee2);
3400
4058
  }));
3401
4059
  return function getBodyLength(_x2) {
3402
- return _ref3.apply(this, arguments);
4060
+ return _ref2.apply(this, arguments);
3403
4061
  };
3404
4062
  }();
3405
4063
  var resolveBodyLength = /*#__PURE__*/function () {
3406
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(headers, body) {
4064
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(headers, body) {
3407
4065
  var length;
3408
4066
  return _regenerator().w(function (_context3) {
3409
4067
  while (1) switch (_context3.n) {
@@ -3414,124 +4072,333 @@
3414
4072
  }, _callee3);
3415
4073
  }));
3416
4074
  return function resolveBodyLength(_x3, _x4) {
3417
- return _ref4.apply(this, arguments);
4075
+ return _ref3.apply(this, arguments);
3418
4076
  };
3419
4077
  }();
3420
4078
  return /*#__PURE__*/function () {
3421
- var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(config) {
3422
- var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, _fetch, composedSignal, request, unsubscribe, requestContentLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, resolvedOptions, response, isStreamResponse, options, responseContentLength, _ref6, _ref7, _onProgress, _flush, responseData, _t3, _t4, _t5;
4079
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(config) {
4080
+ var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, maxContentLength, maxBodyLength, hasMaxContentLength, hasMaxBodyLength, own, _fetch, composedSignal, request, unsubscribe, requestContentLength, pendingBodyError, maxBodyLengthError, auth, configAuth, username, password, parsedURL, urlUsername, urlPassword, estimated, outboundLength, mustEnforceStreamBody, trackRequestStream, _request, contentTypeHeader, _ref5, _ref6, onProgress, flush, isCredentialsSupported, contentType, resolvedOptions, response, responseHeaders, declaredLength, isStreamResponse, options, responseContentLength, _ref7, _ref8, _onProgress, _flush, bytesRead, onChunkProgress, responseData, materializedSize, canceledError, networkError, _t3, _t4;
3423
4081
  return _regenerator().w(function (_context4) {
3424
4082
  while (1) switch (_context4.p = _context4.n) {
3425
4083
  case 0:
3426
- _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
4084
+ _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions, maxContentLength = _resolveConfig.maxContentLength, maxBodyLength = _resolveConfig.maxBodyLength;
4085
+ hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
4086
+ hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
4087
+ own = function own(key) {
4088
+ return utils$1.hasOwnProp(config, key) ? config[key] : undefined;
4089
+ };
3427
4090
  _fetch = envFetch || fetch;
3428
4091
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
3429
- composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
4092
+ composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
3430
4093
  request = null;
3431
4094
  unsubscribe = composedSignal && composedSignal.unsubscribe && function () {
3432
4095
  composedSignal.unsubscribe();
3433
4096
  };
4097
+ // AxiosError we raise while the request body is being streamed. Captured
4098
+ // by identity so the catch block can surface it directly, regardless of
4099
+ // how the runtime wraps the resulting fetch rejection (undici exposes it
4100
+ // as `err.cause`; some browsers drop the original error entirely).
4101
+ pendingBodyError = null;
4102
+ maxBodyLengthError = function maxBodyLengthError() {
4103
+ return new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config, request);
4104
+ };
3434
4105
  _context4.p = 1;
3435
- _t3 = onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head';
3436
- if (!_t3) {
3437
- _context4.n = 3;
4106
+ // HTTP basic authentication
4107
+ auth = undefined;
4108
+ configAuth = own('auth');
4109
+ if (configAuth) {
4110
+ username = utils$1.getSafeProp(configAuth, 'username') || '';
4111
+ password = utils$1.getSafeProp(configAuth, 'password') || '';
4112
+ auth = {
4113
+ username: username,
4114
+ password: password
4115
+ };
4116
+ }
4117
+ if (maybeWithAuthCredentials(url)) {
4118
+ parsedURL = new URL(url, platform.origin);
4119
+ if (!auth && (parsedURL.username || parsedURL.password)) {
4120
+ urlUsername = decodeURIComponentSafe(parsedURL.username);
4121
+ urlPassword = decodeURIComponentSafe(parsedURL.password);
4122
+ auth = {
4123
+ username: urlUsername,
4124
+ password: urlPassword
4125
+ };
4126
+ }
4127
+ if (parsedURL.username || parsedURL.password) {
4128
+ parsedURL.username = '';
4129
+ parsedURL.password = '';
4130
+ url = parsedURL.href;
4131
+ }
4132
+ }
4133
+ if (auth) {
4134
+ headers["delete"]('authorization');
4135
+ headers.set('Authorization', 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || ''))));
4136
+ }
4137
+
4138
+ // Enforce maxContentLength for data: URLs up-front so we never materialize
4139
+ // an oversized payload. The HTTP adapter applies the same check (see http.js
4140
+ // "if (protocol === 'data:')" branch).
4141
+ if (!(hasMaxContentLength && typeof url === 'string' && url.startsWith('data:'))) {
4142
+ _context4.n = 2;
3438
4143
  break;
3439
4144
  }
3440
- _context4.n = 2;
3441
- return resolveBodyLength(headers, data);
4145
+ estimated = estimateDataURLDecodedBytes(url);
4146
+ if (!(estimated > maxContentLength)) {
4147
+ _context4.n = 2;
4148
+ break;
4149
+ }
4150
+ throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request);
3442
4151
  case 2:
3443
- _t4 = requestContentLength = _context4.v;
3444
- _t3 = _t4 !== 0;
3445
- case 3:
3446
- if (!_t3) {
4152
+ if (!(hasMaxBodyLength && method !== 'get' && method !== 'head')) {
3447
4153
  _context4.n = 4;
3448
4154
  break;
3449
4155
  }
3450
- _request = new Request(url, {
3451
- method: 'POST',
3452
- body: data,
3453
- duplex: "half"
3454
- });
3455
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
3456
- headers.setContentType(contentTypeHeader);
4156
+ _context4.n = 3;
4157
+ return getBodyLength(data);
4158
+ case 3:
4159
+ outboundLength = _context4.v;
4160
+ if (!(typeof outboundLength === 'number' && isFinite(outboundLength))) {
4161
+ _context4.n = 4;
4162
+ break;
3457
4163
  }
3458
- if (_request.body) {
3459
- _progressEventDecorat = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))), _progressEventDecorat2 = _slicedToArray(_progressEventDecorat, 2), onProgress = _progressEventDecorat2[0], flush = _progressEventDecorat2[1];
3460
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
4164
+ requestContentLength = outboundLength;
4165
+ if (!(outboundLength > maxBodyLength)) {
4166
+ _context4.n = 4;
4167
+ break;
3461
4168
  }
4169
+ throw maxBodyLengthError();
3462
4170
  case 4:
4171
+ // A streamed body under maxBodyLength must be counted as fetch consumes
4172
+ // it; its size is never trusted from a caller-declared Content-Length.
4173
+ mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data));
4174
+ trackRequestStream = function trackRequestStream(stream, onProgress, flush) {
4175
+ return trackStream(stream, DEFAULT_CHUNK_SIZE, function (loadedBytes) {
4176
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
4177
+ throw pendingBodyError = maxBodyLengthError();
4178
+ }
4179
+ onProgress && onProgress(loadedBytes);
4180
+ }, flush);
4181
+ };
4182
+ if (!(supportsRequestStream && method !== 'get' && method !== 'head' && (onUploadProgress || mustEnforceStreamBody))) {
4183
+ _context4.n = 8;
4184
+ break;
4185
+ }
4186
+ if (!(requestContentLength == null)) {
4187
+ _context4.n = 6;
4188
+ break;
4189
+ }
4190
+ _context4.n = 5;
4191
+ return resolveBodyLength(headers, data);
4192
+ case 5:
4193
+ _t3 = _context4.v;
4194
+ _context4.n = 7;
4195
+ break;
4196
+ case 6:
4197
+ _t3 = requestContentLength;
4198
+ case 7:
4199
+ requestContentLength = _t3;
4200
+ // A declared length of 0 is only trusted to skip the wrap when we are
4201
+ // not enforcing a stream limit (which must not rely on that header).
4202
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
4203
+ _request = new Request(url, {
4204
+ method: 'POST',
4205
+ body: data,
4206
+ duplex: 'half'
4207
+ });
4208
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
4209
+ headers.setContentType(contentTypeHeader);
4210
+ }
4211
+ if (_request.body) {
4212
+ _ref5 = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [], _ref6 = _slicedToArray(_ref5, 2), onProgress = _ref6[0], flush = _ref6[1];
4213
+ data = trackRequestStream(_request.body, onProgress, flush);
4214
+ }
4215
+ }
4216
+ _context4.n = 10;
4217
+ break;
4218
+ case 8:
4219
+ if (!(mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== 'get' && method !== 'head')) {
4220
+ _context4.n = 9;
4221
+ break;
4222
+ }
4223
+ data = trackRequestStream(data);
4224
+ _context4.n = 10;
4225
+ break;
4226
+ case 9:
4227
+ if (!(mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== 'get' && method !== 'head')) {
4228
+ _context4.n = 10;
4229
+ break;
4230
+ }
4231
+ throw new AxiosError('Stream request bodies are not supported by the current fetch implementation', AxiosError.ERR_NOT_SUPPORT, config, request);
4232
+ case 10:
3463
4233
  if (!utils$1.isString(withCredentials)) {
3464
4234
  withCredentials = withCredentials ? 'include' : 'omit';
3465
4235
  }
3466
4236
 
3467
4237
  // Cloudflare Workers throws when credentials are defined
3468
4238
  // see https://github.com/cloudflare/workerd/issues/902
3469
- isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
4239
+ isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; // If data is FormData and Content-Type is multipart/form-data without boundary,
4240
+ // delete it so fetch can set it correctly with the boundary
4241
+ if (utils$1.isFormData(data)) {
4242
+ contentType = headers.getContentType();
4243
+ if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
4244
+ headers["delete"]('content-type');
4245
+ }
4246
+ }
4247
+
4248
+ // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
4249
+ headers.set('User-Agent', 'axios/' + VERSION, false);
3470
4250
  resolvedOptions = _objectSpread2(_objectSpread2({}, fetchOptions), {}, {
3471
4251
  signal: composedSignal,
3472
4252
  method: method.toUpperCase(),
3473
- headers: headers.normalize().toJSON(),
4253
+ headers: toByteStringHeaderObject(headers.normalize()),
3474
4254
  body: data,
3475
- duplex: "half",
4255
+ duplex: 'half',
3476
4256
  credentials: isCredentialsSupported ? withCredentials : undefined
3477
4257
  });
3478
4258
  request = isRequestSupported && new Request(url, resolvedOptions);
3479
- _context4.n = 5;
4259
+ _context4.n = 11;
3480
4260
  return isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions);
3481
- case 5:
4261
+ case 11:
3482
4262
  response = _context4.v;
4263
+ responseHeaders = AxiosHeaders.from(response.headers); // Cheap pre-check: if the server honestly declares a content-length that
4264
+ // already exceeds the cap, reject before we start streaming.
4265
+ if (!hasMaxContentLength) {
4266
+ _context4.n = 12;
4267
+ break;
4268
+ }
4269
+ declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
4270
+ if (!(declaredLength != null && declaredLength > maxContentLength)) {
4271
+ _context4.n = 12;
4272
+ break;
4273
+ }
4274
+ throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request);
4275
+ case 12:
3483
4276
  isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
3484
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
4277
+ if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
3485
4278
  options = {};
3486
4279
  ['status', 'statusText', 'headers'].forEach(function (prop) {
3487
4280
  options[prop] = response[prop];
3488
4281
  });
3489
- responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
3490
- _ref6 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref7 = _slicedToArray(_ref6, 2), _onProgress = _ref7[0], _flush = _ref7[1];
3491
- response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, _onProgress, function () {
4282
+ responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
4283
+ _ref7 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref8 = _slicedToArray(_ref7, 2), _onProgress = _ref8[0], _flush = _ref8[1];
4284
+ bytesRead = 0;
4285
+ onChunkProgress = function onChunkProgress(loadedBytes) {
4286
+ if (hasMaxContentLength) {
4287
+ bytesRead = loadedBytes;
4288
+ if (bytesRead > maxContentLength) {
4289
+ throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request);
4290
+ }
4291
+ }
4292
+ _onProgress && _onProgress(loadedBytes);
4293
+ };
4294
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, function () {
3492
4295
  _flush && _flush();
3493
4296
  unsubscribe && unsubscribe();
3494
4297
  }), options);
3495
4298
  }
3496
4299
  responseType = responseType || 'text';
3497
- _context4.n = 6;
4300
+ _context4.n = 13;
3498
4301
  return resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
3499
- case 6:
4302
+ case 13:
3500
4303
  responseData = _context4.v;
4304
+ if (!(hasMaxContentLength && !supportsResponseStream && !isStreamResponse)) {
4305
+ _context4.n = 14;
4306
+ break;
4307
+ }
4308
+ if (responseData != null) {
4309
+ if (typeof responseData.byteLength === 'number') {
4310
+ materializedSize = responseData.byteLength;
4311
+ } else if (typeof responseData.size === 'number') {
4312
+ materializedSize = responseData.size;
4313
+ } else if (typeof responseData === 'string') {
4314
+ materializedSize = typeof TextEncoder === 'function' ? new TextEncoder().encode(responseData).byteLength : responseData.length;
4315
+ }
4316
+ }
4317
+ if (!(typeof materializedSize === 'number' && materializedSize > maxContentLength)) {
4318
+ _context4.n = 14;
4319
+ break;
4320
+ }
4321
+ throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request);
4322
+ case 14:
3501
4323
  !isStreamResponse && unsubscribe && unsubscribe();
3502
- _context4.n = 7;
4324
+ _context4.n = 15;
3503
4325
  return new Promise(function (resolve, reject) {
3504
4326
  settle(resolve, reject, {
3505
4327
  data: responseData,
3506
- headers: AxiosHeaders$1.from(response.headers),
4328
+ headers: AxiosHeaders.from(response.headers),
3507
4329
  status: response.status,
3508
4330
  statusText: response.statusText,
3509
4331
  config: config,
3510
4332
  request: request
3511
4333
  });
3512
4334
  });
3513
- case 7:
4335
+ case 15:
3514
4336
  return _context4.a(2, _context4.v);
3515
- case 8:
3516
- _context4.p = 8;
3517
- _t5 = _context4.v;
4337
+ case 16:
4338
+ _context4.p = 16;
4339
+ _t4 = _context4.v;
3518
4340
  unsubscribe && unsubscribe();
3519
- if (!(_t5 && _t5.name === 'TypeError' && /Load failed|fetch/i.test(_t5.message))) {
3520
- _context4.n = 9;
4341
+
4342
+ // Safari can surface fetch aborts as a DOMException-like object whose
4343
+ // branded getters throw. Prefer our composed signal reason before reading
4344
+ // the caught error, preserving timeout vs cancellation semantics.
4345
+ if (!(composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError)) {
4346
+ _context4.n = 17;
4347
+ break;
4348
+ }
4349
+ canceledError = composedSignal.reason;
4350
+ canceledError.config = config;
4351
+ request && (canceledError.request = request);
4352
+ if (_t4 !== canceledError) {
4353
+ // Non-enumerable to match native Error `cause` semantics so loggers
4354
+ // don't recurse into circular fetch internals (see #7205).
4355
+ Object.defineProperty(canceledError, 'cause', {
4356
+ __proto__: null,
4357
+ value: _t4,
4358
+ writable: true,
4359
+ enumerable: false,
4360
+ configurable: true
4361
+ });
4362
+ }
4363
+ throw canceledError;
4364
+ case 17:
4365
+ if (!pendingBodyError) {
4366
+ _context4.n = 18;
4367
+ break;
4368
+ }
4369
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
4370
+ throw pendingBodyError;
4371
+ case 18:
4372
+ if (!(_t4 instanceof AxiosError)) {
4373
+ _context4.n = 19;
4374
+ break;
4375
+ }
4376
+ request && !_t4.request && (_t4.request = request);
4377
+ throw _t4;
4378
+ case 19:
4379
+ if (!(_t4 && _t4.name === 'TypeError' && /Load failed|fetch/i.test(_t4.message))) {
4380
+ _context4.n = 20;
3521
4381
  break;
3522
4382
  }
3523
- throw Object.assign(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request, _t5 && _t5.response), {
3524
- cause: _t5.cause || _t5
4383
+ networkError = new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, _t4 && _t4.response); // Non-enumerable to match native Error `cause` semantics so loggers
4384
+ // don't recurse into circular fetch internals (see #7205).
4385
+ Object.defineProperty(networkError, 'cause', {
4386
+ __proto__: null,
4387
+ value: _t4.cause || _t4,
4388
+ writable: true,
4389
+ enumerable: false,
4390
+ configurable: true
3525
4391
  });
3526
- case 9:
3527
- throw AxiosError$1.from(_t5, _t5 && _t5.code, config, request, _t5 && _t5.response);
3528
- case 10:
4392
+ throw networkError;
4393
+ case 20:
4394
+ throw AxiosError.from(_t4, _t4 && _t4.code, config, request, _t4 && _t4.response);
4395
+ case 21:
3529
4396
  return _context4.a(2);
3530
4397
  }
3531
- }, _callee4, null, [[1, 8]]);
4398
+ }, _callee4, null, [[1, 16]]);
3532
4399
  }));
3533
4400
  return function (_x5) {
3534
- return _ref5.apply(this, arguments);
4401
+ return _ref4.apply(this, arguments);
3535
4402
  };
3536
4403
  }();
3537
4404
  };
@@ -3563,7 +4430,7 @@
3563
4430
  * - `http` for Node.js
3564
4431
  * - `xhr` for browsers
3565
4432
  * - `fetch` for fetch API-based requests
3566
- *
4433
+ *
3567
4434
  * @type {Object<string, Function|Object>}
3568
4435
  */
3569
4436
  var knownAdapters = {
@@ -3578,13 +4445,17 @@
3578
4445
  utils$1.forEach(knownAdapters, function (fn, value) {
3579
4446
  if (fn) {
3580
4447
  try {
4448
+ // Null-proto descriptors so a polluted Object.prototype.get cannot turn
4449
+ // these data descriptors into accessor descriptors on the way in.
3581
4450
  Object.defineProperty(fn, 'name', {
4451
+ __proto__: null,
3582
4452
  value: value
3583
4453
  });
3584
4454
  } catch (e) {
3585
4455
  // eslint-disable-next-line no-empty
3586
4456
  }
3587
4457
  Object.defineProperty(fn, 'adapterName', {
4458
+ __proto__: null,
3588
4459
  value: value
3589
4460
  });
3590
4461
  }
@@ -3592,7 +4463,7 @@
3592
4463
 
3593
4464
  /**
3594
4465
  * Render a rejection reason string for unknown or unsupported adapters
3595
- *
4466
+ *
3596
4467
  * @param {string} reason
3597
4468
  * @returns {string}
3598
4469
  */
@@ -3602,7 +4473,7 @@
3602
4473
 
3603
4474
  /**
3604
4475
  * Check if the adapter is resolved (function, null, or false)
3605
- *
4476
+ *
3606
4477
  * @param {Function|null|false} adapter
3607
4478
  * @returns {boolean}
3608
4479
  */
@@ -3614,7 +4485,7 @@
3614
4485
  * Get the first suitable adapter from the provided list.
3615
4486
  * Tries each adapter in order until a supported one is found.
3616
4487
  * Throws an AxiosError if no adapter is suitable.
3617
- *
4488
+ *
3618
4489
  * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
3619
4490
  * @param {Object} config - Axios request configuration
3620
4491
  * @throws {AxiosError} If no suitable adapter is available
@@ -3634,7 +4505,7 @@
3634
4505
  if (!isResolvedHandle(nameOrAdapter)) {
3635
4506
  adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
3636
4507
  if (adapter === undefined) {
3637
- throw new AxiosError$1("Unknown adapter '".concat(id, "'"));
4508
+ throw new AxiosError("Unknown adapter '".concat(id, "'"));
3638
4509
  }
3639
4510
  }
3640
4511
  if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
@@ -3650,7 +4521,7 @@
3650
4521
  return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
3651
4522
  });
3652
4523
  var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
3653
- throw new AxiosError$1("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
4524
+ throw new AxiosError("There is no suitable adapter to dispatch the request " + s, AxiosError.ERR_NOT_SUPPORT);
3654
4525
  }
3655
4526
  return adapter;
3656
4527
  }
@@ -3683,7 +4554,7 @@
3683
4554
  config.cancelToken.throwIfRequested();
3684
4555
  }
3685
4556
  if (config.signal && config.signal.aborted) {
3686
- throw new CanceledError$1(null, config);
4557
+ throw new CanceledError(null, config);
3687
4558
  }
3688
4559
  }
3689
4560
 
@@ -3696,20 +4567,27 @@
3696
4567
  */
3697
4568
  function dispatchRequest(config) {
3698
4569
  throwIfCancellationRequested(config);
3699
- config.headers = AxiosHeaders$1.from(config.headers);
4570
+ config.headers = AxiosHeaders.from(config.headers);
3700
4571
 
3701
4572
  // Transform request data
3702
4573
  config.data = transformData.call(config, config.transformRequest);
3703
4574
  if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
3704
4575
  config.headers.setContentType('application/x-www-form-urlencoded', false);
3705
4576
  }
3706
- var adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
4577
+ var adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
3707
4578
  return adapter(config).then(function onAdapterResolution(response) {
3708
4579
  throwIfCancellationRequested(config);
3709
4580
 
3710
- // Transform response data
3711
- response.data = transformData.call(config, config.transformResponse, response);
3712
- response.headers = AxiosHeaders$1.from(response.headers);
4581
+ // Expose the current response on config so that transformResponse can
4582
+ // attach it to any AxiosError it throws (e.g. on JSON parse failure).
4583
+ // We clean it up afterwards to avoid polluting the config object.
4584
+ config.response = response;
4585
+ try {
4586
+ response.data = transformData.call(config, config.transformResponse, response);
4587
+ } finally {
4588
+ delete config.response;
4589
+ }
4590
+ response.headers = AxiosHeaders.from(response.headers);
3713
4591
  return response;
3714
4592
  }, function onAdapterRejection(reason) {
3715
4593
  if (!isCancel(reason)) {
@@ -3717,16 +4595,19 @@
3717
4595
 
3718
4596
  // Transform response data
3719
4597
  if (reason && reason.response) {
3720
- reason.response.data = transformData.call(config, config.transformResponse, reason.response);
3721
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
4598
+ config.response = reason.response;
4599
+ try {
4600
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
4601
+ } finally {
4602
+ delete config.response;
4603
+ }
4604
+ reason.response.headers = AxiosHeaders.from(reason.response.headers);
3722
4605
  }
3723
4606
  }
3724
4607
  return Promise.reject(reason);
3725
4608
  });
3726
4609
  }
3727
4610
 
3728
- var VERSION = "1.13.5";
3729
-
3730
4611
  var validators$1 = {};
3731
4612
 
3732
4613
  // eslint-disable-next-line func-names
@@ -3748,13 +4629,13 @@
3748
4629
  */
3749
4630
  validators$1.transitional = function transitional(validator, version, message) {
3750
4631
  function formatMessage(opt, desc) {
3751
- return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
4632
+ return '[Axios v' + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? '. ' + message : '');
3752
4633
  }
3753
4634
 
3754
4635
  // eslint-disable-next-line func-names
3755
4636
  return function (value, opt, opts) {
3756
4637
  if (validator === false) {
3757
- throw new AxiosError$1(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError$1.ERR_DEPRECATED);
4638
+ throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED);
3758
4639
  }
3759
4640
  if (version && !deprecatedWarnings[opt]) {
3760
4641
  deprecatedWarnings[opt] = true;
@@ -3783,24 +4664,26 @@
3783
4664
  */
3784
4665
 
3785
4666
  function assertOptions(options, schema, allowUnknown) {
3786
- if (_typeof(options) !== 'object') {
3787
- throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
4667
+ if (_typeof(options) !== 'object' || options === null) {
4668
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
3788
4669
  }
3789
4670
  var keys = Object.keys(options);
3790
4671
  var i = keys.length;
3791
4672
  while (i-- > 0) {
3792
4673
  var opt = keys[i];
3793
- var validator = schema[opt];
4674
+ // Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
4675
+ // a non-function validator and cause a TypeError.
4676
+ var validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
3794
4677
  if (validator) {
3795
4678
  var value = options[opt];
3796
4679
  var result = value === undefined || validator(value, opt, options);
3797
4680
  if (result !== true) {
3798
- throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
4681
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
3799
4682
  }
3800
4683
  continue;
3801
4684
  }
3802
4685
  if (allowUnknown !== true) {
3803
- throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
4686
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
3804
4687
  }
3805
4688
  }
3806
4689
  }
@@ -3823,8 +4706,8 @@
3823
4706
  _classCallCheck(this, Axios);
3824
4707
  this.defaults = instanceConfig || {};
3825
4708
  this.interceptors = {
3826
- request: new InterceptorManager$1(),
3827
- response: new InterceptorManager$1()
4709
+ request: new InterceptorManager(),
4710
+ response: new InterceptorManager()
3828
4711
  };
3829
4712
  }
3830
4713
 
@@ -3840,7 +4723,7 @@
3840
4723
  key: "request",
3841
4724
  value: (function () {
3842
4725
  var _request2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(configOrUrl, config) {
3843
- var dummy, stack, _t;
4726
+ var dummy, stack, firstNewlineIndex, secondNewlineIndex, stackWithoutTwoTopLines, _t;
3844
4727
  return _regenerator().w(function (_context) {
3845
4728
  while (1) switch (_context.p = _context.n) {
3846
4729
  case 0:
@@ -3857,13 +4740,24 @@
3857
4740
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
3858
4741
 
3859
4742
  // slice off the Error: ... line
3860
- stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
4743
+ stack = function () {
4744
+ if (!dummy.stack) {
4745
+ return '';
4746
+ }
4747
+ var firstNewlineIndex = dummy.stack.indexOf('\n');
4748
+ return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
4749
+ }();
3861
4750
  try {
3862
4751
  if (!_t.stack) {
3863
4752
  _t.stack = stack;
3864
4753
  // match without the 2 top stack lines
3865
- } else if (stack && !String(_t.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
3866
- _t.stack += '\n' + stack;
4754
+ } else if (stack) {
4755
+ firstNewlineIndex = stack.indexOf('\n');
4756
+ secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
4757
+ stackWithoutTwoTopLines = secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
4758
+ if (!String(_t.stack).endsWith(stackWithoutTwoTopLines)) {
4759
+ _t.stack += '\n' + stack;
4760
+ }
3867
4761
  }
3868
4762
  } catch (e) {
3869
4763
  // ignore the case where "stack" is an un-writable property
@@ -3901,7 +4795,9 @@
3901
4795
  silentJSONParsing: validators.transitional(validators["boolean"]),
3902
4796
  forcedJSONParsing: validators.transitional(validators["boolean"]),
3903
4797
  clarifyTimeoutError: validators.transitional(validators["boolean"]),
3904
- legacyInterceptorReqResOrdering: validators.transitional(validators["boolean"])
4798
+ legacyInterceptorReqResOrdering: validators.transitional(validators["boolean"]),
4799
+ advertiseZstdAcceptEncoding: validators.transitional(validators["boolean"]),
4800
+ validateStatusUndefinedResolves: validators.transitional(validators["boolean"])
3905
4801
  }, false);
3906
4802
  }
3907
4803
  if (paramsSerializer != null) {
@@ -3933,10 +4829,10 @@
3933
4829
 
3934
4830
  // Flatten headers
3935
4831
  var contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
3936
- headers && utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
4832
+ headers && utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], function (method) {
3937
4833
  delete headers[method];
3938
4834
  });
3939
- config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
4835
+ config.headers = AxiosHeaders.concat(contextHeaders, headers);
3940
4836
 
3941
4837
  // filter out skipped interceptors
3942
4838
  var requestInterceptorChain = [];
@@ -4000,7 +4896,7 @@
4000
4896
  key: "getUri",
4001
4897
  value: function getUri(config) {
4002
4898
  config = mergeConfig(this.defaults, config);
4003
- var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
4899
+ var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
4004
4900
  return buildURL(fullPath, config.params, config.paramsSerializer);
4005
4901
  }
4006
4902
  }]);
@@ -4011,13 +4907,11 @@
4011
4907
  return this.request(mergeConfig(config || {}, {
4012
4908
  method: method,
4013
4909
  url: url,
4014
- data: (config || {}).data
4910
+ data: config && utils$1.hasOwnProp(config, 'data') ? config.data : undefined
4015
4911
  }));
4016
4912
  };
4017
4913
  });
4018
- utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
4019
- /*eslint func-names:0*/
4020
-
4914
+ utils$1.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
4021
4915
  function generateHTTPMethod(isForm) {
4022
4916
  return function httpMethod(url, data, config) {
4023
4917
  return this.request(mergeConfig(config || {}, {
@@ -4031,9 +4925,13 @@
4031
4925
  };
4032
4926
  }
4033
4927
  Axios.prototype[method] = generateHTTPMethod();
4034
- Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
4928
+
4929
+ // QUERY is a safe/idempotent read method; multipart form bodies don't fit
4930
+ // its semantics, so no queryForm shorthand is generated.
4931
+ if (method !== 'query') {
4932
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
4933
+ }
4035
4934
  });
4036
- var Axios$1 = Axios;
4037
4935
 
4038
4936
  /**
4039
4937
  * A `CancelToken` is an object that can be used to request cancellation of an operation.
@@ -4082,7 +4980,7 @@
4082
4980
  // Cancellation has already been requested
4083
4981
  return;
4084
4982
  }
4085
- token.reason = new CanceledError$1(message, config, request);
4983
+ token.reason = new CanceledError(message, config, request);
4086
4984
  resolvePromise(token.reason);
4087
4985
  });
4088
4986
  }
@@ -4162,7 +5060,6 @@
4162
5060
  }
4163
5061
  }]);
4164
5062
  }();
4165
- var CancelToken$1 = CancelToken;
4166
5063
 
4167
5064
  /**
4168
5065
  * Syntactic sugar for invoking a function and expanding an array for arguments.
@@ -4279,7 +5176,6 @@
4279
5176
  value = _ref2[1];
4280
5177
  HttpStatusCode[value] = key;
4281
5178
  });
4282
- var HttpStatusCode$1 = HttpStatusCode;
4283
5179
 
4284
5180
  /**
4285
5181
  * Create an instance of Axios
@@ -4289,11 +5185,11 @@
4289
5185
  * @returns {Axios} A new instance of Axios
4290
5186
  */
4291
5187
  function createInstance(defaultConfig) {
4292
- var context = new Axios$1(defaultConfig);
4293
- var instance = bind(Axios$1.prototype.request, context);
5188
+ var context = new Axios(defaultConfig);
5189
+ var instance = bind(Axios.prototype.request, context);
4294
5190
 
4295
5191
  // Copy axios.prototype to instance
4296
- utils$1.extend(instance, Axios$1.prototype, context, {
5192
+ utils$1.extend(instance, Axios.prototype, context, {
4297
5193
  allOwnKeys: true
4298
5194
  });
4299
5195
 
@@ -4310,20 +5206,20 @@
4310
5206
  }
4311
5207
 
4312
5208
  // Create the default instance to be exported
4313
- var axios = createInstance(defaults$1);
5209
+ var axios = createInstance(defaults);
4314
5210
 
4315
5211
  // Expose Axios class to allow class inheritance
4316
- axios.Axios = Axios$1;
5212
+ axios.Axios = Axios;
4317
5213
 
4318
5214
  // Expose Cancel & CancelToken
4319
- axios.CanceledError = CanceledError$1;
4320
- axios.CancelToken = CancelToken$1;
5215
+ axios.CanceledError = CanceledError;
5216
+ axios.CancelToken = CancelToken;
4321
5217
  axios.isCancel = isCancel;
4322
5218
  axios.VERSION = VERSION;
4323
5219
  axios.toFormData = toFormData;
4324
5220
 
4325
5221
  // Expose AxiosError class
4326
- axios.AxiosError = AxiosError$1;
5222
+ axios.AxiosError = AxiosError;
4327
5223
 
4328
5224
  // alias for CanceledError for backward compatibility
4329
5225
  axios.Cancel = axios.CanceledError;
@@ -4339,12 +5235,12 @@
4339
5235
 
4340
5236
  // Expose mergeConfig
4341
5237
  axios.mergeConfig = mergeConfig;
4342
- axios.AxiosHeaders = AxiosHeaders$1;
5238
+ axios.AxiosHeaders = AxiosHeaders;
4343
5239
  axios.formToJSON = function (thing) {
4344
5240
  return formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
4345
5241
  };
4346
5242
  axios.getAdapter = adapters.getAdapter;
4347
- axios.HttpStatusCode = HttpStatusCode$1;
5243
+ axios.HttpStatusCode = HttpStatusCode;
4348
5244
  axios["default"] = axios;
4349
5245
 
4350
5246
  return axios;