@tracktor/shared-module 2.7.0 → 2.9.0

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