@ea-lab/reactive-json 0.7.0 → 1.0.0-alpha.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.
Files changed (89) hide show
  1. package/README.md +1 -3
  2. package/dist/TemplateSystem-kQJEKjik.js +3568 -0
  3. package/dist/assets/VariablesDebug.css +1 -4
  4. package/dist/assets/reset.css +4 -0
  5. package/dist/assets/usePagination.css +1 -0
  6. package/dist/component/action/HashChangeListener.js +29 -7
  7. package/dist/component/action/MessageListener.js +26 -8
  8. package/dist/component/action/ReactOnEvent.js +64 -8
  9. package/dist/component/action/Redirect.js +9 -5
  10. package/dist/component/action/SetAttributeValue.js +37 -5
  11. package/dist/component/action/ToggleAttributeValue.js +56 -5
  12. package/dist/component/action/UnsetAttribute.js +20 -5
  13. package/dist/component/action/UnsetAttributeValue.js +58 -5
  14. package/dist/component/action/index.js +19 -15
  15. package/dist/component/dataMapping/index.js +6 -3
  16. package/dist/component/dataMapping/simpleMapping.js +93 -2
  17. package/dist/component/element/debug/VariablesDebug/VariablesDebug.js +110 -13
  18. package/dist/component/element/debug/index.js +2 -2
  19. package/dist/component/element/html/FolderSortableTree.js +131 -8
  20. package/dist/component/element/html/FormatNumeral.js +57 -6
  21. package/dist/component/element/html/Html.js +1 -1
  22. package/dist/component/element/html/LabelFromValue.js +25 -6
  23. package/dist/component/element/html/PreformattedMarkup.js +50 -7
  24. package/dist/component/element/html/SortableTreeItemCollapseButton.js +10 -5
  25. package/dist/component/element/html/index.js +12 -10
  26. package/dist/component/element/index.js +35 -30
  27. package/dist/component/element/special/Count.js +21 -10
  28. package/dist/component/element/special/DataFilter.js +75 -6
  29. package/dist/component/element/special/DelayedActions.js +46 -7
  30. package/dist/component/element/special/Phantom.js +12 -3
  31. package/dist/component/element/special/ReactiveJsonBasicComponentWrapper.js +29 -0
  32. package/dist/component/element/special/ReactiveJsonSubroot.js +4 -3
  33. package/dist/component/element/special/Switch.js +78 -8
  34. package/dist/component/element/special/index.js +16 -10
  35. package/dist/component/hook/index.js +1 -1
  36. package/dist/component/hook/usePagination.js +172 -4
  37. package/dist/component/index.js +85 -63
  38. package/dist/component/reaction/addData.js +23 -3
  39. package/dist/component/reaction/fetchData.js +12 -2
  40. package/dist/component/reaction/index.js +34 -12
  41. package/dist/component/reaction/moveData.js +34 -2
  42. package/dist/component/reaction/postMessage.js +23 -2
  43. package/dist/component/reaction/redirectNow.js +6 -2
  44. package/dist/component/reaction/removeData.js +27 -2
  45. package/dist/component/reaction/setClipboardData.js +16 -2
  46. package/dist/component/reaction/setData.js +22 -3
  47. package/dist/component/reaction/submitData.js +25 -2
  48. package/dist/component/reaction/utility/httpRequestCommon.js +3 -2
  49. package/dist/component/reaction/utility/index.js +1 -1
  50. package/dist/coreComponentsPlugin.js +5 -2
  51. package/dist/dnd-kit-sortable-tree.esm-Cz1RJyIg.js +4135 -0
  52. package/dist/engine/Actions.js +4 -7
  53. package/dist/engine/ParsingDebugDisplay/ParsingDebugDisplay.js +692 -3
  54. package/dist/engine/ReactiveJsonRoot.js +8 -6
  55. package/dist/engine/TemplateSystem.js +3 -3
  56. package/dist/engine/View.js +2 -7
  57. package/dist/engine/index.js +38 -37
  58. package/dist/engine/utility/alterData.js +7 -1
  59. package/dist/engine/utility/analyzeDataOverrideReferences.js +41 -2
  60. package/dist/engine/utility/formElementsCommon.js +34 -0
  61. package/dist/engine/utility/formatString.js +19 -3
  62. package/dist/engine/utility/index.js +12 -11
  63. package/dist/httpRequestCommon-BFntjNdS.js +1799 -0
  64. package/dist/index-BA09SSaJ.js +26 -0
  65. package/dist/index-Bzk15m61.js +19 -0
  66. package/dist/index-CACLSxWi.js +8 -0
  67. package/dist/index-NNBvIV0S.js +1873 -0
  68. package/dist/index-OhHUX6nj.js +460 -0
  69. package/dist/main.js +124 -102
  70. package/package.json +4 -4
  71. package/dist/HashChangeListener-D6HwdXBJ.js +0 -8526
  72. package/dist/ParsingDebugDisplay-8f4yL4Jw.js +0 -696
  73. package/dist/VariablesDebug-pv5GGWel.js +0 -9262
  74. package/dist/component/action/Popover.js +0 -6
  75. package/dist/component/action/Tooltip.js +0 -5
  76. package/dist/component/element/form/CheckBoxField.js +0 -8
  77. package/dist/component/element/form/DateField.js +0 -8
  78. package/dist/component/element/form/NumberField.js +0 -8
  79. package/dist/component/element/form/SelectField.js +0 -8
  80. package/dist/component/element/form/TextAreaField.js +0 -8
  81. package/dist/component/element/form/TextField.js +0 -8
  82. package/dist/component/element/form/formElementsCommon.js +0 -4
  83. package/dist/component/element/form/index.js +0 -10
  84. package/dist/component/element/html/AccordionItem.js +0 -6
  85. package/dist/component/element/html/Modal.js +0 -8
  86. package/dist/component/element/html/Tabs.js +0 -8
  87. package/dist/component/element/special/BootstrapElement.js +0 -5
  88. package/dist/engine/PaginationProvider.js +0 -30
  89. package/dist/usePagination-Bb6lefHG.js +0 -353
@@ -0,0 +1,1799 @@
1
+ import { a as it, d as at } from "./TemplateSystem-kQJEKjik.js";
2
+ import { alterData as ct } from "./engine/utility/alterData.js";
3
+ import { applyDataMapping as lt } from "./engine/utility/dataMappingSystem.js";
4
+ import "./js-yaml-Bw0KO4XO.js";
5
+ function De(e, t) {
6
+ return function() {
7
+ return e.apply(t, arguments);
8
+ };
9
+ }
10
+ const { toString: ut } = Object.prototype, { getPrototypeOf: pe } = Object, { iterator: Z, toStringTag: Be } = Symbol, Y = /* @__PURE__ */ ((e) => (t) => {
11
+ const n = ut.call(t);
12
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
13
+ })(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => Y(t) === e), ee = (e) => (t) => typeof t === e, { isArray: q } = Array, J = ee("undefined");
14
+ function ft(e) {
15
+ return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && x(e.constructor.isBuffer) && e.constructor.isBuffer(e);
16
+ }
17
+ const Le = P("ArrayBuffer");
18
+ function dt(e) {
19
+ let t;
20
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Le(e.buffer), t;
21
+ }
22
+ const ht = ee("string"), x = ee("function"), Ue = ee("number"), te = (e) => e !== null && typeof e == "object", pt = (e) => e === !0 || e === !1, v = (e) => {
23
+ if (Y(e) !== "object")
24
+ return !1;
25
+ const t = pe(e);
26
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Be in e) && !(Z in e);
27
+ }, mt = P("Date"), yt = P("File"), bt = P("Blob"), wt = P("FileList"), Et = (e) => te(e) && x(e.pipe), Rt = (e) => {
28
+ let t;
29
+ return e && (typeof FormData == "function" && e instanceof FormData || x(e.append) && ((t = Y(e)) === "formdata" || // detect form-data instance
30
+ t === "object" && x(e.toString) && e.toString() === "[object FormData]"));
31
+ }, gt = P("URLSearchParams"), [St, Ot, At, Tt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), xt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
32
+ function V(e, t, { allOwnKeys: n = !1 } = {}) {
33
+ if (e === null || typeof e > "u")
34
+ return;
35
+ let r, s;
36
+ if (typeof e != "object" && (e = [e]), q(e))
37
+ for (r = 0, s = e.length; r < s; r++)
38
+ t.call(null, e[r], r, e);
39
+ else {
40
+ const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
41
+ let c;
42
+ for (r = 0; r < i; r++)
43
+ c = o[r], t.call(null, e[c], c, e);
44
+ }
45
+ }
46
+ function ke(e, t) {
47
+ t = t.toLowerCase();
48
+ const n = Object.keys(e);
49
+ let r = n.length, s;
50
+ for (; r-- > 0; )
51
+ if (s = n[r], t === s.toLowerCase())
52
+ return s;
53
+ return null;
54
+ }
55
+ const L = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, je = (e) => !J(e) && e !== L;
56
+ function ce() {
57
+ const { caseless: e } = je(this) && this || {}, t = {}, n = (r, s) => {
58
+ const o = e && ke(t, s) || s;
59
+ v(t[o]) && v(r) ? t[o] = ce(t[o], r) : v(r) ? t[o] = ce({}, r) : q(r) ? t[o] = r.slice() : t[o] = r;
60
+ };
61
+ for (let r = 0, s = arguments.length; r < s; r++)
62
+ arguments[r] && V(arguments[r], n);
63
+ return t;
64
+ }
65
+ const Ct = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (s, o) => {
66
+ n && x(s) ? e[o] = De(s, n) : e[o] = s;
67
+ }, { allOwnKeys: r }), e), Nt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Pt = (e, t, n, r) => {
68
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
69
+ value: t.prototype
70
+ }), n && Object.assign(e.prototype, n);
71
+ }, Ft = (e, t, n, r) => {
72
+ let s, o, i;
73
+ const c = {};
74
+ if (t = t || {}, e == null) return t;
75
+ do {
76
+ for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
77
+ i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
78
+ e = n !== !1 && pe(e);
79
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
80
+ return t;
81
+ }, _t = (e, t, n) => {
82
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
83
+ const r = e.indexOf(t, n);
84
+ return r !== -1 && r === n;
85
+ }, Dt = (e) => {
86
+ if (!e) return null;
87
+ if (q(e)) return e;
88
+ let t = e.length;
89
+ if (!Ue(t)) return null;
90
+ const n = new Array(t);
91
+ for (; t-- > 0; )
92
+ n[t] = e[t];
93
+ return n;
94
+ }, Bt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && pe(Uint8Array)), Lt = (e, t) => {
95
+ const r = (e && e[Z]).call(e);
96
+ let s;
97
+ for (; (s = r.next()) && !s.done; ) {
98
+ const o = s.value;
99
+ t.call(e, o[0], o[1]);
100
+ }
101
+ }, Ut = (e, t) => {
102
+ let n;
103
+ const r = [];
104
+ for (; (n = e.exec(t)) !== null; )
105
+ r.push(n);
106
+ return r;
107
+ }, kt = P("HTMLFormElement"), jt = (e) => e.toLowerCase().replace(
108
+ /[-_\s]([a-z\d])(\w*)/g,
109
+ function(n, r, s) {
110
+ return r.toUpperCase() + s;
111
+ }
112
+ ), Ee = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), qt = P("RegExp"), qe = (e, t) => {
113
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
114
+ V(n, (s, o) => {
115
+ let i;
116
+ (i = t(s, o, e)) !== !1 && (r[o] = i || s);
117
+ }), Object.defineProperties(e, r);
118
+ }, It = (e) => {
119
+ qe(e, (t, n) => {
120
+ if (x(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
121
+ return !1;
122
+ const r = e[n];
123
+ if (x(r)) {
124
+ if (t.enumerable = !1, "writable" in t) {
125
+ t.writable = !1;
126
+ return;
127
+ }
128
+ t.set || (t.set = () => {
129
+ throw Error("Can not rewrite read-only method '" + n + "'");
130
+ });
131
+ }
132
+ });
133
+ }, Mt = (e, t) => {
134
+ const n = {}, r = (s) => {
135
+ s.forEach((o) => {
136
+ n[o] = !0;
137
+ });
138
+ };
139
+ return q(e) ? r(e) : r(String(e).split(t)), n;
140
+ }, Ht = () => {
141
+ }, $t = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
142
+ function zt(e) {
143
+ return !!(e && x(e.append) && e[Be] === "FormData" && e[Z]);
144
+ }
145
+ const Jt = (e) => {
146
+ const t = new Array(10), n = (r, s) => {
147
+ if (te(r)) {
148
+ if (t.indexOf(r) >= 0)
149
+ return;
150
+ if (!("toJSON" in r)) {
151
+ t[s] = r;
152
+ const o = q(r) ? [] : {};
153
+ return V(r, (i, c) => {
154
+ const f = n(i, s + 1);
155
+ !J(f) && (o[c] = f);
156
+ }), t[s] = void 0, o;
157
+ }
158
+ }
159
+ return r;
160
+ };
161
+ return n(e, 0);
162
+ }, Vt = P("AsyncFunction"), Wt = (e) => e && (te(e) || x(e)) && x(e.then) && x(e.catch), Ie = ((e, t) => e ? setImmediate : t ? ((n, r) => (L.addEventListener("message", ({ source: s, data: o }) => {
163
+ s === L && o === n && r.length && r.shift()();
164
+ }, !1), (s) => {
165
+ r.push(s), L.postMessage(n, "*");
166
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
167
+ typeof setImmediate == "function",
168
+ x(L.postMessage)
169
+ ), vt = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || Ie, Kt = (e) => e != null && x(e[Z]), a = {
170
+ isArray: q,
171
+ isArrayBuffer: Le,
172
+ isBuffer: ft,
173
+ isFormData: Rt,
174
+ isArrayBufferView: dt,
175
+ isString: ht,
176
+ isNumber: Ue,
177
+ isBoolean: pt,
178
+ isObject: te,
179
+ isPlainObject: v,
180
+ isReadableStream: St,
181
+ isRequest: Ot,
182
+ isResponse: At,
183
+ isHeaders: Tt,
184
+ isUndefined: J,
185
+ isDate: mt,
186
+ isFile: yt,
187
+ isBlob: bt,
188
+ isRegExp: qt,
189
+ isFunction: x,
190
+ isStream: Et,
191
+ isURLSearchParams: gt,
192
+ isTypedArray: Bt,
193
+ isFileList: wt,
194
+ forEach: V,
195
+ merge: ce,
196
+ extend: Ct,
197
+ trim: xt,
198
+ stripBOM: Nt,
199
+ inherits: Pt,
200
+ toFlatObject: Ft,
201
+ kindOf: Y,
202
+ kindOfTest: P,
203
+ endsWith: _t,
204
+ toArray: Dt,
205
+ forEachEntry: Lt,
206
+ matchAll: Ut,
207
+ isHTMLForm: kt,
208
+ hasOwnProperty: Ee,
209
+ hasOwnProp: Ee,
210
+ // an alias to avoid ESLint no-prototype-builtins detection
211
+ reduceDescriptors: qe,
212
+ freezeMethods: It,
213
+ toObjectSet: Mt,
214
+ toCamelCase: jt,
215
+ noop: Ht,
216
+ toFiniteNumber: $t,
217
+ findKey: ke,
218
+ global: L,
219
+ isContextDefined: je,
220
+ isSpecCompliantForm: zt,
221
+ toJSONObject: Jt,
222
+ isAsyncFn: Vt,
223
+ isThenable: Wt,
224
+ setImmediate: Ie,
225
+ asap: vt,
226
+ isIterable: Kt
227
+ };
228
+ function y(e, t, n, r, s) {
229
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
230
+ }
231
+ a.inherits(y, Error, {
232
+ toJSON: function() {
233
+ return {
234
+ // Standard
235
+ message: this.message,
236
+ name: this.name,
237
+ // Microsoft
238
+ description: this.description,
239
+ number: this.number,
240
+ // Mozilla
241
+ fileName: this.fileName,
242
+ lineNumber: this.lineNumber,
243
+ columnNumber: this.columnNumber,
244
+ stack: this.stack,
245
+ // Axios
246
+ config: a.toJSONObject(this.config),
247
+ code: this.code,
248
+ status: this.status
249
+ };
250
+ }
251
+ });
252
+ const Me = y.prototype, He = {};
253
+ [
254
+ "ERR_BAD_OPTION_VALUE",
255
+ "ERR_BAD_OPTION",
256
+ "ECONNABORTED",
257
+ "ETIMEDOUT",
258
+ "ERR_NETWORK",
259
+ "ERR_FR_TOO_MANY_REDIRECTS",
260
+ "ERR_DEPRECATED",
261
+ "ERR_BAD_RESPONSE",
262
+ "ERR_BAD_REQUEST",
263
+ "ERR_CANCELED",
264
+ "ERR_NOT_SUPPORT",
265
+ "ERR_INVALID_URL"
266
+ // eslint-disable-next-line func-names
267
+ ].forEach((e) => {
268
+ He[e] = { value: e };
269
+ });
270
+ Object.defineProperties(y, He);
271
+ Object.defineProperty(Me, "isAxiosError", { value: !0 });
272
+ y.from = (e, t, n, r, s, o) => {
273
+ const i = Object.create(Me);
274
+ return a.toFlatObject(e, i, function(f) {
275
+ return f !== Error.prototype;
276
+ }, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
277
+ };
278
+ const Xt = null;
279
+ function le(e) {
280
+ return a.isPlainObject(e) || a.isArray(e);
281
+ }
282
+ function $e(e) {
283
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
284
+ }
285
+ function Re(e, t, n) {
286
+ return e ? e.concat(t).map(function(s, o) {
287
+ return s = $e(s), !n && o ? "[" + s + "]" : s;
288
+ }).join(n ? "." : "") : t;
289
+ }
290
+ function Gt(e) {
291
+ return a.isArray(e) && !e.some(le);
292
+ }
293
+ const Qt = a.toFlatObject(a, {}, null, function(t) {
294
+ return /^is[A-Z]/.test(t);
295
+ });
296
+ function ne(e, t, n) {
297
+ if (!a.isObject(e))
298
+ throw new TypeError("target must be an object");
299
+ t = t || new FormData(), n = a.toFlatObject(n, {
300
+ metaTokens: !0,
301
+ dots: !1,
302
+ indexes: !1
303
+ }, !1, function(m, p) {
304
+ return !a.isUndefined(p[m]);
305
+ });
306
+ const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
307
+ if (!a.isFunction(s))
308
+ throw new TypeError("visitor must be a function");
309
+ function u(h) {
310
+ if (h === null) return "";
311
+ if (a.isDate(h))
312
+ return h.toISOString();
313
+ if (!f && a.isBlob(h))
314
+ throw new y("Blob is not supported. Use a Buffer instead.");
315
+ return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
316
+ }
317
+ function l(h, m, p) {
318
+ let w = h;
319
+ if (h && !p && typeof h == "object") {
320
+ if (a.endsWith(m, "{}"))
321
+ m = r ? m : m.slice(0, -2), h = JSON.stringify(h);
322
+ else if (a.isArray(h) && Gt(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (w = a.toArray(h)))
323
+ return m = $e(m), w.forEach(function(S, O) {
324
+ !(a.isUndefined(S) || S === null) && t.append(
325
+ // eslint-disable-next-line no-nested-ternary
326
+ i === !0 ? Re([m], O, o) : i === null ? m : m + "[]",
327
+ u(S)
328
+ );
329
+ }), !1;
330
+ }
331
+ return le(h) ? !0 : (t.append(Re(p, m, o), u(h)), !1);
332
+ }
333
+ const d = [], b = Object.assign(Qt, {
334
+ defaultVisitor: l,
335
+ convertValue: u,
336
+ isVisitable: le
337
+ });
338
+ function E(h, m) {
339
+ if (!a.isUndefined(h)) {
340
+ if (d.indexOf(h) !== -1)
341
+ throw Error("Circular reference detected in " + m.join("."));
342
+ d.push(h), a.forEach(h, function(w, R) {
343
+ (!(a.isUndefined(w) || w === null) && s.call(
344
+ t,
345
+ w,
346
+ a.isString(R) ? R.trim() : R,
347
+ m,
348
+ b
349
+ )) === !0 && E(w, m ? m.concat(R) : [R]);
350
+ }), d.pop();
351
+ }
352
+ }
353
+ if (!a.isObject(e))
354
+ throw new TypeError("data must be an object");
355
+ return E(e), t;
356
+ }
357
+ function ge(e) {
358
+ const t = {
359
+ "!": "%21",
360
+ "'": "%27",
361
+ "(": "%28",
362
+ ")": "%29",
363
+ "~": "%7E",
364
+ "%20": "+",
365
+ "%00": "\0"
366
+ };
367
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
368
+ return t[r];
369
+ });
370
+ }
371
+ function me(e, t) {
372
+ this._pairs = [], e && ne(e, this, t);
373
+ }
374
+ const ze = me.prototype;
375
+ ze.append = function(t, n) {
376
+ this._pairs.push([t, n]);
377
+ };
378
+ ze.toString = function(t) {
379
+ const n = t ? function(r) {
380
+ return t.call(this, r, ge);
381
+ } : ge;
382
+ return this._pairs.map(function(s) {
383
+ return n(s[0]) + "=" + n(s[1]);
384
+ }, "").join("&");
385
+ };
386
+ function Zt(e) {
387
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
388
+ }
389
+ function Je(e, t, n) {
390
+ if (!t)
391
+ return e;
392
+ const r = n && n.encode || Zt;
393
+ a.isFunction(n) && (n = {
394
+ serialize: n
395
+ });
396
+ const s = n && n.serialize;
397
+ let o;
398
+ if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new me(t, n).toString(r), o) {
399
+ const i = e.indexOf("#");
400
+ i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
401
+ }
402
+ return e;
403
+ }
404
+ class Se {
405
+ constructor() {
406
+ this.handlers = [];
407
+ }
408
+ /**
409
+ * Add a new interceptor to the stack
410
+ *
411
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
412
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
413
+ *
414
+ * @return {Number} An ID used to remove interceptor later
415
+ */
416
+ use(t, n, r) {
417
+ return this.handlers.push({
418
+ fulfilled: t,
419
+ rejected: n,
420
+ synchronous: r ? r.synchronous : !1,
421
+ runWhen: r ? r.runWhen : null
422
+ }), this.handlers.length - 1;
423
+ }
424
+ /**
425
+ * Remove an interceptor from the stack
426
+ *
427
+ * @param {Number} id The ID that was returned by `use`
428
+ *
429
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
430
+ */
431
+ eject(t) {
432
+ this.handlers[t] && (this.handlers[t] = null);
433
+ }
434
+ /**
435
+ * Clear all interceptors from the stack
436
+ *
437
+ * @returns {void}
438
+ */
439
+ clear() {
440
+ this.handlers && (this.handlers = []);
441
+ }
442
+ /**
443
+ * Iterate over all the registered interceptors
444
+ *
445
+ * This method is particularly useful for skipping over any
446
+ * interceptors that may have become `null` calling `eject`.
447
+ *
448
+ * @param {Function} fn The function to call for each interceptor
449
+ *
450
+ * @returns {void}
451
+ */
452
+ forEach(t) {
453
+ a.forEach(this.handlers, function(r) {
454
+ r !== null && t(r);
455
+ });
456
+ }
457
+ }
458
+ const Ve = {
459
+ silentJSONParsing: !0,
460
+ forcedJSONParsing: !0,
461
+ clarifyTimeoutError: !1
462
+ }, Yt = typeof URLSearchParams < "u" ? URLSearchParams : me, en = typeof FormData < "u" ? FormData : null, tn = typeof Blob < "u" ? Blob : null, nn = {
463
+ isBrowser: !0,
464
+ classes: {
465
+ URLSearchParams: Yt,
466
+ FormData: en,
467
+ Blob: tn
468
+ },
469
+ protocols: ["http", "https", "file", "blob", "url", "data"]
470
+ }, ye = typeof window < "u" && typeof document < "u", ue = typeof navigator == "object" && navigator || void 0, rn = ye && (!ue || ["ReactNative", "NativeScript", "NS"].indexOf(ue.product) < 0), sn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
471
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", on = ye && window.location.href || "http://localhost", an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
472
+ __proto__: null,
473
+ hasBrowserEnv: ye,
474
+ hasStandardBrowserEnv: rn,
475
+ hasStandardBrowserWebWorkerEnv: sn,
476
+ navigator: ue,
477
+ origin: on
478
+ }, Symbol.toStringTag, { value: "Module" })), T = {
479
+ ...an,
480
+ ...nn
481
+ };
482
+ function cn(e, t) {
483
+ return ne(e, new T.classes.URLSearchParams(), Object.assign({
484
+ visitor: function(n, r, s, o) {
485
+ return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
486
+ }
487
+ }, t));
488
+ }
489
+ function ln(e) {
490
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
491
+ }
492
+ function un(e) {
493
+ const t = {}, n = Object.keys(e);
494
+ let r;
495
+ const s = n.length;
496
+ let o;
497
+ for (r = 0; r < s; r++)
498
+ o = n[r], t[o] = e[o];
499
+ return t;
500
+ }
501
+ function We(e) {
502
+ function t(n, r, s, o) {
503
+ let i = n[o++];
504
+ if (i === "__proto__") return !0;
505
+ const c = Number.isFinite(+i), f = o >= n.length;
506
+ return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = un(s[i])), !c);
507
+ }
508
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
509
+ const n = {};
510
+ return a.forEachEntry(e, (r, s) => {
511
+ t(ln(r), s, n, 0);
512
+ }), n;
513
+ }
514
+ return null;
515
+ }
516
+ function fn(e, t, n) {
517
+ if (a.isString(e))
518
+ try {
519
+ return (t || JSON.parse)(e), a.trim(e);
520
+ } catch (r) {
521
+ if (r.name !== "SyntaxError")
522
+ throw r;
523
+ }
524
+ return (n || JSON.stringify)(e);
525
+ }
526
+ const W = {
527
+ transitional: Ve,
528
+ adapter: ["xhr", "http", "fetch"],
529
+ transformRequest: [function(t, n) {
530
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
531
+ if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
532
+ return s ? JSON.stringify(We(t)) : t;
533
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
534
+ return t;
535
+ if (a.isArrayBufferView(t))
536
+ return t.buffer;
537
+ if (a.isURLSearchParams(t))
538
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
539
+ let c;
540
+ if (o) {
541
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
542
+ return cn(t, this.formSerializer).toString();
543
+ if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
544
+ const f = this.env && this.env.FormData;
545
+ return ne(
546
+ c ? { "files[]": t } : t,
547
+ f && new f(),
548
+ this.formSerializer
549
+ );
550
+ }
551
+ }
552
+ return o || s ? (n.setContentType("application/json", !1), fn(t)) : t;
553
+ }],
554
+ transformResponse: [function(t) {
555
+ const n = this.transitional || W.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
556
+ if (a.isResponse(t) || a.isReadableStream(t))
557
+ return t;
558
+ if (t && a.isString(t) && (r && !this.responseType || s)) {
559
+ const i = !(n && n.silentJSONParsing) && s;
560
+ try {
561
+ return JSON.parse(t);
562
+ } catch (c) {
563
+ if (i)
564
+ throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
565
+ }
566
+ }
567
+ return t;
568
+ }],
569
+ /**
570
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
571
+ * timeout is not created.
572
+ */
573
+ timeout: 0,
574
+ xsrfCookieName: "XSRF-TOKEN",
575
+ xsrfHeaderName: "X-XSRF-TOKEN",
576
+ maxContentLength: -1,
577
+ maxBodyLength: -1,
578
+ env: {
579
+ FormData: T.classes.FormData,
580
+ Blob: T.classes.Blob
581
+ },
582
+ validateStatus: function(t) {
583
+ return t >= 200 && t < 300;
584
+ },
585
+ headers: {
586
+ common: {
587
+ Accept: "application/json, text/plain, */*",
588
+ "Content-Type": void 0
589
+ }
590
+ }
591
+ };
592
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
593
+ W.headers[e] = {};
594
+ });
595
+ const dn = a.toObjectSet([
596
+ "age",
597
+ "authorization",
598
+ "content-length",
599
+ "content-type",
600
+ "etag",
601
+ "expires",
602
+ "from",
603
+ "host",
604
+ "if-modified-since",
605
+ "if-unmodified-since",
606
+ "last-modified",
607
+ "location",
608
+ "max-forwards",
609
+ "proxy-authorization",
610
+ "referer",
611
+ "retry-after",
612
+ "user-agent"
613
+ ]), hn = (e) => {
614
+ const t = {};
615
+ let n, r, s;
616
+ return e && e.split(`
617
+ `).forEach(function(i) {
618
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && dn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
619
+ }), t;
620
+ }, Oe = Symbol("internals");
621
+ function z(e) {
622
+ return e && String(e).trim().toLowerCase();
623
+ }
624
+ function K(e) {
625
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(K) : String(e);
626
+ }
627
+ function pn(e) {
628
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
629
+ let r;
630
+ for (; r = n.exec(e); )
631
+ t[r[1]] = r[2];
632
+ return t;
633
+ }
634
+ const mn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
635
+ function oe(e, t, n, r, s) {
636
+ if (a.isFunction(r))
637
+ return r.call(this, t, n);
638
+ if (s && (t = n), !!a.isString(t)) {
639
+ if (a.isString(r))
640
+ return t.indexOf(r) !== -1;
641
+ if (a.isRegExp(r))
642
+ return r.test(t);
643
+ }
644
+ }
645
+ function yn(e) {
646
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
647
+ }
648
+ function bn(e, t) {
649
+ const n = a.toCamelCase(" " + t);
650
+ ["get", "set", "has"].forEach((r) => {
651
+ Object.defineProperty(e, r + n, {
652
+ value: function(s, o, i) {
653
+ return this[r].call(this, t, s, o, i);
654
+ },
655
+ configurable: !0
656
+ });
657
+ });
658
+ }
659
+ let C = class {
660
+ constructor(t) {
661
+ t && this.set(t);
662
+ }
663
+ set(t, n, r) {
664
+ const s = this;
665
+ function o(c, f, u) {
666
+ const l = z(f);
667
+ if (!l)
668
+ throw new Error("header name must be a non-empty string");
669
+ const d = a.findKey(s, l);
670
+ (!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = K(c));
671
+ }
672
+ const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
673
+ if (a.isPlainObject(t) || t instanceof this.constructor)
674
+ i(t, n);
675
+ else if (a.isString(t) && (t = t.trim()) && !mn(t))
676
+ i(hn(t), n);
677
+ else if (a.isObject(t) && a.isIterable(t)) {
678
+ let c = {}, f, u;
679
+ for (const l of t) {
680
+ if (!a.isArray(l))
681
+ throw TypeError("Object iterator must return a key-value pair");
682
+ c[u = l[0]] = (f = c[u]) ? a.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
683
+ }
684
+ i(c, n);
685
+ } else
686
+ t != null && o(n, t, r);
687
+ return this;
688
+ }
689
+ get(t, n) {
690
+ if (t = z(t), t) {
691
+ const r = a.findKey(this, t);
692
+ if (r) {
693
+ const s = this[r];
694
+ if (!n)
695
+ return s;
696
+ if (n === !0)
697
+ return pn(s);
698
+ if (a.isFunction(n))
699
+ return n.call(this, s, r);
700
+ if (a.isRegExp(n))
701
+ return n.exec(s);
702
+ throw new TypeError("parser must be boolean|regexp|function");
703
+ }
704
+ }
705
+ }
706
+ has(t, n) {
707
+ if (t = z(t), t) {
708
+ const r = a.findKey(this, t);
709
+ return !!(r && this[r] !== void 0 && (!n || oe(this, this[r], r, n)));
710
+ }
711
+ return !1;
712
+ }
713
+ delete(t, n) {
714
+ const r = this;
715
+ let s = !1;
716
+ function o(i) {
717
+ if (i = z(i), i) {
718
+ const c = a.findKey(r, i);
719
+ c && (!n || oe(r, r[c], c, n)) && (delete r[c], s = !0);
720
+ }
721
+ }
722
+ return a.isArray(t) ? t.forEach(o) : o(t), s;
723
+ }
724
+ clear(t) {
725
+ const n = Object.keys(this);
726
+ let r = n.length, s = !1;
727
+ for (; r--; ) {
728
+ const o = n[r];
729
+ (!t || oe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
730
+ }
731
+ return s;
732
+ }
733
+ normalize(t) {
734
+ const n = this, r = {};
735
+ return a.forEach(this, (s, o) => {
736
+ const i = a.findKey(r, o);
737
+ if (i) {
738
+ n[i] = K(s), delete n[o];
739
+ return;
740
+ }
741
+ const c = t ? yn(o) : String(o).trim();
742
+ c !== o && delete n[o], n[c] = K(s), r[c] = !0;
743
+ }), this;
744
+ }
745
+ concat(...t) {
746
+ return this.constructor.concat(this, ...t);
747
+ }
748
+ toJSON(t) {
749
+ const n = /* @__PURE__ */ Object.create(null);
750
+ return a.forEach(this, (r, s) => {
751
+ r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
752
+ }), n;
753
+ }
754
+ [Symbol.iterator]() {
755
+ return Object.entries(this.toJSON())[Symbol.iterator]();
756
+ }
757
+ toString() {
758
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
759
+ `);
760
+ }
761
+ getSetCookie() {
762
+ return this.get("set-cookie") || [];
763
+ }
764
+ get [Symbol.toStringTag]() {
765
+ return "AxiosHeaders";
766
+ }
767
+ static from(t) {
768
+ return t instanceof this ? t : new this(t);
769
+ }
770
+ static concat(t, ...n) {
771
+ const r = new this(t);
772
+ return n.forEach((s) => r.set(s)), r;
773
+ }
774
+ static accessor(t) {
775
+ const r = (this[Oe] = this[Oe] = {
776
+ accessors: {}
777
+ }).accessors, s = this.prototype;
778
+ function o(i) {
779
+ const c = z(i);
780
+ r[c] || (bn(s, i), r[c] = !0);
781
+ }
782
+ return a.isArray(t) ? t.forEach(o) : o(t), this;
783
+ }
784
+ };
785
+ C.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
786
+ a.reduceDescriptors(C.prototype, ({ value: e }, t) => {
787
+ let n = t[0].toUpperCase() + t.slice(1);
788
+ return {
789
+ get: () => e,
790
+ set(r) {
791
+ this[n] = r;
792
+ }
793
+ };
794
+ });
795
+ a.freezeMethods(C);
796
+ function ie(e, t) {
797
+ const n = this || W, r = t || n, s = C.from(r.headers);
798
+ let o = r.data;
799
+ return a.forEach(e, function(c) {
800
+ o = c.call(n, o, s.normalize(), t ? t.status : void 0);
801
+ }), s.normalize(), o;
802
+ }
803
+ function ve(e) {
804
+ return !!(e && e.__CANCEL__);
805
+ }
806
+ function I(e, t, n) {
807
+ y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
808
+ }
809
+ a.inherits(I, y, {
810
+ __CANCEL__: !0
811
+ });
812
+ function Ke(e, t, n) {
813
+ const r = n.config.validateStatus;
814
+ !n.status || !r || r(n.status) ? e(n) : t(new y(
815
+ "Request failed with status code " + n.status,
816
+ [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
817
+ n.config,
818
+ n.request,
819
+ n
820
+ ));
821
+ }
822
+ function wn(e) {
823
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
824
+ return t && t[1] || "";
825
+ }
826
+ function En(e, t) {
827
+ e = e || 10;
828
+ const n = new Array(e), r = new Array(e);
829
+ let s = 0, o = 0, i;
830
+ return t = t !== void 0 ? t : 1e3, function(f) {
831
+ const u = Date.now(), l = r[o];
832
+ i || (i = u), n[s] = f, r[s] = u;
833
+ let d = o, b = 0;
834
+ for (; d !== s; )
835
+ b += n[d++], d = d % e;
836
+ if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
837
+ return;
838
+ const E = l && u - l;
839
+ return E ? Math.round(b * 1e3 / E) : void 0;
840
+ };
841
+ }
842
+ function Rn(e, t) {
843
+ let n = 0, r = 1e3 / t, s, o;
844
+ const i = (u, l = Date.now()) => {
845
+ n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
846
+ };
847
+ return [(...u) => {
848
+ const l = Date.now(), d = l - n;
849
+ d >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
850
+ o = null, i(s);
851
+ }, r - d)));
852
+ }, () => s && i(s)];
853
+ }
854
+ const G = (e, t, n = 3) => {
855
+ let r = 0;
856
+ const s = En(50, 250);
857
+ return Rn((o) => {
858
+ const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
859
+ r = i;
860
+ const d = {
861
+ loaded: i,
862
+ total: c,
863
+ progress: c ? i / c : void 0,
864
+ bytes: f,
865
+ rate: u || void 0,
866
+ estimated: u && c && l ? (c - i) / u : void 0,
867
+ event: o,
868
+ lengthComputable: c != null,
869
+ [t ? "download" : "upload"]: !0
870
+ };
871
+ e(d);
872
+ }, n);
873
+ }, Ae = (e, t) => {
874
+ const n = e != null;
875
+ return [(r) => t[0]({
876
+ lengthComputable: n,
877
+ total: e,
878
+ loaded: r
879
+ }), t[1]];
880
+ }, Te = (e) => (...t) => a.asap(() => e(...t)), gn = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, T.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
881
+ new URL(T.origin),
882
+ T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
883
+ ) : () => !0, Sn = T.hasStandardBrowserEnv ? (
884
+ // Standard browser envs support document.cookie
885
+ {
886
+ write(e, t, n, r, s, o) {
887
+ const i = [e + "=" + encodeURIComponent(t)];
888
+ a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
889
+ },
890
+ read(e) {
891
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
892
+ return t ? decodeURIComponent(t[3]) : null;
893
+ },
894
+ remove(e) {
895
+ this.write(e, "", Date.now() - 864e5);
896
+ }
897
+ }
898
+ ) : (
899
+ // Non-standard browser env (web workers, react-native) lack needed support.
900
+ {
901
+ write() {
902
+ },
903
+ read() {
904
+ return null;
905
+ },
906
+ remove() {
907
+ }
908
+ }
909
+ );
910
+ function On(e) {
911
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
912
+ }
913
+ function An(e, t) {
914
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
915
+ }
916
+ function Xe(e, t, n) {
917
+ let r = !On(t);
918
+ return e && (r || n == !1) ? An(e, t) : t;
919
+ }
920
+ const xe = (e) => e instanceof C ? { ...e } : e;
921
+ function k(e, t) {
922
+ t = t || {};
923
+ const n = {};
924
+ function r(u, l, d, b) {
925
+ return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: b }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
926
+ }
927
+ function s(u, l, d, b) {
928
+ if (a.isUndefined(l)) {
929
+ if (!a.isUndefined(u))
930
+ return r(void 0, u, d, b);
931
+ } else return r(u, l, d, b);
932
+ }
933
+ function o(u, l) {
934
+ if (!a.isUndefined(l))
935
+ return r(void 0, l);
936
+ }
937
+ function i(u, l) {
938
+ if (a.isUndefined(l)) {
939
+ if (!a.isUndefined(u))
940
+ return r(void 0, u);
941
+ } else return r(void 0, l);
942
+ }
943
+ function c(u, l, d) {
944
+ if (d in t)
945
+ return r(u, l);
946
+ if (d in e)
947
+ return r(void 0, u);
948
+ }
949
+ const f = {
950
+ url: o,
951
+ method: o,
952
+ data: o,
953
+ baseURL: i,
954
+ transformRequest: i,
955
+ transformResponse: i,
956
+ paramsSerializer: i,
957
+ timeout: i,
958
+ timeoutMessage: i,
959
+ withCredentials: i,
960
+ withXSRFToken: i,
961
+ adapter: i,
962
+ responseType: i,
963
+ xsrfCookieName: i,
964
+ xsrfHeaderName: i,
965
+ onUploadProgress: i,
966
+ onDownloadProgress: i,
967
+ decompress: i,
968
+ maxContentLength: i,
969
+ maxBodyLength: i,
970
+ beforeRedirect: i,
971
+ transport: i,
972
+ httpAgent: i,
973
+ httpsAgent: i,
974
+ cancelToken: i,
975
+ socketPath: i,
976
+ responseEncoding: i,
977
+ validateStatus: c,
978
+ headers: (u, l, d) => s(xe(u), xe(l), d, !0)
979
+ };
980
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
981
+ const d = f[l] || s, b = d(e[l], t[l], l);
982
+ a.isUndefined(b) && d !== c || (n[l] = b);
983
+ }), n;
984
+ }
985
+ const Ge = (e) => {
986
+ const t = k({}, e);
987
+ let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
988
+ t.headers = i = C.from(i), t.url = Je(Xe(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
989
+ "Authorization",
990
+ "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
991
+ );
992
+ let f;
993
+ if (a.isFormData(n)) {
994
+ if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
995
+ i.setContentType(void 0);
996
+ else if ((f = i.getContentType()) !== !1) {
997
+ const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
998
+ i.setContentType([u || "multipart/form-data", ...l].join("; "));
999
+ }
1000
+ }
1001
+ if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && gn(t.url))) {
1002
+ const u = s && o && Sn.read(o);
1003
+ u && i.set(s, u);
1004
+ }
1005
+ return t;
1006
+ }, Tn = typeof XMLHttpRequest < "u", xn = Tn && function(e) {
1007
+ return new Promise(function(n, r) {
1008
+ const s = Ge(e);
1009
+ let o = s.data;
1010
+ const i = C.from(s.headers).normalize();
1011
+ let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, b, E, h;
1012
+ function m() {
1013
+ E && E(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
1014
+ }
1015
+ let p = new XMLHttpRequest();
1016
+ p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
1017
+ function w() {
1018
+ if (!p)
1019
+ return;
1020
+ const S = C.from(
1021
+ "getAllResponseHeaders" in p && p.getAllResponseHeaders()
1022
+ ), A = {
1023
+ data: !c || c === "text" || c === "json" ? p.responseText : p.response,
1024
+ status: p.status,
1025
+ statusText: p.statusText,
1026
+ headers: S,
1027
+ config: e,
1028
+ request: p
1029
+ };
1030
+ Ke(function(F) {
1031
+ n(F), m();
1032
+ }, function(F) {
1033
+ r(F), m();
1034
+ }, A), p = null;
1035
+ }
1036
+ "onloadend" in p ? p.onloadend = w : p.onreadystatechange = function() {
1037
+ !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(w);
1038
+ }, p.onabort = function() {
1039
+ p && (r(new y("Request aborted", y.ECONNABORTED, e, p)), p = null);
1040
+ }, p.onerror = function() {
1041
+ r(new y("Network Error", y.ERR_NETWORK, e, p)), p = null;
1042
+ }, p.ontimeout = function() {
1043
+ let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1044
+ const A = s.transitional || Ve;
1045
+ s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new y(
1046
+ O,
1047
+ A.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1048
+ e,
1049
+ p
1050
+ )), p = null;
1051
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(O, A) {
1052
+ p.setRequestHeader(A, O);
1053
+ }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([b, h] = G(u, !0), p.addEventListener("progress", b)), f && p.upload && ([d, E] = G(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (S) => {
1054
+ p && (r(!S || S.type ? new I(null, e, p) : S), p.abort(), p = null);
1055
+ }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
1056
+ const R = wn(s.url);
1057
+ if (R && T.protocols.indexOf(R) === -1) {
1058
+ r(new y("Unsupported protocol " + R + ":", y.ERR_BAD_REQUEST, e));
1059
+ return;
1060
+ }
1061
+ p.send(o || null);
1062
+ });
1063
+ }, Cn = (e, t) => {
1064
+ const { length: n } = e = e ? e.filter(Boolean) : [];
1065
+ if (t || n) {
1066
+ let r = new AbortController(), s;
1067
+ const o = function(u) {
1068
+ if (!s) {
1069
+ s = !0, c();
1070
+ const l = u instanceof Error ? u : this.reason;
1071
+ r.abort(l instanceof y ? l : new I(l instanceof Error ? l.message : l));
1072
+ }
1073
+ };
1074
+ let i = t && setTimeout(() => {
1075
+ i = null, o(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
1076
+ }, t);
1077
+ const c = () => {
1078
+ e && (i && clearTimeout(i), i = null, e.forEach((u) => {
1079
+ u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
1080
+ }), e = null);
1081
+ };
1082
+ e.forEach((u) => u.addEventListener("abort", o));
1083
+ const { signal: f } = r;
1084
+ return f.unsubscribe = () => a.asap(c), f;
1085
+ }
1086
+ }, Nn = function* (e, t) {
1087
+ let n = e.byteLength;
1088
+ if (n < t) {
1089
+ yield e;
1090
+ return;
1091
+ }
1092
+ let r = 0, s;
1093
+ for (; r < n; )
1094
+ s = r + t, yield e.slice(r, s), r = s;
1095
+ }, Pn = async function* (e, t) {
1096
+ for await (const n of Fn(e))
1097
+ yield* Nn(n, t);
1098
+ }, Fn = async function* (e) {
1099
+ if (e[Symbol.asyncIterator]) {
1100
+ yield* e;
1101
+ return;
1102
+ }
1103
+ const t = e.getReader();
1104
+ try {
1105
+ for (; ; ) {
1106
+ const { done: n, value: r } = await t.read();
1107
+ if (n)
1108
+ break;
1109
+ yield r;
1110
+ }
1111
+ } finally {
1112
+ await t.cancel();
1113
+ }
1114
+ }, Ce = (e, t, n, r) => {
1115
+ const s = Pn(e, t);
1116
+ let o = 0, i, c = (f) => {
1117
+ i || (i = !0, r && r(f));
1118
+ };
1119
+ return new ReadableStream({
1120
+ async pull(f) {
1121
+ try {
1122
+ const { done: u, value: l } = await s.next();
1123
+ if (u) {
1124
+ c(), f.close();
1125
+ return;
1126
+ }
1127
+ let d = l.byteLength;
1128
+ if (n) {
1129
+ let b = o += d;
1130
+ n(b);
1131
+ }
1132
+ f.enqueue(new Uint8Array(l));
1133
+ } catch (u) {
1134
+ throw c(u), u;
1135
+ }
1136
+ },
1137
+ cancel(f) {
1138
+ return c(f), s.return();
1139
+ }
1140
+ }, {
1141
+ highWaterMark: 2
1142
+ });
1143
+ }, re = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Qe = re && typeof ReadableStream == "function", _n = re && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ze = (e, ...t) => {
1144
+ try {
1145
+ return !!e(...t);
1146
+ } catch {
1147
+ return !1;
1148
+ }
1149
+ }, Dn = Qe && Ze(() => {
1150
+ let e = !1;
1151
+ const t = new Request(T.origin, {
1152
+ body: new ReadableStream(),
1153
+ method: "POST",
1154
+ get duplex() {
1155
+ return e = !0, "half";
1156
+ }
1157
+ }).headers.has("Content-Type");
1158
+ return e && !t;
1159
+ }), Ne = 64 * 1024, fe = Qe && Ze(() => a.isReadableStream(new Response("").body)), Q = {
1160
+ stream: fe && ((e) => e.body)
1161
+ };
1162
+ re && ((e) => {
1163
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1164
+ !Q[t] && (Q[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1165
+ throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
1166
+ });
1167
+ });
1168
+ })(new Response());
1169
+ const Bn = async (e) => {
1170
+ if (e == null)
1171
+ return 0;
1172
+ if (a.isBlob(e))
1173
+ return e.size;
1174
+ if (a.isSpecCompliantForm(e))
1175
+ return (await new Request(T.origin, {
1176
+ method: "POST",
1177
+ body: e
1178
+ }).arrayBuffer()).byteLength;
1179
+ if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
1180
+ return e.byteLength;
1181
+ if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
1182
+ return (await _n(e)).byteLength;
1183
+ }, Ln = async (e, t) => {
1184
+ const n = a.toFiniteNumber(e.getContentLength());
1185
+ return n ?? Bn(t);
1186
+ }, Un = re && (async (e) => {
1187
+ let {
1188
+ url: t,
1189
+ method: n,
1190
+ data: r,
1191
+ signal: s,
1192
+ cancelToken: o,
1193
+ timeout: i,
1194
+ onDownloadProgress: c,
1195
+ onUploadProgress: f,
1196
+ responseType: u,
1197
+ headers: l,
1198
+ withCredentials: d = "same-origin",
1199
+ fetchOptions: b
1200
+ } = Ge(e);
1201
+ u = u ? (u + "").toLowerCase() : "text";
1202
+ let E = Cn([s, o && o.toAbortSignal()], i), h;
1203
+ const m = E && E.unsubscribe && (() => {
1204
+ E.unsubscribe();
1205
+ });
1206
+ let p;
1207
+ try {
1208
+ if (f && Dn && n !== "get" && n !== "head" && (p = await Ln(l, r)) !== 0) {
1209
+ let A = new Request(t, {
1210
+ method: "POST",
1211
+ body: r,
1212
+ duplex: "half"
1213
+ }), N;
1214
+ if (a.isFormData(r) && (N = A.headers.get("content-type")) && l.setContentType(N), A.body) {
1215
+ const [F, B] = Ae(
1216
+ p,
1217
+ G(Te(f))
1218
+ );
1219
+ r = Ce(A.body, Ne, F, B);
1220
+ }
1221
+ }
1222
+ a.isString(d) || (d = d ? "include" : "omit");
1223
+ const w = "credentials" in Request.prototype;
1224
+ h = new Request(t, {
1225
+ ...b,
1226
+ signal: E,
1227
+ method: n.toUpperCase(),
1228
+ headers: l.normalize().toJSON(),
1229
+ body: r,
1230
+ duplex: "half",
1231
+ credentials: w ? d : void 0
1232
+ });
1233
+ let R = await fetch(h);
1234
+ const S = fe && (u === "stream" || u === "response");
1235
+ if (fe && (c || S && m)) {
1236
+ const A = {};
1237
+ ["status", "statusText", "headers"].forEach((M) => {
1238
+ A[M] = R[M];
1239
+ });
1240
+ const N = a.toFiniteNumber(R.headers.get("content-length")), [F, B] = c && Ae(
1241
+ N,
1242
+ G(Te(c), !0)
1243
+ ) || [];
1244
+ R = new Response(
1245
+ Ce(R.body, Ne, F, () => {
1246
+ B && B(), m && m();
1247
+ }),
1248
+ A
1249
+ );
1250
+ }
1251
+ u = u || "text";
1252
+ let O = await Q[a.findKey(Q, u) || "text"](R, e);
1253
+ return !S && m && m(), await new Promise((A, N) => {
1254
+ Ke(A, N, {
1255
+ data: O,
1256
+ headers: C.from(R.headers),
1257
+ status: R.status,
1258
+ statusText: R.statusText,
1259
+ config: e,
1260
+ request: h
1261
+ });
1262
+ });
1263
+ } catch (w) {
1264
+ throw m && m(), w && w.name === "TypeError" && /Load failed|fetch/i.test(w.message) ? Object.assign(
1265
+ new y("Network Error", y.ERR_NETWORK, e, h),
1266
+ {
1267
+ cause: w.cause || w
1268
+ }
1269
+ ) : y.from(w, w && w.code, e, h);
1270
+ }
1271
+ }), de = {
1272
+ http: Xt,
1273
+ xhr: xn,
1274
+ fetch: Un
1275
+ };
1276
+ a.forEach(de, (e, t) => {
1277
+ if (e) {
1278
+ try {
1279
+ Object.defineProperty(e, "name", { value: t });
1280
+ } catch {
1281
+ }
1282
+ Object.defineProperty(e, "adapterName", { value: t });
1283
+ }
1284
+ });
1285
+ const Pe = (e) => `- ${e}`, kn = (e) => a.isFunction(e) || e === null || e === !1, Ye = {
1286
+ getAdapter: (e) => {
1287
+ e = a.isArray(e) ? e : [e];
1288
+ const { length: t } = e;
1289
+ let n, r;
1290
+ const s = {};
1291
+ for (let o = 0; o < t; o++) {
1292
+ n = e[o];
1293
+ let i;
1294
+ if (r = n, !kn(n) && (r = de[(i = String(n)).toLowerCase()], r === void 0))
1295
+ throw new y(`Unknown adapter '${i}'`);
1296
+ if (r)
1297
+ break;
1298
+ s[i || "#" + o] = r;
1299
+ }
1300
+ if (!r) {
1301
+ const o = Object.entries(s).map(
1302
+ ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1303
+ );
1304
+ let i = t ? o.length > 1 ? `since :
1305
+ ` + o.map(Pe).join(`
1306
+ `) : " " + Pe(o[0]) : "as no adapter specified";
1307
+ throw new y(
1308
+ "There is no suitable adapter to dispatch the request " + i,
1309
+ "ERR_NOT_SUPPORT"
1310
+ );
1311
+ }
1312
+ return r;
1313
+ },
1314
+ adapters: de
1315
+ };
1316
+ function ae(e) {
1317
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1318
+ throw new I(null, e);
1319
+ }
1320
+ function Fe(e) {
1321
+ return ae(e), e.headers = C.from(e.headers), e.data = ie.call(
1322
+ e,
1323
+ e.transformRequest
1324
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ye.getAdapter(e.adapter || W.adapter)(e).then(function(r) {
1325
+ return ae(e), r.data = ie.call(
1326
+ e,
1327
+ e.transformResponse,
1328
+ r
1329
+ ), r.headers = C.from(r.headers), r;
1330
+ }, function(r) {
1331
+ return ve(r) || (ae(e), r && r.response && (r.response.data = ie.call(
1332
+ e,
1333
+ e.transformResponse,
1334
+ r.response
1335
+ ), r.response.headers = C.from(r.response.headers))), Promise.reject(r);
1336
+ });
1337
+ }
1338
+ const et = "1.9.0", se = {};
1339
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1340
+ se[e] = function(r) {
1341
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1342
+ };
1343
+ });
1344
+ const _e = {};
1345
+ se.transitional = function(t, n, r) {
1346
+ function s(o, i) {
1347
+ return "[Axios v" + et + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1348
+ }
1349
+ return (o, i, c) => {
1350
+ if (t === !1)
1351
+ throw new y(
1352
+ s(i, " has been removed" + (n ? " in " + n : "")),
1353
+ y.ERR_DEPRECATED
1354
+ );
1355
+ return n && !_e[i] && (_e[i] = !0, console.warn(
1356
+ s(
1357
+ i,
1358
+ " has been deprecated since v" + n + " and will be removed in the near future"
1359
+ )
1360
+ )), t ? t(o, i, c) : !0;
1361
+ };
1362
+ };
1363
+ se.spelling = function(t) {
1364
+ return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1365
+ };
1366
+ function jn(e, t, n) {
1367
+ if (typeof e != "object")
1368
+ throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1369
+ const r = Object.keys(e);
1370
+ let s = r.length;
1371
+ for (; s-- > 0; ) {
1372
+ const o = r[s], i = t[o];
1373
+ if (i) {
1374
+ const c = e[o], f = c === void 0 || i(c, o, e);
1375
+ if (f !== !0)
1376
+ throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
1377
+ continue;
1378
+ }
1379
+ if (n !== !0)
1380
+ throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
1381
+ }
1382
+ }
1383
+ const X = {
1384
+ assertOptions: jn,
1385
+ validators: se
1386
+ }, _ = X.validators;
1387
+ let U = class {
1388
+ constructor(t) {
1389
+ this.defaults = t || {}, this.interceptors = {
1390
+ request: new Se(),
1391
+ response: new Se()
1392
+ };
1393
+ }
1394
+ /**
1395
+ * Dispatch a request
1396
+ *
1397
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1398
+ * @param {?Object} config
1399
+ *
1400
+ * @returns {Promise} The Promise to be fulfilled
1401
+ */
1402
+ async request(t, n) {
1403
+ try {
1404
+ return await this._request(t, n);
1405
+ } catch (r) {
1406
+ if (r instanceof Error) {
1407
+ let s = {};
1408
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1409
+ const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1410
+ try {
1411
+ r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1412
+ ` + o) : r.stack = o;
1413
+ } catch {
1414
+ }
1415
+ }
1416
+ throw r;
1417
+ }
1418
+ }
1419
+ _request(t, n) {
1420
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = k(this.defaults, n);
1421
+ const { transitional: r, paramsSerializer: s, headers: o } = n;
1422
+ r !== void 0 && X.assertOptions(r, {
1423
+ silentJSONParsing: _.transitional(_.boolean),
1424
+ forcedJSONParsing: _.transitional(_.boolean),
1425
+ clarifyTimeoutError: _.transitional(_.boolean)
1426
+ }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1427
+ serialize: s
1428
+ } : X.assertOptions(s, {
1429
+ encode: _.function,
1430
+ serialize: _.function
1431
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), X.assertOptions(n, {
1432
+ baseUrl: _.spelling("baseURL"),
1433
+ withXsrfToken: _.spelling("withXSRFToken")
1434
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1435
+ let i = o && a.merge(
1436
+ o.common,
1437
+ o[n.method]
1438
+ );
1439
+ o && a.forEach(
1440
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1441
+ (h) => {
1442
+ delete o[h];
1443
+ }
1444
+ ), n.headers = C.concat(i, o);
1445
+ const c = [];
1446
+ let f = !0;
1447
+ this.interceptors.request.forEach(function(m) {
1448
+ typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
1449
+ });
1450
+ const u = [];
1451
+ this.interceptors.response.forEach(function(m) {
1452
+ u.push(m.fulfilled, m.rejected);
1453
+ });
1454
+ let l, d = 0, b;
1455
+ if (!f) {
1456
+ const h = [Fe.bind(this), void 0];
1457
+ for (h.unshift.apply(h, c), h.push.apply(h, u), b = h.length, l = Promise.resolve(n); d < b; )
1458
+ l = l.then(h[d++], h[d++]);
1459
+ return l;
1460
+ }
1461
+ b = c.length;
1462
+ let E = n;
1463
+ for (d = 0; d < b; ) {
1464
+ const h = c[d++], m = c[d++];
1465
+ try {
1466
+ E = h(E);
1467
+ } catch (p) {
1468
+ m.call(this, p);
1469
+ break;
1470
+ }
1471
+ }
1472
+ try {
1473
+ l = Fe.call(this, E);
1474
+ } catch (h) {
1475
+ return Promise.reject(h);
1476
+ }
1477
+ for (d = 0, b = u.length; d < b; )
1478
+ l = l.then(u[d++], u[d++]);
1479
+ return l;
1480
+ }
1481
+ getUri(t) {
1482
+ t = k(this.defaults, t);
1483
+ const n = Xe(t.baseURL, t.url, t.allowAbsoluteUrls);
1484
+ return Je(n, t.params, t.paramsSerializer);
1485
+ }
1486
+ };
1487
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1488
+ U.prototype[t] = function(n, r) {
1489
+ return this.request(k(r || {}, {
1490
+ method: t,
1491
+ url: n,
1492
+ data: (r || {}).data
1493
+ }));
1494
+ };
1495
+ });
1496
+ a.forEach(["post", "put", "patch"], function(t) {
1497
+ function n(r) {
1498
+ return function(o, i, c) {
1499
+ return this.request(k(c || {}, {
1500
+ method: t,
1501
+ headers: r ? {
1502
+ "Content-Type": "multipart/form-data"
1503
+ } : {},
1504
+ url: o,
1505
+ data: i
1506
+ }));
1507
+ };
1508
+ }
1509
+ U.prototype[t] = n(), U.prototype[t + "Form"] = n(!0);
1510
+ });
1511
+ let qn = class tt {
1512
+ constructor(t) {
1513
+ if (typeof t != "function")
1514
+ throw new TypeError("executor must be a function.");
1515
+ let n;
1516
+ this.promise = new Promise(function(o) {
1517
+ n = o;
1518
+ });
1519
+ const r = this;
1520
+ this.promise.then((s) => {
1521
+ if (!r._listeners) return;
1522
+ let o = r._listeners.length;
1523
+ for (; o-- > 0; )
1524
+ r._listeners[o](s);
1525
+ r._listeners = null;
1526
+ }), this.promise.then = (s) => {
1527
+ let o;
1528
+ const i = new Promise((c) => {
1529
+ r.subscribe(c), o = c;
1530
+ }).then(s);
1531
+ return i.cancel = function() {
1532
+ r.unsubscribe(o);
1533
+ }, i;
1534
+ }, t(function(o, i, c) {
1535
+ r.reason || (r.reason = new I(o, i, c), n(r.reason));
1536
+ });
1537
+ }
1538
+ /**
1539
+ * Throws a `CanceledError` if cancellation has been requested.
1540
+ */
1541
+ throwIfRequested() {
1542
+ if (this.reason)
1543
+ throw this.reason;
1544
+ }
1545
+ /**
1546
+ * Subscribe to the cancel signal
1547
+ */
1548
+ subscribe(t) {
1549
+ if (this.reason) {
1550
+ t(this.reason);
1551
+ return;
1552
+ }
1553
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1554
+ }
1555
+ /**
1556
+ * Unsubscribe from the cancel signal
1557
+ */
1558
+ unsubscribe(t) {
1559
+ if (!this._listeners)
1560
+ return;
1561
+ const n = this._listeners.indexOf(t);
1562
+ n !== -1 && this._listeners.splice(n, 1);
1563
+ }
1564
+ toAbortSignal() {
1565
+ const t = new AbortController(), n = (r) => {
1566
+ t.abort(r);
1567
+ };
1568
+ return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
1569
+ }
1570
+ /**
1571
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1572
+ * cancels the `CancelToken`.
1573
+ */
1574
+ static source() {
1575
+ let t;
1576
+ return {
1577
+ token: new tt(function(s) {
1578
+ t = s;
1579
+ }),
1580
+ cancel: t
1581
+ };
1582
+ }
1583
+ };
1584
+ function In(e) {
1585
+ return function(n) {
1586
+ return e.apply(null, n);
1587
+ };
1588
+ }
1589
+ function Mn(e) {
1590
+ return a.isObject(e) && e.isAxiosError === !0;
1591
+ }
1592
+ const he = {
1593
+ Continue: 100,
1594
+ SwitchingProtocols: 101,
1595
+ Processing: 102,
1596
+ EarlyHints: 103,
1597
+ Ok: 200,
1598
+ Created: 201,
1599
+ Accepted: 202,
1600
+ NonAuthoritativeInformation: 203,
1601
+ NoContent: 204,
1602
+ ResetContent: 205,
1603
+ PartialContent: 206,
1604
+ MultiStatus: 207,
1605
+ AlreadyReported: 208,
1606
+ ImUsed: 226,
1607
+ MultipleChoices: 300,
1608
+ MovedPermanently: 301,
1609
+ Found: 302,
1610
+ SeeOther: 303,
1611
+ NotModified: 304,
1612
+ UseProxy: 305,
1613
+ Unused: 306,
1614
+ TemporaryRedirect: 307,
1615
+ PermanentRedirect: 308,
1616
+ BadRequest: 400,
1617
+ Unauthorized: 401,
1618
+ PaymentRequired: 402,
1619
+ Forbidden: 403,
1620
+ NotFound: 404,
1621
+ MethodNotAllowed: 405,
1622
+ NotAcceptable: 406,
1623
+ ProxyAuthenticationRequired: 407,
1624
+ RequestTimeout: 408,
1625
+ Conflict: 409,
1626
+ Gone: 410,
1627
+ LengthRequired: 411,
1628
+ PreconditionFailed: 412,
1629
+ PayloadTooLarge: 413,
1630
+ UriTooLong: 414,
1631
+ UnsupportedMediaType: 415,
1632
+ RangeNotSatisfiable: 416,
1633
+ ExpectationFailed: 417,
1634
+ ImATeapot: 418,
1635
+ MisdirectedRequest: 421,
1636
+ UnprocessableEntity: 422,
1637
+ Locked: 423,
1638
+ FailedDependency: 424,
1639
+ TooEarly: 425,
1640
+ UpgradeRequired: 426,
1641
+ PreconditionRequired: 428,
1642
+ TooManyRequests: 429,
1643
+ RequestHeaderFieldsTooLarge: 431,
1644
+ UnavailableForLegalReasons: 451,
1645
+ InternalServerError: 500,
1646
+ NotImplemented: 501,
1647
+ BadGateway: 502,
1648
+ ServiceUnavailable: 503,
1649
+ GatewayTimeout: 504,
1650
+ HttpVersionNotSupported: 505,
1651
+ VariantAlsoNegotiates: 506,
1652
+ InsufficientStorage: 507,
1653
+ LoopDetected: 508,
1654
+ NotExtended: 510,
1655
+ NetworkAuthenticationRequired: 511
1656
+ };
1657
+ Object.entries(he).forEach(([e, t]) => {
1658
+ he[t] = e;
1659
+ });
1660
+ function nt(e) {
1661
+ const t = new U(e), n = De(U.prototype.request, t);
1662
+ return a.extend(n, U.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1663
+ return nt(k(e, s));
1664
+ }, n;
1665
+ }
1666
+ const g = nt(W);
1667
+ g.Axios = U;
1668
+ g.CanceledError = I;
1669
+ g.CancelToken = qn;
1670
+ g.isCancel = ve;
1671
+ g.VERSION = et;
1672
+ g.toFormData = ne;
1673
+ g.AxiosError = y;
1674
+ g.Cancel = g.CanceledError;
1675
+ g.all = function(t) {
1676
+ return Promise.all(t);
1677
+ };
1678
+ g.spread = In;
1679
+ g.isAxiosError = Mn;
1680
+ g.mergeConfig = k;
1681
+ g.AxiosHeaders = C;
1682
+ g.formToJSON = (e) => We(a.isHTMLForm(e) ? new FormData(e) : e);
1683
+ g.getAdapter = Ye.getAdapter;
1684
+ g.HttpStatusCode = he;
1685
+ g.default = g;
1686
+ const {
1687
+ Axios: vn,
1688
+ AxiosError: Kn,
1689
+ CanceledError: Xn,
1690
+ isCancel: Gn,
1691
+ CancelToken: Qn,
1692
+ VERSION: Zn,
1693
+ all: Yn,
1694
+ Cancel: er,
1695
+ isAxiosError: tr,
1696
+ spread: nr,
1697
+ toFormData: rr,
1698
+ AxiosHeaders: sr,
1699
+ HttpStatusCode: or,
1700
+ formToJSON: ir,
1701
+ getAdapter: ar,
1702
+ mergeConfig: cr
1703
+ } = g, lr = (e, t, n = "httpRequest") => {
1704
+ var N, F, B, M, be, we;
1705
+ const r = e == null ? void 0 : e.event, s = document.body;
1706
+ if (s.dataset.htmlBuilderIsSubmitting === "true")
1707
+ return;
1708
+ s.dataset.htmlBuilderIsSubmitting = "true";
1709
+ const o = typeof t.submitSilently == "boolean";
1710
+ o && (t.submitSilently ? s.dataset.htmlBuilderIsSubmittingSilently = "true" : delete s.dataset.htmlBuilderIsSubmittingSilently);
1711
+ const i = (D, j) => {
1712
+ delete D.dataset.htmlBuilderIsSubmitting, o && delete D.dataset.htmlBuilderIsSubmittingSilently, j != null && j.dataset && delete j.dataset.isSubmitting;
1713
+ }, c = r == null ? void 0 : r.currentTarget;
1714
+ c != null && c.dataset && (c.dataset.isSubmitting = "true");
1715
+ const { globalDataContext: f, templateContext: u } = e, l = f.getRootContext ? f.getRootContext() : f, d = (N = e == null ? void 0 : e.args) == null ? void 0 : N.dataMapping, b = ((F = e == null ? void 0 : e.args) == null ? void 0 : F.refreshAppOnResponse) ?? !0, E = ((B = e == null ? void 0 : e.args) == null ? void 0 : B.updateOnlyData) ?? !1, h = (M = e == null ? void 0 : e.args) == null ? void 0 : M.updateDataAtLocation, m = it({
1716
+ valueToEvaluate: (be = e == null ? void 0 : e.args) == null ? void 0 : be.url,
1717
+ globalDataContext: l,
1718
+ templateContext: u
1719
+ });
1720
+ if (!m) {
1721
+ i(s, c);
1722
+ return;
1723
+ }
1724
+ const p = l.headersForRjBuild ?? {}, { setData: w, setRawAppRjBuild: R, updateData: S } = l, O = {
1725
+ method: t.method,
1726
+ url: m,
1727
+ ...t.data ? { data: t.data } : {}
1728
+ };
1729
+ Object.keys(p).length > 0 && (O.headers = p);
1730
+ const A = ((we = l.plugins) == null ? void 0 : we.dataProcessor) || {};
1731
+ g(O).then((D) => {
1732
+ if (b) {
1733
+ const j = {
1734
+ url: O.url,
1735
+ method: O.method,
1736
+ headers: O.headers || {},
1737
+ body: O.data
1738
+ }, rt = {
1739
+ headers: D.headers || {},
1740
+ status: D.status,
1741
+ data: D.data
1742
+ }, st = E === !1, H = ct({
1743
+ requestContext: j,
1744
+ responseContext: rt,
1745
+ responseBody: D.data,
1746
+ isRjBuild: st,
1747
+ dataProcessors: A
1748
+ });
1749
+ if (E) {
1750
+ if (d)
1751
+ try {
1752
+ lt({
1753
+ dataMapping: d,
1754
+ responseData: H,
1755
+ globalDataContext: l,
1756
+ templateContext: u
1757
+ });
1758
+ return;
1759
+ } catch (ot) {
1760
+ console.error(`reactionFunction:${n} : Error applying dataMapping:`, ot);
1761
+ return;
1762
+ }
1763
+ if (!h) {
1764
+ w(H);
1765
+ return;
1766
+ }
1767
+ const $ = at({
1768
+ dataLocation: h,
1769
+ currentPath: "data",
1770
+ globalDataContext: l,
1771
+ templateContext: u
1772
+ });
1773
+ if (typeof $ != "string" || !$.startsWith("data")) {
1774
+ console.warn(
1775
+ `reactionFunction:${n} : updateDataAtLocation evaluation did not result in a valid locationstring:`,
1776
+ h,
1777
+ "->",
1778
+ $
1779
+ );
1780
+ return;
1781
+ }
1782
+ if ($ === "data") {
1783
+ w(H);
1784
+ return;
1785
+ }
1786
+ S(H, $);
1787
+ } else
1788
+ R(H);
1789
+ }
1790
+ }).catch((D) => {
1791
+ console.log(`reactionFunction:${n} : Could not execute request. Reason: ${D.message}`);
1792
+ }).finally(() => {
1793
+ i(s, c);
1794
+ });
1795
+ };
1796
+ export {
1797
+ g as a,
1798
+ lr as e
1799
+ };