@versini/sassysaint 5.4.13 → 5.4.15
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/{LazyApp.DNOGYuzJ.js → LazyApp.CmWxSgb_.js} +398 -387
- package/dist/chunks/{LazyHeader.oCAx75zT.js → LazyHeader.CmyI3orp.js} +123 -117
- package/dist/chunks/{LazyMarkdownWithExtra.F2tZ4gOI.js → LazyMarkdownWithExtra.bTU0zWSE.js} +747 -739
- package/dist/chunks/{LazyMessageAssistant.L4L_m5nw.js → LazyMessageAssistant.BkIqe55j.js} +11 -11
- package/dist/chunks/{index.CxzLMGVa.js → index.D8QVMbN9.js} +764 -855
- package/dist/chunks/{index.Ck3nAtox.js → index.Dn9p043U.js} +339 -303
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as l, jsxs as N, Fragment as fe } from "react/jsx-runtime";
|
|
2
|
+
import z, { createContext as sr, useReducer as wt, useRef as M, useCallback as q, useEffect as Q, useContext as Tt, useSyncExternalStore as ir, useId as It, useState as j, useLayoutEffect as nt, useMemo as kt, lazy as St, Suspense as _t } from "react";
|
|
3
3
|
import g from "clsx";
|
|
4
|
-
var
|
|
4
|
+
var cr = Object.defineProperty, lr = (e, t, r) => t in e ? cr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ue = (e, t, r) => lr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
6
|
@versini/auth-provider v7.4.0
|
|
7
7
|
© 2024 gizmette.com
|
|
@@ -15,7 +15,7 @@ try {
|
|
|
15
15
|
});
|
|
16
16
|
} catch {
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function J(e) {
|
|
19
19
|
const t = new Uint8Array(e);
|
|
20
20
|
let r = "";
|
|
21
21
|
for (const a of t)
|
|
@@ -28,10 +28,10 @@ function Re(e) {
|
|
|
28
28
|
s[i] = n.charCodeAt(i);
|
|
29
29
|
return o;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Xe() {
|
|
32
32
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function At(e) {
|
|
35
35
|
const { id: t } = e;
|
|
36
36
|
return {
|
|
37
37
|
...e,
|
|
@@ -39,85 +39,85 @@ function Rt(e) {
|
|
|
39
39
|
transports: e.transports
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function vt(e) {
|
|
43
43
|
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
44
44
|
}
|
|
45
|
-
let
|
|
45
|
+
let R = class extends Error {
|
|
46
46
|
constructor({ message: t, code: r, cause: a, name: n }) {
|
|
47
47
|
super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
50
|
+
function dr({ error: e, options: t }) {
|
|
51
51
|
var a, n;
|
|
52
52
|
const { publicKey: r } = t;
|
|
53
53
|
if (!r)
|
|
54
54
|
throw Error("options was missing required publicKey property");
|
|
55
55
|
if (e.name === "AbortError") {
|
|
56
56
|
if (t.signal instanceof AbortSignal)
|
|
57
|
-
return new
|
|
57
|
+
return new R({
|
|
58
58
|
message: "Registration ceremony was sent an abort signal",
|
|
59
59
|
code: "ERROR_CEREMONY_ABORTED",
|
|
60
60
|
cause: e
|
|
61
61
|
});
|
|
62
62
|
} else if (e.name === "ConstraintError") {
|
|
63
63
|
if (((a = r.authenticatorSelection) == null ? void 0 : a.requireResidentKey) === !0)
|
|
64
|
-
return new
|
|
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
69
|
if (((n = r.authenticatorSelection) == null ? void 0 : n.userVerification) === "required")
|
|
70
|
-
return new
|
|
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",
|
|
73
73
|
cause: e
|
|
74
74
|
});
|
|
75
75
|
} else {
|
|
76
76
|
if (e.name === "InvalidStateError")
|
|
77
|
-
return new
|
|
77
|
+
return new R({
|
|
78
78
|
message: "The authenticator was previously registered",
|
|
79
79
|
code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
|
|
80
80
|
cause: e
|
|
81
81
|
});
|
|
82
82
|
if (e.name === "NotAllowedError")
|
|
83
|
-
return new
|
|
83
|
+
return new R({
|
|
84
84
|
message: e.message,
|
|
85
85
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
86
86
|
cause: e
|
|
87
87
|
});
|
|
88
88
|
if (e.name === "NotSupportedError")
|
|
89
|
-
return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new
|
|
89
|
+
return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new R({
|
|
90
90
|
message: 'No entry in pubKeyCredParams was of type "public-key"',
|
|
91
91
|
code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
|
|
92
92
|
cause: e
|
|
93
|
-
}) : new
|
|
93
|
+
}) : new R({
|
|
94
94
|
message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
|
|
95
95
|
code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
|
|
96
96
|
cause: e
|
|
97
97
|
});
|
|
98
98
|
if (e.name === "SecurityError") {
|
|
99
99
|
const o = window.location.hostname;
|
|
100
|
-
if (
|
|
100
|
+
if (vt(o)) {
|
|
101
101
|
if (r.rp.id !== o)
|
|
102
|
-
return new
|
|
102
|
+
return new R({
|
|
103
103
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
104
104
|
code: "ERROR_INVALID_RP_ID",
|
|
105
105
|
cause: e
|
|
106
106
|
});
|
|
107
|
-
} else return new
|
|
107
|
+
} else return new R({
|
|
108
108
|
message: `${window.location.hostname} is an invalid domain`,
|
|
109
109
|
code: "ERROR_INVALID_DOMAIN",
|
|
110
110
|
cause: e
|
|
111
111
|
});
|
|
112
112
|
} else if (e.name === "TypeError") {
|
|
113
113
|
if (r.user.id.byteLength < 1 || r.user.id.byteLength > 64)
|
|
114
|
-
return new
|
|
114
|
+
return new R({
|
|
115
115
|
message: "User ID was not between 1 and 64 characters",
|
|
116
116
|
code: "ERROR_INVALID_USER_ID_LENGTH",
|
|
117
117
|
cause: e
|
|
118
118
|
});
|
|
119
119
|
} else if (e.name === "UnknownError")
|
|
120
|
-
return new
|
|
120
|
+
return new R({
|
|
121
121
|
message: "The authenticator was unable to process the specified options, or could not create a new credential",
|
|
122
122
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
123
123
|
cause: e
|
|
@@ -125,7 +125,7 @@ function hr({ error: e, options: t }) {
|
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class ur {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,14 +141,14 @@ class mr {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
function
|
|
146
|
-
if (e && !(
|
|
144
|
+
const Rt = new ur(), hr = ["cross-platform", "platform"];
|
|
145
|
+
function Nt(e) {
|
|
146
|
+
if (e && !(hr.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function mr(e) {
|
|
150
150
|
var u;
|
|
151
|
-
if (!
|
|
151
|
+
if (!Xe())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
153
153
|
const t = { publicKey: {
|
|
154
154
|
...e,
|
|
@@ -157,14 +157,14 @@ async function gr(e) {
|
|
|
157
157
|
...e.user,
|
|
158
158
|
id: Re(e.user.id)
|
|
159
159
|
},
|
|
160
|
-
excludeCredentials: (u = e.excludeCredentials) == null ? void 0 : u.map(
|
|
160
|
+
excludeCredentials: (u = e.excludeCredentials) == null ? void 0 : u.map(At)
|
|
161
161
|
} };
|
|
162
|
-
t.signal =
|
|
162
|
+
t.signal = Rt.createNewAbortSignal();
|
|
163
163
|
let r;
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
166
|
} catch (c) {
|
|
167
|
-
throw
|
|
167
|
+
throw dr({ error: c, options: t });
|
|
168
168
|
}
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
@@ -182,23 +182,23 @@ async function gr(e) {
|
|
|
182
182
|
if (typeof o.getPublicKey == "function")
|
|
183
183
|
try {
|
|
184
184
|
const c = o.getPublicKey();
|
|
185
|
-
c !== null && (m =
|
|
185
|
+
c !== null && (m = J(c));
|
|
186
186
|
} catch (c) {
|
|
187
187
|
Ke("getPublicKey()", c);
|
|
188
188
|
}
|
|
189
189
|
let p;
|
|
190
190
|
if (typeof o.getAuthenticatorData == "function")
|
|
191
191
|
try {
|
|
192
|
-
p =
|
|
192
|
+
p = J(o.getAuthenticatorData());
|
|
193
193
|
} catch (c) {
|
|
194
194
|
Ke("getAuthenticatorData()", c);
|
|
195
195
|
}
|
|
196
196
|
return {
|
|
197
197
|
id: a,
|
|
198
|
-
rawId:
|
|
198
|
+
rawId: J(n),
|
|
199
199
|
response: {
|
|
200
|
-
attestationObject:
|
|
201
|
-
clientDataJSON:
|
|
200
|
+
attestationObject: J(o.attestationObject),
|
|
201
|
+
clientDataJSON: J(o.clientDataJSON),
|
|
202
202
|
transports: i,
|
|
203
203
|
publicKeyAlgorithm: d,
|
|
204
204
|
publicKey: m,
|
|
@@ -206,53 +206,53 @@ async function gr(e) {
|
|
|
206
206
|
},
|
|
207
207
|
type: s,
|
|
208
208
|
clientExtensionResults: r.getClientExtensionResults(),
|
|
209
|
-
authenticatorAttachment:
|
|
209
|
+
authenticatorAttachment: Nt(r.authenticatorAttachment)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
function Ke(e, t) {
|
|
213
213
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
214
214
|
`, t);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
if (!
|
|
216
|
+
function pr() {
|
|
217
|
+
if (!Xe())
|
|
218
218
|
return new Promise((t) => t(!1));
|
|
219
219
|
const e = window.PublicKeyCredential;
|
|
220
220
|
return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function gr({ error: e, options: t }) {
|
|
223
223
|
const { publicKey: r } = t;
|
|
224
224
|
if (!r)
|
|
225
225
|
throw Error("options was missing required publicKey property");
|
|
226
226
|
if (e.name === "AbortError") {
|
|
227
227
|
if (t.signal instanceof AbortSignal)
|
|
228
|
-
return new
|
|
228
|
+
return new R({
|
|
229
229
|
message: "Authentication ceremony was sent an abort signal",
|
|
230
230
|
code: "ERROR_CEREMONY_ABORTED",
|
|
231
231
|
cause: e
|
|
232
232
|
});
|
|
233
233
|
} else {
|
|
234
234
|
if (e.name === "NotAllowedError")
|
|
235
|
-
return new
|
|
235
|
+
return new R({
|
|
236
236
|
message: e.message,
|
|
237
237
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
238
238
|
cause: e
|
|
239
239
|
});
|
|
240
240
|
if (e.name === "SecurityError") {
|
|
241
241
|
const a = window.location.hostname;
|
|
242
|
-
if (
|
|
242
|
+
if (vt(a)) {
|
|
243
243
|
if (r.rpId !== a)
|
|
244
|
-
return new
|
|
244
|
+
return new R({
|
|
245
245
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
246
246
|
code: "ERROR_INVALID_RP_ID",
|
|
247
247
|
cause: e
|
|
248
248
|
});
|
|
249
|
-
} else return new
|
|
249
|
+
} else return new R({
|
|
250
250
|
message: `${window.location.hostname} is an invalid domain`,
|
|
251
251
|
code: "ERROR_INVALID_DOMAIN",
|
|
252
252
|
cause: e
|
|
253
253
|
});
|
|
254
254
|
} else if (e.name === "UnknownError")
|
|
255
|
-
return new
|
|
255
|
+
return new R({
|
|
256
256
|
message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
|
|
257
257
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
258
258
|
cause: e
|
|
@@ -260,47 +260,47 @@ function fr({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
263
|
+
async function yr(e, t = !1) {
|
|
264
264
|
var u, c;
|
|
265
|
-
if (!
|
|
265
|
+
if (!Xe())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
267
267
|
let r;
|
|
268
|
-
((u = e.allowCredentials) == null ? void 0 : u.length) !== 0 && (r = (c = e.allowCredentials) == null ? void 0 : c.map(
|
|
268
|
+
((u = e.allowCredentials) == null ? void 0 : u.length) !== 0 && (r = (c = e.allowCredentials) == null ? void 0 : c.map(At));
|
|
269
269
|
const a = {
|
|
270
270
|
...e,
|
|
271
271
|
challenge: Re(e.challenge),
|
|
272
272
|
allowCredentials: r
|
|
273
273
|
}, n = {};
|
|
274
274
|
if (t) {
|
|
275
|
-
if (!await
|
|
275
|
+
if (!await pr())
|
|
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
|
n.mediation = "conditional", a.allowCredentials = [];
|
|
280
280
|
}
|
|
281
|
-
n.publicKey = a, n.signal =
|
|
281
|
+
n.publicKey = a, n.signal = Rt.createNewAbortSignal();
|
|
282
282
|
let o;
|
|
283
283
|
try {
|
|
284
284
|
o = await navigator.credentials.get(n);
|
|
285
285
|
} catch (h) {
|
|
286
|
-
throw
|
|
286
|
+
throw gr({ error: h, options: n });
|
|
287
287
|
}
|
|
288
288
|
if (!o)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
290
290
|
const { id: s, rawId: i, response: d, type: m } = o;
|
|
291
291
|
let p;
|
|
292
|
-
return d.userHandle && (p =
|
|
292
|
+
return d.userHandle && (p = J(d.userHandle)), {
|
|
293
293
|
id: s,
|
|
294
|
-
rawId:
|
|
294
|
+
rawId: J(i),
|
|
295
295
|
response: {
|
|
296
|
-
authenticatorData:
|
|
297
|
-
clientDataJSON:
|
|
298
|
-
signature:
|
|
296
|
+
authenticatorData: J(d.authenticatorData),
|
|
297
|
+
clientDataJSON: J(d.clientDataJSON),
|
|
298
|
+
signature: J(d.signature),
|
|
299
299
|
userHandle: p
|
|
300
300
|
},
|
|
301
301
|
type: m,
|
|
302
302
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
303
|
-
authenticatorAttachment:
|
|
303
|
+
authenticatorAttachment: Nt(o.authenticatorAttachment)
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
/*!
|
|
@@ -323,9 +323,9 @@ const ue = {
|
|
|
323
323
|
CODE: "code",
|
|
324
324
|
REFRESH_TOKEN: "refresh_token",
|
|
325
325
|
PASSKEY: "passkey"
|
|
326
|
-
},
|
|
326
|
+
}, xt = {
|
|
327
327
|
CLIENT_ID: "X-Auth-ClientId"
|
|
328
|
-
},
|
|
328
|
+
}, A = {
|
|
329
329
|
ALG: "RS256",
|
|
330
330
|
USER_ID_KEY: "sub",
|
|
331
331
|
USERNAME_KEY: "username",
|
|
@@ -338,7 +338,7 @@ const ue = {
|
|
|
338
338
|
SCOPES_KEY: "scopes",
|
|
339
339
|
CLIENT_ID_KEY: "aud",
|
|
340
340
|
ISSUER: "gizmette.com"
|
|
341
|
-
},
|
|
341
|
+
}, fr = `-----BEGIN PUBLIC KEY-----
|
|
342
342
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
343
343
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
344
344
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -351,15 +351,15 @@ awIDAQAB
|
|
|
351
351
|
LOGOUT: "logout",
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
|
-
}, De = crypto,
|
|
355
|
-
function
|
|
354
|
+
}, De = crypto, Ct = (e) => e instanceof CryptoKey, we = new TextEncoder(), be = new TextDecoder();
|
|
355
|
+
function br(...e) {
|
|
356
356
|
const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
|
|
357
357
|
let a = 0;
|
|
358
358
|
for (const n of e)
|
|
359
359
|
r.set(n, a), a += n.length;
|
|
360
360
|
return r;
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const Er = (e) => {
|
|
363
363
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
364
364
|
for (let a = 0; a < t.length; a++)
|
|
365
365
|
r[a] = t.charCodeAt(a);
|
|
@@ -368,7 +368,7 @@ const Tr = (e) => {
|
|
|
368
368
|
let t = e;
|
|
369
369
|
t instanceof Uint8Array && (t = be.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
370
370
|
try {
|
|
371
|
-
return
|
|
371
|
+
return Er(t);
|
|
372
372
|
} catch {
|
|
373
373
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
374
374
|
}
|
|
@@ -380,91 +380,91 @@ let C = class extends Error {
|
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
382
|
C.code = "ERR_JOSE_GENERIC";
|
|
383
|
-
let
|
|
383
|
+
let D = class extends C {
|
|
384
384
|
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
385
385
|
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
|
-
|
|
389
|
-
class
|
|
388
|
+
D.code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
389
|
+
class ze extends C {
|
|
390
390
|
constructor(t, r, a = "unspecified", n = "unspecified") {
|
|
391
391
|
super(t, { cause: { claim: a, reason: n, payload: r } }), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
|
|
395
|
-
class
|
|
394
|
+
ze.code = "ERR_JWT_EXPIRED";
|
|
395
|
+
class Ot extends C {
|
|
396
396
|
constructor() {
|
|
397
397
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
|
|
401
|
-
let
|
|
400
|
+
Ot.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
401
|
+
let L = class extends C {
|
|
402
402
|
constructor() {
|
|
403
403
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
|
-
|
|
407
|
-
class
|
|
406
|
+
L.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
407
|
+
class wr extends C {
|
|
408
408
|
constructor(t = "decryption operation failed", r) {
|
|
409
409
|
super(t, r), this.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
class
|
|
412
|
+
wr.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
413
|
+
class Tr extends C {
|
|
414
414
|
constructor() {
|
|
415
415
|
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
|
|
418
|
+
Tr.code = "ERR_JWE_INVALID";
|
|
419
419
|
let k = class extends C {
|
|
420
420
|
constructor() {
|
|
421
421
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
422
422
|
}
|
|
423
423
|
};
|
|
424
424
|
k.code = "ERR_JWS_INVALID";
|
|
425
|
-
let
|
|
425
|
+
let B = class extends C {
|
|
426
426
|
constructor() {
|
|
427
427
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
|
|
431
|
-
class
|
|
430
|
+
B.code = "ERR_JWT_INVALID";
|
|
431
|
+
class Ir extends C {
|
|
432
432
|
constructor() {
|
|
433
433
|
super(...arguments), this.code = "ERR_JWK_INVALID";
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
|
|
437
|
-
class
|
|
436
|
+
Ir.code = "ERR_JWK_INVALID";
|
|
437
|
+
class kr extends C {
|
|
438
438
|
constructor() {
|
|
439
439
|
super(...arguments), this.code = "ERR_JWKS_INVALID";
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
|
|
443
|
-
class
|
|
442
|
+
kr.code = "ERR_JWKS_INVALID";
|
|
443
|
+
class Sr extends C {
|
|
444
444
|
constructor(t = "no applicable key found in the JSON Web Key Set", r) {
|
|
445
445
|
super(t, r), this.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
|
|
449
|
-
class
|
|
448
|
+
Sr.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
449
|
+
class _r extends C {
|
|
450
450
|
constructor(t = "multiple matching keys found in the JSON Web Key Set", r) {
|
|
451
451
|
super(t, r), this.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
|
|
455
|
-
class
|
|
454
|
+
_r.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
455
|
+
class Ar extends C {
|
|
456
456
|
constructor(t = "request timed out", r) {
|
|
457
457
|
super(t, r), this.code = "ERR_JWKS_TIMEOUT";
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
|
|
461
|
-
class
|
|
460
|
+
Ar.code = "ERR_JWKS_TIMEOUT";
|
|
461
|
+
class Pt extends C {
|
|
462
462
|
constructor(t = "signature verification failed", r) {
|
|
463
463
|
super(t, r), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
|
|
467
|
-
function
|
|
466
|
+
Pt.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
467
|
+
function Y(e, t = "algorithm.name") {
|
|
468
468
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
469
469
|
}
|
|
470
470
|
function Te(e, t) {
|
|
@@ -473,7 +473,7 @@ function Te(e, t) {
|
|
|
473
473
|
function He(e) {
|
|
474
474
|
return parseInt(e.name.slice(4), 10);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function vr(e) {
|
|
477
477
|
switch (e) {
|
|
478
478
|
case "ES256":
|
|
479
479
|
return "P-256";
|
|
@@ -485,7 +485,7 @@ function Nr(e) {
|
|
|
485
485
|
throw new Error("unreachable");
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Rr(e, t) {
|
|
489
489
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
490
490
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
491
491
|
if (t.length > 2) {
|
|
@@ -495,59 +495,59 @@ function xr(e, t) {
|
|
|
495
495
|
throw new TypeError(r);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Nr(e, t, ...r) {
|
|
499
499
|
switch (t) {
|
|
500
500
|
case "HS256":
|
|
501
501
|
case "HS384":
|
|
502
502
|
case "HS512": {
|
|
503
503
|
if (!Te(e.algorithm, "HMAC"))
|
|
504
|
-
throw
|
|
504
|
+
throw Y("HMAC");
|
|
505
505
|
const a = parseInt(t.slice(2), 10);
|
|
506
506
|
if (He(e.algorithm.hash) !== a)
|
|
507
|
-
throw
|
|
507
|
+
throw Y(`SHA-${a}`, "algorithm.hash");
|
|
508
508
|
break;
|
|
509
509
|
}
|
|
510
510
|
case "RS256":
|
|
511
511
|
case "RS384":
|
|
512
512
|
case "RS512": {
|
|
513
513
|
if (!Te(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
514
|
-
throw
|
|
514
|
+
throw Y("RSASSA-PKCS1-v1_5");
|
|
515
515
|
const a = parseInt(t.slice(2), 10);
|
|
516
516
|
if (He(e.algorithm.hash) !== a)
|
|
517
|
-
throw
|
|
517
|
+
throw Y(`SHA-${a}`, "algorithm.hash");
|
|
518
518
|
break;
|
|
519
519
|
}
|
|
520
520
|
case "PS256":
|
|
521
521
|
case "PS384":
|
|
522
522
|
case "PS512": {
|
|
523
523
|
if (!Te(e.algorithm, "RSA-PSS"))
|
|
524
|
-
throw
|
|
524
|
+
throw Y("RSA-PSS");
|
|
525
525
|
const a = parseInt(t.slice(2), 10);
|
|
526
526
|
if (He(e.algorithm.hash) !== a)
|
|
527
|
-
throw
|
|
527
|
+
throw Y(`SHA-${a}`, "algorithm.hash");
|
|
528
528
|
break;
|
|
529
529
|
}
|
|
530
530
|
case "EdDSA": {
|
|
531
531
|
if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
|
|
532
|
-
throw
|
|
532
|
+
throw Y("Ed25519 or Ed448");
|
|
533
533
|
break;
|
|
534
534
|
}
|
|
535
535
|
case "ES256":
|
|
536
536
|
case "ES384":
|
|
537
537
|
case "ES512": {
|
|
538
538
|
if (!Te(e.algorithm, "ECDSA"))
|
|
539
|
-
throw
|
|
540
|
-
const a =
|
|
539
|
+
throw Y("ECDSA");
|
|
540
|
+
const a = vr(t);
|
|
541
541
|
if (e.algorithm.namedCurve !== a)
|
|
542
|
-
throw
|
|
542
|
+
throw Y(a, "algorithm.namedCurve");
|
|
543
543
|
break;
|
|
544
544
|
}
|
|
545
545
|
default:
|
|
546
546
|
throw new TypeError("CryptoKey does not support this operation");
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
Rr(e, r);
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Dt(e, t, ...r) {
|
|
551
551
|
var a;
|
|
552
552
|
if (r = r.filter(Boolean), r.length > 2) {
|
|
553
553
|
const n = r.pop();
|
|
@@ -555,11 +555,11 @@ function Mt(e, t, ...r) {
|
|
|
555
555
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
556
556
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (a = t.constructor) != null && a.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
557
557
|
}
|
|
558
|
-
const
|
|
559
|
-
function
|
|
560
|
-
return
|
|
558
|
+
const ot = (e, ...t) => Dt("Key must be ", e, ...t);
|
|
559
|
+
function Lt(e, t, ...r) {
|
|
560
|
+
return Dt(`Key for the ${e} algorithm must be `, t, ...r);
|
|
561
561
|
}
|
|
562
|
-
const
|
|
562
|
+
const Mt = (e) => Ct(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ne = ["CryptoKey"], xr = (...e) => {
|
|
563
563
|
const t = e.filter(Boolean);
|
|
564
564
|
if (t.length === 0 || t.length === 1)
|
|
565
565
|
return !0;
|
|
@@ -578,11 +578,11 @@ const Ut = (e) => Pt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
578
578
|
}
|
|
579
579
|
return !0;
|
|
580
580
|
};
|
|
581
|
-
function
|
|
581
|
+
function Cr(e) {
|
|
582
582
|
return typeof e == "object" && e !== null;
|
|
583
583
|
}
|
|
584
584
|
function he(e) {
|
|
585
|
-
if (!
|
|
585
|
+
if (!Cr(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
586
586
|
return !1;
|
|
587
587
|
if (Object.getPrototypeOf(e) === null)
|
|
588
588
|
return !0;
|
|
@@ -591,7 +591,7 @@ function he(e) {
|
|
|
591
591
|
t = Object.getPrototypeOf(t);
|
|
592
592
|
return Object.getPrototypeOf(e) === t;
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const Or = (e, t) => {
|
|
595
595
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
596
596
|
const { modulusLength: r } = t.algorithm;
|
|
597
597
|
if (typeof r != "number" || r < 2048)
|
|
@@ -601,16 +601,16 @@ const Dr = (e, t) => {
|
|
|
601
601
|
function me(e) {
|
|
602
602
|
return he(e) && typeof e.kty == "string";
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Pr(e) {
|
|
605
605
|
return e.kty !== "oct" && typeof e.d == "string";
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function Dr(e) {
|
|
608
608
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function Lr(e) {
|
|
611
611
|
return me(e) && e.kty === "oct" && typeof e.k == "string";
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Mr(e) {
|
|
614
614
|
let t, r;
|
|
615
615
|
switch (e.kty) {
|
|
616
616
|
case "RSA": {
|
|
@@ -635,7 +635,7 @@ function Ur(e) {
|
|
|
635
635
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
636
636
|
break;
|
|
637
637
|
default:
|
|
638
|
-
throw new
|
|
638
|
+
throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
639
639
|
}
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
@@ -657,7 +657,7 @@ function Ur(e) {
|
|
|
657
657
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
658
658
|
break;
|
|
659
659
|
default:
|
|
660
|
-
throw new
|
|
660
|
+
throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
661
661
|
}
|
|
662
662
|
break;
|
|
663
663
|
}
|
|
@@ -673,52 +673,52 @@ function Ur(e) {
|
|
|
673
673
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
674
674
|
break;
|
|
675
675
|
default:
|
|
676
|
-
throw new
|
|
676
|
+
throw new L('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
677
677
|
}
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
680
|
default:
|
|
681
|
-
throw new
|
|
681
|
+
throw new L('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
682
682
|
}
|
|
683
683
|
return { algorithm: t, keyUsages: r };
|
|
684
684
|
}
|
|
685
|
-
const
|
|
685
|
+
const $t = async (e) => {
|
|
686
686
|
if (!e.alg)
|
|
687
687
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
688
|
-
const { algorithm: t, keyUsages: r } =
|
|
688
|
+
const { algorithm: t, keyUsages: r } = Mr(e), a = [
|
|
689
689
|
t,
|
|
690
690
|
e.ext ?? !1,
|
|
691
691
|
e.key_ops ?? r
|
|
692
692
|
], n = { ...e };
|
|
693
693
|
return delete n.alg, delete n.use, De.subtle.importKey("jwk", n, ...a);
|
|
694
|
-
},
|
|
694
|
+
}, Ut = (e) => X(e);
|
|
695
695
|
let ae, ne;
|
|
696
|
-
const
|
|
696
|
+
const Kt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", xe = async (e, t, r, a, n = !1) => {
|
|
697
697
|
let o = e.get(t);
|
|
698
698
|
if (o != null && o[a])
|
|
699
699
|
return o[a];
|
|
700
|
-
const s = await
|
|
700
|
+
const s = await $t({ ...r, alg: a });
|
|
701
701
|
return n && Object.freeze(t), o ? o[a] = s : e.set(t, { [a]: s }), s;
|
|
702
|
-
},
|
|
703
|
-
if (
|
|
702
|
+
}, $r = (e, t) => {
|
|
703
|
+
if (Kt(e)) {
|
|
704
704
|
let r = e.export({ format: "jwk" });
|
|
705
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ?
|
|
705
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Ut(r.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), xe(ne, e, r, t));
|
|
706
706
|
}
|
|
707
707
|
return me(e) ? e.k ? X(e.k) : (ne || (ne = /* @__PURE__ */ new WeakMap()), xe(ne, e, e, t, !0)) : e;
|
|
708
|
-
},
|
|
709
|
-
if (
|
|
708
|
+
}, Ur = (e, t) => {
|
|
709
|
+
if (Kt(e)) {
|
|
710
710
|
let r = e.export({ format: "jwk" });
|
|
711
|
-
return r.k ?
|
|
711
|
+
return r.k ? Ut(r.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), xe(ae, e, r, t));
|
|
712
712
|
}
|
|
713
713
|
return me(e) ? e.k ? X(e.k) : (ae || (ae = /* @__PURE__ */ new WeakMap()), xe(ae, e, e, t, !0)) : e;
|
|
714
|
-
},
|
|
714
|
+
}, Kr = { normalizePublicKey: $r, normalizePrivateKey: Ur }, F = (e, t, r = 0) => {
|
|
715
715
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
716
716
|
const a = e.indexOf(t[0], r);
|
|
717
717
|
if (a === -1)
|
|
718
718
|
return !1;
|
|
719
719
|
const n = e.subarray(a, a + t.length);
|
|
720
720
|
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || F(e, t, a + 1);
|
|
721
|
-
},
|
|
721
|
+
}, st = (e) => {
|
|
722
722
|
switch (!0) {
|
|
723
723
|
case F(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
724
724
|
return "P-256";
|
|
@@ -735,9 +735,9 @@ const Wt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
735
735
|
case F(e, [43, 101, 113]):
|
|
736
736
|
return "Ed448";
|
|
737
737
|
default:
|
|
738
|
-
throw new
|
|
738
|
+
throw new L("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
739
739
|
}
|
|
740
|
-
},
|
|
740
|
+
}, Hr = async (e, t, r, a, n) => {
|
|
741
741
|
let o, s;
|
|
742
742
|
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((d) => d.charCodeAt(0)));
|
|
743
743
|
switch (a) {
|
|
@@ -773,24 +773,24 @@ const Wt = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
773
773
|
case "ECDH-ES+A128KW":
|
|
774
774
|
case "ECDH-ES+A192KW":
|
|
775
775
|
case "ECDH-ES+A256KW": {
|
|
776
|
-
const d =
|
|
776
|
+
const d = st(i);
|
|
777
777
|
o = d.startsWith("P-") ? { name: "ECDH", namedCurve: d } : { name: d }, s = [];
|
|
778
778
|
break;
|
|
779
779
|
}
|
|
780
780
|
case "EdDSA":
|
|
781
|
-
o = { name:
|
|
781
|
+
o = { name: st(i) }, s = ["verify"];
|
|
782
782
|
break;
|
|
783
783
|
default:
|
|
784
|
-
throw new
|
|
784
|
+
throw new L('Invalid or unsupported "alg" (Algorithm) value');
|
|
785
785
|
}
|
|
786
786
|
return De.subtle.importKey(t, i, o, !1, s);
|
|
787
|
-
},
|
|
788
|
-
async function
|
|
787
|
+
}, Wr = (e, t, r) => Hr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
788
|
+
async function Gr(e, t, r) {
|
|
789
789
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
790
790
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
791
|
-
return
|
|
791
|
+
return Wr(e, t);
|
|
792
792
|
}
|
|
793
|
-
async function
|
|
793
|
+
async function Br(e, t) {
|
|
794
794
|
if (!he(e))
|
|
795
795
|
throw new TypeError("JWK must be an object");
|
|
796
796
|
switch (t || (t = e.alg), e.kty) {
|
|
@@ -800,15 +800,15 @@ async function Vr(e, t) {
|
|
|
800
800
|
return X(e.k);
|
|
801
801
|
case "RSA":
|
|
802
802
|
if (e.oth !== void 0)
|
|
803
|
-
throw new
|
|
803
|
+
throw new L('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
804
804
|
case "EC":
|
|
805
805
|
case "OKP":
|
|
806
|
-
return
|
|
806
|
+
return $t({ ...e, alg: t });
|
|
807
807
|
default:
|
|
808
|
-
throw new
|
|
808
|
+
throw new L('Unsupported "kty" (Key Type) Parameter value');
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
|
-
const de = (e) => e == null ? void 0 : e[Symbol.toStringTag],
|
|
811
|
+
const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], Fe = (e, t, r) => {
|
|
812
812
|
var a, n;
|
|
813
813
|
if (t.use !== void 0 && t.use !== "sig")
|
|
814
814
|
throw new TypeError("Invalid key for this operation, when present its use must be sig");
|
|
@@ -817,32 +817,32 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) =>
|
|
|
817
817
|
if (t.alg !== void 0 && t.alg !== e)
|
|
818
818
|
throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
|
|
819
819
|
return !0;
|
|
820
|
-
},
|
|
820
|
+
}, Jr = (e, t, r, a) => {
|
|
821
821
|
if (!(t instanceof Uint8Array)) {
|
|
822
822
|
if (a && me(t)) {
|
|
823
|
-
if (
|
|
823
|
+
if (Lr(t) && Fe(e, t, r))
|
|
824
824
|
return;
|
|
825
825
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
826
826
|
}
|
|
827
|
-
if (!
|
|
828
|
-
throw new TypeError(
|
|
827
|
+
if (!Mt(t))
|
|
828
|
+
throw new TypeError(Lt(e, t, ...Ne, "Uint8Array", a ? "JSON Web Key" : null));
|
|
829
829
|
if (t.type !== "secret")
|
|
830
830
|
throw new TypeError(`${de(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
831
831
|
}
|
|
832
|
-
},
|
|
832
|
+
}, Vr = (e, t, r, a) => {
|
|
833
833
|
if (a && me(t))
|
|
834
834
|
switch (r) {
|
|
835
835
|
case "sign":
|
|
836
|
-
if (
|
|
836
|
+
if (Pr(t) && Fe(e, t, r))
|
|
837
837
|
return;
|
|
838
838
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
839
839
|
case "verify":
|
|
840
|
-
if (
|
|
840
|
+
if (Dr(t) && Fe(e, t, r))
|
|
841
841
|
return;
|
|
842
842
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
843
843
|
}
|
|
844
|
-
if (!
|
|
845
|
-
throw new TypeError(
|
|
844
|
+
if (!Mt(t))
|
|
845
|
+
throw new TypeError(Lt(e, t, ...Ne, a ? "JSON Web Key" : null));
|
|
846
846
|
if (t.type === "secret")
|
|
847
847
|
throw new TypeError(`${de(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
848
848
|
if (r === "sign" && t.type === "public")
|
|
@@ -854,12 +854,12 @@ const de = (e) => e == null ? void 0 : e[Symbol.toStringTag], je = (e, t, r) =>
|
|
|
854
854
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
855
855
|
throw new TypeError(`${de(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
856
856
|
};
|
|
857
|
-
function
|
|
858
|
-
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ?
|
|
857
|
+
function Ht(e, t, r, a) {
|
|
858
|
+
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Jr(t, r, a, e) : Vr(t, r, a, e);
|
|
859
859
|
}
|
|
860
|
-
|
|
861
|
-
const
|
|
862
|
-
function
|
|
860
|
+
Ht.bind(void 0, !1);
|
|
861
|
+
const it = Ht.bind(void 0, !0);
|
|
862
|
+
function Yr(e, t, r, a, n) {
|
|
863
863
|
if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
|
|
864
864
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
865
865
|
if (!a || a.crit === void 0)
|
|
@@ -870,7 +870,7 @@ function Fr(e, t, r, a, n) {
|
|
|
870
870
|
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
871
871
|
for (const s of a.crit) {
|
|
872
872
|
if (!o.has(s))
|
|
873
|
-
throw new
|
|
873
|
+
throw new L(`Extension Header Parameter "${s}" is not recognized`);
|
|
874
874
|
if (n[s] === void 0)
|
|
875
875
|
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
876
876
|
if (o.get(s) && a[s] === void 0)
|
|
@@ -878,13 +878,13 @@ function Fr(e, t, r, a, n) {
|
|
|
878
878
|
}
|
|
879
879
|
return new Set(a.crit);
|
|
880
880
|
}
|
|
881
|
-
const
|
|
881
|
+
const zr = (e, t) => {
|
|
882
882
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
883
883
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
884
884
|
if (t)
|
|
885
885
|
return new Set(t);
|
|
886
886
|
};
|
|
887
|
-
function
|
|
887
|
+
function Fr(e, t) {
|
|
888
888
|
const r = `SHA-${e.slice(-3)}`;
|
|
889
889
|
switch (e) {
|
|
890
890
|
case "HS256":
|
|
@@ -906,30 +906,30 @@ function qr(e, t) {
|
|
|
906
906
|
case "EdDSA":
|
|
907
907
|
return { name: t.name };
|
|
908
908
|
default:
|
|
909
|
-
throw new
|
|
909
|
+
throw new L(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
|
-
async function
|
|
913
|
-
if (t = await
|
|
914
|
-
return
|
|
912
|
+
async function jr(e, t, r) {
|
|
913
|
+
if (t = await Kr.normalizePublicKey(t, e), Ct(t))
|
|
914
|
+
return Nr(t, e, r), t;
|
|
915
915
|
if (t instanceof Uint8Array) {
|
|
916
916
|
if (!e.startsWith("HS"))
|
|
917
|
-
throw new TypeError(
|
|
917
|
+
throw new TypeError(ot(t, ...Ne));
|
|
918
918
|
return De.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
919
919
|
}
|
|
920
|
-
throw new TypeError(
|
|
920
|
+
throw new TypeError(ot(t, ...Ne, "Uint8Array", "JSON Web Key"));
|
|
921
921
|
}
|
|
922
|
-
const
|
|
923
|
-
const n = await
|
|
924
|
-
|
|
925
|
-
const o =
|
|
922
|
+
const qr = async (e, t, r, a) => {
|
|
923
|
+
const n = await jr(e, t, "verify");
|
|
924
|
+
Or(e, n);
|
|
925
|
+
const o = Fr(e, n.algorithm);
|
|
926
926
|
try {
|
|
927
927
|
return await De.subtle.verify(o, n, r, a);
|
|
928
928
|
} catch {
|
|
929
929
|
return !1;
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
|
-
async function
|
|
932
|
+
async function Xr(e, t, r) {
|
|
933
933
|
if (!he(e))
|
|
934
934
|
throw new k("Flattened JWS must be an object");
|
|
935
935
|
if (e.protected === void 0 && e.header === void 0)
|
|
@@ -950,37 +950,37 @@ async function Zr(e, t, r) {
|
|
|
950
950
|
} catch {
|
|
951
951
|
throw new k("JWS Protected Header is invalid");
|
|
952
952
|
}
|
|
953
|
-
if (!
|
|
953
|
+
if (!xr(a, e.header))
|
|
954
954
|
throw new k("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
955
955
|
const n = {
|
|
956
956
|
...a,
|
|
957
957
|
...e.header
|
|
958
|
-
}, o =
|
|
958
|
+
}, o = Yr(k, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
|
|
959
959
|
let s = !0;
|
|
960
960
|
if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
|
|
961
961
|
throw new k('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
962
962
|
const { alg: i } = n;
|
|
963
963
|
if (typeof i != "string" || !i)
|
|
964
964
|
throw new k('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
965
|
-
const d =
|
|
965
|
+
const d = zr("algorithms", r.algorithms);
|
|
966
966
|
if (d && !d.has(i))
|
|
967
|
-
throw new
|
|
967
|
+
throw new Ot('"alg" (Algorithm) Header Parameter value not allowed');
|
|
968
968
|
if (s) {
|
|
969
969
|
if (typeof e.payload != "string")
|
|
970
970
|
throw new k("JWS Payload must be a string");
|
|
971
971
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
972
972
|
throw new k("JWS Payload must be a string or an Uint8Array instance");
|
|
973
973
|
let m = !1;
|
|
974
|
-
typeof t == "function" ? (t = await t(a, e), m = !0,
|
|
975
|
-
const p =
|
|
974
|
+
typeof t == "function" ? (t = await t(a, e), m = !0, it(i, t, "verify"), me(t) && (t = await Br(t, i))) : it(i, t, "verify");
|
|
975
|
+
const p = br(we.encode(e.protected ?? ""), we.encode("."), typeof e.payload == "string" ? we.encode(e.payload) : e.payload);
|
|
976
976
|
let u;
|
|
977
977
|
try {
|
|
978
978
|
u = X(e.signature);
|
|
979
979
|
} catch {
|
|
980
980
|
throw new k("Failed to base64url decode the signature");
|
|
981
981
|
}
|
|
982
|
-
if (!await
|
|
983
|
-
throw new
|
|
982
|
+
if (!await qr(i, t, u, p))
|
|
983
|
+
throw new Pt();
|
|
984
984
|
let c;
|
|
985
985
|
if (s)
|
|
986
986
|
try {
|
|
@@ -992,17 +992,17 @@ async function Zr(e, t, r) {
|
|
|
992
992
|
const h = { payload: c };
|
|
993
993
|
return e.protected !== void 0 && (h.protectedHeader = a), e.header !== void 0 && (h.unprotectedHeader = e.header), m ? { ...h, key: t } : h;
|
|
994
994
|
}
|
|
995
|
-
async function
|
|
995
|
+
async function Qr(e, t, r) {
|
|
996
996
|
if (e instanceof Uint8Array && (e = be.decode(e)), typeof e != "string")
|
|
997
997
|
throw new k("Compact JWS must be a string or Uint8Array");
|
|
998
998
|
const { 0: a, 1: n, 2: o, length: s } = e.split(".");
|
|
999
999
|
if (s !== 3)
|
|
1000
1000
|
throw new k("Invalid Compact JWS");
|
|
1001
|
-
const i = await
|
|
1001
|
+
const i = await Xr({ payload: n, protected: a, signature: o }, t, r), d = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
1002
1002
|
return typeof t == "function" ? { ...d, key: i.key } : d;
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1005
|
-
const t =
|
|
1004
|
+
const Zr = (e) => Math.floor(e.getTime() / 1e3), Wt = 60, Gt = Wt * 60, Qe = Gt * 24, ea = Qe * 7, ta = Qe * 365.25, ra = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, ct = (e) => {
|
|
1005
|
+
const t = ra.exec(e);
|
|
1006
1006
|
if (!t || t[4] && t[1])
|
|
1007
1007
|
throw new TypeError("Invalid time period format");
|
|
1008
1008
|
const r = parseFloat(t[2]), a = t[3].toLowerCase();
|
|
@@ -1020,56 +1020,56 @@ const ta = (e) => Math.floor(e.getTime() / 1e3), Bt = 60, Jt = Bt * 60, et = Jt
|
|
|
1020
1020
|
case "min":
|
|
1021
1021
|
case "mins":
|
|
1022
1022
|
case "m":
|
|
1023
|
-
n = Math.round(r *
|
|
1023
|
+
n = Math.round(r * Wt);
|
|
1024
1024
|
break;
|
|
1025
1025
|
case "hour":
|
|
1026
1026
|
case "hours":
|
|
1027
1027
|
case "hr":
|
|
1028
1028
|
case "hrs":
|
|
1029
1029
|
case "h":
|
|
1030
|
-
n = Math.round(r *
|
|
1030
|
+
n = Math.round(r * Gt);
|
|
1031
1031
|
break;
|
|
1032
1032
|
case "day":
|
|
1033
1033
|
case "days":
|
|
1034
1034
|
case "d":
|
|
1035
|
-
n = Math.round(r *
|
|
1035
|
+
n = Math.round(r * Qe);
|
|
1036
1036
|
break;
|
|
1037
1037
|
case "week":
|
|
1038
1038
|
case "weeks":
|
|
1039
1039
|
case "w":
|
|
1040
|
-
n = Math.round(r *
|
|
1040
|
+
n = Math.round(r * ea);
|
|
1041
1041
|
break;
|
|
1042
1042
|
default:
|
|
1043
|
-
n = Math.round(r *
|
|
1043
|
+
n = Math.round(r * ta);
|
|
1044
1044
|
break;
|
|
1045
1045
|
}
|
|
1046
1046
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
1047
|
-
},
|
|
1047
|
+
}, lt = (e) => e.toLowerCase().replace(/^application\//, ""), aa = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, na = (e, t, r = {}) => {
|
|
1048
1048
|
let a;
|
|
1049
1049
|
try {
|
|
1050
1050
|
a = JSON.parse(be.decode(t));
|
|
1051
1051
|
} catch {
|
|
1052
1052
|
}
|
|
1053
1053
|
if (!he(a))
|
|
1054
|
-
throw new
|
|
1054
|
+
throw new B("JWT Claims Set must be a top-level JSON object");
|
|
1055
1055
|
const { typ: n } = r;
|
|
1056
|
-
if (n && (typeof e.typ != "string" ||
|
|
1057
|
-
throw new
|
|
1056
|
+
if (n && (typeof e.typ != "string" || lt(e.typ) !== lt(n)))
|
|
1057
|
+
throw new D('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
1058
1058
|
const { requiredClaims: o = [], issuer: s, subject: i, audience: d, maxTokenAge: m } = r, p = [...o];
|
|
1059
1059
|
m !== void 0 && p.push("iat"), d !== void 0 && p.push("aud"), i !== void 0 && p.push("sub"), s !== void 0 && p.push("iss");
|
|
1060
1060
|
for (const f of new Set(p.reverse()))
|
|
1061
1061
|
if (!(f in a))
|
|
1062
|
-
throw new
|
|
1062
|
+
throw new D(`missing required "${f}" claim`, a, f, "missing");
|
|
1063
1063
|
if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
|
|
1064
|
-
throw new
|
|
1064
|
+
throw new D('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
1065
1065
|
if (i && a.sub !== i)
|
|
1066
|
-
throw new
|
|
1067
|
-
if (d && !
|
|
1068
|
-
throw new
|
|
1066
|
+
throw new D('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
1067
|
+
if (d && !aa(a.aud, typeof d == "string" ? [d] : d))
|
|
1068
|
+
throw new D('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
1069
1069
|
let u;
|
|
1070
1070
|
switch (typeof r.clockTolerance) {
|
|
1071
1071
|
case "string":
|
|
1072
|
-
u =
|
|
1072
|
+
u = ct(r.clockTolerance);
|
|
1073
1073
|
break;
|
|
1074
1074
|
case "number":
|
|
1075
1075
|
u = r.clockTolerance;
|
|
@@ -1080,142 +1080,142 @@ const ta = (e) => Math.floor(e.getTime() / 1e3), Bt = 60, Jt = Bt * 60, et = Jt
|
|
|
1080
1080
|
default:
|
|
1081
1081
|
throw new TypeError("Invalid clockTolerance option type");
|
|
1082
1082
|
}
|
|
1083
|
-
const { currentDate: c } = r, h =
|
|
1083
|
+
const { currentDate: c } = r, h = Zr(c || /* @__PURE__ */ new Date());
|
|
1084
1084
|
if ((a.iat !== void 0 || m) && typeof a.iat != "number")
|
|
1085
|
-
throw new
|
|
1085
|
+
throw new D('"iat" claim must be a number', a, "iat", "invalid");
|
|
1086
1086
|
if (a.nbf !== void 0) {
|
|
1087
1087
|
if (typeof a.nbf != "number")
|
|
1088
|
-
throw new
|
|
1088
|
+
throw new D('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
1089
1089
|
if (a.nbf > h + u)
|
|
1090
|
-
throw new
|
|
1090
|
+
throw new D('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
|
1091
1091
|
}
|
|
1092
1092
|
if (a.exp !== void 0) {
|
|
1093
1093
|
if (typeof a.exp != "number")
|
|
1094
|
-
throw new
|
|
1094
|
+
throw new D('"exp" claim must be a number', a, "exp", "invalid");
|
|
1095
1095
|
if (a.exp <= h - u)
|
|
1096
|
-
throw new
|
|
1096
|
+
throw new ze('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
1097
1097
|
}
|
|
1098
1098
|
if (m) {
|
|
1099
|
-
const f = h - a.iat, E = typeof m == "number" ? m :
|
|
1099
|
+
const f = h - a.iat, E = typeof m == "number" ? m : ct(m);
|
|
1100
1100
|
if (f - u > E)
|
|
1101
|
-
throw new
|
|
1101
|
+
throw new ze('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
1102
1102
|
if (f < 0 - u)
|
|
1103
|
-
throw new
|
|
1103
|
+
throw new D('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
|
1104
1104
|
}
|
|
1105
1105
|
return a;
|
|
1106
1106
|
};
|
|
1107
|
-
async function
|
|
1107
|
+
async function oa(e, t, r) {
|
|
1108
1108
|
var a;
|
|
1109
|
-
const n = await
|
|
1109
|
+
const n = await Qr(e, t, r);
|
|
1110
1110
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
1111
|
-
throw new
|
|
1112
|
-
const o = { payload:
|
|
1111
|
+
throw new B("JWTs MUST NOT use unencoded payload");
|
|
1112
|
+
const o = { payload: na(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
1113
1113
|
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
1114
1114
|
}
|
|
1115
|
-
const
|
|
1116
|
-
function
|
|
1115
|
+
const sa = X;
|
|
1116
|
+
function ia(e) {
|
|
1117
1117
|
if (typeof e != "string")
|
|
1118
|
-
throw new
|
|
1118
|
+
throw new B("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1119
1119
|
const { 1: t, length: r } = e.split(".");
|
|
1120
1120
|
if (r === 5)
|
|
1121
|
-
throw new
|
|
1121
|
+
throw new B("Only JWTs using Compact JWS serialization can be decoded");
|
|
1122
1122
|
if (r !== 3)
|
|
1123
|
-
throw new
|
|
1123
|
+
throw new B("Invalid JWT");
|
|
1124
1124
|
if (!t)
|
|
1125
|
-
throw new
|
|
1125
|
+
throw new B("JWTs must contain a payload");
|
|
1126
1126
|
let a;
|
|
1127
1127
|
try {
|
|
1128
|
-
a =
|
|
1128
|
+
a = sa(t);
|
|
1129
1129
|
} catch {
|
|
1130
|
-
throw new
|
|
1130
|
+
throw new B("Failed to base64url decode the payload");
|
|
1131
1131
|
}
|
|
1132
1132
|
let n;
|
|
1133
1133
|
try {
|
|
1134
1134
|
n = JSON.parse(be.decode(a));
|
|
1135
1135
|
} catch {
|
|
1136
|
-
throw new
|
|
1136
|
+
throw new B("Failed to parse the decoded payload as JSON");
|
|
1137
1137
|
}
|
|
1138
1138
|
if (!he(n))
|
|
1139
|
-
throw new
|
|
1139
|
+
throw new B("Invalid JWT Claims Set");
|
|
1140
1140
|
return n;
|
|
1141
1141
|
}
|
|
1142
1142
|
const ye = async (e) => {
|
|
1143
1143
|
try {
|
|
1144
|
-
const t =
|
|
1145
|
-
return await
|
|
1146
|
-
issuer:
|
|
1144
|
+
const t = A.ALG, r = await Gr(fr, t);
|
|
1145
|
+
return await oa(e, r, {
|
|
1146
|
+
issuer: A.ISSUER
|
|
1147
1147
|
});
|
|
1148
1148
|
} catch {
|
|
1149
1149
|
return;
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, ca = (e) => {
|
|
1152
1152
|
try {
|
|
1153
|
-
return
|
|
1153
|
+
return ia(e);
|
|
1154
1154
|
} catch {
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
1157
|
}, S = [];
|
|
1158
1158
|
for (let e = 0; e < 256; ++e)
|
|
1159
1159
|
S.push((e + 256).toString(16).slice(1));
|
|
1160
|
-
function
|
|
1160
|
+
function la(e, t = 0) {
|
|
1161
1161
|
return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
|
|
1162
1162
|
}
|
|
1163
1163
|
let We;
|
|
1164
|
-
const
|
|
1165
|
-
function
|
|
1164
|
+
const da = new Uint8Array(16);
|
|
1165
|
+
function ua() {
|
|
1166
1166
|
if (!We) {
|
|
1167
1167
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1168
1168
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1169
1169
|
We = crypto.getRandomValues.bind(crypto);
|
|
1170
1170
|
}
|
|
1171
|
-
return We(
|
|
1171
|
+
return We(da);
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1174
|
-
function
|
|
1175
|
-
if (
|
|
1176
|
-
return
|
|
1173
|
+
const ha = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), dt = { randomUUID: ha };
|
|
1174
|
+
function ut(e, t, r) {
|
|
1175
|
+
if (dt.randomUUID && !t && !e)
|
|
1176
|
+
return dt.randomUUID();
|
|
1177
1177
|
e = e || {};
|
|
1178
|
-
const a = e.random || (e.rng ||
|
|
1179
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1178
|
+
const a = e.random || (e.rng || ua)();
|
|
1179
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, la(a);
|
|
1180
1180
|
}
|
|
1181
|
-
const
|
|
1181
|
+
const ht = globalThis.crypto, ma = (e) => `${ut()}${ut()}`.slice(0, e), pa = (e) => btoa(
|
|
1182
1182
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1183
1183
|
);
|
|
1184
|
-
async function
|
|
1185
|
-
if (!
|
|
1184
|
+
async function ga(e) {
|
|
1185
|
+
if (!ht.subtle)
|
|
1186
1186
|
throw new Error(
|
|
1187
1187
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1188
1188
|
);
|
|
1189
|
-
const t = new TextEncoder().encode(e), r = await
|
|
1190
|
-
return
|
|
1189
|
+
const t = new TextEncoder().encode(e), r = await ht.subtle.digest("SHA-256", t);
|
|
1190
|
+
return pa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1191
1191
|
}
|
|
1192
|
-
async function
|
|
1193
|
-
const t =
|
|
1192
|
+
async function ya(e) {
|
|
1193
|
+
const t = ma(43), r = await ga(t);
|
|
1194
1194
|
return {
|
|
1195
1195
|
code_verifier: t,
|
|
1196
1196
|
code_challenge: r
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function Bt(e, t) {
|
|
1200
1200
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
1201
1201
|
}
|
|
1202
|
-
const
|
|
1202
|
+
const mt = (e, t) => {
|
|
1203
1203
|
const r = JSON.stringify(
|
|
1204
1204
|
typeof t == "function" ? t() : t
|
|
1205
1205
|
);
|
|
1206
|
-
window.localStorage.setItem(e, r),
|
|
1207
|
-
},
|
|
1208
|
-
window.localStorage.removeItem(e),
|
|
1209
|
-
},
|
|
1206
|
+
window.localStorage.setItem(e, r), Bt(e, r);
|
|
1207
|
+
}, fa = (e) => {
|
|
1208
|
+
window.localStorage.removeItem(e), Bt(e, null);
|
|
1209
|
+
}, pt = (e) => window.localStorage.getItem(e), ba = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1210
1210
|
function Ie({
|
|
1211
1211
|
key: e,
|
|
1212
1212
|
initialValue: t
|
|
1213
1213
|
}) {
|
|
1214
|
-
const r =
|
|
1214
|
+
const r = ir(ba, () => pt(e)), a = q(
|
|
1215
1215
|
(s) => {
|
|
1216
1216
|
try {
|
|
1217
1217
|
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
1218
|
-
i == null ?
|
|
1218
|
+
i == null ? fa(e) : mt(e, i);
|
|
1219
1219
|
} catch (i) {
|
|
1220
1220
|
console.warn(i);
|
|
1221
1221
|
}
|
|
@@ -1228,40 +1228,40 @@ function Ie({
|
|
|
1228
1228
|
}, [a]);
|
|
1229
1229
|
return Q(() => {
|
|
1230
1230
|
try {
|
|
1231
|
-
|
|
1231
|
+
pt(e) === null && typeof t < "u" && mt(e, t);
|
|
1232
1232
|
} catch (s) {
|
|
1233
1233
|
console.warn(s);
|
|
1234
1234
|
}
|
|
1235
1235
|
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
1236
1236
|
}
|
|
1237
|
-
const
|
|
1237
|
+
const _ = [];
|
|
1238
1238
|
for (let e = 0; e < 256; ++e)
|
|
1239
|
-
|
|
1240
|
-
function
|
|
1241
|
-
return (
|
|
1239
|
+
_.push((e + 256).toString(16).slice(1));
|
|
1240
|
+
function Ea(e, t = 0) {
|
|
1241
|
+
return (_[e[t + 0]] + _[e[t + 1]] + _[e[t + 2]] + _[e[t + 3]] + "-" + _[e[t + 4]] + _[e[t + 5]] + "-" + _[e[t + 6]] + _[e[t + 7]] + "-" + _[e[t + 8]] + _[e[t + 9]] + "-" + _[e[t + 10]] + _[e[t + 11]] + _[e[t + 12]] + _[e[t + 13]] + _[e[t + 14]] + _[e[t + 15]]).toLowerCase();
|
|
1242
1242
|
}
|
|
1243
1243
|
let Ge;
|
|
1244
|
-
const
|
|
1245
|
-
function
|
|
1244
|
+
const wa = new Uint8Array(16);
|
|
1245
|
+
function Ta() {
|
|
1246
1246
|
if (!Ge) {
|
|
1247
1247
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1248
1248
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1249
1249
|
Ge = crypto.getRandomValues.bind(crypto);
|
|
1250
1250
|
}
|
|
1251
|
-
return Ge(
|
|
1251
|
+
return Ge(wa);
|
|
1252
1252
|
}
|
|
1253
|
-
const
|
|
1253
|
+
const Ia = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), gt = { randomUUID: Ia };
|
|
1254
1254
|
function Be(e, t, r) {
|
|
1255
|
-
if (
|
|
1256
|
-
return
|
|
1255
|
+
if (gt.randomUUID && !t && !e)
|
|
1256
|
+
return gt.randomUUID();
|
|
1257
1257
|
e = e || {};
|
|
1258
|
-
const a = e.random || (e.rng ||
|
|
1259
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1258
|
+
const a = e.random || (e.rng || Ta)();
|
|
1259
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ea(a);
|
|
1260
1260
|
}
|
|
1261
|
-
const oe = "Your session has expired. For your security, please log in again to continue.",
|
|
1261
|
+
const oe = "Your session has expired. For your security, please log in again to continue.", ka = "Your session has been successfully terminated.", Je = "Login failed. Please try again.", Sa = "Error getting access token, please re-authenticate.", _a = "You forgot to wrap your component in <AuthProvider>.", Ce = {
|
|
1262
1262
|
dev: "https://auth.gizmette.local.com:3003",
|
|
1263
1263
|
prod: "https://mylogin.gizmette.com/auth"
|
|
1264
|
-
},
|
|
1264
|
+
}, ke = "@@auth@@", ge = "LOADING", Ae = "LOGIN", Jt = "LOGOUT", Ee = "success", V = "failure", Vt = "include", Yt = "POST", zt = "application/json", Se = {
|
|
1265
1265
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1266
1266
|
$clientId: String!,
|
|
1267
1267
|
$username: String!,
|
|
@@ -1344,19 +1344,19 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1344
1344
|
}`
|
|
1345
1345
|
}, se = {
|
|
1346
1346
|
GET_REGISTRATION_OPTIONS: {
|
|
1347
|
-
schema:
|
|
1347
|
+
schema: Se.GET_REGISTRATION_OPTIONS,
|
|
1348
1348
|
method: "getPasskeyRegistrationOptions"
|
|
1349
1349
|
},
|
|
1350
1350
|
VERIFY_REGISTRATION: {
|
|
1351
|
-
schema:
|
|
1351
|
+
schema: Se.VERIFY_REGISTRATION,
|
|
1352
1352
|
method: "verifyPasskeyRegistration"
|
|
1353
1353
|
},
|
|
1354
1354
|
GET_AUTHENTICATION_OPTIONS: {
|
|
1355
|
-
schema:
|
|
1355
|
+
schema: Se.GET_AUTHENTICATION_OPTIONS,
|
|
1356
1356
|
method: "getPasskeyAuthenticationOptions"
|
|
1357
1357
|
},
|
|
1358
1358
|
VERIFY_AUTHENTICATION: {
|
|
1359
|
-
schema:
|
|
1359
|
+
schema: Se.VERIFY_AUTHENTICATION,
|
|
1360
1360
|
method: "verifyPasskeyAuthentication"
|
|
1361
1361
|
}
|
|
1362
1362
|
}, ie = async ({
|
|
@@ -1367,14 +1367,14 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1367
1367
|
}) => {
|
|
1368
1368
|
try {
|
|
1369
1369
|
const n = `Bearer ${e}`, o = await fetch(
|
|
1370
|
-
|
|
1370
|
+
Ft ? `${Ce.dev}/graphql` : `${Ce.prod}/graphql`,
|
|
1371
1371
|
{
|
|
1372
|
-
credentials:
|
|
1373
|
-
method:
|
|
1372
|
+
credentials: Vt,
|
|
1373
|
+
method: Yt,
|
|
1374
1374
|
headers: {
|
|
1375
1375
|
authorization: n,
|
|
1376
|
-
"Content-Type":
|
|
1377
|
-
[
|
|
1376
|
+
"Content-Type": zt,
|
|
1377
|
+
[xt.CLIENT_ID]: `${r}`
|
|
1378
1378
|
},
|
|
1379
1379
|
body: JSON.stringify({
|
|
1380
1380
|
query: t.schema,
|
|
@@ -1383,14 +1383,14 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1383
1383
|
}
|
|
1384
1384
|
);
|
|
1385
1385
|
if (o.status !== 200)
|
|
1386
|
-
return { status:
|
|
1386
|
+
return { status: V, data: [] };
|
|
1387
1387
|
const { data: s } = await o.json();
|
|
1388
1388
|
return {
|
|
1389
1389
|
status: Ee,
|
|
1390
1390
|
data: s[t.method]
|
|
1391
1391
|
};
|
|
1392
1392
|
} catch (n) {
|
|
1393
|
-
return console.error(n), { status:
|
|
1393
|
+
return console.error(n), { status: V, data: [] };
|
|
1394
1394
|
}
|
|
1395
1395
|
}, Le = async ({
|
|
1396
1396
|
type: e,
|
|
@@ -1399,42 +1399,42 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1399
1399
|
}) => {
|
|
1400
1400
|
try {
|
|
1401
1401
|
const a = await fetch(
|
|
1402
|
-
|
|
1402
|
+
Ft ? `${Ce.dev}/${e}` : `${Ce.prod}/${e}`,
|
|
1403
1403
|
{
|
|
1404
|
-
credentials:
|
|
1405
|
-
method:
|
|
1404
|
+
credentials: Vt,
|
|
1405
|
+
method: Yt,
|
|
1406
1406
|
headers: {
|
|
1407
|
-
"Content-Type":
|
|
1408
|
-
[
|
|
1407
|
+
"Content-Type": zt,
|
|
1408
|
+
[xt.CLIENT_ID]: `${t}`
|
|
1409
1409
|
},
|
|
1410
1410
|
body: JSON.stringify(r)
|
|
1411
1411
|
}
|
|
1412
1412
|
);
|
|
1413
1413
|
if (a.status !== 200)
|
|
1414
|
-
return { status:
|
|
1414
|
+
return { status: V, data: [] };
|
|
1415
1415
|
const { data: n } = await a.json();
|
|
1416
1416
|
return {
|
|
1417
1417
|
status: Ee,
|
|
1418
1418
|
data: n || []
|
|
1419
1419
|
};
|
|
1420
1420
|
} catch (a) {
|
|
1421
|
-
return console.error(a), { status:
|
|
1421
|
+
return console.error(a), { status: V, data: [] };
|
|
1422
1422
|
}
|
|
1423
|
-
},
|
|
1423
|
+
}, Aa = process.env.NODE_ENV === "production", Ft = !Aa, jt = {
|
|
1424
1424
|
isLoading: !0,
|
|
1425
1425
|
isAuthenticated: !1,
|
|
1426
1426
|
user: void 0,
|
|
1427
1427
|
logoutReason: "",
|
|
1428
1428
|
debug: !1,
|
|
1429
1429
|
authenticationType: ""
|
|
1430
|
-
},
|
|
1430
|
+
}, va = (e) => {
|
|
1431
1431
|
try {
|
|
1432
|
-
const t =
|
|
1433
|
-
return t ? t[
|
|
1432
|
+
const t = ca(e);
|
|
1433
|
+
return t ? t[A.USER_ID_KEY] : "";
|
|
1434
1434
|
} catch {
|
|
1435
1435
|
return "";
|
|
1436
1436
|
}
|
|
1437
|
-
},
|
|
1437
|
+
}, Ra = async ({
|
|
1438
1438
|
userId: e,
|
|
1439
1439
|
clientId: t,
|
|
1440
1440
|
domain: r,
|
|
@@ -1451,14 +1451,14 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1451
1451
|
domain: r,
|
|
1452
1452
|
idToken: a
|
|
1453
1453
|
}
|
|
1454
|
-
})) == null ? void 0 : n.status) ||
|
|
1454
|
+
})) == null ? void 0 : n.status) || V
|
|
1455
1455
|
};
|
|
1456
1456
|
} catch {
|
|
1457
1457
|
return {
|
|
1458
|
-
status:
|
|
1458
|
+
status: V
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
},
|
|
1461
|
+
}, Na = async ({
|
|
1462
1462
|
username: e,
|
|
1463
1463
|
password: t,
|
|
1464
1464
|
clientId: r,
|
|
@@ -1487,12 +1487,12 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1487
1487
|
ua: m
|
|
1488
1488
|
}
|
|
1489
1489
|
}), c = await ye((p = u == null ? void 0 : u.data) == null ? void 0 : p.idToken);
|
|
1490
|
-
return c && c.payload[
|
|
1490
|
+
return c && c.payload[A.USER_ID_KEY] !== "" && c.payload[A.NONCE_KEY] === a ? {
|
|
1491
1491
|
idToken: u.data.idToken,
|
|
1492
1492
|
accessToken: u.data.accessToken,
|
|
1493
1493
|
refreshToken: u.data.refreshToken,
|
|
1494
|
-
userId: c.payload[
|
|
1495
|
-
email: c.payload[
|
|
1494
|
+
userId: c.payload[A.USER_ID_KEY],
|
|
1495
|
+
email: c.payload[A.EMAIL_KEY],
|
|
1496
1496
|
status: !0
|
|
1497
1497
|
} : {
|
|
1498
1498
|
status: !1
|
|
@@ -1502,7 +1502,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1502
1502
|
status: !1
|
|
1503
1503
|
};
|
|
1504
1504
|
}
|
|
1505
|
-
},
|
|
1505
|
+
}, xa = async ({
|
|
1506
1506
|
nonce: e,
|
|
1507
1507
|
clientId: t,
|
|
1508
1508
|
code_challenge: r
|
|
@@ -1522,16 +1522,16 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1522
1522
|
status: Ee,
|
|
1523
1523
|
data: n.data.code
|
|
1524
1524
|
} : {
|
|
1525
|
-
status:
|
|
1525
|
+
status: V,
|
|
1526
1526
|
data: ""
|
|
1527
1527
|
};
|
|
1528
1528
|
} catch {
|
|
1529
1529
|
return {
|
|
1530
|
-
status:
|
|
1530
|
+
status: V,
|
|
1531
1531
|
data: ""
|
|
1532
1532
|
};
|
|
1533
1533
|
}
|
|
1534
|
-
},
|
|
1534
|
+
}, Ca = async ({
|
|
1535
1535
|
clientId: e,
|
|
1536
1536
|
userId: t,
|
|
1537
1537
|
nonce: r,
|
|
@@ -1553,10 +1553,10 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1553
1553
|
domain: o
|
|
1554
1554
|
}
|
|
1555
1555
|
}), d = await ye((s = i == null ? void 0 : i.data) == null ? void 0 : s.accessToken);
|
|
1556
|
-
return d && d.payload[
|
|
1556
|
+
return d && d.payload[A.USER_ID_KEY] !== "" && d.payload[A.NONCE_KEY] === r ? {
|
|
1557
1557
|
accessToken: i.data.accessToken,
|
|
1558
1558
|
refreshToken: i.data.refreshToken,
|
|
1559
|
-
userId: d.payload[
|
|
1559
|
+
userId: d.payload[A.USER_ID_KEY],
|
|
1560
1560
|
status: !0
|
|
1561
1561
|
} : {
|
|
1562
1562
|
status: !1
|
|
@@ -1567,7 +1567,7 @@ const oe = "Your session has expired. For your security, please log in again to
|
|
|
1567
1567
|
};
|
|
1568
1568
|
}
|
|
1569
1569
|
};
|
|
1570
|
-
class
|
|
1570
|
+
class Oa {
|
|
1571
1571
|
constructor(t = null, r = null) {
|
|
1572
1572
|
Ue(this, "refreshTokenPromise", null), Ue(this, "accessToken"), Ue(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1573
1573
|
}
|
|
@@ -1596,8 +1596,8 @@ class Da {
|
|
|
1596
1596
|
domain: n
|
|
1597
1597
|
}) {
|
|
1598
1598
|
const o = await ye(this.refreshToken);
|
|
1599
|
-
if (o && o.payload[
|
|
1600
|
-
const s = await
|
|
1599
|
+
if (o && o.payload[A.USER_ID_KEY] !== "") {
|
|
1600
|
+
const s = await Ca({
|
|
1601
1601
|
clientId: t,
|
|
1602
1602
|
userId: r,
|
|
1603
1603
|
nonce: a,
|
|
@@ -1610,22 +1610,22 @@ class Da {
|
|
|
1610
1610
|
newAccessToken: s.accessToken,
|
|
1611
1611
|
newRefreshToken: s.refreshToken
|
|
1612
1612
|
}) : {
|
|
1613
|
-
status:
|
|
1613
|
+
status: V
|
|
1614
1614
|
};
|
|
1615
1615
|
} else
|
|
1616
1616
|
return {
|
|
1617
|
-
status:
|
|
1617
|
+
status: V
|
|
1618
1618
|
};
|
|
1619
1619
|
}
|
|
1620
1620
|
}
|
|
1621
|
-
const
|
|
1621
|
+
const Pa = (e) => q(
|
|
1622
1622
|
(...t) => {
|
|
1623
1623
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1624
1624
|
},
|
|
1625
1625
|
[e]
|
|
1626
1626
|
), ce = () => {
|
|
1627
|
-
throw new Error(
|
|
1628
|
-
},
|
|
1627
|
+
throw new Error(_a);
|
|
1628
|
+
}, qt = sr({
|
|
1629
1629
|
isAuthenticated: !1,
|
|
1630
1630
|
isLoading: !1,
|
|
1631
1631
|
login: ce,
|
|
@@ -1636,11 +1636,11 @@ const La = (e) => q(
|
|
|
1636
1636
|
loginWithPasskey: ce,
|
|
1637
1637
|
logoutReason: "",
|
|
1638
1638
|
authenticationType: ""
|
|
1639
|
-
}),
|
|
1640
|
-
state:
|
|
1639
|
+
}), Da = z.createContext({
|
|
1640
|
+
state: jt,
|
|
1641
1641
|
dispatch: () => {
|
|
1642
1642
|
}
|
|
1643
|
-
}),
|
|
1643
|
+
}), La = (e, t) => (t == null ? void 0 : t.type) === ge ? {
|
|
1644
1644
|
...e,
|
|
1645
1645
|
isLoading: t.payload.isLoading
|
|
1646
1646
|
} : (t == null ? void 0 : t.type) === Ae ? {
|
|
@@ -1650,82 +1650,82 @@ const La = (e) => q(
|
|
|
1650
1650
|
user: t.payload.user,
|
|
1651
1651
|
authenticationType: t.payload.authenticationType,
|
|
1652
1652
|
logoutReason: ""
|
|
1653
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1653
|
+
} : (t == null ? void 0 : t.type) === Jt ? {
|
|
1654
1654
|
...e,
|
|
1655
1655
|
isLoading: !1,
|
|
1656
1656
|
isAuthenticated: !1,
|
|
1657
1657
|
user: void 0,
|
|
1658
1658
|
authenticationType: "",
|
|
1659
1659
|
logoutReason: t.payload.logoutReason
|
|
1660
|
-
} : e,
|
|
1660
|
+
} : e, Ma = ({
|
|
1661
1661
|
children: e,
|
|
1662
1662
|
sessionExpiration: t,
|
|
1663
1663
|
clientId: r,
|
|
1664
1664
|
domain: a = "",
|
|
1665
1665
|
debug: n = !1
|
|
1666
1666
|
}) => {
|
|
1667
|
-
const [o, s] =
|
|
1668
|
-
...
|
|
1667
|
+
const [o, s] = wt(La, {
|
|
1668
|
+
...jt,
|
|
1669
1669
|
debug: n
|
|
1670
|
-
}), i =
|
|
1671
|
-
key: `${
|
|
1670
|
+
}), i = Pa(n), d = M(!1), [m, p, , u] = Ie({
|
|
1671
|
+
key: `${ke}::${r}::@@user@@`
|
|
1672
1672
|
}), [c, h, , f] = Ie({
|
|
1673
|
-
key: `${
|
|
1674
|
-
}), [E, w, ,
|
|
1673
|
+
key: `${ke}::${r}::@@access@@`
|
|
1674
|
+
}), [E, w, , I] = Ie(
|
|
1675
1675
|
{
|
|
1676
|
-
key: `${
|
|
1676
|
+
key: `${ke}::${r}::@@refresh@@`
|
|
1677
1677
|
}
|
|
1678
|
-
), [U,
|
|
1679
|
-
key: `${
|
|
1680
|
-
}), O = new
|
|
1681
|
-
i("removeLocalStorage: removing local storage"), u(), f(),
|
|
1678
|
+
), [$, U, , K] = Ie({
|
|
1679
|
+
key: `${ke}::${r}::@@nonce@@`
|
|
1680
|
+
}), O = new Oa(c, E), H = q(() => {
|
|
1681
|
+
i("removeLocalStorage: removing local storage"), u(), f(), I(), K();
|
|
1682
1682
|
}, [
|
|
1683
1683
|
f,
|
|
1684
1684
|
u,
|
|
1685
|
-
|
|
1686
|
-
|
|
1685
|
+
K,
|
|
1686
|
+
I,
|
|
1687
1687
|
i
|
|
1688
|
-
]),
|
|
1688
|
+
]), W = q(
|
|
1689
1689
|
(y) => {
|
|
1690
1690
|
i(
|
|
1691
1691
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
1692
1692
|
y
|
|
1693
1693
|
), s({
|
|
1694
|
-
type:
|
|
1694
|
+
type: Jt,
|
|
1695
1695
|
payload: {
|
|
1696
1696
|
logoutReason: y || oe
|
|
1697
1697
|
}
|
|
1698
|
-
}),
|
|
1698
|
+
}), H(), s({ type: ge, payload: { isLoading: !1 } });
|
|
1699
1699
|
},
|
|
1700
|
-
[
|
|
1700
|
+
[H, i]
|
|
1701
1701
|
), x = q(
|
|
1702
1702
|
async (y) => {
|
|
1703
1703
|
i("invalidateAndLogout: invalidating and logging out");
|
|
1704
|
-
const { user: T } = o, b = (T == null ? void 0 : T.userId) ||
|
|
1704
|
+
const { user: T } = o, b = (T == null ? void 0 : T.userId) || va(m);
|
|
1705
1705
|
b || i(
|
|
1706
1706
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1707
|
-
), await
|
|
1707
|
+
), await Ra({
|
|
1708
1708
|
userId: b,
|
|
1709
1709
|
clientId: r,
|
|
1710
1710
|
domain: a,
|
|
1711
1711
|
idToken: m
|
|
1712
|
-
}),
|
|
1712
|
+
}), W(y || oe);
|
|
1713
1713
|
},
|
|
1714
|
-
[m, o, r, a,
|
|
1714
|
+
[m, o, r, a, W, i]
|
|
1715
1715
|
);
|
|
1716
1716
|
Q(() => {
|
|
1717
1717
|
if (!d.current)
|
|
1718
1718
|
return o.isLoading && m !== null ? (async () => {
|
|
1719
1719
|
try {
|
|
1720
1720
|
const y = await ye(m);
|
|
1721
|
-
y && y.payload[
|
|
1721
|
+
y && y.payload[A.USER_ID_KEY] !== "" ? (i("useEffect: setting the authentication state"), s({
|
|
1722
1722
|
type: Ae,
|
|
1723
1723
|
payload: {
|
|
1724
|
-
authenticationType: y.payload[
|
|
1724
|
+
authenticationType: y.payload[A.AUTH_TYPE_KEY],
|
|
1725
1725
|
user: {
|
|
1726
|
-
userId: y.payload[
|
|
1727
|
-
username: y.payload[
|
|
1728
|
-
email: y.payload[
|
|
1726
|
+
userId: y.payload[A.USER_ID_KEY],
|
|
1727
|
+
username: y.payload[A.USERNAME_KEY],
|
|
1728
|
+
email: y.payload[A.EMAIL_KEY]
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
1731
|
})) : (i("useEffect: invalid JWT, invalidating and logging out"), await x(oe));
|
|
@@ -1739,23 +1739,23 @@ const La = (e) => q(
|
|
|
1739
1739
|
};
|
|
1740
1740
|
}, [o.isLoading, m, x, i]);
|
|
1741
1741
|
const pe = async (y, T) => {
|
|
1742
|
-
s({ type: ge, payload: { isLoading: !0 } }),
|
|
1742
|
+
s({ type: ge, payload: { isLoading: !0 } }), H();
|
|
1743
1743
|
const b = Be();
|
|
1744
|
-
|
|
1745
|
-
const { code_verifier: te, code_challenge:
|
|
1744
|
+
U(b), i("login: Logging in with password");
|
|
1745
|
+
const { code_verifier: te, code_challenge: or } = await ya(), at = await xa({
|
|
1746
1746
|
nonce: b,
|
|
1747
1747
|
clientId: r,
|
|
1748
|
-
code_challenge:
|
|
1748
|
+
code_challenge: or
|
|
1749
1749
|
});
|
|
1750
|
-
if (
|
|
1751
|
-
const re = await
|
|
1750
|
+
if (at.status) {
|
|
1751
|
+
const re = await Na({
|
|
1752
1752
|
username: y,
|
|
1753
1753
|
password: T,
|
|
1754
1754
|
clientId: r,
|
|
1755
1755
|
sessionExpiration: t,
|
|
1756
1756
|
nonce: b,
|
|
1757
1757
|
type: ue.CODE,
|
|
1758
|
-
code:
|
|
1758
|
+
code: at.data,
|
|
1759
1759
|
code_verifier: te,
|
|
1760
1760
|
domain: a,
|
|
1761
1761
|
ua: navigator.userAgent
|
|
@@ -1770,26 +1770,26 @@ const La = (e) => q(
|
|
|
1770
1770
|
email: re.email
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
|
-
}), !0) : (
|
|
1773
|
+
}), !0) : (W(Je), !1);
|
|
1774
1774
|
}
|
|
1775
1775
|
return !1;
|
|
1776
1776
|
}, Z = async (y) => {
|
|
1777
|
-
y == null || y.preventDefault(), await x(
|
|
1778
|
-
},
|
|
1777
|
+
y == null || y.preventDefault(), await x(ka);
|
|
1778
|
+
}, v = async () => {
|
|
1779
1779
|
const { isAuthenticated: y, user: T } = o;
|
|
1780
1780
|
try {
|
|
1781
1781
|
if (y && T && T.userId) {
|
|
1782
1782
|
if (c) {
|
|
1783
1783
|
i("getAccessToken");
|
|
1784
1784
|
const te = await ye(c);
|
|
1785
|
-
if (te && te.payload[
|
|
1785
|
+
if (te && te.payload[A.USER_ID_KEY] !== "")
|
|
1786
1786
|
return c;
|
|
1787
1787
|
}
|
|
1788
1788
|
i("getAccessToken: invalid access token, trying to refresh it");
|
|
1789
1789
|
const b = await O.refreshtoken({
|
|
1790
1790
|
clientId: r,
|
|
1791
1791
|
userId: T.userId,
|
|
1792
|
-
nonce:
|
|
1792
|
+
nonce: $,
|
|
1793
1793
|
domain: a
|
|
1794
1794
|
});
|
|
1795
1795
|
return b.status && b.status === "success" && b.newAccessToken ? (h(b.newAccessToken), w(b.newRefreshToken), b.newAccessToken) : (i(
|
|
@@ -1802,9 +1802,9 @@ const La = (e) => q(
|
|
|
1802
1802
|
} catch {
|
|
1803
1803
|
return i(
|
|
1804
1804
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1805
|
-
), await x(
|
|
1805
|
+
), await x(Sa), "";
|
|
1806
1806
|
}
|
|
1807
|
-
},
|
|
1807
|
+
}, P = () => o.isAuthenticated && m ? m : "", G = async () => {
|
|
1808
1808
|
const { user: y } = o;
|
|
1809
1809
|
let T = await ie({
|
|
1810
1810
|
accessToken: c,
|
|
@@ -1818,7 +1818,7 @@ const La = (e) => q(
|
|
|
1818
1818
|
});
|
|
1819
1819
|
if (T.status)
|
|
1820
1820
|
try {
|
|
1821
|
-
const b = await
|
|
1821
|
+
const b = await mr(T.data);
|
|
1822
1822
|
return T = await ie({
|
|
1823
1823
|
accessToken: c,
|
|
1824
1824
|
clientId: r,
|
|
@@ -1845,9 +1845,9 @@ const La = (e) => q(
|
|
|
1845
1845
|
}
|
|
1846
1846
|
return !1;
|
|
1847
1847
|
}, ee = async () => {
|
|
1848
|
-
s({ type: ge, payload: { isLoading: !0 } }),
|
|
1848
|
+
s({ type: ge, payload: { isLoading: !0 } }), H();
|
|
1849
1849
|
const y = Be();
|
|
1850
|
-
|
|
1850
|
+
U(y), i("loginWithPasskey");
|
|
1851
1851
|
const T = Be();
|
|
1852
1852
|
let b = await ie({
|
|
1853
1853
|
accessToken: c,
|
|
@@ -1860,7 +1860,7 @@ const La = (e) => q(
|
|
|
1860
1860
|
});
|
|
1861
1861
|
if (b.status)
|
|
1862
1862
|
try {
|
|
1863
|
-
const te = await
|
|
1863
|
+
const te = await yr(b.data);
|
|
1864
1864
|
return b = await ie({
|
|
1865
1865
|
accessToken: c,
|
|
1866
1866
|
clientId: r,
|
|
@@ -1884,7 +1884,7 @@ const La = (e) => q(
|
|
|
1884
1884
|
email: b.data.email
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
|
-
}), !0) : (
|
|
1887
|
+
}), !0) : (W(Je), !1);
|
|
1888
1888
|
} catch {
|
|
1889
1889
|
return await ie({
|
|
1890
1890
|
accessToken: c,
|
|
@@ -1898,38 +1898,38 @@ const La = (e) => q(
|
|
|
1898
1898
|
domain: a,
|
|
1899
1899
|
sessionExpiration: t
|
|
1900
1900
|
}
|
|
1901
|
-
}),
|
|
1901
|
+
}), W(Je), !1;
|
|
1902
1902
|
}
|
|
1903
1903
|
return !1;
|
|
1904
1904
|
};
|
|
1905
|
-
return /* @__PURE__ */ l(
|
|
1906
|
-
|
|
1905
|
+
return /* @__PURE__ */ l(Da.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ l(
|
|
1906
|
+
qt.Provider,
|
|
1907
1907
|
{
|
|
1908
1908
|
value: {
|
|
1909
1909
|
...o,
|
|
1910
1910
|
login: pe,
|
|
1911
1911
|
logout: Z,
|
|
1912
|
-
getAccessToken:
|
|
1913
|
-
getIdToken:
|
|
1914
|
-
registeringForPasskey:
|
|
1912
|
+
getAccessToken: v,
|
|
1913
|
+
getIdToken: P,
|
|
1914
|
+
registeringForPasskey: G,
|
|
1915
1915
|
loginWithPasskey: ee
|
|
1916
1916
|
},
|
|
1917
1917
|
children: e
|
|
1918
1918
|
}
|
|
1919
1919
|
) });
|
|
1920
|
-
},
|
|
1921
|
-
function
|
|
1920
|
+
}, Ze = (e = qt) => Tt(e), ao = "user", no = "assistant", oo = "system", so = "internal", io = "hidden", co = "I'm having trouble right now. Please try again later.", lo = "OpenAI", uo = "OpenAI", ho = "Anthropic", mo = 128e3, po = "action-message", go = "action-reset", yo = "action-model", fo = "action-restore", bo = "action-streaming", Eo = "action-engine", wo = "action-search", To = "action-sort", Io = "action-toggle-tag", ko = "action-reset-tags", So = "action-set-tags", _o = "sassy-saint-", Ao = "details", vo = "search", Ro = "sort", No = "engine-toggle", xo = "==stats==", $a = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", yt = (e) => Number.isFinite(e) ? e : 0;
|
|
1921
|
+
function Ua(e) {
|
|
1922
1922
|
return {
|
|
1923
1923
|
days: Math.trunc(e / 864e5),
|
|
1924
1924
|
hours: Math.trunc(e / 36e5 % 24),
|
|
1925
1925
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
1926
1926
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
1927
1927
|
milliseconds: Math.trunc(e % 1e3),
|
|
1928
|
-
microseconds: Math.trunc(
|
|
1929
|
-
nanoseconds: Math.trunc(
|
|
1928
|
+
microseconds: Math.trunc(yt(e * 1e3) % 1e3),
|
|
1929
|
+
nanoseconds: Math.trunc(yt(e * 1e6) % 1e3)
|
|
1930
1930
|
};
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Ka(e) {
|
|
1933
1933
|
return {
|
|
1934
1934
|
days: e / 86400000n,
|
|
1935
1935
|
hours: e / 3600000n % 24n,
|
|
@@ -1940,20 +1940,20 @@ function Wa(e) {
|
|
|
1940
1940
|
nanoseconds: 0n
|
|
1941
1941
|
};
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function Ha(e) {
|
|
1944
1944
|
switch (typeof e) {
|
|
1945
1945
|
case "number": {
|
|
1946
1946
|
if (Number.isFinite(e))
|
|
1947
|
-
return
|
|
1947
|
+
return Ua(e);
|
|
1948
1948
|
break;
|
|
1949
1949
|
}
|
|
1950
1950
|
case "bigint":
|
|
1951
|
-
return
|
|
1951
|
+
return Ka(e);
|
|
1952
1952
|
}
|
|
1953
1953
|
throw new TypeError("Expected a finite number or bigint");
|
|
1954
1954
|
}
|
|
1955
|
-
const
|
|
1956
|
-
function
|
|
1955
|
+
const Wa = (e) => e === 0 || e === 0n, Ga = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Ba = 1e-7, Ja = 24n * 60n * 60n * 1000n;
|
|
1956
|
+
function Va(e, t) {
|
|
1957
1957
|
const r = typeof e == "bigint";
|
|
1958
1958
|
if (!r && !Number.isFinite(e))
|
|
1959
1959
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -1962,34 +1962,34 @@ function za(e, t) {
|
|
|
1962
1962
|
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);
|
|
1963
1963
|
let n = [];
|
|
1964
1964
|
const o = (p, u) => {
|
|
1965
|
-
const c = Math.floor(p * 10 ** u +
|
|
1965
|
+
const c = Math.floor(p * 10 ** u + Ba);
|
|
1966
1966
|
return (Math.round(c) / 10 ** u).toFixed(u);
|
|
1967
1967
|
}, s = (p, u, c, h) => {
|
|
1968
|
-
if (!((n.length === 0 || !t.colonNotation) &&
|
|
1968
|
+
if (!((n.length === 0 || !t.colonNotation) && Wa(p) && !(t.colonNotation && c === "m"))) {
|
|
1969
1969
|
if (h ?? (h = String(p)), t.colonNotation) {
|
|
1970
1970
|
const f = h.includes(".") ? h.split(".")[0].length : h.length, E = n.length > 0 ? 2 : 1;
|
|
1971
1971
|
h = "0".repeat(Math.max(0, E - f)) + h;
|
|
1972
1972
|
} else
|
|
1973
|
-
h += t.verbose ? " " +
|
|
1973
|
+
h += t.verbose ? " " + Ga(u, p) : c;
|
|
1974
1974
|
n.push(h);
|
|
1975
1975
|
}
|
|
1976
|
-
}, i =
|
|
1976
|
+
}, i = Ha(e), d = BigInt(i.days);
|
|
1977
1977
|
if (t.hideYearAndDays ? s(BigInt(d) * 24n + BigInt(i.hours), "hour", "h") : (t.hideYear ? s(d, "day", "d") : (s(d / 365n, "year", "y"), s(d % 365n, "day", "d")), s(Number(i.hours), "hour", "h")), s(Number(i.minutes), "minute", "m"), !t.hideSeconds)
|
|
1978
1978
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1979
1979
|
const p = Number(i.seconds), u = Number(i.milliseconds), c = Number(i.microseconds), h = Number(i.nanoseconds);
|
|
1980
1980
|
if (s(p, "second", "s"), t.formatSubMilliseconds)
|
|
1981
1981
|
s(u, "millisecond", "ms"), s(c, "microsecond", "µs"), s(h, "nanosecond", "ns");
|
|
1982
1982
|
else {
|
|
1983
|
-
const f = u + c / 1e3 + h / 1e6, E = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = f >= 1 ? Math.round(f) : Math.ceil(f),
|
|
1983
|
+
const f = u + c / 1e3 + h / 1e6, E = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = f >= 1 ? Math.round(f) : Math.ceil(f), I = E ? f.toFixed(E) : w;
|
|
1984
1984
|
s(
|
|
1985
|
-
Number.parseFloat(
|
|
1985
|
+
Number.parseFloat(I),
|
|
1986
1986
|
"millisecond",
|
|
1987
1987
|
"ms",
|
|
1988
|
-
|
|
1988
|
+
I
|
|
1989
1989
|
);
|
|
1990
1990
|
}
|
|
1991
1991
|
} else {
|
|
1992
|
-
const p = (r ? Number(e %
|
|
1992
|
+
const p = (r ? Number(e % Ja) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, c = o(p, u), h = t.keepDecimalsOnWholeSeconds ? c : c.replace(/\.0+$/, "");
|
|
1993
1993
|
s(Number.parseFloat(h), "second", "s", h);
|
|
1994
1994
|
}
|
|
1995
1995
|
if (n.length === 0)
|
|
@@ -1997,7 +1997,7 @@ function za(e, t) {
|
|
|
1997
1997
|
const m = t.colonNotation ? ":" : " ";
|
|
1998
1998
|
return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(m);
|
|
1999
1999
|
}
|
|
2000
|
-
const
|
|
2000
|
+
const Ya = process.env.NODE_ENV === "production", Xt = !Ya, za = Xt ? "gizmette.local.com" : "gizmette.com", Co = async () => {
|
|
2001
2001
|
const e = {
|
|
2002
2002
|
/**
|
|
2003
2003
|
* A boolean value that indicates the application would
|
|
@@ -2046,11 +2046,11 @@ const Fa = process.env.NODE_ENV === "production", rt = !Fa, ja = rt ? "gizmette.
|
|
|
2046
2046
|
e
|
|
2047
2047
|
);
|
|
2048
2048
|
});
|
|
2049
|
-
},
|
|
2049
|
+
}, Oo = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ l("dl", { className: "my-0", children: /* @__PURE__ */ N("div", { className: "flex items-center justify-between", children: [
|
|
2050
2050
|
/* @__PURE__ */ l("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2051
2051
|
/* @__PURE__ */ l("dd", { className: "my-1 inline-block", children: t[r] })
|
|
2052
2052
|
] }) }, `${e}-${r}`)) : null;
|
|
2053
|
-
function
|
|
2053
|
+
function Po({
|
|
2054
2054
|
data: e,
|
|
2055
2055
|
formatter: t = (r) => r
|
|
2056
2056
|
}) {
|
|
@@ -2062,57 +2062,57 @@ function Ko({
|
|
|
2062
2062
|
);
|
|
2063
2063
|
return t(a ? a / r.length : 0);
|
|
2064
2064
|
}
|
|
2065
|
-
const
|
|
2065
|
+
const Do = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Lo = new Intl.NumberFormat("en", {
|
|
2066
2066
|
style: "decimal",
|
|
2067
2067
|
signDisplay: "never",
|
|
2068
2068
|
minimumFractionDigits: 0,
|
|
2069
2069
|
maximumFractionDigits: 0
|
|
2070
|
-
}),
|
|
2070
|
+
}), Mo = (e) => e > 0 ? Va(e, {
|
|
2071
2071
|
secondsDecimalDigits: 2,
|
|
2072
2072
|
unitCount: 2
|
|
2073
|
-
}) : "N/A",
|
|
2073
|
+
}) : "N/A", Fa = (e) => g(
|
|
2074
2074
|
"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",
|
|
2075
|
-
e ||
|
|
2076
|
-
),
|
|
2075
|
+
e || Xt ? "pt-4" : "pt-10"
|
|
2076
|
+
), $o = (e, t) => t === 1 ? e : `${e}s`, Uo = (e, t) => {
|
|
2077
2077
|
let r;
|
|
2078
2078
|
return (...a) => {
|
|
2079
2079
|
window.clearTimeout(r), r = window.setTimeout(() => e(...a), t);
|
|
2080
2080
|
};
|
|
2081
|
-
},
|
|
2081
|
+
}, ft = "av-button", et = "icon", Qt = "button", ja = "link", qa = ({
|
|
2082
2082
|
type: e,
|
|
2083
2083
|
size: t,
|
|
2084
2084
|
labelRight: r,
|
|
2085
2085
|
labelLeft: a,
|
|
2086
2086
|
align: n
|
|
2087
2087
|
}) => {
|
|
2088
|
-
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";
|
|
2088
|
+
const o = "text-sm font-medium max-h-8 py-0 px-2", s = "text-base font-medium max-h-9 py-1 px-3", i = "text-lg font-medium max-h-12 py-2 px-4";
|
|
2089
2089
|
switch (e) {
|
|
2090
|
-
case
|
|
2091
|
-
return g(
|
|
2090
|
+
case Qt:
|
|
2091
|
+
return g({
|
|
2092
2092
|
[o]: t === "small",
|
|
2093
2093
|
[s]: t === "medium",
|
|
2094
2094
|
[i]: t === "large"
|
|
2095
2095
|
});
|
|
2096
|
-
case
|
|
2097
|
-
return g("
|
|
2096
|
+
case ja:
|
|
2097
|
+
return g("text-center", {
|
|
2098
2098
|
[o]: t === "small",
|
|
2099
2099
|
[s]: t === "medium",
|
|
2100
2100
|
[i]: t === "large"
|
|
2101
2101
|
});
|
|
2102
|
-
case
|
|
2102
|
+
case et:
|
|
2103
2103
|
return g("inline-flex items-center", {
|
|
2104
2104
|
"justify-center": n === "center",
|
|
2105
2105
|
"justify-start": n === "left",
|
|
2106
2106
|
"justify-end": n === "right",
|
|
2107
2107
|
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
2108
|
-
"h-6 px-
|
|
2108
|
+
"h-6 px-2 text-sm font-medium": t === "small" && (r || a),
|
|
2109
2109
|
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
2110
|
-
"h-8 px-
|
|
2110
|
+
"h-8 px-3 text-base font-medium": t === "medium" && (r || a),
|
|
2111
2111
|
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
2112
2112
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
|
-
},
|
|
2115
|
+
}, Xa = ({
|
|
2116
2116
|
mode: e,
|
|
2117
2117
|
noBackground: t,
|
|
2118
2118
|
noTruncate: r,
|
|
@@ -2169,7 +2169,7 @@ const Ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2169
2169
|
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
2170
2170
|
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
2171
2171
|
});
|
|
2172
|
-
},
|
|
2172
|
+
}, Qa = ({
|
|
2173
2173
|
mode: e,
|
|
2174
2174
|
disabled: t,
|
|
2175
2175
|
variant: r
|
|
@@ -2204,7 +2204,7 @@ const Ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2204
2204
|
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
2205
2205
|
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
2206
2206
|
});
|
|
2207
|
-
},
|
|
2207
|
+
}, Za = ({
|
|
2208
2208
|
mode: e,
|
|
2209
2209
|
disabled: t,
|
|
2210
2210
|
variant: r
|
|
@@ -2239,7 +2239,7 @@ const Ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2239
2239
|
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
2240
2240
|
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
2241
2241
|
});
|
|
2242
|
-
},
|
|
2242
|
+
}, en = ({
|
|
2243
2243
|
mode: e,
|
|
2244
2244
|
noBorder: t,
|
|
2245
2245
|
variant: r
|
|
@@ -2274,14 +2274,14 @@ const Ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2274
2274
|
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
2275
2275
|
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
2276
2276
|
});
|
|
2277
|
-
},
|
|
2277
|
+
}, tn = ({
|
|
2278
2278
|
focusMode: e
|
|
2279
2279
|
}) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
2280
2280
|
"focus:outline-focus-dark": e === "dark",
|
|
2281
2281
|
"focus:outline-focus-light": e === "light",
|
|
2282
2282
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
2283
2283
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
2284
|
-
}),
|
|
2284
|
+
}), tt = ({
|
|
2285
2285
|
type: e,
|
|
2286
2286
|
className: t,
|
|
2287
2287
|
raw: r,
|
|
@@ -2298,43 +2298,49 @@ const Ho = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2298
2298
|
noTruncate: h,
|
|
2299
2299
|
align: f,
|
|
2300
2300
|
radius: E
|
|
2301
|
-
}) => (c || (c = "primary"), r ? g(
|
|
2302
|
-
|
|
2303
|
-
|
|
2301
|
+
}) => (c || (c = "primary"), r ? g(ft, t) : g(
|
|
2302
|
+
ft,
|
|
2303
|
+
Xa({
|
|
2304
2304
|
mode: a,
|
|
2305
2305
|
variant: c,
|
|
2306
2306
|
noBackground: u,
|
|
2307
2307
|
noTruncate: h,
|
|
2308
2308
|
radius: E
|
|
2309
2309
|
}),
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2310
|
+
qa({
|
|
2311
|
+
type: e,
|
|
2312
|
+
size: i,
|
|
2313
|
+
labelRight: m,
|
|
2314
|
+
labelLeft: p,
|
|
2315
|
+
align: f
|
|
2316
|
+
}),
|
|
2317
|
+
en({ mode: a, variant: c, noBorder: d }),
|
|
2318
|
+
tn({ focusMode: n }),
|
|
2319
|
+
Qa({ mode: a, variant: c, disabled: o }),
|
|
2320
|
+
Za({ mode: a, variant: c, disabled: o }),
|
|
2315
2321
|
{
|
|
2316
2322
|
"w-full": s,
|
|
2317
2323
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
2318
2324
|
},
|
|
2319
2325
|
t
|
|
2320
|
-
)),
|
|
2326
|
+
)), rn = (e, t, r) => {
|
|
2321
2327
|
var a;
|
|
2322
2328
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
2323
|
-
}, Me =
|
|
2329
|
+
}, Me = z.forwardRef((e, t) => {
|
|
2324
2330
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
2325
2331
|
return /* @__PURE__ */ l(
|
|
2326
2332
|
"button",
|
|
2327
2333
|
{
|
|
2328
2334
|
ref: t,
|
|
2329
2335
|
onClick: (o) => {
|
|
2330
|
-
|
|
2336
|
+
rn(o, a, r);
|
|
2331
2337
|
},
|
|
2332
2338
|
...n
|
|
2333
2339
|
}
|
|
2334
2340
|
);
|
|
2335
2341
|
});
|
|
2336
2342
|
Me.displayName = "BaseButton";
|
|
2337
|
-
const
|
|
2343
|
+
const Zt = z.forwardRef(
|
|
2338
2344
|
({
|
|
2339
2345
|
children: e,
|
|
2340
2346
|
disabled: t = !1,
|
|
@@ -2350,8 +2356,8 @@ const er = P.forwardRef(
|
|
|
2350
2356
|
radius: u = "large",
|
|
2351
2357
|
...c
|
|
2352
2358
|
}, h) => {
|
|
2353
|
-
const f =
|
|
2354
|
-
type:
|
|
2359
|
+
const f = tt({
|
|
2360
|
+
type: Qt,
|
|
2355
2361
|
mode: r,
|
|
2356
2362
|
focusMode: a,
|
|
2357
2363
|
fullWidth: n,
|
|
@@ -2376,8 +2382,8 @@ const er = P.forwardRef(
|
|
|
2376
2382
|
);
|
|
2377
2383
|
}
|
|
2378
2384
|
);
|
|
2379
|
-
|
|
2380
|
-
const
|
|
2385
|
+
Zt.displayName = "Button";
|
|
2386
|
+
const je = z.forwardRef(
|
|
2381
2387
|
({
|
|
2382
2388
|
children: e,
|
|
2383
2389
|
disabled: t = !1,
|
|
@@ -2396,10 +2402,10 @@ const qe = P.forwardRef(
|
|
|
2396
2402
|
noBackground: f = !1,
|
|
2397
2403
|
align: E = "center",
|
|
2398
2404
|
radius: w = "large",
|
|
2399
|
-
...
|
|
2400
|
-
},
|
|
2401
|
-
const
|
|
2402
|
-
type:
|
|
2405
|
+
...I
|
|
2406
|
+
}, $) => {
|
|
2407
|
+
const U = tt({
|
|
2408
|
+
type: et,
|
|
2403
2409
|
mode: r,
|
|
2404
2410
|
focusMode: a,
|
|
2405
2411
|
fullWidth: n,
|
|
@@ -2413,45 +2419,45 @@ const qe = P.forwardRef(
|
|
|
2413
2419
|
noBackground: f,
|
|
2414
2420
|
align: E,
|
|
2415
2421
|
radius: w
|
|
2416
|
-
}),
|
|
2422
|
+
}), K = g({
|
|
2417
2423
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2418
2424
|
"text-copy-light": r === "dark" && !i,
|
|
2419
2425
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2420
2426
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2421
2427
|
});
|
|
2422
|
-
return /* @__PURE__ */
|
|
2428
|
+
return /* @__PURE__ */ N(
|
|
2423
2429
|
Me,
|
|
2424
2430
|
{
|
|
2425
|
-
ref:
|
|
2426
|
-
className:
|
|
2431
|
+
ref: $,
|
|
2432
|
+
className: U,
|
|
2427
2433
|
disabled: t,
|
|
2428
2434
|
type: s,
|
|
2429
2435
|
"aria-label": m || p,
|
|
2430
|
-
...
|
|
2436
|
+
...I,
|
|
2431
2437
|
children: [
|
|
2432
2438
|
h && /* @__PURE__ */ l("span", { className: "pr-2", children: h }),
|
|
2433
|
-
/* @__PURE__ */ l("div", { className:
|
|
2439
|
+
/* @__PURE__ */ l("div", { className: K, children: e }),
|
|
2434
2440
|
c && /* @__PURE__ */ l("span", { className: "pl-2", children: c })
|
|
2435
2441
|
]
|
|
2436
2442
|
}
|
|
2437
2443
|
);
|
|
2438
2444
|
}
|
|
2439
2445
|
);
|
|
2440
|
-
|
|
2446
|
+
je.displayName = "ButtonIcon";
|
|
2441
2447
|
/*!
|
|
2442
|
-
@versini/ui-button v3.0
|
|
2448
|
+
@versini/ui-button v3.2.0
|
|
2443
2449
|
© 2024 gizmette.com
|
|
2444
2450
|
*/
|
|
2445
2451
|
try {
|
|
2446
2452
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
2447
|
-
version: "3.0
|
|
2448
|
-
buildTime: "12/
|
|
2453
|
+
version: "3.2.0",
|
|
2454
|
+
buildTime: "12/31/2024 09:01 AM EST",
|
|
2449
2455
|
homepage: "https://github.com/aversini/ui-components",
|
|
2450
2456
|
license: "MIT"
|
|
2451
2457
|
});
|
|
2452
2458
|
} catch {
|
|
2453
2459
|
}
|
|
2454
|
-
const
|
|
2460
|
+
const an = z.forwardRef(
|
|
2455
2461
|
({
|
|
2456
2462
|
children: e,
|
|
2457
2463
|
disabled: t = !1,
|
|
@@ -2470,11 +2476,11 @@ const on = P.forwardRef(
|
|
|
2470
2476
|
noBackground: f = !1,
|
|
2471
2477
|
align: E = "center",
|
|
2472
2478
|
active: w = !1,
|
|
2473
|
-
radius:
|
|
2474
|
-
|
|
2475
|
-
},
|
|
2476
|
-
const
|
|
2477
|
-
type:
|
|
2479
|
+
radius: I = "large",
|
|
2480
|
+
...$
|
|
2481
|
+
}, U) => {
|
|
2482
|
+
const K = tt({
|
|
2483
|
+
type: et,
|
|
2478
2484
|
mode: r,
|
|
2479
2485
|
focusMode: a,
|
|
2480
2486
|
fullWidth: n,
|
|
@@ -2487,13 +2493,13 @@ const on = P.forwardRef(
|
|
|
2487
2493
|
labelLeft: h,
|
|
2488
2494
|
noBackground: f,
|
|
2489
2495
|
align: E,
|
|
2490
|
-
radius:
|
|
2496
|
+
radius: I
|
|
2491
2497
|
}), O = g({
|
|
2492
2498
|
"text-copy-accent-dark": r === "light" && !i,
|
|
2493
2499
|
"text-copy-light": r === "dark" && !i,
|
|
2494
2500
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
2495
2501
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
2496
|
-
}),
|
|
2502
|
+
}), H = w ? g(
|
|
2497
2503
|
"relative",
|
|
2498
2504
|
"focus-within:static",
|
|
2499
2505
|
"focus-within:after:border-transparent",
|
|
@@ -2510,15 +2516,15 @@ const on = P.forwardRef(
|
|
|
2510
2516
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
2511
2517
|
}
|
|
2512
2518
|
) : "";
|
|
2513
|
-
return /* @__PURE__ */ l("div", { className:
|
|
2519
|
+
return /* @__PURE__ */ l("div", { className: H, children: /* @__PURE__ */ N(
|
|
2514
2520
|
Me,
|
|
2515
2521
|
{
|
|
2516
|
-
ref:
|
|
2517
|
-
className:
|
|
2522
|
+
ref: U,
|
|
2523
|
+
className: K,
|
|
2518
2524
|
disabled: t,
|
|
2519
2525
|
type: s,
|
|
2520
2526
|
"aria-label": m || p,
|
|
2521
|
-
|
|
2527
|
+
...$,
|
|
2522
2528
|
children: [
|
|
2523
2529
|
h && /* @__PURE__ */ l("span", { className: "pr-2", children: h }),
|
|
2524
2530
|
/* @__PURE__ */ l("div", { className: O, children: e }),
|
|
@@ -2528,26 +2534,26 @@ const on = P.forwardRef(
|
|
|
2528
2534
|
) });
|
|
2529
2535
|
}
|
|
2530
2536
|
);
|
|
2531
|
-
|
|
2537
|
+
an.displayName = "ButtonSort";
|
|
2532
2538
|
/*!
|
|
2533
|
-
@versini/ui-card v2.0.
|
|
2539
|
+
@versini/ui-card v2.0.5
|
|
2534
2540
|
© 2024 gizmette.com
|
|
2535
2541
|
*/
|
|
2536
2542
|
try {
|
|
2537
2543
|
window.__VERSINI_UI_CARD__ || (window.__VERSINI_UI_CARD__ = {
|
|
2538
|
-
version: "2.0.
|
|
2539
|
-
buildTime: "12/30/2024
|
|
2544
|
+
version: "2.0.5",
|
|
2545
|
+
buildTime: "12/30/2024 07:48 PM EST",
|
|
2540
2546
|
homepage: "https://github.com/aversini/ui-components",
|
|
2541
2547
|
license: "MIT"
|
|
2542
2548
|
});
|
|
2543
2549
|
} catch {
|
|
2544
2550
|
}
|
|
2545
2551
|
const ve = "av-card";
|
|
2546
|
-
function
|
|
2547
|
-
const t =
|
|
2552
|
+
function nn(e) {
|
|
2553
|
+
const t = It();
|
|
2548
2554
|
return `${e}${t}`;
|
|
2549
2555
|
}
|
|
2550
|
-
const
|
|
2556
|
+
const on = ({
|
|
2551
2557
|
className: e,
|
|
2552
2558
|
headerClassName: t,
|
|
2553
2559
|
bodyClassName: r,
|
|
@@ -2587,7 +2593,7 @@ const cn = ({
|
|
|
2587
2593
|
footer: p
|
|
2588
2594
|
};
|
|
2589
2595
|
};
|
|
2590
|
-
function
|
|
2596
|
+
function sn({
|
|
2591
2597
|
id: e,
|
|
2592
2598
|
content: t,
|
|
2593
2599
|
userAriaLabelledby: r,
|
|
@@ -2595,7 +2601,7 @@ function ln({
|
|
|
2595
2601
|
}) {
|
|
2596
2602
|
return typeof t == "string" ? /* @__PURE__ */ l("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ l("div", { className: a, children: t }) : t ? /* @__PURE__ */ l("div", { className: a, id: e, children: t }) : null;
|
|
2597
2603
|
}
|
|
2598
|
-
const
|
|
2604
|
+
const cn = ({
|
|
2599
2605
|
header: e,
|
|
2600
2606
|
headerClassName: t,
|
|
2601
2607
|
footer: r,
|
|
@@ -2610,7 +2616,7 @@ const dn = ({
|
|
|
2610
2616
|
...u
|
|
2611
2617
|
}) => {
|
|
2612
2618
|
let c = null, h = null;
|
|
2613
|
-
const f = typeof e == "string", E =
|
|
2619
|
+
const f = typeof e == "string", E = nn(ve), w = on({
|
|
2614
2620
|
className: o,
|
|
2615
2621
|
headerClassName: t,
|
|
2616
2622
|
bodyClassName: s,
|
|
@@ -2619,7 +2625,7 @@ const dn = ({
|
|
|
2619
2625
|
compact: m,
|
|
2620
2626
|
noBorder: p
|
|
2621
2627
|
});
|
|
2622
|
-
return f ? (c = E, h = c) : !f && e && i ? (c = null, h = i) : !f && e && !i ? (c = E, h = c) : (c = null, h = i || null), /* @__PURE__ */ l("div", { className: w.wrapper, children: /* @__PURE__ */
|
|
2628
|
+
return f ? (c = E, h = c) : !f && e && i ? (c = null, h = i) : !f && e && !i ? (c = E, h = c) : (c = null, h = i || null), /* @__PURE__ */ l("div", { className: w.wrapper, children: /* @__PURE__ */ N(
|
|
2623
2629
|
"section",
|
|
2624
2630
|
{
|
|
2625
2631
|
...h && {
|
|
@@ -2629,7 +2635,7 @@ const dn = ({
|
|
|
2629
2635
|
...u,
|
|
2630
2636
|
children: [
|
|
2631
2637
|
/* @__PURE__ */ l(
|
|
2632
|
-
|
|
2638
|
+
sn,
|
|
2633
2639
|
{
|
|
2634
2640
|
...c && { id: c },
|
|
2635
2641
|
content: e,
|
|
@@ -2654,7 +2660,7 @@ const dn = ({
|
|
|
2654
2660
|
...d
|
|
2655
2661
|
}) => {
|
|
2656
2662
|
const m = g(o, a);
|
|
2657
|
-
return /* @__PURE__ */
|
|
2663
|
+
return /* @__PURE__ */ N(fe, { children: [
|
|
2658
2664
|
/* @__PURE__ */ l(
|
|
2659
2665
|
"svg",
|
|
2660
2666
|
{
|
|
@@ -2673,19 +2679,19 @@ const dn = ({
|
|
|
2673
2679
|
] });
|
|
2674
2680
|
};
|
|
2675
2681
|
/*!
|
|
2676
|
-
@versini/ui-svgicon v3.0.
|
|
2682
|
+
@versini/ui-svgicon v3.0.2
|
|
2677
2683
|
© 2024 gizmette.com
|
|
2678
2684
|
*/
|
|
2679
2685
|
try {
|
|
2680
2686
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
2681
|
-
version: "3.0.
|
|
2682
|
-
buildTime: "12/30/2024
|
|
2687
|
+
version: "3.0.2",
|
|
2688
|
+
buildTime: "12/30/2024 07:48 PM EST",
|
|
2683
2689
|
homepage: "https://github.com/aversini/ui-components",
|
|
2684
2690
|
license: "MIT"
|
|
2685
2691
|
});
|
|
2686
2692
|
} catch {
|
|
2687
2693
|
}
|
|
2688
|
-
const
|
|
2694
|
+
const ln = ({ className: e, viewBox: t, ...r }) => /* @__PURE__ */ l(
|
|
2689
2695
|
$e,
|
|
2690
2696
|
{
|
|
2691
2697
|
defaultViewBox: "0 0 1200 500",
|
|
@@ -2703,13 +2709,13 @@ const un = ({ className: e, viewBox: t, ...r }) => /* @__PURE__ */ l(
|
|
|
2703
2709
|
}
|
|
2704
2710
|
) })
|
|
2705
2711
|
}
|
|
2706
|
-
),
|
|
2712
|
+
), dn = ({
|
|
2707
2713
|
className: e,
|
|
2708
2714
|
viewBox: t,
|
|
2709
2715
|
title: r,
|
|
2710
2716
|
monotone: a,
|
|
2711
2717
|
...n
|
|
2712
|
-
}) => /* @__PURE__ */
|
|
2718
|
+
}) => /* @__PURE__ */ N(
|
|
2713
2719
|
$e,
|
|
2714
2720
|
{
|
|
2715
2721
|
defaultViewBox: "0 0 640 512",
|
|
@@ -2729,7 +2735,7 @@ const un = ({ className: e, viewBox: t, ...r }) => /* @__PURE__ */ l(
|
|
|
2729
2735
|
/* @__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" })
|
|
2730
2736
|
]
|
|
2731
2737
|
}
|
|
2732
|
-
),
|
|
2738
|
+
), un = ({
|
|
2733
2739
|
className: e,
|
|
2734
2740
|
viewBox: t,
|
|
2735
2741
|
title: r,
|
|
@@ -2737,7 +2743,7 @@ const un = ({ className: e, viewBox: t, ...r }) => /* @__PURE__ */ l(
|
|
|
2737
2743
|
...n
|
|
2738
2744
|
}) => {
|
|
2739
2745
|
const o = a ? "1" : "0.4";
|
|
2740
|
-
return /* @__PURE__ */
|
|
2746
|
+
return /* @__PURE__ */ N(
|
|
2741
2747
|
$e,
|
|
2742
2748
|
{
|
|
2743
2749
|
defaultViewBox: "0 0 190 190",
|
|
@@ -2766,13 +2772,13 @@ const un = ({ className: e, viewBox: t, ...r }) => /* @__PURE__ */ l(
|
|
|
2766
2772
|
]
|
|
2767
2773
|
}
|
|
2768
2774
|
);
|
|
2769
|
-
},
|
|
2775
|
+
}, hn = ({
|
|
2770
2776
|
className: e,
|
|
2771
2777
|
viewBox: t,
|
|
2772
2778
|
title: r,
|
|
2773
2779
|
monotone: a,
|
|
2774
2780
|
...n
|
|
2775
|
-
}) => /* @__PURE__ */
|
|
2781
|
+
}) => /* @__PURE__ */ N(
|
|
2776
2782
|
$e,
|
|
2777
2783
|
{
|
|
2778
2784
|
defaultViewBox: "0 0 576 512",
|
|
@@ -2794,44 +2800,44 @@ const un = ({ className: e, viewBox: t, ...r }) => /* @__PURE__ */ l(
|
|
|
2794
2800
|
}
|
|
2795
2801
|
);
|
|
2796
2802
|
/*!
|
|
2797
|
-
@versini/ui-icons v3.0.
|
|
2803
|
+
@versini/ui-icons v3.0.2
|
|
2798
2804
|
© 2024 gizmette.com
|
|
2799
2805
|
*/
|
|
2800
2806
|
try {
|
|
2801
2807
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
2802
|
-
version: "3.0.
|
|
2803
|
-
buildTime: "12/30/2024
|
|
2808
|
+
version: "3.0.2",
|
|
2809
|
+
buildTime: "12/30/2024 07:48 PM EST",
|
|
2804
2810
|
homepage: "https://github.com/aversini/ui-components",
|
|
2805
2811
|
license: "MIT"
|
|
2806
2812
|
});
|
|
2807
2813
|
} catch {
|
|
2808
2814
|
}
|
|
2809
2815
|
/*!
|
|
2810
|
-
@versini/ui-main v2.0.
|
|
2816
|
+
@versini/ui-main v2.0.5
|
|
2811
2817
|
© 2024 gizmette.com
|
|
2812
2818
|
*/
|
|
2813
2819
|
try {
|
|
2814
2820
|
window.__VERSINI_UI_MAIN__ || (window.__VERSINI_UI_MAIN__ = {
|
|
2815
|
-
version: "2.0.
|
|
2816
|
-
buildTime: "12/30/2024
|
|
2821
|
+
version: "2.0.5",
|
|
2822
|
+
buildTime: "12/30/2024 07:48 PM EST",
|
|
2817
2823
|
homepage: "https://github.com/aversini/ui-components",
|
|
2818
2824
|
license: "MIT"
|
|
2819
2825
|
});
|
|
2820
2826
|
} catch {
|
|
2821
2827
|
}
|
|
2822
|
-
const
|
|
2828
|
+
const mn = "av-main", pn = ({ children: e, className: t, raw: r = !1 }) => {
|
|
2823
2829
|
const a = g(
|
|
2824
|
-
|
|
2830
|
+
mn,
|
|
2825
2831
|
{
|
|
2826
2832
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
2827
2833
|
},
|
|
2828
2834
|
t
|
|
2829
2835
|
);
|
|
2830
2836
|
return /* @__PURE__ */ l("main", { className: a, children: e });
|
|
2831
|
-
},
|
|
2837
|
+
}, gn = "av-flexgrid", _e = "av-flexgrid-item", Oe = 0.25, qe = z.createContext({
|
|
2832
2838
|
columnGap: 0,
|
|
2833
2839
|
rowGap: 0
|
|
2834
|
-
}),
|
|
2840
|
+
}), bt = ({
|
|
2835
2841
|
children: e,
|
|
2836
2842
|
className: t,
|
|
2837
2843
|
columnGap: r = 1,
|
|
@@ -2857,11 +2863,11 @@ const gn = "av-main", yn = ({ children: e, className: t, raw: r = !1 }) => {
|
|
|
2857
2863
|
marginLeft: r * -1 * Oe + "rem",
|
|
2858
2864
|
marginTop: a * -1 * Oe + "rem"
|
|
2859
2865
|
}, u = g(
|
|
2860
|
-
|
|
2866
|
+
gn,
|
|
2861
2867
|
"box-border flex flex-wrap"
|
|
2862
2868
|
), c = { columnGap: r, rowGap: a };
|
|
2863
|
-
return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: p, ...m, children: /* @__PURE__ */ l(
|
|
2864
|
-
},
|
|
2869
|
+
return t ? /* @__PURE__ */ l("div", { className: t, children: /* @__PURE__ */ l("div", { className: u, style: p, ...m, children: /* @__PURE__ */ l(qe.Provider, { value: c, children: e }) }) }) : /* @__PURE__ */ l("div", { className: u, style: p, ...m, children: /* @__PURE__ */ l(qe.Provider, { value: c, children: e }) });
|
|
2870
|
+
}, Ve = (e, t) => g({
|
|
2865
2871
|
"basis-1/12": e === 1 && !t,
|
|
2866
2872
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
2867
2873
|
"md:basis-1/12": e === 1 && t === "md",
|
|
@@ -2934,25 +2940,25 @@ const gn = "av-main", yn = ({ children: e, className: t, raw: r = !1 }) => {
|
|
|
2934
2940
|
"lg:basis-full": e === 12 && t === "lg",
|
|
2935
2941
|
"xl:basis-full": e === 12 && t === "xl",
|
|
2936
2942
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
2937
|
-
}),
|
|
2943
|
+
}), yn = ({
|
|
2938
2944
|
className: e,
|
|
2939
2945
|
span: t
|
|
2940
2946
|
}) => {
|
|
2941
2947
|
if (!t)
|
|
2942
|
-
return g(e,
|
|
2948
|
+
return g(e, _e, "box-border basis-auto");
|
|
2943
2949
|
if (typeof t == "number")
|
|
2944
|
-
return g(e,
|
|
2945
|
-
[`${
|
|
2950
|
+
return g(e, _e, "box-border max-w-full", {
|
|
2951
|
+
[`${Ve(t)}`]: !0
|
|
2946
2952
|
});
|
|
2947
2953
|
if (typeof t == "string")
|
|
2948
|
-
return g(e,
|
|
2954
|
+
return g(e, _e, "box-border basis-auto", {
|
|
2949
2955
|
"max-w-full grow": t === "auto"
|
|
2950
2956
|
});
|
|
2951
2957
|
if (typeof t == "object") {
|
|
2952
|
-
const r = Object.entries(t).map(([a, n]) => a === "fallback" ?
|
|
2958
|
+
const r = Object.entries(t).map(([a, n]) => a === "fallback" ? Ve(n) : Ve(n, a));
|
|
2953
2959
|
return g(
|
|
2954
2960
|
e,
|
|
2955
|
-
|
|
2961
|
+
_e,
|
|
2956
2962
|
"box-border",
|
|
2957
2963
|
r
|
|
2958
2964
|
);
|
|
@@ -2963,36 +2969,36 @@ const gn = "av-main", yn = ({ children: e, className: t, raw: r = !1 }) => {
|
|
|
2963
2969
|
span: r,
|
|
2964
2970
|
...a
|
|
2965
2971
|
}) => {
|
|
2966
|
-
const { columnGap: n, rowGap: o } =
|
|
2972
|
+
const { columnGap: n, rowGap: o } = Tt(qe), s = {
|
|
2967
2973
|
paddingLeft: n * Oe + "rem",
|
|
2968
2974
|
paddingTop: o * Oe + "rem"
|
|
2969
|
-
}, i =
|
|
2975
|
+
}, i = yn({
|
|
2970
2976
|
className: t,
|
|
2971
2977
|
span: r
|
|
2972
2978
|
});
|
|
2973
2979
|
return /* @__PURE__ */ l("div", { className: i, style: s, ...a, children: e });
|
|
2974
2980
|
};
|
|
2975
2981
|
/*!
|
|
2976
|
-
@versini/ui-system v2.0.
|
|
2982
|
+
@versini/ui-system v2.0.6
|
|
2977
2983
|
© 2024 gizmette.com
|
|
2978
2984
|
*/
|
|
2979
2985
|
try {
|
|
2980
2986
|
window.__VERSINI_UI_SYSTEM__ || (window.__VERSINI_UI_SYSTEM__ = {
|
|
2981
|
-
version: "2.0.
|
|
2982
|
-
buildTime: "12/30/2024
|
|
2987
|
+
version: "2.0.6",
|
|
2988
|
+
buildTime: "12/30/2024 07:48 PM EST",
|
|
2983
2989
|
homepage: "https://github.com/aversini/ui-components",
|
|
2984
2990
|
license: "MIT"
|
|
2985
2991
|
});
|
|
2986
2992
|
} catch {
|
|
2987
2993
|
}
|
|
2988
|
-
const
|
|
2989
|
-
function
|
|
2990
|
-
const e =
|
|
2994
|
+
const er = "av-text-input", fn = "av-text-input-wrapper", Ye = "av-text-input-helper-text";
|
|
2995
|
+
function bn() {
|
|
2996
|
+
const e = M(!1);
|
|
2991
2997
|
return Q(() => (e.current = !0, () => {
|
|
2992
2998
|
e.current = !1;
|
|
2993
2999
|
}), []), q(() => e.current, []);
|
|
2994
3000
|
}
|
|
2995
|
-
const
|
|
3001
|
+
const En = {
|
|
2996
3002
|
x: 0,
|
|
2997
3003
|
y: 0,
|
|
2998
3004
|
width: 0,
|
|
@@ -3002,8 +3008,8 @@ const Tn = {
|
|
|
3002
3008
|
bottom: 0,
|
|
3003
3009
|
right: 0
|
|
3004
3010
|
};
|
|
3005
|
-
function
|
|
3006
|
-
const t =
|
|
3011
|
+
function wn(e) {
|
|
3012
|
+
const t = bn(), r = M(0), a = M(null), [n, o] = j(En), s = kt(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
3007
3013
|
const d = i[0];
|
|
3008
3014
|
d && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
3009
3015
|
a.current && t() && o(d.contentRect);
|
|
@@ -3013,8 +3019,8 @@ function In(e) {
|
|
|
3013
3019
|
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3014
3020
|
}), [s, e]), [a, n];
|
|
3015
3021
|
}
|
|
3016
|
-
function
|
|
3017
|
-
const t =
|
|
3022
|
+
function Tn(e) {
|
|
3023
|
+
const t = It();
|
|
3018
3024
|
if (!e)
|
|
3019
3025
|
return t;
|
|
3020
3026
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -3024,7 +3030,7 @@ function _n(e) {
|
|
|
3024
3030
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
3025
3031
|
}
|
|
3026
3032
|
}
|
|
3027
|
-
const
|
|
3033
|
+
const tr = "SET_ANNOUNCEMENT", rr = "CLEAR_ANNOUNCEMENT", In = {
|
|
3028
3034
|
alert: null,
|
|
3029
3035
|
alertdialog: null,
|
|
3030
3036
|
log: "polite",
|
|
@@ -3032,14 +3038,14 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", kn = {
|
|
|
3032
3038
|
progressbar: null,
|
|
3033
3039
|
status: "polite",
|
|
3034
3040
|
timer: "assertive"
|
|
3035
|
-
},
|
|
3041
|
+
}, kn = (e, t) => {
|
|
3036
3042
|
switch (t == null ? void 0 : t.type) {
|
|
3037
|
-
case
|
|
3043
|
+
case tr:
|
|
3038
3044
|
return {
|
|
3039
3045
|
...e,
|
|
3040
3046
|
announcement: t.payload
|
|
3041
3047
|
};
|
|
3042
|
-
case
|
|
3048
|
+
case rr:
|
|
3043
3049
|
return {
|
|
3044
3050
|
...e,
|
|
3045
3051
|
announcement: null
|
|
@@ -3047,14 +3053,14 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", kn = {
|
|
|
3047
3053
|
default:
|
|
3048
3054
|
return e;
|
|
3049
3055
|
}
|
|
3050
|
-
},
|
|
3056
|
+
}, Sn = ({
|
|
3051
3057
|
onAnnouncementClear: e,
|
|
3052
3058
|
dispatch: t
|
|
3053
3059
|
}) => {
|
|
3054
3060
|
t({
|
|
3055
|
-
type:
|
|
3061
|
+
type: rr
|
|
3056
3062
|
}), typeof e == "function" && e();
|
|
3057
|
-
},
|
|
3063
|
+
}, Et = ({
|
|
3058
3064
|
children: e,
|
|
3059
3065
|
clearAnnouncementDelay: t,
|
|
3060
3066
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -3062,16 +3068,16 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", kn = {
|
|
|
3062
3068
|
dispatch: n
|
|
3063
3069
|
}) => {
|
|
3064
3070
|
clearTimeout(r.current), e !== null && n({
|
|
3065
|
-
type:
|
|
3071
|
+
type: tr,
|
|
3066
3072
|
payload: e
|
|
3067
3073
|
}), t && (r.current = setTimeout(
|
|
3068
|
-
() =>
|
|
3074
|
+
() => Sn({
|
|
3069
3075
|
onAnnouncementClear: a,
|
|
3070
3076
|
dispatch: n
|
|
3071
3077
|
}),
|
|
3072
3078
|
t
|
|
3073
3079
|
));
|
|
3074
|
-
},
|
|
3080
|
+
}, _n = ({
|
|
3075
3081
|
children: e,
|
|
3076
3082
|
announcementTimeoutRef: t,
|
|
3077
3083
|
announcementDelay: r,
|
|
@@ -3080,13 +3086,13 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", kn = {
|
|
|
3080
3086
|
onAnnouncementClear: o,
|
|
3081
3087
|
dispatch: s
|
|
3082
3088
|
}) => {
|
|
3083
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
3089
|
+
clearTimeout(t.current), r ? t.current = setTimeout(Et, r, {
|
|
3084
3090
|
children: e,
|
|
3085
3091
|
clearAnnouncementDelay: a,
|
|
3086
3092
|
clearAnnouncementTimeoutRef: n,
|
|
3087
3093
|
onAnnouncementClear: o,
|
|
3088
3094
|
dispatch: s
|
|
3089
|
-
}) :
|
|
3095
|
+
}) : Et({
|
|
3090
3096
|
children: e,
|
|
3091
3097
|
clearAnnouncementDelay: a,
|
|
3092
3098
|
clearAnnouncementTimeoutRef: n,
|
|
@@ -3094,7 +3100,7 @@ const rr = "SET_ANNOUNCEMENT", ar = "CLEAR_ANNOUNCEMENT", kn = {
|
|
|
3094
3100
|
dispatch: s
|
|
3095
3101
|
});
|
|
3096
3102
|
};
|
|
3097
|
-
function
|
|
3103
|
+
function ar({
|
|
3098
3104
|
children: e,
|
|
3099
3105
|
className: t,
|
|
3100
3106
|
politeness: r,
|
|
@@ -3105,12 +3111,12 @@ function nr({
|
|
|
3105
3111
|
visible: i,
|
|
3106
3112
|
...d
|
|
3107
3113
|
}) {
|
|
3108
|
-
const m =
|
|
3114
|
+
const m = M(null), p = M(null), [u, c] = wt(kn, {
|
|
3109
3115
|
announcement: null
|
|
3110
3116
|
});
|
|
3111
3117
|
let h = r;
|
|
3112
|
-
typeof h > "u" && (h = a ?
|
|
3113
|
-
|
|
3118
|
+
typeof h > "u" && (h = a ? In[a] : "assertive"), Q(() => {
|
|
3119
|
+
_n({
|
|
3114
3120
|
announcementTimeoutRef: m,
|
|
3115
3121
|
announcementDelay: n,
|
|
3116
3122
|
children: e,
|
|
@@ -3140,33 +3146,33 @@ function nr({
|
|
|
3140
3146
|
);
|
|
3141
3147
|
}
|
|
3142
3148
|
/*!
|
|
3143
|
-
@versini/ui-liveregion v1.2.
|
|
3149
|
+
@versini/ui-liveregion v1.2.7
|
|
3144
3150
|
© 2024 gizmette.com
|
|
3145
3151
|
*/
|
|
3146
3152
|
try {
|
|
3147
3153
|
window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
|
|
3148
|
-
version: "1.2.
|
|
3149
|
-
buildTime: "12/30/2024
|
|
3154
|
+
version: "1.2.7",
|
|
3155
|
+
buildTime: "12/30/2024 07:48 PM EST",
|
|
3150
3156
|
homepage: "https://github.com/aversini/ui-components",
|
|
3151
3157
|
license: "MIT"
|
|
3152
3158
|
});
|
|
3153
3159
|
} catch {
|
|
3154
3160
|
}
|
|
3155
|
-
const
|
|
3161
|
+
const An = ({
|
|
3156
3162
|
mode: e
|
|
3157
3163
|
}) => g({
|
|
3158
3164
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
3159
3165
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
3160
3166
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
3161
3167
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
3162
|
-
}),
|
|
3168
|
+
}), vn = ({
|
|
3163
3169
|
focusMode: e
|
|
3164
3170
|
}) => g("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
3165
3171
|
"focus:outline-focus-dark": e === "dark",
|
|
3166
3172
|
"focus:outline-focus-light": e === "light",
|
|
3167
3173
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3168
3174
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3169
|
-
}),
|
|
3175
|
+
}), Rn = ({
|
|
3170
3176
|
noBorder: e,
|
|
3171
3177
|
error: t
|
|
3172
3178
|
}) => g("border-2", {
|
|
@@ -3174,7 +3180,7 @@ const Rn = ({
|
|
|
3174
3180
|
"focus:border-border-dark": !e && t,
|
|
3175
3181
|
"border-border-error-dark": !e && t,
|
|
3176
3182
|
"border-transparent": e
|
|
3177
|
-
}),
|
|
3183
|
+
}), Nn = ({
|
|
3178
3184
|
disabled: e,
|
|
3179
3185
|
raw: t,
|
|
3180
3186
|
error: r,
|
|
@@ -3198,7 +3204,7 @@ const Rn = ({
|
|
|
3198
3204
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
3199
3205
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
3200
3206
|
});
|
|
3201
|
-
},
|
|
3207
|
+
}, xn = ({
|
|
3202
3208
|
error: e,
|
|
3203
3209
|
raw: t,
|
|
3204
3210
|
mode: r,
|
|
@@ -3208,24 +3214,24 @@ const Rn = ({
|
|
|
3208
3214
|
return "";
|
|
3209
3215
|
if (a)
|
|
3210
3216
|
return g(
|
|
3211
|
-
|
|
3217
|
+
Ye,
|
|
3212
3218
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
3213
3219
|
);
|
|
3214
3220
|
if (!e)
|
|
3215
|
-
return g(
|
|
3221
|
+
return g(Ye, "absolute px-2 font-medium", {
|
|
3216
3222
|
"text-copy-lighter": r === "dark",
|
|
3217
3223
|
"text-copy-dark": r === "light",
|
|
3218
3224
|
"text-copy-dark dark:text-copy-lighter": r === "system",
|
|
3219
3225
|
"text-copy-lighter dark:text-copy-dark": r === "alt-system"
|
|
3220
3226
|
});
|
|
3221
3227
|
if (e)
|
|
3222
|
-
return g(
|
|
3228
|
+
return g(Ye, "absolute px-2 font-medium", {
|
|
3223
3229
|
"text-copy-error-light bg-surface-darker": r === "dark",
|
|
3224
3230
|
"text-copy-error-dark": r === "light",
|
|
3225
3231
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
3226
3232
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
3227
3233
|
});
|
|
3228
|
-
},
|
|
3234
|
+
}, Cn = ({
|
|
3229
3235
|
className: e,
|
|
3230
3236
|
inputClassName: t,
|
|
3231
3237
|
raw: r,
|
|
@@ -3239,7 +3245,7 @@ const Rn = ({
|
|
|
3239
3245
|
}) => {
|
|
3240
3246
|
const p = r ? e : g(
|
|
3241
3247
|
"relative flex w-full flex-col justify-center",
|
|
3242
|
-
|
|
3248
|
+
fn,
|
|
3243
3249
|
e
|
|
3244
3250
|
);
|
|
3245
3251
|
let u = "";
|
|
@@ -3261,22 +3267,22 @@ const Rn = ({
|
|
|
3261
3267
|
break;
|
|
3262
3268
|
}
|
|
3263
3269
|
const c = r ? g(t) : g(
|
|
3264
|
-
|
|
3270
|
+
er,
|
|
3265
3271
|
u,
|
|
3266
3272
|
"rounded-md text-base px-4",
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3273
|
+
An({ mode: s }),
|
|
3274
|
+
vn({ focusMode: i }),
|
|
3275
|
+
Rn({ noBorder: n, error: o }),
|
|
3270
3276
|
{
|
|
3271
3277
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
3272
3278
|
},
|
|
3273
3279
|
t
|
|
3274
|
-
), h = r ? void 0 : "sr-only", f =
|
|
3280
|
+
), h = r ? void 0 : "sr-only", f = Nn({
|
|
3275
3281
|
disabled: a,
|
|
3276
3282
|
raw: r,
|
|
3277
3283
|
error: o,
|
|
3278
3284
|
mode: s
|
|
3279
|
-
}), E =
|
|
3285
|
+
}), E = xn({
|
|
3280
3286
|
error: o,
|
|
3281
3287
|
raw: r,
|
|
3282
3288
|
mode: s,
|
|
@@ -3290,7 +3296,7 @@ const Rn = ({
|
|
|
3290
3296
|
helperText: E,
|
|
3291
3297
|
rightElement: w
|
|
3292
3298
|
};
|
|
3293
|
-
},
|
|
3299
|
+
}, rt = z.forwardRef(
|
|
3294
3300
|
({
|
|
3295
3301
|
id: e,
|
|
3296
3302
|
name: t,
|
|
@@ -3309,16 +3315,16 @@ const Rn = ({
|
|
|
3309
3315
|
helperText: f = "",
|
|
3310
3316
|
rightElement: E,
|
|
3311
3317
|
rightElementClassName: w,
|
|
3312
|
-
size:
|
|
3313
|
-
|
|
3314
|
-
},
|
|
3315
|
-
const [
|
|
3318
|
+
size: I = "md",
|
|
3319
|
+
...$
|
|
3320
|
+
}, U) => {
|
|
3321
|
+
const [K, O] = wn(), [H, W] = j(0), x = Tn({ id: e, prefix: `${er}-` }), pe = `${t} error, ${f}`, Z = M(null), v = M(null), P = {
|
|
3316
3322
|
xs: { label: "-25px", helperText: "30px" },
|
|
3317
3323
|
sm: { label: "-29px", helperText: "34px" },
|
|
3318
3324
|
md: { label: "-33px", helperText: "38px" },
|
|
3319
3325
|
lg: { label: "-15px", helperText: "22px" },
|
|
3320
3326
|
xl: { label: "-19px", helperText: "25px" }
|
|
3321
|
-
},
|
|
3327
|
+
}, G = Cn({
|
|
3322
3328
|
className: o,
|
|
3323
3329
|
inputClassName: s,
|
|
3324
3330
|
error: a,
|
|
@@ -3327,42 +3333,42 @@ const Rn = ({
|
|
|
3327
3333
|
disabled: m,
|
|
3328
3334
|
noBorder: p,
|
|
3329
3335
|
mode: i,
|
|
3330
|
-
size:
|
|
3336
|
+
size: I,
|
|
3331
3337
|
rightElementClassName: w
|
|
3332
3338
|
});
|
|
3333
|
-
return
|
|
3334
|
-
O && O.width &&
|
|
3335
|
-
}, [O]),
|
|
3339
|
+
return nt(() => {
|
|
3340
|
+
O && O.width && W(O.width + 18 + 10);
|
|
3341
|
+
}, [O]), nt(() => {
|
|
3336
3342
|
var ee, y;
|
|
3337
|
-
const { label: T, helperText: b } =
|
|
3338
|
-
(ee = Z == null ? void 0 : Z.current) == null || ee.style.setProperty("--av-text-input-label", T), (y =
|
|
3343
|
+
const { label: T, helperText: b } = P[I];
|
|
3344
|
+
(ee = Z == null ? void 0 : Z.current) == null || ee.style.setProperty("--av-text-input-label", T), (y = v == null ? void 0 : v.current) == null || y.style.setProperty(
|
|
3339
3345
|
"--av-text-input-helper-text",
|
|
3340
3346
|
b
|
|
3341
3347
|
);
|
|
3342
|
-
}, [
|
|
3348
|
+
}, [I]), /* @__PURE__ */ N("div", { className: G.wrapper, children: [
|
|
3343
3349
|
/* @__PURE__ */ l(
|
|
3344
3350
|
"label",
|
|
3345
3351
|
{
|
|
3346
3352
|
htmlFor: x,
|
|
3347
3353
|
id: u,
|
|
3348
|
-
className:
|
|
3354
|
+
className: G.accessibleLabel,
|
|
3349
3355
|
children: r
|
|
3350
3356
|
}
|
|
3351
3357
|
),
|
|
3352
3358
|
/* @__PURE__ */ l(
|
|
3353
3359
|
"input",
|
|
3354
3360
|
{
|
|
3355
|
-
ref:
|
|
3361
|
+
ref: U,
|
|
3356
3362
|
id: x,
|
|
3357
3363
|
name: t,
|
|
3358
3364
|
type: h,
|
|
3359
3365
|
disabled: m,
|
|
3360
3366
|
placeholder: n ? void 0 : " ",
|
|
3361
|
-
className:
|
|
3367
|
+
className: G.input,
|
|
3362
3368
|
...f && { "aria-describedby": `${x}-helper` },
|
|
3363
3369
|
...a && { "aria-invalid": "true" },
|
|
3364
|
-
...E && !n && { style: { paddingRight:
|
|
3365
|
-
|
|
3370
|
+
...E && !n && { style: { paddingRight: H } },
|
|
3371
|
+
...$
|
|
3366
3372
|
}
|
|
3367
3373
|
),
|
|
3368
3374
|
!n && !c && /* @__PURE__ */ l(
|
|
@@ -3371,41 +3377,41 @@ const Rn = ({
|
|
|
3371
3377
|
ref: Z,
|
|
3372
3378
|
"aria-hidden": !0,
|
|
3373
3379
|
htmlFor: x,
|
|
3374
|
-
className:
|
|
3380
|
+
className: G.visibleLabel,
|
|
3375
3381
|
children: r
|
|
3376
3382
|
}
|
|
3377
3383
|
),
|
|
3378
3384
|
f && /* @__PURE__ */ l(
|
|
3379
3385
|
"div",
|
|
3380
3386
|
{
|
|
3381
|
-
ref:
|
|
3387
|
+
ref: v,
|
|
3382
3388
|
id: `${x}-helper`,
|
|
3383
|
-
className:
|
|
3389
|
+
className: G.helperText,
|
|
3384
3390
|
children: f
|
|
3385
3391
|
}
|
|
3386
3392
|
),
|
|
3387
3393
|
E && /* @__PURE__ */ l(
|
|
3388
3394
|
"div",
|
|
3389
3395
|
{
|
|
3390
|
-
ref:
|
|
3391
|
-
className:
|
|
3396
|
+
ref: K,
|
|
3397
|
+
className: G.rightElement,
|
|
3392
3398
|
children: E
|
|
3393
3399
|
}
|
|
3394
3400
|
),
|
|
3395
|
-
a && f && /* @__PURE__ */ l(
|
|
3401
|
+
a && f && /* @__PURE__ */ l(ar, { politeness: "polite", clearAnnouncementDelay: 500, children: pe })
|
|
3396
3402
|
] });
|
|
3397
3403
|
}
|
|
3398
3404
|
);
|
|
3399
|
-
|
|
3400
|
-
function
|
|
3401
|
-
return
|
|
3405
|
+
rt.displayName = "TextInput";
|
|
3406
|
+
function On(e) {
|
|
3407
|
+
return kt(() => e.every((t) => t == null) ? () => {
|
|
3402
3408
|
} : (t) => {
|
|
3403
3409
|
e.forEach((r) => {
|
|
3404
3410
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
3405
3411
|
});
|
|
3406
3412
|
}, e);
|
|
3407
3413
|
}
|
|
3408
|
-
const
|
|
3414
|
+
const Pn = 500, Dn = 5e3, Ln = 2e4, nr = z.forwardRef(
|
|
3409
3415
|
({
|
|
3410
3416
|
name: e,
|
|
3411
3417
|
disabled: t,
|
|
@@ -3422,40 +3428,40 @@ const Ln = 500, Mn = 5e3, $n = 2e4, or = P.forwardRef(
|
|
|
3422
3428
|
const [c, h] = j(!0), [f, E] = j({
|
|
3423
3429
|
message: null,
|
|
3424
3430
|
politeness: null
|
|
3425
|
-
}), w =
|
|
3426
|
-
|
|
3431
|
+
}), w = M(!0), I = M(null), $ = M(null), U = On([u, $]), K = c ? "Show" : "Hide", O = () => {
|
|
3432
|
+
I.current && clearTimeout(I.current), w.current || (I.current = setTimeout(() => {
|
|
3427
3433
|
w.current = !0, h(!0), E({
|
|
3428
|
-
announcementTimeout:
|
|
3434
|
+
announcementTimeout: Dn,
|
|
3429
3435
|
politeness: "polite",
|
|
3430
3436
|
message: `${r} hiding characters`
|
|
3431
3437
|
}), n && n(!0);
|
|
3432
|
-
},
|
|
3433
|
-
},
|
|
3434
|
-
|
|
3435
|
-
const
|
|
3436
|
-
w.current =
|
|
3437
|
-
announcementTimeout:
|
|
3438
|
+
}, Ln));
|
|
3439
|
+
}, H = (v) => {
|
|
3440
|
+
v.preventDefault();
|
|
3441
|
+
const P = !w.current;
|
|
3442
|
+
w.current = P, O(), h(P), E({
|
|
3443
|
+
announcementTimeout: Pn,
|
|
3438
3444
|
politeness: "assertive",
|
|
3439
|
-
message:
|
|
3440
|
-
}), n && n(
|
|
3441
|
-
},
|
|
3442
|
-
var
|
|
3443
|
-
const { relatedTarget:
|
|
3444
|
-
ee != null && ee.contains(
|
|
3445
|
-
}, x = (
|
|
3446
|
-
O(), s && s(
|
|
3447
|
-
}, pe = (
|
|
3448
|
-
O(), i && i(
|
|
3449
|
-
}, Z = (
|
|
3450
|
-
O(), o && o(
|
|
3445
|
+
message: P ? "Characters hidden" : "Characters showing"
|
|
3446
|
+
}), n && n(P);
|
|
3447
|
+
}, W = (v) => {
|
|
3448
|
+
var P;
|
|
3449
|
+
const { relatedTarget: G } = v, ee = (P = $.current) == null ? void 0 : P.parentElement;
|
|
3450
|
+
ee != null && ee.contains(G) || d && d();
|
|
3451
|
+
}, x = (v) => {
|
|
3452
|
+
O(), s && s(v), W(v);
|
|
3453
|
+
}, pe = (v) => {
|
|
3454
|
+
O(), i && i(v);
|
|
3455
|
+
}, Z = (v) => {
|
|
3456
|
+
O(), o && o(v);
|
|
3451
3457
|
};
|
|
3452
3458
|
return Q(() => () => {
|
|
3453
|
-
|
|
3454
|
-
}, []), /* @__PURE__ */
|
|
3459
|
+
I.current && clearTimeout(I.current);
|
|
3460
|
+
}, []), /* @__PURE__ */ N(fe, { children: [
|
|
3455
3461
|
/* @__PURE__ */ l(
|
|
3456
|
-
|
|
3462
|
+
rt,
|
|
3457
3463
|
{
|
|
3458
|
-
ref:
|
|
3464
|
+
ref: U,
|
|
3459
3465
|
name: e,
|
|
3460
3466
|
label: r,
|
|
3461
3467
|
labelHidden: a,
|
|
@@ -3464,18 +3470,18 @@ const Ln = 500, Mn = 5e3, $n = 2e4, or = P.forwardRef(
|
|
|
3464
3470
|
onBlur: x,
|
|
3465
3471
|
onFocus: pe,
|
|
3466
3472
|
onChange: Z,
|
|
3467
|
-
rightElement:
|
|
3473
|
+
rightElement: z.cloneElement(m, {
|
|
3468
3474
|
ref: u,
|
|
3469
|
-
label:
|
|
3470
|
-
onClick:
|
|
3471
|
-
onBlur:
|
|
3475
|
+
label: K,
|
|
3476
|
+
onClick: H,
|
|
3477
|
+
onBlur: W,
|
|
3472
3478
|
disabled: t
|
|
3473
3479
|
}),
|
|
3474
3480
|
...p
|
|
3475
3481
|
}
|
|
3476
3482
|
),
|
|
3477
3483
|
/* @__PURE__ */ l(
|
|
3478
|
-
|
|
3484
|
+
ar,
|
|
3479
3485
|
{
|
|
3480
3486
|
role: "status",
|
|
3481
3487
|
politeness: f.politeness,
|
|
@@ -3486,28 +3492,28 @@ const Ln = 500, Mn = 5e3, $n = 2e4, or = P.forwardRef(
|
|
|
3486
3492
|
] });
|
|
3487
3493
|
}
|
|
3488
3494
|
);
|
|
3489
|
-
|
|
3495
|
+
nr.displayName = "TextInputMask";
|
|
3490
3496
|
/*!
|
|
3491
|
-
@versini/ui-textinput v2.0.
|
|
3497
|
+
@versini/ui-textinput v2.0.5
|
|
3492
3498
|
© 2024 gizmette.com
|
|
3493
3499
|
*/
|
|
3494
3500
|
try {
|
|
3495
3501
|
window.__VERSINI_UI_TEXTINPUT__ || (window.__VERSINI_UI_TEXTINPUT__ = {
|
|
3496
|
-
version: "2.0.
|
|
3497
|
-
buildTime: "12/30/2024
|
|
3502
|
+
version: "2.0.5",
|
|
3503
|
+
buildTime: "12/30/2024 07:48 PM EST",
|
|
3498
3504
|
homepage: "https://github.com/aversini/ui-components",
|
|
3499
3505
|
license: "MIT"
|
|
3500
3506
|
});
|
|
3501
3507
|
} catch {
|
|
3502
3508
|
}
|
|
3503
|
-
const
|
|
3509
|
+
const Mn = "ASK! ME! ANYTHING!", $n = "LeeLou", Un = "Log in", Kn = "Sign in with a Passkey", Ko = "Log out", Hn = "Password", Ho = "Send", Wo = "Profile", Go = "Statistics", Bo = "Chat history", Jo = "About", Vo = "Type your question here", Yo = "<clipboard>", zo = {
|
|
3504
3510
|
ACTION_WHILE_STREAMING: {
|
|
3505
3511
|
content: "Cancel chat"
|
|
3506
3512
|
},
|
|
3507
3513
|
ACTION_WHILE_NOT_STREAMING: {
|
|
3508
3514
|
content: "New chat"
|
|
3509
3515
|
}
|
|
3510
|
-
},
|
|
3516
|
+
}, Fo = "N/A", jo = "Tags are pre-filled buttons available on the main screen, to help you quickly start requests. The label is used for the button, and the content is what will be inserted in the chat when the button is pressed. You can use the special placeholder <clipboard> to automatically insert the content of your clipboard.", qo = {
|
|
3511
3517
|
PREFERENCES: {
|
|
3512
3518
|
TITLE: "User settings",
|
|
3513
3519
|
NAME: "Name",
|
|
@@ -3541,115 +3547,25 @@ const Un = "ASK! ME! ANYTHING!", sr = "LeeLou", Kn = "gizmette.com", Hn = "Log i
|
|
|
3541
3547
|
ENGINE: "AI model",
|
|
3542
3548
|
PLUGIN: "Plugin"
|
|
3543
3549
|
}
|
|
3544
|
-
}
|
|
3545
|
-
/*!
|
|
3546
|
-
@versini/ui-footer v2.0.4
|
|
3547
|
-
© 2024 gizmette.com
|
|
3548
|
-
*/
|
|
3549
|
-
try {
|
|
3550
|
-
window.__VERSINI_UI_FOOTER__ || (window.__VERSINI_UI_FOOTER__ = {
|
|
3551
|
-
version: "2.0.4",
|
|
3552
|
-
buildTime: "12/30/2024 05:27 PM EST",
|
|
3553
|
-
homepage: "https://github.com/aversini/ui-components",
|
|
3554
|
-
license: "MIT"
|
|
3555
|
-
});
|
|
3556
|
-
} catch {
|
|
3557
|
-
}
|
|
3558
|
-
const Jn = "av-footer", Vn = ({
|
|
3559
|
-
className: e,
|
|
3560
|
-
mode: t = "system",
|
|
3561
|
-
row1: r,
|
|
3562
|
-
row2: a,
|
|
3563
|
-
noMargins: n = !1,
|
|
3564
|
-
raw: o = !1
|
|
3565
|
-
}) => {
|
|
3566
|
-
const s = g(
|
|
3567
|
-
Jn,
|
|
3568
|
-
{
|
|
3569
|
-
"text-copy-dark": !o && t === "dark",
|
|
3570
|
-
"text-copy-lighter": !o && t === "light",
|
|
3571
|
-
"text-copy-dark dark:text-copy-lighter": !o && t === "system",
|
|
3572
|
-
"text-copy-lighter dark:text-copy-dark": !o && t === "alt-system",
|
|
3573
|
-
"mb-[100px]": !n && !o,
|
|
3574
|
-
"mt-0 flex w-full flex-col p-2 text-center text-xs sm:mt-3 md:mx-auto md:max-w-4xl": !o
|
|
3575
|
-
},
|
|
3576
|
-
e
|
|
3577
|
-
);
|
|
3578
|
-
return /* @__PURE__ */ I("footer", { className: s, children: [
|
|
3579
|
-
r && /* @__PURE__ */ l("div", { children: r }),
|
|
3580
|
-
a && /* @__PURE__ */ l("div", { children: a })
|
|
3581
|
-
] });
|
|
3582
|
-
}, Yn = P.createContext({
|
|
3583
|
-
state: {
|
|
3584
|
-
id: "",
|
|
3585
|
-
model: Ve,
|
|
3586
|
-
engine: Ve,
|
|
3587
|
-
usage: 0,
|
|
3588
|
-
messages: [],
|
|
3589
|
-
isComponent: !1,
|
|
3590
|
-
tags: []
|
|
3591
|
-
},
|
|
3592
|
-
dispatch: () => {
|
|
3593
|
-
},
|
|
3594
|
-
serverStats: {
|
|
3595
|
-
version: "",
|
|
3596
|
-
models: [],
|
|
3597
|
-
plugins: [],
|
|
3598
|
-
engine: Ve,
|
|
3599
|
-
engines: []
|
|
3600
|
-
}
|
|
3601
|
-
}), as = P.createContext({
|
|
3602
|
-
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
3603
|
-
dispatch: () => {
|
|
3604
|
-
}
|
|
3605
|
-
}), ns = P.createContext({
|
|
3606
|
-
state: { tag: "" },
|
|
3607
|
-
dispatch: () => {
|
|
3608
|
-
}
|
|
3609
|
-
}), zn = ({
|
|
3610
|
-
serverStats: e
|
|
3611
|
-
}) => {
|
|
3612
|
-
const { state: t } = Qe(Yn);
|
|
3613
|
-
return /* @__PURE__ */ l(
|
|
3614
|
-
Vn,
|
|
3615
|
-
{
|
|
3616
|
-
mode: "light",
|
|
3617
|
-
row1: /* @__PURE__ */ I("div", { children: [
|
|
3618
|
-
sr,
|
|
3619
|
-
" v",
|
|
3620
|
-
"5.11.3",
|
|
3621
|
-
" - ",
|
|
3622
|
-
Bn,
|
|
3623
|
-
t && t.engine,
|
|
3624
|
-
rt && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
3625
|
-
] }),
|
|
3626
|
-
row2: /* @__PURE__ */ I("div", { children: [
|
|
3627
|
-
"© ",
|
|
3628
|
-
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
3629
|
-
" ",
|
|
3630
|
-
Kn
|
|
3631
|
-
] })
|
|
3632
|
-
}
|
|
3633
|
-
);
|
|
3634
|
-
}, Fn = At(
|
|
3550
|
+
}, Wn = St(
|
|
3635
3551
|
() => import(
|
|
3636
3552
|
/* webpackChunkName: "LazyHeader" */
|
|
3637
|
-
"./LazyHeader.
|
|
3553
|
+
"./LazyHeader.CmyI3orp.js"
|
|
3638
3554
|
)
|
|
3639
|
-
),
|
|
3640
|
-
const { isAuthenticated: e } =
|
|
3641
|
-
return /* @__PURE__ */
|
|
3642
|
-
e && /* @__PURE__ */ l(
|
|
3643
|
-
/* @__PURE__ */
|
|
3644
|
-
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(
|
|
3645
|
-
/* @__PURE__ */
|
|
3646
|
-
/* @__PURE__ */ l("h1", { children:
|
|
3647
|
-
/* @__PURE__ */ l("h2", { children:
|
|
3555
|
+
), Gn = () => {
|
|
3556
|
+
const { isAuthenticated: e } = Ze();
|
|
3557
|
+
return /* @__PURE__ */ N(fe, { children: [
|
|
3558
|
+
e && /* @__PURE__ */ l(_t, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(Wn, {}) }),
|
|
3559
|
+
/* @__PURE__ */ N("div", { className: "flex items-center justify-center", children: [
|
|
3560
|
+
/* @__PURE__ */ l("div", { className: "basis-1/4", children: /* @__PURE__ */ l(ln, {}) }),
|
|
3561
|
+
/* @__PURE__ */ N("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
3562
|
+
/* @__PURE__ */ l("h1", { children: $n }),
|
|
3563
|
+
/* @__PURE__ */ l("h2", { children: Mn })
|
|
3648
3564
|
] })
|
|
3649
3565
|
] })
|
|
3650
3566
|
] });
|
|
3651
|
-
},
|
|
3652
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
3567
|
+
}, Bn = () => {
|
|
3568
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = Ze(), [a, n] = j(""), [o, s] = j(""), [i, d] = j(!0), [m, p] = j({
|
|
3653
3569
|
username: "",
|
|
3654
3570
|
password: ""
|
|
3655
3571
|
}), u = async (c) => {
|
|
@@ -3663,163 +3579,156 @@ const Jn = "av-footer", Vn = ({
|
|
|
3663
3579
|
}, 500);
|
|
3664
3580
|
}), Q(() => {
|
|
3665
3581
|
t && s(t);
|
|
3666
|
-
}, [t]), /* @__PURE__ */
|
|
3667
|
-
/* @__PURE__ */
|
|
3668
|
-
|
|
3669
|
-
/* @__PURE__ */
|
|
3670
|
-
/* @__PURE__ */ l(
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
ot,
|
|
3674
|
-
{
|
|
3675
|
-
required: !0,
|
|
3676
|
-
autoCapitalize: "off",
|
|
3677
|
-
autoComplete: "off",
|
|
3678
|
-
autoCorrect: "off",
|
|
3679
|
-
mode: "dark",
|
|
3680
|
-
focusMode: "light",
|
|
3681
|
-
name: "username",
|
|
3682
|
-
label: "Username",
|
|
3683
|
-
onChange: (c) => {
|
|
3684
|
-
p({
|
|
3685
|
-
...m,
|
|
3686
|
-
username: c.target.value
|
|
3687
|
-
}), n("");
|
|
3688
|
-
},
|
|
3689
|
-
error: a !== ""
|
|
3690
|
-
}
|
|
3691
|
-
) }),
|
|
3692
|
-
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3693
|
-
or,
|
|
3694
|
-
{
|
|
3695
|
-
required: !0,
|
|
3696
|
-
autoCapitalize: "off",
|
|
3697
|
-
autoComplete: "off",
|
|
3698
|
-
autoCorrect: "off",
|
|
3699
|
-
mode: "dark",
|
|
3700
|
-
focusMode: "light",
|
|
3701
|
-
name: "password",
|
|
3702
|
-
label: Gn,
|
|
3703
|
-
rightElement: /* @__PURE__ */ l(qe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(pn, {}) : /* @__PURE__ */ l(hn, {}) }),
|
|
3704
|
-
onMaskChange: d,
|
|
3705
|
-
onChange: (c) => {
|
|
3706
|
-
p({
|
|
3707
|
-
...m,
|
|
3708
|
-
password: c.target.value
|
|
3709
|
-
}), n("");
|
|
3710
|
-
},
|
|
3711
|
-
error: a !== "",
|
|
3712
|
-
helperText: a
|
|
3713
|
-
}
|
|
3714
|
-
) }),
|
|
3715
|
-
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3716
|
-
er,
|
|
3717
|
-
{
|
|
3718
|
-
mode: "light",
|
|
3719
|
-
focusMode: "light",
|
|
3720
|
-
fullWidth: !0,
|
|
3721
|
-
noBorder: !0,
|
|
3722
|
-
type: "submit",
|
|
3723
|
-
className: "mb-4 mt-6",
|
|
3724
|
-
children: Hn
|
|
3725
|
-
}
|
|
3726
|
-
) })
|
|
3727
|
-
] }) }) }),
|
|
3728
|
-
/* @__PURE__ */ l("div", { className: "text-center text-copy-light", children: "or" }),
|
|
3729
|
-
/* @__PURE__ */ l(Tt, { alignHorizontal: "center", children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ l(
|
|
3730
|
-
qe,
|
|
3582
|
+
}, [t]), /* @__PURE__ */ l(fe, { children: /* @__PURE__ */ N(pn, { children: [
|
|
3583
|
+
/* @__PURE__ */ l("div", { className: Fa(), children: /* @__PURE__ */ l(Gn, {}) }),
|
|
3584
|
+
/* @__PURE__ */ N("form", { className: "mt-5", onSubmit: u, children: [
|
|
3585
|
+
/* @__PURE__ */ l(bt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ N(cn, { mode: "dark", children: [
|
|
3586
|
+
/* @__PURE__ */ l(le, { span: 12, children: o && /* @__PURE__ */ l("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
|
|
3587
|
+
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3588
|
+
rt,
|
|
3731
3589
|
{
|
|
3590
|
+
required: !0,
|
|
3591
|
+
autoCapitalize: "off",
|
|
3592
|
+
autoComplete: "off",
|
|
3593
|
+
autoCorrect: "off",
|
|
3732
3594
|
mode: "dark",
|
|
3733
3595
|
focusMode: "light",
|
|
3596
|
+
name: "username",
|
|
3597
|
+
label: "Username",
|
|
3598
|
+
onChange: (c) => {
|
|
3599
|
+
p({
|
|
3600
|
+
...m,
|
|
3601
|
+
username: c.target.value
|
|
3602
|
+
}), n("");
|
|
3603
|
+
},
|
|
3604
|
+
error: a !== ""
|
|
3605
|
+
}
|
|
3606
|
+
) }),
|
|
3607
|
+
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3608
|
+
nr,
|
|
3609
|
+
{
|
|
3610
|
+
required: !0,
|
|
3611
|
+
autoCapitalize: "off",
|
|
3612
|
+
autoComplete: "off",
|
|
3613
|
+
autoCorrect: "off",
|
|
3614
|
+
mode: "dark",
|
|
3615
|
+
focusMode: "light",
|
|
3616
|
+
name: "password",
|
|
3617
|
+
label: Hn,
|
|
3618
|
+
rightElement: /* @__PURE__ */ l(je, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ l(hn, {}) : /* @__PURE__ */ l(dn, {}) }),
|
|
3619
|
+
onMaskChange: d,
|
|
3620
|
+
onChange: (c) => {
|
|
3621
|
+
p({
|
|
3622
|
+
...m,
|
|
3623
|
+
password: c.target.value
|
|
3624
|
+
}), n("");
|
|
3625
|
+
},
|
|
3626
|
+
error: a !== "",
|
|
3627
|
+
helperText: a
|
|
3628
|
+
}
|
|
3629
|
+
) }),
|
|
3630
|
+
/* @__PURE__ */ l(le, { span: 12, children: /* @__PURE__ */ l(
|
|
3631
|
+
Zt,
|
|
3632
|
+
{
|
|
3633
|
+
mode: "light",
|
|
3634
|
+
focusMode: "light",
|
|
3734
3635
|
fullWidth: !0,
|
|
3735
3636
|
noBorder: !0,
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
children: /* @__PURE__ */ l(mn, { size: "size-7" })
|
|
3637
|
+
type: "submit",
|
|
3638
|
+
className: "mb-4 mt-6",
|
|
3639
|
+
children: Un
|
|
3740
3640
|
}
|
|
3741
|
-
) })
|
|
3742
|
-
] })
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3641
|
+
) })
|
|
3642
|
+
] }) }) }),
|
|
3643
|
+
/* @__PURE__ */ l("div", { className: "text-center text-copy-light", children: "or" }),
|
|
3644
|
+
/* @__PURE__ */ l(bt, { alignHorizontal: "center", children: /* @__PURE__ */ l(le, { span: 6, children: /* @__PURE__ */ l(
|
|
3645
|
+
je,
|
|
3646
|
+
{
|
|
3647
|
+
mode: "dark",
|
|
3648
|
+
focusMode: "light",
|
|
3649
|
+
fullWidth: !0,
|
|
3650
|
+
noBorder: !0,
|
|
3651
|
+
className: "mb-4 mt-1",
|
|
3652
|
+
labelRight: Kn,
|
|
3653
|
+
onClick: r,
|
|
3654
|
+
children: /* @__PURE__ */ l(un, { size: "size-7" })
|
|
3655
|
+
}
|
|
3656
|
+
) }) })
|
|
3657
|
+
] })
|
|
3658
|
+
] }) });
|
|
3659
|
+
}, Jn = new URL(document.location.href).searchParams, Vn = !!Jn.get("debug") || !1, Yn = St(
|
|
3747
3660
|
() => import(
|
|
3748
3661
|
/* webpackChunkName: "LazyApp" */
|
|
3749
|
-
"./LazyApp.
|
|
3662
|
+
"./LazyApp.CmWxSgb_.js"
|
|
3750
3663
|
).then((e) => e.LazyApp)
|
|
3751
|
-
),
|
|
3752
|
-
const { isAuthenticated: t } =
|
|
3753
|
-
return t ? /* @__PURE__ */ l(
|
|
3754
|
-
},
|
|
3664
|
+
), zn = ({ isComponent: e }) => {
|
|
3665
|
+
const { isAuthenticated: t } = Ze();
|
|
3666
|
+
return t ? /* @__PURE__ */ l(_t, { fallback: /* @__PURE__ */ l("div", {}), children: /* @__PURE__ */ l(Yn, { isComponent: e }) }) : /* @__PURE__ */ l(Bn, {});
|
|
3667
|
+
}, Fn = ({
|
|
3755
3668
|
isComponent: e = !1,
|
|
3756
|
-
domain: t =
|
|
3757
|
-
}) => /* @__PURE__ */ l(fe, { children: /* @__PURE__ */ l(
|
|
3669
|
+
domain: t = za
|
|
3670
|
+
}) => /* @__PURE__ */ l(fe, { children: /* @__PURE__ */ l(Ma, { clientId: $a, domain: t, debug: Vn, children: /* @__PURE__ */ l(zn, { isComponent: e }) }) }), Xo = ({ domain: e }) => /* @__PURE__ */ l(Fn, { isComponent: !0, domain: e });
|
|
3758
3671
|
export {
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
Po as LOCAL_STORAGE_SEARCH,
|
|
3789
|
-
Do as LOCAL_STORAGE_SORT,
|
|
3790
|
-
Vo as LOG_OUT,
|
|
3672
|
+
Jo as ABOUT_TITLE,
|
|
3673
|
+
Eo as ACTION_ENGINE,
|
|
3674
|
+
po as ACTION_MESSAGE,
|
|
3675
|
+
yo as ACTION_MODEL,
|
|
3676
|
+
go as ACTION_RESET,
|
|
3677
|
+
ko as ACTION_RESET_TAGS,
|
|
3678
|
+
fo as ACTION_RESTORE,
|
|
3679
|
+
wo as ACTION_SEARCH,
|
|
3680
|
+
So as ACTION_SET_TAGS,
|
|
3681
|
+
To as ACTION_SORT,
|
|
3682
|
+
bo as ACTION_STREAMING,
|
|
3683
|
+
Io as ACTION_TOGGLE_TAG,
|
|
3684
|
+
$n as APP_NAME,
|
|
3685
|
+
Zt as C,
|
|
3686
|
+
qo as CARDS,
|
|
3687
|
+
Yo as CLIPBOARD_TAG,
|
|
3688
|
+
lo as DEFAULT_AI_ENGINE,
|
|
3689
|
+
ho as ENGINE_ANTHROPIC,
|
|
3690
|
+
uo as ENGINE_OPENAI,
|
|
3691
|
+
co as ERROR_MESSAGE,
|
|
3692
|
+
mo as GPT4_MAX_TOKENS,
|
|
3693
|
+
Bo as HISTORY_TITLE,
|
|
3694
|
+
bt as L,
|
|
3695
|
+
Ao as LOCAL_STORAGE_CHAT_DETAILS,
|
|
3696
|
+
No as LOCAL_STORAGE_ENGINE_TOGGLE,
|
|
3697
|
+
_o as LOCAL_STORAGE_PREFIX,
|
|
3698
|
+
vo as LOCAL_STORAGE_SEARCH,
|
|
3699
|
+
Ro as LOCAL_STORAGE_SORT,
|
|
3700
|
+
Ko as LOG_OUT,
|
|
3791
3701
|
ue as M,
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
Ko as extractAverage,
|
|
3702
|
+
Gn as MessagesContainerHeader,
|
|
3703
|
+
Fo as NA,
|
|
3704
|
+
je as O,
|
|
3705
|
+
Wo as PROFILE_TITLE,
|
|
3706
|
+
cn as R,
|
|
3707
|
+
no as ROLE_ASSISTANT,
|
|
3708
|
+
io as ROLE_HIDDEN,
|
|
3709
|
+
so as ROLE_INTERNAL,
|
|
3710
|
+
oo as ROLE_SYSTEM,
|
|
3711
|
+
ao as ROLE_USER,
|
|
3712
|
+
Ho as SEND,
|
|
3713
|
+
Go as STATS,
|
|
3714
|
+
xo as STATS_SEPARATOR,
|
|
3715
|
+
Xo as SassySaint,
|
|
3716
|
+
jo as TAGS_DESCRIPTION,
|
|
3717
|
+
zo as TOOLBOX,
|
|
3718
|
+
Vo as TYPE_QUESTION,
|
|
3719
|
+
pn as _,
|
|
3720
|
+
Uo as debounce,
|
|
3721
|
+
Mo as durationFormatter,
|
|
3722
|
+
Po as extractAverage,
|
|
3814
3723
|
$e as g,
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3724
|
+
Co as getCurrentGeoLocation,
|
|
3725
|
+
Fa as getMessageContaintWrapperClass,
|
|
3726
|
+
Do as isLastMessageFromRole,
|
|
3818
3727
|
le as j,
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3728
|
+
Lo as numberFormatter,
|
|
3729
|
+
$o as pluralize,
|
|
3730
|
+
Oo as renderDataAsList,
|
|
3731
|
+
Ze as un,
|
|
3732
|
+
rt as ye,
|
|
3733
|
+
un as z
|
|
3825
3734
|
};
|