@tracktor/shared-module 1.0.0-beta.1 → 1.0.0-beta.3
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 +5 -1
- package/dist/components/Utils/RequireAuth.d.ts +3 -1
- package/dist/main.js +240 -240
- package/dist/main.umd.cjs +7 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
interface I18nConfigProps {
|
|
2
|
+
language: string;
|
|
3
|
+
}
|
|
1
4
|
/**
|
|
2
5
|
* Initialize dayjs
|
|
6
|
+
* @param language
|
|
3
7
|
* @constructor
|
|
4
8
|
*/
|
|
5
|
-
declare const DaysJSConfig: () => null;
|
|
9
|
+
declare const DaysJSConfig: ({ language }: I18nConfigProps) => null;
|
|
6
10
|
export default DaysJSConfig;
|
package/dist/main.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import We, { useState as br, useRef as Rr, useLayoutEffect as _r, Suspense as Cr, useEffect as Le, createContext as Tr, useMemo as ie, useContext as Ye, useCallback as ae } from "react";
|
|
2
2
|
import k from "axios";
|
|
3
|
-
import { useLocation as
|
|
3
|
+
import { useLocation as ue, Navigate as $e, Outlet as Me, createRoutesFromChildren as Sr, matchRoutes as wr, useNavigationType as Or } from "react-router-dom";
|
|
4
4
|
import { useGoogleTagManager as xr } from "@tracktor/react-google-tag-manager";
|
|
5
|
-
import
|
|
5
|
+
import W, { t as jr } from "i18next";
|
|
6
6
|
import Pr from "i18next-browser-languagedetector";
|
|
7
7
|
import { initReactI18next as Ar } from "react-i18next";
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
8
|
+
import * as ne from "@sentry/react";
|
|
9
|
+
import De from "mapbox-gl";
|
|
10
10
|
import { QueryClient as kr, QueryClientProvider as $r } from "@tanstack/react-query";
|
|
11
11
|
import Dr from "dayjs";
|
|
12
|
-
var
|
|
12
|
+
var oe = { exports: {} }, M = {};
|
|
13
13
|
/**
|
|
14
14
|
* @license React
|
|
15
15
|
* react-jsx-runtime.development.js
|
|
@@ -19,27 +19,27 @@ var ne = { exports: {} }, Y = {};
|
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
|
-
var
|
|
22
|
+
var Fe;
|
|
23
23
|
function Fr() {
|
|
24
|
-
return
|
|
25
|
-
var o =
|
|
26
|
-
function
|
|
24
|
+
return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
25
|
+
var o = We, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), f = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), A = Symbol.iterator, $ = "@@iterator";
|
|
26
|
+
function R(e) {
|
|
27
27
|
if (e === null || typeof e != "object")
|
|
28
28
|
return null;
|
|
29
|
-
var r =
|
|
29
|
+
var r = A && e[A] || e[$];
|
|
30
30
|
return typeof r == "function" ? r : null;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
33
|
-
function
|
|
32
|
+
var D = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
33
|
+
function _(e) {
|
|
34
34
|
{
|
|
35
35
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
|
|
36
36
|
t[u - 1] = arguments[u];
|
|
37
|
-
|
|
37
|
+
U("error", e, t);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function U(e, r, t) {
|
|
41
41
|
{
|
|
42
|
-
var u =
|
|
42
|
+
var u = D.ReactDebugCurrentFrame, v = u.getStackAddendum();
|
|
43
43
|
v !== "" && (r += "%s", t = t.concat([v]));
|
|
44
44
|
var p = t.map(function(d) {
|
|
45
45
|
return String(d);
|
|
@@ -47,14 +47,14 @@ function Fr() {
|
|
|
47
47
|
p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
var Ve = !1, Ue = !1, qe = !1, ze = !1, Be = !1,
|
|
51
|
-
|
|
50
|
+
var Ve = !1, Ue = !1, qe = !1, ze = !1, Be = !1, ce;
|
|
51
|
+
ce = Symbol.for("react.module.reference");
|
|
52
52
|
function Ge(e) {
|
|
53
|
-
return !!(typeof e == "string" || typeof e == "function" || e === s || e === b || Be || e === m || e ===
|
|
53
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === b || Be || e === m || e === g || e === h || ze || e === O || Ve || Ue || qe || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === C || e.$$typeof === a || e.$$typeof === f || e.$$typeof === c || // This needs to include all possible module reference object
|
|
54
54
|
// types supported by any Flight configuration anywhere since
|
|
55
55
|
// we don't know which Flight build this will end up being used
|
|
56
56
|
// with.
|
|
57
|
-
e.$$typeof ===
|
|
57
|
+
e.$$typeof === ce || e.getModuleId !== void 0));
|
|
58
58
|
}
|
|
59
59
|
function Je(e, r, t) {
|
|
60
60
|
var u = e.displayName;
|
|
@@ -66,10 +66,10 @@ function Fr() {
|
|
|
66
66
|
function le(e) {
|
|
67
67
|
return e.displayName || "Context";
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function x(e) {
|
|
70
70
|
if (e == null)
|
|
71
71
|
return null;
|
|
72
|
-
if (typeof e.tag == "number" &&
|
|
72
|
+
if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
73
73
|
return e.displayName || e.name || null;
|
|
74
74
|
if (typeof e == "string")
|
|
75
75
|
return e;
|
|
@@ -82,9 +82,9 @@ function Fr() {
|
|
|
82
82
|
return "Profiler";
|
|
83
83
|
case m:
|
|
84
84
|
return "StrictMode";
|
|
85
|
-
case R:
|
|
86
|
-
return "Suspense";
|
|
87
85
|
case g:
|
|
86
|
+
return "Suspense";
|
|
87
|
+
case h:
|
|
88
88
|
return "SuspenseList";
|
|
89
89
|
}
|
|
90
90
|
if (typeof e == "object")
|
|
@@ -95,15 +95,15 @@ function Fr() {
|
|
|
95
95
|
case a:
|
|
96
96
|
var t = e;
|
|
97
97
|
return le(t._context) + ".Provider";
|
|
98
|
-
case
|
|
98
|
+
case c:
|
|
99
99
|
return Je(e, e.render, "ForwardRef");
|
|
100
|
-
case
|
|
100
|
+
case C:
|
|
101
101
|
var u = e.displayName || null;
|
|
102
|
-
return u !== null ? u :
|
|
102
|
+
return u !== null ? u : x(e.type) || "Memo";
|
|
103
103
|
case S: {
|
|
104
104
|
var v = e, p = v._payload, d = v._init;
|
|
105
105
|
try {
|
|
106
|
-
return
|
|
106
|
+
return x(d(p));
|
|
107
107
|
} catch {
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
@@ -111,18 +111,18 @@ function Fr() {
|
|
|
111
111
|
}
|
|
112
112
|
return null;
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
114
|
+
var F = Object.assign, L = 0, fe, de, ve, pe, me, ge, he;
|
|
115
|
+
function ye() {
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
ye.__reactDisabledLog = !0;
|
|
118
118
|
function Xe() {
|
|
119
119
|
{
|
|
120
120
|
if (L === 0) {
|
|
121
|
-
|
|
121
|
+
fe = console.log, de = console.info, ve = console.warn, pe = console.error, me = console.group, ge = console.groupCollapsed, he = console.groupEnd;
|
|
122
122
|
var e = {
|
|
123
123
|
configurable: !0,
|
|
124
124
|
enumerable: !0,
|
|
125
|
-
value:
|
|
125
|
+
value: ye,
|
|
126
126
|
writable: !0
|
|
127
127
|
};
|
|
128
128
|
Object.defineProperties(console, {
|
|
@@ -147,65 +147,65 @@ function Fr() {
|
|
|
147
147
|
writable: !0
|
|
148
148
|
};
|
|
149
149
|
Object.defineProperties(console, {
|
|
150
|
-
log:
|
|
151
|
-
value: ce
|
|
152
|
-
}),
|
|
153
|
-
info: $({}, e, {
|
|
150
|
+
log: F({}, e, {
|
|
154
151
|
value: fe
|
|
155
152
|
}),
|
|
156
|
-
|
|
153
|
+
info: F({}, e, {
|
|
157
154
|
value: de
|
|
158
155
|
}),
|
|
159
|
-
|
|
156
|
+
warn: F({}, e, {
|
|
160
157
|
value: ve
|
|
161
158
|
}),
|
|
162
|
-
|
|
159
|
+
error: F({}, e, {
|
|
163
160
|
value: pe
|
|
164
161
|
}),
|
|
165
|
-
|
|
162
|
+
group: F({}, e, {
|
|
166
163
|
value: me
|
|
167
164
|
}),
|
|
168
|
-
|
|
165
|
+
groupCollapsed: F({}, e, {
|
|
169
166
|
value: ge
|
|
167
|
+
}),
|
|
168
|
+
groupEnd: F({}, e, {
|
|
169
|
+
value: he
|
|
170
170
|
})
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
L < 0 &&
|
|
173
|
+
L < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
function
|
|
176
|
+
var X = D.ReactCurrentDispatcher, H;
|
|
177
|
+
function q(e, r, t) {
|
|
178
178
|
{
|
|
179
|
-
if (
|
|
179
|
+
if (H === void 0)
|
|
180
180
|
try {
|
|
181
181
|
throw Error();
|
|
182
182
|
} catch (v) {
|
|
183
183
|
var u = v.stack.trim().match(/\n( *(at )?)/);
|
|
184
|
-
|
|
184
|
+
H = u && u[1] || "";
|
|
185
185
|
}
|
|
186
186
|
return `
|
|
187
|
-
` +
|
|
187
|
+
` + H + e;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var K = !1, z;
|
|
191
191
|
{
|
|
192
192
|
var Ke = typeof WeakMap == "function" ? WeakMap : Map;
|
|
193
|
-
|
|
193
|
+
z = new Ke();
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
if (!e ||
|
|
195
|
+
function Ee(e, r) {
|
|
196
|
+
if (!e || K)
|
|
197
197
|
return "";
|
|
198
198
|
{
|
|
199
|
-
var t =
|
|
199
|
+
var t = z.get(e);
|
|
200
200
|
if (t !== void 0)
|
|
201
201
|
return t;
|
|
202
202
|
}
|
|
203
203
|
var u;
|
|
204
|
-
|
|
204
|
+
K = !0;
|
|
205
205
|
var v = Error.prepareStackTrace;
|
|
206
206
|
Error.prepareStackTrace = void 0;
|
|
207
207
|
var p;
|
|
208
|
-
p =
|
|
208
|
+
p = X.current, X.current = null, Xe();
|
|
209
209
|
try {
|
|
210
210
|
if (r) {
|
|
211
211
|
var d = function() {
|
|
@@ -218,116 +218,116 @@ function Fr() {
|
|
|
218
218
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
219
219
|
try {
|
|
220
220
|
Reflect.construct(d, []);
|
|
221
|
-
} catch (
|
|
222
|
-
u =
|
|
221
|
+
} catch (j) {
|
|
222
|
+
u = j;
|
|
223
223
|
}
|
|
224
224
|
Reflect.construct(e, [], d);
|
|
225
225
|
} else {
|
|
226
226
|
try {
|
|
227
227
|
d.call();
|
|
228
|
-
} catch (
|
|
229
|
-
u =
|
|
228
|
+
} catch (j) {
|
|
229
|
+
u = j;
|
|
230
230
|
}
|
|
231
231
|
e.call(d.prototype);
|
|
232
232
|
}
|
|
233
233
|
} else {
|
|
234
234
|
try {
|
|
235
235
|
throw Error();
|
|
236
|
-
} catch (
|
|
237
|
-
u =
|
|
236
|
+
} catch (j) {
|
|
237
|
+
u = j;
|
|
238
238
|
}
|
|
239
239
|
e();
|
|
240
240
|
}
|
|
241
|
-
} catch (
|
|
242
|
-
if (
|
|
243
|
-
for (var
|
|
241
|
+
} catch (j) {
|
|
242
|
+
if (j && u && typeof j.stack == "string") {
|
|
243
|
+
for (var l = j.stack.split(`
|
|
244
244
|
`), T = u.stack.split(`
|
|
245
|
-
`), y =
|
|
245
|
+
`), y = l.length - 1, E = T.length - 1; y >= 1 && E >= 0 && l[y] !== T[E]; )
|
|
246
246
|
E--;
|
|
247
247
|
for (; y >= 1 && E >= 0; y--, E--)
|
|
248
|
-
if (
|
|
248
|
+
if (l[y] !== T[E]) {
|
|
249
249
|
if (y !== 1 || E !== 1)
|
|
250
250
|
do
|
|
251
|
-
if (y--, E--, E < 0 ||
|
|
251
|
+
if (y--, E--, E < 0 || l[y] !== T[E]) {
|
|
252
252
|
var w = `
|
|
253
|
-
` +
|
|
254
|
-
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
253
|
+
` + l[y].replace(" at new ", " at ");
|
|
254
|
+
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, w), w;
|
|
255
255
|
}
|
|
256
256
|
while (y >= 1 && E >= 0);
|
|
257
257
|
break;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
} finally {
|
|
261
|
-
|
|
261
|
+
K = !1, X.current = p, He(), Error.prepareStackTrace = v;
|
|
262
262
|
}
|
|
263
|
-
var
|
|
264
|
-
return typeof e == "function" &&
|
|
263
|
+
var N = e ? e.displayName || e.name : "", ke = N ? q(N) : "";
|
|
264
|
+
return typeof e == "function" && z.set(e, ke), ke;
|
|
265
265
|
}
|
|
266
266
|
function Ze(e, r, t) {
|
|
267
|
-
return
|
|
267
|
+
return Ee(e, !1);
|
|
268
268
|
}
|
|
269
269
|
function Qe(e) {
|
|
270
270
|
var r = e.prototype;
|
|
271
271
|
return !!(r && r.isReactComponent);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function B(e, r, t) {
|
|
274
274
|
if (e == null)
|
|
275
275
|
return "";
|
|
276
276
|
if (typeof e == "function")
|
|
277
|
-
return
|
|
277
|
+
return Ee(e, Qe(e));
|
|
278
278
|
if (typeof e == "string")
|
|
279
|
-
return
|
|
279
|
+
return q(e);
|
|
280
280
|
switch (e) {
|
|
281
|
-
case R:
|
|
282
|
-
return V("Suspense");
|
|
283
281
|
case g:
|
|
284
|
-
return
|
|
282
|
+
return q("Suspense");
|
|
283
|
+
case h:
|
|
284
|
+
return q("SuspenseList");
|
|
285
285
|
}
|
|
286
286
|
if (typeof e == "object")
|
|
287
287
|
switch (e.$$typeof) {
|
|
288
|
-
case
|
|
288
|
+
case c:
|
|
289
289
|
return Ze(e.render);
|
|
290
|
-
case
|
|
291
|
-
return
|
|
290
|
+
case C:
|
|
291
|
+
return B(e.type, r, t);
|
|
292
292
|
case S: {
|
|
293
293
|
var u = e, v = u._payload, p = u._init;
|
|
294
294
|
try {
|
|
295
|
-
return
|
|
295
|
+
return B(p(v), r, t);
|
|
296
296
|
} catch {
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
return "";
|
|
301
301
|
}
|
|
302
|
-
var
|
|
303
|
-
function
|
|
302
|
+
var G = Object.prototype.hasOwnProperty, be = {}, Re = D.ReactDebugCurrentFrame;
|
|
303
|
+
function J(e) {
|
|
304
304
|
if (e) {
|
|
305
|
-
var r = e._owner, t =
|
|
306
|
-
|
|
305
|
+
var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
|
|
306
|
+
Re.setExtraStackFrame(t);
|
|
307
307
|
} else
|
|
308
|
-
|
|
308
|
+
Re.setExtraStackFrame(null);
|
|
309
309
|
}
|
|
310
310
|
function er(e, r, t, u, v) {
|
|
311
311
|
{
|
|
312
|
-
var p = Function.call.bind(
|
|
312
|
+
var p = Function.call.bind(G);
|
|
313
313
|
for (var d in e)
|
|
314
314
|
if (p(e, d)) {
|
|
315
|
-
var
|
|
315
|
+
var l = void 0;
|
|
316
316
|
try {
|
|
317
317
|
if (typeof e[d] != "function") {
|
|
318
318
|
var T = Error((u || "React class") + ": " + t + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
319
319
|
throw T.name = "Invariant Violation", T;
|
|
320
320
|
}
|
|
321
|
-
|
|
321
|
+
l = e[d](r, d, u, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
322
322
|
} catch (y) {
|
|
323
|
-
|
|
323
|
+
l = y;
|
|
324
324
|
}
|
|
325
|
-
|
|
325
|
+
l && !(l instanceof Error) && (J(v), _("%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", t, d, typeof l), J(null)), l instanceof Error && !(l.message in be) && (be[l.message] = !0, J(v), _("Failed %s type: %s", t, l.message), J(null));
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
var rr = Array.isArray;
|
|
330
|
-
function
|
|
330
|
+
function Z(e) {
|
|
331
331
|
return rr(e);
|
|
332
332
|
}
|
|
333
333
|
function tr(e) {
|
|
@@ -338,27 +338,27 @@ function Fr() {
|
|
|
338
338
|
}
|
|
339
339
|
function nr(e) {
|
|
340
340
|
try {
|
|
341
|
-
return
|
|
341
|
+
return _e(e), !1;
|
|
342
342
|
} catch {
|
|
343
343
|
return !0;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function _e(e) {
|
|
347
347
|
return "" + e;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Ce(e) {
|
|
350
350
|
if (nr(e))
|
|
351
|
-
return
|
|
351
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tr(e)), _e(e);
|
|
352
352
|
}
|
|
353
|
-
var
|
|
353
|
+
var Y = D.ReactCurrentOwner, ar = {
|
|
354
354
|
key: !0,
|
|
355
355
|
ref: !0,
|
|
356
356
|
__self: !0,
|
|
357
357
|
__source: !0
|
|
358
|
-
},
|
|
359
|
-
|
|
358
|
+
}, Te, Se, Q;
|
|
359
|
+
Q = {};
|
|
360
360
|
function or(e) {
|
|
361
|
-
if (
|
|
361
|
+
if (G.call(e, "ref")) {
|
|
362
362
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
363
363
|
if (r && r.isReactWarning)
|
|
364
364
|
return !1;
|
|
@@ -366,7 +366,7 @@ function Fr() {
|
|
|
366
366
|
return e.ref !== void 0;
|
|
367
367
|
}
|
|
368
368
|
function ir(e) {
|
|
369
|
-
if (
|
|
369
|
+
if (G.call(e, "key")) {
|
|
370
370
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
371
371
|
if (r && r.isReactWarning)
|
|
372
372
|
return !1;
|
|
@@ -374,15 +374,15 @@ function Fr() {
|
|
|
374
374
|
return e.key !== void 0;
|
|
375
375
|
}
|
|
376
376
|
function ur(e, r) {
|
|
377
|
-
if (typeof e.ref == "string" &&
|
|
378
|
-
var t =
|
|
379
|
-
|
|
377
|
+
if (typeof e.ref == "string" && Y.current && r && Y.current.stateNode !== r) {
|
|
378
|
+
var t = x(Y.current.type);
|
|
379
|
+
Q[t] || (_('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', x(Y.current.type), e.ref), Q[t] = !0);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
function sr(e, r) {
|
|
383
383
|
{
|
|
384
384
|
var t = function() {
|
|
385
|
-
|
|
385
|
+
Te || (Te = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
386
386
|
};
|
|
387
387
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
388
388
|
get: t,
|
|
@@ -390,10 +390,10 @@ function Fr() {
|
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function cr(e, r) {
|
|
394
394
|
{
|
|
395
395
|
var t = function() {
|
|
396
|
-
|
|
396
|
+
Se || (Se = !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));
|
|
397
397
|
};
|
|
398
398
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
399
399
|
get: t,
|
|
@@ -401,8 +401,8 @@ function Fr() {
|
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
var
|
|
405
|
-
var
|
|
404
|
+
var lr = function(e, r, t, u, v, p, d) {
|
|
405
|
+
var l = {
|
|
406
406
|
// This tag allows us to uniquely identify this as a React Element
|
|
407
407
|
$$typeof: n,
|
|
408
408
|
// Built-in properties that belong on the element
|
|
@@ -413,58 +413,58 @@ function Fr() {
|
|
|
413
413
|
// Record the component responsible for creating this element.
|
|
414
414
|
_owner: p
|
|
415
415
|
};
|
|
416
|
-
return
|
|
416
|
+
return l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
417
417
|
configurable: !1,
|
|
418
418
|
enumerable: !1,
|
|
419
419
|
writable: !0,
|
|
420
420
|
value: !1
|
|
421
|
-
}), Object.defineProperty(
|
|
421
|
+
}), Object.defineProperty(l, "_self", {
|
|
422
422
|
configurable: !1,
|
|
423
423
|
enumerable: !1,
|
|
424
424
|
writable: !1,
|
|
425
425
|
value: u
|
|
426
|
-
}), Object.defineProperty(
|
|
426
|
+
}), Object.defineProperty(l, "_source", {
|
|
427
427
|
configurable: !1,
|
|
428
428
|
enumerable: !1,
|
|
429
429
|
writable: !1,
|
|
430
430
|
value: v
|
|
431
|
-
}), Object.freeze && (Object.freeze(
|
|
431
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
432
432
|
};
|
|
433
433
|
function fr(e, r, t, u, v) {
|
|
434
434
|
{
|
|
435
|
-
var p, d = {},
|
|
436
|
-
t !== void 0 && (
|
|
435
|
+
var p, d = {}, l = null, T = null;
|
|
436
|
+
t !== void 0 && (Ce(t), l = "" + t), ir(r) && (Ce(r.key), l = "" + r.key), or(r) && (T = r.ref, ur(r, v));
|
|
437
437
|
for (p in r)
|
|
438
|
-
|
|
438
|
+
G.call(r, p) && !ar.hasOwnProperty(p) && (d[p] = r[p]);
|
|
439
439
|
if (e && e.defaultProps) {
|
|
440
440
|
var y = e.defaultProps;
|
|
441
441
|
for (p in y)
|
|
442
442
|
d[p] === void 0 && (d[p] = y[p]);
|
|
443
443
|
}
|
|
444
|
-
if (
|
|
444
|
+
if (l || T) {
|
|
445
445
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
446
|
-
|
|
446
|
+
l && sr(d, E), T && cr(d, E);
|
|
447
447
|
}
|
|
448
|
-
return
|
|
448
|
+
return lr(e, l, T, v, u, Y.current, d);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
var
|
|
452
|
-
function
|
|
451
|
+
var ee = D.ReactCurrentOwner, we = D.ReactDebugCurrentFrame;
|
|
452
|
+
function I(e) {
|
|
453
453
|
if (e) {
|
|
454
|
-
var r = e._owner, t =
|
|
455
|
-
|
|
454
|
+
var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
|
|
455
|
+
we.setExtraStackFrame(t);
|
|
456
456
|
} else
|
|
457
|
-
|
|
457
|
+
we.setExtraStackFrame(null);
|
|
458
458
|
}
|
|
459
|
-
var
|
|
460
|
-
|
|
461
|
-
function
|
|
459
|
+
var re;
|
|
460
|
+
re = !1;
|
|
461
|
+
function te(e) {
|
|
462
462
|
return typeof e == "object" && e !== null && e.$$typeof === n;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function Oe() {
|
|
465
465
|
{
|
|
466
|
-
if (
|
|
467
|
-
var e =
|
|
466
|
+
if (ee.current) {
|
|
467
|
+
var e = x(ee.current.type);
|
|
468
468
|
if (e)
|
|
469
469
|
return `
|
|
470
470
|
|
|
@@ -484,10 +484,10 @@ Check your code at ` + r + ":" + t + ".";
|
|
|
484
484
|
return "";
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
var
|
|
487
|
+
var xe = {};
|
|
488
488
|
function vr(e) {
|
|
489
489
|
{
|
|
490
|
-
var r =
|
|
490
|
+
var r = Oe();
|
|
491
491
|
if (!r) {
|
|
492
492
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
493
493
|
t && (r = `
|
|
@@ -497,35 +497,35 @@ Check the top-level render call using <` + t + ">.");
|
|
|
497
497
|
return r;
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function je(e, r) {
|
|
501
501
|
{
|
|
502
502
|
if (!e._store || e._store.validated || e.key != null)
|
|
503
503
|
return;
|
|
504
504
|
e._store.validated = !0;
|
|
505
505
|
var t = vr(r);
|
|
506
|
-
if (
|
|
506
|
+
if (xe[t])
|
|
507
507
|
return;
|
|
508
|
-
|
|
508
|
+
xe[t] = !0;
|
|
509
509
|
var u = "";
|
|
510
|
-
e && e._owner && e._owner !==
|
|
510
|
+
e && e._owner && e._owner !== ee.current && (u = " It was passed a child from " + x(e._owner.type) + "."), I(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, u), I(null);
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Pe(e, r) {
|
|
514
514
|
{
|
|
515
515
|
if (typeof e != "object")
|
|
516
516
|
return;
|
|
517
|
-
if (
|
|
517
|
+
if (Z(e))
|
|
518
518
|
for (var t = 0; t < e.length; t++) {
|
|
519
519
|
var u = e[t];
|
|
520
|
-
|
|
520
|
+
te(u) && je(u, r);
|
|
521
521
|
}
|
|
522
|
-
else if (
|
|
522
|
+
else if (te(e))
|
|
523
523
|
e._store && (e._store.validated = !0);
|
|
524
524
|
else if (e) {
|
|
525
|
-
var v =
|
|
525
|
+
var v = R(e);
|
|
526
526
|
if (typeof v == "function" && v !== e.entries)
|
|
527
527
|
for (var p = v.call(e), d; !(d = p.next()).done; )
|
|
528
|
-
|
|
528
|
+
te(d.value) && je(d.value, r);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
}
|
|
@@ -537,21 +537,21 @@ Check the top-level render call using <` + t + ">.");
|
|
|
537
537
|
var t;
|
|
538
538
|
if (typeof r == "function")
|
|
539
539
|
t = r.propTypes;
|
|
540
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
540
|
+
else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here.
|
|
541
541
|
// Inner props are checked in the reconciler.
|
|
542
|
-
r.$$typeof ===
|
|
542
|
+
r.$$typeof === C))
|
|
543
543
|
t = r.propTypes;
|
|
544
544
|
else
|
|
545
545
|
return;
|
|
546
546
|
if (t) {
|
|
547
|
-
var u =
|
|
547
|
+
var u = x(r);
|
|
548
548
|
er(t, e.props, "prop", u, e);
|
|
549
|
-
} else if (r.PropTypes !== void 0 && !
|
|
550
|
-
|
|
551
|
-
var v =
|
|
552
|
-
|
|
549
|
+
} else if (r.PropTypes !== void 0 && !re) {
|
|
550
|
+
re = !0;
|
|
551
|
+
var v = x(r);
|
|
552
|
+
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
553
553
|
}
|
|
554
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
554
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
function mr(e) {
|
|
@@ -559,23 +559,23 @@ Check the top-level render call using <` + t + ">.");
|
|
|
559
559
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
560
560
|
var u = r[t];
|
|
561
561
|
if (u !== "children" && u !== "key") {
|
|
562
|
-
|
|
562
|
+
I(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), I(null);
|
|
563
563
|
break;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
e.ref !== null && (
|
|
566
|
+
e.ref !== null && (I(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Ae(e, r, t, u, v, p) {
|
|
570
570
|
{
|
|
571
571
|
var d = Ge(e);
|
|
572
572
|
if (!d) {
|
|
573
|
-
var
|
|
574
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
573
|
+
var l = "";
|
|
574
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
575
575
|
var T = dr(v);
|
|
576
|
-
T ?
|
|
576
|
+
T ? l += T : l += Oe();
|
|
577
577
|
var y;
|
|
578
|
-
e === null ? y = "null" :
|
|
578
|
+
e === null ? y = "null" : Z(e) ? y = "array" : e !== void 0 && e.$$typeof === n ? (y = "<" + (x(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : y = 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", y, l);
|
|
579
579
|
}
|
|
580
580
|
var E = fr(e, r, t, v, p);
|
|
581
581
|
if (E == null)
|
|
@@ -584,29 +584,29 @@ Check the top-level render call using <` + t + ">.");
|
|
|
584
584
|
var w = r.children;
|
|
585
585
|
if (w !== void 0)
|
|
586
586
|
if (u)
|
|
587
|
-
if (
|
|
588
|
-
for (var
|
|
589
|
-
|
|
587
|
+
if (Z(w)) {
|
|
588
|
+
for (var N = 0; N < w.length; N++)
|
|
589
|
+
Pe(w[N], e);
|
|
590
590
|
Object.freeze && Object.freeze(w);
|
|
591
591
|
} else
|
|
592
|
-
|
|
592
|
+
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
593
593
|
else
|
|
594
|
-
|
|
594
|
+
Pe(w, e);
|
|
595
595
|
}
|
|
596
596
|
return e === s ? mr(E) : pr(E), E;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
function gr(e, r, t) {
|
|
600
|
-
return
|
|
600
|
+
return Ae(e, r, t, !0);
|
|
601
601
|
}
|
|
602
602
|
function hr(e, r, t) {
|
|
603
|
-
return
|
|
603
|
+
return Ae(e, r, t, !1);
|
|
604
604
|
}
|
|
605
605
|
var yr = hr, Er = gr;
|
|
606
|
-
|
|
607
|
-
}()),
|
|
606
|
+
M.Fragment = s, M.jsx = yr, M.jsxs = Er;
|
|
607
|
+
}()), M;
|
|
608
608
|
}
|
|
609
|
-
var
|
|
609
|
+
var V = {};
|
|
610
610
|
/**
|
|
611
611
|
* @license React
|
|
612
612
|
* react-jsx-runtime.production.min.js
|
|
@@ -616,26 +616,26 @@ var M = {};
|
|
|
616
616
|
* This source code is licensed under the MIT license found in the
|
|
617
617
|
* LICENSE file in the root directory of this source tree.
|
|
618
618
|
*/
|
|
619
|
-
var
|
|
619
|
+
var Ie;
|
|
620
620
|
function Ir() {
|
|
621
|
-
if (
|
|
622
|
-
return
|
|
623
|
-
|
|
624
|
-
var o =
|
|
625
|
-
function a(f,
|
|
626
|
-
var
|
|
627
|
-
|
|
628
|
-
for (
|
|
629
|
-
s.call(
|
|
621
|
+
if (Ie)
|
|
622
|
+
return V;
|
|
623
|
+
Ie = 1;
|
|
624
|
+
var o = We, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, m = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
625
|
+
function a(f, c, g) {
|
|
626
|
+
var h, C = {}, S = null, O = null;
|
|
627
|
+
g !== void 0 && (S = "" + g), c.key !== void 0 && (S = "" + c.key), c.ref !== void 0 && (O = c.ref);
|
|
628
|
+
for (h in c)
|
|
629
|
+
s.call(c, h) && !b.hasOwnProperty(h) && (C[h] = c[h]);
|
|
630
630
|
if (f && f.defaultProps)
|
|
631
|
-
for (
|
|
632
|
-
|
|
633
|
-
return { $$typeof: n, type: f, key: S, ref: O, props:
|
|
631
|
+
for (h in c = f.defaultProps, c)
|
|
632
|
+
C[h] === void 0 && (C[h] = c[h]);
|
|
633
|
+
return { $$typeof: n, type: f, key: S, ref: O, props: C, _owner: m.current };
|
|
634
634
|
}
|
|
635
|
-
return
|
|
635
|
+
return V.Fragment = i, V.jsx = a, V.jsxs = a, V;
|
|
636
636
|
}
|
|
637
|
-
process.env.NODE_ENV === "production" ?
|
|
638
|
-
var
|
|
637
|
+
process.env.NODE_ENV === "production" ? oe.exports = Ir() : oe.exports = Fr();
|
|
638
|
+
var P = oe.exports;
|
|
639
639
|
const et = ({
|
|
640
640
|
Fallback: o,
|
|
641
641
|
loginPath: n = "/login",
|
|
@@ -643,34 +643,34 @@ const et = ({
|
|
|
643
643
|
redirect401Path: s = "/login",
|
|
644
644
|
isLogged: m
|
|
645
645
|
}) => {
|
|
646
|
-
var
|
|
647
|
-
const [b, a] = br(null), f =
|
|
646
|
+
var C, S, O, A;
|
|
647
|
+
const [b, a] = br(null), f = ue(), c = Rr(!1), g = typeof m == "function" ? m() : !!m, h = typeof g == "boolean" ? g : g == null ? void 0 : g.isLogged;
|
|
648
648
|
return _r(() => {
|
|
649
|
-
var
|
|
650
|
-
|
|
651
|
-
(
|
|
652
|
-
async (
|
|
653
|
-
var
|
|
654
|
-
return typeof
|
|
649
|
+
var $;
|
|
650
|
+
c.current || (c.current = !0, ($ = k) == null || $.interceptors.response.use(
|
|
651
|
+
(R) => R,
|
|
652
|
+
async (R) => {
|
|
653
|
+
var U;
|
|
654
|
+
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 && ((U = R == null ? void 0 : R.response) == null ? void 0 : U.status) === 401 && (k.defaults.headers.common.Authorization = null, localStorage.removeItem(i), a(s)), Promise.reject(R);
|
|
655
655
|
}
|
|
656
656
|
));
|
|
657
|
-
}, [i, s]),
|
|
657
|
+
}, [i, s]), h && !b ? /* @__PURE__ */ P.jsx(Cr, { fallback: o, children: (S = (C = f.state) == null ? void 0 : C.from) != null && S.state && ((A = (O = f.state) == null ? void 0 : O.from) == null ? void 0 : A.pathname) === n ? /* @__PURE__ */ P.jsx($e, { to: f.state.from.state.from.pathname + f.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ P.jsx(Me, {}) }) : /* @__PURE__ */ P.jsx($e, { to: n, state: { from: f }, replace: !0 });
|
|
658
658
|
}, rt = () => {
|
|
659
|
-
const { pathname: o } =
|
|
659
|
+
const { pathname: o } = ue(), { sendEvent: n } = xr();
|
|
660
660
|
return Le(() => {
|
|
661
661
|
n({ event: "pageView", pathname: o });
|
|
662
|
-
}, [o, n]), /* @__PURE__ */
|
|
663
|
-
},
|
|
662
|
+
}, [o, n]), /* @__PURE__ */ P.jsx(Me, {});
|
|
663
|
+
}, se = Tr({
|
|
664
664
|
apiURL: void 0,
|
|
665
665
|
children: void 0
|
|
666
666
|
}), tt = ({ children: o, apiURL: n }) => {
|
|
667
|
-
const i =
|
|
667
|
+
const i = ie(
|
|
668
668
|
() => ({
|
|
669
669
|
apiURL: n
|
|
670
670
|
}),
|
|
671
671
|
[n]
|
|
672
672
|
);
|
|
673
|
-
return /* @__PURE__ */
|
|
673
|
+
return /* @__PURE__ */ P.jsx(se.Provider, { value: i, children: o });
|
|
674
674
|
}, nt = ({
|
|
675
675
|
tokenTypeKey: o = "tokenType",
|
|
676
676
|
userLocalStorageKey: n = "user",
|
|
@@ -678,14 +678,14 @@ const et = ({
|
|
|
678
678
|
postContentType: s = "application/json",
|
|
679
679
|
...m
|
|
680
680
|
}) => {
|
|
681
|
-
const { apiURL: b = m.baseURL } =
|
|
681
|
+
const { apiURL: b = m.baseURL } = Ye(se);
|
|
682
682
|
if (!k.defaults)
|
|
683
683
|
return null;
|
|
684
|
-
const a = localStorage.getItem(n), f = a ? JSON.parse(a) : null,
|
|
685
|
-
return k.defaults.baseURL = b, k.defaults.headers.post["Content-Type"] = s,
|
|
684
|
+
const a = localStorage.getItem(n), f = a ? JSON.parse(a) : null, c = f != null && f[o] ? f[o] : null, g = f != null && f[i] ? f[i] : null, h = a ? `${c} ${g}` : null;
|
|
685
|
+
return k.defaults.baseURL = b, k.defaults.headers.post["Content-Type"] = s, h && (k.defaults.headers.common.Authorization = h), null;
|
|
686
686
|
}, at = ({ debug: o, resources: n }) => {
|
|
687
687
|
var i;
|
|
688
|
-
return (i =
|
|
688
|
+
return (i = W) != null && i.isInitialized || (W.use(Pr).use(Ar).init({
|
|
689
689
|
debug: o,
|
|
690
690
|
fallbackLng: "en",
|
|
691
691
|
interpolation: {
|
|
@@ -699,8 +699,8 @@ const et = ({
|
|
|
699
699
|
resources: n,
|
|
700
700
|
returnNull: !1
|
|
701
701
|
}).then(() => {
|
|
702
|
-
document.documentElement.lang !==
|
|
703
|
-
}),
|
|
702
|
+
document.documentElement.lang !== W.resolvedLanguage && W.resolvedLanguage && document.documentElement.setAttribute("lang", W.resolvedLanguage);
|
|
703
|
+
}), W.on("languageChanged", (s) => {
|
|
704
704
|
document.documentElement.setAttribute("lang", s);
|
|
705
705
|
})), null;
|
|
706
706
|
}, ot = ({
|
|
@@ -712,18 +712,18 @@ const et = ({
|
|
|
712
712
|
tracePropagationTargets: b,
|
|
713
713
|
ignoreErrors: a,
|
|
714
714
|
debug: f,
|
|
715
|
-
environment:
|
|
716
|
-
}) => (
|
|
715
|
+
environment: c
|
|
716
|
+
}) => (ne.isInitialized() || (f || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && ne.init({
|
|
717
717
|
debug: f,
|
|
718
718
|
dsn: o,
|
|
719
|
-
environment:
|
|
719
|
+
environment: c || "production",
|
|
720
720
|
ignoreErrors: [...a || [], /dynamically imported module/],
|
|
721
721
|
integrations: [
|
|
722
|
-
|
|
722
|
+
ne.reactRouterV6BrowserTracingIntegration({
|
|
723
723
|
createRoutesFromChildren: Sr,
|
|
724
724
|
matchRoutes: wr,
|
|
725
725
|
useEffect: Le,
|
|
726
|
-
useLocation:
|
|
726
|
+
useLocation: ue,
|
|
727
727
|
useNavigationType: Or
|
|
728
728
|
}),
|
|
729
729
|
...n || []
|
|
@@ -733,13 +733,13 @@ const et = ({
|
|
|
733
733
|
tracePropagationTargets: b,
|
|
734
734
|
tracesSampleRate: i || 1
|
|
735
735
|
}), null), it = ({ IMaskMixin: o, ...n }) => {
|
|
736
|
-
const i =
|
|
736
|
+
const i = ie(
|
|
737
737
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
738
|
-
() => o(({ TextField: s, ...m }) => /* @__PURE__ */
|
|
738
|
+
() => o(({ TextField: s, ...m }) => /* @__PURE__ */ P.jsx(s, { ...m })),
|
|
739
739
|
[o]
|
|
740
740
|
);
|
|
741
|
-
return /* @__PURE__ */
|
|
742
|
-
}, ut = ({ accessToken: o }) => (
|
|
741
|
+
return /* @__PURE__ */ P.jsx(i, { ...n });
|
|
742
|
+
}, ut = ({ accessToken: o }) => (De && o && (De.accessToken = o), null), st = ({ children: o, defaultQueriesOptions: n, defaultMutationsOptions: i }) => {
|
|
743
743
|
const s = new kr({
|
|
744
744
|
defaultOptions: {
|
|
745
745
|
mutations: {
|
|
@@ -753,22 +753,22 @@ const et = ({
|
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
755
|
});
|
|
756
|
-
return /* @__PURE__ */
|
|
757
|
-
},
|
|
758
|
-
const { unknownErrorTranslationKey: n = "error.unknownError" } = o || {}, i = jr(n), s =
|
|
756
|
+
return /* @__PURE__ */ P.jsx($r, { client: s, children: o });
|
|
757
|
+
}, ct = (o) => {
|
|
758
|
+
const { unknownErrorTranslationKey: n = "error.unknownError" } = o || {}, i = jr(n), s = ae(
|
|
759
759
|
(b) => {
|
|
760
|
-
var f,
|
|
760
|
+
var f, c, g, h, C, S, O, A, $;
|
|
761
761
|
const { response: a } = b || {};
|
|
762
|
-
return a != null && a.reason ? String(a.reason) : (f = a == null ? void 0 : a.data) != null && f.reason ? String(a.data.reason) : (
|
|
762
|
+
return a != null && a.reason ? String(a.reason) : (f = a == null ? void 0 : a.data) != null && f.reason ? String(a.data.reason) : (c = a == null ? void 0 : a.data) != null && c.message ? String(a.data.message) : (h = (g = a == null ? void 0 : a.data) == null ? void 0 : g.detail) != null && h.length && Array.isArray((C = a == null ? void 0 : a.data) == null ? void 0 : C.detail) && ((O = (S = a == null ? void 0 : a.data) == null ? void 0 : S.detail[0]) != null && O.msg) && typeof (($ = (A = a == null ? void 0 : a.data) == null ? void 0 : A.detail[0]) == null ? void 0 : $.msg) == "string" ? String(a.data.detail[0].msg) : i;
|
|
763
763
|
},
|
|
764
764
|
[i]
|
|
765
765
|
);
|
|
766
|
-
return { getErrorCode:
|
|
767
|
-
var f,
|
|
766
|
+
return { getErrorCode: ae((b) => {
|
|
767
|
+
var f, c, g;
|
|
768
768
|
const { response: a } = b || {};
|
|
769
|
-
return 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((
|
|
769
|
+
return 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((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) : (g = a == null ? void 0 : a.data) != null && g.error_code ? String(a.data.error_code) : "unknown_error_code";
|
|
770
770
|
}, []), printError: s };
|
|
771
|
-
},
|
|
771
|
+
}, lt = ({
|
|
772
772
|
data: o,
|
|
773
773
|
fetchNextPage: n,
|
|
774
774
|
isFetchingNextPage: i,
|
|
@@ -776,14 +776,14 @@ const et = ({
|
|
|
776
776
|
isLoading: m,
|
|
777
777
|
enabled: b = !0
|
|
778
778
|
}) => {
|
|
779
|
-
const a =
|
|
780
|
-
async (
|
|
781
|
-
i || !b || await n({ pageParam: (
|
|
779
|
+
const a = ae(
|
|
780
|
+
async (c) => {
|
|
781
|
+
i || !b || await n({ pageParam: (c == null ? void 0 : c.pageParam) || c.visibleRowsCount });
|
|
782
782
|
},
|
|
783
783
|
[b, n, i]
|
|
784
|
-
), f =
|
|
784
|
+
), f = ie(() => {
|
|
785
785
|
if (o)
|
|
786
|
-
return o.pages.reduce((
|
|
786
|
+
return o.pages.reduce((c, g) => [...c, ...g], []);
|
|
787
787
|
}, [o]);
|
|
788
788
|
return {
|
|
789
789
|
fetchNextPageOnRowsScrollEnd: a,
|
|
@@ -798,23 +798,23 @@ const et = ({
|
|
|
798
798
|
setAuthenticationToken: ({ tokenType: i, accessToken: s }) => {
|
|
799
799
|
k.defaults.headers.common.Authorization = `${i} ${s}`;
|
|
800
800
|
}
|
|
801
|
-
}), Nr = (o, n = "ddd D MMM YY") => Dr(o).format(n),
|
|
801
|
+
}), Nr = (o, n = "ddd D MMM YY") => Dr(o).format(n), Wr = (o, n = "km") => {
|
|
802
802
|
const i = Number(o);
|
|
803
803
|
return Number.isNaN(i) ? `0 ${n}` : `${i.toFixed(2)} ${n}`;
|
|
804
|
-
},
|
|
804
|
+
}, Lr = (o) => {
|
|
805
805
|
const n = o && typeof o == "object" && "pathname" in o && o.pathname ? o.pathname : o;
|
|
806
806
|
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;
|
|
807
|
-
},
|
|
807
|
+
}, Ne = (o, n) => {
|
|
808
808
|
if (!o)
|
|
809
809
|
return "";
|
|
810
|
-
const i =
|
|
810
|
+
const i = Lr(o), s = typeof o == "object" && "pathname" in o ? `${o.origin}${i}` : o;
|
|
811
811
|
return typeof n == "number" ? `${s.replace("/files", `/thumbs/${n}`)}` : s;
|
|
812
812
|
}, dt = () => {
|
|
813
|
-
const { apiURL: o } =
|
|
813
|
+
const { apiURL: o } = Ye(se);
|
|
814
814
|
return {
|
|
815
815
|
dateAdapter: Nr,
|
|
816
|
-
distanceAdapter:
|
|
817
|
-
filePathAdapter: (i, s) =>
|
|
816
|
+
distanceAdapter: Wr,
|
|
817
|
+
filePathAdapter: (i, s) => Ne(
|
|
818
818
|
o && typeof i == "string" ? {
|
|
819
819
|
origin: o,
|
|
820
820
|
pathname: i
|
|
@@ -823,7 +823,7 @@ const et = ({
|
|
|
823
823
|
)
|
|
824
824
|
};
|
|
825
825
|
}, Yr = (o) => o.charAt(0).toUpperCase() + o.slice(1).toLowerCase(), Mr = (o) => {
|
|
826
|
-
const s = o.split("/").filter((m) => m.length > 0).map((m) => m.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((
|
|
826
|
+
const s = o.split("/").filter((m) => m.length > 0).map((m) => m.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((c) => c.charAt(0).toUpperCase() + c.slice(1)).join("")).join("");
|
|
827
827
|
return s.charAt(0).toLowerCase() + s.slice(1);
|
|
828
828
|
}, Vr = (o, n, i) => {
|
|
829
829
|
const s = Mr(n), m = Yr(i);
|
|
@@ -874,7 +874,7 @@ export {
|
|
|
874
874
|
nt as AxiosConfig,
|
|
875
875
|
rt as GTMSendPageView,
|
|
876
876
|
at as I18nConfig,
|
|
877
|
-
|
|
877
|
+
se as InjectDependenciesContext,
|
|
878
878
|
tt as InjectDependenciesProvider,
|
|
879
879
|
ut as MapBoxConfig,
|
|
880
880
|
it as MaskTextField,
|
|
@@ -882,10 +882,10 @@ export {
|
|
|
882
882
|
et as RequireAuth,
|
|
883
883
|
ot as SentryConfig,
|
|
884
884
|
Nr as dateAdapter,
|
|
885
|
-
|
|
885
|
+
Wr as distanceAdapter,
|
|
886
886
|
vt as getOrvalConfig,
|
|
887
887
|
dt as useAdapter,
|
|
888
888
|
ft as useAuth,
|
|
889
|
-
|
|
890
|
-
|
|
889
|
+
lt as useInfiniteDataGrid,
|
|
890
|
+
ct as useResponseError
|
|
891
891
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(v,
|
|
1
|
+
(function(v,y){typeof exports=="object"&&typeof module<"u"?y(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("@tanstack/react-query"),require("dayjs")):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","@tanstack/react-query","dayjs"],y):(v=typeof globalThis<"u"?globalThis:v||self,y(v["@tracktor/shared-module"]={},v.React,v.axios,v.reactRouterDom,v.reactGoogleTagManager,v.i18n,v.LanguageDetector,v.reactI18next,v.Sentry,v.mapbox,v.reactQuery,v.dayjs))})(this,function(v,y,P,k,We,x,Ve,Ye,Ue,ue,se,ze){"use strict";function Be(n){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(a,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}return a.default=n,Object.freeze(a)}const K=Be(Ue);var Q={exports:{}},Y={};/**
|
|
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 ce;function $e(){return ce||(ce=1,process.env.NODE_ENV!=="production"&&function(){var n=y,a=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),f=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),N=Symbol.iterator,_="@@iterator";function pe(e){if(e===null||typeof e!="object")return null;var r=N&&e[N]||e[_];return typeof r=="function"?r:null}var L=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),u=1;u<r;u++)t[u-1]=arguments[u];dr("error",e,t)}}function dr(e,r,t){{var u=L.ReactDebugCurrentFrame,p=u.getStackAddendum();p!==""&&(r+="%s",t=t.concat([p]));var g=t.map(function(d){return String(d)});g.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,g)}}var vr=!1,pr=!1,gr=!1,mr=!1,hr=!1,ge;ge=Symbol.for("react.module.reference");function yr(e){return!!(typeof e=="string"||typeof e=="function"||e===s||e===C||hr||e===m||e===h||e===E||mr||e===A||vr||pr||gr||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===S||e.$$typeof===o||e.$$typeof===f||e.$$typeof===c||e.$$typeof===ge||e.getModuleId!==void 0))}function Er(e,r,t){var u=e.displayName;if(u)return u;var p=r.displayName||r.name||"";return p!==""?t+"("+p+")":t}function me(e){return e.displayName||"Context"}function D(e){if(e==null)return null;if(typeof e.tag=="number"&&T("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 s:return"Fragment";case i:return"Portal";case C:return"Profiler";case m:return"StrictMode";case h:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var r=e;return me(r)+".Consumer";case o:var t=e;return me(t._context)+".Provider";case c:return Er(e,e.render,"ForwardRef");case S:var u=e.displayName||null;return u!==null?u:D(e.type)||"Memo";case j:{var p=e,g=p._payload,d=p._init;try{return D(d(g))}catch{return null}}}return null}var M=Object.assign,z=0,he,ye,Ee,be,_e,Re,Ce;function Te(){}Te.__reactDisabledLog=!0;function br(){{if(z===0){he=console.log,ye=console.info,Ee=console.warn,be=console.error,_e=console.group,Re=console.groupCollapsed,Ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}}function _r(){{if(z--,z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:he}),info:M({},e,{value:ye}),warn:M({},e,{value:Ee}),error:M({},e,{value:be}),group:M({},e,{value:_e}),groupCollapsed:M({},e,{value:Re}),groupEnd:M({},e,{value:Ce})})}z<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=L.ReactCurrentDispatcher,ee;function G(e,r,t){{if(ee===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);ee=u&&u[1]||""}return`
|
|
10
|
+
`+ee+e}}var re=!1,q;{var Rr=typeof WeakMap=="function"?WeakMap:Map;q=new Rr}function Se(e,r){if(!e||re)return"";{var t=q.get(e);if(t!==void 0)return t}var u;re=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=Z.current,Z.current=null,br();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(I){u=I}Reflect.construct(e,[],d)}else{try{d.call()}catch(I){u=I}e.call(d.prototype)}}else{try{throw Error()}catch(I){u=I}e()}}catch(I){if(I&&u&&typeof I.stack=="string"){for(var l=I.stack.split(`
|
|
11
11
|
`),O=u.stack.split(`
|
|
12
|
-
`),b=l.length-1,
|
|
13
|
-
`+l[b].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),typeof e=="function"&&
|
|
12
|
+
`),b=l.length-1,R=O.length-1;b>=1&&R>=0&&l[b]!==O[R];)R--;for(;b>=1&&R>=0;b--,R--)if(l[b]!==O[R]){if(b!==1||R!==1)do if(b--,R--,R<0||l[b]!==O[R]){var w=`
|
|
13
|
+
`+l[b].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,w),w}while(b>=1&&R>=0);break}}}finally{re=!1,Z.current=g,_r(),Error.prepareStackTrace=p}var V=e?e.displayName||e.name:"",Me=V?G(V):"";return typeof e=="function"&&q.set(e,Me),Me}function Cr(e,r,t){return Se(e,!1)}function Tr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,t){if(e==null)return"";if(typeof e=="function")return Se(e,Tr(e));if(typeof e=="string")return G(e);switch(e){case h:return G("Suspense");case E:return G("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return Cr(e.render);case S:return J(e.type,r,t);case j:{var u=e,p=u._payload,g=u._init;try{return J(g(p),r,t)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,Oe={},je=L.ReactDebugCurrentFrame;function H(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}function Sr(e,r,t,u,p){{var g=Function.call.bind(X);for(var d in e)if(g(e,d)){var l=void 0;try{if(typeof e[d]!="function"){var O=Error((u||"React class")+": "+t+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}l=e[d](r,d,u,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){l=b}l&&!(l instanceof Error)&&(H(p),T("%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",t,d,typeof l),H(null)),l instanceof Error&&!(l.message in Oe)&&(Oe[l.message]=!0,H(p),T("Failed %s type: %s",t,l.message),H(null))}}}var Or=Array.isArray;function te(e){return Or(e)}function jr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function wr(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Pe(e){if(wr(e))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",jr(e)),we(e)}var B=L.ReactCurrentOwner,Pr={key:!0,ref:!0,__self:!0,__source:!0},ke,Ae,ne;ne={};function kr(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ar(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function xr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var t=D(B.current.type);ne[t]||(T('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',D(B.current.type),e.ref),ne[t]=!0)}}function Fr(e,r){{var t=function(){ke||(ke=!0,T("%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))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Dr(e,r){{var t=function(){Ae||(Ae=!0,T("%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))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Ir=function(e,r,t,u,p,g,d){var l={$$typeof:a,type:e,key:r,ref:t,props:d,_owner:g};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Nr(e,r,t,u,p){{var g,d={},l=null,O=null;t!==void 0&&(Pe(t),l=""+t),Ar(r)&&(Pe(r.key),l=""+r.key),kr(r)&&(O=r.ref,xr(r,p));for(g in r)X.call(r,g)&&!Pr.hasOwnProperty(g)&&(d[g]=r[g]);if(e&&e.defaultProps){var b=e.defaultProps;for(g in b)d[g]===void 0&&(d[g]=b[g])}if(l||O){var R=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&Fr(d,R),O&&Dr(d,R)}return Ir(e,l,O,p,u,B.current,d)}}var ae=L.ReactCurrentOwner,xe=L.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(t)}else xe.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function Fe(){{if(ae.current){var e=D(ae.current.type);if(e)return`
|
|
14
14
|
|
|
15
15
|
Check the render method of \``+e+"`."}return""}}function Lr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
16
16
|
|
|
17
17
|
Check your code at `+r+":"+t+"."}return""}}var De={};function Mr(e){{var r=Fe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
18
18
|
|
|
19
|
-
Check the top-level render call using <`+t+">.")}return r}}function Ie(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Mr(r);if(De[t])return;De[t]=!0;var u="";e&&e._owner&&e._owner!==
|
|
19
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ie(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Mr(r);if(De[t])return;De[t]=!0;var u="";e&&e._owner&&e._owner!==ae.current&&(u=" It was passed a child from "+D(e._owner.type)+"."),W(e),T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,u),W(null)}}function Ne(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var u=e[t];ie(u)&&Ie(u,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var p=pe(e);if(typeof p=="function"&&p!==e.entries)for(var g=p.call(e),d;!(d=g.next()).done;)ie(d.value)&&Ie(d.value,r)}}}function Wr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===S))t=r.propTypes;else return;if(t){var u=D(r);Sr(t,e.props,"prop",u,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var p=D(r);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Vr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var u=r[t];if(u!=="children"&&u!=="key"){W(e),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",u),W(null);break}}e.ref!==null&&(W(e),T("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Le(e,r,t,u,p,g){{var d=yr(e);if(!d){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" 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=Lr(p);O?l+=O:l+=Fe();var b;e===null?b="null":te(e)?b="array":e!==void 0&&e.$$typeof===a?(b="<"+(D(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,l)}var R=Nr(e,r,t,p,g);if(R==null)return R;if(d){var w=r.children;if(w!==void 0)if(u)if(te(w)){for(var V=0;V<w.length;V++)Ne(w[V],e);Object.freeze&&Object.freeze(w)}else T("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 Ne(w,e)}return e===s?Vr(R):Wr(R),R}}function Yr(e,r,t){return Le(e,r,t,!0)}function Ur(e,r,t){return Le(e,r,t,!1)}var zr=Ur,Br=Yr;Y.Fragment=s,Y.jsx=zr,Y.jsxs=Br}()),Y}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 <`+t+">.")}return r}}function Ie(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
|
|
27
|
+
*/var le;function Ge(){if(le)return U;le=1;var n=y,a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,m=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C={key:!0,ref:!0,__self:!0,__source:!0};function o(f,c,h){var E,S={},j=null,A=null;h!==void 0&&(j=""+h),c.key!==void 0&&(j=""+c.key),c.ref!==void 0&&(A=c.ref);for(E in c)s.call(c,E)&&!C.hasOwnProperty(E)&&(S[E]=c[E]);if(f&&f.defaultProps)for(E in c=f.defaultProps,c)S[E]===void 0&&(S[E]=c[E]);return{$$typeof:a,type:f,key:j,ref:A,props:S,_owner:m.current}}return U.Fragment=i,U.jsx=o,U.jsxs=o,U}process.env.NODE_ENV==="production"?Q.exports=Ge():Q.exports=$e();var F=Q.exports;const qe=({Fallback:n,loginPath:a="/login",localStorageKey:i="user",redirect401Path:s="/login",isLogged:m})=>{var S,j,A,N;const[C,o]=y.useState(null),f=k.useLocation(),c=y.useRef(!1),h=typeof m=="function"?m():!!m,E=typeof h=="boolean"?h:h==null?void 0:h.isLogged;return y.useLayoutEffect(()=>{c.current||(c.current=!0,P==null||P.interceptors.response.use(_=>_,async _=>{var T;return typeof _=="object"&&_&&"response"in _&&_.response&&typeof _.response=="object"&&"status"in _.response&&_.response&&typeof _.response=="object"&&"status"in _.response&&((T=_==null?void 0:_.response)==null?void 0:T.status)===401&&(P.defaults.headers.common.Authorization=null,localStorage.removeItem(i),o(s)),Promise.reject(_)}))},[i,s]),E&&!C?F.jsx(y.Suspense,{fallback:n,children:(j=(S=f.state)==null?void 0:S.from)!=null&&j.state&&((N=(A=f.state)==null?void 0:A.from)==null?void 0:N.pathname)===a?F.jsx(k.Navigate,{to:f.state.from.state.from.pathname+f.state.from.state.from.search,replace:!0}):F.jsx(k.Outlet,{})}):F.jsx(k.Navigate,{to:a,state:{from:f},replace:!0})},Je=()=>{const{pathname:n}=k.useLocation(),{sendEvent:a}=We.useGoogleTagManager();return y.useEffect(()=>{a({event:"pageView",pathname:n})},[n,a]),F.jsx(k.Outlet,{})},$=y.createContext({apiURL:void 0,children:void 0}),Xe=({children:n,apiURL:a})=>{const i=y.useMemo(()=>({apiURL:a}),[a]);return F.jsx($.Provider,{value:i,children:n})},He=({tokenTypeKey:n="tokenType",userLocalStorageKey:a="user",tokenKey:i="accessToken",postContentType:s="application/json",...m})=>{const{apiURL:C=m.baseURL}=y.useContext($);if(!P.defaults)return null;const o=localStorage.getItem(a),f=o?JSON.parse(o):null,c=f!=null&&f[n]?f[n]:null,h=f!=null&&f[i]?f[i]:null,E=o?`${c} ${h}`:null;return P.defaults.baseURL=C,P.defaults.headers.post["Content-Type"]=s,E&&(P.defaults.headers.common.Authorization=E),null},Ke=({debug:n,resources:a})=>(x!=null&&x.isInitialized||(x.use(Ve).use(Ye.initReactI18next).init({debug:n,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:a,returnNull:!1}).then(()=>{document.documentElement.lang!==x.resolvedLanguage&&x.resolvedLanguage&&document.documentElement.setAttribute("lang",x.resolvedLanguage)}),x.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)})),null),Qe=({dsn:n,integrations:a,tracesSampleRate:i,replaysSessionSampleRate:s,replaysOnErrorSampleRate:m,tracePropagationTargets:C,ignoreErrors:o,debug:f,environment:c})=>(K.isInitialized()||(f||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&K.init({debug:f,dsn:n,environment:c||"production",ignoreErrors:[...o||[],/dynamically imported module/],integrations:[K.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:k.createRoutesFromChildren,matchRoutes:k.matchRoutes,useEffect:y.useEffect,useLocation:k.useLocation,useNavigationType:k.useNavigationType}),...a||[]],replaysOnErrorSampleRate:m||1,replaysSessionSampleRate:s||.1,tracePropagationTargets:C,tracesSampleRate:i||1}),null),Ze=({IMaskMixin:n,...a})=>{const i=y.useMemo(()=>n(({TextField:s,...m})=>F.jsx(s,{...m})),[n]);return F.jsx(i,{...a})},er=({accessToken:n})=>(ue&&n&&(ue.accessToken=n),null),rr=({children:n,defaultQueriesOptions:a,defaultMutationsOptions:i})=>{const s=new se.QueryClient({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(m,C,o)=>m.length+(o||0),refetchOnWindowFocus:!1,retry:3,...a}}});return F.jsx(se.QueryClientProvider,{client:s,children:n})},tr=n=>{const{unknownErrorTranslationKey:a="error.unknownError"}=n||{},i=x.t(a),s=y.useCallback(C=>{var f,c,h,E,S,j,A,N,_;const{response:o}=C||{};return o!=null&&o.reason?String(o.reason):(f=o==null?void 0:o.data)!=null&&f.reason?String(o.data.reason):(c=o==null?void 0:o.data)!=null&&c.message?String(o.data.message):(E=(h=o==null?void 0:o.data)==null?void 0:h.detail)!=null&&E.length&&Array.isArray((S=o==null?void 0:o.data)==null?void 0:S.detail)&&((A=(j=o==null?void 0:o.data)==null?void 0:j.detail[0])!=null&&A.msg)&&typeof((_=(N=o==null?void 0:o.data)==null?void 0:N.detail[0])==null?void 0:_.msg)=="string"?String(o.data.detail[0].msg):i},[i]);return{getErrorCode:y.useCallback(C=>{var f,c,h;const{response:o}=C||{};return o!=null&&o.error_code?String(o==null?void 0:o.error_code):(f=o==null?void 0:o.data)!=null&&f.error_code?String((c=o==null?void 0:o.data)==null?void 0:c.error_code):o!=null&&o.error_code?String(o==null?void 0:o.error_code):(h=o==null?void 0:o.data)!=null&&h.error_code?String(o.data.error_code):"unknown_error_code"},[]),printError:s}},nr=({data:n,fetchNextPage:a,isFetchingNextPage:i,isInitialLoading:s,isLoading:m,enabled:C=!0})=>{const o=y.useCallback(async c=>{i||!C||await a({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[C,a,i]),f=y.useMemo(()=>{if(n)return n.pages.reduce((c,h)=>[...c,...h],[])},[n]);return{fetchNextPageOnRowsScrollEnd:o,isLoading:i||m,loadingVariant:s?"skeleton":"linear",rows:f}},ar=()=>({clearAuthenticationToken:()=>{P.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:i,accessToken:s})=>{P.defaults.headers.common.Authorization=`${i} ${s}`}}),fe=(n,a="ddd D MMM YY")=>ze(n).format(a),de=(n,a="km")=>{const i=Number(n);return Number.isNaN(i)?`0 ${a}`:`${i.toFixed(2)} ${a}`},or=n=>{const a=n&&typeof n=="object"&&"pathname"in n&&n.pathname?n.pathname:n;return typeof a=="string"?a!=null&&a.startsWith("/")?a!=null&&a.startsWith("/files")?a:`/files${a}`:a!=null&&a.startsWith("files")?`/${a}`:a!=null&&a.startsWith("files")?`/${a}`:`/files/${a}`:a},ve=(n,a)=>{if(!n)return"";const i=or(n),s=typeof n=="object"&&"pathname"in n?`${n.origin}${i}`:n;return typeof a=="number"?`${s.replace("/files",`/thumbs/${a}`)}`:s},ir=()=>{const{apiURL:n}=y.useContext($);return{dateAdapter:fe,distanceAdapter:de,filePathAdapter:(i,s)=>ve(n&&typeof i=="string"?{origin:n,pathname:i}:i,s)}},ur=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),sr=n=>{const s=n.split("/").filter(m=>m.length>0).map(m=>m.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return s.charAt(0).toLowerCase()+s.slice(1)},cr=(n,a,i)=>{const s=sr(a),m=ur(i);return`${s}${m}`},lr=n=>{if(n)return(n==null?void 0:n.reduce((a,i)=>(a[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},a),{}))||{}},fr=n=>{const{input:a="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=n||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:a,output:{client:"react-query",mode:"tags-split",override:{header:s=>["Generated by orval 🍺",...s.title?[s.title]:[],...s.description?[s.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:cr,...(i==null?void 0:i.length)&&{operations:lr(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};v.AxiosConfig=He,v.GTMSendPageView=Je,v.I18nConfig=Ke,v.InjectDependenciesContext=$,v.InjectDependenciesProvider=Xe,v.MapBoxConfig=er,v.MaskTextField=Ze,v.QueryClientConfigProvider=rr,v.RequireAuth=qe,v.SentryConfig=Qe,v.dateAdapter=fe,v.distanceAdapter=de,v.getOrvalConfig=fr,v.useAdapter=ir,v.useAuth=ar,v.useInfiniteDataGrid=nr,v.useResponseError=tr,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|