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