@xjw_/vue3-npm-system 1.0.3 → 1.0.5

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