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