@versini/sassysaint 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{App.CILpzJEh.js → App.WT_JMB-P.js} +212 -213
- package/dist/chunks/LazyHeader.CDeNMEns.js +1280 -0
- package/dist/chunks/{LazyMarkdownWithExtra.BPTMdcU8.js → LazyMarkdownWithExtra.JlXLVBc-.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.IDa3mLgE.js → LazyMessageAssistant.Ct8xA2HE.js} +4 -4
- package/dist/chunks/{index.eFSALEqy.js → index.CJJY2C9o.js} +1116 -1085
- package/dist/chunks/{index.BcV6McvW.U50izDOU.js → index.DbAx5fhD.DTsRcXtK.js} +14 -14
- package/dist/chunks/{useLocalStorage.CsBq2ZMB.js → useLocalStorage.CzVJ5Eng.js} +13 -14
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +6 -6
- package/dist/chunks/LazyHeader.YhIHsK0M.js +0 -1288
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as l, jsxs as S, Fragment as me } from "react/jsx-runtime";
|
|
2
|
+
import W, { createContext as br, useReducer as vt, useRef as M, useCallback as q, useEffect as V, useContext as St, useSyncExternalStore as wr, useId as It, useMemo as At, useState as j, useLayoutEffect as Er, lazy as kt, Suspense as _t } from "react";
|
|
3
3
|
import f from "clsx";
|
|
4
|
-
var Tr = Object.defineProperty,
|
|
4
|
+
var Tr = Object.defineProperty, vr = (e, t, r) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ke = (e, t, r) => vr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
6
|
@versini/auth-provider v6.4.4
|
|
7
7
|
© 2024 gizmette.com
|
|
@@ -15,23 +15,23 @@ try {
|
|
|
15
15
|
});
|
|
16
16
|
} catch {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function L(e) {
|
|
19
19
|
const t = new Uint8Array(e);
|
|
20
20
|
let r = "";
|
|
21
|
-
for (const
|
|
22
|
-
r += String.fromCharCode(
|
|
21
|
+
for (const n of t)
|
|
22
|
+
r += String.fromCharCode(n);
|
|
23
23
|
return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
24
24
|
}
|
|
25
25
|
function ke(e) {
|
|
26
|
-
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4,
|
|
27
|
-
for (let i = 0; i <
|
|
28
|
-
s[i] =
|
|
26
|
+
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, n = t.padEnd(t.length + r, "="), a = atob(n), o = new ArrayBuffer(a.length), s = new Uint8Array(o);
|
|
27
|
+
for (let i = 0; i < a.length; i++)
|
|
28
|
+
s[i] = a.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
31
|
function Qe() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Rt(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
@@ -39,16 +39,16 @@ function _t(e) {
|
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Nt(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
45
|
let R = class extends Error {
|
|
46
|
-
constructor({ message: t, code: r, cause:
|
|
47
|
-
super(t, { cause:
|
|
46
|
+
constructor({ message: t, code: r, cause: n, name: a }) {
|
|
47
|
+
super(t, { cause: n }), this.name = a ?? n.name, this.code = r;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
51
|
-
var
|
|
50
|
+
function Sr({ error: e, options: t }) {
|
|
51
|
+
var n, a;
|
|
52
52
|
const { publicKey: r } = t;
|
|
53
53
|
if (!r)
|
|
54
54
|
throw Error("options was missing required publicKey property");
|
|
@@ -60,13 +60,13 @@ function vr({ error: e, options: t }) {
|
|
|
60
60
|
cause: e
|
|
61
61
|
});
|
|
62
62
|
} else if (e.name === "ConstraintError") {
|
|
63
|
-
if (((
|
|
63
|
+
if (((n = r.authenticatorSelection) == null ? void 0 : n.requireResidentKey) === !0)
|
|
64
64
|
return new R({
|
|
65
65
|
message: "Discoverable credentials were required but no available authenticator supported it",
|
|
66
66
|
code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
|
|
67
67
|
cause: e
|
|
68
68
|
});
|
|
69
|
-
if (((
|
|
69
|
+
if (((a = r.authenticatorSelection) == null ? void 0 : a.userVerification) === "required")
|
|
70
70
|
return new R({
|
|
71
71
|
message: "User verification was required but no available authenticator supported it",
|
|
72
72
|
code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
|
|
@@ -97,7 +97,7 @@ function vr({ error: e, options: t }) {
|
|
|
97
97
|
});
|
|
98
98
|
if (e.name === "SecurityError") {
|
|
99
99
|
const o = window.location.hostname;
|
|
100
|
-
if (
|
|
100
|
+
if (Nt(o)) {
|
|
101
101
|
if (r.rp.id !== o)
|
|
102
102
|
return new R({
|
|
103
103
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
@@ -141,7 +141,7 @@ class Ir {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const xt = new Ir(), Ar = ["cross-platform", "platform"];
|
|
145
145
|
function Ct(e) {
|
|
146
146
|
if (e && !(Ar.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
@@ -157,50 +157,50 @@ async function kr(e) {
|
|
|
157
157
|
...e.user,
|
|
158
158
|
id: ke(e.user.id)
|
|
159
159
|
},
|
|
160
|
-
excludeCredentials: (h = e.excludeCredentials) == null ? void 0 : h.map(
|
|
160
|
+
excludeCredentials: (h = e.excludeCredentials) == null ? void 0 : h.map(Rt)
|
|
161
161
|
} };
|
|
162
|
-
t.signal =
|
|
162
|
+
t.signal = xt.createNewAbortSignal();
|
|
163
163
|
let r;
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
|
-
} catch (
|
|
167
|
-
throw
|
|
166
|
+
} catch (u) {
|
|
167
|
+
throw Sr({ error: u, options: t });
|
|
168
168
|
}
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
171
|
-
const { id:
|
|
171
|
+
const { id: n, rawId: a, response: o, type: s } = r;
|
|
172
172
|
let i;
|
|
173
173
|
typeof o.getTransports == "function" && (i = o.getTransports());
|
|
174
|
-
let
|
|
174
|
+
let d;
|
|
175
175
|
if (typeof o.getPublicKeyAlgorithm == "function")
|
|
176
176
|
try {
|
|
177
|
-
|
|
178
|
-
} catch (
|
|
179
|
-
Ge("getPublicKeyAlgorithm()",
|
|
177
|
+
d = o.getPublicKeyAlgorithm();
|
|
178
|
+
} catch (u) {
|
|
179
|
+
Ge("getPublicKeyAlgorithm()", u);
|
|
180
180
|
}
|
|
181
181
|
let g;
|
|
182
182
|
if (typeof o.getPublicKey == "function")
|
|
183
183
|
try {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
} catch (
|
|
187
|
-
Ge("getPublicKey()",
|
|
184
|
+
const u = o.getPublicKey();
|
|
185
|
+
u !== null && (g = L(u));
|
|
186
|
+
} catch (u) {
|
|
187
|
+
Ge("getPublicKey()", u);
|
|
188
188
|
}
|
|
189
189
|
let p;
|
|
190
190
|
if (typeof o.getAuthenticatorData == "function")
|
|
191
191
|
try {
|
|
192
|
-
p =
|
|
193
|
-
} catch (
|
|
194
|
-
Ge("getAuthenticatorData()",
|
|
192
|
+
p = L(o.getAuthenticatorData());
|
|
193
|
+
} catch (u) {
|
|
194
|
+
Ge("getAuthenticatorData()", u);
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
197
|
-
id:
|
|
198
|
-
rawId:
|
|
197
|
+
id: n,
|
|
198
|
+
rawId: L(a),
|
|
199
199
|
response: {
|
|
200
|
-
attestationObject:
|
|
201
|
-
clientDataJSON:
|
|
200
|
+
attestationObject: L(o.attestationObject),
|
|
201
|
+
clientDataJSON: L(o.clientDataJSON),
|
|
202
202
|
transports: i,
|
|
203
|
-
publicKeyAlgorithm:
|
|
203
|
+
publicKeyAlgorithm: d,
|
|
204
204
|
publicKey: g,
|
|
205
205
|
authenticatorData: p
|
|
206
206
|
},
|
|
@@ -238,9 +238,9 @@ function Rr({ error: e, options: t }) {
|
|
|
238
238
|
cause: e
|
|
239
239
|
});
|
|
240
240
|
if (e.name === "SecurityError") {
|
|
241
|
-
const
|
|
242
|
-
if (
|
|
243
|
-
if (r.rpId !==
|
|
241
|
+
const n = window.location.hostname;
|
|
242
|
+
if (Nt(n)) {
|
|
243
|
+
if (r.rpId !== n)
|
|
244
244
|
return new R({
|
|
245
245
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
246
246
|
code: "ERROR_INVALID_RP_ID",
|
|
@@ -261,41 +261,41 @@ function Rr({ error: e, options: t }) {
|
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
263
|
async function Nr(e, t = !1) {
|
|
264
|
-
var h,
|
|
264
|
+
var h, u;
|
|
265
265
|
if (!Qe())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
267
267
|
let r;
|
|
268
|
-
((h = e.allowCredentials) == null ? void 0 : h.length) !== 0 && (r = (
|
|
269
|
-
const
|
|
268
|
+
((h = e.allowCredentials) == null ? void 0 : h.length) !== 0 && (r = (u = e.allowCredentials) == null ? void 0 : u.map(Rt));
|
|
269
|
+
const n = {
|
|
270
270
|
...e,
|
|
271
271
|
challenge: ke(e.challenge),
|
|
272
272
|
allowCredentials: r
|
|
273
|
-
},
|
|
273
|
+
}, a = {};
|
|
274
274
|
if (t) {
|
|
275
275
|
if (!await _r())
|
|
276
276
|
throw Error("Browser does not support WebAuthn autofill");
|
|
277
277
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
|
|
278
278
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
279
|
-
|
|
279
|
+
a.mediation = "conditional", n.allowCredentials = [];
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
a.publicKey = n, a.signal = xt.createNewAbortSignal();
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
|
-
o = await navigator.credentials.get(
|
|
284
|
+
o = await navigator.credentials.get(a);
|
|
285
285
|
} catch (c) {
|
|
286
|
-
throw Rr({ error: c, options:
|
|
286
|
+
throw Rr({ error: c, options: a });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
290
|
-
const { id: s, rawId: i, response:
|
|
290
|
+
const { id: s, rawId: i, response: d, type: g } = o;
|
|
291
291
|
let p;
|
|
292
|
-
return
|
|
292
|
+
return d.userHandle && (p = L(d.userHandle)), {
|
|
293
293
|
id: s,
|
|
294
|
-
rawId:
|
|
294
|
+
rawId: L(i),
|
|
295
295
|
response: {
|
|
296
|
-
authenticatorData:
|
|
297
|
-
clientDataJSON:
|
|
298
|
-
signature:
|
|
296
|
+
authenticatorData: L(d.authenticatorData),
|
|
297
|
+
clientDataJSON: L(d.clientDataJSON),
|
|
298
|
+
signature: L(d.signature),
|
|
299
299
|
userHandle: p
|
|
300
300
|
},
|
|
301
301
|
type: g,
|
|
@@ -316,14 +316,14 @@ try {
|
|
|
316
316
|
});
|
|
317
317
|
} catch {
|
|
318
318
|
}
|
|
319
|
-
const
|
|
319
|
+
const Q = {
|
|
320
320
|
ID_TOKEN: "id_token",
|
|
321
321
|
ACCESS_TOKEN: "token",
|
|
322
322
|
ID_AND_ACCESS_TOKEN: "id_token token",
|
|
323
323
|
CODE: "code",
|
|
324
324
|
REFRESH_TOKEN: "refresh_token",
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
|
-
},
|
|
326
|
+
}, Ot = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
328
|
}, N = {
|
|
329
329
|
ALG: "RS256",
|
|
@@ -336,7 +336,7 @@ const q = {
|
|
|
336
336
|
CREATED_AT_KEY: "iat",
|
|
337
337
|
SCOPES_KEY: "scopes",
|
|
338
338
|
ISSUER: "gizmette.com"
|
|
339
|
-
},
|
|
339
|
+
}, xr = `-----BEGIN PUBLIC KEY-----
|
|
340
340
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
341
341
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
342
342
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -344,22 +344,22 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
|
|
|
344
344
|
l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
|
|
345
345
|
sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
|
|
346
346
|
awIDAQAB
|
|
347
|
-
-----END PUBLIC KEY-----`,
|
|
347
|
+
-----END PUBLIC KEY-----`, Ce = {
|
|
348
348
|
AUTHENTICATE: "authenticate",
|
|
349
349
|
CODE: "code",
|
|
350
350
|
LOGOUT: "logout"
|
|
351
|
-
}, Oe = crypto,
|
|
352
|
-
function
|
|
353
|
-
const t = e.reduce((
|
|
354
|
-
let
|
|
355
|
-
for (const
|
|
356
|
-
r.set(
|
|
351
|
+
}, Oe = crypto, Pt = (e) => e instanceof CryptoKey, ge = new TextEncoder(), he = new TextDecoder();
|
|
352
|
+
function Cr(...e) {
|
|
353
|
+
const t = e.reduce((a, { length: o }) => a + o, 0), r = new Uint8Array(t);
|
|
354
|
+
let n = 0;
|
|
355
|
+
for (const a of e)
|
|
356
|
+
r.set(a, n), n += a.length;
|
|
357
357
|
return r;
|
|
358
358
|
}
|
|
359
359
|
const Or = (e) => {
|
|
360
360
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
361
|
-
for (let
|
|
362
|
-
r[
|
|
361
|
+
for (let n = 0; n < t.length; n++)
|
|
362
|
+
r[n] = t.charCodeAt(n);
|
|
363
363
|
return r;
|
|
364
364
|
}, de = (e) => {
|
|
365
365
|
let t = e;
|
|
@@ -378,19 +378,19 @@ let X = class extends Error {
|
|
|
378
378
|
var r;
|
|
379
379
|
super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
|
|
380
380
|
}
|
|
381
|
-
},
|
|
381
|
+
}, $ = class extends X {
|
|
382
382
|
static get code() {
|
|
383
383
|
return "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
384
384
|
}
|
|
385
|
-
constructor(t, r,
|
|
386
|
-
super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim =
|
|
385
|
+
constructor(t, r, n = "unspecified", a = "unspecified") {
|
|
386
|
+
super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = n, this.reason = a, this.payload = r;
|
|
387
387
|
}
|
|
388
|
-
},
|
|
388
|
+
}, at = class extends X {
|
|
389
389
|
static get code() {
|
|
390
390
|
return "ERR_JWT_EXPIRED";
|
|
391
391
|
}
|
|
392
|
-
constructor(e, t, r = "unspecified",
|
|
393
|
-
super(e), this.code = "ERR_JWT_EXPIRED", this.claim = r, this.reason =
|
|
392
|
+
constructor(e, t, r = "unspecified", n = "unspecified") {
|
|
393
|
+
super(e), this.code = "ERR_JWT_EXPIRED", this.claim = r, this.reason = n, this.payload = t;
|
|
394
394
|
}
|
|
395
395
|
};
|
|
396
396
|
class Pr extends X {
|
|
@@ -401,7 +401,7 @@ class Pr extends X {
|
|
|
401
401
|
return "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
let
|
|
404
|
+
let z = class extends X {
|
|
405
405
|
constructor() {
|
|
406
406
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
407
407
|
}
|
|
@@ -415,7 +415,7 @@ let J = class extends X {
|
|
|
415
415
|
static get code() {
|
|
416
416
|
return "ERR_JWS_INVALID";
|
|
417
417
|
}
|
|
418
|
-
},
|
|
418
|
+
}, B = class extends X {
|
|
419
419
|
constructor() {
|
|
420
420
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
421
421
|
}
|
|
@@ -431,7 +431,7 @@ class Dr extends X {
|
|
|
431
431
|
return "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function G(e, t = "algorithm.name") {
|
|
435
435
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
436
436
|
}
|
|
437
437
|
function fe(e, t) {
|
|
@@ -452,92 +452,92 @@ function $r(e) {
|
|
|
452
452
|
throw new Error("unreachable");
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Lr(e, t) {
|
|
456
456
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
457
457
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
458
458
|
if (t.length > 2) {
|
|
459
|
-
const
|
|
460
|
-
r += `one of ${t.join(", ")}, or ${
|
|
459
|
+
const n = t.pop();
|
|
460
|
+
r += `one of ${t.join(", ")}, or ${n}.`;
|
|
461
461
|
} else t.length === 2 ? r += `one of ${t[0]} or ${t[1]}.` : r += `${t[0]}.`;
|
|
462
462
|
throw new TypeError(r);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function Mr(e, t, ...r) {
|
|
466
466
|
switch (t) {
|
|
467
467
|
case "HS256":
|
|
468
468
|
case "HS384":
|
|
469
469
|
case "HS512": {
|
|
470
470
|
if (!fe(e.algorithm, "HMAC"))
|
|
471
|
-
throw
|
|
472
|
-
const
|
|
473
|
-
if (Be(e.algorithm.hash) !==
|
|
474
|
-
throw
|
|
471
|
+
throw G("HMAC");
|
|
472
|
+
const n = parseInt(t.slice(2), 10);
|
|
473
|
+
if (Be(e.algorithm.hash) !== n)
|
|
474
|
+
throw G(`SHA-${n}`, "algorithm.hash");
|
|
475
475
|
break;
|
|
476
476
|
}
|
|
477
477
|
case "RS256":
|
|
478
478
|
case "RS384":
|
|
479
479
|
case "RS512": {
|
|
480
480
|
if (!fe(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
481
|
-
throw
|
|
482
|
-
const
|
|
483
|
-
if (Be(e.algorithm.hash) !==
|
|
484
|
-
throw
|
|
481
|
+
throw G("RSASSA-PKCS1-v1_5");
|
|
482
|
+
const n = parseInt(t.slice(2), 10);
|
|
483
|
+
if (Be(e.algorithm.hash) !== n)
|
|
484
|
+
throw G(`SHA-${n}`, "algorithm.hash");
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
case "PS256":
|
|
488
488
|
case "PS384":
|
|
489
489
|
case "PS512": {
|
|
490
490
|
if (!fe(e.algorithm, "RSA-PSS"))
|
|
491
|
-
throw
|
|
492
|
-
const
|
|
493
|
-
if (Be(e.algorithm.hash) !==
|
|
494
|
-
throw
|
|
491
|
+
throw G("RSA-PSS");
|
|
492
|
+
const n = parseInt(t.slice(2), 10);
|
|
493
|
+
if (Be(e.algorithm.hash) !== n)
|
|
494
|
+
throw G(`SHA-${n}`, "algorithm.hash");
|
|
495
495
|
break;
|
|
496
496
|
}
|
|
497
497
|
case "EdDSA": {
|
|
498
498
|
if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
|
|
499
|
-
throw
|
|
499
|
+
throw G("Ed25519 or Ed448");
|
|
500
500
|
break;
|
|
501
501
|
}
|
|
502
502
|
case "ES256":
|
|
503
503
|
case "ES384":
|
|
504
504
|
case "ES512": {
|
|
505
505
|
if (!fe(e.algorithm, "ECDSA"))
|
|
506
|
-
throw
|
|
507
|
-
const
|
|
508
|
-
if (e.algorithm.namedCurve !==
|
|
509
|
-
throw
|
|
506
|
+
throw G("ECDSA");
|
|
507
|
+
const n = $r(t);
|
|
508
|
+
if (e.algorithm.namedCurve !== n)
|
|
509
|
+
throw G(n, "algorithm.namedCurve");
|
|
510
510
|
break;
|
|
511
511
|
}
|
|
512
512
|
default:
|
|
513
513
|
throw new TypeError("CryptoKey does not support this operation");
|
|
514
514
|
}
|
|
515
|
-
|
|
515
|
+
Lr(e, r);
|
|
516
516
|
}
|
|
517
|
-
function
|
|
518
|
-
var
|
|
517
|
+
function Dt(e, t, ...r) {
|
|
518
|
+
var n;
|
|
519
519
|
if (r.length > 2) {
|
|
520
|
-
const
|
|
521
|
-
e += `one of type ${r.join(", ")}, or ${
|
|
520
|
+
const a = r.pop();
|
|
521
|
+
e += `one of type ${r.join(", ")}, or ${a}.`;
|
|
522
522
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
523
|
-
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (
|
|
523
|
+
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (n = t.constructor) != null && n.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
524
524
|
}
|
|
525
|
-
const ot = (e, ...t) =>
|
|
526
|
-
function
|
|
527
|
-
return
|
|
525
|
+
const ot = (e, ...t) => Dt("Key must be ", e, ...t);
|
|
526
|
+
function $t(e, t, ...r) {
|
|
527
|
+
return Dt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
528
528
|
}
|
|
529
|
-
const
|
|
529
|
+
const Lt = (e) => Pt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", _e = ["CryptoKey"], Ur = (...e) => {
|
|
530
530
|
const t = e.filter(Boolean);
|
|
531
531
|
if (t.length === 0 || t.length === 1)
|
|
532
532
|
return !0;
|
|
533
533
|
let r;
|
|
534
|
-
for (const
|
|
535
|
-
const
|
|
534
|
+
for (const n of t) {
|
|
535
|
+
const a = Object.keys(n);
|
|
536
536
|
if (!r || r.size === 0) {
|
|
537
|
-
r = new Set(
|
|
537
|
+
r = new Set(a);
|
|
538
538
|
continue;
|
|
539
539
|
}
|
|
540
|
-
for (const o of
|
|
540
|
+
for (const o of a) {
|
|
541
541
|
if (r.has(o))
|
|
542
542
|
return !1;
|
|
543
543
|
r.add(o);
|
|
@@ -590,7 +590,7 @@ function Gr(e) {
|
|
|
590
590
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
591
591
|
break;
|
|
592
592
|
default:
|
|
593
|
-
throw new
|
|
593
|
+
throw new z('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
594
594
|
}
|
|
595
595
|
break;
|
|
596
596
|
}
|
|
@@ -612,7 +612,7 @@ function Gr(e) {
|
|
|
612
612
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
613
613
|
break;
|
|
614
614
|
default:
|
|
615
|
-
throw new
|
|
615
|
+
throw new z('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
616
616
|
}
|
|
617
617
|
break;
|
|
618
618
|
}
|
|
@@ -628,83 +628,83 @@ function Gr(e) {
|
|
|
628
628
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
629
629
|
break;
|
|
630
630
|
default:
|
|
631
|
-
throw new
|
|
631
|
+
throw new z('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
632
632
|
}
|
|
633
633
|
break;
|
|
634
634
|
}
|
|
635
635
|
default:
|
|
636
|
-
throw new
|
|
636
|
+
throw new z('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
637
637
|
}
|
|
638
638
|
return { algorithm: t, keyUsages: r };
|
|
639
639
|
}
|
|
640
640
|
const Br = async (e) => {
|
|
641
641
|
if (!e.alg)
|
|
642
642
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
643
|
-
const { algorithm: t, keyUsages: r } = Gr(e),
|
|
643
|
+
const { algorithm: t, keyUsages: r } = Gr(e), n = [
|
|
644
644
|
t,
|
|
645
645
|
e.ext ?? !1,
|
|
646
646
|
e.key_ops ?? r
|
|
647
|
-
],
|
|
648
|
-
return delete
|
|
647
|
+
], a = { ...e };
|
|
648
|
+
return delete a.alg, delete a.use, Oe.subtle.importKey("jwk", a, ...n);
|
|
649
649
|
}, Mt = (e) => de(e);
|
|
650
650
|
let We, Ve;
|
|
651
|
-
const
|
|
652
|
-
let
|
|
653
|
-
if (
|
|
654
|
-
return n
|
|
655
|
-
const o = await Br({ ...r, alg:
|
|
656
|
-
return
|
|
651
|
+
const Ut = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ht = async (e, t, r, n) => {
|
|
652
|
+
let a = e.get(t);
|
|
653
|
+
if (a != null && a[n])
|
|
654
|
+
return a[n];
|
|
655
|
+
const o = await Br({ ...r, alg: n });
|
|
656
|
+
return a ? a[n] = o : e.set(t, { [n]: o }), o;
|
|
657
657
|
}, Wr = (e, t) => {
|
|
658
|
-
if (
|
|
658
|
+
if (Ut(e)) {
|
|
659
659
|
let r = e.export({ format: "jwk" });
|
|
660
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Mt(r.k) : (Ve || (Ve = /* @__PURE__ */ new WeakMap()),
|
|
660
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Mt(r.k) : (Ve || (Ve = /* @__PURE__ */ new WeakMap()), Ht(Ve, e, r, t));
|
|
661
661
|
}
|
|
662
662
|
return e;
|
|
663
663
|
}, Vr = (e, t) => {
|
|
664
|
-
if (
|
|
664
|
+
if (Ut(e)) {
|
|
665
665
|
let r = e.export({ format: "jwk" });
|
|
666
|
-
return r.k ? Mt(r.k) : (We || (We = /* @__PURE__ */ new WeakMap()),
|
|
666
|
+
return r.k ? Mt(r.k) : (We || (We = /* @__PURE__ */ new WeakMap()), Ht(We, e, r, t));
|
|
667
667
|
}
|
|
668
668
|
return e;
|
|
669
|
-
}, Fr = { normalizePublicKey: Wr, normalizePrivateKey: Vr },
|
|
669
|
+
}, Fr = { normalizePublicKey: Wr, normalizePrivateKey: Vr }, Y = (e, t, r = 0) => {
|
|
670
670
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
671
|
-
const
|
|
672
|
-
if (
|
|
671
|
+
const n = e.indexOf(t[0], r);
|
|
672
|
+
if (n === -1)
|
|
673
673
|
return !1;
|
|
674
|
-
const
|
|
675
|
-
return
|
|
674
|
+
const a = e.subarray(n, n + t.length);
|
|
675
|
+
return a.length !== t.length ? !1 : a.every((o, s) => o === t[s]) || Y(e, t, n + 1);
|
|
676
676
|
}, st = (e) => {
|
|
677
677
|
switch (!0) {
|
|
678
|
-
case
|
|
678
|
+
case Y(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
679
679
|
return "P-256";
|
|
680
|
-
case
|
|
680
|
+
case Y(e, [43, 129, 4, 0, 34]):
|
|
681
681
|
return "P-384";
|
|
682
|
-
case
|
|
682
|
+
case Y(e, [43, 129, 4, 0, 35]):
|
|
683
683
|
return "P-521";
|
|
684
|
-
case
|
|
684
|
+
case Y(e, [43, 101, 110]):
|
|
685
685
|
return "X25519";
|
|
686
|
-
case
|
|
686
|
+
case Y(e, [43, 101, 111]):
|
|
687
687
|
return "X448";
|
|
688
|
-
case
|
|
688
|
+
case Y(e, [43, 101, 112]):
|
|
689
689
|
return "Ed25519";
|
|
690
|
-
case
|
|
690
|
+
case Y(e, [43, 101, 113]):
|
|
691
691
|
return "Ed448";
|
|
692
692
|
default:
|
|
693
|
-
throw new
|
|
693
|
+
throw new z("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
694
694
|
}
|
|
695
|
-
}, Jr = async (e, t, r,
|
|
695
|
+
}, Jr = async (e, t, r, n, a) => {
|
|
696
696
|
let o, s;
|
|
697
|
-
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((
|
|
698
|
-
switch (
|
|
697
|
+
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((d) => d.charCodeAt(0)));
|
|
698
|
+
switch (n) {
|
|
699
699
|
case "PS256":
|
|
700
700
|
case "PS384":
|
|
701
701
|
case "PS512":
|
|
702
|
-
o = { name: "RSA-PSS", hash: `SHA-${
|
|
702
|
+
o = { name: "RSA-PSS", hash: `SHA-${n.slice(-3)}` }, s = ["verify"];
|
|
703
703
|
break;
|
|
704
704
|
case "RS256":
|
|
705
705
|
case "RS384":
|
|
706
706
|
case "RS512":
|
|
707
|
-
o = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${
|
|
707
|
+
o = { name: "RSASSA-PKCS1-v1_5", hash: `SHA-${n.slice(-3)}` }, s = ["verify"];
|
|
708
708
|
break;
|
|
709
709
|
case "RSA-OAEP":
|
|
710
710
|
case "RSA-OAEP-256":
|
|
@@ -712,7 +712,7 @@ const Lt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
712
712
|
case "RSA-OAEP-512":
|
|
713
713
|
o = {
|
|
714
714
|
name: "RSA-OAEP",
|
|
715
|
-
hash: `SHA-${parseInt(
|
|
715
|
+
hash: `SHA-${parseInt(n.slice(-3), 10) || 1}`
|
|
716
716
|
}, s = ["encrypt", "wrapKey"];
|
|
717
717
|
break;
|
|
718
718
|
case "ES256":
|
|
@@ -728,15 +728,15 @@ const Lt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
728
728
|
case "ECDH-ES+A128KW":
|
|
729
729
|
case "ECDH-ES+A192KW":
|
|
730
730
|
case "ECDH-ES+A256KW": {
|
|
731
|
-
const
|
|
732
|
-
o =
|
|
731
|
+
const d = st(i);
|
|
732
|
+
o = d.startsWith("P-") ? { name: "ECDH", namedCurve: d } : { name: d }, s = [];
|
|
733
733
|
break;
|
|
734
734
|
}
|
|
735
735
|
case "EdDSA":
|
|
736
736
|
o = { name: st(i) }, s = ["verify"];
|
|
737
737
|
break;
|
|
738
738
|
default:
|
|
739
|
-
throw new
|
|
739
|
+
throw new z('Invalid or unsupported "alg" (Algorithm) value');
|
|
740
740
|
}
|
|
741
741
|
return Oe.subtle.importKey(t, i, o, !1, s);
|
|
742
742
|
}, Yr = (e, t, r) => Jr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
@@ -747,14 +747,14 @@ async function jr(e, t, r) {
|
|
|
747
747
|
}
|
|
748
748
|
const Ie = (e) => e == null ? void 0 : e[Symbol.toStringTag], zr = (e, t) => {
|
|
749
749
|
if (!(t instanceof Uint8Array)) {
|
|
750
|
-
if (
|
|
751
|
-
throw new TypeError(
|
|
750
|
+
if (!Lt(t))
|
|
751
|
+
throw new TypeError($t(e, t, ..._e, "Uint8Array"));
|
|
752
752
|
if (t.type !== "secret")
|
|
753
753
|
throw new TypeError(`${Ie(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
754
754
|
}
|
|
755
755
|
}, qr = (e, t, r) => {
|
|
756
|
-
if (
|
|
757
|
-
throw new TypeError(
|
|
756
|
+
if (!Lt(t))
|
|
757
|
+
throw new TypeError($t(e, t, ..._e));
|
|
758
758
|
if (t.type === "secret")
|
|
759
759
|
throw new TypeError(`${Ie(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
760
760
|
if (t.algorithm && r === "verify" && t.type === "private")
|
|
@@ -764,24 +764,24 @@ const Ie = (e) => e == null ? void 0 : e[Symbol.toStringTag], zr = (e, t) => {
|
|
|
764
764
|
}, Qr = (e, t, r) => {
|
|
765
765
|
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? zr(e, t) : qr(e, t, r);
|
|
766
766
|
};
|
|
767
|
-
function Xr(e, t, r,
|
|
768
|
-
if (
|
|
767
|
+
function Xr(e, t, r, n, a) {
|
|
768
|
+
if (a.crit !== void 0 && (n == null ? void 0 : n.crit) === void 0)
|
|
769
769
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
770
|
-
if (!
|
|
770
|
+
if (!n || n.crit === void 0)
|
|
771
771
|
return /* @__PURE__ */ new Set();
|
|
772
|
-
if (!Array.isArray(
|
|
772
|
+
if (!Array.isArray(n.crit) || n.crit.length === 0 || n.crit.some((s) => typeof s != "string" || s.length === 0))
|
|
773
773
|
throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
|
|
774
774
|
let o;
|
|
775
775
|
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
776
|
-
for (const s of
|
|
776
|
+
for (const s of n.crit) {
|
|
777
777
|
if (!o.has(s))
|
|
778
|
-
throw new
|
|
779
|
-
if (
|
|
778
|
+
throw new z(`Extension Header Parameter "${s}" is not recognized`);
|
|
779
|
+
if (a[s] === void 0)
|
|
780
780
|
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
781
|
-
if (o.get(s) &&
|
|
781
|
+
if (o.get(s) && n[s] === void 0)
|
|
782
782
|
throw new e(`Extension Header Parameter "${s}" MUST be integrity protected`);
|
|
783
783
|
}
|
|
784
|
-
return new Set(
|
|
784
|
+
return new Set(n.crit);
|
|
785
785
|
}
|
|
786
786
|
const Zr = (e, t) => {
|
|
787
787
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
@@ -789,7 +789,7 @@ const Zr = (e, t) => {
|
|
|
789
789
|
if (t)
|
|
790
790
|
return new Set(t);
|
|
791
791
|
};
|
|
792
|
-
function
|
|
792
|
+
function en(e, t) {
|
|
793
793
|
const r = `SHA-${e.slice(-3)}`;
|
|
794
794
|
switch (e) {
|
|
795
795
|
case "HS256":
|
|
@@ -811,12 +811,12 @@ function ea(e, t) {
|
|
|
811
811
|
case "EdDSA":
|
|
812
812
|
return { name: t.name };
|
|
813
813
|
default:
|
|
814
|
-
throw new
|
|
814
|
+
throw new z(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
async function
|
|
818
|
-
if (t = await Fr.normalizePublicKey(t, e),
|
|
819
|
-
return
|
|
817
|
+
async function tn(e, t, r) {
|
|
818
|
+
if (t = await Fr.normalizePublicKey(t, e), Pt(t))
|
|
819
|
+
return Mr(t, e, r), t;
|
|
820
820
|
if (t instanceof Uint8Array) {
|
|
821
821
|
if (!e.startsWith("HS"))
|
|
822
822
|
throw new TypeError(ot(t, ..._e));
|
|
@@ -824,17 +824,17 @@ async function ta(e, t, r) {
|
|
|
824
824
|
}
|
|
825
825
|
throw new TypeError(ot(t, ..._e, "Uint8Array"));
|
|
826
826
|
}
|
|
827
|
-
const
|
|
828
|
-
const
|
|
829
|
-
Kr(e,
|
|
830
|
-
const o =
|
|
827
|
+
const rn = async (e, t, r, n) => {
|
|
828
|
+
const a = await tn(e, t, "verify");
|
|
829
|
+
Kr(e, a);
|
|
830
|
+
const o = en(e, a.algorithm);
|
|
831
831
|
try {
|
|
832
|
-
return await Oe.subtle.verify(o,
|
|
832
|
+
return await Oe.subtle.verify(o, a, r, n);
|
|
833
833
|
} catch {
|
|
834
834
|
return !1;
|
|
835
835
|
}
|
|
836
836
|
};
|
|
837
|
-
async function
|
|
837
|
+
async function nn(e, t, r) {
|
|
838
838
|
if (!Re(e))
|
|
839
839
|
throw new k("Flattened JWS must be an object");
|
|
840
840
|
if (e.protected === void 0 && e.header === void 0)
|
|
@@ -847,28 +847,28 @@ async function aa(e, t, r) {
|
|
|
847
847
|
throw new k("JWS Signature missing or incorrect type");
|
|
848
848
|
if (e.header !== void 0 && !Re(e.header))
|
|
849
849
|
throw new k("JWS Unprotected Header incorrect type");
|
|
850
|
-
let
|
|
850
|
+
let n = {};
|
|
851
851
|
if (e.protected)
|
|
852
852
|
try {
|
|
853
853
|
const m = de(e.protected);
|
|
854
|
-
|
|
854
|
+
n = JSON.parse(he.decode(m));
|
|
855
855
|
} catch {
|
|
856
856
|
throw new k("JWS Protected Header is invalid");
|
|
857
857
|
}
|
|
858
|
-
if (!Ur(
|
|
858
|
+
if (!Ur(n, e.header))
|
|
859
859
|
throw new k("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
860
|
-
const
|
|
861
|
-
...
|
|
860
|
+
const a = {
|
|
861
|
+
...n,
|
|
862
862
|
...e.header
|
|
863
|
-
}, o = Xr(k, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit,
|
|
863
|
+
}, o = Xr(k, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, n, a);
|
|
864
864
|
let s = !0;
|
|
865
|
-
if (o.has("b64") && (s =
|
|
865
|
+
if (o.has("b64") && (s = n.b64, typeof s != "boolean"))
|
|
866
866
|
throw new k('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
867
|
-
const { alg: i } =
|
|
867
|
+
const { alg: i } = a;
|
|
868
868
|
if (typeof i != "string" || !i)
|
|
869
869
|
throw new k('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
870
|
-
const
|
|
871
|
-
if (
|
|
870
|
+
const d = r && Zr("algorithms", r.algorithms);
|
|
871
|
+
if (d && !d.has(i))
|
|
872
872
|
throw new Pr('"alg" (Algorithm) Header Parameter value not allowed');
|
|
873
873
|
if (s) {
|
|
874
874
|
if (typeof e.payload != "string")
|
|
@@ -876,101 +876,101 @@ async function aa(e, t, r) {
|
|
|
876
876
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
877
877
|
throw new k("JWS Payload must be a string or an Uint8Array instance");
|
|
878
878
|
let g = !1;
|
|
879
|
-
typeof t == "function" && (t = await t(
|
|
880
|
-
const p =
|
|
879
|
+
typeof t == "function" && (t = await t(n, e), g = !0), Qr(i, t, "verify");
|
|
880
|
+
const p = Cr(ge.encode(e.protected ?? ""), ge.encode("."), typeof e.payload == "string" ? ge.encode(e.payload) : e.payload);
|
|
881
881
|
let h;
|
|
882
882
|
try {
|
|
883
883
|
h = de(e.signature);
|
|
884
884
|
} catch {
|
|
885
885
|
throw new k("Failed to base64url decode the signature");
|
|
886
886
|
}
|
|
887
|
-
if (!await
|
|
887
|
+
if (!await rn(i, t, h, p))
|
|
888
888
|
throw new Dr();
|
|
889
|
-
let
|
|
889
|
+
let u;
|
|
890
890
|
if (s)
|
|
891
891
|
try {
|
|
892
|
-
|
|
892
|
+
u = de(e.payload);
|
|
893
893
|
} catch {
|
|
894
894
|
throw new k("Failed to base64url decode the payload");
|
|
895
895
|
}
|
|
896
|
-
else typeof e.payload == "string" ?
|
|
897
|
-
const c = { payload:
|
|
898
|
-
return e.protected !== void 0 && (c.protectedHeader =
|
|
896
|
+
else typeof e.payload == "string" ? u = ge.encode(e.payload) : u = e.payload;
|
|
897
|
+
const c = { payload: u };
|
|
898
|
+
return e.protected !== void 0 && (c.protectedHeader = n), e.header !== void 0 && (c.unprotectedHeader = e.header), g ? { ...c, key: t } : c;
|
|
899
899
|
}
|
|
900
|
-
async function
|
|
900
|
+
async function an(e, t, r) {
|
|
901
901
|
if (e instanceof Uint8Array && (e = he.decode(e)), typeof e != "string")
|
|
902
902
|
throw new k("Compact JWS must be a string or Uint8Array");
|
|
903
|
-
const { 0:
|
|
903
|
+
const { 0: n, 1: a, 2: o, length: s } = e.split(".");
|
|
904
904
|
if (s !== 3)
|
|
905
905
|
throw new k("Invalid Compact JWS");
|
|
906
|
-
const i = await
|
|
907
|
-
return typeof t == "function" ? { ...
|
|
906
|
+
const i = await nn({ payload: a, protected: n, signature: o }, t, r), d = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
907
|
+
return typeof t == "function" ? { ...d, key: i.key } : d;
|
|
908
908
|
}
|
|
909
|
-
const
|
|
910
|
-
const t =
|
|
909
|
+
const on = (e) => Math.floor(e.getTime() / 1e3), Kt = 60, Gt = Kt * 60, Xe = Gt * 24, sn = Xe * 7, cn = Xe * 365.25, ln = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, it = (e) => {
|
|
910
|
+
const t = ln.exec(e);
|
|
911
911
|
if (!t || t[4] && t[1])
|
|
912
912
|
throw new TypeError("Invalid time period format");
|
|
913
|
-
const r = parseFloat(t[2]),
|
|
914
|
-
let
|
|
915
|
-
switch (
|
|
913
|
+
const r = parseFloat(t[2]), n = t[3].toLowerCase();
|
|
914
|
+
let a;
|
|
915
|
+
switch (n) {
|
|
916
916
|
case "sec":
|
|
917
917
|
case "secs":
|
|
918
918
|
case "second":
|
|
919
919
|
case "seconds":
|
|
920
920
|
case "s":
|
|
921
|
-
|
|
921
|
+
a = Math.round(r);
|
|
922
922
|
break;
|
|
923
923
|
case "minute":
|
|
924
924
|
case "minutes":
|
|
925
925
|
case "min":
|
|
926
926
|
case "mins":
|
|
927
927
|
case "m":
|
|
928
|
-
|
|
928
|
+
a = Math.round(r * Kt);
|
|
929
929
|
break;
|
|
930
930
|
case "hour":
|
|
931
931
|
case "hours":
|
|
932
932
|
case "hr":
|
|
933
933
|
case "hrs":
|
|
934
934
|
case "h":
|
|
935
|
-
|
|
935
|
+
a = Math.round(r * Gt);
|
|
936
936
|
break;
|
|
937
937
|
case "day":
|
|
938
938
|
case "days":
|
|
939
939
|
case "d":
|
|
940
|
-
|
|
940
|
+
a = Math.round(r * Xe);
|
|
941
941
|
break;
|
|
942
942
|
case "week":
|
|
943
943
|
case "weeks":
|
|
944
944
|
case "w":
|
|
945
|
-
|
|
945
|
+
a = Math.round(r * sn);
|
|
946
946
|
break;
|
|
947
947
|
default:
|
|
948
|
-
|
|
948
|
+
a = Math.round(r * cn);
|
|
949
949
|
break;
|
|
950
950
|
}
|
|
951
|
-
return t[1] === "-" || t[4] === "ago" ? -
|
|
952
|
-
}, ct = (e) => e.toLowerCase().replace(/^application\//, ""),
|
|
953
|
-
let
|
|
951
|
+
return t[1] === "-" || t[4] === "ago" ? -a : a;
|
|
952
|
+
}, ct = (e) => e.toLowerCase().replace(/^application\//, ""), dn = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, un = (e, t, r = {}) => {
|
|
953
|
+
let n;
|
|
954
954
|
try {
|
|
955
|
-
|
|
955
|
+
n = JSON.parse(he.decode(t));
|
|
956
956
|
} catch {
|
|
957
957
|
}
|
|
958
|
-
if (!Re(
|
|
959
|
-
throw new
|
|
960
|
-
const { typ:
|
|
961
|
-
if (
|
|
962
|
-
throw new
|
|
963
|
-
const { requiredClaims: o = [], issuer: s, subject: i, audience:
|
|
964
|
-
g !== void 0 && p.push("iat"),
|
|
958
|
+
if (!Re(n))
|
|
959
|
+
throw new B("JWT Claims Set must be a top-level JSON object");
|
|
960
|
+
const { typ: a } = r;
|
|
961
|
+
if (a && (typeof e.typ != "string" || ct(e.typ) !== ct(a)))
|
|
962
|
+
throw new $('unexpected "typ" JWT header value', n, "typ", "check_failed");
|
|
963
|
+
const { requiredClaims: o = [], issuer: s, subject: i, audience: d, maxTokenAge: g } = r, p = [...o];
|
|
964
|
+
g !== void 0 && p.push("iat"), d !== void 0 && p.push("aud"), i !== void 0 && p.push("sub"), s !== void 0 && p.push("iss");
|
|
965
965
|
for (const m of new Set(p.reverse()))
|
|
966
|
-
if (!(m in
|
|
967
|
-
throw new
|
|
968
|
-
if (s && !(Array.isArray(s) ? s : [s]).includes(
|
|
969
|
-
throw new
|
|
970
|
-
if (i &&
|
|
971
|
-
throw new
|
|
972
|
-
if (
|
|
973
|
-
throw new
|
|
966
|
+
if (!(m in n))
|
|
967
|
+
throw new $(`missing required "${m}" claim`, n, m, "missing");
|
|
968
|
+
if (s && !(Array.isArray(s) ? s : [s]).includes(n.iss))
|
|
969
|
+
throw new $('unexpected "iss" claim value', n, "iss", "check_failed");
|
|
970
|
+
if (i && n.sub !== i)
|
|
971
|
+
throw new $('unexpected "sub" claim value', n, "sub", "check_failed");
|
|
972
|
+
if (d && !dn(n.aud, typeof d == "string" ? [d] : d))
|
|
973
|
+
throw new $('unexpected "aud" claim value', n, "aud", "check_failed");
|
|
974
974
|
let h;
|
|
975
975
|
switch (typeof r.clockTolerance) {
|
|
976
976
|
case "string":
|
|
@@ -985,77 +985,77 @@ const oa = (e) => Math.floor(e.getTime() / 1e3), Ht = 60, Kt = Ht * 60, Xe = Kt
|
|
|
985
985
|
default:
|
|
986
986
|
throw new TypeError("Invalid clockTolerance option type");
|
|
987
987
|
}
|
|
988
|
-
const { currentDate:
|
|
989
|
-
if ((
|
|
990
|
-
throw new
|
|
991
|
-
if (
|
|
992
|
-
if (typeof
|
|
993
|
-
throw new
|
|
994
|
-
if (
|
|
995
|
-
throw new
|
|
996
|
-
}
|
|
997
|
-
if (
|
|
998
|
-
if (typeof
|
|
999
|
-
throw new
|
|
1000
|
-
if (
|
|
1001
|
-
throw new
|
|
988
|
+
const { currentDate: u } = r, c = on(u || /* @__PURE__ */ new Date());
|
|
989
|
+
if ((n.iat !== void 0 || g) && typeof n.iat != "number")
|
|
990
|
+
throw new $('"iat" claim must be a number', n, "iat", "invalid");
|
|
991
|
+
if (n.nbf !== void 0) {
|
|
992
|
+
if (typeof n.nbf != "number")
|
|
993
|
+
throw new $('"nbf" claim must be a number', n, "nbf", "invalid");
|
|
994
|
+
if (n.nbf > c + h)
|
|
995
|
+
throw new $('"nbf" claim timestamp check failed', n, "nbf", "check_failed");
|
|
996
|
+
}
|
|
997
|
+
if (n.exp !== void 0) {
|
|
998
|
+
if (typeof n.exp != "number")
|
|
999
|
+
throw new $('"exp" claim must be a number', n, "exp", "invalid");
|
|
1000
|
+
if (n.exp <= c - h)
|
|
1001
|
+
throw new at('"exp" claim timestamp check failed', n, "exp", "check_failed");
|
|
1002
1002
|
}
|
|
1003
1003
|
if (g) {
|
|
1004
|
-
const m = c -
|
|
1004
|
+
const m = c - n.iat, b = typeof g == "number" ? g : it(g);
|
|
1005
1005
|
if (m - h > b)
|
|
1006
|
-
throw new
|
|
1006
|
+
throw new at('"iat" claim timestamp check failed (too far in the past)', n, "iat", "check_failed");
|
|
1007
1007
|
if (m < 0 - h)
|
|
1008
|
-
throw new
|
|
1008
|
+
throw new $('"iat" claim timestamp check failed (it should be in the past)', n, "iat", "check_failed");
|
|
1009
1009
|
}
|
|
1010
|
-
return
|
|
1010
|
+
return n;
|
|
1011
1011
|
};
|
|
1012
|
-
async function
|
|
1013
|
-
var
|
|
1014
|
-
const
|
|
1015
|
-
if ((
|
|
1016
|
-
throw new
|
|
1017
|
-
const o = { payload:
|
|
1018
|
-
return typeof t == "function" ? { ...o, key:
|
|
1019
|
-
}
|
|
1020
|
-
const
|
|
1021
|
-
function
|
|
1012
|
+
async function mn(e, t, r) {
|
|
1013
|
+
var n;
|
|
1014
|
+
const a = await an(e, t, r);
|
|
1015
|
+
if ((n = a.protectedHeader.crit) != null && n.includes("b64") && a.protectedHeader.b64 === !1)
|
|
1016
|
+
throw new B("JWTs MUST NOT use unencoded payload");
|
|
1017
|
+
const o = { payload: un(a.protectedHeader, a.payload, r), protectedHeader: a.protectedHeader };
|
|
1018
|
+
return typeof t == "function" ? { ...o, key: a.key } : o;
|
|
1019
|
+
}
|
|
1020
|
+
const hn = de;
|
|
1021
|
+
function pn(e) {
|
|
1022
1022
|
if (typeof e != "string")
|
|
1023
|
-
throw new
|
|
1023
|
+
throw new B("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1024
1024
|
const { 1: t, length: r } = e.split(".");
|
|
1025
1025
|
if (r === 5)
|
|
1026
|
-
throw new
|
|
1026
|
+
throw new B("Only JWTs using Compact JWS serialization can be decoded");
|
|
1027
1027
|
if (r !== 3)
|
|
1028
|
-
throw new
|
|
1028
|
+
throw new B("Invalid JWT");
|
|
1029
1029
|
if (!t)
|
|
1030
|
-
throw new
|
|
1031
|
-
let
|
|
1030
|
+
throw new B("JWTs must contain a payload");
|
|
1031
|
+
let n;
|
|
1032
1032
|
try {
|
|
1033
|
-
|
|
1033
|
+
n = hn(t);
|
|
1034
1034
|
} catch {
|
|
1035
|
-
throw new
|
|
1035
|
+
throw new B("Failed to base64url decode the payload");
|
|
1036
1036
|
}
|
|
1037
|
-
let
|
|
1037
|
+
let a;
|
|
1038
1038
|
try {
|
|
1039
|
-
|
|
1039
|
+
a = JSON.parse(he.decode(n));
|
|
1040
1040
|
} catch {
|
|
1041
|
-
throw new
|
|
1041
|
+
throw new B("Failed to parse the decoded payload as JSON");
|
|
1042
1042
|
}
|
|
1043
|
-
if (!Re(
|
|
1044
|
-
throw new
|
|
1045
|
-
return
|
|
1043
|
+
if (!Re(a))
|
|
1044
|
+
throw new B("Invalid JWT Claims Set");
|
|
1045
|
+
return a;
|
|
1046
1046
|
}
|
|
1047
1047
|
const ue = async (e) => {
|
|
1048
1048
|
try {
|
|
1049
|
-
const t = N.ALG, r = await jr(
|
|
1050
|
-
return await
|
|
1049
|
+
const t = N.ALG, r = await jr(xr, t);
|
|
1050
|
+
return await mn(e, r, {
|
|
1051
1051
|
issuer: N.ISSUER
|
|
1052
1052
|
});
|
|
1053
1053
|
} catch {
|
|
1054
1054
|
return;
|
|
1055
1055
|
}
|
|
1056
|
-
},
|
|
1056
|
+
}, gn = (e) => {
|
|
1057
1057
|
try {
|
|
1058
|
-
return
|
|
1058
|
+
return pn(e);
|
|
1059
1059
|
} catch {
|
|
1060
1060
|
return;
|
|
1061
1061
|
}
|
|
@@ -1063,109 +1063,109 @@ const ue = async (e) => {
|
|
|
1063
1063
|
var I = [];
|
|
1064
1064
|
for (var Fe = 0; Fe < 256; ++Fe)
|
|
1065
1065
|
I.push((Fe + 256).toString(16).slice(1));
|
|
1066
|
-
function
|
|
1066
|
+
function fn(e, t = 0) {
|
|
1067
1067
|
return (I[e[t + 0]] + I[e[t + 1]] + I[e[t + 2]] + I[e[t + 3]] + "-" + I[e[t + 4]] + I[e[t + 5]] + "-" + I[e[t + 6]] + I[e[t + 7]] + "-" + I[e[t + 8]] + I[e[t + 9]] + "-" + I[e[t + 10]] + I[e[t + 11]] + I[e[t + 12]] + I[e[t + 13]] + I[e[t + 14]] + I[e[t + 15]]).toLowerCase();
|
|
1068
1068
|
}
|
|
1069
|
-
var ye,
|
|
1070
|
-
function
|
|
1069
|
+
var ye, yn = new Uint8Array(16);
|
|
1070
|
+
function bn() {
|
|
1071
1071
|
if (!ye && (ye = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ye))
|
|
1072
1072
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1073
|
-
return ye(
|
|
1073
|
+
return ye(yn);
|
|
1074
1074
|
}
|
|
1075
|
-
var
|
|
1075
|
+
var wn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1076
1076
|
const lt = {
|
|
1077
|
-
randomUUID:
|
|
1077
|
+
randomUUID: wn
|
|
1078
1078
|
};
|
|
1079
1079
|
function dt(e, t, r) {
|
|
1080
1080
|
if (lt.randomUUID && !t && !e)
|
|
1081
1081
|
return lt.randomUUID();
|
|
1082
1082
|
e = e || {};
|
|
1083
|
-
var
|
|
1084
|
-
return
|
|
1083
|
+
var n = e.random || (e.rng || bn)();
|
|
1084
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, fn(n);
|
|
1085
1085
|
}
|
|
1086
|
-
const ut = globalThis.crypto,
|
|
1086
|
+
const ut = globalThis.crypto, En = (e) => `${dt()}${dt()}`.slice(0, e), Tn = (e) => btoa(
|
|
1087
1087
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1088
1088
|
);
|
|
1089
|
-
async function
|
|
1089
|
+
async function vn(e) {
|
|
1090
1090
|
if (!ut.subtle)
|
|
1091
1091
|
throw new Error(
|
|
1092
1092
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1093
1093
|
);
|
|
1094
1094
|
const t = new TextEncoder().encode(e), r = await ut.subtle.digest("SHA-256", t);
|
|
1095
|
-
return
|
|
1095
|
+
return Tn(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1096
1096
|
}
|
|
1097
|
-
async function
|
|
1098
|
-
const t =
|
|
1097
|
+
async function Sn(e) {
|
|
1098
|
+
const t = En(43), r = await vn(t);
|
|
1099
1099
|
return {
|
|
1100
1100
|
code_verifier: t,
|
|
1101
1101
|
code_challenge: r
|
|
1102
1102
|
};
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function Bt(e, t) {
|
|
1105
1105
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1106
1106
|
}
|
|
1107
1107
|
const mt = (e, t) => {
|
|
1108
1108
|
const r = JSON.stringify(
|
|
1109
1109
|
typeof t == "function" ? t() : t
|
|
1110
1110
|
);
|
|
1111
|
-
window.localStorage.setItem(e, r),
|
|
1112
|
-
},
|
|
1113
|
-
window.localStorage.removeItem(e),
|
|
1114
|
-
}, ht = (e) => window.localStorage.getItem(e),
|
|
1111
|
+
window.localStorage.setItem(e, r), Bt(e, r);
|
|
1112
|
+
}, In = (e) => {
|
|
1113
|
+
window.localStorage.removeItem(e), Bt(e, null);
|
|
1114
|
+
}, ht = (e) => window.localStorage.getItem(e), An = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1115
1115
|
function be({
|
|
1116
1116
|
key: e,
|
|
1117
1117
|
initialValue: t
|
|
1118
1118
|
}) {
|
|
1119
|
-
const r =
|
|
1119
|
+
const r = wr(An, () => ht(e)), n = q(
|
|
1120
1120
|
(s) => {
|
|
1121
1121
|
try {
|
|
1122
1122
|
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1123
|
-
i == null ?
|
|
1123
|
+
i == null ? In(e) : mt(e, i);
|
|
1124
1124
|
} catch (i) {
|
|
1125
1125
|
console.warn(i);
|
|
1126
1126
|
}
|
|
1127
1127
|
},
|
|
1128
1128
|
[e, r]
|
|
1129
|
-
),
|
|
1130
|
-
|
|
1131
|
-
}, [t,
|
|
1132
|
-
|
|
1133
|
-
}, [
|
|
1134
|
-
return
|
|
1129
|
+
), a = q(() => {
|
|
1130
|
+
n(t);
|
|
1131
|
+
}, [t, n]), o = q(() => {
|
|
1132
|
+
n(null);
|
|
1133
|
+
}, [n]);
|
|
1134
|
+
return V(() => {
|
|
1135
1135
|
try {
|
|
1136
1136
|
ht(e) === null && typeof t < "u" && mt(e, t);
|
|
1137
1137
|
} catch (s) {
|
|
1138
1138
|
console.warn(s);
|
|
1139
1139
|
}
|
|
1140
|
-
}, [e, t]), [r ? JSON.parse(r) : null,
|
|
1140
|
+
}, [e, t]), [r ? JSON.parse(r) : null, n, a, o];
|
|
1141
1141
|
}
|
|
1142
1142
|
var A = [];
|
|
1143
1143
|
for (var Je = 0; Je < 256; ++Je)
|
|
1144
1144
|
A.push((Je + 256).toString(16).slice(1));
|
|
1145
|
-
function
|
|
1145
|
+
function kn(e, t = 0) {
|
|
1146
1146
|
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();
|
|
1147
1147
|
}
|
|
1148
|
-
var we,
|
|
1149
|
-
function
|
|
1148
|
+
var we, _n = new Uint8Array(16);
|
|
1149
|
+
function Rn() {
|
|
1150
1150
|
if (!we && (we = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !we))
|
|
1151
1151
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1152
|
-
return we(
|
|
1152
|
+
return we(_n);
|
|
1153
1153
|
}
|
|
1154
|
-
var
|
|
1154
|
+
var Nn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1155
1155
|
const pt = {
|
|
1156
|
-
randomUUID:
|
|
1156
|
+
randomUUID: Nn
|
|
1157
1157
|
};
|
|
1158
1158
|
function Ye(e, t, r) {
|
|
1159
1159
|
if (pt.randomUUID && !t && !e)
|
|
1160
1160
|
return pt.randomUUID();
|
|
1161
1161
|
e = e || {};
|
|
1162
|
-
var
|
|
1163
|
-
return
|
|
1162
|
+
var n = e.random || (e.rng || Rn)();
|
|
1163
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, kn(n);
|
|
1164
1164
|
}
|
|
1165
|
-
const ee = "Your session has expired. For your security, please log in again to continue.",
|
|
1165
|
+
const ee = "Your session has expired. For your security, please log in again to continue.", xn = "Your session has been successfully terminated.", Ee = "Login failed. Please try again.", Cn = "Error getting access token, please re-authenticate.", On = "You forgot to wrap your component in <AuthProvider>.", Ne = {
|
|
1166
1166
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1167
1167
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1168
|
-
}, Te = "@@auth@@", ce = "LOADING", le = "LOGIN",
|
|
1168
|
+
}, Te = "@@auth@@", ce = "LOADING", le = "LOGIN", Wt = "LOGOUT", Pe = "success", U = "failure", Vt = "include", Ft = "POST", Jt = "application/json", ve = {
|
|
1169
1169
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1170
1170
|
$clientId: String!,
|
|
1171
1171
|
$username: String!,
|
|
@@ -1257,30 +1257,30 @@ try {
|
|
|
1257
1257
|
});
|
|
1258
1258
|
} catch {
|
|
1259
1259
|
}
|
|
1260
|
-
const
|
|
1260
|
+
const Pn = (e) => Array.from(e).map((t) => t.toString(16).padStart(2, "0")).join(""), Yt = async (e) => {
|
|
1261
1261
|
if (e === "")
|
|
1262
1262
|
return "";
|
|
1263
1263
|
const t = new TextEncoder().encode(e), r = await crypto.subtle.digest("SHA-256", t);
|
|
1264
|
-
return Array.from(new Uint8Array(r)).map((
|
|
1264
|
+
return Array.from(new Uint8Array(r)).map((n) => n.toString(16).padStart(2, "0")).join("");
|
|
1265
1265
|
};
|
|
1266
1266
|
function gt(e, t) {
|
|
1267
1267
|
return new Promise((r) => setTimeout(r, e, t));
|
|
1268
1268
|
}
|
|
1269
|
-
async function
|
|
1270
|
-
var
|
|
1269
|
+
async function Dn(e, t, r = 50) {
|
|
1270
|
+
var n, a, o;
|
|
1271
1271
|
const s = document;
|
|
1272
1272
|
for (; !s.body; )
|
|
1273
1273
|
await gt(r);
|
|
1274
1274
|
const i = s.createElement("iframe");
|
|
1275
1275
|
try {
|
|
1276
|
-
for (await new Promise((
|
|
1276
|
+
for (await new Promise((d, g) => {
|
|
1277
1277
|
let p = !1;
|
|
1278
1278
|
const h = () => {
|
|
1279
|
-
p = !0,
|
|
1280
|
-
},
|
|
1279
|
+
p = !0, d();
|
|
1280
|
+
}, u = (b) => {
|
|
1281
1281
|
p = !0, g(b);
|
|
1282
1282
|
};
|
|
1283
|
-
i.onload = h, i.onerror =
|
|
1283
|
+
i.onload = h, i.onerror = u;
|
|
1284
1284
|
const { style: c } = i;
|
|
1285
1285
|
c.setProperty("display", "block", "important"), c.position = "absolute", c.top = "0", c.left = "0", c.visibility = "hidden", i.src = "about:blank", s.body.appendChild(i);
|
|
1286
1286
|
const m = () => {
|
|
@@ -1288,33 +1288,33 @@ async function Pa(e, t, r = 50) {
|
|
|
1288
1288
|
p || (((w = (b = i.contentWindow) == null ? void 0 : b.document) == null ? void 0 : w.readyState) === "complete" ? h() : setTimeout(m, 10));
|
|
1289
1289
|
};
|
|
1290
1290
|
m();
|
|
1291
|
-
}); !((
|
|
1291
|
+
}); !((a = (n = i.contentWindow) == null ? void 0 : n.document) != null && a.body); )
|
|
1292
1292
|
await gt(r);
|
|
1293
1293
|
return await e(i, i.contentWindow);
|
|
1294
1294
|
} finally {
|
|
1295
1295
|
(o = i.parentNode) == null || o.removeChild(i);
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
|
-
const
|
|
1298
|
+
const $n = {
|
|
1299
1299
|
audio: {
|
|
1300
1300
|
sampleHash: "",
|
|
1301
1301
|
oscillator: "",
|
|
1302
1302
|
maxChannels: 0,
|
|
1303
1303
|
channelCountMode: ""
|
|
1304
1304
|
}
|
|
1305
|
-
},
|
|
1305
|
+
}, Ln = async (e) => new Promise((t) => {
|
|
1306
1306
|
try {
|
|
1307
|
-
const r = new window.OfflineAudioContext(1, 5e3, 44100),
|
|
1308
|
-
|
|
1307
|
+
const r = new window.OfflineAudioContext(1, 5e3, 44100), n = r.createBufferSource(), a = r.createOscillator();
|
|
1308
|
+
a.frequency.value = 1e3;
|
|
1309
1309
|
const o = r.createDynamicsCompressor();
|
|
1310
|
-
o.threshold.value = -50, o.knee.value = 40, o.ratio.value = 12, o.attack.value = 0, o.release.value = 0.2,
|
|
1310
|
+
o.threshold.value = -50, o.knee.value = 40, o.ratio.value = 12, o.attack.value = 0, o.release.value = 0.2, a.connect(o), o.connect(r.destination), a.start(), r.startRendering(), r.oncomplete = (s) => {
|
|
1311
1311
|
const i = s.renderedBuffer.getChannelData(0);
|
|
1312
|
-
|
|
1312
|
+
a.disconnect(), o.disconnect(), t({
|
|
1313
1313
|
audio: {
|
|
1314
|
-
sampleHash:
|
|
1315
|
-
oscillator:
|
|
1314
|
+
sampleHash: Pn(i),
|
|
1315
|
+
oscillator: a.type,
|
|
1316
1316
|
maxChannels: r.destination.maxChannelCount,
|
|
1317
|
-
channelCountMode:
|
|
1317
|
+
channelCountMode: n.channelCountMode
|
|
1318
1318
|
}
|
|
1319
1319
|
});
|
|
1320
1320
|
};
|
|
@@ -1328,54 +1328,54 @@ const Da = {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
});
|
|
1330
1330
|
}
|
|
1331
|
-
}),
|
|
1331
|
+
}), jt = { browser: "" }, Mn = async (e) => typeof navigator > "u" ? jt : { browser: navigator.userAgent }, zt = {
|
|
1332
1332
|
canvas: {
|
|
1333
1333
|
data: ""
|
|
1334
1334
|
}
|
|
1335
|
-
},
|
|
1335
|
+
}, Un = async (e) => {
|
|
1336
1336
|
try {
|
|
1337
1337
|
const t = Array.from(
|
|
1338
1338
|
{ length: 3 },
|
|
1339
|
-
() =>
|
|
1340
|
-
), r =
|
|
1339
|
+
() => Hn(300, 30)
|
|
1340
|
+
), r = Gn(t, 300, 30);
|
|
1341
1341
|
return {
|
|
1342
1342
|
canvas: {
|
|
1343
|
-
data: (await
|
|
1343
|
+
data: (await Yt(r.data.toString())).toString()
|
|
1344
1344
|
}
|
|
1345
1345
|
};
|
|
1346
1346
|
} catch {
|
|
1347
|
-
return
|
|
1347
|
+
return zt;
|
|
1348
1348
|
}
|
|
1349
|
-
},
|
|
1350
|
-
const r = document.createElement("canvas"),
|
|
1351
|
-
if (!
|
|
1349
|
+
}, Hn = (e, t) => {
|
|
1350
|
+
const r = document.createElement("canvas"), n = r.getContext("2d");
|
|
1351
|
+
if (!n)
|
|
1352
1352
|
return new ImageData(1, 1);
|
|
1353
1353
|
r.width = e, r.height = t;
|
|
1354
|
-
const
|
|
1355
|
-
|
|
1354
|
+
const a = n.createLinearGradient(0, 0, r.width, r.height);
|
|
1355
|
+
a.addColorStop(0, "red"), a.addColorStop(1 / 6, "orange"), a.addColorStop(2 / 6, "yellow"), a.addColorStop(3 / 6, "green"), a.addColorStop(4 / 6, "blue"), a.addColorStop(5 / 6, "indigo"), a.addColorStop(1, "violet"), n.fillStyle = a, n.fillRect(0, 0, r.width, r.height);
|
|
1356
1356
|
const o = "mmMwWLliI0O&1 - Les sanglots longs des violons de l'automne blessent mon coeur d'une langueur monotone";
|
|
1357
|
-
return
|
|
1358
|
-
},
|
|
1357
|
+
return n.font = "26.321px Arial", n.fillStyle = "black", n.fillText(o, -5, 15), n.fillStyle = "rgba(0, 0, 255, 0.5)", n.fillText(o, -3.3, 17.7), n.beginPath(), n.moveTo(0, 0), n.lineTo(r.width * 2 / 7, r.height), n.strokeStyle = "white", n.lineWidth = 2, n.stroke(), n.getImageData(0, 0, r.width, r.height);
|
|
1358
|
+
}, Kn = (e) => {
|
|
1359
1359
|
if (e.length === 0)
|
|
1360
1360
|
return 0;
|
|
1361
1361
|
const t = {};
|
|
1362
|
-
for (const
|
|
1363
|
-
t[
|
|
1362
|
+
for (const n of e)
|
|
1363
|
+
t[n] = (t[n] || 0) + 1;
|
|
1364
1364
|
let r = e[0];
|
|
1365
|
-
for (const
|
|
1366
|
-
t[
|
|
1365
|
+
for (const n in t)
|
|
1366
|
+
t[n] > t[r] && (r = parseInt(n, 10));
|
|
1367
1367
|
return r;
|
|
1368
|
-
},
|
|
1369
|
-
const
|
|
1368
|
+
}, Gn = (e, t, r) => {
|
|
1369
|
+
const n = [];
|
|
1370
1370
|
for (let s = 0; s < e[0].data.length; s++) {
|
|
1371
1371
|
const i = [];
|
|
1372
|
-
for (let
|
|
1373
|
-
i.push(e[
|
|
1374
|
-
|
|
1372
|
+
for (let d = 0; d < e.length; d++)
|
|
1373
|
+
i.push(e[d].data[s]);
|
|
1374
|
+
n.push(Kn(i));
|
|
1375
1375
|
}
|
|
1376
|
-
const
|
|
1376
|
+
const a = n, o = new Uint8ClampedArray(a);
|
|
1377
1377
|
return new ImageData(o, t, r);
|
|
1378
|
-
},
|
|
1378
|
+
}, Bn = [], Wn = "mmMwWLliI0O&1", Vn = "48px", te = ["monospace", "sans-serif", "serif"], ft = [
|
|
1379
1379
|
"sans-serif-thin",
|
|
1380
1380
|
"ARNO PRO",
|
|
1381
1381
|
"Agency FB",
|
|
@@ -1413,44 +1413,44 @@ const Da = {
|
|
|
1413
1413
|
"TRAJAN PRO",
|
|
1414
1414
|
"Univers CE 55 Medium",
|
|
1415
1415
|
"ZWAdobeF"
|
|
1416
|
-
],
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
const
|
|
1420
|
-
|
|
1416
|
+
], Fn = async (e) => Dn(async (t, { document: r }) => {
|
|
1417
|
+
const n = r.body;
|
|
1418
|
+
n.style.fontSize = Vn;
|
|
1419
|
+
const a = r.createElement("div");
|
|
1420
|
+
a.style.setProperty("visibility", "hidden", "important");
|
|
1421
1421
|
const o = {}, s = {}, i = (m) => {
|
|
1422
1422
|
const b = r.createElement("span"), { style: w } = b;
|
|
1423
|
-
return w.position = "absolute", w.top = "0", w.left = "0", w.fontFamily = m, b.textContent =
|
|
1424
|
-
},
|
|
1423
|
+
return w.position = "absolute", w.top = "0", w.left = "0", w.fontFamily = m, b.textContent = Wn, a.appendChild(b), b;
|
|
1424
|
+
}, d = (m, b) => i(`'${m}',${b}`), g = () => te.map(i), p = () => {
|
|
1425
1425
|
const m = {};
|
|
1426
1426
|
for (const b of ft)
|
|
1427
1427
|
m[b] = te.map(
|
|
1428
|
-
(w) =>
|
|
1428
|
+
(w) => d(b, w)
|
|
1429
1429
|
);
|
|
1430
1430
|
return m;
|
|
1431
1431
|
}, h = (m) => te.some(
|
|
1432
1432
|
(b, w) => m[w].offsetWidth !== o[b] || m[w].offsetHeight !== s[b]
|
|
1433
|
-
),
|
|
1434
|
-
|
|
1433
|
+
), u = g(), c = p();
|
|
1434
|
+
n.appendChild(a);
|
|
1435
1435
|
for (let m = 0; m < te.length; m++)
|
|
1436
|
-
o[te[m]] =
|
|
1436
|
+
o[te[m]] = u[m].offsetWidth, s[te[m]] = u[m].offsetHeight;
|
|
1437
1437
|
return ft.filter((m) => h(c[m]));
|
|
1438
|
-
}),
|
|
1438
|
+
}), qt = {
|
|
1439
1439
|
vendor: "",
|
|
1440
1440
|
vendorUnmasked: "",
|
|
1441
1441
|
renderer: "",
|
|
1442
1442
|
rendererUnmasked: "",
|
|
1443
1443
|
version: "",
|
|
1444
1444
|
shadingLanguageVersion: ""
|
|
1445
|
-
},
|
|
1445
|
+
}, Qt = {
|
|
1446
1446
|
hardware: {
|
|
1447
|
-
videocard:
|
|
1447
|
+
videocard: qt,
|
|
1448
1448
|
architecture: 0,
|
|
1449
1449
|
deviceMemory: "undefined",
|
|
1450
1450
|
jsHeapSizeLimit: 0
|
|
1451
1451
|
}
|
|
1452
1452
|
};
|
|
1453
|
-
function
|
|
1453
|
+
function Jn() {
|
|
1454
1454
|
const e = document.createElement("canvas"), t = e.getContext("webgl") ?? e.getContext("experimental-webgl");
|
|
1455
1455
|
if (t && "getParameter" in t) {
|
|
1456
1456
|
const r = t.getExtension("WEBGL_debug_renderer_info");
|
|
@@ -1463,41 +1463,41 @@ function Fa() {
|
|
|
1463
1463
|
shadingLanguageVersion: (t.getParameter(t.SHADING_LANGUAGE_VERSION) || "").toString()
|
|
1464
1464
|
};
|
|
1465
1465
|
}
|
|
1466
|
-
return
|
|
1466
|
+
return qt;
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1468
|
+
function Yn() {
|
|
1469
1469
|
const e = new Float32Array(1), t = new Uint8Array(e.buffer);
|
|
1470
1470
|
return e[0] = 1 / 0, e[0] = e[0] - e[0], t[3];
|
|
1471
1471
|
}
|
|
1472
|
-
const
|
|
1472
|
+
const jn = () => navigator.deviceMemory || 0, zn = () => window.performance && window.performance.memory || {
|
|
1473
1473
|
jsHeapSizeLimit: 0
|
|
1474
|
-
},
|
|
1474
|
+
}, qn = async (e) => new Promise((t) => {
|
|
1475
1475
|
try {
|
|
1476
|
-
const r =
|
|
1476
|
+
const r = jn(), n = zn();
|
|
1477
1477
|
t({
|
|
1478
1478
|
hardware: {
|
|
1479
|
-
videocard:
|
|
1480
|
-
architecture:
|
|
1479
|
+
videocard: Jn(),
|
|
1480
|
+
architecture: Yn(),
|
|
1481
1481
|
deviceMemory: r.toString() || "undefined",
|
|
1482
|
-
jsHeapSizeLimit:
|
|
1482
|
+
jsHeapSizeLimit: n.jsHeapSizeLimit || 0
|
|
1483
1483
|
}
|
|
1484
1484
|
});
|
|
1485
1485
|
} catch {
|
|
1486
|
-
t(
|
|
1486
|
+
t(Qt);
|
|
1487
1487
|
}
|
|
1488
|
-
}),
|
|
1488
|
+
}), Qn = {
|
|
1489
1489
|
locales: {
|
|
1490
1490
|
languages: "",
|
|
1491
1491
|
timezone: ""
|
|
1492
1492
|
}
|
|
1493
|
-
},
|
|
1493
|
+
}, Xn = async (e) => new Promise((t) => {
|
|
1494
1494
|
t({
|
|
1495
1495
|
locales: {
|
|
1496
1496
|
languages: navigator.language,
|
|
1497
1497
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
1498
1498
|
}
|
|
1499
1499
|
});
|
|
1500
|
-
}),
|
|
1500
|
+
}), Xt = {
|
|
1501
1501
|
screen: {
|
|
1502
1502
|
colorDepth: 0,
|
|
1503
1503
|
pixelDepth: 0,
|
|
@@ -1505,23 +1505,23 @@ const Ya = () => navigator.deviceMemory || 0, ja = () => window.performance && w
|
|
|
1505
1505
|
maxTouchPoints: 0,
|
|
1506
1506
|
mediaMatches: []
|
|
1507
1507
|
}
|
|
1508
|
-
},
|
|
1508
|
+
}, Zn = async (e) => new Promise((t) => {
|
|
1509
1509
|
try {
|
|
1510
|
-
const r = window.screen,
|
|
1510
|
+
const r = window.screen, n = {
|
|
1511
1511
|
screen: {
|
|
1512
1512
|
colorDepth: r.colorDepth,
|
|
1513
1513
|
pixelDepth: r.pixelDepth,
|
|
1514
1514
|
isTouchScreen: navigator.maxTouchPoints > 0,
|
|
1515
1515
|
maxTouchPoints: navigator.maxTouchPoints,
|
|
1516
|
-
mediaMatches:
|
|
1516
|
+
mediaMatches: ea()
|
|
1517
1517
|
}
|
|
1518
1518
|
};
|
|
1519
|
-
t(
|
|
1519
|
+
t(n);
|
|
1520
1520
|
} catch {
|
|
1521
|
-
t(
|
|
1521
|
+
t(Xt);
|
|
1522
1522
|
}
|
|
1523
1523
|
});
|
|
1524
|
-
function
|
|
1524
|
+
function ea() {
|
|
1525
1525
|
const e = [], t = {
|
|
1526
1526
|
"prefers-contrast": [
|
|
1527
1527
|
"high",
|
|
@@ -1544,12 +1544,12 @@ function Za() {
|
|
|
1544
1544
|
"color-gamut": ["srgb", "p3", "rec2020"]
|
|
1545
1545
|
};
|
|
1546
1546
|
return Object.keys(t).forEach((r) => {
|
|
1547
|
-
t[r].forEach((
|
|
1548
|
-
matchMedia(`(${r}: ${
|
|
1547
|
+
t[r].forEach((n) => {
|
|
1548
|
+
matchMedia(`(${r}: ${n})`).matches && e.push(`${r}: ${n}`);
|
|
1549
1549
|
});
|
|
1550
1550
|
}), e;
|
|
1551
1551
|
}
|
|
1552
|
-
const
|
|
1552
|
+
const ta = async (e) => {
|
|
1553
1553
|
try {
|
|
1554
1554
|
return {
|
|
1555
1555
|
system: {
|
|
@@ -1560,95 +1560,95 @@ const en = async (e) => {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
};
|
|
1562
1562
|
} catch {
|
|
1563
|
-
return
|
|
1563
|
+
return Zt;
|
|
1564
1564
|
}
|
|
1565
|
-
},
|
|
1565
|
+
}, Zt = {
|
|
1566
1566
|
system: {
|
|
1567
1567
|
platform: "",
|
|
1568
1568
|
cookieEnabled: !1,
|
|
1569
1569
|
productSub: "",
|
|
1570
1570
|
product: ""
|
|
1571
1571
|
}
|
|
1572
|
-
},
|
|
1572
|
+
}, ra = async (e) => {
|
|
1573
1573
|
try {
|
|
1574
1574
|
return Promise.all([
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1575
|
+
Ln(),
|
|
1576
|
+
Mn(),
|
|
1577
|
+
Un(),
|
|
1578
|
+
Fn(),
|
|
1579
|
+
qn(),
|
|
1580
|
+
Xn(),
|
|
1581
|
+
Zn(),
|
|
1582
|
+
ta()
|
|
1583
1583
|
]);
|
|
1584
1584
|
} catch {
|
|
1585
1585
|
return [
|
|
1586
|
-
|
|
1587
|
-
Yt,
|
|
1586
|
+
$n,
|
|
1588
1587
|
jt,
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
qa,
|
|
1588
|
+
zt,
|
|
1589
|
+
Bn,
|
|
1592
1590
|
Qt,
|
|
1593
|
-
|
|
1591
|
+
Qn,
|
|
1592
|
+
Xt,
|
|
1593
|
+
Zt
|
|
1594
1594
|
];
|
|
1595
1595
|
}
|
|
1596
|
-
},
|
|
1596
|
+
}, na = async (e) => {
|
|
1597
1597
|
try {
|
|
1598
|
-
const t = await
|
|
1599
|
-
return await
|
|
1598
|
+
const t = await ra();
|
|
1599
|
+
return await Yt(JSON.stringify(t));
|
|
1600
1600
|
} catch {
|
|
1601
1601
|
return "";
|
|
1602
1602
|
}
|
|
1603
1603
|
}, re = {
|
|
1604
1604
|
GET_REGISTRATION_OPTIONS: {
|
|
1605
|
-
schema:
|
|
1605
|
+
schema: ve.GET_REGISTRATION_OPTIONS,
|
|
1606
1606
|
method: "getPasskeyRegistrationOptions"
|
|
1607
1607
|
},
|
|
1608
1608
|
VERIFY_REGISTRATION: {
|
|
1609
|
-
schema:
|
|
1609
|
+
schema: ve.VERIFY_REGISTRATION,
|
|
1610
1610
|
method: "verifyPasskeyRegistration"
|
|
1611
1611
|
},
|
|
1612
1612
|
GET_AUTHENTICATION_OPTIONS: {
|
|
1613
|
-
schema:
|
|
1613
|
+
schema: ve.GET_AUTHENTICATION_OPTIONS,
|
|
1614
1614
|
method: "getPasskeyAuthenticationOptions"
|
|
1615
1615
|
},
|
|
1616
1616
|
VERIFY_AUTHENTICATION: {
|
|
1617
|
-
schema:
|
|
1617
|
+
schema: ve.VERIFY_AUTHENTICATION,
|
|
1618
1618
|
method: "verifyPasskeyAuthentication"
|
|
1619
1619
|
}
|
|
1620
|
-
},
|
|
1620
|
+
}, ne = async ({
|
|
1621
1621
|
accessToken: e,
|
|
1622
1622
|
type: t,
|
|
1623
1623
|
clientId: r,
|
|
1624
|
-
params:
|
|
1624
|
+
params: n = {}
|
|
1625
1625
|
}) => {
|
|
1626
1626
|
try {
|
|
1627
|
-
const
|
|
1628
|
-
|
|
1627
|
+
const a = n, o = `Bearer ${e}`, s = await fetch(
|
|
1628
|
+
er ? `${Ne.dev}/graphql` : `${Ne.prod}/graphql`,
|
|
1629
1629
|
{
|
|
1630
|
-
credentials:
|
|
1631
|
-
method:
|
|
1630
|
+
credentials: Vt,
|
|
1631
|
+
method: Ft,
|
|
1632
1632
|
headers: {
|
|
1633
1633
|
authorization: o,
|
|
1634
|
-
"Content-Type":
|
|
1635
|
-
[
|
|
1634
|
+
"Content-Type": Jt,
|
|
1635
|
+
[Ot.CLIENT_ID]: `${r}`
|
|
1636
1636
|
},
|
|
1637
1637
|
body: JSON.stringify({
|
|
1638
1638
|
query: t.schema,
|
|
1639
|
-
variables:
|
|
1639
|
+
variables: a
|
|
1640
1640
|
})
|
|
1641
1641
|
}
|
|
1642
1642
|
);
|
|
1643
1643
|
if (s.status !== 200)
|
|
1644
|
-
return { status:
|
|
1644
|
+
return { status: U, data: [] };
|
|
1645
1645
|
const { data: i } = await s.json();
|
|
1646
1646
|
return {
|
|
1647
1647
|
status: Pe,
|
|
1648
1648
|
data: i[t.method]
|
|
1649
1649
|
};
|
|
1650
|
-
} catch (
|
|
1651
|
-
return console.error(
|
|
1650
|
+
} catch (a) {
|
|
1651
|
+
return console.error(a), { status: U, data: [] };
|
|
1652
1652
|
}
|
|
1653
1653
|
}, De = async ({
|
|
1654
1654
|
type: e,
|
|
@@ -1656,104 +1656,104 @@ const en = async (e) => {
|
|
|
1656
1656
|
params: r = {}
|
|
1657
1657
|
}) => {
|
|
1658
1658
|
try {
|
|
1659
|
-
const
|
|
1660
|
-
|
|
1659
|
+
const n = await fetch(
|
|
1660
|
+
er ? `${Ne.dev}/${e}` : `${Ne.prod}/${e}`,
|
|
1661
1661
|
{
|
|
1662
|
-
credentials:
|
|
1663
|
-
method:
|
|
1662
|
+
credentials: Vt,
|
|
1663
|
+
method: Ft,
|
|
1664
1664
|
headers: {
|
|
1665
|
-
"Content-Type":
|
|
1666
|
-
[
|
|
1665
|
+
"Content-Type": Jt,
|
|
1666
|
+
[Ot.CLIENT_ID]: `${t}`
|
|
1667
1667
|
},
|
|
1668
1668
|
body: JSON.stringify(r)
|
|
1669
1669
|
}
|
|
1670
1670
|
);
|
|
1671
|
-
if (
|
|
1672
|
-
return { status:
|
|
1673
|
-
const { data:
|
|
1671
|
+
if (n.status !== 200)
|
|
1672
|
+
return { status: U, data: [] };
|
|
1673
|
+
const { data: a } = await n.json();
|
|
1674
1674
|
return {
|
|
1675
1675
|
status: Pe,
|
|
1676
|
-
data:
|
|
1676
|
+
data: a || []
|
|
1677
1677
|
};
|
|
1678
|
-
} catch (
|
|
1679
|
-
return console.error(
|
|
1678
|
+
} catch (n) {
|
|
1679
|
+
return console.error(n), { status: U, data: [] };
|
|
1680
1680
|
}
|
|
1681
|
-
},
|
|
1681
|
+
}, aa = process.env.NODE_ENV === "production", er = !aa, tr = {
|
|
1682
1682
|
isLoading: !0,
|
|
1683
1683
|
isAuthenticated: !1,
|
|
1684
1684
|
authenticationType: null,
|
|
1685
1685
|
user: void 0,
|
|
1686
1686
|
logoutReason: "",
|
|
1687
1687
|
debug: !1
|
|
1688
|
-
},
|
|
1688
|
+
}, oa = (e) => {
|
|
1689
1689
|
try {
|
|
1690
|
-
const t =
|
|
1690
|
+
const t = gn(e);
|
|
1691
1691
|
return t ? t[N.USER_ID_KEY] : "";
|
|
1692
1692
|
} catch {
|
|
1693
1693
|
return "";
|
|
1694
1694
|
}
|
|
1695
|
-
},
|
|
1695
|
+
}, sa = async ({
|
|
1696
1696
|
userId: e,
|
|
1697
1697
|
idToken: t,
|
|
1698
1698
|
accessToken: r,
|
|
1699
|
-
refreshToken:
|
|
1700
|
-
clientId:
|
|
1699
|
+
refreshToken: n,
|
|
1700
|
+
clientId: a,
|
|
1701
1701
|
domain: o
|
|
1702
1702
|
}) => {
|
|
1703
1703
|
var s;
|
|
1704
1704
|
try {
|
|
1705
1705
|
return {
|
|
1706
1706
|
status: ((s = await De({
|
|
1707
|
-
type:
|
|
1708
|
-
clientId:
|
|
1707
|
+
type: Ce.LOGOUT,
|
|
1708
|
+
clientId: a,
|
|
1709
1709
|
params: {
|
|
1710
1710
|
userId: e,
|
|
1711
1711
|
idToken: t,
|
|
1712
1712
|
accessToken: r,
|
|
1713
|
-
refreshToken:
|
|
1713
|
+
refreshToken: n,
|
|
1714
1714
|
domain: o
|
|
1715
1715
|
}
|
|
1716
|
-
})) == null ? void 0 : s.status) ||
|
|
1716
|
+
})) == null ? void 0 : s.status) || U
|
|
1717
1717
|
};
|
|
1718
1718
|
} catch {
|
|
1719
1719
|
return {
|
|
1720
|
-
status:
|
|
1720
|
+
status: U
|
|
1721
1721
|
};
|
|
1722
1722
|
}
|
|
1723
1723
|
}, yt = async ({
|
|
1724
1724
|
username: e,
|
|
1725
1725
|
password: t,
|
|
1726
1726
|
clientId: r,
|
|
1727
|
-
nonce:
|
|
1728
|
-
type:
|
|
1727
|
+
nonce: n,
|
|
1728
|
+
type: a,
|
|
1729
1729
|
sessionExpiration: o,
|
|
1730
1730
|
code: s,
|
|
1731
1731
|
code_verifier: i,
|
|
1732
|
-
domain:
|
|
1732
|
+
domain: d,
|
|
1733
1733
|
fingerprint: g
|
|
1734
1734
|
}) => {
|
|
1735
1735
|
var p;
|
|
1736
1736
|
try {
|
|
1737
1737
|
const h = await De({
|
|
1738
|
-
type:
|
|
1738
|
+
type: Ce.AUTHENTICATE,
|
|
1739
1739
|
clientId: r,
|
|
1740
1740
|
params: {
|
|
1741
|
-
type:
|
|
1741
|
+
type: a || Q.ID_AND_ACCESS_TOKEN,
|
|
1742
1742
|
username: e,
|
|
1743
1743
|
password: t,
|
|
1744
1744
|
sessionExpiration: o,
|
|
1745
|
-
nonce:
|
|
1745
|
+
nonce: n,
|
|
1746
1746
|
code: s,
|
|
1747
1747
|
code_verifier: i,
|
|
1748
|
-
domain:
|
|
1748
|
+
domain: d,
|
|
1749
1749
|
fingerprint: g
|
|
1750
1750
|
}
|
|
1751
|
-
}),
|
|
1752
|
-
return
|
|
1751
|
+
}), u = await ue((p = h == null ? void 0 : h.data) == null ? void 0 : p.idToken);
|
|
1752
|
+
return u && u.payload[N.USER_ID_KEY] !== "" && u.payload[N.NONCE_KEY] === n ? {
|
|
1753
1753
|
idToken: h.data.idToken,
|
|
1754
1754
|
accessToken: h.data.accessToken,
|
|
1755
1755
|
refreshToken: h.data.refreshToken,
|
|
1756
|
-
userId:
|
|
1756
|
+
userId: u.payload[N.USER_ID_KEY],
|
|
1757
1757
|
status: !0
|
|
1758
1758
|
} : {
|
|
1759
1759
|
status: !1
|
|
@@ -1763,62 +1763,62 @@ const en = async (e) => {
|
|
|
1763
1763
|
status: !1
|
|
1764
1764
|
};
|
|
1765
1765
|
}
|
|
1766
|
-
},
|
|
1766
|
+
}, ia = async ({
|
|
1767
1767
|
nonce: e,
|
|
1768
1768
|
clientId: t,
|
|
1769
1769
|
code_challenge: r
|
|
1770
1770
|
}) => {
|
|
1771
|
-
var
|
|
1771
|
+
var n;
|
|
1772
1772
|
try {
|
|
1773
|
-
const
|
|
1774
|
-
type:
|
|
1773
|
+
const a = await De({
|
|
1774
|
+
type: Ce.CODE,
|
|
1775
1775
|
clientId: t,
|
|
1776
1776
|
params: {
|
|
1777
|
-
type:
|
|
1777
|
+
type: Q.CODE,
|
|
1778
1778
|
nonce: e,
|
|
1779
1779
|
code_challenge: r
|
|
1780
1780
|
}
|
|
1781
1781
|
});
|
|
1782
|
-
return (
|
|
1782
|
+
return (n = a == null ? void 0 : a.data) != null && n.code ? {
|
|
1783
1783
|
status: Pe,
|
|
1784
|
-
data:
|
|
1784
|
+
data: a.data.code
|
|
1785
1785
|
} : {
|
|
1786
|
-
status:
|
|
1786
|
+
status: U,
|
|
1787
1787
|
data: ""
|
|
1788
1788
|
};
|
|
1789
1789
|
} catch {
|
|
1790
1790
|
return {
|
|
1791
|
-
status:
|
|
1791
|
+
status: U,
|
|
1792
1792
|
data: ""
|
|
1793
1793
|
};
|
|
1794
1794
|
}
|
|
1795
|
-
},
|
|
1795
|
+
}, ca = async ({
|
|
1796
1796
|
clientId: e,
|
|
1797
1797
|
userId: t,
|
|
1798
1798
|
nonce: r,
|
|
1799
|
-
refreshToken:
|
|
1800
|
-
accessToken:
|
|
1799
|
+
refreshToken: n,
|
|
1800
|
+
accessToken: a,
|
|
1801
1801
|
domain: o
|
|
1802
1802
|
}) => {
|
|
1803
1803
|
var s;
|
|
1804
1804
|
try {
|
|
1805
1805
|
const i = await De({
|
|
1806
|
-
type:
|
|
1806
|
+
type: Ce.AUTHENTICATE,
|
|
1807
1807
|
clientId: e,
|
|
1808
1808
|
params: {
|
|
1809
|
-
type:
|
|
1809
|
+
type: Q.REFRESH_TOKEN,
|
|
1810
1810
|
userId: t,
|
|
1811
1811
|
nonce: r,
|
|
1812
|
-
refreshToken:
|
|
1813
|
-
accessToken:
|
|
1812
|
+
refreshToken: n,
|
|
1813
|
+
accessToken: a,
|
|
1814
1814
|
domain: o,
|
|
1815
|
-
fingerprint: await
|
|
1815
|
+
fingerprint: await rr()
|
|
1816
1816
|
}
|
|
1817
|
-
}),
|
|
1818
|
-
return
|
|
1817
|
+
}), d = await ue((s = i == null ? void 0 : i.data) == null ? void 0 : s.accessToken);
|
|
1818
|
+
return d && d.payload[N.USER_ID_KEY] !== "" && d.payload[N.NONCE_KEY] === r ? {
|
|
1819
1819
|
accessToken: i.data.accessToken,
|
|
1820
1820
|
refreshToken: i.data.refreshToken,
|
|
1821
|
-
userId:
|
|
1821
|
+
userId: d.payload[N.USER_ID_KEY],
|
|
1822
1822
|
status: !0
|
|
1823
1823
|
} : {
|
|
1824
1824
|
status: !1
|
|
@@ -1828,28 +1828,28 @@ const en = async (e) => {
|
|
|
1828
1828
|
status: !1
|
|
1829
1829
|
};
|
|
1830
1830
|
}
|
|
1831
|
-
},
|
|
1831
|
+
}, rr = async () => {
|
|
1832
1832
|
try {
|
|
1833
|
-
return await
|
|
1833
|
+
return await na();
|
|
1834
1834
|
} catch {
|
|
1835
1835
|
return "";
|
|
1836
1836
|
}
|
|
1837
1837
|
};
|
|
1838
|
-
class
|
|
1838
|
+
class la {
|
|
1839
1839
|
constructor(t = null, r = null) {
|
|
1840
1840
|
Ke(this, "refreshTokenPromise", null), Ke(this, "accessToken"), Ke(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1841
1841
|
}
|
|
1842
1842
|
async refreshtoken({
|
|
1843
1843
|
clientId: t,
|
|
1844
1844
|
userId: r,
|
|
1845
|
-
nonce:
|
|
1846
|
-
domain:
|
|
1845
|
+
nonce: n,
|
|
1846
|
+
domain: a
|
|
1847
1847
|
}) {
|
|
1848
1848
|
this.refreshTokenPromise || (this.refreshTokenPromise = this._refreshToken({
|
|
1849
1849
|
clientId: t,
|
|
1850
1850
|
userId: r,
|
|
1851
|
-
nonce:
|
|
1852
|
-
domain:
|
|
1851
|
+
nonce: n,
|
|
1852
|
+
domain: a
|
|
1853
1853
|
}));
|
|
1854
1854
|
try {
|
|
1855
1855
|
return await this.refreshTokenPromise;
|
|
@@ -1860,55 +1860,55 @@ class ln {
|
|
|
1860
1860
|
async _refreshToken({
|
|
1861
1861
|
clientId: t,
|
|
1862
1862
|
userId: r,
|
|
1863
|
-
nonce:
|
|
1864
|
-
domain:
|
|
1863
|
+
nonce: n,
|
|
1864
|
+
domain: a
|
|
1865
1865
|
}) {
|
|
1866
1866
|
const o = await ue(this.refreshToken);
|
|
1867
1867
|
if (o && o.payload[N.USER_ID_KEY] !== "") {
|
|
1868
|
-
const s = await
|
|
1868
|
+
const s = await ca({
|
|
1869
1869
|
clientId: t,
|
|
1870
1870
|
userId: r,
|
|
1871
|
-
nonce:
|
|
1871
|
+
nonce: n,
|
|
1872
1872
|
refreshToken: this.refreshToken,
|
|
1873
1873
|
accessToken: this.accessToken,
|
|
1874
|
-
domain:
|
|
1874
|
+
domain: a
|
|
1875
1875
|
});
|
|
1876
1876
|
return s.status ? (this.accessToken = s.accessToken, this.refreshToken = s.refreshToken, {
|
|
1877
1877
|
status: Pe,
|
|
1878
1878
|
newAccessToken: s.accessToken,
|
|
1879
1879
|
newRefreshToken: s.refreshToken
|
|
1880
1880
|
}) : {
|
|
1881
|
-
status:
|
|
1881
|
+
status: U
|
|
1882
1882
|
};
|
|
1883
1883
|
} else
|
|
1884
1884
|
return {
|
|
1885
|
-
status:
|
|
1885
|
+
status: U
|
|
1886
1886
|
};
|
|
1887
1887
|
}
|
|
1888
1888
|
}
|
|
1889
|
-
const
|
|
1889
|
+
const da = (e) => q(
|
|
1890
1890
|
(...t) => {
|
|
1891
1891
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1892
1892
|
},
|
|
1893
1893
|
[e]
|
|
1894
|
-
),
|
|
1895
|
-
throw new Error(
|
|
1896
|
-
},
|
|
1894
|
+
), ae = () => {
|
|
1895
|
+
throw new Error(On);
|
|
1896
|
+
}, nr = br({
|
|
1897
1897
|
isAuthenticated: !1,
|
|
1898
1898
|
isLoading: !1,
|
|
1899
1899
|
authenticationType: null,
|
|
1900
|
-
login:
|
|
1901
|
-
logout:
|
|
1902
|
-
getAccessToken:
|
|
1903
|
-
getIdToken:
|
|
1904
|
-
registeringForPasskey:
|
|
1905
|
-
loginWithPasskey:
|
|
1900
|
+
login: ae,
|
|
1901
|
+
logout: ae,
|
|
1902
|
+
getAccessToken: ae,
|
|
1903
|
+
getIdToken: ae,
|
|
1904
|
+
registeringForPasskey: ae,
|
|
1905
|
+
loginWithPasskey: ae,
|
|
1906
1906
|
logoutReason: ""
|
|
1907
|
-
}),
|
|
1908
|
-
state:
|
|
1907
|
+
}), ua = W.createContext({
|
|
1908
|
+
state: tr,
|
|
1909
1909
|
dispatch: () => {
|
|
1910
1910
|
}
|
|
1911
|
-
}),
|
|
1911
|
+
}), ma = (e, t) => (t == null ? void 0 : t.type) === ce ? {
|
|
1912
1912
|
...e,
|
|
1913
1913
|
isLoading: t.payload.isLoading
|
|
1914
1914
|
} : (t == null ? void 0 : t.type) === le ? {
|
|
@@ -1918,84 +1918,84 @@ const dn = (e) => z(
|
|
|
1918
1918
|
user: t.payload.user,
|
|
1919
1919
|
authenticationType: t.payload.authenticationType,
|
|
1920
1920
|
logoutReason: ""
|
|
1921
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1921
|
+
} : (t == null ? void 0 : t.type) === Wt ? {
|
|
1922
1922
|
...e,
|
|
1923
1923
|
isLoading: !1,
|
|
1924
1924
|
isAuthenticated: !1,
|
|
1925
1925
|
user: void 0,
|
|
1926
1926
|
authenticationType: null,
|
|
1927
1927
|
logoutReason: t.payload.logoutReason
|
|
1928
|
-
} : e,
|
|
1928
|
+
} : e, ha = ({
|
|
1929
1929
|
children: e,
|
|
1930
1930
|
sessionExpiration: t,
|
|
1931
1931
|
clientId: r,
|
|
1932
|
-
domain:
|
|
1933
|
-
debug:
|
|
1932
|
+
domain: n = "",
|
|
1933
|
+
debug: a = !1
|
|
1934
1934
|
}) => {
|
|
1935
|
-
const [o, s] =
|
|
1936
|
-
...
|
|
1937
|
-
debug:
|
|
1938
|
-
}), i =
|
|
1935
|
+
const [o, s] = vt(ma, {
|
|
1936
|
+
...tr,
|
|
1937
|
+
debug: a
|
|
1938
|
+
}), i = da(a), d = M(!1), g = M(""), [p, h, , u] = be({
|
|
1939
1939
|
key: `${Te}::${r}::@@user@@`
|
|
1940
1940
|
}), [c, m, , b] = be({
|
|
1941
1941
|
key: `${Te}::${r}::@@access@@`
|
|
1942
|
-
}), [w, T, ,
|
|
1942
|
+
}), [w, T, , D] = be(
|
|
1943
1943
|
{
|
|
1944
1944
|
key: `${Te}::${r}::@@refresh@@`
|
|
1945
1945
|
}
|
|
1946
|
-
), [
|
|
1946
|
+
), [F, O, , Z] = be({
|
|
1947
1947
|
key: `${Te}::${r}::@@nonce@@`
|
|
1948
|
-
}),
|
|
1949
|
-
i("removeLocalStorage: removing local storage"),
|
|
1948
|
+
}), J = new la(c, w), x = q(() => {
|
|
1949
|
+
i("removeLocalStorage: removing local storage"), u(), b(), D(), Z();
|
|
1950
1950
|
}, [
|
|
1951
1951
|
b,
|
|
1952
|
-
|
|
1952
|
+
u,
|
|
1953
1953
|
Z,
|
|
1954
|
-
|
|
1954
|
+
D,
|
|
1955
1955
|
i
|
|
1956
|
-
]),
|
|
1956
|
+
]), P = q(
|
|
1957
1957
|
(y) => {
|
|
1958
1958
|
i(
|
|
1959
1959
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1960
1960
|
y
|
|
1961
1961
|
), s({
|
|
1962
|
-
type:
|
|
1962
|
+
type: Wt,
|
|
1963
1963
|
payload: {
|
|
1964
1964
|
logoutReason: y || ee
|
|
1965
1965
|
}
|
|
1966
|
-
}),
|
|
1966
|
+
}), x(), s({ type: ce, payload: { isLoading: !1 } });
|
|
1967
1967
|
},
|
|
1968
|
-
[
|
|
1969
|
-
),
|
|
1968
|
+
[x, i]
|
|
1969
|
+
), _ = q(
|
|
1970
1970
|
async (y) => {
|
|
1971
1971
|
i("invalidateAndLogout: invalidating and logging out");
|
|
1972
|
-
const { user:
|
|
1972
|
+
const { user: v } = o, E = (v == null ? void 0 : v.userId) || oa(p);
|
|
1973
1973
|
E || i(
|
|
1974
1974
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1975
|
-
), await
|
|
1975
|
+
), await sa({
|
|
1976
1976
|
userId: E,
|
|
1977
1977
|
idToken: p,
|
|
1978
1978
|
accessToken: c,
|
|
1979
1979
|
refreshToken: w,
|
|
1980
1980
|
clientId: r,
|
|
1981
|
-
domain:
|
|
1982
|
-
}),
|
|
1981
|
+
domain: n
|
|
1982
|
+
}), P(y || ee);
|
|
1983
1983
|
},
|
|
1984
1984
|
[
|
|
1985
1985
|
c,
|
|
1986
1986
|
o,
|
|
1987
1987
|
r,
|
|
1988
|
-
|
|
1988
|
+
n,
|
|
1989
1989
|
p,
|
|
1990
1990
|
w,
|
|
1991
|
-
|
|
1991
|
+
P,
|
|
1992
1992
|
i
|
|
1993
1993
|
]
|
|
1994
1994
|
);
|
|
1995
|
-
|
|
1995
|
+
V(() => ((async () => g.current = await rr())(), () => {
|
|
1996
1996
|
g.current = "";
|
|
1997
|
-
}), []),
|
|
1998
|
-
if (!
|
|
1997
|
+
}), []), V(() => {
|
|
1998
|
+
if (!d.current)
|
|
1999
1999
|
return o.isLoading && p !== null ? (async () => {
|
|
2000
2000
|
try {
|
|
2001
2001
|
const y = await ue(p);
|
|
@@ -2008,36 +2008,36 @@ const dn = (e) => z(
|
|
|
2008
2008
|
username: y.payload[N.USERNAME_KEY]
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
|
-
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await
|
|
2011
|
+
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await _(ee));
|
|
2012
2012
|
} catch {
|
|
2013
2013
|
i(
|
|
2014
2014
|
"useEffect: exception validating JWT, invalidating and logging out"
|
|
2015
|
-
), await
|
|
2015
|
+
), await _(ee);
|
|
2016
2016
|
}
|
|
2017
2017
|
})() : (i("useEffect: setting the loading state to false"), s({ type: ce, payload: { isLoading: !1 } })), () => {
|
|
2018
|
-
|
|
2018
|
+
d.current = !0;
|
|
2019
2019
|
};
|
|
2020
|
-
}, [o.isLoading, p,
|
|
2021
|
-
const
|
|
2022
|
-
s({ type: ce, payload: { isLoading: !0 } }),
|
|
2023
|
-
const
|
|
2024
|
-
if (
|
|
2025
|
-
const { code_verifier:
|
|
2026
|
-
nonce:
|
|
2020
|
+
}, [o.isLoading, p, _, i]);
|
|
2021
|
+
const Me = async (y, v, E = Q.CODE) => {
|
|
2022
|
+
s({ type: ce, payload: { isLoading: !0 } }), x();
|
|
2023
|
+
const K = Ye();
|
|
2024
|
+
if (O(K), i("login: Logging in with type: ", E), E === Q.CODE) {
|
|
2025
|
+
const { code_verifier: fr, code_challenge: yr } = await Sn(), nt = await ia({
|
|
2026
|
+
nonce: K,
|
|
2027
2027
|
clientId: r,
|
|
2028
|
-
code_challenge:
|
|
2028
|
+
code_challenge: yr
|
|
2029
2029
|
});
|
|
2030
|
-
if (
|
|
2030
|
+
if (nt.status) {
|
|
2031
2031
|
const ie = await yt({
|
|
2032
2032
|
username: y,
|
|
2033
|
-
password:
|
|
2033
|
+
password: v,
|
|
2034
2034
|
clientId: r,
|
|
2035
2035
|
sessionExpiration: t,
|
|
2036
|
-
nonce:
|
|
2036
|
+
nonce: K,
|
|
2037
2037
|
type: E,
|
|
2038
|
-
code:
|
|
2039
|
-
code_verifier:
|
|
2040
|
-
domain:
|
|
2038
|
+
code: nt.data,
|
|
2039
|
+
code_verifier: fr,
|
|
2040
|
+
domain: n,
|
|
2041
2041
|
fingerprint: g.current
|
|
2042
2042
|
});
|
|
2043
2043
|
return ie.status ? (h(ie.idToken), m(ie.accessToken), T(ie.refreshToken), s({
|
|
@@ -2049,18 +2049,18 @@ const dn = (e) => z(
|
|
|
2049
2049
|
username: y
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
|
-
}), !0) : (
|
|
2052
|
+
}), !0) : (P(Ee), !1);
|
|
2053
2053
|
}
|
|
2054
2054
|
return !1;
|
|
2055
2055
|
}
|
|
2056
2056
|
const se = await yt({
|
|
2057
2057
|
username: y,
|
|
2058
|
-
password:
|
|
2058
|
+
password: v,
|
|
2059
2059
|
clientId: r,
|
|
2060
2060
|
sessionExpiration: t,
|
|
2061
|
-
nonce:
|
|
2061
|
+
nonce: K,
|
|
2062
2062
|
type: E,
|
|
2063
|
-
domain:
|
|
2063
|
+
domain: n,
|
|
2064
2064
|
fingerprint: g.current
|
|
2065
2065
|
});
|
|
2066
2066
|
return se.status ? (h(se.idToken), m(se.accessToken), T(se.refreshToken), s({
|
|
@@ -2072,41 +2072,41 @@ const dn = (e) => z(
|
|
|
2072
2072
|
username: y
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
|
-
}), !0) : (
|
|
2075
|
+
}), !0) : (P(Ee), !1);
|
|
2076
2076
|
}, Ue = async (y) => {
|
|
2077
|
-
y == null || y.preventDefault(), await
|
|
2078
|
-
},
|
|
2079
|
-
const { isAuthenticated: y, user:
|
|
2077
|
+
y == null || y.preventDefault(), await _(xn);
|
|
2078
|
+
}, C = async () => {
|
|
2079
|
+
const { isAuthenticated: y, user: v } = o;
|
|
2080
2080
|
try {
|
|
2081
|
-
if (y &&
|
|
2081
|
+
if (y && v && v.userId) {
|
|
2082
2082
|
if (c) {
|
|
2083
2083
|
i("getAccessToken");
|
|
2084
|
-
const
|
|
2085
|
-
if (
|
|
2084
|
+
const K = await ue(c);
|
|
2085
|
+
if (K && K.payload[N.USER_ID_KEY] !== "")
|
|
2086
2086
|
return c;
|
|
2087
2087
|
}
|
|
2088
2088
|
i("getAccessToken: invalid access token, trying to refresh it");
|
|
2089
|
-
const E = await
|
|
2089
|
+
const E = await J.refreshtoken({
|
|
2090
2090
|
clientId: r,
|
|
2091
|
-
userId:
|
|
2092
|
-
nonce:
|
|
2093
|
-
domain:
|
|
2091
|
+
userId: v.userId,
|
|
2092
|
+
nonce: F,
|
|
2093
|
+
domain: n
|
|
2094
2094
|
});
|
|
2095
2095
|
return E.status && E.status === "success" && E.newAccessToken ? (m(E.newAccessToken), T(E.newRefreshToken), E.newAccessToken) : (i(
|
|
2096
2096
|
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
2097
|
-
), await
|
|
2097
|
+
), await _(ee), "");
|
|
2098
2098
|
}
|
|
2099
2099
|
return i(
|
|
2100
2100
|
"getAccessToken: user is not authenticated, cannot get access token"
|
|
2101
|
-
), await
|
|
2101
|
+
), await _(ee), "";
|
|
2102
2102
|
} catch {
|
|
2103
2103
|
return i(
|
|
2104
2104
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
2105
|
-
), await
|
|
2105
|
+
), await _(Cn), "";
|
|
2106
2106
|
}
|
|
2107
|
-
},
|
|
2107
|
+
}, H = () => o.isAuthenticated && p ? p : "", He = async () => {
|
|
2108
2108
|
const { user: y } = o;
|
|
2109
|
-
let
|
|
2109
|
+
let v = await ne({
|
|
2110
2110
|
accessToken: c,
|
|
2111
2111
|
clientId: r,
|
|
2112
2112
|
type: re.GET_REGISTRATION_OPTIONS,
|
|
@@ -2116,10 +2116,10 @@ const dn = (e) => z(
|
|
|
2116
2116
|
username: y == null ? void 0 : y.username
|
|
2117
2117
|
}
|
|
2118
2118
|
});
|
|
2119
|
-
if (
|
|
2119
|
+
if (v.status)
|
|
2120
2120
|
try {
|
|
2121
|
-
const E = await kr(
|
|
2122
|
-
return
|
|
2121
|
+
const E = await kr(v.data);
|
|
2122
|
+
return v = await ne({
|
|
2123
2123
|
accessToken: c,
|
|
2124
2124
|
clientId: r,
|
|
2125
2125
|
type: re.VERIFY_REGISTRATION,
|
|
@@ -2129,9 +2129,9 @@ const dn = (e) => z(
|
|
|
2129
2129
|
username: y == null ? void 0 : y.username,
|
|
2130
2130
|
registration: E
|
|
2131
2131
|
}
|
|
2132
|
-
}), !!(
|
|
2132
|
+
}), !!(v.status && v.data.length > 0);
|
|
2133
2133
|
} catch {
|
|
2134
|
-
return await
|
|
2134
|
+
return await ne({
|
|
2135
2135
|
accessToken: c,
|
|
2136
2136
|
clientId: r,
|
|
2137
2137
|
type: re.VERIFY_REGISTRATION,
|
|
@@ -2145,77 +2145,77 @@ const dn = (e) => z(
|
|
|
2145
2145
|
}
|
|
2146
2146
|
return !1;
|
|
2147
2147
|
}, pe = async () => {
|
|
2148
|
-
s({ type: ce, payload: { isLoading: !0 } }),
|
|
2148
|
+
s({ type: ce, payload: { isLoading: !0 } }), x();
|
|
2149
2149
|
const y = Ye();
|
|
2150
|
-
|
|
2151
|
-
const
|
|
2152
|
-
let E = await
|
|
2150
|
+
O(y), i("loginWithPasskey");
|
|
2151
|
+
const v = Ye();
|
|
2152
|
+
let E = await ne({
|
|
2153
2153
|
accessToken: c,
|
|
2154
2154
|
clientId: r,
|
|
2155
2155
|
type: re.GET_AUTHENTICATION_OPTIONS,
|
|
2156
2156
|
params: {
|
|
2157
|
-
id:
|
|
2157
|
+
id: v,
|
|
2158
2158
|
clientId: r
|
|
2159
2159
|
}
|
|
2160
2160
|
});
|
|
2161
2161
|
if (E.status)
|
|
2162
2162
|
try {
|
|
2163
|
-
const
|
|
2164
|
-
return E = await
|
|
2163
|
+
const K = await Nr(E.data);
|
|
2164
|
+
return E = await ne({
|
|
2165
2165
|
accessToken: c,
|
|
2166
2166
|
clientId: r,
|
|
2167
2167
|
type: re.VERIFY_AUTHENTICATION,
|
|
2168
2168
|
params: {
|
|
2169
2169
|
clientId: r,
|
|
2170
|
-
id:
|
|
2171
|
-
authentication:
|
|
2170
|
+
id: v,
|
|
2171
|
+
authentication: K,
|
|
2172
2172
|
nonce: y,
|
|
2173
|
-
domain:
|
|
2173
|
+
domain: n,
|
|
2174
2174
|
fingerprint: g.current
|
|
2175
2175
|
}
|
|
2176
2176
|
}), E.data.status === "success" ? (h(E.data.idToken), m(E.data.accessToken), T(E.data.refreshToken), s({
|
|
2177
2177
|
type: le,
|
|
2178
2178
|
payload: {
|
|
2179
|
-
authenticationType:
|
|
2179
|
+
authenticationType: Q.PASSKEY,
|
|
2180
2180
|
user: {
|
|
2181
2181
|
userId: E.data.userId,
|
|
2182
2182
|
username: E.data.username
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
|
-
}), !0) : (
|
|
2185
|
+
}), !0) : (P(Ee), !1);
|
|
2186
2186
|
} catch {
|
|
2187
|
-
return await
|
|
2187
|
+
return await ne({
|
|
2188
2188
|
accessToken: c,
|
|
2189
2189
|
clientId: r,
|
|
2190
2190
|
type: re.VERIFY_AUTHENTICATION,
|
|
2191
2191
|
params: {
|
|
2192
2192
|
clientId: r,
|
|
2193
|
-
id:
|
|
2193
|
+
id: v,
|
|
2194
2194
|
authentication: {},
|
|
2195
2195
|
nonce: y,
|
|
2196
|
-
domain:
|
|
2196
|
+
domain: n
|
|
2197
2197
|
}
|
|
2198
|
-
}),
|
|
2198
|
+
}), P(Ee), !1;
|
|
2199
2199
|
}
|
|
2200
2200
|
return !1;
|
|
2201
2201
|
};
|
|
2202
|
-
return /* @__PURE__ */ l(
|
|
2203
|
-
|
|
2202
|
+
return /* @__PURE__ */ l(ua.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
|
|
2203
|
+
nr.Provider,
|
|
2204
2204
|
{
|
|
2205
2205
|
value: {
|
|
2206
2206
|
...o,
|
|
2207
|
-
login:
|
|
2207
|
+
login: Me,
|
|
2208
2208
|
logout: Ue,
|
|
2209
|
-
getAccessToken:
|
|
2210
|
-
getIdToken:
|
|
2209
|
+
getAccessToken: C,
|
|
2210
|
+
getIdToken: H,
|
|
2211
2211
|
registeringForPasskey: He,
|
|
2212
2212
|
loginWithPasskey: pe
|
|
2213
2213
|
},
|
|
2214
2214
|
children: e
|
|
2215
2215
|
}
|
|
2216
2216
|
) });
|
|
2217
|
-
}, Ze = (e =
|
|
2218
|
-
function
|
|
2217
|
+
}, Ze = (e = nr) => St(e), Go = "user", Bo = "assistant", Wo = "system", Vo = "internal", Fo = "hidden", Jo = "I'm having trouble right now. Please try again later.", Yo = "gpt-4", jo = 128e3, zo = "action-message", qo = "action-reset", Qo = "action-model", Xo = "action-restore", Zo = "action-location", es = "action-streaming", ts = "action-search", rs = "action-sort", ns = "sassy-saint-", as = "details", os = "search", ss = "sort", is = "location", cs = "==stats==", pa = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", bt = (e) => Number.isFinite(e) ? e : 0;
|
|
2218
|
+
function ga(e) {
|
|
2219
2219
|
return {
|
|
2220
2220
|
days: Math.trunc(e / 864e5),
|
|
2221
2221
|
hours: Math.trunc(e / 36e5 % 24),
|
|
@@ -2226,7 +2226,7 @@ function gn(e) {
|
|
|
2226
2226
|
nanoseconds: Math.trunc(bt(e * 1e6) % 1e3)
|
|
2227
2227
|
};
|
|
2228
2228
|
}
|
|
2229
|
-
function
|
|
2229
|
+
function fa(e) {
|
|
2230
2230
|
return {
|
|
2231
2231
|
days: e / 86400000n,
|
|
2232
2232
|
hours: e / 3600000n % 24n,
|
|
@@ -2237,46 +2237,46 @@ function fn(e) {
|
|
|
2237
2237
|
nanoseconds: 0n
|
|
2238
2238
|
};
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2240
|
+
function ya(e) {
|
|
2241
2241
|
switch (typeof e) {
|
|
2242
2242
|
case "number": {
|
|
2243
2243
|
if (Number.isFinite(e))
|
|
2244
|
-
return
|
|
2244
|
+
return ga(e);
|
|
2245
2245
|
break;
|
|
2246
2246
|
}
|
|
2247
2247
|
case "bigint":
|
|
2248
|
-
return
|
|
2248
|
+
return fa(e);
|
|
2249
2249
|
}
|
|
2250
2250
|
throw new TypeError("Expected a finite number or bigint");
|
|
2251
2251
|
}
|
|
2252
|
-
const
|
|
2253
|
-
function
|
|
2252
|
+
const ba = (e) => e === 0 || e === 0n, wa = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ea = 1e-7, Ta = 24n * 60n * 60n * 1000n;
|
|
2253
|
+
function va(e, t) {
|
|
2254
2254
|
const r = typeof e == "bigint";
|
|
2255
2255
|
if (!r && !Number.isFinite(e))
|
|
2256
2256
|
throw new TypeError("Expected a finite number or bigint");
|
|
2257
2257
|
t = { ...t };
|
|
2258
|
-
const
|
|
2258
|
+
const n = e < 0 ? "-" : "";
|
|
2259
2259
|
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);
|
|
2260
|
-
let
|
|
2260
|
+
let a = [];
|
|
2261
2261
|
const o = (p, h) => {
|
|
2262
|
-
const
|
|
2263
|
-
return (Math.round(
|
|
2264
|
-
}, s = (p, h,
|
|
2265
|
-
if (!((
|
|
2262
|
+
const u = Math.floor(p * 10 ** h + Ea);
|
|
2263
|
+
return (Math.round(u) / 10 ** h).toFixed(h);
|
|
2264
|
+
}, s = (p, h, u, c) => {
|
|
2265
|
+
if (!((a.length === 0 || !t.colonNotation) && ba(p) && !(t.colonNotation && u === "m"))) {
|
|
2266
2266
|
if (c ?? (c = String(p)), t.colonNotation) {
|
|
2267
|
-
const m = c.includes(".") ? c.split(".")[0].length : c.length, b =
|
|
2267
|
+
const m = c.includes(".") ? c.split(".")[0].length : c.length, b = a.length > 0 ? 2 : 1;
|
|
2268
2268
|
c = "0".repeat(Math.max(0, b - m)) + c;
|
|
2269
2269
|
} else
|
|
2270
|
-
c += t.verbose ? " " +
|
|
2271
|
-
|
|
2270
|
+
c += t.verbose ? " " + wa(h, p) : u;
|
|
2271
|
+
a.push(c);
|
|
2272
2272
|
}
|
|
2273
|
-
}, i =
|
|
2274
|
-
if (s(
|
|
2275
|
-
const p = Number(i.seconds), h = Number(i.milliseconds),
|
|
2273
|
+
}, i = ya(e), d = BigInt(i.days);
|
|
2274
|
+
if (s(d / 365n, "year", "y"), s(d % 365n, "day", "d"), s(Number(i.hours), "hour", "h"), s(Number(i.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
2275
|
+
const p = Number(i.seconds), h = Number(i.milliseconds), u = Number(i.microseconds), c = Number(i.nanoseconds);
|
|
2276
2276
|
if (s(p, "second", "s"), t.formatSubMilliseconds)
|
|
2277
|
-
s(h, "millisecond", "ms"), s(
|
|
2277
|
+
s(h, "millisecond", "ms"), s(u, "microsecond", "µs"), s(c, "nanosecond", "ns");
|
|
2278
2278
|
else {
|
|
2279
|
-
const m = h +
|
|
2279
|
+
const m = h + u / 1e3 + c / 1e6, b = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = m >= 1 ? Math.round(m) : Math.ceil(m), T = b ? m.toFixed(b) : w;
|
|
2280
2280
|
s(
|
|
2281
2281
|
Number.parseFloat(T),
|
|
2282
2282
|
"millisecond",
|
|
@@ -2285,33 +2285,33 @@ function Sn(e, t) {
|
|
|
2285
2285
|
);
|
|
2286
2286
|
}
|
|
2287
2287
|
} else {
|
|
2288
|
-
const p = (r ? Number(e %
|
|
2288
|
+
const p = (r ? Number(e % Ta) : e) / 1e3 % 60, h = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, u = o(p, h), c = t.keepDecimalsOnWholeSeconds ? u : u.replace(/\.0+$/, "");
|
|
2289
2289
|
s(Number.parseFloat(c), "second", "s", c);
|
|
2290
2290
|
}
|
|
2291
|
-
if (
|
|
2292
|
-
return
|
|
2291
|
+
if (a.length === 0)
|
|
2292
|
+
return n + "0" + (t.verbose ? " milliseconds" : "ms");
|
|
2293
2293
|
const g = t.colonNotation ? ":" : " ";
|
|
2294
|
-
return typeof t.unitCount == "number" && (
|
|
2294
|
+
return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), n + a.join(g);
|
|
2295
2295
|
}
|
|
2296
|
-
const
|
|
2297
|
-
const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N",
|
|
2296
|
+
const Sa = process.env.NODE_ENV === "production", et = !Sa, Ia = et ? "gizmette.local.com" : "gizmette.com", ls = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, ar = (e, t) => {
|
|
2297
|
+
const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", n = 0 | Math.abs(e), a = 0 | Math.abs(e) * 60 % 60, o = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
|
|
2298
2298
|
return {
|
|
2299
2299
|
dir: r,
|
|
2300
|
-
deg:
|
|
2301
|
-
min:
|
|
2300
|
+
deg: n,
|
|
2301
|
+
min: a,
|
|
2302
2302
|
sec: o
|
|
2303
2303
|
};
|
|
2304
|
-
},
|
|
2304
|
+
}, ds = (e) => {
|
|
2305
2305
|
if (!e && e !== 0)
|
|
2306
2306
|
return "N/A";
|
|
2307
2307
|
const t = ar(e, !1);
|
|
2308
2308
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
2309
|
-
},
|
|
2309
|
+
}, us = (e) => {
|
|
2310
2310
|
if (!e && e !== 0)
|
|
2311
2311
|
return "N/A";
|
|
2312
2312
|
const t = ar(e, !0);
|
|
2313
2313
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
2314
|
-
},
|
|
2314
|
+
}, ms = async () => {
|
|
2315
2315
|
const e = {
|
|
2316
2316
|
/**
|
|
2317
2317
|
* A boolean value that indicates the application would
|
|
@@ -2345,49 +2345,49 @@ const vn = process.env.NODE_ENV === "production", et = !vn, In = et ? "gizmette.
|
|
|
2345
2345
|
maximumAge: 6e4
|
|
2346
2346
|
};
|
|
2347
2347
|
return new Promise((t, r) => {
|
|
2348
|
-
var
|
|
2349
|
-
(
|
|
2350
|
-
(
|
|
2348
|
+
var n;
|
|
2349
|
+
(n = navigator == null ? void 0 : navigator.geolocation) == null || n.getCurrentPosition(
|
|
2350
|
+
(a) => {
|
|
2351
2351
|
t({
|
|
2352
|
-
latitude:
|
|
2353
|
-
longitude:
|
|
2354
|
-
accuracy:
|
|
2352
|
+
latitude: a.coords.latitude,
|
|
2353
|
+
longitude: a.coords.longitude,
|
|
2354
|
+
accuracy: a.coords.accuracy
|
|
2355
2355
|
});
|
|
2356
2356
|
},
|
|
2357
|
-
(
|
|
2358
|
-
r(
|
|
2357
|
+
(a) => {
|
|
2358
|
+
r(a);
|
|
2359
2359
|
},
|
|
2360
2360
|
e
|
|
2361
2361
|
);
|
|
2362
2362
|
});
|
|
2363
|
-
},
|
|
2363
|
+
}, hs = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ S("div", { className: "flex items-center justify-between", children: [
|
|
2364
2364
|
/* @__PURE__ */ l("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2365
2365
|
/* @__PURE__ */ l("dd", { className: "inline-block", children: t[r] })
|
|
2366
2366
|
] }) }, `${e}-${r}`)) : null;
|
|
2367
|
-
function
|
|
2367
|
+
function ps({
|
|
2368
2368
|
data: e,
|
|
2369
2369
|
formatter: t = (r) => r
|
|
2370
2370
|
}) {
|
|
2371
2371
|
const r = e.filter(
|
|
2372
|
-
(
|
|
2373
|
-
),
|
|
2374
|
-
(
|
|
2372
|
+
(a) => typeof a == "number" && a > 0
|
|
2373
|
+
), n = r.reduce(
|
|
2374
|
+
(a, o) => (a || 0) + (o || 0),
|
|
2375
2375
|
0
|
|
2376
2376
|
);
|
|
2377
|
-
return t(
|
|
2377
|
+
return t(n ? n / r.length : 0);
|
|
2378
2378
|
}
|
|
2379
|
-
const
|
|
2379
|
+
const gs = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, fs = new Intl.NumberFormat("en", {
|
|
2380
2380
|
style: "decimal",
|
|
2381
2381
|
signDisplay: "never",
|
|
2382
2382
|
minimumFractionDigits: 0,
|
|
2383
2383
|
maximumFractionDigits: 0
|
|
2384
|
-
}),
|
|
2384
|
+
}), ys = (e) => va(e, {
|
|
2385
2385
|
secondsDecimalDigits: 2,
|
|
2386
2386
|
unitCount: 2
|
|
2387
|
-
}),
|
|
2387
|
+
}), Aa = (e) => f(
|
|
2388
2388
|
"flex-1 space-y-6 overflow-y-auto rounded-md bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
|
|
2389
2389
|
e || et ? "pt-4" : "pt-10"
|
|
2390
|
-
),
|
|
2390
|
+
), bs = (e, t) => t === 1 ? e : `${e}s`, $e = (e) => {
|
|
2391
2391
|
let t = "";
|
|
2392
2392
|
if (typeof e == "number" || typeof e == "string")
|
|
2393
2393
|
t = "m-" + e;
|
|
@@ -2396,49 +2396,49 @@ const ms = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2396
2396
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
2397
2397
|
}
|
|
2398
2398
|
return t;
|
|
2399
|
-
},
|
|
2399
|
+
}, ws = "av-bubble", wt = "av-button", Ae = "av-card", ka = "av-footer", _a = "av-main", Es = "av-messagebox", Ts = "av-panel", vs = "av-spinner", or = "icon", sr = "button", Ra = "link", Na = ({
|
|
2400
2400
|
type: e,
|
|
2401
2401
|
size: t,
|
|
2402
2402
|
labelRight: r,
|
|
2403
|
-
labelLeft:
|
|
2404
|
-
align:
|
|
2403
|
+
labelLeft: n,
|
|
2404
|
+
align: a
|
|
2405
2405
|
}) => {
|
|
2406
2406
|
const o = "text-sm font-medium max-h-8 py-0", s = "text-base font-medium max-h-9 py-1", i = "text-lg font-medium max-h-12 py-2";
|
|
2407
2407
|
switch (e) {
|
|
2408
|
-
case
|
|
2408
|
+
case sr:
|
|
2409
2409
|
return f("px-4", {
|
|
2410
2410
|
[o]: t === "small",
|
|
2411
2411
|
[s]: t === "medium",
|
|
2412
2412
|
[i]: t === "large"
|
|
2413
2413
|
});
|
|
2414
|
-
case
|
|
2414
|
+
case Ra:
|
|
2415
2415
|
return f("px-4 text-center", {
|
|
2416
2416
|
[o]: t === "small",
|
|
2417
2417
|
[s]: t === "medium",
|
|
2418
2418
|
[i]: t === "large"
|
|
2419
2419
|
});
|
|
2420
|
-
case
|
|
2420
|
+
case or:
|
|
2421
2421
|
return f("inline-flex items-center", {
|
|
2422
|
-
"justify-center":
|
|
2423
|
-
"justify-start":
|
|
2424
|
-
"justify-end":
|
|
2425
|
-
"h-6 w-6 p-0": t === "small" && !(r ||
|
|
2426
|
-
"h-6 px-4 text-sm font-medium": t === "small" && (r ||
|
|
2427
|
-
"h-8 w-8 p-1": t === "medium" && !(r ||
|
|
2428
|
-
"h-8 px-4 text-base font-medium": t === "medium" && (r ||
|
|
2429
|
-
"h-12 w-12 p-2": t === "large" && !(r ||
|
|
2430
|
-
"h-12 px-4 text-lg font-medium": t === "large" && (r ||
|
|
2422
|
+
"justify-center": a === "center",
|
|
2423
|
+
"justify-start": a === "left",
|
|
2424
|
+
"justify-end": a === "right",
|
|
2425
|
+
"h-6 w-6 p-0": t === "small" && !(r || n),
|
|
2426
|
+
"h-6 px-4 text-sm font-medium": t === "small" && (r || n),
|
|
2427
|
+
"h-8 w-8 p-1": t === "medium" && !(r || n),
|
|
2428
|
+
"h-8 px-4 text-base font-medium": t === "medium" && (r || n),
|
|
2429
|
+
"h-12 w-12 p-2": t === "large" && !(r || n),
|
|
2430
|
+
"h-12 px-4 text-lg font-medium": t === "large" && (r || n)
|
|
2431
2431
|
});
|
|
2432
2432
|
}
|
|
2433
|
-
},
|
|
2433
|
+
}, xa = ({
|
|
2434
2434
|
mode: e,
|
|
2435
2435
|
noBackground: t,
|
|
2436
2436
|
noTruncate: r,
|
|
2437
|
-
variant:
|
|
2437
|
+
variant: n
|
|
2438
2438
|
}) => {
|
|
2439
2439
|
if (t)
|
|
2440
2440
|
return "not-prose rounded-full";
|
|
2441
|
-
if (
|
|
2441
|
+
if (n === "primary")
|
|
2442
2442
|
return f("not-prose rounded-full", {
|
|
2443
2443
|
truncate: !r,
|
|
2444
2444
|
"bg-action-dark text-copy-light": e === "dark",
|
|
@@ -2446,7 +2446,7 @@ const ms = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2446
2446
|
"bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "system",
|
|
2447
2447
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
2448
2448
|
});
|
|
2449
|
-
if (
|
|
2449
|
+
if (n === "secondary")
|
|
2450
2450
|
return f("not-prose rounded-full", {
|
|
2451
2451
|
truncate: !r,
|
|
2452
2452
|
"bg-action-dark text-copy-light": e === "light",
|
|
@@ -2454,7 +2454,7 @@ const ms = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2454
2454
|
"bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "alt-system",
|
|
2455
2455
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
2456
2456
|
});
|
|
2457
|
-
if (
|
|
2457
|
+
if (n === "danger")
|
|
2458
2458
|
return f("not-prose rounded-full", {
|
|
2459
2459
|
truncate: !r,
|
|
2460
2460
|
"bg-action-danger-dark text-copy-light": e === "dark",
|
|
@@ -2462,7 +2462,7 @@ const ms = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2462
2462
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
2463
2463
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
2464
2464
|
});
|
|
2465
|
-
},
|
|
2465
|
+
}, Ca = ({
|
|
2466
2466
|
mode: e,
|
|
2467
2467
|
disabled: t,
|
|
2468
2468
|
variant: r
|
|
@@ -2490,7 +2490,7 @@ const ms = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2490
2490
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
2491
2491
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
2492
2492
|
});
|
|
2493
|
-
},
|
|
2493
|
+
}, Oa = ({
|
|
2494
2494
|
mode: e,
|
|
2495
2495
|
disabled: t,
|
|
2496
2496
|
variant: r
|
|
@@ -2518,7 +2518,7 @@ const ms = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2518
2518
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
2519
2519
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
2520
2520
|
});
|
|
2521
|
-
},
|
|
2521
|
+
}, Pa = ({
|
|
2522
2522
|
mode: e,
|
|
2523
2523
|
noBorder: t,
|
|
2524
2524
|
variant: r
|
|
@@ -2546,25 +2546,25 @@ const ms = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2546
2546
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
2547
2547
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
2548
2548
|
});
|
|
2549
|
-
},
|
|
2549
|
+
}, Da = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2550
2550
|
"focus:outline-focus-dark": e === "dark",
|
|
2551
2551
|
"focus:outline-focus-light": e === "light",
|
|
2552
2552
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2553
2553
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2554
|
-
}),
|
|
2554
|
+
}), ir = ({
|
|
2555
2555
|
type: e,
|
|
2556
2556
|
className: t,
|
|
2557
2557
|
raw: r,
|
|
2558
|
-
mode:
|
|
2559
|
-
focusMode:
|
|
2558
|
+
mode: n,
|
|
2559
|
+
focusMode: a,
|
|
2560
2560
|
disabled: o,
|
|
2561
2561
|
fullWidth: s,
|
|
2562
2562
|
size: i,
|
|
2563
|
-
noBorder:
|
|
2563
|
+
noBorder: d,
|
|
2564
2564
|
labelRight: g,
|
|
2565
2565
|
labelLeft: p,
|
|
2566
2566
|
spacing: h,
|
|
2567
|
-
noBackground:
|
|
2567
|
+
noBackground: u,
|
|
2568
2568
|
variant: c,
|
|
2569
2569
|
noTruncate: m,
|
|
2570
2570
|
align: b
|
|
@@ -2572,122 +2572,122 @@ const ms = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2572
2572
|
wt,
|
|
2573
2573
|
t,
|
|
2574
2574
|
$e(h),
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2575
|
+
xa({ mode: n, variant: c, noBackground: u, noTruncate: m }),
|
|
2576
|
+
Na({ type: e, size: i, labelRight: g, labelLeft: p, align: b }),
|
|
2577
|
+
Pa({ mode: n, variant: c, noBorder: d }),
|
|
2578
|
+
Da({ focusMode: a }),
|
|
2579
|
+
Ca({ mode: n, variant: c, disabled: o }),
|
|
2580
|
+
Oa({ mode: n, variant: c, disabled: o }),
|
|
2581
2581
|
{
|
|
2582
2582
|
"w-full": s,
|
|
2583
2583
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2584
2584
|
}
|
|
2585
|
-
)), $
|
|
2586
|
-
var
|
|
2587
|
-
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((
|
|
2588
|
-
}, tt =
|
|
2585
|
+
)), $a = (e, t, r) => {
|
|
2586
|
+
var n;
|
|
2587
|
+
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((n = e == null ? void 0 : e.currentTarget) == null ? void 0 : n.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
2588
|
+
}, tt = W.forwardRef(
|
|
2589
2589
|
(e, t) => {
|
|
2590
|
-
const { onClick: r, noInternalClick:
|
|
2590
|
+
const { onClick: r, noInternalClick: n = !1, ...a } = e;
|
|
2591
2591
|
return /* @__PURE__ */ l(
|
|
2592
2592
|
"button",
|
|
2593
2593
|
{
|
|
2594
2594
|
ref: t,
|
|
2595
2595
|
onClick: (o) => {
|
|
2596
|
-
$
|
|
2596
|
+
$a(o, n, r);
|
|
2597
2597
|
},
|
|
2598
|
-
...
|
|
2598
|
+
...a
|
|
2599
2599
|
}
|
|
2600
2600
|
);
|
|
2601
2601
|
}
|
|
2602
2602
|
);
|
|
2603
2603
|
tt.displayName = "BaseButton";
|
|
2604
|
-
const qe =
|
|
2604
|
+
const qe = W.forwardRef(
|
|
2605
2605
|
({
|
|
2606
2606
|
children: e,
|
|
2607
2607
|
disabled: t = !1,
|
|
2608
2608
|
mode: r = "system",
|
|
2609
|
-
focusMode:
|
|
2610
|
-
fullWidth:
|
|
2609
|
+
focusMode: n = "system",
|
|
2610
|
+
fullWidth: a = !1,
|
|
2611
2611
|
className: o,
|
|
2612
2612
|
type: s = "button",
|
|
2613
2613
|
raw: i = !1,
|
|
2614
|
-
noBorder:
|
|
2614
|
+
noBorder: d = !1,
|
|
2615
2615
|
"aria-label": g,
|
|
2616
2616
|
label: p,
|
|
2617
2617
|
size: h = "medium",
|
|
2618
|
-
labelRight:
|
|
2618
|
+
labelRight: u,
|
|
2619
2619
|
labelLeft: c,
|
|
2620
2620
|
spacing: m,
|
|
2621
2621
|
noBackground: b = !1,
|
|
2622
2622
|
align: w = "center",
|
|
2623
2623
|
...T
|
|
2624
|
-
},
|
|
2625
|
-
const
|
|
2626
|
-
type:
|
|
2624
|
+
}, D) => {
|
|
2625
|
+
const F = ir({
|
|
2626
|
+
type: or,
|
|
2627
2627
|
mode: r,
|
|
2628
|
-
focusMode:
|
|
2629
|
-
fullWidth:
|
|
2628
|
+
focusMode: n,
|
|
2629
|
+
fullWidth: a,
|
|
2630
2630
|
disabled: t,
|
|
2631
2631
|
raw: i,
|
|
2632
2632
|
className: o,
|
|
2633
|
-
noBorder:
|
|
2633
|
+
noBorder: d,
|
|
2634
2634
|
size: h,
|
|
2635
|
-
labelRight:
|
|
2635
|
+
labelRight: u,
|
|
2636
2636
|
labelLeft: c,
|
|
2637
2637
|
spacing: m,
|
|
2638
2638
|
noBackground: b,
|
|
2639
2639
|
align: w
|
|
2640
|
-
}),
|
|
2640
|
+
}), O = f({
|
|
2641
2641
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2642
2642
|
"text-copy-light": r === "dark" && !i,
|
|
2643
2643
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2644
2644
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2645
2645
|
});
|
|
2646
|
-
return /* @__PURE__ */
|
|
2646
|
+
return /* @__PURE__ */ S(
|
|
2647
2647
|
tt,
|
|
2648
2648
|
{
|
|
2649
|
-
ref:
|
|
2650
|
-
className:
|
|
2649
|
+
ref: D,
|
|
2650
|
+
className: F,
|
|
2651
2651
|
disabled: t,
|
|
2652
2652
|
type: s,
|
|
2653
2653
|
"aria-label": g || p,
|
|
2654
2654
|
...T,
|
|
2655
2655
|
children: [
|
|
2656
2656
|
c && /* @__PURE__ */ l("span", { className: "pr-2", children: c }),
|
|
2657
|
-
/* @__PURE__ */ l("div", { className:
|
|
2658
|
-
|
|
2657
|
+
/* @__PURE__ */ l("div", { className: O, children: e }),
|
|
2658
|
+
u && /* @__PURE__ */ l("span", { className: "pl-2", children: u })
|
|
2659
2659
|
]
|
|
2660
2660
|
}
|
|
2661
2661
|
);
|
|
2662
2662
|
}
|
|
2663
2663
|
);
|
|
2664
2664
|
qe.displayName = "ButtonIcon";
|
|
2665
|
-
const
|
|
2665
|
+
const cr = W.forwardRef(
|
|
2666
2666
|
({
|
|
2667
2667
|
children: e,
|
|
2668
2668
|
disabled: t = !1,
|
|
2669
2669
|
mode: r = "system",
|
|
2670
|
-
focusMode:
|
|
2671
|
-
fullWidth:
|
|
2670
|
+
focusMode: n = "system",
|
|
2671
|
+
fullWidth: a = !1,
|
|
2672
2672
|
className: o,
|
|
2673
2673
|
size: s = "medium",
|
|
2674
2674
|
raw: i = !1,
|
|
2675
|
-
noBorder:
|
|
2675
|
+
noBorder: d = !1,
|
|
2676
2676
|
spacing: g,
|
|
2677
2677
|
variant: p = "primary",
|
|
2678
2678
|
noTruncate: h = !1,
|
|
2679
|
-
...
|
|
2679
|
+
...u
|
|
2680
2680
|
}, c) => {
|
|
2681
|
-
const m =
|
|
2682
|
-
type:
|
|
2681
|
+
const m = ir({
|
|
2682
|
+
type: sr,
|
|
2683
2683
|
mode: r,
|
|
2684
|
-
focusMode:
|
|
2685
|
-
fullWidth:
|
|
2684
|
+
focusMode: n,
|
|
2685
|
+
fullWidth: a,
|
|
2686
2686
|
disabled: t,
|
|
2687
2687
|
raw: i,
|
|
2688
2688
|
className: o,
|
|
2689
2689
|
size: s,
|
|
2690
|
-
noBorder:
|
|
2690
|
+
noBorder: d,
|
|
2691
2691
|
spacing: g,
|
|
2692
2692
|
variant: p,
|
|
2693
2693
|
noTruncate: h
|
|
@@ -2698,32 +2698,32 @@ const ir = B.forwardRef(
|
|
|
2698
2698
|
ref: c,
|
|
2699
2699
|
className: m,
|
|
2700
2700
|
disabled: t,
|
|
2701
|
-
...
|
|
2701
|
+
...u,
|
|
2702
2702
|
children: e
|
|
2703
2703
|
}
|
|
2704
2704
|
);
|
|
2705
2705
|
}
|
|
2706
2706
|
);
|
|
2707
|
-
|
|
2708
|
-
function
|
|
2707
|
+
cr.displayName = "Button";
|
|
2708
|
+
function La(e) {
|
|
2709
2709
|
const t = It();
|
|
2710
2710
|
return `${e}${t}`;
|
|
2711
2711
|
}
|
|
2712
|
-
const
|
|
2712
|
+
const Ma = ({
|
|
2713
2713
|
className: e,
|
|
2714
2714
|
headerClassName: t,
|
|
2715
2715
|
bodyClassName: r,
|
|
2716
|
-
footerClassName:
|
|
2717
|
-
spacing:
|
|
2716
|
+
footerClassName: n,
|
|
2717
|
+
spacing: a,
|
|
2718
2718
|
mode: o,
|
|
2719
2719
|
compact: s,
|
|
2720
2720
|
noBorder: i
|
|
2721
2721
|
}) => {
|
|
2722
|
-
const
|
|
2722
|
+
const d = f(
|
|
2723
2723
|
Ae,
|
|
2724
2724
|
e,
|
|
2725
2725
|
"rounded-md",
|
|
2726
|
-
$e(
|
|
2726
|
+
$e(a),
|
|
2727
2727
|
{
|
|
2728
2728
|
"border-none": i,
|
|
2729
2729
|
"border-2": !i,
|
|
@@ -2743,59 +2743,59 @@ const Ln = ({
|
|
|
2743
2743
|
"border-border-accent dark:border-border-medium": o === "alt-system",
|
|
2744
2744
|
"mb-4": !s,
|
|
2745
2745
|
"mb-2": s
|
|
2746
|
-
}), p = f(r), h =
|
|
2746
|
+
}), p = f(r), h = n || f(`${Ae}__footer pt-2`);
|
|
2747
2747
|
return {
|
|
2748
|
-
wrapper:
|
|
2748
|
+
wrapper: d,
|
|
2749
2749
|
header: g,
|
|
2750
2750
|
body: p,
|
|
2751
2751
|
footer: h
|
|
2752
2752
|
};
|
|
2753
2753
|
};
|
|
2754
|
-
function
|
|
2754
|
+
function Ua({
|
|
2755
2755
|
id: e,
|
|
2756
2756
|
content: t,
|
|
2757
2757
|
userAriaLabelledby: r,
|
|
2758
|
-
className:
|
|
2758
|
+
className: n
|
|
2759
2759
|
}) {
|
|
2760
|
-
return typeof t == "string" ? /* @__PURE__ */ l("h2", { id: e, className:
|
|
2760
|
+
return typeof t == "string" ? /* @__PURE__ */ l("h2", { id: e, className: n, children: t }) : r ? /* @__PURE__ */ l("div", { className: n, children: t }) : t ? /* @__PURE__ */ l("div", { className: n, id: e, children: t }) : null;
|
|
2761
2761
|
}
|
|
2762
|
-
const
|
|
2762
|
+
const Ha = ({
|
|
2763
2763
|
header: e,
|
|
2764
2764
|
headerClassName: t,
|
|
2765
2765
|
footer: r,
|
|
2766
|
-
footerClassName:
|
|
2767
|
-
children:
|
|
2766
|
+
footerClassName: n,
|
|
2767
|
+
children: a,
|
|
2768
2768
|
className: o,
|
|
2769
2769
|
bodyClassName: s,
|
|
2770
2770
|
"aria-labelledby": i,
|
|
2771
|
-
spacing:
|
|
2771
|
+
spacing: d,
|
|
2772
2772
|
mode: g = "system",
|
|
2773
2773
|
compact: p = !1,
|
|
2774
2774
|
noBorder: h = !1,
|
|
2775
|
-
...
|
|
2775
|
+
...u
|
|
2776
2776
|
}) => {
|
|
2777
2777
|
let c = null, m = null;
|
|
2778
|
-
const b = typeof e == "string", w =
|
|
2778
|
+
const b = typeof e == "string", w = La(Ae), T = Ma({
|
|
2779
2779
|
className: o,
|
|
2780
2780
|
headerClassName: t,
|
|
2781
2781
|
bodyClassName: s,
|
|
2782
|
-
footerClassName:
|
|
2783
|
-
spacing:
|
|
2782
|
+
footerClassName: n,
|
|
2783
|
+
spacing: d,
|
|
2784
2784
|
mode: g,
|
|
2785
2785
|
compact: p,
|
|
2786
2786
|
noBorder: h
|
|
2787
2787
|
});
|
|
2788
|
-
return b ? (c = w, m = c) : !b && e && i ? (c = null, m = i) : !b && e && !i ? (c = w, m = c) : (c = null, m = i || null), /* @__PURE__ */ l("div", { className: T.wrapper, children: /* @__PURE__ */
|
|
2788
|
+
return b ? (c = w, m = c) : !b && e && i ? (c = null, m = i) : !b && e && !i ? (c = w, m = c) : (c = null, m = i || null), /* @__PURE__ */ l("div", { className: T.wrapper, children: /* @__PURE__ */ S(
|
|
2789
2789
|
"section",
|
|
2790
2790
|
{
|
|
2791
2791
|
...m && {
|
|
2792
2792
|
"aria-labelledby": m
|
|
2793
2793
|
},
|
|
2794
2794
|
className: T.body,
|
|
2795
|
-
...
|
|
2795
|
+
...u,
|
|
2796
2796
|
children: [
|
|
2797
2797
|
/* @__PURE__ */ l(
|
|
2798
|
-
|
|
2798
|
+
Ua,
|
|
2799
2799
|
{
|
|
2800
2800
|
...c && { id: c },
|
|
2801
2801
|
content: e,
|
|
@@ -2803,76 +2803,76 @@ const Hn = ({
|
|
|
2803
2803
|
userAriaLabelledby: i
|
|
2804
2804
|
}
|
|
2805
2805
|
),
|
|
2806
|
-
/* @__PURE__ */ l("div", { children:
|
|
2806
|
+
/* @__PURE__ */ l("div", { children: a }),
|
|
2807
2807
|
r ? /* @__PURE__ */ l("div", { className: T.footer, children: r }) : null
|
|
2808
2808
|
]
|
|
2809
2809
|
}
|
|
2810
2810
|
) });
|
|
2811
|
-
},
|
|
2811
|
+
}, Ka = ({
|
|
2812
2812
|
className: e,
|
|
2813
2813
|
mode: t = "system",
|
|
2814
2814
|
row1: r,
|
|
2815
|
-
row2:
|
|
2816
|
-
noMargins:
|
|
2815
|
+
row2: n,
|
|
2816
|
+
noMargins: a = !1,
|
|
2817
2817
|
spacing: o,
|
|
2818
2818
|
raw: s = !1
|
|
2819
2819
|
}) => {
|
|
2820
|
-
const i = f(
|
|
2820
|
+
const i = f(ka, e, $e(o), {
|
|
2821
2821
|
"text-copy-dark": !s && t === "dark",
|
|
2822
2822
|
"text-copy-lighter": !s && t === "light",
|
|
2823
2823
|
"text-copy-dark dark:text-copy-lighter": !s && t === "system",
|
|
2824
2824
|
"text-copy-lighter dark:text-copy-dark": !s && t === "alt-system",
|
|
2825
|
-
"mb-[100px]": !
|
|
2825
|
+
"mb-[100px]": !a && !s,
|
|
2826
2826
|
"mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !s
|
|
2827
2827
|
});
|
|
2828
|
-
return /* @__PURE__ */
|
|
2828
|
+
return /* @__PURE__ */ S("footer", { className: i, children: [
|
|
2829
2829
|
r && /* @__PURE__ */ l("div", { children: r }),
|
|
2830
|
-
|
|
2830
|
+
n && /* @__PURE__ */ l("div", { children: n })
|
|
2831
2831
|
] });
|
|
2832
|
-
},
|
|
2832
|
+
}, Ga = ({
|
|
2833
2833
|
children: e,
|
|
2834
2834
|
className: t,
|
|
2835
2835
|
raw: r = !1,
|
|
2836
|
-
spacing:
|
|
2836
|
+
spacing: n
|
|
2837
2837
|
}) => {
|
|
2838
|
-
const
|
|
2838
|
+
const a = f(t, _a, $e(n), {
|
|
2839
2839
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2840
2840
|
});
|
|
2841
|
-
return /* @__PURE__ */ l("main", { className:
|
|
2841
|
+
return /* @__PURE__ */ l("main", { className: a, children: e });
|
|
2842
2842
|
};
|
|
2843
2843
|
/*!
|
|
2844
|
-
@versini/ui-components v5.21.
|
|
2844
|
+
@versini/ui-components v5.21.1
|
|
2845
2845
|
© 2024 gizmette.com
|
|
2846
2846
|
*/
|
|
2847
2847
|
try {
|
|
2848
2848
|
window.__VERSINI_UI_GLOBAL__ || (window.__VERSINI_UI_GLOBAL__ = {
|
|
2849
|
-
version: "5.21.
|
|
2850
|
-
buildTime: "07/
|
|
2849
|
+
version: "5.21.1",
|
|
2850
|
+
buildTime: "08/07/2024 09:49 AM EDT",
|
|
2851
2851
|
homepage: "https://github.com/aversini/ui-components",
|
|
2852
2852
|
license: "MIT"
|
|
2853
2853
|
});
|
|
2854
2854
|
} catch {
|
|
2855
2855
|
}
|
|
2856
|
-
function
|
|
2857
|
-
return
|
|
2856
|
+
function Ba(e) {
|
|
2857
|
+
return At(() => e.every((t) => t == null) ? () => {
|
|
2858
2858
|
} : (t) => {
|
|
2859
2859
|
e.forEach((r) => {
|
|
2860
2860
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
2861
2861
|
});
|
|
2862
2862
|
}, e);
|
|
2863
2863
|
}
|
|
2864
|
-
function
|
|
2864
|
+
function Wa(e) {
|
|
2865
2865
|
const t = It();
|
|
2866
2866
|
if (!e)
|
|
2867
2867
|
return t;
|
|
2868
2868
|
if (typeof e == "number" || typeof e == "string")
|
|
2869
2869
|
return `${e}${t}`;
|
|
2870
2870
|
if (typeof e == "object") {
|
|
2871
|
-
const { id: r, prefix:
|
|
2872
|
-
return typeof r == "number" || typeof r == "string" ? `${
|
|
2871
|
+
const { id: r, prefix: n = "" } = e;
|
|
2872
|
+
return typeof r == "number" || typeof r == "string" ? `${n}${r}` : `${n}${t}`;
|
|
2873
2873
|
}
|
|
2874
2874
|
}
|
|
2875
|
-
const
|
|
2875
|
+
const lr = "SET_ANNOUNCEMENT", dr = "CLEAR_ANNOUNCEMENT", Va = {
|
|
2876
2876
|
alert: null,
|
|
2877
2877
|
alertdialog: null,
|
|
2878
2878
|
log: "polite",
|
|
@@ -2880,14 +2880,14 @@ const cr = "SET_ANNOUNCEMENT", lr = "CLEAR_ANNOUNCEMENT", Vn = {
|
|
|
2880
2880
|
progressbar: null,
|
|
2881
2881
|
status: "polite",
|
|
2882
2882
|
timer: "assertive"
|
|
2883
|
-
},
|
|
2883
|
+
}, Fa = (e, t) => {
|
|
2884
2884
|
switch (t == null ? void 0 : t.type) {
|
|
2885
|
-
case
|
|
2885
|
+
case lr:
|
|
2886
2886
|
return {
|
|
2887
2887
|
...e,
|
|
2888
2888
|
announcement: t.payload
|
|
2889
2889
|
};
|
|
2890
|
-
case
|
|
2890
|
+
case dr:
|
|
2891
2891
|
return {
|
|
2892
2892
|
...e,
|
|
2893
2893
|
announcement: null
|
|
@@ -2895,81 +2895,81 @@ const cr = "SET_ANNOUNCEMENT", lr = "CLEAR_ANNOUNCEMENT", Vn = {
|
|
|
2895
2895
|
default:
|
|
2896
2896
|
return e;
|
|
2897
2897
|
}
|
|
2898
|
-
},
|
|
2898
|
+
}, Ja = ({
|
|
2899
2899
|
onAnnouncementClear: e,
|
|
2900
2900
|
dispatch: t
|
|
2901
2901
|
}) => {
|
|
2902
2902
|
t({
|
|
2903
|
-
type:
|
|
2903
|
+
type: dr
|
|
2904
2904
|
}), typeof e == "function" && e();
|
|
2905
2905
|
}, Et = ({
|
|
2906
2906
|
children: e,
|
|
2907
2907
|
clearAnnouncementDelay: t,
|
|
2908
2908
|
clearAnnouncementTimeoutRef: r,
|
|
2909
|
-
onAnnouncementClear:
|
|
2910
|
-
dispatch:
|
|
2909
|
+
onAnnouncementClear: n,
|
|
2910
|
+
dispatch: a
|
|
2911
2911
|
}) => {
|
|
2912
|
-
(r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null &&
|
|
2913
|
-
type:
|
|
2912
|
+
(r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && a({
|
|
2913
|
+
type: lr,
|
|
2914
2914
|
payload: e
|
|
2915
2915
|
}), t && (r.current = setTimeout(
|
|
2916
|
-
() =>
|
|
2917
|
-
onAnnouncementClear:
|
|
2918
|
-
dispatch:
|
|
2916
|
+
() => Ja({
|
|
2917
|
+
onAnnouncementClear: n,
|
|
2918
|
+
dispatch: a
|
|
2919
2919
|
}),
|
|
2920
2920
|
t
|
|
2921
2921
|
));
|
|
2922
|
-
},
|
|
2922
|
+
}, Ya = ({
|
|
2923
2923
|
children: e,
|
|
2924
2924
|
announcementTimeoutRef: t,
|
|
2925
2925
|
announcementDelay: r,
|
|
2926
|
-
clearAnnouncementDelay:
|
|
2927
|
-
clearAnnouncementTimeoutRef:
|
|
2926
|
+
clearAnnouncementDelay: n,
|
|
2927
|
+
clearAnnouncementTimeoutRef: a,
|
|
2928
2928
|
onAnnouncementClear: o,
|
|
2929
2929
|
dispatch: s
|
|
2930
2930
|
}) => {
|
|
2931
2931
|
clearTimeout(t.current), r ? t.current = setTimeout(Et, r, {
|
|
2932
2932
|
children: e,
|
|
2933
|
-
clearAnnouncementDelay:
|
|
2934
|
-
clearAnnouncementTimeoutRef:
|
|
2933
|
+
clearAnnouncementDelay: n,
|
|
2934
|
+
clearAnnouncementTimeoutRef: a,
|
|
2935
2935
|
onAnnouncementClear: o,
|
|
2936
2936
|
dispatch: s
|
|
2937
2937
|
}) : Et({
|
|
2938
2938
|
children: e,
|
|
2939
|
-
clearAnnouncementDelay:
|
|
2940
|
-
clearAnnouncementTimeoutRef:
|
|
2939
|
+
clearAnnouncementDelay: n,
|
|
2940
|
+
clearAnnouncementTimeoutRef: a,
|
|
2941
2941
|
onAnnouncementClear: o,
|
|
2942
2942
|
dispatch: s
|
|
2943
2943
|
});
|
|
2944
2944
|
};
|
|
2945
|
-
function
|
|
2945
|
+
function ur({
|
|
2946
2946
|
children: e,
|
|
2947
2947
|
className: t,
|
|
2948
2948
|
politeness: r,
|
|
2949
|
-
role:
|
|
2950
|
-
announcementDelay:
|
|
2949
|
+
role: n = null,
|
|
2950
|
+
announcementDelay: a,
|
|
2951
2951
|
clearAnnouncementDelay: o,
|
|
2952
2952
|
onAnnouncementClear: s,
|
|
2953
2953
|
visible: i,
|
|
2954
|
-
...
|
|
2954
|
+
...d
|
|
2955
2955
|
}) {
|
|
2956
|
-
const g =
|
|
2956
|
+
const g = M(), p = M(), [h, u] = vt(Fa, {
|
|
2957
2957
|
announcement: null
|
|
2958
2958
|
});
|
|
2959
2959
|
let c = r;
|
|
2960
|
-
typeof c > "u" && (c =
|
|
2961
|
-
|
|
2960
|
+
typeof c > "u" && (c = n ? Va[n] : "assertive"), V(() => {
|
|
2961
|
+
Ya({
|
|
2962
2962
|
announcementTimeoutRef: g,
|
|
2963
|
-
announcementDelay:
|
|
2963
|
+
announcementDelay: a,
|
|
2964
2964
|
children: e,
|
|
2965
2965
|
clearAnnouncementDelay: o,
|
|
2966
2966
|
clearAnnouncementTimeoutRef: p,
|
|
2967
2967
|
onAnnouncementClear: s,
|
|
2968
|
-
dispatch:
|
|
2968
|
+
dispatch: u
|
|
2969
2969
|
});
|
|
2970
2970
|
}, [
|
|
2971
2971
|
e,
|
|
2972
|
-
|
|
2972
|
+
a,
|
|
2973
2973
|
o,
|
|
2974
2974
|
s
|
|
2975
2975
|
]);
|
|
@@ -2980,27 +2980,27 @@ function dr({
|
|
|
2980
2980
|
"div",
|
|
2981
2981
|
{
|
|
2982
2982
|
"aria-live": c,
|
|
2983
|
-
...
|
|
2983
|
+
...n && { role: n },
|
|
2984
2984
|
className: m,
|
|
2985
|
-
...
|
|
2985
|
+
...d,
|
|
2986
2986
|
children: h.announcement
|
|
2987
2987
|
}
|
|
2988
2988
|
);
|
|
2989
2989
|
}
|
|
2990
2990
|
/*!
|
|
2991
|
-
@versini/ui-private v1.4.
|
|
2991
|
+
@versini/ui-private v1.4.7
|
|
2992
2992
|
© 2024 gizmette.com
|
|
2993
2993
|
*/
|
|
2994
2994
|
try {
|
|
2995
2995
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
2996
|
-
version: "1.4.
|
|
2997
|
-
buildTime: "07/
|
|
2996
|
+
version: "1.4.7",
|
|
2997
|
+
buildTime: "08/07/2024 12:36 PM EDT",
|
|
2998
2998
|
homepage: "https://github.com/aversini/ui-components",
|
|
2999
2999
|
license: "MIT"
|
|
3000
3000
|
});
|
|
3001
3001
|
} catch {
|
|
3002
3002
|
}
|
|
3003
|
-
const
|
|
3003
|
+
const ja = (e) => {
|
|
3004
3004
|
let t = "";
|
|
3005
3005
|
if (typeof e == "number" || typeof e == "string")
|
|
3006
3006
|
t = "m-" + e;
|
|
@@ -3009,21 +3009,52 @@ const jn = (e) => {
|
|
|
3009
3009
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
3010
3010
|
}
|
|
3011
3011
|
return t;
|
|
3012
|
-
},
|
|
3012
|
+
}, mr = "av-text-input", za = "av-text-input-wrapper", je = "av-text-input-helper-text", Ss = "av-text-area", Is = "av-text-area-wrapper", As = "av-text-area-helper-text", ks = "av-text-area__control--right", _s = "av-toggle";
|
|
3013
|
+
function qa() {
|
|
3014
|
+
const e = M(!1);
|
|
3015
|
+
return V(() => (e.current = !0, () => {
|
|
3016
|
+
e.current = !1;
|
|
3017
|
+
}), []), q(() => e.current, []);
|
|
3018
|
+
}
|
|
3019
|
+
const Qa = {
|
|
3020
|
+
x: 0,
|
|
3021
|
+
y: 0,
|
|
3022
|
+
width: 0,
|
|
3023
|
+
height: 0,
|
|
3024
|
+
top: 0,
|
|
3025
|
+
left: 0,
|
|
3026
|
+
bottom: 0,
|
|
3027
|
+
right: 0
|
|
3028
|
+
};
|
|
3029
|
+
function Xa(e) {
|
|
3030
|
+
const t = qa(), r = M(0), n = M(null), [a, o] = j(Qa), s = At(
|
|
3031
|
+
() => typeof window < "u" ? new ResizeObserver((i) => {
|
|
3032
|
+
const d = i[0];
|
|
3033
|
+
d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3034
|
+
n.current && t() && o(d.contentRect);
|
|
3035
|
+
}));
|
|
3036
|
+
}) : null,
|
|
3037
|
+
[t]
|
|
3038
|
+
);
|
|
3039
|
+
return V(() => (n.current && (s == null || s.observe(n.current, e)), () => {
|
|
3040
|
+
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3041
|
+
}), [s, e]), [n, a];
|
|
3042
|
+
}
|
|
3043
|
+
const Za = ({
|
|
3013
3044
|
mode: e
|
|
3014
3045
|
}) => f({
|
|
3015
3046
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3016
3047
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3017
3048
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3018
3049
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3019
|
-
}),
|
|
3050
|
+
}), eo = ({
|
|
3020
3051
|
focusMode: e
|
|
3021
3052
|
}) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3022
3053
|
"focus:outline-focus-dark": e === "dark",
|
|
3023
3054
|
"focus:outline-focus-light": e === "light",
|
|
3024
3055
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3025
3056
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3026
|
-
}),
|
|
3057
|
+
}), to = ({
|
|
3027
3058
|
noBorder: e,
|
|
3028
3059
|
error: t
|
|
3029
3060
|
}) => f("border-2", {
|
|
@@ -3031,11 +3062,11 @@ const jn = (e) => {
|
|
|
3031
3062
|
"focus:border-border-dark": !e && t,
|
|
3032
3063
|
"border-border-error-dark": !e && t,
|
|
3033
3064
|
"border-transparent": e
|
|
3034
|
-
}),
|
|
3065
|
+
}), ro = ({
|
|
3035
3066
|
disabled: e,
|
|
3036
3067
|
raw: t,
|
|
3037
3068
|
error: r,
|
|
3038
|
-
mode:
|
|
3069
|
+
mode: n
|
|
3039
3070
|
}) => {
|
|
3040
3071
|
if (t)
|
|
3041
3072
|
return "";
|
|
@@ -3043,27 +3074,27 @@ const jn = (e) => {
|
|
|
3043
3074
|
return f("absolute px-2 cursor-not-allowed opacity-50 font-medium");
|
|
3044
3075
|
if (!r)
|
|
3045
3076
|
return f("absolute px-2 cursor-text font-medium", {
|
|
3046
|
-
"text-copy-lighter":
|
|
3047
|
-
"text-copy-dark":
|
|
3048
|
-
"text-copy-dark dark:text-copy-lighter":
|
|
3049
|
-
"text-copy-lighter dark:text-copy-dark":
|
|
3077
|
+
"text-copy-lighter": n === "dark",
|
|
3078
|
+
"text-copy-dark": n === "light",
|
|
3079
|
+
"text-copy-dark dark:text-copy-lighter": n === "system",
|
|
3080
|
+
"text-copy-lighter dark:text-copy-dark": n === "alt-system"
|
|
3050
3081
|
});
|
|
3051
3082
|
if (r)
|
|
3052
3083
|
return f("absolute px-2 cursor-text font-medium", {
|
|
3053
|
-
"text-copy-lighter":
|
|
3054
|
-
"text-copy-error-dark":
|
|
3055
|
-
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker":
|
|
3056
|
-
"text-copy-lighter dark:text-copy-error-dark":
|
|
3084
|
+
"text-copy-lighter": n === "dark",
|
|
3085
|
+
"text-copy-error-dark": n === "light",
|
|
3086
|
+
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": n === "system",
|
|
3087
|
+
"text-copy-lighter dark:text-copy-error-dark": n === "alt-system"
|
|
3057
3088
|
});
|
|
3058
|
-
},
|
|
3089
|
+
}, no = ({
|
|
3059
3090
|
error: e,
|
|
3060
3091
|
raw: t,
|
|
3061
3092
|
mode: r,
|
|
3062
|
-
disabled:
|
|
3093
|
+
disabled: n
|
|
3063
3094
|
}) => {
|
|
3064
3095
|
if (t)
|
|
3065
3096
|
return "";
|
|
3066
|
-
if (
|
|
3097
|
+
if (n)
|
|
3067
3098
|
return f(
|
|
3068
3099
|
je,
|
|
3069
3100
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
@@ -3082,90 +3113,90 @@ const jn = (e) => {
|
|
|
3082
3113
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3083
3114
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3084
3115
|
});
|
|
3085
|
-
},
|
|
3116
|
+
}, ao = ({
|
|
3086
3117
|
className: e,
|
|
3087
3118
|
inputClassName: t,
|
|
3088
3119
|
raw: r,
|
|
3089
|
-
disabled:
|
|
3090
|
-
noBorder:
|
|
3120
|
+
disabled: n,
|
|
3121
|
+
noBorder: a,
|
|
3091
3122
|
error: o,
|
|
3092
3123
|
spacing: s,
|
|
3093
3124
|
mode: i,
|
|
3094
|
-
focusMode:
|
|
3125
|
+
focusMode: d
|
|
3095
3126
|
}) => {
|
|
3096
3127
|
const g = r ? e : f(
|
|
3097
3128
|
"relative flex w-full flex-col justify-center",
|
|
3098
|
-
|
|
3129
|
+
za,
|
|
3099
3130
|
e,
|
|
3100
|
-
|
|
3131
|
+
ja(s)
|
|
3101
3132
|
), p = r ? f(t) : f(
|
|
3102
|
-
|
|
3133
|
+
mr,
|
|
3103
3134
|
t,
|
|
3104
3135
|
"h-12 rounded-md px-4 text-base",
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3136
|
+
Za({ mode: i }),
|
|
3137
|
+
eo({ focusMode: d }),
|
|
3138
|
+
to({ noBorder: a, error: o }),
|
|
3108
3139
|
{
|
|
3109
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
3140
|
+
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
3110
3141
|
}
|
|
3111
|
-
), h = r ? void 0 : "sr-only",
|
|
3112
|
-
disabled:
|
|
3142
|
+
), h = r ? void 0 : "sr-only", u = ro({
|
|
3143
|
+
disabled: n,
|
|
3113
3144
|
raw: r,
|
|
3114
3145
|
error: o,
|
|
3115
3146
|
mode: i
|
|
3116
|
-
}), c =
|
|
3147
|
+
}), c = no({
|
|
3117
3148
|
error: o,
|
|
3118
3149
|
raw: r,
|
|
3119
3150
|
mode: i,
|
|
3120
|
-
disabled:
|
|
3151
|
+
disabled: n
|
|
3121
3152
|
});
|
|
3122
3153
|
return {
|
|
3123
3154
|
wrapper: g,
|
|
3124
3155
|
input: p,
|
|
3125
3156
|
accessibleLabel: h,
|
|
3126
|
-
visibleLabel:
|
|
3157
|
+
visibleLabel: u,
|
|
3127
3158
|
helperText: c,
|
|
3128
3159
|
rightElement: r ? void 0 : "absolute right-3"
|
|
3129
3160
|
};
|
|
3130
|
-
}, rt =
|
|
3161
|
+
}, rt = W.forwardRef(
|
|
3131
3162
|
({
|
|
3132
3163
|
id: e,
|
|
3133
3164
|
name: t,
|
|
3134
3165
|
label: r,
|
|
3135
|
-
error:
|
|
3136
|
-
raw:
|
|
3166
|
+
error: n = !1,
|
|
3167
|
+
raw: a = !1,
|
|
3137
3168
|
className: o,
|
|
3138
3169
|
inputClassName: s,
|
|
3139
3170
|
mode: i = "system",
|
|
3140
|
-
focusMode:
|
|
3171
|
+
focusMode: d = "system",
|
|
3141
3172
|
disabled: g = !1,
|
|
3142
3173
|
noBorder: p = !1,
|
|
3143
3174
|
labelId: h,
|
|
3144
|
-
labelHidden:
|
|
3175
|
+
labelHidden: u = !1,
|
|
3145
3176
|
type: c = "text",
|
|
3146
3177
|
helperText: m = "",
|
|
3147
3178
|
rightElement: b,
|
|
3148
3179
|
spacing: w,
|
|
3149
3180
|
...T
|
|
3150
|
-
},
|
|
3151
|
-
const
|
|
3181
|
+
}, D) => {
|
|
3182
|
+
const [F, O] = Xa(), [Z, J] = j(0), x = Wa({ id: e, prefix: `${mr}-` }), P = `${t} error, ${m}`, _ = ao({
|
|
3152
3183
|
className: o,
|
|
3153
3184
|
inputClassName: s,
|
|
3154
|
-
error:
|
|
3155
|
-
raw:
|
|
3156
|
-
focusMode:
|
|
3185
|
+
error: n,
|
|
3186
|
+
raw: a,
|
|
3187
|
+
focusMode: d,
|
|
3157
3188
|
disabled: g,
|
|
3158
3189
|
noBorder: p,
|
|
3159
3190
|
spacing: w,
|
|
3160
3191
|
mode: i
|
|
3161
3192
|
});
|
|
3162
3193
|
return Er(() => {
|
|
3163
|
-
|
|
3164
|
-
}, []), /* @__PURE__ */
|
|
3194
|
+
O && O.width && J(O.width + 18 + 10);
|
|
3195
|
+
}, [O]), /* @__PURE__ */ S("div", { className: _.wrapper, children: [
|
|
3165
3196
|
/* @__PURE__ */ l(
|
|
3166
3197
|
"label",
|
|
3167
3198
|
{
|
|
3168
|
-
htmlFor:
|
|
3199
|
+
htmlFor: x,
|
|
3169
3200
|
id: h,
|
|
3170
3201
|
className: _.accessibleLabel,
|
|
3171
3202
|
children: r
|
|
@@ -3174,24 +3205,24 @@ const jn = (e) => {
|
|
|
3174
3205
|
/* @__PURE__ */ l(
|
|
3175
3206
|
"input",
|
|
3176
3207
|
{
|
|
3177
|
-
ref:
|
|
3178
|
-
id:
|
|
3208
|
+
ref: D,
|
|
3209
|
+
id: x,
|
|
3179
3210
|
name: t,
|
|
3180
3211
|
type: c,
|
|
3181
3212
|
disabled: g,
|
|
3182
|
-
placeholder:
|
|
3213
|
+
placeholder: a ? void 0 : " ",
|
|
3183
3214
|
className: _.input,
|
|
3184
|
-
...m && { "aria-describedby": `${
|
|
3185
|
-
...
|
|
3186
|
-
...b && !
|
|
3215
|
+
...m && { "aria-describedby": `${x}-helper` },
|
|
3216
|
+
...n && { "aria-invalid": "true" },
|
|
3217
|
+
...b && !a && { style: { paddingRight: Z } },
|
|
3187
3218
|
...T
|
|
3188
3219
|
}
|
|
3189
3220
|
),
|
|
3190
|
-
!
|
|
3221
|
+
!a && !u && /* @__PURE__ */ l(
|
|
3191
3222
|
"label",
|
|
3192
3223
|
{
|
|
3193
3224
|
"aria-hidden": !0,
|
|
3194
|
-
htmlFor:
|
|
3225
|
+
htmlFor: x,
|
|
3195
3226
|
className: _.visibleLabel,
|
|
3196
3227
|
children: r
|
|
3197
3228
|
}
|
|
@@ -3199,7 +3230,7 @@ const jn = (e) => {
|
|
|
3199
3230
|
m && /* @__PURE__ */ l(
|
|
3200
3231
|
"div",
|
|
3201
3232
|
{
|
|
3202
|
-
id: `${
|
|
3233
|
+
id: `${x}-helper`,
|
|
3203
3234
|
className: _.helperText,
|
|
3204
3235
|
children: m
|
|
3205
3236
|
}
|
|
@@ -3207,89 +3238,89 @@ const jn = (e) => {
|
|
|
3207
3238
|
b && /* @__PURE__ */ l(
|
|
3208
3239
|
"div",
|
|
3209
3240
|
{
|
|
3210
|
-
ref:
|
|
3241
|
+
ref: F,
|
|
3211
3242
|
className: _.rightElement,
|
|
3212
3243
|
children: b
|
|
3213
3244
|
}
|
|
3214
3245
|
),
|
|
3215
|
-
|
|
3246
|
+
n && m && /* @__PURE__ */ l(ur, { politeness: "polite", clearAnnouncementDelay: 500, children: P })
|
|
3216
3247
|
] });
|
|
3217
3248
|
}
|
|
3218
3249
|
);
|
|
3219
3250
|
rt.displayName = "TextInput";
|
|
3220
|
-
const
|
|
3251
|
+
const oo = 500, so = 5e3, io = 2e4, hr = W.forwardRef(
|
|
3221
3252
|
({
|
|
3222
3253
|
name: e,
|
|
3223
3254
|
disabled: t,
|
|
3224
3255
|
label: r,
|
|
3225
|
-
labelHidden:
|
|
3226
|
-
onMaskChange:
|
|
3256
|
+
labelHidden: n,
|
|
3257
|
+
onMaskChange: a,
|
|
3227
3258
|
onChange: o,
|
|
3228
3259
|
onBlur: s,
|
|
3229
3260
|
onFocus: i,
|
|
3230
|
-
onTextInputMaskBlur:
|
|
3261
|
+
onTextInputMaskBlur: d,
|
|
3231
3262
|
rightElement: g,
|
|
3232
3263
|
spacing: p,
|
|
3233
3264
|
...h
|
|
3234
|
-
},
|
|
3265
|
+
}, u) => {
|
|
3235
3266
|
const [c, m] = j(!0), [b, w] = j({
|
|
3236
3267
|
message: null,
|
|
3237
3268
|
politeness: null
|
|
3238
|
-
}), T =
|
|
3239
|
-
clearTimeout(
|
|
3269
|
+
}), T = M(!0), D = M(), F = M(null), O = Ba([u, F]), Z = c ? "Show" : "Hide", J = () => {
|
|
3270
|
+
clearTimeout(D.current), T.current || (D.current = window.setTimeout(() => {
|
|
3240
3271
|
T.current = !0, m(!0), w({
|
|
3241
|
-
announcementTimeout:
|
|
3272
|
+
announcementTimeout: so,
|
|
3242
3273
|
politeness: "polite",
|
|
3243
3274
|
message: `${r} hiding characters`
|
|
3244
|
-
}),
|
|
3245
|
-
},
|
|
3246
|
-
},
|
|
3247
|
-
|
|
3248
|
-
const
|
|
3249
|
-
T.current =
|
|
3250
|
-
announcementTimeout:
|
|
3275
|
+
}), a && a(!0);
|
|
3276
|
+
}, io));
|
|
3277
|
+
}, x = (C) => {
|
|
3278
|
+
C.preventDefault();
|
|
3279
|
+
const H = !T.current;
|
|
3280
|
+
T.current = H, J(), m(H), w({
|
|
3281
|
+
announcementTimeout: oo,
|
|
3251
3282
|
politeness: "assertive",
|
|
3252
|
-
message:
|
|
3253
|
-
}),
|
|
3254
|
-
},
|
|
3255
|
-
var
|
|
3256
|
-
const { relatedTarget: He } =
|
|
3257
|
-
pe != null && pe.contains(He) ||
|
|
3258
|
-
},
|
|
3259
|
-
|
|
3260
|
-
},
|
|
3261
|
-
|
|
3262
|
-
}, Ue = (
|
|
3263
|
-
|
|
3283
|
+
message: H ? "Characters hidden" : "Characters showing"
|
|
3284
|
+
}), a && a(H);
|
|
3285
|
+
}, P = (C) => {
|
|
3286
|
+
var H;
|
|
3287
|
+
const { relatedTarget: He } = C, pe = (H = F.current) == null ? void 0 : H.parentElement;
|
|
3288
|
+
pe != null && pe.contains(He) || d && d();
|
|
3289
|
+
}, _ = (C) => {
|
|
3290
|
+
J(), s && s(C), P(C);
|
|
3291
|
+
}, Me = (C) => {
|
|
3292
|
+
J(), i && i(C);
|
|
3293
|
+
}, Ue = (C) => {
|
|
3294
|
+
J(), o && o(C);
|
|
3264
3295
|
};
|
|
3265
|
-
return
|
|
3266
|
-
clearTimeout(
|
|
3267
|
-
}, []), /* @__PURE__ */
|
|
3296
|
+
return V(() => () => {
|
|
3297
|
+
clearTimeout(D.current);
|
|
3298
|
+
}, []), /* @__PURE__ */ S(me, { children: [
|
|
3268
3299
|
/* @__PURE__ */ l(
|
|
3269
3300
|
rt,
|
|
3270
3301
|
{
|
|
3271
|
-
ref:
|
|
3302
|
+
ref: O,
|
|
3272
3303
|
name: e,
|
|
3273
3304
|
label: r,
|
|
3274
|
-
labelHidden:
|
|
3305
|
+
labelHidden: n,
|
|
3275
3306
|
type: c ? "password" : "text",
|
|
3276
3307
|
disabled: t,
|
|
3277
3308
|
spacing: p,
|
|
3278
|
-
onBlur:
|
|
3279
|
-
onFocus:
|
|
3309
|
+
onBlur: _,
|
|
3310
|
+
onFocus: Me,
|
|
3280
3311
|
onChange: Ue,
|
|
3281
|
-
rightElement:
|
|
3282
|
-
ref:
|
|
3312
|
+
rightElement: W.cloneElement(g, {
|
|
3313
|
+
ref: u,
|
|
3283
3314
|
label: Z,
|
|
3284
|
-
onClick:
|
|
3285
|
-
onBlur:
|
|
3315
|
+
onClick: x,
|
|
3316
|
+
onBlur: P,
|
|
3286
3317
|
disabled: t
|
|
3287
3318
|
}),
|
|
3288
3319
|
...h
|
|
3289
3320
|
}
|
|
3290
3321
|
),
|
|
3291
3322
|
/* @__PURE__ */ l(
|
|
3292
|
-
|
|
3323
|
+
ur,
|
|
3293
3324
|
{
|
|
3294
3325
|
role: "status",
|
|
3295
3326
|
politeness: b.politeness,
|
|
@@ -3300,21 +3331,21 @@ const ro = 500, ao = 5e3, no = 2e4, mr = B.forwardRef(
|
|
|
3300
3331
|
] });
|
|
3301
3332
|
}
|
|
3302
3333
|
);
|
|
3303
|
-
|
|
3334
|
+
hr.displayName = "TextInputMask";
|
|
3304
3335
|
/*!
|
|
3305
|
-
@versini/ui-form v1.3.
|
|
3336
|
+
@versini/ui-form v1.3.7
|
|
3306
3337
|
© 2024 gizmette.com
|
|
3307
3338
|
*/
|
|
3308
3339
|
try {
|
|
3309
3340
|
window.__VERSINI_UI_FORM__ || (window.__VERSINI_UI_FORM__ = {
|
|
3310
|
-
version: "1.3.
|
|
3311
|
-
buildTime: "07/
|
|
3341
|
+
version: "1.3.7",
|
|
3342
|
+
buildTime: "08/07/2024 12:37 PM EDT",
|
|
3312
3343
|
homepage: "https://github.com/aversini/ui-components",
|
|
3313
3344
|
license: "MIT"
|
|
3314
3345
|
});
|
|
3315
3346
|
} catch {
|
|
3316
3347
|
}
|
|
3317
|
-
const
|
|
3348
|
+
const co = (e) => {
|
|
3318
3349
|
let t = "";
|
|
3319
3350
|
if (typeof e == "number" || typeof e == "string")
|
|
3320
3351
|
t = "m-" + e;
|
|
@@ -3323,38 +3354,38 @@ const oo = (e) => {
|
|
|
3323
3354
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
3324
3355
|
}
|
|
3325
3356
|
return t;
|
|
3326
|
-
},
|
|
3357
|
+
}, Le = ({
|
|
3327
3358
|
children: e,
|
|
3328
3359
|
fill: t,
|
|
3329
3360
|
viewBox: r,
|
|
3330
|
-
className:
|
|
3331
|
-
defaultViewBox:
|
|
3361
|
+
className: n,
|
|
3362
|
+
defaultViewBox: a,
|
|
3332
3363
|
defaultClassName: o,
|
|
3333
3364
|
spacing: s,
|
|
3334
3365
|
title: i,
|
|
3335
|
-
semantic:
|
|
3366
|
+
semantic: d = !1,
|
|
3336
3367
|
...g
|
|
3337
3368
|
}) => {
|
|
3338
|
-
const p =
|
|
3369
|
+
const p = co(s), h = f(
|
|
3339
3370
|
p,
|
|
3340
|
-
|
|
3371
|
+
n || o
|
|
3341
3372
|
);
|
|
3342
|
-
return /* @__PURE__ */
|
|
3373
|
+
return /* @__PURE__ */ S(me, { children: [
|
|
3343
3374
|
/* @__PURE__ */ l(
|
|
3344
3375
|
"svg",
|
|
3345
3376
|
{
|
|
3346
3377
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3347
3378
|
className: h,
|
|
3348
|
-
viewBox: r ||
|
|
3379
|
+
viewBox: r || a,
|
|
3349
3380
|
fill: t || "currentColor",
|
|
3350
3381
|
role: "img",
|
|
3351
|
-
"aria-hidden": !
|
|
3382
|
+
"aria-hidden": !d,
|
|
3352
3383
|
focusable: !1,
|
|
3353
3384
|
...g,
|
|
3354
3385
|
children: e
|
|
3355
3386
|
}
|
|
3356
3387
|
),
|
|
3357
|
-
i &&
|
|
3388
|
+
i && d && /* @__PURE__ */ l("span", { className: "sr-only", children: i })
|
|
3358
3389
|
] });
|
|
3359
3390
|
};
|
|
3360
3391
|
/*!
|
|
@@ -3370,13 +3401,13 @@ try {
|
|
|
3370
3401
|
});
|
|
3371
3402
|
} catch {
|
|
3372
3403
|
}
|
|
3373
|
-
const
|
|
3404
|
+
const lo = ({
|
|
3374
3405
|
className: e,
|
|
3375
3406
|
viewBox: t,
|
|
3376
3407
|
spacing: r,
|
|
3377
|
-
...
|
|
3408
|
+
...n
|
|
3378
3409
|
}) => /* @__PURE__ */ l(
|
|
3379
|
-
|
|
3410
|
+
Le,
|
|
3380
3411
|
{
|
|
3381
3412
|
defaultViewBox: "0 0 1200 500",
|
|
3382
3413
|
defaultClassName: "w-full",
|
|
@@ -3384,7 +3415,7 @@ const so = ({
|
|
|
3384
3415
|
className: e,
|
|
3385
3416
|
spacing: r,
|
|
3386
3417
|
title: "Sassy Dog",
|
|
3387
|
-
...
|
|
3418
|
+
...n,
|
|
3388
3419
|
children: /* @__PURE__ */ l("g", { transform: "matrix(11.9092 0 0 11.9092 470.0017 250.0009)", id: "879221", children: /* @__PURE__ */ l(
|
|
3389
3420
|
"path",
|
|
3390
3421
|
{
|
|
@@ -3395,57 +3426,57 @@ const so = ({
|
|
|
3395
3426
|
}
|
|
3396
3427
|
) })
|
|
3397
3428
|
}
|
|
3398
|
-
),
|
|
3429
|
+
), uo = ({
|
|
3399
3430
|
className: e,
|
|
3400
3431
|
viewBox: t,
|
|
3401
3432
|
spacing: r,
|
|
3402
|
-
title:
|
|
3403
|
-
monotone:
|
|
3433
|
+
title: n,
|
|
3434
|
+
monotone: a,
|
|
3404
3435
|
...o
|
|
3405
|
-
}) => /* @__PURE__ */
|
|
3406
|
-
|
|
3436
|
+
}) => /* @__PURE__ */ S(
|
|
3437
|
+
Le,
|
|
3407
3438
|
{
|
|
3408
3439
|
defaultViewBox: "0 0 640 512",
|
|
3409
3440
|
defaultClassName: "size-5",
|
|
3410
3441
|
viewBox: t,
|
|
3411
3442
|
className: e,
|
|
3412
3443
|
spacing: r,
|
|
3413
|
-
title:
|
|
3444
|
+
title: n || "Hide",
|
|
3414
3445
|
...o,
|
|
3415
3446
|
children: [
|
|
3416
3447
|
/* @__PURE__ */ l(
|
|
3417
3448
|
"path",
|
|
3418
3449
|
{
|
|
3419
|
-
opacity:
|
|
3450
|
+
opacity: a ? "1" : "0.4",
|
|
3420
3451
|
d: "M360.8 380.3C339.4 392.8 314.6 400 288 400c-79.5 0-144-64.5-144-144c0-14.5 2.1-28.5 6.1-41.7L63.5 146c-29.4 34.7-49.9 70.8-61.1 97.6c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480c56.1 0 104.4-17.8 144.5-43.2l-71.7-56.5zM198.5 252.4c-3.7 .8-6.7 3.7-6.5 7.7c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9c1.9-.5 3.9-1.1 5.7-1.7l-120-94.6zm89-52.4l94.8 74.3c2.7-13.9 2.4-28.6-1.5-43.2c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3c0 2.7-.2 5.4-.5 8zM432 256c0 17.7-3.2 34.6-9 50.2l84.1 65.9c32.3-36.6 54.6-75.4 66.4-103.9c3.3-7.9 3.3-16.7 0-24.6c-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.7L207 136.9c23.1-15.7 51-24.9 81-24.9c79.5 0 144 64.5 144 144z"
|
|
3421
3452
|
}
|
|
3422
3453
|
),
|
|
3423
3454
|
/* @__PURE__ */ l("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.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
|
|
3424
3455
|
]
|
|
3425
3456
|
}
|
|
3426
|
-
),
|
|
3457
|
+
), mo = ({
|
|
3427
3458
|
className: e,
|
|
3428
3459
|
viewBox: t,
|
|
3429
3460
|
spacing: r,
|
|
3430
|
-
title:
|
|
3431
|
-
monotone:
|
|
3461
|
+
title: n,
|
|
3462
|
+
monotone: a,
|
|
3432
3463
|
...o
|
|
3433
|
-
}) => /* @__PURE__ */
|
|
3434
|
-
|
|
3464
|
+
}) => /* @__PURE__ */ S(
|
|
3465
|
+
Le,
|
|
3435
3466
|
{
|
|
3436
3467
|
defaultViewBox: "0 0 512 512",
|
|
3437
3468
|
defaultClassName: "size-5",
|
|
3438
3469
|
viewBox: t,
|
|
3439
3470
|
className: e,
|
|
3440
3471
|
spacing: r,
|
|
3441
|
-
title:
|
|
3472
|
+
title: n || "Key",
|
|
3442
3473
|
...o,
|
|
3443
3474
|
children: [
|
|
3444
3475
|
/* @__PURE__ */ l(
|
|
3445
3476
|
"path",
|
|
3446
3477
|
{
|
|
3447
3478
|
className: "fa-secondary",
|
|
3448
|
-
opacity:
|
|
3479
|
+
opacity: a ? "1" : "0.4",
|
|
3449
3480
|
d: "M168.3 229.7L282.3 343.7l0 0s0 0 0 0L249 377c-4.5 4.5-10.6 7-17 7H192v40c0 13.3-10.7 24-24 24H128v40c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V408c0-6.4 2.5-12.5 7-17L168.3 229.7s0 0 0 0l0 0z"
|
|
3450
3481
|
}
|
|
3451
3482
|
),
|
|
@@ -3458,28 +3489,28 @@ const so = ({
|
|
|
3458
3489
|
)
|
|
3459
3490
|
]
|
|
3460
3491
|
}
|
|
3461
|
-
),
|
|
3492
|
+
), ho = ({
|
|
3462
3493
|
className: e,
|
|
3463
3494
|
viewBox: t,
|
|
3464
3495
|
spacing: r,
|
|
3465
|
-
title:
|
|
3466
|
-
monotone:
|
|
3496
|
+
title: n,
|
|
3497
|
+
monotone: a,
|
|
3467
3498
|
...o
|
|
3468
|
-
}) => /* @__PURE__ */
|
|
3469
|
-
|
|
3499
|
+
}) => /* @__PURE__ */ S(
|
|
3500
|
+
Le,
|
|
3470
3501
|
{
|
|
3471
3502
|
defaultViewBox: "0 0 576 512",
|
|
3472
3503
|
defaultClassName: "size-5",
|
|
3473
3504
|
viewBox: t,
|
|
3474
3505
|
className: e,
|
|
3475
3506
|
spacing: r,
|
|
3476
|
-
title:
|
|
3507
|
+
title: n || "Show",
|
|
3477
3508
|
...o,
|
|
3478
3509
|
children: [
|
|
3479
3510
|
/* @__PURE__ */ l(
|
|
3480
3511
|
"path",
|
|
3481
3512
|
{
|
|
3482
|
-
opacity:
|
|
3513
|
+
opacity: a ? "1" : "0.4",
|
|
3483
3514
|
d: "M95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 400a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"
|
|
3484
3515
|
}
|
|
3485
3516
|
),
|
|
@@ -3500,7 +3531,7 @@ try {
|
|
|
3500
3531
|
});
|
|
3501
3532
|
} catch {
|
|
3502
3533
|
}
|
|
3503
|
-
const
|
|
3534
|
+
const po = (e) => {
|
|
3504
3535
|
let t = "";
|
|
3505
3536
|
if (typeof e == "number" || typeof e == "string")
|
|
3506
3537
|
t = "m-" + e;
|
|
@@ -3509,41 +3540,41 @@ const uo = (e) => {
|
|
|
3509
3540
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
3510
3541
|
}
|
|
3511
3542
|
return t;
|
|
3512
|
-
},
|
|
3543
|
+
}, go = "av-flexgrid", Se = "av-flexgrid-item", xe = 0.25, pr = W.createContext({
|
|
3513
3544
|
columnGap: 0,
|
|
3514
3545
|
rowGap: 0
|
|
3515
3546
|
}), Tt = ({
|
|
3516
3547
|
children: e,
|
|
3517
3548
|
className: t,
|
|
3518
3549
|
columnGap: r = 1,
|
|
3519
|
-
rowGap:
|
|
3520
|
-
height:
|
|
3550
|
+
rowGap: n = 0,
|
|
3551
|
+
height: a = "auto",
|
|
3521
3552
|
width: o = "auto",
|
|
3522
3553
|
direction: s = "row",
|
|
3523
3554
|
alignHorizontal: i = "normal",
|
|
3524
|
-
alignVertical:
|
|
3555
|
+
alignVertical: d = "normal",
|
|
3525
3556
|
spacing: g,
|
|
3526
3557
|
...p
|
|
3527
3558
|
}) => {
|
|
3528
3559
|
const h = {
|
|
3529
3560
|
flexDirection: s,
|
|
3530
3561
|
justifyContent: i,
|
|
3531
|
-
alignItems:
|
|
3532
|
-
height:
|
|
3562
|
+
alignItems: d,
|
|
3563
|
+
height: a,
|
|
3533
3564
|
width: o,
|
|
3534
3565
|
/**
|
|
3535
3566
|
* Trick to account for the extra space taken
|
|
3536
3567
|
* by the columnGap and rowGap that will be applied
|
|
3537
3568
|
* to all FlexgridItems (see context and paddings).
|
|
3538
3569
|
*/
|
|
3539
|
-
marginLeft: r * -1 *
|
|
3540
|
-
marginTop:
|
|
3541
|
-
},
|
|
3542
|
-
|
|
3570
|
+
marginLeft: r * -1 * xe + "rem",
|
|
3571
|
+
marginTop: n * -1 * xe + "rem"
|
|
3572
|
+
}, u = f(
|
|
3573
|
+
go,
|
|
3543
3574
|
t,
|
|
3544
3575
|
"box-border flex flex-wrap"
|
|
3545
|
-
), c = { columnGap: r, rowGap:
|
|
3546
|
-
return /* @__PURE__ */ l(m, { ...g ? { className:
|
|
3576
|
+
), c = { columnGap: r, rowGap: n }, m = g ? "div" : W.Fragment;
|
|
3577
|
+
return /* @__PURE__ */ l(m, { ...g ? { className: po(g) } : {}, children: /* @__PURE__ */ l("div", { className: u, style: h, ...p, children: /* @__PURE__ */ l(pr.Provider, { value: c, children: e }) }) });
|
|
3547
3578
|
}, ze = (e, t) => f({
|
|
3548
3579
|
"basis-1/12": e === 1 && !t,
|
|
3549
3580
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
@@ -3617,25 +3648,25 @@ const uo = (e) => {
|
|
|
3617
3648
|
"lg:basis-full": e === 12 && t === "lg",
|
|
3618
3649
|
"xl:basis-full": e === 12 && t === "xl",
|
|
3619
3650
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
3620
|
-
}),
|
|
3651
|
+
}), fo = ({
|
|
3621
3652
|
className: e,
|
|
3622
3653
|
span: t
|
|
3623
3654
|
}) => {
|
|
3624
3655
|
if (!t)
|
|
3625
|
-
return f(e,
|
|
3656
|
+
return f(e, Se, "box-border basis-auto");
|
|
3626
3657
|
if (typeof t == "number")
|
|
3627
|
-
return f(e,
|
|
3658
|
+
return f(e, Se, "box-border max-w-full", {
|
|
3628
3659
|
[`${ze(t)}`]: !0
|
|
3629
3660
|
});
|
|
3630
3661
|
if (typeof t == "string")
|
|
3631
|
-
return f(e,
|
|
3662
|
+
return f(e, Se, "box-border basis-auto", {
|
|
3632
3663
|
"max-w-full grow": t === "auto"
|
|
3633
3664
|
});
|
|
3634
3665
|
if (typeof t == "object") {
|
|
3635
|
-
const r = Object.entries(t).map(([
|
|
3666
|
+
const r = Object.entries(t).map(([n, a]) => n === "fallback" ? ze(a) : ze(a, n));
|
|
3636
3667
|
return f(
|
|
3637
3668
|
e,
|
|
3638
|
-
|
|
3669
|
+
Se,
|
|
3639
3670
|
"box-border",
|
|
3640
3671
|
r
|
|
3641
3672
|
);
|
|
@@ -3644,37 +3675,37 @@ const uo = (e) => {
|
|
|
3644
3675
|
children: e,
|
|
3645
3676
|
className: t,
|
|
3646
3677
|
span: r,
|
|
3647
|
-
...
|
|
3678
|
+
...n
|
|
3648
3679
|
}) => {
|
|
3649
|
-
const { columnGap:
|
|
3650
|
-
paddingLeft:
|
|
3651
|
-
paddingTop: o *
|
|
3652
|
-
}, i =
|
|
3680
|
+
const { columnGap: a, rowGap: o } = St(pr), s = {
|
|
3681
|
+
paddingLeft: a * xe + "rem",
|
|
3682
|
+
paddingTop: o * xe + "rem"
|
|
3683
|
+
}, i = fo({
|
|
3653
3684
|
className: t,
|
|
3654
3685
|
span: r
|
|
3655
3686
|
});
|
|
3656
|
-
return /* @__PURE__ */ l("div", { className: i, style: s, ...
|
|
3687
|
+
return /* @__PURE__ */ l("div", { className: i, style: s, ...n, children: e });
|
|
3657
3688
|
};
|
|
3658
3689
|
/*!
|
|
3659
|
-
@versini/ui-system v1.4.
|
|
3690
|
+
@versini/ui-system v1.4.3
|
|
3660
3691
|
© 2024 gizmette.com
|
|
3661
3692
|
*/
|
|
3662
3693
|
try {
|
|
3663
3694
|
window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
|
|
3664
|
-
version: "1.4.
|
|
3665
|
-
buildTime: "07/
|
|
3695
|
+
version: "1.4.3",
|
|
3696
|
+
buildTime: "08/07/2024 09:49 AM EDT",
|
|
3666
3697
|
homepage: "https://github.com/aversini/ui-components",
|
|
3667
3698
|
license: "MIT"
|
|
3668
3699
|
});
|
|
3669
3700
|
} catch {
|
|
3670
3701
|
}
|
|
3671
|
-
const
|
|
3702
|
+
const yo = "ASK! ME! ANYTHING!", gr = "Sassy Saint", bo = "gizmette.com", wo = "Log in", Eo = "Sign in with a Passkey", Rs = "Log out", To = "Password", vo = "Powered by OpenAI", Ns = "Send", xs = "Profile", Cs = "Statistics", Os = "Chat history", Ps = "About", Ds = "Type your question here", $s = "Clear chat", Ls = "Cancel chat", Ms = "N/A", Us = {
|
|
3672
3703
|
PREFERENCES: {
|
|
3673
3704
|
TITLE: "User preferences",
|
|
3674
3705
|
NAME: "Name",
|
|
3675
3706
|
EMAIL: "Email",
|
|
3676
3707
|
ENGINE_DETAILS: "Show message statistics",
|
|
3677
|
-
LOCATION: "
|
|
3708
|
+
LOCATION: "Location",
|
|
3678
3709
|
MODEL_TYPE: "Use GPT model 4"
|
|
3679
3710
|
},
|
|
3680
3711
|
CURRENT_STATISTICS: {
|
|
@@ -3700,63 +3731,63 @@ const po = "ASK! ME! ANYTHING!", pr = "Sassy Saint", go = "gizmette.com", fo = "
|
|
|
3700
3731
|
ENGINE: "OpenAI model",
|
|
3701
3732
|
PLUGIN: "Plugin"
|
|
3702
3733
|
}
|
|
3703
|
-
},
|
|
3734
|
+
}, So = ({
|
|
3704
3735
|
serverStats: e
|
|
3705
3736
|
}) => /* @__PURE__ */ l(
|
|
3706
|
-
|
|
3737
|
+
Ka,
|
|
3707
3738
|
{
|
|
3708
3739
|
mode: "light",
|
|
3709
|
-
row1: /* @__PURE__ */
|
|
3710
|
-
|
|
3740
|
+
row1: /* @__PURE__ */ S("div", { children: [
|
|
3741
|
+
gr,
|
|
3711
3742
|
" v",
|
|
3712
|
-
"3.4.
|
|
3743
|
+
"3.4.8",
|
|
3713
3744
|
" - ",
|
|
3714
|
-
|
|
3745
|
+
vo,
|
|
3715
3746
|
et && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
3716
3747
|
] }),
|
|
3717
|
-
row2: /* @__PURE__ */
|
|
3748
|
+
row2: /* @__PURE__ */ S("div", { children: [
|
|
3718
3749
|
"© ",
|
|
3719
3750
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
3720
3751
|
" ",
|
|
3721
|
-
|
|
3752
|
+
bo
|
|
3722
3753
|
] })
|
|
3723
3754
|
}
|
|
3724
|
-
),
|
|
3755
|
+
), Io = kt(() => import("./LazyHeader.CDeNMEns.js")), Ao = () => {
|
|
3725
3756
|
const { isAuthenticated: e } = Ze();
|
|
3726
|
-
return /* @__PURE__ */
|
|
3727
|
-
e && /* @__PURE__ */ l(
|
|
3728
|
-
/* @__PURE__ */
|
|
3729
|
-
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(
|
|
3730
|
-
/* @__PURE__ */
|
|
3731
|
-
/* @__PURE__ */ l("h1", { children:
|
|
3732
|
-
/* @__PURE__ */ l("h2", { children:
|
|
3757
|
+
return /* @__PURE__ */ S(me, { children: [
|
|
3758
|
+
e && /* @__PURE__ */ l(_t, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(Io, {}) }),
|
|
3759
|
+
/* @__PURE__ */ S("div", { className: "flex items-center justify-center", children: [
|
|
3760
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(lo, {}) }),
|
|
3761
|
+
/* @__PURE__ */ S("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3762
|
+
/* @__PURE__ */ l("h1", { children: gr }),
|
|
3763
|
+
/* @__PURE__ */ l("h2", { children: yo })
|
|
3733
3764
|
] })
|
|
3734
3765
|
] })
|
|
3735
3766
|
] });
|
|
3736
|
-
},
|
|
3737
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } = Ze(), [
|
|
3767
|
+
}, ko = () => {
|
|
3768
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = Ze(), [n, a] = j(""), [o, s] = j(""), [i, d] = j(!0), [g, p] = j({
|
|
3738
3769
|
username: "",
|
|
3739
3770
|
password: ""
|
|
3740
|
-
}), h = async (
|
|
3741
|
-
|
|
3771
|
+
}), h = async (u) => {
|
|
3772
|
+
u.preventDefault(), await e(
|
|
3742
3773
|
g.username,
|
|
3743
3774
|
g.password,
|
|
3744
|
-
|
|
3745
|
-
) || (s(""),
|
|
3775
|
+
Q.CODE
|
|
3776
|
+
) || (s(""), a("Invalid username or password"));
|
|
3746
3777
|
};
|
|
3747
|
-
return
|
|
3748
|
-
var
|
|
3749
|
-
(
|
|
3778
|
+
return V(() => {
|
|
3779
|
+
var u;
|
|
3780
|
+
(u = document.getElementById("logo")) == null || u.classList.add("fadeOut"), setTimeout(() => {
|
|
3750
3781
|
var c;
|
|
3751
3782
|
(c = document.getElementById("root")) == null || c.classList.replace("app-hidden", "fadeIn");
|
|
3752
3783
|
}, 500);
|
|
3753
|
-
}),
|
|
3784
|
+
}), V(() => {
|
|
3754
3785
|
t && s(t);
|
|
3755
|
-
}, [t]), /* @__PURE__ */
|
|
3756
|
-
/* @__PURE__ */
|
|
3757
|
-
/* @__PURE__ */ l("div", { className:
|
|
3758
|
-
/* @__PURE__ */
|
|
3759
|
-
/* @__PURE__ */ l(Tt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ l(oe, { span: 6, children: /* @__PURE__ */
|
|
3786
|
+
}, [t]), /* @__PURE__ */ S(me, { children: [
|
|
3787
|
+
/* @__PURE__ */ S(Ga, { children: [
|
|
3788
|
+
/* @__PURE__ */ l("div", { className: Aa(), children: /* @__PURE__ */ l(Ao, {}) }),
|
|
3789
|
+
/* @__PURE__ */ S("form", { className: "mt-5", onSubmit: h, children: [
|
|
3790
|
+
/* @__PURE__ */ l(Tt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ l(oe, { span: 6, children: /* @__PURE__ */ S(Ha, { mode: "dark", children: [
|
|
3760
3791
|
/* @__PURE__ */ l(oe, { span: 12, children: o && /* @__PURE__ */ l("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3761
3792
|
/* @__PURE__ */ l(oe, { span: 12, children: /* @__PURE__ */ l(
|
|
3762
3793
|
rt,
|
|
@@ -3769,17 +3800,17 @@ const po = "ASK! ME! ANYTHING!", pr = "Sassy Saint", go = "gizmette.com", fo = "
|
|
|
3769
3800
|
focusMode: "light",
|
|
3770
3801
|
name: "username",
|
|
3771
3802
|
label: "Username",
|
|
3772
|
-
onChange: (
|
|
3803
|
+
onChange: (u) => {
|
|
3773
3804
|
p({
|
|
3774
3805
|
...g,
|
|
3775
|
-
username:
|
|
3776
|
-
}),
|
|
3806
|
+
username: u.target.value
|
|
3807
|
+
}), a("");
|
|
3777
3808
|
},
|
|
3778
|
-
error:
|
|
3809
|
+
error: n !== ""
|
|
3779
3810
|
}
|
|
3780
3811
|
) }),
|
|
3781
3812
|
/* @__PURE__ */ l(oe, { span: 12, children: /* @__PURE__ */ l(
|
|
3782
|
-
|
|
3813
|
+
hr,
|
|
3783
3814
|
{
|
|
3784
3815
|
required: !0,
|
|
3785
3816
|
autoCapitalize: "off",
|
|
@@ -3788,21 +3819,21 @@ const po = "ASK! ME! ANYTHING!", pr = "Sassy Saint", go = "gizmette.com", fo = "
|
|
|
3788
3819
|
mode: "dark",
|
|
3789
3820
|
focusMode: "light",
|
|
3790
3821
|
name: "password",
|
|
3791
|
-
label:
|
|
3792
|
-
rightElement: /* @__PURE__ */ l(qe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(
|
|
3793
|
-
onMaskChange:
|
|
3794
|
-
onChange: (
|
|
3822
|
+
label: To,
|
|
3823
|
+
rightElement: /* @__PURE__ */ l(qe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(ho, {}) : /* @__PURE__ */ l(uo, {}) }),
|
|
3824
|
+
onMaskChange: d,
|
|
3825
|
+
onChange: (u) => {
|
|
3795
3826
|
p({
|
|
3796
3827
|
...g,
|
|
3797
|
-
password:
|
|
3798
|
-
}),
|
|
3828
|
+
password: u.target.value
|
|
3829
|
+
}), a("");
|
|
3799
3830
|
},
|
|
3800
|
-
error:
|
|
3801
|
-
helperText:
|
|
3831
|
+
error: n !== "",
|
|
3832
|
+
helperText: n
|
|
3802
3833
|
}
|
|
3803
3834
|
) }),
|
|
3804
3835
|
/* @__PURE__ */ l(oe, { span: 12, children: /* @__PURE__ */ l(
|
|
3805
|
-
|
|
3836
|
+
cr,
|
|
3806
3837
|
{
|
|
3807
3838
|
mode: "light",
|
|
3808
3839
|
focusMode: "light",
|
|
@@ -3810,7 +3841,7 @@ const po = "ASK! ME! ANYTHING!", pr = "Sassy Saint", go = "gizmette.com", fo = "
|
|
|
3810
3841
|
noBorder: !0,
|
|
3811
3842
|
type: "submit",
|
|
3812
3843
|
className: "mb-4 mt-6",
|
|
3813
|
-
children:
|
|
3844
|
+
children: wo
|
|
3814
3845
|
}
|
|
3815
3846
|
) })
|
|
3816
3847
|
] }) }) }),
|
|
@@ -3823,97 +3854,97 @@ const po = "ASK! ME! ANYTHING!", pr = "Sassy Saint", go = "gizmette.com", fo = "
|
|
|
3823
3854
|
fullWidth: !0,
|
|
3824
3855
|
noBorder: !0,
|
|
3825
3856
|
className: "mb-4 mt-1",
|
|
3826
|
-
labelRight:
|
|
3857
|
+
labelRight: Eo,
|
|
3827
3858
|
onClick: r,
|
|
3828
|
-
children: /* @__PURE__ */ l(
|
|
3859
|
+
children: /* @__PURE__ */ l(mo, { className: "size-4" })
|
|
3829
3860
|
}
|
|
3830
3861
|
) }) })
|
|
3831
3862
|
] })
|
|
3832
3863
|
] }),
|
|
3833
|
-
/* @__PURE__ */ l(
|
|
3864
|
+
/* @__PURE__ */ l(So, {})
|
|
3834
3865
|
] });
|
|
3835
|
-
},
|
|
3866
|
+
}, _o = new URL(document.location.href).searchParams, Ro = !!_o.get("debug") || !1, No = kt(() => import("./App.WT_JMB-P.js").then((e) => e.App)), xo = ({ isComponent: e }) => {
|
|
3836
3867
|
const { isAuthenticated: t } = Ze();
|
|
3837
|
-
return t ? /* @__PURE__ */ l(
|
|
3838
|
-
},
|
|
3868
|
+
return t ? /* @__PURE__ */ l(_t, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(No, { isComponent: e }) }) : /* @__PURE__ */ l(ko, {});
|
|
3869
|
+
}, Co = ({
|
|
3839
3870
|
isComponent: e = !1,
|
|
3840
|
-
domain: t =
|
|
3841
|
-
}) => /* @__PURE__ */ l(me, { children: /* @__PURE__ */ l(
|
|
3842
|
-
|
|
3871
|
+
domain: t = Ia
|
|
3872
|
+
}) => /* @__PURE__ */ l(me, { children: /* @__PURE__ */ l(ha, { clientId: pa, domain: t, debug: Ro, children: /* @__PURE__ */ l(xo, { isComponent: e }) }) }), Oo = ({ domain: e }) => /* @__PURE__ */ l(Co, { isComponent: !0, domain: e });
|
|
3873
|
+
Oo.displayName = "SassySaint-3.4.8";
|
|
3843
3874
|
export {
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
ns as
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
Ds as NA,
|
|
3875
|
+
ir as A,
|
|
3876
|
+
Ps as ABOUT_TITLE,
|
|
3877
|
+
Zo as ACTION_LOCATION,
|
|
3878
|
+
zo as ACTION_MESSAGE,
|
|
3879
|
+
Qo as ACTION_MODEL,
|
|
3880
|
+
qo as ACTION_RESET,
|
|
3881
|
+
Xo as ACTION_RESTORE,
|
|
3882
|
+
ts as ACTION_SEARCH,
|
|
3883
|
+
rs as ACTION_SORT,
|
|
3884
|
+
es as ACTION_STREAMING,
|
|
3885
|
+
So as AppFooter,
|
|
3886
|
+
Ls as CANCEL,
|
|
3887
|
+
Us as CARDS,
|
|
3888
|
+
$s as CLEAR,
|
|
3889
|
+
Jo as ERROR_MESSAGE,
|
|
3890
|
+
Q as G,
|
|
3891
|
+
jo as GPT4_MAX_TOKENS,
|
|
3892
|
+
Os as HISTORY_TITLE,
|
|
3893
|
+
as as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3894
|
+
is as LOCAL_STORAGE_LOCATION,
|
|
3895
|
+
ns as LOCAL_STORAGE_PREFIX,
|
|
3896
|
+
os as LOCAL_STORAGE_SEARCH,
|
|
3897
|
+
ss as LOCAL_STORAGE_SORT,
|
|
3898
|
+
Rs as LOG_OUT,
|
|
3899
|
+
Wa as M,
|
|
3900
|
+
Yo as MODEL_GPT4,
|
|
3901
|
+
Ao as MessagesContainerHeader,
|
|
3902
|
+
Es as N,
|
|
3903
|
+
Ha as N$1,
|
|
3904
|
+
Ms as NA,
|
|
3875
3905
|
qe as O,
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3906
|
+
xs as PROFILE_TITLE,
|
|
3907
|
+
Bo as ROLE_ASSISTANT,
|
|
3908
|
+
Fo as ROLE_HIDDEN,
|
|
3909
|
+
Vo as ROLE_INTERNAL,
|
|
3910
|
+
Wo as ROLE_SYSTEM,
|
|
3911
|
+
Go as ROLE_USER,
|
|
3882
3912
|
$e as S,
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3913
|
+
Ns as SEND,
|
|
3914
|
+
Cs as STATS,
|
|
3915
|
+
cs as STATS_SEPARATOR,
|
|
3916
|
+
Oo as SassySaint,
|
|
3917
|
+
Ds as TYPE_QUESTION,
|
|
3918
|
+
ur as U,
|
|
3889
3919
|
Ze as Wr,
|
|
3890
|
-
|
|
3920
|
+
rt as Y,
|
|
3921
|
+
As as a,
|
|
3891
3922
|
Tt as b,
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3923
|
+
Ga as c,
|
|
3924
|
+
vs as c$1,
|
|
3925
|
+
ds as convertLatitudeToDMS,
|
|
3926
|
+
us as convertLongitudeToDMS,
|
|
3927
|
+
ys as durationFormatter,
|
|
3928
|
+
ps as extractAverage,
|
|
3929
|
+
or as f,
|
|
3930
|
+
Ba as f$1,
|
|
3931
|
+
mo as f$2,
|
|
3932
|
+
Le as g,
|
|
3933
|
+
ms as getCurrentGeoLocation,
|
|
3934
|
+
Aa as getMessageContaintWrapperClass,
|
|
3904
3935
|
tt as i,
|
|
3905
|
-
|
|
3906
|
-
|
|
3936
|
+
Ts as i$1,
|
|
3937
|
+
gs as isLastMessageFromRole,
|
|
3907
3938
|
oe as j,
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3939
|
+
ks as l,
|
|
3940
|
+
Ss as n,
|
|
3941
|
+
fs as numberFormatter,
|
|
3942
|
+
ja as o,
|
|
3943
|
+
_s as p,
|
|
3944
|
+
bs as pluralize,
|
|
3945
|
+
Is as r,
|
|
3946
|
+
hs as renderDataAsList,
|
|
3947
|
+
ws as s,
|
|
3948
|
+
ls as truncate,
|
|
3949
|
+
cr as x
|
|
3919
3950
|
};
|