@tracktor/shared-module 2.12.1 → 2.12.2

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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/shared-module/releases)
2
2
 
3
- ## v2.12.1
3
+ ## v2.12.2
4
4
  - **[fix]** - export axiosCustomInstance
@@ -0,0 +1,24 @@
1
+ // eslint-disable-next-line import/no-extraneous-dependencies
2
+ import axios, { AxiosError, AxiosRequestConfig } from "axios";
3
+
4
+ export const axiosCustomInstance = <T>(config: AxiosRequestConfig, options?: AxiosRequestConfig): Promise<T> => {
5
+ const source = axios.CancelToken.source();
6
+
7
+ const promise = axios({
8
+ ...config,
9
+ ...options,
10
+ cancelToken: source.token,
11
+ }).then(({ data }) => data);
12
+
13
+ // @ts-ignore
14
+ promise.cancel = () => {
15
+ source.cancel("Query was cancelled");
16
+ };
17
+
18
+ return promise;
19
+ };
20
+
21
+ export default axiosCustomInstance;
22
+
23
+ export type ErrorType<Error> = AxiosError<Error>;
24
+ export type BodyType<BodyData> = BodyData;
package/dist/main.d.ts CHANGED
@@ -35,4 +35,4 @@ export * from './config/orval';
35
35
  export { default as dateAdapter } from './utils/adapter/dateAdapter';
36
36
  export { default as distanceAdapter } from './utils/adapter/distanceAdapter';
37
37
  export { default as worksiteNameAdapter } from './utils/adapter/worksiteNameAdapter/worksiteNameAdapter';
38
- export { axiosCustomInstance, type ErrorType, type BodyType } from './axiosCustomInstance';
38
+ export { axiosCustomInstance, type ErrorType, type BodyType } from './config/orval/axiosCustomInstance';
package/dist/main.js CHANGED
@@ -33,9 +33,9 @@ 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;
36
+ var At;
37
37
  function Mr() {
38
- return _t || (_t = 1, process.env.NODE_ENV !== "production" && function() {
38
+ return At || (At = 1, process.env.NODE_ENV !== "production" && function() {
39
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
40
  function O(a) {
41
41
  if (a === null || typeof a != "object")
@@ -53,10 +53,10 @@ function Mr() {
53
53
  }
54
54
  function T(a, h, g) {
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 b = w.ReactDebugCurrentFrame, _ = b.getStackAddendum();
57
+ _ !== "" && (h += "%s", g = g.concat([_]));
58
+ var P = g.map(function(C) {
59
+ return String(C);
60
60
  });
61
61
  P.unshift("Warning: " + h), Function.prototype.apply.call(console[a], console, P);
62
62
  }
@@ -74,8 +74,8 @@ function Mr() {
74
74
  var b = a.displayName;
75
75
  if (b)
76
76
  return b;
77
- var C = h.displayName || h.name || "";
78
- return C !== "" ? g + "(" + C + ")" : g;
77
+ var _ = h.displayName || h.name || "";
78
+ return _ !== "" ? g + "(" + _ + ")" : g;
79
79
  }
80
80
  function rt(a) {
81
81
  return a.displayName || "Context";
@@ -115,9 +115,9 @@ function Mr() {
115
115
  var b = a.displayName || null;
116
116
  return b !== null ? b : V(a.type) || "Memo";
117
117
  case R: {
118
- var C = a, P = C._payload, A = C._init;
118
+ var _ = a, P = _._payload, C = _._init;
119
119
  try {
120
- return V(A(P));
120
+ return V(C(P));
121
121
  } catch {
122
122
  return null;
123
123
  }
@@ -193,8 +193,8 @@ function Mr() {
193
193
  if (je === void 0)
194
194
  try {
195
195
  throw Error();
196
- } catch (C) {
197
- var b = C.stack.trim().match(/\n( *(at )?)/);
196
+ } catch (_) {
197
+ var b = _.stack.trim().match(/\n( *(at )?)/);
198
198
  je = b && b[1] || "";
199
199
  }
200
200
  return `
@@ -216,33 +216,33 @@ function Mr() {
216
216
  }
217
217
  var b;
218
218
  Fe = !0;
219
- var C = Error.prepareStackTrace;
219
+ var _ = Error.prepareStackTrace;
220
220
  Error.prepareStackTrace = void 0;
221
221
  var P;
222
222
  P = xe.current, xe.current = null, hr();
223
223
  try {
224
224
  if (h) {
225
- var A = function() {
225
+ var C = function() {
226
226
  throw Error();
227
227
  };
228
- if (Object.defineProperty(A.prototype, "props", {
228
+ if (Object.defineProperty(C.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, []);
234
+ Reflect.construct(C, []);
235
235
  } catch (H) {
236
236
  b = H;
237
237
  }
238
- Reflect.construct(a, [], A);
238
+ Reflect.construct(a, [], C);
239
239
  } else {
240
240
  try {
241
- A.call();
241
+ C.call();
242
242
  } catch (H) {
243
243
  b = H;
244
244
  }
245
- a.call(A.prototype);
245
+ a.call(C.prototype);
246
246
  }
247
247
  } else {
248
248
  try {
@@ -254,17 +254,17 @@ function Mr() {
254
254
  }
255
255
  } catch (H) {
256
256
  if (H && b && typeof H.stack == "string") {
257
- for (var _ = H.stack.split(`
257
+ for (var A = H.stack.split(`
258
258
  `), k = b.stack.split(`
259
- `), j = _.length - 1, N = k.length - 1; j >= 1 && N >= 0 && _[j] !== k[N]; )
259
+ `), j = A.length - 1, N = k.length - 1; j >= 1 && N >= 0 && A[j] !== k[N]; )
260
260
  N--;
261
261
  for (; j >= 1 && N >= 0; j--, N--)
262
- if (_[j] !== k[N]) {
262
+ if (A[j] !== k[N]) {
263
263
  if (j !== 1 || N !== 1)
264
264
  do
265
- if (j--, N--, N < 0 || _[j] !== k[N]) {
265
+ if (j--, N--, N < 0 || A[j] !== k[N]) {
266
266
  var B = `
267
- ` + _[j].replace(" at new ", " at ");
267
+ ` + A[j].replace(" at new ", " at ");
268
268
  return a.displayName && B.includes("<anonymous>") && (B = B.replace("<anonymous>", a.displayName)), typeof a == "function" && pe.set(a, B), B;
269
269
  }
270
270
  while (j >= 1 && N >= 0);
@@ -272,7 +272,7 @@ function Mr() {
272
272
  }
273
273
  }
274
274
  } finally {
275
- Fe = !1, xe.current = P, pr(), Error.prepareStackTrace = C;
275
+ Fe = !1, xe.current = P, pr(), Error.prepareStackTrace = _;
276
276
  }
277
277
  var ee = a ? a.displayName || a.name : "", Ot = ee ? he(ee) : "";
278
278
  return typeof a == "function" && pe.set(a, Ot), Ot;
@@ -304,9 +304,9 @@ function Mr() {
304
304
  case y:
305
305
  return me(a.type, h, g);
306
306
  case R: {
307
- var b = a, C = b._payload, P = b._init;
307
+ var b = a, _ = b._payload, P = b._init;
308
308
  try {
309
- return me(P(C), h, g);
309
+ return me(P(_), h, g);
310
310
  } catch {
311
311
  }
312
312
  }
@@ -321,22 +321,22 @@ function Mr() {
321
321
  } else
322
322
  ht.setExtraStackFrame(null);
323
323
  }
324
- function Er(a, h, g, b, C) {
324
+ function Er(a, h, g, b, _) {
325
325
  {
326
326
  var P = Function.call.bind(ye);
327
- for (var A in a)
328
- if (P(a, A)) {
329
- var _ = void 0;
327
+ for (var C in a)
328
+ if (P(a, C)) {
329
+ var A = 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`.");
331
+ if (typeof a[C] != "function") {
332
+ var k = Error((b || "React class") + ": " + g + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
333
  throw k.name = "Invariant Violation", k;
334
334
  }
335
- _ = a[A](h, A, b, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
335
+ A = a[C](h, C, b, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
336
  } catch (j) {
337
- _ = j;
337
+ A = 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
+ A && !(A instanceof Error) && (ge(_), 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, C, typeof A), ge(null)), A instanceof Error && !(A.message in dt) && (dt[A.message] = !0, ge(_), S("Failed %s type: %s", g, A.message), ge(null));
340
340
  }
341
341
  }
342
342
  }
@@ -393,7 +393,7 @@ function Mr() {
393
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
394
  }
395
395
  }
396
- function _r(a, h) {
396
+ function Ar(a, h) {
397
397
  {
398
398
  var g = function() {
399
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));
@@ -404,7 +404,7 @@ function Mr() {
404
404
  });
405
405
  }
406
406
  }
407
- function Ar(a, h) {
407
+ function Cr(a, h) {
408
408
  {
409
409
  var g = function() {
410
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));
@@ -415,51 +415,51 @@ function Mr() {
415
415
  });
416
416
  }
417
417
  }
418
- var Cr = function(a, h, g, b, C, P, A) {
419
- var _ = {
418
+ var _r = function(a, h, g, b, _, P, C) {
419
+ var A = {
420
420
  // This tag allows us to uniquely identify this as a React Element
421
421
  $$typeof: t,
422
422
  // Built-in properties that belong on the element
423
423
  type: a,
424
424
  key: h,
425
425
  ref: g,
426
- props: A,
426
+ props: C,
427
427
  // Record the component responsible for creating this element.
428
428
  _owner: P
429
429
  };
430
- return _._store = {}, Object.defineProperty(_._store, "validated", {
430
+ return A._store = {}, Object.defineProperty(A._store, "validated", {
431
431
  configurable: !1,
432
432
  enumerable: !1,
433
433
  writable: !0,
434
434
  value: !1
435
- }), Object.defineProperty(_, "_self", {
435
+ }), Object.defineProperty(A, "_self", {
436
436
  configurable: !1,
437
437
  enumerable: !1,
438
438
  writable: !1,
439
439
  value: b
440
- }), Object.defineProperty(_, "_source", {
440
+ }), Object.defineProperty(A, "_source", {
441
441
  configurable: !1,
442
442
  enumerable: !1,
443
443
  writable: !1,
444
- value: C
445
- }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
444
+ value: _
445
+ }), Object.freeze && (Object.freeze(A.props), Object.freeze(A)), A;
446
446
  };
447
- function Pr(a, h, g, b, C) {
447
+ function Pr(a, h, g, b, _) {
448
448
  {
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));
449
+ var P, C = {}, A = null, k = null;
450
+ g !== void 0 && (mt(g), A = "" + g), Or(h) && (mt(h.key), A = "" + h.key), Sr(h) && (k = h.ref, Tr(h, _));
451
451
  for (P in h)
452
- ye.call(h, P) && !vr.hasOwnProperty(P) && (A[P] = h[P]);
452
+ ye.call(h, P) && !vr.hasOwnProperty(P) && (C[P] = h[P]);
453
453
  if (a && a.defaultProps) {
454
454
  var j = a.defaultProps;
455
455
  for (P in j)
456
- A[P] === void 0 && (A[P] = j[P]);
456
+ C[P] === void 0 && (C[P] = j[P]);
457
457
  }
458
- if (_ || k) {
458
+ if (A || k) {
459
459
  var N = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
460
- _ && _r(A, N), k && Ar(A, N);
460
+ A && Ar(C, N), k && Cr(C, N);
461
461
  }
462
- return Cr(a, _, k, C, b, se.current, A);
462
+ return _r(a, A, k, _, b, se.current, C);
463
463
  }
464
464
  }
465
465
  var Le = w.ReactCurrentOwner, Et = w.ReactDebugCurrentFrame;
@@ -528,10 +528,10 @@ Check the top-level render call using <` + g + ">.");
528
528
  else if (Ie(a))
529
529
  a._store && (a._store.validated = !0);
530
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);
531
+ var _ = O(a);
532
+ if (typeof _ == "function" && _ !== a.entries)
533
+ for (var P = _.call(a), C; !(C = P.next()).done; )
534
+ Ie(C.value) && bt(C.value, h);
535
535
  }
536
536
  }
537
537
  }
@@ -554,8 +554,8 @@ Check the top-level render call using <` + g + ">.");
554
554
  Er(g, a.props, "prop", b, a);
555
555
  } else if (h.PropTypes !== void 0 && !ke) {
556
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");
557
+ var _ = V(h);
558
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
559
559
  }
560
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.");
561
561
  }
@@ -572,21 +572,21 @@ Check the top-level render call using <` + g + ">.");
572
572
  a.ref !== null && (Z(a), S("Invalid attribute `ref` supplied to `React.Fragment`."), Z(null));
573
573
  }
574
574
  }
575
- function St(a, h, g, b, C, P) {
575
+ function St(a, h, g, b, _, P) {
576
576
  {
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.");
577
+ var C = de(a);
578
+ if (!C) {
579
+ var A = "";
580
+ (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (A += " 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
581
  var k = xr();
582
- k ? _ += k : _ += wt();
582
+ k ? A += k : A += wt();
583
583
  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, _);
584
+ a === null ? j = "null" : Ne(a) ? j = "array" : a !== void 0 && a.$$typeof === t ? (j = "<" + (V(a.type) || "Unknown") + " />", A = " 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, A);
585
585
  }
586
- var N = Pr(a, h, g, C, P);
586
+ var N = Pr(a, h, g, _, P);
587
587
  if (N == null)
588
588
  return N;
589
- if (A) {
589
+ if (C) {
590
590
  var B = h.children;
591
591
  if (B !== void 0)
592
592
  if (b)
@@ -922,14 +922,14 @@ const q = Ur({}), No = ({ children: e, apiURL: t, libraries: r, localStorageKeys
922
922
  (i = e == null ? void 0 : e.off) == null || i.call(e, "languageChanged", o);
923
923
  };
924
924
  }, [e, t]), r;
925
- }, Xr = "tracktor.filter", At = (e, t, r) => `${r}_${e}=>${t}`, Yo = (e) => {
925
+ }, Xr = "tracktor.filter", Ct = (e, t, r) => `${r}_${e}=>${t}`, Yo = (e) => {
926
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
927
  if (!n)
928
928
  throw new Error(
929
929
  "React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView."
930
930
  );
931
931
  const u = (m, E, O = !0) => {
932
- const w = At(m, (e == null ? void 0 : e.pathname) || i, d);
932
+ const w = Ct(m, (e == null ? void 0 : e.pathname) || i, d);
933
933
  if (!E || Array.isArray(E) && !E.length) {
934
934
  c.delete(m), f(c), localStorage.removeItem(w);
935
935
  return;
@@ -945,7 +945,7 @@ const q = Ur({}), No = ({ children: e, apiURL: t, libraries: r, localStorageKeys
945
945
  } catch {
946
946
  return O;
947
947
  }
948
- const w = At(m, (e == null ? void 0 : e.pathname) || i, d), S = localStorage.getItem(w);
948
+ const w = Ct(m, (e == null ? void 0 : e.pathname) || i, d), S = localStorage.getItem(w);
949
949
  if (S)
950
950
  try {
951
951
  return JSON.parse(S)[m];
@@ -1017,7 +1017,7 @@ const q = Ur({}), No = ({ children: e, apiURL: t, libraries: r, localStorageKeys
1017
1017
  ],
1018
1018
  mutator: {
1019
1019
  name: "axiosCustomInstance",
1020
- path: `${__dirname}/axiosCustomInstance.ts`
1020
+ path: "./axiosCustomInstance.ts"
1021
1021
  },
1022
1022
  operationName: rn,
1023
1023
  query: {
@@ -1048,12 +1048,12 @@ function an(e) {
1048
1048
  let t;
1049
1049
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Wt(e.buffer), t;
1050
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) => {
1051
+ const cn = Te("string"), $ = Te("function"), Vt = Te("number"), Ae = (e) => e !== null && typeof e == "object", un = (e) => e === !0 || e === !1, we = (e) => {
1052
1052
  if (Oe(e) !== "object")
1053
1053
  return !1;
1054
1054
  const t = Qe(e);
1055
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) => {
1056
+ }, ln = W("Date"), fn = W("File"), dn = W("Blob"), hn = W("FileList"), pn = (e) => Ae(e) && $(e.pipe), mn = (e) => {
1057
1057
  let t;
1058
1058
  return e && (typeof FormData == "function" && e instanceof FormData || $(e.append) && ((t = Oe(e)) === "formdata" || // detect form-data instance
1059
1059
  t === "object" && $(e.toString) && e.toString() === "[object FormData]"));
@@ -1107,11 +1107,11 @@ const vn = (e, t, r, { allOwnKeys: n } = {}) => (le(t, (o, s) => {
1107
1107
  e = r !== !1 && Qe(e);
1108
1108
  } while (e && (!r || r(e, t)) && e !== Object.prototype);
1109
1109
  return t;
1110
- }, _n = (e, t, r) => {
1110
+ }, An = (e, t, r) => {
1111
1111
  e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
1112
1112
  const n = e.indexOf(t, r);
1113
1113
  return n !== -1 && n === r;
1114
- }, An = (e) => {
1114
+ }, Cn = (e) => {
1115
1115
  if (!e) return null;
1116
1116
  if (te(e)) return e;
1117
1117
  let t = e.length;
@@ -1120,7 +1120,7 @@ const vn = (e, t, r, { allOwnKeys: n } = {}) => (le(t, (o, s) => {
1120
1120
  for (; t-- > 0; )
1121
1121
  r[t] = e[t];
1122
1122
  return r;
1123
- }, Cn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Qe(Uint8Array)), Pn = (e, t) => {
1123
+ }, _n = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Qe(Uint8Array)), Pn = (e, t) => {
1124
1124
  const n = (e && e[Symbol.iterator]).call(e);
1125
1125
  let o;
1126
1126
  for (; (o = n.next()) && !o.done; ) {
@@ -1138,7 +1138,7 @@ const vn = (e, t, r, { allOwnKeys: n } = {}) => (le(t, (o, s) => {
1138
1138
  function(r, n, o) {
1139
1139
  return n.toUpperCase() + o;
1140
1140
  }
1141
- ), Ct = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Nn = W("RegExp"), Kt = (e, t) => {
1141
+ ), _t = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Nn = W("RegExp"), Kt = (e, t) => {
1142
1142
  const r = Object.getOwnPropertyDescriptors(e), n = {};
1143
1143
  le(r, (o, s) => {
1144
1144
  let i;
@@ -1183,7 +1183,7 @@ function Bn(e) {
1183
1183
  }
1184
1184
  const $n = (e) => {
1185
1185
  const t = new Array(10), r = (n, o) => {
1186
- if (_e(n)) {
1186
+ if (Ae(n)) {
1187
1187
  if (t.indexOf(n) >= 0)
1188
1188
  return;
1189
1189
  if (!("toJSON" in n)) {
@@ -1198,7 +1198,7 @@ const $n = (e) => {
1198
1198
  return n;
1199
1199
  };
1200
1200
  return r(e, 0);
1201
- }, qn = W("AsyncFunction"), Mn = (e) => e && (_e(e) || $(e)) && $(e.then) && $(e.catch), l = {
1201
+ }, qn = W("AsyncFunction"), Mn = (e) => e && (Ae(e) || $(e)) && $(e.then) && $(e.catch), l = {
1202
1202
  isArray: te,
1203
1203
  isArrayBuffer: Wt,
1204
1204
  isBuffer: sn,
@@ -1207,7 +1207,7 @@ const $n = (e) => {
1207
1207
  isString: cn,
1208
1208
  isNumber: Vt,
1209
1209
  isBoolean: un,
1210
- isObject: _e,
1210
+ isObject: Ae,
1211
1211
  isPlainObject: we,
1212
1212
  isReadableStream: gn,
1213
1213
  isRequest: En,
@@ -1221,7 +1221,7 @@ const $n = (e) => {
1221
1221
  isFunction: $,
1222
1222
  isStream: pn,
1223
1223
  isURLSearchParams: yn,
1224
- isTypedArray: Cn,
1224
+ isTypedArray: _n,
1225
1225
  isFileList: hn,
1226
1226
  forEach: le,
1227
1227
  merge: ze,
@@ -1232,13 +1232,13 @@ const $n = (e) => {
1232
1232
  toFlatObject: Tn,
1233
1233
  kindOf: Oe,
1234
1234
  kindOfTest: W,
1235
- endsWith: _n,
1236
- toArray: An,
1235
+ endsWith: An,
1236
+ toArray: Cn,
1237
1237
  forEachEntry: Pn,
1238
1238
  matchAll: xn,
1239
1239
  isHTMLForm: jn,
1240
- hasOwnProperty: Ct,
1241
- hasOwnProp: Ct,
1240
+ hasOwnProperty: _t,
1241
+ hasOwnProp: _t,
1242
1242
  // an alias to avoid ESLint no-prototype-builtins detection
1243
1243
  reduceDescriptors: Kt,
1244
1244
  freezeMethods: Dn,
@@ -1324,7 +1324,7 @@ function Wn(e) {
1324
1324
  const Vn = l.toFlatObject(l, {}, null, function(t) {
1325
1325
  return /^is[A-Z]/.test(t);
1326
1326
  });
1327
- function Ae(e, t, r) {
1327
+ function Ce(e, t, r) {
1328
1328
  if (!l.isObject(e))
1329
1329
  throw new TypeError("target must be an object");
1330
1330
  t = t || new FormData(), r = l.toFlatObject(r, {
@@ -1400,7 +1400,7 @@ function jt(e) {
1400
1400
  });
1401
1401
  }
1402
1402
  function Xe(e, t) {
1403
- this._pairs = [], e && Ae(e, this, t);
1403
+ this._pairs = [], e && Ce(e, this, t);
1404
1404
  }
1405
1405
  const er = Xe.prototype;
1406
1406
  er.append = function(t, r) {
@@ -1506,7 +1506,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Zn
1506
1506
  ...Gn
1507
1507
  };
1508
1508
  function to(e, t) {
1509
- return Ae(e, new M.classes.URLSearchParams(), Object.assign({
1509
+ return Ce(e, new M.classes.URLSearchParams(), Object.assign({
1510
1510
  visitor: function(r, n, o, s) {
1511
1511
  return M.isNode && l.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1512
1512
  }
@@ -1568,7 +1568,7 @@ const fe = {
1568
1568
  return to(t, this.formSerializer).toString();
1569
1569
  if ((c = l.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
1570
1570
  const f = this.env && this.env.FormData;
1571
- return Ae(
1571
+ return Ce(
1572
1572
  c ? { "files[]": t } : t,
1573
1573
  f && new f(),
1574
1574
  this.formSerializer
@@ -2157,7 +2157,7 @@ const ar = (e) => {
2157
2157
  total: e,
2158
2158
  loaded: n
2159
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 && (() => {
2160
+ }, _e = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", cr = _e && typeof ReadableStream == "function", Ve = _e && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Oo = cr && (() => {
2161
2161
  let e = !1;
2162
2162
  const t = new Request(M.origin, {
2163
2163
  body: new ReadableStream(),
@@ -2175,7 +2175,7 @@ const ar = (e) => {
2175
2175
  })(), Se = {
2176
2176
  stream: He && ((e) => e.body)
2177
2177
  };
2178
- Ce && ((e) => {
2178
+ _e && ((e) => {
2179
2179
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
2180
2180
  !Se[t] && (Se[t] = l.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
2181
2181
  throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, n);
@@ -2193,10 +2193,10 @@ const To = async (e) => {
2193
2193
  return e.byteLength;
2194
2194
  if (l.isURLSearchParams(e) && (e = e + ""), l.isString(e))
2195
2195
  return (await Ve(e)).byteLength;
2196
- }, _o = async (e, t) => {
2196
+ }, Ao = async (e, t) => {
2197
2197
  const r = l.toFiniteNumber(e.getContentLength());
2198
2198
  return r ?? To(t);
2199
- }, Ao = Ce && (async (e) => {
2199
+ }, Co = _e && (async (e) => {
2200
2200
  let {
2201
2201
  url: t,
2202
2202
  method: r,
@@ -2220,7 +2220,7 @@ const To = async (e) => {
2220
2220
  };
2221
2221
  let S;
2222
2222
  try {
2223
- if (f && Oo && r !== "get" && r !== "head" && (S = await _o(u, n)) !== 0) {
2223
+ if (f && Oo && r !== "get" && r !== "head" && (S = await Ao(u, n)) !== 0) {
2224
2224
  let D = new Request(t, {
2225
2225
  method: "POST",
2226
2226
  body: n,
@@ -2279,7 +2279,7 @@ const To = async (e) => {
2279
2279
  }), Je = {
2280
2280
  http: zn,
2281
2281
  xhr: Ro,
2282
- fetch: Ao
2282
+ fetch: Co
2283
2283
  };
2284
2284
  l.forEach(Je, (e, t) => {
2285
2285
  if (e) {
@@ -2290,7 +2290,7 @@ l.forEach(Je, (e, t) => {
2290
2290
  Object.defineProperty(e, "adapterName", { value: t });
2291
2291
  }
2292
2292
  });
2293
- const Ut = (e) => `- ${e}`, Co = (e) => l.isFunction(e) || e === null || e === !1, ur = {
2293
+ const Ut = (e) => `- ${e}`, _o = (e) => l.isFunction(e) || e === null || e === !1, ur = {
2294
2294
  getAdapter: (e) => {
2295
2295
  e = l.isArray(e) ? e : [e];
2296
2296
  const { length: t } = e;
@@ -2299,7 +2299,7 @@ const Ut = (e) => `- ${e}`, Co = (e) => l.isFunction(e) || e === null || e === !
2299
2299
  for (let s = 0; s < t; s++) {
2300
2300
  r = e[s];
2301
2301
  let i;
2302
- if (n = r, !Co(r) && (n = Je[(i = String(r)).toLowerCase()], n === void 0))
2302
+ if (n = r, !_o(r) && (n = Je[(i = String(r)).toLowerCase()], n === void 0))
2303
2303
  throw new v(`Unknown adapter '${i}'`);
2304
2304
  if (n)
2305
2305
  break;
@@ -2665,7 +2665,7 @@ F.CanceledError = re;
2665
2665
  F.CancelToken = tt;
2666
2666
  F.isCancel = or;
2667
2667
  F.VERSION = lr;
2668
- F.toFormData = Ae;
2668
+ F.toFormData = Ce;
2669
2669
  F.AxiosError = v;
2670
2670
  F.Cancel = F.CanceledError;
2671
2671
  F.all = function(t) {
package/dist/main.umd.cjs CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  Check the render method of \``+a+"`."}return""}}function _o(a){return""}var an={};function Po(a){{var h=sn();if(!h){var g=typeof a=="string"?a:a.displayName||a.name;g&&(h=`
24
24
 
25
- Check the top-level render call using <`+g+">.")}return h}}function cn(a,h){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var g=Po(h);if(an[g])return;an[g]=!0;var b="";a&&a._owner&&a._owner!==Xe.current&&(b=" It was passed a child from "+q(a._owner.type)+"."),te(a),v('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),te(null)}}function un(a,h){{if(typeof a!="object")return;if(Ge(a))for(var g=0;g<a.length;g++){var b=a[g];Ze(b)&&cn(b,h)}else if(Ze(a))a._store&&(a._store.validated=!0);else if(a){var P=O(a);if(typeof P=="function"&&P!==a.entries)for(var j=P.call(a),_;!(_=j.next()).done;)Ze(_.value)&&cn(_.value,h)}}}function xo(a){{var h=a.type;if(h==null||typeof h=="string")return;var g;if(typeof h=="function")g=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===f||h.$$typeof===y))g=h.propTypes;else return;if(g){var b=q(h);yo(g,a.props,"prop",b,a)}else if(h.PropTypes!==void 0&&!$e){$e=!0;var P=q(h);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function jo(a){{for(var h=Object.keys(a.props),g=0;g<h.length;g++){var b=h[g];if(b!=="children"&&b!=="key"){te(a),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",b),te(null);break}}a.ref!==null&&(te(a),v("Invalid attribute `ref` supplied to `React.Fragment`."),te(null))}}function ln(a,h,g,b,P,j){{var _=Se(a);if(!_){var A="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(A+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=_o();U?A+=U:A+=sn();var N;a===null?N="null":Ge(a)?N="array":a!==void 0&&a.$$typeof===t?(N="<"+(q(a.type)||"Unknown")+" />",A=" Did you accidentally export a JSX literal instead of a component?"):N=typeof a,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",N,A)}var L=Ao(a,h,g,P,j);if(L==null)return L;if(_){var V=h.children;if(V!==void 0)if(b)if(Ge(V)){for(var ne=0;ne<V.length;ne++)un(V[ne],a);Object.freeze&&Object.freeze(V)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else un(V,a)}return a===r?jo(L):xo(L),L}}function Fo(a,h,g){return ln(a,h,g,!0)}function Do(a,h,g){return ln(a,h,g,!1)}var No=Do,Lo=Fo;oe.Fragment=r,oe.jsx=No,oe.jsxs=Lo}()),oe}process.env.NODE_ENV==="production"?_e.exports=dn():_e.exports=hn();var Y=_e.exports;const M=C.createContext({}),pn=({children:e,apiURL:t,libraries:n,localStorageKeys:r})=>{const o=C.useMemo(()=>({apiURL:t,libraries:n,localStorageKeys:r}),[t,n,r]);return Y.jsx(M.Provider,{value:o,children:e})},mn="user",yn=({Fallback:e,isLogged:t,loginPath:n="/login",redirect401Path:r="/login",...o})=>{var T,I,W,k;const{libraries:s,localStorageKeys:i}=C.useContext(M),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)||mn;if(!c)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const[u,y]=C.useState(null),{useLocation:R,Navigate:p,Outlet:m}=c,E=R(),O=C.useRef(!1),w=typeof t=="function"?t():!!t,v=typeof w=="boolean"?w:w==null?void 0:w.isLogged;return C.useEffect(()=>{O.current||(O.current=!0,f.interceptors.response.use(F=>F,async F=>{var Se;return typeof F=="object"&&F&&"response"in F&&F.response&&typeof F.response=="object"&&"status"in F.response&&F.response&&typeof F.response=="object"&&"status"in F.response&&((Se=F==null?void 0:F.response)==null?void 0:Se.status)===401&&(f.defaults.headers.common.Authorization=null,typeof window<"u"&&window.localStorage&&localStorage.removeItem(d),y(r)),Promise.reject(F)}))},[f.defaults.headers.common,f.interceptors.response,d,r]),v&&!u?Y.jsx(C.Suspense,{fallback:e,children:(I=(T=E.state)==null?void 0:T.from)!=null&&I.state&&((k=(W=E.state)==null?void 0:W.from)==null?void 0:k.pathname)===n?Y.jsx(p,{to:E.state.from.state.from.pathname+E.state.from.state.from.search,replace:!0}):Y.jsx(m,{})}):Y.jsx(p,{to:n+E.search,state:{from:E},replace:!0})},gn=({data:e,...t})=>{const{libraries:n}=C.useContext(M),r=(t==null?void 0:t.reactRouter)||(n==null?void 0:n.reactRouter),o=(t==null?void 0:t.gtm)||(n==null?void 0:n.gtm);if(!r)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");if(!o)throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");const{useGoogleTagManager:s}=o,{useLocation:i,Outlet:c}=r,{pathname:f}=i(),{sendEvent:d}=s();return C.useEffect(()=>{d({event:"pageView",pathname:f,...e})},[e,f,d]),Y.jsx(c,{})},En="user",wn=({tokenTypeKey:e="tokenType",tokenKey:t="accessToken",postContentType:n="application/json",...r})=>{const{apiURL:o=r.apiURL,libraries:s,localStorageKeys:i}=C.useContext(M),c=(r==null?void 0:r.userLocalStorageKey)||(i==null?void 0:i.user)||En,f=(r==null?void 0:r.axios)||(s==null?void 0:s.axios);if(!f)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!(f!=null&&f.defaults))return null;if(typeof window<"u"&&window.localStorage){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;p&&(f.defaults.headers.common.Authorization=p)}return f.defaults.baseURL=o,f.defaults.headers.post["Content-Type"]=n,null},Rn=({debug:e,resources:t,...n})=>{const{libraries:r}=C.useContext(M),o=(n==null?void 0:n.i18)||(r==null?void 0:r.i18),{i18next:s,initReactI18next:i,languageDetector:c}=o||{};if(!o)throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return s!=null&&s.isInitialized||(s.use(c).use(i).init({debug:e,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:"languageChanged loaded",useSuspense:!0},resources:t,returnNull:!1}).then(()=>{document.documentElement.lang!==s.resolvedLanguage&&s.resolvedLanguage&&document.documentElement.setAttribute("lang",s.resolvedLanguage)}),s.on("languageChanged",f=>{document.documentElement.setAttribute("lang",f)})),null},bn=({dsn:e,integrations:t,tracesSampleRate:n,replaysSessionSampleRate:r,replaysOnErrorSampleRate:o,tracePropagationTargets:s,ignoreErrors:i,debug:c,environment:f,release:d,...u})=>{const{libraries:y}=C.useContext(M),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);if(!R)throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!p)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(R.isInitialized())return null;const{createRoutesFromChildren:m,matchRoutes:E,useLocation:O,useNavigationType:w}=p;return(c||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&R.init({debug:c,dsn:e,environment:f||"production",ignoreErrors:[...i||[],/dynamically imported module/,/Cannot read properties of undefined \(reading 'default'\)/,/Loading chunk \d+ failed/,/ChunkLoadError/,/Failed to fetch dynamically imported module/,/vite:preloadError/],integrations:[R.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:m,matchRoutes:E,useEffect:C.useEffect,useLocation:O,useNavigationType:w}),...t||[]],release:d,replaysOnErrorSampleRate:o||1,replaysSessionSampleRate:r||.1,tracePropagationTargets:s,tracesSampleRate:n||1}),null},Sn=({IMaskMixin:e,...t})=>{const n=C.useMemo(()=>e(({TextField:r,...o})=>Y.jsx(r,{...o})),[e]);return Y.jsx(n,{...t})},vn=({language:e,...t})=>{const{libraries:n}=C.useContext(M),r=(t==null?void 0:t.dayjs)||(n==null?void 0:n.dayjs),o=(t==null?void 0:t.plugin)||(n==null?void 0:n.dayjsPlugin);if(!r)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props of InitializeDaysJSConfig.");return C.useEffect(()=>{(async()=>{var c;const i=e||((c=navigator.language)==null?void 0:c.slice(0,2))||"en";o&&o.forEach(f=>{f&&r.extend(f)}),await import("dayjs/locale/en"),await import("dayjs/locale/fr"),r.locale(i)})().then()},[r,o,e]),null},On=()=>(C.useEffect(()=>{const e=t=>{try{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),window.location.reload()}catch{}};return window.addEventListener("vite:preloadError",e),()=>{window.removeEventListener("vite:preloadError",e)}},[]),null),Tn=e=>e&&typeof e=="function",Cn=e=>e&&typeof e=="function",An=({children:e,defaultQueriesOptions:t,defaultMutationsOptions:n,...r})=>{var f,d;const{libraries:o}=C.useContext(M),s=(r==null?void 0:r.QueryClient)||((f=o==null?void 0:o.reactQuery)==null?void 0:f.QueryClient),i=(r==null?void 0:r.QueryClientProvider)||((d=o==null?void 0:o.reactQuery)==null?void 0:d.QueryClientProvider);if(!s)throw new Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!i)throw new Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!Tn(i))throw new Error("Provided QueryClientProvider dependencies are not valid.");if(!Cn(s))throw new Error("Provided QueryClient dependencies are not valid.");const c=new s({defaultOptions:{mutations:{...n},queries:{getNextPageParam:(u,y,R)=>u.length+(R||0),refetchOnWindowFocus:!1,retry:3,...t}}});return Y.jsx(i,{client:c,children:e})},_n=e=>{var d,u,y;const{libraries:t}=C.useContext(M),n=(e==null?void 0:e.i18)||(t==null?void 0:t.i18),r=((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=n==null?void 0:n.i18next)==null?void 0:y.t)||r||(R=>R),{unknownErrorTranslationKey:s="error.unknownError"}=e||{},i=o(s),c=C.useCallback(R=>{var m,E,O,w,v,T,I,W,k;const{response:p}=R||{};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((v=p==null?void 0:p.data)==null?void 0:v.detail)&&((I=(T=p==null?void 0:p.data)==null?void 0:T.detail[0])!=null&&I.msg)&&typeof((k=(W=p==null?void 0:p.data)==null?void 0:W.detail[0])==null?void 0:k.msg)=="string"?String(p.data.detail[0].msg):i},[i]);return{getErrorCode:C.useCallback(R=>{var m,E,O;const{response:p}=R||{};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"},[]),printError:c}},Pn=({data:e,fetchNextPage:t,isFetchingNextPage:n,isInitialLoading:r,isLoading:o,enabled:s=!0})=>{const i=C.useCallback(async f=>{n||!s||await t({pageParam:(f==null?void 0:f.pageParam)||f.visibleRowsCount})},[s,t,n]),c=C.useMemo(()=>{if(e)return e.pages.reduce((f,d)=>[...f,...d],[])},[e]);return{fetchNextPageOnRowsScrollEnd:i,isLoading:n||o,loadingVariant:r?"skeleton":"linear",rows:c}},xn=e=>{const{libraries:t}=C.useContext(M),n=(e==null?void 0:e.axios)||(t==null?void 0:t.axios),r=(e==null?void 0:e.localStorageKey)||"user";if(!n)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");const o=C.useCallback(({tokenType:i,accessToken:c})=>{n.defaults.headers.common.Authorization=`${i} ${c}`},[n.defaults.headers.common]),s=()=>{n.defaults.headers.common.Authorization=null};return C.useEffect(()=>{const i=({newValue:c,key:f})=>{if(f===r&&c)try{const{accessToken:d,tokenType:u}=JSON.parse(c);o({accessToken:d,tokenType:u})}catch(d){console.error("Failed to parse newValue from localStorage:",d)}};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[r,o]),{clearAuthenticationToken:s,setAuthenticationToken:o}},nt=({library:e,date:t,format:n="ll"})=>e(t).format(n),rt=(e,t)=>{const{fractionDigits:n=0,metric:r="km"}=t||{},o=Number(e);return Number.isNaN(o)?`0${r}`:`${o.toFixed(n)}${r}`},ot=e=>!e||typeof e!="string"?"":e.replace(/_/g," ").toLowerCase().split(" ").map(n=>n.length>0?n.charAt(0).toUpperCase()+n.slice(1):n).join(" "),jn=e=>e!=null&&e.startsWith("/")?e!=null&&e.startsWith("/files")?e:`/files${e}`:e!=null&&e.startsWith("files")?`/${e}`:`/files/${e}`,Fn=({path:e,size:t,apiURL:n})=>{if(!e)return"";const r=jn(e),o=`${n}${r}`,s=o.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/)!==null;return typeof t=="number"&&s?`${o.replace("/files",`/thumbs/${t}`)}`:o},Dn=e=>{const{apiURL:t,libraries:n}=C.useContext(M),r=(e==null?void 0:e.dayjs)||(n==null?void 0:n.dayjs);return{dateAdapter:(i,c)=>{if(!r)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return nt({date:i,format:c,library:r})},distanceAdapter:rt,filePathAdapter:(i,c)=>{if(!t)throw new Error("API URL is not provided. You can provide it with InjectDependenciesProvider or directly in props to filePathAdapter.");return Fn({apiURL:t,path:i,size:c})},worksiteNameAdapter:ot}},de=(e,t)=>t==="short"?e.split("-")[0]:e,Nn=(e,t="full")=>{const[n,r]=C.useState(()=>{const o=(e==null?void 0:e.language)||navigator.language;return e&&"isInitialized"in e&&e.isInitialized,de(o,t)});return C.useEffect(()=>{var s;e&&"isInitialized"in e&&e.isInitialized&&e.language&&r(de(e.language,t));const o=i=>{r(de(i,t))};return(s=e==null?void 0:e.on)==null||s.call(e,"languageChanged",o),()=>{var i;(i=e==null?void 0:e.off)==null||i.call(e,"languageChanged",o)}},[e,t]),n},Ln="tracktor.filter",st=(e,t,n)=>`${n}_${e}=>${t}`,kn=e=>{const{libraries:t,localStorageKeys:n}=C.useContext(M),r=(e==null?void 0:e.reactRouter)||(t==null?void 0:t.reactRouter),{useLocation:o,useSearchParams:s}=r,{pathname:i}=o(),[c,f]=s(),d=(n==null?void 0:n.filter)||Ln;if(!r)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");const u=(m,E,O=!0)=>{const w=st(m,(e==null?void 0:e.pathname)||i,d);if(!E||Array.isArray(E)&&!E.length){c.delete(m),f(c),localStorage.removeItem(w);return}O&&E&&localStorage.setItem(w,JSON.stringify({...c,[m]:E})),E&&(c.set(m,JSON.stringify(E)),f(c))};return{getFilter:(m,E)=>{const O=c.get(m);if(O)try{return JSON.parse(O)}catch{return O}const w=st(m,(e==null?void 0:e.pathname)||i,d),v=localStorage.getItem(w);if(v)try{return JSON.parse(v)[m]}catch{}return E},getFilters:()=>{const m=Object.fromEntries(c.entries()),O=Object.keys(localStorage).filter(w=>w.startsWith(d)&&w.endsWith((e==null?void 0:e.pathname)||i)).reduce((w,v)=>{var I,W;const T=localStorage.getItem(v);if(T){const k=JSON.parse(T),F=(I=Object.keys(k))==null?void 0:I[0];w[F]=(W=Object.values(k))==null?void 0:W[0]}return w},{});return{...m,...O}},handleFilter:(m,E)=>(O,w)=>{if(w||Array.isArray(w)&&w.length===0){const v=E||"value",T=typeof w=="object"&&v in w?w[v||"value"]:w;u(m,T);return}u(m,void 0)},setFilter:u}},In=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Un=e=>{const r=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("");return r.charAt(0).toLowerCase()+r.slice(1)},Bn=e=>(e.split("/").pop()||e).replace(/\.json$/,"").replace(/^openapi\./,""),Mn=(e,t,n)=>{const r=Un(t),o=In(n);return`${r}${o}`},zn=e=>{if(e)return(e==null?void 0:e.reduce((t,n)=>(t[n]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},t),{}))||{}},Wn=e=>(Array.isArray(e)?e:[e]).reduce((n,r)=>{const{output:o,operationsToGenerateInfiniteQueryHook:s,input:i="./openapi.json"}=r||{},c=Bn(i);return{...n,[c]:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:i,output:{baseUrl:o==null?void 0:o.baseUrl,client:"react-query",mode:"tags-split",override:{...(s==null?void 0:s.length)&&{operations:zn(s)},header:f=>["Generated by orval 🍺",...f.title?[f.title]:[],...f.description?[f.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/axiosCustomInstance.ts`},operationName:Mn,query:{useQuery:!0}},schemas:(o==null?void 0:o.schemas)||`src/api/${c}/model`,target:(o==null?void 0:o.target)||`src/api/${c}/services/api.ts`,...o}}}},{});function it(e,t){return function(){return e.apply(t,arguments)}}const{toString:Vn}=Object.prototype,{getPrototypeOf:Pe}=Object,he=(e=>t=>{const n=Vn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),H=e=>(e=e.toLowerCase(),t=>he(t)===e),pe=e=>t=>typeof t===e,{isArray:Z}=Array,se=pe("undefined");function Hn(e){return e!==null&&!se(e)&&e.constructor!==null&&!se(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const at=H("ArrayBuffer");function Jn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&at(e.buffer),t}const Yn=pe("string"),z=pe("function"),ct=pe("number"),me=e=>e!==null&&typeof e=="object",qn=e=>e===!0||e===!1,ye=e=>{if(he(e)!=="object")return!1;const t=Pe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kn=H("Date"),Gn=H("File"),Qn=H("Blob"),Xn=H("FileList"),$n=e=>me(e)&&z(e.pipe),Zn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||z(e.append)&&((t=he(e))==="formdata"||t==="object"&&z(e.toString)&&e.toString()==="[object FormData]"))},er=H("URLSearchParams"),[tr,nr,rr,or]=["ReadableStream","Request","Response","Headers"].map(H),sr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Z(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let c;for(r=0;r<i;r++)c=s[r],t.call(null,e[c],c,e)}}function ut(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const lt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ft=e=>!se(e)&&e!==lt;function xe(){const{caseless:e}=ft(this)&&this||{},t={},n=(r,o)=>{const s=e&&ut(t,o)||o;ye(t[s])&&ye(r)?t[s]=xe(t[s],r):ye(r)?t[s]=xe({},r):Z(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ie(arguments[r],n);return t}const ir=(e,t,n,{allOwnKeys:r}={})=>(ie(t,(o,s)=>{n&&z(o)?e[s]=it(o,n):e[s]=o},{allOwnKeys:r}),e),ar=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),cr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ur=(e,t,n,r)=>{let o,s,i;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&Pe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},lr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},fr=e=>{if(!e)return null;if(Z(e))return e;let t=e.length;if(!ct(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pe(Uint8Array)),hr=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},pr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},mr=H("HTMLFormElement"),yr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),dt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),gr=H("RegExp"),ht=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ie(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Er=e=>{ht(e,(t,n)=>{if(z(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(z(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Z(e)?r(e):r(String(e).split(t)),n},Rr=()=>{},br=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,je="abcdefghijklmnopqrstuvwxyz",pt="0123456789",mt={DIGIT:pt,ALPHA:je,ALPHA_DIGIT:je+je.toUpperCase()+pt},Sr=(e=16,t=mt.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function vr(e){return!!(e&&z(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Or=e=>{const t=new Array(10),n=(r,o)=>{if(me(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Z(r)?[]:{};return ie(r,(i,c)=>{const f=n(i,o+1);!se(f)&&(s[c]=f)}),t[o]=void 0,s}}return r};return n(e,0)},Tr=H("AsyncFunction"),l={isArray:Z,isArrayBuffer:at,isBuffer:Hn,isFormData:Zn,isArrayBufferView:Jn,isString:Yn,isNumber:ct,isBoolean:qn,isObject:me,isPlainObject:ye,isReadableStream:tr,isRequest:nr,isResponse:rr,isHeaders:or,isUndefined:se,isDate:Kn,isFile:Gn,isBlob:Qn,isRegExp:gr,isFunction:z,isStream:$n,isURLSearchParams:er,isTypedArray:dr,isFileList:Xn,forEach:ie,merge:xe,extend:ir,trim:sr,stripBOM:ar,inherits:cr,toFlatObject:ur,kindOf:he,kindOfTest:H,endsWith:lr,toArray:fr,forEachEntry:hr,matchAll:pr,isHTMLForm:mr,hasOwnProperty:dt,hasOwnProp:dt,reduceDescriptors:ht,freezeMethods:Er,toObjectSet:wr,toCamelCase:yr,noop:Rr,toFiniteNumber:br,findKey:ut,global:lt,isContextDefined:ft,ALPHABET:mt,generateString:Sr,isSpecCompliantForm:vr,toJSONObject:Or,isAsyncFn:Tr,isThenable:e=>e&&(me(e)||z(e))&&z(e.then)&&z(e.catch)};function S(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}l.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yt=S.prototype,gt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{gt[e]={value:e}}),Object.defineProperties(S,gt),Object.defineProperty(yt,"isAxiosError",{value:!0}),S.from=(e,t,n,r,o,s)=>{const i=Object.create(yt);return l.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),S.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Cr=null;function Fe(e){return l.isPlainObject(e)||l.isArray(e)}function Et(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function wt(e,t,n){return e?e.concat(t).map(function(o,s){return o=Et(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Ar(e){return l.isArray(e)&&!e.some(Fe)}const _r=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function ge(e,t,n){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,O){return!l.isUndefined(O[E])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(!f&&l.isBlob(m))throw new S("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?f&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,E,O){let w=m;if(m&&!O&&typeof m=="object"){if(l.endsWith(E,"{}"))E=r?E:E.slice(0,-2),m=JSON.stringify(m);else if(l.isArray(m)&&Ar(m)||(l.isFileList(m)||l.endsWith(E,"[]"))&&(w=l.toArray(m)))return E=Et(E),w.forEach(function(T,I){!(l.isUndefined(T)||T===null)&&t.append(i===!0?wt([E],I,s):i===null?E:E+"[]",d(T))}),!1}return Fe(m)?!0:(t.append(wt(O,E,s),d(m)),!1)}const y=[],R=Object.assign(_r,{defaultVisitor:u,convertValue:d,isVisitable:Fe});function p(m,E){if(!l.isUndefined(m)){if(y.indexOf(m)!==-1)throw Error("Circular reference detected in "+E.join("."));y.push(m),l.forEach(m,function(w,v){(!(l.isUndefined(w)||w===null)&&o.call(t,w,l.isString(v)?v.trim():v,E,R))===!0&&p(w,E?E.concat(v):[v])}),y.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function De(e,t){this._pairs=[],e&&ge(e,this,t)}const bt=De.prototype;bt.append=function(t,n){this._pairs.push([t,n])},bt.toString=function(t){const n=t?function(r){return t.call(this,r,Rt)}:Rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Pr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function St(e,t,n){if(!t)return e;const r=n&&n.encode||Pr,o=n&&n.serialize;let s;if(o?s=o(t,n):s=l.isURLSearchParams(t)?t.toString():new De(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class vt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:De,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ne=typeof window<"u"&&typeof document<"u",jr=(e=>Ne&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Fr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dr=Ne&&window.location.href||"http://localhost",J={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ne,hasStandardBrowserEnv:jr,hasStandardBrowserWebWorkerEnv:Fr,origin:Dr},Symbol.toStringTag,{value:"Module"})),...xr};function Nr(e,t){return ge(e,new J.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return J.isNode&&l.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Lr(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kr(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Tt(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=s>=n.length;return i=!i&&l.isArray(o)?o.length:i,f?(l.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!c):((!o[i]||!l.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&l.isArray(o[i])&&(o[i]=kr(o[i])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const n={};return l.forEachEntry(e,(r,o)=>{t(Lr(r),o,n,0)}),n}return null}function Ir(e,t,n){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ae={transitional:Ot,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=l.isObject(t);if(s&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return o?JSON.stringify(Tt(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Nr(t,this.formSerializer).toString();if((c=l.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ge(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Ir(t)):t}],transformResponse:[function(t){const n=this.transitional||ae.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?S.from(c,S.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{ae.headers[e]={}});const Ur=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Br=e=>{const t={};let n,r,o;return e&&e.split(`
25
+ Check the top-level render call using <`+g+">.")}return h}}function cn(a,h){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var g=Po(h);if(an[g])return;an[g]=!0;var b="";a&&a._owner&&a._owner!==Xe.current&&(b=" It was passed a child from "+q(a._owner.type)+"."),te(a),v('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),te(null)}}function un(a,h){{if(typeof a!="object")return;if(Ge(a))for(var g=0;g<a.length;g++){var b=a[g];Ze(b)&&cn(b,h)}else if(Ze(a))a._store&&(a._store.validated=!0);else if(a){var P=O(a);if(typeof P=="function"&&P!==a.entries)for(var j=P.call(a),_;!(_=j.next()).done;)Ze(_.value)&&cn(_.value,h)}}}function xo(a){{var h=a.type;if(h==null||typeof h=="string")return;var g;if(typeof h=="function")g=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===f||h.$$typeof===y))g=h.propTypes;else return;if(g){var b=q(h);yo(g,a.props,"prop",b,a)}else if(h.PropTypes!==void 0&&!$e){$e=!0;var P=q(h);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function jo(a){{for(var h=Object.keys(a.props),g=0;g<h.length;g++){var b=h[g];if(b!=="children"&&b!=="key"){te(a),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",b),te(null);break}}a.ref!==null&&(te(a),v("Invalid attribute `ref` supplied to `React.Fragment`."),te(null))}}function ln(a,h,g,b,P,j){{var _=Se(a);if(!_){var A="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(A+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=_o();U?A+=U:A+=sn();var N;a===null?N="null":Ge(a)?N="array":a!==void 0&&a.$$typeof===t?(N="<"+(q(a.type)||"Unknown")+" />",A=" Did you accidentally export a JSX literal instead of a component?"):N=typeof a,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",N,A)}var L=Ao(a,h,g,P,j);if(L==null)return L;if(_){var V=h.children;if(V!==void 0)if(b)if(Ge(V)){for(var ne=0;ne<V.length;ne++)un(V[ne],a);Object.freeze&&Object.freeze(V)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else un(V,a)}return a===r?jo(L):xo(L),L}}function Fo(a,h,g){return ln(a,h,g,!0)}function Do(a,h,g){return ln(a,h,g,!1)}var No=Do,Lo=Fo;oe.Fragment=r,oe.jsx=No,oe.jsxs=Lo}()),oe}process.env.NODE_ENV==="production"?_e.exports=dn():_e.exports=hn();var Y=_e.exports;const M=C.createContext({}),pn=({children:e,apiURL:t,libraries:n,localStorageKeys:r})=>{const o=C.useMemo(()=>({apiURL:t,libraries:n,localStorageKeys:r}),[t,n,r]);return Y.jsx(M.Provider,{value:o,children:e})},mn="user",yn=({Fallback:e,isLogged:t,loginPath:n="/login",redirect401Path:r="/login",...o})=>{var T,I,W,k;const{libraries:s,localStorageKeys:i}=C.useContext(M),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)||mn;if(!c)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const[u,y]=C.useState(null),{useLocation:R,Navigate:p,Outlet:m}=c,E=R(),O=C.useRef(!1),w=typeof t=="function"?t():!!t,v=typeof w=="boolean"?w:w==null?void 0:w.isLogged;return C.useEffect(()=>{O.current||(O.current=!0,f.interceptors.response.use(F=>F,async F=>{var Se;return typeof F=="object"&&F&&"response"in F&&F.response&&typeof F.response=="object"&&"status"in F.response&&F.response&&typeof F.response=="object"&&"status"in F.response&&((Se=F==null?void 0:F.response)==null?void 0:Se.status)===401&&(f.defaults.headers.common.Authorization=null,typeof window<"u"&&window.localStorage&&localStorage.removeItem(d),y(r)),Promise.reject(F)}))},[f.defaults.headers.common,f.interceptors.response,d,r]),v&&!u?Y.jsx(C.Suspense,{fallback:e,children:(I=(T=E.state)==null?void 0:T.from)!=null&&I.state&&((k=(W=E.state)==null?void 0:W.from)==null?void 0:k.pathname)===n?Y.jsx(p,{to:E.state.from.state.from.pathname+E.state.from.state.from.search,replace:!0}):Y.jsx(m,{})}):Y.jsx(p,{to:n+E.search,state:{from:E},replace:!0})},gn=({data:e,...t})=>{const{libraries:n}=C.useContext(M),r=(t==null?void 0:t.reactRouter)||(n==null?void 0:n.reactRouter),o=(t==null?void 0:t.gtm)||(n==null?void 0:n.gtm);if(!r)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");if(!o)throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");const{useGoogleTagManager:s}=o,{useLocation:i,Outlet:c}=r,{pathname:f}=i(),{sendEvent:d}=s();return C.useEffect(()=>{d({event:"pageView",pathname:f,...e})},[e,f,d]),Y.jsx(c,{})},En="user",wn=({tokenTypeKey:e="tokenType",tokenKey:t="accessToken",postContentType:n="application/json",...r})=>{const{apiURL:o=r.apiURL,libraries:s,localStorageKeys:i}=C.useContext(M),c=(r==null?void 0:r.userLocalStorageKey)||(i==null?void 0:i.user)||En,f=(r==null?void 0:r.axios)||(s==null?void 0:s.axios);if(!f)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!(f!=null&&f.defaults))return null;if(typeof window<"u"&&window.localStorage){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;p&&(f.defaults.headers.common.Authorization=p)}return f.defaults.baseURL=o,f.defaults.headers.post["Content-Type"]=n,null},Rn=({debug:e,resources:t,...n})=>{const{libraries:r}=C.useContext(M),o=(n==null?void 0:n.i18)||(r==null?void 0:r.i18),{i18next:s,initReactI18next:i,languageDetector:c}=o||{};if(!o)throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return s!=null&&s.isInitialized||(s.use(c).use(i).init({debug:e,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:"languageChanged loaded",useSuspense:!0},resources:t,returnNull:!1}).then(()=>{document.documentElement.lang!==s.resolvedLanguage&&s.resolvedLanguage&&document.documentElement.setAttribute("lang",s.resolvedLanguage)}),s.on("languageChanged",f=>{document.documentElement.setAttribute("lang",f)})),null},bn=({dsn:e,integrations:t,tracesSampleRate:n,replaysSessionSampleRate:r,replaysOnErrorSampleRate:o,tracePropagationTargets:s,ignoreErrors:i,debug:c,environment:f,release:d,...u})=>{const{libraries:y}=C.useContext(M),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);if(!R)throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!p)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(R.isInitialized())return null;const{createRoutesFromChildren:m,matchRoutes:E,useLocation:O,useNavigationType:w}=p;return(c||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&R.init({debug:c,dsn:e,environment:f||"production",ignoreErrors:[...i||[],/dynamically imported module/,/Cannot read properties of undefined \(reading 'default'\)/,/Loading chunk \d+ failed/,/ChunkLoadError/,/Failed to fetch dynamically imported module/,/vite:preloadError/],integrations:[R.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:m,matchRoutes:E,useEffect:C.useEffect,useLocation:O,useNavigationType:w}),...t||[]],release:d,replaysOnErrorSampleRate:o||1,replaysSessionSampleRate:r||.1,tracePropagationTargets:s,tracesSampleRate:n||1}),null},Sn=({IMaskMixin:e,...t})=>{const n=C.useMemo(()=>e(({TextField:r,...o})=>Y.jsx(r,{...o})),[e]);return Y.jsx(n,{...t})},vn=({language:e,...t})=>{const{libraries:n}=C.useContext(M),r=(t==null?void 0:t.dayjs)||(n==null?void 0:n.dayjs),o=(t==null?void 0:t.plugin)||(n==null?void 0:n.dayjsPlugin);if(!r)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props of InitializeDaysJSConfig.");return C.useEffect(()=>{(async()=>{var c;const i=e||((c=navigator.language)==null?void 0:c.slice(0,2))||"en";o&&o.forEach(f=>{f&&r.extend(f)}),await import("dayjs/locale/en"),await import("dayjs/locale/fr"),r.locale(i)})().then()},[r,o,e]),null},On=()=>(C.useEffect(()=>{const e=t=>{try{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),window.location.reload()}catch{}};return window.addEventListener("vite:preloadError",e),()=>{window.removeEventListener("vite:preloadError",e)}},[]),null),Tn=e=>e&&typeof e=="function",Cn=e=>e&&typeof e=="function",An=({children:e,defaultQueriesOptions:t,defaultMutationsOptions:n,...r})=>{var f,d;const{libraries:o}=C.useContext(M),s=(r==null?void 0:r.QueryClient)||((f=o==null?void 0:o.reactQuery)==null?void 0:f.QueryClient),i=(r==null?void 0:r.QueryClientProvider)||((d=o==null?void 0:o.reactQuery)==null?void 0:d.QueryClientProvider);if(!s)throw new Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!i)throw new Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!Tn(i))throw new Error("Provided QueryClientProvider dependencies are not valid.");if(!Cn(s))throw new Error("Provided QueryClient dependencies are not valid.");const c=new s({defaultOptions:{mutations:{...n},queries:{getNextPageParam:(u,y,R)=>u.length+(R||0),refetchOnWindowFocus:!1,retry:3,...t}}});return Y.jsx(i,{client:c,children:e})},_n=e=>{var d,u,y;const{libraries:t}=C.useContext(M),n=(e==null?void 0:e.i18)||(t==null?void 0:t.i18),r=((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=n==null?void 0:n.i18next)==null?void 0:y.t)||r||(R=>R),{unknownErrorTranslationKey:s="error.unknownError"}=e||{},i=o(s),c=C.useCallback(R=>{var m,E,O,w,v,T,I,W,k;const{response:p}=R||{};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((v=p==null?void 0:p.data)==null?void 0:v.detail)&&((I=(T=p==null?void 0:p.data)==null?void 0:T.detail[0])!=null&&I.msg)&&typeof((k=(W=p==null?void 0:p.data)==null?void 0:W.detail[0])==null?void 0:k.msg)=="string"?String(p.data.detail[0].msg):i},[i]);return{getErrorCode:C.useCallback(R=>{var m,E,O;const{response:p}=R||{};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"},[]),printError:c}},Pn=({data:e,fetchNextPage:t,isFetchingNextPage:n,isInitialLoading:r,isLoading:o,enabled:s=!0})=>{const i=C.useCallback(async f=>{n||!s||await t({pageParam:(f==null?void 0:f.pageParam)||f.visibleRowsCount})},[s,t,n]),c=C.useMemo(()=>{if(e)return e.pages.reduce((f,d)=>[...f,...d],[])},[e]);return{fetchNextPageOnRowsScrollEnd:i,isLoading:n||o,loadingVariant:r?"skeleton":"linear",rows:c}},xn=e=>{const{libraries:t}=C.useContext(M),n=(e==null?void 0:e.axios)||(t==null?void 0:t.axios),r=(e==null?void 0:e.localStorageKey)||"user";if(!n)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");const o=C.useCallback(({tokenType:i,accessToken:c})=>{n.defaults.headers.common.Authorization=`${i} ${c}`},[n.defaults.headers.common]),s=()=>{n.defaults.headers.common.Authorization=null};return C.useEffect(()=>{const i=({newValue:c,key:f})=>{if(f===r&&c)try{const{accessToken:d,tokenType:u}=JSON.parse(c);o({accessToken:d,tokenType:u})}catch(d){console.error("Failed to parse newValue from localStorage:",d)}};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i)}},[r,o]),{clearAuthenticationToken:s,setAuthenticationToken:o}},nt=({library:e,date:t,format:n="ll"})=>e(t).format(n),rt=(e,t)=>{const{fractionDigits:n=0,metric:r="km"}=t||{},o=Number(e);return Number.isNaN(o)?`0${r}`:`${o.toFixed(n)}${r}`},ot=e=>!e||typeof e!="string"?"":e.replace(/_/g," ").toLowerCase().split(" ").map(n=>n.length>0?n.charAt(0).toUpperCase()+n.slice(1):n).join(" "),jn=e=>e!=null&&e.startsWith("/")?e!=null&&e.startsWith("/files")?e:`/files${e}`:e!=null&&e.startsWith("files")?`/${e}`:`/files/${e}`,Fn=({path:e,size:t,apiURL:n})=>{if(!e)return"";const r=jn(e),o=`${n}${r}`,s=o.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/)!==null;return typeof t=="number"&&s?`${o.replace("/files",`/thumbs/${t}`)}`:o},Dn=e=>{const{apiURL:t,libraries:n}=C.useContext(M),r=(e==null?void 0:e.dayjs)||(n==null?void 0:n.dayjs);return{dateAdapter:(i,c)=>{if(!r)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return nt({date:i,format:c,library:r})},distanceAdapter:rt,filePathAdapter:(i,c)=>{if(!t)throw new Error("API URL is not provided. You can provide it with InjectDependenciesProvider or directly in props to filePathAdapter.");return Fn({apiURL:t,path:i,size:c})},worksiteNameAdapter:ot}},de=(e,t)=>t==="short"?e.split("-")[0]:e,Nn=(e,t="full")=>{const[n,r]=C.useState(()=>{const o=(e==null?void 0:e.language)||navigator.language;return e&&"isInitialized"in e&&e.isInitialized,de(o,t)});return C.useEffect(()=>{var s;e&&"isInitialized"in e&&e.isInitialized&&e.language&&r(de(e.language,t));const o=i=>{r(de(i,t))};return(s=e==null?void 0:e.on)==null||s.call(e,"languageChanged",o),()=>{var i;(i=e==null?void 0:e.off)==null||i.call(e,"languageChanged",o)}},[e,t]),n},Ln="tracktor.filter",st=(e,t,n)=>`${n}_${e}=>${t}`,kn=e=>{const{libraries:t,localStorageKeys:n}=C.useContext(M),r=(e==null?void 0:e.reactRouter)||(t==null?void 0:t.reactRouter),{useLocation:o,useSearchParams:s}=r,{pathname:i}=o(),[c,f]=s(),d=(n==null?void 0:n.filter)||Ln;if(!r)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");const u=(m,E,O=!0)=>{const w=st(m,(e==null?void 0:e.pathname)||i,d);if(!E||Array.isArray(E)&&!E.length){c.delete(m),f(c),localStorage.removeItem(w);return}O&&E&&localStorage.setItem(w,JSON.stringify({...c,[m]:E})),E&&(c.set(m,JSON.stringify(E)),f(c))};return{getFilter:(m,E)=>{const O=c.get(m);if(O)try{return JSON.parse(O)}catch{return O}const w=st(m,(e==null?void 0:e.pathname)||i,d),v=localStorage.getItem(w);if(v)try{return JSON.parse(v)[m]}catch{}return E},getFilters:()=>{const m=Object.fromEntries(c.entries()),O=Object.keys(localStorage).filter(w=>w.startsWith(d)&&w.endsWith((e==null?void 0:e.pathname)||i)).reduce((w,v)=>{var I,W;const T=localStorage.getItem(v);if(T){const k=JSON.parse(T),F=(I=Object.keys(k))==null?void 0:I[0];w[F]=(W=Object.values(k))==null?void 0:W[0]}return w},{});return{...m,...O}},handleFilter:(m,E)=>(O,w)=>{if(w||Array.isArray(w)&&w.length===0){const v=E||"value",T=typeof w=="object"&&v in w?w[v||"value"]:w;u(m,T);return}u(m,void 0)},setFilter:u}},In=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Un=e=>{const r=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("");return r.charAt(0).toLowerCase()+r.slice(1)},Bn=e=>(e.split("/").pop()||e).replace(/\.json$/,"").replace(/^openapi\./,""),Mn=(e,t,n)=>{const r=Un(t),o=In(n);return`${r}${o}`},zn=e=>{if(e)return(e==null?void 0:e.reduce((t,n)=>(t[n]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},t),{}))||{}},Wn=e=>(Array.isArray(e)?e:[e]).reduce((n,r)=>{const{output:o,operationsToGenerateInfiniteQueryHook:s,input:i="./openapi.json"}=r||{},c=Bn(i);return{...n,[c]:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:i,output:{baseUrl:o==null?void 0:o.baseUrl,client:"react-query",mode:"tags-split",override:{...(s==null?void 0:s.length)&&{operations:zn(s)},header:f=>["Generated by orval 🍺",...f.title?[f.title]:[],...f.description?[f.description]:[]],mutator:{name:"axiosCustomInstance",path:"./axiosCustomInstance.ts"},operationName:Mn,query:{useQuery:!0}},schemas:(o==null?void 0:o.schemas)||`src/api/${c}/model`,target:(o==null?void 0:o.target)||`src/api/${c}/services/api.ts`,...o}}}},{});function it(e,t){return function(){return e.apply(t,arguments)}}const{toString:Vn}=Object.prototype,{getPrototypeOf:Pe}=Object,he=(e=>t=>{const n=Vn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),H=e=>(e=e.toLowerCase(),t=>he(t)===e),pe=e=>t=>typeof t===e,{isArray:Z}=Array,se=pe("undefined");function Hn(e){return e!==null&&!se(e)&&e.constructor!==null&&!se(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const at=H("ArrayBuffer");function Jn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&at(e.buffer),t}const Yn=pe("string"),z=pe("function"),ct=pe("number"),me=e=>e!==null&&typeof e=="object",qn=e=>e===!0||e===!1,ye=e=>{if(he(e)!=="object")return!1;const t=Pe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kn=H("Date"),Gn=H("File"),Qn=H("Blob"),Xn=H("FileList"),$n=e=>me(e)&&z(e.pipe),Zn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||z(e.append)&&((t=he(e))==="formdata"||t==="object"&&z(e.toString)&&e.toString()==="[object FormData]"))},er=H("URLSearchParams"),[tr,nr,rr,or]=["ReadableStream","Request","Response","Headers"].map(H),sr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Z(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let c;for(r=0;r<i;r++)c=s[r],t.call(null,e[c],c,e)}}function ut(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const lt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ft=e=>!se(e)&&e!==lt;function xe(){const{caseless:e}=ft(this)&&this||{},t={},n=(r,o)=>{const s=e&&ut(t,o)||o;ye(t[s])&&ye(r)?t[s]=xe(t[s],r):ye(r)?t[s]=xe({},r):Z(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ie(arguments[r],n);return t}const ir=(e,t,n,{allOwnKeys:r}={})=>(ie(t,(o,s)=>{n&&z(o)?e[s]=it(o,n):e[s]=o},{allOwnKeys:r}),e),ar=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),cr=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ur=(e,t,n,r)=>{let o,s,i;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&Pe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},lr=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},fr=e=>{if(!e)return null;if(Z(e))return e;let t=e.length;if(!ct(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pe(Uint8Array)),hr=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},pr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},mr=H("HTMLFormElement"),yr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),dt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),gr=H("RegExp"),ht=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ie(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Er=e=>{ht(e,(t,n)=>{if(z(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(z(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},wr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Z(e)?r(e):r(String(e).split(t)),n},Rr=()=>{},br=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,je="abcdefghijklmnopqrstuvwxyz",pt="0123456789",mt={DIGIT:pt,ALPHA:je,ALPHA_DIGIT:je+je.toUpperCase()+pt},Sr=(e=16,t=mt.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function vr(e){return!!(e&&z(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Or=e=>{const t=new Array(10),n=(r,o)=>{if(me(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Z(r)?[]:{};return ie(r,(i,c)=>{const f=n(i,o+1);!se(f)&&(s[c]=f)}),t[o]=void 0,s}}return r};return n(e,0)},Tr=H("AsyncFunction"),l={isArray:Z,isArrayBuffer:at,isBuffer:Hn,isFormData:Zn,isArrayBufferView:Jn,isString:Yn,isNumber:ct,isBoolean:qn,isObject:me,isPlainObject:ye,isReadableStream:tr,isRequest:nr,isResponse:rr,isHeaders:or,isUndefined:se,isDate:Kn,isFile:Gn,isBlob:Qn,isRegExp:gr,isFunction:z,isStream:$n,isURLSearchParams:er,isTypedArray:dr,isFileList:Xn,forEach:ie,merge:xe,extend:ir,trim:sr,stripBOM:ar,inherits:cr,toFlatObject:ur,kindOf:he,kindOfTest:H,endsWith:lr,toArray:fr,forEachEntry:hr,matchAll:pr,isHTMLForm:mr,hasOwnProperty:dt,hasOwnProp:dt,reduceDescriptors:ht,freezeMethods:Er,toObjectSet:wr,toCamelCase:yr,noop:Rr,toFiniteNumber:br,findKey:ut,global:lt,isContextDefined:ft,ALPHABET:mt,generateString:Sr,isSpecCompliantForm:vr,toJSONObject:Or,isAsyncFn:Tr,isThenable:e=>e&&(me(e)||z(e))&&z(e.then)&&z(e.catch)};function S(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}l.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:l.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yt=S.prototype,gt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{gt[e]={value:e}}),Object.defineProperties(S,gt),Object.defineProperty(yt,"isAxiosError",{value:!0}),S.from=(e,t,n,r,o,s)=>{const i=Object.create(yt);return l.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),S.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Cr=null;function Fe(e){return l.isPlainObject(e)||l.isArray(e)}function Et(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function wt(e,t,n){return e?e.concat(t).map(function(o,s){return o=Et(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Ar(e){return l.isArray(e)&&!e.some(Fe)}const _r=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function ge(e,t,n){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=l.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,O){return!l.isUndefined(O[E])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(!f&&l.isBlob(m))throw new S("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?f&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,E,O){let w=m;if(m&&!O&&typeof m=="object"){if(l.endsWith(E,"{}"))E=r?E:E.slice(0,-2),m=JSON.stringify(m);else if(l.isArray(m)&&Ar(m)||(l.isFileList(m)||l.endsWith(E,"[]"))&&(w=l.toArray(m)))return E=Et(E),w.forEach(function(T,I){!(l.isUndefined(T)||T===null)&&t.append(i===!0?wt([E],I,s):i===null?E:E+"[]",d(T))}),!1}return Fe(m)?!0:(t.append(wt(O,E,s),d(m)),!1)}const y=[],R=Object.assign(_r,{defaultVisitor:u,convertValue:d,isVisitable:Fe});function p(m,E){if(!l.isUndefined(m)){if(y.indexOf(m)!==-1)throw Error("Circular reference detected in "+E.join("."));y.push(m),l.forEach(m,function(w,v){(!(l.isUndefined(w)||w===null)&&o.call(t,w,l.isString(v)?v.trim():v,E,R))===!0&&p(w,E?E.concat(v):[v])}),y.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function De(e,t){this._pairs=[],e&&ge(e,this,t)}const bt=De.prototype;bt.append=function(t,n){this._pairs.push([t,n])},bt.toString=function(t){const n=t?function(r){return t.call(this,r,Rt)}:Rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Pr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function St(e,t,n){if(!t)return e;const r=n&&n.encode||Pr,o=n&&n.serialize;let s;if(o?s=o(t,n):s=l.isURLSearchParams(t)?t.toString():new De(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class vt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:De,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ne=typeof window<"u"&&typeof document<"u",jr=(e=>Ne&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Fr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dr=Ne&&window.location.href||"http://localhost",J={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ne,hasStandardBrowserEnv:jr,hasStandardBrowserWebWorkerEnv:Fr,origin:Dr},Symbol.toStringTag,{value:"Module"})),...xr};function Nr(e,t){return ge(e,new J.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return J.isNode&&l.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Lr(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function kr(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Tt(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),f=s>=n.length;return i=!i&&l.isArray(o)?o.length:i,f?(l.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!c):((!o[i]||!l.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&l.isArray(o[i])&&(o[i]=kr(o[i])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const n={};return l.forEachEntry(e,(r,o)=>{t(Lr(r),o,n,0)}),n}return null}function Ir(e,t,n){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ae={transitional:Ot,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=l.isObject(t);if(s&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return o?JSON.stringify(Tt(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Nr(t,this.formSerializer).toString();if((c=l.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ge(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Ir(t)):t}],transformResponse:[function(t){const n=this.transitional||ae.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?S.from(c,S.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{ae.headers[e]={}});const Ur=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Br=e=>{const t={};let n,r,o;return e&&e.split(`
26
26
  `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Ur[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ct=Symbol("internals");function ce(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return e===!1||e==null?e:l.isArray(e)?e.map(Ee):String(e)}function Mr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const zr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Le(e,t,n,r,o){if(l.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!l.isString(t)){if(l.isString(r))return t.indexOf(r)!==-1;if(l.isRegExp(r))return r.test(t)}}function Wr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Vr(e,t){const n=l.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}class B{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(c,f,d){const u=ce(f);if(!u)throw new Error("header name must be a non-empty string");const y=l.findKey(o,u);(!y||o[y]===void 0||d===!0||d===void 0&&o[y]!==!1)&&(o[y||f]=Ee(c))}const i=(c,f)=>l.forEach(c,(d,u)=>s(d,u,f));if(l.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(l.isString(t)&&(t=t.trim())&&!zr(t))i(Br(t),n);else if(l.isHeaders(t))for(const[c,f]of t.entries())s(f,c,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=ce(t),t){const r=l.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Mr(o);if(l.isFunction(n))return n.call(this,o,r);if(l.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ce(t),t){const r=l.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Le(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=ce(i),i){const c=l.findKey(r,i);c&&(!n||Le(r,r[c],c,n))&&(delete r[c],o=!0)}}return l.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Le(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return l.forEach(this,(o,s)=>{const i=l.findKey(r,s);if(i){n[i]=Ee(o),delete n[s];return}const c=t?Wr(s):String(s).trim();c!==s&&delete n[s],n[c]=Ee(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return l.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&l.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
27
27
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ct]=this[Ct]={accessors:{}}).accessors,o=this.prototype;function s(i){const c=ce(i);r[c]||(Vr(o,i),r[c]=!0)}return l.isArray(t)?t.forEach(s):s(t),this}}B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),l.freezeMethods(B);function ke(e,t){const n=this||ae,r=t||n,o=B.from(r.headers);let s=r.data;return l.forEach(e,function(c){s=c.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function At(e){return!!(e&&e.__CANCEL__)}function ee(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}l.inherits(ee,S,{__CANCEL__:!0});function _t(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Hr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Jr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),u=r[s];i||(i=d),n[o]=f,r[o]=d;let y=s,R=0;for(;y!==o;)R+=n[y++],y=y%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),d-i<t)return;const p=u&&d-u;return p?Math.round(R*1e3/p):void 0}}function Yr(e,t){let n=0;const r=1e3/t;let o=null;return function(){const i=this===!0,c=Date.now();if(i||c-n>r)return o&&(clearTimeout(o),o=null),n=c,e.apply(null,arguments);o||(o=setTimeout(()=>(o=null,n=Date.now(),e.apply(null,arguments)),r-(c-n)))}}const we=(e,t,n=3)=>{let r=0;const o=Jr(50,250);return Yr(s=>{const i=s.loaded,c=s.lengthComputable?s.total:void 0,f=i-r,d=o(f),u=i<=c;r=i;const y={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:d||void 0,estimated:d&&c&&u?(c-i)/d:void 0,event:s,lengthComputable:c!=null};y[t?"download":"upload"]=!0,e(y)},n)},qr=J.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(s){let i=s;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(i){const c=l.isString(i)?o(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Kr=J.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];l.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),l.isString(r)&&i.push("path="+r),l.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Gr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Pt(e,t){return e&&!Gr(t)?Qr(e,t):t}const xt=e=>e instanceof B?{...e}:e;function Q(e,t){t=t||{};const n={};function r(d,u,y){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}function o(d,u,y){if(l.isUndefined(u)){if(!l.isUndefined(d))return r(void 0,d,y)}else return r(d,u,y)}function s(d,u){if(!l.isUndefined(u))return r(void 0,u)}function i(d,u){if(l.isUndefined(u)){if(!l.isUndefined(d))return r(void 0,d)}else return r(void 0,u)}function c(d,u,y){if(y in t)return r(d,u);if(y in e)return r(void 0,d)}const f={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(d,u)=>o(xt(d),xt(u),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(u){const y=f[u]||o,R=y(e[u],t[u],u);l.isUndefined(R)&&y!==c||(n[u]=R)}),n}const jt=e=>{const t=Q({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:c}=t;t.headers=i=B.from(i),t.url=St(Pt(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(l.isFormData(n)){if(J.hasStandardBrowserEnv||J.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[d,...u]=f?f.split(";").map(y=>y.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...u].join("; "))}}if(J.hasStandardBrowserEnv&&(r&&l.isFunction(r)&&(r=r(t)),r||r!==!1&&qr(t.url))){const d=o&&s&&Kr.read(s);d&&i.set(o,d)}return t},Xr=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=jt(e);let s=o.data;const i=B.from(o.headers).normalize();let{responseType:c}=o,f;function d(){o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let u=new XMLHttpRequest;u.open(o.method.toUpperCase(),o.url,!0),u.timeout=o.timeout;function y(){if(!u)return;const p=B.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!c||c==="text"||c==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};_t(function(w){n(w),d()},function(w){r(w),d()},E),u=null}"onloadend"in u?u.onloadend=y:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(y)},u.onabort=function(){u&&(r(new S("Request aborted",S.ECONNABORTED,o,u)),u=null)},u.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,o,u)),u=null},u.ontimeout=function(){let m=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Ot;o.timeoutErrorMessage&&(m=o.timeoutErrorMessage),r(new S(m,E.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,o,u)),u=null},s===void 0&&i.setContentType(null),"setRequestHeader"in u&&l.forEach(i.toJSON(),function(m,E){u.setRequestHeader(E,m)}),l.isUndefined(o.withCredentials)||(u.withCredentials=!!o.withCredentials),c&&c!=="json"&&(u.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&u.addEventListener("progress",we(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",we(o.onUploadProgress)),(o.cancelToken||o.signal)&&(f=p=>{u&&(r(!p||p.type?new ee(null,e,u):p),u.abort(),u=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const R=Hr(o.url);if(R&&J.protocols.indexOf(R)===-1){r(new S("Unsupported protocol "+R+":",S.ERR_BAD_REQUEST,e));return}u.send(s||null)})},$r=(e,t)=>{let n=new AbortController,r;const o=function(f){if(!r){r=!0,i();const d=f instanceof Error?f:this.reason;n.abort(d instanceof S?d:new ee(d instanceof Error?d.message:d))}};let s=t&&setTimeout(()=>{o(new S(`timeout ${t} of ms exceeded`,S.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(f=>{f&&(f.removeEventListener?f.removeEventListener("abort",o):f.unsubscribe(o))}),e=null)};e.forEach(f=>f&&f.addEventListener&&f.addEventListener("abort",o));const{signal:c}=n;return c.unsubscribe=i,[c,()=>{s&&clearTimeout(s),s=null}]},Zr=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},eo=async function*(e,t,n){for await(const r of e)yield*Zr(ArrayBuffer.isView(r)?r:await n(String(r)),t)},Ft=(e,t,n,r,o)=>{const s=eo(e,t,o);let i=0;return new ReadableStream({type:"bytes",async pull(c){const{done:f,value:d}=await s.next();if(f){c.close(),r();return}let u=d.byteLength;n&&n(i+=u),c.enqueue(new Uint8Array(d))},cancel(c){return r(c),s.return()}},{highWaterMark:2})},Dt=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},Re=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nt=Re&&typeof ReadableStream=="function",Ie=Re&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),to=Nt&&(()=>{let e=!1;const t=new Request(J.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Lt=64*1024,Ue=Nt&&!!(()=>{try{return l.isReadableStream(new Response("").body)}catch{}})(),be={stream:Ue&&(e=>e.body)};Re&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!be[t]&&(be[t]=l.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new S(`Response type '${t}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const no=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(l.isArrayBufferView(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await Ie(e)).byteLength},ro=async(e,t)=>{const n=l.toFiniteNumber(e.getContentLength());return n??no(t)},Be={http:Cr,xhr:Xr,fetch:Re&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:c,onUploadProgress:f,responseType:d,headers:u,withCredentials:y="same-origin",fetchOptions:R}=jt(e);d=d?(d+"").toLowerCase():"text";let[p,m]=o||s||i?$r([o,s],i):[],E,O;const w=()=>{!E&&setTimeout(()=>{p&&p.unsubscribe()}),E=!0};let v;try{if(f&&to&&n!=="get"&&n!=="head"&&(v=await ro(u,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),F;l.isFormData(r)&&(F=k.headers.get("content-type"))&&u.setContentType(F),k.body&&(r=Ft(k.body,Lt,Dt(v,we(f)),null,Ie))}l.isString(y)||(y=y?"cors":"omit"),O=new Request(t,{...R,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",withCredentials:y});let T=await fetch(O);const I=Ue&&(d==="stream"||d==="response");if(Ue&&(c||I)){const k={};["status","statusText","headers"].forEach(ue=>{k[ue]=T[ue]});const F=l.toFiniteNumber(T.headers.get("content-length"));T=new Response(Ft(T.body,Lt,c&&Dt(F,we(c,!0)),I&&w,Ie),k)}d=d||"text";let W=await be[l.findKey(be,d)||"text"](T,e);return!I&&w(),m&&m(),await new Promise((k,F)=>{_t(k,F,{data:W,headers:B.from(T.headers),status:T.status,statusText:T.statusText,config:e,request:O})})}catch(T){throw w(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,e,O),{cause:T.cause||T}):S.from(T,T&&T.code,e,O)}})};l.forEach(Be,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const kt=e=>`- ${e}`,oo=e=>l.isFunction(e)||e===null||e===!1,It={getAdapter:e=>{e=l.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!oo(n)&&(r=Be[(i=String(n)).toLowerCase()],r===void 0))throw new S(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
28
28
  `+s.map(kt).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracktor/shared-module",
3
- "version": "2.12.1",
3
+ "version": "2.12.2",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "types": "./dist/main.d.ts",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "scripts": {
28
28
  "dev": "vite",
29
- "build": "tsc && vite build",
29
+ "build": "vite build && cp src/config/orval/axiosCustomInstance.ts dist/config/orval/axiosCustomInstance.ts",
30
30
  "lint": "eslint . --max-warnings=0 && tsc --noEmit",
31
31
  "preview": "vite preview",
32
32
  "test": "yarn lint && vitest",