@ghentcdh/json-forms-vue 0.4.0 → 0.5.0

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.
package/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const authenticationVue = require("@ghentcdh/authentication-vue");
4
3
  const ui = require("@ghentcdh/ui");
5
4
  const core$2 = require("@jsonforms/core");
6
5
  const vue$1 = require("@jsonforms/vue");
@@ -10,10 +9,2584 @@ const MdEditor = require("@toast-ui/editor");
10
9
  const testers = require("@jsonforms/core/src/testers/testers");
11
10
  const vueRouter = require("vue-router");
12
11
  const core$3 = require("@vueuse/core");
12
+ function getRuntimeConfig() {
13
+ {
14
+ throw new Error(
15
+ "Runtime config not loaded. Call loadRuntimeConfig() first."
16
+ );
17
+ }
18
+ }
19
+ function bind(fn, thisArg) {
20
+ return function wrap() {
21
+ return fn.apply(thisArg, arguments);
22
+ };
23
+ }
24
+ const { toString } = Object.prototype;
25
+ const { getPrototypeOf } = Object;
26
+ const { iterator, toStringTag } = Symbol;
27
+ const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
28
+ const str = toString.call(thing);
29
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
30
+ })(/* @__PURE__ */ Object.create(null));
31
+ const kindOfTest = (type) => {
32
+ type = type.toLowerCase();
33
+ return (thing) => kindOf(thing) === type;
34
+ };
35
+ const typeOfTest = (type) => (thing) => typeof thing === type;
36
+ const { isArray: isArray$1 } = Array;
37
+ const isUndefined = typeOfTest("undefined");
38
+ function isBuffer(val) {
39
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
40
+ }
41
+ const isArrayBuffer = kindOfTest("ArrayBuffer");
42
+ function isArrayBufferView(val) {
43
+ let result;
44
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
45
+ result = ArrayBuffer.isView(val);
46
+ } else {
47
+ result = val && val.buffer && isArrayBuffer(val.buffer);
48
+ }
49
+ return result;
50
+ }
51
+ const isString = typeOfTest("string");
52
+ const isFunction$1 = typeOfTest("function");
53
+ const isNumber = typeOfTest("number");
54
+ const isObject$1 = (thing) => thing !== null && typeof thing === "object";
55
+ const isBoolean = (thing) => thing === true || thing === false;
56
+ const isPlainObject$1 = (val) => {
57
+ if (kindOf(val) !== "object") {
58
+ return false;
59
+ }
60
+ const prototype2 = getPrototypeOf(val);
61
+ return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
62
+ };
63
+ const isEmptyObject = (val) => {
64
+ if (!isObject$1(val) || isBuffer(val)) {
65
+ return false;
66
+ }
67
+ try {
68
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
69
+ } catch (e) {
70
+ return false;
71
+ }
72
+ };
73
+ const isDate = kindOfTest("Date");
74
+ const isFile = kindOfTest("File");
75
+ const isBlob = kindOfTest("Blob");
76
+ const isFileList = kindOfTest("FileList");
77
+ const isStream = (val) => isObject$1(val) && isFunction$1(val.pipe);
78
+ const isFormData = (thing) => {
79
+ let kind;
80
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
81
+ kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
82
+ };
83
+ const isURLSearchParams = kindOfTest("URLSearchParams");
84
+ const [isReadableStream, isRequest, isResponse, isHeaders] = [
85
+ "ReadableStream",
86
+ "Request",
87
+ "Response",
88
+ "Headers"
89
+ ].map(kindOfTest);
90
+ const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
91
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
92
+ if (obj === null || typeof obj === "undefined") {
93
+ return;
94
+ }
95
+ let i;
96
+ let l;
97
+ if (typeof obj !== "object") {
98
+ obj = [obj];
99
+ }
100
+ if (isArray$1(obj)) {
101
+ for (i = 0, l = obj.length; i < l; i++) {
102
+ fn.call(null, obj[i], i, obj);
103
+ }
104
+ } else {
105
+ if (isBuffer(obj)) {
106
+ return;
107
+ }
108
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
109
+ const len = keys.length;
110
+ let key;
111
+ for (i = 0; i < len; i++) {
112
+ key = keys[i];
113
+ fn.call(null, obj[key], key, obj);
114
+ }
115
+ }
116
+ }
117
+ function findKey(obj, key) {
118
+ if (isBuffer(obj)) {
119
+ return null;
120
+ }
121
+ key = key.toLowerCase();
122
+ const keys = Object.keys(obj);
123
+ let i = keys.length;
124
+ let _key;
125
+ while (i-- > 0) {
126
+ _key = keys[i];
127
+ if (key === _key.toLowerCase()) {
128
+ return _key;
129
+ }
130
+ }
131
+ return null;
132
+ }
133
+ const _global = (() => {
134
+ if (typeof globalThis !== "undefined") return globalThis;
135
+ return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
136
+ })();
137
+ const isContextDefined = (context) => !isUndefined(context) && context !== _global;
138
+ function merge$1() {
139
+ const { caseless, skipUndefined } = isContextDefined(this) && this || {};
140
+ const result = {};
141
+ const assignValue = (val, key) => {
142
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
143
+ return;
144
+ }
145
+ const targetKey = caseless && findKey(result, key) || key;
146
+ if (isPlainObject$1(result[targetKey]) && isPlainObject$1(val)) {
147
+ result[targetKey] = merge$1(result[targetKey], val);
148
+ } else if (isPlainObject$1(val)) {
149
+ result[targetKey] = merge$1({}, val);
150
+ } else if (isArray$1(val)) {
151
+ result[targetKey] = val.slice();
152
+ } else if (!skipUndefined || !isUndefined(val)) {
153
+ result[targetKey] = val;
154
+ }
155
+ };
156
+ for (let i = 0, l = arguments.length; i < l; i++) {
157
+ arguments[i] && forEach(arguments[i], assignValue);
158
+ }
159
+ return result;
160
+ }
161
+ const extend$1 = (a, b, thisArg, { allOwnKeys } = {}) => {
162
+ forEach(
163
+ b,
164
+ (val, key) => {
165
+ if (thisArg && isFunction$1(val)) {
166
+ Object.defineProperty(a, key, {
167
+ value: bind(val, thisArg),
168
+ writable: true,
169
+ enumerable: true,
170
+ configurable: true
171
+ });
172
+ } else {
173
+ Object.defineProperty(a, key, {
174
+ value: val,
175
+ writable: true,
176
+ enumerable: true,
177
+ configurable: true
178
+ });
179
+ }
180
+ },
181
+ { allOwnKeys }
182
+ );
183
+ return a;
184
+ };
185
+ const stripBOM = (content) => {
186
+ if (content.charCodeAt(0) === 65279) {
187
+ content = content.slice(1);
188
+ }
189
+ return content;
190
+ };
191
+ const inherits = (constructor, superConstructor, props, descriptors) => {
192
+ constructor.prototype = Object.create(
193
+ superConstructor.prototype,
194
+ descriptors
195
+ );
196
+ Object.defineProperty(constructor.prototype, "constructor", {
197
+ value: constructor,
198
+ writable: true,
199
+ enumerable: false,
200
+ configurable: true
201
+ });
202
+ Object.defineProperty(constructor, "super", {
203
+ value: superConstructor.prototype
204
+ });
205
+ props && Object.assign(constructor.prototype, props);
206
+ };
207
+ const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
208
+ let props;
209
+ let i;
210
+ let prop;
211
+ const merged = {};
212
+ destObj = destObj || {};
213
+ if (sourceObj == null) return destObj;
214
+ do {
215
+ props = Object.getOwnPropertyNames(sourceObj);
216
+ i = props.length;
217
+ while (i-- > 0) {
218
+ prop = props[i];
219
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
220
+ destObj[prop] = sourceObj[prop];
221
+ merged[prop] = true;
222
+ }
223
+ }
224
+ sourceObj = filter2 !== false && getPrototypeOf(sourceObj);
225
+ } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);
226
+ return destObj;
227
+ };
228
+ const endsWith = (str, searchString, position) => {
229
+ str = String(str);
230
+ if (position === void 0 || position > str.length) {
231
+ position = str.length;
232
+ }
233
+ position -= searchString.length;
234
+ const lastIndex = str.indexOf(searchString, position);
235
+ return lastIndex !== -1 && lastIndex === position;
236
+ };
237
+ const toArray = (thing) => {
238
+ if (!thing) return null;
239
+ if (isArray$1(thing)) return thing;
240
+ let i = thing.length;
241
+ if (!isNumber(i)) return null;
242
+ const arr = new Array(i);
243
+ while (i-- > 0) {
244
+ arr[i] = thing[i];
245
+ }
246
+ return arr;
247
+ };
248
+ const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
249
+ return (thing) => {
250
+ return TypedArray && thing instanceof TypedArray;
251
+ };
252
+ })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
253
+ const forEachEntry = (obj, fn) => {
254
+ const generator = obj && obj[iterator];
255
+ const _iterator = generator.call(obj);
256
+ let result;
257
+ while ((result = _iterator.next()) && !result.done) {
258
+ const pair = result.value;
259
+ fn.call(obj, pair[0], pair[1]);
260
+ }
261
+ };
262
+ const matchAll = (regExp, str) => {
263
+ let matches;
264
+ const arr = [];
265
+ while ((matches = regExp.exec(str)) !== null) {
266
+ arr.push(matches);
267
+ }
268
+ return arr;
269
+ };
270
+ const isHTMLForm = kindOfTest("HTMLFormElement");
271
+ const toCamelCase = (str) => {
272
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
273
+ return p1.toUpperCase() + p2;
274
+ });
275
+ };
276
+ const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
277
+ const isRegExp = kindOfTest("RegExp");
278
+ const reduceDescriptors = (obj, reducer) => {
279
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
280
+ const reducedDescriptors = {};
281
+ forEach(descriptors, (descriptor, name) => {
282
+ let ret;
283
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
284
+ reducedDescriptors[name] = ret || descriptor;
285
+ }
286
+ });
287
+ Object.defineProperties(obj, reducedDescriptors);
288
+ };
289
+ const freezeMethods = (obj) => {
290
+ reduceDescriptors(obj, (descriptor, name) => {
291
+ if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
292
+ return false;
293
+ }
294
+ const value = obj[name];
295
+ if (!isFunction$1(value)) return;
296
+ descriptor.enumerable = false;
297
+ if ("writable" in descriptor) {
298
+ descriptor.writable = false;
299
+ return;
300
+ }
301
+ if (!descriptor.set) {
302
+ descriptor.set = () => {
303
+ throw Error("Can not rewrite read-only method '" + name + "'");
304
+ };
305
+ }
306
+ });
307
+ };
308
+ const toObjectSet = (arrayOrString, delimiter) => {
309
+ const obj = {};
310
+ const define = (arr) => {
311
+ arr.forEach((value) => {
312
+ obj[value] = true;
313
+ });
314
+ };
315
+ isArray$1(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
316
+ return obj;
317
+ };
318
+ const noop = () => {
319
+ };
320
+ const toFiniteNumber = (value, defaultValue) => {
321
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
322
+ };
323
+ function isSpecCompliantForm(thing) {
324
+ return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
325
+ }
326
+ const toJSONObject = (obj) => {
327
+ const stack = new Array(10);
328
+ const visit = (source, i) => {
329
+ if (isObject$1(source)) {
330
+ if (stack.indexOf(source) >= 0) {
331
+ return;
332
+ }
333
+ if (isBuffer(source)) {
334
+ return source;
335
+ }
336
+ if (!("toJSON" in source)) {
337
+ stack[i] = source;
338
+ const target = isArray$1(source) ? [] : {};
339
+ forEach(source, (value, key) => {
340
+ const reducedValue = visit(value, i + 1);
341
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
342
+ });
343
+ stack[i] = void 0;
344
+ return target;
345
+ }
346
+ }
347
+ return source;
348
+ };
349
+ return visit(obj, 0);
350
+ };
351
+ const isAsyncFn = kindOfTest("AsyncFunction");
352
+ const isThenable = (thing) => thing && (isObject$1(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
353
+ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
354
+ if (setImmediateSupported) {
355
+ return setImmediate;
356
+ }
357
+ return postMessageSupported ? ((token, callbacks) => {
358
+ _global.addEventListener(
359
+ "message",
360
+ ({ source, data }) => {
361
+ if (source === _global && data === token) {
362
+ callbacks.length && callbacks.shift()();
363
+ }
364
+ },
365
+ false
366
+ );
367
+ return (cb) => {
368
+ callbacks.push(cb);
369
+ _global.postMessage(token, "*");
370
+ };
371
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
372
+ })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
373
+ const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
374
+ const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
375
+ const utils$1 = {
376
+ isArray: isArray$1,
377
+ isArrayBuffer,
378
+ isBuffer,
379
+ isFormData,
380
+ isArrayBufferView,
381
+ isString,
382
+ isNumber,
383
+ isBoolean,
384
+ isObject: isObject$1,
385
+ isPlainObject: isPlainObject$1,
386
+ isEmptyObject,
387
+ isReadableStream,
388
+ isRequest,
389
+ isResponse,
390
+ isHeaders,
391
+ isUndefined,
392
+ isDate,
393
+ isFile,
394
+ isBlob,
395
+ isRegExp,
396
+ isFunction: isFunction$1,
397
+ isStream,
398
+ isURLSearchParams,
399
+ isTypedArray,
400
+ isFileList,
401
+ forEach,
402
+ merge: merge$1,
403
+ extend: extend$1,
404
+ trim,
405
+ stripBOM,
406
+ inherits,
407
+ toFlatObject,
408
+ kindOf,
409
+ kindOfTest,
410
+ endsWith,
411
+ toArray,
412
+ forEachEntry,
413
+ matchAll,
414
+ isHTMLForm,
415
+ hasOwnProperty,
416
+ hasOwnProp: hasOwnProperty,
417
+ // an alias to avoid ESLint no-prototype-builtins detection
418
+ reduceDescriptors,
419
+ freezeMethods,
420
+ toObjectSet,
421
+ toCamelCase,
422
+ noop,
423
+ toFiniteNumber,
424
+ findKey,
425
+ global: _global,
426
+ isContextDefined,
427
+ isSpecCompliantForm,
428
+ toJSONObject,
429
+ isAsyncFn,
430
+ isThenable,
431
+ setImmediate: _setImmediate,
432
+ asap,
433
+ isIterable
434
+ };
435
+ let AxiosError$1 = class AxiosError extends Error {
436
+ static from(error, code, config2, request, response, customProps) {
437
+ const axiosError = new AxiosError(error.message, code || error.code, config2, request, response);
438
+ axiosError.cause = error;
439
+ axiosError.name = error.name;
440
+ customProps && Object.assign(axiosError, customProps);
441
+ return axiosError;
442
+ }
443
+ /**
444
+ * Create an Error with the specified message, config, error code, request and response.
445
+ *
446
+ * @param {string} message The error message.
447
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
448
+ * @param {Object} [config] The config.
449
+ * @param {Object} [request] The request.
450
+ * @param {Object} [response] The response.
451
+ *
452
+ * @returns {Error} The created error.
453
+ */
454
+ constructor(message, code, config2, request, response) {
455
+ super(message);
456
+ this.name = "AxiosError";
457
+ this.isAxiosError = true;
458
+ code && (this.code = code);
459
+ config2 && (this.config = config2);
460
+ request && (this.request = request);
461
+ if (response) {
462
+ this.response = response;
463
+ this.status = response.status;
464
+ }
465
+ }
466
+ toJSON() {
467
+ return {
468
+ // Standard
469
+ message: this.message,
470
+ name: this.name,
471
+ // Microsoft
472
+ description: this.description,
473
+ number: this.number,
474
+ // Mozilla
475
+ fileName: this.fileName,
476
+ lineNumber: this.lineNumber,
477
+ columnNumber: this.columnNumber,
478
+ stack: this.stack,
479
+ // Axios
480
+ config: utils$1.toJSONObject(this.config),
481
+ code: this.code,
482
+ status: this.status
483
+ };
484
+ }
485
+ };
486
+ AxiosError$1.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
487
+ AxiosError$1.ERR_BAD_OPTION = "ERR_BAD_OPTION";
488
+ AxiosError$1.ECONNABORTED = "ECONNABORTED";
489
+ AxiosError$1.ETIMEDOUT = "ETIMEDOUT";
490
+ AxiosError$1.ERR_NETWORK = "ERR_NETWORK";
491
+ AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
492
+ AxiosError$1.ERR_DEPRECATED = "ERR_DEPRECATED";
493
+ AxiosError$1.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
494
+ AxiosError$1.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
495
+ AxiosError$1.ERR_CANCELED = "ERR_CANCELED";
496
+ AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
497
+ AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL";
498
+ const httpAdapter = null;
499
+ function isVisitable(thing) {
500
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
501
+ }
502
+ function removeBrackets(key) {
503
+ return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
504
+ }
505
+ function renderKey(path, key, dots) {
506
+ if (!path) return key;
507
+ return path.concat(key).map(function each(token, i) {
508
+ token = removeBrackets(token);
509
+ return !dots && i ? "[" + token + "]" : token;
510
+ }).join(dots ? "." : "");
511
+ }
512
+ function isFlatArray(arr) {
513
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
514
+ }
515
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
516
+ return /^is[A-Z]/.test(prop);
517
+ });
518
+ function toFormData$1(obj, formData, options) {
519
+ if (!utils$1.isObject(obj)) {
520
+ throw new TypeError("target must be an object");
521
+ }
522
+ formData = formData || new FormData();
523
+ options = utils$1.toFlatObject(options, {
524
+ metaTokens: true,
525
+ dots: false,
526
+ indexes: false
527
+ }, false, function defined(option, source) {
528
+ return !utils$1.isUndefined(source[option]);
529
+ });
530
+ const metaTokens = options.metaTokens;
531
+ const visitor = options.visitor || defaultVisitor;
532
+ const dots = options.dots;
533
+ const indexes = options.indexes;
534
+ const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
535
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
536
+ if (!utils$1.isFunction(visitor)) {
537
+ throw new TypeError("visitor must be a function");
538
+ }
539
+ function convertValue(value) {
540
+ if (value === null) return "";
541
+ if (utils$1.isDate(value)) {
542
+ return value.toISOString();
543
+ }
544
+ if (utils$1.isBoolean(value)) {
545
+ return value.toString();
546
+ }
547
+ if (!useBlob && utils$1.isBlob(value)) {
548
+ throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
549
+ }
550
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
551
+ return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
552
+ }
553
+ return value;
554
+ }
555
+ function defaultVisitor(value, key, path) {
556
+ let arr = value;
557
+ if (value && !path && typeof value === "object") {
558
+ if (utils$1.endsWith(key, "{}")) {
559
+ key = metaTokens ? key : key.slice(0, -2);
560
+ value = JSON.stringify(value);
561
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
562
+ key = removeBrackets(key);
563
+ arr.forEach(function each(el, index) {
564
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
565
+ // eslint-disable-next-line no-nested-ternary
566
+ indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
567
+ convertValue(el)
568
+ );
569
+ });
570
+ return false;
571
+ }
572
+ }
573
+ if (isVisitable(value)) {
574
+ return true;
575
+ }
576
+ formData.append(renderKey(path, key, dots), convertValue(value));
577
+ return false;
578
+ }
579
+ const stack = [];
580
+ const exposedHelpers = Object.assign(predicates, {
581
+ defaultVisitor,
582
+ convertValue,
583
+ isVisitable
584
+ });
585
+ function build(value, path) {
586
+ if (utils$1.isUndefined(value)) return;
587
+ if (stack.indexOf(value) !== -1) {
588
+ throw Error("Circular reference detected in " + path.join("."));
589
+ }
590
+ stack.push(value);
591
+ utils$1.forEach(value, function each(el, key) {
592
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
593
+ formData,
594
+ el,
595
+ utils$1.isString(key) ? key.trim() : key,
596
+ path,
597
+ exposedHelpers
598
+ );
599
+ if (result === true) {
600
+ build(el, path ? path.concat(key) : [key]);
601
+ }
602
+ });
603
+ stack.pop();
604
+ }
605
+ if (!utils$1.isObject(obj)) {
606
+ throw new TypeError("data must be an object");
607
+ }
608
+ build(obj);
609
+ return formData;
610
+ }
611
+ function encode$2(str) {
612
+ const charMap = {
613
+ "!": "%21",
614
+ "'": "%27",
615
+ "(": "%28",
616
+ ")": "%29",
617
+ "~": "%7E",
618
+ "%20": "+",
619
+ "%00": "\0"
620
+ };
621
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
622
+ return charMap[match];
623
+ });
624
+ }
625
+ function AxiosURLSearchParams(params, options) {
626
+ this._pairs = [];
627
+ params && toFormData$1(params, this, options);
628
+ }
629
+ const prototype = AxiosURLSearchParams.prototype;
630
+ prototype.append = function append(name, value) {
631
+ this._pairs.push([name, value]);
632
+ };
633
+ prototype.toString = function toString2(encoder) {
634
+ const _encode2 = encoder ? function(value) {
635
+ return encoder.call(this, value, encode$2);
636
+ } : encode$2;
637
+ return this._pairs.map(function each(pair) {
638
+ return _encode2(pair[0]) + "=" + _encode2(pair[1]);
639
+ }, "").join("&");
640
+ };
641
+ function encode$1(val) {
642
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
643
+ }
644
+ function buildURL(url, params, options) {
645
+ if (!params) {
646
+ return url;
647
+ }
648
+ const _encode2 = options && options.encode || encode$1;
649
+ const _options = utils$1.isFunction(options) ? {
650
+ serialize: options
651
+ } : options;
652
+ const serializeFn = _options && _options.serialize;
653
+ let serializedParams;
654
+ if (serializeFn) {
655
+ serializedParams = serializeFn(params, _options);
656
+ } else {
657
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode2);
658
+ }
659
+ if (serializedParams) {
660
+ const hashmarkIndex = url.indexOf("#");
661
+ if (hashmarkIndex !== -1) {
662
+ url = url.slice(0, hashmarkIndex);
663
+ }
664
+ url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
665
+ }
666
+ return url;
667
+ }
668
+ class InterceptorManager {
669
+ constructor() {
670
+ this.handlers = [];
671
+ }
672
+ /**
673
+ * Add a new interceptor to the stack
674
+ *
675
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
676
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
677
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
678
+ *
679
+ * @return {Number} An ID used to remove interceptor later
680
+ */
681
+ use(fulfilled, rejected, options) {
682
+ this.handlers.push({
683
+ fulfilled,
684
+ rejected,
685
+ synchronous: options ? options.synchronous : false,
686
+ runWhen: options ? options.runWhen : null
687
+ });
688
+ return this.handlers.length - 1;
689
+ }
690
+ /**
691
+ * Remove an interceptor from the stack
692
+ *
693
+ * @param {Number} id The ID that was returned by `use`
694
+ *
695
+ * @returns {void}
696
+ */
697
+ eject(id2) {
698
+ if (this.handlers[id2]) {
699
+ this.handlers[id2] = null;
700
+ }
701
+ }
702
+ /**
703
+ * Clear all interceptors from the stack
704
+ *
705
+ * @returns {void}
706
+ */
707
+ clear() {
708
+ if (this.handlers) {
709
+ this.handlers = [];
710
+ }
711
+ }
712
+ /**
713
+ * Iterate over all the registered interceptors
714
+ *
715
+ * This method is particularly useful for skipping over any
716
+ * interceptors that may have become `null` calling `eject`.
717
+ *
718
+ * @param {Function} fn The function to call for each interceptor
719
+ *
720
+ * @returns {void}
721
+ */
722
+ forEach(fn) {
723
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
724
+ if (h !== null) {
725
+ fn(h);
726
+ }
727
+ });
728
+ }
729
+ }
730
+ const transitionalDefaults = {
731
+ silentJSONParsing: true,
732
+ forcedJSONParsing: true,
733
+ clarifyTimeoutError: false,
734
+ legacyInterceptorReqResOrdering: true
735
+ };
736
+ const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
737
+ const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
738
+ const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
739
+ const platform$1 = {
740
+ isBrowser: true,
741
+ classes: {
742
+ URLSearchParams: URLSearchParams$1,
743
+ FormData: FormData$1,
744
+ Blob: Blob$1
745
+ },
746
+ protocols: ["http", "https", "file", "blob", "url", "data"]
747
+ };
748
+ const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
749
+ const _navigator = typeof navigator === "object" && navigator || void 0;
750
+ const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
751
+ const hasStandardBrowserWebWorkerEnv = (() => {
752
+ return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
753
+ self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
754
+ })();
755
+ const origin = hasBrowserEnv && window.location.href || "http://localhost";
756
+ const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
757
+ __proto__: null,
758
+ hasBrowserEnv,
759
+ hasStandardBrowserEnv,
760
+ hasStandardBrowserWebWorkerEnv,
761
+ navigator: _navigator,
762
+ origin
763
+ }, Symbol.toStringTag, { value: "Module" }));
764
+ const platform = {
765
+ ...utils,
766
+ ...platform$1
767
+ };
768
+ function toURLEncodedForm(data, options) {
769
+ return toFormData$1(data, new platform.classes.URLSearchParams(), {
770
+ visitor: function(value, key, path, helpers) {
771
+ if (platform.isNode && utils$1.isBuffer(value)) {
772
+ this.append(key, value.toString("base64"));
773
+ return false;
774
+ }
775
+ return helpers.defaultVisitor.apply(this, arguments);
776
+ },
777
+ ...options
778
+ });
779
+ }
780
+ function parsePropPath(name) {
781
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
782
+ return match[0] === "[]" ? "" : match[1] || match[0];
783
+ });
784
+ }
785
+ function arrayToObject(arr) {
786
+ const obj = {};
787
+ const keys = Object.keys(arr);
788
+ let i;
789
+ const len = keys.length;
790
+ let key;
791
+ for (i = 0; i < len; i++) {
792
+ key = keys[i];
793
+ obj[key] = arr[key];
794
+ }
795
+ return obj;
796
+ }
797
+ function formDataToJSON(formData) {
798
+ function buildPath(path, value, target, index) {
799
+ let name = path[index++];
800
+ if (name === "__proto__") return true;
801
+ const isNumericKey = Number.isFinite(+name);
802
+ const isLast = index >= path.length;
803
+ name = !name && utils$1.isArray(target) ? target.length : name;
804
+ if (isLast) {
805
+ if (utils$1.hasOwnProp(target, name)) {
806
+ target[name] = [target[name], value];
807
+ } else {
808
+ target[name] = value;
809
+ }
810
+ return !isNumericKey;
811
+ }
812
+ if (!target[name] || !utils$1.isObject(target[name])) {
813
+ target[name] = [];
814
+ }
815
+ const result = buildPath(path, value, target[name], index);
816
+ if (result && utils$1.isArray(target[name])) {
817
+ target[name] = arrayToObject(target[name]);
818
+ }
819
+ return !isNumericKey;
820
+ }
821
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
822
+ const obj = {};
823
+ utils$1.forEachEntry(formData, (name, value) => {
824
+ buildPath(parsePropPath(name), value, obj, 0);
825
+ });
826
+ return obj;
827
+ }
828
+ return null;
829
+ }
830
+ function stringifySafely(rawValue, parser, encoder) {
831
+ if (utils$1.isString(rawValue)) {
832
+ try {
833
+ (parser || JSON.parse)(rawValue);
834
+ return utils$1.trim(rawValue);
835
+ } catch (e) {
836
+ if (e.name !== "SyntaxError") {
837
+ throw e;
838
+ }
839
+ }
840
+ }
841
+ return (encoder || JSON.stringify)(rawValue);
842
+ }
843
+ const defaults = {
844
+ transitional: transitionalDefaults,
845
+ adapter: ["xhr", "http", "fetch"],
846
+ transformRequest: [function transformRequest(data, headers) {
847
+ const contentType = headers.getContentType() || "";
848
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
849
+ const isObjectPayload = utils$1.isObject(data);
850
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
851
+ data = new FormData(data);
852
+ }
853
+ const isFormData2 = utils$1.isFormData(data);
854
+ if (isFormData2) {
855
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
856
+ }
857
+ 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)) {
858
+ return data;
859
+ }
860
+ if (utils$1.isArrayBufferView(data)) {
861
+ return data.buffer;
862
+ }
863
+ if (utils$1.isURLSearchParams(data)) {
864
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
865
+ return data.toString();
866
+ }
867
+ let isFileList2;
868
+ if (isObjectPayload) {
869
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
870
+ return toURLEncodedForm(data, this.formSerializer).toString();
871
+ }
872
+ if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
873
+ const _FormData = this.env && this.env.FormData;
874
+ return toFormData$1(
875
+ isFileList2 ? { "files[]": data } : data,
876
+ _FormData && new _FormData(),
877
+ this.formSerializer
878
+ );
879
+ }
880
+ }
881
+ if (isObjectPayload || hasJSONContentType) {
882
+ headers.setContentType("application/json", false);
883
+ return stringifySafely(data);
884
+ }
885
+ return data;
886
+ }],
887
+ transformResponse: [function transformResponse(data) {
888
+ const transitional2 = this.transitional || defaults.transitional;
889
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
890
+ const JSONRequested = this.responseType === "json";
891
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
892
+ return data;
893
+ }
894
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
895
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
896
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
897
+ try {
898
+ return JSON.parse(data, this.parseReviver);
899
+ } catch (e) {
900
+ if (strictJSONParsing) {
901
+ if (e.name === "SyntaxError") {
902
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
903
+ }
904
+ throw e;
905
+ }
906
+ }
907
+ }
908
+ return data;
909
+ }],
910
+ /**
911
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
912
+ * timeout is not created.
913
+ */
914
+ timeout: 0,
915
+ xsrfCookieName: "XSRF-TOKEN",
916
+ xsrfHeaderName: "X-XSRF-TOKEN",
917
+ maxContentLength: -1,
918
+ maxBodyLength: -1,
919
+ env: {
920
+ FormData: platform.classes.FormData,
921
+ Blob: platform.classes.Blob
922
+ },
923
+ validateStatus: function validateStatus(status) {
924
+ return status >= 200 && status < 300;
925
+ },
926
+ headers: {
927
+ common: {
928
+ "Accept": "application/json, text/plain, */*",
929
+ "Content-Type": void 0
930
+ }
931
+ }
932
+ };
933
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
934
+ defaults.headers[method] = {};
935
+ });
936
+ const ignoreDuplicateOf = utils$1.toObjectSet([
937
+ "age",
938
+ "authorization",
939
+ "content-length",
940
+ "content-type",
941
+ "etag",
942
+ "expires",
943
+ "from",
944
+ "host",
945
+ "if-modified-since",
946
+ "if-unmodified-since",
947
+ "last-modified",
948
+ "location",
949
+ "max-forwards",
950
+ "proxy-authorization",
951
+ "referer",
952
+ "retry-after",
953
+ "user-agent"
954
+ ]);
955
+ const parseHeaders = (rawHeaders) => {
956
+ const parsed = {};
957
+ let key;
958
+ let val;
959
+ let i;
960
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
961
+ i = line.indexOf(":");
962
+ key = line.substring(0, i).trim().toLowerCase();
963
+ val = line.substring(i + 1).trim();
964
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
965
+ return;
966
+ }
967
+ if (key === "set-cookie") {
968
+ if (parsed[key]) {
969
+ parsed[key].push(val);
970
+ } else {
971
+ parsed[key] = [val];
972
+ }
973
+ } else {
974
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
975
+ }
976
+ });
977
+ return parsed;
978
+ };
979
+ const $internals = /* @__PURE__ */ Symbol("internals");
980
+ function normalizeHeader(header) {
981
+ return header && String(header).trim().toLowerCase();
982
+ }
983
+ function normalizeValue(value) {
984
+ if (value === false || value == null) {
985
+ return value;
986
+ }
987
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
988
+ }
989
+ function parseTokens(str) {
990
+ const tokens = /* @__PURE__ */ Object.create(null);
991
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
992
+ let match;
993
+ while (match = tokensRE.exec(str)) {
994
+ tokens[match[1]] = match[2];
995
+ }
996
+ return tokens;
997
+ }
998
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
999
+ function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
1000
+ if (utils$1.isFunction(filter2)) {
1001
+ return filter2.call(this, value, header);
1002
+ }
1003
+ if (isHeaderNameFilter) {
1004
+ value = header;
1005
+ }
1006
+ if (!utils$1.isString(value)) return;
1007
+ if (utils$1.isString(filter2)) {
1008
+ return value.indexOf(filter2) !== -1;
1009
+ }
1010
+ if (utils$1.isRegExp(filter2)) {
1011
+ return filter2.test(value);
1012
+ }
1013
+ }
1014
+ function formatHeader(header) {
1015
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
1016
+ return char.toUpperCase() + str;
1017
+ });
1018
+ }
1019
+ function buildAccessors(obj, header) {
1020
+ const accessorName = utils$1.toCamelCase(" " + header);
1021
+ ["get", "set", "has"].forEach((methodName) => {
1022
+ Object.defineProperty(obj, methodName + accessorName, {
1023
+ value: function(arg1, arg2, arg3) {
1024
+ return this[methodName].call(this, header, arg1, arg2, arg3);
1025
+ },
1026
+ configurable: true
1027
+ });
1028
+ });
1029
+ }
1030
+ let AxiosHeaders$1 = class AxiosHeaders {
1031
+ constructor(headers) {
1032
+ headers && this.set(headers);
1033
+ }
1034
+ set(header, valueOrRewrite, rewrite) {
1035
+ const self2 = this;
1036
+ function setHeader(_value, _header, _rewrite) {
1037
+ const lHeader = normalizeHeader(_header);
1038
+ if (!lHeader) {
1039
+ throw new Error("header name must be a non-empty string");
1040
+ }
1041
+ const key = utils$1.findKey(self2, lHeader);
1042
+ if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
1043
+ self2[key || _header] = normalizeValue(_value);
1044
+ }
1045
+ }
1046
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1047
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
1048
+ setHeaders(header, valueOrRewrite);
1049
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1050
+ setHeaders(parseHeaders(header), valueOrRewrite);
1051
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
1052
+ let obj = {}, dest, key;
1053
+ for (const entry2 of header) {
1054
+ if (!utils$1.isArray(entry2)) {
1055
+ throw TypeError("Object iterator must return a key-value pair");
1056
+ }
1057
+ obj[key = entry2[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry2[1]] : [dest, entry2[1]] : entry2[1];
1058
+ }
1059
+ setHeaders(obj, valueOrRewrite);
1060
+ } else {
1061
+ header != null && setHeader(valueOrRewrite, header, rewrite);
1062
+ }
1063
+ return this;
1064
+ }
1065
+ get(header, parser) {
1066
+ header = normalizeHeader(header);
1067
+ if (header) {
1068
+ const key = utils$1.findKey(this, header);
1069
+ if (key) {
1070
+ const value = this[key];
1071
+ if (!parser) {
1072
+ return value;
1073
+ }
1074
+ if (parser === true) {
1075
+ return parseTokens(value);
1076
+ }
1077
+ if (utils$1.isFunction(parser)) {
1078
+ return parser.call(this, value, key);
1079
+ }
1080
+ if (utils$1.isRegExp(parser)) {
1081
+ return parser.exec(value);
1082
+ }
1083
+ throw new TypeError("parser must be boolean|regexp|function");
1084
+ }
1085
+ }
1086
+ }
1087
+ has(header, matcher) {
1088
+ header = normalizeHeader(header);
1089
+ if (header) {
1090
+ const key = utils$1.findKey(this, header);
1091
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1092
+ }
1093
+ return false;
1094
+ }
1095
+ delete(header, matcher) {
1096
+ const self2 = this;
1097
+ let deleted = false;
1098
+ function deleteHeader(_header) {
1099
+ _header = normalizeHeader(_header);
1100
+ if (_header) {
1101
+ const key = utils$1.findKey(self2, _header);
1102
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
1103
+ delete self2[key];
1104
+ deleted = true;
1105
+ }
1106
+ }
1107
+ }
1108
+ if (utils$1.isArray(header)) {
1109
+ header.forEach(deleteHeader);
1110
+ } else {
1111
+ deleteHeader(header);
1112
+ }
1113
+ return deleted;
1114
+ }
1115
+ clear(matcher) {
1116
+ const keys = Object.keys(this);
1117
+ let i = keys.length;
1118
+ let deleted = false;
1119
+ while (i--) {
1120
+ const key = keys[i];
1121
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1122
+ delete this[key];
1123
+ deleted = true;
1124
+ }
1125
+ }
1126
+ return deleted;
1127
+ }
1128
+ normalize(format) {
1129
+ const self2 = this;
1130
+ const headers = {};
1131
+ utils$1.forEach(this, (value, header) => {
1132
+ const key = utils$1.findKey(headers, header);
1133
+ if (key) {
1134
+ self2[key] = normalizeValue(value);
1135
+ delete self2[header];
1136
+ return;
1137
+ }
1138
+ const normalized = format ? formatHeader(header) : String(header).trim();
1139
+ if (normalized !== header) {
1140
+ delete self2[header];
1141
+ }
1142
+ self2[normalized] = normalizeValue(value);
1143
+ headers[normalized] = true;
1144
+ });
1145
+ return this;
1146
+ }
1147
+ concat(...targets) {
1148
+ return this.constructor.concat(this, ...targets);
1149
+ }
1150
+ toJSON(asStrings) {
1151
+ const obj = /* @__PURE__ */ Object.create(null);
1152
+ utils$1.forEach(this, (value, header) => {
1153
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
1154
+ });
1155
+ return obj;
1156
+ }
1157
+ [Symbol.iterator]() {
1158
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1159
+ }
1160
+ toString() {
1161
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
1162
+ }
1163
+ getSetCookie() {
1164
+ return this.get("set-cookie") || [];
1165
+ }
1166
+ get [Symbol.toStringTag]() {
1167
+ return "AxiosHeaders";
1168
+ }
1169
+ static from(thing) {
1170
+ return thing instanceof this ? thing : new this(thing);
1171
+ }
1172
+ static concat(first, ...targets) {
1173
+ const computed = new this(first);
1174
+ targets.forEach((target) => computed.set(target));
1175
+ return computed;
1176
+ }
1177
+ static accessor(header) {
1178
+ const internals = this[$internals] = this[$internals] = {
1179
+ accessors: {}
1180
+ };
1181
+ const accessors = internals.accessors;
1182
+ const prototype2 = this.prototype;
1183
+ function defineAccessor(_header) {
1184
+ const lHeader = normalizeHeader(_header);
1185
+ if (!accessors[lHeader]) {
1186
+ buildAccessors(prototype2, _header);
1187
+ accessors[lHeader] = true;
1188
+ }
1189
+ }
1190
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1191
+ return this;
1192
+ }
1193
+ };
1194
+ AxiosHeaders$1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1195
+ utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
1196
+ let mapped = key[0].toUpperCase() + key.slice(1);
1197
+ return {
1198
+ get: () => value,
1199
+ set(headerValue) {
1200
+ this[mapped] = headerValue;
1201
+ }
1202
+ };
1203
+ });
1204
+ utils$1.freezeMethods(AxiosHeaders$1);
1205
+ function transformData(fns, response) {
1206
+ const config2 = this || defaults;
1207
+ const context = response || config2;
1208
+ const headers = AxiosHeaders$1.from(context.headers);
1209
+ let data = context.data;
1210
+ utils$1.forEach(fns, function transform2(fn) {
1211
+ data = fn.call(config2, data, headers.normalize(), response ? response.status : void 0);
1212
+ });
1213
+ headers.normalize();
1214
+ return data;
1215
+ }
1216
+ function isCancel$1(value) {
1217
+ return !!(value && value.__CANCEL__);
1218
+ }
1219
+ let CanceledError$1 = class CanceledError extends AxiosError$1 {
1220
+ /**
1221
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
1222
+ *
1223
+ * @param {string=} message The message.
1224
+ * @param {Object=} config The config.
1225
+ * @param {Object=} request The request.
1226
+ *
1227
+ * @returns {CanceledError} The created error.
1228
+ */
1229
+ constructor(message, config2, request) {
1230
+ super(message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config2, request);
1231
+ this.name = "CanceledError";
1232
+ this.__CANCEL__ = true;
1233
+ }
1234
+ };
1235
+ function settle(resolve, reject, response) {
1236
+ const validateStatus2 = response.config.validateStatus;
1237
+ if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
1238
+ resolve(response);
1239
+ } else {
1240
+ reject(new AxiosError$1(
1241
+ "Request failed with status code " + response.status,
1242
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
1243
+ response.config,
1244
+ response.request,
1245
+ response
1246
+ ));
1247
+ }
1248
+ }
1249
+ function parseProtocol(url) {
1250
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
1251
+ return match && match[1] || "";
1252
+ }
1253
+ function speedometer(samplesCount, min) {
1254
+ samplesCount = samplesCount || 10;
1255
+ const bytes = new Array(samplesCount);
1256
+ const timestamps = new Array(samplesCount);
1257
+ let head = 0;
1258
+ let tail = 0;
1259
+ let firstSampleTS;
1260
+ min = min !== void 0 ? min : 1e3;
1261
+ return function push(chunkLength) {
1262
+ const now = Date.now();
1263
+ const startedAt = timestamps[tail];
1264
+ if (!firstSampleTS) {
1265
+ firstSampleTS = now;
1266
+ }
1267
+ bytes[head] = chunkLength;
1268
+ timestamps[head] = now;
1269
+ let i = tail;
1270
+ let bytesCount = 0;
1271
+ while (i !== head) {
1272
+ bytesCount += bytes[i++];
1273
+ i = i % samplesCount;
1274
+ }
1275
+ head = (head + 1) % samplesCount;
1276
+ if (head === tail) {
1277
+ tail = (tail + 1) % samplesCount;
1278
+ }
1279
+ if (now - firstSampleTS < min) {
1280
+ return;
1281
+ }
1282
+ const passed = startedAt && now - startedAt;
1283
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
1284
+ };
1285
+ }
1286
+ function throttle(fn, freq) {
1287
+ let timestamp = 0;
1288
+ let threshold = 1e3 / freq;
1289
+ let lastArgs;
1290
+ let timer;
1291
+ const invoke = (args, now = Date.now()) => {
1292
+ timestamp = now;
1293
+ lastArgs = null;
1294
+ if (timer) {
1295
+ clearTimeout(timer);
1296
+ timer = null;
1297
+ }
1298
+ fn(...args);
1299
+ };
1300
+ const throttled = (...args) => {
1301
+ const now = Date.now();
1302
+ const passed = now - timestamp;
1303
+ if (passed >= threshold) {
1304
+ invoke(args, now);
1305
+ } else {
1306
+ lastArgs = args;
1307
+ if (!timer) {
1308
+ timer = setTimeout(() => {
1309
+ timer = null;
1310
+ invoke(lastArgs);
1311
+ }, threshold - passed);
1312
+ }
1313
+ }
1314
+ };
1315
+ const flush = () => lastArgs && invoke(lastArgs);
1316
+ return [throttled, flush];
1317
+ }
1318
+ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
1319
+ let bytesNotified = 0;
1320
+ const _speedometer = speedometer(50, 250);
1321
+ return throttle((e) => {
1322
+ const loaded = e.loaded;
1323
+ const total = e.lengthComputable ? e.total : void 0;
1324
+ const progressBytes = loaded - bytesNotified;
1325
+ const rate = _speedometer(progressBytes);
1326
+ const inRange = loaded <= total;
1327
+ bytesNotified = loaded;
1328
+ const data = {
1329
+ loaded,
1330
+ total,
1331
+ progress: total ? loaded / total : void 0,
1332
+ bytes: progressBytes,
1333
+ rate: rate ? rate : void 0,
1334
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
1335
+ event: e,
1336
+ lengthComputable: total != null,
1337
+ [isDownloadStream ? "download" : "upload"]: true
1338
+ };
1339
+ listener(data);
1340
+ }, freq);
1341
+ };
1342
+ const progressEventDecorator = (total, throttled) => {
1343
+ const lengthComputable = total != null;
1344
+ return [(loaded) => throttled[0]({
1345
+ lengthComputable,
1346
+ total,
1347
+ loaded
1348
+ }), throttled[1]];
1349
+ };
1350
+ const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
1351
+ const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {
1352
+ url = new URL(url, platform.origin);
1353
+ return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);
1354
+ })(
1355
+ new URL(platform.origin),
1356
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
1357
+ ) : () => true;
1358
+ const cookies = platform.hasStandardBrowserEnv ? (
1359
+ // Standard browser envs support document.cookie
1360
+ {
1361
+ write(name, value, expires, path, domain, secure, sameSite) {
1362
+ if (typeof document === "undefined") return;
1363
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
1364
+ if (utils$1.isNumber(expires)) {
1365
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
1366
+ }
1367
+ if (utils$1.isString(path)) {
1368
+ cookie.push(`path=${path}`);
1369
+ }
1370
+ if (utils$1.isString(domain)) {
1371
+ cookie.push(`domain=${domain}`);
1372
+ }
1373
+ if (secure === true) {
1374
+ cookie.push("secure");
1375
+ }
1376
+ if (utils$1.isString(sameSite)) {
1377
+ cookie.push(`SameSite=${sameSite}`);
1378
+ }
1379
+ document.cookie = cookie.join("; ");
1380
+ },
1381
+ read(name) {
1382
+ if (typeof document === "undefined") return null;
1383
+ const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
1384
+ return match ? decodeURIComponent(match[1]) : null;
1385
+ },
1386
+ remove(name) {
1387
+ this.write(name, "", Date.now() - 864e5, "/");
1388
+ }
1389
+ }
1390
+ ) : (
1391
+ // Non-standard browser env (web workers, react-native) lack needed support.
1392
+ {
1393
+ write() {
1394
+ },
1395
+ read() {
1396
+ return null;
1397
+ },
1398
+ remove() {
1399
+ }
1400
+ }
1401
+ );
1402
+ function isAbsoluteURL(url) {
1403
+ if (typeof url !== "string") {
1404
+ return false;
1405
+ }
1406
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
1407
+ }
1408
+ function combineURLs(baseURL, relativeURL) {
1409
+ return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
1410
+ }
1411
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
1412
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
1413
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
1414
+ return combineURLs(baseURL, requestedURL);
1415
+ }
1416
+ return requestedURL;
1417
+ }
1418
+ const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
1419
+ function mergeConfig$1(config1, config2) {
1420
+ config2 = config2 || {};
1421
+ const config3 = {};
1422
+ function getMergedValue(target, source, prop, caseless) {
1423
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
1424
+ return utils$1.merge.call({ caseless }, target, source);
1425
+ } else if (utils$1.isPlainObject(source)) {
1426
+ return utils$1.merge({}, source);
1427
+ } else if (utils$1.isArray(source)) {
1428
+ return source.slice();
1429
+ }
1430
+ return source;
1431
+ }
1432
+ function mergeDeepProperties(a, b, prop, caseless) {
1433
+ if (!utils$1.isUndefined(b)) {
1434
+ return getMergedValue(a, b, prop, caseless);
1435
+ } else if (!utils$1.isUndefined(a)) {
1436
+ return getMergedValue(void 0, a, prop, caseless);
1437
+ }
1438
+ }
1439
+ function valueFromConfig2(a, b) {
1440
+ if (!utils$1.isUndefined(b)) {
1441
+ return getMergedValue(void 0, b);
1442
+ }
1443
+ }
1444
+ function defaultToConfig2(a, b) {
1445
+ if (!utils$1.isUndefined(b)) {
1446
+ return getMergedValue(void 0, b);
1447
+ } else if (!utils$1.isUndefined(a)) {
1448
+ return getMergedValue(void 0, a);
1449
+ }
1450
+ }
1451
+ function mergeDirectKeys(a, b, prop) {
1452
+ if (prop in config2) {
1453
+ return getMergedValue(a, b);
1454
+ } else if (prop in config1) {
1455
+ return getMergedValue(void 0, a);
1456
+ }
1457
+ }
1458
+ const mergeMap = {
1459
+ url: valueFromConfig2,
1460
+ method: valueFromConfig2,
1461
+ data: valueFromConfig2,
1462
+ baseURL: defaultToConfig2,
1463
+ transformRequest: defaultToConfig2,
1464
+ transformResponse: defaultToConfig2,
1465
+ paramsSerializer: defaultToConfig2,
1466
+ timeout: defaultToConfig2,
1467
+ timeoutMessage: defaultToConfig2,
1468
+ withCredentials: defaultToConfig2,
1469
+ withXSRFToken: defaultToConfig2,
1470
+ adapter: defaultToConfig2,
1471
+ responseType: defaultToConfig2,
1472
+ xsrfCookieName: defaultToConfig2,
1473
+ xsrfHeaderName: defaultToConfig2,
1474
+ onUploadProgress: defaultToConfig2,
1475
+ onDownloadProgress: defaultToConfig2,
1476
+ decompress: defaultToConfig2,
1477
+ maxContentLength: defaultToConfig2,
1478
+ maxBodyLength: defaultToConfig2,
1479
+ beforeRedirect: defaultToConfig2,
1480
+ transport: defaultToConfig2,
1481
+ httpAgent: defaultToConfig2,
1482
+ httpsAgent: defaultToConfig2,
1483
+ cancelToken: defaultToConfig2,
1484
+ socketPath: defaultToConfig2,
1485
+ responseEncoding: defaultToConfig2,
1486
+ validateStatus: mergeDirectKeys,
1487
+ headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
1488
+ };
1489
+ utils$1.forEach(
1490
+ Object.keys({ ...config1, ...config2 }),
1491
+ function computeConfigValue(prop) {
1492
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
1493
+ return;
1494
+ const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
1495
+ const configValue = merge2(config1[prop], config2[prop], prop);
1496
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config3[prop] = configValue);
1497
+ }
1498
+ );
1499
+ return config3;
1500
+ }
1501
+ const resolveConfig = (config2) => {
1502
+ const newConfig = mergeConfig$1({}, config2);
1503
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
1504
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
1505
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config2.params, config2.paramsSerializer);
1506
+ if (auth) {
1507
+ headers.set(
1508
+ "Authorization",
1509
+ "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
1510
+ );
1511
+ }
1512
+ if (utils$1.isFormData(data)) {
1513
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
1514
+ headers.setContentType(void 0);
1515
+ } else if (utils$1.isFunction(data.getHeaders)) {
1516
+ const formHeaders = data.getHeaders();
1517
+ const allowedHeaders = ["content-type", "content-length"];
1518
+ Object.entries(formHeaders).forEach(([key, val]) => {
1519
+ if (allowedHeaders.includes(key.toLowerCase())) {
1520
+ headers.set(key, val);
1521
+ }
1522
+ });
1523
+ }
1524
+ }
1525
+ if (platform.hasStandardBrowserEnv) {
1526
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
1527
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
1528
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
1529
+ if (xsrfValue) {
1530
+ headers.set(xsrfHeaderName, xsrfValue);
1531
+ }
1532
+ }
1533
+ }
1534
+ return newConfig;
1535
+ };
1536
+ const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
1537
+ const xhrAdapter = isXHRAdapterSupported && function(config2) {
1538
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
1539
+ const _config = resolveConfig(config2);
1540
+ let requestData = _config.data;
1541
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
1542
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
1543
+ let onCanceled;
1544
+ let uploadThrottled, downloadThrottled;
1545
+ let flushUpload, flushDownload;
1546
+ function done() {
1547
+ flushUpload && flushUpload();
1548
+ flushDownload && flushDownload();
1549
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
1550
+ _config.signal && _config.signal.removeEventListener("abort", onCanceled);
1551
+ }
1552
+ let request = new XMLHttpRequest();
1553
+ request.open(_config.method.toUpperCase(), _config.url, true);
1554
+ request.timeout = _config.timeout;
1555
+ function onloadend() {
1556
+ if (!request) {
1557
+ return;
1558
+ }
1559
+ const responseHeaders = AxiosHeaders$1.from(
1560
+ "getAllResponseHeaders" in request && request.getAllResponseHeaders()
1561
+ );
1562
+ const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
1563
+ const response = {
1564
+ data: responseData,
1565
+ status: request.status,
1566
+ statusText: request.statusText,
1567
+ headers: responseHeaders,
1568
+ config: config2,
1569
+ request
1570
+ };
1571
+ settle(function _resolve(value) {
1572
+ resolve(value);
1573
+ done();
1574
+ }, function _reject(err) {
1575
+ reject(err);
1576
+ done();
1577
+ }, response);
1578
+ request = null;
1579
+ }
1580
+ if ("onloadend" in request) {
1581
+ request.onloadend = onloadend;
1582
+ } else {
1583
+ request.onreadystatechange = function handleLoad() {
1584
+ if (!request || request.readyState !== 4) {
1585
+ return;
1586
+ }
1587
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
1588
+ return;
1589
+ }
1590
+ setTimeout(onloadend);
1591
+ };
1592
+ }
1593
+ request.onabort = function handleAbort() {
1594
+ if (!request) {
1595
+ return;
1596
+ }
1597
+ reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config2, request));
1598
+ request = null;
1599
+ };
1600
+ request.onerror = function handleError(event) {
1601
+ const msg = event && event.message ? event.message : "Network Error";
1602
+ const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config2, request);
1603
+ err.event = event || null;
1604
+ reject(err);
1605
+ request = null;
1606
+ };
1607
+ request.ontimeout = function handleTimeout() {
1608
+ let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
1609
+ const transitional2 = _config.transitional || transitionalDefaults;
1610
+ if (_config.timeoutErrorMessage) {
1611
+ timeoutErrorMessage = _config.timeoutErrorMessage;
1612
+ }
1613
+ reject(new AxiosError$1(
1614
+ timeoutErrorMessage,
1615
+ transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
1616
+ config2,
1617
+ request
1618
+ ));
1619
+ request = null;
1620
+ };
1621
+ requestData === void 0 && requestHeaders.setContentType(null);
1622
+ if ("setRequestHeader" in request) {
1623
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
1624
+ request.setRequestHeader(key, val);
1625
+ });
1626
+ }
1627
+ if (!utils$1.isUndefined(_config.withCredentials)) {
1628
+ request.withCredentials = !!_config.withCredentials;
1629
+ }
1630
+ if (responseType && responseType !== "json") {
1631
+ request.responseType = _config.responseType;
1632
+ }
1633
+ if (onDownloadProgress) {
1634
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
1635
+ request.addEventListener("progress", downloadThrottled);
1636
+ }
1637
+ if (onUploadProgress && request.upload) {
1638
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
1639
+ request.upload.addEventListener("progress", uploadThrottled);
1640
+ request.upload.addEventListener("loadend", flushUpload);
1641
+ }
1642
+ if (_config.cancelToken || _config.signal) {
1643
+ onCanceled = (cancel) => {
1644
+ if (!request) {
1645
+ return;
1646
+ }
1647
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config2, request) : cancel);
1648
+ request.abort();
1649
+ request = null;
1650
+ };
1651
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
1652
+ if (_config.signal) {
1653
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
1654
+ }
1655
+ }
1656
+ const protocol = parseProtocol(_config.url);
1657
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
1658
+ reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config2));
1659
+ return;
1660
+ }
1661
+ request.send(requestData || null);
1662
+ });
1663
+ };
1664
+ const composeSignals = (signals, timeout) => {
1665
+ const { length } = signals = signals ? signals.filter(Boolean) : [];
1666
+ if (timeout || length) {
1667
+ let controller = new AbortController();
1668
+ let aborted2;
1669
+ const onabort = function(reason) {
1670
+ if (!aborted2) {
1671
+ aborted2 = true;
1672
+ unsubscribe();
1673
+ const err = reason instanceof Error ? reason : this.reason;
1674
+ controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
1675
+ }
1676
+ };
1677
+ let timer = timeout && setTimeout(() => {
1678
+ timer = null;
1679
+ onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
1680
+ }, timeout);
1681
+ const unsubscribe = () => {
1682
+ if (signals) {
1683
+ timer && clearTimeout(timer);
1684
+ timer = null;
1685
+ signals.forEach((signal2) => {
1686
+ signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
1687
+ });
1688
+ signals = null;
1689
+ }
1690
+ };
1691
+ signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
1692
+ const { signal } = controller;
1693
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
1694
+ return signal;
1695
+ }
1696
+ };
1697
+ const streamChunk = function* (chunk, chunkSize) {
1698
+ let len = chunk.byteLength;
1699
+ if (len < chunkSize) {
1700
+ yield chunk;
1701
+ return;
1702
+ }
1703
+ let pos = 0;
1704
+ let end;
1705
+ while (pos < len) {
1706
+ end = pos + chunkSize;
1707
+ yield chunk.slice(pos, end);
1708
+ pos = end;
1709
+ }
1710
+ };
1711
+ const readBytes = async function* (iterable, chunkSize) {
1712
+ for await (const chunk of readStream(iterable)) {
1713
+ yield* streamChunk(chunk, chunkSize);
1714
+ }
1715
+ };
1716
+ const readStream = async function* (stream) {
1717
+ if (stream[Symbol.asyncIterator]) {
1718
+ yield* stream;
1719
+ return;
1720
+ }
1721
+ const reader = stream.getReader();
1722
+ try {
1723
+ for (; ; ) {
1724
+ const { done, value } = await reader.read();
1725
+ if (done) {
1726
+ break;
1727
+ }
1728
+ yield value;
1729
+ }
1730
+ } finally {
1731
+ await reader.cancel();
1732
+ }
1733
+ };
1734
+ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
1735
+ const iterator2 = readBytes(stream, chunkSize);
1736
+ let bytes = 0;
1737
+ let done;
1738
+ let _onFinish = (e) => {
1739
+ if (!done) {
1740
+ done = true;
1741
+ onFinish && onFinish(e);
1742
+ }
1743
+ };
1744
+ return new ReadableStream({
1745
+ async pull(controller) {
1746
+ try {
1747
+ const { done: done2, value } = await iterator2.next();
1748
+ if (done2) {
1749
+ _onFinish();
1750
+ controller.close();
1751
+ return;
1752
+ }
1753
+ let len = value.byteLength;
1754
+ if (onProgress) {
1755
+ let loadedBytes = bytes += len;
1756
+ onProgress(loadedBytes);
1757
+ }
1758
+ controller.enqueue(new Uint8Array(value));
1759
+ } catch (err) {
1760
+ _onFinish(err);
1761
+ throw err;
1762
+ }
1763
+ },
1764
+ cancel(reason) {
1765
+ _onFinish(reason);
1766
+ return iterator2.return();
1767
+ }
1768
+ }, {
1769
+ highWaterMark: 2
1770
+ });
1771
+ };
1772
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
1773
+ const { isFunction } = utils$1;
1774
+ const globalFetchAPI = (({ Request, Response }) => ({
1775
+ Request,
1776
+ Response
1777
+ }))(utils$1.global);
1778
+ const {
1779
+ ReadableStream: ReadableStream$1,
1780
+ TextEncoder
1781
+ } = utils$1.global;
1782
+ const test = (fn, ...args) => {
1783
+ try {
1784
+ return !!fn(...args);
1785
+ } catch (e) {
1786
+ return false;
1787
+ }
1788
+ };
1789
+ const factory = (env) => {
1790
+ env = utils$1.merge.call({
1791
+ skipUndefined: true
1792
+ }, globalFetchAPI, env);
1793
+ const { fetch: envFetch, Request, Response } = env;
1794
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
1795
+ const isRequestSupported = isFunction(Request);
1796
+ const isResponseSupported = isFunction(Response);
1797
+ if (!isFetchSupported) {
1798
+ return false;
1799
+ }
1800
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
1801
+ const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
1802
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
1803
+ let duplexAccessed = false;
1804
+ const hasContentType = new Request(platform.origin, {
1805
+ body: new ReadableStream$1(),
1806
+ method: "POST",
1807
+ get duplex() {
1808
+ duplexAccessed = true;
1809
+ return "half";
1810
+ }
1811
+ }).headers.has("Content-Type");
1812
+ return duplexAccessed && !hasContentType;
1813
+ });
1814
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
1815
+ const resolvers = {
1816
+ stream: supportsResponseStream && ((res) => res.body)
1817
+ };
1818
+ isFetchSupported && (() => {
1819
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
1820
+ !resolvers[type] && (resolvers[type] = (res, config2) => {
1821
+ let method = res && res[type];
1822
+ if (method) {
1823
+ return method.call(res);
1824
+ }
1825
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config2);
1826
+ });
1827
+ });
1828
+ })();
1829
+ const getBodyLength = async (body) => {
1830
+ if (body == null) {
1831
+ return 0;
1832
+ }
1833
+ if (utils$1.isBlob(body)) {
1834
+ return body.size;
1835
+ }
1836
+ if (utils$1.isSpecCompliantForm(body)) {
1837
+ const _request = new Request(platform.origin, {
1838
+ method: "POST",
1839
+ body
1840
+ });
1841
+ return (await _request.arrayBuffer()).byteLength;
1842
+ }
1843
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
1844
+ return body.byteLength;
1845
+ }
1846
+ if (utils$1.isURLSearchParams(body)) {
1847
+ body = body + "";
1848
+ }
1849
+ if (utils$1.isString(body)) {
1850
+ return (await encodeText(body)).byteLength;
1851
+ }
1852
+ };
1853
+ const resolveBodyLength = async (headers, body) => {
1854
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
1855
+ return length == null ? getBodyLength(body) : length;
1856
+ };
1857
+ return async (config2) => {
1858
+ let {
1859
+ url,
1860
+ method,
1861
+ data,
1862
+ signal,
1863
+ cancelToken,
1864
+ timeout,
1865
+ onDownloadProgress,
1866
+ onUploadProgress,
1867
+ responseType,
1868
+ headers,
1869
+ withCredentials = "same-origin",
1870
+ fetchOptions
1871
+ } = resolveConfig(config2);
1872
+ let _fetch = envFetch || fetch;
1873
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
1874
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
1875
+ let request = null;
1876
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
1877
+ composedSignal.unsubscribe();
1878
+ });
1879
+ let requestContentLength;
1880
+ try {
1881
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
1882
+ let _request = new Request(url, {
1883
+ method: "POST",
1884
+ body: data,
1885
+ duplex: "half"
1886
+ });
1887
+ let contentTypeHeader;
1888
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
1889
+ headers.setContentType(contentTypeHeader);
1890
+ }
1891
+ if (_request.body) {
1892
+ const [onProgress, flush] = progressEventDecorator(
1893
+ requestContentLength,
1894
+ progressEventReducer(asyncDecorator(onUploadProgress))
1895
+ );
1896
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
1897
+ }
1898
+ }
1899
+ if (!utils$1.isString(withCredentials)) {
1900
+ withCredentials = withCredentials ? "include" : "omit";
1901
+ }
1902
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
1903
+ const resolvedOptions = {
1904
+ ...fetchOptions,
1905
+ signal: composedSignal,
1906
+ method: method.toUpperCase(),
1907
+ headers: headers.normalize().toJSON(),
1908
+ body: data,
1909
+ duplex: "half",
1910
+ credentials: isCredentialsSupported ? withCredentials : void 0
1911
+ };
1912
+ request = isRequestSupported && new Request(url, resolvedOptions);
1913
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
1914
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
1915
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
1916
+ const options = {};
1917
+ ["status", "statusText", "headers"].forEach((prop) => {
1918
+ options[prop] = response[prop];
1919
+ });
1920
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
1921
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
1922
+ responseContentLength,
1923
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
1924
+ ) || [];
1925
+ response = new Response(
1926
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
1927
+ flush && flush();
1928
+ unsubscribe && unsubscribe();
1929
+ }),
1930
+ options
1931
+ );
1932
+ }
1933
+ responseType = responseType || "text";
1934
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config2);
1935
+ !isStreamResponse && unsubscribe && unsubscribe();
1936
+ return await new Promise((resolve, reject) => {
1937
+ settle(resolve, reject, {
1938
+ data: responseData,
1939
+ headers: AxiosHeaders$1.from(response.headers),
1940
+ status: response.status,
1941
+ statusText: response.statusText,
1942
+ config: config2,
1943
+ request
1944
+ });
1945
+ });
1946
+ } catch (err) {
1947
+ unsubscribe && unsubscribe();
1948
+ if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
1949
+ throw Object.assign(
1950
+ new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config2, request, err && err.response),
1951
+ {
1952
+ cause: err.cause || err
1953
+ }
1954
+ );
1955
+ }
1956
+ throw AxiosError$1.from(err, err && err.code, config2, request, err && err.response);
1957
+ }
1958
+ };
1959
+ };
1960
+ const seedCache = /* @__PURE__ */ new Map();
1961
+ const getFetch = (config2) => {
1962
+ let env = config2 && config2.env || {};
1963
+ const { fetch: fetch2, Request, Response } = env;
1964
+ const seeds = [
1965
+ Request,
1966
+ Response,
1967
+ fetch2
1968
+ ];
1969
+ let len = seeds.length, i = len, seed, target, map = seedCache;
1970
+ while (i--) {
1971
+ seed = seeds[i];
1972
+ target = map.get(seed);
1973
+ target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
1974
+ map = target;
1975
+ }
1976
+ return target;
1977
+ };
1978
+ getFetch();
1979
+ const knownAdapters = {
1980
+ http: httpAdapter,
1981
+ xhr: xhrAdapter,
1982
+ fetch: {
1983
+ get: getFetch
1984
+ }
1985
+ };
1986
+ utils$1.forEach(knownAdapters, (fn, value) => {
1987
+ if (fn) {
1988
+ try {
1989
+ Object.defineProperty(fn, "name", { value });
1990
+ } catch (e) {
1991
+ }
1992
+ Object.defineProperty(fn, "adapterName", { value });
1993
+ }
1994
+ });
1995
+ const renderReason = (reason) => `- ${reason}`;
1996
+ const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
1997
+ function getAdapter$1(adapters2, config2) {
1998
+ adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
1999
+ const { length } = adapters2;
2000
+ let nameOrAdapter;
2001
+ let adapter;
2002
+ const rejectedReasons = {};
2003
+ for (let i = 0; i < length; i++) {
2004
+ nameOrAdapter = adapters2[i];
2005
+ let id2;
2006
+ adapter = nameOrAdapter;
2007
+ if (!isResolvedHandle(nameOrAdapter)) {
2008
+ adapter = knownAdapters[(id2 = String(nameOrAdapter)).toLowerCase()];
2009
+ if (adapter === void 0) {
2010
+ throw new AxiosError$1(`Unknown adapter '${id2}'`);
2011
+ }
2012
+ }
2013
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config2)))) {
2014
+ break;
2015
+ }
2016
+ rejectedReasons[id2 || "#" + i] = adapter;
2017
+ }
2018
+ if (!adapter) {
2019
+ const reasons = Object.entries(rejectedReasons).map(
2020
+ ([id2, state]) => `adapter ${id2} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
2021
+ );
2022
+ let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
2023
+ throw new AxiosError$1(
2024
+ `There is no suitable adapter to dispatch the request ` + s,
2025
+ "ERR_NOT_SUPPORT"
2026
+ );
2027
+ }
2028
+ return adapter;
2029
+ }
2030
+ const adapters = {
2031
+ /**
2032
+ * Resolve an adapter from a list of adapter names or functions.
2033
+ * @type {Function}
2034
+ */
2035
+ getAdapter: getAdapter$1,
2036
+ /**
2037
+ * Exposes all known adapters
2038
+ * @type {Object<string, Function|Object>}
2039
+ */
2040
+ adapters: knownAdapters
2041
+ };
2042
+ function throwIfCancellationRequested(config2) {
2043
+ if (config2.cancelToken) {
2044
+ config2.cancelToken.throwIfRequested();
2045
+ }
2046
+ if (config2.signal && config2.signal.aborted) {
2047
+ throw new CanceledError$1(null, config2);
2048
+ }
2049
+ }
2050
+ function dispatchRequest(config2) {
2051
+ throwIfCancellationRequested(config2);
2052
+ config2.headers = AxiosHeaders$1.from(config2.headers);
2053
+ config2.data = transformData.call(
2054
+ config2,
2055
+ config2.transformRequest
2056
+ );
2057
+ if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
2058
+ config2.headers.setContentType("application/x-www-form-urlencoded", false);
2059
+ }
2060
+ const adapter = adapters.getAdapter(config2.adapter || defaults.adapter, config2);
2061
+ return adapter(config2).then(function onAdapterResolution(response) {
2062
+ throwIfCancellationRequested(config2);
2063
+ response.data = transformData.call(
2064
+ config2,
2065
+ config2.transformResponse,
2066
+ response
2067
+ );
2068
+ response.headers = AxiosHeaders$1.from(response.headers);
2069
+ return response;
2070
+ }, function onAdapterRejection(reason) {
2071
+ if (!isCancel$1(reason)) {
2072
+ throwIfCancellationRequested(config2);
2073
+ if (reason && reason.response) {
2074
+ reason.response.data = transformData.call(
2075
+ config2,
2076
+ config2.transformResponse,
2077
+ reason.response
2078
+ );
2079
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
2080
+ }
2081
+ }
2082
+ return Promise.reject(reason);
2083
+ });
2084
+ }
2085
+ const VERSION$1 = "1.13.5";
2086
+ const validators$1 = {};
2087
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
2088
+ validators$1[type] = function validator2(thing) {
2089
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
2090
+ };
2091
+ });
2092
+ const deprecatedWarnings = {};
2093
+ validators$1.transitional = function transitional(validator2, version2, message) {
2094
+ function formatMessage(opt, desc) {
2095
+ return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
2096
+ }
2097
+ return (value, opt, opts) => {
2098
+ if (validator2 === false) {
2099
+ throw new AxiosError$1(
2100
+ formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")),
2101
+ AxiosError$1.ERR_DEPRECATED
2102
+ );
2103
+ }
2104
+ if (version2 && !deprecatedWarnings[opt]) {
2105
+ deprecatedWarnings[opt] = true;
2106
+ console.warn(
2107
+ formatMessage(
2108
+ opt,
2109
+ " has been deprecated since v" + version2 + " and will be removed in the near future"
2110
+ )
2111
+ );
2112
+ }
2113
+ return validator2 ? validator2(value, opt, opts) : true;
2114
+ };
2115
+ };
2116
+ validators$1.spelling = function spelling(correctSpelling) {
2117
+ return (value, opt) => {
2118
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
2119
+ return true;
2120
+ };
2121
+ };
2122
+ function assertOptions(options, schema, allowUnknown) {
2123
+ if (typeof options !== "object") {
2124
+ throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
2125
+ }
2126
+ const keys = Object.keys(options);
2127
+ let i = keys.length;
2128
+ while (i-- > 0) {
2129
+ const opt = keys[i];
2130
+ const validator2 = schema[opt];
2131
+ if (validator2) {
2132
+ const value = options[opt];
2133
+ const result = value === void 0 || validator2(value, opt, options);
2134
+ if (result !== true) {
2135
+ throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
2136
+ }
2137
+ continue;
2138
+ }
2139
+ if (allowUnknown !== true) {
2140
+ throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
2141
+ }
2142
+ }
2143
+ }
2144
+ const validator = {
2145
+ assertOptions,
2146
+ validators: validators$1
2147
+ };
2148
+ const validators = validator.validators;
2149
+ let Axios$1 = class Axios {
2150
+ constructor(instanceConfig) {
2151
+ this.defaults = instanceConfig || {};
2152
+ this.interceptors = {
2153
+ request: new InterceptorManager(),
2154
+ response: new InterceptorManager()
2155
+ };
2156
+ }
2157
+ /**
2158
+ * Dispatch a request
2159
+ *
2160
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2161
+ * @param {?Object} config
2162
+ *
2163
+ * @returns {Promise} The Promise to be fulfilled
2164
+ */
2165
+ async request(configOrUrl, config2) {
2166
+ try {
2167
+ return await this._request(configOrUrl, config2);
2168
+ } catch (err) {
2169
+ if (err instanceof Error) {
2170
+ let dummy = {};
2171
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
2172
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
2173
+ try {
2174
+ if (!err.stack) {
2175
+ err.stack = stack;
2176
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
2177
+ err.stack += "\n" + stack;
2178
+ }
2179
+ } catch (e) {
2180
+ }
2181
+ }
2182
+ throw err;
2183
+ }
2184
+ }
2185
+ _request(configOrUrl, config2) {
2186
+ if (typeof configOrUrl === "string") {
2187
+ config2 = config2 || {};
2188
+ config2.url = configOrUrl;
2189
+ } else {
2190
+ config2 = configOrUrl || {};
2191
+ }
2192
+ config2 = mergeConfig$1(this.defaults, config2);
2193
+ const { transitional: transitional2, paramsSerializer, headers } = config2;
2194
+ if (transitional2 !== void 0) {
2195
+ validator.assertOptions(transitional2, {
2196
+ silentJSONParsing: validators.transitional(validators.boolean),
2197
+ forcedJSONParsing: validators.transitional(validators.boolean),
2198
+ clarifyTimeoutError: validators.transitional(validators.boolean),
2199
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
2200
+ }, false);
2201
+ }
2202
+ if (paramsSerializer != null) {
2203
+ if (utils$1.isFunction(paramsSerializer)) {
2204
+ config2.paramsSerializer = {
2205
+ serialize: paramsSerializer
2206
+ };
2207
+ } else {
2208
+ validator.assertOptions(paramsSerializer, {
2209
+ encode: validators.function,
2210
+ serialize: validators.function
2211
+ }, true);
2212
+ }
2213
+ }
2214
+ if (config2.allowAbsoluteUrls !== void 0) ;
2215
+ else if (this.defaults.allowAbsoluteUrls !== void 0) {
2216
+ config2.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
2217
+ } else {
2218
+ config2.allowAbsoluteUrls = true;
2219
+ }
2220
+ validator.assertOptions(config2, {
2221
+ baseUrl: validators.spelling("baseURL"),
2222
+ withXsrfToken: validators.spelling("withXSRFToken")
2223
+ }, true);
2224
+ config2.method = (config2.method || this.defaults.method || "get").toLowerCase();
2225
+ let contextHeaders = headers && utils$1.merge(
2226
+ headers.common,
2227
+ headers[config2.method]
2228
+ );
2229
+ headers && utils$1.forEach(
2230
+ ["delete", "get", "head", "post", "put", "patch", "common"],
2231
+ (method) => {
2232
+ delete headers[method];
2233
+ }
2234
+ );
2235
+ config2.headers = AxiosHeaders$1.concat(contextHeaders, headers);
2236
+ const requestInterceptorChain = [];
2237
+ let synchronousRequestInterceptors = true;
2238
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
2239
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) {
2240
+ return;
2241
+ }
2242
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
2243
+ const transitional3 = config2.transitional || transitionalDefaults;
2244
+ const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
2245
+ if (legacyInterceptorReqResOrdering) {
2246
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
2247
+ } else {
2248
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
2249
+ }
2250
+ });
2251
+ const responseInterceptorChain = [];
2252
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
2253
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
2254
+ });
2255
+ let promise;
2256
+ let i = 0;
2257
+ let len;
2258
+ if (!synchronousRequestInterceptors) {
2259
+ const chain = [dispatchRequest.bind(this), void 0];
2260
+ chain.unshift(...requestInterceptorChain);
2261
+ chain.push(...responseInterceptorChain);
2262
+ len = chain.length;
2263
+ promise = Promise.resolve(config2);
2264
+ while (i < len) {
2265
+ promise = promise.then(chain[i++], chain[i++]);
2266
+ }
2267
+ return promise;
2268
+ }
2269
+ len = requestInterceptorChain.length;
2270
+ let newConfig = config2;
2271
+ while (i < len) {
2272
+ const onFulfilled = requestInterceptorChain[i++];
2273
+ const onRejected = requestInterceptorChain[i++];
2274
+ try {
2275
+ newConfig = onFulfilled(newConfig);
2276
+ } catch (error) {
2277
+ onRejected.call(this, error);
2278
+ break;
2279
+ }
2280
+ }
2281
+ try {
2282
+ promise = dispatchRequest.call(this, newConfig);
2283
+ } catch (error) {
2284
+ return Promise.reject(error);
2285
+ }
2286
+ i = 0;
2287
+ len = responseInterceptorChain.length;
2288
+ while (i < len) {
2289
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
2290
+ }
2291
+ return promise;
2292
+ }
2293
+ getUri(config2) {
2294
+ config2 = mergeConfig$1(this.defaults, config2);
2295
+ const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);
2296
+ return buildURL(fullPath, config2.params, config2.paramsSerializer);
2297
+ }
2298
+ };
2299
+ utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
2300
+ Axios$1.prototype[method] = function(url, config2) {
2301
+ return this.request(mergeConfig$1(config2 || {}, {
2302
+ method,
2303
+ url,
2304
+ data: (config2 || {}).data
2305
+ }));
2306
+ };
2307
+ });
2308
+ utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
2309
+ function generateHTTPMethod(isForm) {
2310
+ return function httpMethod(url, data, config2) {
2311
+ return this.request(mergeConfig$1(config2 || {}, {
2312
+ method,
2313
+ headers: isForm ? {
2314
+ "Content-Type": "multipart/form-data"
2315
+ } : {},
2316
+ url,
2317
+ data
2318
+ }));
2319
+ };
2320
+ }
2321
+ Axios$1.prototype[method] = generateHTTPMethod();
2322
+ Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
2323
+ });
2324
+ let CancelToken$1 = class CancelToken {
2325
+ constructor(executor) {
2326
+ if (typeof executor !== "function") {
2327
+ throw new TypeError("executor must be a function.");
2328
+ }
2329
+ let resolvePromise;
2330
+ this.promise = new Promise(function promiseExecutor(resolve) {
2331
+ resolvePromise = resolve;
2332
+ });
2333
+ const token = this;
2334
+ this.promise.then((cancel) => {
2335
+ if (!token._listeners) return;
2336
+ let i = token._listeners.length;
2337
+ while (i-- > 0) {
2338
+ token._listeners[i](cancel);
2339
+ }
2340
+ token._listeners = null;
2341
+ });
2342
+ this.promise.then = (onfulfilled) => {
2343
+ let _resolve;
2344
+ const promise = new Promise((resolve) => {
2345
+ token.subscribe(resolve);
2346
+ _resolve = resolve;
2347
+ }).then(onfulfilled);
2348
+ promise.cancel = function reject() {
2349
+ token.unsubscribe(_resolve);
2350
+ };
2351
+ return promise;
2352
+ };
2353
+ executor(function cancel(message, config2, request) {
2354
+ if (token.reason) {
2355
+ return;
2356
+ }
2357
+ token.reason = new CanceledError$1(message, config2, request);
2358
+ resolvePromise(token.reason);
2359
+ });
2360
+ }
2361
+ /**
2362
+ * Throws a `CanceledError` if cancellation has been requested.
2363
+ */
2364
+ throwIfRequested() {
2365
+ if (this.reason) {
2366
+ throw this.reason;
2367
+ }
2368
+ }
2369
+ /**
2370
+ * Subscribe to the cancel signal
2371
+ */
2372
+ subscribe(listener) {
2373
+ if (this.reason) {
2374
+ listener(this.reason);
2375
+ return;
2376
+ }
2377
+ if (this._listeners) {
2378
+ this._listeners.push(listener);
2379
+ } else {
2380
+ this._listeners = [listener];
2381
+ }
2382
+ }
2383
+ /**
2384
+ * Unsubscribe from the cancel signal
2385
+ */
2386
+ unsubscribe(listener) {
2387
+ if (!this._listeners) {
2388
+ return;
2389
+ }
2390
+ const index = this._listeners.indexOf(listener);
2391
+ if (index !== -1) {
2392
+ this._listeners.splice(index, 1);
2393
+ }
2394
+ }
2395
+ toAbortSignal() {
2396
+ const controller = new AbortController();
2397
+ const abort = (err) => {
2398
+ controller.abort(err);
2399
+ };
2400
+ this.subscribe(abort);
2401
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
2402
+ return controller.signal;
2403
+ }
2404
+ /**
2405
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
2406
+ * cancels the `CancelToken`.
2407
+ */
2408
+ static source() {
2409
+ let cancel;
2410
+ const token = new CancelToken(function executor(c) {
2411
+ cancel = c;
2412
+ });
2413
+ return {
2414
+ token,
2415
+ cancel
2416
+ };
2417
+ }
2418
+ };
2419
+ function spread$1(callback) {
2420
+ return function wrap(arr) {
2421
+ return callback.apply(null, arr);
2422
+ };
2423
+ }
2424
+ function isAxiosError$1(payload) {
2425
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
2426
+ }
2427
+ const HttpStatusCode$1 = {
2428
+ Continue: 100,
2429
+ SwitchingProtocols: 101,
2430
+ Processing: 102,
2431
+ EarlyHints: 103,
2432
+ Ok: 200,
2433
+ Created: 201,
2434
+ Accepted: 202,
2435
+ NonAuthoritativeInformation: 203,
2436
+ NoContent: 204,
2437
+ ResetContent: 205,
2438
+ PartialContent: 206,
2439
+ MultiStatus: 207,
2440
+ AlreadyReported: 208,
2441
+ ImUsed: 226,
2442
+ MultipleChoices: 300,
2443
+ MovedPermanently: 301,
2444
+ Found: 302,
2445
+ SeeOther: 303,
2446
+ NotModified: 304,
2447
+ UseProxy: 305,
2448
+ Unused: 306,
2449
+ TemporaryRedirect: 307,
2450
+ PermanentRedirect: 308,
2451
+ BadRequest: 400,
2452
+ Unauthorized: 401,
2453
+ PaymentRequired: 402,
2454
+ Forbidden: 403,
2455
+ NotFound: 404,
2456
+ MethodNotAllowed: 405,
2457
+ NotAcceptable: 406,
2458
+ ProxyAuthenticationRequired: 407,
2459
+ RequestTimeout: 408,
2460
+ Conflict: 409,
2461
+ Gone: 410,
2462
+ LengthRequired: 411,
2463
+ PreconditionFailed: 412,
2464
+ PayloadTooLarge: 413,
2465
+ UriTooLong: 414,
2466
+ UnsupportedMediaType: 415,
2467
+ RangeNotSatisfiable: 416,
2468
+ ExpectationFailed: 417,
2469
+ ImATeapot: 418,
2470
+ MisdirectedRequest: 421,
2471
+ UnprocessableEntity: 422,
2472
+ Locked: 423,
2473
+ FailedDependency: 424,
2474
+ TooEarly: 425,
2475
+ UpgradeRequired: 426,
2476
+ PreconditionRequired: 428,
2477
+ TooManyRequests: 429,
2478
+ RequestHeaderFieldsTooLarge: 431,
2479
+ UnavailableForLegalReasons: 451,
2480
+ InternalServerError: 500,
2481
+ NotImplemented: 501,
2482
+ BadGateway: 502,
2483
+ ServiceUnavailable: 503,
2484
+ GatewayTimeout: 504,
2485
+ HttpVersionNotSupported: 505,
2486
+ VariantAlsoNegotiates: 506,
2487
+ InsufficientStorage: 507,
2488
+ LoopDetected: 508,
2489
+ NotExtended: 510,
2490
+ NetworkAuthenticationRequired: 511,
2491
+ WebServerIsDown: 521,
2492
+ ConnectionTimedOut: 522,
2493
+ OriginIsUnreachable: 523,
2494
+ TimeoutOccurred: 524,
2495
+ SslHandshakeFailed: 525,
2496
+ InvalidSslCertificate: 526
2497
+ };
2498
+ Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
2499
+ HttpStatusCode$1[value] = key;
2500
+ });
2501
+ function createInstance(defaultConfig) {
2502
+ const context = new Axios$1(defaultConfig);
2503
+ const instance = bind(Axios$1.prototype.request, context);
2504
+ utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
2505
+ utils$1.extend(instance, context, null, { allOwnKeys: true });
2506
+ instance.create = function create(instanceConfig) {
2507
+ return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
2508
+ };
2509
+ return instance;
2510
+ }
2511
+ const axios = createInstance(defaults);
2512
+ axios.Axios = Axios$1;
2513
+ axios.CanceledError = CanceledError$1;
2514
+ axios.CancelToken = CancelToken$1;
2515
+ axios.isCancel = isCancel$1;
2516
+ axios.VERSION = VERSION$1;
2517
+ axios.toFormData = toFormData$1;
2518
+ axios.AxiosError = AxiosError$1;
2519
+ axios.Cancel = axios.CanceledError;
2520
+ axios.all = function all(promises) {
2521
+ return Promise.all(promises);
2522
+ };
2523
+ axios.spread = spread$1;
2524
+ axios.isAxiosError = isAxiosError$1;
2525
+ axios.mergeConfig = mergeConfig$1;
2526
+ axios.AxiosHeaders = AxiosHeaders$1;
2527
+ axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
2528
+ axios.getAdapter = adapters.getAdapter;
2529
+ axios.HttpStatusCode = HttpStatusCode$1;
2530
+ axios.default = axios;
2531
+ const {
2532
+ Axios: Axios2,
2533
+ AxiosError: AxiosError2,
2534
+ CanceledError: CanceledError2,
2535
+ isCancel,
2536
+ CancelToken: CancelToken2,
2537
+ VERSION,
2538
+ all: all2,
2539
+ Cancel,
2540
+ isAxiosError,
2541
+ spread,
2542
+ toFormData,
2543
+ AxiosHeaders: AxiosHeaders2,
2544
+ HttpStatusCode,
2545
+ formToJSON,
2546
+ getAdapter,
2547
+ mergeConfig
2548
+ } = axios;
2549
+ const createApi = () => {
2550
+ const api2 = axios.create({
2551
+ baseURL: getRuntimeConfig().API_URL,
2552
+ headers: {
2553
+ "Content-Type": "application/json"
2554
+ }
2555
+ });
2556
+ api2.interceptors.request.use((config2) => {
2557
+ const token = localStorage.getItem("token");
2558
+ if (token) {
2559
+ config2.headers.Authorization = `Bearer ${token}`;
2560
+ }
2561
+ const inverterId = localStorage.getItem("active-invertor-id");
2562
+ if (inverterId) {
2563
+ config2.headers["X-Inverter-Id"] = inverterId;
2564
+ }
2565
+ return config2;
2566
+ });
2567
+ api2.interceptors.response.use(
2568
+ (response) => response,
2569
+ (error) => {
2570
+ if (error.response?.status === 401) {
2571
+ localStorage.removeItem("token");
2572
+ window.location.href = "/login";
2573
+ }
2574
+ return Promise.reject(error);
2575
+ }
2576
+ );
2577
+ return api2;
2578
+ };
2579
+ let cachedApi;
2580
+ function useApi() {
2581
+ if (!cachedApi) {
2582
+ cachedApi = createApi();
2583
+ }
2584
+ return cachedApi;
2585
+ }
13
2586
  class FormStore {
14
2587
  constructor(schema) {
15
2588
  this.schema = schema;
16
- this.httpRequest = authenticationVue.useHttpRequest();
2589
+ this.httpRequest = useApi();
17
2590
  }
18
2591
  get uri() {
19
2592
  return this.schema.uri;
@@ -211,8 +2784,8 @@ function requireCjs() {
211
2784
  const isObject2 = (obj) => {
212
2785
  if (typeof obj === "object" && obj !== null) {
213
2786
  if (typeof Object.getPrototypeOf === "function") {
214
- const prototype = Object.getPrototypeOf(obj);
215
- return prototype === Object.prototype || prototype === null;
2787
+ const prototype2 = Object.getPrototypeOf(obj);
2788
+ return prototype2 === Object.prototype || prototype2 === null;
216
2789
  }
217
2790
  return Object.prototype.toString.call(obj) === "[object Object]";
218
2791
  }
@@ -1526,7 +4099,7 @@ function requireChecks$1() {
1526
4099
  };
1527
4100
  exports$1.$ZodCheckLessThan = core2.$constructor("$ZodCheckLessThan", (inst, def) => {
1528
4101
  exports$1.$ZodCheck.init(inst, def);
1529
- const origin = numericOriginMap2[typeof def.value];
4102
+ const origin2 = numericOriginMap2[typeof def.value];
1530
4103
  inst._zod.onattach.push((inst2) => {
1531
4104
  const bag = inst2._zod.bag;
1532
4105
  const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
@@ -1542,7 +4115,7 @@ function requireChecks$1() {
1542
4115
  return;
1543
4116
  }
1544
4117
  payload.issues.push({
1545
- origin,
4118
+ origin: origin2,
1546
4119
  code: "too_big",
1547
4120
  maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
1548
4121
  input: payload.value,
@@ -1554,7 +4127,7 @@ function requireChecks$1() {
1554
4127
  });
1555
4128
  exports$1.$ZodCheckGreaterThan = core2.$constructor("$ZodCheckGreaterThan", (inst, def) => {
1556
4129
  exports$1.$ZodCheck.init(inst, def);
1557
- const origin = numericOriginMap2[typeof def.value];
4130
+ const origin2 = numericOriginMap2[typeof def.value];
1558
4131
  inst._zod.onattach.push((inst2) => {
1559
4132
  const bag = inst2._zod.bag;
1560
4133
  const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
@@ -1570,7 +4143,7 @@ function requireChecks$1() {
1570
4143
  return;
1571
4144
  }
1572
4145
  payload.issues.push({
1573
- origin,
4146
+ origin: origin2,
1574
4147
  code: "too_small",
1575
4148
  minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
1576
4149
  input: payload.value,
@@ -1606,7 +4179,7 @@ function requireChecks$1() {
1606
4179
  exports$1.$ZodCheck.init(inst, def);
1607
4180
  def.format = def.format || "float64";
1608
4181
  const isInt = def.format?.includes("int");
1609
- const origin = isInt ? "int" : "number";
4182
+ const origin2 = isInt ? "int" : "number";
1610
4183
  const [minimum, maximum] = util2.NUMBER_FORMAT_RANGES[def.format];
1611
4184
  inst._zod.onattach.push((inst2) => {
1612
4185
  const bag = inst2._zod.bag;
@@ -1621,7 +4194,7 @@ function requireChecks$1() {
1621
4194
  if (isInt) {
1622
4195
  if (!Number.isInteger(input)) {
1623
4196
  payload.issues.push({
1624
- expected: origin,
4197
+ expected: origin2,
1625
4198
  format: def.format,
1626
4199
  code: "invalid_type",
1627
4200
  continue: false,
@@ -1638,7 +4211,7 @@ function requireChecks$1() {
1638
4211
  maximum: Number.MAX_SAFE_INTEGER,
1639
4212
  note: "Integers must be within the safe integer range.",
1640
4213
  inst,
1641
- origin,
4214
+ origin: origin2,
1642
4215
  inclusive: true,
1643
4216
  continue: !def.abort
1644
4217
  });
@@ -1649,7 +4222,7 @@ function requireChecks$1() {
1649
4222
  minimum: Number.MIN_SAFE_INTEGER,
1650
4223
  note: "Integers must be within the safe integer range.",
1651
4224
  inst,
1652
- origin,
4225
+ origin: origin2,
1653
4226
  inclusive: true,
1654
4227
  continue: !def.abort
1655
4228
  });
@@ -1819,9 +4392,9 @@ function requireChecks$1() {
1819
4392
  const length = input.length;
1820
4393
  if (length <= def.maximum)
1821
4394
  return;
1822
- const origin = util2.getLengthableOrigin(input);
4395
+ const origin2 = util2.getLengthableOrigin(input);
1823
4396
  payload.issues.push({
1824
- origin,
4397
+ origin: origin2,
1825
4398
  code: "too_big",
1826
4399
  maximum: def.maximum,
1827
4400
  inclusive: true,
@@ -1848,9 +4421,9 @@ function requireChecks$1() {
1848
4421
  const length = input.length;
1849
4422
  if (length >= def.minimum)
1850
4423
  return;
1851
- const origin = util2.getLengthableOrigin(input);
4424
+ const origin2 = util2.getLengthableOrigin(input);
1852
4425
  payload.issues.push({
1853
- origin,
4426
+ origin: origin2,
1854
4427
  code: "too_small",
1855
4428
  minimum: def.minimum,
1856
4429
  inclusive: true,
@@ -1878,10 +4451,10 @@ function requireChecks$1() {
1878
4451
  const length = input.length;
1879
4452
  if (length === def.length)
1880
4453
  return;
1881
- const origin = util2.getLengthableOrigin(input);
4454
+ const origin2 = util2.getLengthableOrigin(input);
1882
4455
  const tooBig = length > def.length;
1883
4456
  payload.issues.push({
1884
- origin,
4457
+ origin: origin2,
1885
4458
  ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
1886
4459
  inclusive: true,
1887
4460
  exact: true,
@@ -2757,15 +5330,15 @@ function requireSchemas$1() {
2757
5330
  }
2758
5331
  }
2759
5332
  const input = payload.value;
2760
- const isDate = input instanceof Date;
2761
- const isValidDate = isDate && !Number.isNaN(input.getTime());
5333
+ const isDate2 = input instanceof Date;
5334
+ const isValidDate = isDate2 && !Number.isNaN(input.getTime());
2762
5335
  if (isValidDate)
2763
5336
  return payload;
2764
5337
  payload.issues.push({
2765
5338
  expected: "date",
2766
5339
  code: "invalid_type",
2767
5340
  input,
2768
- ...isDate ? { received: "Invalid Date" } : {},
5341
+ ...isDate2 ? { received: "Invalid Date" } : {},
2769
5342
  inst
2770
5343
  });
2771
5344
  return payload;
@@ -4186,8 +6759,8 @@ function requireAr() {
4186
6759
  array: { unit: "عنصر", verb: "أن يحوي" },
4187
6760
  set: { unit: "عنصر", verb: "أن يحوي" }
4188
6761
  };
4189
- function getSizing(origin) {
4190
- return Sizable[origin] ?? null;
6762
+ function getSizing(origin2) {
6763
+ return Sizable[origin2] ?? null;
4191
6764
  }
4192
6765
  const FormatDictionary = {
4193
6766
  regex: "مدخل",
@@ -4332,8 +6905,8 @@ function requireAz() {
4332
6905
  array: { unit: "element", verb: "olmalıdır" },
4333
6906
  set: { unit: "element", verb: "olmalıdır" }
4334
6907
  };
4335
- function getSizing(origin) {
4336
- return Sizable[origin] ?? null;
6908
+ function getSizing(origin2) {
6909
+ return Sizable[origin2] ?? null;
4337
6910
  }
4338
6911
  const FormatDictionary = {
4339
6912
  regex: "input",
@@ -4520,8 +7093,8 @@ function requireBe() {
4520
7093
  verb: "мець"
4521
7094
  }
4522
7095
  };
4523
- function getSizing(origin) {
4524
- return Sizable[origin] ?? null;
7096
+ function getSizing(origin2) {
7097
+ return Sizable[origin2] ?? null;
4525
7098
  }
4526
7099
  const FormatDictionary = {
4527
7100
  regex: "увод",
@@ -4673,8 +7246,8 @@ function requireBg() {
4673
7246
  array: { unit: "елемента", verb: "да съдържа" },
4674
7247
  set: { unit: "елемента", verb: "да съдържа" }
4675
7248
  };
4676
- function getSizing(origin) {
4677
- return Sizable[origin] ?? null;
7249
+ function getSizing(origin2) {
7250
+ return Sizable[origin2] ?? null;
4678
7251
  }
4679
7252
  const FormatDictionary = {
4680
7253
  regex: "вход",
@@ -4833,8 +7406,8 @@ function requireCa() {
4833
7406
  array: { unit: "elements", verb: "contenir" },
4834
7407
  set: { unit: "elements", verb: "contenir" }
4835
7408
  };
4836
- function getSizing(origin) {
4837
- return Sizable[origin] ?? null;
7409
+ function getSizing(origin2) {
7410
+ return Sizable[origin2] ?? null;
4838
7411
  }
4839
7412
  const FormatDictionary = {
4840
7413
  regex: "entrada",
@@ -4981,8 +7554,8 @@ function requireCs() {
4981
7554
  array: { unit: "prvků", verb: "mít" },
4982
7555
  set: { unit: "prvků", verb: "mít" }
4983
7556
  };
4984
- function getSizing(origin) {
4985
- return Sizable[origin] ?? null;
7557
+ function getSizing(origin2) {
7558
+ return Sizable[origin2] ?? null;
4986
7559
  }
4987
7560
  const FormatDictionary = {
4988
7561
  regex: "regulární výraz",
@@ -5132,8 +7705,8 @@ function requireDa() {
5132
7705
  array: { unit: "elementer", verb: "indeholdt" },
5133
7706
  set: { unit: "elementer", verb: "indeholdt" }
5134
7707
  };
5135
- function getSizing(origin) {
5136
- return Sizable[origin] ?? null;
7708
+ function getSizing(origin2) {
7709
+ return Sizable[origin2] ?? null;
5137
7710
  }
5138
7711
  const FormatDictionary = {
5139
7712
  regex: "input",
@@ -5193,19 +7766,19 @@ function requireDa() {
5193
7766
  case "too_big": {
5194
7767
  const adj = issue2.inclusive ? "<=" : "<";
5195
7768
  const sizing = getSizing(issue2.origin);
5196
- const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
7769
+ const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
5197
7770
  if (sizing)
5198
- return `For stor: forventede ${origin ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
5199
- return `For stor: forventede ${origin ?? "value"} havde ${adj} ${issue2.maximum.toString()}`;
7771
+ return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
7772
+ return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue2.maximum.toString()}`;
5200
7773
  }
5201
7774
  case "too_small": {
5202
7775
  const adj = issue2.inclusive ? ">=" : ">";
5203
7776
  const sizing = getSizing(issue2.origin);
5204
- const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
7777
+ const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
5205
7778
  if (sizing) {
5206
- return `For lille: forventede ${origin} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
7779
+ return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
5207
7780
  }
5208
- return `For lille: forventede ${origin} havde ${adj} ${issue2.minimum.toString()}`;
7781
+ return `For lille: forventede ${origin2} havde ${adj} ${issue2.minimum.toString()}`;
5209
7782
  }
5210
7783
  case "invalid_format": {
5211
7784
  const _issue = issue2;
@@ -5287,8 +7860,8 @@ function requireDe() {
5287
7860
  array: { unit: "Elemente", verb: "zu haben" },
5288
7861
  set: { unit: "Elemente", verb: "zu haben" }
5289
7862
  };
5290
- function getSizing(origin) {
5291
- return Sizable[origin] ?? null;
7863
+ function getSizing(origin2) {
7864
+ return Sizable[origin2] ?? null;
5292
7865
  }
5293
7866
  const FormatDictionary = {
5294
7867
  regex: "Eingabe",
@@ -5436,8 +8009,8 @@ function requireEn() {
5436
8009
  set: { unit: "items", verb: "to have" },
5437
8010
  map: { unit: "entries", verb: "to have" }
5438
8011
  };
5439
- function getSizing(origin) {
5440
- return Sizable[origin] ?? null;
8012
+ function getSizing(origin2) {
8013
+ return Sizable[origin2] ?? null;
5441
8014
  }
5442
8015
  const FormatDictionary = {
5443
8016
  regex: "input",
@@ -5583,8 +8156,8 @@ function requireEo() {
5583
8156
  array: { unit: "elementojn", verb: "havi" },
5584
8157
  set: { unit: "elementojn", verb: "havi" }
5585
8158
  };
5586
- function getSizing(origin) {
5587
- return Sizable[origin] ?? null;
8159
+ function getSizing(origin2) {
8160
+ return Sizable[origin2] ?? null;
5588
8161
  }
5589
8162
  const FormatDictionary = {
5590
8163
  regex: "enigo",
@@ -5732,8 +8305,8 @@ function requireEs() {
5732
8305
  array: { unit: "elementos", verb: "tener" },
5733
8306
  set: { unit: "elementos", verb: "tener" }
5734
8307
  };
5735
- function getSizing(origin) {
5736
- return Sizable[origin] ?? null;
8308
+ function getSizing(origin2) {
8309
+ return Sizable[origin2] ?? null;
5737
8310
  }
5738
8311
  const FormatDictionary = {
5739
8312
  regex: "entrada",
@@ -5810,19 +8383,19 @@ function requireEs() {
5810
8383
  case "too_big": {
5811
8384
  const adj = issue2.inclusive ? "<=" : "<";
5812
8385
  const sizing = getSizing(issue2.origin);
5813
- const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
8386
+ const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
5814
8387
  if (sizing)
5815
- return `Demasiado grande: se esperaba que ${origin ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
5816
- return `Demasiado grande: se esperaba que ${origin ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`;
8388
+ return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
8389
+ return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`;
5817
8390
  }
5818
8391
  case "too_small": {
5819
8392
  const adj = issue2.inclusive ? ">=" : ">";
5820
8393
  const sizing = getSizing(issue2.origin);
5821
- const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
8394
+ const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
5822
8395
  if (sizing) {
5823
- return `Demasiado pequeño: se esperaba que ${origin} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
8396
+ return `Demasiado pequeño: se esperaba que ${origin2} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
5824
8397
  }
5825
- return `Demasiado pequeño: se esperaba que ${origin} fuera ${adj}${issue2.minimum.toString()}`;
8398
+ return `Demasiado pequeño: se esperaba que ${origin2} fuera ${adj}${issue2.minimum.toString()}`;
5826
8399
  }
5827
8400
  case "invalid_format": {
5828
8401
  const _issue = issue2;
@@ -5904,8 +8477,8 @@ function requireFa() {
5904
8477
  array: { unit: "آیتم", verb: "داشته باشد" },
5905
8478
  set: { unit: "آیتم", verb: "داشته باشد" }
5906
8479
  };
5907
- function getSizing(origin) {
5908
- return Sizable[origin] ?? null;
8480
+ function getSizing(origin2) {
8481
+ return Sizable[origin2] ?? null;
5909
8482
  }
5910
8483
  const FormatDictionary = {
5911
8484
  regex: "ورودی",
@@ -6062,8 +8635,8 @@ function requireFi() {
6062
8635
  int: { unit: "", subject: "kokonaisluvun" },
6063
8636
  date: { unit: "", subject: "päivämäärän" }
6064
8637
  };
6065
- function getSizing(origin) {
6066
- return Sizable[origin] ?? null;
8638
+ function getSizing(origin2) {
8639
+ return Sizable[origin2] ?? null;
6067
8640
  }
6068
8641
  const FormatDictionary = {
6069
8642
  regex: "säännöllinen lauseke",
@@ -6210,8 +8783,8 @@ function requireFr() {
6210
8783
  array: { unit: "éléments", verb: "avoir" },
6211
8784
  set: { unit: "éléments", verb: "avoir" }
6212
8785
  };
6213
- function getSizing(origin) {
6214
- return Sizable[origin] ?? null;
8786
+ function getSizing(origin2) {
8787
+ return Sizable[origin2] ?? null;
6215
8788
  }
6216
8789
  const FormatDictionary = {
6217
8790
  regex: "entrée",
@@ -6358,8 +8931,8 @@ function requireFrCA() {
6358
8931
  array: { unit: "éléments", verb: "avoir" },
6359
8932
  set: { unit: "éléments", verb: "avoir" }
6360
8933
  };
6361
- function getSizing(origin) {
6362
- return Sizable[origin] ?? null;
8934
+ function getSizing(origin2) {
8935
+ return Sizable[origin2] ?? null;
6363
8936
  }
6364
8937
  const FormatDictionary = {
6365
8938
  regex: "entrée",
@@ -6540,10 +9113,10 @@ function requireHe() {
6540
9113
  const gender = e?.gender ?? "m";
6541
9114
  return gender === "f" ? "צריכה להיות" : "צריך להיות";
6542
9115
  };
6543
- const getSizing = (origin) => {
6544
- if (!origin)
9116
+ const getSizing = (origin2) => {
9117
+ if (!origin2)
6545
9118
  return null;
6546
- return Sizable[origin] ?? null;
9119
+ return Sizable[origin2] ?? null;
6547
9120
  };
6548
9121
  const FormatDictionary = {
6549
9122
  regex: { label: "קלט", gender: "m" },
@@ -6739,8 +9312,8 @@ function requireHu() {
6739
9312
  array: { unit: "elem", verb: "legyen" },
6740
9313
  set: { unit: "elem", verb: "legyen" }
6741
9314
  };
6742
- function getSizing(origin) {
6743
- return Sizable[origin] ?? null;
9315
+ function getSizing(origin2) {
9316
+ return Sizable[origin2] ?? null;
6744
9317
  }
6745
9318
  const FormatDictionary = {
6746
9319
  regex: "bemenet",
@@ -6921,8 +9494,8 @@ function requireHy() {
6921
9494
  verb: "ունենալ"
6922
9495
  }
6923
9496
  };
6924
- function getSizing(origin) {
6925
- return Sizable[origin] ?? null;
9497
+ function getSizing(origin2) {
9498
+ return Sizable[origin2] ?? null;
6926
9499
  }
6927
9500
  const FormatDictionary = {
6928
9501
  regex: "մուտք",
@@ -7074,8 +9647,8 @@ function requireId() {
7074
9647
  array: { unit: "item", verb: "memiliki" },
7075
9648
  set: { unit: "item", verb: "memiliki" }
7076
9649
  };
7077
- function getSizing(origin) {
7078
- return Sizable[origin] ?? null;
9650
+ function getSizing(origin2) {
9651
+ return Sizable[origin2] ?? null;
7079
9652
  }
7080
9653
  const FormatDictionary = {
7081
9654
  regex: "input",
@@ -7220,8 +9793,8 @@ function requireIs() {
7220
9793
  array: { unit: "hluti", verb: "að hafa" },
7221
9794
  set: { unit: "hluti", verb: "að hafa" }
7222
9795
  };
7223
- function getSizing(origin) {
7224
- return Sizable[origin] ?? null;
9796
+ function getSizing(origin2) {
9797
+ return Sizable[origin2] ?? null;
7225
9798
  }
7226
9799
  const FormatDictionary = {
7227
9800
  regex: "gildi",
@@ -7369,8 +9942,8 @@ function requireIt() {
7369
9942
  array: { unit: "elementi", verb: "avere" },
7370
9943
  set: { unit: "elementi", verb: "avere" }
7371
9944
  };
7372
- function getSizing(origin) {
7373
- return Sizable[origin] ?? null;
9945
+ function getSizing(origin2) {
9946
+ return Sizable[origin2] ?? null;
7374
9947
  }
7375
9948
  const FormatDictionary = {
7376
9949
  regex: "input",
@@ -7517,8 +10090,8 @@ function requireJa() {
7517
10090
  array: { unit: "要素", verb: "である" },
7518
10091
  set: { unit: "要素", verb: "である" }
7519
10092
  };
7520
- function getSizing(origin) {
7521
- return Sizable[origin] ?? null;
10093
+ function getSizing(origin2) {
10094
+ return Sizable[origin2] ?? null;
7522
10095
  }
7523
10096
  const FormatDictionary = {
7524
10097
  regex: "入力値",
@@ -7664,8 +10237,8 @@ function requireKa() {
7664
10237
  array: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" },
7665
10238
  set: { unit: "ელემენტი", verb: "უნდა შეიცავდეს" }
7666
10239
  };
7667
- function getSizing(origin) {
7668
- return Sizable[origin] ?? null;
10240
+ function getSizing(origin2) {
10241
+ return Sizable[origin2] ?? null;
7669
10242
  }
7670
10243
  const FormatDictionary = {
7671
10244
  regex: "შეყვანა",
@@ -7817,8 +10390,8 @@ function requireKm() {
7817
10390
  array: { unit: "ធាតុ", verb: "គួរមាន" },
7818
10391
  set: { unit: "ធាតុ", verb: "គួរមាន" }
7819
10392
  };
7820
- function getSizing(origin) {
7821
- return Sizable[origin] ?? null;
10393
+ function getSizing(origin2) {
10394
+ return Sizable[origin2] ?? null;
7822
10395
  }
7823
10396
  const FormatDictionary = {
7824
10397
  regex: "ទិន្នន័យបញ្ចូល",
@@ -7986,8 +10559,8 @@ function requireKo() {
7986
10559
  array: { unit: "개", verb: "to have" },
7987
10560
  set: { unit: "개", verb: "to have" }
7988
10561
  };
7989
- function getSizing(origin) {
7990
- return Sizable[origin] ?? null;
10562
+ function getSizing(origin2) {
10563
+ return Sizable[origin2] ?? null;
7991
10564
  }
7992
10565
  const FormatDictionary = {
7993
10566
  regex: "입력",
@@ -8214,8 +10787,8 @@ function requireLt() {
8214
10787
  }
8215
10788
  }
8216
10789
  };
8217
- function getSizing(origin, unitType, inclusive, targetShouldBe) {
8218
- const result = Sizable[origin] ?? null;
10790
+ function getSizing(origin2, unitType, inclusive, targetShouldBe) {
10791
+ const result = Sizable[origin2] ?? null;
8219
10792
  if (result === null)
8220
10793
  return result;
8221
10794
  return {
@@ -8282,20 +10855,20 @@ function requireLt() {
8282
10855
  return `Privalo būti ${util2.stringifyPrimitive(issue2.values[0])}`;
8283
10856
  return `Privalo būti vienas iš ${util2.joinValues(issue2.values, "|")} pasirinkimų`;
8284
10857
  case "too_big": {
8285
- const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
10858
+ const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
8286
10859
  const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller");
8287
10860
  if (sizing?.verb)
8288
- return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "elementų"}`;
10861
+ return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reikšmė")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "elementų"}`;
8289
10862
  const adj = issue2.inclusive ? "ne didesnis kaip" : "mažesnis kaip";
8290
- return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} turi būti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`;
10863
+ return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reikšmė")} turi būti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`;
8291
10864
  }
8292
10865
  case "too_small": {
8293
- const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
10866
+ const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
8294
10867
  const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger");
8295
10868
  if (sizing?.verb)
8296
- return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "elementų"}`;
10869
+ return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reikšmė")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "elementų"}`;
8297
10870
  const adj = issue2.inclusive ? "ne mažesnis kaip" : "didesnis kaip";
8298
- return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} turi būti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`;
10871
+ return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reikšmė")} turi būti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`;
8299
10872
  }
8300
10873
  case "invalid_format": {
8301
10874
  const _issue = issue2;
@@ -8319,8 +10892,8 @@ function requireLt() {
8319
10892
  case "invalid_union":
8320
10893
  return "Klaidinga įvestis";
8321
10894
  case "invalid_element": {
8322
- const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
8323
- return `${capitalizeFirstCharacter(origin ?? issue2.origin ?? "reikšmė")} turi klaidingą įvestį`;
10895
+ const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
10896
+ return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reikšmė")} turi klaidingą įvestį`;
8324
10897
  }
8325
10898
  default:
8326
10899
  return "Klaidinga įvestis";
@@ -8380,8 +10953,8 @@ function requireMk() {
8380
10953
  array: { unit: "ставки", verb: "да имаат" },
8381
10954
  set: { unit: "ставки", verb: "да имаат" }
8382
10955
  };
8383
- function getSizing(origin) {
8384
- return Sizable[origin] ?? null;
10956
+ function getSizing(origin2) {
10957
+ return Sizable[origin2] ?? null;
8385
10958
  }
8386
10959
  const FormatDictionary = {
8387
10960
  regex: "внес",
@@ -8529,8 +11102,8 @@ function requireMs() {
8529
11102
  array: { unit: "elemen", verb: "mempunyai" },
8530
11103
  set: { unit: "elemen", verb: "mempunyai" }
8531
11104
  };
8532
- function getSizing(origin) {
8533
- return Sizable[origin] ?? null;
11105
+ function getSizing(origin2) {
11106
+ return Sizable[origin2] ?? null;
8534
11107
  }
8535
11108
  const FormatDictionary = {
8536
11109
  regex: "input",
@@ -8676,8 +11249,8 @@ function requireNl() {
8676
11249
  array: { unit: "elementen", verb: "heeft" },
8677
11250
  set: { unit: "elementen", verb: "heeft" }
8678
11251
  };
8679
- function getSizing(origin) {
8680
- return Sizable[origin] ?? null;
11252
+ function getSizing(origin2) {
11253
+ return Sizable[origin2] ?? null;
8681
11254
  }
8682
11255
  const FormatDictionary = {
8683
11256
  regex: "invoer",
@@ -8826,8 +11399,8 @@ function requireNo() {
8826
11399
  array: { unit: "elementer", verb: "å inneholde" },
8827
11400
  set: { unit: "elementer", verb: "å inneholde" }
8828
11401
  };
8829
- function getSizing(origin) {
8830
- return Sizable[origin] ?? null;
11402
+ function getSizing(origin2) {
11403
+ return Sizable[origin2] ?? null;
8831
11404
  }
8832
11405
  const FormatDictionary = {
8833
11406
  regex: "input",
@@ -8974,8 +11547,8 @@ function requireOta() {
8974
11547
  array: { unit: "unsur", verb: "olmalıdır" },
8975
11548
  set: { unit: "unsur", verb: "olmalıdır" }
8976
11549
  };
8977
- function getSizing(origin) {
8978
- return Sizable[origin] ?? null;
11550
+ function getSizing(origin2) {
11551
+ return Sizable[origin2] ?? null;
8979
11552
  }
8980
11553
  const FormatDictionary = {
8981
11554
  regex: "giren",
@@ -9123,8 +11696,8 @@ function requirePs() {
9123
11696
  array: { unit: "توکي", verb: "ولري" },
9124
11697
  set: { unit: "توکي", verb: "ولري" }
9125
11698
  };
9126
- function getSizing(origin) {
9127
- return Sizable[origin] ?? null;
11699
+ function getSizing(origin2) {
11700
+ return Sizable[origin2] ?? null;
9128
11701
  }
9129
11702
  const FormatDictionary = {
9130
11703
  regex: "ورودي",
@@ -9277,8 +11850,8 @@ function requirePl() {
9277
11850
  array: { unit: "elementów", verb: "mieć" },
9278
11851
  set: { unit: "elementów", verb: "mieć" }
9279
11852
  };
9280
- function getSizing(origin) {
9281
- return Sizable[origin] ?? null;
11853
+ function getSizing(origin2) {
11854
+ return Sizable[origin2] ?? null;
9282
11855
  }
9283
11856
  const FormatDictionary = {
9284
11857
  regex: "wyrażenie",
@@ -9426,8 +11999,8 @@ function requirePt() {
9426
11999
  array: { unit: "itens", verb: "ter" },
9427
12000
  set: { unit: "itens", verb: "ter" }
9428
12001
  };
9429
- function getSizing(origin) {
9430
- return Sizable[origin] ?? null;
12002
+ function getSizing(origin2) {
12003
+ return Sizable[origin2] ?? null;
9431
12004
  }
9432
12005
  const FormatDictionary = {
9433
12006
  regex: "padrão",
@@ -9617,8 +12190,8 @@ function requireRu() {
9617
12190
  verb: "иметь"
9618
12191
  }
9619
12192
  };
9620
- function getSizing(origin) {
9621
- return Sizable[origin] ?? null;
12193
+ function getSizing(origin2) {
12194
+ return Sizable[origin2] ?? null;
9622
12195
  }
9623
12196
  const FormatDictionary = {
9624
12197
  regex: "ввод",
@@ -9770,8 +12343,8 @@ function requireSl() {
9770
12343
  array: { unit: "elementov", verb: "imeti" },
9771
12344
  set: { unit: "elementov", verb: "imeti" }
9772
12345
  };
9773
- function getSizing(origin) {
9774
- return Sizable[origin] ?? null;
12346
+ function getSizing(origin2) {
12347
+ return Sizable[origin2] ?? null;
9775
12348
  }
9776
12349
  const FormatDictionary = {
9777
12350
  regex: "vnos",
@@ -9919,8 +12492,8 @@ function requireSv() {
9919
12492
  array: { unit: "objekt", verb: "att innehålla" },
9920
12493
  set: { unit: "objekt", verb: "att innehålla" }
9921
12494
  };
9922
- function getSizing(origin) {
9923
- return Sizable[origin] ?? null;
12495
+ function getSizing(origin2) {
12496
+ return Sizable[origin2] ?? null;
9924
12497
  }
9925
12498
  const FormatDictionary = {
9926
12499
  regex: "reguljärt uttryck",
@@ -10069,8 +12642,8 @@ function requireTa() {
10069
12642
  array: { unit: "உறுப்புகள்", verb: "கொண்டிருக்க வேண்டும்" },
10070
12643
  set: { unit: "உறுப்புகள்", verb: "கொண்டிருக்க வேண்டும்" }
10071
12644
  };
10072
- function getSizing(origin) {
10073
- return Sizable[origin] ?? null;
12645
+ function getSizing(origin2) {
12646
+ return Sizable[origin2] ?? null;
10074
12647
  }
10075
12648
  const FormatDictionary = {
10076
12649
  regex: "உள்ளீடு",
@@ -10219,8 +12792,8 @@ function requireTh() {
10219
12792
  array: { unit: "รายการ", verb: "ควรมี" },
10220
12793
  set: { unit: "รายการ", verb: "ควรมี" }
10221
12794
  };
10222
- function getSizing(origin) {
10223
- return Sizable[origin] ?? null;
12795
+ function getSizing(origin2) {
12796
+ return Sizable[origin2] ?? null;
10224
12797
  }
10225
12798
  const FormatDictionary = {
10226
12799
  regex: "ข้อมูลที่ป้อน",
@@ -10369,8 +12942,8 @@ function requireTr() {
10369
12942
  array: { unit: "öğe", verb: "olmalı" },
10370
12943
  set: { unit: "öğe", verb: "olmalı" }
10371
12944
  };
10372
- function getSizing(origin) {
10373
- return Sizable[origin] ?? null;
12945
+ function getSizing(origin2) {
12946
+ return Sizable[origin2] ?? null;
10374
12947
  }
10375
12948
  const FormatDictionary = {
10376
12949
  regex: "girdi",
@@ -10515,8 +13088,8 @@ function requireUk() {
10515
13088
  array: { unit: "елементів", verb: "матиме" },
10516
13089
  set: { unit: "елементів", verb: "матиме" }
10517
13090
  };
10518
- function getSizing(origin) {
10519
- return Sizable[origin] ?? null;
13091
+ function getSizing(origin2) {
13092
+ return Sizable[origin2] ?? null;
10520
13093
  }
10521
13094
  const FormatDictionary = {
10522
13095
  regex: "вхідні дані",
@@ -10682,8 +13255,8 @@ function requireUr() {
10682
13255
  array: { unit: "آئٹمز", verb: "ہونا" },
10683
13256
  set: { unit: "آئٹمز", verb: "ہونا" }
10684
13257
  };
10685
- function getSizing(origin) {
10686
- return Sizable[origin] ?? null;
13258
+ function getSizing(origin2) {
13259
+ return Sizable[origin2] ?? null;
10687
13260
  }
10688
13261
  const FormatDictionary = {
10689
13262
  regex: "ان پٹ",
@@ -10832,8 +13405,8 @@ function requireUz() {
10832
13405
  array: { unit: "element", verb: "bo‘lishi kerak" },
10833
13406
  set: { unit: "element", verb: "bo‘lishi kerak" }
10834
13407
  };
10835
- function getSizing(origin) {
10836
- return Sizable[origin] ?? null;
13408
+ function getSizing(origin2) {
13409
+ return Sizable[origin2] ?? null;
10837
13410
  }
10838
13411
  const FormatDictionary = {
10839
13412
  regex: "kirish",
@@ -10981,8 +13554,8 @@ function requireVi() {
10981
13554
  array: { unit: "phần tử", verb: "có" },
10982
13555
  set: { unit: "phần tử", verb: "có" }
10983
13556
  };
10984
- function getSizing(origin) {
10985
- return Sizable[origin] ?? null;
13557
+ function getSizing(origin2) {
13558
+ return Sizable[origin2] ?? null;
10986
13559
  }
10987
13560
  const FormatDictionary = {
10988
13561
  regex: "đầu vào",
@@ -11129,8 +13702,8 @@ function requireZhCN() {
11129
13702
  array: { unit: "项", verb: "包含" },
11130
13703
  set: { unit: "项", verb: "包含" }
11131
13704
  };
11132
- function getSizing(origin) {
11133
- return Sizable[origin] ?? null;
13705
+ function getSizing(origin2) {
13706
+ return Sizable[origin2] ?? null;
11134
13707
  }
11135
13708
  const FormatDictionary = {
11136
13709
  regex: "输入",
@@ -11278,8 +13851,8 @@ function requireZhTW() {
11278
13851
  array: { unit: "項目", verb: "擁有" },
11279
13852
  set: { unit: "項目", verb: "擁有" }
11280
13853
  };
11281
- function getSizing(origin) {
11282
- return Sizable[origin] ?? null;
13854
+ function getSizing(origin2) {
13855
+ return Sizable[origin2] ?? null;
11283
13856
  }
11284
13857
  const FormatDictionary = {
11285
13858
  regex: "輸入",
@@ -11425,8 +13998,8 @@ function requireYo() {
11425
13998
  array: { unit: "nkan", verb: "ní" },
11426
13999
  set: { unit: "nkan", verb: "ní" }
11427
14000
  };
11428
- function getSizing(origin) {
11429
- return Sizable[origin] ?? null;
14001
+ function getSizing(origin2) {
14002
+ return Sizable[origin2] ?? null;
11430
14003
  }
11431
14004
  const FormatDictionary = {
11432
14005
  regex: "ẹ̀rọ ìbáwọlé",
@@ -17497,7 +20070,7 @@ const numericOriginMap = {
17497
20070
  };
17498
20071
  const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
17499
20072
  $ZodCheck.init(inst, def);
17500
- const origin = numericOriginMap[typeof def.value];
20073
+ const origin2 = numericOriginMap[typeof def.value];
17501
20074
  inst._zod.onattach.push((inst2) => {
17502
20075
  const bag = inst2._zod.bag;
17503
20076
  const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
@@ -17513,7 +20086,7 @@ const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (ins
17513
20086
  return;
17514
20087
  }
17515
20088
  payload.issues.push({
17516
- origin,
20089
+ origin: origin2,
17517
20090
  code: "too_big",
17518
20091
  maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
17519
20092
  input: payload.value,
@@ -17525,7 +20098,7 @@ const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (ins
17525
20098
  });
17526
20099
  const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
17527
20100
  $ZodCheck.init(inst, def);
17528
- const origin = numericOriginMap[typeof def.value];
20101
+ const origin2 = numericOriginMap[typeof def.value];
17529
20102
  inst._zod.onattach.push((inst2) => {
17530
20103
  const bag = inst2._zod.bag;
17531
20104
  const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
@@ -17541,7 +20114,7 @@ const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan"
17541
20114
  return;
17542
20115
  }
17543
20116
  payload.issues.push({
17544
- origin,
20117
+ origin: origin2,
17545
20118
  code: "too_small",
17546
20119
  minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
17547
20120
  input: payload.value,
@@ -17577,7 +20150,7 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
17577
20150
  $ZodCheck.init(inst, def);
17578
20151
  def.format = def.format || "float64";
17579
20152
  const isInt = def.format?.includes("int");
17580
- const origin = isInt ? "int" : "number";
20153
+ const origin2 = isInt ? "int" : "number";
17581
20154
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
17582
20155
  inst._zod.onattach.push((inst2) => {
17583
20156
  const bag = inst2._zod.bag;
@@ -17592,7 +20165,7 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
17592
20165
  if (isInt) {
17593
20166
  if (!Number.isInteger(input)) {
17594
20167
  payload.issues.push({
17595
- expected: origin,
20168
+ expected: origin2,
17596
20169
  format: def.format,
17597
20170
  code: "invalid_type",
17598
20171
  continue: false,
@@ -17609,7 +20182,7 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
17609
20182
  maximum: Number.MAX_SAFE_INTEGER,
17610
20183
  note: "Integers must be within the safe integer range.",
17611
20184
  inst,
17612
- origin,
20185
+ origin: origin2,
17613
20186
  inclusive: true,
17614
20187
  continue: !def.abort
17615
20188
  });
@@ -17620,7 +20193,7 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
17620
20193
  minimum: Number.MIN_SAFE_INTEGER,
17621
20194
  note: "Integers must be within the safe integer range.",
17622
20195
  inst,
17623
- origin,
20196
+ origin: origin2,
17624
20197
  inclusive: true,
17625
20198
  continue: !def.abort
17626
20199
  });
@@ -17669,9 +20242,9 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
17669
20242
  const length = input.length;
17670
20243
  if (length <= def.maximum)
17671
20244
  return;
17672
- const origin = getLengthableOrigin(input);
20245
+ const origin2 = getLengthableOrigin(input);
17673
20246
  payload.issues.push({
17674
- origin,
20247
+ origin: origin2,
17675
20248
  code: "too_big",
17676
20249
  maximum: def.maximum,
17677
20250
  inclusive: true,
@@ -17698,9 +20271,9 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
17698
20271
  const length = input.length;
17699
20272
  if (length >= def.minimum)
17700
20273
  return;
17701
- const origin = getLengthableOrigin(input);
20274
+ const origin2 = getLengthableOrigin(input);
17702
20275
  payload.issues.push({
17703
- origin,
20276
+ origin: origin2,
17704
20277
  code: "too_small",
17705
20278
  minimum: def.minimum,
17706
20279
  inclusive: true,
@@ -17728,10 +20301,10 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
17728
20301
  const length = input.length;
17729
20302
  if (length === def.length)
17730
20303
  return;
17731
- const origin = getLengthableOrigin(input);
20304
+ const origin2 = getLengthableOrigin(input);
17732
20305
  const tooBig = length > def.length;
17733
20306
  payload.issues.push({
17734
- origin,
20307
+ origin: origin2,
17735
20308
  ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
17736
20309
  inclusive: true,
17737
20310
  exact: true,
@@ -18488,13 +21061,13 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
18488
21061
  }
18489
21062
  return propValues;
18490
21063
  });
18491
- const isObject$1 = isObject;
21064
+ const isObject$12 = isObject;
18492
21065
  const catchall = def.catchall;
18493
21066
  let value;
18494
21067
  inst._zod.parse = (payload, ctx) => {
18495
21068
  value ?? (value = _normalized.value);
18496
21069
  const input = payload.value;
18497
- if (!isObject$1(input)) {
21070
+ if (!isObject$12(input)) {
18498
21071
  payload.issues.push({
18499
21072
  expected: "object",
18500
21073
  code: "invalid_type",
@@ -18592,7 +21165,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
18592
21165
  return (payload, ctx) => fn(shape, payload, ctx);
18593
21166
  };
18594
21167
  let fastpass;
18595
- const isObject$1 = isObject;
21168
+ const isObject$12 = isObject;
18596
21169
  const jit = !globalConfig.jitless;
18597
21170
  const allowsEval$1 = allowsEval;
18598
21171
  const fastEnabled = jit && allowsEval$1.value;
@@ -18601,7 +21174,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
18601
21174
  inst._zod.parse = (payload, ctx) => {
18602
21175
  value ?? (value = _normalized.value);
18603
21176
  const input = payload.value;
18604
- if (!isObject$1(input)) {
21177
+ if (!isObject$12(input)) {
18605
21178
  payload.issues.push({
18606
21179
  expected: "object",
18607
21180
  code: "invalid_type",
@@ -19635,7 +22208,7 @@ function initializeContext(params) {
19635
22208
  external: params?.external ?? void 0
19636
22209
  };
19637
22210
  }
19638
- function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
22211
+ function process$1(schema, ctx, _params = { path: [], schemaPath: [] }) {
19639
22212
  var _a2;
19640
22213
  const def = schema._zod.def;
19641
22214
  const seen = ctx.seen.get(schema);
@@ -19672,7 +22245,7 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
19672
22245
  if (parent) {
19673
22246
  if (!result.ref)
19674
22247
  result.ref = parent;
19675
- process(parent, ctx, params);
22248
+ process$1(parent, ctx, params);
19676
22249
  ctx.seen.get(parent).isParent = true;
19677
22250
  }
19678
22251
  }
@@ -19952,14 +22525,14 @@ function isTransforming(_schema, _ctx) {
19952
22525
  }
19953
22526
  const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
19954
22527
  const ctx = initializeContext({ ...params, processors });
19955
- process(schema, ctx);
22528
+ process$1(schema, ctx);
19956
22529
  extractDefs(ctx, schema);
19957
22530
  return finalize(ctx, schema);
19958
22531
  };
19959
22532
  const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
19960
22533
  const { libraryOptions, target } = params ?? {};
19961
22534
  const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
19962
- process(schema, ctx);
22535
+ process$1(schema, ctx);
19963
22536
  extractDefs(ctx, schema);
19964
22537
  return finalize(ctx, schema);
19965
22538
  };
@@ -20080,7 +22653,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
20080
22653
  if (typeof maximum === "number")
20081
22654
  json.maxItems = maximum;
20082
22655
  json.type = "array";
20083
- json.items = process(def.element, ctx, { ...params, path: [...params.path, "items"] });
22656
+ json.items = process$1(def.element, ctx, { ...params, path: [...params.path, "items"] });
20084
22657
  };
20085
22658
  const objectProcessor = (schema, ctx, _json, params) => {
20086
22659
  const json = _json;
@@ -20089,7 +22662,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
20089
22662
  json.properties = {};
20090
22663
  const shape = def.shape;
20091
22664
  for (const key in shape) {
20092
- json.properties[key] = process(shape[key], ctx, {
22665
+ json.properties[key] = process$1(shape[key], ctx, {
20093
22666
  ...params,
20094
22667
  path: [...params.path, "properties", key]
20095
22668
  });
@@ -20112,7 +22685,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
20112
22685
  if (ctx.io === "output")
20113
22686
  json.additionalProperties = false;
20114
22687
  } else if (def.catchall) {
20115
- json.additionalProperties = process(def.catchall, ctx, {
22688
+ json.additionalProperties = process$1(def.catchall, ctx, {
20116
22689
  ...params,
20117
22690
  path: [...params.path, "additionalProperties"]
20118
22691
  });
@@ -20121,7 +22694,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
20121
22694
  const unionProcessor = (schema, ctx, json, params) => {
20122
22695
  const def = schema._zod.def;
20123
22696
  const isExclusive = def.inclusive === false;
20124
- const options = def.options.map((x, i) => process(x, ctx, {
22697
+ const options = def.options.map((x, i) => process$1(x, ctx, {
20125
22698
  ...params,
20126
22699
  path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
20127
22700
  }));
@@ -20133,11 +22706,11 @@ const unionProcessor = (schema, ctx, json, params) => {
20133
22706
  };
20134
22707
  const intersectionProcessor = (schema, ctx, json, params) => {
20135
22708
  const def = schema._zod.def;
20136
- const a = process(def.left, ctx, {
22709
+ const a = process$1(def.left, ctx, {
20137
22710
  ...params,
20138
22711
  path: [...params.path, "allOf", 0]
20139
22712
  });
20140
- const b = process(def.right, ctx, {
22713
+ const b = process$1(def.right, ctx, {
20141
22714
  ...params,
20142
22715
  path: [...params.path, "allOf", 1]
20143
22716
  });
@@ -20150,7 +22723,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
20150
22723
  };
20151
22724
  const nullableProcessor = (schema, ctx, json, params) => {
20152
22725
  const def = schema._zod.def;
20153
- const inner = process(def.innerType, ctx, params);
22726
+ const inner = process$1(def.innerType, ctx, params);
20154
22727
  const seen = ctx.seen.get(schema);
20155
22728
  if (ctx.target === "openapi-3.0") {
20156
22729
  seen.ref = def.innerType;
@@ -20161,20 +22734,20 @@ const nullableProcessor = (schema, ctx, json, params) => {
20161
22734
  };
20162
22735
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
20163
22736
  const def = schema._zod.def;
20164
- process(def.innerType, ctx, params);
22737
+ process$1(def.innerType, ctx, params);
20165
22738
  const seen = ctx.seen.get(schema);
20166
22739
  seen.ref = def.innerType;
20167
22740
  };
20168
22741
  const defaultProcessor = (schema, ctx, json, params) => {
20169
22742
  const def = schema._zod.def;
20170
- process(def.innerType, ctx, params);
22743
+ process$1(def.innerType, ctx, params);
20171
22744
  const seen = ctx.seen.get(schema);
20172
22745
  seen.ref = def.innerType;
20173
22746
  json.default = JSON.parse(JSON.stringify(def.defaultValue));
20174
22747
  };
20175
22748
  const prefaultProcessor = (schema, ctx, json, params) => {
20176
22749
  const def = schema._zod.def;
20177
- process(def.innerType, ctx, params);
22750
+ process$1(def.innerType, ctx, params);
20178
22751
  const seen = ctx.seen.get(schema);
20179
22752
  seen.ref = def.innerType;
20180
22753
  if (ctx.io === "input")
@@ -20182,7 +22755,7 @@ const prefaultProcessor = (schema, ctx, json, params) => {
20182
22755
  };
20183
22756
  const catchProcessor = (schema, ctx, json, params) => {
20184
22757
  const def = schema._zod.def;
20185
- process(def.innerType, ctx, params);
22758
+ process$1(def.innerType, ctx, params);
20186
22759
  const seen = ctx.seen.get(schema);
20187
22760
  seen.ref = def.innerType;
20188
22761
  let catchValue;
@@ -20196,20 +22769,20 @@ const catchProcessor = (schema, ctx, json, params) => {
20196
22769
  const pipeProcessor = (schema, ctx, _json, params) => {
20197
22770
  const def = schema._zod.def;
20198
22771
  const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
20199
- process(innerType, ctx, params);
22772
+ process$1(innerType, ctx, params);
20200
22773
  const seen = ctx.seen.get(schema);
20201
22774
  seen.ref = innerType;
20202
22775
  };
20203
22776
  const readonlyProcessor = (schema, ctx, json, params) => {
20204
22777
  const def = schema._zod.def;
20205
- process(def.innerType, ctx, params);
22778
+ process$1(def.innerType, ctx, params);
20206
22779
  const seen = ctx.seen.get(schema);
20207
22780
  seen.ref = def.innerType;
20208
22781
  json.readOnly = true;
20209
22782
  };
20210
22783
  const optionalProcessor = (schema, ctx, _json, params) => {
20211
22784
  const def = schema._zod.def;
20212
- process(def.innerType, ctx, params);
22785
+ process$1(def.innerType, ctx, params);
20213
22786
  const seen = ctx.seen.get(schema);
20214
22787
  seen.ref = def.innerType;
20215
22788
  };
@@ -20883,8 +23456,8 @@ object({
20883
23456
  request: ResponseRequestSchema
20884
23457
  });
20885
23458
  const Operator = ["contains", "equals"];
20886
- const getFilterValues = (filter) => {
20887
- const [key, value, op] = filter.split(":");
23459
+ const getFilterValues = (filter2) => {
23460
+ const [key, value, op] = filter2.split(":");
20888
23461
  const operator = Operator.includes(op) ? op : "contains";
20889
23462
  return { key, value, operator };
20890
23463
  };
@@ -21460,8 +24033,8 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
21460
24033
  () => properties.filters,
21461
24034
  (first, second) => {
21462
24035
  formData.value = {};
21463
- properties.filters.forEach((filter) => {
21464
- formData.value[filter.key] = filter.value;
24036
+ properties.filters.forEach((filter2) => {
24037
+ formData.value[filter2.key] = filter2.value;
21465
24038
  });
21466
24039
  },
21467
24040
  { immediate: true }
@@ -21469,8 +24042,8 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
21469
24042
  const onResetFilters = () => {
21470
24043
  emits("changeFilters", {});
21471
24044
  };
21472
- const removeFilter = (filter) => {
21473
- formData.value[filter.key] = void 0;
24045
+ const removeFilter = (filter2) => {
24046
+ formData.value[filter2.key] = void 0;
21474
24047
  emits("changeFilters", formData.value);
21475
24048
  };
21476
24049
  return (_ctx, _cache) => {
@@ -21489,14 +24062,14 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
21489
24062
  })) : vue.createCommentVNode("", true)
21490
24063
  ]),
21491
24064
  vue.createElementVNode("div", _hoisted_3$1, [
21492
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.filters, (filter) => {
24065
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.filters, (filter2) => {
21493
24066
  return vue.openBlock(), vue.createBlock(vue.unref(ui.BtnBadge), {
21494
- key: filter.key,
24067
+ key: filter2.key,
21495
24068
  icon: vue.unref(ui.IconEnum).Close,
21496
- onClick: ($event) => removeFilter(filter)
24069
+ onClick: ($event) => removeFilter(filter2)
21497
24070
  }, {
21498
24071
  default: vue.withCtx(() => [
21499
- vue.createTextVNode(vue.toDisplayString(filter.label) + ": " + vue.toDisplayString(filter.value), 1)
24072
+ vue.createTextVNode(vue.toDisplayString(filter2.label) + ": " + vue.toDisplayString(filter2.value), 1)
21500
24073
  ]),
21501
24074
  _: 2
21502
24075
  }, 1032, ["icon", "onClick"]);
@@ -21553,13 +24126,13 @@ class TableStore {
21553
24126
  this.updateRequest({ sort: id2, sortDir });
21554
24127
  };
21555
24128
  this.updateFilters = (filters) => {
21556
- const filter = [];
24129
+ const filter2 = [];
21557
24130
  Object.entries(filters).forEach(([key, value]) => {
21558
24131
  if (!value) return;
21559
24132
  const operator = value?.operator || "contains";
21560
- filter.push(`${key}:${value}:${operator}`);
24133
+ filter2.push(`${key}:${value}:${operator}`);
21561
24134
  });
21562
- this.updateRequest({ filter });
24135
+ this.updateRequest({ filter: filter2 });
21563
24136
  };
21564
24137
  this.sorting = vue.computed(() => {
21565
24138
  const requestData = this.requestData.value;
@@ -21573,7 +24146,7 @@ class TableStore {
21573
24146
  );
21574
24147
  }
21575
24148
  get httpRequest() {
21576
- return authenticationVue.useHttpRequest();
24149
+ return useApi();
21577
24150
  }
21578
24151
  reload() {
21579
24152
  this._reload.value = Date.now();