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