@dbmx/confy 0.0.77 → 0.0.84

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 (275) hide show
  1. package/esm/_virtual/browser.js +4 -0
  2. package/esm/_virtual/browser.js.map +1 -0
  3. package/esm/_virtual/index15.js +4 -0
  4. package/esm/_virtual/index15.js.map +1 -0
  5. package/esm/_virtual/index16.js +4 -0
  6. package/esm/_virtual/index16.js.map +1 -0
  7. package/esm/_virtual/index17.js +4 -0
  8. package/esm/_virtual/index17.js.map +1 -0
  9. package/esm/_virtual/index18.js +4 -0
  10. package/esm/_virtual/index18.js.map +1 -0
  11. package/esm/_virtual/node.js +4 -0
  12. package/esm/_virtual/node.js.map +1 -0
  13. package/esm/_virtual/serialOrdered.js +4 -0
  14. package/esm/_virtual/serialOrdered.js.map +1 -0
  15. package/esm/components/Confy/index.js +1 -1
  16. package/esm/components/Confy/index.js.map +1 -1
  17. package/esm/node_modules/@dbmx/semver/dist/index.esm.js +4 -2
  18. package/esm/node_modules/@dbmx/semver/dist/index.esm.js.map +1 -1
  19. package/esm/node_modules/@dbmx/users/esm/roles.js +5 -0
  20. package/esm/node_modules/@dbmx/users/esm/roles.js.map +1 -1
  21. package/esm/node_modules/asynckit/index.js +13 -0
  22. package/esm/node_modules/asynckit/index.js.map +1 -0
  23. package/esm/node_modules/asynckit/lib/abort.js +32 -0
  24. package/esm/node_modules/asynckit/lib/abort.js.map +1 -0
  25. package/esm/node_modules/asynckit/lib/async.js +39 -0
  26. package/esm/node_modules/asynckit/lib/async.js.map +1 -0
  27. package/esm/node_modules/asynckit/lib/defer.js +29 -0
  28. package/esm/node_modules/asynckit/lib/defer.js.map +1 -0
  29. package/esm/node_modules/asynckit/lib/iterate.js +81 -0
  30. package/esm/node_modules/asynckit/lib/iterate.js.map +1 -0
  31. package/esm/node_modules/asynckit/lib/state.js +40 -0
  32. package/esm/node_modules/asynckit/lib/state.js.map +1 -0
  33. package/esm/node_modules/asynckit/lib/terminator.js +35 -0
  34. package/esm/node_modules/asynckit/lib/terminator.js.map +1 -0
  35. package/esm/node_modules/asynckit/parallel.js +50 -0
  36. package/esm/node_modules/asynckit/parallel.js.map +1 -0
  37. package/esm/node_modules/asynckit/serial.js +22 -0
  38. package/esm/node_modules/asynckit/serial.js.map +1 -0
  39. package/esm/node_modules/asynckit/serialOrdered.js +85 -0
  40. package/esm/node_modules/asynckit/serialOrdered.js.map +1 -0
  41. package/esm/node_modules/axios/index.js +26 -0
  42. package/esm/node_modules/axios/index.js.map +1 -0
  43. package/esm/node_modules/axios/lib/adapters/adapters.js +133 -0
  44. package/esm/node_modules/axios/lib/adapters/adapters.js.map +1 -0
  45. package/esm/node_modules/axios/lib/adapters/fetch.js +331 -0
  46. package/esm/node_modules/axios/lib/adapters/fetch.js.map +1 -0
  47. package/esm/node_modules/axios/lib/adapters/http.js +945 -0
  48. package/esm/node_modules/axios/lib/adapters/http.js.map +1 -0
  49. package/esm/node_modules/axios/lib/adapters/xhr.js +225 -0
  50. package/esm/node_modules/axios/lib/adapters/xhr.js.map +1 -0
  51. package/esm/node_modules/axios/lib/axios.js +87 -0
  52. package/esm/node_modules/axios/lib/axios.js.map +1 -0
  53. package/esm/node_modules/axios/lib/cancel/CancelToken.js +134 -0
  54. package/esm/node_modules/axios/lib/cancel/CancelToken.js.map +1 -0
  55. package/esm/node_modules/axios/lib/cancel/CanceledError.js +21 -0
  56. package/esm/node_modules/axios/lib/cancel/CanceledError.js.map +1 -0
  57. package/esm/node_modules/axios/lib/cancel/isCancel.js +6 -0
  58. package/esm/node_modules/axios/lib/cancel/isCancel.js.map +1 -0
  59. package/esm/node_modules/axios/lib/core/Axios.js +260 -0
  60. package/esm/node_modules/axios/lib/core/Axios.js.map +1 -0
  61. package/esm/node_modules/axios/lib/core/AxiosError.js +89 -0
  62. package/esm/node_modules/axios/lib/core/AxiosError.js.map +1 -0
  63. package/esm/node_modules/axios/lib/core/AxiosHeaders.js +343 -0
  64. package/esm/node_modules/axios/lib/core/AxiosHeaders.js.map +1 -0
  65. package/esm/node_modules/axios/lib/core/InterceptorManager.js +71 -0
  66. package/esm/node_modules/axios/lib/core/InterceptorManager.js.map +1 -0
  67. package/esm/node_modules/axios/lib/core/buildFullPath.js +23 -0
  68. package/esm/node_modules/axios/lib/core/buildFullPath.js.map +1 -0
  69. package/esm/node_modules/axios/lib/core/dispatchRequest.js +78 -0
  70. package/esm/node_modules/axios/lib/core/dispatchRequest.js.map +1 -0
  71. package/esm/node_modules/axios/lib/core/mergeConfig.js +108 -0
  72. package/esm/node_modules/axios/lib/core/mergeConfig.js.map +1 -0
  73. package/esm/node_modules/axios/lib/core/settle.js +32 -0
  74. package/esm/node_modules/axios/lib/core/settle.js.map +1 -0
  75. package/esm/node_modules/axios/lib/core/transformData.js +29 -0
  76. package/esm/node_modules/axios/lib/core/transformData.js.map +1 -0
  77. package/esm/node_modules/axios/lib/defaults/index.js +171 -0
  78. package/esm/node_modules/axios/lib/defaults/index.js.map +1 -0
  79. package/esm/node_modules/axios/lib/defaults/transitional.js +9 -0
  80. package/esm/node_modules/axios/lib/defaults/transitional.js.map +1 -0
  81. package/esm/node_modules/axios/lib/env/data.js +4 -0
  82. package/esm/node_modules/axios/lib/env/data.js.map +1 -0
  83. package/esm/node_modules/axios/lib/helpers/AxiosTransformStream.js +155 -0
  84. package/esm/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +1 -0
  85. package/esm/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +61 -0
  86. package/esm/node_modules/axios/lib/helpers/AxiosURLSearchParams.js.map +1 -0
  87. package/esm/node_modules/axios/lib/helpers/HttpStatusCode.js +78 -0
  88. package/esm/node_modules/axios/lib/helpers/HttpStatusCode.js.map +1 -0
  89. package/esm/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
  90. package/esm/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +1 -0
  91. package/esm/node_modules/axios/lib/helpers/bind.js +15 -0
  92. package/esm/node_modules/axios/lib/helpers/bind.js.map +1 -0
  93. package/esm/node_modules/axios/lib/helpers/buildURL.js +67 -0
  94. package/esm/node_modules/axios/lib/helpers/buildURL.js.map +1 -0
  95. package/esm/node_modules/axios/lib/helpers/callbackify.js +19 -0
  96. package/esm/node_modules/axios/lib/helpers/callbackify.js.map +1 -0
  97. package/esm/node_modules/axios/lib/helpers/combineURLs.js +16 -0
  98. package/esm/node_modules/axios/lib/helpers/combineURLs.js.map +1 -0
  99. package/esm/node_modules/axios/lib/helpers/composeSignals.js +57 -0
  100. package/esm/node_modules/axios/lib/helpers/composeSignals.js.map +1 -0
  101. package/esm/node_modules/axios/lib/helpers/cookies.js +51 -0
  102. package/esm/node_modules/axios/lib/helpers/cookies.js.map +1 -0
  103. package/esm/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +76 -0
  104. package/esm/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js.map +1 -0
  105. package/esm/node_modules/axios/lib/helpers/formDataToJSON.js +94 -0
  106. package/esm/node_modules/axios/lib/helpers/formDataToJSON.js.map +1 -0
  107. package/esm/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  108. package/esm/node_modules/axios/lib/helpers/formDataToStream.js.map +1 -0
  109. package/esm/node_modules/axios/lib/helpers/fromDataURI.js +54 -0
  110. package/esm/node_modules/axios/lib/helpers/fromDataURI.js.map +1 -0
  111. package/esm/node_modules/axios/lib/helpers/isAbsoluteURL.js +20 -0
  112. package/esm/node_modules/axios/lib/helpers/isAbsoluteURL.js.map +1 -0
  113. package/esm/node_modules/axios/lib/helpers/isAxiosError.js +15 -0
  114. package/esm/node_modules/axios/lib/helpers/isAxiosError.js.map +1 -0
  115. package/esm/node_modules/axios/lib/helpers/isURLSameOrigin.js +19 -0
  116. package/esm/node_modules/axios/lib/helpers/isURLSameOrigin.js.map +1 -0
  117. package/esm/node_modules/axios/lib/helpers/parseHeaders.js +70 -0
  118. package/esm/node_modules/axios/lib/helpers/parseHeaders.js.map +1 -0
  119. package/esm/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
  120. package/esm/node_modules/axios/lib/helpers/parseProtocol.js.map +1 -0
  121. package/esm/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  122. package/esm/node_modules/axios/lib/helpers/progressEventReducer.js.map +1 -0
  123. package/esm/node_modules/axios/lib/helpers/readBlob.js +16 -0
  124. package/esm/node_modules/axios/lib/helpers/readBlob.js.map +1 -0
  125. package/esm/node_modules/axios/lib/helpers/resolveConfig.js +73 -0
  126. package/esm/node_modules/axios/lib/helpers/resolveConfig.js.map +1 -0
  127. package/esm/node_modules/axios/lib/helpers/speedometer.js +54 -0
  128. package/esm/node_modules/axios/lib/helpers/speedometer.js.map +1 -0
  129. package/esm/node_modules/axios/lib/helpers/spread.js +29 -0
  130. package/esm/node_modules/axios/lib/helpers/spread.js.map +1 -0
  131. package/esm/node_modules/axios/lib/helpers/throttle.js +45 -0
  132. package/esm/node_modules/axios/lib/helpers/throttle.js.map +1 -0
  133. package/esm/node_modules/axios/lib/helpers/toFormData.js +239 -0
  134. package/esm/node_modules/axios/lib/helpers/toFormData.js.map +1 -0
  135. package/esm/node_modules/axios/lib/helpers/toURLEncodedForm.js +20 -0
  136. package/esm/node_modules/axios/lib/helpers/toURLEncodedForm.js.map +1 -0
  137. package/esm/node_modules/axios/lib/helpers/trackStream.js +92 -0
  138. package/esm/node_modules/axios/lib/helpers/trackStream.js.map +1 -0
  139. package/esm/node_modules/axios/lib/helpers/validator.js +111 -0
  140. package/esm/node_modules/axios/lib/helpers/validator.js.map +1 -0
  141. package/esm/node_modules/axios/lib/platform/common/utils.js +47 -0
  142. package/esm/node_modules/axios/lib/platform/common/utils.js.map +1 -0
  143. package/esm/node_modules/axios/lib/platform/index.js +10 -0
  144. package/esm/node_modules/axios/lib/platform/index.js.map +1 -0
  145. package/esm/node_modules/axios/lib/platform/node/classes/FormData.js +6 -0
  146. package/esm/node_modules/axios/lib/platform/node/classes/FormData.js.map +1 -0
  147. package/esm/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +6 -0
  148. package/esm/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +1 -0
  149. package/esm/node_modules/axios/lib/platform/node/index.js +40 -0
  150. package/esm/node_modules/axios/lib/platform/node/index.js.map +1 -0
  151. package/esm/node_modules/axios/lib/utils.js +920 -0
  152. package/esm/node_modules/axios/lib/utils.js.map +1 -0
  153. package/esm/node_modules/call-bind-apply-helpers/node_modules/function-bind/implementation.js +66 -0
  154. package/esm/node_modules/call-bind-apply-helpers/node_modules/function-bind/implementation.js.map +1 -0
  155. package/esm/node_modules/call-bind-apply-helpers/node_modules/function-bind/index.js +7 -0
  156. package/esm/node_modules/call-bind-apply-helpers/node_modules/function-bind/index.js.map +1 -0
  157. package/esm/node_modules/combined-stream/lib/combined_stream.js +215 -0
  158. package/esm/node_modules/combined-stream/lib/combined_stream.js.map +1 -0
  159. package/esm/node_modules/debug/src/browser.js +287 -0
  160. package/esm/node_modules/debug/src/browser.js.map +1 -0
  161. package/esm/node_modules/debug/src/common.js +304 -0
  162. package/esm/node_modules/debug/src/common.js.map +1 -0
  163. package/esm/node_modules/debug/src/index.js +24 -0
  164. package/esm/node_modules/debug/src/index.js.map +1 -0
  165. package/esm/node_modules/debug/src/node.js +281 -0
  166. package/esm/node_modules/debug/src/node.js.map +1 -0
  167. package/esm/node_modules/deep-equal/node_modules/has-symbols/index.js +22 -0
  168. package/esm/node_modules/deep-equal/node_modules/has-symbols/index.js.map +1 -0
  169. package/esm/node_modules/deep-equal/node_modules/has-symbols/shams.js +58 -0
  170. package/esm/node_modules/deep-equal/node_modules/has-symbols/shams.js.map +1 -0
  171. package/esm/node_modules/deep-equal/node_modules/has-tostringtag/shams.js +9 -0
  172. package/esm/node_modules/deep-equal/node_modules/has-tostringtag/shams.js.map +1 -0
  173. package/esm/node_modules/deep-equal/node_modules/is-regex/index.js +53 -0
  174. package/esm/node_modules/deep-equal/node_modules/is-regex/index.js.map +1 -0
  175. package/esm/node_modules/deep-equal/node_modules/is-regex/node_modules/call-bind/callBound.js +16 -0
  176. package/esm/node_modules/deep-equal/node_modules/is-regex/node_modules/call-bind/callBound.js.map +1 -0
  177. package/esm/node_modules/deep-equal/node_modules/is-regex/node_modules/call-bind/index.js +53 -0
  178. package/esm/node_modules/deep-equal/node_modules/is-regex/node_modules/call-bind/index.js.map +1 -0
  179. package/esm/node_modules/deep-equal/node_modules/is-regex/node_modules/get-intrinsic/index.js +307 -0
  180. package/esm/node_modules/deep-equal/node_modules/is-regex/node_modules/get-intrinsic/index.js.map +1 -0
  181. package/esm/node_modules/delayed-stream/lib/delayed_stream.js +113 -0
  182. package/esm/node_modules/delayed-stream/lib/delayed_stream.js.map +1 -0
  183. package/esm/node_modules/es-set-tostringtag/index.js +41 -0
  184. package/esm/node_modules/es-set-tostringtag/index.js.map +1 -0
  185. package/esm/node_modules/follow-redirects/debug.js +20 -0
  186. package/esm/node_modules/follow-redirects/debug.js.map +1 -0
  187. package/esm/node_modules/follow-redirects/index.js +701 -0
  188. package/esm/node_modules/follow-redirects/index.js.map +1 -0
  189. package/esm/node_modules/form-data/lib/form_data.js +514 -0
  190. package/esm/node_modules/form-data/lib/form_data.js.map +1 -0
  191. package/esm/node_modules/form-data/lib/populate.js +11 -0
  192. package/esm/node_modules/form-data/lib/populate.js.map +1 -0
  193. package/esm/node_modules/get-intrinsic/node_modules/function-bind/implementation.js +75 -0
  194. package/esm/node_modules/get-intrinsic/node_modules/function-bind/implementation.js.map +1 -0
  195. package/esm/node_modules/get-intrinsic/node_modules/function-bind/index.js +16 -0
  196. package/esm/node_modules/get-intrinsic/node_modules/function-bind/index.js.map +1 -0
  197. package/esm/node_modules/has/src/index.js +7 -0
  198. package/esm/node_modules/has/src/index.js.map +1 -0
  199. package/esm/node_modules/has-flag/index.js +18 -0
  200. package/esm/node_modules/has-flag/index.js.map +1 -0
  201. package/esm/node_modules/hasown/node_modules/function-bind/implementation.js +75 -0
  202. package/esm/node_modules/hasown/node_modules/function-bind/implementation.js.map +1 -0
  203. package/esm/node_modules/hasown/node_modules/function-bind/index.js +16 -0
  204. package/esm/node_modules/hasown/node_modules/function-bind/index.js.map +1 -0
  205. package/esm/node_modules/is-boolean-object/node_modules/call-bind/callBound.js +16 -0
  206. package/esm/node_modules/is-boolean-object/node_modules/call-bind/callBound.js.map +1 -0
  207. package/esm/node_modules/is-boolean-object/node_modules/call-bind/index.js +53 -0
  208. package/esm/node_modules/is-boolean-object/node_modules/call-bind/index.js.map +1 -0
  209. package/esm/node_modules/is-boolean-object/node_modules/get-intrinsic/index.js +307 -0
  210. package/esm/node_modules/is-boolean-object/node_modules/get-intrinsic/index.js.map +1 -0
  211. package/esm/node_modules/is-boolean-object/node_modules/has-symbols/index.js +22 -0
  212. package/esm/node_modules/is-boolean-object/node_modules/has-symbols/index.js.map +1 -0
  213. package/esm/node_modules/is-boolean-object/node_modules/has-symbols/shams.js +67 -0
  214. package/esm/node_modules/is-boolean-object/node_modules/has-symbols/shams.js.map +1 -0
  215. package/esm/node_modules/is-boolean-object/node_modules/has-tostringtag/shams.js +18 -0
  216. package/esm/node_modules/is-boolean-object/node_modules/has-tostringtag/shams.js.map +1 -0
  217. package/esm/node_modules/is-number-object/node_modules/has-symbols/shams.js +58 -0
  218. package/esm/node_modules/is-number-object/node_modules/has-symbols/shams.js.map +1 -0
  219. package/esm/node_modules/is-number-object/node_modules/has-tostringtag/shams.js +9 -0
  220. package/esm/node_modules/is-number-object/node_modules/has-tostringtag/shams.js.map +1 -0
  221. package/esm/node_modules/is-string/node_modules/has-symbols/shams.js +58 -0
  222. package/esm/node_modules/is-string/node_modules/has-symbols/shams.js.map +1 -0
  223. package/esm/node_modules/is-string/node_modules/has-tostringtag/shams.js +9 -0
  224. package/esm/node_modules/is-string/node_modules/has-tostringtag/shams.js.map +1 -0
  225. package/esm/node_modules/is-symbol/node_modules/has-symbols/index.js +22 -0
  226. package/esm/node_modules/is-symbol/node_modules/has-symbols/index.js.map +1 -0
  227. package/esm/node_modules/is-symbol/node_modules/has-symbols/shams.js +58 -0
  228. package/esm/node_modules/is-symbol/node_modules/has-symbols/shams.js.map +1 -0
  229. package/esm/node_modules/mime-db/db.json.js +10705 -0
  230. package/esm/node_modules/mime-db/db.json.js.map +1 -0
  231. package/esm/node_modules/mime-db/index.js +17 -0
  232. package/esm/node_modules/mime-db/index.js.map +1 -0
  233. package/esm/node_modules/mime-types/index.js +194 -0
  234. package/esm/node_modules/mime-types/index.js.map +1 -0
  235. package/esm/node_modules/ms/index.js +173 -0
  236. package/esm/node_modules/ms/index.js.map +1 -0
  237. package/esm/node_modules/proxy-from-env/index.js +112 -0
  238. package/esm/node_modules/proxy-from-env/index.js.map +1 -0
  239. package/esm/node_modules/side-channel/node_modules/call-bind/callBound.js +16 -0
  240. package/esm/node_modules/side-channel/node_modules/call-bind/callBound.js.map +1 -0
  241. package/esm/node_modules/side-channel/node_modules/call-bind/index.js +53 -0
  242. package/esm/node_modules/side-channel/node_modules/call-bind/index.js.map +1 -0
  243. package/esm/node_modules/side-channel/node_modules/get-intrinsic/index.js +307 -0
  244. package/esm/node_modules/side-channel/node_modules/get-intrinsic/index.js.map +1 -0
  245. package/esm/node_modules/side-channel/node_modules/has-symbols/index.js +22 -0
  246. package/esm/node_modules/side-channel/node_modules/has-symbols/index.js.map +1 -0
  247. package/esm/node_modules/side-channel/node_modules/has-symbols/shams.js +58 -0
  248. package/esm/node_modules/side-channel/node_modules/has-symbols/shams.js.map +1 -0
  249. package/esm/node_modules/side-channel/node_modules/object-inspect/index.js +469 -0
  250. package/esm/node_modules/side-channel/node_modules/object-inspect/index.js.map +1 -0
  251. package/esm/node_modules/side-channel/node_modules/object-inspect/util.inspect.js +6 -0
  252. package/esm/node_modules/side-channel/node_modules/object-inspect/util.inspect.js.map +1 -0
  253. package/esm/node_modules/supports-color/index.js +149 -0
  254. package/esm/node_modules/supports-color/index.js.map +1 -0
  255. package/package.json +3 -3
  256. package/esm/lib/api/apiKeys.js +0 -51
  257. package/esm/lib/api/apiKeys.js.map +0 -1
  258. package/esm/lib/api/dataBuckets.js +0 -18
  259. package/esm/lib/api/dataBuckets.js.map +0 -1
  260. package/esm/lib/api/jobs.js +0 -56
  261. package/esm/lib/api/jobs.js.map +0 -1
  262. package/esm/lib/api/members.js +0 -33
  263. package/esm/lib/api/members.js.map +0 -1
  264. package/esm/lib/api/people.js +0 -50
  265. package/esm/lib/api/people.js.map +0 -1
  266. package/esm/lib/api/roles.js +0 -17
  267. package/esm/lib/api/roles.js.map +0 -1
  268. package/esm/lib/api/routes.js +0 -43
  269. package/esm/lib/api/routes.js.map +0 -1
  270. package/esm/lib/api/servicesMap.js +0 -17
  271. package/esm/lib/api/servicesMap.js.map +0 -1
  272. package/esm/lib/api/spaces.js +0 -32
  273. package/esm/lib/api/spaces.js.map +0 -1
  274. package/esm/lib/api/storage.js +0 -94
  275. package/esm/lib/api/storage.js.map +0 -1
@@ -0,0 +1,54 @@
1
+ import AxiosError from '../core/AxiosError.js';
2
+ import parseProtocol from './parseProtocol.js';
3
+ import platform from '../platform/index.js';
4
+
5
+ const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
6
+
7
+ /**
8
+ * Parse data uri to a Buffer or Blob
9
+ *
10
+ * @param {String} uri
11
+ * @param {?Boolean} asBlob
12
+ * @param {?Object} options
13
+ * @param {?Function} options.Blob
14
+ *
15
+ * @returns {Buffer|Blob}
16
+ */
17
+ function fromDataURI(uri, asBlob, options) {
18
+ const _Blob = (options && options.Blob) || platform.classes.Blob;
19
+ const protocol = parseProtocol(uri);
20
+
21
+ if (asBlob === undefined && _Blob) {
22
+ asBlob = true;
23
+ }
24
+
25
+ if (protocol === 'data') {
26
+ uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
27
+
28
+ const match = DATA_URL_PATTERN.exec(uri);
29
+
30
+ if (!match) {
31
+ throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);
32
+ }
33
+
34
+ const mime = match[1];
35
+ const isBase64 = match[2];
36
+ const body = match[3];
37
+ const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');
38
+
39
+ if (asBlob) {
40
+ if (!_Blob) {
41
+ throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);
42
+ }
43
+
44
+ return new _Blob([buffer], { type: mime });
45
+ }
46
+
47
+ return buffer;
48
+ }
49
+
50
+ throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);
51
+ }
52
+
53
+ export { fromDataURI as default };
54
+ //# sourceMappingURL=fromDataURI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fromDataURI.js","sources":["../../../../../node_modules/axios/lib/helpers/fromDataURI.js"],"sourcesContent":["'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport parseProtocol from './parseProtocol.js';\nimport platform from '../platform/index.js';\n\nconst DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\\s\\S]*)$/;\n\n/**\n * Parse data uri to a Buffer or Blob\n *\n * @param {String} uri\n * @param {?Boolean} asBlob\n * @param {?Object} options\n * @param {?Function} options.Blob\n *\n * @returns {Buffer|Blob}\n */\nexport default function fromDataURI(uri, asBlob, options) {\n const _Blob = (options && options.Blob) || platform.classes.Blob;\n const protocol = parseProtocol(uri);\n\n if (asBlob === undefined && _Blob) {\n asBlob = true;\n }\n\n if (protocol === 'data') {\n uri = protocol.length ? uri.slice(protocol.length + 1) : uri;\n\n const match = DATA_URL_PATTERN.exec(uri);\n\n if (!match) {\n throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);\n }\n\n const mime = match[1];\n const isBase64 = match[2];\n const body = match[3];\n const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');\n\n if (asBlob) {\n if (!_Blob) {\n throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n\n return new _Blob([buffer], { type: mime });\n }\n\n return buffer;\n }\n\n throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);\n}\n"],"names":[],"mappings":";;;;AAMA,MAAM,gBAAgB,GAAG,+CAA+C;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAS,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;AAC1D,EAAE,MAAM,KAAK,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,OAAO,CAAC,IAAI;AAClE,EAAE,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC;;AAErC,EAAE,IAAI,MAAM,KAAK,SAAS,IAAI,KAAK,EAAE;AACrC,IAAI,MAAM,GAAG,IAAI;AACjB,EAAE;;AAEF,EAAE,IAAI,QAAQ,KAAK,MAAM,EAAE;AAC3B,IAAI,GAAG,GAAG,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG;;AAEhE,IAAI,MAAM,KAAK,GAAG,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC;;AAE5C,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,MAAM,MAAM,IAAI,UAAU,CAAC,aAAa,EAAE,UAAU,CAAC,eAAe,CAAC;AACrE,IAAI;;AAEJ,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC;AACzB,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC;AAC7B,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC;AACzB,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;;AAEtF,IAAI,IAAI,MAAM,EAAE;AAChB,MAAM,IAAI,CAAC,KAAK,EAAE;AAClB,QAAQ,MAAM,IAAI,UAAU,CAAC,uBAAuB,EAAE,UAAU,CAAC,eAAe,CAAC;AACjF,MAAM;;AAEN,MAAM,OAAO,IAAI,KAAK,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAChD,IAAI;;AAEJ,IAAI,OAAO,MAAM;AACjB,EAAE;;AAEF,EAAE,MAAM,IAAI,UAAU,CAAC,uBAAuB,GAAG,QAAQ,EAAE,UAAU,CAAC,eAAe,CAAC;AACtF;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Determines whether the specified URL is absolute
3
+ *
4
+ * @param {string} url The URL to test
5
+ *
6
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
7
+ */
8
+ function isAbsoluteURL(url) {
9
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
10
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
11
+ // by any combination of letters, digits, plus, period, or hyphen.
12
+ if (typeof url !== 'string') {
13
+ return false;
14
+ }
15
+
16
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
17
+ }
18
+
19
+ export { isAbsoluteURL as default };
20
+ //# sourceMappingURL=isAbsoluteURL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isAbsoluteURL.js","sources":["../../../../../node_modules/axios/lib/helpers/isAbsoluteURL.js"],"sourcesContent":["'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n if (typeof url !== 'string') {\n return false;\n }\n\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n"],"names":[],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAS,aAAa,CAAC,GAAG,EAAE;AAC3C;AACA;AACA;AACA,EAAE,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC/B,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF,EAAE,OAAO,6BAA6B,CAAC,IAAI,CAAC,GAAG,CAAC;AAChD;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,15 @@
1
+ import utils from '../utils.js';
2
+
3
+ /**
4
+ * Determines whether the payload is an error thrown by Axios
5
+ *
6
+ * @param {*} payload The value to test
7
+ *
8
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
9
+ */
10
+ function isAxiosError(payload) {
11
+ return utils.isObject(payload) && payload.isAxiosError === true;
12
+ }
13
+
14
+ export { isAxiosError as default };
15
+ //# sourceMappingURL=isAxiosError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isAxiosError.js","sources":["../../../../../node_modules/axios/lib/helpers/isAxiosError.js"],"sourcesContent":["'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && payload.isAxiosError === true;\n}\n"],"names":[],"mappings":";;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAS,YAAY,CAAC,OAAO,EAAE;AAC9C,EAAE,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI;AACjE;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,19 @@
1
+ import platform from '../platform/index.js';
2
+
3
+ var isURLSameOrigin = platform.hasStandardBrowserEnv
4
+ ? ((origin, isMSIE) => (url) => {
5
+ url = new URL(url, platform.origin);
6
+
7
+ return (
8
+ origin.protocol === url.protocol &&
9
+ origin.host === url.host &&
10
+ (isMSIE || origin.port === url.port)
11
+ );
12
+ })(
13
+ new URL(platform.origin),
14
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
15
+ )
16
+ : () => true;
17
+
18
+ export { isURLSameOrigin as default };
19
+ //# sourceMappingURL=isURLSameOrigin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isURLSameOrigin.js","sources":["../../../../../node_modules/axios/lib/helpers/isURLSameOrigin.js"],"sourcesContent":["import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n })(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n )\n : () => true;\n"],"names":[],"mappings":";;AAEA,sBAAe,QAAQ,CAAC;AACxB,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,CAAC,GAAG,KAAK;AAClC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC;;AAEzC,MAAM;AACN,QAAQ,MAAM,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ;AACxC,QAAQ,MAAM,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI;AAChC,SAAS,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI;AAC3C;AACA,IAAI,CAAC;AACL,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC;AAC9B,MAAM,QAAQ,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS;AAC/E;AACA,IAAI,MAAM,IAAI;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,70 @@
1
+ import utils from '../utils.js';
2
+
3
+ // RawAxiosHeaders whose duplicates are ignored by node
4
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
5
+ const ignoreDuplicateOf = utils.toObjectSet([
6
+ 'age',
7
+ 'authorization',
8
+ 'content-length',
9
+ 'content-type',
10
+ 'etag',
11
+ 'expires',
12
+ 'from',
13
+ 'host',
14
+ 'if-modified-since',
15
+ 'if-unmodified-since',
16
+ 'last-modified',
17
+ 'location',
18
+ 'max-forwards',
19
+ 'proxy-authorization',
20
+ 'referer',
21
+ 'retry-after',
22
+ 'user-agent',
23
+ ]);
24
+
25
+ /**
26
+ * Parse headers into an object
27
+ *
28
+ * ```
29
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
30
+ * Content-Type: application/json
31
+ * Connection: keep-alive
32
+ * Transfer-Encoding: chunked
33
+ * ```
34
+ *
35
+ * @param {String} rawHeaders Headers needing to be parsed
36
+ *
37
+ * @returns {Object} Headers parsed into an object
38
+ */
39
+ var parseHeaders = (rawHeaders) => {
40
+ const parsed = {};
41
+ let key;
42
+ let val;
43
+ let i;
44
+
45
+ rawHeaders &&
46
+ rawHeaders.split('\n').forEach(function parser(line) {
47
+ i = line.indexOf(':');
48
+ key = line.substring(0, i).trim().toLowerCase();
49
+ val = line.substring(i + 1).trim();
50
+
51
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
52
+ return;
53
+ }
54
+
55
+ if (key === 'set-cookie') {
56
+ if (parsed[key]) {
57
+ parsed[key].push(val);
58
+ } else {
59
+ parsed[key] = [val];
60
+ }
61
+ } else {
62
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
63
+ }
64
+ });
65
+
66
+ return parsed;
67
+ };
68
+
69
+ export { parseHeaders as default };
70
+ //# sourceMappingURL=parseHeaders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseHeaders.js","sources":["../../../../../node_modules/axios/lib/helpers/parseHeaders.js"],"sourcesContent":["'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age',\n 'authorization',\n 'content-length',\n 'content-type',\n 'etag',\n 'expires',\n 'from',\n 'host',\n 'if-modified-since',\n 'if-unmodified-since',\n 'last-modified',\n 'location',\n 'max-forwards',\n 'proxy-authorization',\n 'referer',\n 'retry-after',\n 'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders &&\n rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n"],"names":[],"mappings":";;AAIA;AACA;AACA,MAAM,iBAAiB,GAAG,KAAK,CAAC,WAAW,CAAC;AAC5C,EAAE,KAAK;AACP,EAAE,eAAe;AACjB,EAAE,gBAAgB;AAClB,EAAE,cAAc;AAChB,EAAE,MAAM;AACR,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,mBAAmB;AACrB,EAAE,qBAAqB;AACvB,EAAE,eAAe;AACjB,EAAE,UAAU;AACZ,EAAE,cAAc;AAChB,EAAE,qBAAqB;AACvB,EAAE,SAAS;AACX,EAAE,aAAa;AACf,EAAE,YAAY;AACd,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAe,CAAC,UAAU,KAAK;AAC/B,EAAE,MAAM,MAAM,GAAG,EAAE;AACnB,EAAE,IAAI,GAAG;AACT,EAAE,IAAI,GAAG;AACT,EAAE,IAAI,CAAC;;AAEP,EAAE,UAAU;AACZ,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,MAAM,CAAC,IAAI,EAAE;AACzD,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AAC3B,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;AACrD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE;;AAExC,MAAM,IAAI,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,IAAI,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAAE;AAC3D,QAAQ;AACR,MAAM;;AAEN,MAAM,IAAI,GAAG,KAAK,YAAY,EAAE;AAChC,QAAQ,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;AACzB,UAAU,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/B,QAAQ,CAAC,MAAM;AACf,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;AAC7B,QAAQ;AACR,MAAM,CAAC,MAAM;AACb,QAAQ,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG;AAClE,MAAM;AACN,IAAI,CAAC,CAAC;;AAEN,EAAE,OAAO,MAAM;AACf,CAAC;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,7 @@
1
+ function parseProtocol(url) {
2
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
3
+ return (match && match[1]) || '';
4
+ }
5
+
6
+ export { parseProtocol as default };
7
+ //# sourceMappingURL=parseProtocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseProtocol.js","sources":["../../../../../node_modules/axios/lib/helpers/parseProtocol.js"],"sourcesContent":["'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return (match && match[1]) || '';\n}\n"],"names":[],"mappings":"AAEe,SAAS,aAAa,CAAC,GAAG,EAAE;AAC3C,EAAE,MAAM,KAAK,GAAG,2BAA2B,CAAC,IAAI,CAAC,GAAG,CAAC;AACrD,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE;AAClC;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,54 @@
1
+ import speedometer from './speedometer.js';
2
+ import throttle from './throttle.js';
3
+ import utils from '../utils.js';
4
+
5
+ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
6
+ let bytesNotified = 0;
7
+ const _speedometer = speedometer(50, 250);
8
+
9
+ return throttle((e) => {
10
+ const loaded = e.loaded;
11
+ const total = e.lengthComputable ? e.total : undefined;
12
+ const progressBytes = loaded - bytesNotified;
13
+ const rate = _speedometer(progressBytes);
14
+ const inRange = loaded <= total;
15
+
16
+ bytesNotified = loaded;
17
+
18
+ const data = {
19
+ loaded,
20
+ total,
21
+ progress: total ? loaded / total : undefined,
22
+ bytes: progressBytes,
23
+ rate: rate ? rate : undefined,
24
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
25
+ event: e,
26
+ lengthComputable: total != null,
27
+ [isDownloadStream ? 'download' : 'upload']: true,
28
+ };
29
+
30
+ listener(data);
31
+ }, freq);
32
+ };
33
+
34
+ const progressEventDecorator = (total, throttled) => {
35
+ const lengthComputable = total != null;
36
+
37
+ return [
38
+ (loaded) =>
39
+ throttled[0]({
40
+ lengthComputable,
41
+ total,
42
+ loaded,
43
+ }),
44
+ throttled[1],
45
+ ];
46
+ };
47
+
48
+ const asyncDecorator =
49
+ (fn) =>
50
+ (...args) =>
51
+ utils.asap(() => fn(...args));
52
+
53
+ export { asyncDecorator, progressEventDecorator, progressEventReducer };
54
+ //# sourceMappingURL=progressEventReducer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progressEventReducer.js","sources":["../../../../../node_modules/axios/lib/helpers/progressEventReducer.js"],"sourcesContent":["import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle((e) => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true,\n };\n\n listener(data);\n }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [\n (loaded) =>\n throttled[0]({\n lengthComputable,\n total,\n loaded,\n }),\n throttled[1],\n ];\n};\n\nexport const asyncDecorator =\n (fn) =>\n (...args) =>\n utils.asap(() => fn(...args));\n"],"names":[],"mappings":";;;;AAIY,MAAC,oBAAoB,GAAG,CAAC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,GAAG,CAAC,KAAK;AAC9E,EAAE,IAAI,aAAa,GAAG,CAAC;AACvB,EAAE,MAAM,YAAY,GAAG,WAAW,CAAC,EAAE,EAAE,GAAG,CAAC;;AAE3C,EAAE,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK;AACzB,IAAI,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM;AAC3B,IAAI,MAAM,KAAK,GAAG,CAAC,CAAC,gBAAgB,GAAG,CAAC,CAAC,KAAK,GAAG,SAAS;AAC1D,IAAI,MAAM,aAAa,GAAG,MAAM,GAAG,aAAa;AAChD,IAAI,MAAM,IAAI,GAAG,YAAY,CAAC,aAAa,CAAC;AAC5C,IAAI,MAAM,OAAO,GAAG,MAAM,IAAI,KAAK;;AAEnC,IAAI,aAAa,GAAG,MAAM;;AAE1B,IAAI,MAAM,IAAI,GAAG;AACjB,MAAM,MAAM;AACZ,MAAM,KAAK;AACX,MAAM,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS;AAClD,MAAM,KAAK,EAAE,aAAa;AAC1B,MAAM,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS;AACnC,MAAM,SAAS,EAAE,IAAI,IAAI,KAAK,IAAI,OAAO,GAAG,CAAC,KAAK,GAAG,MAAM,IAAI,IAAI,GAAG,SAAS;AAC/E,MAAM,KAAK,EAAE,CAAC;AACd,MAAM,gBAAgB,EAAE,KAAK,IAAI,IAAI;AACrC,MAAM,CAAC,gBAAgB,GAAG,UAAU,GAAG,QAAQ,GAAG,IAAI;AACtD,KAAK;;AAEL,IAAI,QAAQ,CAAC,IAAI,CAAC;AAClB,EAAE,CAAC,EAAE,IAAI,CAAC;AACV;;AAEY,MAAC,sBAAsB,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK;AAC5D,EAAE,MAAM,gBAAgB,GAAG,KAAK,IAAI,IAAI;;AAExC,EAAE,OAAO;AACT,IAAI,CAAC,MAAM;AACX,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC;AACnB,QAAQ,gBAAgB;AACxB,QAAQ,KAAK;AACb,QAAQ,MAAM;AACd,OAAO,CAAC;AACR,IAAI,SAAS,CAAC,CAAC,CAAC;AAChB,GAAG;AACH;;AAEY,MAAC,cAAc;AAC3B,EAAE,CAAC,EAAE;AACL,EAAE,CAAC,GAAG,IAAI;AACV,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,16 @@
1
+ const { asyncIterator } = Symbol;
2
+
3
+ const readBlob = async function* (blob) {
4
+ if (blob.stream) {
5
+ yield* blob.stream();
6
+ } else if (blob.arrayBuffer) {
7
+ yield await blob.arrayBuffer();
8
+ } else if (blob[asyncIterator]) {
9
+ yield* blob[asyncIterator]();
10
+ } else {
11
+ yield blob;
12
+ }
13
+ };
14
+
15
+ export { readBlob as default };
16
+ //# sourceMappingURL=readBlob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readBlob.js","sources":["../../../../../node_modules/axios/lib/helpers/readBlob.js"],"sourcesContent":["const { asyncIterator } = Symbol;\n\nconst readBlob = async function* (blob) {\n if (blob.stream) {\n yield* blob.stream();\n } else if (blob.arrayBuffer) {\n yield await blob.arrayBuffer();\n } else if (blob[asyncIterator]) {\n yield* blob[asyncIterator]();\n } else {\n yield blob;\n }\n};\n\nexport default readBlob;\n"],"names":[],"mappings":"AAAA,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM;;AAE3B,MAAC,QAAQ,GAAG,iBAAiB,IAAI,EAAE;AACxC,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;AACnB,IAAI,OAAO,IAAI,CAAC,MAAM,EAAE;AACxB,EAAE,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE;AAC/B,IAAI,MAAM,MAAM,IAAI,CAAC,WAAW,EAAE;AAClC,EAAE,CAAC,MAAM,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE;AAClC,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,EAAE;AAChC,EAAE,CAAC,MAAM;AACT,IAAI,MAAM,IAAI;AACd,EAAE;AACF;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,73 @@
1
+ import platform from '../platform/index.js';
2
+ import utils from '../utils.js';
3
+ import isURLSameOrigin from './isURLSameOrigin.js';
4
+ import cookies from './cookies.js';
5
+ import buildFullPath from '../core/buildFullPath.js';
6
+ import mergeConfig from '../core/mergeConfig.js';
7
+ import AxiosHeaders from '../core/AxiosHeaders.js';
8
+ import buildURL from './buildURL.js';
9
+
10
+ var resolveConfig = (config) => {
11
+ const newConfig = mergeConfig({}, config);
12
+
13
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
14
+
15
+ newConfig.headers = headers = AxiosHeaders.from(headers);
16
+
17
+ newConfig.url = buildURL(
18
+ buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
19
+ config.params,
20
+ config.paramsSerializer
21
+ );
22
+
23
+ // HTTP basic authentication
24
+ if (auth) {
25
+ headers.set(
26
+ 'Authorization',
27
+ 'Basic ' +
28
+ btoa(
29
+ (auth.username || '') +
30
+ ':' +
31
+ (auth.password ? unescape(encodeURIComponent(auth.password)) : '')
32
+ )
33
+ );
34
+ }
35
+
36
+ if (utils.isFormData(data)) {
37
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
38
+ headers.setContentType(undefined); // browser handles it
39
+ } else if (utils.isFunction(data.getHeaders)) {
40
+ // Node.js FormData (like form-data package)
41
+ const formHeaders = data.getHeaders();
42
+ // Only set safe headers to avoid overwriting security headers
43
+ const allowedHeaders = ['content-type', 'content-length'];
44
+ Object.entries(formHeaders).forEach(([key, val]) => {
45
+ if (allowedHeaders.includes(key.toLowerCase())) {
46
+ headers.set(key, val);
47
+ }
48
+ });
49
+ }
50
+ }
51
+
52
+ // Add xsrf header
53
+ // This is only done if running in a standard browser environment.
54
+ // Specifically not if we're in a web worker, or react-native.
55
+
56
+ if (platform.hasStandardBrowserEnv) {
57
+ withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
58
+
59
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
60
+ // Add xsrf header
61
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
62
+
63
+ if (xsrfValue) {
64
+ headers.set(xsrfHeaderName, xsrfValue);
65
+ }
66
+ }
67
+ }
68
+
69
+ return newConfig;
70
+ };
71
+
72
+ export { resolveConfig as default };
73
+ //# sourceMappingURL=resolveConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveConfig.js","sources":["../../../../../node_modules/axios/lib/helpers/resolveConfig.js"],"sourcesContent":["import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport buildURL from './buildURL.js';\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(\n buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),\n config.params,\n config.paramsSerializer\n );\n\n // HTTP basic authentication\n if (auth) {\n headers.set(\n 'Authorization',\n 'Basic ' +\n btoa(\n (auth.username || '') +\n ':' +\n (auth.password ? unescape(encodeURIComponent(auth.password)) : '')\n )\n );\n }\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // browser handles it\n } else if (utils.isFunction(data.getHeaders)) {\n // Node.js FormData (like form-data package)\n const formHeaders = data.getHeaders();\n // Only set safe headers to avoid overwriting security headers\n const allowedHeaders = ['content-type', 'content-length'];\n Object.entries(formHeaders).forEach(([key, val]) => {\n if (allowedHeaders.includes(key.toLowerCase())) {\n headers.set(key, val);\n }\n });\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n};\n"],"names":[],"mappings":";;;;;;;;;AASA,oBAAe,CAAC,MAAM,KAAK;AAC3B,EAAE,MAAM,SAAS,GAAG,WAAW,CAAC,EAAE,EAAE,MAAM,CAAC;;AAE3C,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;;AAExF,EAAE,SAAS,CAAC,OAAO,GAAG,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC;;AAE1D,EAAE,SAAS,CAAC,GAAG,GAAG,QAAQ;AAC1B,IAAI,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,iBAAiB,CAAC;AAChF,IAAI,MAAM,CAAC,MAAM;AACjB,IAAI,MAAM,CAAC;AACX,GAAG;;AAEH;AACA,EAAE,IAAI,IAAI,EAAE;AACZ,IAAI,OAAO,CAAC,GAAG;AACf,MAAM,eAAe;AACrB,MAAM,QAAQ;AACd,QAAQ,IAAI;AACZ,UAAU,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE;AAC9B,YAAY,GAAG;AACf,aAAa,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE;AAC7E;AACA,KAAK;AACL,EAAE;;AAEF,EAAE,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;AAC9B,IAAI,IAAI,QAAQ,CAAC,qBAAqB,IAAI,QAAQ,CAAC,8BAA8B,EAAE;AACnF,MAAM,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AACxC,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;AAClD;AACA,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE;AAC3C;AACA,MAAM,MAAM,cAAc,GAAG,CAAC,cAAc,EAAE,gBAAgB,CAAC;AAC/D,MAAM,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK;AAC1D,QAAQ,IAAI,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,EAAE;AACxD,UAAU,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC;AAC/B,QAAQ;AACR,MAAM,CAAC,CAAC;AACR,IAAI;AACJ,EAAE;;AAEF;AACA;AACA;;AAEA,EAAE,IAAI,QAAQ,CAAC,qBAAqB,EAAE;AACtC,IAAI,aAAa,IAAI,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;;AAElG,IAAI,IAAI,aAAa,KAAK,aAAa,KAAK,KAAK,IAAI,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE;AACtF;AACA,MAAM,MAAM,SAAS,GAAG,cAAc,IAAI,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC;;AAExF,MAAM,IAAI,SAAS,EAAE;AACrB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,SAAS,CAAC;AAC9C,MAAM;AACN,IAAI;AACJ,EAAE;;AAEF,EAAE,OAAO,SAAS;AAClB,CAAC;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Calculate data maxRate
3
+ * @param {Number} [samplesCount= 10]
4
+ * @param {Number} [min= 1000]
5
+ * @returns {Function}
6
+ */
7
+ function speedometer(samplesCount, min) {
8
+ samplesCount = samplesCount || 10;
9
+ const bytes = new Array(samplesCount);
10
+ const timestamps = new Array(samplesCount);
11
+ let head = 0;
12
+ let tail = 0;
13
+ let firstSampleTS;
14
+
15
+ min = min !== undefined ? min : 1000;
16
+
17
+ return function push(chunkLength) {
18
+ const now = Date.now();
19
+
20
+ const startedAt = timestamps[tail];
21
+
22
+ if (!firstSampleTS) {
23
+ firstSampleTS = now;
24
+ }
25
+
26
+ bytes[head] = chunkLength;
27
+ timestamps[head] = now;
28
+
29
+ let i = tail;
30
+ let bytesCount = 0;
31
+
32
+ while (i !== head) {
33
+ bytesCount += bytes[i++];
34
+ i = i % samplesCount;
35
+ }
36
+
37
+ head = (head + 1) % samplesCount;
38
+
39
+ if (head === tail) {
40
+ tail = (tail + 1) % samplesCount;
41
+ }
42
+
43
+ if (now - firstSampleTS < min) {
44
+ return;
45
+ }
46
+
47
+ const passed = startedAt && now - startedAt;
48
+
49
+ return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
50
+ };
51
+ }
52
+
53
+ export { speedometer as default };
54
+ //# sourceMappingURL=speedometer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"speedometer.js","sources":["../../../../../node_modules/axios/lib/helpers/speedometer.js"],"sourcesContent":["'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n };\n}\n\nexport default speedometer;\n"],"names":[],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,YAAY,EAAE,GAAG,EAAE;AACxC,EAAE,YAAY,GAAG,YAAY,IAAI,EAAE;AACnC,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC;AACvC,EAAE,MAAM,UAAU,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC;AAC5C,EAAE,IAAI,IAAI,GAAG,CAAC;AACd,EAAE,IAAI,IAAI,GAAG,CAAC;AACd,EAAE,IAAI,aAAa;;AAEnB,EAAE,GAAG,GAAG,GAAG,KAAK,SAAS,GAAG,GAAG,GAAG,IAAI;;AAEtC,EAAE,OAAO,SAAS,IAAI,CAAC,WAAW,EAAE;AACpC,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;;AAE1B,IAAI,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC;;AAEtC,IAAI,IAAI,CAAC,aAAa,EAAE;AACxB,MAAM,aAAa,GAAG,GAAG;AACzB,IAAI;;AAEJ,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,WAAW;AAC7B,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,GAAG;;AAE1B,IAAI,IAAI,CAAC,GAAG,IAAI;AAChB,IAAI,IAAI,UAAU,GAAG,CAAC;;AAEtB,IAAI,OAAO,CAAC,KAAK,IAAI,EAAE;AACvB,MAAM,UAAU,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC;AAC9B,MAAM,CAAC,GAAG,CAAC,GAAG,YAAY;AAC1B,IAAI;;AAEJ,IAAI,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,YAAY;;AAEpC,IAAI,IAAI,IAAI,KAAK,IAAI,EAAE;AACvB,MAAM,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,YAAY;AACtC,IAAI;;AAEJ,IAAI,IAAI,GAAG,GAAG,aAAa,GAAG,GAAG,EAAE;AACnC,MAAM;AACN,IAAI;;AAEJ,IAAI,MAAM,MAAM,GAAG,SAAS,IAAI,GAAG,GAAG,SAAS;;AAE/C,IAAI,OAAO,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,IAAI,IAAI,MAAM,CAAC,GAAG,SAAS;AACxE,EAAE,CAAC;AACH;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
3
+ *
4
+ * Common use case would be to use `Function.prototype.apply`.
5
+ *
6
+ * ```js
7
+ * function f(x, y, z) {}
8
+ * const args = [1, 2, 3];
9
+ * f.apply(null, args);
10
+ * ```
11
+ *
12
+ * With `spread` this example can be re-written.
13
+ *
14
+ * ```js
15
+ * spread(function(x, y, z) {})([1, 2, 3]);
16
+ * ```
17
+ *
18
+ * @param {Function} callback
19
+ *
20
+ * @returns {Function}
21
+ */
22
+ function spread(callback) {
23
+ return function wrap(arr) {
24
+ return callback.apply(null, arr);
25
+ };
26
+ }
27
+
28
+ export { spread as default };
29
+ //# sourceMappingURL=spread.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spread.js","sources":["../../../../../node_modules/axios/lib/helpers/spread.js"],"sourcesContent":["'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * const args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n"],"names":[],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAAS,MAAM,CAAC,QAAQ,EAAE;AACzC,EAAE,OAAO,SAAS,IAAI,CAAC,GAAG,EAAE;AAC5B,IAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC;AACpC,EAAE,CAAC;AACH;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Throttle decorator
3
+ * @param {Function} fn
4
+ * @param {Number} freq
5
+ * @return {Function}
6
+ */
7
+ function throttle(fn, freq) {
8
+ let timestamp = 0;
9
+ let threshold = 1000 / freq;
10
+ let lastArgs;
11
+ let timer;
12
+
13
+ const invoke = (args, now = Date.now()) => {
14
+ timestamp = now;
15
+ lastArgs = null;
16
+ if (timer) {
17
+ clearTimeout(timer);
18
+ timer = null;
19
+ }
20
+ fn(...args);
21
+ };
22
+
23
+ const throttled = (...args) => {
24
+ const now = Date.now();
25
+ const passed = now - timestamp;
26
+ if (passed >= threshold) {
27
+ invoke(args, now);
28
+ } else {
29
+ lastArgs = args;
30
+ if (!timer) {
31
+ timer = setTimeout(() => {
32
+ timer = null;
33
+ invoke(lastArgs);
34
+ }, threshold - passed);
35
+ }
36
+ }
37
+ };
38
+
39
+ const flush = () => lastArgs && invoke(lastArgs);
40
+
41
+ return [throttled, flush];
42
+ }
43
+
44
+ export { throttle as default };
45
+ //# sourceMappingURL=throttle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"throttle.js","sources":["../../../../../node_modules/axios/lib/helpers/throttle.js"],"sourcesContent":["/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn(...args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if (passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE;AAC5B,EAAE,IAAI,SAAS,GAAG,CAAC;AACnB,EAAE,IAAI,SAAS,GAAG,IAAI,GAAG,IAAI;AAC7B,EAAE,IAAI,QAAQ;AACd,EAAE,IAAI,KAAK;;AAEX,EAAE,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,KAAK;AAC7C,IAAI,SAAS,GAAG,GAAG;AACnB,IAAI,QAAQ,GAAG,IAAI;AACnB,IAAI,IAAI,KAAK,EAAE;AACf,MAAM,YAAY,CAAC,KAAK,CAAC;AACzB,MAAM,KAAK,GAAG,IAAI;AAClB,IAAI;AACJ,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;AACf,EAAE,CAAC;;AAEH,EAAE,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,KAAK;AACjC,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;AAC1B,IAAI,MAAM,MAAM,GAAG,GAAG,GAAG,SAAS;AAClC,IAAI,IAAI,MAAM,IAAI,SAAS,EAAE;AAC7B,MAAM,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC;AACvB,IAAI,CAAC,MAAM;AACX,MAAM,QAAQ,GAAG,IAAI;AACrB,MAAM,IAAI,CAAC,KAAK,EAAE;AAClB,QAAQ,KAAK,GAAG,UAAU,CAAC,MAAM;AACjC,UAAU,KAAK,GAAG,IAAI;AACtB,UAAU,MAAM,CAAC,QAAQ,CAAC;AAC1B,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;AAC9B,MAAM;AACN,IAAI;AACJ,EAAE,CAAC;;AAEH,EAAE,MAAM,KAAK,GAAG,MAAM,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC;;AAElD,EAAE,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC;AAC3B;;;;","x_google_ignoreList":[0]}