@machinemetrics/mm-react-embeddable 2.0.0 → 2.0.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import P, { createContext as ue, useContext as G, useState as L, useRef as g, useCallback as h, useEffect as b, useMemo as fe } from "react";
|
|
2
2
|
import E from "prop-types";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import te from "styled-components";
|
|
4
|
+
const ee = ue(null), J = ue({
|
|
5
5
|
pending: [],
|
|
6
6
|
authorize: () => {
|
|
7
7
|
},
|
|
@@ -14,331 +14,289 @@ const ne = fe(null), J = fe({
|
|
|
14
14
|
originEpochs: {},
|
|
15
15
|
credentials: {},
|
|
16
16
|
unsupported: {}
|
|
17
|
-
}),
|
|
18
|
-
kind:
|
|
19
|
-
accessToken:
|
|
20
|
-
expiresAt:
|
|
21
|
-
} : null : null,
|
|
17
|
+
}), pe = "access_token", ne = (r) => r ? r.kind ? r : r.accessToken ? {
|
|
18
|
+
kind: pe,
|
|
19
|
+
accessToken: r.accessToken,
|
|
20
|
+
expiresAt: r.expiresAt || null
|
|
21
|
+
} : null : null, he = 60, ge = 120, me = /* @__PURE__ */ new Set([
|
|
22
22
|
"host_not_allowed",
|
|
23
23
|
"unbound_host_bound_guest",
|
|
24
24
|
"invalid_token",
|
|
25
25
|
"provider_unavailable"
|
|
26
|
-
]),
|
|
26
|
+
]), V = (r) => {
|
|
27
27
|
try {
|
|
28
|
-
return new URL(
|
|
28
|
+
return new URL(r).origin;
|
|
29
29
|
} catch {
|
|
30
30
|
return null;
|
|
31
31
|
}
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
return !
|
|
35
|
-
},
|
|
36
|
-
if (!
|
|
37
|
-
return
|
|
38
|
-
const
|
|
39
|
-
return
|
|
40
|
-
},
|
|
32
|
+
}, oe = (r, o) => {
|
|
33
|
+
const i = o == null ? void 0 : o.origin;
|
|
34
|
+
return !i || V(r == null ? void 0 : r.authUrl) !== i ? null : i;
|
|
35
|
+
}, se = (r) => {
|
|
36
|
+
if (!r || /^\d{1,3}(?:\.\d{1,3}){3}$/.test(r) || r.includes(":"))
|
|
37
|
+
return r;
|
|
38
|
+
const o = r.split(".");
|
|
39
|
+
return o.length <= 2 ? r : o.slice(-2).join(".");
|
|
40
|
+
}, ce = (r, o) => {
|
|
41
41
|
try {
|
|
42
|
-
const
|
|
43
|
-
return
|
|
42
|
+
const i = new URL(r), p = new URL(o);
|
|
43
|
+
return i.protocol !== p.protocol ? !0 : se(i.hostname) !== se(p.hostname);
|
|
44
44
|
} catch {
|
|
45
45
|
return !0;
|
|
46
46
|
}
|
|
47
|
-
},
|
|
48
|
-
const
|
|
49
|
-
|
|
47
|
+
}, be = (r, { onBlocked: o, onClosed: i }) => {
|
|
48
|
+
const p = window.open(
|
|
49
|
+
r.authUrl,
|
|
50
50
|
"mm-embed-auth",
|
|
51
51
|
"popup,width=600,height=700"
|
|
52
52
|
);
|
|
53
|
-
if (!
|
|
54
|
-
return
|
|
53
|
+
if (!p)
|
|
54
|
+
return o(), () => {
|
|
55
55
|
};
|
|
56
|
-
const
|
|
57
|
-
|
|
56
|
+
const m = setInterval(() => {
|
|
57
|
+
p.closed && (clearInterval(m), i());
|
|
58
58
|
}, 1e3);
|
|
59
|
-
return () => clearInterval(
|
|
60
|
-
},
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
if (!
|
|
59
|
+
return () => clearInterval(m);
|
|
60
|
+
}, ae = ({ children: r, launcher: o, broker: i }) => {
|
|
61
|
+
const p = G(ee), [m, R] = L({}), [v, B] = L({}), [W, j] = L({}), [T, A] = L({}), $ = g(W);
|
|
62
|
+
$.current = W;
|
|
63
|
+
const _ = g(m);
|
|
64
|
+
_.current = m;
|
|
65
|
+
const U = g(null), q = g({}), I = g({}), D = g(i);
|
|
66
|
+
D.current = i;
|
|
67
|
+
const O = h((e) => {
|
|
68
|
+
const n = q.current[e];
|
|
69
|
+
if (!n)
|
|
70
70
|
return;
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
}, []),
|
|
74
|
-
(e,
|
|
75
|
-
e && (
|
|
76
|
-
...
|
|
71
|
+
const t = (s) => !s[e] || s[e].clientId ? s : { ...s, [e]: { ...s[e], clientId: n } };
|
|
72
|
+
R(t), A(t);
|
|
73
|
+
}, []), x = h(
|
|
74
|
+
(e, n) => {
|
|
75
|
+
e && (A((t) => t[e] ? t : {
|
|
76
|
+
...t,
|
|
77
77
|
[e]: {
|
|
78
78
|
origin: e,
|
|
79
|
-
reason:
|
|
80
|
-
clientId:
|
|
79
|
+
reason: n,
|
|
80
|
+
clientId: q.current[e] || null
|
|
81
81
|
}
|
|
82
|
-
}),
|
|
82
|
+
}), O(e));
|
|
83
83
|
},
|
|
84
|
-
[
|
|
85
|
-
),
|
|
86
|
-
(e, { v2:
|
|
87
|
-
|
|
88
|
-
...
|
|
89
|
-
[
|
|
90
|
-
origin:
|
|
84
|
+
[O]
|
|
85
|
+
), M = h(
|
|
86
|
+
(e, { v2: n = !1, origin: t = null } = {}) => {
|
|
87
|
+
t && (n && $.current[t] || (R((s) => s[t] ? s : {
|
|
88
|
+
...s,
|
|
89
|
+
[t]: {
|
|
90
|
+
origin: t,
|
|
91
91
|
authUrl: e.authUrl,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
v2: r,
|
|
92
|
+
status: n && D.current ? "broker" : "interactive",
|
|
93
|
+
v2: n,
|
|
95
94
|
scope: e.scope || null,
|
|
96
|
-
acceptsCredentials:
|
|
95
|
+
acceptsCredentials: I.current[t] || null,
|
|
97
96
|
consent: null,
|
|
98
97
|
error: null,
|
|
99
|
-
clientId: e.clientId ||
|
|
98
|
+
clientId: e.clientId || q.current[t] || null,
|
|
100
99
|
popupBlocked: !1
|
|
101
100
|
}
|
|
102
|
-
}),
|
|
101
|
+
}), O(t)));
|
|
103
102
|
},
|
|
104
|
-
[
|
|
105
|
-
),
|
|
106
|
-
|
|
107
|
-
}, []),
|
|
103
|
+
[O]
|
|
104
|
+
), y = g({}), F = h((e) => {
|
|
105
|
+
y.current[e] && (clearTimeout(y.current[e]), delete y.current[e]);
|
|
106
|
+
}, []), c = h(
|
|
108
107
|
(e) => {
|
|
109
|
-
|
|
110
|
-
if (!
|
|
111
|
-
return
|
|
112
|
-
const
|
|
113
|
-
return delete
|
|
108
|
+
F(e), R((n) => {
|
|
109
|
+
if (!n[e])
|
|
110
|
+
return n;
|
|
111
|
+
const t = { ...n };
|
|
112
|
+
return delete t[e], t;
|
|
114
113
|
});
|
|
115
114
|
},
|
|
116
|
-
[
|
|
117
|
-
),
|
|
115
|
+
[F]
|
|
116
|
+
), l = h(
|
|
118
117
|
(e) => {
|
|
119
|
-
e && (
|
|
120
|
-
...
|
|
121
|
-
[e]: (
|
|
118
|
+
e && (c(e), B((n) => ({
|
|
119
|
+
...n,
|
|
120
|
+
[e]: (n[e] || 0) + 1
|
|
122
121
|
})));
|
|
123
122
|
},
|
|
124
|
-
[
|
|
125
|
-
),
|
|
126
|
-
g((r) => !r[e] || r[e].status === "interactive" ? r : {
|
|
127
|
-
...r,
|
|
128
|
-
[e]: { ...r[e], status: "interactive" }
|
|
129
|
-
});
|
|
130
|
-
}, []), T = h(
|
|
123
|
+
[c]
|
|
124
|
+
), u = h(
|
|
131
125
|
(e) => {
|
|
132
|
-
|
|
126
|
+
c(e.origin);
|
|
133
127
|
},
|
|
134
|
-
[
|
|
135
|
-
),
|
|
136
|
-
(e,
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
139
|
-
if (
|
|
140
|
-
|
|
128
|
+
[c]
|
|
129
|
+
), d = h(
|
|
130
|
+
(e, n) => {
|
|
131
|
+
const t = oe(e, n);
|
|
132
|
+
if (t) {
|
|
133
|
+
if (ce(t, window.location.origin)) {
|
|
134
|
+
x(t, "cross-site-legacy");
|
|
141
135
|
return;
|
|
142
136
|
}
|
|
143
|
-
|
|
137
|
+
M(e, { origin: t });
|
|
144
138
|
}
|
|
145
139
|
},
|
|
146
|
-
[
|
|
140
|
+
[M, x]
|
|
147
141
|
);
|
|
148
142
|
b(() => {
|
|
149
|
-
if (!
|
|
143
|
+
if (!p)
|
|
150
144
|
return;
|
|
151
145
|
const e = [
|
|
152
|
-
|
|
153
|
-
|
|
146
|
+
p.addListener("*", "init", (n, t) => {
|
|
147
|
+
t != null && t.origin && (n != null && n.clientId) && (q.current[t.origin] = n.clientId, O(t.origin)), t != null && t.origin && Array.isArray(n == null ? void 0 : n.acceptsCredentials) ? I.current[t.origin] = n.acceptsCredentials : t != null && t.origin && ce(t.origin, window.location.origin) && x(t.origin, "cross-site-legacy");
|
|
154
148
|
}),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
149
|
+
p.addListener("*", "authorize", d),
|
|
150
|
+
p.addListener("*", "login", d),
|
|
151
|
+
p.addListener(
|
|
158
152
|
"*",
|
|
159
153
|
"credential-request",
|
|
160
|
-
(
|
|
154
|
+
(n, t) => M(n, { v2: !0, origin: oe(n, t) })
|
|
161
155
|
)
|
|
162
156
|
];
|
|
163
|
-
return () => e.forEach((
|
|
164
|
-
}, [
|
|
165
|
-
const e = (
|
|
166
|
-
const
|
|
167
|
-
if (!
|
|
157
|
+
return () => e.forEach((n) => n());
|
|
158
|
+
}, [p, d, M, O, x]), b(() => {
|
|
159
|
+
const e = (n) => {
|
|
160
|
+
const t = n == null ? void 0 : n.data;
|
|
161
|
+
if (!t || t.type !== "authorized")
|
|
168
162
|
return;
|
|
169
|
-
const
|
|
170
|
-
if (!(!
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
})), u(i);
|
|
179
|
-
} else
|
|
180
|
-
o(i);
|
|
163
|
+
const s = V(t.authUrl);
|
|
164
|
+
if (!(!s || n.origin !== s)) {
|
|
165
|
+
if (t.accessToken) {
|
|
166
|
+
if (!_.current[s])
|
|
167
|
+
return;
|
|
168
|
+
j((a) => ({
|
|
169
|
+
...a,
|
|
170
|
+
[s]: ne({ accessToken: t.accessToken })
|
|
171
|
+
})), c(s);
|
|
181
172
|
return;
|
|
182
173
|
}
|
|
183
|
-
|
|
174
|
+
l(s);
|
|
184
175
|
}
|
|
185
176
|
};
|
|
186
177
|
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
187
|
-
}, [
|
|
188
|
-
const
|
|
189
|
-
(e,
|
|
190
|
-
const
|
|
191
|
-
!
|
|
178
|
+
}, [c, l]);
|
|
179
|
+
const w = h(
|
|
180
|
+
(e, n) => {
|
|
181
|
+
const t = e == null ? void 0 : e.origin, s = ne(n);
|
|
182
|
+
!t || !s || (j((a) => ({ ...a, [t]: s })), c(t));
|
|
192
183
|
},
|
|
193
|
-
[
|
|
194
|
-
),
|
|
195
|
-
|
|
196
|
-
}, []),
|
|
197
|
-
async (e, { approve:
|
|
198
|
-
const
|
|
199
|
-
let
|
|
184
|
+
[c]
|
|
185
|
+
), f = h((e, n) => {
|
|
186
|
+
R((t) => t[e] ? { ...t, [e]: { ...t[e], ...n } } : t);
|
|
187
|
+
}, []), C = g({}), k = h(
|
|
188
|
+
async (e, { approve: n } = {}) => {
|
|
189
|
+
const t = D.current, { origin: s } = e;
|
|
190
|
+
let a;
|
|
200
191
|
try {
|
|
201
|
-
|
|
192
|
+
a = await t(
|
|
202
193
|
{
|
|
203
|
-
origin:
|
|
194
|
+
origin: s,
|
|
204
195
|
clientId: e.clientId,
|
|
205
196
|
scope: e.scope,
|
|
206
197
|
authUrl: e.authUrl
|
|
207
198
|
},
|
|
208
|
-
{ approve:
|
|
199
|
+
{ approve: n }
|
|
209
200
|
);
|
|
210
201
|
} catch {
|
|
211
|
-
|
|
212
|
-
status: e.silentUrl && te ? "silent" : "interactive"
|
|
213
|
-
});
|
|
202
|
+
n ? f(s, { error: { reason: "broker_unavailable" } }) : f(s, { status: "interactive" });
|
|
214
203
|
return;
|
|
215
204
|
}
|
|
216
|
-
const
|
|
217
|
-
if (
|
|
218
|
-
|
|
205
|
+
const Q = a == null ? void 0 : a.status, S = (a == null ? void 0 : a.body) || {};
|
|
206
|
+
if (Q === 200 && S.credential) {
|
|
207
|
+
w(e, S.credential);
|
|
219
208
|
return;
|
|
220
209
|
}
|
|
221
|
-
if (
|
|
222
|
-
|
|
210
|
+
if (Q === 409 && S.consentRequired) {
|
|
211
|
+
f(s, {
|
|
223
212
|
status: "interactive",
|
|
224
213
|
consent: {
|
|
225
|
-
client:
|
|
226
|
-
stepUp: !!
|
|
227
|
-
scope:
|
|
214
|
+
client: S.client || null,
|
|
215
|
+
stepUp: !!S.stepUp,
|
|
216
|
+
scope: S.scope || e.scope
|
|
228
217
|
},
|
|
229
218
|
error: null
|
|
230
219
|
});
|
|
231
220
|
return;
|
|
232
221
|
}
|
|
233
|
-
const
|
|
234
|
-
if (!
|
|
235
|
-
|
|
236
|
-
status: e.silentUrl && te ? "silent" : "interactive"
|
|
237
|
-
});
|
|
222
|
+
const Y = S.error || "broker_error";
|
|
223
|
+
if (!n && me.has(Y)) {
|
|
224
|
+
f(s, { status: "interactive" });
|
|
238
225
|
return;
|
|
239
226
|
}
|
|
240
|
-
if (
|
|
241
|
-
|
|
227
|
+
if (n && Y === "consent_denied") {
|
|
228
|
+
f(s, { error: null });
|
|
242
229
|
return;
|
|
243
230
|
}
|
|
244
|
-
if (
|
|
245
|
-
const
|
|
246
|
-
Number(
|
|
247
|
-
|
|
248
|
-
),
|
|
249
|
-
|
|
250
|
-
delete
|
|
251
|
-
delete
|
|
231
|
+
if (Y === "rate_limited" && !e.rateLimitRetried) {
|
|
232
|
+
const N = Math.min(
|
|
233
|
+
Number(S.retryAfter) > 0 ? Number(S.retryAfter) : he,
|
|
234
|
+
ge
|
|
235
|
+
), de = { ...e, rateLimitRetried: !0 };
|
|
236
|
+
F(s), y.current[s] = setTimeout(() => {
|
|
237
|
+
delete y.current[s], C.current[s] = !0, z.current(de, { approve: n }).finally(() => {
|
|
238
|
+
delete C.current[s];
|
|
252
239
|
});
|
|
253
|
-
},
|
|
240
|
+
}, N * 1e3), f(s, { rateLimitRetried: !0 });
|
|
254
241
|
return;
|
|
255
242
|
}
|
|
256
|
-
|
|
257
|
-
...
|
|
258
|
-
[
|
|
259
|
-
origin:
|
|
260
|
-
reason: `broker:${
|
|
261
|
-
detail:
|
|
262
|
-
clientId: e.clientId ||
|
|
243
|
+
c(s), A((N) => ({
|
|
244
|
+
...N,
|
|
245
|
+
[s]: {
|
|
246
|
+
origin: s,
|
|
247
|
+
reason: `broker:${Y}`,
|
|
248
|
+
detail: a || null,
|
|
249
|
+
clientId: e.clientId || q.current[s] || null
|
|
263
250
|
}
|
|
264
251
|
}));
|
|
265
252
|
},
|
|
266
|
-
[
|
|
267
|
-
),
|
|
268
|
-
|
|
269
|
-
Object.values(
|
|
270
|
-
e.status !== "broker" ||
|
|
271
|
-
delete
|
|
253
|
+
[w, f, c, F]
|
|
254
|
+
), z = g(k);
|
|
255
|
+
z.current = k, b(() => {
|
|
256
|
+
Object.values(m).forEach((e) => {
|
|
257
|
+
e.status !== "broker" || C.current[e.origin] || y.current[e.origin] || (C.current[e.origin] = !0, k(e).finally(() => {
|
|
258
|
+
delete C.current[e.origin];
|
|
272
259
|
}));
|
|
273
260
|
});
|
|
274
|
-
}, [
|
|
275
|
-
const
|
|
276
|
-
(e) => !
|
|
277
|
-
[
|
|
261
|
+
}, [m, k]);
|
|
262
|
+
const Z = h(
|
|
263
|
+
(e) => !D.current || !(e != null && e.consent) ? Promise.resolve() : k(e, { approve: !0 }),
|
|
264
|
+
[k]
|
|
278
265
|
);
|
|
279
|
-
b(() => {
|
|
280
|
-
|
|
281
|
-
Object.values(f).forEach((r) => {
|
|
282
|
-
r.status === "silent" && !e[r.origin] && (e[r.origin] = setTimeout(() => {
|
|
283
|
-
delete e[r.origin], a(r.origin);
|
|
284
|
-
}, Te));
|
|
285
|
-
}), Object.keys(e).forEach((r) => {
|
|
286
|
-
(!f[r] || f[r].status !== "silent") && (clearTimeout(e[r]), delete e[r]);
|
|
287
|
-
});
|
|
288
|
-
}, [f, a]), b(() => () => {
|
|
289
|
-
x.current && x.current(), Object.values(Y.current).forEach(clearTimeout), Object.values(C.current).forEach(clearTimeout);
|
|
266
|
+
b(() => () => {
|
|
267
|
+
U.current && U.current(), Object.values(y.current).forEach(clearTimeout);
|
|
290
268
|
}, []);
|
|
291
|
-
const
|
|
269
|
+
const H = h(
|
|
292
270
|
(e) => {
|
|
293
|
-
|
|
294
|
-
const
|
|
295
|
-
|
|
271
|
+
U.current && (U.current(), U.current = null);
|
|
272
|
+
const n = o || be;
|
|
273
|
+
U.current = n(e, {
|
|
296
274
|
onBlocked: () => {
|
|
297
|
-
|
|
298
|
-
...
|
|
299
|
-
[e.origin]: { ...
|
|
300
|
-
} :
|
|
275
|
+
R((t) => t[e.origin] ? {
|
|
276
|
+
...t,
|
|
277
|
+
[e.origin]: { ...t[e.origin], popupBlocked: !0 }
|
|
278
|
+
} : t);
|
|
301
279
|
},
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
te && g((n) => !n[e.origin] || !n[e.origin].silentUrl ? n : {
|
|
305
|
-
...n,
|
|
306
|
-
[e.origin]: { ...n[e.origin], status: "silent" }
|
|
307
|
-
});
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
o(e.origin);
|
|
311
|
-
}
|
|
280
|
+
// A popup closed without posting may still have completed login; the remounted guest re-requests.
|
|
281
|
+
onClosed: () => l(e.origin)
|
|
312
282
|
});
|
|
313
283
|
},
|
|
314
|
-
[
|
|
315
|
-
),
|
|
316
|
-
pending: Object.values(
|
|
284
|
+
[o, l]
|
|
285
|
+
), K = {
|
|
286
|
+
pending: Object.values(m).filter(
|
|
317
287
|
(e) => e.status === "interactive"
|
|
318
288
|
),
|
|
319
|
-
authorize:
|
|
320
|
-
approve:
|
|
321
|
-
complete:
|
|
322
|
-
dismiss:
|
|
323
|
-
originEpochs:
|
|
289
|
+
authorize: H,
|
|
290
|
+
approve: Z,
|
|
291
|
+
complete: w,
|
|
292
|
+
dismiss: u,
|
|
293
|
+
originEpochs: v,
|
|
324
294
|
credentials: W,
|
|
325
|
-
unsupported:
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
);
|
|
329
|
-
return /* @__PURE__ */ $.createElement(J.Provider, { value: j }, t, q.map((e) => /* @__PURE__ */ $.createElement(
|
|
330
|
-
"iframe",
|
|
331
|
-
{
|
|
332
|
-
key: `mm-silent-auth-${e.origin}`,
|
|
333
|
-
src: e.silentUrl,
|
|
334
|
-
title: `MachineMetrics silent authorization (${e.origin})`,
|
|
335
|
-
"aria-hidden": "true",
|
|
336
|
-
tabIndex: -1,
|
|
337
|
-
style: { display: "none" }
|
|
338
|
-
}
|
|
339
|
-
)));
|
|
295
|
+
unsupported: T
|
|
296
|
+
};
|
|
297
|
+
return /* @__PURE__ */ P.createElement(J.Provider, { value: K }, r);
|
|
340
298
|
};
|
|
341
|
-
|
|
299
|
+
ae.propTypes = {
|
|
342
300
|
children: E.node,
|
|
343
301
|
launcher: E.func,
|
|
344
302
|
/**
|
|
@@ -351,161 +309,161 @@ pe.propTypes = {
|
|
|
351
309
|
*/
|
|
352
310
|
broker: E.func
|
|
353
311
|
};
|
|
354
|
-
const
|
|
355
|
-
const { originEpochs:
|
|
356
|
-
return
|
|
357
|
-
},
|
|
358
|
-
const { credentials:
|
|
359
|
-
return
|
|
360
|
-
},
|
|
361
|
-
const { unsupported:
|
|
362
|
-
return
|
|
363
|
-
},
|
|
364
|
-
children:
|
|
365
|
-
authorizationLauncher:
|
|
366
|
-
credentialBroker:
|
|
367
|
-
ready:
|
|
312
|
+
const Oe = () => G(J), Ee = (r) => {
|
|
313
|
+
const { originEpochs: o } = G(J), i = V(r);
|
|
314
|
+
return i && o[i] || 0;
|
|
315
|
+
}, Re = (r) => {
|
|
316
|
+
const { credentials: o } = G(J), i = V(r);
|
|
317
|
+
return i && o[i] || null;
|
|
318
|
+
}, we = (r) => {
|
|
319
|
+
const { unsupported: o } = G(J), i = V(r);
|
|
320
|
+
return i && o[i] || null;
|
|
321
|
+
}, ie = "MMEmbeddableZoneProvider requires a boolean `ready` prop (true once the host holds the bearer its credentialBroker needs). Embedded apps will not load until it is provided.", ke = ({
|
|
322
|
+
children: r,
|
|
323
|
+
authorizationLauncher: o,
|
|
324
|
+
credentialBroker: i,
|
|
325
|
+
ready: p
|
|
368
326
|
}) => {
|
|
369
|
-
const
|
|
327
|
+
const m = p === !0, R = g(!1);
|
|
370
328
|
b(() => {
|
|
371
|
-
|
|
372
|
-
}, [
|
|
373
|
-
const [
|
|
374
|
-
var
|
|
375
|
-
return !!((
|
|
376
|
-
}, []),
|
|
377
|
-
B((
|
|
378
|
-
}, []),
|
|
379
|
-
B((
|
|
380
|
-
const
|
|
381
|
-
return delete
|
|
382
|
-
}),
|
|
383
|
-
const
|
|
384
|
-
return delete
|
|
385
|
-
}), delete
|
|
329
|
+
p !== void 0 || R.current || (R.current = !0, console.error(ie), typeof window != "undefined" && typeof window.alert == "function" && window.alert(ie));
|
|
330
|
+
}, [p]);
|
|
331
|
+
const [v, B] = L({}), [W, j] = L({}), T = g({}), A = g({}), $ = g({}), _ = h((c, l) => {
|
|
332
|
+
var u;
|
|
333
|
+
return !!((u = $.current[c]) != null && u.has(l));
|
|
334
|
+
}, []), U = h((c, l, u) => {
|
|
335
|
+
B((d) => ({ ...d, [c]: { origin: l, frameRef: u } }));
|
|
336
|
+
}, []), q = h((c) => {
|
|
337
|
+
B((l) => {
|
|
338
|
+
const u = { ...l };
|
|
339
|
+
return delete u[c], u;
|
|
340
|
+
}), j((l) => {
|
|
341
|
+
const u = { ...l };
|
|
342
|
+
return delete u[c], u;
|
|
343
|
+
}), delete $.current[c];
|
|
386
344
|
}, []);
|
|
387
345
|
b(() => {
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
},
|
|
391
|
-
var
|
|
392
|
-
if (!((
|
|
346
|
+
const c = (u = [], d, w) => {
|
|
347
|
+
u.forEach((f) => f(d, w));
|
|
348
|
+
}, l = (u) => {
|
|
349
|
+
var Z, H, K, e, n, t, s;
|
|
350
|
+
if (!((Z = u == null ? void 0 : u.data) != null && Z.instanceId))
|
|
393
351
|
return;
|
|
394
|
-
const { instanceId:
|
|
395
|
-
if (!
|
|
352
|
+
const { instanceId: d, type: w } = u.data, f = v[d], C = (K = (H = f == null ? void 0 : f.frameRef) == null ? void 0 : H.current) == null ? void 0 : K.contentWindow;
|
|
353
|
+
if (!C || u.source !== C || u.origin !== f.origin)
|
|
396
354
|
return;
|
|
397
|
-
const
|
|
398
|
-
if (
|
|
399
|
-
const { callbackId:
|
|
400
|
-
|
|
355
|
+
const k = { origin: u.origin }, z = T.current;
|
|
356
|
+
if (w === "response") {
|
|
357
|
+
const { callbackId: a, response: Q, error: S } = u.data, Y = A.current[a];
|
|
358
|
+
Y && (Y(Q, S), delete A.current[a]);
|
|
401
359
|
return;
|
|
402
360
|
}
|
|
403
|
-
if (
|
|
404
|
-
const { requestType:
|
|
405
|
-
|
|
361
|
+
if (w === "mark-registered") {
|
|
362
|
+
const { requestType: a } = u.data;
|
|
363
|
+
$.current[d] || ($.current[d] = /* @__PURE__ */ new Set()), $.current[d].add(a);
|
|
406
364
|
return;
|
|
407
365
|
}
|
|
408
|
-
|
|
366
|
+
w === "ready" && j((a) => ({ ...a, [d]: !0 })), c((e = z[d]) == null ? void 0 : e[w], u.data, k), c((n = z["*"]) == null ? void 0 : n[w], u.data, k), c((t = z[d]) == null ? void 0 : t["*"], u.data, k), c((s = z["*"]) == null ? void 0 : s["*"], u.data, k);
|
|
409
367
|
};
|
|
410
|
-
return window.addEventListener("message",
|
|
411
|
-
window.removeEventListener("message",
|
|
368
|
+
return window.addEventListener("message", l), () => {
|
|
369
|
+
window.removeEventListener("message", l);
|
|
412
370
|
};
|
|
413
|
-
}, [
|
|
414
|
-
const
|
|
415
|
-
(l, u
|
|
416
|
-
var
|
|
417
|
-
const
|
|
418
|
-
if (!
|
|
419
|
-
console.warn(`Origin not set for id: ${
|
|
371
|
+
}, [v]);
|
|
372
|
+
const I = h(
|
|
373
|
+
(c, l, u) => {
|
|
374
|
+
var w, f;
|
|
375
|
+
const d = v[c];
|
|
376
|
+
if (!d) {
|
|
377
|
+
console.warn(`Origin not set for id: ${c}. Unable to send message.`);
|
|
420
378
|
return;
|
|
421
379
|
}
|
|
422
|
-
(
|
|
423
|
-
{ type:
|
|
424
|
-
|
|
380
|
+
(f = (w = d == null ? void 0 : d.frameRef) == null ? void 0 : w.current) != null && f.contentWindow && d.frameRef.current.contentWindow.postMessage(
|
|
381
|
+
{ type: l, ...u, instanceId: c },
|
|
382
|
+
d.origin
|
|
425
383
|
);
|
|
426
384
|
},
|
|
427
|
-
[
|
|
428
|
-
),
|
|
429
|
-
async (l, u
|
|
430
|
-
const
|
|
431
|
-
delete
|
|
385
|
+
[v]
|
|
386
|
+
), D = g(0), O = h(() => `${Date.now()}-${++D.current}`, []), x = h(
|
|
387
|
+
async (c, l, u = {}) => new Promise((d, w) => {
|
|
388
|
+
const f = O(), C = (k, z) => {
|
|
389
|
+
delete A.current[f], z ? w(z) : d(k);
|
|
432
390
|
};
|
|
433
|
-
|
|
391
|
+
A.current[f] = C, I(c, "request", { callbackId: f, requestType: l, data: u });
|
|
434
392
|
}),
|
|
435
|
-
[
|
|
436
|
-
),
|
|
437
|
-
(
|
|
438
|
-
|
|
393
|
+
[I]
|
|
394
|
+
), M = h(
|
|
395
|
+
(c, l) => {
|
|
396
|
+
I(c, "load-options", l);
|
|
439
397
|
},
|
|
440
|
-
[
|
|
441
|
-
),
|
|
442
|
-
(
|
|
443
|
-
|
|
398
|
+
[I]
|
|
399
|
+
), y = h(
|
|
400
|
+
(c, l) => {
|
|
401
|
+
I(c, "validate", l);
|
|
444
402
|
},
|
|
445
|
-
[
|
|
446
|
-
),
|
|
403
|
+
[I]
|
|
404
|
+
), F = fe(
|
|
447
405
|
() => ({
|
|
448
|
-
registerFrame:
|
|
449
|
-
unregisterFrame:
|
|
450
|
-
sendMessage:
|
|
451
|
-
sendRequest:
|
|
452
|
-
loadOptions:
|
|
453
|
-
validate:
|
|
454
|
-
hasHandler:
|
|
406
|
+
registerFrame: U,
|
|
407
|
+
unregisterFrame: q,
|
|
408
|
+
sendMessage: I,
|
|
409
|
+
sendRequest: x,
|
|
410
|
+
loadOptions: M,
|
|
411
|
+
validate: y,
|
|
412
|
+
hasHandler: _,
|
|
455
413
|
readyFrames: W,
|
|
456
|
-
ready:
|
|
457
|
-
addListener: (l, u
|
|
458
|
-
|
|
414
|
+
ready: m,
|
|
415
|
+
addListener: (c, l, u) => (T.current[c] || (T.current[c] = {}), T.current[c][l] || (T.current[c][l] = []), T.current[c][l].push(u), () => {
|
|
416
|
+
T.current[c][l] = T.current[c][l].filter((d) => d !== u);
|
|
459
417
|
})
|
|
460
418
|
}),
|
|
461
419
|
[
|
|
420
|
+
U,
|
|
421
|
+
q,
|
|
422
|
+
I,
|
|
462
423
|
x,
|
|
463
|
-
Y,
|
|
464
|
-
R,
|
|
465
424
|
M,
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
U,
|
|
425
|
+
y,
|
|
426
|
+
_,
|
|
469
427
|
W,
|
|
470
|
-
|
|
428
|
+
m
|
|
471
429
|
]
|
|
472
430
|
);
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
-
|
|
431
|
+
return /* @__PURE__ */ P.createElement(ee.Provider, { value: F }, /* @__PURE__ */ P.createElement(
|
|
432
|
+
ae,
|
|
475
433
|
{
|
|
476
|
-
launcher:
|
|
477
|
-
broker:
|
|
434
|
+
launcher: o,
|
|
435
|
+
broker: i
|
|
478
436
|
},
|
|
479
|
-
|
|
437
|
+
r
|
|
480
438
|
));
|
|
481
|
-
}, X = (
|
|
482
|
-
const
|
|
483
|
-
if (
|
|
439
|
+
}, X = (r, o, i) => {
|
|
440
|
+
const p = G(ee);
|
|
441
|
+
if (p === null)
|
|
484
442
|
throw new Error(
|
|
485
443
|
"useEmbeddedEffect must be used within a MMEmbeddableZoneProvider"
|
|
486
444
|
);
|
|
487
|
-
const
|
|
445
|
+
const m = g(i);
|
|
488
446
|
b(() => {
|
|
489
|
-
|
|
490
|
-
}, [
|
|
491
|
-
if (!(!
|
|
492
|
-
if (
|
|
493
|
-
const
|
|
494
|
-
return
|
|
495
|
-
|
|
496
|
-
`key-pressed:${
|
|
497
|
-
(...B) =>
|
|
447
|
+
m.current = i;
|
|
448
|
+
}, [i]), b(() => {
|
|
449
|
+
if (!(!r || !o)) {
|
|
450
|
+
if (o.startsWith("key:")) {
|
|
451
|
+
const R = o.substring(4);
|
|
452
|
+
return p.readyFrames[r] && p.sendMessage(r, "subscribe-key", { keyChord: R }), p.addListener(
|
|
453
|
+
r,
|
|
454
|
+
`key-pressed:${R}`,
|
|
455
|
+
(...B) => m.current(...B)
|
|
498
456
|
);
|
|
499
457
|
}
|
|
500
|
-
return
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
(...
|
|
458
|
+
return p.addListener(
|
|
459
|
+
r,
|
|
460
|
+
o,
|
|
461
|
+
(...R) => m.current(...R)
|
|
504
462
|
);
|
|
505
463
|
}
|
|
506
|
-
}, [
|
|
464
|
+
}, [p, r, o]);
|
|
507
465
|
};
|
|
508
|
-
|
|
466
|
+
ke.propTypes = {
|
|
509
467
|
children: E.node.isRequired,
|
|
510
468
|
/**
|
|
511
469
|
* Required. True once the host holds its bearer; zones mount no iframe until then. Missing =
|
|
@@ -522,19 +480,19 @@ Me.propTypes = {
|
|
|
522
480
|
/**
|
|
523
481
|
* Optional credential broker for hosts that are first-party MachineMetrics clients
|
|
524
482
|
* (`async (request, { approve }) => result`, see EmbeddedAuthorizationManager). When present,
|
|
525
|
-
* v2 credential requests are brokered server-side (no popup
|
|
483
|
+
* v2 credential requests are brokered server-side (no popup) and consent is
|
|
526
484
|
* rendered natively by the host from the broker's `client` identity.
|
|
527
485
|
*/
|
|
528
486
|
credentialBroker: E.func
|
|
529
487
|
};
|
|
530
|
-
const
|
|
488
|
+
const re = te.default || te, Te = 1e4, Ie = "credentials", _e = (r, o) => `${r}/mm-embedded-interop?id=${encodeURIComponent(o)}&origin=${encodeURIComponent(
|
|
531
489
|
window.location.origin
|
|
532
|
-
)}&caps=${
|
|
490
|
+
)}&caps=${Ie}`, Me = re.iframe`
|
|
533
491
|
width: 100%;
|
|
534
492
|
height: 100%;
|
|
535
493
|
border: none;
|
|
536
|
-
visibility: ${(
|
|
537
|
-
`,
|
|
494
|
+
visibility: ${(r) => r.$isReady ? "visible" : "hidden"};
|
|
495
|
+
`, ye = re.div`
|
|
538
496
|
width: 100%;
|
|
539
497
|
height: 100%;
|
|
540
498
|
display: flex;
|
|
@@ -547,39 +505,39 @@ const se = ie.default || ie, Le = 1e4, Ce = "credentials", Ae = (t, s) => `${t}/
|
|
|
547
505
|
text-align: center;
|
|
548
506
|
color: #555;
|
|
549
507
|
font-size: 14px;
|
|
550
|
-
`,
|
|
551
|
-
const
|
|
552
|
-
switch (
|
|
508
|
+
`, Ce = (r) => {
|
|
509
|
+
const o = r && r.origin || "This app", i = r && r.reason || "";
|
|
510
|
+
switch (i) {
|
|
553
511
|
case "broker:scope_above_ceiling":
|
|
554
512
|
return {
|
|
555
|
-
title: `${
|
|
513
|
+
title: `${o} can’t be authorized here`,
|
|
556
514
|
detail: "It asks for permissions your role doesn’t have."
|
|
557
515
|
};
|
|
558
516
|
case "broker:origin_mismatch":
|
|
559
517
|
case "broker:unknown_client":
|
|
560
518
|
return {
|
|
561
|
-
title: `${
|
|
519
|
+
title: `${o} can’t be authorized here`,
|
|
562
520
|
detail: "It isn’t registered to run at this address."
|
|
563
521
|
};
|
|
564
522
|
case "broker:cross_company_principal":
|
|
565
523
|
return {
|
|
566
|
-
title: `${
|
|
524
|
+
title: `${o} can’t be authorized here`,
|
|
567
525
|
detail: "It can’t be authorized for this account."
|
|
568
526
|
};
|
|
569
527
|
default:
|
|
570
|
-
return
|
|
571
|
-
title: `${
|
|
528
|
+
return i.startsWith("broker:") ? {
|
|
529
|
+
title: `${o} can’t be authorized here`,
|
|
572
530
|
detail: "Authorization was refused."
|
|
573
531
|
} : {
|
|
574
|
-
title: `${
|
|
532
|
+
title: `${o} can’t be embedded here`,
|
|
575
533
|
detail: "It needs an update to support embedding from a different domain."
|
|
576
534
|
};
|
|
577
535
|
}
|
|
578
|
-
},
|
|
579
|
-
const
|
|
580
|
-
return /* @__PURE__ */
|
|
536
|
+
}, le = ({ entry: r }) => {
|
|
537
|
+
const o = Ce(r);
|
|
538
|
+
return /* @__PURE__ */ P.createElement(ye, { "data-reason": r && r.reason || void 0 }, /* @__PURE__ */ P.createElement("div", { style: { fontWeight: 600 } }, o.title), /* @__PURE__ */ P.createElement("div", { style: { fontSize: 12, color: "#888" } }, o.detail));
|
|
581
539
|
};
|
|
582
|
-
|
|
540
|
+
le.propTypes = {
|
|
583
541
|
entry: E.shape({
|
|
584
542
|
origin: E.string,
|
|
585
543
|
name: E.string,
|
|
@@ -587,115 +545,115 @@ he.propTypes = {
|
|
|
587
545
|
detail: E.object
|
|
588
546
|
})
|
|
589
547
|
};
|
|
590
|
-
const
|
|
548
|
+
const Le = re.div`
|
|
591
549
|
height: 100%;
|
|
592
550
|
display: flex;
|
|
593
551
|
flex: 1;
|
|
594
552
|
align-items: center;
|
|
595
553
|
justify-content: center;
|
|
596
|
-
`,
|
|
597
|
-
id:
|
|
598
|
-
src:
|
|
599
|
-
path:
|
|
600
|
-
onInit:
|
|
554
|
+
`, Ae = () => /* @__PURE__ */ P.createElement(Le, null, /* @__PURE__ */ P.createElement("div", { style: { textAlign: "center" } }, "This app couldn’t be loaded as an embeddable widget.")), Ue = ({
|
|
555
|
+
id: r,
|
|
556
|
+
src: o,
|
|
557
|
+
path: i,
|
|
558
|
+
onInit: p = () => {
|
|
601
559
|
},
|
|
602
|
-
onTimeout:
|
|
603
|
-
context:
|
|
604
|
-
params:
|
|
560
|
+
onTimeout: m,
|
|
561
|
+
context: R = {},
|
|
562
|
+
params: v = {},
|
|
605
563
|
renderUnsupported: B,
|
|
606
564
|
renderTimeout: W,
|
|
607
|
-
...
|
|
565
|
+
...j
|
|
608
566
|
}) => {
|
|
609
|
-
if ("isConfiguring" in
|
|
567
|
+
if ("isConfiguring" in j)
|
|
610
568
|
return console.error(
|
|
611
569
|
"isConfiguring must be passed via the params prop to MMEmbeddableZone"
|
|
612
570
|
), null;
|
|
613
|
-
if ("colorMode" in
|
|
571
|
+
if ("colorMode" in R)
|
|
614
572
|
return console.error(
|
|
615
573
|
"colorMode must be passed via the params prop to MMEmbeddableZone"
|
|
616
574
|
), null;
|
|
617
|
-
if ("isFullScreen" in
|
|
575
|
+
if ("isFullScreen" in R)
|
|
618
576
|
return console.error(
|
|
619
577
|
"isFullScreen must be passed via the params prop to MMEmbeddableZone"
|
|
620
578
|
), null;
|
|
621
|
-
const
|
|
622
|
-
|
|
623
|
-
), [
|
|
624
|
-
|
|
579
|
+
const T = g(), [A, $] = L(), [_, U] = L(0), [q, I] = L(!1), [D, O] = L(!1), x = Ee(o), M = Re(o), y = we(o), [F, c] = L(0), [l, u] = L(null), { registerFrame: d, unregisterFrame: w, sendMessage: f, ready: C } = G(
|
|
580
|
+
ee
|
|
581
|
+
), [k, z] = L(), Z = g(), H = g(m), K = g(p), e = g(!1), n = h(() => {
|
|
582
|
+
e.current = !1, clearTimeout(Z.current), U(0), I(!1), O(!1), u(null);
|
|
625
583
|
}, []);
|
|
626
584
|
b(() => {
|
|
627
|
-
(
|
|
628
|
-
}, [
|
|
629
|
-
|
|
630
|
-
}, [
|
|
631
|
-
|
|
632
|
-
}, [
|
|
633
|
-
|
|
585
|
+
(x > 0 || F > 0) && n();
|
|
586
|
+
}, [x, F, n]), b(() => {
|
|
587
|
+
H.current = m;
|
|
588
|
+
}, [m]), b(() => {
|
|
589
|
+
K.current = p;
|
|
590
|
+
}, [p]), b(() => {
|
|
591
|
+
_ && f(r, "set-context", {
|
|
634
592
|
context: {
|
|
635
|
-
...
|
|
593
|
+
...R
|
|
636
594
|
}
|
|
637
595
|
});
|
|
638
|
-
}, [
|
|
639
|
-
|
|
640
|
-
}, [
|
|
641
|
-
|
|
642
|
-
}, [
|
|
643
|
-
|
|
644
|
-
}, [
|
|
645
|
-
if (!
|
|
596
|
+
}, [R, r, _]), b(() => {
|
|
597
|
+
_ && f(r, "set-params", { params: v });
|
|
598
|
+
}, [v, r, _]), b(() => {
|
|
599
|
+
i !== void 0 && z((i == null ? void 0 : i.indexOf("/")) === 0 ? i : `/${i}`);
|
|
600
|
+
}, [i]), b(() => {
|
|
601
|
+
k === void 0 || !_ || f(r, "navigate", { path: k });
|
|
602
|
+
}, [k, _, r, f]), b(() => {
|
|
603
|
+
if (!o || !r || !T)
|
|
646
604
|
return;
|
|
647
|
-
if (!
|
|
648
|
-
|
|
605
|
+
if (!C) {
|
|
606
|
+
n(), $(void 0);
|
|
649
607
|
return;
|
|
650
608
|
}
|
|
651
|
-
|
|
652
|
-
const
|
|
653
|
-
return
|
|
654
|
-
|
|
609
|
+
n();
|
|
610
|
+
const a = new URL(o);
|
|
611
|
+
return d(r, a.origin, T), K.current(), $(_e(a.origin, r)), () => {
|
|
612
|
+
w(r);
|
|
655
613
|
};
|
|
656
|
-
}, [
|
|
657
|
-
if (!(!
|
|
658
|
-
return
|
|
659
|
-
|
|
660
|
-
},
|
|
661
|
-
}, [
|
|
662
|
-
const
|
|
663
|
-
|
|
614
|
+
}, [o, r, C, d, T, n]), b(() => {
|
|
615
|
+
if (!(!A || e.current))
|
|
616
|
+
return Z.current = setTimeout(() => {
|
|
617
|
+
I(!0), H.current && H.current();
|
|
618
|
+
}, Te), () => clearTimeout(Z.current);
|
|
619
|
+
}, [A, o, x, F]);
|
|
620
|
+
const t = h(() => {
|
|
621
|
+
e.current = !0, clearTimeout(Z.current), I(!1);
|
|
664
622
|
}, []);
|
|
665
|
-
X(
|
|
666
|
-
|
|
667
|
-
}), X(
|
|
668
|
-
|
|
623
|
+
X(r, "init", (a) => {
|
|
624
|
+
t(), Array.isArray(a == null ? void 0 : a.acceptsCredentials) && u(a.acceptsCredentials);
|
|
625
|
+
}), X(r, "authorize", t), X(r, "login", t), X(r, "credential-request", () => {
|
|
626
|
+
t(), O(!0);
|
|
669
627
|
}), b(() => {
|
|
670
|
-
if (!
|
|
628
|
+
if (!D || !M)
|
|
671
629
|
return;
|
|
672
|
-
const
|
|
673
|
-
if (Array.isArray(
|
|
630
|
+
const a = l;
|
|
631
|
+
if (Array.isArray(a) && !a.includes(M.kind))
|
|
674
632
|
return;
|
|
675
|
-
const
|
|
676
|
-
|
|
677
|
-
}, [
|
|
678
|
-
|
|
633
|
+
const Q = M.kind === "access_token" ? { accessToken: M.accessToken } : {};
|
|
634
|
+
f(r, "credential", { ...Q, credential: M });
|
|
635
|
+
}, [D, M, l, r, f]), X(r, "ready", () => {
|
|
636
|
+
t(), U((a) => a + 1);
|
|
679
637
|
});
|
|
680
|
-
const
|
|
681
|
-
return X(
|
|
682
|
-
|
|
683
|
-
|
|
638
|
+
const s = g();
|
|
639
|
+
return X(r, "heartbeat", () => {
|
|
640
|
+
s.current && clearTimeout(s.current), s.current = setTimeout(() => {
|
|
641
|
+
c((a) => a + 1);
|
|
684
642
|
}, 6e3);
|
|
685
643
|
}), b(() => () => {
|
|
686
|
-
|
|
687
|
-
}, []),
|
|
688
|
-
|
|
644
|
+
s.current && clearTimeout(s.current);
|
|
645
|
+
}, []), y ? B ? B(y) : /* @__PURE__ */ P.createElement(le, { entry: y }) : q && !_ ? W ? W() : /* @__PURE__ */ P.createElement(Ae, null) : /* @__PURE__ */ P.createElement(
|
|
646
|
+
Me,
|
|
689
647
|
{
|
|
690
|
-
key: `auth-epoch-${
|
|
691
|
-
$isReady:
|
|
692
|
-
ref:
|
|
693
|
-
src:
|
|
694
|
-
...
|
|
648
|
+
key: `auth-epoch-${x}-frame-${F}`,
|
|
649
|
+
$isReady: _,
|
|
650
|
+
ref: T,
|
|
651
|
+
src: A,
|
|
652
|
+
...j
|
|
695
653
|
}
|
|
696
654
|
);
|
|
697
655
|
};
|
|
698
|
-
|
|
656
|
+
Ue.propTypes = {
|
|
699
657
|
id: E.string,
|
|
700
658
|
src: E.string.isRequired,
|
|
701
659
|
path: E.string,
|
|
@@ -715,18 +673,18 @@ Se.propTypes = {
|
|
|
715
673
|
renderTimeout: E.func
|
|
716
674
|
};
|
|
717
675
|
export {
|
|
718
|
-
|
|
676
|
+
pe as CREDENTIAL_KIND_ACCESS_TOKEN,
|
|
719
677
|
J as EmbeddedAuthorizationContext,
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
678
|
+
Ue as MMEmbeddableZone,
|
|
679
|
+
ee as MMEmbeddableZoneContext,
|
|
680
|
+
ke as MMEmbeddableZoneProvider,
|
|
681
|
+
ce as isCrossSite,
|
|
682
|
+
ne as normalizeCredential,
|
|
683
|
+
be as popupAuthorizationLauncher,
|
|
684
|
+
Ce as unsupportedCopy,
|
|
685
|
+
Oe as useEmbeddedAuthorizations,
|
|
686
|
+
Re as useEmbeddedCredential,
|
|
729
687
|
X as useEmbeddedEffect,
|
|
730
|
-
|
|
731
|
-
|
|
688
|
+
Ee as useEmbeddedOriginEpoch,
|
|
689
|
+
we as useEmbeddedUnsupported
|
|
732
690
|
};
|