axios.js 94 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931
  1. import { n as __exportAll } from "./chunk-BoAXSpZd.js";
  2. //#region node_modules/axios/lib/helpers/bind.js
  3. /**
  4. * Create a bound version of a function with a specified `this` context
  5. *
  6. * @param {Function} fn - The function to bind
  7. * @param {*} thisArg - The value to be passed as the `this` parameter
  8. * @returns {Function} A new function that will call the original function with the specified `this` context
  9. */
  10. function bind(fn, thisArg) {
  11. return function wrap() {
  12. return fn.apply(thisArg, arguments);
  13. };
  14. }
  15. //#endregion
  16. //#region node_modules/axios/lib/utils.js
  17. var { toString } = Object.prototype;
  18. var { getPrototypeOf } = Object;
  19. var { iterator, toStringTag } = Symbol;
  20. var kindOf = ((cache) => (thing) => {
  21. const str = toString.call(thing);
  22. return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
  23. })(Object.create(null));
  24. var kindOfTest = (type) => {
  25. type = type.toLowerCase();
  26. return (thing) => kindOf(thing) === type;
  27. };
  28. var typeOfTest = (type) => (thing) => typeof thing === type;
  29. /**
  30. * Determine if a value is a non-null object
  31. *
  32. * @param {Object} val The value to test
  33. *
  34. * @returns {boolean} True if value is an Array, otherwise false
  35. */
  36. var { isArray } = Array;
  37. /**
  38. * Determine if a value is undefined
  39. *
  40. * @param {*} val The value to test
  41. *
  42. * @returns {boolean} True if the value is undefined, otherwise false
  43. */
  44. var isUndefined = typeOfTest("undefined");
  45. /**
  46. * Determine if a value is a Buffer
  47. *
  48. * @param {*} val The value to test
  49. *
  50. * @returns {boolean} True if value is a Buffer, otherwise false
  51. */
  52. function isBuffer(val) {
  53. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
  54. }
  55. /**
  56. * Determine if a value is an ArrayBuffer
  57. *
  58. * @param {*} val The value to test
  59. *
  60. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  61. */
  62. var isArrayBuffer = kindOfTest("ArrayBuffer");
  63. /**
  64. * Determine if a value is a view on an ArrayBuffer
  65. *
  66. * @param {*} val The value to test
  67. *
  68. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  69. */
  70. function isArrayBufferView(val) {
  71. let result;
  72. if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) result = ArrayBuffer.isView(val);
  73. else result = val && val.buffer && isArrayBuffer(val.buffer);
  74. return result;
  75. }
  76. /**
  77. * Determine if a value is a String
  78. *
  79. * @param {*} val The value to test
  80. *
  81. * @returns {boolean} True if value is a String, otherwise false
  82. */
  83. var isString = typeOfTest("string");
  84. /**
  85. * Determine if a value is a Function
  86. *
  87. * @param {*} val The value to test
  88. * @returns {boolean} True if value is a Function, otherwise false
  89. */
  90. var isFunction$1 = typeOfTest("function");
  91. /**
  92. * Determine if a value is a Number
  93. *
  94. * @param {*} val The value to test
  95. *
  96. * @returns {boolean} True if value is a Number, otherwise false
  97. */
  98. var isNumber = typeOfTest("number");
  99. /**
  100. * Determine if a value is an Object
  101. *
  102. * @param {*} thing The value to test
  103. *
  104. * @returns {boolean} True if value is an Object, otherwise false
  105. */
  106. var isObject = (thing) => thing !== null && typeof thing === "object";
  107. /**
  108. * Determine if a value is a Boolean
  109. *
  110. * @param {*} thing The value to test
  111. * @returns {boolean} True if value is a Boolean, otherwise false
  112. */
  113. var isBoolean = (thing) => thing === true || thing === false;
  114. /**
  115. * Determine if a value is a plain Object
  116. *
  117. * @param {*} val The value to test
  118. *
  119. * @returns {boolean} True if value is a plain Object, otherwise false
  120. */
  121. var isPlainObject = (val) => {
  122. if (kindOf(val) !== "object") return false;
  123. const prototype = getPrototypeOf(val);
  124. return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
  125. };
  126. /**
  127. * Determine if a value is an empty object (safely handles Buffers)
  128. *
  129. * @param {*} val The value to test
  130. *
  131. * @returns {boolean} True if value is an empty object, otherwise false
  132. */
  133. var isEmptyObject = (val) => {
  134. if (!isObject(val) || isBuffer(val)) return false;
  135. try {
  136. return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
  137. } catch (e) {
  138. return false;
  139. }
  140. };
  141. /**
  142. * Determine if a value is a Date
  143. *
  144. * @param {*} val The value to test
  145. *
  146. * @returns {boolean} True if value is a Date, otherwise false
  147. */
  148. var isDate = kindOfTest("Date");
  149. /**
  150. * Determine if a value is a File
  151. *
  152. * @param {*} val The value to test
  153. *
  154. * @returns {boolean} True if value is a File, otherwise false
  155. */
  156. var isFile = kindOfTest("File");
  157. /**
  158. * Determine if a value is a React Native Blob
  159. * React Native "blob": an object with a `uri` attribute. Optionally, it can
  160. * also have a `name` and `type` attribute to specify filename and content type
  161. *
  162. * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
  163. *
  164. * @param {*} value The value to test
  165. *
  166. * @returns {boolean} True if value is a React Native Blob, otherwise false
  167. */
  168. var isReactNativeBlob = (value) => {
  169. return !!(value && typeof value.uri !== "undefined");
  170. };
  171. /**
  172. * Determine if environment is React Native
  173. * ReactNative `FormData` has a non-standard `getParts()` method
  174. *
  175. * @param {*} formData The formData to test
  176. *
  177. * @returns {boolean} True if environment is React Native, otherwise false
  178. */
  179. var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
  180. /**
  181. * Determine if a value is a Blob
  182. *
  183. * @param {*} val The value to test
  184. *
  185. * @returns {boolean} True if value is a Blob, otherwise false
  186. */
  187. var isBlob = kindOfTest("Blob");
  188. /**
  189. * Determine if a value is a FileList
  190. *
  191. * @param {*} val The value to test
  192. *
  193. * @returns {boolean} True if value is a File, otherwise false
  194. */
  195. var isFileList = kindOfTest("FileList");
  196. /**
  197. * Determine if a value is a Stream
  198. *
  199. * @param {*} val The value to test
  200. *
  201. * @returns {boolean} True if value is a Stream, otherwise false
  202. */
  203. var isStream = (val) => isObject(val) && isFunction$1(val.pipe);
  204. /**
  205. * Determine if a value is a FormData
  206. *
  207. * @param {*} thing The value to test
  208. *
  209. * @returns {boolean} True if value is an FormData, otherwise false
  210. */
  211. function getGlobal() {
  212. if (typeof globalThis !== "undefined") return globalThis;
  213. if (typeof self !== "undefined") return self;
  214. if (typeof window !== "undefined") return window;
  215. if (typeof global !== "undefined") return global;
  216. return {};
  217. }
  218. var G = getGlobal();
  219. var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
  220. var isFormData = (thing) => {
  221. let kind;
  222. return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
  223. };
  224. /**
  225. * Determine if a value is a URLSearchParams object
  226. *
  227. * @param {*} val The value to test
  228. *
  229. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  230. */
  231. var isURLSearchParams = kindOfTest("URLSearchParams");
  232. var [isReadableStream, isRequest, isResponse, isHeaders] = [
  233. "ReadableStream",
  234. "Request",
  235. "Response",
  236. "Headers"
  237. ].map(kindOfTest);
  238. /**
  239. * Trim excess whitespace off the beginning and end of a string
  240. *
  241. * @param {String} str The String to trim
  242. *
  243. * @returns {String} The String freed of excess whitespace
  244. */
  245. var trim = (str) => {
  246. return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
  247. };
  248. /**
  249. * Iterate over an Array or an Object invoking a function for each item.
  250. *
  251. * If `obj` is an Array callback will be called passing
  252. * the value, index, and complete array for each item.
  253. *
  254. * If 'obj' is an Object callback will be called passing
  255. * the value, key, and complete object for each property.
  256. *
  257. * @param {Object|Array<unknown>} obj The object to iterate
  258. * @param {Function} fn The callback to invoke for each item
  259. *
  260. * @param {Object} [options]
  261. * @param {Boolean} [options.allOwnKeys = false]
  262. * @returns {any}
  263. */
  264. function forEach(obj, fn, { allOwnKeys = false } = {}) {
  265. if (obj === null || typeof obj === "undefined") return;
  266. let i;
  267. let l;
  268. if (typeof obj !== "object") obj = [obj];
  269. if (isArray(obj)) for (i = 0, l = obj.length; i < l; i++) fn.call(null, obj[i], i, obj);
  270. else {
  271. if (isBuffer(obj)) return;
  272. const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
  273. const len = keys.length;
  274. let key;
  275. for (i = 0; i < len; i++) {
  276. key = keys[i];
  277. fn.call(null, obj[key], key, obj);
  278. }
  279. }
  280. }
  281. /**
  282. * Finds a key in an object, case-insensitive, returning the actual key name.
  283. * Returns null if the object is a Buffer or if no match is found.
  284. *
  285. * @param {Object} obj - The object to search.
  286. * @param {string} key - The key to find (case-insensitive).
  287. * @returns {?string} The actual key name if found, otherwise null.
  288. */
  289. function findKey(obj, key) {
  290. if (isBuffer(obj)) return null;
  291. key = key.toLowerCase();
  292. const keys = Object.keys(obj);
  293. let i = keys.length;
  294. let _key;
  295. while (i-- > 0) {
  296. _key = keys[i];
  297. if (key === _key.toLowerCase()) return _key;
  298. }
  299. return null;
  300. }
  301. var _global = (() => {
  302. if (typeof globalThis !== "undefined") return globalThis;
  303. return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
  304. })();
  305. var isContextDefined = (context) => !isUndefined(context) && context !== _global;
  306. /**
  307. * Accepts varargs expecting each argument to be an object, then
  308. * immutably merges the properties of each object and returns result.
  309. *
  310. * When multiple objects contain the same key the later object in
  311. * the arguments list will take precedence.
  312. *
  313. * Example:
  314. *
  315. * ```js
  316. * const result = merge({foo: 123}, {foo: 456});
  317. * console.log(result.foo); // outputs 456
  318. * ```
  319. *
  320. * @param {Object} obj1 Object to merge
  321. *
  322. * @returns {Object} Result of all merge properties
  323. */
  324. function merge() {
  325. const { caseless, skipUndefined } = isContextDefined(this) && this || {};
  326. const result = {};
  327. const assignValue = (val, key) => {
  328. if (key === "__proto__" || key === "constructor" || key === "prototype") return;
  329. const targetKey = caseless && findKey(result, key) || key;
  330. if (isPlainObject(result[targetKey]) && isPlainObject(val)) result[targetKey] = merge(result[targetKey], val);
  331. else if (isPlainObject(val)) result[targetKey] = merge({}, val);
  332. else if (isArray(val)) result[targetKey] = val.slice();
  333. else if (!skipUndefined || !isUndefined(val)) result[targetKey] = val;
  334. };
  335. for (let i = 0, l = arguments.length; i < l; i++) arguments[i] && forEach(arguments[i], assignValue);
  336. return result;
  337. }
  338. /**
  339. * Extends object a by mutably adding to it the properties of object b.
  340. *
  341. * @param {Object} a The object to be extended
  342. * @param {Object} b The object to copy properties from
  343. * @param {Object} thisArg The object to bind function to
  344. *
  345. * @param {Object} [options]
  346. * @param {Boolean} [options.allOwnKeys]
  347. * @returns {Object} The resulting value of object a
  348. */
  349. var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
  350. forEach(b, (val, key) => {
  351. if (thisArg && isFunction$1(val)) Object.defineProperty(a, key, {
  352. value: bind(val, thisArg),
  353. writable: true,
  354. enumerable: true,
  355. configurable: true
  356. });
  357. else Object.defineProperty(a, key, {
  358. value: val,
  359. writable: true,
  360. enumerable: true,
  361. configurable: true
  362. });
  363. }, { allOwnKeys });
  364. return a;
  365. };
  366. /**
  367. * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
  368. *
  369. * @param {string} content with BOM
  370. *
  371. * @returns {string} content value without BOM
  372. */
  373. var stripBOM = (content) => {
  374. if (content.charCodeAt(0) === 65279) content = content.slice(1);
  375. return content;
  376. };
  377. /**
  378. * Inherit the prototype methods from one constructor into another
  379. * @param {function} constructor
  380. * @param {function} superConstructor
  381. * @param {object} [props]
  382. * @param {object} [descriptors]
  383. *
  384. * @returns {void}
  385. */
  386. var inherits = (constructor, superConstructor, props, descriptors) => {
  387. constructor.prototype = Object.create(superConstructor.prototype, descriptors);
  388. Object.defineProperty(constructor.prototype, "constructor", {
  389. value: constructor,
  390. writable: true,
  391. enumerable: false,
  392. configurable: true
  393. });
  394. Object.defineProperty(constructor, "super", { value: superConstructor.prototype });
  395. props && Object.assign(constructor.prototype, props);
  396. };
  397. /**
  398. * Resolve object with deep prototype chain to a flat object
  399. * @param {Object} sourceObj source object
  400. * @param {Object} [destObj]
  401. * @param {Function|Boolean} [filter]
  402. * @param {Function} [propFilter]
  403. *
  404. * @returns {Object}
  405. */
  406. var toFlatObject = (sourceObj, destObj, filter, propFilter) => {
  407. let props;
  408. let i;
  409. let prop;
  410. const merged = {};
  411. destObj = destObj || {};
  412. if (sourceObj == null) return destObj;
  413. do {
  414. props = Object.getOwnPropertyNames(sourceObj);
  415. i = props.length;
  416. while (i-- > 0) {
  417. prop = props[i];
  418. if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
  419. destObj[prop] = sourceObj[prop];
  420. merged[prop] = true;
  421. }
  422. }
  423. sourceObj = filter !== false && getPrototypeOf(sourceObj);
  424. } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
  425. return destObj;
  426. };
  427. /**
  428. * Determines whether a string ends with the characters of a specified string
  429. *
  430. * @param {String} str
  431. * @param {String} searchString
  432. * @param {Number} [position= 0]
  433. *
  434. * @returns {boolean}
  435. */
  436. var endsWith = (str, searchString, position) => {
  437. str = String(str);
  438. if (position === void 0 || position > str.length) position = str.length;
  439. position -= searchString.length;
  440. const lastIndex = str.indexOf(searchString, position);
  441. return lastIndex !== -1 && lastIndex === position;
  442. };
  443. /**
  444. * Returns new array from array like object or null if failed
  445. *
  446. * @param {*} [thing]
  447. *
  448. * @returns {?Array}
  449. */
  450. var toArray = (thing) => {
  451. if (!thing) return null;
  452. if (isArray(thing)) return thing;
  453. let i = thing.length;
  454. if (!isNumber(i)) return null;
  455. const arr = new Array(i);
  456. while (i-- > 0) arr[i] = thing[i];
  457. return arr;
  458. };
  459. /**
  460. * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
  461. * thing passed in is an instance of Uint8Array
  462. *
  463. * @param {TypedArray}
  464. *
  465. * @returns {Array}
  466. */
  467. var isTypedArray = ((TypedArray) => {
  468. return (thing) => {
  469. return TypedArray && thing instanceof TypedArray;
  470. };
  471. })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
  472. /**
  473. * For each entry in the object, call the function with the key and value.
  474. *
  475. * @param {Object<any, any>} obj - The object to iterate over.
  476. * @param {Function} fn - The function to call for each entry.
  477. *
  478. * @returns {void}
  479. */
  480. var forEachEntry = (obj, fn) => {
  481. const _iterator = (obj && obj[iterator]).call(obj);
  482. let result;
  483. while ((result = _iterator.next()) && !result.done) {
  484. const pair = result.value;
  485. fn.call(obj, pair[0], pair[1]);
  486. }
  487. };
  488. /**
  489. * It takes a regular expression and a string, and returns an array of all the matches
  490. *
  491. * @param {string} regExp - The regular expression to match against.
  492. * @param {string} str - The string to search.
  493. *
  494. * @returns {Array<boolean>}
  495. */
  496. var matchAll = (regExp, str) => {
  497. let matches;
  498. const arr = [];
  499. while ((matches = regExp.exec(str)) !== null) arr.push(matches);
  500. return arr;
  501. };
  502. var isHTMLForm = kindOfTest("HTMLFormElement");
  503. var toCamelCase = (str) => {
  504. return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
  505. return p1.toUpperCase() + p2;
  506. });
  507. };
  508. var hasOwnProperty = (({ hasOwnProperty }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
  509. /**
  510. * Determine if a value is a RegExp object
  511. *
  512. * @param {*} val The value to test
  513. *
  514. * @returns {boolean} True if value is a RegExp object, otherwise false
  515. */
  516. var isRegExp = kindOfTest("RegExp");
  517. var reduceDescriptors = (obj, reducer) => {
  518. const descriptors = Object.getOwnPropertyDescriptors(obj);
  519. const reducedDescriptors = {};
  520. forEach(descriptors, (descriptor, name) => {
  521. let ret;
  522. if ((ret = reducer(descriptor, name, obj)) !== false) reducedDescriptors[name] = ret || descriptor;
  523. });
  524. Object.defineProperties(obj, reducedDescriptors);
  525. };
  526. /**
  527. * Makes all methods read-only
  528. * @param {Object} obj
  529. */
  530. var freezeMethods = (obj) => {
  531. reduceDescriptors(obj, (descriptor, name) => {
  532. if (isFunction$1(obj) && [
  533. "arguments",
  534. "caller",
  535. "callee"
  536. ].indexOf(name) !== -1) return false;
  537. const value = obj[name];
  538. if (!isFunction$1(value)) return;
  539. descriptor.enumerable = false;
  540. if ("writable" in descriptor) {
  541. descriptor.writable = false;
  542. return;
  543. }
  544. if (!descriptor.set) descriptor.set = () => {
  545. throw Error("Can not rewrite read-only method '" + name + "'");
  546. };
  547. });
  548. };
  549. /**
  550. * Converts an array or a delimited string into an object set with values as keys and true as values.
  551. * Useful for fast membership checks.
  552. *
  553. * @param {Array|string} arrayOrString - The array or string to convert.
  554. * @param {string} delimiter - The delimiter to use if input is a string.
  555. * @returns {Object} An object with keys from the array or string, values set to true.
  556. */
  557. var toObjectSet = (arrayOrString, delimiter) => {
  558. const obj = {};
  559. const define = (arr) => {
  560. arr.forEach((value) => {
  561. obj[value] = true;
  562. });
  563. };
  564. isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
  565. return obj;
  566. };
  567. var noop = () => {};
  568. var toFiniteNumber = (value, defaultValue) => {
  569. return value != null && Number.isFinite(value = +value) ? value : defaultValue;
  570. };
  571. /**
  572. * If the thing is a FormData object, return true, otherwise return false.
  573. *
  574. * @param {unknown} thing - The thing to check.
  575. *
  576. * @returns {boolean}
  577. */
  578. function isSpecCompliantForm(thing) {
  579. return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
  580. }
  581. /**
  582. * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
  583. *
  584. * @param {Object} obj - The object to convert.
  585. * @returns {Object} The JSON-compatible object.
  586. */
  587. var toJSONObject = (obj) => {
  588. const stack = new Array(10);
  589. const visit = (source, i) => {
  590. if (isObject(source)) {
  591. if (stack.indexOf(source) >= 0) return;
  592. if (isBuffer(source)) return source;
  593. if (!("toJSON" in source)) {
  594. stack[i] = source;
  595. const target = isArray(source) ? [] : {};
  596. forEach(source, (value, key) => {
  597. const reducedValue = visit(value, i + 1);
  598. !isUndefined(reducedValue) && (target[key] = reducedValue);
  599. });
  600. stack[i] = void 0;
  601. return target;
  602. }
  603. }
  604. return source;
  605. };
  606. return visit(obj, 0);
  607. };
  608. /**
  609. * Determines if a value is an async function.
  610. *
  611. * @param {*} thing - The value to test.
  612. * @returns {boolean} True if value is an async function, otherwise false.
  613. */
  614. var isAsyncFn = kindOfTest("AsyncFunction");
  615. /**
  616. * Determines if a value is thenable (has then and catch methods).
  617. *
  618. * @param {*} thing - The value to test.
  619. * @returns {boolean} True if value is thenable, otherwise false.
  620. */
  621. var isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
  622. /**
  623. * Provides a cross-platform setImmediate implementation.
  624. * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
  625. *
  626. * @param {boolean} setImmediateSupported - Whether setImmediate is supported.
  627. * @param {boolean} postMessageSupported - Whether postMessage is supported.
  628. * @returns {Function} A function to schedule a callback asynchronously.
  629. */
  630. var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
  631. if (setImmediateSupported) return setImmediate;
  632. return postMessageSupported ? ((token, callbacks) => {
  633. _global.addEventListener("message", ({ source, data }) => {
  634. if (source === _global && data === token) callbacks.length && callbacks.shift()();
  635. }, false);
  636. return (cb) => {
  637. callbacks.push(cb);
  638. _global.postMessage(token, "*");
  639. };
  640. })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
  641. })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
  642. /**
  643. * Schedules a microtask or asynchronous callback as soon as possible.
  644. * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
  645. *
  646. * @type {Function}
  647. */
  648. var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
  649. var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
  650. var utils_default = {
  651. isArray,
  652. isArrayBuffer,
  653. isBuffer,
  654. isFormData,
  655. isArrayBufferView,
  656. isString,
  657. isNumber,
  658. isBoolean,
  659. isObject,
  660. isPlainObject,
  661. isEmptyObject,
  662. isReadableStream,
  663. isRequest,
  664. isResponse,
  665. isHeaders,
  666. isUndefined,
  667. isDate,
  668. isFile,
  669. isReactNativeBlob,
  670. isReactNative,
  671. isBlob,
  672. isRegExp,
  673. isFunction: isFunction$1,
  674. isStream,
  675. isURLSearchParams,
  676. isTypedArray,
  677. isFileList,
  678. forEach,
  679. merge,
  680. extend,
  681. trim,
  682. stripBOM,
  683. inherits,
  684. toFlatObject,
  685. kindOf,
  686. kindOfTest,
  687. endsWith,
  688. toArray,
  689. forEachEntry,
  690. matchAll,
  691. isHTMLForm,
  692. hasOwnProperty,
  693. hasOwnProp: hasOwnProperty,
  694. reduceDescriptors,
  695. freezeMethods,
  696. toObjectSet,
  697. toCamelCase,
  698. noop,
  699. toFiniteNumber,
  700. findKey,
  701. global: _global,
  702. isContextDefined,
  703. isSpecCompliantForm,
  704. toJSONObject,
  705. isAsyncFn,
  706. isThenable,
  707. setImmediate: _setImmediate,
  708. asap,
  709. isIterable
  710. };
  711. //#endregion
  712. //#region node_modules/axios/lib/core/AxiosError.js
  713. var AxiosError$1 = class AxiosError$1 extends Error {
  714. static from(error, code, config, request, response, customProps) {
  715. const axiosError = new AxiosError$1(error.message, code || error.code, config, request, response);
  716. axiosError.cause = error;
  717. axiosError.name = error.name;
  718. if (error.status != null && axiosError.status == null) axiosError.status = error.status;
  719. customProps && Object.assign(axiosError, customProps);
  720. return axiosError;
  721. }
  722. /**
  723. * Create an Error with the specified message, config, error code, request and response.
  724. *
  725. * @param {string} message The error message.
  726. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  727. * @param {Object} [config] The config.
  728. * @param {Object} [request] The request.
  729. * @param {Object} [response] The response.
  730. *
  731. * @returns {Error} The created error.
  732. */
  733. constructor(message, code, config, request, response) {
  734. super(message);
  735. Object.defineProperty(this, "message", {
  736. value: message,
  737. enumerable: true,
  738. writable: true,
  739. configurable: true
  740. });
  741. this.name = "AxiosError";
  742. this.isAxiosError = true;
  743. code && (this.code = code);
  744. config && (this.config = config);
  745. request && (this.request = request);
  746. if (response) {
  747. this.response = response;
  748. this.status = response.status;
  749. }
  750. }
  751. toJSON() {
  752. return {
  753. message: this.message,
  754. name: this.name,
  755. description: this.description,
  756. number: this.number,
  757. fileName: this.fileName,
  758. lineNumber: this.lineNumber,
  759. columnNumber: this.columnNumber,
  760. stack: this.stack,
  761. config: utils_default.toJSONObject(this.config),
  762. code: this.code,
  763. status: this.status
  764. };
  765. }
  766. };
  767. AxiosError$1.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
  768. AxiosError$1.ERR_BAD_OPTION = "ERR_BAD_OPTION";
  769. AxiosError$1.ECONNABORTED = "ECONNABORTED";
  770. AxiosError$1.ETIMEDOUT = "ETIMEDOUT";
  771. AxiosError$1.ERR_NETWORK = "ERR_NETWORK";
  772. AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
  773. AxiosError$1.ERR_DEPRECATED = "ERR_DEPRECATED";
  774. AxiosError$1.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
  775. AxiosError$1.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
  776. AxiosError$1.ERR_CANCELED = "ERR_CANCELED";
  777. AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
  778. AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL";
  779. //#endregion
  780. //#region node_modules/axios/lib/helpers/toFormData.js
  781. /**
  782. * Determines if the given thing is a array or js object.
  783. *
  784. * @param {string} thing - The object or array to be visited.
  785. *
  786. * @returns {boolean}
  787. */
  788. function isVisitable(thing) {
  789. return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
  790. }
  791. /**
  792. * It removes the brackets from the end of a string
  793. *
  794. * @param {string} key - The key of the parameter.
  795. *
  796. * @returns {string} the key without the brackets.
  797. */
  798. function removeBrackets(key) {
  799. return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
  800. }
  801. /**
  802. * It takes a path, a key, and a boolean, and returns a string
  803. *
  804. * @param {string} path - The path to the current key.
  805. * @param {string} key - The key of the current object being iterated over.
  806. * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
  807. *
  808. * @returns {string} The path to the current key.
  809. */
  810. function renderKey(path, key, dots) {
  811. if (!path) return key;
  812. return path.concat(key).map(function each(token, i) {
  813. token = removeBrackets(token);
  814. return !dots && i ? "[" + token + "]" : token;
  815. }).join(dots ? "." : "");
  816. }
  817. /**
  818. * If the array is an array and none of its elements are visitable, then it's a flat array.
  819. *
  820. * @param {Array<any>} arr - The array to check
  821. *
  822. * @returns {boolean}
  823. */
  824. function isFlatArray(arr) {
  825. return utils_default.isArray(arr) && !arr.some(isVisitable);
  826. }
  827. var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) {
  828. return /^is[A-Z]/.test(prop);
  829. });
  830. /**
  831. * Convert a data object to FormData
  832. *
  833. * @param {Object} obj
  834. * @param {?Object} [formData]
  835. * @param {?Object} [options]
  836. * @param {Function} [options.visitor]
  837. * @param {Boolean} [options.metaTokens = true]
  838. * @param {Boolean} [options.dots = false]
  839. * @param {?Boolean} [options.indexes = false]
  840. *
  841. * @returns {Object}
  842. **/
  843. /**
  844. * It converts an object into a FormData object
  845. *
  846. * @param {Object<any, any>} obj - The object to convert to form data.
  847. * @param {string} formData - The FormData object to append to.
  848. * @param {Object<string, any>} options
  849. *
  850. * @returns
  851. */
  852. function toFormData$1(obj, formData, options) {
  853. if (!utils_default.isObject(obj)) throw new TypeError("target must be an object");
  854. formData = formData || new FormData();
  855. options = utils_default.toFlatObject(options, {
  856. metaTokens: true,
  857. dots: false,
  858. indexes: false
  859. }, false, function defined(option, source) {
  860. return !utils_default.isUndefined(source[option]);
  861. });
  862. const metaTokens = options.metaTokens;
  863. const visitor = options.visitor || defaultVisitor;
  864. const dots = options.dots;
  865. const indexes = options.indexes;
  866. const useBlob = (options.Blob || typeof Blob !== "undefined" && Blob) && utils_default.isSpecCompliantForm(formData);
  867. if (!utils_default.isFunction(visitor)) throw new TypeError("visitor must be a function");
  868. function convertValue(value) {
  869. if (value === null) return "";
  870. if (utils_default.isDate(value)) return value.toISOString();
  871. if (utils_default.isBoolean(value)) return value.toString();
  872. if (!useBlob && utils_default.isBlob(value)) throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
  873. if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
  874. return value;
  875. }
  876. /**
  877. * Default visitor.
  878. *
  879. * @param {*} value
  880. * @param {String|Number} key
  881. * @param {Array<String|Number>} path
  882. * @this {FormData}
  883. *
  884. * @returns {boolean} return true to visit the each prop of the value recursively
  885. */
  886. function defaultVisitor(value, key, path) {
  887. let arr = value;
  888. if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
  889. formData.append(renderKey(path, key, dots), convertValue(value));
  890. return false;
  891. }
  892. if (value && !path && typeof value === "object") {
  893. if (utils_default.endsWith(key, "{}")) {
  894. key = metaTokens ? key : key.slice(0, -2);
  895. value = JSON.stringify(value);
  896. } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
  897. key = removeBrackets(key);
  898. arr.forEach(function each(el, index) {
  899. !(utils_default.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
  900. });
  901. return false;
  902. }
  903. }
  904. if (isVisitable(value)) return true;
  905. formData.append(renderKey(path, key, dots), convertValue(value));
  906. return false;
  907. }
  908. const stack = [];
  909. const exposedHelpers = Object.assign(predicates, {
  910. defaultVisitor,
  911. convertValue,
  912. isVisitable
  913. });
  914. function build(value, path) {
  915. if (utils_default.isUndefined(value)) return;
  916. if (stack.indexOf(value) !== -1) throw Error("Circular reference detected in " + path.join("."));
  917. stack.push(value);
  918. utils_default.forEach(value, function each(el, key) {
  919. if ((!(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers)) === true) build(el, path ? path.concat(key) : [key]);
  920. });
  921. stack.pop();
  922. }
  923. if (!utils_default.isObject(obj)) throw new TypeError("data must be an object");
  924. build(obj);
  925. return formData;
  926. }
  927. //#endregion
  928. //#region node_modules/axios/lib/helpers/AxiosURLSearchParams.js
  929. /**
  930. * It encodes a string by replacing all characters that are not in the unreserved set with
  931. * their percent-encoded equivalents
  932. *
  933. * @param {string} str - The string to encode.
  934. *
  935. * @returns {string} The encoded string.
  936. */
  937. function encode$1(str) {
  938. const charMap = {
  939. "!": "%21",
  940. "'": "%27",
  941. "(": "%28",
  942. ")": "%29",
  943. "~": "%7E",
  944. "%20": "+",
  945. "%00": "\0"
  946. };
  947. return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
  948. return charMap[match];
  949. });
  950. }
  951. /**
  952. * It takes a params object and converts it to a FormData object
  953. *
  954. * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
  955. * @param {Object<string, any>} options - The options object passed to the Axios constructor.
  956. *
  957. * @returns {void}
  958. */
  959. function AxiosURLSearchParams(params, options) {
  960. this._pairs = [];
  961. params && toFormData$1(params, this, options);
  962. }
  963. var prototype = AxiosURLSearchParams.prototype;
  964. prototype.append = function append(name, value) {
  965. this._pairs.push([name, value]);
  966. };
  967. prototype.toString = function toString(encoder) {
  968. const _encode = encoder ? function(value) {
  969. return encoder.call(this, value, encode$1);
  970. } : encode$1;
  971. return this._pairs.map(function each(pair) {
  972. return _encode(pair[0]) + "=" + _encode(pair[1]);
  973. }, "").join("&");
  974. };
  975. //#endregion
  976. //#region node_modules/axios/lib/helpers/buildURL.js
  977. /**
  978. * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
  979. * their plain counterparts (`:`, `$`, `,`, `+`).
  980. *
  981. * @param {string} val The value to be encoded.
  982. *
  983. * @returns {string} The encoded value.
  984. */
  985. function encode(val) {
  986. return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
  987. }
  988. /**
  989. * Build a URL by appending params to the end
  990. *
  991. * @param {string} url The base of the url (e.g., http://www.google.com)
  992. * @param {object} [params] The params to be appended
  993. * @param {?(object|Function)} options
  994. *
  995. * @returns {string} The formatted url
  996. */
  997. function buildURL(url, params, options) {
  998. if (!params) return url;
  999. const _encode = options && options.encode || encode;
  1000. const _options = utils_default.isFunction(options) ? { serialize: options } : options;
  1001. const serializeFn = _options && _options.serialize;
  1002. let serializedParams;
  1003. if (serializeFn) serializedParams = serializeFn(params, _options);
  1004. else serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
  1005. if (serializedParams) {
  1006. const hashmarkIndex = url.indexOf("#");
  1007. if (hashmarkIndex !== -1) url = url.slice(0, hashmarkIndex);
  1008. url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  1009. }
  1010. return url;
  1011. }
  1012. //#endregion
  1013. //#region node_modules/axios/lib/core/InterceptorManager.js
  1014. var InterceptorManager = class {
  1015. constructor() {
  1016. this.handlers = [];
  1017. }
  1018. /**
  1019. * Add a new interceptor to the stack
  1020. *
  1021. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  1022. * @param {Function} rejected The function to handle `reject` for a `Promise`
  1023. * @param {Object} options The options for the interceptor, synchronous and runWhen
  1024. *
  1025. * @return {Number} An ID used to remove interceptor later
  1026. */
  1027. use(fulfilled, rejected, options) {
  1028. this.handlers.push({
  1029. fulfilled,
  1030. rejected,
  1031. synchronous: options ? options.synchronous : false,
  1032. runWhen: options ? options.runWhen : null
  1033. });
  1034. return this.handlers.length - 1;
  1035. }
  1036. /**
  1037. * Remove an interceptor from the stack
  1038. *
  1039. * @param {Number} id The ID that was returned by `use`
  1040. *
  1041. * @returns {void}
  1042. */
  1043. eject(id) {
  1044. if (this.handlers[id]) this.handlers[id] = null;
  1045. }
  1046. /**
  1047. * Clear all interceptors from the stack
  1048. *
  1049. * @returns {void}
  1050. */
  1051. clear() {
  1052. if (this.handlers) this.handlers = [];
  1053. }
  1054. /**
  1055. * Iterate over all the registered interceptors
  1056. *
  1057. * This method is particularly useful for skipping over any
  1058. * interceptors that may have become `null` calling `eject`.
  1059. *
  1060. * @param {Function} fn The function to call for each interceptor
  1061. *
  1062. * @returns {void}
  1063. */
  1064. forEach(fn) {
  1065. utils_default.forEach(this.handlers, function forEachHandler(h) {
  1066. if (h !== null) fn(h);
  1067. });
  1068. }
  1069. };
  1070. //#endregion
  1071. //#region node_modules/axios/lib/defaults/transitional.js
  1072. var transitional_default = {
  1073. silentJSONParsing: true,
  1074. forcedJSONParsing: true,
  1075. clarifyTimeoutError: false,
  1076. legacyInterceptorReqResOrdering: true
  1077. };
  1078. //#endregion
  1079. //#region node_modules/axios/lib/platform/browser/index.js
  1080. var browser_default = {
  1081. isBrowser: true,
  1082. classes: {
  1083. URLSearchParams: typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams,
  1084. FormData: typeof FormData !== "undefined" ? FormData : null,
  1085. Blob: typeof Blob !== "undefined" ? Blob : null
  1086. },
  1087. protocols: [
  1088. "http",
  1089. "https",
  1090. "file",
  1091. "blob",
  1092. "url",
  1093. "data"
  1094. ]
  1095. };
  1096. //#endregion
  1097. //#region node_modules/axios/lib/platform/common/utils.js
  1098. var utils_exports = /* @__PURE__ */ __exportAll({
  1099. hasBrowserEnv: () => hasBrowserEnv,
  1100. hasStandardBrowserEnv: () => hasStandardBrowserEnv,
  1101. hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
  1102. navigator: () => _navigator,
  1103. origin: () => origin
  1104. });
  1105. var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
  1106. var _navigator = typeof navigator === "object" && navigator || void 0;
  1107. /**
  1108. * Determine if we're running in a standard browser environment
  1109. *
  1110. * This allows axios to run in a web worker, and react-native.
  1111. * Both environments support XMLHttpRequest, but not fully standard globals.
  1112. *
  1113. * web workers:
  1114. * typeof window -> undefined
  1115. * typeof document -> undefined
  1116. *
  1117. * react-native:
  1118. * navigator.product -> 'ReactNative'
  1119. * nativescript
  1120. * navigator.product -> 'NativeScript' or 'NS'
  1121. *
  1122. * @returns {boolean}
  1123. */
  1124. var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || [
  1125. "ReactNative",
  1126. "NativeScript",
  1127. "NS"
  1128. ].indexOf(_navigator.product) < 0);
  1129. /**
  1130. * Determine if we're running in a standard browser webWorker environment
  1131. *
  1132. * Although the `isStandardBrowserEnv` method indicates that
  1133. * `allows axios to run in a web worker`, the WebWorker will still be
  1134. * filtered out due to its judgment standard
  1135. * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
  1136. * This leads to a problem when axios post `FormData` in webWorker
  1137. */
  1138. var hasStandardBrowserWebWorkerEnv = typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
  1139. var origin = hasBrowserEnv && window.location.href || "http://localhost";
  1140. //#endregion
  1141. //#region node_modules/axios/lib/platform/index.js
  1142. var platform_default = {
  1143. ...utils_exports,
  1144. ...browser_default
  1145. };
  1146. //#endregion
  1147. //#region node_modules/axios/lib/helpers/toURLEncodedForm.js
  1148. function toURLEncodedForm(data, options) {
  1149. return toFormData$1(data, new platform_default.classes.URLSearchParams(), {
  1150. visitor: function(value, key, path, helpers) {
  1151. if (platform_default.isNode && utils_default.isBuffer(value)) {
  1152. this.append(key, value.toString("base64"));
  1153. return false;
  1154. }
  1155. return helpers.defaultVisitor.apply(this, arguments);
  1156. },
  1157. ...options
  1158. });
  1159. }
  1160. //#endregion
  1161. //#region node_modules/axios/lib/helpers/formDataToJSON.js
  1162. /**
  1163. * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
  1164. *
  1165. * @param {string} name - The name of the property to get.
  1166. *
  1167. * @returns An array of strings.
  1168. */
  1169. function parsePropPath(name) {
  1170. return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
  1171. return match[0] === "[]" ? "" : match[1] || match[0];
  1172. });
  1173. }
  1174. /**
  1175. * Convert an array to an object.
  1176. *
  1177. * @param {Array<any>} arr - The array to convert to an object.
  1178. *
  1179. * @returns An object with the same keys and values as the array.
  1180. */
  1181. function arrayToObject(arr) {
  1182. const obj = {};
  1183. const keys = Object.keys(arr);
  1184. let i;
  1185. const len = keys.length;
  1186. let key;
  1187. for (i = 0; i < len; i++) {
  1188. key = keys[i];
  1189. obj[key] = arr[key];
  1190. }
  1191. return obj;
  1192. }
  1193. /**
  1194. * It takes a FormData object and returns a JavaScript object
  1195. *
  1196. * @param {string} formData The FormData object to convert to JSON.
  1197. *
  1198. * @returns {Object<string, any> | null} The converted object.
  1199. */
  1200. function formDataToJSON(formData) {
  1201. function buildPath(path, value, target, index) {
  1202. let name = path[index++];
  1203. if (name === "__proto__") return true;
  1204. const isNumericKey = Number.isFinite(+name);
  1205. const isLast = index >= path.length;
  1206. name = !name && utils_default.isArray(target) ? target.length : name;
  1207. if (isLast) {
  1208. if (utils_default.hasOwnProp(target, name)) target[name] = [target[name], value];
  1209. else target[name] = value;
  1210. return !isNumericKey;
  1211. }
  1212. if (!target[name] || !utils_default.isObject(target[name])) target[name] = [];
  1213. if (buildPath(path, value, target[name], index) && utils_default.isArray(target[name])) target[name] = arrayToObject(target[name]);
  1214. return !isNumericKey;
  1215. }
  1216. if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
  1217. const obj = {};
  1218. utils_default.forEachEntry(formData, (name, value) => {
  1219. buildPath(parsePropPath(name), value, obj, 0);
  1220. });
  1221. return obj;
  1222. }
  1223. return null;
  1224. }
  1225. //#endregion
  1226. //#region node_modules/axios/lib/defaults/index.js
  1227. /**
  1228. * It takes a string, tries to parse it, and if it fails, it returns the stringified version
  1229. * of the input
  1230. *
  1231. * @param {any} rawValue - The value to be stringified.
  1232. * @param {Function} parser - A function that parses a string into a JavaScript object.
  1233. * @param {Function} encoder - A function that takes a value and returns a string.
  1234. *
  1235. * @returns {string} A stringified version of the rawValue.
  1236. */
  1237. function stringifySafely(rawValue, parser, encoder) {
  1238. if (utils_default.isString(rawValue)) try {
  1239. (parser || JSON.parse)(rawValue);
  1240. return utils_default.trim(rawValue);
  1241. } catch (e) {
  1242. if (e.name !== "SyntaxError") throw e;
  1243. }
  1244. return (encoder || JSON.stringify)(rawValue);
  1245. }
  1246. var defaults = {
  1247. transitional: transitional_default,
  1248. adapter: [
  1249. "xhr",
  1250. "http",
  1251. "fetch"
  1252. ],
  1253. transformRequest: [function transformRequest(data, headers) {
  1254. const contentType = headers.getContentType() || "";
  1255. const hasJSONContentType = contentType.indexOf("application/json") > -1;
  1256. const isObjectPayload = utils_default.isObject(data);
  1257. if (isObjectPayload && utils_default.isHTMLForm(data)) data = new FormData(data);
  1258. if (utils_default.isFormData(data)) return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
  1259. if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) return data;
  1260. if (utils_default.isArrayBufferView(data)) return data.buffer;
  1261. if (utils_default.isURLSearchParams(data)) {
  1262. headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
  1263. return data.toString();
  1264. }
  1265. let isFileList;
  1266. if (isObjectPayload) {
  1267. if (contentType.indexOf("application/x-www-form-urlencoded") > -1) return toURLEncodedForm(data, this.formSerializer).toString();
  1268. if ((isFileList = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
  1269. const _FormData = this.env && this.env.FormData;
  1270. return toFormData$1(isFileList ? { "files[]": data } : data, _FormData && new _FormData(), this.formSerializer);
  1271. }
  1272. }
  1273. if (isObjectPayload || hasJSONContentType) {
  1274. headers.setContentType("application/json", false);
  1275. return stringifySafely(data);
  1276. }
  1277. return data;
  1278. }],
  1279. transformResponse: [function transformResponse(data) {
  1280. const transitional = this.transitional || defaults.transitional;
  1281. const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
  1282. const JSONRequested = this.responseType === "json";
  1283. if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) return data;
  1284. if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
  1285. const strictJSONParsing = !(transitional && transitional.silentJSONParsing) && JSONRequested;
  1286. try {
  1287. return JSON.parse(data, this.parseReviver);
  1288. } catch (e) {
  1289. if (strictJSONParsing) {
  1290. if (e.name === "SyntaxError") throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
  1291. throw e;
  1292. }
  1293. }
  1294. }
  1295. return data;
  1296. }],
  1297. timeout: 0,
  1298. xsrfCookieName: "XSRF-TOKEN",
  1299. xsrfHeaderName: "X-XSRF-TOKEN",
  1300. maxContentLength: -1,
  1301. maxBodyLength: -1,
  1302. env: {
  1303. FormData: platform_default.classes.FormData,
  1304. Blob: platform_default.classes.Blob
  1305. },
  1306. validateStatus: function validateStatus(status) {
  1307. return status >= 200 && status < 300;
  1308. },
  1309. headers: { common: {
  1310. Accept: "application/json, text/plain, */*",
  1311. "Content-Type": void 0
  1312. } }
  1313. };
  1314. utils_default.forEach([
  1315. "delete",
  1316. "get",
  1317. "head",
  1318. "post",
  1319. "put",
  1320. "patch"
  1321. ], (method) => {
  1322. defaults.headers[method] = {};
  1323. });
  1324. //#endregion
  1325. //#region node_modules/axios/lib/helpers/parseHeaders.js
  1326. var ignoreDuplicateOf = utils_default.toObjectSet([
  1327. "age",
  1328. "authorization",
  1329. "content-length",
  1330. "content-type",
  1331. "etag",
  1332. "expires",
  1333. "from",
  1334. "host",
  1335. "if-modified-since",
  1336. "if-unmodified-since",
  1337. "last-modified",
  1338. "location",
  1339. "max-forwards",
  1340. "proxy-authorization",
  1341. "referer",
  1342. "retry-after",
  1343. "user-agent"
  1344. ]);
  1345. /**
  1346. * Parse headers into an object
  1347. *
  1348. * ```
  1349. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  1350. * Content-Type: application/json
  1351. * Connection: keep-alive
  1352. * Transfer-Encoding: chunked
  1353. * ```
  1354. *
  1355. * @param {String} rawHeaders Headers needing to be parsed
  1356. *
  1357. * @returns {Object} Headers parsed into an object
  1358. */
  1359. var parseHeaders_default = (rawHeaders) => {
  1360. const parsed = {};
  1361. let key;
  1362. let val;
  1363. let i;
  1364. rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
  1365. i = line.indexOf(":");
  1366. key = line.substring(0, i).trim().toLowerCase();
  1367. val = line.substring(i + 1).trim();
  1368. if (!key || parsed[key] && ignoreDuplicateOf[key]) return;
  1369. if (key === "set-cookie") if (parsed[key]) parsed[key].push(val);
  1370. else parsed[key] = [val];
  1371. else parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
  1372. });
  1373. return parsed;
  1374. };
  1375. //#endregion
  1376. //#region node_modules/axios/lib/core/AxiosHeaders.js
  1377. var $internals = Symbol("internals");
  1378. var isValidHeaderValue = (value) => !/[\r\n]/.test(value);
  1379. function assertValidHeaderValue(value, header) {
  1380. if (value === false || value == null) return;
  1381. if (utils_default.isArray(value)) {
  1382. value.forEach((v) => assertValidHeaderValue(v, header));
  1383. return;
  1384. }
  1385. if (!isValidHeaderValue(String(value))) throw new Error(`Invalid character in header content ["${header}"]`);
  1386. }
  1387. function normalizeHeader(header) {
  1388. return header && String(header).trim().toLowerCase();
  1389. }
  1390. function stripTrailingCRLF(str) {
  1391. let end = str.length;
  1392. while (end > 0) {
  1393. const charCode = str.charCodeAt(end - 1);
  1394. if (charCode !== 10 && charCode !== 13) break;
  1395. end -= 1;
  1396. }
  1397. return end === str.length ? str : str.slice(0, end);
  1398. }
  1399. function normalizeValue(value) {
  1400. if (value === false || value == null) return value;
  1401. return utils_default.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
  1402. }
  1403. function parseTokens(str) {
  1404. const tokens = Object.create(null);
  1405. const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  1406. let match;
  1407. while (match = tokensRE.exec(str)) tokens[match[1]] = match[2];
  1408. return tokens;
  1409. }
  1410. var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
  1411. function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
  1412. if (utils_default.isFunction(filter)) return filter.call(this, value, header);
  1413. if (isHeaderNameFilter) value = header;
  1414. if (!utils_default.isString(value)) return;
  1415. if (utils_default.isString(filter)) return value.indexOf(filter) !== -1;
  1416. if (utils_default.isRegExp(filter)) return filter.test(value);
  1417. }
  1418. function formatHeader(header) {
  1419. return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
  1420. return char.toUpperCase() + str;
  1421. });
  1422. }
  1423. function buildAccessors(obj, header) {
  1424. const accessorName = utils_default.toCamelCase(" " + header);
  1425. [
  1426. "get",
  1427. "set",
  1428. "has"
  1429. ].forEach((methodName) => {
  1430. Object.defineProperty(obj, methodName + accessorName, {
  1431. value: function(arg1, arg2, arg3) {
  1432. return this[methodName].call(this, header, arg1, arg2, arg3);
  1433. },
  1434. configurable: true
  1435. });
  1436. });
  1437. }
  1438. var AxiosHeaders$1 = class {
  1439. constructor(headers) {
  1440. headers && this.set(headers);
  1441. }
  1442. set(header, valueOrRewrite, rewrite) {
  1443. const self = this;
  1444. function setHeader(_value, _header, _rewrite) {
  1445. const lHeader = normalizeHeader(_header);
  1446. if (!lHeader) throw new Error("header name must be a non-empty string");
  1447. const key = utils_default.findKey(self, lHeader);
  1448. if (!key || self[key] === void 0 || _rewrite === true || _rewrite === void 0 && self[key] !== false) {
  1449. assertValidHeaderValue(_value, _header);
  1450. self[key || _header] = normalizeValue(_value);
  1451. }
  1452. }
  1453. const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
  1454. if (utils_default.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
  1455. else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders_default(header), valueOrRewrite);
  1456. else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
  1457. let obj = {}, dest, key;
  1458. for (const entry of header) {
  1459. if (!utils_default.isArray(entry)) throw TypeError("Object iterator must return a key-value pair");
  1460. obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
  1461. }
  1462. setHeaders(obj, valueOrRewrite);
  1463. } else header != null && setHeader(valueOrRewrite, header, rewrite);
  1464. return this;
  1465. }
  1466. get(header, parser) {
  1467. header = normalizeHeader(header);
  1468. if (header) {
  1469. const key = utils_default.findKey(this, header);
  1470. if (key) {
  1471. const value = this[key];
  1472. if (!parser) return value;
  1473. if (parser === true) return parseTokens(value);
  1474. if (utils_default.isFunction(parser)) return parser.call(this, value, key);
  1475. if (utils_default.isRegExp(parser)) return parser.exec(value);
  1476. throw new TypeError("parser must be boolean|regexp|function");
  1477. }
  1478. }
  1479. }
  1480. has(header, matcher) {
  1481. header = normalizeHeader(header);
  1482. if (header) {
  1483. const key = utils_default.findKey(this, header);
  1484. return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
  1485. }
  1486. return false;
  1487. }
  1488. delete(header, matcher) {
  1489. const self = this;
  1490. let deleted = false;
  1491. function deleteHeader(_header) {
  1492. _header = normalizeHeader(_header);
  1493. if (_header) {
  1494. const key = utils_default.findKey(self, _header);
  1495. if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
  1496. delete self[key];
  1497. deleted = true;
  1498. }
  1499. }
  1500. }
  1501. if (utils_default.isArray(header)) header.forEach(deleteHeader);
  1502. else deleteHeader(header);
  1503. return deleted;
  1504. }
  1505. clear(matcher) {
  1506. const keys = Object.keys(this);
  1507. let i = keys.length;
  1508. let deleted = false;
  1509. while (i--) {
  1510. const key = keys[i];
  1511. if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
  1512. delete this[key];
  1513. deleted = true;
  1514. }
  1515. }
  1516. return deleted;
  1517. }
  1518. normalize(format) {
  1519. const self = this;
  1520. const headers = {};
  1521. utils_default.forEach(this, (value, header) => {
  1522. const key = utils_default.findKey(headers, header);
  1523. if (key) {
  1524. self[key] = normalizeValue(value);
  1525. delete self[header];
  1526. return;
  1527. }
  1528. const normalized = format ? formatHeader(header) : String(header).trim();
  1529. if (normalized !== header) delete self[header];
  1530. self[normalized] = normalizeValue(value);
  1531. headers[normalized] = true;
  1532. });
  1533. return this;
  1534. }
  1535. concat(...targets) {
  1536. return this.constructor.concat(this, ...targets);
  1537. }
  1538. toJSON(asStrings) {
  1539. const obj = Object.create(null);
  1540. utils_default.forEach(this, (value, header) => {
  1541. value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
  1542. });
  1543. return obj;
  1544. }
  1545. [Symbol.iterator]() {
  1546. return Object.entries(this.toJSON())[Symbol.iterator]();
  1547. }
  1548. toString() {
  1549. return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
  1550. }
  1551. getSetCookie() {
  1552. return this.get("set-cookie") || [];
  1553. }
  1554. get [Symbol.toStringTag]() {
  1555. return "AxiosHeaders";
  1556. }
  1557. static from(thing) {
  1558. return thing instanceof this ? thing : new this(thing);
  1559. }
  1560. static concat(first, ...targets) {
  1561. const computed = new this(first);
  1562. targets.forEach((target) => computed.set(target));
  1563. return computed;
  1564. }
  1565. static accessor(header) {
  1566. const accessors = (this[$internals] = this[$internals] = { accessors: {} }).accessors;
  1567. const prototype = this.prototype;
  1568. function defineAccessor(_header) {
  1569. const lHeader = normalizeHeader(_header);
  1570. if (!accessors[lHeader]) {
  1571. buildAccessors(prototype, _header);
  1572. accessors[lHeader] = true;
  1573. }
  1574. }
  1575. utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
  1576. return this;
  1577. }
  1578. };
  1579. AxiosHeaders$1.accessor([
  1580. "Content-Type",
  1581. "Content-Length",
  1582. "Accept",
  1583. "Accept-Encoding",
  1584. "User-Agent",
  1585. "Authorization"
  1586. ]);
  1587. utils_default.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
  1588. let mapped = key[0].toUpperCase() + key.slice(1);
  1589. return {
  1590. get: () => value,
  1591. set(headerValue) {
  1592. this[mapped] = headerValue;
  1593. }
  1594. };
  1595. });
  1596. utils_default.freezeMethods(AxiosHeaders$1);
  1597. //#endregion
  1598. //#region node_modules/axios/lib/core/transformData.js
  1599. /**
  1600. * Transform the data for a request or a response
  1601. *
  1602. * @param {Array|Function} fns A single function or Array of functions
  1603. * @param {?Object} response The response object
  1604. *
  1605. * @returns {*} The resulting transformed data
  1606. */
  1607. function transformData(fns, response) {
  1608. const config = this || defaults;
  1609. const context = response || config;
  1610. const headers = AxiosHeaders$1.from(context.headers);
  1611. let data = context.data;
  1612. utils_default.forEach(fns, function transform(fn) {
  1613. data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
  1614. });
  1615. headers.normalize();
  1616. return data;
  1617. }
  1618. //#endregion
  1619. //#region node_modules/axios/lib/cancel/isCancel.js
  1620. function isCancel$1(value) {
  1621. return !!(value && value.__CANCEL__);
  1622. }
  1623. //#endregion
  1624. //#region node_modules/axios/lib/cancel/CanceledError.js
  1625. var CanceledError$1 = class extends AxiosError$1 {
  1626. /**
  1627. * A `CanceledError` is an object that is thrown when an operation is canceled.
  1628. *
  1629. * @param {string=} message The message.
  1630. * @param {Object=} config The config.
  1631. * @param {Object=} request The request.
  1632. *
  1633. * @returns {CanceledError} The created error.
  1634. */
  1635. constructor(message, config, request) {
  1636. super(message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
  1637. this.name = "CanceledError";
  1638. this.__CANCEL__ = true;
  1639. }
  1640. };
  1641. //#endregion
  1642. //#region node_modules/axios/lib/core/settle.js
  1643. /**
  1644. * Resolve or reject a Promise based on response status.
  1645. *
  1646. * @param {Function} resolve A function that resolves the promise.
  1647. * @param {Function} reject A function that rejects the promise.
  1648. * @param {object} response The response.
  1649. *
  1650. * @returns {object} The response.
  1651. */
  1652. function settle(resolve, reject, response) {
  1653. const validateStatus = response.config.validateStatus;
  1654. if (!response.status || !validateStatus || validateStatus(response.status)) resolve(response);
  1655. else 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));
  1656. }
  1657. //#endregion
  1658. //#region node_modules/axios/lib/helpers/parseProtocol.js
  1659. function parseProtocol(url) {
  1660. const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  1661. return match && match[1] || "";
  1662. }
  1663. //#endregion
  1664. //#region node_modules/axios/lib/helpers/speedometer.js
  1665. /**
  1666. * Calculate data maxRate
  1667. * @param {Number} [samplesCount= 10]
  1668. * @param {Number} [min= 1000]
  1669. * @returns {Function}
  1670. */
  1671. function speedometer(samplesCount, min) {
  1672. samplesCount = samplesCount || 10;
  1673. const bytes = new Array(samplesCount);
  1674. const timestamps = new Array(samplesCount);
  1675. let head = 0;
  1676. let tail = 0;
  1677. let firstSampleTS;
  1678. min = min !== void 0 ? min : 1e3;
  1679. return function push(chunkLength) {
  1680. const now = Date.now();
  1681. const startedAt = timestamps[tail];
  1682. if (!firstSampleTS) firstSampleTS = now;
  1683. bytes[head] = chunkLength;
  1684. timestamps[head] = now;
  1685. let i = tail;
  1686. let bytesCount = 0;
  1687. while (i !== head) {
  1688. bytesCount += bytes[i++];
  1689. i = i % samplesCount;
  1690. }
  1691. head = (head + 1) % samplesCount;
  1692. if (head === tail) tail = (tail + 1) % samplesCount;
  1693. if (now - firstSampleTS < min) return;
  1694. const passed = startedAt && now - startedAt;
  1695. return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
  1696. };
  1697. }
  1698. //#endregion
  1699. //#region node_modules/axios/lib/helpers/throttle.js
  1700. /**
  1701. * Throttle decorator
  1702. * @param {Function} fn
  1703. * @param {Number} freq
  1704. * @return {Function}
  1705. */
  1706. function throttle(fn, freq) {
  1707. let timestamp = 0;
  1708. let threshold = 1e3 / freq;
  1709. let lastArgs;
  1710. let timer;
  1711. const invoke = (args, now = Date.now()) => {
  1712. timestamp = now;
  1713. lastArgs = null;
  1714. if (timer) {
  1715. clearTimeout(timer);
  1716. timer = null;
  1717. }
  1718. fn(...args);
  1719. };
  1720. const throttled = (...args) => {
  1721. const now = Date.now();
  1722. const passed = now - timestamp;
  1723. if (passed >= threshold) invoke(args, now);
  1724. else {
  1725. lastArgs = args;
  1726. if (!timer) timer = setTimeout(() => {
  1727. timer = null;
  1728. invoke(lastArgs);
  1729. }, threshold - passed);
  1730. }
  1731. };
  1732. const flush = () => lastArgs && invoke(lastArgs);
  1733. return [throttled, flush];
  1734. }
  1735. //#endregion
  1736. //#region node_modules/axios/lib/helpers/progressEventReducer.js
  1737. var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
  1738. let bytesNotified = 0;
  1739. const _speedometer = speedometer(50, 250);
  1740. return throttle((e) => {
  1741. const loaded = e.loaded;
  1742. const total = e.lengthComputable ? e.total : void 0;
  1743. const progressBytes = loaded - bytesNotified;
  1744. const rate = _speedometer(progressBytes);
  1745. const inRange = loaded <= total;
  1746. bytesNotified = loaded;
  1747. listener({
  1748. loaded,
  1749. total,
  1750. progress: total ? loaded / total : void 0,
  1751. bytes: progressBytes,
  1752. rate: rate ? rate : void 0,
  1753. estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
  1754. event: e,
  1755. lengthComputable: total != null,
  1756. [isDownloadStream ? "download" : "upload"]: true
  1757. });
  1758. }, freq);
  1759. };
  1760. var progressEventDecorator = (total, throttled) => {
  1761. const lengthComputable = total != null;
  1762. return [(loaded) => throttled[0]({
  1763. lengthComputable,
  1764. total,
  1765. loaded
  1766. }), throttled[1]];
  1767. };
  1768. var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
  1769. //#endregion
  1770. //#region node_modules/axios/lib/helpers/isURLSameOrigin.js
  1771. var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
  1772. url = new URL(url, platform_default.origin);
  1773. return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
  1774. })(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
  1775. //#endregion
  1776. //#region node_modules/axios/lib/helpers/cookies.js
  1777. var cookies_default = platform_default.hasStandardBrowserEnv ? {
  1778. write(name, value, expires, path, domain, secure, sameSite) {
  1779. if (typeof document === "undefined") return;
  1780. const cookie = [`${name}=${encodeURIComponent(value)}`];
  1781. if (utils_default.isNumber(expires)) cookie.push(`expires=${new Date(expires).toUTCString()}`);
  1782. if (utils_default.isString(path)) cookie.push(`path=${path}`);
  1783. if (utils_default.isString(domain)) cookie.push(`domain=${domain}`);
  1784. if (secure === true) cookie.push("secure");
  1785. if (utils_default.isString(sameSite)) cookie.push(`SameSite=${sameSite}`);
  1786. document.cookie = cookie.join("; ");
  1787. },
  1788. read(name) {
  1789. if (typeof document === "undefined") return null;
  1790. const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
  1791. return match ? decodeURIComponent(match[1]) : null;
  1792. },
  1793. remove(name) {
  1794. this.write(name, "", Date.now() - 864e5, "/");
  1795. }
  1796. } : {
  1797. write() {},
  1798. read() {
  1799. return null;
  1800. },
  1801. remove() {}
  1802. };
  1803. //#endregion
  1804. //#region node_modules/axios/lib/helpers/isAbsoluteURL.js
  1805. /**
  1806. * Determines whether the specified URL is absolute
  1807. *
  1808. * @param {string} url The URL to test
  1809. *
  1810. * @returns {boolean} True if the specified URL is absolute, otherwise false
  1811. */
  1812. function isAbsoluteURL(url) {
  1813. if (typeof url !== "string") return false;
  1814. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  1815. }
  1816. //#endregion
  1817. //#region node_modules/axios/lib/helpers/combineURLs.js
  1818. /**
  1819. * Creates a new URL by combining the specified URLs
  1820. *
  1821. * @param {string} baseURL The base URL
  1822. * @param {string} relativeURL The relative URL
  1823. *
  1824. * @returns {string} The combined URL
  1825. */
  1826. function combineURLs(baseURL, relativeURL) {
  1827. return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
  1828. }
  1829. //#endregion
  1830. //#region node_modules/axios/lib/core/buildFullPath.js
  1831. /**
  1832. * Creates a new URL by combining the baseURL with the requestedURL,
  1833. * only when the requestedURL is not already an absolute URL.
  1834. * If the requestURL is absolute, this function returns the requestedURL untouched.
  1835. *
  1836. * @param {string} baseURL The base URL
  1837. * @param {string} requestedURL Absolute or relative URL to combine
  1838. *
  1839. * @returns {string} The combined full path
  1840. */
  1841. function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
  1842. let isRelativeUrl = !isAbsoluteURL(requestedURL);
  1843. if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) return combineURLs(baseURL, requestedURL);
  1844. return requestedURL;
  1845. }
  1846. //#endregion
  1847. //#region node_modules/axios/lib/core/mergeConfig.js
  1848. var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
  1849. /**
  1850. * Config-specific merge-function which creates a new config-object
  1851. * by merging two configuration objects together.
  1852. *
  1853. * @param {Object} config1
  1854. * @param {Object} config2
  1855. *
  1856. * @returns {Object} New object resulting from merging config2 to config1
  1857. */
  1858. function mergeConfig$1(config1, config2) {
  1859. config2 = config2 || {};
  1860. const config = {};
  1861. function getMergedValue(target, source, prop, caseless) {
  1862. if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) return utils_default.merge.call({ caseless }, target, source);
  1863. else if (utils_default.isPlainObject(source)) return utils_default.merge({}, source);
  1864. else if (utils_default.isArray(source)) return source.slice();
  1865. return source;
  1866. }
  1867. function mergeDeepProperties(a, b, prop, caseless) {
  1868. if (!utils_default.isUndefined(b)) return getMergedValue(a, b, prop, caseless);
  1869. else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a, prop, caseless);
  1870. }
  1871. function valueFromConfig2(a, b) {
  1872. if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
  1873. }
  1874. function defaultToConfig2(a, b) {
  1875. if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
  1876. else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a);
  1877. }
  1878. function mergeDirectKeys(a, b, prop) {
  1879. if (prop in config2) return getMergedValue(a, b);
  1880. else if (prop in config1) return getMergedValue(void 0, a);
  1881. }
  1882. const mergeMap = {
  1883. url: valueFromConfig2,
  1884. method: valueFromConfig2,
  1885. data: valueFromConfig2,
  1886. baseURL: defaultToConfig2,
  1887. transformRequest: defaultToConfig2,
  1888. transformResponse: defaultToConfig2,
  1889. paramsSerializer: defaultToConfig2,
  1890. timeout: defaultToConfig2,
  1891. timeoutMessage: defaultToConfig2,
  1892. withCredentials: defaultToConfig2,
  1893. withXSRFToken: defaultToConfig2,
  1894. adapter: defaultToConfig2,
  1895. responseType: defaultToConfig2,
  1896. xsrfCookieName: defaultToConfig2,
  1897. xsrfHeaderName: defaultToConfig2,
  1898. onUploadProgress: defaultToConfig2,
  1899. onDownloadProgress: defaultToConfig2,
  1900. decompress: defaultToConfig2,
  1901. maxContentLength: defaultToConfig2,
  1902. maxBodyLength: defaultToConfig2,
  1903. beforeRedirect: defaultToConfig2,
  1904. transport: defaultToConfig2,
  1905. httpAgent: defaultToConfig2,
  1906. httpsAgent: defaultToConfig2,
  1907. cancelToken: defaultToConfig2,
  1908. socketPath: defaultToConfig2,
  1909. responseEncoding: defaultToConfig2,
  1910. validateStatus: mergeDirectKeys,
  1911. headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
  1912. };
  1913. utils_default.forEach(Object.keys({
  1914. ...config1,
  1915. ...config2
  1916. }), function computeConfigValue(prop) {
  1917. if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
  1918. const merge = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
  1919. const configValue = merge(config1[prop], config2[prop], prop);
  1920. utils_default.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
  1921. });
  1922. return config;
  1923. }
  1924. //#endregion
  1925. //#region node_modules/axios/lib/helpers/resolveConfig.js
  1926. var resolveConfig_default = (config) => {
  1927. const newConfig = mergeConfig$1({}, config);
  1928. let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
  1929. newConfig.headers = headers = AxiosHeaders$1.from(headers);
  1930. newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
  1931. if (auth) headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
  1932. if (utils_default.isFormData(data)) {
  1933. if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) headers.setContentType(void 0);
  1934. else if (utils_default.isFunction(data.getHeaders)) {
  1935. const formHeaders = data.getHeaders();
  1936. const allowedHeaders = ["content-type", "content-length"];
  1937. Object.entries(formHeaders).forEach(([key, val]) => {
  1938. if (allowedHeaders.includes(key.toLowerCase())) headers.set(key, val);
  1939. });
  1940. }
  1941. }
  1942. if (platform_default.hasStandardBrowserEnv) {
  1943. withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
  1944. if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
  1945. const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
  1946. if (xsrfValue) headers.set(xsrfHeaderName, xsrfValue);
  1947. }
  1948. }
  1949. return newConfig;
  1950. };
  1951. var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
  1952. return new Promise(function dispatchXhrRequest(resolve, reject) {
  1953. const _config = resolveConfig_default(config);
  1954. let requestData = _config.data;
  1955. const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
  1956. let { responseType, onUploadProgress, onDownloadProgress } = _config;
  1957. let onCanceled;
  1958. let uploadThrottled, downloadThrottled;
  1959. let flushUpload, flushDownload;
  1960. function done() {
  1961. flushUpload && flushUpload();
  1962. flushDownload && flushDownload();
  1963. _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
  1964. _config.signal && _config.signal.removeEventListener("abort", onCanceled);
  1965. }
  1966. let request = new XMLHttpRequest();
  1967. request.open(_config.method.toUpperCase(), _config.url, true);
  1968. request.timeout = _config.timeout;
  1969. function onloadend() {
  1970. if (!request) return;
  1971. const responseHeaders = AxiosHeaders$1.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
  1972. settle(function _resolve(value) {
  1973. resolve(value);
  1974. done();
  1975. }, function _reject(err) {
  1976. reject(err);
  1977. done();
  1978. }, {
  1979. data: !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response,
  1980. status: request.status,
  1981. statusText: request.statusText,
  1982. headers: responseHeaders,
  1983. config,
  1984. request
  1985. });
  1986. request = null;
  1987. }
  1988. if ("onloadend" in request) request.onloadend = onloadend;
  1989. else request.onreadystatechange = function handleLoad() {
  1990. if (!request || request.readyState !== 4) return;
  1991. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) return;
  1992. setTimeout(onloadend);
  1993. };
  1994. request.onabort = function handleAbort() {
  1995. if (!request) return;
  1996. reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
  1997. request = null;
  1998. };
  1999. request.onerror = function handleError(event) {
  2000. const err = new AxiosError$1(event && event.message ? event.message : "Network Error", AxiosError$1.ERR_NETWORK, config, request);
  2001. err.event = event || null;
  2002. reject(err);
  2003. request = null;
  2004. };
  2005. request.ontimeout = function handleTimeout() {
  2006. let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
  2007. const transitional = _config.transitional || transitional_default;
  2008. if (_config.timeoutErrorMessage) timeoutErrorMessage = _config.timeoutErrorMessage;
  2009. reject(new AxiosError$1(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, request));
  2010. request = null;
  2011. };
  2012. requestData === void 0 && requestHeaders.setContentType(null);
  2013. if ("setRequestHeader" in request) utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
  2014. request.setRequestHeader(key, val);
  2015. });
  2016. if (!utils_default.isUndefined(_config.withCredentials)) request.withCredentials = !!_config.withCredentials;
  2017. if (responseType && responseType !== "json") request.responseType = _config.responseType;
  2018. if (onDownloadProgress) {
  2019. [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
  2020. request.addEventListener("progress", downloadThrottled);
  2021. }
  2022. if (onUploadProgress && request.upload) {
  2023. [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
  2024. request.upload.addEventListener("progress", uploadThrottled);
  2025. request.upload.addEventListener("loadend", flushUpload);
  2026. }
  2027. if (_config.cancelToken || _config.signal) {
  2028. onCanceled = (cancel) => {
  2029. if (!request) return;
  2030. reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
  2031. request.abort();
  2032. request = null;
  2033. };
  2034. _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
  2035. if (_config.signal) _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
  2036. }
  2037. const protocol = parseProtocol(_config.url);
  2038. if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
  2039. reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
  2040. return;
  2041. }
  2042. request.send(requestData || null);
  2043. });
  2044. };
  2045. //#endregion
  2046. //#region node_modules/axios/lib/helpers/composeSignals.js
  2047. var composeSignals = (signals, timeout) => {
  2048. const { length } = signals = signals ? signals.filter(Boolean) : [];
  2049. if (timeout || length) {
  2050. let controller = new AbortController();
  2051. let aborted;
  2052. const onabort = function(reason) {
  2053. if (!aborted) {
  2054. aborted = true;
  2055. unsubscribe();
  2056. const err = reason instanceof Error ? reason : this.reason;
  2057. controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
  2058. }
  2059. };
  2060. let timer = timeout && setTimeout(() => {
  2061. timer = null;
  2062. onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
  2063. }, timeout);
  2064. const unsubscribe = () => {
  2065. if (signals) {
  2066. timer && clearTimeout(timer);
  2067. timer = null;
  2068. signals.forEach((signal) => {
  2069. signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener("abort", onabort);
  2070. });
  2071. signals = null;
  2072. }
  2073. };
  2074. signals.forEach((signal) => signal.addEventListener("abort", onabort));
  2075. const { signal } = controller;
  2076. signal.unsubscribe = () => utils_default.asap(unsubscribe);
  2077. return signal;
  2078. }
  2079. };
  2080. //#endregion
  2081. //#region node_modules/axios/lib/helpers/trackStream.js
  2082. var streamChunk = function* (chunk, chunkSize) {
  2083. let len = chunk.byteLength;
  2084. if (!chunkSize || len < chunkSize) {
  2085. yield chunk;
  2086. return;
  2087. }
  2088. let pos = 0;
  2089. let end;
  2090. while (pos < len) {
  2091. end = pos + chunkSize;
  2092. yield chunk.slice(pos, end);
  2093. pos = end;
  2094. }
  2095. };
  2096. var readBytes = async function* (iterable, chunkSize) {
  2097. for await (const chunk of readStream(iterable)) yield* streamChunk(chunk, chunkSize);
  2098. };
  2099. var readStream = async function* (stream) {
  2100. if (stream[Symbol.asyncIterator]) {
  2101. yield* stream;
  2102. return;
  2103. }
  2104. const reader = stream.getReader();
  2105. try {
  2106. for (;;) {
  2107. const { done, value } = await reader.read();
  2108. if (done) break;
  2109. yield value;
  2110. }
  2111. } finally {
  2112. await reader.cancel();
  2113. }
  2114. };
  2115. var trackStream = (stream, chunkSize, onProgress, onFinish) => {
  2116. const iterator = readBytes(stream, chunkSize);
  2117. let bytes = 0;
  2118. let done;
  2119. let _onFinish = (e) => {
  2120. if (!done) {
  2121. done = true;
  2122. onFinish && onFinish(e);
  2123. }
  2124. };
  2125. return new ReadableStream({
  2126. async pull(controller) {
  2127. try {
  2128. const { done, value } = await iterator.next();
  2129. if (done) {
  2130. _onFinish();
  2131. controller.close();
  2132. return;
  2133. }
  2134. let len = value.byteLength;
  2135. if (onProgress) onProgress(bytes += len);
  2136. controller.enqueue(new Uint8Array(value));
  2137. } catch (err) {
  2138. _onFinish(err);
  2139. throw err;
  2140. }
  2141. },
  2142. cancel(reason) {
  2143. _onFinish(reason);
  2144. return iterator.return();
  2145. }
  2146. }, { highWaterMark: 2 });
  2147. };
  2148. //#endregion
  2149. //#region node_modules/axios/lib/adapters/fetch.js
  2150. var DEFAULT_CHUNK_SIZE = 64 * 1024;
  2151. var { isFunction } = utils_default;
  2152. var globalFetchAPI = (({ Request, Response }) => ({
  2153. Request,
  2154. Response
  2155. }))(utils_default.global);
  2156. var { ReadableStream: ReadableStream$1, TextEncoder } = utils_default.global;
  2157. var test = (fn, ...args) => {
  2158. try {
  2159. return !!fn(...args);
  2160. } catch (e) {
  2161. return false;
  2162. }
  2163. };
  2164. var factory = (env) => {
  2165. env = utils_default.merge.call({ skipUndefined: true }, globalFetchAPI, env);
  2166. const { fetch: envFetch, Request, Response } = env;
  2167. const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
  2168. const isRequestSupported = isFunction(Request);
  2169. const isResponseSupported = isFunction(Response);
  2170. if (!isFetchSupported) return false;
  2171. const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
  2172. const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
  2173. const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
  2174. let duplexAccessed = false;
  2175. const body = new ReadableStream$1();
  2176. const hasContentType = new Request(platform_default.origin, {
  2177. body,
  2178. method: "POST",
  2179. get duplex() {
  2180. duplexAccessed = true;
  2181. return "half";
  2182. }
  2183. }).headers.has("Content-Type");
  2184. body.cancel();
  2185. return duplexAccessed && !hasContentType;
  2186. });
  2187. const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
  2188. const resolvers = { stream: supportsResponseStream && ((res) => res.body) };
  2189. isFetchSupported && [
  2190. "text",
  2191. "arrayBuffer",
  2192. "blob",
  2193. "formData",
  2194. "stream"
  2195. ].forEach((type) => {
  2196. !resolvers[type] && (resolvers[type] = (res, config) => {
  2197. let method = res && res[type];
  2198. if (method) return method.call(res);
  2199. throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
  2200. });
  2201. });
  2202. const getBodyLength = async (body) => {
  2203. if (body == null) return 0;
  2204. if (utils_default.isBlob(body)) return body.size;
  2205. if (utils_default.isSpecCompliantForm(body)) return (await new Request(platform_default.origin, {
  2206. method: "POST",
  2207. body
  2208. }).arrayBuffer()).byteLength;
  2209. if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) return body.byteLength;
  2210. if (utils_default.isURLSearchParams(body)) body = body + "";
  2211. if (utils_default.isString(body)) return (await encodeText(body)).byteLength;
  2212. };
  2213. const resolveBodyLength = async (headers, body) => {
  2214. const length = utils_default.toFiniteNumber(headers.getContentLength());
  2215. return length == null ? getBodyLength(body) : length;
  2216. };
  2217. return async (config) => {
  2218. let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions } = resolveConfig_default(config);
  2219. let _fetch = envFetch || fetch;
  2220. responseType = responseType ? (responseType + "").toLowerCase() : "text";
  2221. let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
  2222. let request = null;
  2223. const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
  2224. composedSignal.unsubscribe();
  2225. });
  2226. let requestContentLength;
  2227. try {
  2228. if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
  2229. let _request = new Request(url, {
  2230. method: "POST",
  2231. body: data,
  2232. duplex: "half"
  2233. });
  2234. let contentTypeHeader;
  2235. if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
  2236. if (_request.body) {
  2237. const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
  2238. data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
  2239. }
  2240. }
  2241. if (!utils_default.isString(withCredentials)) withCredentials = withCredentials ? "include" : "omit";
  2242. const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
  2243. const resolvedOptions = {
  2244. ...fetchOptions,
  2245. signal: composedSignal,
  2246. method: method.toUpperCase(),
  2247. headers: headers.normalize().toJSON(),
  2248. body: data,
  2249. duplex: "half",
  2250. credentials: isCredentialsSupported ? withCredentials : void 0
  2251. };
  2252. request = isRequestSupported && new Request(url, resolvedOptions);
  2253. let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
  2254. const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
  2255. if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
  2256. const options = {};
  2257. [
  2258. "status",
  2259. "statusText",
  2260. "headers"
  2261. ].forEach((prop) => {
  2262. options[prop] = response[prop];
  2263. });
  2264. const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
  2265. const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
  2266. response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
  2267. flush && flush();
  2268. unsubscribe && unsubscribe();
  2269. }), options);
  2270. }
  2271. responseType = responseType || "text";
  2272. let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
  2273. !isStreamResponse && unsubscribe && unsubscribe();
  2274. return await new Promise((resolve, reject) => {
  2275. settle(resolve, reject, {
  2276. data: responseData,
  2277. headers: AxiosHeaders$1.from(response.headers),
  2278. status: response.status,
  2279. statusText: response.statusText,
  2280. config,
  2281. request
  2282. });
  2283. });
  2284. } catch (err) {
  2285. unsubscribe && unsubscribe();
  2286. if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) throw Object.assign(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request, err && err.response), { cause: err.cause || err });
  2287. throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
  2288. }
  2289. };
  2290. };
  2291. var seedCache = /* @__PURE__ */ new Map();
  2292. var getFetch = (config) => {
  2293. let env = config && config.env || {};
  2294. const { fetch, Request, Response } = env;
  2295. const seeds = [
  2296. Request,
  2297. Response,
  2298. fetch
  2299. ];
  2300. let i = seeds.length, seed, target, map = seedCache;
  2301. while (i--) {
  2302. seed = seeds[i];
  2303. target = map.get(seed);
  2304. target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
  2305. map = target;
  2306. }
  2307. return target;
  2308. };
  2309. getFetch();
  2310. //#endregion
  2311. //#region node_modules/axios/lib/adapters/adapters.js
  2312. /**
  2313. * Known adapters mapping.
  2314. * Provides environment-specific adapters for Axios:
  2315. * - `http` for Node.js
  2316. * - `xhr` for browsers
  2317. * - `fetch` for fetch API-based requests
  2318. *
  2319. * @type {Object<string, Function|Object>}
  2320. */
  2321. var knownAdapters = {
  2322. http: null,
  2323. xhr: xhr_default,
  2324. fetch: { get: getFetch }
  2325. };
  2326. utils_default.forEach(knownAdapters, (fn, value) => {
  2327. if (fn) {
  2328. try {
  2329. Object.defineProperty(fn, "name", { value });
  2330. } catch (e) {}
  2331. Object.defineProperty(fn, "adapterName", { value });
  2332. }
  2333. });
  2334. /**
  2335. * Render a rejection reason string for unknown or unsupported adapters
  2336. *
  2337. * @param {string} reason
  2338. * @returns {string}
  2339. */
  2340. var renderReason = (reason) => `- ${reason}`;
  2341. /**
  2342. * Check if the adapter is resolved (function, null, or false)
  2343. *
  2344. * @param {Function|null|false} adapter
  2345. * @returns {boolean}
  2346. */
  2347. var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
  2348. /**
  2349. * Get the first suitable adapter from the provided list.
  2350. * Tries each adapter in order until a supported one is found.
  2351. * Throws an AxiosError if no adapter is suitable.
  2352. *
  2353. * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
  2354. * @param {Object} config - Axios request configuration
  2355. * @throws {AxiosError} If no suitable adapter is available
  2356. * @returns {Function} The resolved adapter function
  2357. */
  2358. function getAdapter$1(adapters, config) {
  2359. adapters = utils_default.isArray(adapters) ? adapters : [adapters];
  2360. const { length } = adapters;
  2361. let nameOrAdapter;
  2362. let adapter;
  2363. const rejectedReasons = {};
  2364. for (let i = 0; i < length; i++) {
  2365. nameOrAdapter = adapters[i];
  2366. let id;
  2367. adapter = nameOrAdapter;
  2368. if (!isResolvedHandle(nameOrAdapter)) {
  2369. adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
  2370. if (adapter === void 0) throw new AxiosError$1(`Unknown adapter '${id}'`);
  2371. }
  2372. if (adapter && (utils_default.isFunction(adapter) || (adapter = adapter.get(config)))) break;
  2373. rejectedReasons[id || "#" + i] = adapter;
  2374. }
  2375. if (!adapter) {
  2376. const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
  2377. throw new AxiosError$1(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
  2378. }
  2379. return adapter;
  2380. }
  2381. /**
  2382. * Exports Axios adapters and utility to resolve an adapter
  2383. */
  2384. var adapters_default = {
  2385. getAdapter: getAdapter$1,
  2386. adapters: knownAdapters
  2387. };
  2388. //#endregion
  2389. //#region node_modules/axios/lib/core/dispatchRequest.js
  2390. /**
  2391. * Throws a `CanceledError` if cancellation has been requested.
  2392. *
  2393. * @param {Object} config The config that is to be used for the request
  2394. *
  2395. * @returns {void}
  2396. */
  2397. function throwIfCancellationRequested(config) {
  2398. if (config.cancelToken) config.cancelToken.throwIfRequested();
  2399. if (config.signal && config.signal.aborted) throw new CanceledError$1(null, config);
  2400. }
  2401. /**
  2402. * Dispatch a request to the server using the configured adapter.
  2403. *
  2404. * @param {object} config The config that is to be used for the request
  2405. *
  2406. * @returns {Promise} The Promise to be fulfilled
  2407. */
  2408. function dispatchRequest(config) {
  2409. throwIfCancellationRequested(config);
  2410. config.headers = AxiosHeaders$1.from(config.headers);
  2411. config.data = transformData.call(config, config.transformRequest);
  2412. if ([
  2413. "post",
  2414. "put",
  2415. "patch"
  2416. ].indexOf(config.method) !== -1) config.headers.setContentType("application/x-www-form-urlencoded", false);
  2417. return adapters_default.getAdapter(config.adapter || defaults.adapter, config)(config).then(function onAdapterResolution(response) {
  2418. throwIfCancellationRequested(config);
  2419. response.data = transformData.call(config, config.transformResponse, response);
  2420. response.headers = AxiosHeaders$1.from(response.headers);
  2421. return response;
  2422. }, function onAdapterRejection(reason) {
  2423. if (!isCancel$1(reason)) {
  2424. throwIfCancellationRequested(config);
  2425. if (reason && reason.response) {
  2426. reason.response.data = transformData.call(config, config.transformResponse, reason.response);
  2427. reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
  2428. }
  2429. }
  2430. return Promise.reject(reason);
  2431. });
  2432. }
  2433. //#endregion
  2434. //#region node_modules/axios/lib/env/data.js
  2435. var VERSION$1 = "1.15.0";
  2436. //#endregion
  2437. //#region node_modules/axios/lib/helpers/validator.js
  2438. var validators$1 = {};
  2439. [
  2440. "object",
  2441. "boolean",
  2442. "number",
  2443. "function",
  2444. "string",
  2445. "symbol"
  2446. ].forEach((type, i) => {
  2447. validators$1[type] = function validator(thing) {
  2448. return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
  2449. };
  2450. });
  2451. var deprecatedWarnings = {};
  2452. /**
  2453. * Transitional option validator
  2454. *
  2455. * @param {function|boolean?} validator - set to false if the transitional option has been removed
  2456. * @param {string?} version - deprecated version / removed since version
  2457. * @param {string?} message - some message with additional info
  2458. *
  2459. * @returns {function}
  2460. */
  2461. validators$1.transitional = function transitional(validator, version, message) {
  2462. function formatMessage(opt, desc) {
  2463. return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
  2464. }
  2465. return (value, opt, opts) => {
  2466. if (validator === false) throw new AxiosError$1(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError$1.ERR_DEPRECATED);
  2467. if (version && !deprecatedWarnings[opt]) {
  2468. deprecatedWarnings[opt] = true;
  2469. console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
  2470. }
  2471. return validator ? validator(value, opt, opts) : true;
  2472. };
  2473. };
  2474. validators$1.spelling = function spelling(correctSpelling) {
  2475. return (value, opt) => {
  2476. console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
  2477. return true;
  2478. };
  2479. };
  2480. /**
  2481. * Assert object's properties type
  2482. *
  2483. * @param {object} options
  2484. * @param {object} schema
  2485. * @param {boolean?} allowUnknown
  2486. *
  2487. * @returns {object}
  2488. */
  2489. function assertOptions(options, schema, allowUnknown) {
  2490. if (typeof options !== "object") throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
  2491. const keys = Object.keys(options);
  2492. let i = keys.length;
  2493. while (i-- > 0) {
  2494. const opt = keys[i];
  2495. const validator = schema[opt];
  2496. if (validator) {
  2497. const value = options[opt];
  2498. const result = value === void 0 || validator(value, opt, options);
  2499. if (result !== true) throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
  2500. continue;
  2501. }
  2502. if (allowUnknown !== true) throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
  2503. }
  2504. }
  2505. var validator_default = {
  2506. assertOptions,
  2507. validators: validators$1
  2508. };
  2509. //#endregion
  2510. //#region node_modules/axios/lib/core/Axios.js
  2511. var validators = validator_default.validators;
  2512. /**
  2513. * Create a new instance of Axios
  2514. *
  2515. * @param {Object} instanceConfig The default config for the instance
  2516. *
  2517. * @return {Axios} A new instance of Axios
  2518. */
  2519. var Axios$1 = class {
  2520. constructor(instanceConfig) {
  2521. this.defaults = instanceConfig || {};
  2522. this.interceptors = {
  2523. request: new InterceptorManager(),
  2524. response: new InterceptorManager()
  2525. };
  2526. }
  2527. /**
  2528. * Dispatch a request
  2529. *
  2530. * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
  2531. * @param {?Object} config
  2532. *
  2533. * @returns {Promise} The Promise to be fulfilled
  2534. */
  2535. async request(configOrUrl, config) {
  2536. try {
  2537. return await this._request(configOrUrl, config);
  2538. } catch (err) {
  2539. if (err instanceof Error) {
  2540. let dummy = {};
  2541. Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = /* @__PURE__ */ new Error();
  2542. const stack = (() => {
  2543. if (!dummy.stack) return "";
  2544. const firstNewlineIndex = dummy.stack.indexOf("\n");
  2545. return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
  2546. })();
  2547. try {
  2548. if (!err.stack) err.stack = stack;
  2549. else if (stack) {
  2550. const firstNewlineIndex = stack.indexOf("\n");
  2551. const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
  2552. const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
  2553. if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) err.stack += "\n" + stack;
  2554. }
  2555. } catch (e) {}
  2556. }
  2557. throw err;
  2558. }
  2559. }
  2560. _request(configOrUrl, config) {
  2561. if (typeof configOrUrl === "string") {
  2562. config = config || {};
  2563. config.url = configOrUrl;
  2564. } else config = configOrUrl || {};
  2565. config = mergeConfig$1(this.defaults, config);
  2566. const { transitional, paramsSerializer, headers } = config;
  2567. if (transitional !== void 0) validator_default.assertOptions(transitional, {
  2568. silentJSONParsing: validators.transitional(validators.boolean),
  2569. forcedJSONParsing: validators.transitional(validators.boolean),
  2570. clarifyTimeoutError: validators.transitional(validators.boolean),
  2571. legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
  2572. }, false);
  2573. if (paramsSerializer != null) if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
  2574. else validator_default.assertOptions(paramsSerializer, {
  2575. encode: validators.function,
  2576. serialize: validators.function
  2577. }, true);
  2578. if (config.allowAbsoluteUrls !== void 0) {} else if (this.defaults.allowAbsoluteUrls !== void 0) config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
  2579. else config.allowAbsoluteUrls = true;
  2580. validator_default.assertOptions(config, {
  2581. baseUrl: validators.spelling("baseURL"),
  2582. withXsrfToken: validators.spelling("withXSRFToken")
  2583. }, true);
  2584. config.method = (config.method || this.defaults.method || "get").toLowerCase();
  2585. let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
  2586. headers && utils_default.forEach([
  2587. "delete",
  2588. "get",
  2589. "head",
  2590. "post",
  2591. "put",
  2592. "patch",
  2593. "common"
  2594. ], (method) => {
  2595. delete headers[method];
  2596. });
  2597. config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
  2598. const requestInterceptorChain = [];
  2599. let synchronousRequestInterceptors = true;
  2600. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  2601. if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) return;
  2602. synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
  2603. const transitional = config.transitional || transitional_default;
  2604. if (transitional && transitional.legacyInterceptorReqResOrdering) requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  2605. else requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  2606. });
  2607. const responseInterceptorChain = [];
  2608. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  2609. responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  2610. });
  2611. let promise;
  2612. let i = 0;
  2613. let len;
  2614. if (!synchronousRequestInterceptors) {
  2615. const chain = [dispatchRequest.bind(this), void 0];
  2616. chain.unshift(...requestInterceptorChain);
  2617. chain.push(...responseInterceptorChain);
  2618. len = chain.length;
  2619. promise = Promise.resolve(config);
  2620. while (i < len) promise = promise.then(chain[i++], chain[i++]);
  2621. return promise;
  2622. }
  2623. len = requestInterceptorChain.length;
  2624. let newConfig = config;
  2625. while (i < len) {
  2626. const onFulfilled = requestInterceptorChain[i++];
  2627. const onRejected = requestInterceptorChain[i++];
  2628. try {
  2629. newConfig = onFulfilled(newConfig);
  2630. } catch (error) {
  2631. onRejected.call(this, error);
  2632. break;
  2633. }
  2634. }
  2635. try {
  2636. promise = dispatchRequest.call(this, newConfig);
  2637. } catch (error) {
  2638. return Promise.reject(error);
  2639. }
  2640. i = 0;
  2641. len = responseInterceptorChain.length;
  2642. while (i < len) promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
  2643. return promise;
  2644. }
  2645. getUri(config) {
  2646. config = mergeConfig$1(this.defaults, config);
  2647. return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls), config.params, config.paramsSerializer);
  2648. }
  2649. };
  2650. utils_default.forEach([
  2651. "delete",
  2652. "get",
  2653. "head",
  2654. "options"
  2655. ], function forEachMethodNoData(method) {
  2656. Axios$1.prototype[method] = function(url, config) {
  2657. return this.request(mergeConfig$1(config || {}, {
  2658. method,
  2659. url,
  2660. data: (config || {}).data
  2661. }));
  2662. };
  2663. });
  2664. utils_default.forEach([
  2665. "post",
  2666. "put",
  2667. "patch"
  2668. ], function forEachMethodWithData(method) {
  2669. function generateHTTPMethod(isForm) {
  2670. return function httpMethod(url, data, config) {
  2671. return this.request(mergeConfig$1(config || {}, {
  2672. method,
  2673. headers: isForm ? { "Content-Type": "multipart/form-data" } : {},
  2674. url,
  2675. data
  2676. }));
  2677. };
  2678. }
  2679. Axios$1.prototype[method] = generateHTTPMethod();
  2680. Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
  2681. });
  2682. //#endregion
  2683. //#region node_modules/axios/lib/cancel/CancelToken.js
  2684. /**
  2685. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  2686. *
  2687. * @param {Function} executor The executor function.
  2688. *
  2689. * @returns {CancelToken}
  2690. */
  2691. var CancelToken$1 = class CancelToken$1 {
  2692. constructor(executor) {
  2693. if (typeof executor !== "function") throw new TypeError("executor must be a function.");
  2694. let resolvePromise;
  2695. this.promise = new Promise(function promiseExecutor(resolve) {
  2696. resolvePromise = resolve;
  2697. });
  2698. const token = this;
  2699. this.promise.then((cancel) => {
  2700. if (!token._listeners) return;
  2701. let i = token._listeners.length;
  2702. while (i-- > 0) token._listeners[i](cancel);
  2703. token._listeners = null;
  2704. });
  2705. this.promise.then = (onfulfilled) => {
  2706. let _resolve;
  2707. const promise = new Promise((resolve) => {
  2708. token.subscribe(resolve);
  2709. _resolve = resolve;
  2710. }).then(onfulfilled);
  2711. promise.cancel = function reject() {
  2712. token.unsubscribe(_resolve);
  2713. };
  2714. return promise;
  2715. };
  2716. executor(function cancel(message, config, request) {
  2717. if (token.reason) return;
  2718. token.reason = new CanceledError$1(message, config, request);
  2719. resolvePromise(token.reason);
  2720. });
  2721. }
  2722. /**
  2723. * Throws a `CanceledError` if cancellation has been requested.
  2724. */
  2725. throwIfRequested() {
  2726. if (this.reason) throw this.reason;
  2727. }
  2728. /**
  2729. * Subscribe to the cancel signal
  2730. */
  2731. subscribe(listener) {
  2732. if (this.reason) {
  2733. listener(this.reason);
  2734. return;
  2735. }
  2736. if (this._listeners) this._listeners.push(listener);
  2737. else this._listeners = [listener];
  2738. }
  2739. /**
  2740. * Unsubscribe from the cancel signal
  2741. */
  2742. unsubscribe(listener) {
  2743. if (!this._listeners) return;
  2744. const index = this._listeners.indexOf(listener);
  2745. if (index !== -1) this._listeners.splice(index, 1);
  2746. }
  2747. toAbortSignal() {
  2748. const controller = new AbortController();
  2749. const abort = (err) => {
  2750. controller.abort(err);
  2751. };
  2752. this.subscribe(abort);
  2753. controller.signal.unsubscribe = () => this.unsubscribe(abort);
  2754. return controller.signal;
  2755. }
  2756. /**
  2757. * Returns an object that contains a new `CancelToken` and a function that, when called,
  2758. * cancels the `CancelToken`.
  2759. */
  2760. static source() {
  2761. let cancel;
  2762. return {
  2763. token: new CancelToken$1(function executor(c) {
  2764. cancel = c;
  2765. }),
  2766. cancel
  2767. };
  2768. }
  2769. };
  2770. //#endregion
  2771. //#region node_modules/axios/lib/helpers/spread.js
  2772. /**
  2773. * Syntactic sugar for invoking a function and expanding an array for arguments.
  2774. *
  2775. * Common use case would be to use `Function.prototype.apply`.
  2776. *
  2777. * ```js
  2778. * function f(x, y, z) {}
  2779. * const args = [1, 2, 3];
  2780. * f.apply(null, args);
  2781. * ```
  2782. *
  2783. * With `spread` this example can be re-written.
  2784. *
  2785. * ```js
  2786. * spread(function(x, y, z) {})([1, 2, 3]);
  2787. * ```
  2788. *
  2789. * @param {Function} callback
  2790. *
  2791. * @returns {Function}
  2792. */
  2793. function spread$1(callback) {
  2794. return function wrap(arr) {
  2795. return callback.apply(null, arr);
  2796. };
  2797. }
  2798. //#endregion
  2799. //#region node_modules/axios/lib/helpers/isAxiosError.js
  2800. /**
  2801. * Determines whether the payload is an error thrown by Axios
  2802. *
  2803. * @param {*} payload The value to test
  2804. *
  2805. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  2806. */
  2807. function isAxiosError$1(payload) {
  2808. return utils_default.isObject(payload) && payload.isAxiosError === true;
  2809. }
  2810. //#endregion
  2811. //#region node_modules/axios/lib/helpers/HttpStatusCode.js
  2812. var HttpStatusCode$1 = {
  2813. Continue: 100,
  2814. SwitchingProtocols: 101,
  2815. Processing: 102,
  2816. EarlyHints: 103,
  2817. Ok: 200,
  2818. Created: 201,
  2819. Accepted: 202,
  2820. NonAuthoritativeInformation: 203,
  2821. NoContent: 204,
  2822. ResetContent: 205,
  2823. PartialContent: 206,
  2824. MultiStatus: 207,
  2825. AlreadyReported: 208,
  2826. ImUsed: 226,
  2827. MultipleChoices: 300,
  2828. MovedPermanently: 301,
  2829. Found: 302,
  2830. SeeOther: 303,
  2831. NotModified: 304,
  2832. UseProxy: 305,
  2833. Unused: 306,
  2834. TemporaryRedirect: 307,
  2835. PermanentRedirect: 308,
  2836. BadRequest: 400,
  2837. Unauthorized: 401,
  2838. PaymentRequired: 402,
  2839. Forbidden: 403,
  2840. NotFound: 404,
  2841. MethodNotAllowed: 405,
  2842. NotAcceptable: 406,
  2843. ProxyAuthenticationRequired: 407,
  2844. RequestTimeout: 408,
  2845. Conflict: 409,
  2846. Gone: 410,
  2847. LengthRequired: 411,
  2848. PreconditionFailed: 412,
  2849. PayloadTooLarge: 413,
  2850. UriTooLong: 414,
  2851. UnsupportedMediaType: 415,
  2852. RangeNotSatisfiable: 416,
  2853. ExpectationFailed: 417,
  2854. ImATeapot: 418,
  2855. MisdirectedRequest: 421,
  2856. UnprocessableEntity: 422,
  2857. Locked: 423,
  2858. FailedDependency: 424,
  2859. TooEarly: 425,
  2860. UpgradeRequired: 426,
  2861. PreconditionRequired: 428,
  2862. TooManyRequests: 429,
  2863. RequestHeaderFieldsTooLarge: 431,
  2864. UnavailableForLegalReasons: 451,
  2865. InternalServerError: 500,
  2866. NotImplemented: 501,
  2867. BadGateway: 502,
  2868. ServiceUnavailable: 503,
  2869. GatewayTimeout: 504,
  2870. HttpVersionNotSupported: 505,
  2871. VariantAlsoNegotiates: 506,
  2872. InsufficientStorage: 507,
  2873. LoopDetected: 508,
  2874. NotExtended: 510,
  2875. NetworkAuthenticationRequired: 511,
  2876. WebServerIsDown: 521,
  2877. ConnectionTimedOut: 522,
  2878. OriginIsUnreachable: 523,
  2879. TimeoutOccurred: 524,
  2880. SslHandshakeFailed: 525,
  2881. InvalidSslCertificate: 526
  2882. };
  2883. Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
  2884. HttpStatusCode$1[value] = key;
  2885. });
  2886. //#endregion
  2887. //#region node_modules/axios/lib/axios.js
  2888. /**
  2889. * Create an instance of Axios
  2890. *
  2891. * @param {Object} defaultConfig The default config for the instance
  2892. *
  2893. * @returns {Axios} A new instance of Axios
  2894. */
  2895. function createInstance(defaultConfig) {
  2896. const context = new Axios$1(defaultConfig);
  2897. const instance = bind(Axios$1.prototype.request, context);
  2898. utils_default.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
  2899. utils_default.extend(instance, context, null, { allOwnKeys: true });
  2900. instance.create = function create(instanceConfig) {
  2901. return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
  2902. };
  2903. return instance;
  2904. }
  2905. var axios = createInstance(defaults);
  2906. axios.Axios = Axios$1;
  2907. axios.CanceledError = CanceledError$1;
  2908. axios.CancelToken = CancelToken$1;
  2909. axios.isCancel = isCancel$1;
  2910. axios.VERSION = VERSION$1;
  2911. axios.toFormData = toFormData$1;
  2912. axios.AxiosError = AxiosError$1;
  2913. axios.Cancel = axios.CanceledError;
  2914. axios.all = function all(promises) {
  2915. return Promise.all(promises);
  2916. };
  2917. axios.spread = spread$1;
  2918. axios.isAxiosError = isAxiosError$1;
  2919. axios.mergeConfig = mergeConfig$1;
  2920. axios.AxiosHeaders = AxiosHeaders$1;
  2921. axios.formToJSON = (thing) => formDataToJSON(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
  2922. axios.getAdapter = adapters_default.getAdapter;
  2923. axios.HttpStatusCode = HttpStatusCode$1;
  2924. axios.default = axios;
  2925. //#endregion
  2926. //#region node_modules/axios/index.js
  2927. var { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig } = axios;
  2928. //#endregion
  2929. export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, axios as default, formToJSON, getAdapter, isAxiosError, isCancel, mergeConfig, spread, toFormData };
  2930. //# sourceMappingURL=axios.js.map