@tracktor/shared-module 1.0.0-beta.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/dist/components/Utils/DaysJSConfig.d.ts +1 -3
- package/dist/{en-Kq-Ai2eF.js → en-gK0dFos9.js} +1 -1
- package/dist/{fr-DDO6JByq.js → fr-tYyGRO0d.js} +1 -1
- package/dist/{main-WgJDBcLv.js → main-n8Gmn2zo.js} +120 -125
- package/dist/main.js +1 -1
- package/dist/main.umd.cjs +9 -9
- package/package.json +2 -2
- package/dist/relativeTime-SnDl5kJB.js +0 -68
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
interface I18nConfigProps {
|
|
2
2
|
language?: "fr" | "en";
|
|
3
|
-
plugins?: ["relativeTime"];
|
|
4
3
|
}
|
|
5
4
|
/**
|
|
6
5
|
* Initialize dayjs
|
|
7
6
|
* @param language
|
|
8
|
-
* @param plugin
|
|
9
7
|
* @constructor
|
|
10
8
|
*/
|
|
11
|
-
declare const DaysJSConfig: ({ language
|
|
9
|
+
declare const DaysJSConfig: ({ language }: I18nConfigProps) => null;
|
|
12
10
|
export default DaysJSConfig;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Ie, { useState as Cr, useRef as Tr, useLayoutEffect as Ne, Suspense as Sr, useEffect as We, createContext as wr, useMemo as se, useContext as Ve, useCallback as oe } from "react";
|
|
2
2
|
import $ from "axios";
|
|
3
|
-
import { useLocation as
|
|
3
|
+
import { useLocation as ue, Navigate as $e, Outlet as Ue, createRoutesFromChildren as Or, matchRoutes as xr, useNavigationType as jr } from "react-router-dom";
|
|
4
4
|
import { useGoogleTagManager as Pr } from "@tracktor/react-google-tag-manager";
|
|
5
5
|
import I, { t as Ar } from "i18next";
|
|
6
6
|
import kr from "i18next-browser-languagedetector";
|
|
7
7
|
import { initReactI18next as Dr } from "react-i18next";
|
|
8
8
|
import * as ae from "@sentry/react";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import Le from "mapbox-gl";
|
|
10
|
+
import z from "dayjs";
|
|
11
11
|
import { QueryClient as $r, QueryClientProvider as Lr } from "@tanstack/react-query";
|
|
12
12
|
var Mr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
13
13
|
function Fr(t) {
|
|
14
14
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
15
15
|
}
|
|
16
|
-
var
|
|
16
|
+
var ie = { exports: {} }, V = {};
|
|
17
17
|
/**
|
|
18
18
|
* @license React
|
|
19
19
|
* react-jsx-runtime.development.js
|
|
@@ -23,10 +23,10 @@ var se = { exports: {} }, U = {};
|
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
25
|
*/
|
|
26
|
-
var
|
|
26
|
+
var Me;
|
|
27
27
|
function Yr() {
|
|
28
|
-
return
|
|
29
|
-
var t =
|
|
28
|
+
return Me || (Me = 1, process.env.NODE_ENV !== "production" && function() {
|
|
29
|
+
var t = Ie, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), j = Symbol.iterator, w = "@@iterator";
|
|
30
30
|
function R(e) {
|
|
31
31
|
if (e === null || typeof e != "object")
|
|
32
32
|
return null;
|
|
@@ -51,14 +51,14 @@ function Yr() {
|
|
|
51
51
|
m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
var qe = !1, Be = !1, Ge = !1, Je = !1, He = !1,
|
|
55
|
-
|
|
54
|
+
var qe = !1, Be = !1, Ge = !1, Je = !1, He = !1, ce;
|
|
55
|
+
ce = Symbol.for("react.module.reference");
|
|
56
56
|
function Xe(e) {
|
|
57
57
|
return !!(typeof e == "string" || typeof e == "function" || e === s || e === y || He || e === v || e === g || e === h || Je || e === x || qe || Be || Ge || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === C || e.$$typeof === o || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
|
|
58
58
|
// types supported by any Flight configuration anywhere since
|
|
59
59
|
// we don't know which Flight build this will end up being used
|
|
60
60
|
// with.
|
|
61
|
-
e.$$typeof ===
|
|
61
|
+
e.$$typeof === ce || e.getModuleId !== void 0));
|
|
62
62
|
}
|
|
63
63
|
function Ke(e, r, a) {
|
|
64
64
|
var u = e.displayName;
|
|
@@ -67,7 +67,7 @@ function Yr() {
|
|
|
67
67
|
var p = r.displayName || r.name || "";
|
|
68
68
|
return p !== "" ? a + "(" + p + ")" : a;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function fe(e) {
|
|
71
71
|
return e.displayName || "Context";
|
|
72
72
|
}
|
|
73
73
|
function P(e) {
|
|
@@ -95,10 +95,10 @@ function Yr() {
|
|
|
95
95
|
switch (e.$$typeof) {
|
|
96
96
|
case c:
|
|
97
97
|
var r = e;
|
|
98
|
-
return
|
|
98
|
+
return fe(r) + ".Consumer";
|
|
99
99
|
case o:
|
|
100
100
|
var a = e;
|
|
101
|
-
return
|
|
101
|
+
return fe(a._context) + ".Provider";
|
|
102
102
|
case l:
|
|
103
103
|
return Ke(e, e.render, "ForwardRef");
|
|
104
104
|
case C:
|
|
@@ -115,18 +115,18 @@ function Yr() {
|
|
|
115
115
|
}
|
|
116
116
|
return null;
|
|
117
117
|
}
|
|
118
|
-
var L = Object.assign,
|
|
119
|
-
function
|
|
118
|
+
var L = Object.assign, N = 0, de, pe, ve, me, ge, he, ye;
|
|
119
|
+
function be() {
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
be.__reactDisabledLog = !0;
|
|
122
122
|
function Ze() {
|
|
123
123
|
{
|
|
124
|
-
if (
|
|
125
|
-
|
|
124
|
+
if (N === 0) {
|
|
125
|
+
de = console.log, pe = console.info, ve = console.warn, me = console.error, ge = console.group, he = console.groupCollapsed, ye = console.groupEnd;
|
|
126
126
|
var e = {
|
|
127
127
|
configurable: !0,
|
|
128
128
|
enumerable: !0,
|
|
129
|
-
value:
|
|
129
|
+
value: be,
|
|
130
130
|
writable: !0
|
|
131
131
|
};
|
|
132
132
|
Object.defineProperties(console, {
|
|
@@ -139,12 +139,12 @@ function Yr() {
|
|
|
139
139
|
groupEnd: e
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
|
|
142
|
+
N++;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
function Qe() {
|
|
146
146
|
{
|
|
147
|
-
if (
|
|
147
|
+
if (N--, N === 0) {
|
|
148
148
|
var e = {
|
|
149
149
|
configurable: !0,
|
|
150
150
|
enumerable: !0,
|
|
@@ -152,29 +152,29 @@ function Yr() {
|
|
|
152
152
|
};
|
|
153
153
|
Object.defineProperties(console, {
|
|
154
154
|
log: L({}, e, {
|
|
155
|
-
value:
|
|
155
|
+
value: de
|
|
156
156
|
}),
|
|
157
157
|
info: L({}, e, {
|
|
158
158
|
value: pe
|
|
159
159
|
}),
|
|
160
160
|
warn: L({}, e, {
|
|
161
|
-
value:
|
|
161
|
+
value: ve
|
|
162
162
|
}),
|
|
163
163
|
error: L({}, e, {
|
|
164
|
-
value:
|
|
164
|
+
value: me
|
|
165
165
|
}),
|
|
166
166
|
group: L({}, e, {
|
|
167
|
-
value:
|
|
167
|
+
value: ge
|
|
168
168
|
}),
|
|
169
169
|
groupCollapsed: L({}, e, {
|
|
170
|
-
value:
|
|
170
|
+
value: he
|
|
171
171
|
}),
|
|
172
172
|
groupEnd: L({}, e, {
|
|
173
|
-
value:
|
|
173
|
+
value: ye
|
|
174
174
|
})
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
N < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
var X = D.ReactCurrentDispatcher, K;
|
|
@@ -196,7 +196,7 @@ function Yr() {
|
|
|
196
196
|
var er = typeof WeakMap == "function" ? WeakMap : Map;
|
|
197
197
|
B = new er();
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Ee(e, r) {
|
|
200
200
|
if (!e || Z)
|
|
201
201
|
return "";
|
|
202
202
|
{
|
|
@@ -264,11 +264,11 @@ function Yr() {
|
|
|
264
264
|
} finally {
|
|
265
265
|
Z = !1, X.current = m, Qe(), Error.prepareStackTrace = p;
|
|
266
266
|
}
|
|
267
|
-
var Y = e ? e.displayName || e.name : "",
|
|
268
|
-
return typeof e == "function" && B.set(e,
|
|
267
|
+
var Y = e ? e.displayName || e.name : "", De = Y ? q(Y) : "";
|
|
268
|
+
return typeof e == "function" && B.set(e, De), De;
|
|
269
269
|
}
|
|
270
270
|
function rr(e, r, a) {
|
|
271
|
-
return
|
|
271
|
+
return Ee(e, !1);
|
|
272
272
|
}
|
|
273
273
|
function tr(e) {
|
|
274
274
|
var r = e.prototype;
|
|
@@ -278,7 +278,7 @@ function Yr() {
|
|
|
278
278
|
if (e == null)
|
|
279
279
|
return "";
|
|
280
280
|
if (typeof e == "function")
|
|
281
|
-
return
|
|
281
|
+
return Ee(e, tr(e));
|
|
282
282
|
if (typeof e == "string")
|
|
283
283
|
return q(e);
|
|
284
284
|
switch (e) {
|
|
@@ -303,13 +303,13 @@ function Yr() {
|
|
|
303
303
|
}
|
|
304
304
|
return "";
|
|
305
305
|
}
|
|
306
|
-
var J = Object.prototype.hasOwnProperty,
|
|
306
|
+
var J = Object.prototype.hasOwnProperty, Re = {}, _e = D.ReactDebugCurrentFrame;
|
|
307
307
|
function H(e) {
|
|
308
308
|
if (e) {
|
|
309
309
|
var r = e._owner, a = G(e.type, e._source, r ? r.type : null);
|
|
310
|
-
|
|
310
|
+
_e.setExtraStackFrame(a);
|
|
311
311
|
} else
|
|
312
|
-
|
|
312
|
+
_e.setExtraStackFrame(null);
|
|
313
313
|
}
|
|
314
314
|
function nr(e, r, a, u, p) {
|
|
315
315
|
{
|
|
@@ -326,7 +326,7 @@ function Yr() {
|
|
|
326
326
|
} catch (b) {
|
|
327
327
|
f = b;
|
|
328
328
|
}
|
|
329
|
-
f && !(f instanceof Error) && (H(p), _("%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).", u || "React class", a, d, typeof f), H(null)), f instanceof Error && !(f.message in
|
|
329
|
+
f && !(f instanceof Error) && (H(p), _("%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).", u || "React class", a, d, typeof f), H(null)), f instanceof Error && !(f.message in Re) && (Re[f.message] = !0, H(p), _("Failed %s type: %s", a, f.message), H(null));
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
}
|
|
@@ -342,24 +342,24 @@ function Yr() {
|
|
|
342
342
|
}
|
|
343
343
|
function ir(e) {
|
|
344
344
|
try {
|
|
345
|
-
return
|
|
345
|
+
return Ce(e), !1;
|
|
346
346
|
} catch {
|
|
347
347
|
return !0;
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function Ce(e) {
|
|
351
351
|
return "" + e;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Te(e) {
|
|
354
354
|
if (ir(e))
|
|
355
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", or(e)),
|
|
355
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", or(e)), Ce(e);
|
|
356
356
|
}
|
|
357
|
-
var
|
|
357
|
+
var W = D.ReactCurrentOwner, sr = {
|
|
358
358
|
key: !0,
|
|
359
359
|
ref: !0,
|
|
360
360
|
__self: !0,
|
|
361
361
|
__source: !0
|
|
362
|
-
},
|
|
362
|
+
}, Se, we, ee;
|
|
363
363
|
ee = {};
|
|
364
364
|
function ur(e) {
|
|
365
365
|
if (J.call(e, "ref")) {
|
|
@@ -378,15 +378,15 @@ function Yr() {
|
|
|
378
378
|
return e.key !== void 0;
|
|
379
379
|
}
|
|
380
380
|
function cr(e, r) {
|
|
381
|
-
if (typeof e.ref == "string" &&
|
|
382
|
-
var a = P(
|
|
383
|
-
ee[a] || (_('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', P(
|
|
381
|
+
if (typeof e.ref == "string" && W.current && r && W.current.stateNode !== r) {
|
|
382
|
+
var a = P(W.current.type);
|
|
383
|
+
ee[a] || (_('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', P(W.current.type), e.ref), ee[a] = !0);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
function fr(e, r) {
|
|
387
387
|
{
|
|
388
388
|
var a = function() {
|
|
389
|
-
|
|
389
|
+
Se || (Se = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
390
390
|
};
|
|
391
391
|
a.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
392
392
|
get: a,
|
|
@@ -397,7 +397,7 @@ function Yr() {
|
|
|
397
397
|
function dr(e, r) {
|
|
398
398
|
{
|
|
399
399
|
var a = function() {
|
|
400
|
-
|
|
400
|
+
we || (we = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
401
401
|
};
|
|
402
402
|
a.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
403
403
|
get: a,
|
|
@@ -405,7 +405,7 @@ function Yr() {
|
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
var
|
|
408
|
+
var pr = function(e, r, a, u, p, m, d) {
|
|
409
409
|
var f = {
|
|
410
410
|
// This tag allows us to uniquely identify this as a React Element
|
|
411
411
|
$$typeof: n,
|
|
@@ -434,10 +434,10 @@ function Yr() {
|
|
|
434
434
|
value: p
|
|
435
435
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
436
436
|
};
|
|
437
|
-
function
|
|
437
|
+
function vr(e, r, a, u, p) {
|
|
438
438
|
{
|
|
439
439
|
var m, d = {}, f = null, S = null;
|
|
440
|
-
a !== void 0 && (
|
|
440
|
+
a !== void 0 && (Te(a), f = "" + a), lr(r) && (Te(r.key), f = "" + r.key), ur(r) && (S = r.ref, cr(r, p));
|
|
441
441
|
for (m in r)
|
|
442
442
|
J.call(r, m) && !sr.hasOwnProperty(m) && (d[m] = r[m]);
|
|
443
443
|
if (e && e.defaultProps) {
|
|
@@ -449,23 +449,23 @@ function Yr() {
|
|
|
449
449
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
450
450
|
f && fr(d, E), S && dr(d, E);
|
|
451
451
|
}
|
|
452
|
-
return
|
|
452
|
+
return pr(e, f, S, p, u, W.current, d);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
var re = D.ReactCurrentOwner,
|
|
455
|
+
var re = D.ReactCurrentOwner, Oe = D.ReactDebugCurrentFrame;
|
|
456
456
|
function F(e) {
|
|
457
457
|
if (e) {
|
|
458
458
|
var r = e._owner, a = G(e.type, e._source, r ? r.type : null);
|
|
459
|
-
|
|
459
|
+
Oe.setExtraStackFrame(a);
|
|
460
460
|
} else
|
|
461
|
-
|
|
461
|
+
Oe.setExtraStackFrame(null);
|
|
462
462
|
}
|
|
463
463
|
var te;
|
|
464
464
|
te = !1;
|
|
465
465
|
function ne(e) {
|
|
466
466
|
return typeof e == "object" && e !== null && e.$$typeof === n;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function xe() {
|
|
469
469
|
{
|
|
470
470
|
if (re.current) {
|
|
471
471
|
var e = P(re.current.type);
|
|
@@ -488,10 +488,10 @@ Check your code at ` + r + ":" + a + ".";
|
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
var
|
|
491
|
+
var je = {};
|
|
492
492
|
function gr(e) {
|
|
493
493
|
{
|
|
494
|
-
var r =
|
|
494
|
+
var r = xe();
|
|
495
495
|
if (!r) {
|
|
496
496
|
var a = typeof e == "string" ? e : e.displayName || e.name;
|
|
497
497
|
a && (r = `
|
|
@@ -501,27 +501,27 @@ Check the top-level render call using <` + a + ">.");
|
|
|
501
501
|
return r;
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function Pe(e, r) {
|
|
505
505
|
{
|
|
506
506
|
if (!e._store || e._store.validated || e.key != null)
|
|
507
507
|
return;
|
|
508
508
|
e._store.validated = !0;
|
|
509
509
|
var a = gr(r);
|
|
510
|
-
if (
|
|
510
|
+
if (je[a])
|
|
511
511
|
return;
|
|
512
|
-
|
|
512
|
+
je[a] = !0;
|
|
513
513
|
var u = "";
|
|
514
514
|
e && e._owner && e._owner !== re.current && (u = " It was passed a child from " + P(e._owner.type) + "."), F(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, u), F(null);
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function Ae(e, r) {
|
|
518
518
|
{
|
|
519
519
|
if (typeof e != "object")
|
|
520
520
|
return;
|
|
521
521
|
if (Q(e))
|
|
522
522
|
for (var a = 0; a < e.length; a++) {
|
|
523
523
|
var u = e[a];
|
|
524
|
-
ne(u) &&
|
|
524
|
+
ne(u) && Pe(u, r);
|
|
525
525
|
}
|
|
526
526
|
else if (ne(e))
|
|
527
527
|
e._store && (e._store.validated = !0);
|
|
@@ -529,7 +529,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
529
529
|
var p = R(e);
|
|
530
530
|
if (typeof p == "function" && p !== e.entries)
|
|
531
531
|
for (var m = p.call(e), d; !(d = m.next()).done; )
|
|
532
|
-
ne(d.value) &&
|
|
532
|
+
ne(d.value) && Pe(d.value, r);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
}
|
|
@@ -570,18 +570,18 @@ Check the top-level render call using <` + a + ">.");
|
|
|
570
570
|
e.ref !== null && (F(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function ke(e, r, a, u, p, m) {
|
|
574
574
|
{
|
|
575
575
|
var d = Xe(e);
|
|
576
576
|
if (!d) {
|
|
577
577
|
var f = "";
|
|
578
578
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
579
|
var S = mr(p);
|
|
580
|
-
S ? f += S : f +=
|
|
580
|
+
S ? f += S : f += xe();
|
|
581
581
|
var b;
|
|
582
582
|
e === null ? b = "null" : Q(e) ? b = "array" : e !== void 0 && e.$$typeof === n ? (b = "<" + (P(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, f);
|
|
583
583
|
}
|
|
584
|
-
var E =
|
|
584
|
+
var E = vr(e, r, a, p, m);
|
|
585
585
|
if (E == null)
|
|
586
586
|
return E;
|
|
587
587
|
if (d) {
|
|
@@ -590,27 +590,27 @@ Check the top-level render call using <` + a + ">.");
|
|
|
590
590
|
if (u)
|
|
591
591
|
if (Q(O)) {
|
|
592
592
|
for (var Y = 0; Y < O.length; Y++)
|
|
593
|
-
|
|
593
|
+
Ae(O[Y], e);
|
|
594
594
|
Object.freeze && Object.freeze(O);
|
|
595
595
|
} else
|
|
596
596
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
|
-
|
|
598
|
+
Ae(O, e);
|
|
599
599
|
}
|
|
600
600
|
return e === s ? yr(E) : hr(E), E;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
function br(e, r, a) {
|
|
604
|
-
return
|
|
604
|
+
return ke(e, r, a, !0);
|
|
605
605
|
}
|
|
606
606
|
function Er(e, r, a) {
|
|
607
|
-
return
|
|
607
|
+
return ke(e, r, a, !1);
|
|
608
608
|
}
|
|
609
609
|
var Rr = Er, _r = br;
|
|
610
|
-
|
|
611
|
-
}()),
|
|
610
|
+
V.Fragment = s, V.jsx = Rr, V.jsxs = _r;
|
|
611
|
+
}()), V;
|
|
612
612
|
}
|
|
613
|
-
var
|
|
613
|
+
var U = {};
|
|
614
614
|
/**
|
|
615
615
|
* @license React
|
|
616
616
|
* react-jsx-runtime.production.min.js
|
|
@@ -620,12 +620,12 @@ var z = {};
|
|
|
620
620
|
* This source code is licensed under the MIT license found in the
|
|
621
621
|
* LICENSE file in the root directory of this source tree.
|
|
622
622
|
*/
|
|
623
|
-
var
|
|
623
|
+
var Fe;
|
|
624
624
|
function Ir() {
|
|
625
|
-
if (
|
|
626
|
-
return
|
|
627
|
-
|
|
628
|
-
var t =
|
|
625
|
+
if (Fe)
|
|
626
|
+
return U;
|
|
627
|
+
Fe = 1;
|
|
628
|
+
var t = Ie, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, v = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
629
629
|
function o(c, l, g) {
|
|
630
630
|
var h, C = {}, T = null, x = null;
|
|
631
631
|
g !== void 0 && (T = "" + g), l.key !== void 0 && (T = "" + l.key), l.ref !== void 0 && (x = l.ref);
|
|
@@ -636,10 +636,10 @@ function Ir() {
|
|
|
636
636
|
C[h] === void 0 && (C[h] = l[h]);
|
|
637
637
|
return { $$typeof: n, type: c, key: T, ref: x, props: C, _owner: v.current };
|
|
638
638
|
}
|
|
639
|
-
return
|
|
639
|
+
return U.Fragment = i, U.jsx = o, U.jsxs = o, U;
|
|
640
640
|
}
|
|
641
|
-
process.env.NODE_ENV === "production" ?
|
|
642
|
-
var k =
|
|
641
|
+
process.env.NODE_ENV === "production" ? ie.exports = Ir() : ie.exports = Yr();
|
|
642
|
+
var k = ie.exports;
|
|
643
643
|
const ot = ({
|
|
644
644
|
Fallback: t,
|
|
645
645
|
loginPath: n = "/login",
|
|
@@ -648,8 +648,8 @@ const ot = ({
|
|
|
648
648
|
isLogged: v
|
|
649
649
|
}) => {
|
|
650
650
|
var C, T, x, j;
|
|
651
|
-
const [y, o] = Cr(null), c =
|
|
652
|
-
return
|
|
651
|
+
const [y, o] = Cr(null), c = ue(), l = Tr(!1), g = typeof v == "function" ? v() : !!v, h = typeof g == "boolean" ? g : g == null ? void 0 : g.isLogged;
|
|
652
|
+
return Ne(() => {
|
|
653
653
|
var w;
|
|
654
654
|
l.current || (l.current = !0, (w = $) == null || w.interceptors.response.use(
|
|
655
655
|
(R) => R,
|
|
@@ -658,23 +658,23 @@ const ot = ({
|
|
|
658
658
|
return typeof R == "object" && R && "response" in R && R.response && typeof R.response == "object" && "status" in R.response && R.response && typeof R.response == "object" && "status" in R.response && ((M = R == null ? void 0 : R.response) == null ? void 0 : M.status) === 401 && ($.defaults.headers.common.Authorization = null, localStorage.removeItem(i), o(s)), Promise.reject(R);
|
|
659
659
|
}
|
|
660
660
|
));
|
|
661
|
-
}, [i, s]), h && !y ? /* @__PURE__ */ k.jsx(Sr, { fallback: t, children: (T = (C = c.state) == null ? void 0 : C.from) != null && T.state && ((j = (x = c.state) == null ? void 0 : x.from) == null ? void 0 : j.pathname) === n ? /* @__PURE__ */ k.jsx(
|
|
661
|
+
}, [i, s]), h && !y ? /* @__PURE__ */ k.jsx(Sr, { fallback: t, children: (T = (C = c.state) == null ? void 0 : C.from) != null && T.state && ((j = (x = c.state) == null ? void 0 : x.from) == null ? void 0 : j.pathname) === n ? /* @__PURE__ */ k.jsx($e, { to: c.state.from.state.from.pathname + c.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k.jsx(Ue, {}) }) : /* @__PURE__ */ k.jsx($e, { to: n, state: { from: c }, replace: !0 });
|
|
662
662
|
}, it = () => {
|
|
663
|
-
const { pathname: t } =
|
|
663
|
+
const { pathname: t } = ue(), { sendEvent: n } = Pr();
|
|
664
664
|
return We(() => {
|
|
665
665
|
n({ event: "pageView", pathname: t });
|
|
666
666
|
}, [t, n]), /* @__PURE__ */ k.jsx(Ue, {});
|
|
667
|
-
},
|
|
667
|
+
}, le = wr({
|
|
668
668
|
apiURL: void 0,
|
|
669
669
|
children: void 0
|
|
670
670
|
}), st = ({ children: t, apiURL: n }) => {
|
|
671
|
-
const i =
|
|
671
|
+
const i = se(
|
|
672
672
|
() => ({
|
|
673
673
|
apiURL: n
|
|
674
674
|
}),
|
|
675
675
|
[n]
|
|
676
676
|
);
|
|
677
|
-
return /* @__PURE__ */ k.jsx(
|
|
677
|
+
return /* @__PURE__ */ k.jsx(le.Provider, { value: i, children: t });
|
|
678
678
|
}, ut = ({
|
|
679
679
|
tokenTypeKey: t = "tokenType",
|
|
680
680
|
userLocalStorageKey: n = "user",
|
|
@@ -682,7 +682,7 @@ const ot = ({
|
|
|
682
682
|
postContentType: s = "application/json",
|
|
683
683
|
...v
|
|
684
684
|
}) => {
|
|
685
|
-
const { apiURL: y = v.baseURL } = Ve(
|
|
685
|
+
const { apiURL: y = v.baseURL } = Ve(le);
|
|
686
686
|
if (!$.defaults)
|
|
687
687
|
return null;
|
|
688
688
|
const o = localStorage.getItem(n), c = o ? JSON.parse(o) : null, l = c != null && c[t] ? c[t] : null, g = c != null && c[i] ? c[i] : null, h = o ? `${l} ${g}` : null;
|
|
@@ -727,7 +727,7 @@ const ot = ({
|
|
|
727
727
|
createRoutesFromChildren: Or,
|
|
728
728
|
matchRoutes: xr,
|
|
729
729
|
useEffect: We,
|
|
730
|
-
useLocation:
|
|
730
|
+
useLocation: ue,
|
|
731
731
|
useNavigationType: jr
|
|
732
732
|
}),
|
|
733
733
|
...n || []
|
|
@@ -737,13 +737,13 @@ const ot = ({
|
|
|
737
737
|
tracePropagationTargets: y,
|
|
738
738
|
tracesSampleRate: i || 1
|
|
739
739
|
}), null), ft = ({ IMaskMixin: t, ...n }) => {
|
|
740
|
-
const i =
|
|
740
|
+
const i = se(
|
|
741
741
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
742
742
|
() => t(({ TextField: s, ...v }) => /* @__PURE__ */ k.jsx(s, { ...v })),
|
|
743
743
|
[t]
|
|
744
744
|
);
|
|
745
745
|
return /* @__PURE__ */ k.jsx(i, { ...n });
|
|
746
|
-
}, dt = ({ accessToken: t }) => (
|
|
746
|
+
}, dt = ({ accessToken: t }) => (Le && t && (Le.accessToken = t), null);
|
|
747
747
|
var ze = { exports: {} };
|
|
748
748
|
(function(t, n) {
|
|
749
749
|
(function(i, s) {
|
|
@@ -769,28 +769,24 @@ var ze = { exports: {} };
|
|
|
769
769
|
})(ze);
|
|
770
770
|
var Nr = ze.exports;
|
|
771
771
|
const Wr = /* @__PURE__ */ Fr(Nr);
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
const i = t || ((s = navigator.language) == null ? void 0 : s.slice(0, 2)) || "en";
|
|
780
|
-
if (i === "en") {
|
|
781
|
-
import("./en-Kq-Ai2eF.js").then((v) => v.e).then(() => {
|
|
782
|
-
N.locale(i);
|
|
772
|
+
z.extend(Wr);
|
|
773
|
+
const pt = ({ language: t }) => (Ne(() => {
|
|
774
|
+
var i;
|
|
775
|
+
const n = t || ((i = navigator.language) == null ? void 0 : i.slice(0, 2)) || "en";
|
|
776
|
+
if (n === "en") {
|
|
777
|
+
import("./en-gK0dFos9.js").then((s) => s.e).then(() => {
|
|
778
|
+
z.locale(n);
|
|
783
779
|
});
|
|
784
780
|
return;
|
|
785
781
|
}
|
|
786
|
-
|
|
787
|
-
|
|
782
|
+
n === "fr" && import("./fr-tYyGRO0d.js").then((s) => s.f).then(() => {
|
|
783
|
+
z.locale(n);
|
|
788
784
|
}).catch(() => {
|
|
789
|
-
import("./en-
|
|
790
|
-
|
|
785
|
+
import("./en-gK0dFos9.js").then((s) => s.e).then(() => {
|
|
786
|
+
z.locale("en");
|
|
791
787
|
});
|
|
792
788
|
});
|
|
793
|
-
}, [t]), null),
|
|
789
|
+
}, [t]), null), vt = ({ children: t, defaultQueriesOptions: n, defaultMutationsOptions: i }) => {
|
|
794
790
|
const s = new $r({
|
|
795
791
|
defaultOptions: {
|
|
796
792
|
mutations: {
|
|
@@ -806,7 +802,7 @@ const vt = ({ language: t, plugins: n }) => (oe(() => {
|
|
|
806
802
|
});
|
|
807
803
|
return /* @__PURE__ */ k.jsx(Lr, { client: s, children: t });
|
|
808
804
|
}, mt = (t) => {
|
|
809
|
-
const { unknownErrorTranslationKey: n = "error.unknownError" } = t || {}, i = Ar(n), s =
|
|
805
|
+
const { unknownErrorTranslationKey: n = "error.unknownError" } = t || {}, i = Ar(n), s = oe(
|
|
810
806
|
(y) => {
|
|
811
807
|
var c, l, g, h, C, T, x, j, w;
|
|
812
808
|
const { response: o } = y || {};
|
|
@@ -814,7 +810,7 @@ const vt = ({ language: t, plugins: n }) => (oe(() => {
|
|
|
814
810
|
},
|
|
815
811
|
[i]
|
|
816
812
|
);
|
|
817
|
-
return { getErrorCode:
|
|
813
|
+
return { getErrorCode: oe((y) => {
|
|
818
814
|
var c, l, g;
|
|
819
815
|
const { response: o } = y || {};
|
|
820
816
|
return o != null && o.error_code ? String(o == null ? void 0 : o.error_code) : (c = o == null ? void 0 : o.data) != null && c.error_code ? String((l = o == null ? void 0 : o.data) == null ? void 0 : l.error_code) : o != null && o.error_code ? String(o == null ? void 0 : o.error_code) : (g = o == null ? void 0 : o.data) != null && g.error_code ? String(o.data.error_code) : "unknown_error_code";
|
|
@@ -827,12 +823,12 @@ const vt = ({ language: t, plugins: n }) => (oe(() => {
|
|
|
827
823
|
isLoading: v,
|
|
828
824
|
enabled: y = !0
|
|
829
825
|
}) => {
|
|
830
|
-
const o =
|
|
826
|
+
const o = oe(
|
|
831
827
|
async (l) => {
|
|
832
828
|
i || !y || await n({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
|
|
833
829
|
},
|
|
834
830
|
[y, n, i]
|
|
835
|
-
), c =
|
|
831
|
+
), c = se(() => {
|
|
836
832
|
if (t)
|
|
837
833
|
return t.pages.reduce((l, g) => [...l, ...g], []);
|
|
838
834
|
}, [t]);
|
|
@@ -849,23 +845,23 @@ const vt = ({ language: t, plugins: n }) => (oe(() => {
|
|
|
849
845
|
setAuthenticationToken: ({ tokenType: i, accessToken: s }) => {
|
|
850
846
|
$.defaults.headers.common.Authorization = `${i} ${s}`;
|
|
851
847
|
}
|
|
852
|
-
}), Vr = (t, n = "ll") =>
|
|
848
|
+
}), Vr = (t, n = "ll") => z(t).format(n), Ur = (t, n = "km") => {
|
|
853
849
|
const i = Number(t);
|
|
854
850
|
return Number.isNaN(i) ? `0 ${n}` : `${i.toFixed(2)} ${n}`;
|
|
855
851
|
}, zr = (t) => {
|
|
856
852
|
const n = t && typeof t == "object" && "pathname" in t && t.pathname ? t.pathname : t;
|
|
857
853
|
return typeof n == "string" ? n != null && n.startsWith("/") ? n != null && n.startsWith("/files") ? n : `/files${n}` : n != null && n.startsWith("files") ? `/${n}` : n != null && n.startsWith("files") ? `/${n}` : `/files/${n}` : n;
|
|
858
|
-
},
|
|
854
|
+
}, Ye = (t, n) => {
|
|
859
855
|
if (!t)
|
|
860
856
|
return "";
|
|
861
857
|
const i = zr(t), s = typeof t == "object" && "pathname" in t ? `${t.origin}${i}` : t;
|
|
862
858
|
return typeof n == "number" ? `${s.replace("/files", `/thumbs/${n}`)}` : s;
|
|
863
859
|
}, yt = () => {
|
|
864
|
-
const { apiURL: t } = Ve(
|
|
860
|
+
const { apiURL: t } = Ve(le);
|
|
865
861
|
return {
|
|
866
862
|
dateAdapter: Vr,
|
|
867
863
|
distanceAdapter: Ur,
|
|
868
|
-
filePathAdapter: (i, s) =>
|
|
864
|
+
filePathAdapter: (i, s) => Ye(
|
|
869
865
|
t && typeof i == "string" ? {
|
|
870
866
|
origin: t,
|
|
871
867
|
pathname: i
|
|
@@ -923,11 +919,11 @@ const vt = ({ language: t, plugins: n }) => (oe(() => {
|
|
|
923
919
|
};
|
|
924
920
|
export {
|
|
925
921
|
ut as A,
|
|
926
|
-
|
|
922
|
+
pt as D,
|
|
927
923
|
it as G,
|
|
928
924
|
lt as I,
|
|
929
925
|
ft as M,
|
|
930
|
-
|
|
926
|
+
vt as Q,
|
|
931
927
|
ot as R,
|
|
932
928
|
ct as S,
|
|
933
929
|
dt as a,
|
|
@@ -936,10 +932,9 @@ export {
|
|
|
936
932
|
gt as d,
|
|
937
933
|
ht as e,
|
|
938
934
|
yt as f,
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
ce as k,
|
|
935
|
+
bt as g,
|
|
936
|
+
Vr as h,
|
|
937
|
+
Ur as i,
|
|
938
|
+
le as j,
|
|
944
939
|
mt as u
|
|
945
940
|
};
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, D as n, G as i, I as t,
|
|
1
|
+
import { A as s, D as n, G as i, I as t, j as r, b as o, a as d, M as f, Q as g, R as u, S as C, h as p, i as A, g as c, f as x, e as D, d as I, u as M } from "./main-n8Gmn2zo.js";
|
|
2
2
|
export {
|
|
3
3
|
s as AxiosConfig,
|
|
4
4
|
n as DaysJSConfig,
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(d,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("axios"),require("react-router-dom"),require("@tracktor/react-google-tag-manager"),require("i18next"),require("i18next-browser-languagedetector"),require("react-i18next"),require("@sentry/react"),require("mapbox-gl"),require("dayjs"),require("@tanstack/react-query")):typeof define=="function"&&define.amd?define(["exports","react","axios","react-router-dom","@tracktor/react-google-tag-manager","i18next","i18next-browser-languagedetector","react-i18next","@sentry/react","mapbox-gl","dayjs","@tanstack/react-query"],E):(d=typeof globalThis<"u"?globalThis:d||self,E(d["@tracktor/shared-module"]={},d.React,d.axios,d.reactRouterDom,d.reactGoogleTagManager,d.i18n,d.LanguageDetector,d.reactI18next,d.Sentry,d.mapbox,d.dayjs,d.reactQuery))})(this,function(d,E,M,k,$e,A,Be,Ge,Je,fe,N,de){"use strict";function qe(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const u=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,u.get?u:{enumerable:!0,get:()=>t[i]})}}return n.default=t,Object.freeze(n)}const Q=qe(Je);var ee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function He(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var re={exports:{}},z={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
10
|
-
`+
|
|
9
|
+
*/var ve;function Xe(){return ve||(ve=1,process.env.NODE_ENV!=="production"&&function(){var t=E,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),x=Symbol.iterator,h="@@iterator";function J(e){if(e===null||typeof e!="object")return null;var r=x&&e[x]||e[h];return typeof r=="function"?r:null}var F=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];te("error",e,o)}}function te(e,r,o){{var s=F.ReactDebugCurrentFrame,m=s.getStackAddendum();m!==""&&(r+="%s",o=o.concat([m]));var g=o.map(function(v){return String(v)});g.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,g)}}var Cr=!1,Tr=!1,Sr=!1,jr=!1,Or=!1,be;be=Symbol.for("react.module.reference");function wr(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===y||Or||e===p||e===_||e===b||jr||e===P||Cr||Tr||Sr||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===S||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===be||e.getModuleId!==void 0))}function Pr(e,r,o){var s=e.displayName;if(s)return s;var m=r.displayName||r.name||"";return m!==""?o+"("+m+")":o}function Ee(e){return e.displayName||"Context"}function Y(e){if(e==null)return null;if(typeof e.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case i:return"Portal";case y:return"Profiler";case p:return"StrictMode";case _:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case l:var r=e;return Ee(r)+".Consumer";case a:var o=e;return Ee(o._context)+".Provider";case c:return Pr(e,e.render,"ForwardRef");case S:var s=e.displayName||null;return s!==null?s:Y(e.type)||"Memo";case j:{var m=e,g=m._payload,v=m._init;try{return Y(v(g))}catch{return null}}}return null}var I=Object.assign,$=0,Re,Ce,Te,Se,je,Oe,we;function Pe(){}Pe.__reactDisabledLog=!0;function Mr(){{if($===0){Re=console.log,Ce=console.info,Te=console.warn,Se=console.error,je=console.group,Oe=console.groupCollapsed,we=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function kr(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:Re}),info:I({},e,{value:Ce}),warn:I({},e,{value:Te}),error:I({},e,{value:Se}),group:I({},e,{value:je}),groupCollapsed:I({},e,{value:Oe}),groupEnd:I({},e,{value:we})})}$<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=F.ReactCurrentDispatcher,ae;function q(e,r,o){{if(ae===void 0)try{throw Error()}catch(m){var s=m.stack.trim().match(/\n( *(at )?)/);ae=s&&s[1]||""}return`
|
|
10
|
+
`+ae+e}}var oe=!1,H;{var xr=typeof WeakMap=="function"?WeakMap:Map;H=new xr}function Me(e,r){if(!e||oe)return"";{var o=H.get(e);if(o!==void 0)return o}var s;oe=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=ne.current,ne.current=null,Mr();try{if(r){var v=function(){throw Error()};if(Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[])}catch(D){s=D}Reflect.construct(e,[],v)}else{try{v.call()}catch(D){s=D}e.call(v.prototype)}}else{try{throw Error()}catch(D){s=D}e()}}catch(D){if(D&&s&&typeof D.stack=="string"){for(var f=D.stack.split(`
|
|
11
11
|
`),O=s.stack.split(`
|
|
12
|
-
`),
|
|
13
|
-
`+
|
|
12
|
+
`),R=f.length-1,T=O.length-1;R>=1&&T>=0&&f[R]!==O[T];)T--;for(;R>=1&&T>=0;R--,T--)if(f[R]!==O[T]){if(R!==1||T!==1)do if(R--,T--,T<0||f[R]!==O[T]){var w=`
|
|
13
|
+
`+f[R].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,w),w}while(R>=1&&T>=0);break}}}finally{oe=!1,ne.current=g,kr(),Error.prepareStackTrace=m}var V=e?e.displayName||e.name:"",Ue=V?q(V):"";return typeof e=="function"&&H.set(e,Ue),Ue}function Ar(e,r,o){return Me(e,!1)}function Lr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function X(e,r,o){if(e==null)return"";if(typeof e=="function")return Me(e,Lr(e));if(typeof e=="string")return q(e);switch(e){case _:return q("Suspense");case b:return q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return Ar(e.render);case S:return X(e.type,r,o);case j:{var s=e,m=s._payload,g=s._init;try{return X(g(m),r,o)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,ke={},xe=F.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,o=X(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(o)}else xe.setExtraStackFrame(null)}function Yr(e,r,o,s,m){{var g=Function.call.bind(K);for(var v in e)if(g(e,v)){var f=void 0;try{if(typeof e[v]!="function"){var O=Error((s||"React class")+": "+o+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}f=e[v](r,v,s,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){f=R}f&&!(f instanceof Error)&&(Z(m),C("%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).",s||"React class",o,v,typeof f),Z(null)),f instanceof Error&&!(f.message in ke)&&(ke[f.message]=!0,Z(m),C("Failed %s type: %s",o,f.message),Z(null))}}}var Dr=Array.isArray;function ie(e){return Dr(e)}function Fr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,o=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function Ir(e){try{return Ae(e),!1}catch{return!0}}function Ae(e){return""+e}function Le(e){if(Ir(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fr(e)),Ae(e)}var B=F.ReactCurrentOwner,Nr={key:!0,ref:!0,__self:!0,__source:!0},Ye,De,ue;ue={};function Wr(e){if(K.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Vr(e){if(K.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function zr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var o=Y(B.current.type);ue[o]||(C('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',Y(B.current.type),e.ref),ue[o]=!0)}}function Ur(e,r){{var o=function(){Ye||(Ye=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function $r(e,r){{var o=function(){De||(De=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var Br=function(e,r,o,s,m,g,v){var f={$$typeof:n,type:e,key:r,ref:o,props:v,_owner:g};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function Gr(e,r,o,s,m){{var g,v={},f=null,O=null;o!==void 0&&(Le(o),f=""+o),Vr(r)&&(Le(r.key),f=""+r.key),Wr(r)&&(O=r.ref,zr(r,m));for(g in r)K.call(r,g)&&!Nr.hasOwnProperty(g)&&(v[g]=r[g]);if(e&&e.defaultProps){var R=e.defaultProps;for(g in R)v[g]===void 0&&(v[g]=R[g])}if(f||O){var T=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&Ur(v,T),O&&$r(v,T)}return Br(e,f,O,m,s,B.current,v)}}var se=F.ReactCurrentOwner,Fe=F.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,o=X(e.type,e._source,r?r.type:null);Fe.setExtraStackFrame(o)}else Fe.setExtraStackFrame(null)}var ce;ce=!1;function le(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function Ie(){{if(se.current){var e=Y(se.current.type);if(e)return`
|
|
14
14
|
|
|
15
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
15
|
+
Check the render method of \``+e+"`."}return""}}function Jr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),o=e.lineNumber;return`
|
|
16
16
|
|
|
17
|
-
Check your code at `+r+":"+
|
|
17
|
+
Check your code at `+r+":"+o+"."}return""}}var Ne={};function qr(e){{var r=Ie();if(!r){var o=typeof e=="string"?e:e.displayName||e.name;o&&(r=`
|
|
18
18
|
|
|
19
|
-
Check the top-level render call using <`+
|
|
19
|
+
Check the top-level render call using <`+o+">.")}return r}}function We(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=qr(r);if(Ne[o])return;Ne[o]=!0;var s="";e&&e._owner&&e._owner!==se.current&&(s=" It was passed a child from "+Y(e._owner.type)+"."),W(e),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,s),W(null)}}function Ve(e,r){{if(typeof e!="object")return;if(ie(e))for(var o=0;o<e.length;o++){var s=e[o];le(s)&&We(s,r)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var m=J(e);if(typeof m=="function"&&m!==e.entries)for(var g=m.call(e),v;!(v=g.next()).done;)le(v.value)&&We(v.value,r)}}}function Hr(e){{var r=e.type;if(r==null||typeof r=="string")return;var o;if(typeof r=="function")o=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===S))o=r.propTypes;else return;if(o){var s=Y(r);Yr(o,e.props,"prop",s,e)}else if(r.PropTypes!==void 0&&!ce){ce=!0;var m=Y(r);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xr(e){{for(var r=Object.keys(e.props),o=0;o<r.length;o++){var s=r[o];if(s!=="children"&&s!=="key"){W(e),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),W(null);break}}e.ref!==null&&(W(e),C("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function ze(e,r,o,s,m,g){{var v=wr(e);if(!v){var f="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(f+=" 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 O=Jr(m);O?f+=O:f+=Ie();var R;e===null?R="null":ie(e)?R="array":e!==void 0&&e.$$typeof===n?(R="<"+(Y(e.type)||"Unknown")+" />",f=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,f)}var T=Gr(e,r,o,m,g);if(T==null)return T;if(v){var w=r.children;if(w!==void 0)if(s)if(ie(w)){for(var V=0;V<w.length;V++)Ve(w[V],e);Object.freeze&&Object.freeze(w)}else C("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 Ve(w,e)}return e===u?Xr(T):Hr(T),T}}function Kr(e,r,o){return ze(e,r,o,!0)}function Zr(e,r,o){return ze(e,r,o,!1)}var Qr=Zr,et=Kr;z.Fragment=u,z.jsx=Qr,z.jsxs=et}()),z}var U={};/**
|
|
20
20
|
* @license React
|
|
21
21
|
* react-jsx-runtime.production.min.js
|
|
22
22
|
*
|
|
@@ -24,4 +24,4 @@ Check the top-level render call using <`+i+">.")}return r}}function He(e,r){{if(
|
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the MIT license found in the
|
|
26
26
|
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var be;function or(){if(be)return J;be=1;var t=R,n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function a(d,c,f){var h,T={},S=null,w=null;f!==void 0&&(S=""+f),c.key!==void 0&&(S=""+c.key),c.ref!==void 0&&(w=c.ref);for(h in c)u.call(c,h)&&!m.hasOwnProperty(h)&&(T[h]=c[h]);if(d&&d.defaultProps)for(h in c=d.defaultProps,c)T[h]===void 0&&(T[h]=c[h]);return{$$typeof:n,type:d,key:S,ref:w,props:T,_owner:l.current}}return J.Fragment=o,J.jsx=a,J.jsxs=a,J}process.env.NODE_ENV==="production"?ue.exports=or():ue.exports=ar();var Y=ue.exports;const ir=({Fallback:t,loginPath:n="/login",localStorageKey:o="user",redirect401Path:u="/login",isLogged:l})=>{var T,S,w,P;const[m,a]=R.useState(null),d=A.useLocation(),c=R.useRef(!1),f=typeof l=="function"?l():!!l,h=typeof f=="boolean"?f:f==null?void 0:f.isLogged;return R.useLayoutEffect(()=>{c.current||(c.current=!0,k==null||k.interceptors.response.use(y=>y,async y=>{var E;return typeof y=="object"&&y&&"response"in y&&y.response&&typeof y.response=="object"&&"status"in y.response&&y.response&&typeof y.response=="object"&&"status"in y.response&&((E=y==null?void 0:y.response)==null?void 0:E.status)===401&&(k.defaults.headers.common.Authorization=null,localStorage.removeItem(o),a(u)),Promise.reject(y)}))},[o,u]),h&&!m?Y.jsx(R.Suspense,{fallback:t,children:(S=(T=d.state)==null?void 0:T.from)!=null&&S.state&&((P=(w=d.state)==null?void 0:w.from)==null?void 0:P.pathname)===n?Y.jsx(A.Navigate,{to:d.state.from.state.from.pathname+d.state.from.state.from.search,replace:!0}):Y.jsx(A.Outlet,{})}):Y.jsx(A.Navigate,{to:n,state:{from:d},replace:!0})},ur=()=>{const{pathname:t}=A.useLocation(),{sendEvent:n}=Ze.useGoogleTagManager();return R.useEffect(()=>{n({event:"pageView",pathname:t})},[t,n]),Y.jsx(A.Outlet,{})},ee=R.createContext({apiURL:void 0,children:void 0}),sr=({children:t,apiURL:n})=>{const o=R.useMemo(()=>({apiURL:n}),[n]);return Y.jsx(ee.Provider,{value:o,children:t})},cr=({tokenTypeKey:t="tokenType",userLocalStorageKey:n="user",tokenKey:o="accessToken",postContentType:u="application/json",...l})=>{const{apiURL:m=l.baseURL}=R.useContext(ee);if(!k.defaults)return null;const a=localStorage.getItem(n),d=a?JSON.parse(a):null,c=d!=null&&d[t]?d[t]:null,f=d!=null&&d[o]?d[o]:null,h=a?`${c} ${f}`:null;return k.defaults.baseURL=m,k.defaults.headers.post["Content-Type"]=u,h&&(k.defaults.headers.common.Authorization=h),null},lr=({debug:t,resources:n})=>(D!=null&&D.isInitialized||(D.use(Qe).use(er.initReactI18next).init({debug:t,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:n,returnNull:!1}).then(()=>{document.documentElement.lang!==D.resolvedLanguage&&D.resolvedLanguage&&document.documentElement.setAttribute("lang",D.resolvedLanguage)}),D.on("languageChanged",o=>{document.documentElement.setAttribute("lang",o)})),null),fr=({dsn:t,integrations:n,tracesSampleRate:o,replaysSessionSampleRate:u,replaysOnErrorSampleRate:l,tracePropagationTargets:m,ignoreErrors:a,debug:d,environment:c})=>(ie.isInitialized()||(d||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&ie.init({debug:d,dsn:t,environment:c||"production",ignoreErrors:[...a||[],/dynamically imported module/],integrations:[ie.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:A.createRoutesFromChildren,matchRoutes:A.matchRoutes,useEffect:R.useEffect,useLocation:A.useLocation,useNavigationType:A.useNavigationType}),...n||[]],replaysOnErrorSampleRate:l||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:m,tracesSampleRate:o||1}),null),dr=({IMaskMixin:t,...n})=>{const o=R.useMemo(()=>t(({TextField:u,...l})=>Y.jsx(u,{...l})),[t]);return Y.jsx(o,{...n})},vr=({accessToken:t})=>(ge&&t&&(ge.accessToken=t),null);var Ee={exports:{}};(function(t,n){(function(o,u){t.exports=u()})(Q,function(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(u,l,m){var a=l.prototype,d=a.format;m.en.formats=o,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var f=this.$locale().formats,h=function(T,S){return T.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(w,P,y){var N=y&&y.toUpperCase();return P||S[y]||o[y]||S[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(M,E,H){return E||H.slice(1)})})}(c,f===void 0?{}:f);return d.call(this,h)}}})})(Ee);var mr=Ee.exports;const pr=_e(mr);V.extend(pr);const gr=({language:t,plugins:n})=>(R.useLayoutEffect(()=>{n!=null&&n.includes("relativeTime")&&Promise.resolve().then(()=>wr).then(o=>{V.extend(o.default)})},[n]),R.useLayoutEffect(()=>{var u;const o=t||((u=navigator.language)==null?void 0:u.slice(0,2))||"en";if(o==="en"){Promise.resolve().then(()=>Oe).then(()=>{V.locale(o)});return}o==="fr"&&Promise.resolve().then(()=>xr).then(()=>{V.locale(o)}).catch(()=>{Promise.resolve().then(()=>Oe).then(()=>{V.locale("en")})})},[t]),null),hr=({children:t,defaultQueriesOptions:n,defaultMutationsOptions:o})=>{const u=new he.QueryClient({defaultOptions:{mutations:{...o},queries:{getNextPageParam:(l,m,a)=>l.length+(a||0),refetchOnWindowFocus:!1,retry:3,...n}}});return Y.jsx(he.QueryClientProvider,{client:u,children:t})},_r=t=>{const{unknownErrorTranslationKey:n="error.unknownError"}=t||{},o=D.t(n),u=R.useCallback(m=>{var d,c,f,h,T,S,w,P,y;const{response:a}=m||{};return a!=null&&a.reason?String(a.reason):(d=a==null?void 0:a.data)!=null&&d.reason?String(a.data.reason):(c=a==null?void 0:a.data)!=null&&c.message?String(a.data.message):(h=(f=a==null?void 0:a.data)==null?void 0:f.detail)!=null&&h.length&&Array.isArray((T=a==null?void 0:a.data)==null?void 0:T.detail)&&((w=(S=a==null?void 0:a.data)==null?void 0:S.detail[0])!=null&&w.msg)&&typeof((y=(P=a==null?void 0:a.data)==null?void 0:P.detail[0])==null?void 0:y.msg)=="string"?String(a.data.detail[0].msg):o},[o]);return{getErrorCode:R.useCallback(m=>{var d,c,f;const{response:a}=m||{};return a!=null&&a.error_code?String(a==null?void 0:a.error_code):(d=a==null?void 0:a.data)!=null&&d.error_code?String((c=a==null?void 0:a.data)==null?void 0:c.error_code):a!=null&&a.error_code?String(a==null?void 0:a.error_code):(f=a==null?void 0:a.data)!=null&&f.error_code?String(a.data.error_code):"unknown_error_code"},[]),printError:u}},yr=({data:t,fetchNextPage:n,isFetchingNextPage:o,isInitialLoading:u,isLoading:l,enabled:m=!0})=>{const a=R.useCallback(async c=>{o||!m||await n({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[m,n,o]),d=R.useMemo(()=>{if(t)return t.pages.reduce((c,f)=>[...c,...f],[])},[t]);return{fetchNextPageOnRowsScrollEnd:a,isLoading:o||l,loadingVariant:u?"skeleton":"linear",rows:d}},br=()=>({clearAuthenticationToken:()=>{k.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:o,accessToken:u})=>{k.defaults.headers.common.Authorization=`${o} ${u}`}}),Re=(t,n="ll")=>V(t).format(n),Te=(t,n="km")=>{const o=Number(t);return Number.isNaN(o)?`0 ${n}`:`${o.toFixed(2)} ${n}`},Er=t=>{const n=t&&typeof t=="object"&&"pathname"in t&&t.pathname?t.pathname:t;return typeof n=="string"?n!=null&&n.startsWith("/")?n!=null&&n.startsWith("/files")?n:`/files${n}`:n!=null&&n.startsWith("files")?`/${n}`:n!=null&&n.startsWith("files")?`/${n}`:`/files/${n}`:n},Ce=(t,n)=>{if(!t)return"";const o=Er(t),u=typeof t=="object"&&"pathname"in t?`${t.origin}${o}`:t;return typeof n=="number"?`${u.replace("/files",`/thumbs/${n}`)}`:u},Rr=()=>{const{apiURL:t}=R.useContext(ee);return{dateAdapter:Re,distanceAdapter:Te,filePathAdapter:(o,u)=>Ce(t&&typeof o=="string"?{origin:t,pathname:o}:o,u)}},Tr=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),Cr=t=>{const u=t.split("/").filter(l=>l.length>0).map(l=>l.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},Sr=(t,n,o)=>{const u=Cr(n),l=Tr(o);return`${u}${l}`},jr=t=>{if(t)return(t==null?void 0:t.reduce((n,o)=>(n[o]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},n),{}))||{}},Or=t=>{const{input:n="./openapi.json",operationsToGenerateInfiniteQueryHook:o=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:n,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:Sr,...(o==null?void 0:o.length)&&{operations:jr(o)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};var Se={exports:{}};(function(t,n){(function(o,u){t.exports=u()})(Q,function(){return function(o,u,l){o=o||{};var m=u.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function d(f,h,T,S){return m.fromToBase(f,h,T,S)}l.en.relativeTime=a,m.fromToBase=function(f,h,T,S,w){for(var P,y,N,M=T.$locale().relativeTime||a,E=o.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],H=E.length,z=0;z<H;z+=1){var L=E[z];L.d&&(P=S?l(f).diff(T,L.d,!0):T.diff(f,L.d,!0));var W=(o.rounding||Math.round)(Math.abs(P));if(N=P>0,W<=L.r||!L.r){W<=1&&z>0&&(L=E[z-1]);var q=M[L.l];w&&(W=w(""+W)),y=typeof q=="string"?q.replace("%d",W):q(W,h,L.l,N);break}}if(h)return y;var X=N?M.future:M.past;return typeof X=="function"?X(y):X.replace("%s",y)},m.to=function(f,h){return d(f,h,this,!0)},m.from=function(f,h){return d(f,h,this)};var c=function(f){return f.$u?l.utc():l()};m.toNow=function(f){return this.to(c(this),f)},m.fromNow=function(f){return this.from(c(this),f)}}})})(Se);var je=Se.exports;const wr=nr({__proto__:null,default:_e(je)},[je]);var Pr={exports:{}};(function(t,n){(function(o,u){t.exports=u()})(Q,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(o){var u=["th","st","nd","rd"],l=o%100;return"["+o+(u[(l-20)%10]||u[l]||u[0])+"]"}}})})(Pr);const Oe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Mr={exports:{}};(function(t,n){(function(o,u){t.exports=u(V)})(Q,function(o){function u(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var l=u(o),m={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return l.default.locale(m,null,!0),m})})(Mr);const xr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));p.AxiosConfig=cr,p.DaysJSConfig=gr,p.GTMSendPageView=ur,p.I18nConfig=lr,p.InjectDependenciesContext=ee,p.InjectDependenciesProvider=sr,p.MapBoxConfig=vr,p.MaskTextField=dr,p.QueryClientConfigProvider=hr,p.RequireAuth=ir,p.SentryConfig=fr,p.dateAdapter=Re,p.distanceAdapter=Te,p.getOrvalConfig=Or,p.useAdapter=Rr,p.useAuth=br,p.useInfiniteDataGrid=yr,p.useResponseError=_r,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
*/var pe;function Ke(){if(pe)return U;pe=1;var t=E,n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,p=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function a(l,c,_){var b,S={},j=null,P=null;_!==void 0&&(j=""+_),c.key!==void 0&&(j=""+c.key),c.ref!==void 0&&(P=c.ref);for(b in c)u.call(c,b)&&!y.hasOwnProperty(b)&&(S[b]=c[b]);if(l&&l.defaultProps)for(b in c=l.defaultProps,c)S[b]===void 0&&(S[b]=c[b]);return{$$typeof:n,type:l,key:j,ref:P,props:S,_owner:p.current}}return U.Fragment=i,U.jsx=a,U.jsxs=a,U}process.env.NODE_ENV==="production"?re.exports=Ke():re.exports=Xe();var L=re.exports;const Ze=({Fallback:t,loginPath:n="/login",localStorageKey:i="user",redirect401Path:u="/login",isLogged:p})=>{var S,j,P,x;const[y,a]=E.useState(null),l=k.useLocation(),c=E.useRef(!1),_=typeof p=="function"?p():!!p,b=typeof _=="boolean"?_:_==null?void 0:_.isLogged;return E.useLayoutEffect(()=>{c.current||(c.current=!0,M==null||M.interceptors.response.use(h=>h,async h=>{var C;return typeof h=="object"&&h&&"response"in h&&h.response&&typeof h.response=="object"&&"status"in h.response&&h.response&&typeof h.response=="object"&&"status"in h.response&&((C=h==null?void 0:h.response)==null?void 0:C.status)===401&&(M.defaults.headers.common.Authorization=null,localStorage.removeItem(i),a(u)),Promise.reject(h)}))},[i,u]),b&&!y?L.jsx(E.Suspense,{fallback:t,children:(j=(S=l.state)==null?void 0:S.from)!=null&&j.state&&((x=(P=l.state)==null?void 0:P.from)==null?void 0:x.pathname)===n?L.jsx(k.Navigate,{to:l.state.from.state.from.pathname+l.state.from.state.from.search,replace:!0}):L.jsx(k.Outlet,{})}):L.jsx(k.Navigate,{to:n,state:{from:l},replace:!0})},Qe=()=>{const{pathname:t}=k.useLocation(),{sendEvent:n}=$e.useGoogleTagManager();return E.useEffect(()=>{n({event:"pageView",pathname:t})},[t,n]),L.jsx(k.Outlet,{})},G=E.createContext({apiURL:void 0,children:void 0}),er=({children:t,apiURL:n})=>{const i=E.useMemo(()=>({apiURL:n}),[n]);return L.jsx(G.Provider,{value:i,children:t})},rr=({tokenTypeKey:t="tokenType",userLocalStorageKey:n="user",tokenKey:i="accessToken",postContentType:u="application/json",...p})=>{const{apiURL:y=p.baseURL}=E.useContext(G);if(!M.defaults)return null;const a=localStorage.getItem(n),l=a?JSON.parse(a):null,c=l!=null&&l[t]?l[t]:null,_=l!=null&&l[i]?l[i]:null,b=a?`${c} ${_}`:null;return M.defaults.baseURL=y,M.defaults.headers.post["Content-Type"]=u,b&&(M.defaults.headers.common.Authorization=b),null},tr=({debug:t,resources:n})=>(A!=null&&A.isInitialized||(A.use(Be).use(Ge.initReactI18next).init({debug:t,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:n,returnNull:!1}).then(()=>{document.documentElement.lang!==A.resolvedLanguage&&A.resolvedLanguage&&document.documentElement.setAttribute("lang",A.resolvedLanguage)}),A.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)})),null),nr=({dsn:t,integrations:n,tracesSampleRate:i,replaysSessionSampleRate:u,replaysOnErrorSampleRate:p,tracePropagationTargets:y,ignoreErrors:a,debug:l,environment:c})=>(Q.isInitialized()||(l||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&Q.init({debug:l,dsn:t,environment:c||"production",ignoreErrors:[...a||[],/dynamically imported module/],integrations:[Q.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:k.createRoutesFromChildren,matchRoutes:k.matchRoutes,useEffect:E.useEffect,useLocation:k.useLocation,useNavigationType:k.useNavigationType}),...n||[]],replaysOnErrorSampleRate:p||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:y,tracesSampleRate:i||1}),null),ar=({IMaskMixin:t,...n})=>{const i=E.useMemo(()=>t(({TextField:u,...p})=>L.jsx(u,{...p})),[t]);return L.jsx(i,{...n})},or=({accessToken:t})=>(fe&&t&&(fe.accessToken=t),null);var me={exports:{}};(function(t,n){(function(i,u){t.exports=u()})(ee,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(u,p,y){var a=p.prototype,l=a.format;y.en.formats=i,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var _=this.$locale().formats,b=function(S,j){return S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,x,h){var J=h&&h.toUpperCase();return x||j[h]||i[h]||j[J].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,C,te){return C||te.slice(1)})})}(c,_===void 0?{}:_);return l.call(this,b)}}})})(me);var ir=me.exports;const ur=He(ir);N.extend(ur);const sr=({language:t})=>(E.useLayoutEffect(()=>{var i;const n=t||((i=navigator.language)==null?void 0:i.slice(0,2))||"en";if(n==="en"){Promise.resolve().then(()=>ye).then(()=>{N.locale(n)});return}n==="fr"&&Promise.resolve().then(()=>Rr).then(()=>{N.locale(n)}).catch(()=>{Promise.resolve().then(()=>ye).then(()=>{N.locale("en")})})},[t]),null),cr=({children:t,defaultQueriesOptions:n,defaultMutationsOptions:i})=>{const u=new de.QueryClient({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(p,y,a)=>p.length+(a||0),refetchOnWindowFocus:!1,retry:3,...n}}});return L.jsx(de.QueryClientProvider,{client:u,children:t})},lr=t=>{const{unknownErrorTranslationKey:n="error.unknownError"}=t||{},i=A.t(n),u=E.useCallback(y=>{var l,c,_,b,S,j,P,x,h;const{response:a}=y||{};return a!=null&&a.reason?String(a.reason):(l=a==null?void 0:a.data)!=null&&l.reason?String(a.data.reason):(c=a==null?void 0:a.data)!=null&&c.message?String(a.data.message):(b=(_=a==null?void 0:a.data)==null?void 0:_.detail)!=null&&b.length&&Array.isArray((S=a==null?void 0:a.data)==null?void 0:S.detail)&&((P=(j=a==null?void 0:a.data)==null?void 0:j.detail[0])!=null&&P.msg)&&typeof((h=(x=a==null?void 0:a.data)==null?void 0:x.detail[0])==null?void 0:h.msg)=="string"?String(a.data.detail[0].msg):i},[i]);return{getErrorCode:E.useCallback(y=>{var l,c,_;const{response:a}=y||{};return a!=null&&a.error_code?String(a==null?void 0:a.error_code):(l=a==null?void 0:a.data)!=null&&l.error_code?String((c=a==null?void 0:a.data)==null?void 0:c.error_code):a!=null&&a.error_code?String(a==null?void 0:a.error_code):(_=a==null?void 0:a.data)!=null&&_.error_code?String(a.data.error_code):"unknown_error_code"},[]),printError:u}},fr=({data:t,fetchNextPage:n,isFetchingNextPage:i,isInitialLoading:u,isLoading:p,enabled:y=!0})=>{const a=E.useCallback(async c=>{i||!y||await n({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[y,n,i]),l=E.useMemo(()=>{if(t)return t.pages.reduce((c,_)=>[...c,..._],[])},[t]);return{fetchNextPageOnRowsScrollEnd:a,isLoading:i||p,loadingVariant:u?"skeleton":"linear",rows:l}},dr=()=>({clearAuthenticationToken:()=>{M.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:i,accessToken:u})=>{M.defaults.headers.common.Authorization=`${i} ${u}`}}),ge=(t,n="ll")=>N(t).format(n),_e=(t,n="km")=>{const i=Number(t);return Number.isNaN(i)?`0 ${n}`:`${i.toFixed(2)} ${n}`},vr=t=>{const n=t&&typeof t=="object"&&"pathname"in t&&t.pathname?t.pathname:t;return typeof n=="string"?n!=null&&n.startsWith("/")?n!=null&&n.startsWith("/files")?n:`/files${n}`:n!=null&&n.startsWith("files")?`/${n}`:n!=null&&n.startsWith("files")?`/${n}`:`/files/${n}`:n},he=(t,n)=>{if(!t)return"";const i=vr(t),u=typeof t=="object"&&"pathname"in t?`${t.origin}${i}`:t;return typeof n=="number"?`${u.replace("/files",`/thumbs/${n}`)}`:u},pr=()=>{const{apiURL:t}=E.useContext(G);return{dateAdapter:ge,distanceAdapter:_e,filePathAdapter:(i,u)=>he(t&&typeof i=="string"?{origin:t,pathname:i}:i,u)}},mr=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),gr=t=>{const u=t.split("/").filter(p=>p.length>0).map(p=>p.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},_r=(t,n,i)=>{const u=gr(n),p=mr(i);return`${u}${p}`},hr=t=>{if(t)return(t==null?void 0:t.reduce((n,i)=>(n[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},n),{}))||{}},yr=t=>{const{input:n="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:n,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:_r,...(i==null?void 0:i.length)&&{operations:hr(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};var br={exports:{}};(function(t,n){(function(i,u){t.exports=u()})(ee,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var u=["th","st","nd","rd"],p=i%100;return"["+i+(u[(p-20)%10]||u[p]||u[0])+"]"}}})})(br);const ye=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Er={exports:{}};(function(t,n){(function(i,u){t.exports=u(N)})(ee,function(i){function u(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var p=u(i),y={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return p.default.locale(y,null,!0),y})})(Er);const Rr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));d.AxiosConfig=rr,d.DaysJSConfig=sr,d.GTMSendPageView=Qe,d.I18nConfig=tr,d.InjectDependenciesContext=G,d.InjectDependenciesProvider=er,d.MapBoxConfig=or,d.MaskTextField=ar,d.QueryClientConfigProvider=cr,d.RequireAuth=Ze,d.SentryConfig=nr,d.dateAdapter=ge,d.distanceAdapter=_e,d.getOrvalConfig=yr,d.useAdapter=pr,d.useAuth=dr,d.useInfiniteDataGrid=fr,d.useResponseError=lr,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tracktor/shared-module",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"types": "./dist/main.d.ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@vitejs/plugin-react": "^4.2.1",
|
|
50
50
|
"axios": "^1.7.2",
|
|
51
51
|
"dayjs": "^1.11.11",
|
|
52
|
-
"eslint-config-react-tracktor": "^1.
|
|
52
|
+
"eslint-config-react-tracktor": "^1.8.1",
|
|
53
53
|
"husky": "^8.0.3",
|
|
54
54
|
"i18next": "^23.11.5",
|
|
55
55
|
"i18next-browser-languagedetector": "^8.0.0",
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { g as $, c as N } from "./main-WgJDBcLv.js";
|
|
2
|
-
function P(u, m) {
|
|
3
|
-
for (var o = 0; o < m.length; o++) {
|
|
4
|
-
const n = m[o];
|
|
5
|
-
if (typeof n != "string" && !Array.isArray(n)) {
|
|
6
|
-
for (const e in n)
|
|
7
|
-
if (e !== "default" && !(e in u)) {
|
|
8
|
-
const t = Object.getOwnPropertyDescriptor(n, e);
|
|
9
|
-
t && Object.defineProperty(u, e, t.get ? t : {
|
|
10
|
-
enumerable: !0,
|
|
11
|
-
get: () => n[e]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return Object.freeze(Object.defineProperty(u, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
-
}
|
|
18
|
-
var O = { exports: {} };
|
|
19
|
-
(function(u, m) {
|
|
20
|
-
(function(o, n) {
|
|
21
|
-
u.exports = n();
|
|
22
|
-
})(N, function() {
|
|
23
|
-
return function(o, n, e) {
|
|
24
|
-
o = o || {};
|
|
25
|
-
var t = n.prototype, b = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
26
|
-
function T(r, a, f, c) {
|
|
27
|
-
return t.fromToBase(r, a, f, c);
|
|
28
|
-
}
|
|
29
|
-
e.en.relativeTime = b, t.fromToBase = function(r, a, f, c, j) {
|
|
30
|
-
for (var h, l, p, v = f.$locale().relativeTime || b, y = o.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], w = y.length, d = 0; d < w; d += 1) {
|
|
31
|
-
var i = y[d];
|
|
32
|
-
i.d && (h = c ? e(r).diff(f, i.d, !0) : f.diff(r, i.d, !0));
|
|
33
|
-
var s = (o.rounding || Math.round)(Math.abs(h));
|
|
34
|
-
if (p = h > 0, s <= i.r || !i.r) {
|
|
35
|
-
s <= 1 && d > 0 && (i = y[d - 1]);
|
|
36
|
-
var g = v[i.l];
|
|
37
|
-
j && (s = j("" + s)), l = typeof g == "string" ? g.replace("%d", s) : g(s, a, i.l, p);
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
if (a)
|
|
42
|
-
return l;
|
|
43
|
-
var M = p ? v.future : v.past;
|
|
44
|
-
return typeof M == "function" ? M(l) : M.replace("%s", l);
|
|
45
|
-
}, t.to = function(r, a) {
|
|
46
|
-
return T(r, a, this, !0);
|
|
47
|
-
}, t.from = function(r, a) {
|
|
48
|
-
return T(r, a, this);
|
|
49
|
-
};
|
|
50
|
-
var x = function(r) {
|
|
51
|
-
return r.$u ? e.utc() : e();
|
|
52
|
-
};
|
|
53
|
-
t.toNow = function(r) {
|
|
54
|
-
return this.to(x(this), r);
|
|
55
|
-
}, t.fromNow = function(r) {
|
|
56
|
-
return this.from(x(this), r);
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
})(O);
|
|
61
|
-
var _ = O.exports;
|
|
62
|
-
const k = /* @__PURE__ */ $(_), B = /* @__PURE__ */ P({
|
|
63
|
-
__proto__: null,
|
|
64
|
-
default: k
|
|
65
|
-
}, [_]);
|
|
66
|
-
export {
|
|
67
|
-
B as r
|
|
68
|
-
};
|