@tracktor/shared-module 2.12.3 → 2.13.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/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
- import qt, { createContext as Ur, useMemo as Ge, useContext as z, useState as Mt, useRef as Br, useEffect as X, Suspense as $r, useCallback as be } from "react";
2
- var Me = { exports: {} }, ie = {};
1
+ import We, { createContext as gt, useMemo as fe, useContext as F, useState as Ue, useRef as ht, useEffect as V, Suspense as yt, useCallback as te } from "react";
2
+ var le = { exports: {} }, J = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
@@ -9,21 +9,21 @@ var Me = { exports: {} }, ie = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var Tt;
13
- function qr() {
14
- if (Tt) return ie;
15
- Tt = 1;
16
- var e = qt, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function i(c, f, d) {
18
- var u, y = {}, R = null, p = null;
19
- d !== void 0 && (R = "" + d), f.key !== void 0 && (R = "" + f.key), f.ref !== void 0 && (p = f.ref);
20
- for (u in f) n.call(f, u) && !s.hasOwnProperty(u) && (y[u] = f[u]);
21
- if (c && c.defaultProps) for (u in f = c.defaultProps, f) y[u] === void 0 && (y[u] = f[u]);
22
- return { $$typeof: t, type: c, key: R, ref: p, props: y, _owner: o.current };
12
+ var $e;
13
+ function mt() {
14
+ if ($e) return J;
15
+ $e = 1;
16
+ var t = We, n = Symbol.for("react.element"), o = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function l(d, u, h) {
18
+ var g, p = {}, P = null, s = null;
19
+ h !== void 0 && (P = "" + h), u.key !== void 0 && (P = "" + u.key), u.ref !== void 0 && (s = u.ref);
20
+ for (g in u) i.call(u, g) && !f.hasOwnProperty(g) && (p[g] = u[g]);
21
+ if (d && d.defaultProps) for (g in u = d.defaultProps, u) p[g] === void 0 && (p[g] = u[g]);
22
+ return { $$typeof: n, type: d, key: P, ref: s, props: p, _owner: a.current };
23
23
  }
24
- return ie.Fragment = r, ie.jsx = i, ie.jsxs = i, ie;
24
+ return J.Fragment = o, J.jsx = l, J.jsxs = l, J;
25
25
  }
26
- var ae = {};
26
+ var q = {};
27
27
  /**
28
28
  * @license React
29
29
  * react-jsx-runtime.development.js
@@ -33,91 +33,91 @@ var ae = {};
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
35
  */
36
- var _t;
37
- function Mr() {
38
- return _t || (_t = 1, process.env.NODE_ENV !== "production" && function() {
39
- var e = qt, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), m = Symbol.iterator, E = "@@iterator";
40
- function O(a) {
41
- if (a === null || typeof a != "object")
36
+ var Ne;
37
+ function Et() {
38
+ return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() {
39
+ var t = We, n = Symbol.for("react.element"), o = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), d = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), s = Symbol.for("react.offscreen"), C = Symbol.iterator, R = "@@iterator";
40
+ function b(e) {
41
+ if (e === null || typeof e != "object")
42
42
  return null;
43
- var h = m && a[m] || a[E];
44
- return typeof h == "function" ? h : null;
43
+ var r = C && e[C] || e[R];
44
+ return typeof r == "function" ? r : null;
45
45
  }
46
- var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function S(a) {
46
+ var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
+ function _(e) {
48
48
  {
49
- for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0), b = 1; b < h; b++)
50
- g[b - 1] = arguments[b];
51
- T("error", a, g);
49
+ for (var r = arguments.length, c = new Array(r > 1 ? r - 1 : 0), v = 1; v < r; v++)
50
+ c[v - 1] = arguments[v];
51
+ x("error", e, c);
52
52
  }
53
53
  }
54
- function T(a, h, g) {
54
+ function x(e, r, c) {
55
55
  {
56
- var b = w.ReactDebugCurrentFrame, C = b.getStackAddendum();
57
- C !== "" && (h += "%s", g = g.concat([C]));
58
- var P = g.map(function(A) {
59
- return String(A);
56
+ var v = y.ReactDebugCurrentFrame, w = v.getStackAddendum();
57
+ w !== "" && (r += "%s", c = c.concat([w]));
58
+ var S = c.map(function(E) {
59
+ return String(E);
60
60
  });
61
- P.unshift("Warning: " + h), Function.prototype.apply.call(console[a], console, P);
61
+ S.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, S);
62
62
  }
63
63
  }
64
- var L = !1, U = !1, D = !1, x = !1, ne = !1, Pe;
65
- Pe = Symbol.for("react.module.reference");
66
- function de(a) {
67
- return !!(typeof a == "string" || typeof a == "function" || a === n || a === s || ne || a === o || a === d || a === u || x || a === p || L || U || D || typeof a == "object" && a !== null && (a.$$typeof === R || a.$$typeof === y || a.$$typeof === i || a.$$typeof === c || a.$$typeof === f || // This needs to include all possible module reference object
64
+ var L = !1, I = !1, $ = !1, O = !1, de = !1, re;
65
+ re = Symbol.for("react.module.reference");
66
+ function K(e) {
67
+ return !!(typeof e == "string" || typeof e == "function" || e === i || e === f || de || e === a || e === h || e === g || O || e === s || L || I || $ || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === p || e.$$typeof === l || e.$$typeof === d || e.$$typeof === u || // This needs to include all possible module reference object
68
68
  // types supported by any Flight configuration anywhere since
69
69
  // we don't know which Flight build this will end up being used
70
70
  // with.
71
- a.$$typeof === Pe || a.getModuleId !== void 0));
71
+ e.$$typeof === re || e.getModuleId !== void 0));
72
72
  }
73
- function dr(a, h, g) {
74
- var b = a.displayName;
75
- if (b)
76
- return b;
77
- var C = h.displayName || h.name || "";
78
- return C !== "" ? g + "(" + C + ")" : g;
73
+ function Ve(e, r, c) {
74
+ var v = e.displayName;
75
+ if (v)
76
+ return v;
77
+ var w = r.displayName || r.name || "";
78
+ return w !== "" ? c + "(" + w + ")" : c;
79
79
  }
80
- function rt(a) {
81
- return a.displayName || "Context";
80
+ function ve(e) {
81
+ return e.displayName || "Context";
82
82
  }
83
- function V(a) {
84
- if (a == null)
83
+ function W(e) {
84
+ if (e == null)
85
85
  return null;
86
- if (typeof a.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
87
- return a.displayName || a.name || null;
88
- if (typeof a == "string")
89
- return a;
90
- switch (a) {
91
- case n:
86
+ if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
87
+ return e.displayName || e.name || null;
88
+ if (typeof e == "string")
89
+ return e;
90
+ switch (e) {
91
+ case i:
92
92
  return "Fragment";
93
- case r:
93
+ case o:
94
94
  return "Portal";
95
- case s:
95
+ case f:
96
96
  return "Profiler";
97
- case o:
97
+ case a:
98
98
  return "StrictMode";
99
- case d:
99
+ case h:
100
100
  return "Suspense";
101
- case u:
101
+ case g:
102
102
  return "SuspenseList";
103
103
  }
104
- if (typeof a == "object")
105
- switch (a.$$typeof) {
106
- case c:
107
- var h = a;
108
- return rt(h) + ".Consumer";
109
- case i:
110
- var g = a;
111
- return rt(g._context) + ".Provider";
112
- case f:
113
- return dr(a, a.render, "ForwardRef");
114
- case y:
115
- var b = a.displayName || null;
116
- return b !== null ? b : V(a.type) || "Memo";
117
- case R: {
118
- var C = a, P = C._payload, A = C._init;
104
+ if (typeof e == "object")
105
+ switch (e.$$typeof) {
106
+ case d:
107
+ var r = e;
108
+ return ve(r) + ".Consumer";
109
+ case l:
110
+ var c = e;
111
+ return ve(c._context) + ".Provider";
112
+ case u:
113
+ return Ve(e, e.render, "ForwardRef");
114
+ case p:
115
+ var v = e.displayName || null;
116
+ return v !== null ? v : W(e.type) || "Memo";
117
+ case P: {
118
+ var w = e, S = w._payload, E = w._init;
119
119
  try {
120
- return V(A(P));
120
+ return W(E(S));
121
121
  } catch {
122
122
  return null;
123
123
  }
@@ -125,558 +125,554 @@ function Mr() {
125
125
  }
126
126
  return null;
127
127
  }
128
- var K = Object.assign, oe = 0, nt, ot, st, it, at, ct, ut;
129
- function lt() {
128
+ var U = Object.assign, G = 0, ge, he, ye, me, Ee, we, Re;
129
+ function pe() {
130
130
  }
131
- lt.__reactDisabledLog = !0;
132
- function hr() {
131
+ pe.__reactDisabledLog = !0;
132
+ function ze() {
133
133
  {
134
- if (oe === 0) {
135
- nt = console.log, ot = console.info, st = console.warn, it = console.error, at = console.group, ct = console.groupCollapsed, ut = console.groupEnd;
136
- var a = {
134
+ if (G === 0) {
135
+ ge = console.log, he = console.info, ye = console.warn, me = console.error, Ee = console.group, we = console.groupCollapsed, Re = console.groupEnd;
136
+ var e = {
137
137
  configurable: !0,
138
138
  enumerable: !0,
139
- value: lt,
139
+ value: pe,
140
140
  writable: !0
141
141
  };
142
142
  Object.defineProperties(console, {
143
- info: a,
144
- log: a,
145
- warn: a,
146
- error: a,
147
- group: a,
148
- groupCollapsed: a,
149
- groupEnd: a
143
+ info: e,
144
+ log: e,
145
+ warn: e,
146
+ error: e,
147
+ group: e,
148
+ groupCollapsed: e,
149
+ groupEnd: e
150
150
  });
151
151
  }
152
- oe++;
152
+ G++;
153
153
  }
154
154
  }
155
- function pr() {
155
+ function Me() {
156
156
  {
157
- if (oe--, oe === 0) {
158
- var a = {
157
+ if (G--, G === 0) {
158
+ var e = {
159
159
  configurable: !0,
160
160
  enumerable: !0,
161
161
  writable: !0
162
162
  };
163
163
  Object.defineProperties(console, {
164
- log: K({}, a, {
165
- value: nt
164
+ log: U({}, e, {
165
+ value: ge
166
166
  }),
167
- info: K({}, a, {
168
- value: ot
167
+ info: U({}, e, {
168
+ value: he
169
169
  }),
170
- warn: K({}, a, {
171
- value: st
170
+ warn: U({}, e, {
171
+ value: ye
172
172
  }),
173
- error: K({}, a, {
174
- value: it
173
+ error: U({}, e, {
174
+ value: me
175
175
  }),
176
- group: K({}, a, {
177
- value: at
176
+ group: U({}, e, {
177
+ value: Ee
178
178
  }),
179
- groupCollapsed: K({}, a, {
180
- value: ct
179
+ groupCollapsed: U({}, e, {
180
+ value: we
181
181
  }),
182
- groupEnd: K({}, a, {
183
- value: ut
182
+ groupEnd: U({}, e, {
183
+ value: Re
184
184
  })
185
185
  });
186
186
  }
187
- oe < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
187
+ G < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
188
  }
189
189
  }
190
- var xe = w.ReactCurrentDispatcher, je;
191
- function he(a, h, g) {
190
+ var ne = y.ReactCurrentDispatcher, oe;
191
+ function B(e, r, c) {
192
192
  {
193
- if (je === void 0)
193
+ if (oe === void 0)
194
194
  try {
195
195
  throw Error();
196
- } catch (C) {
197
- var b = C.stack.trim().match(/\n( *(at )?)/);
198
- je = b && b[1] || "";
196
+ } catch (w) {
197
+ var v = w.stack.trim().match(/\n( *(at )?)/);
198
+ oe = v && v[1] || "";
199
199
  }
200
200
  return `
201
- ` + je + a;
201
+ ` + oe + e;
202
202
  }
203
203
  }
204
- var Fe = !1, pe;
204
+ var ae = !1, Q;
205
205
  {
206
- var mr = typeof WeakMap == "function" ? WeakMap : Map;
207
- pe = new mr();
206
+ var Ge = typeof WeakMap == "function" ? WeakMap : Map;
207
+ Q = new Ge();
208
208
  }
209
- function ft(a, h) {
210
- if (!a || Fe)
209
+ function _e(e, r) {
210
+ if (!e || ae)
211
211
  return "";
212
212
  {
213
- var g = pe.get(a);
214
- if (g !== void 0)
215
- return g;
213
+ var c = Q.get(e);
214
+ if (c !== void 0)
215
+ return c;
216
216
  }
217
- var b;
218
- Fe = !0;
219
- var C = Error.prepareStackTrace;
217
+ var v;
218
+ ae = !0;
219
+ var w = Error.prepareStackTrace;
220
220
  Error.prepareStackTrace = void 0;
221
- var P;
222
- P = xe.current, xe.current = null, hr();
221
+ var S;
222
+ S = ne.current, ne.current = null, ze();
223
223
  try {
224
- if (h) {
225
- var A = function() {
224
+ if (r) {
225
+ var E = function() {
226
226
  throw Error();
227
227
  };
228
- if (Object.defineProperty(A.prototype, "props", {
228
+ if (Object.defineProperty(E.prototype, "props", {
229
229
  set: function() {
230
230
  throw Error();
231
231
  }
232
232
  }), typeof Reflect == "object" && Reflect.construct) {
233
233
  try {
234
- Reflect.construct(A, []);
235
- } catch (H) {
236
- b = H;
234
+ Reflect.construct(E, []);
235
+ } catch (N) {
236
+ v = N;
237
237
  }
238
- Reflect.construct(a, [], A);
238
+ Reflect.construct(e, [], E);
239
239
  } else {
240
240
  try {
241
- A.call();
242
- } catch (H) {
243
- b = H;
241
+ E.call();
242
+ } catch (N) {
243
+ v = N;
244
244
  }
245
- a.call(A.prototype);
245
+ e.call(E.prototype);
246
246
  }
247
247
  } else {
248
248
  try {
249
249
  throw Error();
250
- } catch (H) {
251
- b = H;
250
+ } catch (N) {
251
+ v = N;
252
252
  }
253
- a();
253
+ e();
254
254
  }
255
- } catch (H) {
256
- if (H && b && typeof H.stack == "string") {
257
- for (var _ = H.stack.split(`
258
- `), k = b.stack.split(`
259
- `), j = _.length - 1, N = k.length - 1; j >= 1 && N >= 0 && _[j] !== k[N]; )
260
- N--;
261
- for (; j >= 1 && N >= 0; j--, N--)
262
- if (_[j] !== k[N]) {
263
- if (j !== 1 || N !== 1)
255
+ } catch (N) {
256
+ if (N && v && typeof N.stack == "string") {
257
+ for (var m = N.stack.split(`
258
+ `), A = v.stack.split(`
259
+ `), j = m.length - 1, T = A.length - 1; j >= 1 && T >= 0 && m[j] !== A[T]; )
260
+ T--;
261
+ for (; j >= 1 && T >= 0; j--, T--)
262
+ if (m[j] !== A[T]) {
263
+ if (j !== 1 || T !== 1)
264
264
  do
265
- if (j--, N--, N < 0 || _[j] !== k[N]) {
266
- var B = `
267
- ` + _[j].replace(" at new ", " at ");
268
- return a.displayName && B.includes("<anonymous>") && (B = B.replace("<anonymous>", a.displayName)), typeof a == "function" && pe.set(a, B), B;
265
+ if (j--, T--, T < 0 || m[j] !== A[T]) {
266
+ var k = `
267
+ ` + m[j].replace(" at new ", " at ");
268
+ return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, k), k;
269
269
  }
270
- while (j >= 1 && N >= 0);
270
+ while (j >= 1 && T >= 0);
271
271
  break;
272
272
  }
273
273
  }
274
274
  } finally {
275
- Fe = !1, xe.current = P, pr(), Error.prepareStackTrace = C;
275
+ ae = !1, ne.current = S, Me(), Error.prepareStackTrace = w;
276
276
  }
277
- var ee = a ? a.displayName || a.name : "", Ot = ee ? he(ee) : "";
278
- return typeof a == "function" && pe.set(a, Ot), Ot;
277
+ var M = e ? e.displayName || e.name : "", Ie = M ? B(M) : "";
278
+ return typeof e == "function" && Q.set(e, Ie), Ie;
279
279
  }
280
- function yr(a, h, g) {
281
- return ft(a, !1);
280
+ function Je(e, r, c) {
281
+ return _e(e, !1);
282
282
  }
283
- function gr(a) {
284
- var h = a.prototype;
285
- return !!(h && h.isReactComponent);
283
+ function qe(e) {
284
+ var r = e.prototype;
285
+ return !!(r && r.isReactComponent);
286
286
  }
287
- function me(a, h, g) {
288
- if (a == null)
287
+ function H(e, r, c) {
288
+ if (e == null)
289
289
  return "";
290
- if (typeof a == "function")
291
- return ft(a, gr(a));
292
- if (typeof a == "string")
293
- return he(a);
294
- switch (a) {
295
- case d:
296
- return he("Suspense");
297
- case u:
298
- return he("SuspenseList");
290
+ if (typeof e == "function")
291
+ return _e(e, qe(e));
292
+ if (typeof e == "string")
293
+ return B(e);
294
+ switch (e) {
295
+ case h:
296
+ return B("Suspense");
297
+ case g:
298
+ return B("SuspenseList");
299
299
  }
300
- if (typeof a == "object")
301
- switch (a.$$typeof) {
302
- case f:
303
- return yr(a.render);
304
- case y:
305
- return me(a.type, h, g);
306
- case R: {
307
- var b = a, C = b._payload, P = b._init;
300
+ if (typeof e == "object")
301
+ switch (e.$$typeof) {
302
+ case u:
303
+ return Je(e.render);
304
+ case p:
305
+ return H(e.type, r, c);
306
+ case P: {
307
+ var v = e, w = v._payload, S = v._init;
308
308
  try {
309
- return me(P(C), h, g);
309
+ return H(S(w), r, c);
310
310
  } catch {
311
311
  }
312
312
  }
313
313
  }
314
314
  return "";
315
315
  }
316
- var ye = Object.prototype.hasOwnProperty, dt = {}, ht = w.ReactDebugCurrentFrame;
317
- function ge(a) {
318
- if (a) {
319
- var h = a._owner, g = me(a.type, a._source, h ? h.type : null);
320
- ht.setExtraStackFrame(g);
316
+ var X = Object.prototype.hasOwnProperty, Se = {}, Ce = y.ReactDebugCurrentFrame;
317
+ function Z(e) {
318
+ if (e) {
319
+ var r = e._owner, c = H(e.type, e._source, r ? r.type : null);
320
+ Ce.setExtraStackFrame(c);
321
321
  } else
322
- ht.setExtraStackFrame(null);
322
+ Ce.setExtraStackFrame(null);
323
323
  }
324
- function Er(a, h, g, b, C) {
324
+ function Ke(e, r, c, v, w) {
325
325
  {
326
- var P = Function.call.bind(ye);
327
- for (var A in a)
328
- if (P(a, A)) {
329
- var _ = void 0;
326
+ var S = Function.call.bind(X);
327
+ for (var E in e)
328
+ if (S(e, E)) {
329
+ var m = void 0;
330
330
  try {
331
- if (typeof a[A] != "function") {
332
- var k = Error((b || "React class") + ": " + g + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw k.name = "Invariant Violation", k;
331
+ if (typeof e[E] != "function") {
332
+ var A = Error((v || "React class") + ": " + c + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
+ throw A.name = "Invariant Violation", A;
334
334
  }
335
- _ = a[A](h, A, b, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
335
+ m = e[E](r, E, v, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
336
  } catch (j) {
337
- _ = j;
337
+ m = j;
338
338
  }
339
- _ && !(_ instanceof Error) && (ge(C), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", b || "React class", g, A, typeof _), ge(null)), _ instanceof Error && !(_.message in dt) && (dt[_.message] = !0, ge(C), S("Failed %s type: %s", g, _.message), ge(null));
339
+ m && !(m instanceof Error) && (Z(w), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", c, E, typeof m), Z(null)), m instanceof Error && !(m.message in Se) && (Se[m.message] = !0, Z(w), _("Failed %s type: %s", c, m.message), Z(null));
340
340
  }
341
341
  }
342
342
  }
343
- var wr = Array.isArray;
344
- function Ne(a) {
345
- return wr(a);
343
+ var Be = Array.isArray;
344
+ function ie(e) {
345
+ return Be(e);
346
346
  }
347
- function Rr(a) {
347
+ function Qe(e) {
348
348
  {
349
- var h = typeof Symbol == "function" && Symbol.toStringTag, g = h && a[Symbol.toStringTag] || a.constructor.name || "Object";
350
- return g;
349
+ var r = typeof Symbol == "function" && Symbol.toStringTag, c = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
+ return c;
351
351
  }
352
352
  }
353
- function br(a) {
353
+ function He(e) {
354
354
  try {
355
- return pt(a), !1;
355
+ return Pe(e), !1;
356
356
  } catch {
357
357
  return !0;
358
358
  }
359
359
  }
360
- function pt(a) {
361
- return "" + a;
360
+ function Pe(e) {
361
+ return "" + e;
362
362
  }
363
- function mt(a) {
364
- if (br(a))
365
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Rr(a)), pt(a);
363
+ function be(e) {
364
+ if (He(e))
365
+ return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(e)), Pe(e);
366
366
  }
367
- var se = w.ReactCurrentOwner, vr = {
367
+ var je = y.ReactCurrentOwner, Xe = {
368
368
  key: !0,
369
369
  ref: !0,
370
370
  __self: !0,
371
371
  __source: !0
372
- }, yt, gt, De;
373
- De = {};
374
- function Sr(a) {
375
- if (ye.call(a, "ref")) {
376
- var h = Object.getOwnPropertyDescriptor(a, "ref").get;
377
- if (h && h.isReactWarning)
372
+ }, Te, Oe;
373
+ function Ze(e) {
374
+ if (X.call(e, "ref")) {
375
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
+ if (r && r.isReactWarning)
378
377
  return !1;
379
378
  }
380
- return a.ref !== void 0;
379
+ return e.ref !== void 0;
381
380
  }
382
- function Or(a) {
383
- if (ye.call(a, "key")) {
384
- var h = Object.getOwnPropertyDescriptor(a, "key").get;
385
- if (h && h.isReactWarning)
381
+ function et(e) {
382
+ if (X.call(e, "key")) {
383
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
+ if (r && r.isReactWarning)
386
385
  return !1;
387
386
  }
388
- return a.key !== void 0;
387
+ return e.key !== void 0;
389
388
  }
390
- function Tr(a, h) {
391
- if (typeof a.ref == "string" && se.current && h && se.current.stateNode !== h) {
392
- var g = V(se.current.type);
393
- De[g] || (S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', V(se.current.type), a.ref), De[g] = !0);
394
- }
389
+ function tt(e, r) {
390
+ typeof e.ref == "string" && je.current;
395
391
  }
396
- function _r(a, h) {
392
+ function rt(e, r) {
397
393
  {
398
- var g = function() {
399
- yt || (yt = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
394
+ var c = function() {
395
+ Te || (Te = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
400
396
  };
401
- g.isReactWarning = !0, Object.defineProperty(a, "key", {
402
- get: g,
397
+ c.isReactWarning = !0, Object.defineProperty(e, "key", {
398
+ get: c,
403
399
  configurable: !0
404
400
  });
405
401
  }
406
402
  }
407
- function Ar(a, h) {
403
+ function nt(e, r) {
408
404
  {
409
- var g = function() {
410
- gt || (gt = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
405
+ var c = function() {
406
+ Oe || (Oe = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
411
407
  };
412
- g.isReactWarning = !0, Object.defineProperty(a, "ref", {
413
- get: g,
408
+ c.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
+ get: c,
414
410
  configurable: !0
415
411
  });
416
412
  }
417
413
  }
418
- var Cr = function(a, h, g, b, C, P, A) {
419
- var _ = {
414
+ var ot = function(e, r, c, v, w, S, E) {
415
+ var m = {
420
416
  // This tag allows us to uniquely identify this as a React Element
421
- $$typeof: t,
417
+ $$typeof: n,
422
418
  // Built-in properties that belong on the element
423
- type: a,
424
- key: h,
425
- ref: g,
426
- props: A,
419
+ type: e,
420
+ key: r,
421
+ ref: c,
422
+ props: E,
427
423
  // Record the component responsible for creating this element.
428
- _owner: P
424
+ _owner: S
429
425
  };
430
- return _._store = {}, Object.defineProperty(_._store, "validated", {
426
+ return m._store = {}, Object.defineProperty(m._store, "validated", {
431
427
  configurable: !1,
432
428
  enumerable: !1,
433
429
  writable: !0,
434
430
  value: !1
435
- }), Object.defineProperty(_, "_self", {
431
+ }), Object.defineProperty(m, "_self", {
436
432
  configurable: !1,
437
433
  enumerable: !1,
438
434
  writable: !1,
439
- value: b
440
- }), Object.defineProperty(_, "_source", {
435
+ value: v
436
+ }), Object.defineProperty(m, "_source", {
441
437
  configurable: !1,
442
438
  enumerable: !1,
443
439
  writable: !1,
444
- value: C
445
- }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
440
+ value: w
441
+ }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
446
442
  };
447
- function Pr(a, h, g, b, C) {
443
+ function at(e, r, c, v, w) {
448
444
  {
449
- var P, A = {}, _ = null, k = null;
450
- g !== void 0 && (mt(g), _ = "" + g), Or(h) && (mt(h.key), _ = "" + h.key), Sr(h) && (k = h.ref, Tr(h, C));
451
- for (P in h)
452
- ye.call(h, P) && !vr.hasOwnProperty(P) && (A[P] = h[P]);
453
- if (a && a.defaultProps) {
454
- var j = a.defaultProps;
455
- for (P in j)
456
- A[P] === void 0 && (A[P] = j[P]);
445
+ var S, E = {}, m = null, A = null;
446
+ c !== void 0 && (be(c), m = "" + c), et(r) && (be(r.key), m = "" + r.key), Ze(r) && (A = r.ref, tt(r, w));
447
+ for (S in r)
448
+ X.call(r, S) && !Xe.hasOwnProperty(S) && (E[S] = r[S]);
449
+ if (e && e.defaultProps) {
450
+ var j = e.defaultProps;
451
+ for (S in j)
452
+ E[S] === void 0 && (E[S] = j[S]);
457
453
  }
458
- if (_ || k) {
459
- var N = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
460
- _ && _r(A, N), k && Ar(A, N);
454
+ if (m || A) {
455
+ var T = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
+ m && rt(E, T), A && nt(E, T);
461
457
  }
462
- return Cr(a, _, k, C, b, se.current, A);
458
+ return ot(e, m, A, w, v, je.current, E);
463
459
  }
464
460
  }
465
- var Le = w.ReactCurrentOwner, Et = w.ReactDebugCurrentFrame;
466
- function Z(a) {
467
- if (a) {
468
- var h = a._owner, g = me(a.type, a._source, h ? h.type : null);
469
- Et.setExtraStackFrame(g);
461
+ var ce = y.ReactCurrentOwner, Ae = y.ReactDebugCurrentFrame;
462
+ function z(e) {
463
+ if (e) {
464
+ var r = e._owner, c = H(e.type, e._source, r ? r.type : null);
465
+ Ae.setExtraStackFrame(c);
470
466
  } else
471
- Et.setExtraStackFrame(null);
467
+ Ae.setExtraStackFrame(null);
472
468
  }
473
- var ke;
474
- ke = !1;
475
- function Ie(a) {
476
- return typeof a == "object" && a !== null && a.$$typeof === t;
469
+ var se;
470
+ se = !1;
471
+ function ue(e) {
472
+ return typeof e == "object" && e !== null && e.$$typeof === n;
477
473
  }
478
- function wt() {
474
+ function xe() {
479
475
  {
480
- if (Le.current) {
481
- var a = V(Le.current.type);
482
- if (a)
476
+ if (ce.current) {
477
+ var e = W(ce.current.type);
478
+ if (e)
483
479
  return `
484
480
 
485
- Check the render method of \`` + a + "`.";
481
+ Check the render method of \`` + e + "`.";
486
482
  }
487
483
  return "";
488
484
  }
489
485
  }
490
- function xr(a) {
486
+ function it(e) {
491
487
  return "";
492
488
  }
493
- var Rt = {};
494
- function jr(a) {
489
+ var ke = {};
490
+ function ct(e) {
495
491
  {
496
- var h = wt();
497
- if (!h) {
498
- var g = typeof a == "string" ? a : a.displayName || a.name;
499
- g && (h = `
492
+ var r = xe();
493
+ if (!r) {
494
+ var c = typeof e == "string" ? e : e.displayName || e.name;
495
+ c && (r = `
500
496
 
501
- Check the top-level render call using <` + g + ">.");
497
+ Check the top-level render call using <` + c + ">.");
502
498
  }
503
- return h;
499
+ return r;
504
500
  }
505
501
  }
506
- function bt(a, h) {
502
+ function De(e, r) {
507
503
  {
508
- if (!a._store || a._store.validated || a.key != null)
504
+ if (!e._store || e._store.validated || e.key != null)
509
505
  return;
510
- a._store.validated = !0;
511
- var g = jr(h);
512
- if (Rt[g])
506
+ e._store.validated = !0;
507
+ var c = ct(r);
508
+ if (ke[c])
513
509
  return;
514
- Rt[g] = !0;
515
- var b = "";
516
- a && a._owner && a._owner !== Le.current && (b = " It was passed a child from " + V(a._owner.type) + "."), Z(a), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, b), Z(null);
510
+ ke[c] = !0;
511
+ var v = "";
512
+ e && e._owner && e._owner !== ce.current && (v = " It was passed a child from " + W(e._owner.type) + "."), z(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, v), z(null);
517
513
  }
518
514
  }
519
- function vt(a, h) {
515
+ function Fe(e, r) {
520
516
  {
521
- if (typeof a != "object")
517
+ if (typeof e != "object")
522
518
  return;
523
- if (Ne(a))
524
- for (var g = 0; g < a.length; g++) {
525
- var b = a[g];
526
- Ie(b) && bt(b, h);
519
+ if (ie(e))
520
+ for (var c = 0; c < e.length; c++) {
521
+ var v = e[c];
522
+ ue(v) && De(v, r);
527
523
  }
528
- else if (Ie(a))
529
- a._store && (a._store.validated = !0);
530
- else if (a) {
531
- var C = O(a);
532
- if (typeof C == "function" && C !== a.entries)
533
- for (var P = C.call(a), A; !(A = P.next()).done; )
534
- Ie(A.value) && bt(A.value, h);
524
+ else if (ue(e))
525
+ e._store && (e._store.validated = !0);
526
+ else if (e) {
527
+ var w = b(e);
528
+ if (typeof w == "function" && w !== e.entries)
529
+ for (var S = w.call(e), E; !(E = S.next()).done; )
530
+ ue(E.value) && De(E.value, r);
535
531
  }
536
532
  }
537
533
  }
538
- function Fr(a) {
534
+ function st(e) {
539
535
  {
540
- var h = a.type;
541
- if (h == null || typeof h == "string")
536
+ var r = e.type;
537
+ if (r == null || typeof r == "string")
542
538
  return;
543
- var g;
544
- if (typeof h == "function")
545
- g = h.propTypes;
546
- else if (typeof h == "object" && (h.$$typeof === f || // Note: Memo only checks outer props here.
539
+ var c;
540
+ if (typeof r == "function")
541
+ c = r.propTypes;
542
+ else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
547
543
  // Inner props are checked in the reconciler.
548
- h.$$typeof === y))
549
- g = h.propTypes;
544
+ r.$$typeof === p))
545
+ c = r.propTypes;
550
546
  else
551
547
  return;
552
- if (g) {
553
- var b = V(h);
554
- Er(g, a.props, "prop", b, a);
555
- } else if (h.PropTypes !== void 0 && !ke) {
556
- ke = !0;
557
- var C = V(h);
558
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
548
+ if (c) {
549
+ var v = W(r);
550
+ Ke(c, e.props, "prop", v, e);
551
+ } else if (r.PropTypes !== void 0 && !se) {
552
+ se = !0;
553
+ var w = W(r);
554
+ _("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", w || "Unknown");
559
555
  }
560
- typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
556
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
557
  }
562
558
  }
563
- function Nr(a) {
559
+ function ut(e) {
564
560
  {
565
- for (var h = Object.keys(a.props), g = 0; g < h.length; g++) {
566
- var b = h[g];
567
- if (b !== "children" && b !== "key") {
568
- Z(a), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", b), Z(null);
561
+ for (var r = Object.keys(e.props), c = 0; c < r.length; c++) {
562
+ var v = r[c];
563
+ if (v !== "children" && v !== "key") {
564
+ z(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), z(null);
569
565
  break;
570
566
  }
571
567
  }
572
- a.ref !== null && (Z(a), S("Invalid attribute `ref` supplied to `React.Fragment`."), Z(null));
568
+ e.ref !== null && (z(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), z(null));
573
569
  }
574
570
  }
575
- function St(a, h, g, b, C, P) {
571
+ function Le(e, r, c, v, w, S) {
576
572
  {
577
- var A = de(a);
578
- if (!A) {
579
- var _ = "";
580
- (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
581
- var k = xr();
582
- k ? _ += k : _ += wt();
573
+ var E = K(e);
574
+ if (!E) {
575
+ var m = "";
576
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (m += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
577
+ var A = it();
578
+ A ? m += A : m += xe();
583
579
  var j;
584
- a === null ? j = "null" : Ne(a) ? j = "array" : a !== void 0 && a.$$typeof === t ? (j = "<" + (V(a.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : j = typeof a, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", j, _);
580
+ e === null ? j = "null" : ie(e) ? j = "array" : e !== void 0 && e.$$typeof === n ? (j = "<" + (W(e.type) || "Unknown") + " />", m = " Did you accidentally export a JSX literal instead of a component?") : j = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", j, m);
585
581
  }
586
- var N = Pr(a, h, g, C, P);
587
- if (N == null)
588
- return N;
589
- if (A) {
590
- var B = h.children;
591
- if (B !== void 0)
592
- if (b)
593
- if (Ne(B)) {
594
- for (var ee = 0; ee < B.length; ee++)
595
- vt(B[ee], a);
596
- Object.freeze && Object.freeze(B);
582
+ var T = at(e, r, c, w, S);
583
+ if (T == null)
584
+ return T;
585
+ if (E) {
586
+ var k = r.children;
587
+ if (k !== void 0)
588
+ if (v)
589
+ if (ie(k)) {
590
+ for (var M = 0; M < k.length; M++)
591
+ Fe(k[M], e);
592
+ Object.freeze && Object.freeze(k);
597
593
  } else
598
- S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
594
+ _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
599
595
  else
600
- vt(B, a);
596
+ Fe(k, e);
601
597
  }
602
- return a === n ? Nr(N) : Fr(N), N;
598
+ return e === i ? ut(T) : st(T), T;
603
599
  }
604
600
  }
605
- function Dr(a, h, g) {
606
- return St(a, h, g, !0);
601
+ function lt(e, r, c) {
602
+ return Le(e, r, c, !0);
607
603
  }
608
- function Lr(a, h, g) {
609
- return St(a, h, g, !1);
604
+ function ft(e, r, c) {
605
+ return Le(e, r, c, !1);
610
606
  }
611
- var kr = Lr, Ir = Dr;
612
- ae.Fragment = n, ae.jsx = kr, ae.jsxs = Ir;
613
- }()), ae;
607
+ var dt = ft, vt = lt;
608
+ q.Fragment = i, q.jsx = dt, q.jsxs = vt;
609
+ }()), q;
614
610
  }
615
- process.env.NODE_ENV === "production" ? Me.exports = qr() : Me.exports = Mr();
616
- var J = Me.exports;
617
- const q = Ur({}), No = ({ children: e, apiURL: t, libraries: r, localStorageKeys: n }) => {
618
- const o = Ge(
611
+ process.env.NODE_ENV === "production" ? le.exports = mt() : le.exports = Et();
612
+ var Y = le.exports;
613
+ const D = gt({}), Lt = ({ children: t, apiURL: n, libraries: o, localStorageKeys: i }) => {
614
+ const a = fe(
619
615
  () => ({
620
- apiURL: t,
621
- libraries: r,
622
- localStorageKeys: n
616
+ apiURL: n,
617
+ libraries: o,
618
+ localStorageKeys: i
623
619
  }),
624
- [t, r, n]
620
+ [n, o, i]
625
621
  );
626
- return /* @__PURE__ */ J.jsx(q.Provider, { value: o, children: e });
627
- }, zr = "user", Do = ({ Fallback: e, isLogged: t, loginPath: r = "/login", redirect401Path: n = "/login", ...o }) => {
628
- var T, L, U, D;
629
- const { libraries: s, localStorageKeys: i } = z(q), c = (o == null ? void 0 : o.reactRouter) || (s == null ? void 0 : s.reactRouter), f = (o == null ? void 0 : o.axios) || (s == null ? void 0 : s.axios), d = (o == null ? void 0 : o.localStorageKey) || (i == null ? void 0 : i.user) || zr;
630
- if (!c)
622
+ return /* @__PURE__ */ Y.jsx(D.Provider, { value: a, children: t });
623
+ }, wt = "user", It = ({ Fallback: t, isLogged: n, loginPath: o = "/login", redirect401Path: i = "/login", ...a }) => {
624
+ var x, L, I, $;
625
+ const { libraries: f, localStorageKeys: l } = F(D), d = (a == null ? void 0 : a.reactRouter) || (f == null ? void 0 : f.reactRouter), u = (a == null ? void 0 : a.axios) || (f == null ? void 0 : f.axios), h = (a == null ? void 0 : a.localStorageKey) || (l == null ? void 0 : l.user) || wt;
626
+ if (!d)
631
627
  throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
632
- const [u, y] = Mt(null), { useLocation: R, Navigate: p, Outlet: m } = c, E = R(), O = Br(!1), w = typeof t == "function" ? t() : !!t, S = typeof w == "boolean" ? w : w == null ? void 0 : w.isLogged;
633
- return X(() => {
634
- O.current || (O.current = !0, f.interceptors.response.use(
635
- (x) => x,
636
- async (x) => {
637
- var de;
638
- return typeof x == "object" && x && "response" in x && x.response && typeof x.response == "object" && "status" in x.response && x.response && typeof x.response == "object" && "status" in x.response && ((de = x == null ? void 0 : x.response) == null ? void 0 : de.status) === 401 && (f.defaults.headers.common.Authorization = null, typeof window < "u" && window.localStorage && localStorage.removeItem(d), y(n)), Promise.reject(x);
628
+ const [g, p] = Ue(null), { useLocation: P, Navigate: s, Outlet: C } = d, R = P(), b = ht(!1), y = typeof n == "function" ? n() : !!n, _ = typeof y == "boolean" ? y : y == null ? void 0 : y.isLogged;
629
+ return V(() => {
630
+ b.current || (b.current = !0, u.interceptors.response.use(
631
+ (O) => O,
632
+ async (O) => {
633
+ var K;
634
+ return typeof O == "object" && O && "response" in O && O.response && typeof O.response == "object" && "status" in O.response && O.response && typeof O.response == "object" && "status" in O.response && ((K = O == null ? void 0 : O.response) == null ? void 0 : K.status) === 401 && (u.defaults.headers.common.Authorization = null, typeof window < "u" && window.localStorage && localStorage.removeItem(h), p(i)), Promise.reject(O);
639
635
  }
640
636
  ));
641
- }, [f.defaults.headers.common, f.interceptors.response, d, n]), S && !u ? /* @__PURE__ */ J.jsx($r, { fallback: e, children: (L = (T = E.state) == null ? void 0 : T.from) != null && L.state && ((D = (U = E.state) == null ? void 0 : U.from) == null ? void 0 : D.pathname) === r ? /* @__PURE__ */ J.jsx(p, { to: E.state.from.state.from.pathname + E.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ J.jsx(m, {}) }) : /* @__PURE__ */ J.jsx(p, { to: r + E.search, state: { from: E }, replace: !0 });
642
- }, Lo = ({ data: e, ...t }) => {
643
- const { libraries: r } = z(q), n = (t == null ? void 0 : t.reactRouter) || (r == null ? void 0 : r.reactRouter), o = (t == null ? void 0 : t.gtm) || (r == null ? void 0 : r.gtm);
644
- if (!n)
637
+ }, [u.defaults.headers.common, u.interceptors.response, h, i]), _ && !g ? /* @__PURE__ */ Y.jsx(yt, { fallback: t, children: (L = (x = R.state) == null ? void 0 : x.from) != null && L.state && (($ = (I = R.state) == null ? void 0 : I.from) == null ? void 0 : $.pathname) === o ? /* @__PURE__ */ Y.jsx(s, { to: R.state.from.state.from.pathname + R.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ Y.jsx(C, {}) }) : /* @__PURE__ */ Y.jsx(s, { to: o + R.search, state: { from: R }, replace: !0 });
638
+ }, $t = ({ data: t, ...n }) => {
639
+ const { libraries: o } = F(D), i = (n == null ? void 0 : n.reactRouter) || (o == null ? void 0 : o.reactRouter), a = (n == null ? void 0 : n.gtm) || (o == null ? void 0 : o.gtm);
640
+ if (!i)
645
641
  throw new Error(
646
642
  "React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView."
647
643
  );
648
- if (!o)
644
+ if (!a)
649
645
  throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");
650
- const { useGoogleTagManager: s } = o, { useLocation: i, Outlet: c } = n, { pathname: f } = i(), { sendEvent: d } = s();
651
- return X(() => {
652
- d({
646
+ const { useGoogleTagManager: f } = a, { useLocation: l, Outlet: d } = i, { pathname: u } = l(), { sendEvent: h } = f();
647
+ return V(() => {
648
+ h({
653
649
  event: "pageView",
654
- pathname: f,
655
- ...e
650
+ pathname: u,
651
+ ...t
656
652
  });
657
- }, [e, f, d]), /* @__PURE__ */ J.jsx(c, {});
658
- }, Wr = "user", ko = ({
659
- tokenTypeKey: e = "tokenType",
660
- tokenKey: t = "accessToken",
661
- postContentType: r = "application/json",
662
- ...n
653
+ }, [t, u, h]), /* @__PURE__ */ Y.jsx(d, {});
654
+ }, Rt = "user", Nt = ({
655
+ tokenTypeKey: t = "tokenType",
656
+ tokenKey: n = "accessToken",
657
+ postContentType: o = "application/json",
658
+ ...i
663
659
  }) => {
664
- const { apiURL: o = n.apiURL, libraries: s, localStorageKeys: i } = z(q), c = (n == null ? void 0 : n.userLocalStorageKey) || (i == null ? void 0 : i.user) || Wr, f = (n == null ? void 0 : n.axios) || (s == null ? void 0 : s.axios);
665
- if (!f)
660
+ const { apiURL: a = i.apiURL, libraries: f, localStorageKeys: l } = F(D), d = (i == null ? void 0 : i.userLocalStorageKey) || (l == null ? void 0 : l.user) || Rt, u = (i == null ? void 0 : i.axios) || (f == null ? void 0 : f.axios);
661
+ if (!u)
666
662
  throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
667
- if (!(f != null && f.defaults))
663
+ if (!(u != null && u.defaults))
668
664
  return null;
669
665
  if (typeof window < "u" && window.localStorage) {
670
- const d = localStorage.getItem(c), u = d ? JSON.parse(d) : null, y = u != null && u[e] ? u[e] : null, R = u != null && u[t] ? u[t] : null, p = d ? `${y} ${R}` : null;
671
- p && (f.defaults.headers.common.Authorization = p);
666
+ const h = localStorage.getItem(d), g = h ? JSON.parse(h) : null, p = g != null && g[t] ? g[t] : null, P = g != null && g[n] ? g[n] : null, s = h ? `${p} ${P}` : null;
667
+ s && (u.defaults.headers.common.Authorization = s);
672
668
  }
673
- return f.defaults.baseURL = o, f.defaults.headers.post["Content-Type"] = r, null;
674
- }, Io = ({ debug: e, resources: t, ...r }) => {
675
- const { libraries: n } = z(q), o = (r == null ? void 0 : r.i18) || (n == null ? void 0 : n.i18), { i18next: s, initReactI18next: i, languageDetector: c } = o || {};
676
- if (!o)
669
+ return u.defaults.baseURL = a, u.defaults.headers.post["Content-Type"] = o, null;
670
+ }, Yt = ({ debug: t, resources: n, ...o }) => {
671
+ const { libraries: i } = F(D), a = (o == null ? void 0 : o.i18) || (i == null ? void 0 : i.i18), { i18next: f, initReactI18next: l, languageDetector: d } = a || {};
672
+ if (!a)
677
673
  throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
678
- return s != null && s.isInitialized || (s.use(c).use(i).init({
679
- debug: e,
674
+ return f != null && f.isInitialized || (f.use(d).use(l).init({
675
+ debug: t,
680
676
  fallbackLng: "en",
681
677
  interpolation: {
682
678
  escapeValue: !1
@@ -686,40 +682,40 @@ const q = Ur({}), No = ({ children: e, apiURL: t, libraries: r, localStorageKeys
686
682
  bindI18n: "languageChanged loaded",
687
683
  useSuspense: !0
688
684
  },
689
- resources: t,
685
+ resources: n,
690
686
  returnNull: !1
691
687
  }).then(() => {
692
- document.documentElement.lang !== s.resolvedLanguage && s.resolvedLanguage && document.documentElement.setAttribute("lang", s.resolvedLanguage);
693
- }), s.on("languageChanged", (f) => {
694
- document.documentElement.setAttribute("lang", f);
688
+ document.documentElement.lang !== f.resolvedLanguage && f.resolvedLanguage && document.documentElement.setAttribute("lang", f.resolvedLanguage);
689
+ }), f.on("languageChanged", (u) => {
690
+ document.documentElement.setAttribute("lang", u);
695
691
  })), null;
696
- }, Uo = ({
697
- dsn: e,
698
- integrations: t,
699
- tracesSampleRate: r,
700
- replaysSessionSampleRate: n,
701
- replaysOnErrorSampleRate: o,
702
- tracePropagationTargets: s,
703
- ignoreErrors: i,
704
- debug: c,
705
- environment: f,
706
- release: d,
707
- ...u
692
+ }, Wt = ({
693
+ dsn: t,
694
+ integrations: n,
695
+ tracesSampleRate: o,
696
+ replaysSessionSampleRate: i,
697
+ replaysOnErrorSampleRate: a,
698
+ tracePropagationTargets: f,
699
+ ignoreErrors: l,
700
+ debug: d,
701
+ environment: u,
702
+ release: h,
703
+ ...g
708
704
  }) => {
709
- const { libraries: y } = z(q), R = (u == null ? void 0 : u.sentry) || (y == null ? void 0 : y.sentry), p = (u == null ? void 0 : u.reactRouter) || (y == null ? void 0 : y.reactRouter);
710
- if (!R)
705
+ const { libraries: p } = F(D), P = (g == null ? void 0 : g.sentry) || (p == null ? void 0 : p.sentry), s = (g == null ? void 0 : g.reactRouter) || (p == null ? void 0 : p.reactRouter);
706
+ if (!P)
711
707
  throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
712
- if (!p)
708
+ if (!s)
713
709
  throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
714
- if (R.isInitialized())
710
+ if (P.isInitialized())
715
711
  return null;
716
- const { createRoutesFromChildren: m, matchRoutes: E, useLocation: O, useNavigationType: w } = p;
717
- return (c || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && R.init({
718
- debug: c,
719
- dsn: e,
720
- environment: f || "production",
712
+ const { createRoutesFromChildren: C, matchRoutes: R, useLocation: b, useNavigationType: y } = s;
713
+ return (d || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && P.init({
714
+ debug: d,
715
+ dsn: t,
716
+ environment: u || "production",
721
717
  ignoreErrors: [
722
- ...i || [],
718
+ ...l || [],
723
719
  /dynamically imported module/,
724
720
  /Cannot read properties of undefined \(reading 'default'\)/,
725
721
  /Loading chunk \d+ failed/,
@@ -728,1988 +724,339 @@ const q = Ur({}), No = ({ children: e, apiURL: t, libraries: r, localStorageKeys
728
724
  /vite:preloadError/
729
725
  ],
730
726
  integrations: [
731
- R.reactRouterV6BrowserTracingIntegration({
732
- createRoutesFromChildren: m,
733
- matchRoutes: E,
734
- useEffect: X,
735
- useLocation: O,
736
- useNavigationType: w
727
+ P.reactRouterV6BrowserTracingIntegration({
728
+ createRoutesFromChildren: C,
729
+ matchRoutes: R,
730
+ useEffect: V,
731
+ useLocation: b,
732
+ useNavigationType: y
737
733
  }),
738
- ...t || []
734
+ ...n || []
739
735
  ],
740
- release: d,
741
- replaysOnErrorSampleRate: o || 1,
742
- replaysSessionSampleRate: n || 0.1,
743
- tracePropagationTargets: s,
744
- tracesSampleRate: r || 1
736
+ release: h,
737
+ replaysOnErrorSampleRate: a || 1,
738
+ replaysSessionSampleRate: i || 0.1,
739
+ tracePropagationTargets: f,
740
+ tracesSampleRate: o || 1
745
741
  }), null;
746
- }, Bo = ({ IMaskMixin: e, ...t }) => {
747
- const r = Ge(
742
+ }, Ut = ({ IMaskMixin: t, ...n }) => {
743
+ const o = fe(
748
744
  // eslint-disable-next-line react/jsx-props-no-spreading
749
- () => e(({ TextField: n, ...o }) => /* @__PURE__ */ J.jsx(n, { ...o })),
750
- [e]
745
+ () => t(({ TextField: i, ...a }) => /* @__PURE__ */ Y.jsx(i, { ...a })),
746
+ [t]
751
747
  );
752
- return /* @__PURE__ */ J.jsx(r, { ...t });
753
- }, $o = ({ language: e, ...t }) => {
754
- const { libraries: r } = z(q), n = (t == null ? void 0 : t.dayjs) || (r == null ? void 0 : r.dayjs), o = (t == null ? void 0 : t.plugin) || (r == null ? void 0 : r.dayjsPlugin);
755
- if (!n)
748
+ return /* @__PURE__ */ Y.jsx(o, { ...n });
749
+ }, Vt = ({ language: t, ...n }) => {
750
+ const { libraries: o } = F(D), i = (n == null ? void 0 : n.dayjs) || (o == null ? void 0 : o.dayjs), a = (n == null ? void 0 : n.plugin) || (o == null ? void 0 : o.dayjsPlugin);
751
+ if (!i)
756
752
  throw new Error(
757
753
  "Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props of InitializeDaysJSConfig."
758
754
  );
759
- return X(() => {
755
+ return V(() => {
760
756
  (async () => {
761
- var c;
762
- const i = e || ((c = navigator.language) == null ? void 0 : c.slice(0, 2)) || "en";
763
- o && o.forEach((f) => {
764
- f && n.extend(f);
765
- }), await import("dayjs/locale/en"), await import("dayjs/locale/fr"), n.locale(i);
757
+ var d;
758
+ const l = t || ((d = navigator.language) == null ? void 0 : d.slice(0, 2)) || "en";
759
+ a && a.forEach((u) => {
760
+ u && i.extend(u);
761
+ }), await import("dayjs/locale/en"), await import("dayjs/locale/fr"), i.locale(l);
766
762
  })().then();
767
- }, [n, o, e]), null;
768
- }, qo = () => (X(() => {
769
- const e = (t) => {
763
+ }, [i, a, t]), null;
764
+ }, zt = () => (V(() => {
765
+ const t = (n) => {
770
766
  try {
771
- t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation(), window.location.reload();
767
+ n.preventDefault(), n.stopPropagation(), n.stopImmediatePropagation(), window.location.reload();
772
768
  } catch {
773
769
  }
774
770
  };
775
- return window.addEventListener("vite:preloadError", e), () => {
776
- window.removeEventListener("vite:preloadError", e);
771
+ return window.addEventListener("vite:preloadError", t), () => {
772
+ window.removeEventListener("vite:preloadError", t);
777
773
  };
778
- }, []), null), Vr = (e) => e && typeof e == "function", Hr = (e) => e && typeof e == "function", Mo = ({
779
- children: e,
780
- defaultQueriesOptions: t,
781
- defaultMutationsOptions: r,
782
- ...n
774
+ }, []), null), pt = (t) => t && typeof t == "function", _t = (t) => t && typeof t == "function", Mt = ({
775
+ children: t,
776
+ defaultQueriesOptions: n,
777
+ defaultMutationsOptions: o,
778
+ ...i
783
779
  }) => {
784
- var f, d;
785
- const { libraries: o } = z(q), s = (n == null ? void 0 : n.QueryClient) || ((f = o == null ? void 0 : o.reactQuery) == null ? void 0 : f.QueryClient), i = (n == null ? void 0 : n.QueryClientProvider) || ((d = o == null ? void 0 : o.reactQuery) == null ? void 0 : d.QueryClientProvider);
786
- if (!s)
780
+ var u, h;
781
+ const { libraries: a } = F(D), f = (i == null ? void 0 : i.QueryClient) || ((u = a == null ? void 0 : a.reactQuery) == null ? void 0 : u.QueryClient), l = (i == null ? void 0 : i.QueryClientProvider) || ((h = a == null ? void 0 : a.reactQuery) == null ? void 0 : h.QueryClientProvider);
782
+ if (!f)
787
783
  throw new Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
788
- if (!i)
784
+ if (!l)
789
785
  throw new Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
790
- if (!Vr(i))
786
+ if (!pt(l))
791
787
  throw new Error("Provided QueryClientProvider dependencies are not valid.");
792
- if (!Hr(s))
788
+ if (!_t(f))
793
789
  throw new Error("Provided QueryClient dependencies are not valid.");
794
- const c = new s({
790
+ const d = new f({
795
791
  defaultOptions: {
796
792
  mutations: {
797
- ...r
793
+ ...o
798
794
  },
799
795
  queries: {
800
- getNextPageParam: (u, y, R) => u.length + (R || 0),
796
+ getNextPageParam: (g, p, P) => g.length + (P || 0),
801
797
  refetchOnWindowFocus: !1,
802
798
  retry: 3,
803
- ...t
799
+ ...n
804
800
  }
805
801
  }
806
802
  });
807
- return /* @__PURE__ */ J.jsx(i, { client: c, children: e });
808
- }, zo = (e) => {
809
- var d, u, y;
810
- const { libraries: t } = z(q), r = (e == null ? void 0 : e.i18) || (t == null ? void 0 : t.i18), n = ((d = e == null ? void 0 : e.i18) == null ? void 0 : d.translateFunction) || ((u = t == null ? void 0 : t.i18) == null ? void 0 : u.translateFunction), o = ((y = r == null ? void 0 : r.i18next) == null ? void 0 : y.t) || n || ((R) => R), { unknownErrorTranslationKey: s = "error.unknownError" } = e || {}, i = o(s), c = be(
811
- (R) => {
812
- var m, E, O, w, S, T, L, U, D;
813
- const { response: p } = R || {};
814
- return p != null && p.reason ? String(p.reason) : (m = p == null ? void 0 : p.data) != null && m.reason ? String(p.data.reason) : (E = p == null ? void 0 : p.data) != null && E.message ? String(p.data.message) : (w = (O = p == null ? void 0 : p.data) == null ? void 0 : O.detail) != null && w.length && Array.isArray((S = p == null ? void 0 : p.data) == null ? void 0 : S.detail) && ((L = (T = p == null ? void 0 : p.data) == null ? void 0 : T.detail[0]) != null && L.msg) && typeof ((D = (U = p == null ? void 0 : p.data) == null ? void 0 : U.detail[0]) == null ? void 0 : D.msg) == "string" ? String(p.data.detail[0].msg) : i;
803
+ return /* @__PURE__ */ Y.jsx(l, { client: d, children: t });
804
+ }, Gt = (t) => {
805
+ var h, g, p;
806
+ const { libraries: n } = F(D), o = (t == null ? void 0 : t.i18) || (n == null ? void 0 : n.i18), i = ((h = t == null ? void 0 : t.i18) == null ? void 0 : h.translateFunction) || ((g = n == null ? void 0 : n.i18) == null ? void 0 : g.translateFunction), a = ((p = o == null ? void 0 : o.i18next) == null ? void 0 : p.t) || i || ((P) => P), { unknownErrorTranslationKey: f = "error.unknownError" } = t || {}, l = a(f), d = te(
807
+ (P) => {
808
+ var C, R, b, y, _, x, L, I, $;
809
+ const { response: s } = P || {};
810
+ return s != null && s.reason ? String(s.reason) : (C = s == null ? void 0 : s.data) != null && C.reason ? String(s.data.reason) : (R = s == null ? void 0 : s.data) != null && R.message ? String(s.data.message) : (y = (b = s == null ? void 0 : s.data) == null ? void 0 : b.detail) != null && y.length && Array.isArray((_ = s == null ? void 0 : s.data) == null ? void 0 : _.detail) && ((L = (x = s == null ? void 0 : s.data) == null ? void 0 : x.detail[0]) != null && L.msg) && typeof (($ = (I = s == null ? void 0 : s.data) == null ? void 0 : I.detail[0]) == null ? void 0 : $.msg) == "string" ? String(s.data.detail[0].msg) : l;
815
811
  },
816
- [i]
812
+ [l]
817
813
  );
818
- return { getErrorCode: be((R) => {
819
- var m, E, O;
820
- const { response: p } = R || {};
821
- return p != null && p.error_code ? String(p == null ? void 0 : p.error_code) : (m = p == null ? void 0 : p.data) != null && m.error_code ? String((E = p == null ? void 0 : p.data) == null ? void 0 : E.error_code) : p != null && p.error_code ? String(p == null ? void 0 : p.error_code) : (O = p == null ? void 0 : p.data) != null && O.error_code ? String(p.data.error_code) : "unknown_error_code";
822
- }, []), printError: c };
823
- }, Wo = ({
824
- data: e,
825
- fetchNextPage: t,
826
- isFetchingNextPage: r,
827
- isInitialLoading: n,
828
- isLoading: o,
829
- enabled: s = !0
814
+ return { getErrorCode: te((P) => {
815
+ var C, R, b;
816
+ const { response: s } = P || {};
817
+ return s != null && s.error_code ? String(s == null ? void 0 : s.error_code) : (C = s == null ? void 0 : s.data) != null && C.error_code ? String((R = s == null ? void 0 : s.data) == null ? void 0 : R.error_code) : s != null && s.error_code ? String(s == null ? void 0 : s.error_code) : (b = s == null ? void 0 : s.data) != null && b.error_code ? String(s.data.error_code) : "unknown_error_code";
818
+ }, []), printError: d };
819
+ }, Jt = ({
820
+ data: t,
821
+ fetchNextPage: n,
822
+ isFetchingNextPage: o,
823
+ isInitialLoading: i,
824
+ isLoading: a,
825
+ enabled: f = !0
830
826
  }) => {
831
- const i = be(
832
- async (f) => {
833
- r || !s || await t({ pageParam: (f == null ? void 0 : f.pageParam) || f.visibleRowsCount });
827
+ const l = te(
828
+ async (u) => {
829
+ o || !f || await n({ pageParam: (u == null ? void 0 : u.pageParam) || u.visibleRowsCount });
834
830
  },
835
- [s, t, r]
836
- ), c = Ge(() => {
837
- if (e)
838
- return e.pages.reduce((f, d) => [...f, ...d], []);
839
- }, [e]);
831
+ [f, n, o]
832
+ ), d = fe(() => {
833
+ if (t)
834
+ return t.pages.reduce((u, h) => [...u, ...h], []);
835
+ }, [t]);
840
836
  return {
841
- fetchNextPageOnRowsScrollEnd: i,
842
- isLoading: r || o,
843
- loadingVariant: n ? "skeleton" : "linear",
844
- rows: c
837
+ fetchNextPageOnRowsScrollEnd: l,
838
+ isLoading: o || a,
839
+ loadingVariant: i ? "skeleton" : "linear",
840
+ rows: d
845
841
  };
846
- }, Vo = (e) => {
847
- const { libraries: t } = z(q), r = (e == null ? void 0 : e.axios) || (t == null ? void 0 : t.axios), n = (e == null ? void 0 : e.localStorageKey) || "user";
848
- if (!r)
842
+ }, qt = (t) => {
843
+ const { libraries: n } = F(D), o = (t == null ? void 0 : t.axios) || (n == null ? void 0 : n.axios), i = (t == null ? void 0 : t.localStorageKey) || "user";
844
+ if (!o)
849
845
  throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");
850
- const o = be(
851
- ({ tokenType: i, accessToken: c }) => {
852
- r.defaults.headers.common.Authorization = `${i} ${c}`;
846
+ const a = te(
847
+ ({ tokenType: l, accessToken: d }) => {
848
+ o.defaults.headers.common.Authorization = `${l} ${d}`;
853
849
  },
854
- [r.defaults.headers.common]
855
- ), s = () => {
856
- r.defaults.headers.common.Authorization = null;
850
+ [o.defaults.headers.common]
851
+ ), f = () => {
852
+ o.defaults.headers.common.Authorization = null;
857
853
  };
858
- return X(() => {
859
- const i = ({ newValue: c, key: f }) => {
860
- if (f === n && c)
854
+ return V(() => {
855
+ const l = ({ newValue: d, key: u }) => {
856
+ if (u === i && d)
861
857
  try {
862
- const { accessToken: d, tokenType: u } = JSON.parse(c);
863
- o({ accessToken: d, tokenType: u });
864
- } catch (d) {
865
- console.error("Failed to parse newValue from localStorage:", d);
858
+ const { accessToken: h, tokenType: g } = JSON.parse(d);
859
+ a({ accessToken: h, tokenType: g });
860
+ } catch (h) {
861
+ console.error("Failed to parse newValue from localStorage:", h);
866
862
  }
867
863
  };
868
- return window.addEventListener("storage", i), () => {
869
- window.removeEventListener("storage", i);
864
+ return window.addEventListener("storage", l), () => {
865
+ window.removeEventListener("storage", l);
870
866
  };
871
- }, [n, o]), {
872
- clearAuthenticationToken: s,
873
- setAuthenticationToken: o
867
+ }, [i, a]), {
868
+ clearAuthenticationToken: f,
869
+ setAuthenticationToken: a
874
870
  };
875
- }, Jr = ({ library: e, date: t, format: r = "ll" }) => e(t).format(r), Yr = (e, t) => {
876
- const { fractionDigits: r = 0, metric: n = "km" } = t || {}, o = Number(e);
877
- return Number.isNaN(o) ? `0${n}` : `${o.toFixed(r)}${n}`;
878
- }, Kr = (e) => !e || typeof e != "string" ? "" : e.replace(/_/g, " ").toLowerCase().split(" ").map((r) => r.length > 0 ? r.charAt(0).toUpperCase() + r.slice(1) : r).join(" "), Gr = (e) => e != null && e.startsWith("/") ? e != null && e.startsWith("/files") ? e : `/files${e}` : e != null && e.startsWith("files") ? `/${e}` : `/files/${e}`, Qr = ({ path: e, size: t, apiURL: r }) => {
879
- if (!e)
871
+ }, St = ({ library: t, date: n, format: o = "ll" }) => t(n).format(o), Ct = (t, n) => {
872
+ const { fractionDigits: o = 0, metric: i = "km" } = n || {}, a = Number(t);
873
+ return Number.isNaN(a) ? `0${i}` : `${a.toFixed(o)}${i}`;
874
+ }, Pt = (t) => !t || typeof t != "string" ? "" : t.replace(/_/g, " ").toLowerCase().split(" ").map((o) => o.length > 0 ? o.charAt(0).toUpperCase() + o.slice(1) : o).join(" "), bt = (t) => t != null && t.startsWith("/") ? t != null && t.startsWith("/files") ? t : `/files${t}` : t != null && t.startsWith("files") ? `/${t}` : `/files/${t}`, jt = ({ path: t, size: n, apiURL: o }) => {
875
+ if (!t)
880
876
  return "";
881
- const n = Gr(e), o = `${r}${n}`, s = o.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/) !== null;
882
- return typeof t == "number" && s ? `${o.replace("/files", `/thumbs/${t}`)}` : o;
883
- }, Ho = (e) => {
884
- const { apiURL: t, libraries: r } = z(q), n = (e == null ? void 0 : e.dayjs) || (r == null ? void 0 : r.dayjs);
877
+ const i = bt(t), a = `${o}${i}`, f = a.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/) !== null;
878
+ return typeof n == "number" && f ? `${a.replace("/files", `/thumbs/${n}`)}` : a;
879
+ }, Kt = (t) => {
880
+ const { apiURL: n, libraries: o } = F(D), i = (t == null ? void 0 : t.dayjs) || (o == null ? void 0 : o.dayjs);
885
881
  return {
886
- dateAdapter: (i, c) => {
887
- if (!n)
882
+ dateAdapter: (l, d) => {
883
+ if (!i)
888
884
  throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
889
- return Jr({
890
- date: i,
891
- format: c,
892
- library: n
885
+ return St({
886
+ date: l,
887
+ format: d,
888
+ library: i
893
889
  });
894
890
  },
895
- distanceAdapter: Yr,
896
- filePathAdapter: (i, c) => {
897
- if (!t)
891
+ distanceAdapter: Ct,
892
+ filePathAdapter: (l, d) => {
893
+ if (!n)
898
894
  throw new Error(
899
895
  "API URL is not provided. You can provide it with InjectDependenciesProvider or directly in props to filePathAdapter."
900
896
  );
901
- return Qr({
902
- apiURL: t,
903
- path: i,
904
- size: c
897
+ return jt({
898
+ apiURL: n,
899
+ path: l,
900
+ size: d
905
901
  });
906
902
  },
907
- worksiteNameAdapter: Kr
903
+ worksiteNameAdapter: Pt
908
904
  };
909
- }, Ee = (e, t) => t === "short" ? e.split("-")[0] : e, Jo = (e, t = "full") => {
910
- const [r, n] = Mt(() => {
911
- const o = (e == null ? void 0 : e.language) || navigator.language;
912
- return e && "isInitialized" in e && e.isInitialized, Ee(o, t);
905
+ }, ee = (t, n) => n === "short" ? t.split("-")[0] : t, Bt = (t, n = "full") => {
906
+ const [o, i] = Ue(() => {
907
+ const a = (t == null ? void 0 : t.language) || navigator.language;
908
+ return t && "isInitialized" in t && t.isInitialized, ee(a, n);
913
909
  });
914
- return X(() => {
915
- var s;
916
- e && "isInitialized" in e && e.isInitialized && e.language && n(Ee(e.language, t));
917
- const o = (i) => {
918
- n(Ee(i, t));
910
+ return V(() => {
911
+ var f;
912
+ t && "isInitialized" in t && t.isInitialized && t.language && i(ee(t.language, n));
913
+ const a = (l) => {
914
+ i(ee(l, n));
919
915
  };
920
- return (s = e == null ? void 0 : e.on) == null || s.call(e, "languageChanged", o), () => {
921
- var i;
922
- (i = e == null ? void 0 : e.off) == null || i.call(e, "languageChanged", o);
916
+ return (f = t == null ? void 0 : t.on) == null || f.call(t, "languageChanged", a), () => {
917
+ var l;
918
+ (l = t == null ? void 0 : t.off) == null || l.call(t, "languageChanged", a);
923
919
  };
924
- }, [e, t]), r;
925
- }, Xr = "tracktor.filter", At = (e, t, r) => `${r}_${e}=>${t}`, Yo = (e) => {
926
- const { libraries: t, localStorageKeys: r } = z(q), n = (e == null ? void 0 : e.reactRouter) || (t == null ? void 0 : t.reactRouter), { useLocation: o, useSearchParams: s } = n, { pathname: i } = o(), [c, f] = s(), d = (r == null ? void 0 : r.filter) || Xr;
927
- if (!n)
920
+ }, [t, n]), o;
921
+ }, Tt = "tracktor.filter", Ye = (t, n, o) => `${o}_${t}=>${n}`, Qt = (t) => {
922
+ const { libraries: n, localStorageKeys: o } = F(D), i = (t == null ? void 0 : t.reactRouter) || (n == null ? void 0 : n.reactRouter), { useLocation: a, useSearchParams: f } = i, { pathname: l } = a(), [d, u] = f(), h = (o == null ? void 0 : o.filter) || Tt;
923
+ if (!i)
928
924
  throw new Error(
929
925
  "React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView."
930
926
  );
931
- const u = (m, E, O = !0) => {
932
- const w = At(m, (e == null ? void 0 : e.pathname) || i, d);
933
- if (!E || Array.isArray(E) && !E.length) {
934
- c.delete(m), f(c), localStorage.removeItem(w);
927
+ const g = (C, R, b = !0) => {
928
+ const y = Ye(C, (t == null ? void 0 : t.pathname) || l, h);
929
+ if (!R || Array.isArray(R) && !R.length) {
930
+ d.delete(C), u(d), localStorage.removeItem(y);
935
931
  return;
936
932
  }
937
- O && E && localStorage.setItem(w, JSON.stringify({ ...c, [m]: E })), E && (c.set(m, JSON.stringify(E)), f(c));
933
+ b && R && localStorage.setItem(y, JSON.stringify({ ...d, [C]: R })), R && (d.set(C, JSON.stringify(R)), u(d));
938
934
  };
939
935
  return {
940
- getFilter: (m, E) => {
941
- const O = c.get(m);
942
- if (O)
936
+ getFilter: (C, R) => {
937
+ const b = d.get(C);
938
+ if (b)
943
939
  try {
944
- return JSON.parse(O);
940
+ return JSON.parse(b);
945
941
  } catch {
946
- return O;
942
+ return b;
947
943
  }
948
- const w = At(m, (e == null ? void 0 : e.pathname) || i, d), S = localStorage.getItem(w);
949
- if (S)
944
+ const y = Ye(C, (t == null ? void 0 : t.pathname) || l, h), _ = localStorage.getItem(y);
945
+ if (_)
950
946
  try {
951
- return JSON.parse(S)[m];
947
+ return JSON.parse(_)[C];
952
948
  } catch {
953
949
  }
954
- return E;
950
+ return R;
955
951
  },
956
952
  getFilters: () => {
957
- const m = Object.fromEntries(c.entries()), O = Object.keys(localStorage).filter(
958
- (w) => w.startsWith(d) && w.endsWith((e == null ? void 0 : e.pathname) || i)
959
- ).reduce((w, S) => {
960
- var L, U;
961
- const T = localStorage.getItem(S);
962
- if (T) {
963
- const D = JSON.parse(T), x = (L = Object.keys(D)) == null ? void 0 : L[0];
964
- w[x] = (U = Object.values(D)) == null ? void 0 : U[0];
953
+ const C = Object.fromEntries(d.entries()), b = Object.keys(localStorage).filter(
954
+ (y) => y.startsWith(h) && y.endsWith((t == null ? void 0 : t.pathname) || l)
955
+ ).reduce((y, _) => {
956
+ var L, I;
957
+ const x = localStorage.getItem(_);
958
+ if (x) {
959
+ const $ = JSON.parse(x), O = (L = Object.keys($)) == null ? void 0 : L[0];
960
+ y[O] = (I = Object.values($)) == null ? void 0 : I[0];
965
961
  }
966
- return w;
962
+ return y;
967
963
  }, {});
968
964
  return {
969
- ...m,
970
- ...O
965
+ ...C,
966
+ ...b
971
967
  };
972
968
  },
973
- handleFilter: (m, E) => (O, w) => {
974
- if (w || Array.isArray(w) && w.length === 0) {
975
- const S = E || "value", T = typeof w == "object" && S in w ? w[S || "value"] : w;
976
- u(m, T);
969
+ handleFilter: (C, R) => (b, y) => {
970
+ if (y || Array.isArray(y) && y.length === 0) {
971
+ const _ = R || "value", x = typeof y == "object" && _ in y ? y[_] : y;
972
+ g(C, x);
977
973
  return;
978
974
  }
979
- u(m, void 0);
975
+ g(C, void 0);
980
976
  },
981
- setFilter: u
977
+ setFilter: g
982
978
  };
983
- }, Zr = (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(), en = (e) => {
984
- const n = e.split("/").filter((o) => o.length > 0).map((o) => o.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((f) => f.charAt(0).toUpperCase() + f.slice(1)).join("")).join("");
985
- return n.charAt(0).toLowerCase() + n.slice(1);
986
- }, tn = (e) => (e.split("/").pop() || e).replace(/\.json$/, "").replace(/^openapi\./, ""), rn = (e, t, r) => {
987
- const n = en(t), o = Zr(r);
988
- return `${n}${o}`;
989
- }, nn = (e) => {
990
- if (e)
991
- return (e == null ? void 0 : e.reduce((t, r) => (t[r] = {
979
+ }, Ot = (t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase(), At = (t) => {
980
+ const i = t.split("/").filter((a) => a.length > 0).map((a) => a.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((u) => u.charAt(0).toUpperCase() + u.slice(1)).join("")).join("");
981
+ return i.charAt(0).toLowerCase() + i.slice(1);
982
+ }, xt = (t) => (t.split("/").pop() || t).replace(/\.json$/, "").replace(/^openapi\./, ""), kt = (t, n, o, i) => {
983
+ const a = At(n), f = Ot(o), l = `${a}${f}`;
984
+ return t && typeof t == "object" && "operationId" in t && (i != null && i.includes(String(t.operationId))) ? `${l}AsQuery` : l;
985
+ }, Dt = (t, n) => {
986
+ const o = {};
987
+ return t == null || t.forEach((i) => {
988
+ o[i] = {
992
989
  query: {
993
990
  useInfinite: !0,
994
991
  useInfiniteQueryParam: "offset",
995
992
  useQuery: !0
996
993
  }
997
- }, t), {})) || {};
998
- }, Ko = (e) => (Array.isArray(e) ? e : [e]).reduce((r, n) => {
999
- const { output: o, operationsToGenerateInfiniteQueryHook: s, input: i = "./openapi.json" } = n || {}, c = tn(i);
994
+ };
995
+ }), n == null || n.filter((i) => !o[i]).forEach((i) => {
996
+ o[i] = {
997
+ query: {
998
+ useQuery: !0
999
+ }
1000
+ };
1001
+ }), Object.keys(o).length ? o : void 0;
1002
+ }, Ht = (t) => (Array.isArray(t) ? t : [t]).reduce((o, i) => {
1003
+ const { output: a, useInfiniteIds: f, useQueryIds: l, input: d = "./openapi.json" } = i || {}, u = xt(d);
1000
1004
  return {
1001
- ...r,
1002
- [c]: {
1005
+ ...o,
1006
+ [u]: {
1003
1007
  hooks: {
1004
1008
  afterAllFilesWrite: "prettier src/api/ --write"
1005
1009
  },
1006
- input: i,
1010
+ input: d,
1007
1011
  output: {
1008
- baseUrl: o == null ? void 0 : o.baseUrl,
1012
+ baseUrl: a == null ? void 0 : a.baseUrl,
1009
1013
  client: "react-query",
1010
1014
  mode: "tags-split",
1011
1015
  override: {
1012
- ...(s == null ? void 0 : s.length) && { operations: nn(s) },
1013
- header: (f) => [
1016
+ ...((f == null ? void 0 : f.length) || (l == null ? void 0 : l.length)) && {
1017
+ operations: Dt(f, l)
1018
+ },
1019
+ header: (h) => [
1014
1020
  "Generated by orval 🍺",
1015
- ...f.title ? [f.title] : [],
1016
- ...f.description ? [f.description] : []
1021
+ ...h.title ? [h.title] : [],
1022
+ ...h.description ? [h.description] : []
1017
1023
  ],
1018
1024
  mutator: {
1019
1025
  name: "axiosCustomInstance",
1020
- path: `${__dirname}/axiosCustomInstance.ts`
1026
+ path: "./node_modules/@tracktor/shared-module/dist/axiosCustomInstance.ts"
1021
1027
  },
1022
- operationName: rn,
1028
+ operationName: (h, g, p) => kt(h, g, p, l),
1023
1029
  query: {
1024
1030
  useQuery: !0
1025
1031
  }
1026
1032
  },
1027
- schemas: (o == null ? void 0 : o.schemas) || `src/api/${c}/model`,
1028
- target: (o == null ? void 0 : o.target) || `src/api/${c}/services/api.ts`,
1029
- ...o
1033
+ schemas: (a == null ? void 0 : a.schemas) || `src/api/${u}/model`,
1034
+ target: (a == null ? void 0 : a.target) || `src/api/${u}/services/api.ts`,
1035
+ ...a
1030
1036
  }
1031
1037
  }
1032
1038
  };
1033
1039
  }, {});
1034
- function zt(e, t) {
1035
- return function() {
1036
- return e.apply(t, arguments);
1037
- };
1038
- }
1039
- const { toString: on } = Object.prototype, { getPrototypeOf: Qe } = Object, Oe = /* @__PURE__ */ ((e) => (t) => {
1040
- const r = on.call(t);
1041
- return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
1042
- })(/* @__PURE__ */ Object.create(null)), W = (e) => (e = e.toLowerCase(), (t) => Oe(t) === e), Te = (e) => (t) => typeof t === e, { isArray: te } = Array, ue = Te("undefined");
1043
- function sn(e) {
1044
- return e !== null && !ue(e) && e.constructor !== null && !ue(e.constructor) && $(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1045
- }
1046
- const Wt = W("ArrayBuffer");
1047
- function an(e) {
1048
- let t;
1049
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Wt(e.buffer), t;
1050
- }
1051
- const cn = Te("string"), $ = Te("function"), Vt = Te("number"), _e = (e) => e !== null && typeof e == "object", un = (e) => e === !0 || e === !1, we = (e) => {
1052
- if (Oe(e) !== "object")
1053
- return !1;
1054
- const t = Qe(e);
1055
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
1056
- }, ln = W("Date"), fn = W("File"), dn = W("Blob"), hn = W("FileList"), pn = (e) => _e(e) && $(e.pipe), mn = (e) => {
1057
- let t;
1058
- return e && (typeof FormData == "function" && e instanceof FormData || $(e.append) && ((t = Oe(e)) === "formdata" || // detect form-data instance
1059
- t === "object" && $(e.toString) && e.toString() === "[object FormData]"));
1060
- }, yn = W("URLSearchParams"), [gn, En, wn, Rn] = ["ReadableStream", "Request", "Response", "Headers"].map(W), bn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1061
- function le(e, t, { allOwnKeys: r = !1 } = {}) {
1062
- if (e === null || typeof e > "u")
1063
- return;
1064
- let n, o;
1065
- if (typeof e != "object" && (e = [e]), te(e))
1066
- for (n = 0, o = e.length; n < o; n++)
1067
- t.call(null, e[n], n, e);
1068
- else {
1069
- const s = r ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
1070
- let c;
1071
- for (n = 0; n < i; n++)
1072
- c = s[n], t.call(null, e[c], c, e);
1073
- }
1074
- }
1075
- function Ht(e, t) {
1076
- t = t.toLowerCase();
1077
- const r = Object.keys(e);
1078
- let n = r.length, o;
1079
- for (; n-- > 0; )
1080
- if (o = r[n], t === o.toLowerCase())
1081
- return o;
1082
- return null;
1083
- }
1084
- const Jt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Yt = (e) => !ue(e) && e !== Jt;
1085
- function ze() {
1086
- const { caseless: e } = Yt(this) && this || {}, t = {}, r = (n, o) => {
1087
- const s = e && Ht(t, o) || o;
1088
- we(t[s]) && we(n) ? t[s] = ze(t[s], n) : we(n) ? t[s] = ze({}, n) : te(n) ? t[s] = n.slice() : t[s] = n;
1089
- };
1090
- for (let n = 0, o = arguments.length; n < o; n++)
1091
- arguments[n] && le(arguments[n], r);
1092
- return t;
1093
- }
1094
- const vn = (e, t, r, { allOwnKeys: n } = {}) => (le(t, (o, s) => {
1095
- r && $(o) ? e[s] = zt(o, r) : e[s] = o;
1096
- }, { allOwnKeys: n }), e), Sn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), On = (e, t, r, n) => {
1097
- e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
1098
- value: t.prototype
1099
- }), r && Object.assign(e.prototype, r);
1100
- }, Tn = (e, t, r, n) => {
1101
- let o, s, i;
1102
- const c = {};
1103
- if (t = t || {}, e == null) return t;
1104
- do {
1105
- for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
1106
- i = o[s], (!n || n(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
1107
- e = r !== !1 && Qe(e);
1108
- } while (e && (!r || r(e, t)) && e !== Object.prototype);
1109
- return t;
1110
- }, _n = (e, t, r) => {
1111
- e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
1112
- const n = e.indexOf(t, r);
1113
- return n !== -1 && n === r;
1114
- }, An = (e) => {
1115
- if (!e) return null;
1116
- if (te(e)) return e;
1117
- let t = e.length;
1118
- if (!Vt(t)) return null;
1119
- const r = new Array(t);
1120
- for (; t-- > 0; )
1121
- r[t] = e[t];
1122
- return r;
1123
- }, Cn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Qe(Uint8Array)), Pn = (e, t) => {
1124
- const n = (e && e[Symbol.iterator]).call(e);
1125
- let o;
1126
- for (; (o = n.next()) && !o.done; ) {
1127
- const s = o.value;
1128
- t.call(e, s[0], s[1]);
1129
- }
1130
- }, xn = (e, t) => {
1131
- let r;
1132
- const n = [];
1133
- for (; (r = e.exec(t)) !== null; )
1134
- n.push(r);
1135
- return n;
1136
- }, jn = W("HTMLFormElement"), Fn = (e) => e.toLowerCase().replace(
1137
- /[-_\s]([a-z\d])(\w*)/g,
1138
- function(r, n, o) {
1139
- return n.toUpperCase() + o;
1140
- }
1141
- ), Ct = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Nn = W("RegExp"), Kt = (e, t) => {
1142
- const r = Object.getOwnPropertyDescriptors(e), n = {};
1143
- le(r, (o, s) => {
1144
- let i;
1145
- (i = t(o, s, e)) !== !1 && (n[s] = i || o);
1146
- }), Object.defineProperties(e, n);
1147
- }, Dn = (e) => {
1148
- Kt(e, (t, r) => {
1149
- if ($(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
1150
- return !1;
1151
- const n = e[r];
1152
- if ($(n)) {
1153
- if (t.enumerable = !1, "writable" in t) {
1154
- t.writable = !1;
1155
- return;
1156
- }
1157
- t.set || (t.set = () => {
1158
- throw Error("Can not rewrite read-only method '" + r + "'");
1159
- });
1160
- }
1161
- });
1162
- }, Ln = (e, t) => {
1163
- const r = {}, n = (o) => {
1164
- o.forEach((s) => {
1165
- r[s] = !0;
1166
- });
1167
- };
1168
- return te(e) ? n(e) : n(String(e).split(t)), r;
1169
- }, kn = () => {
1170
- }, In = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Ue = "abcdefghijklmnopqrstuvwxyz", Pt = "0123456789", Gt = {
1171
- DIGIT: Pt,
1172
- ALPHA: Ue,
1173
- ALPHA_DIGIT: Ue + Ue.toUpperCase() + Pt
1174
- }, Un = (e = 16, t = Gt.ALPHA_DIGIT) => {
1175
- let r = "";
1176
- const { length: n } = t;
1177
- for (; e--; )
1178
- r += t[Math.random() * n | 0];
1179
- return r;
1180
- };
1181
- function Bn(e) {
1182
- return !!(e && $(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
1183
- }
1184
- const $n = (e) => {
1185
- const t = new Array(10), r = (n, o) => {
1186
- if (_e(n)) {
1187
- if (t.indexOf(n) >= 0)
1188
- return;
1189
- if (!("toJSON" in n)) {
1190
- t[o] = n;
1191
- const s = te(n) ? [] : {};
1192
- return le(n, (i, c) => {
1193
- const f = r(i, o + 1);
1194
- !ue(f) && (s[c] = f);
1195
- }), t[o] = void 0, s;
1196
- }
1197
- }
1198
- return n;
1199
- };
1200
- return r(e, 0);
1201
- }, qn = W("AsyncFunction"), Mn = (e) => e && (_e(e) || $(e)) && $(e.then) && $(e.catch), l = {
1202
- isArray: te,
1203
- isArrayBuffer: Wt,
1204
- isBuffer: sn,
1205
- isFormData: mn,
1206
- isArrayBufferView: an,
1207
- isString: cn,
1208
- isNumber: Vt,
1209
- isBoolean: un,
1210
- isObject: _e,
1211
- isPlainObject: we,
1212
- isReadableStream: gn,
1213
- isRequest: En,
1214
- isResponse: wn,
1215
- isHeaders: Rn,
1216
- isUndefined: ue,
1217
- isDate: ln,
1218
- isFile: fn,
1219
- isBlob: dn,
1220
- isRegExp: Nn,
1221
- isFunction: $,
1222
- isStream: pn,
1223
- isURLSearchParams: yn,
1224
- isTypedArray: Cn,
1225
- isFileList: hn,
1226
- forEach: le,
1227
- merge: ze,
1228
- extend: vn,
1229
- trim: bn,
1230
- stripBOM: Sn,
1231
- inherits: On,
1232
- toFlatObject: Tn,
1233
- kindOf: Oe,
1234
- kindOfTest: W,
1235
- endsWith: _n,
1236
- toArray: An,
1237
- forEachEntry: Pn,
1238
- matchAll: xn,
1239
- isHTMLForm: jn,
1240
- hasOwnProperty: Ct,
1241
- hasOwnProp: Ct,
1242
- // an alias to avoid ESLint no-prototype-builtins detection
1243
- reduceDescriptors: Kt,
1244
- freezeMethods: Dn,
1245
- toObjectSet: Ln,
1246
- toCamelCase: Fn,
1247
- noop: kn,
1248
- toFiniteNumber: In,
1249
- findKey: Ht,
1250
- global: Jt,
1251
- isContextDefined: Yt,
1252
- ALPHABET: Gt,
1253
- generateString: Un,
1254
- isSpecCompliantForm: Bn,
1255
- toJSONObject: $n,
1256
- isAsyncFn: qn,
1257
- isThenable: Mn
1258
- };
1259
- function v(e, t, r, n, o) {
1260
- 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), r && (this.config = r), n && (this.request = n), o && (this.response = o);
1261
- }
1262
- l.inherits(v, Error, {
1263
- toJSON: function() {
1264
- return {
1265
- // Standard
1266
- message: this.message,
1267
- name: this.name,
1268
- // Microsoft
1269
- description: this.description,
1270
- number: this.number,
1271
- // Mozilla
1272
- fileName: this.fileName,
1273
- lineNumber: this.lineNumber,
1274
- columnNumber: this.columnNumber,
1275
- stack: this.stack,
1276
- // Axios
1277
- config: l.toJSONObject(this.config),
1278
- code: this.code,
1279
- status: this.response && this.response.status ? this.response.status : null
1280
- };
1281
- }
1282
- });
1283
- const Qt = v.prototype, Xt = {};
1284
- [
1285
- "ERR_BAD_OPTION_VALUE",
1286
- "ERR_BAD_OPTION",
1287
- "ECONNABORTED",
1288
- "ETIMEDOUT",
1289
- "ERR_NETWORK",
1290
- "ERR_FR_TOO_MANY_REDIRECTS",
1291
- "ERR_DEPRECATED",
1292
- "ERR_BAD_RESPONSE",
1293
- "ERR_BAD_REQUEST",
1294
- "ERR_CANCELED",
1295
- "ERR_NOT_SUPPORT",
1296
- "ERR_INVALID_URL"
1297
- // eslint-disable-next-line func-names
1298
- ].forEach((e) => {
1299
- Xt[e] = { value: e };
1300
- });
1301
- Object.defineProperties(v, Xt);
1302
- Object.defineProperty(Qt, "isAxiosError", { value: !0 });
1303
- v.from = (e, t, r, n, o, s) => {
1304
- const i = Object.create(Qt);
1305
- return l.toFlatObject(e, i, function(f) {
1306
- return f !== Error.prototype;
1307
- }, (c) => c !== "isAxiosError"), v.call(i, e.message, t, r, n, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
1308
- };
1309
- const zn = null;
1310
- function We(e) {
1311
- return l.isPlainObject(e) || l.isArray(e);
1312
- }
1313
- function Zt(e) {
1314
- return l.endsWith(e, "[]") ? e.slice(0, -2) : e;
1315
- }
1316
- function xt(e, t, r) {
1317
- return e ? e.concat(t).map(function(o, s) {
1318
- return o = Zt(o), !r && s ? "[" + o + "]" : o;
1319
- }).join(r ? "." : "") : t;
1320
- }
1321
- function Wn(e) {
1322
- return l.isArray(e) && !e.some(We);
1323
- }
1324
- const Vn = l.toFlatObject(l, {}, null, function(t) {
1325
- return /^is[A-Z]/.test(t);
1326
- });
1327
- function Ae(e, t, r) {
1328
- if (!l.isObject(e))
1329
- throw new TypeError("target must be an object");
1330
- t = t || new FormData(), r = l.toFlatObject(r, {
1331
- metaTokens: !0,
1332
- dots: !1,
1333
- indexes: !1
1334
- }, !1, function(E, O) {
1335
- return !l.isUndefined(O[E]);
1336
- });
1337
- const n = r.metaTokens, o = r.visitor || u, s = r.dots, i = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(t);
1338
- if (!l.isFunction(o))
1339
- throw new TypeError("visitor must be a function");
1340
- function d(m) {
1341
- if (m === null) return "";
1342
- if (l.isDate(m))
1343
- return m.toISOString();
1344
- if (!f && l.isBlob(m))
1345
- throw new v("Blob is not supported. Use a Buffer instead.");
1346
- return l.isArrayBuffer(m) || l.isTypedArray(m) ? f && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
1347
- }
1348
- function u(m, E, O) {
1349
- let w = m;
1350
- if (m && !O && typeof m == "object") {
1351
- if (l.endsWith(E, "{}"))
1352
- E = n ? E : E.slice(0, -2), m = JSON.stringify(m);
1353
- else if (l.isArray(m) && Wn(m) || (l.isFileList(m) || l.endsWith(E, "[]")) && (w = l.toArray(m)))
1354
- return E = Zt(E), w.forEach(function(T, L) {
1355
- !(l.isUndefined(T) || T === null) && t.append(
1356
- // eslint-disable-next-line no-nested-ternary
1357
- i === !0 ? xt([E], L, s) : i === null ? E : E + "[]",
1358
- d(T)
1359
- );
1360
- }), !1;
1361
- }
1362
- return We(m) ? !0 : (t.append(xt(O, E, s), d(m)), !1);
1363
- }
1364
- const y = [], R = Object.assign(Vn, {
1365
- defaultVisitor: u,
1366
- convertValue: d,
1367
- isVisitable: We
1368
- });
1369
- function p(m, E) {
1370
- if (!l.isUndefined(m)) {
1371
- if (y.indexOf(m) !== -1)
1372
- throw Error("Circular reference detected in " + E.join("."));
1373
- y.push(m), l.forEach(m, function(w, S) {
1374
- (!(l.isUndefined(w) || w === null) && o.call(
1375
- t,
1376
- w,
1377
- l.isString(S) ? S.trim() : S,
1378
- E,
1379
- R
1380
- )) === !0 && p(w, E ? E.concat(S) : [S]);
1381
- }), y.pop();
1382
- }
1383
- }
1384
- if (!l.isObject(e))
1385
- throw new TypeError("data must be an object");
1386
- return p(e), t;
1387
- }
1388
- function jt(e) {
1389
- const t = {
1390
- "!": "%21",
1391
- "'": "%27",
1392
- "(": "%28",
1393
- ")": "%29",
1394
- "~": "%7E",
1395
- "%20": "+",
1396
- "%00": "\0"
1397
- };
1398
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
1399
- return t[n];
1400
- });
1401
- }
1402
- function Xe(e, t) {
1403
- this._pairs = [], e && Ae(e, this, t);
1404
- }
1405
- const er = Xe.prototype;
1406
- er.append = function(t, r) {
1407
- this._pairs.push([t, r]);
1408
- };
1409
- er.toString = function(t) {
1410
- const r = t ? function(n) {
1411
- return t.call(this, n, jt);
1412
- } : jt;
1413
- return this._pairs.map(function(o) {
1414
- return r(o[0]) + "=" + r(o[1]);
1415
- }, "").join("&");
1416
- };
1417
- function Hn(e) {
1418
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1419
- }
1420
- function tr(e, t, r) {
1421
- if (!t)
1422
- return e;
1423
- const n = r && r.encode || Hn, o = r && r.serialize;
1424
- let s;
1425
- if (o ? s = o(t, r) : s = l.isURLSearchParams(t) ? t.toString() : new Xe(t, r).toString(n), s) {
1426
- const i = e.indexOf("#");
1427
- i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
1428
- }
1429
- return e;
1430
- }
1431
- class Ft {
1432
- constructor() {
1433
- this.handlers = [];
1434
- }
1435
- /**
1436
- * Add a new interceptor to the stack
1437
- *
1438
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
1439
- * @param {Function} rejected The function to handle `reject` for a `Promise`
1440
- *
1441
- * @return {Number} An ID used to remove interceptor later
1442
- */
1443
- use(t, r, n) {
1444
- return this.handlers.push({
1445
- fulfilled: t,
1446
- rejected: r,
1447
- synchronous: n ? n.synchronous : !1,
1448
- runWhen: n ? n.runWhen : null
1449
- }), this.handlers.length - 1;
1450
- }
1451
- /**
1452
- * Remove an interceptor from the stack
1453
- *
1454
- * @param {Number} id The ID that was returned by `use`
1455
- *
1456
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1457
- */
1458
- eject(t) {
1459
- this.handlers[t] && (this.handlers[t] = null);
1460
- }
1461
- /**
1462
- * Clear all interceptors from the stack
1463
- *
1464
- * @returns {void}
1465
- */
1466
- clear() {
1467
- this.handlers && (this.handlers = []);
1468
- }
1469
- /**
1470
- * Iterate over all the registered interceptors
1471
- *
1472
- * This method is particularly useful for skipping over any
1473
- * interceptors that may have become `null` calling `eject`.
1474
- *
1475
- * @param {Function} fn The function to call for each interceptor
1476
- *
1477
- * @returns {void}
1478
- */
1479
- forEach(t) {
1480
- l.forEach(this.handlers, function(n) {
1481
- n !== null && t(n);
1482
- });
1483
- }
1484
- }
1485
- const rr = {
1486
- silentJSONParsing: !0,
1487
- forcedJSONParsing: !0,
1488
- clarifyTimeoutError: !1
1489
- }, Jn = typeof URLSearchParams < "u" ? URLSearchParams : Xe, Yn = typeof FormData < "u" ? FormData : null, Kn = typeof Blob < "u" ? Blob : null, Gn = {
1490
- isBrowser: !0,
1491
- classes: {
1492
- URLSearchParams: Jn,
1493
- FormData: Yn,
1494
- Blob: Kn
1495
- },
1496
- protocols: ["http", "https", "file", "blob", "url", "data"]
1497
- }, Ze = typeof window < "u" && typeof document < "u", Qn = ((e) => Ze && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Xn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1498
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Zn = Ze && window.location.href || "http://localhost", eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1499
- __proto__: null,
1500
- hasBrowserEnv: Ze,
1501
- hasStandardBrowserEnv: Qn,
1502
- hasStandardBrowserWebWorkerEnv: Xn,
1503
- origin: Zn
1504
- }, Symbol.toStringTag, { value: "Module" })), M = {
1505
- ...eo,
1506
- ...Gn
1507
- };
1508
- function to(e, t) {
1509
- return Ae(e, new M.classes.URLSearchParams(), Object.assign({
1510
- visitor: function(r, n, o, s) {
1511
- return M.isNode && l.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1512
- }
1513
- }, t));
1514
- }
1515
- function ro(e) {
1516
- return l.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1517
- }
1518
- function no(e) {
1519
- const t = {}, r = Object.keys(e);
1520
- let n;
1521
- const o = r.length;
1522
- let s;
1523
- for (n = 0; n < o; n++)
1524
- s = r[n], t[s] = e[s];
1525
- return t;
1526
- }
1527
- function nr(e) {
1528
- function t(r, n, o, s) {
1529
- let i = r[s++];
1530
- if (i === "__proto__") return !0;
1531
- const c = Number.isFinite(+i), f = s >= r.length;
1532
- return i = !i && l.isArray(o) ? o.length : i, f ? (l.hasOwnProp(o, i) ? o[i] = [o[i], n] : o[i] = n, !c) : ((!o[i] || !l.isObject(o[i])) && (o[i] = []), t(r, n, o[i], s) && l.isArray(o[i]) && (o[i] = no(o[i])), !c);
1533
- }
1534
- if (l.isFormData(e) && l.isFunction(e.entries)) {
1535
- const r = {};
1536
- return l.forEachEntry(e, (n, o) => {
1537
- t(ro(n), o, r, 0);
1538
- }), r;
1539
- }
1540
- return null;
1541
- }
1542
- function oo(e, t, r) {
1543
- if (l.isString(e))
1544
- try {
1545
- return (t || JSON.parse)(e), l.trim(e);
1546
- } catch (n) {
1547
- if (n.name !== "SyntaxError")
1548
- throw n;
1549
- }
1550
- return (r || JSON.stringify)(e);
1551
- }
1552
- const fe = {
1553
- transitional: rr,
1554
- adapter: ["xhr", "http", "fetch"],
1555
- transformRequest: [function(t, r) {
1556
- const n = r.getContentType() || "", o = n.indexOf("application/json") > -1, s = l.isObject(t);
1557
- if (s && l.isHTMLForm(t) && (t = new FormData(t)), l.isFormData(t))
1558
- return o ? JSON.stringify(nr(t)) : t;
1559
- if (l.isArrayBuffer(t) || l.isBuffer(t) || l.isStream(t) || l.isFile(t) || l.isBlob(t) || l.isReadableStream(t))
1560
- return t;
1561
- if (l.isArrayBufferView(t))
1562
- return t.buffer;
1563
- if (l.isURLSearchParams(t))
1564
- return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1565
- let c;
1566
- if (s) {
1567
- if (n.indexOf("application/x-www-form-urlencoded") > -1)
1568
- return to(t, this.formSerializer).toString();
1569
- if ((c = l.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
1570
- const f = this.env && this.env.FormData;
1571
- return Ae(
1572
- c ? { "files[]": t } : t,
1573
- f && new f(),
1574
- this.formSerializer
1575
- );
1576
- }
1577
- }
1578
- return s || o ? (r.setContentType("application/json", !1), oo(t)) : t;
1579
- }],
1580
- transformResponse: [function(t) {
1581
- const r = this.transitional || fe.transitional, n = r && r.forcedJSONParsing, o = this.responseType === "json";
1582
- if (l.isResponse(t) || l.isReadableStream(t))
1583
- return t;
1584
- if (t && l.isString(t) && (n && !this.responseType || o)) {
1585
- const i = !(r && r.silentJSONParsing) && o;
1586
- try {
1587
- return JSON.parse(t);
1588
- } catch (c) {
1589
- if (i)
1590
- throw c.name === "SyntaxError" ? v.from(c, v.ERR_BAD_RESPONSE, this, null, this.response) : c;
1591
- }
1592
- }
1593
- return t;
1594
- }],
1595
- /**
1596
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
1597
- * timeout is not created.
1598
- */
1599
- timeout: 0,
1600
- xsrfCookieName: "XSRF-TOKEN",
1601
- xsrfHeaderName: "X-XSRF-TOKEN",
1602
- maxContentLength: -1,
1603
- maxBodyLength: -1,
1604
- env: {
1605
- FormData: M.classes.FormData,
1606
- Blob: M.classes.Blob
1607
- },
1608
- validateStatus: function(t) {
1609
- return t >= 200 && t < 300;
1610
- },
1611
- headers: {
1612
- common: {
1613
- Accept: "application/json, text/plain, */*",
1614
- "Content-Type": void 0
1615
- }
1616
- }
1617
- };
1618
- l.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1619
- fe.headers[e] = {};
1620
- });
1621
- const so = l.toObjectSet([
1622
- "age",
1623
- "authorization",
1624
- "content-length",
1625
- "content-type",
1626
- "etag",
1627
- "expires",
1628
- "from",
1629
- "host",
1630
- "if-modified-since",
1631
- "if-unmodified-since",
1632
- "last-modified",
1633
- "location",
1634
- "max-forwards",
1635
- "proxy-authorization",
1636
- "referer",
1637
- "retry-after",
1638
- "user-agent"
1639
- ]), io = (e) => {
1640
- const t = {};
1641
- let r, n, o;
1642
- return e && e.split(`
1643
- `).forEach(function(i) {
1644
- o = i.indexOf(":"), r = i.substring(0, o).trim().toLowerCase(), n = i.substring(o + 1).trim(), !(!r || t[r] && so[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
1645
- }), t;
1646
- }, Nt = Symbol("internals");
1647
- function ce(e) {
1648
- return e && String(e).trim().toLowerCase();
1649
- }
1650
- function Re(e) {
1651
- return e === !1 || e == null ? e : l.isArray(e) ? e.map(Re) : String(e);
1652
- }
1653
- function ao(e) {
1654
- const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1655
- let n;
1656
- for (; n = r.exec(e); )
1657
- t[n[1]] = n[2];
1658
- return t;
1659
- }
1660
- const co = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1661
- function Be(e, t, r, n, o) {
1662
- if (l.isFunction(n))
1663
- return n.call(this, t, r);
1664
- if (o && (t = r), !!l.isString(t)) {
1665
- if (l.isString(n))
1666
- return t.indexOf(n) !== -1;
1667
- if (l.isRegExp(n))
1668
- return n.test(t);
1669
- }
1670
- }
1671
- function uo(e) {
1672
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
1673
- }
1674
- function lo(e, t) {
1675
- const r = l.toCamelCase(" " + t);
1676
- ["get", "set", "has"].forEach((n) => {
1677
- Object.defineProperty(e, n + r, {
1678
- value: function(o, s, i) {
1679
- return this[n].call(this, t, o, s, i);
1680
- },
1681
- configurable: !0
1682
- });
1683
- });
1684
- }
1685
- class I {
1686
- constructor(t) {
1687
- t && this.set(t);
1688
- }
1689
- set(t, r, n) {
1690
- const o = this;
1691
- function s(c, f, d) {
1692
- const u = ce(f);
1693
- if (!u)
1694
- throw new Error("header name must be a non-empty string");
1695
- const y = l.findKey(o, u);
1696
- (!y || o[y] === void 0 || d === !0 || d === void 0 && o[y] !== !1) && (o[y || f] = Re(c));
1697
- }
1698
- const i = (c, f) => l.forEach(c, (d, u) => s(d, u, f));
1699
- if (l.isPlainObject(t) || t instanceof this.constructor)
1700
- i(t, r);
1701
- else if (l.isString(t) && (t = t.trim()) && !co(t))
1702
- i(io(t), r);
1703
- else if (l.isHeaders(t))
1704
- for (const [c, f] of t.entries())
1705
- s(f, c, n);
1706
- else
1707
- t != null && s(r, t, n);
1708
- return this;
1709
- }
1710
- get(t, r) {
1711
- if (t = ce(t), t) {
1712
- const n = l.findKey(this, t);
1713
- if (n) {
1714
- const o = this[n];
1715
- if (!r)
1716
- return o;
1717
- if (r === !0)
1718
- return ao(o);
1719
- if (l.isFunction(r))
1720
- return r.call(this, o, n);
1721
- if (l.isRegExp(r))
1722
- return r.exec(o);
1723
- throw new TypeError("parser must be boolean|regexp|function");
1724
- }
1725
- }
1726
- }
1727
- has(t, r) {
1728
- if (t = ce(t), t) {
1729
- const n = l.findKey(this, t);
1730
- return !!(n && this[n] !== void 0 && (!r || Be(this, this[n], n, r)));
1731
- }
1732
- return !1;
1733
- }
1734
- delete(t, r) {
1735
- const n = this;
1736
- let o = !1;
1737
- function s(i) {
1738
- if (i = ce(i), i) {
1739
- const c = l.findKey(n, i);
1740
- c && (!r || Be(n, n[c], c, r)) && (delete n[c], o = !0);
1741
- }
1742
- }
1743
- return l.isArray(t) ? t.forEach(s) : s(t), o;
1744
- }
1745
- clear(t) {
1746
- const r = Object.keys(this);
1747
- let n = r.length, o = !1;
1748
- for (; n--; ) {
1749
- const s = r[n];
1750
- (!t || Be(this, this[s], s, t, !0)) && (delete this[s], o = !0);
1751
- }
1752
- return o;
1753
- }
1754
- normalize(t) {
1755
- const r = this, n = {};
1756
- return l.forEach(this, (o, s) => {
1757
- const i = l.findKey(n, s);
1758
- if (i) {
1759
- r[i] = Re(o), delete r[s];
1760
- return;
1761
- }
1762
- const c = t ? uo(s) : String(s).trim();
1763
- c !== s && delete r[s], r[c] = Re(o), n[c] = !0;
1764
- }), this;
1765
- }
1766
- concat(...t) {
1767
- return this.constructor.concat(this, ...t);
1768
- }
1769
- toJSON(t) {
1770
- const r = /* @__PURE__ */ Object.create(null);
1771
- return l.forEach(this, (n, o) => {
1772
- n != null && n !== !1 && (r[o] = t && l.isArray(n) ? n.join(", ") : n);
1773
- }), r;
1774
- }
1775
- [Symbol.iterator]() {
1776
- return Object.entries(this.toJSON())[Symbol.iterator]();
1777
- }
1778
- toString() {
1779
- return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
1780
- `);
1781
- }
1782
- get [Symbol.toStringTag]() {
1783
- return "AxiosHeaders";
1784
- }
1785
- static from(t) {
1786
- return t instanceof this ? t : new this(t);
1787
- }
1788
- static concat(t, ...r) {
1789
- const n = new this(t);
1790
- return r.forEach((o) => n.set(o)), n;
1791
- }
1792
- static accessor(t) {
1793
- const n = (this[Nt] = this[Nt] = {
1794
- accessors: {}
1795
- }).accessors, o = this.prototype;
1796
- function s(i) {
1797
- const c = ce(i);
1798
- n[c] || (lo(o, i), n[c] = !0);
1799
- }
1800
- return l.isArray(t) ? t.forEach(s) : s(t), this;
1801
- }
1802
- }
1803
- I.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1804
- l.reduceDescriptors(I.prototype, ({ value: e }, t) => {
1805
- let r = t[0].toUpperCase() + t.slice(1);
1806
- return {
1807
- get: () => e,
1808
- set(n) {
1809
- this[r] = n;
1810
- }
1811
- };
1812
- });
1813
- l.freezeMethods(I);
1814
- function $e(e, t) {
1815
- const r = this || fe, n = t || r, o = I.from(n.headers);
1816
- let s = n.data;
1817
- return l.forEach(e, function(c) {
1818
- s = c.call(r, s, o.normalize(), t ? t.status : void 0);
1819
- }), o.normalize(), s;
1820
- }
1821
- function or(e) {
1822
- return !!(e && e.__CANCEL__);
1823
- }
1824
- function re(e, t, r) {
1825
- v.call(this, e ?? "canceled", v.ERR_CANCELED, t, r), this.name = "CanceledError";
1826
- }
1827
- l.inherits(re, v, {
1828
- __CANCEL__: !0
1829
- });
1830
- function sr(e, t, r) {
1831
- const n = r.config.validateStatus;
1832
- !r.status || !n || n(r.status) ? e(r) : t(new v(
1833
- "Request failed with status code " + r.status,
1834
- [v.ERR_BAD_REQUEST, v.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
1835
- r.config,
1836
- r.request,
1837
- r
1838
- ));
1839
- }
1840
- function fo(e) {
1841
- const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1842
- return t && t[1] || "";
1843
- }
1844
- function ho(e, t) {
1845
- e = e || 10;
1846
- const r = new Array(e), n = new Array(e);
1847
- let o = 0, s = 0, i;
1848
- return t = t !== void 0 ? t : 1e3, function(f) {
1849
- const d = Date.now(), u = n[s];
1850
- i || (i = d), r[o] = f, n[o] = d;
1851
- let y = s, R = 0;
1852
- for (; y !== o; )
1853
- R += r[y++], y = y % e;
1854
- if (o = (o + 1) % e, o === s && (s = (s + 1) % e), d - i < t)
1855
- return;
1856
- const p = u && d - u;
1857
- return p ? Math.round(R * 1e3 / p) : void 0;
1858
- };
1859
- }
1860
- function po(e, t) {
1861
- let r = 0;
1862
- const n = 1e3 / t;
1863
- let o = null;
1864
- return function() {
1865
- const i = this === !0, c = Date.now();
1866
- if (i || c - r > n)
1867
- return o && (clearTimeout(o), o = null), r = c, e.apply(null, arguments);
1868
- o || (o = setTimeout(() => (o = null, r = Date.now(), e.apply(null, arguments)), n - (c - r)));
1869
- };
1870
- }
1871
- const ve = (e, t, r = 3) => {
1872
- let n = 0;
1873
- const o = ho(50, 250);
1874
- return po((s) => {
1875
- const i = s.loaded, c = s.lengthComputable ? s.total : void 0, f = i - n, d = o(f), u = i <= c;
1876
- n = i;
1877
- const y = {
1878
- loaded: i,
1879
- total: c,
1880
- progress: c ? i / c : void 0,
1881
- bytes: f,
1882
- rate: d || void 0,
1883
- estimated: d && c && u ? (c - i) / d : void 0,
1884
- event: s,
1885
- lengthComputable: c != null
1886
- };
1887
- y[t ? "download" : "upload"] = !0, e(y);
1888
- }, r);
1889
- }, mo = M.hasStandardBrowserEnv ? (
1890
- // Standard browser envs have full support of the APIs needed to test
1891
- // whether the request URL is of the same origin as current location.
1892
- function() {
1893
- const t = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a");
1894
- let n;
1895
- function o(s) {
1896
- let i = s;
1897
- return t && (r.setAttribute("href", i), i = r.href), r.setAttribute("href", i), {
1898
- href: r.href,
1899
- protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
1900
- host: r.host,
1901
- search: r.search ? r.search.replace(/^\?/, "") : "",
1902
- hash: r.hash ? r.hash.replace(/^#/, "") : "",
1903
- hostname: r.hostname,
1904
- port: r.port,
1905
- pathname: r.pathname.charAt(0) === "/" ? r.pathname : "/" + r.pathname
1906
- };
1907
- }
1908
- return n = o(window.location.href), function(i) {
1909
- const c = l.isString(i) ? o(i) : i;
1910
- return c.protocol === n.protocol && c.host === n.host;
1911
- };
1912
- }()
1913
- ) : (
1914
- // Non standard browser envs (web workers, react-native) lack needed support.
1915
- /* @__PURE__ */ function() {
1916
- return function() {
1917
- return !0;
1918
- };
1919
- }()
1920
- ), yo = M.hasStandardBrowserEnv ? (
1921
- // Standard browser envs support document.cookie
1922
- {
1923
- write(e, t, r, n, o, s) {
1924
- const i = [e + "=" + encodeURIComponent(t)];
1925
- l.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), l.isString(n) && i.push("path=" + n), l.isString(o) && i.push("domain=" + o), s === !0 && i.push("secure"), document.cookie = i.join("; ");
1926
- },
1927
- read(e) {
1928
- const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
1929
- return t ? decodeURIComponent(t[3]) : null;
1930
- },
1931
- remove(e) {
1932
- this.write(e, "", Date.now() - 864e5);
1933
- }
1934
- }
1935
- ) : (
1936
- // Non-standard browser env (web workers, react-native) lack needed support.
1937
- {
1938
- write() {
1939
- },
1940
- read() {
1941
- return null;
1942
- },
1943
- remove() {
1944
- }
1945
- }
1946
- );
1947
- function go(e) {
1948
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1949
- }
1950
- function Eo(e, t) {
1951
- return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1952
- }
1953
- function ir(e, t) {
1954
- return e && !go(t) ? Eo(e, t) : t;
1955
- }
1956
- const Dt = (e) => e instanceof I ? { ...e } : e;
1957
- function Q(e, t) {
1958
- t = t || {};
1959
- const r = {};
1960
- function n(d, u, y) {
1961
- return l.isPlainObject(d) && l.isPlainObject(u) ? l.merge.call({ caseless: y }, d, u) : l.isPlainObject(u) ? l.merge({}, u) : l.isArray(u) ? u.slice() : u;
1962
- }
1963
- function o(d, u, y) {
1964
- if (l.isUndefined(u)) {
1965
- if (!l.isUndefined(d))
1966
- return n(void 0, d, y);
1967
- } else return n(d, u, y);
1968
- }
1969
- function s(d, u) {
1970
- if (!l.isUndefined(u))
1971
- return n(void 0, u);
1972
- }
1973
- function i(d, u) {
1974
- if (l.isUndefined(u)) {
1975
- if (!l.isUndefined(d))
1976
- return n(void 0, d);
1977
- } else return n(void 0, u);
1978
- }
1979
- function c(d, u, y) {
1980
- if (y in t)
1981
- return n(d, u);
1982
- if (y in e)
1983
- return n(void 0, d);
1984
- }
1985
- const f = {
1986
- url: s,
1987
- method: s,
1988
- data: s,
1989
- baseURL: i,
1990
- transformRequest: i,
1991
- transformResponse: i,
1992
- paramsSerializer: i,
1993
- timeout: i,
1994
- timeoutMessage: i,
1995
- withCredentials: i,
1996
- withXSRFToken: i,
1997
- adapter: i,
1998
- responseType: i,
1999
- xsrfCookieName: i,
2000
- xsrfHeaderName: i,
2001
- onUploadProgress: i,
2002
- onDownloadProgress: i,
2003
- decompress: i,
2004
- maxContentLength: i,
2005
- maxBodyLength: i,
2006
- beforeRedirect: i,
2007
- transport: i,
2008
- httpAgent: i,
2009
- httpsAgent: i,
2010
- cancelToken: i,
2011
- socketPath: i,
2012
- responseEncoding: i,
2013
- validateStatus: c,
2014
- headers: (d, u) => o(Dt(d), Dt(u), !0)
2015
- };
2016
- return l.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
2017
- const y = f[u] || o, R = y(e[u], t[u], u);
2018
- l.isUndefined(R) && y !== c || (r[u] = R);
2019
- }), r;
2020
- }
2021
- const ar = (e) => {
2022
- const t = Q({}, e);
2023
- let { data: r, withXSRFToken: n, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: c } = t;
2024
- t.headers = i = I.from(i), t.url = tr(ir(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
2025
- "Authorization",
2026
- "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
2027
- );
2028
- let f;
2029
- if (l.isFormData(r)) {
2030
- if (M.hasStandardBrowserEnv || M.hasStandardBrowserWebWorkerEnv)
2031
- i.setContentType(void 0);
2032
- else if ((f = i.getContentType()) !== !1) {
2033
- const [d, ...u] = f ? f.split(";").map((y) => y.trim()).filter(Boolean) : [];
2034
- i.setContentType([d || "multipart/form-data", ...u].join("; "));
2035
- }
2036
- }
2037
- if (M.hasStandardBrowserEnv && (n && l.isFunction(n) && (n = n(t)), n || n !== !1 && mo(t.url))) {
2038
- const d = o && s && yo.read(s);
2039
- d && i.set(o, d);
2040
- }
2041
- return t;
2042
- }, wo = typeof XMLHttpRequest < "u", Ro = wo && function(e) {
2043
- return new Promise(function(r, n) {
2044
- const o = ar(e);
2045
- let s = o.data;
2046
- const i = I.from(o.headers).normalize();
2047
- let { responseType: c } = o, f;
2048
- function d() {
2049
- o.cancelToken && o.cancelToken.unsubscribe(f), o.signal && o.signal.removeEventListener("abort", f);
2050
- }
2051
- let u = new XMLHttpRequest();
2052
- u.open(o.method.toUpperCase(), o.url, !0), u.timeout = o.timeout;
2053
- function y() {
2054
- if (!u)
2055
- return;
2056
- const p = I.from(
2057
- "getAllResponseHeaders" in u && u.getAllResponseHeaders()
2058
- ), E = {
2059
- data: !c || c === "text" || c === "json" ? u.responseText : u.response,
2060
- status: u.status,
2061
- statusText: u.statusText,
2062
- headers: p,
2063
- config: e,
2064
- request: u
2065
- };
2066
- sr(function(w) {
2067
- r(w), d();
2068
- }, function(w) {
2069
- n(w), d();
2070
- }, E), u = null;
2071
- }
2072
- "onloadend" in u ? u.onloadend = y : u.onreadystatechange = function() {
2073
- !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(y);
2074
- }, u.onabort = function() {
2075
- u && (n(new v("Request aborted", v.ECONNABORTED, o, u)), u = null);
2076
- }, u.onerror = function() {
2077
- n(new v("Network Error", v.ERR_NETWORK, o, u)), u = null;
2078
- }, u.ontimeout = function() {
2079
- let m = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
2080
- const E = o.transitional || rr;
2081
- o.timeoutErrorMessage && (m = o.timeoutErrorMessage), n(new v(
2082
- m,
2083
- E.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
2084
- o,
2085
- u
2086
- )), u = null;
2087
- }, s === void 0 && i.setContentType(null), "setRequestHeader" in u && l.forEach(i.toJSON(), function(m, E) {
2088
- u.setRequestHeader(E, m);
2089
- }), l.isUndefined(o.withCredentials) || (u.withCredentials = !!o.withCredentials), c && c !== "json" && (u.responseType = o.responseType), typeof o.onDownloadProgress == "function" && u.addEventListener("progress", ve(o.onDownloadProgress, !0)), typeof o.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", ve(o.onUploadProgress)), (o.cancelToken || o.signal) && (f = (p) => {
2090
- u && (n(!p || p.type ? new re(null, e, u) : p), u.abort(), u = null);
2091
- }, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
2092
- const R = fo(o.url);
2093
- if (R && M.protocols.indexOf(R) === -1) {
2094
- n(new v("Unsupported protocol " + R + ":", v.ERR_BAD_REQUEST, e));
2095
- return;
2096
- }
2097
- u.send(s || null);
2098
- });
2099
- }, bo = (e, t) => {
2100
- let r = new AbortController(), n;
2101
- const o = function(f) {
2102
- if (!n) {
2103
- n = !0, i();
2104
- const d = f instanceof Error ? f : this.reason;
2105
- r.abort(d instanceof v ? d : new re(d instanceof Error ? d.message : d));
2106
- }
2107
- };
2108
- let s = t && setTimeout(() => {
2109
- o(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
2110
- }, t);
2111
- const i = () => {
2112
- e && (s && clearTimeout(s), s = null, e.forEach((f) => {
2113
- f && (f.removeEventListener ? f.removeEventListener("abort", o) : f.unsubscribe(o));
2114
- }), e = null);
2115
- };
2116
- e.forEach((f) => f && f.addEventListener && f.addEventListener("abort", o));
2117
- const { signal: c } = r;
2118
- return c.unsubscribe = i, [c, () => {
2119
- s && clearTimeout(s), s = null;
2120
- }];
2121
- }, vo = function* (e, t) {
2122
- let r = e.byteLength;
2123
- if (!t || r < t) {
2124
- yield e;
2125
- return;
2126
- }
2127
- let n = 0, o;
2128
- for (; n < r; )
2129
- o = n + t, yield e.slice(n, o), n = o;
2130
- }, So = async function* (e, t, r) {
2131
- for await (const n of e)
2132
- yield* vo(ArrayBuffer.isView(n) ? n : await r(String(n)), t);
2133
- }, Lt = (e, t, r, n, o) => {
2134
- const s = So(e, t, o);
2135
- let i = 0;
2136
- return new ReadableStream({
2137
- type: "bytes",
2138
- async pull(c) {
2139
- const { done: f, value: d } = await s.next();
2140
- if (f) {
2141
- c.close(), n();
2142
- return;
2143
- }
2144
- let u = d.byteLength;
2145
- r && r(i += u), c.enqueue(new Uint8Array(d));
2146
- },
2147
- cancel(c) {
2148
- return n(c), s.return();
2149
- }
2150
- }, {
2151
- highWaterMark: 2
2152
- });
2153
- }, kt = (e, t) => {
2154
- const r = e != null;
2155
- return (n) => setTimeout(() => t({
2156
- lengthComputable: r,
2157
- total: e,
2158
- loaded: n
2159
- }));
2160
- }, Ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", cr = Ce && typeof ReadableStream == "function", Ve = Ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Oo = cr && (() => {
2161
- let e = !1;
2162
- const t = new Request(M.origin, {
2163
- body: new ReadableStream(),
2164
- method: "POST",
2165
- get duplex() {
2166
- return e = !0, "half";
2167
- }
2168
- }).headers.has("Content-Type");
2169
- return e && !t;
2170
- })(), It = 64 * 1024, He = cr && !!(() => {
2171
- try {
2172
- return l.isReadableStream(new Response("").body);
2173
- } catch {
2174
- }
2175
- })(), Se = {
2176
- stream: He && ((e) => e.body)
2177
- };
2178
- Ce && ((e) => {
2179
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
2180
- !Se[t] && (Se[t] = l.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
2181
- throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, n);
2182
- });
2183
- });
2184
- })(new Response());
2185
- const To = async (e) => {
2186
- if (e == null)
2187
- return 0;
2188
- if (l.isBlob(e))
2189
- return e.size;
2190
- if (l.isSpecCompliantForm(e))
2191
- return (await new Request(e).arrayBuffer()).byteLength;
2192
- if (l.isArrayBufferView(e))
2193
- return e.byteLength;
2194
- if (l.isURLSearchParams(e) && (e = e + ""), l.isString(e))
2195
- return (await Ve(e)).byteLength;
2196
- }, _o = async (e, t) => {
2197
- const r = l.toFiniteNumber(e.getContentLength());
2198
- return r ?? To(t);
2199
- }, Ao = Ce && (async (e) => {
2200
- let {
2201
- url: t,
2202
- method: r,
2203
- data: n,
2204
- signal: o,
2205
- cancelToken: s,
2206
- timeout: i,
2207
- onDownloadProgress: c,
2208
- onUploadProgress: f,
2209
- responseType: d,
2210
- headers: u,
2211
- withCredentials: y = "same-origin",
2212
- fetchOptions: R
2213
- } = ar(e);
2214
- d = d ? (d + "").toLowerCase() : "text";
2215
- let [p, m] = o || s || i ? bo([o, s], i) : [], E, O;
2216
- const w = () => {
2217
- !E && setTimeout(() => {
2218
- p && p.unsubscribe();
2219
- }), E = !0;
2220
- };
2221
- let S;
2222
- try {
2223
- if (f && Oo && r !== "get" && r !== "head" && (S = await _o(u, n)) !== 0) {
2224
- let D = new Request(t, {
2225
- method: "POST",
2226
- body: n,
2227
- duplex: "half"
2228
- }), x;
2229
- l.isFormData(n) && (x = D.headers.get("content-type")) && u.setContentType(x), D.body && (n = Lt(D.body, It, kt(
2230
- S,
2231
- ve(f)
2232
- ), null, Ve));
2233
- }
2234
- l.isString(y) || (y = y ? "cors" : "omit"), O = new Request(t, {
2235
- ...R,
2236
- signal: p,
2237
- method: r.toUpperCase(),
2238
- headers: u.normalize().toJSON(),
2239
- body: n,
2240
- duplex: "half",
2241
- withCredentials: y
2242
- });
2243
- let T = await fetch(O);
2244
- const L = He && (d === "stream" || d === "response");
2245
- if (He && (c || L)) {
2246
- const D = {};
2247
- ["status", "statusText", "headers"].forEach((ne) => {
2248
- D[ne] = T[ne];
2249
- });
2250
- const x = l.toFiniteNumber(T.headers.get("content-length"));
2251
- T = new Response(
2252
- Lt(T.body, It, c && kt(
2253
- x,
2254
- ve(c, !0)
2255
- ), L && w, Ve),
2256
- D
2257
- );
2258
- }
2259
- d = d || "text";
2260
- let U = await Se[l.findKey(Se, d) || "text"](T, e);
2261
- return !L && w(), m && m(), await new Promise((D, x) => {
2262
- sr(D, x, {
2263
- data: U,
2264
- headers: I.from(T.headers),
2265
- status: T.status,
2266
- statusText: T.statusText,
2267
- config: e,
2268
- request: O
2269
- });
2270
- });
2271
- } catch (T) {
2272
- throw w(), T && T.name === "TypeError" && /fetch/i.test(T.message) ? Object.assign(
2273
- new v("Network Error", v.ERR_NETWORK, e, O),
2274
- {
2275
- cause: T.cause || T
2276
- }
2277
- ) : v.from(T, T && T.code, e, O);
2278
- }
2279
- }), Je = {
2280
- http: zn,
2281
- xhr: Ro,
2282
- fetch: Ao
2283
- };
2284
- l.forEach(Je, (e, t) => {
2285
- if (e) {
2286
- try {
2287
- Object.defineProperty(e, "name", { value: t });
2288
- } catch {
2289
- }
2290
- Object.defineProperty(e, "adapterName", { value: t });
2291
- }
2292
- });
2293
- const Ut = (e) => `- ${e}`, Co = (e) => l.isFunction(e) || e === null || e === !1, ur = {
2294
- getAdapter: (e) => {
2295
- e = l.isArray(e) ? e : [e];
2296
- const { length: t } = e;
2297
- let r, n;
2298
- const o = {};
2299
- for (let s = 0; s < t; s++) {
2300
- r = e[s];
2301
- let i;
2302
- if (n = r, !Co(r) && (n = Je[(i = String(r)).toLowerCase()], n === void 0))
2303
- throw new v(`Unknown adapter '${i}'`);
2304
- if (n)
2305
- break;
2306
- o[i || "#" + s] = n;
2307
- }
2308
- if (!n) {
2309
- const s = Object.entries(o).map(
2310
- ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
2311
- );
2312
- let i = t ? s.length > 1 ? `since :
2313
- ` + s.map(Ut).join(`
2314
- `) : " " + Ut(s[0]) : "as no adapter specified";
2315
- throw new v(
2316
- "There is no suitable adapter to dispatch the request " + i,
2317
- "ERR_NOT_SUPPORT"
2318
- );
2319
- }
2320
- return n;
2321
- },
2322
- adapters: Je
2323
- };
2324
- function qe(e) {
2325
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
2326
- throw new re(null, e);
2327
- }
2328
- function Bt(e) {
2329
- return qe(e), e.headers = I.from(e.headers), e.data = $e.call(
2330
- e,
2331
- e.transformRequest
2332
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ur.getAdapter(e.adapter || fe.adapter)(e).then(function(n) {
2333
- return qe(e), n.data = $e.call(
2334
- e,
2335
- e.transformResponse,
2336
- n
2337
- ), n.headers = I.from(n.headers), n;
2338
- }, function(n) {
2339
- return or(n) || (qe(e), n && n.response && (n.response.data = $e.call(
2340
- e,
2341
- e.transformResponse,
2342
- n.response
2343
- ), n.response.headers = I.from(n.response.headers))), Promise.reject(n);
2344
- });
2345
- }
2346
- const lr = "1.7.2", et = {};
2347
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
2348
- et[e] = function(n) {
2349
- return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
2350
- };
2351
- });
2352
- const $t = {};
2353
- et.transitional = function(t, r, n) {
2354
- function o(s, i) {
2355
- return "[Axios v" + lr + "] Transitional option '" + s + "'" + i + (n ? ". " + n : "");
2356
- }
2357
- return (s, i, c) => {
2358
- if (t === !1)
2359
- throw new v(
2360
- o(i, " has been removed" + (r ? " in " + r : "")),
2361
- v.ERR_DEPRECATED
2362
- );
2363
- return r && !$t[i] && ($t[i] = !0, console.warn(
2364
- o(
2365
- i,
2366
- " has been deprecated since v" + r + " and will be removed in the near future"
2367
- )
2368
- )), t ? t(s, i, c) : !0;
2369
- };
2370
- };
2371
- function Po(e, t, r) {
2372
- if (typeof e != "object")
2373
- throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
2374
- const n = Object.keys(e);
2375
- let o = n.length;
2376
- for (; o-- > 0; ) {
2377
- const s = n[o], i = t[s];
2378
- if (i) {
2379
- const c = e[s], f = c === void 0 || i(c, s, e);
2380
- if (f !== !0)
2381
- throw new v("option " + s + " must be " + f, v.ERR_BAD_OPTION_VALUE);
2382
- continue;
2383
- }
2384
- if (r !== !0)
2385
- throw new v("Unknown option " + s, v.ERR_BAD_OPTION);
2386
- }
2387
- }
2388
- const Ye = {
2389
- assertOptions: Po,
2390
- validators: et
2391
- }, Y = Ye.validators;
2392
- class G {
2393
- constructor(t) {
2394
- this.defaults = t, this.interceptors = {
2395
- request: new Ft(),
2396
- response: new Ft()
2397
- };
2398
- }
2399
- /**
2400
- * Dispatch a request
2401
- *
2402
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2403
- * @param {?Object} config
2404
- *
2405
- * @returns {Promise} The Promise to be fulfilled
2406
- */
2407
- async request(t, r) {
2408
- try {
2409
- return await this._request(t, r);
2410
- } catch (n) {
2411
- if (n instanceof Error) {
2412
- let o;
2413
- Error.captureStackTrace ? Error.captureStackTrace(o = {}) : o = new Error();
2414
- const s = o.stack ? o.stack.replace(/^.+\n/, "") : "";
2415
- try {
2416
- n.stack ? s && !String(n.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (n.stack += `
2417
- ` + s) : n.stack = s;
2418
- } catch {
2419
- }
2420
- }
2421
- throw n;
2422
- }
2423
- }
2424
- _request(t, r) {
2425
- typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = Q(this.defaults, r);
2426
- const { transitional: n, paramsSerializer: o, headers: s } = r;
2427
- n !== void 0 && Ye.assertOptions(n, {
2428
- silentJSONParsing: Y.transitional(Y.boolean),
2429
- forcedJSONParsing: Y.transitional(Y.boolean),
2430
- clarifyTimeoutError: Y.transitional(Y.boolean)
2431
- }, !1), o != null && (l.isFunction(o) ? r.paramsSerializer = {
2432
- serialize: o
2433
- } : Ye.assertOptions(o, {
2434
- encode: Y.function,
2435
- serialize: Y.function
2436
- }, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
2437
- let i = s && l.merge(
2438
- s.common,
2439
- s[r.method]
2440
- );
2441
- s && l.forEach(
2442
- ["delete", "get", "head", "post", "put", "patch", "common"],
2443
- (m) => {
2444
- delete s[m];
2445
- }
2446
- ), r.headers = I.concat(i, s);
2447
- const c = [];
2448
- let f = !0;
2449
- this.interceptors.request.forEach(function(E) {
2450
- typeof E.runWhen == "function" && E.runWhen(r) === !1 || (f = f && E.synchronous, c.unshift(E.fulfilled, E.rejected));
2451
- });
2452
- const d = [];
2453
- this.interceptors.response.forEach(function(E) {
2454
- d.push(E.fulfilled, E.rejected);
2455
- });
2456
- let u, y = 0, R;
2457
- if (!f) {
2458
- const m = [Bt.bind(this), void 0];
2459
- for (m.unshift.apply(m, c), m.push.apply(m, d), R = m.length, u = Promise.resolve(r); y < R; )
2460
- u = u.then(m[y++], m[y++]);
2461
- return u;
2462
- }
2463
- R = c.length;
2464
- let p = r;
2465
- for (y = 0; y < R; ) {
2466
- const m = c[y++], E = c[y++];
2467
- try {
2468
- p = m(p);
2469
- } catch (O) {
2470
- E.call(this, O);
2471
- break;
2472
- }
2473
- }
2474
- try {
2475
- u = Bt.call(this, p);
2476
- } catch (m) {
2477
- return Promise.reject(m);
2478
- }
2479
- for (y = 0, R = d.length; y < R; )
2480
- u = u.then(d[y++], d[y++]);
2481
- return u;
2482
- }
2483
- getUri(t) {
2484
- t = Q(this.defaults, t);
2485
- const r = ir(t.baseURL, t.url);
2486
- return tr(r, t.params, t.paramsSerializer);
2487
- }
2488
- }
2489
- l.forEach(["delete", "get", "head", "options"], function(t) {
2490
- G.prototype[t] = function(r, n) {
2491
- return this.request(Q(n || {}, {
2492
- method: t,
2493
- url: r,
2494
- data: (n || {}).data
2495
- }));
2496
- };
2497
- });
2498
- l.forEach(["post", "put", "patch"], function(t) {
2499
- function r(n) {
2500
- return function(s, i, c) {
2501
- return this.request(Q(c || {}, {
2502
- method: t,
2503
- headers: n ? {
2504
- "Content-Type": "multipart/form-data"
2505
- } : {},
2506
- url: s,
2507
- data: i
2508
- }));
2509
- };
2510
- }
2511
- G.prototype[t] = r(), G.prototype[t + "Form"] = r(!0);
2512
- });
2513
- class tt {
2514
- constructor(t) {
2515
- if (typeof t != "function")
2516
- throw new TypeError("executor must be a function.");
2517
- let r;
2518
- this.promise = new Promise(function(s) {
2519
- r = s;
2520
- });
2521
- const n = this;
2522
- this.promise.then((o) => {
2523
- if (!n._listeners) return;
2524
- let s = n._listeners.length;
2525
- for (; s-- > 0; )
2526
- n._listeners[s](o);
2527
- n._listeners = null;
2528
- }), this.promise.then = (o) => {
2529
- let s;
2530
- const i = new Promise((c) => {
2531
- n.subscribe(c), s = c;
2532
- }).then(o);
2533
- return i.cancel = function() {
2534
- n.unsubscribe(s);
2535
- }, i;
2536
- }, t(function(s, i, c) {
2537
- n.reason || (n.reason = new re(s, i, c), r(n.reason));
2538
- });
2539
- }
2540
- /**
2541
- * Throws a `CanceledError` if cancellation has been requested.
2542
- */
2543
- throwIfRequested() {
2544
- if (this.reason)
2545
- throw this.reason;
2546
- }
2547
- /**
2548
- * Subscribe to the cancel signal
2549
- */
2550
- subscribe(t) {
2551
- if (this.reason) {
2552
- t(this.reason);
2553
- return;
2554
- }
2555
- this._listeners ? this._listeners.push(t) : this._listeners = [t];
2556
- }
2557
- /**
2558
- * Unsubscribe from the cancel signal
2559
- */
2560
- unsubscribe(t) {
2561
- if (!this._listeners)
2562
- return;
2563
- const r = this._listeners.indexOf(t);
2564
- r !== -1 && this._listeners.splice(r, 1);
2565
- }
2566
- /**
2567
- * Returns an object that contains a new `CancelToken` and a function that, when called,
2568
- * cancels the `CancelToken`.
2569
- */
2570
- static source() {
2571
- let t;
2572
- return {
2573
- token: new tt(function(o) {
2574
- t = o;
2575
- }),
2576
- cancel: t
2577
- };
2578
- }
2579
- }
2580
- function xo(e) {
2581
- return function(r) {
2582
- return e.apply(null, r);
2583
- };
2584
- }
2585
- function jo(e) {
2586
- return l.isObject(e) && e.isAxiosError === !0;
2587
- }
2588
- const Ke = {
2589
- Continue: 100,
2590
- SwitchingProtocols: 101,
2591
- Processing: 102,
2592
- EarlyHints: 103,
2593
- Ok: 200,
2594
- Created: 201,
2595
- Accepted: 202,
2596
- NonAuthoritativeInformation: 203,
2597
- NoContent: 204,
2598
- ResetContent: 205,
2599
- PartialContent: 206,
2600
- MultiStatus: 207,
2601
- AlreadyReported: 208,
2602
- ImUsed: 226,
2603
- MultipleChoices: 300,
2604
- MovedPermanently: 301,
2605
- Found: 302,
2606
- SeeOther: 303,
2607
- NotModified: 304,
2608
- UseProxy: 305,
2609
- Unused: 306,
2610
- TemporaryRedirect: 307,
2611
- PermanentRedirect: 308,
2612
- BadRequest: 400,
2613
- Unauthorized: 401,
2614
- PaymentRequired: 402,
2615
- Forbidden: 403,
2616
- NotFound: 404,
2617
- MethodNotAllowed: 405,
2618
- NotAcceptable: 406,
2619
- ProxyAuthenticationRequired: 407,
2620
- RequestTimeout: 408,
2621
- Conflict: 409,
2622
- Gone: 410,
2623
- LengthRequired: 411,
2624
- PreconditionFailed: 412,
2625
- PayloadTooLarge: 413,
2626
- UriTooLong: 414,
2627
- UnsupportedMediaType: 415,
2628
- RangeNotSatisfiable: 416,
2629
- ExpectationFailed: 417,
2630
- ImATeapot: 418,
2631
- MisdirectedRequest: 421,
2632
- UnprocessableEntity: 422,
2633
- Locked: 423,
2634
- FailedDependency: 424,
2635
- TooEarly: 425,
2636
- UpgradeRequired: 426,
2637
- PreconditionRequired: 428,
2638
- TooManyRequests: 429,
2639
- RequestHeaderFieldsTooLarge: 431,
2640
- UnavailableForLegalReasons: 451,
2641
- InternalServerError: 500,
2642
- NotImplemented: 501,
2643
- BadGateway: 502,
2644
- ServiceUnavailable: 503,
2645
- GatewayTimeout: 504,
2646
- HttpVersionNotSupported: 505,
2647
- VariantAlsoNegotiates: 506,
2648
- InsufficientStorage: 507,
2649
- LoopDetected: 508,
2650
- NotExtended: 510,
2651
- NetworkAuthenticationRequired: 511
2652
- };
2653
- Object.entries(Ke).forEach(([e, t]) => {
2654
- Ke[t] = e;
2655
- });
2656
- function fr(e) {
2657
- const t = new G(e), r = zt(G.prototype.request, t);
2658
- return l.extend(r, G.prototype, t, { allOwnKeys: !0 }), l.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(o) {
2659
- return fr(Q(e, o));
2660
- }, r;
2661
- }
2662
- const F = fr(fe);
2663
- F.Axios = G;
2664
- F.CanceledError = re;
2665
- F.CancelToken = tt;
2666
- F.isCancel = or;
2667
- F.VERSION = lr;
2668
- F.toFormData = Ae;
2669
- F.AxiosError = v;
2670
- F.Cancel = F.CanceledError;
2671
- F.all = function(t) {
2672
- return Promise.all(t);
2673
- };
2674
- F.spread = xo;
2675
- F.isAxiosError = jo;
2676
- F.mergeConfig = Q;
2677
- F.AxiosHeaders = I;
2678
- F.formToJSON = (e) => nr(l.isHTMLForm(e) ? new FormData(e) : e);
2679
- F.getAdapter = ur.getAdapter;
2680
- F.HttpStatusCode = Ke;
2681
- F.default = F;
2682
- const Go = (e, t) => {
2683
- const r = F.CancelToken.source(), n = F({
2684
- ...e,
2685
- ...t,
2686
- cancelToken: r.token
2687
- }).then(({ data: o }) => o);
2688
- return n.cancel = () => {
2689
- r.cancel("Query was cancelled");
2690
- }, n;
2691
- };
2692
1040
  export {
2693
- Lo as GTMSendPageView,
2694
- ko as InitializeAxiosConfig,
2695
- $o as InitializeDaysJSConfig,
2696
- Io as InitializeI18nConfig,
2697
- Uo as InitializeSentryConfig,
2698
- q as InjectDependenciesContext,
2699
- No as InjectDependenciesProvider,
2700
- Bo as MaskTextField,
2701
- qo as PreloadErrorHandler,
2702
- Mo as QueryClientProviderWithConfig,
2703
- Do as RequireAuth,
2704
- Go as axiosCustomInstance,
2705
- Jr as dateAdapter,
2706
- Yr as distanceAdapter,
2707
- Ko as getOrvalConfig,
2708
- Ho as useAdapter,
2709
- Vo as useAuth,
2710
- Jo as useCurrentLanguage,
2711
- Yo as useFilters,
2712
- Wo as useInfiniteDataGrid,
2713
- zo as useResponseError,
2714
- Kr as worksiteNameAdapter
1041
+ $t as GTMSendPageView,
1042
+ Nt as InitializeAxiosConfig,
1043
+ Vt as InitializeDaysJSConfig,
1044
+ Yt as InitializeI18nConfig,
1045
+ Wt as InitializeSentryConfig,
1046
+ D as InjectDependenciesContext,
1047
+ Lt as InjectDependenciesProvider,
1048
+ Ut as MaskTextField,
1049
+ zt as PreloadErrorHandler,
1050
+ Mt as QueryClientProviderWithConfig,
1051
+ It as RequireAuth,
1052
+ St as dateAdapter,
1053
+ Ct as distanceAdapter,
1054
+ Ht as getOrvalConfig,
1055
+ Kt as useAdapter,
1056
+ qt as useAuth,
1057
+ Bt as useCurrentLanguage,
1058
+ Qt as useFilters,
1059
+ Jt as useInfiniteDataGrid,
1060
+ Gt as useResponseError,
1061
+ Pt as worksiteNameAdapter
2715
1062
  };