@versini/sassysaint 7.2.1 → 7.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/App.BDqQnTrq.js +5876 -0
- package/dist/chunks/{ChatBubbleAssistant.Cwd8d9jB.js → ChatBubbleAssistant.CxsRdmRy.js} +4 -4
- package/dist/chunks/{HeaderEntry.BJM1a_zl.js → HeaderEntry.BUIe93Ji.js} +350 -356
- package/dist/chunks/{MarkdownWithExtra.DKsimQRg.js → MarkdownWithExtra.CnQvPHyI.js} +451 -450
- package/dist/chunks/index.haIFTOhR.js +4864 -0
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
- package/dist/chunks/App.BO2S2PYc.js +0 -6755
- package/dist/chunks/index.DxtRERJQ.js +0 -3872
|
@@ -1,3872 +0,0 @@
|
|
|
1
|
-
import { jsx as d, jsxs as $, Fragment as Ne } from "react/jsx-runtime";
|
|
2
|
-
import X, { createContext as dr, useReducer as At, useRef as O, useCallback as q, useEffect as G, useContext as Rt, useSyncExternalStore as ur, useLayoutEffect as ve, useMemo as Le, useState as z, useId as Nt, lazy as mr, Suspense as hr } from "react";
|
|
3
|
-
import p from "clsx";
|
|
4
|
-
var pr = Object.defineProperty, fr = (e, t, r) => t in e ? pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, We = (e, t, r) => fr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
|
-
/*!
|
|
6
|
-
@versini/auth-provider v7.5.0
|
|
7
|
-
© 2025 gizmette.com
|
|
8
|
-
*/
|
|
9
|
-
try {
|
|
10
|
-
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
11
|
-
version: "7.5.0",
|
|
12
|
-
buildTime: "02/09/2025 07:44 PM EST",
|
|
13
|
-
homepage: "https://github.com/aversini/auth-client",
|
|
14
|
-
license: "MIT"
|
|
15
|
-
});
|
|
16
|
-
} catch {
|
|
17
|
-
}
|
|
18
|
-
function J(e) {
|
|
19
|
-
const t = new Uint8Array(e);
|
|
20
|
-
let r = "";
|
|
21
|
-
for (const a of t)
|
|
22
|
-
r += String.fromCharCode(a);
|
|
23
|
-
return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
24
|
-
}
|
|
25
|
-
function xe(e) {
|
|
26
|
-
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, a = t.padEnd(t.length + r, "="), n = atob(a), o = new ArrayBuffer(n.length), s = new Uint8Array(o);
|
|
27
|
-
for (let i = 0; i < n.length; i++)
|
|
28
|
-
s[i] = n.charCodeAt(i);
|
|
29
|
-
return o;
|
|
30
|
-
}
|
|
31
|
-
function tt() {
|
|
32
|
-
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
|
-
}
|
|
34
|
-
function vt(e) {
|
|
35
|
-
const { id: t } = e;
|
|
36
|
-
return {
|
|
37
|
-
...e,
|
|
38
|
-
id: xe(t),
|
|
39
|
-
transports: e.transports
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function xt(e) {
|
|
43
|
-
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
|
-
}
|
|
45
|
-
let x = class extends Error {
|
|
46
|
-
constructor({ message: t, code: r, cause: a, name: n }) {
|
|
47
|
-
super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
function gr({ error: e, options: t }) {
|
|
51
|
-
var a, n;
|
|
52
|
-
const { publicKey: r } = t;
|
|
53
|
-
if (!r)
|
|
54
|
-
throw Error("options was missing required publicKey property");
|
|
55
|
-
if (e.name === "AbortError") {
|
|
56
|
-
if (t.signal instanceof AbortSignal)
|
|
57
|
-
return new x({
|
|
58
|
-
message: "Registration ceremony was sent an abort signal",
|
|
59
|
-
code: "ERROR_CEREMONY_ABORTED",
|
|
60
|
-
cause: e
|
|
61
|
-
});
|
|
62
|
-
} else if (e.name === "ConstraintError") {
|
|
63
|
-
if (((a = r.authenticatorSelection) == null ? void 0 : a.requireResidentKey) === !0)
|
|
64
|
-
return new x({
|
|
65
|
-
message: "Discoverable credentials were required but no available authenticator supported it",
|
|
66
|
-
code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
|
|
67
|
-
cause: e
|
|
68
|
-
});
|
|
69
|
-
if (((n = r.authenticatorSelection) == null ? void 0 : n.userVerification) === "required")
|
|
70
|
-
return new x({
|
|
71
|
-
message: "User verification was required but no available authenticator supported it",
|
|
72
|
-
code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
|
|
73
|
-
cause: e
|
|
74
|
-
});
|
|
75
|
-
} else {
|
|
76
|
-
if (e.name === "InvalidStateError")
|
|
77
|
-
return new x({
|
|
78
|
-
message: "The authenticator was previously registered",
|
|
79
|
-
code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
|
|
80
|
-
cause: e
|
|
81
|
-
});
|
|
82
|
-
if (e.name === "NotAllowedError")
|
|
83
|
-
return new x({
|
|
84
|
-
message: e.message,
|
|
85
|
-
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
86
|
-
cause: e
|
|
87
|
-
});
|
|
88
|
-
if (e.name === "NotSupportedError")
|
|
89
|
-
return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new x({
|
|
90
|
-
message: 'No entry in pubKeyCredParams was of type "public-key"',
|
|
91
|
-
code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
|
|
92
|
-
cause: e
|
|
93
|
-
}) : new x({
|
|
94
|
-
message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
|
|
95
|
-
code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
|
|
96
|
-
cause: e
|
|
97
|
-
});
|
|
98
|
-
if (e.name === "SecurityError") {
|
|
99
|
-
const o = window.location.hostname;
|
|
100
|
-
if (xt(o)) {
|
|
101
|
-
if (r.rp.id !== o)
|
|
102
|
-
return new x({
|
|
103
|
-
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
104
|
-
code: "ERROR_INVALID_RP_ID",
|
|
105
|
-
cause: e
|
|
106
|
-
});
|
|
107
|
-
} else return new x({
|
|
108
|
-
message: `${window.location.hostname} is an invalid domain`,
|
|
109
|
-
code: "ERROR_INVALID_DOMAIN",
|
|
110
|
-
cause: e
|
|
111
|
-
});
|
|
112
|
-
} else if (e.name === "TypeError") {
|
|
113
|
-
if (r.user.id.byteLength < 1 || r.user.id.byteLength > 64)
|
|
114
|
-
return new x({
|
|
115
|
-
message: "User ID was not between 1 and 64 characters",
|
|
116
|
-
code: "ERROR_INVALID_USER_ID_LENGTH",
|
|
117
|
-
cause: e
|
|
118
|
-
});
|
|
119
|
-
} else if (e.name === "UnknownError")
|
|
120
|
-
return new x({
|
|
121
|
-
message: "The authenticator was unable to process the specified options, or could not create a new credential",
|
|
122
|
-
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
123
|
-
cause: e
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
return e;
|
|
127
|
-
}
|
|
128
|
-
class yr {
|
|
129
|
-
createNewAbortSignal() {
|
|
130
|
-
if (this.controller) {
|
|
131
|
-
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
132
|
-
r.name = "AbortError", this.controller.abort(r);
|
|
133
|
-
}
|
|
134
|
-
const t = new AbortController();
|
|
135
|
-
return this.controller = t, t.signal;
|
|
136
|
-
}
|
|
137
|
-
cancelCeremony() {
|
|
138
|
-
if (this.controller) {
|
|
139
|
-
const t = new Error("Manually cancelling existing WebAuthn API call");
|
|
140
|
-
t.name = "AbortError", this.controller.abort(t), this.controller = void 0;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
const Ot = new yr(), br = ["cross-platform", "platform"];
|
|
145
|
-
function Ct(e) {
|
|
146
|
-
if (e && !(br.indexOf(e) < 0))
|
|
147
|
-
return e;
|
|
148
|
-
}
|
|
149
|
-
async function Er(e) {
|
|
150
|
-
var m;
|
|
151
|
-
if (!tt())
|
|
152
|
-
throw new Error("WebAuthn is not supported in this browser");
|
|
153
|
-
const t = { publicKey: {
|
|
154
|
-
...e,
|
|
155
|
-
challenge: xe(e.challenge),
|
|
156
|
-
user: {
|
|
157
|
-
...e.user,
|
|
158
|
-
id: xe(e.user.id)
|
|
159
|
-
},
|
|
160
|
-
excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(vt)
|
|
161
|
-
} };
|
|
162
|
-
t.signal = Ot.createNewAbortSignal();
|
|
163
|
-
let r;
|
|
164
|
-
try {
|
|
165
|
-
r = await navigator.credentials.create(t);
|
|
166
|
-
} catch (l) {
|
|
167
|
-
throw gr({ error: l, options: t });
|
|
168
|
-
}
|
|
169
|
-
if (!r)
|
|
170
|
-
throw new Error("Registration was not completed");
|
|
171
|
-
const { id: a, rawId: n, response: o, type: s } = r;
|
|
172
|
-
let i;
|
|
173
|
-
typeof o.getTransports == "function" && (i = o.getTransports());
|
|
174
|
-
let c;
|
|
175
|
-
if (typeof o.getPublicKeyAlgorithm == "function")
|
|
176
|
-
try {
|
|
177
|
-
c = o.getPublicKeyAlgorithm();
|
|
178
|
-
} catch (l) {
|
|
179
|
-
Be("getPublicKeyAlgorithm()", l);
|
|
180
|
-
}
|
|
181
|
-
let f;
|
|
182
|
-
if (typeof o.getPublicKey == "function")
|
|
183
|
-
try {
|
|
184
|
-
const l = o.getPublicKey();
|
|
185
|
-
l !== null && (f = J(l));
|
|
186
|
-
} catch (l) {
|
|
187
|
-
Be("getPublicKey()", l);
|
|
188
|
-
}
|
|
189
|
-
let h;
|
|
190
|
-
if (typeof o.getAuthenticatorData == "function")
|
|
191
|
-
try {
|
|
192
|
-
h = J(o.getAuthenticatorData());
|
|
193
|
-
} catch (l) {
|
|
194
|
-
Be("getAuthenticatorData()", l);
|
|
195
|
-
}
|
|
196
|
-
return {
|
|
197
|
-
id: a,
|
|
198
|
-
rawId: J(n),
|
|
199
|
-
response: {
|
|
200
|
-
attestationObject: J(o.attestationObject),
|
|
201
|
-
clientDataJSON: J(o.clientDataJSON),
|
|
202
|
-
transports: i,
|
|
203
|
-
publicKeyAlgorithm: c,
|
|
204
|
-
publicKey: f,
|
|
205
|
-
authenticatorData: h
|
|
206
|
-
},
|
|
207
|
-
type: s,
|
|
208
|
-
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
|
-
authenticatorAttachment: Ct(r.authenticatorAttachment)
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
function Be(e, t) {
|
|
213
|
-
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
214
|
-
`, t);
|
|
215
|
-
}
|
|
216
|
-
function wr() {
|
|
217
|
-
if (!tt())
|
|
218
|
-
return new Promise((t) => t(!1));
|
|
219
|
-
const e = window.PublicKeyCredential;
|
|
220
|
-
return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
|
|
221
|
-
}
|
|
222
|
-
function Ir({ error: e, options: t }) {
|
|
223
|
-
const { publicKey: r } = t;
|
|
224
|
-
if (!r)
|
|
225
|
-
throw Error("options was missing required publicKey property");
|
|
226
|
-
if (e.name === "AbortError") {
|
|
227
|
-
if (t.signal instanceof AbortSignal)
|
|
228
|
-
return new x({
|
|
229
|
-
message: "Authentication ceremony was sent an abort signal",
|
|
230
|
-
code: "ERROR_CEREMONY_ABORTED",
|
|
231
|
-
cause: e
|
|
232
|
-
});
|
|
233
|
-
} else {
|
|
234
|
-
if (e.name === "NotAllowedError")
|
|
235
|
-
return new x({
|
|
236
|
-
message: e.message,
|
|
237
|
-
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
238
|
-
cause: e
|
|
239
|
-
});
|
|
240
|
-
if (e.name === "SecurityError") {
|
|
241
|
-
const a = window.location.hostname;
|
|
242
|
-
if (xt(a)) {
|
|
243
|
-
if (r.rpId !== a)
|
|
244
|
-
return new x({
|
|
245
|
-
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
246
|
-
code: "ERROR_INVALID_RP_ID",
|
|
247
|
-
cause: e
|
|
248
|
-
});
|
|
249
|
-
} else return new x({
|
|
250
|
-
message: `${window.location.hostname} is an invalid domain`,
|
|
251
|
-
code: "ERROR_INVALID_DOMAIN",
|
|
252
|
-
cause: e
|
|
253
|
-
});
|
|
254
|
-
} else if (e.name === "UnknownError")
|
|
255
|
-
return new x({
|
|
256
|
-
message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
|
|
257
|
-
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
258
|
-
cause: e
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
return e;
|
|
262
|
-
}
|
|
263
|
-
async function Tr(e, t = !1) {
|
|
264
|
-
var m, l;
|
|
265
|
-
if (!tt())
|
|
266
|
-
throw new Error("WebAuthn is not supported in this browser");
|
|
267
|
-
let r;
|
|
268
|
-
((m = e.allowCredentials) == null ? void 0 : m.length) !== 0 && (r = (l = e.allowCredentials) == null ? void 0 : l.map(vt));
|
|
269
|
-
const a = {
|
|
270
|
-
...e,
|
|
271
|
-
challenge: xe(e.challenge),
|
|
272
|
-
allowCredentials: r
|
|
273
|
-
}, n = {};
|
|
274
|
-
if (t) {
|
|
275
|
-
if (!await wr())
|
|
276
|
-
throw Error("Browser does not support WebAuthn autofill");
|
|
277
|
-
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
|
|
278
|
-
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
279
|
-
n.mediation = "conditional", a.allowCredentials = [];
|
|
280
|
-
}
|
|
281
|
-
n.publicKey = a, n.signal = Ot.createNewAbortSignal();
|
|
282
|
-
let o;
|
|
283
|
-
try {
|
|
284
|
-
o = await navigator.credentials.get(n);
|
|
285
|
-
} catch (u) {
|
|
286
|
-
throw Ir({ error: u, options: n });
|
|
287
|
-
}
|
|
288
|
-
if (!o)
|
|
289
|
-
throw new Error("Authentication was not completed");
|
|
290
|
-
const { id: s, rawId: i, response: c, type: f } = o;
|
|
291
|
-
let h;
|
|
292
|
-
return c.userHandle && (h = J(c.userHandle)), {
|
|
293
|
-
id: s,
|
|
294
|
-
rawId: J(i),
|
|
295
|
-
response: {
|
|
296
|
-
authenticatorData: J(c.authenticatorData),
|
|
297
|
-
clientDataJSON: J(c.clientDataJSON),
|
|
298
|
-
signature: J(c.signature),
|
|
299
|
-
userHandle: h
|
|
300
|
-
},
|
|
301
|
-
type: f,
|
|
302
|
-
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment: Ct(o.authenticatorAttachment)
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
/*!
|
|
307
|
-
@versini/auth-common v4.2.0
|
|
308
|
-
© 2025 gizmette.com
|
|
309
|
-
*/
|
|
310
|
-
try {
|
|
311
|
-
window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
|
|
312
|
-
version: "4.2.0",
|
|
313
|
-
buildTime: "02/09/2025 07:44 PM EST",
|
|
314
|
-
homepage: "https://github.com/aversini/auth-client",
|
|
315
|
-
license: "MIT"
|
|
316
|
-
});
|
|
317
|
-
} catch {
|
|
318
|
-
}
|
|
319
|
-
const he = {
|
|
320
|
-
ID_TOKEN: "id_token",
|
|
321
|
-
ACCESS_TOKEN: "token",
|
|
322
|
-
ID_AND_ACCESS_TOKEN: "id_token token",
|
|
323
|
-
CODE: "code",
|
|
324
|
-
REFRESH_TOKEN: "refresh_token",
|
|
325
|
-
PASSKEY: "passkey"
|
|
326
|
-
}, Pt = {
|
|
327
|
-
CLIENT_ID: "X-Auth-ClientId"
|
|
328
|
-
}, N = {
|
|
329
|
-
ALG: "RS256",
|
|
330
|
-
USER_ID_KEY: "sub",
|
|
331
|
-
USERNAME_KEY: "username",
|
|
332
|
-
EMAIL_KEY: "email",
|
|
333
|
-
TOKEN_ID_KEY: "__raw",
|
|
334
|
-
NONCE_KEY: "_nonce",
|
|
335
|
-
AUTH_TYPE_KEY: "auth_type",
|
|
336
|
-
EXPIRES_AT_KEY: "exp",
|
|
337
|
-
CREATED_AT_KEY: "iat",
|
|
338
|
-
SCOPES_KEY: "scopes",
|
|
339
|
-
CLIENT_ID_KEY: "aud",
|
|
340
|
-
ISSUER: "gizmette.com"
|
|
341
|
-
}, Sr = `-----BEGIN PUBLIC KEY-----
|
|
342
|
-
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
343
|
-
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
344
|
-
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
345
|
-
aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
|
|
346
|
-
l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
|
|
347
|
-
sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
|
|
348
|
-
awIDAQAB
|
|
349
|
-
-----END PUBLIC KEY-----`, $e = {
|
|
350
|
-
CODE: "code",
|
|
351
|
-
LOGOUT: "logout",
|
|
352
|
-
LOGIN: "login",
|
|
353
|
-
REFRESH: "refresh"
|
|
354
|
-
}, Me = crypto, Dt = (e) => e instanceof CryptoKey, we = new TextEncoder(), be = new TextDecoder();
|
|
355
|
-
function _r(...e) {
|
|
356
|
-
const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
|
|
357
|
-
let a = 0;
|
|
358
|
-
for (const n of e)
|
|
359
|
-
r.set(n, a), a += n.length;
|
|
360
|
-
return r;
|
|
361
|
-
}
|
|
362
|
-
const kr = (e) => {
|
|
363
|
-
const t = atob(e), r = new Uint8Array(t.length);
|
|
364
|
-
for (let a = 0; a < t.length; a++)
|
|
365
|
-
r[a] = t.charCodeAt(a);
|
|
366
|
-
return r;
|
|
367
|
-
}, te = (e) => {
|
|
368
|
-
let t = e;
|
|
369
|
-
t instanceof Uint8Array && (t = be.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
370
|
-
try {
|
|
371
|
-
return kr(t);
|
|
372
|
-
} catch {
|
|
373
|
-
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
let D = class extends Error {
|
|
377
|
-
constructor(t, r) {
|
|
378
|
-
var a;
|
|
379
|
-
super(t, r), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (a = Error.captureStackTrace) == null || a.call(Error, this, this.constructor);
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
D.code = "ERR_JOSE_GENERIC";
|
|
383
|
-
let H = class extends D {
|
|
384
|
-
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
385
|
-
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
H.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
389
|
-
class Xe extends D {
|
|
390
|
-
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
391
|
-
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
Xe.code = "ERR_JWT_EXPIRED";
|
|
395
|
-
class Lt extends D {
|
|
396
|
-
constructor() {
|
|
397
|
-
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
Lt.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
401
|
-
let W = class extends D {
|
|
402
|
-
constructor() {
|
|
403
|
-
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
W.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
407
|
-
class Ar extends D {
|
|
408
|
-
constructor(t = "decryption operation failed", r) {
|
|
409
|
-
super(t, r), this.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
Ar.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
413
|
-
class Rr extends D {
|
|
414
|
-
constructor() {
|
|
415
|
-
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
Rr.code = "ERR_JWE_INVALID";
|
|
419
|
-
let k = class extends D {
|
|
420
|
-
constructor() {
|
|
421
|
-
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
k.code = "ERR_JWS_INVALID";
|
|
425
|
-
let V = class extends D {
|
|
426
|
-
constructor() {
|
|
427
|
-
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
V.code = "ERR_JWT_INVALID";
|
|
431
|
-
class Nr extends D {
|
|
432
|
-
constructor() {
|
|
433
|
-
super(...arguments), this.code = "ERR_JWK_INVALID";
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
Nr.code = "ERR_JWK_INVALID";
|
|
437
|
-
class vr extends D {
|
|
438
|
-
constructor() {
|
|
439
|
-
super(...arguments), this.code = "ERR_JWKS_INVALID";
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
vr.code = "ERR_JWKS_INVALID";
|
|
443
|
-
class xr extends D {
|
|
444
|
-
constructor(t = "no applicable key found in the JSON Web Key Set", r) {
|
|
445
|
-
super(t, r), this.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
xr.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
449
|
-
class Or extends D {
|
|
450
|
-
constructor(t = "multiple matching keys found in the JSON Web Key Set", r) {
|
|
451
|
-
super(t, r), this.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
Or.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
455
|
-
class Cr extends D {
|
|
456
|
-
constructor(t = "request timed out", r) {
|
|
457
|
-
super(t, r), this.code = "ERR_JWKS_TIMEOUT";
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
Cr.code = "ERR_JWKS_TIMEOUT";
|
|
461
|
-
class $t extends D {
|
|
462
|
-
constructor(t = "signature verification failed", r) {
|
|
463
|
-
super(t, r), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
$t.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
467
|
-
function j(e, t = "algorithm.name") {
|
|
468
|
-
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
469
|
-
}
|
|
470
|
-
function Ie(e, t) {
|
|
471
|
-
return e.name === t;
|
|
472
|
-
}
|
|
473
|
-
function Ve(e) {
|
|
474
|
-
return parseInt(e.name.slice(4), 10);
|
|
475
|
-
}
|
|
476
|
-
function Pr(e) {
|
|
477
|
-
switch (e) {
|
|
478
|
-
case "ES256":
|
|
479
|
-
return "P-256";
|
|
480
|
-
case "ES384":
|
|
481
|
-
return "P-384";
|
|
482
|
-
case "ES512":
|
|
483
|
-
return "P-521";
|
|
484
|
-
default:
|
|
485
|
-
throw new Error("unreachable");
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
function Dr(e, t) {
|
|
489
|
-
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
490
|
-
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
491
|
-
if (t.length > 2) {
|
|
492
|
-
const a = t.pop();
|
|
493
|
-
r += `one of ${t.join(", ")}, or ${a}.`;
|
|
494
|
-
} else t.length === 2 ? r += `one of ${t[0]} or ${t[1]}.` : r += `${t[0]}.`;
|
|
495
|
-
throw new TypeError(r);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
function Lr(e, t, ...r) {
|
|
499
|
-
switch (t) {
|
|
500
|
-
case "HS256":
|
|
501
|
-
case "HS384":
|
|
502
|
-
case "HS512": {
|
|
503
|
-
if (!Ie(e.algorithm, "HMAC"))
|
|
504
|
-
throw j("HMAC");
|
|
505
|
-
const a = parseInt(t.slice(2), 10);
|
|
506
|
-
if (Ve(e.algorithm.hash) !== a)
|
|
507
|
-
throw j(`SHA-${a}`, "algorithm.hash");
|
|
508
|
-
break;
|
|
509
|
-
}
|
|
510
|
-
case "RS256":
|
|
511
|
-
case "RS384":
|
|
512
|
-
case "RS512": {
|
|
513
|
-
if (!Ie(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
514
|
-
throw j("RSASSA-PKCS1-v1_5");
|
|
515
|
-
const a = parseInt(t.slice(2), 10);
|
|
516
|
-
if (Ve(e.algorithm.hash) !== a)
|
|
517
|
-
throw j(`SHA-${a}`, "algorithm.hash");
|
|
518
|
-
break;
|
|
519
|
-
}
|
|
520
|
-
case "PS256":
|
|
521
|
-
case "PS384":
|
|
522
|
-
case "PS512": {
|
|
523
|
-
if (!Ie(e.algorithm, "RSA-PSS"))
|
|
524
|
-
throw j("RSA-PSS");
|
|
525
|
-
const a = parseInt(t.slice(2), 10);
|
|
526
|
-
if (Ve(e.algorithm.hash) !== a)
|
|
527
|
-
throw j(`SHA-${a}`, "algorithm.hash");
|
|
528
|
-
break;
|
|
529
|
-
}
|
|
530
|
-
case "EdDSA": {
|
|
531
|
-
if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
|
|
532
|
-
throw j("Ed25519 or Ed448");
|
|
533
|
-
break;
|
|
534
|
-
}
|
|
535
|
-
case "ES256":
|
|
536
|
-
case "ES384":
|
|
537
|
-
case "ES512": {
|
|
538
|
-
if (!Ie(e.algorithm, "ECDSA"))
|
|
539
|
-
throw j("ECDSA");
|
|
540
|
-
const a = Pr(t);
|
|
541
|
-
if (e.algorithm.namedCurve !== a)
|
|
542
|
-
throw j(a, "algorithm.namedCurve");
|
|
543
|
-
break;
|
|
544
|
-
}
|
|
545
|
-
default:
|
|
546
|
-
throw new TypeError("CryptoKey does not support this operation");
|
|
547
|
-
}
|
|
548
|
-
Dr(e, r);
|
|
549
|
-
}
|
|
550
|
-
function Mt(e, t, ...r) {
|
|
551
|
-
var a;
|
|
552
|
-
if (r = r.filter(Boolean), r.length > 2) {
|
|
553
|
-
const n = r.pop();
|
|
554
|
-
e += `one of type ${r.join(", ")}, or ${n}.`;
|
|
555
|
-
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
556
|
-
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (a = t.constructor) != null && a.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
557
|
-
}
|
|
558
|
-
const it = (e, ...t) => Mt("Key must be ", e, ...t);
|
|
559
|
-
function Ut(e, t, ...r) {
|
|
560
|
-
return Mt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
561
|
-
}
|
|
562
|
-
const Kt = (e) => Dt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Oe = ["CryptoKey"], $r = (...e) => {
|
|
563
|
-
const t = e.filter(Boolean);
|
|
564
|
-
if (t.length === 0 || t.length === 1)
|
|
565
|
-
return !0;
|
|
566
|
-
let r;
|
|
567
|
-
for (const a of t) {
|
|
568
|
-
const n = Object.keys(a);
|
|
569
|
-
if (!r || r.size === 0) {
|
|
570
|
-
r = new Set(n);
|
|
571
|
-
continue;
|
|
572
|
-
}
|
|
573
|
-
for (const o of n) {
|
|
574
|
-
if (r.has(o))
|
|
575
|
-
return !1;
|
|
576
|
-
r.add(o);
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
return !0;
|
|
580
|
-
};
|
|
581
|
-
function Mr(e) {
|
|
582
|
-
return typeof e == "object" && e !== null;
|
|
583
|
-
}
|
|
584
|
-
function pe(e) {
|
|
585
|
-
if (!Mr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
586
|
-
return !1;
|
|
587
|
-
if (Object.getPrototypeOf(e) === null)
|
|
588
|
-
return !0;
|
|
589
|
-
let t = e;
|
|
590
|
-
for (; Object.getPrototypeOf(t) !== null; )
|
|
591
|
-
t = Object.getPrototypeOf(t);
|
|
592
|
-
return Object.getPrototypeOf(e) === t;
|
|
593
|
-
}
|
|
594
|
-
const Ur = (e, t) => {
|
|
595
|
-
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
596
|
-
const { modulusLength: r } = t.algorithm;
|
|
597
|
-
if (typeof r != "number" || r < 2048)
|
|
598
|
-
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
599
|
-
}
|
|
600
|
-
};
|
|
601
|
-
function fe(e) {
|
|
602
|
-
return pe(e) && typeof e.kty == "string";
|
|
603
|
-
}
|
|
604
|
-
function Kr(e) {
|
|
605
|
-
return e.kty !== "oct" && typeof e.d == "string";
|
|
606
|
-
}
|
|
607
|
-
function Hr(e) {
|
|
608
|
-
return e.kty !== "oct" && typeof e.d > "u";
|
|
609
|
-
}
|
|
610
|
-
function Wr(e) {
|
|
611
|
-
return fe(e) && e.kty === "oct" && typeof e.k == "string";
|
|
612
|
-
}
|
|
613
|
-
function Br(e) {
|
|
614
|
-
let t, r;
|
|
615
|
-
switch (e.kty) {
|
|
616
|
-
case "RSA": {
|
|
617
|
-
switch (e.alg) {
|
|
618
|
-
case "PS256":
|
|
619
|
-
case "PS384":
|
|
620
|
-
case "PS512":
|
|
621
|
-
t = { name: "RSA-PSS", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
|
|
622
|
-
break;
|
|
623
|
-
case "RS256":
|
|
624
|
-
case "RS384":
|
|
625
|
-
case "RS512":
|
|
626
|
-
t = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${e.alg.slice(-3)}` }, r = e.d ? ["sign"] : ["verify"];
|
|
627
|
-
break;
|
|
628
|
-
case "RSA-OAEP":
|
|
629
|
-
case "RSA-OAEP-256":
|
|
630
|
-
case "RSA-OAEP-384":
|
|
631
|
-
case "RSA-OAEP-512":
|
|
632
|
-
t = {
|
|
633
|
-
name: "RSA-OAEP",
|
|
634
|
-
hash: `SHA-${parseInt(e.alg.slice(-3), 10) || 1}`
|
|
635
|
-
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
636
|
-
break;
|
|
637
|
-
default:
|
|
638
|
-
throw new W('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
639
|
-
}
|
|
640
|
-
break;
|
|
641
|
-
}
|
|
642
|
-
case "EC": {
|
|
643
|
-
switch (e.alg) {
|
|
644
|
-
case "ES256":
|
|
645
|
-
t = { name: "ECDSA", namedCurve: "P-256" }, r = e.d ? ["sign"] : ["verify"];
|
|
646
|
-
break;
|
|
647
|
-
case "ES384":
|
|
648
|
-
t = { name: "ECDSA", namedCurve: "P-384" }, r = e.d ? ["sign"] : ["verify"];
|
|
649
|
-
break;
|
|
650
|
-
case "ES512":
|
|
651
|
-
t = { name: "ECDSA", namedCurve: "P-521" }, r = e.d ? ["sign"] : ["verify"];
|
|
652
|
-
break;
|
|
653
|
-
case "ECDH-ES":
|
|
654
|
-
case "ECDH-ES+A128KW":
|
|
655
|
-
case "ECDH-ES+A192KW":
|
|
656
|
-
case "ECDH-ES+A256KW":
|
|
657
|
-
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
658
|
-
break;
|
|
659
|
-
default:
|
|
660
|
-
throw new W('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
661
|
-
}
|
|
662
|
-
break;
|
|
663
|
-
}
|
|
664
|
-
case "OKP": {
|
|
665
|
-
switch (e.alg) {
|
|
666
|
-
case "EdDSA":
|
|
667
|
-
t = { name: e.crv }, r = e.d ? ["sign"] : ["verify"];
|
|
668
|
-
break;
|
|
669
|
-
case "ECDH-ES":
|
|
670
|
-
case "ECDH-ES+A128KW":
|
|
671
|
-
case "ECDH-ES+A192KW":
|
|
672
|
-
case "ECDH-ES+A256KW":
|
|
673
|
-
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
674
|
-
break;
|
|
675
|
-
default:
|
|
676
|
-
throw new W('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
677
|
-
}
|
|
678
|
-
break;
|
|
679
|
-
}
|
|
680
|
-
default:
|
|
681
|
-
throw new W('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
682
|
-
}
|
|
683
|
-
return { algorithm: t, keyUsages: r };
|
|
684
|
-
}
|
|
685
|
-
const Ht = async (e) => {
|
|
686
|
-
if (!e.alg)
|
|
687
|
-
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
688
|
-
const { algorithm: t, keyUsages: r } = Br(e), a = [
|
|
689
|
-
t,
|
|
690
|
-
e.ext ?? !1,
|
|
691
|
-
e.key_ops ?? r
|
|
692
|
-
], n = { ...e };
|
|
693
|
-
return delete n.alg, delete n.use, Me.subtle.importKey("jwk", n, ...a);
|
|
694
|
-
}, Wt = (e) => te(e);
|
|
695
|
-
let se, ie;
|
|
696
|
-
const Bt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ce = async (e, t, r, a, n = !1) => {
|
|
697
|
-
let o = e.get(t);
|
|
698
|
-
if (o != null && o[a])
|
|
699
|
-
return o[a];
|
|
700
|
-
const s = await Ht({ ...r, alg: a });
|
|
701
|
-
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
702
|
-
}, Vr = (e, t) => {
|
|
703
|
-
if (Bt(e)) {
|
|
704
|
-
let r = e.export({ format: "jwk" });
|
|
705
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Wt(r.k) : (ie || (ie = /* @__PURE__ */ new WeakMap()), Ce(ie, e, r, t));
|
|
706
|
-
}
|
|
707
|
-
return fe(e) ? e.k ? te(e.k) : (ie || (ie = /* @__PURE__ */ new WeakMap()), Ce(ie, e, e, t, !0)) : e;
|
|
708
|
-
}, Jr = (e, t) => {
|
|
709
|
-
if (Bt(e)) {
|
|
710
|
-
let r = e.export({ format: "jwk" });
|
|
711
|
-
return r.k ? Wt(r.k) : (se || (se = /* @__PURE__ */ new WeakMap()), Ce(se, e, r, t));
|
|
712
|
-
}
|
|
713
|
-
return fe(e) ? e.k ? te(e.k) : (se || (se = /* @__PURE__ */ new WeakMap()), Ce(se, e, e, t, !0)) : e;
|
|
714
|
-
}, Gr = { normalizePublicKey: Vr, normalizePrivateKey: Jr }, ee = (e, t, r = 0) => {
|
|
715
|
-
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
716
|
-
const a = e.indexOf(t[0], r);
|
|
717
|
-
if (a === -1)
|
|
718
|
-
return !1;
|
|
719
|
-
const n = e.subarray(a, a + t.length);
|
|
720
|
-
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || ee(e, t, a + 1);
|
|
721
|
-
}, ct = (e) => {
|
|
722
|
-
switch (!0) {
|
|
723
|
-
case ee(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
724
|
-
return "P-256";
|
|
725
|
-
case ee(e, [43, 129, 4, 0, 34]):
|
|
726
|
-
return "P-384";
|
|
727
|
-
case ee(e, [43, 129, 4, 0, 35]):
|
|
728
|
-
return "P-521";
|
|
729
|
-
case ee(e, [43, 101, 110]):
|
|
730
|
-
return "X25519";
|
|
731
|
-
case ee(e, [43, 101, 111]):
|
|
732
|
-
return "X448";
|
|
733
|
-
case ee(e, [43, 101, 112]):
|
|
734
|
-
return "Ed25519";
|
|
735
|
-
case ee(e, [43, 101, 113]):
|
|
736
|
-
return "Ed448";
|
|
737
|
-
default:
|
|
738
|
-
throw new W("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
739
|
-
}
|
|
740
|
-
}, Yr = async (e, t, r, a, n) => {
|
|
741
|
-
let o, s;
|
|
742
|
-
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((c) => c.charCodeAt(0)));
|
|
743
|
-
switch (a) {
|
|
744
|
-
case "PS256":
|
|
745
|
-
case "PS384":
|
|
746
|
-
case "PS512":
|
|
747
|
-
o = { name: "RSA-PSS", hash: `SHA-${a.slice(-3)}` }, s = ["verify"];
|
|
748
|
-
break;
|
|
749
|
-
case "RS256":
|
|
750
|
-
case "RS384":
|
|
751
|
-
case "RS512":
|
|
752
|
-
o = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${a.slice(-3)}` }, s = ["verify"];
|
|
753
|
-
break;
|
|
754
|
-
case "RSA-OAEP":
|
|
755
|
-
case "RSA-OAEP-256":
|
|
756
|
-
case "RSA-OAEP-384":
|
|
757
|
-
case "RSA-OAEP-512":
|
|
758
|
-
o = {
|
|
759
|
-
name: "RSA-OAEP",
|
|
760
|
-
hash: `SHA-${parseInt(a.slice(-3), 10) || 1}`
|
|
761
|
-
}, s = ["encrypt", "wrapKey"];
|
|
762
|
-
break;
|
|
763
|
-
case "ES256":
|
|
764
|
-
o = { name: "ECDSA", namedCurve: "P-256" }, s = ["verify"];
|
|
765
|
-
break;
|
|
766
|
-
case "ES384":
|
|
767
|
-
o = { name: "ECDSA", namedCurve: "P-384" }, s = ["verify"];
|
|
768
|
-
break;
|
|
769
|
-
case "ES512":
|
|
770
|
-
o = { name: "ECDSA", namedCurve: "P-521" }, s = ["verify"];
|
|
771
|
-
break;
|
|
772
|
-
case "ECDH-ES":
|
|
773
|
-
case "ECDH-ES+A128KW":
|
|
774
|
-
case "ECDH-ES+A192KW":
|
|
775
|
-
case "ECDH-ES+A256KW": {
|
|
776
|
-
const c = ct(i);
|
|
777
|
-
o = c.startsWith("P-") ? { name: "ECDH", namedCurve: c } : { name: c }, s = [];
|
|
778
|
-
break;
|
|
779
|
-
}
|
|
780
|
-
case "EdDSA":
|
|
781
|
-
o = { name: ct(i) }, s = ["verify"];
|
|
782
|
-
break;
|
|
783
|
-
default:
|
|
784
|
-
throw new W('Invalid or unsupported "alg" (Algorithm) value');
|
|
785
|
-
}
|
|
786
|
-
return Me.subtle.importKey(t, i, o, !1, s);
|
|
787
|
-
}, Fr = (e, t, r) => Yr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
788
|
-
async function jr(e, t, r) {
|
|
789
|
-
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
790
|
-
throw new TypeError('"spki" must be SPKI formatted string');
|
|
791
|
-
return Fr(e, t);
|
|
792
|
-
}
|
|
793
|
-
async function zr(e, t) {
|
|
794
|
-
if (!pe(e))
|
|
795
|
-
throw new TypeError("JWK must be an object");
|
|
796
|
-
switch (t || (t = e.alg), e.kty) {
|
|
797
|
-
case "oct":
|
|
798
|
-
if (typeof e.k != "string" || !e.k)
|
|
799
|
-
throw new TypeError('missing "k" (Key Value) Parameter value');
|
|
800
|
-
return te(e.k);
|
|
801
|
-
case "RSA":
|
|
802
|
-
if (e.oth !== void 0)
|
|
803
|
-
throw new W('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
804
|
-
case "EC":
|
|
805
|
-
case "OKP":
|
|
806
|
-
return Ht({ ...e, alg: t });
|
|
807
|
-
default:
|
|
808
|
-
throw new W('Unsupported "kty" (Key Type) Parameter value');
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
const me = (e) => e == null ? void 0 : e[Symbol.toStringTag], Qe = (e, t, r) => {
|
|
812
|
-
var a, n;
|
|
813
|
-
if (t.use !== void 0 && t.use !== "sig")
|
|
814
|
-
throw new TypeError("Invalid key for this operation, when present its use must be sig");
|
|
815
|
-
if (t.key_ops !== void 0 && ((n = (a = t.key_ops).includes) == null ? void 0 : n.call(a, r)) !== !0)
|
|
816
|
-
throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${r}`);
|
|
817
|
-
if (t.alg !== void 0 && t.alg !== e)
|
|
818
|
-
throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
|
|
819
|
-
return !0;
|
|
820
|
-
}, qr = (e, t, r, a) => {
|
|
821
|
-
if (!(t instanceof Uint8Array)) {
|
|
822
|
-
if (a && fe(t)) {
|
|
823
|
-
if (Wr(t) && Qe(e, t, r))
|
|
824
|
-
return;
|
|
825
|
-
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
826
|
-
}
|
|
827
|
-
if (!Kt(t))
|
|
828
|
-
throw new TypeError(Ut(e, t, ...Oe, "Uint8Array", a ? "JSON Web Key" : null));
|
|
829
|
-
if (t.type !== "secret")
|
|
830
|
-
throw new TypeError(`${me(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
831
|
-
}
|
|
832
|
-
}, Xr = (e, t, r, a) => {
|
|
833
|
-
if (a && fe(t))
|
|
834
|
-
switch (r) {
|
|
835
|
-
case "sign":
|
|
836
|
-
if (Kr(t) && Qe(e, t, r))
|
|
837
|
-
return;
|
|
838
|
-
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
839
|
-
case "verify":
|
|
840
|
-
if (Hr(t) && Qe(e, t, r))
|
|
841
|
-
return;
|
|
842
|
-
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
843
|
-
}
|
|
844
|
-
if (!Kt(t))
|
|
845
|
-
throw new TypeError(Ut(e, t, ...Oe, a ? "JSON Web Key" : null));
|
|
846
|
-
if (t.type === "secret")
|
|
847
|
-
throw new TypeError(`${me(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
848
|
-
if (r === "sign" && t.type === "public")
|
|
849
|
-
throw new TypeError(`${me(t)} instances for asymmetric algorithm signing must be of type "private"`);
|
|
850
|
-
if (r === "decrypt" && t.type === "public")
|
|
851
|
-
throw new TypeError(`${me(t)} instances for asymmetric algorithm decryption must be of type "private"`);
|
|
852
|
-
if (t.algorithm && r === "verify" && t.type === "private")
|
|
853
|
-
throw new TypeError(`${me(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
854
|
-
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
855
|
-
throw new TypeError(`${me(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
856
|
-
};
|
|
857
|
-
function Vt(e, t, r, a) {
|
|
858
|
-
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? qr(t, r, a, e) : Xr(t, r, a, e);
|
|
859
|
-
}
|
|
860
|
-
Vt.bind(void 0, !1);
|
|
861
|
-
const lt = Vt.bind(void 0, !0);
|
|
862
|
-
function Qr(e, t, r, a, n) {
|
|
863
|
-
if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
|
|
864
|
-
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
865
|
-
if (!a || a.crit === void 0)
|
|
866
|
-
return /* @__PURE__ */ new Set();
|
|
867
|
-
if (!Array.isArray(a.crit) || a.crit.length === 0 || a.crit.some((s) => typeof s != "string" || s.length === 0))
|
|
868
|
-
throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
|
|
869
|
-
let o;
|
|
870
|
-
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
871
|
-
for (const s of a.crit) {
|
|
872
|
-
if (!o.has(s))
|
|
873
|
-
throw new W(`Extension Header Parameter "${s}" is not recognized`);
|
|
874
|
-
if (n[s] === void 0)
|
|
875
|
-
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
876
|
-
if (o.get(s) && a[s] === void 0)
|
|
877
|
-
throw new e(`Extension Header Parameter "${s}" MUST be integrity protected`);
|
|
878
|
-
}
|
|
879
|
-
return new Set(a.crit);
|
|
880
|
-
}
|
|
881
|
-
const Zr = (e, t) => {
|
|
882
|
-
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
883
|
-
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
884
|
-
if (t)
|
|
885
|
-
return new Set(t);
|
|
886
|
-
};
|
|
887
|
-
function ea(e, t) {
|
|
888
|
-
const r = `SHA-${e.slice(-3)}`;
|
|
889
|
-
switch (e) {
|
|
890
|
-
case "HS256":
|
|
891
|
-
case "HS384":
|
|
892
|
-
case "HS512":
|
|
893
|
-
return { hash: r, name: "HMAC" };
|
|
894
|
-
case "PS256":
|
|
895
|
-
case "PS384":
|
|
896
|
-
case "PS512":
|
|
897
|
-
return { hash: r, name: "RSA-PSS", saltLength: e.slice(-3) >> 3 };
|
|
898
|
-
case "RS256":
|
|
899
|
-
case "RS384":
|
|
900
|
-
case "RS512":
|
|
901
|
-
return { hash: r, name: "RSASSA-PKCS1-v1_5" };
|
|
902
|
-
case "ES256":
|
|
903
|
-
case "ES384":
|
|
904
|
-
case "ES512":
|
|
905
|
-
return { hash: r, name: "ECDSA", namedCurve: t.namedCurve };
|
|
906
|
-
case "EdDSA":
|
|
907
|
-
return { name: t.name };
|
|
908
|
-
default:
|
|
909
|
-
throw new W(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
async function ta(e, t, r) {
|
|
913
|
-
if (t = await Gr.normalizePublicKey(t, e), Dt(t))
|
|
914
|
-
return Lr(t, e, r), t;
|
|
915
|
-
if (t instanceof Uint8Array) {
|
|
916
|
-
if (!e.startsWith("HS"))
|
|
917
|
-
throw new TypeError(it(t, ...Oe));
|
|
918
|
-
return Me.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
919
|
-
}
|
|
920
|
-
throw new TypeError(it(t, ...Oe, "Uint8Array", "JSON Web Key"));
|
|
921
|
-
}
|
|
922
|
-
const ra = async (e, t, r, a) => {
|
|
923
|
-
const n = await ta(e, t, "verify");
|
|
924
|
-
Ur(e, n);
|
|
925
|
-
const o = ea(e, n.algorithm);
|
|
926
|
-
try {
|
|
927
|
-
return await Me.subtle.verify(o, n, r, a);
|
|
928
|
-
} catch {
|
|
929
|
-
return !1;
|
|
930
|
-
}
|
|
931
|
-
};
|
|
932
|
-
async function aa(e, t, r) {
|
|
933
|
-
if (!pe(e))
|
|
934
|
-
throw new k("Flattened JWS must be an object");
|
|
935
|
-
if (e.protected === void 0 && e.header === void 0)
|
|
936
|
-
throw new k('Flattened JWS must have either of the "protected" or "header" members');
|
|
937
|
-
if (e.protected !== void 0 && typeof e.protected != "string")
|
|
938
|
-
throw new k("JWS Protected Header incorrect type");
|
|
939
|
-
if (e.payload === void 0)
|
|
940
|
-
throw new k("JWS Payload missing");
|
|
941
|
-
if (typeof e.signature != "string")
|
|
942
|
-
throw new k("JWS Signature missing or incorrect type");
|
|
943
|
-
if (e.header !== void 0 && !pe(e.header))
|
|
944
|
-
throw new k("JWS Unprotected Header incorrect type");
|
|
945
|
-
let a = {};
|
|
946
|
-
if (e.protected)
|
|
947
|
-
try {
|
|
948
|
-
const y = te(e.protected);
|
|
949
|
-
a = JSON.parse(be.decode(y));
|
|
950
|
-
} catch {
|
|
951
|
-
throw new k("JWS Protected Header is invalid");
|
|
952
|
-
}
|
|
953
|
-
if (!$r(a, e.header))
|
|
954
|
-
throw new k("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
955
|
-
const n = {
|
|
956
|
-
...a,
|
|
957
|
-
...e.header
|
|
958
|
-
}, o = Qr(k, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
|
|
959
|
-
let s = !0;
|
|
960
|
-
if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
|
|
961
|
-
throw new k('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
962
|
-
const { alg: i } = n;
|
|
963
|
-
if (typeof i != "string" || !i)
|
|
964
|
-
throw new k('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
965
|
-
const c = Zr("algorithms", r.algorithms);
|
|
966
|
-
if (c && !c.has(i))
|
|
967
|
-
throw new Lt('"alg" (Algorithm) Header Parameter value not allowed');
|
|
968
|
-
if (s) {
|
|
969
|
-
if (typeof e.payload != "string")
|
|
970
|
-
throw new k("JWS Payload must be a string");
|
|
971
|
-
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
972
|
-
throw new k("JWS Payload must be a string or an Uint8Array instance");
|
|
973
|
-
let f = !1;
|
|
974
|
-
typeof t == "function" ? (t = await t(a, e), f = !0, lt(i, t, "verify"), fe(t) && (t = await zr(t, i))) : lt(i, t, "verify");
|
|
975
|
-
const h = _r(we.encode(e.protected ?? ""), we.encode("."), typeof e.payload == "string" ? we.encode(e.payload) : e.payload);
|
|
976
|
-
let m;
|
|
977
|
-
try {
|
|
978
|
-
m = te(e.signature);
|
|
979
|
-
} catch {
|
|
980
|
-
throw new k("Failed to base64url decode the signature");
|
|
981
|
-
}
|
|
982
|
-
if (!await ra(i, t, m, h))
|
|
983
|
-
throw new $t();
|
|
984
|
-
let l;
|
|
985
|
-
if (s)
|
|
986
|
-
try {
|
|
987
|
-
l = te(e.payload);
|
|
988
|
-
} catch {
|
|
989
|
-
throw new k("Failed to base64url decode the payload");
|
|
990
|
-
}
|
|
991
|
-
else typeof e.payload == "string" ? l = we.encode(e.payload) : l = e.payload;
|
|
992
|
-
const u = { payload: l };
|
|
993
|
-
return e.protected !== void 0 && (u.protectedHeader = a), e.header !== void 0 && (u.unprotectedHeader = e.header), f ? { ...u, key: t } : u;
|
|
994
|
-
}
|
|
995
|
-
async function na(e, t, r) {
|
|
996
|
-
if (e instanceof Uint8Array && (e = be.decode(e)), typeof e != "string")
|
|
997
|
-
throw new k("Compact JWS must be a string or Uint8Array");
|
|
998
|
-
const { 0: a, 1: n, 2: o, length: s } = e.split(".");
|
|
999
|
-
if (s !== 3)
|
|
1000
|
-
throw new k("Invalid Compact JWS");
|
|
1001
|
-
const i = await aa({ payload: n, protected: a, signature: o }, t, r), c = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
1002
|
-
return typeof t == "function" ? { ...c, key: i.key } : c;
|
|
1003
|
-
}
|
|
1004
|
-
const oa = (e) => Math.floor(e.getTime() / 1e3), Jt = 60, Gt = Jt * 60, rt = Gt * 24, sa = rt * 7, ia = rt * 365.25, ca = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, dt = (e) => {
|
|
1005
|
-
const t = ca.exec(e);
|
|
1006
|
-
if (!t || t[4] && t[1])
|
|
1007
|
-
throw new TypeError("Invalid time period format");
|
|
1008
|
-
const r = parseFloat(t[2]), a = t[3].toLowerCase();
|
|
1009
|
-
let n;
|
|
1010
|
-
switch (a) {
|
|
1011
|
-
case "sec":
|
|
1012
|
-
case "secs":
|
|
1013
|
-
case "second":
|
|
1014
|
-
case "seconds":
|
|
1015
|
-
case "s":
|
|
1016
|
-
n = Math.round(r);
|
|
1017
|
-
break;
|
|
1018
|
-
case "minute":
|
|
1019
|
-
case "minutes":
|
|
1020
|
-
case "min":
|
|
1021
|
-
case "mins":
|
|
1022
|
-
case "m":
|
|
1023
|
-
n = Math.round(r * Jt);
|
|
1024
|
-
break;
|
|
1025
|
-
case "hour":
|
|
1026
|
-
case "hours":
|
|
1027
|
-
case "hr":
|
|
1028
|
-
case "hrs":
|
|
1029
|
-
case "h":
|
|
1030
|
-
n = Math.round(r * Gt);
|
|
1031
|
-
break;
|
|
1032
|
-
case "day":
|
|
1033
|
-
case "days":
|
|
1034
|
-
case "d":
|
|
1035
|
-
n = Math.round(r * rt);
|
|
1036
|
-
break;
|
|
1037
|
-
case "week":
|
|
1038
|
-
case "weeks":
|
|
1039
|
-
case "w":
|
|
1040
|
-
n = Math.round(r * sa);
|
|
1041
|
-
break;
|
|
1042
|
-
default:
|
|
1043
|
-
n = Math.round(r * ia);
|
|
1044
|
-
break;
|
|
1045
|
-
}
|
|
1046
|
-
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
1047
|
-
}, ut = (e) => e.toLowerCase().replace(/^application\//, ""), la = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, da = (e, t, r = {}) => {
|
|
1048
|
-
let a;
|
|
1049
|
-
try {
|
|
1050
|
-
a = JSON.parse(be.decode(t));
|
|
1051
|
-
} catch {
|
|
1052
|
-
}
|
|
1053
|
-
if (!pe(a))
|
|
1054
|
-
throw new V("JWT Claims Set must be a top-level JSON object");
|
|
1055
|
-
const { typ: n } = r;
|
|
1056
|
-
if (n && (typeof e.typ != "string" || ut(e.typ) !== ut(n)))
|
|
1057
|
-
throw new H('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
1058
|
-
const { requiredClaims: o = [], issuer: s, subject: i, audience: c, maxTokenAge: f } = r, h = [...o];
|
|
1059
|
-
f !== void 0 && h.push("iat"), c !== void 0 && h.push("aud"), i !== void 0 && h.push("sub"), s !== void 0 && h.push("iss");
|
|
1060
|
-
for (const y of new Set(h.reverse()))
|
|
1061
|
-
if (!(y in a))
|
|
1062
|
-
throw new H(`missing required "${y}" claim`, a, y, "missing");
|
|
1063
|
-
if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
|
|
1064
|
-
throw new H('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
1065
|
-
if (i && a.sub !== i)
|
|
1066
|
-
throw new H('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
1067
|
-
if (c && !la(a.aud, typeof c == "string" ? [c] : c))
|
|
1068
|
-
throw new H('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
1069
|
-
let m;
|
|
1070
|
-
switch (typeof r.clockTolerance) {
|
|
1071
|
-
case "string":
|
|
1072
|
-
m = dt(r.clockTolerance);
|
|
1073
|
-
break;
|
|
1074
|
-
case "number":
|
|
1075
|
-
m = r.clockTolerance;
|
|
1076
|
-
break;
|
|
1077
|
-
case "undefined":
|
|
1078
|
-
m = 0;
|
|
1079
|
-
break;
|
|
1080
|
-
default:
|
|
1081
|
-
throw new TypeError("Invalid clockTolerance option type");
|
|
1082
|
-
}
|
|
1083
|
-
const { currentDate: l } = r, u = oa(l || /* @__PURE__ */ new Date());
|
|
1084
|
-
if ((a.iat !== void 0 || f) && typeof a.iat != "number")
|
|
1085
|
-
throw new H('"iat" claim must be a number', a, "iat", "invalid");
|
|
1086
|
-
if (a.nbf !== void 0) {
|
|
1087
|
-
if (typeof a.nbf != "number")
|
|
1088
|
-
throw new H('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
1089
|
-
if (a.nbf > u + m)
|
|
1090
|
-
throw new H('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
|
1091
|
-
}
|
|
1092
|
-
if (a.exp !== void 0) {
|
|
1093
|
-
if (typeof a.exp != "number")
|
|
1094
|
-
throw new H('"exp" claim must be a number', a, "exp", "invalid");
|
|
1095
|
-
if (a.exp <= u - m)
|
|
1096
|
-
throw new Xe('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
1097
|
-
}
|
|
1098
|
-
if (f) {
|
|
1099
|
-
const y = u - a.iat, E = typeof f == "number" ? f : dt(f);
|
|
1100
|
-
if (y - m > E)
|
|
1101
|
-
throw new Xe('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
1102
|
-
if (y < 0 - m)
|
|
1103
|
-
throw new H('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
|
1104
|
-
}
|
|
1105
|
-
return a;
|
|
1106
|
-
};
|
|
1107
|
-
async function ua(e, t, r) {
|
|
1108
|
-
var a;
|
|
1109
|
-
const n = await na(e, t, r);
|
|
1110
|
-
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1111
|
-
throw new V("JWTs MUST NOT use unencoded payload");
|
|
1112
|
-
const o = { payload: da(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
1113
|
-
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
1114
|
-
}
|
|
1115
|
-
const ma = te;
|
|
1116
|
-
function ha(e) {
|
|
1117
|
-
if (typeof e != "string")
|
|
1118
|
-
throw new V("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1119
|
-
const { 1: t, length: r } = e.split(".");
|
|
1120
|
-
if (r === 5)
|
|
1121
|
-
throw new V("Only JWTs using Compact JWS serialization can be decoded");
|
|
1122
|
-
if (r !== 3)
|
|
1123
|
-
throw new V("Invalid JWT");
|
|
1124
|
-
if (!t)
|
|
1125
|
-
throw new V("JWTs must contain a payload");
|
|
1126
|
-
let a;
|
|
1127
|
-
try {
|
|
1128
|
-
a = ma(t);
|
|
1129
|
-
} catch {
|
|
1130
|
-
throw new V("Failed to base64url decode the payload");
|
|
1131
|
-
}
|
|
1132
|
-
let n;
|
|
1133
|
-
try {
|
|
1134
|
-
n = JSON.parse(be.decode(a));
|
|
1135
|
-
} catch {
|
|
1136
|
-
throw new V("Failed to parse the decoded payload as JSON");
|
|
1137
|
-
}
|
|
1138
|
-
if (!pe(n))
|
|
1139
|
-
throw new V("Invalid JWT Claims Set");
|
|
1140
|
-
return n;
|
|
1141
|
-
}
|
|
1142
|
-
const ye = async (e) => {
|
|
1143
|
-
try {
|
|
1144
|
-
const t = N.ALG, r = await jr(Sr, t);
|
|
1145
|
-
return await ua(e, r, {
|
|
1146
|
-
issuer: N.ISSUER
|
|
1147
|
-
});
|
|
1148
|
-
} catch {
|
|
1149
|
-
return;
|
|
1150
|
-
}
|
|
1151
|
-
}, pa = (e) => {
|
|
1152
|
-
try {
|
|
1153
|
-
return ha(e);
|
|
1154
|
-
} catch {
|
|
1155
|
-
return;
|
|
1156
|
-
}
|
|
1157
|
-
}, A = [];
|
|
1158
|
-
for (let e = 0; e < 256; ++e)
|
|
1159
|
-
A.push((e + 256).toString(16).slice(1));
|
|
1160
|
-
function fa(e, t = 0) {
|
|
1161
|
-
return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
|
|
1162
|
-
}
|
|
1163
|
-
let Je;
|
|
1164
|
-
const ga = new Uint8Array(16);
|
|
1165
|
-
function ya() {
|
|
1166
|
-
if (!Je) {
|
|
1167
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1168
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1169
|
-
Je = crypto.getRandomValues.bind(crypto);
|
|
1170
|
-
}
|
|
1171
|
-
return Je(ga);
|
|
1172
|
-
}
|
|
1173
|
-
const ba = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mt = { randomUUID: ba };
|
|
1174
|
-
function ht(e, t, r) {
|
|
1175
|
-
if (mt.randomUUID && !e)
|
|
1176
|
-
return mt.randomUUID();
|
|
1177
|
-
e = e || {};
|
|
1178
|
-
const a = e.random || (e.rng || ya)();
|
|
1179
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, fa(a);
|
|
1180
|
-
}
|
|
1181
|
-
const pt = globalThis.crypto, Ea = (e) => `${ht()}${ht()}`.slice(0, e), wa = (e) => btoa(
|
|
1182
|
-
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1183
|
-
);
|
|
1184
|
-
async function Ia(e) {
|
|
1185
|
-
if (!pt.subtle)
|
|
1186
|
-
throw new Error(
|
|
1187
|
-
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1188
|
-
);
|
|
1189
|
-
const t = new TextEncoder().encode(e), r = await pt.subtle.digest("SHA-256", t);
|
|
1190
|
-
return wa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1191
|
-
}
|
|
1192
|
-
async function Ta(e) {
|
|
1193
|
-
const t = Ea(43), r = await Ia(t);
|
|
1194
|
-
return {
|
|
1195
|
-
code_verifier: t,
|
|
1196
|
-
code_challenge: r
|
|
1197
|
-
};
|
|
1198
|
-
}
|
|
1199
|
-
function Yt(e, t) {
|
|
1200
|
-
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1201
|
-
}
|
|
1202
|
-
const ft = (e, t) => {
|
|
1203
|
-
const r = JSON.stringify(
|
|
1204
|
-
typeof t == "function" ? t() : t
|
|
1205
|
-
);
|
|
1206
|
-
window.localStorage.setItem(e, r), Yt(e, r);
|
|
1207
|
-
}, Sa = (e) => {
|
|
1208
|
-
window.localStorage.removeItem(e), Yt(e, null);
|
|
1209
|
-
}, gt = (e) => window.localStorage.getItem(e), _a = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1210
|
-
function Te({
|
|
1211
|
-
key: e,
|
|
1212
|
-
initialValue: t
|
|
1213
|
-
}) {
|
|
1214
|
-
const r = ur(_a, () => gt(e)), a = q(
|
|
1215
|
-
(s) => {
|
|
1216
|
-
try {
|
|
1217
|
-
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1218
|
-
i == null ? Sa(e) : ft(e, i);
|
|
1219
|
-
} catch (i) {
|
|
1220
|
-
console.warn(i);
|
|
1221
|
-
}
|
|
1222
|
-
},
|
|
1223
|
-
[e, r]
|
|
1224
|
-
), n = q(() => {
|
|
1225
|
-
a(t);
|
|
1226
|
-
}, [t, a]), o = q(() => {
|
|
1227
|
-
a(null);
|
|
1228
|
-
}, [a]);
|
|
1229
|
-
return G(() => {
|
|
1230
|
-
try {
|
|
1231
|
-
gt(e) === null && typeof t < "u" && ft(e, t);
|
|
1232
|
-
} catch (s) {
|
|
1233
|
-
console.warn(s);
|
|
1234
|
-
}
|
|
1235
|
-
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
1236
|
-
}
|
|
1237
|
-
const R = [];
|
|
1238
|
-
for (let e = 0; e < 256; ++e)
|
|
1239
|
-
R.push((e + 256).toString(16).slice(1));
|
|
1240
|
-
function ka(e, t = 0) {
|
|
1241
|
-
return (R[e[t + 0]] + R[e[t + 1]] + R[e[t + 2]] + R[e[t + 3]] + "-" + R[e[t + 4]] + R[e[t + 5]] + "-" + R[e[t + 6]] + R[e[t + 7]] + "-" + R[e[t + 8]] + R[e[t + 9]] + "-" + R[e[t + 10]] + R[e[t + 11]] + R[e[t + 12]] + R[e[t + 13]] + R[e[t + 14]] + R[e[t + 15]]).toLowerCase();
|
|
1242
|
-
}
|
|
1243
|
-
let Ge;
|
|
1244
|
-
const Aa = new Uint8Array(16);
|
|
1245
|
-
function Ra() {
|
|
1246
|
-
if (!Ge) {
|
|
1247
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1248
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1249
|
-
Ge = crypto.getRandomValues.bind(crypto);
|
|
1250
|
-
}
|
|
1251
|
-
return Ge(Aa);
|
|
1252
|
-
}
|
|
1253
|
-
const Na = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yt = { randomUUID: Na };
|
|
1254
|
-
function Ye(e, t, r) {
|
|
1255
|
-
if (yt.randomUUID && !e)
|
|
1256
|
-
return yt.randomUUID();
|
|
1257
|
-
e = e || {};
|
|
1258
|
-
const a = e.random || (e.rng || Ra)();
|
|
1259
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ka(a);
|
|
1260
|
-
}
|
|
1261
|
-
const ce = "Your session has expired. For your security, please log in again to continue.", va = "Your session has been successfully terminated.", Fe = "Login failed. Please try again.", xa = "Error getting access token, please re-authenticate.", Oa = "You forgot to wrap your component in <AuthProvider>.", Se = "@@auth@@", ge = "LOADING", Ae = "LOGIN", Ft = "LOGOUT", Ee = "success", Y = "failure", jt = "include", zt = "POST", qt = "application/json", _e = {
|
|
1262
|
-
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1263
|
-
$clientId: String!,
|
|
1264
|
-
$username: String!,
|
|
1265
|
-
$id: String!) {
|
|
1266
|
-
getPasskeyRegistrationOptions(clientId: $clientId, username: $username, id: $id) {
|
|
1267
|
-
challenge
|
|
1268
|
-
rp {
|
|
1269
|
-
id
|
|
1270
|
-
name
|
|
1271
|
-
}
|
|
1272
|
-
user {
|
|
1273
|
-
id
|
|
1274
|
-
name
|
|
1275
|
-
displayName
|
|
1276
|
-
}
|
|
1277
|
-
pubKeyCredParams {
|
|
1278
|
-
type
|
|
1279
|
-
alg
|
|
1280
|
-
}
|
|
1281
|
-
timeout
|
|
1282
|
-
attestation
|
|
1283
|
-
}
|
|
1284
|
-
}`,
|
|
1285
|
-
VERIFY_REGISTRATION: `mutation VerifyPasskeyRegistration(
|
|
1286
|
-
$clientId: String!,
|
|
1287
|
-
$username: String!,
|
|
1288
|
-
$id: String!,
|
|
1289
|
-
$registration: RegistrationOptionsInput!) {
|
|
1290
|
-
verifyPasskeyRegistration(
|
|
1291
|
-
clientId: $clientId,
|
|
1292
|
-
username: $username,
|
|
1293
|
-
id: $id,
|
|
1294
|
-
registration: $registration) {
|
|
1295
|
-
status
|
|
1296
|
-
message
|
|
1297
|
-
}
|
|
1298
|
-
}`,
|
|
1299
|
-
GET_AUTHENTICATION_OPTIONS: `mutation GetPasskeyAuthenticationOptions(
|
|
1300
|
-
$id: String!,
|
|
1301
|
-
$clientId: String!,
|
|
1302
|
-
) {
|
|
1303
|
-
getPasskeyAuthenticationOptions(
|
|
1304
|
-
id: $id,
|
|
1305
|
-
clientId: $clientId) {
|
|
1306
|
-
rpId,
|
|
1307
|
-
challenge,
|
|
1308
|
-
allowCredentials {
|
|
1309
|
-
id,
|
|
1310
|
-
type,
|
|
1311
|
-
transports
|
|
1312
|
-
}
|
|
1313
|
-
timeout,
|
|
1314
|
-
userVerification,
|
|
1315
|
-
}
|
|
1316
|
-
}`,
|
|
1317
|
-
VERIFY_AUTHENTICATION: `mutation VerifyPasskeyAuthentication(
|
|
1318
|
-
$clientId: String!,
|
|
1319
|
-
$id: String!,
|
|
1320
|
-
$authentication: AuthenticationOptionsInput!,
|
|
1321
|
-
$nonce: String!,
|
|
1322
|
-
$domain: String,
|
|
1323
|
-
$sessionExpiration: String,
|
|
1324
|
-
$ua: String) {
|
|
1325
|
-
verifyPasskeyAuthentication(
|
|
1326
|
-
clientId: $clientId,
|
|
1327
|
-
id: $id,
|
|
1328
|
-
authentication: $authentication,
|
|
1329
|
-
nonce: $nonce,
|
|
1330
|
-
domain: $domain,
|
|
1331
|
-
sessionExpiration: $sessionExpiration,
|
|
1332
|
-
ua: $ua) {
|
|
1333
|
-
status,
|
|
1334
|
-
idToken,
|
|
1335
|
-
accessToken,
|
|
1336
|
-
refreshToken,
|
|
1337
|
-
userId,
|
|
1338
|
-
username,
|
|
1339
|
-
email
|
|
1340
|
-
}
|
|
1341
|
-
}`
|
|
1342
|
-
}, le = {
|
|
1343
|
-
GET_REGISTRATION_OPTIONS: {
|
|
1344
|
-
schema: _e.GET_REGISTRATION_OPTIONS,
|
|
1345
|
-
method: "getPasskeyRegistrationOptions"
|
|
1346
|
-
},
|
|
1347
|
-
VERIFY_REGISTRATION: {
|
|
1348
|
-
schema: _e.VERIFY_REGISTRATION,
|
|
1349
|
-
method: "verifyPasskeyRegistration"
|
|
1350
|
-
},
|
|
1351
|
-
GET_AUTHENTICATION_OPTIONS: {
|
|
1352
|
-
schema: _e.GET_AUTHENTICATION_OPTIONS,
|
|
1353
|
-
method: "getPasskeyAuthenticationOptions"
|
|
1354
|
-
},
|
|
1355
|
-
VERIFY_AUTHENTICATION: {
|
|
1356
|
-
schema: _e.VERIFY_AUTHENTICATION,
|
|
1357
|
-
method: "verifyPasskeyAuthentication"
|
|
1358
|
-
}
|
|
1359
|
-
}, de = async ({
|
|
1360
|
-
accessToken: e,
|
|
1361
|
-
type: t,
|
|
1362
|
-
clientId: r,
|
|
1363
|
-
params: a = {},
|
|
1364
|
-
endpoint: n
|
|
1365
|
-
}) => {
|
|
1366
|
-
try {
|
|
1367
|
-
const o = `Bearer ${e}`, s = await fetch(`${n}/graphql`, {
|
|
1368
|
-
credentials: jt,
|
|
1369
|
-
method: zt,
|
|
1370
|
-
headers: {
|
|
1371
|
-
authorization: o,
|
|
1372
|
-
"Content-Type": qt,
|
|
1373
|
-
[Pt.CLIENT_ID]: `${r}`
|
|
1374
|
-
},
|
|
1375
|
-
body: JSON.stringify({
|
|
1376
|
-
query: t.schema,
|
|
1377
|
-
variables: a
|
|
1378
|
-
})
|
|
1379
|
-
});
|
|
1380
|
-
if (s.status !== 200)
|
|
1381
|
-
return { status: Y, data: [] };
|
|
1382
|
-
const { data: i } = await s.json();
|
|
1383
|
-
return {
|
|
1384
|
-
status: Ee,
|
|
1385
|
-
data: i[t.method]
|
|
1386
|
-
};
|
|
1387
|
-
} catch (o) {
|
|
1388
|
-
return console.error(o), { status: Y, data: [] };
|
|
1389
|
-
}
|
|
1390
|
-
}, Ue = async ({
|
|
1391
|
-
type: e,
|
|
1392
|
-
clientId: t,
|
|
1393
|
-
params: r = {},
|
|
1394
|
-
endpoint: a
|
|
1395
|
-
}) => {
|
|
1396
|
-
try {
|
|
1397
|
-
const n = await fetch(`${a}/${e}`, {
|
|
1398
|
-
credentials: jt,
|
|
1399
|
-
method: zt,
|
|
1400
|
-
headers: {
|
|
1401
|
-
"Content-Type": qt,
|
|
1402
|
-
[Pt.CLIENT_ID]: `${t}`
|
|
1403
|
-
},
|
|
1404
|
-
body: JSON.stringify(r)
|
|
1405
|
-
});
|
|
1406
|
-
if (n.status !== 200)
|
|
1407
|
-
return { status: Y, data: [] };
|
|
1408
|
-
const { data: o } = await n.json();
|
|
1409
|
-
return {
|
|
1410
|
-
status: Ee,
|
|
1411
|
-
data: o || []
|
|
1412
|
-
};
|
|
1413
|
-
} catch (n) {
|
|
1414
|
-
return console.error(n), { status: Y, data: [] };
|
|
1415
|
-
}
|
|
1416
|
-
}, Ca = process.env.NODE_ENV === "production", Pa = !Ca, Xt = {
|
|
1417
|
-
isLoading: !0,
|
|
1418
|
-
isAuthenticated: !1,
|
|
1419
|
-
user: void 0,
|
|
1420
|
-
logoutReason: "",
|
|
1421
|
-
debug: !1,
|
|
1422
|
-
authenticationType: ""
|
|
1423
|
-
}, Da = (e) => {
|
|
1424
|
-
try {
|
|
1425
|
-
const t = pa(e);
|
|
1426
|
-
return t ? t[N.USER_ID_KEY] : "";
|
|
1427
|
-
} catch {
|
|
1428
|
-
return "";
|
|
1429
|
-
}
|
|
1430
|
-
}, La = async ({
|
|
1431
|
-
userId: e,
|
|
1432
|
-
clientId: t,
|
|
1433
|
-
domain: r,
|
|
1434
|
-
idToken: a = "",
|
|
1435
|
-
endpoint: n
|
|
1436
|
-
}) => {
|
|
1437
|
-
var o;
|
|
1438
|
-
try {
|
|
1439
|
-
return {
|
|
1440
|
-
status: ((o = await Ue({
|
|
1441
|
-
endpoint: n,
|
|
1442
|
-
type: $e.LOGOUT,
|
|
1443
|
-
clientId: t,
|
|
1444
|
-
params: {
|
|
1445
|
-
userId: e,
|
|
1446
|
-
domain: r,
|
|
1447
|
-
idToken: a
|
|
1448
|
-
}
|
|
1449
|
-
})) == null ? void 0 : o.status) || Y
|
|
1450
|
-
};
|
|
1451
|
-
} catch {
|
|
1452
|
-
return {
|
|
1453
|
-
status: Y
|
|
1454
|
-
};
|
|
1455
|
-
}
|
|
1456
|
-
}, $a = async ({
|
|
1457
|
-
username: e,
|
|
1458
|
-
password: t,
|
|
1459
|
-
clientId: r,
|
|
1460
|
-
nonce: a,
|
|
1461
|
-
type: n,
|
|
1462
|
-
sessionExpiration: o,
|
|
1463
|
-
code: s,
|
|
1464
|
-
code_verifier: i,
|
|
1465
|
-
domain: c,
|
|
1466
|
-
ua: f,
|
|
1467
|
-
endpoint: h
|
|
1468
|
-
}) => {
|
|
1469
|
-
var m;
|
|
1470
|
-
try {
|
|
1471
|
-
const l = await Ue({
|
|
1472
|
-
endpoint: h,
|
|
1473
|
-
type: $e.LOGIN,
|
|
1474
|
-
clientId: r,
|
|
1475
|
-
params: {
|
|
1476
|
-
type: n || he.ID_AND_ACCESS_TOKEN,
|
|
1477
|
-
username: e,
|
|
1478
|
-
password: t,
|
|
1479
|
-
sessionExpiration: o,
|
|
1480
|
-
nonce: a,
|
|
1481
|
-
code: s,
|
|
1482
|
-
code_verifier: i,
|
|
1483
|
-
domain: c,
|
|
1484
|
-
ua: f
|
|
1485
|
-
}
|
|
1486
|
-
}), u = await ye((m = l == null ? void 0 : l.data) == null ? void 0 : m.idToken);
|
|
1487
|
-
return u && u.payload[N.USER_ID_KEY] !== "" && u.payload[N.NONCE_KEY] === a ? {
|
|
1488
|
-
idToken: l.data.idToken,
|
|
1489
|
-
accessToken: l.data.accessToken,
|
|
1490
|
-
refreshToken: l.data.refreshToken,
|
|
1491
|
-
userId: u.payload[N.USER_ID_KEY],
|
|
1492
|
-
email: u.payload[N.EMAIL_KEY],
|
|
1493
|
-
status: !0
|
|
1494
|
-
} : {
|
|
1495
|
-
status: !1
|
|
1496
|
-
};
|
|
1497
|
-
} catch {
|
|
1498
|
-
return {
|
|
1499
|
-
status: !1
|
|
1500
|
-
};
|
|
1501
|
-
}
|
|
1502
|
-
}, Ma = async ({
|
|
1503
|
-
nonce: e,
|
|
1504
|
-
clientId: t,
|
|
1505
|
-
code_challenge: r,
|
|
1506
|
-
endpoint: a
|
|
1507
|
-
}) => {
|
|
1508
|
-
var n;
|
|
1509
|
-
try {
|
|
1510
|
-
const o = await Ue({
|
|
1511
|
-
endpoint: a,
|
|
1512
|
-
type: $e.CODE,
|
|
1513
|
-
clientId: t,
|
|
1514
|
-
params: {
|
|
1515
|
-
type: he.CODE,
|
|
1516
|
-
nonce: e,
|
|
1517
|
-
code_challenge: r
|
|
1518
|
-
}
|
|
1519
|
-
});
|
|
1520
|
-
return (n = o == null ? void 0 : o.data) != null && n.code ? {
|
|
1521
|
-
status: Ee,
|
|
1522
|
-
data: o.data.code
|
|
1523
|
-
} : {
|
|
1524
|
-
status: Y,
|
|
1525
|
-
data: ""
|
|
1526
|
-
};
|
|
1527
|
-
} catch {
|
|
1528
|
-
return {
|
|
1529
|
-
status: Y,
|
|
1530
|
-
data: ""
|
|
1531
|
-
};
|
|
1532
|
-
}
|
|
1533
|
-
}, Ua = async ({
|
|
1534
|
-
clientId: e,
|
|
1535
|
-
userId: t,
|
|
1536
|
-
nonce: r,
|
|
1537
|
-
refreshToken: a,
|
|
1538
|
-
accessToken: n,
|
|
1539
|
-
domain: o,
|
|
1540
|
-
endpoint: s
|
|
1541
|
-
}) => {
|
|
1542
|
-
var i;
|
|
1543
|
-
try {
|
|
1544
|
-
const c = await Ue({
|
|
1545
|
-
endpoint: s,
|
|
1546
|
-
type: $e.REFRESH,
|
|
1547
|
-
clientId: e,
|
|
1548
|
-
params: {
|
|
1549
|
-
type: he.REFRESH_TOKEN,
|
|
1550
|
-
userId: t,
|
|
1551
|
-
nonce: r,
|
|
1552
|
-
refreshToken: a,
|
|
1553
|
-
accessToken: n,
|
|
1554
|
-
domain: o
|
|
1555
|
-
}
|
|
1556
|
-
}), f = await ye((i = c == null ? void 0 : c.data) == null ? void 0 : i.accessToken);
|
|
1557
|
-
return f && f.payload[N.USER_ID_KEY] !== "" && f.payload[N.NONCE_KEY] === r ? {
|
|
1558
|
-
accessToken: c.data.accessToken,
|
|
1559
|
-
refreshToken: c.data.refreshToken,
|
|
1560
|
-
userId: f.payload[N.USER_ID_KEY],
|
|
1561
|
-
status: !0
|
|
1562
|
-
} : {
|
|
1563
|
-
status: !1
|
|
1564
|
-
};
|
|
1565
|
-
} catch {
|
|
1566
|
-
return {
|
|
1567
|
-
status: !1
|
|
1568
|
-
};
|
|
1569
|
-
}
|
|
1570
|
-
};
|
|
1571
|
-
class Ka {
|
|
1572
|
-
constructor(t = null, r = null) {
|
|
1573
|
-
We(this, "refreshTokenPromise", null), We(this, "accessToken"), We(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1574
|
-
}
|
|
1575
|
-
async refreshtoken({
|
|
1576
|
-
clientId: t,
|
|
1577
|
-
userId: r,
|
|
1578
|
-
nonce: a,
|
|
1579
|
-
domain: n,
|
|
1580
|
-
endpoint: o
|
|
1581
|
-
}) {
|
|
1582
|
-
this.refreshTokenPromise || (this.refreshTokenPromise = this._refreshToken({
|
|
1583
|
-
endpoint: o,
|
|
1584
|
-
clientId: t,
|
|
1585
|
-
userId: r,
|
|
1586
|
-
nonce: a,
|
|
1587
|
-
domain: n
|
|
1588
|
-
}));
|
|
1589
|
-
try {
|
|
1590
|
-
return await this.refreshTokenPromise;
|
|
1591
|
-
} finally {
|
|
1592
|
-
this.refreshTokenPromise = null;
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
async _refreshToken({
|
|
1596
|
-
endpoint: t,
|
|
1597
|
-
clientId: r,
|
|
1598
|
-
userId: a,
|
|
1599
|
-
nonce: n,
|
|
1600
|
-
domain: o
|
|
1601
|
-
}) {
|
|
1602
|
-
const s = await ye(this.refreshToken);
|
|
1603
|
-
if (s && s.payload[N.USER_ID_KEY] !== "") {
|
|
1604
|
-
const i = await Ua({
|
|
1605
|
-
endpoint: t,
|
|
1606
|
-
clientId: r,
|
|
1607
|
-
userId: a,
|
|
1608
|
-
nonce: n,
|
|
1609
|
-
refreshToken: this.refreshToken,
|
|
1610
|
-
accessToken: this.accessToken,
|
|
1611
|
-
domain: o
|
|
1612
|
-
});
|
|
1613
|
-
return i.status ? (this.accessToken = i.accessToken, this.refreshToken = i.refreshToken, {
|
|
1614
|
-
status: Ee,
|
|
1615
|
-
newAccessToken: i.accessToken,
|
|
1616
|
-
newRefreshToken: i.refreshToken
|
|
1617
|
-
}) : {
|
|
1618
|
-
status: Y
|
|
1619
|
-
};
|
|
1620
|
-
} else
|
|
1621
|
-
return {
|
|
1622
|
-
status: Y
|
|
1623
|
-
};
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
const Ha = (e) => q(
|
|
1627
|
-
(...t) => {
|
|
1628
|
-
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1629
|
-
},
|
|
1630
|
-
[e]
|
|
1631
|
-
), ue = () => {
|
|
1632
|
-
throw new Error(Oa);
|
|
1633
|
-
}, Qt = dr({
|
|
1634
|
-
isAuthenticated: !1,
|
|
1635
|
-
isLoading: !1,
|
|
1636
|
-
login: ue,
|
|
1637
|
-
logout: ue,
|
|
1638
|
-
getAccessToken: ue,
|
|
1639
|
-
getIdToken: ue,
|
|
1640
|
-
registeringForPasskey: ue,
|
|
1641
|
-
loginWithPasskey: ue,
|
|
1642
|
-
logoutReason: "",
|
|
1643
|
-
authenticationType: ""
|
|
1644
|
-
}), Wa = X.createContext({
|
|
1645
|
-
state: Xt,
|
|
1646
|
-
dispatch: () => {
|
|
1647
|
-
}
|
|
1648
|
-
}), Ba = (e, t) => (t == null ? void 0 : t.type) === ge ? {
|
|
1649
|
-
...e,
|
|
1650
|
-
isLoading: t.payload.isLoading
|
|
1651
|
-
} : (t == null ? void 0 : t.type) === Ae ? {
|
|
1652
|
-
...e,
|
|
1653
|
-
isLoading: !1,
|
|
1654
|
-
isAuthenticated: !0,
|
|
1655
|
-
user: t.payload.user,
|
|
1656
|
-
authenticationType: t.payload.authenticationType,
|
|
1657
|
-
logoutReason: ""
|
|
1658
|
-
} : (t == null ? void 0 : t.type) === Ft ? {
|
|
1659
|
-
...e,
|
|
1660
|
-
isLoading: !1,
|
|
1661
|
-
isAuthenticated: !1,
|
|
1662
|
-
user: void 0,
|
|
1663
|
-
authenticationType: "",
|
|
1664
|
-
logoutReason: t.payload.logoutReason
|
|
1665
|
-
} : e, bt = ({
|
|
1666
|
-
children: e,
|
|
1667
|
-
sessionExpiration: t,
|
|
1668
|
-
clientId: r,
|
|
1669
|
-
domain: a = "",
|
|
1670
|
-
debug: n = !1,
|
|
1671
|
-
endpoint: o = Pa ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
|
|
1672
|
-
}) => {
|
|
1673
|
-
const [s, i] = At(Ba, {
|
|
1674
|
-
...Xt,
|
|
1675
|
-
debug: n
|
|
1676
|
-
}), c = Ha(n), f = O(!1), [h, m, , l] = Te({
|
|
1677
|
-
key: `${Se}::${r}::@@user@@`
|
|
1678
|
-
}), [u, y, , E] = Te({
|
|
1679
|
-
key: `${Se}::${r}::@@access@@`
|
|
1680
|
-
}), [T, _, , F] = Te(
|
|
1681
|
-
{
|
|
1682
|
-
key: `${Se}::${r}::@@refresh@@`
|
|
1683
|
-
}
|
|
1684
|
-
), [M, Q, , L] = Te({
|
|
1685
|
-
key: `${Se}::${r}::@@nonce@@`
|
|
1686
|
-
}), re = new Ka(u, T), U = q(() => {
|
|
1687
|
-
c("removeLocalStorage: removing local storage"), l(), E(), F(), L();
|
|
1688
|
-
}, [
|
|
1689
|
-
E,
|
|
1690
|
-
l,
|
|
1691
|
-
L,
|
|
1692
|
-
F,
|
|
1693
|
-
c
|
|
1694
|
-
]), v = q(
|
|
1695
|
-
(g) => {
|
|
1696
|
-
c(
|
|
1697
|
-
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1698
|
-
g
|
|
1699
|
-
), i({
|
|
1700
|
-
type: Ft,
|
|
1701
|
-
payload: {
|
|
1702
|
-
logoutReason: g || ce
|
|
1703
|
-
}
|
|
1704
|
-
}), U(), i({ type: ge, payload: { isLoading: !1 } });
|
|
1705
|
-
},
|
|
1706
|
-
[U, c]
|
|
1707
|
-
), S = q(
|
|
1708
|
-
async (g) => {
|
|
1709
|
-
c("invalidateAndLogout: invalidating and logging out");
|
|
1710
|
-
const { user: I } = s, b = (I == null ? void 0 : I.userId) || Da(h);
|
|
1711
|
-
b || c(
|
|
1712
|
-
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1713
|
-
), await La({
|
|
1714
|
-
userId: b,
|
|
1715
|
-
clientId: r,
|
|
1716
|
-
domain: a,
|
|
1717
|
-
idToken: h,
|
|
1718
|
-
endpoint: o
|
|
1719
|
-
}), v(g || ce);
|
|
1720
|
-
},
|
|
1721
|
-
[
|
|
1722
|
-
h,
|
|
1723
|
-
s,
|
|
1724
|
-
r,
|
|
1725
|
-
a,
|
|
1726
|
-
v,
|
|
1727
|
-
c,
|
|
1728
|
-
o
|
|
1729
|
-
]
|
|
1730
|
-
);
|
|
1731
|
-
G(() => {
|
|
1732
|
-
if (!f.current)
|
|
1733
|
-
return s.isLoading && h !== null ? (async () => {
|
|
1734
|
-
try {
|
|
1735
|
-
const g = await ye(h);
|
|
1736
|
-
g && g.payload[N.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), i({
|
|
1737
|
-
type: Ae,
|
|
1738
|
-
payload: {
|
|
1739
|
-
authenticationType: g.payload[N.AUTH_TYPE_KEY],
|
|
1740
|
-
user: {
|
|
1741
|
-
userId: g.payload[N.USER_ID_KEY],
|
|
1742
|
-
username: g.payload[N.USERNAME_KEY],
|
|
1743
|
-
email: g.payload[N.EMAIL_KEY]
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
})) : (c("useEffect: invalid JWT, invalidating and logging out"), await S(ce));
|
|
1747
|
-
} catch {
|
|
1748
|
-
c(
|
|
1749
|
-
"useEffect: exception validating JWT, invalidating and logging out"
|
|
1750
|
-
), await S(ce);
|
|
1751
|
-
}
|
|
1752
|
-
})() : (c("useEffect: setting the loading state to false"), i({ type: ge, payload: { isLoading: !1 } })), () => {
|
|
1753
|
-
f.current = !0;
|
|
1754
|
-
};
|
|
1755
|
-
}, [s.isLoading, h, S, c]);
|
|
1756
|
-
const K = async (g, I) => {
|
|
1757
|
-
i({ type: ge, payload: { isLoading: !0 } }), U();
|
|
1758
|
-
const b = Ye();
|
|
1759
|
-
Q(b), c("login: Logging in with password");
|
|
1760
|
-
const { code_verifier: ne, code_challenge: lr } = await Ta(), st = await Ma({
|
|
1761
|
-
endpoint: o,
|
|
1762
|
-
nonce: b,
|
|
1763
|
-
clientId: r,
|
|
1764
|
-
code_challenge: lr
|
|
1765
|
-
});
|
|
1766
|
-
if (st.status) {
|
|
1767
|
-
const oe = await $a({
|
|
1768
|
-
endpoint: o,
|
|
1769
|
-
username: g,
|
|
1770
|
-
password: I,
|
|
1771
|
-
clientId: r,
|
|
1772
|
-
sessionExpiration: t,
|
|
1773
|
-
nonce: b,
|
|
1774
|
-
type: he.CODE,
|
|
1775
|
-
code: st.data,
|
|
1776
|
-
code_verifier: ne,
|
|
1777
|
-
domain: a,
|
|
1778
|
-
ua: navigator.userAgent
|
|
1779
|
-
});
|
|
1780
|
-
return oe.status ? (m(oe.idToken), y(oe.accessToken), _(oe.refreshToken), i({
|
|
1781
|
-
type: Ae,
|
|
1782
|
-
payload: {
|
|
1783
|
-
authenticationType: he.CODE,
|
|
1784
|
-
user: {
|
|
1785
|
-
userId: oe.userId,
|
|
1786
|
-
username: g,
|
|
1787
|
-
email: oe.email
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
}), !0) : (v(Fe), !1);
|
|
1791
|
-
}
|
|
1792
|
-
return !1;
|
|
1793
|
-
}, w = async (g) => {
|
|
1794
|
-
g == null || g.preventDefault(), await S(va);
|
|
1795
|
-
}, C = async () => {
|
|
1796
|
-
const { isAuthenticated: g, user: I } = s;
|
|
1797
|
-
try {
|
|
1798
|
-
if (g && I && I.userId) {
|
|
1799
|
-
if (u) {
|
|
1800
|
-
c("getAccessToken");
|
|
1801
|
-
const ne = await ye(u);
|
|
1802
|
-
if (ne && ne.payload[N.USER_ID_KEY] !== "")
|
|
1803
|
-
return u;
|
|
1804
|
-
}
|
|
1805
|
-
c("getAccessToken: invalid access token, trying to refresh it");
|
|
1806
|
-
const b = await re.refreshtoken({
|
|
1807
|
-
endpoint: o,
|
|
1808
|
-
clientId: r,
|
|
1809
|
-
userId: I.userId,
|
|
1810
|
-
nonce: M,
|
|
1811
|
-
domain: a
|
|
1812
|
-
});
|
|
1813
|
-
return b.status && b.status === "success" && b.newAccessToken ? (y(b.newAccessToken), _(b.newRefreshToken), b.newAccessToken) : (c(
|
|
1814
|
-
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
1815
|
-
), await S(ce), "");
|
|
1816
|
-
}
|
|
1817
|
-
return c(
|
|
1818
|
-
"getAccessToken: user is not authenticated, cannot get access token"
|
|
1819
|
-
), await S(ce), "";
|
|
1820
|
-
} catch {
|
|
1821
|
-
return c(
|
|
1822
|
-
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1823
|
-
), await S(xa), "";
|
|
1824
|
-
}
|
|
1825
|
-
}, P = () => s.isAuthenticated && h ? h : "", B = async () => {
|
|
1826
|
-
const { user: g } = s;
|
|
1827
|
-
let I = await de({
|
|
1828
|
-
endpoint: o,
|
|
1829
|
-
accessToken: u,
|
|
1830
|
-
clientId: r,
|
|
1831
|
-
type: le.GET_REGISTRATION_OPTIONS,
|
|
1832
|
-
params: {
|
|
1833
|
-
clientId: r,
|
|
1834
|
-
id: g == null ? void 0 : g.userId,
|
|
1835
|
-
username: g == null ? void 0 : g.username
|
|
1836
|
-
}
|
|
1837
|
-
});
|
|
1838
|
-
if (I.status)
|
|
1839
|
-
try {
|
|
1840
|
-
const b = await Er(I.data);
|
|
1841
|
-
return I = await de({
|
|
1842
|
-
endpoint: o,
|
|
1843
|
-
accessToken: u,
|
|
1844
|
-
clientId: r,
|
|
1845
|
-
type: le.VERIFY_REGISTRATION,
|
|
1846
|
-
params: {
|
|
1847
|
-
clientId: r,
|
|
1848
|
-
id: g == null ? void 0 : g.userId,
|
|
1849
|
-
username: g == null ? void 0 : g.username,
|
|
1850
|
-
registration: b
|
|
1851
|
-
}
|
|
1852
|
-
}), !!(I.status && I.data.length > 0);
|
|
1853
|
-
} catch {
|
|
1854
|
-
return await de({
|
|
1855
|
-
endpoint: o,
|
|
1856
|
-
accessToken: u,
|
|
1857
|
-
clientId: r,
|
|
1858
|
-
type: le.VERIFY_REGISTRATION,
|
|
1859
|
-
params: {
|
|
1860
|
-
clientId: r,
|
|
1861
|
-
id: g == null ? void 0 : g.userId,
|
|
1862
|
-
username: g == null ? void 0 : g.username,
|
|
1863
|
-
registration: {}
|
|
1864
|
-
}
|
|
1865
|
-
}), !1;
|
|
1866
|
-
}
|
|
1867
|
-
return !1;
|
|
1868
|
-
}, Z = async () => {
|
|
1869
|
-
i({ type: ge, payload: { isLoading: !0 } }), U();
|
|
1870
|
-
const g = Ye();
|
|
1871
|
-
Q(g), c("loginWithPasskey");
|
|
1872
|
-
const I = Ye();
|
|
1873
|
-
let b = await de({
|
|
1874
|
-
endpoint: o,
|
|
1875
|
-
accessToken: u,
|
|
1876
|
-
clientId: r,
|
|
1877
|
-
type: le.GET_AUTHENTICATION_OPTIONS,
|
|
1878
|
-
params: {
|
|
1879
|
-
id: I,
|
|
1880
|
-
clientId: r
|
|
1881
|
-
}
|
|
1882
|
-
});
|
|
1883
|
-
if (b.status)
|
|
1884
|
-
try {
|
|
1885
|
-
const ne = await Tr(b.data);
|
|
1886
|
-
return b = await de({
|
|
1887
|
-
endpoint: o,
|
|
1888
|
-
accessToken: u,
|
|
1889
|
-
clientId: r,
|
|
1890
|
-
type: le.VERIFY_AUTHENTICATION,
|
|
1891
|
-
params: {
|
|
1892
|
-
clientId: r,
|
|
1893
|
-
id: I,
|
|
1894
|
-
authentication: ne,
|
|
1895
|
-
nonce: g,
|
|
1896
|
-
domain: a,
|
|
1897
|
-
sessionExpiration: t,
|
|
1898
|
-
ua: navigator.userAgent
|
|
1899
|
-
}
|
|
1900
|
-
}), b.data.status === Ee ? (m(b.data.idToken), y(b.data.accessToken), _(b.data.refreshToken), i({
|
|
1901
|
-
type: Ae,
|
|
1902
|
-
payload: {
|
|
1903
|
-
authenticationType: he.PASSKEY,
|
|
1904
|
-
user: {
|
|
1905
|
-
userId: b.data.userId,
|
|
1906
|
-
username: b.data.username,
|
|
1907
|
-
email: b.data.email
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
}), !0) : (v(Fe), !1);
|
|
1911
|
-
} catch {
|
|
1912
|
-
return await de({
|
|
1913
|
-
endpoint: o,
|
|
1914
|
-
accessToken: u,
|
|
1915
|
-
clientId: r,
|
|
1916
|
-
type: le.VERIFY_AUTHENTICATION,
|
|
1917
|
-
params: {
|
|
1918
|
-
clientId: r,
|
|
1919
|
-
id: I,
|
|
1920
|
-
authentication: {},
|
|
1921
|
-
nonce: g,
|
|
1922
|
-
domain: a,
|
|
1923
|
-
sessionExpiration: t
|
|
1924
|
-
}
|
|
1925
|
-
}), v(Fe), !1;
|
|
1926
|
-
}
|
|
1927
|
-
return !1;
|
|
1928
|
-
};
|
|
1929
|
-
return /* @__PURE__ */ d(Wa.Provider, { value: { state: s, dispatch: i }, children: /* @__PURE__ */ d(
|
|
1930
|
-
Qt.Provider,
|
|
1931
|
-
{
|
|
1932
|
-
value: {
|
|
1933
|
-
...s,
|
|
1934
|
-
login: K,
|
|
1935
|
-
logout: w,
|
|
1936
|
-
getAccessToken: C,
|
|
1937
|
-
getIdToken: P,
|
|
1938
|
-
registeringForPasskey: B,
|
|
1939
|
-
loginWithPasskey: Z
|
|
1940
|
-
},
|
|
1941
|
-
children: e
|
|
1942
|
-
}
|
|
1943
|
-
) });
|
|
1944
|
-
}, Zt = (e = Qt) => Rt(e), wo = "user", Io = "assistant", To = "system", So = "internal", _o = "hidden", ko = "I'm having trouble right now. Please try again later.", Ao = "OpenAI", Ro = "OpenAI", No = "Anthropic", vo = "action-search", xo = "action-sort", Oo = "action-toggle-prompt", Co = "action-reset-prompt", Po = "sassy-saint-", Do = "details", Lo = "search", $o = "sort", Mo = "private-disclosure", Uo = "==stats==", Ko = "==wait==", Et = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ho = 10, Wo = 30, Bo = "av-prompt", Vo = "av-prompt-editable", Jo = "size-5 sm:size-4", wt = (e) => Number.isFinite(e) ? e : 0;
|
|
1945
|
-
function Va(e) {
|
|
1946
|
-
return {
|
|
1947
|
-
days: Math.trunc(e / 864e5),
|
|
1948
|
-
hours: Math.trunc(e / 36e5 % 24),
|
|
1949
|
-
minutes: Math.trunc(e / 6e4 % 60),
|
|
1950
|
-
seconds: Math.trunc(e / 1e3 % 60),
|
|
1951
|
-
milliseconds: Math.trunc(e % 1e3),
|
|
1952
|
-
microseconds: Math.trunc(wt(e * 1e3) % 1e3),
|
|
1953
|
-
nanoseconds: Math.trunc(wt(e * 1e6) % 1e3)
|
|
1954
|
-
};
|
|
1955
|
-
}
|
|
1956
|
-
function Ja(e) {
|
|
1957
|
-
return {
|
|
1958
|
-
days: e / 86400000n,
|
|
1959
|
-
hours: e / 3600000n % 24n,
|
|
1960
|
-
minutes: e / 60000n % 60n,
|
|
1961
|
-
seconds: e / 1000n % 60n,
|
|
1962
|
-
milliseconds: e % 1000n,
|
|
1963
|
-
microseconds: 0n,
|
|
1964
|
-
nanoseconds: 0n
|
|
1965
|
-
};
|
|
1966
|
-
}
|
|
1967
|
-
function Ga(e) {
|
|
1968
|
-
switch (typeof e) {
|
|
1969
|
-
case "number": {
|
|
1970
|
-
if (Number.isFinite(e))
|
|
1971
|
-
return Va(e);
|
|
1972
|
-
break;
|
|
1973
|
-
}
|
|
1974
|
-
case "bigint":
|
|
1975
|
-
return Ja(e);
|
|
1976
|
-
}
|
|
1977
|
-
throw new TypeError("Expected a finite number or bigint");
|
|
1978
|
-
}
|
|
1979
|
-
const Ya = (e) => e === 0 || e === 0n, Fa = (e, t) => t === 1 || t === 1n ? e : `${e}s`, ja = 1e-7, za = 24n * 60n * 60n * 1000n;
|
|
1980
|
-
function qa(e, t) {
|
|
1981
|
-
const r = typeof e == "bigint";
|
|
1982
|
-
if (!r && !Number.isFinite(e))
|
|
1983
|
-
throw new TypeError("Expected a finite number or bigint");
|
|
1984
|
-
t = { ...t };
|
|
1985
|
-
const a = e < 0 ? "-" : "";
|
|
1986
|
-
e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
|
|
1987
|
-
let n = [];
|
|
1988
|
-
const o = (h, m) => {
|
|
1989
|
-
const l = Math.floor(h * 10 ** m + ja);
|
|
1990
|
-
return (Math.round(l) / 10 ** m).toFixed(m);
|
|
1991
|
-
}, s = (h, m, l, u) => {
|
|
1992
|
-
if (!((n.length === 0 || !t.colonNotation) && Ya(h) && !(t.colonNotation && l === "m"))) {
|
|
1993
|
-
if (u ?? (u = String(h)), t.colonNotation) {
|
|
1994
|
-
const y = u.includes(".") ? u.split(".")[0].length : u.length, E = n.length > 0 ? 2 : 1;
|
|
1995
|
-
u = "0".repeat(Math.max(0, E - y)) + u;
|
|
1996
|
-
} else
|
|
1997
|
-
u += t.verbose ? " " + Fa(m, h) : l;
|
|
1998
|
-
n.push(u);
|
|
1999
|
-
}
|
|
2000
|
-
}, i = Ga(e), c = BigInt(i.days);
|
|
2001
|
-
if (t.hideYearAndDays ? s(BigInt(c) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(c, "day", "d") : (s(c / 365n, "year", "y"), s(c % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
|
|
2002
|
-
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
2003
|
-
const h = Number(i.seconds), m = Number(i.milliseconds), l = Number(i.microseconds), u = Number(i.nanoseconds);
|
|
2004
|
-
if (s(h, "second", "s"), t.formatSubMilliseconds)
|
|
2005
|
-
s(m, "millisecond", "ms"), s(l, "microsecond", "µs"), s(u, "nanosecond", "ns");
|
|
2006
|
-
else {
|
|
2007
|
-
const y = m + l / 1e3 + u / 1e6, E = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, T = y >= 1 ? Math.round(y) : Math.ceil(y), _ = E ? y.toFixed(E) : T;
|
|
2008
|
-
s(
|
|
2009
|
-
Number.parseFloat(_),
|
|
2010
|
-
"millisecond",
|
|
2011
|
-
"ms",
|
|
2012
|
-
_
|
|
2013
|
-
);
|
|
2014
|
-
}
|
|
2015
|
-
} else {
|
|
2016
|
-
const h = (r ? Number(e % za) : e) / 1e3 % 60, m = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = o(h, m), u = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
|
|
2017
|
-
s(Number.parseFloat(u), "second", "s", u);
|
|
2018
|
-
}
|
|
2019
|
-
if (n.length === 0)
|
|
2020
|
-
return a + "0" + (t.verbose ? " milliseconds" : "ms");
|
|
2021
|
-
const f = t.colonNotation ? ":" : " ";
|
|
2022
|
-
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(f);
|
|
2023
|
-
}
|
|
2024
|
-
const Xa = process.env.NODE_ENV === "production", er = !Xa, Qa = er ? "gizmette.local.com" : "gizmette.com", Go = async () => {
|
|
2025
|
-
const e = {
|
|
2026
|
-
/**
|
|
2027
|
-
* A boolean value that indicates the application would
|
|
2028
|
-
* like to receive the best possible results. If true
|
|
2029
|
-
* and if the device is able to provide a more accurate
|
|
2030
|
-
* position, it will do so. Note that this can result in
|
|
2031
|
-
* slower response times or increased power consumption
|
|
2032
|
-
* (with a GPS chip on a mobile device for example). On
|
|
2033
|
-
* the other hand, if false, the device can take the
|
|
2034
|
-
* liberty to save resources by responding more quickly
|
|
2035
|
-
* and/or using less power. Default: false.
|
|
2036
|
-
*/
|
|
2037
|
-
enableHighAccuracy: !1,
|
|
2038
|
-
/**
|
|
2039
|
-
* A positive long value representing the maximum length
|
|
2040
|
-
* of time (in milliseconds) the device is allowed to
|
|
2041
|
-
* take in order to return a position. The default value
|
|
2042
|
-
* is Infinity, meaning that getCurrentPosition() won't
|
|
2043
|
-
* return until the position is available.
|
|
2044
|
-
*/
|
|
2045
|
-
timeout: 1e4,
|
|
2046
|
-
/**
|
|
2047
|
-
* A positive long value indicating the maximum age in
|
|
2048
|
-
* milliseconds of a possible cached position that is
|
|
2049
|
-
* acceptable to return. If set to 0, it means that the
|
|
2050
|
-
* device cannot use a cached position and must attempt
|
|
2051
|
-
* to retrieve the real current position. If set to
|
|
2052
|
-
* Infinity the device must return a cached position
|
|
2053
|
-
* regardless of its age. Default: 0.
|
|
2054
|
-
*/
|
|
2055
|
-
maximumAge: 6e4
|
|
2056
|
-
};
|
|
2057
|
-
return new Promise((t, r) => {
|
|
2058
|
-
var a;
|
|
2059
|
-
(a = navigator == null ? void 0 : navigator.geolocation) == null || a.getCurrentPosition(
|
|
2060
|
-
(n) => {
|
|
2061
|
-
t({
|
|
2062
|
-
latitude: n.coords.latitude,
|
|
2063
|
-
longitude: n.coords.longitude,
|
|
2064
|
-
accuracy: n.coords.accuracy
|
|
2065
|
-
});
|
|
2066
|
-
},
|
|
2067
|
-
(n) => {
|
|
2068
|
-
r(n);
|
|
2069
|
-
},
|
|
2070
|
-
e
|
|
2071
|
-
);
|
|
2072
|
-
});
|
|
2073
|
-
}, Yo = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ d("dl", { className: "my-0", children: /* @__PURE__ */ $("div", { className: "flex items-center justify-between", children: [
|
|
2074
|
-
/* @__PURE__ */ d("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2075
|
-
/* @__PURE__ */ d("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2076
|
-
] }) }, `${e}-${r}`)) : null, Fo = new Intl.NumberFormat("en", {
|
|
2077
|
-
style: "decimal",
|
|
2078
|
-
signDisplay: "never",
|
|
2079
|
-
minimumFractionDigits: 0,
|
|
2080
|
-
maximumFractionDigits: 0
|
|
2081
|
-
}), jo = (e) => e > 0 ? qa(e, {
|
|
2082
|
-
secondsDecimalDigits: 2,
|
|
2083
|
-
unitCount: 2
|
|
2084
|
-
}) : "N/A", Za = ({
|
|
2085
|
-
isAuthenticated: e,
|
|
2086
|
-
extraClass: t
|
|
2087
|
-
}) => p(
|
|
2088
|
-
"flex-1 overflow-y-auto bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
|
|
2089
|
-
e ? "pt-0" : "pt-10",
|
|
2090
|
-
t
|
|
2091
|
-
), en = ({
|
|
2092
|
-
extraClass: e
|
|
2093
|
-
}) => p("px-2 sm:px-0", e), zo = (e, t) => t === 1 ? e : `${e}s`, qo = (e, t) => {
|
|
2094
|
-
let r;
|
|
2095
|
-
return (...a) => {
|
|
2096
|
-
window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
|
|
2097
|
-
};
|
|
2098
|
-
}, tn = () => !!(window != null && window.__VERSINI_CALLISTO_ELECTRON__), rn = () => window.innerWidth < 403, Xo = () => {
|
|
2099
|
-
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r = rn(), a = navigator.maxTouchPoints > 1;
|
|
2100
|
-
return e && t && r && a;
|
|
2101
|
-
}, It = "av-button", Ke = "icon", at = "button", Ze = "link", an = ({
|
|
2102
|
-
type: e,
|
|
2103
|
-
size: t,
|
|
2104
|
-
labelRight: r,
|
|
2105
|
-
labelLeft: a,
|
|
2106
|
-
align: n,
|
|
2107
|
-
animated: o
|
|
2108
|
-
}) => {
|
|
2109
|
-
const s = "max-h-8 py-0 px-2", i = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
|
2110
|
-
switch (e) {
|
|
2111
|
-
case at:
|
|
2112
|
-
case Ze:
|
|
2113
|
-
return p({
|
|
2114
|
-
[s]: t === "small",
|
|
2115
|
-
[i]: t === "medium",
|
|
2116
|
-
[c]: t === "large"
|
|
2117
|
-
});
|
|
2118
|
-
case Ke:
|
|
2119
|
-
return p("flex items-center", {
|
|
2120
|
-
"justify-center": n === "center",
|
|
2121
|
-
"justify-start": n === "left",
|
|
2122
|
-
"justify-end": n === "right",
|
|
2123
|
-
"h-6 w-6 p-0": t === "small" && !o && !(r || a),
|
|
2124
|
-
"h-6 px-2": t === "small" && !o && (r || a),
|
|
2125
|
-
"h-8 w-8 p-1": t === "medium" && !o && !(r || a),
|
|
2126
|
-
"h-8 px-3": t === "medium" && !o && (r || a),
|
|
2127
|
-
"h-12 w-12 p-2": t === "large" && !o && !(r || a),
|
|
2128
|
-
"h-12 px-4": t === "large" && !o && (r || a),
|
|
2129
|
-
"h-6 py-0": t === "small" && o && !(r || a),
|
|
2130
|
-
"h-6": t === "small" && o && (r || a),
|
|
2131
|
-
"h-8 py-1": t === "medium" && o && !(r || a),
|
|
2132
|
-
"h-8": t === "medium" && o && (r || a),
|
|
2133
|
-
"h-12 py-2": t === "large" && o && !(r || a),
|
|
2134
|
-
"h-12": t === "large" && o && (r || a)
|
|
2135
|
-
});
|
|
2136
|
-
}
|
|
2137
|
-
}, nn = ({
|
|
2138
|
-
type: e,
|
|
2139
|
-
size: t,
|
|
2140
|
-
labelRight: r,
|
|
2141
|
-
labelLeft: a
|
|
2142
|
-
}) => {
|
|
2143
|
-
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
2144
|
-
switch (e) {
|
|
2145
|
-
case at:
|
|
2146
|
-
case Ze:
|
|
2147
|
-
return p({
|
|
2148
|
-
"text-center": e === Ze,
|
|
2149
|
-
[n]: t === "small",
|
|
2150
|
-
[o]: t === "medium",
|
|
2151
|
-
[s]: t === "large"
|
|
2152
|
-
});
|
|
2153
|
-
case Ke:
|
|
2154
|
-
return p({
|
|
2155
|
-
[n]: t === "small" && (r || a),
|
|
2156
|
-
[o]: t === "medium" && (r || a),
|
|
2157
|
-
[s]: t === "large" && (r || a)
|
|
2158
|
-
});
|
|
2159
|
-
}
|
|
2160
|
-
}, on = ({
|
|
2161
|
-
mode: e,
|
|
2162
|
-
noBackground: t,
|
|
2163
|
-
noTruncate: r,
|
|
2164
|
-
variant: a
|
|
2165
|
-
}) => {
|
|
2166
|
-
if (t)
|
|
2167
|
-
return "not-prose";
|
|
2168
|
-
if (a === "primary")
|
|
2169
|
-
return p("not-prose", {
|
|
2170
|
-
truncate: !r,
|
|
2171
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
2172
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
2173
|
-
"dark:text-copy-lighter": e === "system",
|
|
2174
|
-
"dark:text-copy-light": e === "alt-system"
|
|
2175
|
-
});
|
|
2176
|
-
if (a === "secondary")
|
|
2177
|
-
return p("not-prose", {
|
|
2178
|
-
truncate: !r,
|
|
2179
|
-
"text-copy-light": e === "light" || e === "system",
|
|
2180
|
-
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
2181
|
-
"dark:text-copy-lighter": e === "alt-system",
|
|
2182
|
-
"dark:text-copy-light": e === "system"
|
|
2183
|
-
});
|
|
2184
|
-
if (a === "danger")
|
|
2185
|
-
return p("not-prose", {
|
|
2186
|
-
truncate: !r,
|
|
2187
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
2188
|
-
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
2189
|
-
"dark:text-copy-lighter": e === "system",
|
|
2190
|
-
"dark:text-copy-light": e === "alt-system"
|
|
2191
|
-
});
|
|
2192
|
-
if (a === "selected")
|
|
2193
|
-
return p("not-prose text-copy-lighter", {
|
|
2194
|
-
truncate: !r
|
|
2195
|
-
});
|
|
2196
|
-
}, sn = ({
|
|
2197
|
-
mode: e,
|
|
2198
|
-
noBackground: t,
|
|
2199
|
-
variant: r
|
|
2200
|
-
}) => {
|
|
2201
|
-
if (!t) {
|
|
2202
|
-
if (r === "primary")
|
|
2203
|
-
return p({
|
|
2204
|
-
"bg-action-dark": e === "dark",
|
|
2205
|
-
"bg-action-light": e === "light",
|
|
2206
|
-
"bg-action-dark dark:bg-action-light": e === "system",
|
|
2207
|
-
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
2208
|
-
});
|
|
2209
|
-
if (r === "secondary")
|
|
2210
|
-
return p({
|
|
2211
|
-
"bg-action-dark": e === "light",
|
|
2212
|
-
"bg-action-light": e === "dark",
|
|
2213
|
-
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
2214
|
-
"bg-action-light dark:bg-action-dark": e === "system"
|
|
2215
|
-
});
|
|
2216
|
-
if (r === "danger")
|
|
2217
|
-
return p({
|
|
2218
|
-
"bg-action-danger-dark": e === "dark",
|
|
2219
|
-
"bg-action-danger-light": e === "light",
|
|
2220
|
-
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
2221
|
-
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
2222
|
-
});
|
|
2223
|
-
if (r === "selected")
|
|
2224
|
-
return "bg-action-selected-dark";
|
|
2225
|
-
}
|
|
2226
|
-
}, cn = ({
|
|
2227
|
-
radius: e
|
|
2228
|
-
}) => p({
|
|
2229
|
-
"rounded-full": e === "large",
|
|
2230
|
-
"rounded-md": e === "medium",
|
|
2231
|
-
"rounded-sm": e === "small"
|
|
2232
|
-
}), ln = ({
|
|
2233
|
-
mode: e,
|
|
2234
|
-
disabled: t,
|
|
2235
|
-
variant: r
|
|
2236
|
-
}) => {
|
|
2237
|
-
if (t)
|
|
2238
|
-
return "";
|
|
2239
|
-
if (r === "primary")
|
|
2240
|
-
return p("hover:text-copy-light-hover", {
|
|
2241
|
-
"hover:bg-action-dark-hover": e === "dark",
|
|
2242
|
-
"hover:bg-action-light-hover": e === "light",
|
|
2243
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
2244
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
2245
|
-
});
|
|
2246
|
-
if (r === "secondary")
|
|
2247
|
-
return p("hover:text-copy-light-hover", {
|
|
2248
|
-
"hover:bg-action-dark-hover": e === "light",
|
|
2249
|
-
"hover:bg-action-light-hover": e === "dark",
|
|
2250
|
-
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
2251
|
-
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
2252
|
-
});
|
|
2253
|
-
if (r === "danger")
|
|
2254
|
-
return p("hover:text-copy-light-hover", {
|
|
2255
|
-
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
2256
|
-
"hover:bg-action-danger-light-hover": e === "light",
|
|
2257
|
-
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2258
|
-
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2259
|
-
});
|
|
2260
|
-
if (r === "selected")
|
|
2261
|
-
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
2262
|
-
}, dn = ({
|
|
2263
|
-
mode: e,
|
|
2264
|
-
disabled: t,
|
|
2265
|
-
variant: r
|
|
2266
|
-
}) => {
|
|
2267
|
-
if (t)
|
|
2268
|
-
return "";
|
|
2269
|
-
if (r === "primary")
|
|
2270
|
-
return p("active:text-copy-light-active", {
|
|
2271
|
-
"active:bg-action-dark-active": e === "dark",
|
|
2272
|
-
"active:bg-action-light-active": e === "light",
|
|
2273
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
2274
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
2275
|
-
});
|
|
2276
|
-
if (r === "secondary")
|
|
2277
|
-
return p("active:text-copy-light-active", {
|
|
2278
|
-
"active:bg-action-dark-active": e === "light",
|
|
2279
|
-
"active:bg-action-light-active": e === "dark",
|
|
2280
|
-
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
2281
|
-
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
2282
|
-
});
|
|
2283
|
-
if (r === "danger")
|
|
2284
|
-
return p("active:text-copy-lighter-active", {
|
|
2285
|
-
"active:bg-action-danger-dark-active": e === "dark",
|
|
2286
|
-
"active:bg-action-danger-light-active": e === "light",
|
|
2287
|
-
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
2288
|
-
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
2289
|
-
});
|
|
2290
|
-
if (r === "selected")
|
|
2291
|
-
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
2292
|
-
}, un = ({
|
|
2293
|
-
mode: e,
|
|
2294
|
-
noBorder: t,
|
|
2295
|
-
variant: r
|
|
2296
|
-
}) => {
|
|
2297
|
-
if (t)
|
|
2298
|
-
return "border border-transparent";
|
|
2299
|
-
if (r === "primary")
|
|
2300
|
-
return p("border", {
|
|
2301
|
-
"border-border-dark": e === "dark",
|
|
2302
|
-
"border-border-accent": e === "light",
|
|
2303
|
-
"border-border-dark dark:border-border-accent": e === "system",
|
|
2304
|
-
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
2305
|
-
});
|
|
2306
|
-
if (r === "secondary")
|
|
2307
|
-
return p("border", {
|
|
2308
|
-
"border-border-dark": e === "light",
|
|
2309
|
-
"border-border-accent": e === "dark",
|
|
2310
|
-
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
2311
|
-
"border-border-accent dark:border-border-dark": e === "system"
|
|
2312
|
-
});
|
|
2313
|
-
if (r === "danger")
|
|
2314
|
-
return p("border", {
|
|
2315
|
-
"border-border-danger-dark": e === "dark",
|
|
2316
|
-
"border-border-danger-medium": e === "light",
|
|
2317
|
-
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
2318
|
-
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
2319
|
-
});
|
|
2320
|
-
if (r === "selected")
|
|
2321
|
-
return "border border-border-selected-dark";
|
|
2322
|
-
}, mn = ({
|
|
2323
|
-
focusMode: e
|
|
2324
|
-
}) => p("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2325
|
-
"focus:outline-focus-dark": e === "dark",
|
|
2326
|
-
"focus:outline-focus-light": e === "light",
|
|
2327
|
-
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2328
|
-
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2329
|
-
}), hn = ({
|
|
2330
|
-
mode: e,
|
|
2331
|
-
raw: t,
|
|
2332
|
-
iconClassName: r
|
|
2333
|
-
}) => t ? "" : p(
|
|
2334
|
-
{
|
|
2335
|
-
"text-copy-accent-dark": e === "light" || e === "alt-system",
|
|
2336
|
-
"text-copy-light": e === "dark" || e === "system",
|
|
2337
|
-
"dark:text-copy-light": e === "alt-system",
|
|
2338
|
-
"dark:text-copy-accent-dark": e === "system"
|
|
2339
|
-
},
|
|
2340
|
-
r
|
|
2341
|
-
), pn = ({
|
|
2342
|
-
animated: e
|
|
2343
|
-
}) => p({
|
|
2344
|
-
"transition-opacity duration-300 ease-in": e
|
|
2345
|
-
}), tr = ({
|
|
2346
|
-
type: e,
|
|
2347
|
-
className: t,
|
|
2348
|
-
raw: r,
|
|
2349
|
-
mode: a,
|
|
2350
|
-
focusMode: n,
|
|
2351
|
-
disabled: o,
|
|
2352
|
-
fullWidth: s,
|
|
2353
|
-
size: i,
|
|
2354
|
-
noBorder: c,
|
|
2355
|
-
labelRight: f,
|
|
2356
|
-
labelLeft: h,
|
|
2357
|
-
noBackground: m,
|
|
2358
|
-
variant: l,
|
|
2359
|
-
noTruncate: u,
|
|
2360
|
-
align: y,
|
|
2361
|
-
radius: E,
|
|
2362
|
-
animated: T
|
|
2363
|
-
}) => (l || (l = "primary"), r ? p(It, t) : p(
|
|
2364
|
-
It,
|
|
2365
|
-
on({
|
|
2366
|
-
mode: a,
|
|
2367
|
-
variant: l,
|
|
2368
|
-
noBackground: m,
|
|
2369
|
-
noTruncate: u
|
|
2370
|
-
}),
|
|
2371
|
-
sn({ mode: a, noBackground: m, variant: l }),
|
|
2372
|
-
cn({ radius: E }),
|
|
2373
|
-
an({
|
|
2374
|
-
type: e,
|
|
2375
|
-
size: i,
|
|
2376
|
-
labelRight: f,
|
|
2377
|
-
labelLeft: h,
|
|
2378
|
-
align: y,
|
|
2379
|
-
animated: T
|
|
2380
|
-
}),
|
|
2381
|
-
nn({ type: e, size: i, labelRight: f, labelLeft: h }),
|
|
2382
|
-
un({ mode: a, variant: l, noBorder: c }),
|
|
2383
|
-
mn({ focusMode: n }),
|
|
2384
|
-
ln({ mode: a, variant: l, disabled: o }),
|
|
2385
|
-
dn({ mode: a, variant: l, disabled: o }),
|
|
2386
|
-
{
|
|
2387
|
-
"w-full": s,
|
|
2388
|
-
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2389
|
-
},
|
|
2390
|
-
p({
|
|
2391
|
-
"transition-[width] duration-300 ease-in-out": e === Ke && T
|
|
2392
|
-
}),
|
|
2393
|
-
t
|
|
2394
|
-
)), fn = (e, t, r) => {
|
|
2395
|
-
var a;
|
|
2396
|
-
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
2397
|
-
}, nt = X.forwardRef((e, t) => {
|
|
2398
|
-
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
2399
|
-
return /* @__PURE__ */ d(
|
|
2400
|
-
"button",
|
|
2401
|
-
{
|
|
2402
|
-
ref: t,
|
|
2403
|
-
onClick: (o) => {
|
|
2404
|
-
fn(o, a, r);
|
|
2405
|
-
},
|
|
2406
|
-
...n
|
|
2407
|
-
}
|
|
2408
|
-
);
|
|
2409
|
-
});
|
|
2410
|
-
nt.displayName = "BaseButton";
|
|
2411
|
-
const rr = X.forwardRef(
|
|
2412
|
-
({
|
|
2413
|
-
children: e,
|
|
2414
|
-
disabled: t = !1,
|
|
2415
|
-
mode: r = "system",
|
|
2416
|
-
focusMode: a = "system",
|
|
2417
|
-
fullWidth: n = !1,
|
|
2418
|
-
className: o,
|
|
2419
|
-
size: s = "medium",
|
|
2420
|
-
raw: i = !1,
|
|
2421
|
-
noBorder: c = !1,
|
|
2422
|
-
variant: f = "primary",
|
|
2423
|
-
noTruncate: h = !1,
|
|
2424
|
-
radius: m = "large",
|
|
2425
|
-
...l
|
|
2426
|
-
}, u) => {
|
|
2427
|
-
const y = tr({
|
|
2428
|
-
type: at,
|
|
2429
|
-
mode: r,
|
|
2430
|
-
focusMode: a,
|
|
2431
|
-
fullWidth: n,
|
|
2432
|
-
disabled: t,
|
|
2433
|
-
raw: i,
|
|
2434
|
-
className: o,
|
|
2435
|
-
size: s,
|
|
2436
|
-
noBorder: c,
|
|
2437
|
-
variant: f,
|
|
2438
|
-
noTruncate: h,
|
|
2439
|
-
radius: m
|
|
2440
|
-
});
|
|
2441
|
-
return /* @__PURE__ */ d(
|
|
2442
|
-
nt,
|
|
2443
|
-
{
|
|
2444
|
-
ref: u,
|
|
2445
|
-
className: y,
|
|
2446
|
-
disabled: t,
|
|
2447
|
-
...l,
|
|
2448
|
-
children: e
|
|
2449
|
-
}
|
|
2450
|
-
);
|
|
2451
|
-
}
|
|
2452
|
-
);
|
|
2453
|
-
rr.displayName = "Button";
|
|
2454
|
-
function gn() {
|
|
2455
|
-
const e = O(!1);
|
|
2456
|
-
return G(() => (e.current = !0, () => {
|
|
2457
|
-
e.current = !1;
|
|
2458
|
-
}), []), q(() => e.current, []);
|
|
2459
|
-
}
|
|
2460
|
-
function yn(e) {
|
|
2461
|
-
return Le(() => e.every((t) => t == null) ? () => {
|
|
2462
|
-
} : (t) => {
|
|
2463
|
-
e.forEach((r) => {
|
|
2464
|
-
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
2465
|
-
});
|
|
2466
|
-
}, e);
|
|
2467
|
-
}
|
|
2468
|
-
const bn = {
|
|
2469
|
-
x: 0,
|
|
2470
|
-
y: 0,
|
|
2471
|
-
width: 0,
|
|
2472
|
-
height: 0,
|
|
2473
|
-
top: 0,
|
|
2474
|
-
left: 0,
|
|
2475
|
-
bottom: 0,
|
|
2476
|
-
right: 0
|
|
2477
|
-
};
|
|
2478
|
-
function je(e) {
|
|
2479
|
-
const t = gn(), r = O(0), a = O(null), [n, o] = z(bn), s = Le(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
2480
|
-
const c = i[0];
|
|
2481
|
-
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2482
|
-
a.current && t() && o(c.contentRect);
|
|
2483
|
-
}));
|
|
2484
|
-
}), [t]);
|
|
2485
|
-
return G(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
2486
|
-
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
2487
|
-
}), [s, e]), [a, n];
|
|
2488
|
-
}
|
|
2489
|
-
const En = {
|
|
2490
|
-
small: 24,
|
|
2491
|
-
// w-6
|
|
2492
|
-
medium: 32,
|
|
2493
|
-
// w-8
|
|
2494
|
-
large: 48
|
|
2495
|
-
// w-12
|
|
2496
|
-
}, wn = {
|
|
2497
|
-
small: 8 * 2,
|
|
2498
|
-
// px-2 x 2
|
|
2499
|
-
medium: 12 * 2,
|
|
2500
|
-
// px-3 x 2
|
|
2501
|
-
large: 16 * 2
|
|
2502
|
-
// px-4 x 2
|
|
2503
|
-
}, In = 2, Pe = X.forwardRef(
|
|
2504
|
-
({
|
|
2505
|
-
children: e,
|
|
2506
|
-
disabled: t = !1,
|
|
2507
|
-
mode: r = "system",
|
|
2508
|
-
focusMode: a = "system",
|
|
2509
|
-
fullWidth: n = !1,
|
|
2510
|
-
className: o,
|
|
2511
|
-
type: s = "button",
|
|
2512
|
-
raw: i = !1,
|
|
2513
|
-
noBorder: c = !1,
|
|
2514
|
-
"aria-label": f,
|
|
2515
|
-
label: h,
|
|
2516
|
-
size: m = "medium",
|
|
2517
|
-
labelRight: l,
|
|
2518
|
-
labelLeft: u,
|
|
2519
|
-
noBackground: y = !1,
|
|
2520
|
-
align: E = "center",
|
|
2521
|
-
radius: T = "large",
|
|
2522
|
-
variant: _ = "primary",
|
|
2523
|
-
iconClassName: F,
|
|
2524
|
-
animated: M = !1,
|
|
2525
|
-
...Q
|
|
2526
|
-
}, L) => {
|
|
2527
|
-
const re = tr({
|
|
2528
|
-
type: Ke,
|
|
2529
|
-
mode: r,
|
|
2530
|
-
focusMode: a,
|
|
2531
|
-
fullWidth: n,
|
|
2532
|
-
disabled: t,
|
|
2533
|
-
raw: i,
|
|
2534
|
-
className: o,
|
|
2535
|
-
noBorder: c,
|
|
2536
|
-
size: m,
|
|
2537
|
-
labelRight: l,
|
|
2538
|
-
labelLeft: u,
|
|
2539
|
-
noBackground: y,
|
|
2540
|
-
align: E,
|
|
2541
|
-
radius: T,
|
|
2542
|
-
variant: _,
|
|
2543
|
-
animated: M
|
|
2544
|
-
}), U = hn({ mode: r, raw: i, iconClassName: F }), v = pn({ animated: M }), [S, K] = je(), [w, C] = je(), [P, B] = je(), Z = O(0), g = O(null), I = yn([L, g]);
|
|
2545
|
-
return ve(() => {
|
|
2546
|
-
P && P.current && M && (Z.current = B.width + wn[m] + (c ? 0 : In));
|
|
2547
|
-
}, [B, P, m, c, M]), ve(() => {
|
|
2548
|
-
g && g.current && M && (l && S && K.width > 0 ? (S.current && (S.current.style.opacity = "100"), g.current.style.width = `${K.width + Z.current}px`) : u && C.width > 0 ? (w.current && (w.current.style.opacity = "100"), g.current.style.width = `${C.width + Z.current}px`) : (S.current && (S.current.style.opacity = "0"), w.current && (w.current.style.opacity = "0"), g.current.style.width = `${En[m]}px`));
|
|
2549
|
-
}, [
|
|
2550
|
-
K,
|
|
2551
|
-
l,
|
|
2552
|
-
S,
|
|
2553
|
-
C,
|
|
2554
|
-
u,
|
|
2555
|
-
w,
|
|
2556
|
-
m,
|
|
2557
|
-
M
|
|
2558
|
-
]), /* @__PURE__ */ $(
|
|
2559
|
-
nt,
|
|
2560
|
-
{
|
|
2561
|
-
ref: I,
|
|
2562
|
-
className: re,
|
|
2563
|
-
disabled: t,
|
|
2564
|
-
type: s,
|
|
2565
|
-
"aria-label": f || h,
|
|
2566
|
-
...Q,
|
|
2567
|
-
children: [
|
|
2568
|
-
/* @__PURE__ */ d(
|
|
2569
|
-
Tt,
|
|
2570
|
-
{
|
|
2571
|
-
label: u,
|
|
2572
|
-
labelRef: w,
|
|
2573
|
-
labelClass: v,
|
|
2574
|
-
labelInnerClass: "pr-2"
|
|
2575
|
-
}
|
|
2576
|
-
),
|
|
2577
|
-
/* @__PURE__ */ d("span", { ref: P, className: U, children: e }),
|
|
2578
|
-
/* @__PURE__ */ d(
|
|
2579
|
-
Tt,
|
|
2580
|
-
{
|
|
2581
|
-
label: l,
|
|
2582
|
-
labelRef: S,
|
|
2583
|
-
labelClass: v,
|
|
2584
|
-
labelInnerClass: "pl-2"
|
|
2585
|
-
}
|
|
2586
|
-
)
|
|
2587
|
-
]
|
|
2588
|
-
}
|
|
2589
|
-
);
|
|
2590
|
-
}
|
|
2591
|
-
), Tt = ({
|
|
2592
|
-
labelRef: e,
|
|
2593
|
-
labelClass: t,
|
|
2594
|
-
label: r,
|
|
2595
|
-
labelInnerClass: a
|
|
2596
|
-
}) => /* @__PURE__ */ d("span", { ref: e, className: t, children: r && /* @__PURE__ */ d("span", { className: a, children: r }) });
|
|
2597
|
-
Pe.displayName = "ButtonIcon";
|
|
2598
|
-
/*!
|
|
2599
|
-
@versini/ui-button v4.2.4
|
|
2600
|
-
© 2025 gizmette.com
|
|
2601
|
-
*/
|
|
2602
|
-
try {
|
|
2603
|
-
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
2604
|
-
version: "4.2.4",
|
|
2605
|
-
buildTime: "01/29/2025 03:18 PM EST",
|
|
2606
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2607
|
-
license: "MIT"
|
|
2608
|
-
});
|
|
2609
|
-
} catch {
|
|
2610
|
-
}
|
|
2611
|
-
const Tn = X.forwardRef(
|
|
2612
|
-
({
|
|
2613
|
-
children: e,
|
|
2614
|
-
mode: t = "system",
|
|
2615
|
-
className: r,
|
|
2616
|
-
active: a = !1,
|
|
2617
|
-
...n
|
|
2618
|
-
}, o) => {
|
|
2619
|
-
const s = a ? p(
|
|
2620
|
-
"relative",
|
|
2621
|
-
"focus-within:static",
|
|
2622
|
-
"focus-within:after:border-transparent",
|
|
2623
|
-
"after:absolute",
|
|
2624
|
-
"after:content-['']",
|
|
2625
|
-
"after:border-b-2",
|
|
2626
|
-
"after:bottom-[-4px]",
|
|
2627
|
-
"after:left-0",
|
|
2628
|
-
"after:right-0",
|
|
2629
|
-
{
|
|
2630
|
-
"after:border-table-dark": t === "dark",
|
|
2631
|
-
"after:border-table-light": t === "light",
|
|
2632
|
-
"after:border-table-dark dark:after:border-table-light": t === "system",
|
|
2633
|
-
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
2634
|
-
}
|
|
2635
|
-
) : "";
|
|
2636
|
-
return /* @__PURE__ */ d("div", { className: s, children: /* @__PURE__ */ d(
|
|
2637
|
-
Pe,
|
|
2638
|
-
{
|
|
2639
|
-
className: p("justify-center", r),
|
|
2640
|
-
ref: o,
|
|
2641
|
-
mode: t,
|
|
2642
|
-
radius: "small",
|
|
2643
|
-
...n,
|
|
2644
|
-
children: e
|
|
2645
|
-
}
|
|
2646
|
-
) });
|
|
2647
|
-
}
|
|
2648
|
-
);
|
|
2649
|
-
Tn.displayName = "ButtonSort";
|
|
2650
|
-
/*!
|
|
2651
|
-
@versini/ui-card v3.0.13
|
|
2652
|
-
© 2025 gizmette.com
|
|
2653
|
-
*/
|
|
2654
|
-
try {
|
|
2655
|
-
window.__VERSINI_UI_CARD__ || (window.__VERSINI_UI_CARD__ = {
|
|
2656
|
-
version: "3.0.13",
|
|
2657
|
-
buildTime: "01/25/2025 10:54 PM EST",
|
|
2658
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2659
|
-
license: "MIT"
|
|
2660
|
-
});
|
|
2661
|
-
} catch {
|
|
2662
|
-
}
|
|
2663
|
-
const Re = "av-card";
|
|
2664
|
-
function Sn(e) {
|
|
2665
|
-
const t = Nt();
|
|
2666
|
-
return `${e}${t}`;
|
|
2667
|
-
}
|
|
2668
|
-
const _n = ({
|
|
2669
|
-
className: e,
|
|
2670
|
-
headerClassName: t,
|
|
2671
|
-
bodyClassName: r,
|
|
2672
|
-
footerClassName: a,
|
|
2673
|
-
mode: n,
|
|
2674
|
-
compact: o,
|
|
2675
|
-
noBorder: s
|
|
2676
|
-
}) => {
|
|
2677
|
-
const i = p(
|
|
2678
|
-
Re,
|
|
2679
|
-
"rounded-md",
|
|
2680
|
-
{
|
|
2681
|
-
"border-none": s,
|
|
2682
|
-
"border-2": !s,
|
|
2683
|
-
"p-4": !o,
|
|
2684
|
-
"p-1 sm:p-2": o,
|
|
2685
|
-
"border-border-accent bg-surface-darker text-copy-light": n === "darker",
|
|
2686
|
-
"border-border-accent bg-surface-dark text-copy-light": n === "dark",
|
|
2687
|
-
"border-border-dark bg-surface-lighter text-copy-dark": n === "light",
|
|
2688
|
-
"border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light": n === "system",
|
|
2689
|
-
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": n === "alt-system"
|
|
2690
|
-
},
|
|
2691
|
-
e
|
|
2692
|
-
), c = t || p(`${Re}__header mt-0 border-b-2`, {
|
|
2693
|
-
"text-copy-light border-border-accent": n === "darker",
|
|
2694
|
-
"border-border-accent": n === "dark",
|
|
2695
|
-
"border-border-medium": n === "light",
|
|
2696
|
-
"border-border-medium dark:border-border-accent": n === "system",
|
|
2697
|
-
"border-border-accent dark:border-border-medium": n === "alt-system",
|
|
2698
|
-
"mb-4": !o,
|
|
2699
|
-
"mb-2": o
|
|
2700
|
-
}), f = p(r), h = a || p(`${Re}__footer pt-2`);
|
|
2701
|
-
return {
|
|
2702
|
-
wrapper: i,
|
|
2703
|
-
header: c,
|
|
2704
|
-
body: f,
|
|
2705
|
-
footer: h
|
|
2706
|
-
};
|
|
2707
|
-
};
|
|
2708
|
-
function kn({
|
|
2709
|
-
id: e,
|
|
2710
|
-
content: t,
|
|
2711
|
-
userAriaLabelledby: r,
|
|
2712
|
-
className: a
|
|
2713
|
-
}) {
|
|
2714
|
-
return typeof t == "string" ? /* @__PURE__ */ d("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ d("div", { className: a, children: t }) : t ? /* @__PURE__ */ d("div", { className: a, id: e, children: t }) : null;
|
|
2715
|
-
}
|
|
2716
|
-
const An = ({
|
|
2717
|
-
header: e,
|
|
2718
|
-
headerClassName: t,
|
|
2719
|
-
footer: r,
|
|
2720
|
-
footerClassName: a,
|
|
2721
|
-
children: n,
|
|
2722
|
-
className: o,
|
|
2723
|
-
bodyClassName: s,
|
|
2724
|
-
"aria-labelledby": i,
|
|
2725
|
-
mode: c = "system",
|
|
2726
|
-
compact: f = !1,
|
|
2727
|
-
noBorder: h = !1,
|
|
2728
|
-
...m
|
|
2729
|
-
}) => {
|
|
2730
|
-
let l = null, u = null;
|
|
2731
|
-
const y = typeof e == "string", E = Sn(Re), T = _n({
|
|
2732
|
-
className: o,
|
|
2733
|
-
headerClassName: t,
|
|
2734
|
-
bodyClassName: s,
|
|
2735
|
-
footerClassName: a,
|
|
2736
|
-
mode: c,
|
|
2737
|
-
compact: f,
|
|
2738
|
-
noBorder: h
|
|
2739
|
-
});
|
|
2740
|
-
return y ? (l = E, u = l) : !y && e && i ? (l = null, u = i) : !y && e && !i ? (l = E, u = l) : (l = null, u = i || null), /* @__PURE__ */ d("div", { className: T.wrapper, children: /* @__PURE__ */ $(
|
|
2741
|
-
"section",
|
|
2742
|
-
{
|
|
2743
|
-
...u && {
|
|
2744
|
-
"aria-labelledby": u
|
|
2745
|
-
},
|
|
2746
|
-
className: T.body,
|
|
2747
|
-
...m,
|
|
2748
|
-
children: [
|
|
2749
|
-
/* @__PURE__ */ d(
|
|
2750
|
-
kn,
|
|
2751
|
-
{
|
|
2752
|
-
...l && { id: l },
|
|
2753
|
-
content: e,
|
|
2754
|
-
className: T.header,
|
|
2755
|
-
userAriaLabelledby: i
|
|
2756
|
-
}
|
|
2757
|
-
),
|
|
2758
|
-
/* @__PURE__ */ d("div", { children: n }),
|
|
2759
|
-
r ? /* @__PURE__ */ d("div", { className: T.footer, children: r }) : null
|
|
2760
|
-
]
|
|
2761
|
-
}
|
|
2762
|
-
) });
|
|
2763
|
-
}, He = ({
|
|
2764
|
-
children: e,
|
|
2765
|
-
fill: t,
|
|
2766
|
-
viewBox: r,
|
|
2767
|
-
className: a,
|
|
2768
|
-
defaultViewBox: n,
|
|
2769
|
-
size: o,
|
|
2770
|
-
title: s,
|
|
2771
|
-
semantic: i = !1,
|
|
2772
|
-
...c
|
|
2773
|
-
}) => {
|
|
2774
|
-
const f = p(o, a);
|
|
2775
|
-
return /* @__PURE__ */ $(Ne, { children: [
|
|
2776
|
-
/* @__PURE__ */ d(
|
|
2777
|
-
"svg",
|
|
2778
|
-
{
|
|
2779
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2780
|
-
className: f,
|
|
2781
|
-
viewBox: r || n,
|
|
2782
|
-
fill: t || "currentColor",
|
|
2783
|
-
role: "img",
|
|
2784
|
-
"aria-hidden": !i,
|
|
2785
|
-
focusable: !1,
|
|
2786
|
-
...c,
|
|
2787
|
-
children: e
|
|
2788
|
-
}
|
|
2789
|
-
),
|
|
2790
|
-
s && i && /* @__PURE__ */ d("span", { className: "sr-only", children: s })
|
|
2791
|
-
] });
|
|
2792
|
-
};
|
|
2793
|
-
/*!
|
|
2794
|
-
@versini/ui-svgicon v4.0.7
|
|
2795
|
-
© 2025 gizmette.com
|
|
2796
|
-
*/
|
|
2797
|
-
try {
|
|
2798
|
-
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
2799
|
-
version: "4.0.7",
|
|
2800
|
-
buildTime: "01/20/2025 01:49 PM EST",
|
|
2801
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2802
|
-
license: "MIT"
|
|
2803
|
-
});
|
|
2804
|
-
} catch {
|
|
2805
|
-
}
|
|
2806
|
-
const Rn = ({
|
|
2807
|
-
className: e,
|
|
2808
|
-
viewBox: t,
|
|
2809
|
-
title: r,
|
|
2810
|
-
monotone: a,
|
|
2811
|
-
...n
|
|
2812
|
-
}) => /* @__PURE__ */ d(
|
|
2813
|
-
He,
|
|
2814
|
-
{
|
|
2815
|
-
defaultViewBox: "0 0 1200 500",
|
|
2816
|
-
size: "w-full",
|
|
2817
|
-
viewBox: t,
|
|
2818
|
-
className: e,
|
|
2819
|
-
title: r || "Dog",
|
|
2820
|
-
...n,
|
|
2821
|
-
children: /* @__PURE__ */ d("path", { d: "M927.943 30.81c0-2.381-1.191-5.954-3.573-7.145-7.146-4.763-19.055-1.19-26.2 0-17.864 2.382-34.537 4.764-53.592 4.764-26.2 0-53.591-1.19-79.791-4.764-23.819-3.572-44.064-10.718-69.074-3.572-35.727 9.527-58.355 38.109-57.164 75.028 1.191 21.436-2.382 38.109-9.527 57.164-7.146 17.864-15.482 20.245-32.155 20.245-115.52 0-229.848-1.19-345.367 0h-63.119c-29.773 0-59.546 5.955-89.319 0-21.436-4.763-42.873-15.482-58.355-30.964-3.573-3.572-10.718-14.29-14.29-14.29-4.765 1.19-4.765 15.481-4.765 19.054 0 15.482 5.955 30.964 5.955 46.446s-7.145 28.582-11.91 42.873c-4.763 16.673-4.763 33.346-2.381 50.019 4.764 27.39 9.527 55.973 11.91 84.555 2.381 25.01 2.381 48.828 4.763 73.837 2.382 20.246 3.573 29.773 29.773 33.346 30.964 4.764 30.964-5.955 38.11-26.2 9.527-25.01 17.863-51.21 27.39-76.22 8.337-19.054 15.482-60.736 67.883-40.49 28.582 10.718 58.355 16.672 88.128 25.009 32.155 8.336 65.5 16.673 97.655 22.627 65.501 13.1 132.193 20.246 200.075 23.819 7.146 0 11.91 0 16.673 5.954 17.864 22.628-3.573 63.119 41.682 70.265 40.491 5.954 40.491-22.628 45.255-47.637 2.382-14.291 4.764-27.391 8.337-40.492 1.19-5.954 5.954-11.909 10.718-15.481 55.973-33.346 88.128-98.847 78.6-164.347-1.19-10.719-4.763-21.437-3.572-33.346 2.382-23.819 32.155-33.346 50.018-42.873 22.628-13.1 47.637-25.01 66.692-42.873 13.1-11.91 23.818-27.392 29.773-44.064 3.573-5.955 5.955-14.292 4.764-20.246M737.395 190.395c-2.381 25.01-13.1 36.919-35.727 41.682-40.491 8.337-66.692-19.054-54.783-58.355 8.337-26.2 17.864-51.21 29.773-75.028 11.91-23.818 22.628-23.818 36.919-1.19 17.864 28.581 27.391 59.545 23.818 92.891m38.11-109.564c-7.146 0-13.1-5.955-13.1-13.1 0-7.146 5.954-13.1 13.1-13.1 7.145 0 13.1 5.954 13.1 13.1 0 7.145-5.955 13.1-13.1 13.1" })
|
|
2822
|
-
}
|
|
2823
|
-
), Nn = ({
|
|
2824
|
-
className: e,
|
|
2825
|
-
viewBox: t,
|
|
2826
|
-
title: r,
|
|
2827
|
-
monotone: a,
|
|
2828
|
-
...n
|
|
2829
|
-
}) => /* @__PURE__ */ $(
|
|
2830
|
-
He,
|
|
2831
|
-
{
|
|
2832
|
-
defaultViewBox: "0 0 640 512",
|
|
2833
|
-
size: "size-5",
|
|
2834
|
-
viewBox: t,
|
|
2835
|
-
className: e,
|
|
2836
|
-
title: r || "Hide",
|
|
2837
|
-
...n,
|
|
2838
|
-
children: [
|
|
2839
|
-
/* @__PURE__ */ d(
|
|
2840
|
-
"path",
|
|
2841
|
-
{
|
|
2842
|
-
d: "M0 256c0 4.2.8 8.4 2.5 12.3C17.3 304 48.6 356 95.4 399.4 142.5 443.2 207.2 480 288 480c56.1 0 104.4-17.8 144.5-43.2l-71.7-56.5C339.4 392.8 314.6 400 288 400c-79.5 0-144-64.5-144-144 0-14.5 2.1-28.5 6.1-41.7L63.5 146c-29.4 34.7-49.9 70.8-61.1 97.6-1.6 4-2.4 8.2-2.4 12.4M135.2 80.7l71.8 56.2c23.1-15.7 51-24.9 81-24.9 79.5 0 144 64.5 144 144 0 17.7-3.2 34.6-9 50.2 28 22 56.1 44 84.1 65.9 32.3-36.6 54.6-75.4 66.4-103.9 1.6-3.9 2.5-8.1 2.5-12.3s-.8-8.4-2.5-12.3c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32c-60 0-111.1 20.3-152.8 48.7M192 260.1c.3 6.9 1.3 13.8 3.2 20.7 13.7 51.2 66.4 81.6 117.6 67.9 1.9-.5 3.9-1.1 5.7-1.7l-120-94.6c-3.7.8-6.7 3.7-6.5 7.7m92.7-88.4c2.1 6.4 3.3 13.2 3.3 20.3 0 2.7-.2 5.4-.5 8 31.6 24.8 63.2 49.5 94.8 74.3 2.7-13.9 2.4-28.6-1.5-43.2-11.1-41.5-47.8-69.4-88.6-71.1-5.8-.2-9.2 6.1-7.4 11.7z",
|
|
2843
|
-
opacity: a ? "1" : "0.4"
|
|
2844
|
-
}
|
|
2845
|
-
),
|
|
2846
|
-
/* @__PURE__ */ d("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1l-592-464C-1.2 34.7-3.1 19.6 5.1 9.2" })
|
|
2847
|
-
]
|
|
2848
|
-
}
|
|
2849
|
-
), vn = ({
|
|
2850
|
-
className: e,
|
|
2851
|
-
viewBox: t,
|
|
2852
|
-
title: r,
|
|
2853
|
-
monotone: a,
|
|
2854
|
-
...n
|
|
2855
|
-
}) => {
|
|
2856
|
-
const o = a ? "1" : "0.4";
|
|
2857
|
-
return /* @__PURE__ */ $(
|
|
2858
|
-
He,
|
|
2859
|
-
{
|
|
2860
|
-
defaultViewBox: "0 0 190 190",
|
|
2861
|
-
size: "size-5",
|
|
2862
|
-
viewBox: t,
|
|
2863
|
-
className: e,
|
|
2864
|
-
title: r || "Passkey",
|
|
2865
|
-
...n,
|
|
2866
|
-
children: [
|
|
2867
|
-
/* @__PURE__ */ d(
|
|
2868
|
-
"path",
|
|
2869
|
-
{
|
|
2870
|
-
d: "M172.32 96.79c0 13.78-8.48 25.5-20.29 29.78l7.14 11.83-10.57 13 10.57 12.71-17.04 22.87-12.01-12.82V125.7c-10.68-4.85-18.15-15.97-18.15-28.91 0-17.4 13.51-31.51 30.18-31.51 16.66 0 30.17 14.11 30.17 31.51m-30.18 4.82c4.02 0 7.28-3.4 7.28-7.6s-3.26-7.61-7.28-7.61-7.28 3.4-7.28 7.61c-.01 4.2 3.26 7.6 7.28 7.6",
|
|
2871
|
-
opacity: o
|
|
2872
|
-
}
|
|
2873
|
-
),
|
|
2874
|
-
/* @__PURE__ */ d(
|
|
2875
|
-
"path",
|
|
2876
|
-
{
|
|
2877
|
-
d: "M172.41 96.88c0 13.62-8.25 25.23-19.83 29.67l6.58 11.84-9.73 13 9.73 12.71-17.03 23.05v-85.54c4.02 0 7.28-3.41 7.28-7.6 0-4.2-3.26-7.61-7.28-7.61V65.28c16.73 0 30.28 14.15 30.28 31.6",
|
|
2878
|
-
opacity: o
|
|
2879
|
-
}
|
|
2880
|
-
),
|
|
2881
|
-
/* @__PURE__ */ d("path", { d: "M120.24 131.43c-9.75-8-16.3-20.3-17.2-34.27H50.8c-10.96 0-19.84 9.01-19.84 20.13v25.17c0 5.56 4.44 10.07 9.92 10.07h69.44c5.48 0 9.92-4.51 9.92-10.07zM73.16 91.13c-2.42-.46-4.82-.89-7.11-1.86-8.65-3.63-13.69-10.32-15.32-19.77-1.12-6.47-.59-12.87 2.03-18.92 3.72-8.6 10.39-13.26 19.15-14.84 5.24-.94 10.46-.73 15.5 1.15 7.59 2.82 12.68 8.26 15.03 16.24 2.38 8.05 2.03 16.1-1.56 23.72-3.72 7.96-10.21 12.23-18.42 13.9-.68.14-1.37.27-2.05.41-2.41-.03-4.83-.03-7.25-.03" })
|
|
2882
|
-
]
|
|
2883
|
-
}
|
|
2884
|
-
);
|
|
2885
|
-
}, xn = ({
|
|
2886
|
-
className: e,
|
|
2887
|
-
viewBox: t,
|
|
2888
|
-
title: r,
|
|
2889
|
-
monotone: a,
|
|
2890
|
-
...n
|
|
2891
|
-
}) => /* @__PURE__ */ $(
|
|
2892
|
-
He,
|
|
2893
|
-
{
|
|
2894
|
-
defaultViewBox: "0 0 576 512",
|
|
2895
|
-
size: "size-5",
|
|
2896
|
-
viewBox: t,
|
|
2897
|
-
className: e,
|
|
2898
|
-
title: r || "Show",
|
|
2899
|
-
...n,
|
|
2900
|
-
children: [
|
|
2901
|
-
/* @__PURE__ */ d(
|
|
2902
|
-
"path",
|
|
2903
|
-
{
|
|
2904
|
-
d: "M0 256c0 4.2.8 8.4 2.5 12.3C17.3 304 48.6 356 95.4 399.4 142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1 1.6-3.9 2.5-8.1 2.5-12.3s-.8-8.4-2.5-12.3c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32S142.5 68.8 95.4 112.6C48.6 156 17.3 208 2.5 243.7.8 247.6 0 251.8 0 256m432 0a144 144 0 1 1-288 0 144 144 0 1 1 288 0",
|
|
2905
|
-
opacity: a ? "1" : "0.4"
|
|
2906
|
-
}
|
|
2907
|
-
),
|
|
2908
|
-
/* @__PURE__ */ d("path", { d: "M224 256c35.3 0 64-28.7 64-64 0-7.1-1.2-13.9-3.3-20.3-1.8-5.5 1.6-11.9 7.4-11.7 40.8 1.7 77.5 29.6 88.6 71.1 13.7 51.2-16.7 103.9-67.9 117.6S208.9 332 195.2 280.8c-1.9-6.9-2.9-13.9-3.2-20.7-.3-5.8 6.1-9.2 11.7-7.4 6.4 2.1 13.2 3.3 20.3 3.3" })
|
|
2909
|
-
]
|
|
2910
|
-
}
|
|
2911
|
-
);
|
|
2912
|
-
/*!
|
|
2913
|
-
@versini/ui-icons v4.6.1
|
|
2914
|
-
© 2025 gizmette.com
|
|
2915
|
-
*/
|
|
2916
|
-
try {
|
|
2917
|
-
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
2918
|
-
version: "4.6.1",
|
|
2919
|
-
buildTime: "01/21/2025 01:33 PM EST",
|
|
2920
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2921
|
-
license: "MIT"
|
|
2922
|
-
});
|
|
2923
|
-
} catch {
|
|
2924
|
-
}
|
|
2925
|
-
/*!
|
|
2926
|
-
@versini/ui-main v3.0.9
|
|
2927
|
-
© 2025 gizmette.com
|
|
2928
|
-
*/
|
|
2929
|
-
try {
|
|
2930
|
-
window.__VERSINI_UI_MAIN__ || (window.__VERSINI_UI_MAIN__ = {
|
|
2931
|
-
version: "3.0.9",
|
|
2932
|
-
buildTime: "01/25/2025 10:54 PM EST",
|
|
2933
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
2934
|
-
license: "MIT"
|
|
2935
|
-
});
|
|
2936
|
-
} catch {
|
|
2937
|
-
}
|
|
2938
|
-
const On = "av-main", Cn = ({
|
|
2939
|
-
children: e,
|
|
2940
|
-
className: t,
|
|
2941
|
-
raw: r = !1,
|
|
2942
|
-
noMargin: a = !1,
|
|
2943
|
-
noPadding: n = !1
|
|
2944
|
-
}) => {
|
|
2945
|
-
const o = p(
|
|
2946
|
-
On,
|
|
2947
|
-
{
|
|
2948
|
-
"mt-2 sm:mt-3": !r && !a,
|
|
2949
|
-
"p-2": !r && !n,
|
|
2950
|
-
"flex w-full flex-col md:mx-auto md:max-w-4xl": !r
|
|
2951
|
-
},
|
|
2952
|
-
t
|
|
2953
|
-
);
|
|
2954
|
-
return /* @__PURE__ */ d("main", { className: o, children: e });
|
|
2955
|
-
}, Pn = "av-flexgrid", ke = "av-flexgrid-item", De = 0.25, et = X.createContext({
|
|
2956
|
-
columnGap: 0,
|
|
2957
|
-
rowGap: 0
|
|
2958
|
-
}), Dn = ({
|
|
2959
|
-
children: e,
|
|
2960
|
-
className: t,
|
|
2961
|
-
columnGap: r = 1,
|
|
2962
|
-
rowGap: a = 0,
|
|
2963
|
-
height: n = "auto",
|
|
2964
|
-
width: o = "auto",
|
|
2965
|
-
direction: s = "row",
|
|
2966
|
-
alignHorizontal: i = "normal",
|
|
2967
|
-
alignVertical: c = "normal",
|
|
2968
|
-
...f
|
|
2969
|
-
}) => {
|
|
2970
|
-
const h = {
|
|
2971
|
-
flexDirection: s,
|
|
2972
|
-
justifyContent: i,
|
|
2973
|
-
alignItems: c,
|
|
2974
|
-
height: n,
|
|
2975
|
-
width: o,
|
|
2976
|
-
/**
|
|
2977
|
-
* Trick to account for the extra space taken
|
|
2978
|
-
* by the columnGap and rowGap that will be applied
|
|
2979
|
-
* to all FlexgridItems (see context and paddings).
|
|
2980
|
-
*/
|
|
2981
|
-
marginLeft: r * -1 * De + "rem",
|
|
2982
|
-
marginTop: a * -1 * De + "rem"
|
|
2983
|
-
}, m = p(
|
|
2984
|
-
Pn,
|
|
2985
|
-
"box-border flex flex-wrap"
|
|
2986
|
-
), l = { columnGap: r, rowGap: a };
|
|
2987
|
-
return t ? /* @__PURE__ */ d("div", { className: t, children: /* @__PURE__ */ d("div", { className: m, style: h, ...f, children: /* @__PURE__ */ d(et.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ d("div", { className: m, style: h, ...f, children: /* @__PURE__ */ d(et.Provider, { value: l, children: e }) });
|
|
2988
|
-
}, ze = (e, t) => p({
|
|
2989
|
-
"basis-1/12": e === 1 && !t,
|
|
2990
|
-
"sm:basis-1/12": e === 1 && t === "sm",
|
|
2991
|
-
"md:basis-1/12": e === 1 && t === "md",
|
|
2992
|
-
"lg:basis-1/12": e === 1 && t === "lg",
|
|
2993
|
-
"xl:basis-1/12": e === 1 && t === "xl",
|
|
2994
|
-
"2xl:basis-1/12": e === 1 && t === "2xl",
|
|
2995
|
-
"basis-2/12": e === 2 && !t,
|
|
2996
|
-
"sm:basis-2/12": e === 2 && t === "sm",
|
|
2997
|
-
"md:basis-2/12": e === 2 && t === "md",
|
|
2998
|
-
"lg:basis-2/12": e === 2 && t === "lg",
|
|
2999
|
-
"xl:basis-2/12": e === 2 && t === "xl",
|
|
3000
|
-
"2xl:basis-2/12": e === 2 && t === "2xl",
|
|
3001
|
-
"basis-3/12": e === 3 && !t,
|
|
3002
|
-
"sm:basis-3/12": e === 3 && t === "sm",
|
|
3003
|
-
"md:basis-3/12": e === 3 && t === "md",
|
|
3004
|
-
"lg:basis-3/12": e === 3 && t === "lg",
|
|
3005
|
-
"xl:basis-3/12": e === 3 && t === "xl",
|
|
3006
|
-
"2xl:basis-3/12": e === 3 && t === "2xl",
|
|
3007
|
-
"basis-4/12": e === 4 && !t,
|
|
3008
|
-
"sm:basis-4/12": e === 4 && t === "sm",
|
|
3009
|
-
"md:basis-4/12": e === 4 && t === "md",
|
|
3010
|
-
"lg:basis-4/12": e === 4 && t === "lg",
|
|
3011
|
-
"xl:basis-4/12": e === 4 && t === "xl",
|
|
3012
|
-
"2xl:basis-4/12": e === 4 && t === "2xl",
|
|
3013
|
-
"basis-5/12": e === 5 && !t,
|
|
3014
|
-
"sm:basis-5/12": e === 5 && t === "sm",
|
|
3015
|
-
"md:basis-5/12": e === 5 && t === "md",
|
|
3016
|
-
"lg:basis-5/12": e === 5 && t === "lg",
|
|
3017
|
-
"xl:basis-5/12": e === 5 && t === "xl",
|
|
3018
|
-
"2xl:basis-5/12": e === 5 && t === "2xl",
|
|
3019
|
-
"basis-6/12": e === 6 && !t,
|
|
3020
|
-
"sm:basis-6/12": e === 6 && t === "sm",
|
|
3021
|
-
"md:basis-6/12": e === 6 && t === "md",
|
|
3022
|
-
"lg:basis-6/12": e === 6 && t === "lg",
|
|
3023
|
-
"xl:basis-6/12": e === 6 && t === "xl",
|
|
3024
|
-
"2xl:basis-6/12": e === 6 && t === "2xl",
|
|
3025
|
-
"basis-7/12": e === 7 && !t,
|
|
3026
|
-
"sm:basis-7/12": e === 7 && t === "sm",
|
|
3027
|
-
"md:basis-7/12": e === 7 && t === "md",
|
|
3028
|
-
"lg:basis-7/12": e === 7 && t === "lg",
|
|
3029
|
-
"xl:basis-7/12": e === 7 && t === "xl",
|
|
3030
|
-
"2xl:basis-7/12": e === 7 && t === "2xl",
|
|
3031
|
-
"basis-8/12": e === 8 && !t,
|
|
3032
|
-
"sm:basis-8/12": e === 8 && t === "sm",
|
|
3033
|
-
"md:basis-8/12": e === 8 && t === "md",
|
|
3034
|
-
"lg:basis-8/12": e === 8 && t === "lg",
|
|
3035
|
-
"xl:basis-8/12": e === 8 && t === "xl",
|
|
3036
|
-
"2xl:basis-8/12": e === 8 && t === "2xl",
|
|
3037
|
-
"basis-9/12": e === 9 && !t,
|
|
3038
|
-
"sm:basis-9/12": e === 9 && t === "sm",
|
|
3039
|
-
"md:basis-9/12": e === 9 && t === "md",
|
|
3040
|
-
"lg:basis-9/12": e === 9 && t === "lg",
|
|
3041
|
-
"xl:basis-9/12": e === 9 && t === "xl",
|
|
3042
|
-
"2xl:basis-9/12": e === 9 && t === "2xl",
|
|
3043
|
-
"basis-10/12": e === 10 && !t,
|
|
3044
|
-
"sm:basis-10/12": e === 10 && t === "sm",
|
|
3045
|
-
"md:basis-10/12": e === 10 && t === "md",
|
|
3046
|
-
"lg:basis-10/12": e === 10 && t === "lg",
|
|
3047
|
-
"xl:basis-10/12": e === 10 && t === "xl",
|
|
3048
|
-
"2xl:basis-10/12": e === 10 && t === "2xl",
|
|
3049
|
-
"basis-11/12": e === 11 && !t,
|
|
3050
|
-
"sm:basis-11/12": e === 11 && t === "sm",
|
|
3051
|
-
"md:basis-11/12": e === 11 && t === "md",
|
|
3052
|
-
"lg:basis-11/12": e === 11 && t === "lg",
|
|
3053
|
-
"xl:basis-11/12": e === 11 && t === "xl",
|
|
3054
|
-
"2xl:basis-11/12": e === 11 && t === "2xl",
|
|
3055
|
-
"basis-full": e === 12 && !t,
|
|
3056
|
-
"sm:basis-full": e === 12 && t === "sm",
|
|
3057
|
-
"md:basis-full": e === 12 && t === "md",
|
|
3058
|
-
"lg:basis-full": e === 12 && t === "lg",
|
|
3059
|
-
"xl:basis-full": e === 12 && t === "xl",
|
|
3060
|
-
"2xl:basis-full": e === 12 && t === "2xl"
|
|
3061
|
-
}), Ln = ({
|
|
3062
|
-
className: e,
|
|
3063
|
-
span: t
|
|
3064
|
-
}) => {
|
|
3065
|
-
if (!t)
|
|
3066
|
-
return p(e, ke, "box-border basis-auto");
|
|
3067
|
-
if (typeof t == "number")
|
|
3068
|
-
return p(e, ke, "box-border max-w-full", {
|
|
3069
|
-
[`${ze(t)}`]: !0
|
|
3070
|
-
});
|
|
3071
|
-
if (typeof t == "string")
|
|
3072
|
-
return p(e, ke, "box-border basis-auto", {
|
|
3073
|
-
"max-w-full grow": t === "auto"
|
|
3074
|
-
});
|
|
3075
|
-
if (typeof t == "object") {
|
|
3076
|
-
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? ze(n) : ze(n, a));
|
|
3077
|
-
return p(
|
|
3078
|
-
e,
|
|
3079
|
-
ke,
|
|
3080
|
-
"box-border",
|
|
3081
|
-
r
|
|
3082
|
-
);
|
|
3083
|
-
}
|
|
3084
|
-
}, ae = ({
|
|
3085
|
-
children: e,
|
|
3086
|
-
className: t,
|
|
3087
|
-
span: r,
|
|
3088
|
-
...a
|
|
3089
|
-
}) => {
|
|
3090
|
-
const { columnGap: n, rowGap: o } = Rt(et), s = {
|
|
3091
|
-
paddingLeft: n * De + "rem",
|
|
3092
|
-
paddingTop: o * De + "rem"
|
|
3093
|
-
}, i = Ln({
|
|
3094
|
-
className: t,
|
|
3095
|
-
span: r
|
|
3096
|
-
});
|
|
3097
|
-
return /* @__PURE__ */ d("div", { className: i, style: s, ...a, children: e });
|
|
3098
|
-
};
|
|
3099
|
-
/*!
|
|
3100
|
-
@versini/ui-system v3.0.8
|
|
3101
|
-
© 2025 gizmette.com
|
|
3102
|
-
*/
|
|
3103
|
-
try {
|
|
3104
|
-
window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
|
|
3105
|
-
version: "3.0.8",
|
|
3106
|
-
buildTime: "01/25/2025 10:54 PM EST",
|
|
3107
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3108
|
-
license: "MIT"
|
|
3109
|
-
});
|
|
3110
|
-
} catch {
|
|
3111
|
-
}
|
|
3112
|
-
const ar = "av-text-input", $n = "av-text-input-wrapper", qe = "av-text-input-helper-text";
|
|
3113
|
-
function Mn() {
|
|
3114
|
-
const e = O(!1);
|
|
3115
|
-
return G(() => (e.current = !0, () => {
|
|
3116
|
-
e.current = !1;
|
|
3117
|
-
}), []), q(() => e.current, []);
|
|
3118
|
-
}
|
|
3119
|
-
const Un = {
|
|
3120
|
-
x: 0,
|
|
3121
|
-
y: 0,
|
|
3122
|
-
width: 0,
|
|
3123
|
-
height: 0,
|
|
3124
|
-
top: 0,
|
|
3125
|
-
left: 0,
|
|
3126
|
-
bottom: 0,
|
|
3127
|
-
right: 0
|
|
3128
|
-
};
|
|
3129
|
-
function Kn(e) {
|
|
3130
|
-
const t = Mn(), r = O(0), a = O(null), [n, o] = z(Un), s = Le(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
3131
|
-
const c = i[0];
|
|
3132
|
-
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3133
|
-
a.current && t() && o(c.contentRect);
|
|
3134
|
-
}));
|
|
3135
|
-
}), [t]);
|
|
3136
|
-
return G(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
3137
|
-
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3138
|
-
}), [s, e]), [a, n];
|
|
3139
|
-
}
|
|
3140
|
-
function Hn(e) {
|
|
3141
|
-
const t = Nt();
|
|
3142
|
-
if (!e)
|
|
3143
|
-
return t;
|
|
3144
|
-
if (typeof e == "number" || typeof e == "string")
|
|
3145
|
-
return `${e}${t}`;
|
|
3146
|
-
if (typeof e == "object") {
|
|
3147
|
-
const { id: r, prefix: a = "" } = e;
|
|
3148
|
-
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3149
|
-
}
|
|
3150
|
-
}
|
|
3151
|
-
const nr = "SET_ANNOUNCEMENT", or = "CLEAR_ANNOUNCEMENT", Wn = {
|
|
3152
|
-
alert: null,
|
|
3153
|
-
alertdialog: null,
|
|
3154
|
-
log: "polite",
|
|
3155
|
-
marquee: null,
|
|
3156
|
-
progressbar: null,
|
|
3157
|
-
status: "polite",
|
|
3158
|
-
timer: "assertive"
|
|
3159
|
-
}, Bn = (e, t) => {
|
|
3160
|
-
switch (t == null ? void 0 : t.type) {
|
|
3161
|
-
case nr:
|
|
3162
|
-
return {
|
|
3163
|
-
...e,
|
|
3164
|
-
announcement: t.payload
|
|
3165
|
-
};
|
|
3166
|
-
case or:
|
|
3167
|
-
return {
|
|
3168
|
-
...e,
|
|
3169
|
-
announcement: null
|
|
3170
|
-
};
|
|
3171
|
-
default:
|
|
3172
|
-
return e;
|
|
3173
|
-
}
|
|
3174
|
-
}, Vn = ({
|
|
3175
|
-
onAnnouncementClear: e,
|
|
3176
|
-
dispatch: t
|
|
3177
|
-
}) => {
|
|
3178
|
-
t({
|
|
3179
|
-
type: or
|
|
3180
|
-
}), typeof e == "function" && e();
|
|
3181
|
-
}, St = ({
|
|
3182
|
-
children: e,
|
|
3183
|
-
clearAnnouncementDelay: t,
|
|
3184
|
-
clearAnnouncementTimeoutRef: r,
|
|
3185
|
-
onAnnouncementClear: a,
|
|
3186
|
-
dispatch: n
|
|
3187
|
-
}) => {
|
|
3188
|
-
clearTimeout(r.current), e !== null && n({
|
|
3189
|
-
type: nr,
|
|
3190
|
-
payload: e
|
|
3191
|
-
}), t && (r.current = setTimeout(
|
|
3192
|
-
() => Vn({
|
|
3193
|
-
onAnnouncementClear: a,
|
|
3194
|
-
dispatch: n
|
|
3195
|
-
}),
|
|
3196
|
-
t
|
|
3197
|
-
));
|
|
3198
|
-
}, Jn = ({
|
|
3199
|
-
children: e,
|
|
3200
|
-
announcementTimeoutRef: t,
|
|
3201
|
-
announcementDelay: r,
|
|
3202
|
-
clearAnnouncementDelay: a,
|
|
3203
|
-
clearAnnouncementTimeoutRef: n,
|
|
3204
|
-
onAnnouncementClear: o,
|
|
3205
|
-
dispatch: s
|
|
3206
|
-
}) => {
|
|
3207
|
-
clearTimeout(t.current), r ? t.current = setTimeout(St, r, {
|
|
3208
|
-
children: e,
|
|
3209
|
-
clearAnnouncementDelay: a,
|
|
3210
|
-
clearAnnouncementTimeoutRef: n,
|
|
3211
|
-
onAnnouncementClear: o,
|
|
3212
|
-
dispatch: s
|
|
3213
|
-
}) : St({
|
|
3214
|
-
children: e,
|
|
3215
|
-
clearAnnouncementDelay: a,
|
|
3216
|
-
clearAnnouncementTimeoutRef: n,
|
|
3217
|
-
onAnnouncementClear: o,
|
|
3218
|
-
dispatch: s
|
|
3219
|
-
});
|
|
3220
|
-
};
|
|
3221
|
-
function sr({
|
|
3222
|
-
children: e,
|
|
3223
|
-
className: t,
|
|
3224
|
-
politeness: r,
|
|
3225
|
-
role: a = null,
|
|
3226
|
-
announcementDelay: n,
|
|
3227
|
-
clearAnnouncementDelay: o,
|
|
3228
|
-
onAnnouncementClear: s,
|
|
3229
|
-
visible: i,
|
|
3230
|
-
...c
|
|
3231
|
-
}) {
|
|
3232
|
-
const f = O(null), h = O(null), [m, l] = At(Bn, {
|
|
3233
|
-
announcement: null
|
|
3234
|
-
});
|
|
3235
|
-
let u = r;
|
|
3236
|
-
typeof u > "u" && (u = a ? Wn[a] : "assertive"), G(() => {
|
|
3237
|
-
Jn({
|
|
3238
|
-
announcementTimeoutRef: f,
|
|
3239
|
-
announcementDelay: n,
|
|
3240
|
-
children: e,
|
|
3241
|
-
clearAnnouncementDelay: o,
|
|
3242
|
-
clearAnnouncementTimeoutRef: h,
|
|
3243
|
-
onAnnouncementClear: s,
|
|
3244
|
-
dispatch: l
|
|
3245
|
-
});
|
|
3246
|
-
}, [
|
|
3247
|
-
e,
|
|
3248
|
-
n,
|
|
3249
|
-
o,
|
|
3250
|
-
s
|
|
3251
|
-
]);
|
|
3252
|
-
const y = p(t, {
|
|
3253
|
-
"sr-only": !i
|
|
3254
|
-
});
|
|
3255
|
-
return /* @__PURE__ */ d(
|
|
3256
|
-
"div",
|
|
3257
|
-
{
|
|
3258
|
-
"aria-live": u,
|
|
3259
|
-
...a && { role: a },
|
|
3260
|
-
className: y,
|
|
3261
|
-
...c,
|
|
3262
|
-
children: m.announcement
|
|
3263
|
-
}
|
|
3264
|
-
);
|
|
3265
|
-
}
|
|
3266
|
-
/*!
|
|
3267
|
-
@versini/ui-liveregion v1.3.8
|
|
3268
|
-
© 2025 gizmette.com
|
|
3269
|
-
*/
|
|
3270
|
-
try {
|
|
3271
|
-
window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
|
|
3272
|
-
version: "1.3.8",
|
|
3273
|
-
buildTime: "01/25/2025 10:54 PM EST",
|
|
3274
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3275
|
-
license: "MIT"
|
|
3276
|
-
});
|
|
3277
|
-
} catch {
|
|
3278
|
-
}
|
|
3279
|
-
const Gn = ({
|
|
3280
|
-
mode: e
|
|
3281
|
-
}) => p({
|
|
3282
|
-
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3283
|
-
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3284
|
-
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3285
|
-
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3286
|
-
}), Yn = ({
|
|
3287
|
-
focusMode: e
|
|
3288
|
-
}) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3289
|
-
"focus:outline-focus-dark": e === "dark",
|
|
3290
|
-
"focus:outline-focus-light": e === "light",
|
|
3291
|
-
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3292
|
-
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3293
|
-
}), Fn = ({
|
|
3294
|
-
noBorder: e,
|
|
3295
|
-
error: t
|
|
3296
|
-
}) => p("border-2", {
|
|
3297
|
-
"border-border-dark": !e && !t,
|
|
3298
|
-
"focus:border-border-dark": !e && t,
|
|
3299
|
-
"border-border-error-dark": !e && t,
|
|
3300
|
-
"border-transparent": e
|
|
3301
|
-
}), jn = ({
|
|
3302
|
-
disabled: e,
|
|
3303
|
-
raw: t,
|
|
3304
|
-
error: r,
|
|
3305
|
-
mode: a
|
|
3306
|
-
}) => {
|
|
3307
|
-
if (t)
|
|
3308
|
-
return "";
|
|
3309
|
-
if (e)
|
|
3310
|
-
return p("absolute px-2 cursor-not-allowed opacity-50 font-medium");
|
|
3311
|
-
if (!r)
|
|
3312
|
-
return p("absolute px-2 cursor-text font-medium", {
|
|
3313
|
-
"text-copy-lighter": a === "dark",
|
|
3314
|
-
"text-copy-dark": a === "light",
|
|
3315
|
-
"text-copy-dark dark:text-copy-lighter": a === "system",
|
|
3316
|
-
"text-copy-lighter dark:text-copy-dark": a === "alt-system"
|
|
3317
|
-
});
|
|
3318
|
-
if (r)
|
|
3319
|
-
return p("absolute px-2 cursor-text font-medium", {
|
|
3320
|
-
"text-copy-lighter": a === "dark",
|
|
3321
|
-
"text-copy-error-dark": a === "light",
|
|
3322
|
-
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3323
|
-
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3324
|
-
});
|
|
3325
|
-
}, zn = ({
|
|
3326
|
-
error: e,
|
|
3327
|
-
raw: t,
|
|
3328
|
-
mode: r,
|
|
3329
|
-
disabled: a
|
|
3330
|
-
}) => {
|
|
3331
|
-
if (t)
|
|
3332
|
-
return "";
|
|
3333
|
-
if (a)
|
|
3334
|
-
return p(
|
|
3335
|
-
qe,
|
|
3336
|
-
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
3337
|
-
);
|
|
3338
|
-
if (!e)
|
|
3339
|
-
return p(qe, "absolute px-2 font-medium", {
|
|
3340
|
-
"text-copy-lighter": r === "dark",
|
|
3341
|
-
"text-copy-dark": r === "light",
|
|
3342
|
-
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
3343
|
-
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
3344
|
-
});
|
|
3345
|
-
if (e)
|
|
3346
|
-
return p(qe, "absolute px-2 font-medium", {
|
|
3347
|
-
"text-copy-error-light bg-surface-darker": r === "dark",
|
|
3348
|
-
"text-copy-error-dark": r === "light",
|
|
3349
|
-
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3350
|
-
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3351
|
-
});
|
|
3352
|
-
}, qn = ({
|
|
3353
|
-
className: e,
|
|
3354
|
-
inputClassName: t,
|
|
3355
|
-
raw: r,
|
|
3356
|
-
disabled: a,
|
|
3357
|
-
noBorder: n,
|
|
3358
|
-
error: o,
|
|
3359
|
-
mode: s,
|
|
3360
|
-
focusMode: i,
|
|
3361
|
-
size: c,
|
|
3362
|
-
rightElementClassName: f
|
|
3363
|
-
}) => {
|
|
3364
|
-
const h = r ? e : p(
|
|
3365
|
-
"relative flex w-full flex-col justify-center",
|
|
3366
|
-
$n,
|
|
3367
|
-
e
|
|
3368
|
-
);
|
|
3369
|
-
let m = "";
|
|
3370
|
-
switch (c) {
|
|
3371
|
-
case "xs":
|
|
3372
|
-
m = "h-8";
|
|
3373
|
-
break;
|
|
3374
|
-
case "sm":
|
|
3375
|
-
m = "h-10";
|
|
3376
|
-
break;
|
|
3377
|
-
case "lg":
|
|
3378
|
-
m = "h-14";
|
|
3379
|
-
break;
|
|
3380
|
-
case "xl":
|
|
3381
|
-
m = "h-16";
|
|
3382
|
-
break;
|
|
3383
|
-
default:
|
|
3384
|
-
m = "h-12";
|
|
3385
|
-
break;
|
|
3386
|
-
}
|
|
3387
|
-
const l = r ? p(t) : p(
|
|
3388
|
-
ar,
|
|
3389
|
-
m,
|
|
3390
|
-
"rounded-md text-base px-4",
|
|
3391
|
-
Gn({ mode: s }),
|
|
3392
|
-
Yn({ focusMode: i }),
|
|
3393
|
-
Fn({ noBorder: n, error: o }),
|
|
3394
|
-
{
|
|
3395
|
-
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3396
|
-
},
|
|
3397
|
-
t
|
|
3398
|
-
), u = r ? void 0 : "sr-only", y = jn({
|
|
3399
|
-
disabled: a,
|
|
3400
|
-
raw: r,
|
|
3401
|
-
error: o,
|
|
3402
|
-
mode: s
|
|
3403
|
-
}), E = zn({
|
|
3404
|
-
error: o,
|
|
3405
|
-
raw: r,
|
|
3406
|
-
mode: s,
|
|
3407
|
-
disabled: a
|
|
3408
|
-
}), T = r ? void 0 : p("absolute right-3", f);
|
|
3409
|
-
return {
|
|
3410
|
-
wrapper: h,
|
|
3411
|
-
input: l,
|
|
3412
|
-
accessibleLabel: u,
|
|
3413
|
-
visibleLabel: y,
|
|
3414
|
-
helperText: E,
|
|
3415
|
-
rightElement: T
|
|
3416
|
-
};
|
|
3417
|
-
}, ot = X.forwardRef(
|
|
3418
|
-
({
|
|
3419
|
-
id: e,
|
|
3420
|
-
name: t,
|
|
3421
|
-
label: r,
|
|
3422
|
-
error: a = !1,
|
|
3423
|
-
raw: n = !1,
|
|
3424
|
-
className: o,
|
|
3425
|
-
inputClassName: s,
|
|
3426
|
-
mode: i = "system",
|
|
3427
|
-
focusMode: c = "system",
|
|
3428
|
-
disabled: f = !1,
|
|
3429
|
-
noBorder: h = !1,
|
|
3430
|
-
labelId: m,
|
|
3431
|
-
labelHidden: l = !1,
|
|
3432
|
-
type: u = "text",
|
|
3433
|
-
helperText: y = "",
|
|
3434
|
-
rightElement: E,
|
|
3435
|
-
rightElementClassName: T,
|
|
3436
|
-
size: _ = "md",
|
|
3437
|
-
...F
|
|
3438
|
-
}, M) => {
|
|
3439
|
-
const [Q, L] = Kn(), [re, U] = z(0), v = Hn({ id: e, prefix: `${ar}-` }), S = `${t} error, ${y}`, K = O(null), w = O(null), C = {
|
|
3440
|
-
xs: { label: "-25px", helperText: "30px" },
|
|
3441
|
-
sm: { label: "-29px", helperText: "34px" },
|
|
3442
|
-
md: { label: "-33px", helperText: "38px" },
|
|
3443
|
-
lg: { label: "-15px", helperText: "22px" },
|
|
3444
|
-
xl: { label: "-19px", helperText: "25px" }
|
|
3445
|
-
}, P = qn({
|
|
3446
|
-
className: o,
|
|
3447
|
-
inputClassName: s,
|
|
3448
|
-
error: a,
|
|
3449
|
-
raw: n,
|
|
3450
|
-
focusMode: c,
|
|
3451
|
-
disabled: f,
|
|
3452
|
-
noBorder: h,
|
|
3453
|
-
mode: i,
|
|
3454
|
-
size: _,
|
|
3455
|
-
rightElementClassName: T
|
|
3456
|
-
});
|
|
3457
|
-
return ve(() => {
|
|
3458
|
-
L && L.width && U(L.width + 18 + 10);
|
|
3459
|
-
}, [L]), ve(() => {
|
|
3460
|
-
var B, Z;
|
|
3461
|
-
const { label: g, helperText: I } = C[_];
|
|
3462
|
-
(B = K == null ? void 0 : K.current) == null || B.style.setProperty("--av-text-input-label", g), (Z = w == null ? void 0 : w.current) == null || Z.style.setProperty(
|
|
3463
|
-
"--av-text-input-helper-text",
|
|
3464
|
-
I
|
|
3465
|
-
);
|
|
3466
|
-
}, [_]), /* @__PURE__ */ $("div", { className: P.wrapper, children: [
|
|
3467
|
-
/* @__PURE__ */ d(
|
|
3468
|
-
"label",
|
|
3469
|
-
{
|
|
3470
|
-
htmlFor: v,
|
|
3471
|
-
id: m,
|
|
3472
|
-
className: P.accessibleLabel,
|
|
3473
|
-
children: r
|
|
3474
|
-
}
|
|
3475
|
-
),
|
|
3476
|
-
/* @__PURE__ */ d(
|
|
3477
|
-
"input",
|
|
3478
|
-
{
|
|
3479
|
-
ref: M,
|
|
3480
|
-
id: v,
|
|
3481
|
-
name: t,
|
|
3482
|
-
type: u,
|
|
3483
|
-
disabled: f,
|
|
3484
|
-
placeholder: n ? void 0 : " ",
|
|
3485
|
-
className: P.input,
|
|
3486
|
-
...y && { "aria-describedby": `${v}-helper` },
|
|
3487
|
-
...a && { "aria-invalid": "true" },
|
|
3488
|
-
...E && !n && { style: { paddingRight: re } },
|
|
3489
|
-
...F
|
|
3490
|
-
}
|
|
3491
|
-
),
|
|
3492
|
-
!n && !l && /* @__PURE__ */ d(
|
|
3493
|
-
"label",
|
|
3494
|
-
{
|
|
3495
|
-
ref: K,
|
|
3496
|
-
"aria-hidden": !0,
|
|
3497
|
-
htmlFor: v,
|
|
3498
|
-
className: P.visibleLabel,
|
|
3499
|
-
children: r
|
|
3500
|
-
}
|
|
3501
|
-
),
|
|
3502
|
-
y && /* @__PURE__ */ d(
|
|
3503
|
-
"div",
|
|
3504
|
-
{
|
|
3505
|
-
ref: w,
|
|
3506
|
-
id: `${v}-helper`,
|
|
3507
|
-
className: P.helperText,
|
|
3508
|
-
children: y
|
|
3509
|
-
}
|
|
3510
|
-
),
|
|
3511
|
-
E && /* @__PURE__ */ d(
|
|
3512
|
-
"div",
|
|
3513
|
-
{
|
|
3514
|
-
ref: Q,
|
|
3515
|
-
className: P.rightElement,
|
|
3516
|
-
children: E
|
|
3517
|
-
}
|
|
3518
|
-
),
|
|
3519
|
-
a && y && /* @__PURE__ */ d(sr, { politeness: "polite", clearAnnouncementDelay: 500, children: S })
|
|
3520
|
-
] });
|
|
3521
|
-
}
|
|
3522
|
-
);
|
|
3523
|
-
ot.displayName = "TextInput";
|
|
3524
|
-
function Xn(e) {
|
|
3525
|
-
return Le(() => e.every((t) => t == null) ? () => {
|
|
3526
|
-
} : (t) => {
|
|
3527
|
-
e.forEach((r) => {
|
|
3528
|
-
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
3529
|
-
});
|
|
3530
|
-
}, e);
|
|
3531
|
-
}
|
|
3532
|
-
const Qn = 500, Zn = 5e3, eo = 2e4, ir = X.forwardRef(
|
|
3533
|
-
({
|
|
3534
|
-
name: e,
|
|
3535
|
-
disabled: t,
|
|
3536
|
-
label: r,
|
|
3537
|
-
labelHidden: a,
|
|
3538
|
-
onMaskChange: n,
|
|
3539
|
-
onChange: o,
|
|
3540
|
-
onBlur: s,
|
|
3541
|
-
onFocus: i,
|
|
3542
|
-
onTextInputMaskBlur: c,
|
|
3543
|
-
rightElement: f,
|
|
3544
|
-
...h
|
|
3545
|
-
}, m) => {
|
|
3546
|
-
const [l, u] = z(!0), [y, E] = z({
|
|
3547
|
-
message: null,
|
|
3548
|
-
politeness: null
|
|
3549
|
-
}), T = O(!0), _ = O(null), F = O(null), M = Xn([m, F]), Q = l ? "Show" : "Hide", L = () => {
|
|
3550
|
-
_.current && clearTimeout(_.current), T.current || (_.current = setTimeout(() => {
|
|
3551
|
-
T.current = !0, u(!0), E({
|
|
3552
|
-
announcementTimeout: Zn,
|
|
3553
|
-
politeness: "polite",
|
|
3554
|
-
message: `${r} hiding characters`
|
|
3555
|
-
}), n && n(!0);
|
|
3556
|
-
}, eo));
|
|
3557
|
-
}, re = (w) => {
|
|
3558
|
-
w.preventDefault();
|
|
3559
|
-
const C = !T.current;
|
|
3560
|
-
T.current = C, L(), u(C), E({
|
|
3561
|
-
announcementTimeout: Qn,
|
|
3562
|
-
politeness: "assertive",
|
|
3563
|
-
message: C ? "Characters hidden" : "Characters showing"
|
|
3564
|
-
}), n && n(C);
|
|
3565
|
-
}, U = (w) => {
|
|
3566
|
-
var C;
|
|
3567
|
-
const { relatedTarget: P } = w, B = (C = F.current) == null ? void 0 : C.parentElement;
|
|
3568
|
-
B != null && B.contains(P) || c && c();
|
|
3569
|
-
}, v = (w) => {
|
|
3570
|
-
L(), s && s(w), U(w);
|
|
3571
|
-
}, S = (w) => {
|
|
3572
|
-
L(), i && i(w);
|
|
3573
|
-
}, K = (w) => {
|
|
3574
|
-
L(), o && o(w);
|
|
3575
|
-
};
|
|
3576
|
-
return G(() => () => {
|
|
3577
|
-
_.current && clearTimeout(_.current);
|
|
3578
|
-
}, []), /* @__PURE__ */ $(Ne, { children: [
|
|
3579
|
-
/* @__PURE__ */ d(
|
|
3580
|
-
ot,
|
|
3581
|
-
{
|
|
3582
|
-
ref: M,
|
|
3583
|
-
name: e,
|
|
3584
|
-
label: r,
|
|
3585
|
-
labelHidden: a,
|
|
3586
|
-
type: l ? "password" : "text",
|
|
3587
|
-
disabled: t,
|
|
3588
|
-
onBlur: v,
|
|
3589
|
-
onFocus: S,
|
|
3590
|
-
onChange: K,
|
|
3591
|
-
rightElement: X.cloneElement(f, {
|
|
3592
|
-
ref: m,
|
|
3593
|
-
label: Q,
|
|
3594
|
-
onClick: re,
|
|
3595
|
-
onBlur: U,
|
|
3596
|
-
disabled: t
|
|
3597
|
-
}),
|
|
3598
|
-
...h
|
|
3599
|
-
}
|
|
3600
|
-
),
|
|
3601
|
-
/* @__PURE__ */ d(
|
|
3602
|
-
sr,
|
|
3603
|
-
{
|
|
3604
|
-
role: "status",
|
|
3605
|
-
politeness: y.politeness,
|
|
3606
|
-
clearAnnouncementDelay: y.announcementTimeout,
|
|
3607
|
-
children: y.message
|
|
3608
|
-
}
|
|
3609
|
-
)
|
|
3610
|
-
] });
|
|
3611
|
-
}
|
|
3612
|
-
);
|
|
3613
|
-
ir.displayName = "TextInputMask";
|
|
3614
|
-
/*!
|
|
3615
|
-
@versini/ui-textinput v3.0.13
|
|
3616
|
-
© 2025 gizmette.com
|
|
3617
|
-
*/
|
|
3618
|
-
try {
|
|
3619
|
-
window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
|
|
3620
|
-
version: "3.0.13",
|
|
3621
|
-
buildTime: "01/25/2025 10:54 PM EST",
|
|
3622
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3623
|
-
license: "MIT"
|
|
3624
|
-
});
|
|
3625
|
-
} catch {
|
|
3626
|
-
}
|
|
3627
|
-
const to = "ASK! ME! ANYTHING!", cr = "Callisto", ro = "Log in", ao = "Sign in with a Passkey", Qo = "Log out", no = "Password", Zo = "Profile", es = "Settings", ts = "Chat history", rs = "About", as = "Type your question here", ns = "{{clipboard}}", os = `Sometimes, ${cr} hallucinates. Review important details.`, ss = "Prompts are pre-filled buttons available on the main screen, to help you quickly start requests. The label is used for the button, and the content is what will be inserted in the chat when the button is pressed. You can use the special placeholder {{clipboard}} to automatically insert the content of your clipboard.", is = {
|
|
3628
|
-
PREFERENCES: {
|
|
3629
|
-
TITLE: "User profile",
|
|
3630
|
-
NAME: "Name",
|
|
3631
|
-
EMAIL: "Email",
|
|
3632
|
-
LOCATION: "Location",
|
|
3633
|
-
PASSKEY_TITLE: "Passkey",
|
|
3634
|
-
PASSKEY_INSTRUCTIONS: "Log in password-free with a passkey (facial recognition or fingerprint authentication).",
|
|
3635
|
-
PASSKEY_BUTTON: "Create a Passkey"
|
|
3636
|
-
},
|
|
3637
|
-
CURRENT_STATISTICS: {
|
|
3638
|
-
TITLE: "Current chat statistics",
|
|
3639
|
-
MODEL_NAME: "GPT model",
|
|
3640
|
-
TOKENS_USED: "Tokens used",
|
|
3641
|
-
REMAINING_TOKENS: "Remaining tokens",
|
|
3642
|
-
PROCESSING_TIME: "Average response time"
|
|
3643
|
-
},
|
|
3644
|
-
MAIN_STATISTICS: {
|
|
3645
|
-
TITLE: "Lifetime statistics",
|
|
3646
|
-
TOTAL: "Total chat session",
|
|
3647
|
-
PROCESSING_TIME: "Average response time"
|
|
3648
|
-
},
|
|
3649
|
-
HISTORY: {
|
|
3650
|
-
TITLE: "Chat history"
|
|
3651
|
-
},
|
|
3652
|
-
ABOUT: {
|
|
3653
|
-
TITLE_CLIENT: "Client details",
|
|
3654
|
-
TITLE_SERVER: "Server details",
|
|
3655
|
-
VERSION: "Version",
|
|
3656
|
-
BUILD_TIMESTAMP: "Build date",
|
|
3657
|
-
PROVIDER: "Available AI model"
|
|
3658
|
-
},
|
|
3659
|
-
SETTINGS_PROMPTS: {
|
|
3660
|
-
TITLE: "Prompts"
|
|
3661
|
-
},
|
|
3662
|
-
SETTINGS_DETAILS: {
|
|
3663
|
-
TITLE: "Chat Details",
|
|
3664
|
-
INSTRUCTION: "This option adds individual statistics for each messages under their respective bubbles, such as processing time, model name, and more."
|
|
3665
|
-
}
|
|
3666
|
-
}, oo = () => /* @__PURE__ */ $("div", { className: "flex items-center justify-center", children: [
|
|
3667
|
-
/* @__PURE__ */ d("div", { className: "basis-1/4", children: /* @__PURE__ */ d(Rn, {}) }),
|
|
3668
|
-
/* @__PURE__ */ $("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3669
|
-
/* @__PURE__ */ d("h1", { children: cr }),
|
|
3670
|
-
/* @__PURE__ */ d("h2", { children: to })
|
|
3671
|
-
] })
|
|
3672
|
-
] }), so = () => {
|
|
3673
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } = Zt(), [a, n] = z(""), [o, s] = z(""), [i, c] = z(!0), [f, h] = z({
|
|
3674
|
-
username: "",
|
|
3675
|
-
password: ""
|
|
3676
|
-
}), m = async (l) => {
|
|
3677
|
-
l.preventDefault(), await e(f.username, f.password) || (s(""), n("Invalid username or password"));
|
|
3678
|
-
};
|
|
3679
|
-
return G(() => {
|
|
3680
|
-
var l;
|
|
3681
|
-
(l = document.getElementById("logo")) == null || l.classList.add("fadeOut"), setTimeout(() => {
|
|
3682
|
-
var u;
|
|
3683
|
-
(u = document.getElementById("root")) == null || u.classList.replace("app-hidden", "fadeIn");
|
|
3684
|
-
}, 500);
|
|
3685
|
-
}), G(() => {
|
|
3686
|
-
t && s(t);
|
|
3687
|
-
}, [t]), /* @__PURE__ */ d(Ne, { children: /* @__PURE__ */ $(
|
|
3688
|
-
Cn,
|
|
3689
|
-
{
|
|
3690
|
-
className: en({
|
|
3691
|
-
extraClass: "mt-5"
|
|
3692
|
-
}),
|
|
3693
|
-
noMargin: !0,
|
|
3694
|
-
noPadding: !0,
|
|
3695
|
-
children: [
|
|
3696
|
-
/* @__PURE__ */ d(
|
|
3697
|
-
"div",
|
|
3698
|
-
{
|
|
3699
|
-
className: Za({
|
|
3700
|
-
extraClass: "rounded-md"
|
|
3701
|
-
}),
|
|
3702
|
-
children: /* @__PURE__ */ d(oo, {})
|
|
3703
|
-
}
|
|
3704
|
-
),
|
|
3705
|
-
/* @__PURE__ */ d("form", { className: "mt-5", onSubmit: m, children: /* @__PURE__ */ d(Dn, { alignHorizontal: "center", children: /* @__PURE__ */ d(ae, { span: 6, children: /* @__PURE__ */ $(An, { mode: "dark", children: [
|
|
3706
|
-
/* @__PURE__ */ d(ae, { span: 12, className: "mt-7", children: o && /* @__PURE__ */ d("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3707
|
-
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3708
|
-
ot,
|
|
3709
|
-
{
|
|
3710
|
-
className: "mt-7",
|
|
3711
|
-
required: !0,
|
|
3712
|
-
autoCapitalize: "off",
|
|
3713
|
-
autoComplete: "off",
|
|
3714
|
-
autoCorrect: "off",
|
|
3715
|
-
mode: "dark",
|
|
3716
|
-
focusMode: "light",
|
|
3717
|
-
name: "username",
|
|
3718
|
-
label: "Username",
|
|
3719
|
-
onChange: (l) => {
|
|
3720
|
-
h({
|
|
3721
|
-
...f,
|
|
3722
|
-
username: l.target.value
|
|
3723
|
-
}), n("");
|
|
3724
|
-
},
|
|
3725
|
-
error: a !== ""
|
|
3726
|
-
}
|
|
3727
|
-
) }),
|
|
3728
|
-
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3729
|
-
ir,
|
|
3730
|
-
{
|
|
3731
|
-
className: "mt-7",
|
|
3732
|
-
required: !0,
|
|
3733
|
-
autoCapitalize: "off",
|
|
3734
|
-
autoComplete: "off",
|
|
3735
|
-
autoCorrect: "off",
|
|
3736
|
-
mode: "dark",
|
|
3737
|
-
focusMode: "light",
|
|
3738
|
-
name: "password",
|
|
3739
|
-
label: no,
|
|
3740
|
-
rightElement: /* @__PURE__ */ d(
|
|
3741
|
-
Pe,
|
|
3742
|
-
{
|
|
3743
|
-
focusMode: "light",
|
|
3744
|
-
mode: "dark",
|
|
3745
|
-
label: i ? "Show" : "Hide",
|
|
3746
|
-
children: i ? /* @__PURE__ */ d(xn, {}) : /* @__PURE__ */ d(Nn, {})
|
|
3747
|
-
}
|
|
3748
|
-
),
|
|
3749
|
-
onMaskChange: c,
|
|
3750
|
-
onChange: (l) => {
|
|
3751
|
-
h({
|
|
3752
|
-
...f,
|
|
3753
|
-
password: l.target.value
|
|
3754
|
-
}), n("");
|
|
3755
|
-
},
|
|
3756
|
-
error: a !== "",
|
|
3757
|
-
helperText: a
|
|
3758
|
-
}
|
|
3759
|
-
) }),
|
|
3760
|
-
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3761
|
-
rr,
|
|
3762
|
-
{
|
|
3763
|
-
mode: "light",
|
|
3764
|
-
focusMode: "light",
|
|
3765
|
-
fullWidth: !0,
|
|
3766
|
-
noBorder: !0,
|
|
3767
|
-
type: "submit",
|
|
3768
|
-
className: "mt-7",
|
|
3769
|
-
children: ro
|
|
3770
|
-
}
|
|
3771
|
-
) }),
|
|
3772
|
-
!tn() && /* @__PURE__ */ $(Ne, { children: [
|
|
3773
|
-
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
|
3774
|
-
/* @__PURE__ */ d(ae, { span: 12, children: /* @__PURE__ */ d(
|
|
3775
|
-
Pe,
|
|
3776
|
-
{
|
|
3777
|
-
variant: "selected",
|
|
3778
|
-
mode: "dark",
|
|
3779
|
-
focusMode: "light",
|
|
3780
|
-
fullWidth: !0,
|
|
3781
|
-
className: "mb-4",
|
|
3782
|
-
labelRight: ao,
|
|
3783
|
-
onClick: r,
|
|
3784
|
-
children: /* @__PURE__ */ d(vn, { size: "size-7" })
|
|
3785
|
-
}
|
|
3786
|
-
) })
|
|
3787
|
-
] })
|
|
3788
|
-
] }) }) }) })
|
|
3789
|
-
]
|
|
3790
|
-
}
|
|
3791
|
-
) });
|
|
3792
|
-
}, io = new URL(document.location.href).searchParams, _t = !!io.get("debug") || !1, co = mr(() => import(
|
|
3793
|
-
/* webpackChunkName: "LazyApp" */
|
|
3794
|
-
"./App.BO2S2PYc.js"
|
|
3795
|
-
).then((e) => e.App)), kt = ({ isComponent: e }) => {
|
|
3796
|
-
const { isAuthenticated: t } = Zt();
|
|
3797
|
-
return t ? /* @__PURE__ */ d(hr, { fallback: /* @__PURE__ */ d("div", {}), children: /* @__PURE__ */ d(co, { isComponent: e }) }) : /* @__PURE__ */ d(so, {});
|
|
3798
|
-
}, lo = ({
|
|
3799
|
-
isComponent: e = !1,
|
|
3800
|
-
domain: t = Qa
|
|
3801
|
-
}) => er ? /* @__PURE__ */ d(
|
|
3802
|
-
bt,
|
|
3803
|
-
{
|
|
3804
|
-
clientId: Et,
|
|
3805
|
-
domain: t,
|
|
3806
|
-
debug: _t,
|
|
3807
|
-
endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
|
|
3808
|
-
children: /* @__PURE__ */ d(kt, { isComponent: e })
|
|
3809
|
-
}
|
|
3810
|
-
) : /* @__PURE__ */ d(bt, { clientId: Et, domain: t, debug: _t, children: /* @__PURE__ */ d(kt, { isComponent: e }) }), cs = ({ domain: e }) => /* @__PURE__ */ d(lo, { isComponent: !0, domain: e });
|
|
3811
|
-
export {
|
|
3812
|
-
rs as ABOUT_TITLE,
|
|
3813
|
-
Co as ACTION_RESET_PROMPT,
|
|
3814
|
-
vo as ACTION_SEARCH,
|
|
3815
|
-
xo as ACTION_SORT,
|
|
3816
|
-
Oo as ACTION_TOGGLE_PROMPT,
|
|
3817
|
-
cr as APP_NAME,
|
|
3818
|
-
rr as C,
|
|
3819
|
-
is as CARDS,
|
|
3820
|
-
ns as CLIPBOARD_PROMPT,
|
|
3821
|
-
Ao as DEFAULT_AI_PROVIDER,
|
|
3822
|
-
Jo as DEFAULT_ICON_ACTION_SIZE,
|
|
3823
|
-
ko as ERROR_MESSAGE,
|
|
3824
|
-
os as FOOTER_DISCLAIMER,
|
|
3825
|
-
ts as HISTORY_TITLE,
|
|
3826
|
-
Wo as INFINITE_SCROLL_LIMIT,
|
|
3827
|
-
Ho as INFINITE_SCROLL_THRESHOLD,
|
|
3828
|
-
Dn as L,
|
|
3829
|
-
Do as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3830
|
-
Po as LOCAL_STORAGE_PREFIX,
|
|
3831
|
-
Mo as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
|
3832
|
-
Lo as LOCAL_STORAGE_SEARCH,
|
|
3833
|
-
$o as LOCAL_STORAGE_SORT,
|
|
3834
|
-
Qo as LOG_OUT,
|
|
3835
|
-
oo as Logo,
|
|
3836
|
-
he as M,
|
|
3837
|
-
Zo as PROFILE_TITLE,
|
|
3838
|
-
ss as PROMPTS_DESCRIPTION,
|
|
3839
|
-
Bo as PROMPT_CLASSNAME,
|
|
3840
|
-
Vo as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
3841
|
-
No as PROVIDER_ANTHROPIC,
|
|
3842
|
-
Ro as PROVIDER_OPENAI,
|
|
3843
|
-
An as R,
|
|
3844
|
-
Io as ROLE_ASSISTANT,
|
|
3845
|
-
_o as ROLE_HIDDEN,
|
|
3846
|
-
So as ROLE_INTERNAL,
|
|
3847
|
-
To as ROLE_SYSTEM,
|
|
3848
|
-
wo as ROLE_USER,
|
|
3849
|
-
es as SETTINGS_TITLE,
|
|
3850
|
-
Uo as STATS_SEPARATOR,
|
|
3851
|
-
cs as SassySaint,
|
|
3852
|
-
as as TYPE_QUESTION,
|
|
3853
|
-
Ko as WAIT_SEPARATOR,
|
|
3854
|
-
qo as debounce,
|
|
3855
|
-
jo as durationFormatter,
|
|
3856
|
-
He as f,
|
|
3857
|
-
ot as fe,
|
|
3858
|
-
Go as getCurrentGeoLocation,
|
|
3859
|
-
en as getMainPaddingClass,
|
|
3860
|
-
Za as getMessageContaintWrapperClass,
|
|
3861
|
-
tn as isElectron,
|
|
3862
|
-
rn as isProbablyMobile,
|
|
3863
|
-
Xo as isProbablyiPhone,
|
|
3864
|
-
ae as j,
|
|
3865
|
-
vn as l,
|
|
3866
|
-
Fo as numberFormatter,
|
|
3867
|
-
zo as pluralize,
|
|
3868
|
-
Cn as r,
|
|
3869
|
-
Pe as re,
|
|
3870
|
-
Yo as renderDataAsList,
|
|
3871
|
-
Zt as un
|
|
3872
|
-
};
|