@ibdop/platform-kit 1.0.12 → 1.0.13

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.
Files changed (63) hide show
  1. package/README.md +0 -0
  2. package/dist/components/ErrorBoundary.d.ts +0 -0
  3. package/dist/components/ErrorBoundary.d.ts.map +0 -0
  4. package/dist/components/Notification.d.ts +0 -0
  5. package/dist/components/Notification.d.ts.map +0 -0
  6. package/dist/components/VersionInfo.d.ts +0 -0
  7. package/dist/components/VersionInfo.d.ts.map +0 -0
  8. package/dist/components/index.d.ts +0 -0
  9. package/dist/components/index.d.ts.map +0 -0
  10. package/dist/hooks/index.d.ts +2 -1
  11. package/dist/hooks/index.d.ts.map +1 -1
  12. package/dist/hooks/useApi.d.ts +13 -2
  13. package/dist/hooks/useApi.d.ts.map +1 -1
  14. package/dist/hooks/useFeatures.d.ts +0 -0
  15. package/dist/hooks/useFeatures.d.ts.map +0 -0
  16. package/dist/hooks/useInfoData.d.ts +0 -0
  17. package/dist/hooks/useInfoData.d.ts.map +0 -0
  18. package/dist/hooks/usePermissions.d.ts +0 -0
  19. package/dist/hooks/usePermissions.d.ts.map +0 -0
  20. package/dist/hooks/useShellAuth.d.ts +0 -0
  21. package/dist/hooks/useShellAuth.d.ts.map +0 -0
  22. package/dist/hooks/useV1Config.d.ts +0 -0
  23. package/dist/hooks/useV1Config.d.ts.map +0 -0
  24. package/dist/index.d.ts +0 -0
  25. package/dist/index.d.ts.map +0 -0
  26. package/dist/index.js +10 -10
  27. package/dist/index.mjs +726 -701
  28. package/dist/index.umd.js +9 -9
  29. package/dist/services/api.d.ts +0 -0
  30. package/dist/services/api.d.ts.map +1 -1
  31. package/dist/services/index.d.ts +0 -0
  32. package/dist/services/index.d.ts.map +0 -0
  33. package/dist/services/logger.d.ts +0 -0
  34. package/dist/services/logger.d.ts.map +0 -0
  35. package/dist/types/index.d.ts +0 -23
  36. package/dist/types/index.d.ts.map +1 -1
  37. package/dist/utils/index.d.ts +0 -0
  38. package/dist/utils/index.d.ts.map +0 -0
  39. package/dist/utils/mfeName.d.ts +0 -0
  40. package/dist/utils/mfeName.d.ts.map +0 -0
  41. package/dist/utils/shellAuth.d.ts +1 -0
  42. package/dist/utils/shellAuth.d.ts.map +1 -1
  43. package/package.json +1 -1
  44. package/src/components/ErrorBoundary.tsx +0 -0
  45. package/src/components/Notification.tsx +0 -0
  46. package/src/components/VersionInfo.tsx +0 -0
  47. package/src/components/index.ts +0 -0
  48. package/src/global.d.ts +0 -0
  49. package/src/hooks/index.ts +2 -1
  50. package/src/hooks/useApi.ts +48 -40
  51. package/src/hooks/useFeatures.ts +0 -0
  52. package/src/hooks/useInfoData.ts +0 -0
  53. package/src/hooks/usePermissions.ts +0 -0
  54. package/src/hooks/useShellAuth.ts +0 -0
  55. package/src/hooks/useV1Config.ts +0 -0
  56. package/src/index.ts +0 -0
  57. package/src/services/api.ts +4 -1
  58. package/src/services/index.ts +0 -0
  59. package/src/services/logger.ts +0 -0
  60. package/src/types/index.ts +1 -24
  61. package/src/utils/index.ts +0 -0
  62. package/src/utils/mfeName.ts +0 -0
  63. package/src/utils/shellAuth.ts +1 -0
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import Qe, { useState as R, useRef as et, useCallback as C, useEffect as B, useMemo as Ye, Component as $t, createContext as Lt, useContext as Ut } from "react";
2
- import Vt from "axios";
3
- function V() {
1
+ import et, { useState as R, useRef as tt, useCallback as C, useEffect as U, useMemo as ye, Component as Lt, createContext as Ut, useContext as Vt } from "react";
2
+ import Bt from "axios";
3
+ function B() {
4
4
  if (typeof window > "u") return null;
5
5
  const t = window;
6
6
  if (t.__SHELL_AUTH_INSTANCE__)
@@ -8,26 +8,26 @@ function V() {
8
8
  const r = window;
9
9
  return r.__SHELL_AUTH__?.authInstance ? r.__SHELL_AUTH__.authInstance : null;
10
10
  }
11
- function Bt() {
12
- const t = V();
11
+ function Wt() {
12
+ const t = B();
13
13
  return t ? {
14
14
  isAuthenticated: t.isAuthenticated,
15
15
  user: t.user ?? void 0
16
16
  } : { isAuthenticated: !1 };
17
17
  }
18
- function fr() {
19
- const t = V();
18
+ function dr() {
19
+ const t = B();
20
20
  return t?.isAuthenticated ? t.user?.profile?.access_token ?? null : null;
21
21
  }
22
- function dr() {
23
- return V()?.isAuthenticated ?? !1;
22
+ function pr() {
23
+ return B()?.isAuthenticated ?? !1;
24
24
  }
25
- async function Wt() {
26
- const t = V();
25
+ async function zt() {
26
+ const t = B();
27
27
  t?.signinRedirect ? await t.signinRedirect() : typeof window < "u" && (window.location.href = "/");
28
28
  }
29
- async function pr() {
30
- const t = V();
29
+ async function hr() {
30
+ const t = B();
31
31
  t?.removeUser && await t.removeUser();
32
32
  }
33
33
  const Je = {
@@ -36,23 +36,23 @@ const Je = {
36
36
  warn: (...t) => {
37
37
  }
38
38
  };
39
- function se() {
40
- const [t, r] = R(null), [s, i] = R(!0), c = et(0), p = 20, n = C(() => V(), []);
41
- B(() => {
42
- const y = n();
43
- if (y) {
44
- r(y), i(!1);
39
+ function ae() {
40
+ const [t, r] = R(null), [s, i] = R(!0), a = tt(0), d = 20, n = C(() => B(), []);
41
+ U(() => {
42
+ const v = n();
43
+ if (v) {
44
+ r(v), i(!1);
45
45
  return;
46
46
  }
47
- const f = (u) => {
48
- r(u.detail), i(!1);
49
- }, h = setInterval(() => {
50
- c.current++;
51
- const u = n();
52
- u ? (Je.log("Auth found via polling, attempts:", c.current), r(u), i(!1), clearInterval(h)) : c.current >= p && (i(!1), clearInterval(h));
47
+ const c = (f) => {
48
+ r(f.detail), i(!1);
49
+ }, g = setInterval(() => {
50
+ a.current++;
51
+ const f = n();
52
+ f ? (Je.log("Auth found via polling, attempts:", a.current), r(f), i(!1), clearInterval(g)) : a.current >= d && (i(!1), clearInterval(g));
53
53
  }, 500);
54
- return window.addEventListener("shell-auth-ready", f), () => {
55
- clearInterval(h), window.removeEventListener("shell-auth-ready", f);
54
+ return window.addEventListener("shell-auth-ready", c), () => {
55
+ clearInterval(g), window.removeEventListener("shell-auth-ready", c);
56
56
  };
57
57
  }, [n]);
58
58
  const l = t || {
@@ -60,17 +60,17 @@ function se() {
60
60
  isAuthenticated: !1,
61
61
  isLoading: s,
62
62
  signinRedirect: async () => {
63
- const y = V();
64
- y?.signinRedirect ? await y.signinRedirect() : typeof window < "u" && (window.location.href = "/");
63
+ const v = B();
64
+ v?.signinRedirect ? await v.signinRedirect() : typeof window < "u" && (window.location.href = "/");
65
65
  },
66
66
  removeUser: async () => {
67
- const y = V();
68
- y?.removeUser && await y.removeUser();
67
+ const v = B();
68
+ v?.removeUser && await v.removeUser();
69
69
  }
70
70
  };
71
71
  return Je.log("Auth result:", { isAuthenticated: l.isAuthenticated, isLoading: l.isLoading }), l;
72
72
  }
73
- const zt = {
73
+ const Ht = {
74
74
  log: (...t) => {
75
75
  },
76
76
  warn: (...t) => {
@@ -79,7 +79,7 @@ const zt = {
79
79
  console.error("[useInfoData]", ...t);
80
80
  }
81
81
  };
82
- function Ht(t) {
82
+ function Gt(t) {
83
83
  if (t) return t;
84
84
  if (typeof window < "u") {
85
85
  const r = window;
@@ -87,31 +87,31 @@ function Ht(t) {
87
87
  }
88
88
  return "unknown-mfe";
89
89
  }
90
- function Gt(t) {
91
- const [r, s] = R(null), [i, c] = R(!0), [p, n] = R(null), m = C(() => {
92
- const y = Ht(t?.mfeName).replace("@ib-dop/", "");
93
- c(!0), n(null), fetch(`/svc/${y}/info.json`).then((f) => {
94
- if (!f.ok)
95
- throw new Error(`HTTP ${f.status}: ${f.statusText}`);
96
- return f.json();
97
- }).then((f) => {
98
- s(f);
99
- }).catch((f) => {
100
- zt.error("Failed to load info:", f), n(f instanceof Error ? f.message : String(f));
90
+ function Yt(t) {
91
+ const [r, s] = R(null), [i, a] = R(!0), [d, n] = R(null), p = C(() => {
92
+ const v = Gt(t?.mfeName).replace("@ib-dop/", "");
93
+ a(!0), n(null), fetch(`/svc/${v}/info.json`).then((c) => {
94
+ if (!c.ok)
95
+ throw new Error(`HTTP ${c.status}: ${c.statusText}`);
96
+ return c.json();
97
+ }).then((c) => {
98
+ s(c);
99
+ }).catch((c) => {
100
+ Ht.error("Failed to load info:", c), n(c instanceof Error ? c.message : String(c));
101
101
  }).finally(() => {
102
- c(!1);
102
+ a(!1);
103
103
  });
104
104
  }, [t?.mfeName]);
105
- return B(() => {
106
- m();
107
- }, [m]), {
105
+ return U(() => {
106
+ p();
107
+ }, [p]), {
108
108
  data: r,
109
109
  isLoading: i,
110
- error: p,
111
- refetch: m
110
+ error: d,
111
+ refetch: p
112
112
  };
113
113
  }
114
- const me = {
114
+ const _e = {
115
115
  log: (...t) => {
116
116
  },
117
117
  warn: (...t) => {
@@ -119,28 +119,28 @@ const me = {
119
119
  error: (...t) => {
120
120
  console.error("[useV1Config]", ...t);
121
121
  }
122
- }, te = {
122
+ }, re = {
123
123
  authority: "",
124
124
  client_id: "",
125
125
  environment: "development"
126
126
  };
127
- function hr() {
128
- const [t, r] = R(null), [s, i] = R(!0), [c, p] = R(null);
129
- return B(() => {
127
+ function gr() {
128
+ const [t, r] = R(null), [s, i] = R(!0), [a, d] = R(null);
129
+ return U(() => {
130
130
  (() => {
131
131
  if (typeof sessionStorage > "u") {
132
- p("sessionStorage not available"), r(te), i(!1);
132
+ d("sessionStorage not available"), r(re), i(!1);
133
133
  return;
134
134
  }
135
135
  try {
136
- const m = sessionStorage.getItem("config");
137
- if (m) {
138
- const l = JSON.parse(m);
139
- r({ ...te, ...l }), p(null), me.log("Config loaded successfully");
136
+ const p = sessionStorage.getItem("config");
137
+ if (p) {
138
+ const l = JSON.parse(p);
139
+ r({ ...re, ...l }), d(null), _e.log("Config loaded successfully");
140
140
  } else
141
- r(te), p("Config not found in sessionStorage"), me.warn("Config not found in sessionStorage");
142
- } catch (m) {
143
- me.error("Error parsing config:", m), r(te), p("Error parsing config");
141
+ r(re), d("Config not found in sessionStorage"), _e.warn("Config not found in sessionStorage");
142
+ } catch (p) {
143
+ _e.error("Error parsing config:", p), r(re), d("Error parsing config");
144
144
  } finally {
145
145
  i(!1);
146
146
  }
@@ -148,10 +148,111 @@ function hr() {
148
148
  }, []), {
149
149
  data: t,
150
150
  isLoading: s,
151
- error: c
151
+ error: a
152
+ };
153
+ }
154
+ const rt = "platform-kit", ne = {
155
+ log: (...t) => {
156
+ },
157
+ warn: (...t) => {
158
+ },
159
+ error: (...t) => {
160
+ console.error(`[${rt}]`, ...t);
161
+ },
162
+ info: (...t) => {
163
+ }
164
+ };
165
+ function qt(t) {
166
+ const r = t.response;
167
+ let s = "unknown";
168
+ return r ? r.status === 401 ? s = "unauthorized" : r.status === 403 ? s = "forbidden" : r.status === 404 ? s = "not_found" : r.status >= 500 && (s = "server") : s = "network", {
169
+ message: r?.data?.message ?? t.message ?? "Unknown error",
170
+ code: r?.data?.code,
171
+ status: r?.status,
172
+ type: s,
173
+ timestamp: Date.now(),
174
+ url: t.config?.url
175
+ };
176
+ }
177
+ const Jt = 3, Kt = 1e3;
178
+ function Xt(t) {
179
+ return !t || t >= 500 || t === 429;
180
+ }
181
+ function Zt(t) {
182
+ return new Promise((r) => setTimeout(r, t));
183
+ }
184
+ function Qt(t = {}) {
185
+ const r = t.name || rt, s = t.retries ?? Jt, i = t.retryDelay ?? Kt, a = {
186
+ log: (...n) => ne.log(`[API:${r}]`, ...n),
187
+ warn: (...n) => ne.warn(`[API:${r}]`, ...n),
188
+ error: (...n) => ne.error(`[API:${r}]`, ...n),
189
+ info: (...n) => ne.info(`[API:${r}]`, ...n)
190
+ }, d = Bt.create({
191
+ timeout: t.timeout ?? 1e4,
192
+ baseURL: t.baseURL ?? "",
193
+ headers: {
194
+ "Content-Type": "application/json"
195
+ }
196
+ });
197
+ return d.interceptors.request.use(
198
+ (n) => {
199
+ const p = Wt();
200
+ if (p?.isAuthenticated) {
201
+ const l = p.user?.access_token || p.user?.profile?.access_token;
202
+ l && n.headers ? (n.headers.Authorization = `Bearer ${l}`, a.info("Auth token attached")) : a.warn("User is authenticated but no token found");
203
+ } else
204
+ a.info("User not authenticated - request without token");
205
+ return a.log(`${n.method?.toUpperCase()} ${n.url}`), n;
206
+ },
207
+ (n) => (a.error("Request interceptor error:", n.message), Promise.reject(n))
208
+ ), d.interceptors.response.use(
209
+ (n) => (a.log(`Response ${n.status}:`, n.config.url), n),
210
+ async (n) => {
211
+ const p = n.response?.status, l = n.config?.url, v = n.config?._retryCount ?? 0;
212
+ if (Xt(p) && v < s) {
213
+ const c = n.config;
214
+ c._retryCount = v + 1;
215
+ const g = i * Math.pow(2, v);
216
+ return a.warn(`Retrying (${c._retryCount}/${s}) after ${g}ms:`, l), await Zt(g), d.request(c);
217
+ }
218
+ return p === 401 ? (a.warn("401 Unauthorized - triggering re-auth"), zt()) : p === 403 ? a.warn("403 Forbidden - insufficient permissions") : p === 404 ? a.warn("404 Not found:", l) : p === 429 ? a.warn("429 Rate limited") : p === 500 ? a.error("500 Server error:", l) : n.response ? a.warn(`Error ${p}:`, n.message) : a.error("Network error - backend may be unavailable:", l), Promise.reject(qt(n));
219
+ }
220
+ ), d;
221
+ }
222
+ const W = Qt();
223
+ async function mr(t, r, s = W) {
224
+ const i = await s.get(t, { params: r });
225
+ return {
226
+ data: i.data,
227
+ status: i.status,
228
+ ok: i.status >= 200 && i.status < 300
229
+ };
230
+ }
231
+ async function _r(t, r, s = W) {
232
+ const i = await s.post(t, r);
233
+ return {
234
+ data: i.data,
235
+ status: i.status,
236
+ ok: i.status >= 200 && i.status < 300
237
+ };
238
+ }
239
+ async function vr(t, r, s = W) {
240
+ const i = await s.put(t, r);
241
+ return {
242
+ data: i.data,
243
+ status: i.status,
244
+ ok: i.status >= 200 && i.status < 300
245
+ };
246
+ }
247
+ async function yr(t, r = W) {
248
+ const s = await r.delete(t);
249
+ return {
250
+ data: s.data,
251
+ status: s.status,
252
+ ok: s.status >= 200 && s.status < 300
152
253
  };
153
254
  }
154
- function tt(t) {
255
+ function nt(t) {
155
256
  if (typeof window > "u") return;
156
257
  const r = window.__MF_NAME__ || "unknown", s = {
157
258
  ...t,
@@ -163,7 +264,7 @@ function tt(t) {
163
264
  bubbles: !0
164
265
  }));
165
266
  }
166
- function qe(t, r) {
267
+ function Ke(t, r) {
167
268
  const s = {
168
269
  network: {
169
270
  title: "Нет подключения",
@@ -194,67 +295,67 @@ function qe(t, r) {
194
295
  message: t.message || "Произошла неизвестная ошибка."
195
296
  }
196
297
  }, i = s[t.type] || s.unknown;
197
- tt({
298
+ nt({
198
299
  type: t.type === "network" ? "warning" : "error",
199
300
  title: i.title,
200
301
  message: r ? `${i.message} (${r})` : i.message
201
302
  });
202
303
  }
203
- function Yt(t) {
304
+ function er(t) {
204
305
  return t instanceof Error && t.name === "AbortError";
205
306
  }
206
- function gr(t, r = {}) {
307
+ function ie(t, r = {}) {
207
308
  const {
208
309
  notifyOnError: s = !0,
209
310
  notifyOnSuccess: i = !1,
210
- successMessage: c,
211
- errorContext: p,
311
+ successMessage: a,
312
+ errorContext: d,
212
313
  onSuccess: n,
213
- onError: m
214
- } = r, [l, y] = R(null), [f, h] = R(null), [u, E] = R(!1), v = et(null), N = f !== null, T = l !== null && !u && !N;
215
- B(() => () => {
216
- v.current && v.current.abort();
314
+ onError: p
315
+ } = r, [l, v] = R(null), [c, g] = R(null), [f, E] = R(!1), y = tt(null), N = c !== null, T = l !== null && !f && !N;
316
+ U(() => () => {
317
+ y.current && y.current.abort();
217
318
  }, []);
218
319
  const x = C(() => {
219
- v.current && (v.current.abort(), v.current = null, E(!1));
320
+ y.current && (y.current.abort(), y.current = null, E(!1));
220
321
  }, []), _ = C(async () => {
221
- v.current && v.current.abort(), v.current = new AbortController();
222
- const j = v.current.signal;
223
- E(!0), h(null);
322
+ y.current && y.current.abort(), y.current = new AbortController();
323
+ const j = y.current.signal;
324
+ E(!0), g(null);
224
325
  try {
225
- const O = await t(j);
326
+ const P = await t(j);
226
327
  if (j.aborted)
227
328
  return null;
228
- if (O.ok)
229
- return y(O.data), i && c && tt({
329
+ if (P.ok)
330
+ return v(P.data), i && a && nt({
230
331
  type: "success",
231
332
  title: "Успешно",
232
- message: c
233
- }), n?.(O.data), O.data;
333
+ message: a
334
+ }), n?.(P.data), P.data;
234
335
  {
235
336
  const L = {
236
- message: O.data || "Request failed",
237
- status: O.status,
337
+ message: P.data || "Request failed",
338
+ status: P.status,
238
339
  type: "client",
239
340
  timestamp: Date.now()
240
341
  };
241
- return h(L), s && qe(L, p), m?.(L), null;
342
+ return g(L), s && Ke(L, d), p?.(L), null;
242
343
  }
243
- } catch (O) {
244
- if (Yt(O))
344
+ } catch (P) {
345
+ if (er(P))
245
346
  return null;
246
- const L = O;
247
- return h(L), s && qe(L, p), m?.(L), null;
347
+ const L = P;
348
+ return g(L), s && Ke(L, d), p?.(L), null;
248
349
  } finally {
249
- j.aborted || E(!1), v.current = null;
350
+ j.aborted || E(!1), y.current = null;
250
351
  }
251
- }, [t, s, i, c, p, n, m]), k = C(() => {
252
- y(null), h(null), E(!1);
352
+ }, [t, s, i, a, d, n, p]), k = C(() => {
353
+ v(null), g(null), E(!1);
253
354
  }, []);
254
355
  return {
255
356
  data: l,
256
- error: f,
257
- isLoading: u,
357
+ error: c,
358
+ isLoading: f,
258
359
  isError: N,
259
360
  isSuccess: T,
260
361
  execute: _,
@@ -262,7 +363,28 @@ function gr(t, r = {}) {
262
363
  abort: x
263
364
  };
264
365
  }
265
- const Jt = {
366
+ function Er(t, r = {}) {
367
+ const { skip: s = !1, headers: i, immediate: a = !0, ...d } = r, n = ye(() => (l) => {
368
+ const v = i ? i() : {};
369
+ return W.get(t, {
370
+ headers: { "Content-Type": "application/json", ...v },
371
+ signal: l
372
+ }).then((c) => ({ data: c.data, status: c.status, ok: c.status >= 200 && c.status < 300 }));
373
+ }, [t, i]), p = ie(n, { ...d });
374
+ return U(() => {
375
+ a && !s && p.execute();
376
+ }, [a, s, t]), p;
377
+ }
378
+ function wr(t, r, s = {}) {
379
+ return ie((a) => W.post(t, r, { signal: a }).then((d) => ({ data: d.data, status: d.status, ok: d.status >= 200 && d.status < 300 })), s);
380
+ }
381
+ function br(t, r, s = {}) {
382
+ return ie((a) => W.put(t, r, { signal: a }).then((d) => ({ data: d.data, status: d.status, ok: d.status >= 200 && d.status < 300 })), s);
383
+ }
384
+ function xr(t, r = {}) {
385
+ return ie((i) => W.delete(t, { signal: i }).then((a) => ({ data: a.data, status: a.status, ok: a.status >= 200 && a.status < 300 })), r);
386
+ }
387
+ const tr = {
266
388
  canView: ["all"],
267
389
  canEdit: ["ibdop-user", "ibdop-admin", "ibdop-devops"],
268
390
  canDelete: ["ibdop-admin", "ibdop-devops"],
@@ -271,75 +393,75 @@ const Jt = {
271
393
  canExportData: ["ibdop-user"],
272
394
  canManageUsers: ["ibdop-admin"]
273
395
  };
274
- function mr(t = {}) {
275
- const r = se(), s = Ye(() => ({
276
- ...Jt,
396
+ function Ar(t = {}) {
397
+ const r = ae(), s = ye(() => ({
398
+ ...tr,
277
399
  ...t
278
- }), [t]), i = Ye(() => {
279
- const p = r.user?.profile?.realm_roles || r.user?.profile?.roles || [];
280
- return Array.isArray(p) ? p : [p];
281
- }, [r.user]), c = (p) => p.includes("all") ? !0 : p.some((n) => i.includes(n));
400
+ }), [t]), i = ye(() => {
401
+ const d = r.user?.profile?.realm_roles || r.user?.profile?.roles || [];
402
+ return Array.isArray(d) ? d : [d];
403
+ }, [r.user]), a = (d) => d.includes("all") ? !0 : d.some((n) => i.includes(n));
282
404
  return {
283
- canView: c(s.canView),
284
- canEdit: c(s.canEdit),
285
- canDelete: c(s.canDelete),
286
- canAdmin: c(s.canAdmin),
287
- canViewSensitiveData: c(s.canViewSensitiveData),
288
- canExportData: c(s.canExportData),
289
- canManageUsers: c(s.canManageUsers)
405
+ canView: a(s.canView),
406
+ canEdit: a(s.canEdit),
407
+ canDelete: a(s.canDelete),
408
+ canAdmin: a(s.canAdmin),
409
+ canViewSensitiveData: a(s.canViewSensitiveData),
410
+ canExportData: a(s.canExportData),
411
+ canManageUsers: a(s.canManageUsers)
290
412
  };
291
413
  }
292
- function _r() {
293
- const t = se(), [r, s] = R([]), [i, c] = R(0), [p, n] = R([]), [m, l] = R(!0), [y, f] = R(null), h = C(async () => {
414
+ function Sr() {
415
+ const t = ae(), [r, s] = R([]), [i, a] = R(0), [d, n] = R([]), [p, l] = R(!0), [v, c] = R(null), g = C(async () => {
294
416
  if (!t.isAuthenticated) {
295
417
  console.debug("[useFeatures] Not authenticated"), l(!1);
296
418
  return;
297
419
  }
298
- l(!0), f(null);
420
+ l(!0), c(null);
299
421
  try {
300
- const v = {
422
+ const y = {
301
423
  "Content-Type": "application/json"
302
424
  }, N = t.user?.access_token;
303
- N && (v.Authorization = `Bearer ${N}`);
304
- const T = await fetch("/api/features", { headers: v });
425
+ N && (y.Authorization = `Bearer ${N}`);
426
+ const T = await fetch("/api/features", { headers: y });
305
427
  if (!T.ok)
306
428
  throw new Error(`HTTP ${T.status}: ${T.statusText}`);
307
429
  const x = await T.json();
308
- s(x.features || []), c(x.totalCount || 0), n(x.userRoles || []);
309
- } catch (v) {
310
- console.debug("Features fetch error:", v), f(v instanceof Error ? v.message : String(v)), s([]), n([]);
430
+ s(x.features || []), a(x.totalCount || 0), n(x.userRoles || []);
431
+ } catch (y) {
432
+ console.debug("Features fetch error:", y), c(y instanceof Error ? y.message : String(y)), s([]), n([]);
311
433
  } finally {
312
434
  l(!1);
313
435
  }
314
436
  }, [t.isAuthenticated, t.user?.access_token]);
315
- B(() => {
316
- h();
317
- }, [h]);
318
- const u = C(
319
- (v) => r.find((T) => T.name === v)?.userEnabled ?? !1,
437
+ U(() => {
438
+ g();
439
+ }, [g]);
440
+ const f = C(
441
+ (y) => r.find((T) => T.name === y)?.userEnabled ?? !1,
320
442
  [r]
321
443
  ), E = C(
322
- (v) => r.filter((N) => N.mfDependencies?.includes(v)),
444
+ (y) => r.filter((N) => N.mfDependencies?.includes(y)),
323
445
  [r]
324
446
  );
325
447
  return {
326
448
  features: r,
327
449
  totalCount: i,
328
- userRoles: p,
329
- isLoading: m,
330
- error: y,
331
- refetch: h,
332
- isFeatureEnabled: u,
450
+ userRoles: d,
451
+ isLoading: p,
452
+ error: v,
453
+ refetch: g,
454
+ isFeatureEnabled: f,
333
455
  getFeaturesByMf: E
334
456
  };
335
457
  }
336
- function vr() {
337
- const t = se(), [r, s] = R([]), [i, c] = R([]), [p, n] = R(!1), [m, l] = R(!0), [y, f] = R(null), h = C(async () => {
458
+ function Rr() {
459
+ const t = ae(), [r, s] = R([]), [i, a] = R([]), [d, n] = R(!1), [p, l] = R(!0), [v, c] = R(null), g = C(async () => {
338
460
  if (!t.isAuthenticated) {
339
461
  console.debug("[useFeatureAdmin] Not authenticated"), l(!1);
340
462
  return;
341
463
  }
342
- l(!0), f(null);
464
+ l(!0), c(null);
343
465
  try {
344
466
  const T = {
345
467
  "Content-Type": "application/json"
@@ -348,19 +470,19 @@ function vr() {
348
470
  const _ = await fetch("/api/features/admin", { headers: T });
349
471
  if (!_.ok) {
350
472
  if (_.status === 403) {
351
- console.warn("[useFeatureAdmin] 403 Forbidden - checking if token has admin role"), n(!1), s([]), c([]), l(!1);
473
+ console.warn("[useFeatureAdmin] 403 Forbidden - checking if token has admin role"), n(!1), s([]), a([]), l(!1);
352
474
  return;
353
475
  }
354
476
  throw new Error(`HTTP ${_.status}: ${_.statusText}`);
355
477
  }
356
478
  const k = await _.json();
357
- s(k.featureToggles || []), c(k.microfrontends || []), n(k.isAdmin || !1);
479
+ s(k.featureToggles || []), a(k.microfrontends || []), n(k.isAdmin || !1);
358
480
  } catch (T) {
359
- console.debug("FeatureAdmin fetch error:", T), s([]), c([]), n(!1);
481
+ console.debug("FeatureAdmin fetch error:", T), s([]), a([]), n(!1);
360
482
  } finally {
361
483
  l(!1);
362
484
  }
363
- }, [t.isAuthenticated, t.user?.access_token]), u = C(
485
+ }, [t.isAuthenticated, t.user?.access_token]), f = C(
364
486
  async (T) => {
365
487
  try {
366
488
  const x = {
@@ -376,12 +498,12 @@ function vr() {
376
498
  const j = await k.json().catch(() => ({}));
377
499
  throw new Error(j.error || `HTTP ${k.status}`);
378
500
  }
379
- return await h(), !0;
501
+ return await g(), !0;
380
502
  } catch (x) {
381
- return f(x instanceof Error ? x.message : String(x)), !1;
503
+ return c(x instanceof Error ? x.message : String(x)), !1;
382
504
  }
383
505
  },
384
- [h]
506
+ [g]
385
507
  ), E = C(
386
508
  async (T, x) => {
387
509
  try {
@@ -395,16 +517,16 @@ function vr() {
395
517
  body: JSON.stringify(x)
396
518
  });
397
519
  if (!j.ok) {
398
- const O = await j.json().catch(() => ({}));
399
- throw new Error(O.error || `HTTP ${j.status}`);
520
+ const P = await j.json().catch(() => ({}));
521
+ throw new Error(P.error || `HTTP ${j.status}`);
400
522
  }
401
- return await h(), !0;
523
+ return await g(), !0;
402
524
  } catch (_) {
403
- return f(_ instanceof Error ? _.message : String(_)), !1;
525
+ return c(_ instanceof Error ? _.message : String(_)), !1;
404
526
  }
405
527
  },
406
- [h]
407
- ), v = C(
528
+ [g]
529
+ ), y = C(
408
530
  async (T, x) => {
409
531
  try {
410
532
  const _ = {}, k = t.user?.access_token;
@@ -417,15 +539,15 @@ function vr() {
417
539
  }
418
540
  );
419
541
  if (!j.ok) {
420
- const O = await j.json().catch(() => ({}));
421
- throw new Error(O.error || `HTTP ${j.status}`);
542
+ const P = await j.json().catch(() => ({}));
543
+ throw new Error(P.error || `HTTP ${j.status}`);
422
544
  }
423
- return await h(), !0;
545
+ return await g(), !0;
424
546
  } catch (_) {
425
- return f(_ instanceof Error ? _.message : String(_)), !1;
547
+ return c(_ instanceof Error ? _.message : String(_)), !1;
426
548
  }
427
549
  },
428
- [h]
550
+ [g]
429
551
  ), N = C(
430
552
  async (T) => {
431
553
  try {
@@ -439,125 +561,125 @@ function vr() {
439
561
  const j = await k.json().catch(() => ({}));
440
562
  throw new Error(j.error || `HTTP ${k.status}`);
441
563
  }
442
- return await h(), !0;
564
+ return await g(), !0;
443
565
  } catch (x) {
444
- return f(x instanceof Error ? x.message : String(x)), !1;
566
+ return c(x instanceof Error ? x.message : String(x)), !1;
445
567
  }
446
568
  },
447
- [h]
569
+ [g]
448
570
  );
449
- return B(() => {
450
- h();
451
- }, [h]), {
571
+ return U(() => {
572
+ g();
573
+ }, [g]), {
452
574
  features: r,
453
575
  microfrontends: i,
454
- isAdmin: p,
455
- isLoading: m,
456
- error: y,
457
- refetch: h,
458
- createFeature: u,
576
+ isAdmin: d,
577
+ isLoading: p,
578
+ error: v,
579
+ refetch: g,
580
+ createFeature: f,
459
581
  updateFeature: E,
460
- toggleFeature: v,
582
+ toggleFeature: y,
461
583
  deleteFeature: N
462
584
  };
463
585
  }
464
- function yr() {
465
- const t = se(), [r, s] = R([]), [i, c] = R(0), [p, n] = R(!0), [m, l] = R(null), y = C(async () => {
586
+ function Tr() {
587
+ const t = ae(), [r, s] = R([]), [i, a] = R(0), [d, n] = R(!0), [p, l] = R(null), v = C(async () => {
466
588
  if (!t.isAuthenticated) {
467
589
  n(!1);
468
590
  return;
469
591
  }
470
592
  n(!0), l(null);
471
593
  try {
472
- const f = {
594
+ const c = {
473
595
  "Content-Type": "application/json"
474
- }, h = t.user?.access_token;
475
- h && (f.Authorization = `Bearer ${h}`);
476
- const u = await fetch("/api/features/microfrontends", { headers: f });
477
- if (!u.ok)
478
- throw new Error(`HTTP ${u.status}: ${u.statusText}`);
479
- const E = await u.json();
480
- s(E.microfrontends || []), c(E.totalCount || 0);
481
- } catch (f) {
482
- l(f instanceof Error ? f.message : String(f));
596
+ }, g = t.user?.access_token;
597
+ g && (c.Authorization = `Bearer ${g}`);
598
+ const f = await fetch("/api/features/microfrontends", { headers: c });
599
+ if (!f.ok)
600
+ throw new Error(`HTTP ${f.status}: ${f.statusText}`);
601
+ const E = await f.json();
602
+ s(E.microfrontends || []), a(E.totalCount || 0);
603
+ } catch (c) {
604
+ l(c instanceof Error ? c.message : String(c));
483
605
  } finally {
484
606
  n(!1);
485
607
  }
486
608
  }, [t.isAuthenticated, t.user?.access_token]);
487
- return B(() => {
488
- y();
489
- }, [y]), {
609
+ return U(() => {
610
+ v();
611
+ }, [v]), {
490
612
  microfrontends: r,
491
613
  totalCount: i,
492
- isLoading: p,
493
- error: m,
494
- refetch: y
614
+ isLoading: d,
615
+ error: p,
616
+ refetch: v
495
617
  };
496
618
  }
497
- var re = { exports: {} }, q = {};
498
- var Ke;
499
- function qt() {
500
- if (Ke) return q;
501
- Ke = 1;
502
- var t = Qe, r = /* @__PURE__ */ Symbol.for("react.element"), s = /* @__PURE__ */ Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, c = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
503
- function n(m, l, y) {
504
- var f, h = {}, u = null, E = null;
505
- y !== void 0 && (u = "" + y), l.key !== void 0 && (u = "" + l.key), l.ref !== void 0 && (E = l.ref);
506
- for (f in l) i.call(l, f) && !p.hasOwnProperty(f) && (h[f] = l[f]);
507
- if (m && m.defaultProps) for (f in l = m.defaultProps, l) h[f] === void 0 && (h[f] = l[f]);
508
- return { $$typeof: r, type: m, key: u, ref: E, props: h, _owner: c.current };
619
+ var oe = { exports: {} }, K = {};
620
+ var Xe;
621
+ function rr() {
622
+ if (Xe) return K;
623
+ Xe = 1;
624
+ var t = et, r = /* @__PURE__ */ Symbol.for("react.element"), s = /* @__PURE__ */ Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
625
+ function n(p, l, v) {
626
+ var c, g = {}, f = null, E = null;
627
+ v !== void 0 && (f = "" + v), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (E = l.ref);
628
+ for (c in l) i.call(l, c) && !d.hasOwnProperty(c) && (g[c] = l[c]);
629
+ if (p && p.defaultProps) for (c in l = p.defaultProps, l) g[c] === void 0 && (g[c] = l[c]);
630
+ return { $$typeof: r, type: p, key: f, ref: E, props: g, _owner: a.current };
509
631
  }
510
- return q.Fragment = s, q.jsx = n, q.jsxs = n, q;
632
+ return K.Fragment = s, K.jsx = n, K.jsxs = n, K;
511
633
  }
512
- var K = {};
513
- var Xe;
514
- function Kt() {
515
- return Xe || (Xe = 1, process.env.NODE_ENV !== "production" && (function() {
516
- var t = Qe, r = /* @__PURE__ */ Symbol.for("react.element"), s = /* @__PURE__ */ Symbol.for("react.portal"), i = /* @__PURE__ */ Symbol.for("react.fragment"), c = /* @__PURE__ */ Symbol.for("react.strict_mode"), p = /* @__PURE__ */ Symbol.for("react.profiler"), n = /* @__PURE__ */ Symbol.for("react.provider"), m = /* @__PURE__ */ Symbol.for("react.context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), y = /* @__PURE__ */ Symbol.for("react.suspense"), f = /* @__PURE__ */ Symbol.for("react.suspense_list"), h = /* @__PURE__ */ Symbol.for("react.memo"), u = /* @__PURE__ */ Symbol.for("react.lazy"), E = /* @__PURE__ */ Symbol.for("react.offscreen"), v = Symbol.iterator, N = "@@iterator";
634
+ var X = {};
635
+ var Ze;
636
+ function nr() {
637
+ return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && (function() {
638
+ var t = et, r = /* @__PURE__ */ Symbol.for("react.element"), s = /* @__PURE__ */ Symbol.for("react.portal"), i = /* @__PURE__ */ Symbol.for("react.fragment"), a = /* @__PURE__ */ Symbol.for("react.strict_mode"), d = /* @__PURE__ */ Symbol.for("react.profiler"), n = /* @__PURE__ */ Symbol.for("react.provider"), p = /* @__PURE__ */ Symbol.for("react.context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), v = /* @__PURE__ */ Symbol.for("react.suspense"), c = /* @__PURE__ */ Symbol.for("react.suspense_list"), g = /* @__PURE__ */ Symbol.for("react.memo"), f = /* @__PURE__ */ Symbol.for("react.lazy"), E = /* @__PURE__ */ Symbol.for("react.offscreen"), y = Symbol.iterator, N = "@@iterator";
517
639
  function T(e) {
518
640
  if (e === null || typeof e != "object")
519
641
  return null;
520
- var o = v && e[v] || e[N];
642
+ var o = y && e[y] || e[N];
521
643
  return typeof o == "function" ? o : null;
522
644
  }
523
645
  var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
524
646
  function _(e) {
525
647
  {
526
- for (var o = arguments.length, a = new Array(o > 1 ? o - 1 : 0), d = 1; d < o; d++)
527
- a[d - 1] = arguments[d];
528
- k("error", e, a);
648
+ for (var o = arguments.length, u = new Array(o > 1 ? o - 1 : 0), h = 1; h < o; h++)
649
+ u[h - 1] = arguments[h];
650
+ k("error", e, u);
529
651
  }
530
652
  }
531
- function k(e, o, a) {
653
+ function k(e, o, u) {
532
654
  {
533
- var d = x.ReactDebugCurrentFrame, A = d.getStackAddendum();
534
- A !== "" && (o += "%s", a = a.concat([A]));
535
- var S = a.map(function(b) {
655
+ var h = x.ReactDebugCurrentFrame, A = h.getStackAddendum();
656
+ A !== "" && (o += "%s", u = u.concat([A]));
657
+ var S = u.map(function(b) {
536
658
  return String(b);
537
659
  });
538
660
  S.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, S);
539
661
  }
540
662
  }
541
- var j = !1, O = !1, L = !1, it = !1, ut = !1, be;
542
- be = /* @__PURE__ */ Symbol.for("react.module.reference");
543
- function ct(e) {
544
- return !!(typeof e == "string" || typeof e == "function" || e === i || e === p || ut || e === c || e === y || e === f || it || e === E || j || O || L || typeof e == "object" && e !== null && (e.$$typeof === u || e.$$typeof === h || e.$$typeof === n || e.$$typeof === m || e.$$typeof === l || // This needs to include all possible module reference object
663
+ var j = !1, P = !1, L = !1, ut = !1, ct = !1, Ae;
664
+ Ae = /* @__PURE__ */ Symbol.for("react.module.reference");
665
+ function lt(e) {
666
+ return !!(typeof e == "string" || typeof e == "function" || e === i || e === d || ct || e === a || e === v || e === c || ut || e === E || j || P || L || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === g || e.$$typeof === n || e.$$typeof === p || e.$$typeof === l || // This needs to include all possible module reference object
545
667
  // types supported by any Flight configuration anywhere since
546
668
  // we don't know which Flight build this will end up being used
547
669
  // with.
548
- e.$$typeof === be || e.getModuleId !== void 0));
670
+ e.$$typeof === Ae || e.getModuleId !== void 0));
549
671
  }
550
- function lt(e, o, a) {
551
- var d = e.displayName;
552
- if (d)
553
- return d;
672
+ function ft(e, o, u) {
673
+ var h = e.displayName;
674
+ if (h)
675
+ return h;
554
676
  var A = o.displayName || o.name || "";
555
- return A !== "" ? a + "(" + A + ")" : a;
677
+ return A !== "" ? u + "(" + A + ")" : u;
556
678
  }
557
- function xe(e) {
679
+ function Se(e) {
558
680
  return e.displayName || "Context";
559
681
  }
560
- function U(e) {
682
+ function V(e) {
561
683
  if (e == null)
562
684
  return null;
563
685
  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")
@@ -569,32 +691,32 @@ function Kt() {
569
691
  return "Fragment";
570
692
  case s:
571
693
  return "Portal";
572
- case p:
694
+ case d:
573
695
  return "Profiler";
574
- case c:
696
+ case a:
575
697
  return "StrictMode";
576
- case y:
698
+ case v:
577
699
  return "Suspense";
578
- case f:
700
+ case c:
579
701
  return "SuspenseList";
580
702
  }
581
703
  if (typeof e == "object")
582
704
  switch (e.$$typeof) {
583
- case m:
705
+ case p:
584
706
  var o = e;
585
- return xe(o) + ".Consumer";
707
+ return Se(o) + ".Consumer";
586
708
  case n:
587
- var a = e;
588
- return xe(a._context) + ".Provider";
709
+ var u = e;
710
+ return Se(u._context) + ".Provider";
589
711
  case l:
590
- return lt(e, e.render, "ForwardRef");
591
- case h:
592
- var d = e.displayName || null;
593
- return d !== null ? d : U(e.type) || "Memo";
594
- case u: {
712
+ return ft(e, e.render, "ForwardRef");
713
+ case g:
714
+ var h = e.displayName || null;
715
+ return h !== null ? h : V(e.type) || "Memo";
716
+ case f: {
595
717
  var A = e, S = A._payload, b = A._init;
596
718
  try {
597
- return U(b(S));
719
+ return V(b(S));
598
720
  } catch {
599
721
  return null;
600
722
  }
@@ -602,18 +724,18 @@ function Kt() {
602
724
  }
603
725
  return null;
604
726
  }
605
- var W = Object.assign, Y = 0, Ae, Se, Re, Te, Ce, ke, Me;
606
- function Ie() {
727
+ var z = Object.assign, q = 0, Re, Te, Ce, ke, Me, Ie, Ne;
728
+ function je() {
607
729
  }
608
- Ie.__reactDisabledLog = !0;
609
- function ft() {
730
+ je.__reactDisabledLog = !0;
731
+ function dt() {
610
732
  {
611
- if (Y === 0) {
612
- Ae = console.log, Se = console.info, Re = console.warn, Te = console.error, Ce = console.group, ke = console.groupCollapsed, Me = console.groupEnd;
733
+ if (q === 0) {
734
+ Re = console.log, Te = console.info, Ce = console.warn, ke = console.error, Me = console.group, Ie = console.groupCollapsed, Ne = console.groupEnd;
613
735
  var e = {
614
736
  configurable: !0,
615
737
  enumerable: !0,
616
- value: Ie,
738
+ value: je,
617
739
  writable: !0
618
740
  };
619
741
  Object.defineProperties(console, {
@@ -626,77 +748,77 @@ function Kt() {
626
748
  groupEnd: e
627
749
  });
628
750
  }
629
- Y++;
751
+ q++;
630
752
  }
631
753
  }
632
- function dt() {
754
+ function pt() {
633
755
  {
634
- if (Y--, Y === 0) {
756
+ if (q--, q === 0) {
635
757
  var e = {
636
758
  configurable: !0,
637
759
  enumerable: !0,
638
760
  writable: !0
639
761
  };
640
762
  Object.defineProperties(console, {
641
- log: W({}, e, {
642
- value: Ae
643
- }),
644
- info: W({}, e, {
645
- value: Se
646
- }),
647
- warn: W({}, e, {
763
+ log: z({}, e, {
648
764
  value: Re
649
765
  }),
650
- error: W({}, e, {
766
+ info: z({}, e, {
651
767
  value: Te
652
768
  }),
653
- group: W({}, e, {
769
+ warn: z({}, e, {
654
770
  value: Ce
655
771
  }),
656
- groupCollapsed: W({}, e, {
772
+ error: z({}, e, {
657
773
  value: ke
658
774
  }),
659
- groupEnd: W({}, e, {
775
+ group: z({}, e, {
660
776
  value: Me
777
+ }),
778
+ groupCollapsed: z({}, e, {
779
+ value: Ie
780
+ }),
781
+ groupEnd: z({}, e, {
782
+ value: Ne
661
783
  })
662
784
  });
663
785
  }
664
- Y < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
786
+ q < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
665
787
  }
666
788
  }
667
- var ue = x.ReactCurrentDispatcher, ce;
668
- function X(e, o, a) {
789
+ var ce = x.ReactCurrentDispatcher, le;
790
+ function Z(e, o, u) {
669
791
  {
670
- if (ce === void 0)
792
+ if (le === void 0)
671
793
  try {
672
794
  throw Error();
673
795
  } catch (A) {
674
- var d = A.stack.trim().match(/\n( *(at )?)/);
675
- ce = d && d[1] || "";
796
+ var h = A.stack.trim().match(/\n( *(at )?)/);
797
+ le = h && h[1] || "";
676
798
  }
677
799
  return `
678
- ` + ce + e;
800
+ ` + le + e;
679
801
  }
680
802
  }
681
- var le = !1, Z;
803
+ var fe = !1, Q;
682
804
  {
683
- var pt = typeof WeakMap == "function" ? WeakMap : Map;
684
- Z = new pt();
805
+ var ht = typeof WeakMap == "function" ? WeakMap : Map;
806
+ Q = new ht();
685
807
  }
686
- function Ne(e, o) {
687
- if (!e || le)
808
+ function Pe(e, o) {
809
+ if (!e || fe)
688
810
  return "";
689
811
  {
690
- var a = Z.get(e);
691
- if (a !== void 0)
692
- return a;
812
+ var u = Q.get(e);
813
+ if (u !== void 0)
814
+ return u;
693
815
  }
694
- var d;
695
- le = !0;
816
+ var h;
817
+ fe = !0;
696
818
  var A = Error.prepareStackTrace;
697
819
  Error.prepareStackTrace = void 0;
698
820
  var S;
699
- S = ue.current, ue.current = null, ft();
821
+ S = ce.current, ce.current = null, dt();
700
822
  try {
701
823
  if (o) {
702
824
  var b = function() {
@@ -710,14 +832,14 @@ function Kt() {
710
832
  try {
711
833
  Reflect.construct(b, []);
712
834
  } catch (F) {
713
- d = F;
835
+ h = F;
714
836
  }
715
837
  Reflect.construct(e, [], b);
716
838
  } else {
717
839
  try {
718
840
  b.call();
719
841
  } catch (F) {
720
- d = F;
842
+ h = F;
721
843
  }
722
844
  e.call(b.prototype);
723
845
  }
@@ -725,80 +847,80 @@ function Kt() {
725
847
  try {
726
848
  throw Error();
727
849
  } catch (F) {
728
- d = F;
850
+ h = F;
729
851
  }
730
852
  e();
731
853
  }
732
854
  } catch (F) {
733
- if (F && d && typeof F.stack == "string") {
855
+ if (F && h && typeof F.stack == "string") {
734
856
  for (var w = F.stack.split(`
735
- `), P = d.stack.split(`
736
- `), M = w.length - 1, I = P.length - 1; M >= 1 && I >= 0 && w[M] !== P[I]; )
857
+ `), O = h.stack.split(`
858
+ `), M = w.length - 1, I = O.length - 1; M >= 1 && I >= 0 && w[M] !== O[I]; )
737
859
  I--;
738
860
  for (; M >= 1 && I >= 0; M--, I--)
739
- if (w[M] !== P[I]) {
861
+ if (w[M] !== O[I]) {
740
862
  if (M !== 1 || I !== 1)
741
863
  do
742
- if (M--, I--, I < 0 || w[M] !== P[I]) {
864
+ if (M--, I--, I < 0 || w[M] !== O[I]) {
743
865
  var D = `
744
866
  ` + w[M].replace(" at new ", " at ");
745
- return e.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, D), D;
867
+ return e.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, D), D;
746
868
  }
747
869
  while (M >= 1 && I >= 0);
748
870
  break;
749
871
  }
750
872
  }
751
873
  } finally {
752
- le = !1, ue.current = S, dt(), Error.prepareStackTrace = A;
874
+ fe = !1, ce.current = S, pt(), Error.prepareStackTrace = A;
753
875
  }
754
- var G = e ? e.displayName || e.name : "", z = G ? X(G) : "";
755
- return typeof e == "function" && Z.set(e, z), z;
876
+ var Y = e ? e.displayName || e.name : "", H = Y ? Z(Y) : "";
877
+ return typeof e == "function" && Q.set(e, H), H;
756
878
  }
757
- function ht(e, o, a) {
758
- return Ne(e, !1);
879
+ function gt(e, o, u) {
880
+ return Pe(e, !1);
759
881
  }
760
- function gt(e) {
882
+ function mt(e) {
761
883
  var o = e.prototype;
762
884
  return !!(o && o.isReactComponent);
763
885
  }
764
- function Q(e, o, a) {
886
+ function ee(e, o, u) {
765
887
  if (e == null)
766
888
  return "";
767
889
  if (typeof e == "function")
768
- return Ne(e, gt(e));
890
+ return Pe(e, mt(e));
769
891
  if (typeof e == "string")
770
- return X(e);
892
+ return Z(e);
771
893
  switch (e) {
772
- case y:
773
- return X("Suspense");
774
- case f:
775
- return X("SuspenseList");
894
+ case v:
895
+ return Z("Suspense");
896
+ case c:
897
+ return Z("SuspenseList");
776
898
  }
777
899
  if (typeof e == "object")
778
900
  switch (e.$$typeof) {
779
901
  case l:
780
- return ht(e.render);
781
- case h:
782
- return Q(e.type, o, a);
783
- case u: {
784
- var d = e, A = d._payload, S = d._init;
902
+ return gt(e.render);
903
+ case g:
904
+ return ee(e.type, o, u);
905
+ case f: {
906
+ var h = e, A = h._payload, S = h._init;
785
907
  try {
786
- return Q(S(A), o, a);
908
+ return ee(S(A), o, u);
787
909
  } catch {
788
910
  }
789
911
  }
790
912
  }
791
913
  return "";
792
914
  }
793
- var J = Object.prototype.hasOwnProperty, je = {}, Oe = x.ReactDebugCurrentFrame;
794
- function ee(e) {
915
+ var J = Object.prototype.hasOwnProperty, Oe = {}, Fe = x.ReactDebugCurrentFrame;
916
+ function te(e) {
795
917
  if (e) {
796
- var o = e._owner, a = Q(e.type, e._source, o ? o.type : null);
797
- Oe.setExtraStackFrame(a);
918
+ var o = e._owner, u = ee(e.type, e._source, o ? o.type : null);
919
+ Fe.setExtraStackFrame(u);
798
920
  } else
799
- Oe.setExtraStackFrame(null);
921
+ Fe.setExtraStackFrame(null);
800
922
  }
801
- function mt(e, o, a, d, A) {
923
+ function _t(e, o, u, h, A) {
802
924
  {
803
925
  var S = Function.call.bind(J);
804
926
  for (var b in e)
@@ -806,48 +928,48 @@ function Kt() {
806
928
  var w = void 0;
807
929
  try {
808
930
  if (typeof e[b] != "function") {
809
- var P = Error((d || "React class") + ": " + a + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
810
- throw P.name = "Invariant Violation", P;
931
+ var O = Error((h || "React class") + ": " + u + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
932
+ throw O.name = "Invariant Violation", O;
811
933
  }
812
- w = e[b](o, b, d, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
934
+ w = e[b](o, b, h, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
813
935
  } catch (M) {
814
936
  w = M;
815
937
  }
816
- w && !(w instanceof Error) && (ee(A), _("%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).", d || "React class", a, b, typeof w), ee(null)), w instanceof Error && !(w.message in je) && (je[w.message] = !0, ee(A), _("Failed %s type: %s", a, w.message), ee(null));
938
+ w && !(w instanceof Error) && (te(A), _("%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).", h || "React class", u, b, typeof w), te(null)), w instanceof Error && !(w.message in Oe) && (Oe[w.message] = !0, te(A), _("Failed %s type: %s", u, w.message), te(null));
817
939
  }
818
940
  }
819
941
  }
820
- var _t = Array.isArray;
821
- function fe(e) {
822
- return _t(e);
942
+ var vt = Array.isArray;
943
+ function de(e) {
944
+ return vt(e);
823
945
  }
824
- function vt(e) {
946
+ function yt(e) {
825
947
  {
826
- var o = typeof Symbol == "function" && Symbol.toStringTag, a = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
827
- return a;
948
+ var o = typeof Symbol == "function" && Symbol.toStringTag, u = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
949
+ return u;
828
950
  }
829
951
  }
830
- function yt(e) {
952
+ function Et(e) {
831
953
  try {
832
- return Pe(e), !1;
954
+ return De(e), !1;
833
955
  } catch {
834
956
  return !0;
835
957
  }
836
958
  }
837
- function Pe(e) {
959
+ function De(e) {
838
960
  return "" + e;
839
961
  }
840
- function Fe(e) {
841
- if (yt(e))
842
- return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(e)), Pe(e);
962
+ function $e(e) {
963
+ if (Et(e))
964
+ return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", yt(e)), De(e);
843
965
  }
844
- var De = x.ReactCurrentOwner, Et = {
966
+ var Le = x.ReactCurrentOwner, wt = {
845
967
  key: !0,
846
968
  ref: !0,
847
969
  __self: !0,
848
970
  __source: !0
849
- }, $e, Le;
850
- function wt(e) {
971
+ }, Ue, Ve;
972
+ function bt(e) {
851
973
  if (J.call(e, "ref")) {
852
974
  var o = Object.getOwnPropertyDescriptor(e, "ref").get;
853
975
  if (o && o.isReactWarning)
@@ -855,7 +977,7 @@ function Kt() {
855
977
  }
856
978
  return e.ref !== void 0;
857
979
  }
858
- function bt(e) {
980
+ function xt(e) {
859
981
  if (J.call(e, "key")) {
860
982
  var o = Object.getOwnPropertyDescriptor(e, "key").get;
861
983
  if (o && o.isReactWarning)
@@ -863,39 +985,39 @@ function Kt() {
863
985
  }
864
986
  return e.key !== void 0;
865
987
  }
866
- function xt(e, o) {
867
- typeof e.ref == "string" && De.current;
868
- }
869
988
  function At(e, o) {
989
+ typeof e.ref == "string" && Le.current;
990
+ }
991
+ function St(e, o) {
870
992
  {
871
- var a = function() {
872
- $e || ($e = !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)", o));
993
+ var u = function() {
994
+ Ue || (Ue = !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)", o));
873
995
  };
874
- a.isReactWarning = !0, Object.defineProperty(e, "key", {
875
- get: a,
996
+ u.isReactWarning = !0, Object.defineProperty(e, "key", {
997
+ get: u,
876
998
  configurable: !0
877
999
  });
878
1000
  }
879
1001
  }
880
- function St(e, o) {
1002
+ function Rt(e, o) {
881
1003
  {
882
- var a = function() {
883
- Le || (Le = !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)", o));
1004
+ var u = function() {
1005
+ Ve || (Ve = !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)", o));
884
1006
  };
885
- a.isReactWarning = !0, Object.defineProperty(e, "ref", {
886
- get: a,
1007
+ u.isReactWarning = !0, Object.defineProperty(e, "ref", {
1008
+ get: u,
887
1009
  configurable: !0
888
1010
  });
889
1011
  }
890
1012
  }
891
- var Rt = function(e, o, a, d, A, S, b) {
1013
+ var Tt = function(e, o, u, h, A, S, b) {
892
1014
  var w = {
893
1015
  // This tag allows us to uniquely identify this as a React Element
894
1016
  $$typeof: r,
895
1017
  // Built-in properties that belong on the element
896
1018
  type: e,
897
1019
  key: o,
898
- ref: a,
1020
+ ref: u,
899
1021
  props: b,
900
1022
  // Record the component responsible for creating this element.
901
1023
  _owner: S
@@ -909,7 +1031,7 @@ function Kt() {
909
1031
  configurable: !1,
910
1032
  enumerable: !1,
911
1033
  writable: !1,
912
- value: d
1034
+ value: h
913
1035
  }), Object.defineProperty(w, "_source", {
914
1036
  configurable: !1,
915
1037
  enumerable: !1,
@@ -917,41 +1039,41 @@ function Kt() {
917
1039
  value: A
918
1040
  }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
919
1041
  };
920
- function Tt(e, o, a, d, A) {
1042
+ function Ct(e, o, u, h, A) {
921
1043
  {
922
- var S, b = {}, w = null, P = null;
923
- a !== void 0 && (Fe(a), w = "" + a), bt(o) && (Fe(o.key), w = "" + o.key), wt(o) && (P = o.ref, xt(o, A));
1044
+ var S, b = {}, w = null, O = null;
1045
+ u !== void 0 && ($e(u), w = "" + u), xt(o) && ($e(o.key), w = "" + o.key), bt(o) && (O = o.ref, At(o, A));
924
1046
  for (S in o)
925
- J.call(o, S) && !Et.hasOwnProperty(S) && (b[S] = o[S]);
1047
+ J.call(o, S) && !wt.hasOwnProperty(S) && (b[S] = o[S]);
926
1048
  if (e && e.defaultProps) {
927
1049
  var M = e.defaultProps;
928
1050
  for (S in M)
929
1051
  b[S] === void 0 && (b[S] = M[S]);
930
1052
  }
931
- if (w || P) {
1053
+ if (w || O) {
932
1054
  var I = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
933
- w && At(b, I), P && St(b, I);
1055
+ w && St(b, I), O && Rt(b, I);
934
1056
  }
935
- return Rt(e, w, P, A, d, De.current, b);
1057
+ return Tt(e, w, O, A, h, Le.current, b);
936
1058
  }
937
1059
  }
938
- var de = x.ReactCurrentOwner, Ue = x.ReactDebugCurrentFrame;
939
- function H(e) {
1060
+ var pe = x.ReactCurrentOwner, Be = x.ReactDebugCurrentFrame;
1061
+ function G(e) {
940
1062
  if (e) {
941
- var o = e._owner, a = Q(e.type, e._source, o ? o.type : null);
942
- Ue.setExtraStackFrame(a);
1063
+ var o = e._owner, u = ee(e.type, e._source, o ? o.type : null);
1064
+ Be.setExtraStackFrame(u);
943
1065
  } else
944
- Ue.setExtraStackFrame(null);
1066
+ Be.setExtraStackFrame(null);
945
1067
  }
946
- var pe;
947
- pe = !1;
948
- function he(e) {
1068
+ var he;
1069
+ he = !1;
1070
+ function ge(e) {
949
1071
  return typeof e == "object" && e !== null && e.$$typeof === r;
950
1072
  }
951
- function Ve() {
1073
+ function We() {
952
1074
  {
953
- if (de.current) {
954
- var e = U(de.current.type);
1075
+ if (pe.current) {
1076
+ var e = V(pe.current.type);
955
1077
  if (e)
956
1078
  return `
957
1079
 
@@ -960,161 +1082,161 @@ Check the render method of \`` + e + "`.";
960
1082
  return "";
961
1083
  }
962
1084
  }
963
- function Ct(e) {
1085
+ function kt(e) {
964
1086
  return "";
965
1087
  }
966
- var Be = {};
967
- function kt(e) {
1088
+ var ze = {};
1089
+ function Mt(e) {
968
1090
  {
969
- var o = Ve();
1091
+ var o = We();
970
1092
  if (!o) {
971
- var a = typeof e == "string" ? e : e.displayName || e.name;
972
- a && (o = `
1093
+ var u = typeof e == "string" ? e : e.displayName || e.name;
1094
+ u && (o = `
973
1095
 
974
- Check the top-level render call using <` + a + ">.");
1096
+ Check the top-level render call using <` + u + ">.");
975
1097
  }
976
1098
  return o;
977
1099
  }
978
1100
  }
979
- function We(e, o) {
1101
+ function He(e, o) {
980
1102
  {
981
1103
  if (!e._store || e._store.validated || e.key != null)
982
1104
  return;
983
1105
  e._store.validated = !0;
984
- var a = kt(o);
985
- if (Be[a])
1106
+ var u = Mt(o);
1107
+ if (ze[u])
986
1108
  return;
987
- Be[a] = !0;
988
- var d = "";
989
- e && e._owner && e._owner !== de.current && (d = " It was passed a child from " + U(e._owner.type) + "."), H(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, d), H(null);
1109
+ ze[u] = !0;
1110
+ var h = "";
1111
+ e && e._owner && e._owner !== pe.current && (h = " It was passed a child from " + V(e._owner.type) + "."), G(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, h), G(null);
990
1112
  }
991
1113
  }
992
- function ze(e, o) {
1114
+ function Ge(e, o) {
993
1115
  {
994
1116
  if (typeof e != "object")
995
1117
  return;
996
- if (fe(e))
997
- for (var a = 0; a < e.length; a++) {
998
- var d = e[a];
999
- he(d) && We(d, o);
1118
+ if (de(e))
1119
+ for (var u = 0; u < e.length; u++) {
1120
+ var h = e[u];
1121
+ ge(h) && He(h, o);
1000
1122
  }
1001
- else if (he(e))
1123
+ else if (ge(e))
1002
1124
  e._store && (e._store.validated = !0);
1003
1125
  else if (e) {
1004
1126
  var A = T(e);
1005
1127
  if (typeof A == "function" && A !== e.entries)
1006
1128
  for (var S = A.call(e), b; !(b = S.next()).done; )
1007
- he(b.value) && We(b.value, o);
1129
+ ge(b.value) && He(b.value, o);
1008
1130
  }
1009
1131
  }
1010
1132
  }
1011
- function Mt(e) {
1133
+ function It(e) {
1012
1134
  {
1013
1135
  var o = e.type;
1014
1136
  if (o == null || typeof o == "string")
1015
1137
  return;
1016
- var a;
1138
+ var u;
1017
1139
  if (typeof o == "function")
1018
- a = o.propTypes;
1140
+ u = o.propTypes;
1019
1141
  else if (typeof o == "object" && (o.$$typeof === l || // Note: Memo only checks outer props here.
1020
1142
  // Inner props are checked in the reconciler.
1021
- o.$$typeof === h))
1022
- a = o.propTypes;
1143
+ o.$$typeof === g))
1144
+ u = o.propTypes;
1023
1145
  else
1024
1146
  return;
1025
- if (a) {
1026
- var d = U(o);
1027
- mt(a, e.props, "prop", d, e);
1028
- } else if (o.PropTypes !== void 0 && !pe) {
1029
- pe = !0;
1030
- var A = U(o);
1147
+ if (u) {
1148
+ var h = V(o);
1149
+ _t(u, e.props, "prop", h, e);
1150
+ } else if (o.PropTypes !== void 0 && !he) {
1151
+ he = !0;
1152
+ var A = V(o);
1031
1153
  _("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", A || "Unknown");
1032
1154
  }
1033
1155
  typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1034
1156
  }
1035
1157
  }
1036
- function It(e) {
1158
+ function Nt(e) {
1037
1159
  {
1038
- for (var o = Object.keys(e.props), a = 0; a < o.length; a++) {
1039
- var d = o[a];
1040
- if (d !== "children" && d !== "key") {
1041
- H(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", d), H(null);
1160
+ for (var o = Object.keys(e.props), u = 0; u < o.length; u++) {
1161
+ var h = o[u];
1162
+ if (h !== "children" && h !== "key") {
1163
+ G(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), G(null);
1042
1164
  break;
1043
1165
  }
1044
1166
  }
1045
- e.ref !== null && (H(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
1167
+ e.ref !== null && (G(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), G(null));
1046
1168
  }
1047
1169
  }
1048
- var He = {};
1049
- function Ge(e, o, a, d, A, S) {
1170
+ var Ye = {};
1171
+ function qe(e, o, u, h, A, S) {
1050
1172
  {
1051
- var b = ct(e);
1173
+ var b = lt(e);
1052
1174
  if (!b) {
1053
1175
  var w = "";
1054
1176
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1055
- var P = Ct();
1056
- P ? w += P : w += Ve();
1177
+ var O = kt();
1178
+ O ? w += O : w += We();
1057
1179
  var M;
1058
- e === null ? M = "null" : fe(e) ? M = "array" : e !== void 0 && e.$$typeof === r ? (M = "<" + (U(e.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : M = 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", M, w);
1180
+ e === null ? M = "null" : de(e) ? M = "array" : e !== void 0 && e.$$typeof === r ? (M = "<" + (V(e.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : M = 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", M, w);
1059
1181
  }
1060
- var I = Tt(e, o, a, A, S);
1182
+ var I = Ct(e, o, u, A, S);
1061
1183
  if (I == null)
1062
1184
  return I;
1063
1185
  if (b) {
1064
1186
  var D = o.children;
1065
1187
  if (D !== void 0)
1066
- if (d)
1067
- if (fe(D)) {
1068
- for (var G = 0; G < D.length; G++)
1069
- ze(D[G], e);
1188
+ if (h)
1189
+ if (de(D)) {
1190
+ for (var Y = 0; Y < D.length; Y++)
1191
+ Ge(D[Y], e);
1070
1192
  Object.freeze && Object.freeze(D);
1071
1193
  } else
1072
1194
  _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1073
1195
  else
1074
- ze(D, e);
1196
+ Ge(D, e);
1075
1197
  }
1076
1198
  if (J.call(o, "key")) {
1077
- var z = U(e), F = Object.keys(o).filter(function(Dt) {
1078
- return Dt !== "key";
1079
- }), ge = F.length > 0 ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}";
1080
- if (!He[z + ge]) {
1081
- var Ft = F.length > 0 ? "{" + F.join(": ..., ") + ": ...}" : "{}";
1199
+ var H = V(e), F = Object.keys(o).filter(function($t) {
1200
+ return $t !== "key";
1201
+ }), me = F.length > 0 ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}";
1202
+ if (!Ye[H + me]) {
1203
+ var Dt = F.length > 0 ? "{" + F.join(": ..., ") + ": ...}" : "{}";
1082
1204
  _(`A props object containing a "key" prop is being spread into JSX:
1083
1205
  let props = %s;
1084
1206
  <%s {...props} />
1085
1207
  React keys must be passed directly to JSX without using spread:
1086
1208
  let props = %s;
1087
- <%s key={someKey} {...props} />`, ge, z, Ft, z), He[z + ge] = !0;
1209
+ <%s key={someKey} {...props} />`, me, H, Dt, H), Ye[H + me] = !0;
1088
1210
  }
1089
1211
  }
1090
- return e === i ? It(I) : Mt(I), I;
1212
+ return e === i ? Nt(I) : It(I), I;
1091
1213
  }
1092
1214
  }
1093
- function Nt(e, o, a) {
1094
- return Ge(e, o, a, !0);
1215
+ function jt(e, o, u) {
1216
+ return qe(e, o, u, !0);
1095
1217
  }
1096
- function jt(e, o, a) {
1097
- return Ge(e, o, a, !1);
1218
+ function Pt(e, o, u) {
1219
+ return qe(e, o, u, !1);
1098
1220
  }
1099
- var Ot = jt, Pt = Nt;
1100
- K.Fragment = i, K.jsx = Ot, K.jsxs = Pt;
1101
- })()), K;
1221
+ var Ot = Pt, Ft = jt;
1222
+ X.Fragment = i, X.jsx = Ot, X.jsxs = Ft;
1223
+ })()), X;
1102
1224
  }
1103
- var Ze;
1104
- function Xt() {
1105
- return Ze || (Ze = 1, process.env.NODE_ENV === "production" ? re.exports = qt() : re.exports = Kt()), re.exports;
1225
+ var Qe;
1226
+ function or() {
1227
+ return Qe || (Qe = 1, process.env.NODE_ENV === "production" ? oe.exports = rr() : oe.exports = nr()), oe.exports;
1106
1228
  }
1107
- var g = Xt();
1108
- const rt = "platform-kit", Zt = !1, _e = {
1229
+ var m = or();
1230
+ const ot = "platform-kit", sr = !1, ve = {
1109
1231
  log: (...t) => {
1110
1232
  },
1111
1233
  warn: (...t) => {
1112
1234
  },
1113
1235
  error: (...t) => {
1114
- console.error(`[${rt}]`, ...t);
1236
+ console.error(`[${ot}]`, ...t);
1115
1237
  }
1116
1238
  };
1117
- class Er extends $t {
1239
+ class Cr extends Lt {
1118
1240
  hasDispatched = !1;
1119
1241
  constructor(r) {
1120
1242
  super(r), this.state = { hasError: !1 };
@@ -1128,7 +1250,7 @@ class Er extends $t {
1128
1250
  const r = window;
1129
1251
  if (r.__MF_NAME__) return r.__MF_NAME__;
1130
1252
  }
1131
- return rt;
1253
+ return ot;
1132
1254
  }
1133
1255
  /**
1134
1256
  * Определить нужно ли показывать детали ошибки
@@ -1146,7 +1268,7 @@ class Er extends $t {
1146
1268
  }
1147
1269
  } catch {
1148
1270
  }
1149
- return Zt;
1271
+ return sr;
1150
1272
  }
1151
1273
  /**
1152
1274
  * Dispatch ошибки в shell
@@ -1155,7 +1277,7 @@ class Er extends $t {
1155
1277
  if (this.hasDispatched || typeof window > "u") return;
1156
1278
  this.hasDispatched = !0;
1157
1279
  const i = this.getMfeName();
1158
- _e.error("ErrorBoundary caught:", r);
1280
+ ve.error("ErrorBoundary caught:", r);
1159
1281
  try {
1160
1282
  window.dispatchEvent(new CustomEvent("mfe-error", {
1161
1283
  detail: {
@@ -1167,8 +1289,8 @@ class Er extends $t {
1167
1289
  },
1168
1290
  bubbles: !0
1169
1291
  }));
1170
- } catch (c) {
1171
- _e.error("Failed to dispatch mfe-error event:", c);
1292
+ } catch (a) {
1293
+ ve.error("Failed to dispatch mfe-error event:", a);
1172
1294
  }
1173
1295
  }
1174
1296
  /**
@@ -1181,7 +1303,7 @@ class Er extends $t {
1181
1303
  * Обработать ошибку
1182
1304
  */
1183
1305
  componentDidCatch(r, s) {
1184
- this.dispatchError(r, s), _e.error("Error info:", s.componentStack);
1306
+ this.dispatchError(r, s), ve.error("Error info:", s.componentStack);
1185
1307
  }
1186
1308
  /**
1187
1309
  * Копировать ошибку в буфер обмена
@@ -1213,8 +1335,8 @@ ${this.state.error?.stack}`;
1213
1335
  */
1214
1336
  render() {
1215
1337
  if (this.state.hasError) {
1216
- const r = this.state.error?.message || "Unknown error", s = this.state.error?.stack || "", i = this.shouldShowDetails(), c = this.getMfeName();
1217
- return /* @__PURE__ */ g.jsxs("div", { style: {
1338
+ const r = this.state.error?.message || "Unknown error", s = this.state.error?.stack || "", i = this.shouldShowDetails(), a = this.getMfeName();
1339
+ return /* @__PURE__ */ m.jsxs("div", { style: {
1218
1340
  padding: "20px",
1219
1341
  textAlign: "center",
1220
1342
  color: "#d32f2f",
@@ -1224,12 +1346,12 @@ ${this.state.error?.stack}`;
1224
1346
  borderRadius: "4px",
1225
1347
  margin: "10px"
1226
1348
  }, children: [
1227
- /* @__PURE__ */ g.jsxs("h2", { style: { fontSize: "16px", margin: "0 0 8px 0" }, children: [
1349
+ /* @__PURE__ */ m.jsxs("h2", { style: { fontSize: "16px", margin: "0 0 8px 0" }, children: [
1228
1350
  "⚠️ Ошибка в ",
1229
- c
1351
+ a
1230
1352
  ] }),
1231
- /* @__PURE__ */ g.jsx("p", { style: { fontSize: "12px", margin: 0 }, children: "Произошла ошибка в микрофронтенде. Сообщение отправлено в shell." }),
1232
- i && /* @__PURE__ */ g.jsxs("details", { style: {
1353
+ /* @__PURE__ */ m.jsx("p", { style: { fontSize: "12px", margin: 0 }, children: "Произошла ошибка в микрофронтенде. Сообщение отправлено в shell." }),
1354
+ i && /* @__PURE__ */ m.jsxs("details", { style: {
1233
1355
  whiteSpace: "pre-wrap",
1234
1356
  textAlign: "left",
1235
1357
  marginTop: "10px",
@@ -1237,8 +1359,8 @@ ${this.state.error?.stack}`;
1237
1359
  padding: "8px",
1238
1360
  borderRadius: "4px"
1239
1361
  }, children: [
1240
- /* @__PURE__ */ g.jsx("summary", { style: { cursor: "pointer", fontWeight: "bold" }, children: "Детали ошибки" }),
1241
- /* @__PURE__ */ g.jsxs("pre", { style: {
1362
+ /* @__PURE__ */ m.jsx("summary", { style: { cursor: "pointer", fontWeight: "bold" }, children: "Детали ошибки" }),
1363
+ /* @__PURE__ */ m.jsxs("pre", { style: {
1242
1364
  fontSize: "11px",
1243
1365
  overflow: "auto",
1244
1366
  maxHeight: "150px",
@@ -1253,8 +1375,8 @@ ${this.state.error?.stack}`;
1253
1375
  ${s}`
1254
1376
  ] })
1255
1377
  ] }),
1256
- /* @__PURE__ */ g.jsxs("div", { style: { marginTop: "12px", display: "flex", gap: "8px", justifyContent: "center" }, children: [
1257
- /* @__PURE__ */ g.jsx(
1378
+ /* @__PURE__ */ m.jsxs("div", { style: { marginTop: "12px", display: "flex", gap: "8px", justifyContent: "center" }, children: [
1379
+ /* @__PURE__ */ m.jsx(
1258
1380
  "button",
1259
1381
  {
1260
1382
  onClick: this.handleCopy,
@@ -1269,7 +1391,7 @@ ${s}`
1269
1391
  children: "📋 Копировать"
1270
1392
  }
1271
1393
  ),
1272
- /* @__PURE__ */ g.jsx(
1394
+ /* @__PURE__ */ m.jsx(
1273
1395
  "button",
1274
1396
  {
1275
1397
  onClick: this.handleRetry,
@@ -1284,7 +1406,7 @@ ${s}`
1284
1406
  children: "🔄 Обновить"
1285
1407
  }
1286
1408
  ),
1287
- /* @__PURE__ */ g.jsx(
1409
+ /* @__PURE__ */ m.jsx(
1288
1410
  "button",
1289
1411
  {
1290
1412
  onClick: this.handleGoHome,
@@ -1316,24 +1438,24 @@ const $ = {
1316
1438
  tags: "🏷️",
1317
1439
  spreadsheet: "📊"
1318
1440
  };
1319
- function wr({ mfeName: t }) {
1320
- const { data: r, isLoading: s, error: i } = Gt({ mfeName: t }), [c, p] = R(!1);
1441
+ function kr({ mfeName: t }) {
1442
+ const { data: r, isLoading: s, error: i } = Yt({ mfeName: t }), [a, d] = R(!1);
1321
1443
  if (s)
1322
- return /* @__PURE__ */ g.jsxs("span", { className: "text-muted small me-2", children: [
1323
- /* @__PURE__ */ g.jsx("span", { className: "me-1", children: "⏳" }),
1444
+ return /* @__PURE__ */ m.jsxs("span", { className: "text-muted small me-2", children: [
1445
+ /* @__PURE__ */ m.jsx("span", { className: "me-1", children: "⏳" }),
1324
1446
  "Загрузка..."
1325
1447
  ] });
1326
1448
  if (i || !r)
1327
- return /* @__PURE__ */ g.jsxs("span", { className: "text-muted small me-2", title: `Ошибка: ${i || "нет данных"}`, children: [
1328
- /* @__PURE__ */ g.jsx("span", { className: "me-1", children: "ℹ️" }),
1449
+ return /* @__PURE__ */ m.jsxs("span", { className: "text-muted small me-2", title: `Ошибка: ${i || "нет данных"}`, children: [
1450
+ /* @__PURE__ */ m.jsx("span", { className: "me-1", children: "ℹ️" }),
1329
1451
  "N/A"
1330
1452
  ] });
1331
- const n = r, m = n.BUILD_VERSION || n.IMAGE_VERSION || n.APP_NAME || "N/A", l = [];
1332
- return n.APP_NAME && l.push({ key: "APP_NAME", value: n.APP_NAME, label: "Приложение", icon: $.apps }), n.BUILD_VERSION && l.push({ key: "BUILD_VERSION", value: n.BUILD_VERSION, label: "Версия", icon: $.tags }), n.IMAGE_VERSION && l.push({ key: "IMAGE_VERSION", value: n.IMAGE_VERSION, label: "Образ", icon: $.storage }), n.GIT_COMMIT && l.push({ key: "GIT_COMMIT", value: n.GIT_COMMIT, label: "Commit", icon: $.spreadsheet }), n.GIT_BRANCH && l.push({ key: "GIT_BRANCH", value: n.GIT_BRANCH, label: "Ветка", icon: $.spreadsheet }), n.CI_COMMIT_AUTHOR && l.push({ key: "CI_COMMIT_AUTHOR", value: n.CI_COMMIT_AUTHOR, label: "Автор", icon: $.user }), n.CI_COMMIT_TIMESTAMP && l.push({ key: "CI_COMMIT_TIMESTAMP", value: n.CI_COMMIT_TIMESTAMP, label: "Дата", icon: $.clock }), n.CI_JOB_URL && l.push({ key: "CI_JOB_URL", value: n.CI_JOB_URL, label: "CI Job", icon: $.link }), n.CI_PIPELINE_URL && l.push({ key: "CI_PIPELINE_URL", value: n.CI_PIPELINE_URL, label: "Pipeline", icon: $.link }), n.CI_COMMIT_MESSAGE && (n.CI_COMMIT_MESSAGE.length > 60 ? n.CI_COMMIT_MESSAGE.substring(0, 57) + "" : n.CI_COMMIT_MESSAGE, l.push({ key: "CI_COMMIT_MESSAGE", value: n.CI_COMMIT_MESSAGE, label: "Сообщение", icon: $.code })), /* @__PURE__ */ g.jsxs("div", { style: { display: "inline-block", position: "relative" }, children: [
1333
- /* @__PURE__ */ g.jsxs(
1453
+ const n = r, p = n.BUILD_VERSION || n.IMAGE_VERSION || n.APP_NAME || "N/A", l = [];
1454
+ return n.APP_NAME && l.push({ key: "APP_NAME", value: n.APP_NAME, label: "Приложение", icon: $.apps }), n.BUILD_VERSION && l.push({ key: "BUILD_VERSION", value: n.BUILD_VERSION, label: "Версия", icon: $.tags }), n.IMAGE_VERSION && l.push({ key: "IMAGE_VERSION", value: n.IMAGE_VERSION, label: "Образ", icon: $.storage }), n.GIT_COMMIT && l.push({ key: "GIT_COMMIT", value: n.GIT_COMMIT, label: "Commit", icon: $.spreadsheet }), n.GIT_BRANCH && l.push({ key: "GIT_BRANCH", value: n.GIT_BRANCH, label: "Ветка", icon: $.spreadsheet }), n.CI_COMMIT_AUTHOR && l.push({ key: "CI_COMMIT_AUTHOR", value: n.CI_COMMIT_AUTHOR, label: "Автор", icon: $.user }), n.CI_COMMIT_TIMESTAMP && l.push({ key: "CI_COMMIT_TIMESTAMP", value: n.CI_COMMIT_TIMESTAMP, label: "Дата", icon: $.clock }), n.CI_JOB_URL && l.push({ key: "CI_JOB_URL", value: n.CI_JOB_URL, label: "CI Job", icon: $.link }), n.CI_PIPELINE_URL && l.push({ key: "CI_PIPELINE_URL", value: n.CI_PIPELINE_URL, label: "Pipeline", icon: $.link }), n.CI_COMMIT_MESSAGE && (n.CI_COMMIT_MESSAGE.length > 60 ? n.CI_COMMIT_MESSAGE.substring(0, 57) + "" : n.CI_COMMIT_MESSAGE, l.push({ key: "CI_COMMIT_MESSAGE", value: n.CI_COMMIT_MESSAGE, label: "Сообщение", icon: $.code })), /* @__PURE__ */ m.jsxs("div", { style: { display: "inline-block", position: "relative" }, children: [
1455
+ /* @__PURE__ */ m.jsxs(
1334
1456
  "button",
1335
1457
  {
1336
- onClick: () => p(!c),
1458
+ onClick: () => d(!a),
1337
1459
  style: {
1338
1460
  background: "transparent",
1339
1461
  border: "none",
@@ -1345,12 +1467,12 @@ function wr({ mfeName: t }) {
1345
1467
  },
1346
1468
  title: "Информация о версии",
1347
1469
  children: [
1348
- /* @__PURE__ */ g.jsx("span", { className: "me-1", children: $.info }),
1349
- /* @__PURE__ */ g.jsx("span", { className: "text-dark", children: m })
1470
+ /* @__PURE__ */ m.jsx("span", { className: "me-1", children: $.info }),
1471
+ /* @__PURE__ */ m.jsx("span", { className: "text-dark", children: p })
1350
1472
  ]
1351
1473
  }
1352
1474
  ),
1353
- c && /* @__PURE__ */ g.jsxs(
1475
+ a && /* @__PURE__ */ m.jsxs(
1354
1476
  "div",
1355
1477
  {
1356
1478
  style: {
@@ -1367,36 +1489,36 @@ function wr({ mfeName: t }) {
1367
1489
  marginTop: "4px"
1368
1490
  },
1369
1491
  children: [
1370
- /* @__PURE__ */ g.jsxs("div", { style: {
1492
+ /* @__PURE__ */ m.jsxs("div", { style: {
1371
1493
  marginBottom: "12px",
1372
1494
  paddingBottom: "8px",
1373
1495
  borderBottom: "1px solid #dee2e6",
1374
1496
  display: "flex",
1375
1497
  alignItems: "center"
1376
1498
  }, children: [
1377
- /* @__PURE__ */ g.jsx("span", { className: "me-2", children: $.apps }),
1378
- /* @__PURE__ */ g.jsx("strong", { children: n.APP_NAME || t })
1499
+ /* @__PURE__ */ m.jsx("span", { className: "me-2", children: $.apps }),
1500
+ /* @__PURE__ */ m.jsx("strong", { children: n.APP_NAME || t })
1379
1501
  ] }),
1380
- /* @__PURE__ */ g.jsxs("div", { style: { marginBottom: "12px" }, children: [
1381
- /* @__PURE__ */ g.jsx("span", { className: "text-muted", children: "Версия: " }),
1382
- /* @__PURE__ */ g.jsx("strong", { children: m })
1502
+ /* @__PURE__ */ m.jsxs("div", { style: { marginBottom: "12px" }, children: [
1503
+ /* @__PURE__ */ m.jsx("span", { className: "text-muted", children: "Версия: " }),
1504
+ /* @__PURE__ */ m.jsx("strong", { children: p })
1383
1505
  ] }),
1384
- l.length > 0 && /* @__PURE__ */ g.jsx("div", { style: { fontSize: "13px" }, children: l.map(({ key: y, value: f, label: h, icon: u }) => {
1385
- const E = f.length > 40 && (y.includes("URL") || y.includes("MESSAGE")) ? `${f.substring(0, 37)}...` : f;
1386
- return /* @__PURE__ */ g.jsxs("div", { style: { marginBottom: "8px", display: "flex", alignItems: "flex-start" }, children: [
1387
- /* @__PURE__ */ g.jsx("span", { className: "me-2", style: { flexShrink: 0 }, children: u }),
1388
- /* @__PURE__ */ g.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
1389
- /* @__PURE__ */ g.jsx("div", { className: "small text-muted", children: h }),
1390
- /* @__PURE__ */ g.jsx(
1506
+ l.length > 0 && /* @__PURE__ */ m.jsx("div", { style: { fontSize: "13px" }, children: l.map(({ key: v, value: c, label: g, icon: f }) => {
1507
+ const E = c.length > 40 && (v.includes("URL") || v.includes("MESSAGE")) ? `${c.substring(0, 37)}...` : c;
1508
+ return /* @__PURE__ */ m.jsxs("div", { style: { marginBottom: "8px", display: "flex", alignItems: "flex-start" }, children: [
1509
+ /* @__PURE__ */ m.jsx("span", { className: "me-2", style: { flexShrink: 0 }, children: f }),
1510
+ /* @__PURE__ */ m.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
1511
+ /* @__PURE__ */ m.jsx("div", { className: "small text-muted", children: g }),
1512
+ /* @__PURE__ */ m.jsx(
1391
1513
  "div",
1392
1514
  {
1393
1515
  className: "font-monospace small text-truncate",
1394
1516
  style: { maxWidth: "100%" },
1395
- title: f,
1396
- children: y.includes("URL") ? /* @__PURE__ */ g.jsx(
1517
+ title: c,
1518
+ children: v.includes("URL") ? /* @__PURE__ */ m.jsx(
1397
1519
  "a",
1398
1520
  {
1399
- href: f,
1521
+ href: c,
1400
1522
  target: "_blank",
1401
1523
  rel: "noopener noreferrer",
1402
1524
  style: { color: "#007bff" },
@@ -1406,10 +1528,10 @@ function wr({ mfeName: t }) {
1406
1528
  }
1407
1529
  )
1408
1530
  ] })
1409
- ] }, y);
1531
+ ] }, v);
1410
1532
  }) }),
1411
- l.length === 0 && /* @__PURE__ */ g.jsx("div", { className: "text-center text-muted py-2 small", children: "Нет информации о версии" }),
1412
- /* @__PURE__ */ g.jsx("div", { style: {
1533
+ l.length === 0 && /* @__PURE__ */ m.jsx("div", { className: "text-center text-muted py-2 small", children: "Нет информации о версии" }),
1534
+ /* @__PURE__ */ m.jsx("div", { style: {
1413
1535
  marginTop: "12px",
1414
1536
  paddingTop: "8px",
1415
1537
  borderTop: "1px solid #dee2e6",
@@ -1417,10 +1539,10 @@ function wr({ mfeName: t }) {
1417
1539
  fontSize: "12px",
1418
1540
  color: "#6c757d"
1419
1541
  }, children: "IngoBank DevOps Platform" }),
1420
- /* @__PURE__ */ g.jsx(
1542
+ /* @__PURE__ */ m.jsx(
1421
1543
  "button",
1422
1544
  {
1423
- onClick: () => p(!1),
1545
+ onClick: () => d(!1),
1424
1546
  style: {
1425
1547
  position: "absolute",
1426
1548
  top: "8px",
@@ -1437,10 +1559,10 @@ function wr({ mfeName: t }) {
1437
1559
  ]
1438
1560
  }
1439
1561
  ),
1440
- c && /* @__PURE__ */ g.jsx(
1562
+ a && /* @__PURE__ */ m.jsx(
1441
1563
  "div",
1442
1564
  {
1443
- onClick: () => p(!1),
1565
+ onClick: () => d(!1),
1444
1566
  style: {
1445
1567
  position: "fixed",
1446
1568
  top: 0,
@@ -1453,64 +1575,64 @@ function wr({ mfeName: t }) {
1453
1575
  )
1454
1576
  ] });
1455
1577
  }
1456
- const ve = "platform-kit", nt = Lt(null);
1457
- function br({ children: t }) {
1458
- const [r, s] = R([]), i = typeof window < "u" && window.__MF_NAME__ || ve, c = C((u, E, v, N) => ({
1578
+ const Ee = "platform-kit", st = Ut(null);
1579
+ function Mr({ children: t }) {
1580
+ const [r, s] = R([]), i = typeof window < "u" && window.__MF_NAME__ || Ee, a = C((f, E, y, N) => ({
1459
1581
  id: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
1460
- type: u,
1582
+ type: f,
1461
1583
  title: E,
1462
- message: v,
1584
+ message: y,
1463
1585
  mfeName: i,
1464
1586
  timestamp: Date.now(),
1465
1587
  duration: N
1466
- }), [i]), p = C((u) => {
1467
- s((v) => [...v, u].slice(0, 5));
1468
- const E = u.duration || 5e3;
1588
+ }), [i]), d = C((f) => {
1589
+ s((y) => [...y, f].slice(0, 5));
1590
+ const E = f.duration || 5e3;
1469
1591
  E > 0 && setTimeout(() => {
1470
- s((v) => v.filter((N) => N.id !== u.id));
1592
+ s((y) => y.filter((N) => N.id !== f.id));
1471
1593
  }, E);
1472
- }, []), n = C((u) => {
1473
- const E = c(u.type, u.title, u.message, u.duration);
1474
- p(E), typeof window < "u" && window.dispatchEvent(new CustomEvent("mfe-notification", {
1594
+ }, []), n = C((f) => {
1595
+ const E = a(f.type, f.title, f.message, f.duration);
1596
+ d(E), typeof window < "u" && window.dispatchEvent(new CustomEvent("mfe-notification", {
1475
1597
  detail: E,
1476
1598
  bubbles: !0
1477
1599
  }));
1478
- }, [c, p]), m = C((u, E = "Успешно") => {
1479
- n({ type: "success", title: E, message: u });
1480
- }, [n]), l = C((u, E = "Ошибка") => {
1481
- n({ type: "error", title: E, message: u });
1482
- }, [n]), y = C((u, E = "Предупреждение") => {
1483
- n({ type: "warning", title: E, message: u });
1484
- }, [n]), f = C((u, E = "Информация") => {
1485
- n({ type: "info", title: E, message: u });
1486
- }, [n]), h = C((u) => {
1487
- s((E) => E.filter((v) => v.id !== u));
1600
+ }, [a, d]), p = C((f, E = "Успешно") => {
1601
+ n({ type: "success", title: E, message: f });
1602
+ }, [n]), l = C((f, E = "Ошибка") => {
1603
+ n({ type: "error", title: E, message: f });
1604
+ }, [n]), v = C((f, E = "Предупреждение") => {
1605
+ n({ type: "warning", title: E, message: f });
1606
+ }, [n]), c = C((f, E = "Информация") => {
1607
+ n({ type: "info", title: E, message: f });
1608
+ }, [n]), g = C((f) => {
1609
+ s((E) => E.filter((y) => y.id !== f));
1488
1610
  }, []);
1489
- return B(() => {
1611
+ return U(() => {
1490
1612
  if (typeof window > "u") return;
1491
- const u = (E) => {
1492
- const v = E.detail;
1493
- if (v && v.type && v.title && v.message) {
1613
+ const f = (E) => {
1614
+ const y = E.detail;
1615
+ if (y && y.type && y.title && y.message) {
1494
1616
  const N = {
1495
- ...v,
1617
+ ...y,
1496
1618
  id: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
1497
1619
  };
1498
- p(N);
1620
+ d(N);
1499
1621
  }
1500
1622
  };
1501
- return window.addEventListener("mfe-notification", u), () => {
1502
- window.removeEventListener("mfe-notification", u);
1623
+ return window.addEventListener("mfe-notification", f), () => {
1624
+ window.removeEventListener("mfe-notification", f);
1503
1625
  };
1504
- }, [p]), /* @__PURE__ */ g.jsxs(nt.Provider, { value: {
1626
+ }, [d]), /* @__PURE__ */ m.jsxs(st.Provider, { value: {
1505
1627
  notify: n,
1506
- notifySuccess: m,
1628
+ notifySuccess: p,
1507
1629
  notifyError: l,
1508
- notifyWarning: y,
1509
- notifyInfo: f,
1510
- removeNotification: h
1630
+ notifyWarning: v,
1631
+ notifyInfo: c,
1632
+ removeNotification: g
1511
1633
  }, children: [
1512
1634
  t,
1513
- r.length > 0 && /* @__PURE__ */ g.jsx(
1635
+ r.length > 0 && /* @__PURE__ */ m.jsx(
1514
1636
  "div",
1515
1637
  {
1516
1638
  style: {
@@ -1525,31 +1647,31 @@ function br({ children: t }) {
1525
1647
  gap: "8px",
1526
1648
  pointerEvents: "none"
1527
1649
  },
1528
- children: r.map((u) => /* @__PURE__ */ g.jsxs(
1650
+ children: r.map((f) => /* @__PURE__ */ m.jsxs(
1529
1651
  "div",
1530
1652
  {
1531
- className: `notification notification-${u.type}`,
1653
+ className: `notification notification-${f.type}`,
1532
1654
  style: {
1533
1655
  pointerEvents: "auto",
1534
1656
  padding: "12px 16px",
1535
1657
  borderRadius: "8px",
1536
- background: u.type === "success" ? "#d4edda" : u.type === "error" ? "#f8d7da" : u.type === "warning" ? "#fff3cd" : "#d1ecf1",
1537
- color: u.type === "success" ? "#155724" : u.type === "error" ? "#721c24" : u.type === "warning" ? "#856404" : "#0c5460",
1658
+ background: f.type === "success" ? "#d4edda" : f.type === "error" ? "#f8d7da" : f.type === "warning" ? "#fff3cd" : "#d1ecf1",
1659
+ color: f.type === "success" ? "#155724" : f.type === "error" ? "#721c24" : f.type === "warning" ? "#856404" : "#0c5460",
1538
1660
  boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
1539
1661
  display: "flex",
1540
1662
  alignItems: "flex-start",
1541
1663
  gap: "12px"
1542
1664
  },
1543
1665
  children: [
1544
- /* @__PURE__ */ g.jsxs("div", { style: { flex: 1 }, children: [
1545
- /* @__PURE__ */ g.jsx("strong", { style: { display: "block", marginBottom: "4px" }, children: u.title }),
1546
- /* @__PURE__ */ g.jsx("p", { style: { margin: 0, fontSize: "14px" }, children: u.message }),
1547
- /* @__PURE__ */ g.jsx("small", { style: { opacity: 0.7, fontSize: "12px" }, children: u.mfeName })
1666
+ /* @__PURE__ */ m.jsxs("div", { style: { flex: 1 }, children: [
1667
+ /* @__PURE__ */ m.jsx("strong", { style: { display: "block", marginBottom: "4px" }, children: f.title }),
1668
+ /* @__PURE__ */ m.jsx("p", { style: { margin: 0, fontSize: "14px" }, children: f.message }),
1669
+ /* @__PURE__ */ m.jsx("small", { style: { opacity: 0.7, fontSize: "12px" }, children: f.mfeName })
1548
1670
  ] }),
1549
- /* @__PURE__ */ g.jsx(
1671
+ /* @__PURE__ */ m.jsx(
1550
1672
  "button",
1551
1673
  {
1552
- onClick: () => h(u.id),
1674
+ onClick: () => g(f.id),
1553
1675
  style: {
1554
1676
  background: "transparent",
1555
1677
  border: "none",
@@ -1563,14 +1685,14 @@ function br({ children: t }) {
1563
1685
  )
1564
1686
  ]
1565
1687
  },
1566
- u.id
1688
+ f.id
1567
1689
  ))
1568
1690
  }
1569
1691
  )
1570
1692
  ] });
1571
1693
  }
1572
- function xr() {
1573
- const t = Ut(nt);
1694
+ function Ir() {
1695
+ const t = Vt(st);
1574
1696
  return t || {
1575
1697
  notify: () => {
1576
1698
  },
@@ -1586,9 +1708,9 @@ function xr() {
1586
1708
  }
1587
1709
  };
1588
1710
  }
1589
- function Ar(t) {
1711
+ function Nr(t) {
1590
1712
  if (typeof window > "u") return;
1591
- const r = window.__MF_NAME__ || ve, s = {
1713
+ const r = window.__MF_NAME__ || Ee, s = {
1592
1714
  ...t,
1593
1715
  mfeName: r,
1594
1716
  timestamp: Date.now()
@@ -1598,108 +1720,7 @@ function Ar(t) {
1598
1720
  bubbles: !0
1599
1721
  }));
1600
1722
  }
1601
- const ot = "platform-kit", ne = {
1602
- log: (...t) => {
1603
- },
1604
- warn: (...t) => {
1605
- },
1606
- error: (...t) => {
1607
- console.error(`[${ot}]`, ...t);
1608
- },
1609
- info: (...t) => {
1610
- }
1611
- };
1612
- function Qt(t) {
1613
- const r = t.response;
1614
- let s = "unknown";
1615
- return r ? r.status === 401 ? s = "unauthorized" : r.status === 403 ? s = "forbidden" : r.status === 404 ? s = "not_found" : r.status >= 500 && (s = "server") : s = "network", {
1616
- message: r?.data?.message ?? t.message ?? "Unknown error",
1617
- code: r?.data?.code,
1618
- status: r?.status,
1619
- type: s,
1620
- timestamp: Date.now(),
1621
- url: t.config?.url
1622
- };
1623
- }
1624
- const er = 3, tr = 1e3;
1625
- function rr(t) {
1626
- return !t || t >= 500 || t === 429;
1627
- }
1628
- function nr(t) {
1629
- return new Promise((r) => setTimeout(r, t));
1630
- }
1631
- function or(t = {}) {
1632
- const r = t.name || ot, s = t.retries ?? er, i = t.retryDelay ?? tr, c = {
1633
- log: (...n) => ne.log(`[API:${r}]`, ...n),
1634
- warn: (...n) => ne.warn(`[API:${r}]`, ...n),
1635
- error: (...n) => ne.error(`[API:${r}]`, ...n),
1636
- info: (...n) => ne.info(`[API:${r}]`, ...n)
1637
- }, p = Vt.create({
1638
- timeout: t.timeout ?? 1e4,
1639
- baseURL: t.baseURL ?? "",
1640
- headers: {
1641
- "Content-Type": "application/json"
1642
- }
1643
- });
1644
- return p.interceptors.request.use(
1645
- (n) => {
1646
- const m = Bt();
1647
- if (m?.isAuthenticated) {
1648
- const l = m.user?.profile?.access_token;
1649
- l && n.headers && (n.headers.Authorization = `Bearer ${l}`, c.info("Auth token attached"));
1650
- } else
1651
- c.info("User not authenticated - request without token");
1652
- return c.log(`${n.method?.toUpperCase()} ${n.url}`), n;
1653
- },
1654
- (n) => (c.error("Request interceptor error:", n.message), Promise.reject(n))
1655
- ), p.interceptors.response.use(
1656
- (n) => (c.log(`Response ${n.status}:`, n.config.url), n),
1657
- async (n) => {
1658
- const m = n.response?.status, l = n.config?.url, y = n.config?._retryCount ?? 0;
1659
- if (rr(m) && y < s) {
1660
- const f = n.config;
1661
- f._retryCount = y + 1;
1662
- const h = i * Math.pow(2, y);
1663
- return c.warn(`Retrying (${f._retryCount}/${s}) after ${h}ms:`, l), await nr(h), p.request(f);
1664
- }
1665
- return m === 401 ? (c.warn("401 Unauthorized - triggering re-auth"), Wt()) : m === 403 ? c.warn("403 Forbidden - insufficient permissions") : m === 404 ? c.warn("404 Not found:", l) : m === 429 ? c.warn("429 Rate limited") : m === 500 ? c.error("500 Server error:", l) : n.response ? c.warn(`Error ${m}:`, n.message) : c.error("Network error - backend may be unavailable:", l), Promise.reject(Qt(n));
1666
- }
1667
- ), p;
1668
- }
1669
- const ae = or();
1670
- async function Sr(t, r, s = ae) {
1671
- const i = await s.get(t, { params: r });
1672
- return {
1673
- data: i.data,
1674
- status: i.status,
1675
- ok: i.status >= 200 && i.status < 300
1676
- };
1677
- }
1678
- async function Rr(t, r, s = ae) {
1679
- const i = await s.post(t, r);
1680
- return {
1681
- data: i.data,
1682
- status: i.status,
1683
- ok: i.status >= 200 && i.status < 300
1684
- };
1685
- }
1686
- async function Tr(t, r, s = ae) {
1687
- const i = await s.put(t, r);
1688
- return {
1689
- data: i.data,
1690
- status: i.status,
1691
- ok: i.status >= 200 && i.status < 300
1692
- };
1693
- }
1694
- async function Cr(t, r = ae) {
1695
- const s = await r.delete(t);
1696
- return {
1697
- data: s.data,
1698
- status: s.status,
1699
- ok: s.status >= 200 && s.status < 300
1700
- };
1701
- }
1702
- function ie(t, r) {
1723
+ function ue(t, r) {
1703
1724
  const s = r?.prefix ? `[${r.prefix}]` : `[${t}]`;
1704
1725
  return {
1705
1726
  log: (...i) => {
@@ -1713,7 +1734,7 @@ function ie(t, r) {
1713
1734
  }
1714
1735
  };
1715
1736
  }
1716
- const kr = ie("platform-kit", { prefix: "AUTH" }), Mr = ie("platform-kit", { prefix: "API" }), Ir = ie("platform-kit", { prefix: "ERROR" }), Nr = ie("platform-kit", { prefix: "INFO" }), sr = {}, ar = {
1737
+ const jr = ue("platform-kit", { prefix: "AUTH" }), Pr = ue("platform-kit", { prefix: "API" }), Or = ue("platform-kit", { prefix: "ERROR" }), Fr = ue("platform-kit", { prefix: "INFO" }), ar = {}, ir = {
1717
1738
  log: (...t) => {
1718
1739
  },
1719
1740
  warn: (...t) => {
@@ -1722,15 +1743,15 @@ const kr = ie("platform-kit", { prefix: "AUTH" }), Mr = ie("platform-kit", { pre
1722
1743
  console.error("[getMfeName]", ...t);
1723
1744
  }
1724
1745
  };
1725
- function Ee(t) {
1746
+ function be(t) {
1726
1747
  return t ? t.mfeName ? t.mfeName : t.name ? t.name.replace("@ib-dop/", "") : null : null;
1727
1748
  }
1728
- function st() {
1749
+ function at() {
1729
1750
  if (typeof window > "u") return null;
1730
1751
  const t = window;
1731
1752
  return t.__MF_NAME__ ? t.__MF_NAME__ : null;
1732
1753
  }
1733
- function at() {
1754
+ function it() {
1734
1755
  if (typeof window > "u") return null;
1735
1756
  try {
1736
1757
  const t = sessionStorage.getItem("mf-config");
@@ -1744,81 +1765,85 @@ function at() {
1744
1765
  }
1745
1766
  return null;
1746
1767
  }
1747
- function we() {
1748
- const t = sr;
1768
+ function xe() {
1769
+ const t = ar;
1749
1770
  return t.VITE_MFE_NAME ? String(t.VITE_MFE_NAME) : t.MFE_NAME ? String(t.MFE_NAME) : null;
1750
1771
  }
1751
- let oe = null, ye = !1;
1752
- function ir(t, r) {
1753
- const s = Ee(t);
1772
+ let se = null, we = !1;
1773
+ function ur(t, r) {
1774
+ const s = be(t);
1754
1775
  if (s)
1755
1776
  return s;
1756
- if (ye && oe)
1757
- return oe;
1777
+ if (we && se)
1778
+ return se;
1758
1779
  const i = [
1759
- { source: "window.__MF_NAME__", value: st() },
1760
- { source: "sessionStorage.mf-config", value: at() },
1761
- { source: "import.meta.env.VITE_MFE_NAME", value: we() }
1780
+ { source: "window.__MF_NAME__", value: at() },
1781
+ { source: "sessionStorage.mf-config", value: it() },
1782
+ { source: "import.meta.env.VITE_MFE_NAME", value: xe() }
1762
1783
  ];
1763
- for (const { source: p, value: n } of i)
1784
+ for (const { source: d, value: n } of i)
1764
1785
  if (n)
1765
- return oe = n, ye = !0, n;
1786
+ return se = n, we = !0, n;
1766
1787
  if (r)
1767
1788
  return r;
1768
- const c = "Cannot determine MFE name. Please pass mfeName in props, set window.__MF_NAME__, sessionStorage.mf-config, or VITE_MFE_NAME";
1769
- throw ar.error(c), new Error(c);
1789
+ const a = "Cannot determine MFE name. Please pass mfeName in props, set window.__MF_NAME__, sessionStorage.mf-config, or VITE_MFE_NAME";
1790
+ throw ir.error(a), new Error(a);
1770
1791
  }
1771
- function jr(t) {
1772
- return ir(t);
1792
+ function Dr(t) {
1793
+ return ur(t);
1773
1794
  }
1774
- function ur(t) {
1775
- return Ee(t) ? "props.mfeName" : st() ? "window.__MF_NAME__" : at() ? "sessionStorage.mf-config" : we() ? "import.meta.env.VITE_MFE_NAME" : null;
1795
+ function cr(t) {
1796
+ return be(t) ? "props.mfeName" : at() ? "window.__MF_NAME__" : it() ? "sessionStorage.mf-config" : xe() ? "import.meta.env.VITE_MFE_NAME" : null;
1776
1797
  }
1777
- function Or(t) {
1778
- return ur(t) !== null;
1798
+ function $r(t) {
1799
+ return cr(t) !== null;
1779
1800
  }
1780
- function Pr() {
1781
- oe = null, ye = !1;
1801
+ function Lr() {
1802
+ se = null, we = !1;
1782
1803
  }
1783
- function Fr(t) {
1804
+ function Ur(t) {
1784
1805
  const r = [];
1785
- return Ee(t) && r.push("props.mfeName"), typeof window < "u" && (window.__MF_NAME__ && r.push("window.__MF_NAME__"), sessionStorage.getItem("mf-config") && r.push("sessionStorage.mf-config")), we() && r.push("import.meta.env.VITE_MFE_NAME"), r;
1806
+ return be(t) && r.push("props.mfeName"), typeof window < "u" && (window.__MF_NAME__ && r.push("window.__MF_NAME__"), sessionStorage.getItem("mf-config") && r.push("sessionStorage.mf-config")), xe() && r.push("import.meta.env.VITE_MFE_NAME"), r;
1786
1807
  }
1787
1808
  export {
1788
- Er as ErrorBoundary,
1789
- br as NotificationProvider,
1790
- wr as VersionInfo,
1791
- ae as api,
1792
- Mr as apiLogger,
1793
- kr as authLogger,
1794
- or as createApiClient,
1795
- ie as createMfLogger,
1796
- Cr as del,
1797
- Ar as dispatchNotification,
1798
- Ir as errorLogger,
1799
- Sr as get,
1800
- fr as getAccessToken,
1801
- Fr as getAllMfeNameSources,
1802
- Bt as getAuthState,
1803
- ir as getMfeName,
1804
- ur as getMfeNameSource,
1805
- V as getShellAuth,
1806
- Or as hasMfeName,
1807
- Nr as infoLogger,
1808
- dr as isAuthenticated,
1809
- pr as logout,
1810
- Rr as post,
1811
- Tr as put,
1812
- Wt as redirectToLogin,
1813
- jr as requireMfeName,
1814
- Pr as resetMfeNameCache,
1815
- gr as useApi,
1816
- vr as useFeatureAdmin,
1817
- _r as useFeatures,
1818
- Gt as useInfoData,
1819
- yr as useMicrofrontendsFeatures,
1820
- xr as useNotification,
1821
- mr as usePermissions,
1822
- se as useShellAuth,
1823
- hr as useV1Config
1809
+ Cr as ErrorBoundary,
1810
+ Mr as NotificationProvider,
1811
+ kr as VersionInfo,
1812
+ W as api,
1813
+ Pr as apiLogger,
1814
+ jr as authLogger,
1815
+ Qt as createApiClient,
1816
+ ue as createMfLogger,
1817
+ yr as del,
1818
+ Nr as dispatchNotification,
1819
+ Or as errorLogger,
1820
+ mr as get,
1821
+ dr as getAccessToken,
1822
+ Ur as getAllMfeNameSources,
1823
+ Wt as getAuthState,
1824
+ ur as getMfeName,
1825
+ cr as getMfeNameSource,
1826
+ B as getShellAuth,
1827
+ $r as hasMfeName,
1828
+ Fr as infoLogger,
1829
+ pr as isAuthenticated,
1830
+ hr as logout,
1831
+ _r as post,
1832
+ vr as put,
1833
+ zt as redirectToLogin,
1834
+ Dr as requireMfeName,
1835
+ Lr as resetMfeNameCache,
1836
+ ie as useApi,
1837
+ xr as useDel,
1838
+ Rr as useFeatureAdmin,
1839
+ Sr as useFeatures,
1840
+ Er as useGet,
1841
+ Yt as useInfoData,
1842
+ Tr as useMicrofrontendsFeatures,
1843
+ Ir as useNotification,
1844
+ Ar as usePermissions,
1845
+ wr as usePost,
1846
+ br as usePut,
1847
+ ae as useShellAuth,
1848
+ gr as useV1Config
1824
1849
  };