source: imaps-frontend/node_modules/.vite/deps/axios.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

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