@volter/twin-xai 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.
- package/LICENSE +202 -0
- package/README.md +246 -0
- package/client/xai-device-auth.css +246 -0
- package/client/xai-device-auth.tsx +138 -0
- package/dist/client/xai-device-auth.bundle.js +18 -0
- package/dist/client/xai-device-auth.css +246 -0
- package/dist/client/xai-device-auth.d.ts +19 -0
- package/dist/client/xai-device-auth.js +50 -0
- package/dist/client/xai-device-auth.tsx +138 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +28 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.js +70 -0
- package/dist/src/xai-budget.d.ts +60 -0
- package/dist/src/xai-budget.js +139 -0
- package/dist/src/xai-capabilities.d.ts +4 -0
- package/dist/src/xai-capabilities.js +1072 -0
- package/dist/src/xai-conformance.d.ts +13 -0
- package/dist/src/xai-conformance.js +148 -0
- package/dist/src/xai-connector.d.ts +82 -0
- package/dist/src/xai-connector.js +174 -0
- package/dist/src/xai-device-auth-css.gen.d.ts +1 -0
- package/dist/src/xai-device-auth-css.gen.js +6 -0
- package/dist/src/xai-device-auth-ui.d.ts +13 -0
- package/dist/src/xai-device-auth-ui.js +72 -0
- package/dist/src/xai-models.d.ts +57 -0
- package/dist/src/xai-models.js +102 -0
- package/dist/src/xai-oauth.d.ts +30 -0
- package/dist/src/xai-oauth.js +279 -0
- package/dist/src/xai-scenario.d.ts +33 -0
- package/dist/src/xai-scenario.js +139 -0
- package/dist/src/xai-server.d.ts +36 -0
- package/dist/src/xai-server.js +232 -0
- package/dist/src/xai-stub.d.ts +69 -0
- package/dist/src/xai-stub.js +210 -0
- package/dist/src/xai-twin.d.ts +89 -0
- package/dist/src/xai-twin.js +883 -0
- package/dist/src/xai-types.d.ts +118 -0
- package/dist/src/xai-types.js +6 -0
- package/package.json +76 -0
- package/src/cli.ts +27 -0
- package/src/index.ts +120 -0
- package/src/xai-budget.ts +165 -0
- package/src/xai-capabilities.ts +1046 -0
- package/src/xai-conformance.ts +136 -0
- package/src/xai-connector.ts +212 -0
- package/src/xai-device-auth-css.gen.ts +6 -0
- package/src/xai-device-auth-ui.ts +90 -0
- package/src/xai-journey.uitest.ts +155 -0
- package/src/xai-models.ts +154 -0
- package/src/xai-oauth.ts +301 -0
- package/src/xai-scenario.ts +148 -0
- package/src/xai-server.ts +258 -0
- package/src/xai-stub.ts +213 -0
- package/src/xai-twin.ts +960 -0
- package/src/xai-types.ts +111 -0
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light;
|
|
3
|
+
--xai-bg: #ffffff;
|
|
4
|
+
--xai-text: #0a0a0a;
|
|
5
|
+
--xai-muted: #777777;
|
|
6
|
+
--xai-faint: #fafafa;
|
|
7
|
+
--xai-border: #dedede;
|
|
8
|
+
--xai-error: #b42318;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
* { box-sizing: border-box; }
|
|
12
|
+
|
|
13
|
+
html, body, #root { min-height: 100%; }
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
background: var(--xai-bg);
|
|
18
|
+
color: var(--xai-text);
|
|
19
|
+
font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
20
|
+
-webkit-font-smoothing: antialiased;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
button, input { font: inherit; }
|
|
24
|
+
|
|
25
|
+
.account-page { min-height: 100vh; }
|
|
26
|
+
|
|
27
|
+
.account-header {
|
|
28
|
+
position: fixed;
|
|
29
|
+
inset: 0 0 auto;
|
|
30
|
+
z-index: 2;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
height: 88px;
|
|
35
|
+
padding: 20px 24px;
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.account-header > * { pointer-events: auto; }
|
|
40
|
+
|
|
41
|
+
.account-home {
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
color: var(--xai-text);
|
|
44
|
+
text-decoration: none;
|
|
45
|
+
padding: 8px 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.xai-mark {
|
|
49
|
+
display: block;
|
|
50
|
+
width: 52px;
|
|
51
|
+
height: auto;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.sign-out {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
text-decoration: none;
|
|
58
|
+
min-height: 40px;
|
|
59
|
+
padding: 0 18px;
|
|
60
|
+
border: 1px solid var(--xai-border);
|
|
61
|
+
border-radius: 999px;
|
|
62
|
+
background: var(--xai-bg);
|
|
63
|
+
color: var(--xai-text);
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
font-size: 14px;
|
|
66
|
+
transition: background .15s ease, border-color .15s ease;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.sign-out:hover { background: #f6f6f6; border-color: #c8c8c8; }
|
|
70
|
+
|
|
71
|
+
.auth-shell {
|
|
72
|
+
width: min(512px, calc(100% - 40px));
|
|
73
|
+
margin: 0 auto;
|
|
74
|
+
padding: clamp(106px, 11vh, 112px) 0 72px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.auth-shell-compact {
|
|
78
|
+
width: min(448px, calc(100% - 40px));
|
|
79
|
+
padding-top: clamp(240px, 35.7vh, 351px);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
h1 {
|
|
83
|
+
margin: 0 0 32px;
|
|
84
|
+
font-size: 16px;
|
|
85
|
+
line-height: 1.3;
|
|
86
|
+
font-weight: 650;
|
|
87
|
+
letter-spacing: -0.015em;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.auth-shell-compact h1 {
|
|
91
|
+
margin-bottom: 16px;
|
|
92
|
+
font-size: 26px;
|
|
93
|
+
font-weight: 450;
|
|
94
|
+
letter-spacing: -0.035em;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.lead {
|
|
98
|
+
margin: 0 0 28px;
|
|
99
|
+
color: var(--xai-muted);
|
|
100
|
+
font-size: 17px;
|
|
101
|
+
line-height: 1.5;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.entry-form input {
|
|
105
|
+
width: 100%;
|
|
106
|
+
height: 42px;
|
|
107
|
+
border: 1px solid #252525;
|
|
108
|
+
border-radius: 0;
|
|
109
|
+
background: var(--xai-bg);
|
|
110
|
+
color: var(--xai-text);
|
|
111
|
+
padding: 0 16px;
|
|
112
|
+
text-align: center;
|
|
113
|
+
text-transform: uppercase;
|
|
114
|
+
letter-spacing: .08em;
|
|
115
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
116
|
+
font-size: 18px;
|
|
117
|
+
outline: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.entry-form input:focus { box-shadow: 0 0 0 2px #bbbbbb; }
|
|
121
|
+
.device-help, .form-error {
|
|
122
|
+
margin: 14px 0 20px;
|
|
123
|
+
color: var(--xai-muted);
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
line-height: 1.45;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.form-error { margin-bottom: -7px; color: var(--xai-error); }
|
|
129
|
+
|
|
130
|
+
.primary-action, .secondary-action {
|
|
131
|
+
min-height: 40px;
|
|
132
|
+
border-radius: 999px;
|
|
133
|
+
padding: 0 24px;
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
font-size: 16px;
|
|
136
|
+
transition: transform .12s ease, background .15s ease;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.primary-action {
|
|
140
|
+
border: 1px solid #050505;
|
|
141
|
+
background: #050505;
|
|
142
|
+
color: #ffffff;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.primary-action:hover { background: #252525; }
|
|
146
|
+
.primary-action:disabled,
|
|
147
|
+
.primary-action:disabled:hover {
|
|
148
|
+
background: #4b4b4b;
|
|
149
|
+
border-color: #4b4b4b;
|
|
150
|
+
cursor: default;
|
|
151
|
+
}
|
|
152
|
+
.primary-action:active, .secondary-action:active { transform: scale(.99); }
|
|
153
|
+
.entry-form .primary-action { width: 100%; min-height: 50px; }
|
|
154
|
+
|
|
155
|
+
.permission-list {
|
|
156
|
+
display: grid;
|
|
157
|
+
gap: 4px;
|
|
158
|
+
margin: 0;
|
|
159
|
+
padding: 0;
|
|
160
|
+
list-style: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.permission-list li {
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
min-height: 44px;
|
|
167
|
+
padding: 0 16px;
|
|
168
|
+
border-radius: 13px;
|
|
169
|
+
background: var(--xai-faint);
|
|
170
|
+
font-size: 15px;
|
|
171
|
+
font-weight: 500;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.permission-icon {
|
|
175
|
+
flex: 0 0 auto;
|
|
176
|
+
width: 17px;
|
|
177
|
+
height: 17px;
|
|
178
|
+
margin-right: 16px;
|
|
179
|
+
color: #888888;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.decision-form {
|
|
183
|
+
display: grid;
|
|
184
|
+
grid-template-columns: 1fr 1fr;
|
|
185
|
+
gap: 12px;
|
|
186
|
+
margin-top: 32px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.secondary-action {
|
|
190
|
+
border: 1px solid var(--xai-border);
|
|
191
|
+
background: var(--xai-bg);
|
|
192
|
+
color: var(--xai-text);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.secondary-action:hover { background: #f7f7f7; }
|
|
196
|
+
|
|
197
|
+
.result-icon {
|
|
198
|
+
display: grid;
|
|
199
|
+
place-items: center;
|
|
200
|
+
width: 48px;
|
|
201
|
+
height: 48px;
|
|
202
|
+
margin-bottom: 24px;
|
|
203
|
+
border-radius: 50%;
|
|
204
|
+
background: #f1f1f1;
|
|
205
|
+
font-size: 28px;
|
|
206
|
+
font-weight: 350;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.result-icon-approved { background: #050505; color: #ffffff; }
|
|
210
|
+
.result-copy { margin-bottom: 6px; }
|
|
211
|
+
|
|
212
|
+
.sr-only {
|
|
213
|
+
position: absolute;
|
|
214
|
+
width: 1px;
|
|
215
|
+
height: 1px;
|
|
216
|
+
padding: 0;
|
|
217
|
+
margin: -1px;
|
|
218
|
+
overflow: hidden;
|
|
219
|
+
clip: rect(0, 0, 0, 0);
|
|
220
|
+
white-space: nowrap;
|
|
221
|
+
border: 0;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
button:focus-visible, a:focus-visible, input:focus-visible {
|
|
225
|
+
outline: 2px solid #666666;
|
|
226
|
+
outline-offset: 3px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@media (max-width: 640px) {
|
|
230
|
+
.account-header { height: 76px; padding: 16px 20px; }
|
|
231
|
+
.sign-out { min-height: 42px; padding: 0 17px; font-size: 15px; }
|
|
232
|
+
.auth-shell, .auth-shell-compact {
|
|
233
|
+
width: min(100% - 32px, 532px);
|
|
234
|
+
padding-top: 126px;
|
|
235
|
+
}
|
|
236
|
+
.auth-shell h1, .auth-shell-compact h1 { font-size: 27px; margin-bottom: 18px; }
|
|
237
|
+
.lead { font-size: 16px; }
|
|
238
|
+
.permission-list li { min-height: 54px; padding: 0 14px; font-size: 15px; }
|
|
239
|
+
.permission-icon { margin-right: 14px; }
|
|
240
|
+
.decision-form { grid-template-columns: 1fr; margin-top: 28px; }
|
|
241
|
+
.decision-form .primary-action { grid-row: 1; }
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@media (prefers-reduced-motion: reduce) {
|
|
245
|
+
* { transition: none !important; }
|
|
246
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// xAI's Grok Build device-authorization surface, rendered by the Twin on the vendor paths.
|
|
2
|
+
//
|
|
3
|
+
// This is the ONE renderer for the device entry, consent, and terminal screens. The server
|
|
4
|
+
// renders these exported components, the capability census renders these same components over
|
|
5
|
+
// projected OAuth state, and the browser journey drives the forms they emit. The forms are
|
|
6
|
+
// deliberately server-native: the authorization round trip works with JavaScript disabled.
|
|
7
|
+
import type { ReactNode } from 'react';
|
|
8
|
+
|
|
9
|
+
export const XAI_DEVICE_PERMISSIONS = [
|
|
10
|
+
'Verify your identity',
|
|
11
|
+
'Read your profile (name, avatar)',
|
|
12
|
+
'Read your email address',
|
|
13
|
+
"Maintain access when you're not present",
|
|
14
|
+
'Use the xAI API',
|
|
15
|
+
'Read and write access Grok.com',
|
|
16
|
+
] as const;
|
|
17
|
+
|
|
18
|
+
export type XaiDeviceAuthView = {
|
|
19
|
+
userCode: string;
|
|
20
|
+
status: 'pending' | 'approved' | 'denied' | 'connected' | 'expired' | 'unknown';
|
|
21
|
+
permissions: readonly string[];
|
|
22
|
+
error?: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function XaiMark() {
|
|
26
|
+
return (
|
|
27
|
+
<svg className="xai-mark" viewBox="0 0 834 318" fill="none" aria-hidden="true">
|
|
28
|
+
<path d="M832.565 0.590983C736.633 8.41256 359.563 55.1598 98.1057 317.999H1.08203L11.9228 307.195C66.6371 254.336 308.741 30.3127 832.565 0.299805V0.590983Z" fill="black" />
|
|
29
|
+
<path d="M504.192 317.999H428.146L278.315 208.933C292.122 200.25 306.018 191.98 319.957 184.104L504.192 317.999Z" fill="black" />
|
|
30
|
+
<path d="M382.659 318H306.648L283.589 301.228H154.852C163.915 293.18 173.091 285.368 182.362 277.784H251.322L215.636 251.826C228.392 242.335 241.288 233.244 254.287 224.535L382.659 318Z" fill="black" />
|
|
31
|
+
<path d="M105.997 116.89L164.612 159.488C150.024 168.078 136.37 176.58 123.626 184.897L30.0522 116.854L105.997 116.89Z" fill="black" />
|
|
32
|
+
</svg>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// `base` is where the twin is reached (`twinPublicBase`: origin plus any served-World mount path);
|
|
37
|
+
// every link and form action the pages emit is built from it, so they stay inside the World's
|
|
38
|
+
// mount. Empty for an in-process render, where the paths are the vendor's own root-relative ones.
|
|
39
|
+
function AccountHeader({ base, signOutReturnTo, userCode }: { base: string; signOutReturnTo?: string; userCode?: string }) {
|
|
40
|
+
const signOutHref = signOutReturnTo
|
|
41
|
+
? `${base}/sign-out?redirect=oauth2-provider&return_to=${encodeURIComponent(signOutReturnTo)}`
|
|
42
|
+
: `${base}/sign-out`;
|
|
43
|
+
return (
|
|
44
|
+
<header className="account-header">
|
|
45
|
+
<a className="account-home" href={`${base}/`} aria-label="SpaceXAI account home link">
|
|
46
|
+
<XaiMark />
|
|
47
|
+
</a>
|
|
48
|
+
{userCode ? (
|
|
49
|
+
<a className="sign-out" href={signOutHref}>Sign out</a>
|
|
50
|
+
) : null}
|
|
51
|
+
</header>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function AccountShell({ base, children, userCode, compact = false, result = false, signOutReturnTo }: { base: string; children: ReactNode; userCode?: string; compact?: boolean; result?: boolean; signOutReturnTo?: string }) {
|
|
56
|
+
return (
|
|
57
|
+
<div className="account-page">
|
|
58
|
+
<AccountHeader base={base} userCode={userCode} signOutReturnTo={signOutReturnTo} />
|
|
59
|
+
<main className={`auth-shell${compact ? ' auth-shell-compact' : ''}${result ? ' auth-shell-result' : ''}`}>{children}</main>
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function DeviceEntryPage({ view, base = '' }: { view: XaiDeviceAuthView; base?: string }) {
|
|
65
|
+
const canContinue = !view.error && /^[A-Z0-9]{4}-[A-Z0-9]{4}$/u.test(view.userCode);
|
|
66
|
+
return (
|
|
67
|
+
<AccountShell base={base} compact userCode={view.userCode || undefined}>
|
|
68
|
+
<h1>Sign in to Grok Build</h1>
|
|
69
|
+
<p className="lead">Enter the code shown in your terminal.</p>
|
|
70
|
+
<form className="entry-form" method="POST" action={`${base}/oauth2/device/continue`}>
|
|
71
|
+
<label className="sr-only" htmlFor="device-code">Enter device code</label>
|
|
72
|
+
<input
|
|
73
|
+
id="device-code"
|
|
74
|
+
name="user_code"
|
|
75
|
+
inputMode="text"
|
|
76
|
+
autoComplete="one-time-code"
|
|
77
|
+
autoCapitalize="characters"
|
|
78
|
+
spellCheck={false}
|
|
79
|
+
defaultValue={view.userCode}
|
|
80
|
+
placeholder="Enter device code"
|
|
81
|
+
aria-describedby={view.error ? 'device-code-error device-code-help' : 'device-code-help'}
|
|
82
|
+
/>
|
|
83
|
+
{view.error ? <p id="device-code-error" className="form-error" role="alert">{view.error}</p> : null}
|
|
84
|
+
<p id="device-code-help" className="device-help">Only enter this code if you just initiated a sign-in from your device.</p>
|
|
85
|
+
<button className="primary-action" type="submit" disabled={!canContinue}>Continue</button>
|
|
86
|
+
</form>
|
|
87
|
+
</AccountShell>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function PermissionIcon({ index }: { index: number }) {
|
|
92
|
+
const paths = [
|
|
93
|
+
<><circle cx="12" cy="8" r="3"/><path d="M6.8 19c.6-3.3 2.4-5 5.2-5s4.6 1.7 5.2 5"/><circle cx="12" cy="12" r="9"/></>,
|
|
94
|
+
<><circle cx="12" cy="8" r="3"/><path d="M6.5 20v-1.2c0-3.2 2.2-5.3 5.5-5.3s5.5 2.1 5.5 5.3V20"/></>,
|
|
95
|
+
<><rect x="3.5" y="5.5" width="17" height="13" rx="1.5"/><path d="m4.5 7 7.5 6 7.5-6"/></>,
|
|
96
|
+
<><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c2.2 2.5 3.3 5.5 3.3 9S14.2 18.5 12 21c-2.2-2.5-3.3-5.5-3.3-9S9.8 5.5 12 3"/></>,
|
|
97
|
+
<path d="m13.3 2-8 11h6l-.6 9 8-12h-6l.6-8Z" />,
|
|
98
|
+
<path d="M4 5.5h16v11H9l-5 4v-15Z" />,
|
|
99
|
+
];
|
|
100
|
+
return <svg className="permission-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">{paths[index]}</svg>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function DeviceConsentPage({ view, base = '' }: { view: XaiDeviceAuthView; base?: string }) {
|
|
104
|
+
return (
|
|
105
|
+
<AccountShell base={base} userCode={view.userCode} signOutReturnTo={`${base}/oauth2/device/consent?user_code=${view.userCode}`}>
|
|
106
|
+
<h1>Authorize Grok Build</h1>
|
|
107
|
+
<ul className="permission-list" aria-label="Requested permissions">
|
|
108
|
+
{view.permissions.map((permission) => {
|
|
109
|
+
const index = XAI_DEVICE_PERMISSIONS.indexOf(permission as typeof XAI_DEVICE_PERMISSIONS[number]);
|
|
110
|
+
return (
|
|
111
|
+
<li key={permission}>
|
|
112
|
+
<PermissionIcon index={index < 0 ? 0 : index} />
|
|
113
|
+
<span>{permission}</span>
|
|
114
|
+
</li>
|
|
115
|
+
);
|
|
116
|
+
})}
|
|
117
|
+
</ul>
|
|
118
|
+
<form className="decision-form" method="POST" action={`${base}/oauth2/device/decision`}>
|
|
119
|
+
<input type="hidden" name="user_code" value={view.userCode} />
|
|
120
|
+
<button className="secondary-action" name="decision" value="deny" type="submit">Deny</button>
|
|
121
|
+
<button className="primary-action" name="decision" value="approve" type="submit">Allow</button>
|
|
122
|
+
</form>
|
|
123
|
+
</AccountShell>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function DeviceDonePage({ approved, base = '' }: { approved: boolean; base?: string }) {
|
|
128
|
+
const title = approved ? 'Device Authorized' : 'Authorization Denied';
|
|
129
|
+
const detail = approved ? 'Return to your terminal to continue.' : 'The Grok Build request was denied.';
|
|
130
|
+
return (
|
|
131
|
+
<AccountShell base={base} compact result>
|
|
132
|
+
<div className={approved ? 'result-icon result-icon-approved' : 'result-icon'} aria-hidden="true">{approved ? '✓' : '×'}</div>
|
|
133
|
+
<h1>{title}</h1>
|
|
134
|
+
<p className="lead result-copy">{detail}</p>
|
|
135
|
+
<p className="device-help">You can close this tab.</p>
|
|
136
|
+
</AccountShell>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var uB=Object.create;var{getPrototypeOf:sB,defineProperty:VB,getOwnPropertyNames:yB}=Object;var dB=Object.prototype.hasOwnProperty;function pB(M){return this[M]}var cB,oB,JB=(M,$,P)=>{var K=M!=null&&typeof M==="object";if(K){var D=$?cB??=new WeakMap:oB??=new WeakMap,I=D.get(M);if(I)return I}P=M!=null?uB(sB(M)):{};let w=$||!M||!M.__esModule?VB(P,"default",{value:M,enumerable:!0}):P;for(let E of yB(M))if(!dB.call(w,E))VB(w,E,{get:pB.bind(M,E),enumerable:!0});if(K)D.set(M,w);return w};var SB=(M,$)=>()=>($||M(($={exports:{}}).exports,$),$.exports);var gB=SB((iB,MB)=>{(function(){function M(B,G){Object.defineProperty(K.prototype,B,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",G[0],G[1])}})}function $(B){if(B===null||typeof B!=="object")return null;return B=KB&&B[KB]||B["@@iterator"],typeof B==="function"?B:null}function P(B,G){B=(B=B.constructor)&&(B.displayName||B.name)||"ReactClass";var W=B+"."+G;FB[W]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",G,B),FB[W]=!0)}function K(B,G,W){this.props=B,this.context=G,this.refs=$B,this.updater=W||AB}function D(){}function I(B,G,W){this.props=B,this.context=G,this.refs=$B,this.updater=W||AB}function w(){}function E(B){return""+B}function b(B){try{E(B);var G=!1}catch(H){G=!0}if(G){G=console;var W=G.error,Y=typeof Symbol==="function"&&Symbol.toStringTag&&B[Symbol.toStringTag]||B.constructor.name||"Object";return W.call(G,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Y),E(B)}}function h(B){if(B==null)return null;if(typeof B==="function")return B.$$typeof===kB?null:B.displayName||B.name||null;if(typeof B==="string")return B;switch(B){case s:return"Fragment";case z:return"Profiler";case U:return"StrictMode";case y:return"Suspense";case F:return"SuspenseList";case UB:return"Activity"}if(typeof B==="object")switch(typeof B.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),B.$$typeof){case GB:return"Portal";case A:return B.displayName||"Context";case J:return(B._context.displayName||"Context")+".Consumer";case N:var G=B.render;return B=B.displayName,B||(B=G.displayName||G.name||"",B=B!==""?"ForwardRef("+B+")":"ForwardRef"),B;case _:return G=B.displayName||null,G!==null?G:h(B.type)||"Memo";case C:G=B._payload,B=B._init;try{return h(B(G))}catch(W){}}return null}function e(B){if(B===s)return"<>";if(typeof B==="object"&&B!==null&&B.$$typeof===C)return"<...>";try{var G=h(B);return G?"<"+G+">":"<...>"}catch(W){return"<...>"}}function p(){var B=Q.A;return B===null?null:B.getOwner()}function c(){return Error("react-stack-top-frame")}function o(B){if(WB.call(B,"key")){var G=Object.getOwnPropertyDescriptor(B,"key").get;if(G&&G.isReactWarning)return!1}return B.key!==void 0}function XB(B,G){function W(){NB||(NB=!0,console.error("%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://react.dev/link/special-props)",G))}W.isReactWarning=!0,Object.defineProperty(B,"key",{get:W,configurable:!0})}function i(){var B=h(this.type);return DB[B]||(DB[B]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),B=this.props.ref,B!==void 0?B:null}function l(B,G,W,Y,H,R){var X=W.ref;return B={$$typeof:r,type:B,key:G,props:W,_owner:Y},(X!==void 0?X:null)!==null?Object.defineProperty(B,"ref",{enumerable:!1,get:i}):Object.defineProperty(B,"ref",{enumerable:!1,value:null}),B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(B,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(B,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.defineProperty(B,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:R}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B}function zB(B,G){return G=l(B.type,G,B.props,B._owner,B._debugStack,B._debugTask),B._store&&(G._store.validated=B._store.validated),G}function BB(B){j(B)?B._store&&(B._store.validated=1):typeof B==="object"&&B!==null&&B.$$typeof===C&&(B._payload.status==="fulfilled"?j(B._payload.value)&&B._payload.value._store&&(B._payload.value._store.validated=1):B._store&&(B._store.validated=1))}function j(B){return typeof B==="object"&&B!==null&&B.$$typeof===r}function QB(B){var G={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(W){return G[W]})}function t(B,G){return typeof B==="object"&&B!==null&&B.key!=null?(b(B.key),QB(""+B.key)):G.toString(36)}function RB(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status==="string"?B.then(w,w):(B.status="pending",B.then(function(G){B.status==="pending"&&(B.status="fulfilled",B.value=G)},function(G){B.status==="pending"&&(B.status="rejected",B.reason=G)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function x(B,G,W,Y,H){var R=typeof B;if(R==="undefined"||R==="boolean")B=null;var X=!1;if(B===null)X=!0;else switch(R){case"bigint":case"string":case"number":X=!0;break;case"object":switch(B.$$typeof){case r:case GB:X=!0;break;case C:return X=B._init,x(X(B._payload),G,W,Y,H)}}if(X){X=B,H=H(X);var O=Y===""?"."+t(X,0):Y;return IB(H)?(W="",O!=null&&(W=O.replace(EB,"$&/")+"/"),x(H,G,W,"",function(V){return V})):H!=null&&(j(H)&&(H.key!=null&&(X&&X.key===H.key||b(H.key)),W=zB(H,W+(H.key==null||X&&X.key===H.key?"":(""+H.key).replace(EB,"$&/")+"/")+O),Y!==""&&X!=null&&j(X)&&X.key==null&&X._store&&!X._store.validated&&(W._store.validated=2),H=W),G.push(H)),1}if(X=0,O=Y===""?".":Y+":",IB(B))for(var L=0;L<B.length;L++)Y=B[L],R=O+t(Y,L),X+=x(Y,G,W,R,H);else if(L=$(B),typeof L==="function")for(L===B.entries&&(CB||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),CB=!0),B=L.call(B),L=0;!(Y=B.next()).done;)Y=Y.value,R=O+t(Y,L++),X+=x(Y,G,W,R,H);else if(R==="object"){if(typeof B.then==="function")return x(RB(B),G,W,Y,H);throw G=String(B),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return X}function v(B,G,W){if(B==null)return B;var Y=[],H=0;return x(B,Y,"","",function(R){return G.call(W,R,H++)}),Y}function LB(B){if(B._status===-1){var G=B._ioInfo;G!=null&&(G.start=G.end=performance.now()),G=B._result;var W=G();if(W.then(function(H){if(B._status===0||B._status===-1){B._status=1,B._result=H;var R=B._ioInfo;R!=null&&(R.end=performance.now()),W.status===void 0&&(W.status="fulfilled",W.value=H)}},function(H){if(B._status===0||B._status===-1){B._status=2,B._result=H;var R=B._ioInfo;R!=null&&(R.end=performance.now()),W.status===void 0&&(W.status="rejected",W.reason=H)}}),G=B._ioInfo,G!=null){G.value=W;var Y=W.displayName;typeof Y==="string"&&(G.name=Y)}B._status===-1&&(B._status=0,B._result=W)}if(B._status===1)return G=B._result,G===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
+
|
|
3
|
+
Your code should look like:
|
|
4
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
|
+
|
|
6
|
+
Did you accidentally put curly braces around the import?`,G),"default"in G||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
+
|
|
8
|
+
Your code should look like:
|
|
9
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,G),G.default;throw B._result}function q(){var B=Q.H;return B===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
|
+
2. You might be breaking the Rules of Hooks
|
|
12
|
+
3. You might have more than one copy of React in the same app
|
|
13
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),B}function n(){Q.asyncTransitions--}function S(B){if(YB===null)try{var G=("require"+Math.random()).slice(0,7);YB=(MB&&MB[G]).call(MB,"timers").setImmediate}catch(W){YB=function(Y){xB===!1&&(xB=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var H=new MessageChannel;H.port1.onmessage=Y,H.port2.postMessage(void 0)}}return YB(B)}function g(B){return 1<B.length&&typeof AggregateError==="function"?AggregateError(B):B[0]}function k(B,G){G!==ZB-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),ZB=G}function m(B,G,W){var Y=Q.actQueue;if(Y!==null)if(Y.length!==0)try{u(Y),S(function(){return m(B,G,W)});return}catch(H){Q.thrownErrors.push(H)}else Q.actQueue=null;0<Q.thrownErrors.length?(Y=g(Q.thrownErrors),Q.thrownErrors.length=0,W(Y)):G(B)}function u(B){if(!OB){OB=!0;var G=0;try{for(;G<B.length;G++){var W=B[G];do{Q.didUsePromise=!1;var Y=W(!1);if(Y!==null){if(Q.didUsePromise){B[G]=W,B.splice(0,G);return}W=Y}else break}while(1)}B.length=0}catch(H){B.splice(0,G+1),Q.thrownErrors.push(H)}finally{OB=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=Symbol.for("react.transitional.element"),GB=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),A=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),UB=Symbol.for("react.activity"),KB=Symbol.iterator,FB={},AB={isMounted:function(){return!1},enqueueForceUpdate:function(B){P(B,"forceUpdate")},enqueueReplaceState:function(B){P(B,"replaceState")},enqueueSetState:function(B){P(B,"setState")}},TB=Object.assign,$B={};Object.freeze($B),K.prototype.isReactComponent={},K.prototype.setState=function(B,G){if(typeof B!=="object"&&typeof B!=="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,G,"setState")},K.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};var T={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(a in T)T.hasOwnProperty(a)&&M(a,T[a]);D.prototype=K.prototype,T=I.prototype=new D,T.constructor=I,TB(T,K.prototype),T.isPureReactComponent=!0;var IB=Array.isArray,kB=Symbol.for("react.client.reference"),Q={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},WB=Object.prototype.hasOwnProperty,wB=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(B){return B()}};var NB,_B,DB={},fB=T.react_stack_bottom_frame.bind(T,c)(),bB=wB(e(c)),CB=!1,EB=/\/+/g,jB=typeof reportError==="function"?reportError:function(B){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B==="object"&&B!==null&&typeof B.message==="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(G))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",B);return}console.error(B)},xB=!1,YB=null,ZB=0,HB=!1,OB=!1,vB=typeof queueMicrotask==="function"?function(B){queueMicrotask(function(){return queueMicrotask(B)})}:S;T=Object.freeze({__proto__:null,c:function(B){return q().useMemoCache(B)}});var a={map:v,forEach:function(B,G,W){v(B,function(){G.apply(this,arguments)},W)},count:function(B){var G=0;return v(B,function(){G++}),G},toArray:function(B){return v(B,function(G){return G})||[]},only:function(B){if(!j(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};iB.Activity=UB,iB.Children=a,iB.Component=K,iB.Fragment=s,iB.Profiler=z,iB.PureComponent=I,iB.StrictMode=U,iB.Suspense=y,iB.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,iB.__COMPILER_RUNTIME=T,iB.act=function(B){var G=Q.actQueue,W=ZB;ZB++;var Y=Q.actQueue=G!==null?G:[],H=!1;try{var R=B()}catch(L){Q.thrownErrors.push(L)}if(0<Q.thrownErrors.length)throw k(G,W),B=g(Q.thrownErrors),Q.thrownErrors.length=0,B;if(R!==null&&typeof R==="object"&&typeof R.then==="function"){var X=R;return vB(function(){H||HB||(HB=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(L,V){H=!0,X.then(function(d){if(k(G,W),W===0){try{u(Y),S(function(){return m(d,L,V)})}catch(mB){Q.thrownErrors.push(mB)}if(0<Q.thrownErrors.length){var hB=g(Q.thrownErrors);Q.thrownErrors.length=0,V(hB)}}else L(d)},function(d){k(G,W),0<Q.thrownErrors.length?(d=g(Q.thrownErrors),Q.thrownErrors.length=0,V(d)):V(d)})}}}var O=R;if(k(G,W),W===0&&(u(Y),Y.length!==0&&vB(function(){H||HB||(HB=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),Q.actQueue=null),0<Q.thrownErrors.length)throw B=g(Q.thrownErrors),Q.thrownErrors.length=0,B;return{then:function(L,V){H=!0,W===0?(Q.actQueue=Y,S(function(){return m(O,L,V)})):L(O)}}},iB.cache=function(B){return function(){return B.apply(null,arguments)}},iB.cacheSignal=function(){return null},iB.captureOwnerStack=function(){var B=Q.getCurrentStack;return B===null?null:B()},iB.cloneElement=function(B,G,W){if(B===null||B===void 0)throw Error("The argument must be a React element, but you passed "+B+".");var Y=TB({},B.props),H=B.key,R=B._owner;if(G!=null){var X;B:{if(WB.call(G,"ref")&&(X=Object.getOwnPropertyDescriptor(G,"ref").get)&&X.isReactWarning){X=!1;break B}X=G.ref!==void 0}X&&(R=p()),o(G)&&(b(G.key),H=""+G.key);for(O in G)!WB.call(G,O)||O==="key"||O==="__self"||O==="__source"||O==="ref"&&G.ref===void 0||(Y[O]=G[O])}var O=arguments.length-2;if(O===1)Y.children=W;else if(1<O){X=Array(O);for(var L=0;L<O;L++)X[L]=arguments[L+2];Y.children=X}Y=l(B.type,H,Y,R,B._debugStack,B._debugTask);for(H=2;H<arguments.length;H++)BB(arguments[H]);return Y},iB.createContext=function(B){return B={$$typeof:A,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:J,_context:B},B._currentRenderer=null,B._currentRenderer2=null,B},iB.createElement=function(B,G,W){for(var Y=2;Y<arguments.length;Y++)BB(arguments[Y]);Y={};var H=null;if(G!=null)for(L in _B||!("__self"in G)||"key"in G||(_B=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),o(G)&&(b(G.key),H=""+G.key),G)WB.call(G,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(Y[L]=G[L]);var R=arguments.length-2;if(R===1)Y.children=W;else if(1<R){for(var X=Array(R),O=0;O<R;O++)X[O]=arguments[O+2];Object.freeze&&Object.freeze(X),Y.children=X}if(B&&B.defaultProps)for(L in R=B.defaultProps,R)Y[L]===void 0&&(Y[L]=R[L]);H&&XB(Y,typeof B==="function"?B.displayName||B.name||"Unknown":B);var L=1e4>Q.recentlyCreatedOwnerStacks++;return l(B,H,Y,p(),L?Error("react-stack-top-frame"):fB,L?wB(e(B)):bB)},iB.createRef=function(){var B={current:null};return Object.seal(B),B},iB.forwardRef=function(B){B!=null&&B.$$typeof===_?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof B!=="function"?console.error("forwardRef requires a render function but was given %s.",B===null?"null":typeof B):B.length!==0&&B.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",B.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),B!=null&&B.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var G={$$typeof:N,render:B},W;return Object.defineProperty(G,"displayName",{enumerable:!1,configurable:!0,get:function(){return W},set:function(Y){W=Y,B.name||B.displayName||(Object.defineProperty(B,"name",{value:Y}),B.displayName=Y)}}),G},iB.isValidElement=j,iB.lazy=function(B){B={_status:-1,_result:B};var G={$$typeof:C,_payload:B,_init:LB},W={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return B._ioInfo=W,G._debugInfo=[{awaited:W}],G},iB.memo=function(B,G){B==null&&console.error("memo: The first argument must be a component. Instead received: %s",B===null?"null":typeof B),G={$$typeof:_,type:B,compare:G===void 0?null:G};var W;return Object.defineProperty(G,"displayName",{enumerable:!1,configurable:!0,get:function(){return W},set:function(Y){W=Y,B.name||B.displayName||(Object.defineProperty(B,"name",{value:Y}),B.displayName=Y)}}),G},iB.startTransition=function(B){var G=Q.T,W={};W._updatedFibers=new Set,Q.T=W;try{var Y=B(),H=Q.S;H!==null&&H(W,Y),typeof Y==="object"&&Y!==null&&typeof Y.then==="function"&&(Q.asyncTransitions++,Y.then(n,n),Y.then(w,jB))}catch(R){jB(R)}finally{G===null&&W._updatedFibers&&(B=W._updatedFibers.size,W._updatedFibers.clear(),10<B&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),G!==null&&W.types!==null&&(G.types!==null&&G.types!==W.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),G.types=W.types),Q.T=G}},iB.unstable_useCacheRefresh=function(){return q().useCacheRefresh()},iB.use=function(B){return q().use(B)},iB.useActionState=function(B,G,W){return q().useActionState(B,G,W)},iB.useCallback=function(B,G){return q().useCallback(B,G)},iB.useContext=function(B){var G=q();return B.$$typeof===J&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),G.useContext(B)},iB.useDebugValue=function(B,G){return q().useDebugValue(B,G)},iB.useDeferredValue=function(B,G){return q().useDeferredValue(B,G)},iB.useEffect=function(B,G){return B==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),q().useEffect(B,G)},iB.useEffectEvent=function(B){return q().useEffectEvent(B)},iB.useId=function(){return q().useId()},iB.useImperativeHandle=function(B,G,W){return q().useImperativeHandle(B,G,W)},iB.useInsertionEffect=function(B,G){return B==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),q().useInsertionEffect(B,G)},iB.useLayoutEffect=function(B,G){return B==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),q().useLayoutEffect(B,G)},iB.useMemo=function(B,G){return q().useMemo(B,G)},iB.useOptimistic=function(B,G){return q().useOptimistic(B,G)},iB.useReducer=function(B,G,W){return q().useReducer(B,G,W)},iB.useRef=function(B){return q().useRef(B)},iB.useState=function(B){return q().useState(B)},iB.useSyncExternalStore=function(B,G,W){return q().useSyncExternalStore(B,G,W)},iB.useTransition=function(){return q().useTransition()},iB.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var qB=SB((lB)=>{var f=JB(gB());(function(){function M(U){if(U==null)return null;if(typeof U==="function")return U.$$typeof===q?null:U.displayName||U.name||null;if(typeof U==="string")return U;switch(U){case i:return"Fragment";case zB:return"Profiler";case l:return"StrictMode";case t:return"Suspense";case RB:return"SuspenseList";case LB:return"Activity"}if(typeof U==="object")switch(typeof U.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),U.$$typeof){case XB:return"Portal";case j:return U.displayName||"Context";case BB:return(U._context.displayName||"Context")+".Consumer";case QB:var z=U.render;return U=U.displayName,U||(U=z.displayName||z.name||"",U=U!==""?"ForwardRef("+U+")":"ForwardRef"),U;case x:return z=U.displayName||null,z!==null?z:M(U.type)||"Memo";case v:z=U._payload,U=U._init;try{return M(U(z))}catch(J){}}return null}function $(U){return""+U}function P(U){try{$(U);var z=!1}catch(N){z=!0}if(z){z=console;var J=z.error,A=typeof Symbol==="function"&&Symbol.toStringTag&&U[Symbol.toStringTag]||U.constructor.name||"Object";return J.call(z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",A),$(U)}}function K(U){if(U===i)return"<>";if(typeof U==="object"&&U!==null&&U.$$typeof===v)return"<...>";try{var z=M(U);return z?"<"+z+">":"<...>"}catch(J){return"<...>"}}function D(){var U=n.A;return U===null?null:U.getOwner()}function I(){return Error("react-stack-top-frame")}function w(U){if(S.call(U,"key")){var z=Object.getOwnPropertyDescriptor(U,"key").get;if(z&&z.isReactWarning)return!1}return U.key!==void 0}function E(U,z){function J(){m||(m=!0,console.error("%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://react.dev/link/special-props)",z))}J.isReactWarning=!0,Object.defineProperty(U,"key",{get:J,configurable:!0})}function b(){var U=M(this.type);return u[U]||(u[U]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),U=this.props.ref,U!==void 0?U:null}function h(U,z,J,A,N,y){var F=J.ref;return U={$$typeof:o,type:U,key:z,props:J,_owner:A},(F!==void 0?F:null)!==null?Object.defineProperty(U,"ref",{enumerable:!1,get:b}):Object.defineProperty(U,"ref",{enumerable:!1,value:null}),U._store={},Object.defineProperty(U._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(U,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(U,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.defineProperty(U,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:y}),Object.freeze&&(Object.freeze(U.props),Object.freeze(U)),U}function e(U,z,J,A,N,y){var F=z.children;if(F!==void 0)if(A)if(g(F)){for(A=0;A<F.length;A++)p(F[A]);Object.freeze&&Object.freeze(F)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(F);if(S.call(z,"key")){F=M(U);var _=Object.keys(z).filter(function(UB){return UB!=="key"});A=0<_.length?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}",s[F+A]||(_=0<_.length?"{"+_.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
14
|
+
let props = %s;
|
|
15
|
+
<%s {...props} />
|
|
16
|
+
React keys must be passed directly to JSX without using spread:
|
|
17
|
+
let props = %s;
|
|
18
|
+
<%s key={someKey} {...props} />`,A,F,_,F),s[F+A]=!0)}if(F=null,J!==void 0&&(P(J),F=""+J),w(z)&&(P(z.key),F=""+z.key),"key"in z){J={};for(var C in z)C!=="key"&&(J[C]=z[C])}else J=z;return F&&E(J,typeof U==="function"?U.displayName||U.name||"Unknown":U),h(U,F,J,D(),N,y)}function p(U){c(U)?U._store&&(U._store.validated=1):typeof U==="object"&&U!==null&&U.$$typeof===v&&(U._payload.status==="fulfilled"?c(U._payload.value)&&U._payload.value._store&&(U._payload.value._store.validated=1):U._store&&(U._store.validated=1))}function c(U){return typeof U==="object"&&U!==null&&U.$$typeof===o}var o=Symbol.for("react.transitional.element"),XB=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),zB=Symbol.for("react.profiler"),BB=Symbol.for("react.consumer"),j=Symbol.for("react.context"),QB=Symbol.for("react.forward_ref"),t=Symbol.for("react.suspense"),RB=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),LB=Symbol.for("react.activity"),q=Symbol.for("react.client.reference"),n=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,g=Array.isArray,k=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(U){return U()}};var m,u={},r=f.react_stack_bottom_frame.bind(f,I)(),GB=k(K(I)),s={};lB.Fragment=i,lB.jsxDEV=function(U,z,J,A){var N=1e4>n.recentlyCreatedOwnerStacks++;return e(U,z,J,A,N?Error("react-stack-top-frame"):r,N?k(K(U)):GB)}})()});var Z=JB(qB(),1),tB=["Verify your identity","Read your profile (name, avatar)","Read your email address","Maintain access when you're not present","Use the xAI API","Read and write access Grok.com"];function nB(){return Z.jsxDEV("svg",{className:"xai-mark",viewBox:"0 0 834 318",fill:"none","aria-hidden":"true",children:[Z.jsxDEV("path",{d:"M832.565 0.590983C736.633 8.41256 359.563 55.1598 98.1057 317.999H1.08203L11.9228 307.195C66.6371 254.336 308.741 30.3127 832.565 0.299805V0.590983Z",fill:"black"},void 0,!1,void 0,this),Z.jsxDEV("path",{d:"M504.192 317.999H428.146L278.315 208.933C292.122 200.25 306.018 191.98 319.957 184.104L504.192 317.999Z",fill:"black"},void 0,!1,void 0,this),Z.jsxDEV("path",{d:"M382.659 318H306.648L283.589 301.228H154.852C163.915 293.18 173.091 285.368 182.362 277.784H251.322L215.636 251.826C228.392 242.335 241.288 233.244 254.287 224.535L382.659 318Z",fill:"black"},void 0,!1,void 0,this),Z.jsxDEV("path",{d:"M105.997 116.89L164.612 159.488C150.024 168.078 136.37 176.58 123.626 184.897L30.0522 116.854L105.997 116.89Z",fill:"black"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function rB({base:M,signOutReturnTo:$,userCode:P}){let K=$?`${M}/sign-out?redirect=oauth2-provider&return_to=${encodeURIComponent($)}`:`${M}/sign-out`;return Z.jsxDEV("header",{className:"account-header",children:[Z.jsxDEV("a",{className:"account-home",href:`${M}/`,"aria-label":"SpaceXAI account home link",children:Z.jsxDEV(nB,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),P?Z.jsxDEV("a",{className:"sign-out",href:K,children:"Sign out"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function PB({base:M,children:$,userCode:P,compact:K=!1,result:D=!1,signOutReturnTo:I}){return Z.jsxDEV("div",{className:"account-page",children:[Z.jsxDEV(rB,{base:M,userCode:P,signOutReturnTo:I},void 0,!1,void 0,this),Z.jsxDEV("main",{className:`auth-shell${K?" auth-shell-compact":""}${D?" auth-shell-result":""}`,children:$},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function lG({view:M,base:$=""}){let P=!M.error&&/^[A-Z0-9]{4}-[A-Z0-9]{4}$/u.test(M.userCode);return Z.jsxDEV(PB,{base:$,compact:!0,userCode:M.userCode||void 0,children:[Z.jsxDEV("h1",{children:"Sign in to Grok Build"},void 0,!1,void 0,this),Z.jsxDEV("p",{className:"lead",children:"Enter the code shown in your terminal."},void 0,!1,void 0,this),Z.jsxDEV("form",{className:"entry-form",method:"POST",action:`${$}/oauth2/device/continue`,children:[Z.jsxDEV("label",{className:"sr-only",htmlFor:"device-code",children:"Enter device code"},void 0,!1,void 0,this),Z.jsxDEV("input",{id:"device-code",name:"user_code",inputMode:"text",autoComplete:"one-time-code",autoCapitalize:"characters",spellCheck:!1,defaultValue:M.userCode,placeholder:"Enter device code","aria-describedby":M.error?"device-code-error device-code-help":"device-code-help"},void 0,!1,void 0,this),M.error?Z.jsxDEV("p",{id:"device-code-error",className:"form-error",role:"alert",children:M.error},void 0,!1,void 0,this):null,Z.jsxDEV("p",{id:"device-code-help",className:"device-help",children:"Only enter this code if you just initiated a sign-in from your device."},void 0,!1,void 0,this),Z.jsxDEV("button",{className:"primary-action",type:"submit",disabled:!P,children:"Continue"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function aB({index:M}){return Z.jsxDEV("svg",{className:"permission-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[Z.jsxDEV(Z.Fragment,{children:[Z.jsxDEV("circle",{cx:"12",cy:"8",r:"3"},void 0,!1,void 0,this),Z.jsxDEV("path",{d:"M6.8 19c.6-3.3 2.4-5 5.2-5s4.6 1.7 5.2 5"},void 0,!1,void 0,this),Z.jsxDEV("circle",{cx:"12",cy:"12",r:"9"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Z.jsxDEV(Z.Fragment,{children:[Z.jsxDEV("circle",{cx:"12",cy:"8",r:"3"},void 0,!1,void 0,this),Z.jsxDEV("path",{d:"M6.5 20v-1.2c0-3.2 2.2-5.3 5.5-5.3s5.5 2.1 5.5 5.3V20"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Z.jsxDEV(Z.Fragment,{children:[Z.jsxDEV("rect",{x:"3.5",y:"5.5",width:"17",height:"13",rx:"1.5"},void 0,!1,void 0,this),Z.jsxDEV("path",{d:"m4.5 7 7.5 6 7.5-6"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Z.jsxDEV(Z.Fragment,{children:[Z.jsxDEV("circle",{cx:"12",cy:"12",r:"9"},void 0,!1,void 0,this),Z.jsxDEV("path",{d:"M3 12h18M12 3c2.2 2.5 3.3 5.5 3.3 9S14.2 18.5 12 21c-2.2-2.5-3.3-5.5-3.3-9S9.8 5.5 12 3"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Z.jsxDEV("path",{d:"m13.3 2-8 11h6l-.6 9 8-12h-6l.6-8Z"},void 0,!1,void 0,this),Z.jsxDEV("path",{d:"M4 5.5h16v11H9l-5 4v-15Z"},void 0,!1,void 0,this)][M]},void 0,!1,void 0,this)}function tG({view:M,base:$=""}){return Z.jsxDEV(PB,{base:$,userCode:M.userCode,signOutReturnTo:`${$}/oauth2/device/consent?user_code=${M.userCode}`,children:[Z.jsxDEV("h1",{children:"Authorize Grok Build"},void 0,!1,void 0,this),Z.jsxDEV("ul",{className:"permission-list","aria-label":"Requested permissions",children:M.permissions.map((P)=>{let K=tB.indexOf(P);return Z.jsxDEV("li",{children:[Z.jsxDEV(aB,{index:K<0?0:K},void 0,!1,void 0,this),Z.jsxDEV("span",{children:P},void 0,!1,void 0,this)]},P,!0,void 0,this)})},void 0,!1,void 0,this),Z.jsxDEV("form",{className:"decision-form",method:"POST",action:`${$}/oauth2/device/decision`,children:[Z.jsxDEV("input",{type:"hidden",name:"user_code",value:M.userCode},void 0,!1,void 0,this),Z.jsxDEV("button",{className:"secondary-action",name:"decision",value:"deny",type:"submit",children:"Deny"},void 0,!1,void 0,this),Z.jsxDEV("button",{className:"primary-action",name:"decision",value:"approve",type:"submit",children:"Allow"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function nG({approved:M,base:$=""}){return Z.jsxDEV(PB,{base:$,compact:!0,result:!0,children:[Z.jsxDEV("div",{className:M?"result-icon result-icon-approved":"result-icon","aria-hidden":"true",children:M?"✓":"×"},void 0,!1,void 0,this),Z.jsxDEV("h1",{children:M?"Device Authorized":"Authorization Denied"},void 0,!1,void 0,this),Z.jsxDEV("p",{className:"lead result-copy",children:M?"Return to your terminal to continue.":"The Grok Build request was denied."},void 0,!1,void 0,this),Z.jsxDEV("p",{className:"device-help",children:"You can close this tab."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}export{tB as XAI_DEVICE_PERMISSIONS,lG as DeviceEntryPage,nG as DeviceDonePage,tG as DeviceConsentPage};
|