@versini/sassysaint 1.0.2 → 1.0.4
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.DJozcBeB.js → App.llFW8bC9.js} +54 -54
- package/dist/chunks/{LazyHeader.B1723ukv.js → LazyHeader.DioQirr-.js} +5 -5
- package/dist/chunks/{LazyMarkdownWithExtra.BZSSztwq.js → LazyMarkdownWithExtra.BaT61Fa1.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.uBxG6-gS.js → LazyMessageAssistant.B7gvwGML.js} +4 -4
- package/dist/chunks/{index.DruzEDnN.wUuoTJhD.js → index.DruzEDnN.CBkxdLma.js} +1 -1
- package/dist/chunks/{index.TaY_5bD3.js → index.zwPPEvIR.js} +707 -701
- package/dist/chunks/{useLocalStorage.BXlADEdF.js → useLocalStorage.BhJXBYm7.js} +3 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsx as c, jsxs as T, Fragment as q } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import K, { createContext as xt, useRef as W, useState as U, useCallback as $e, useEffect as z, useContext as Xe, useMemo as Nt, useId as Ct, useReducer as Rt, useLayoutEffect as Ot, lazy as Ze, Suspense as et } from "react";
|
|
2
|
+
import B, { createContext as xt, useRef as j, useState as H, useCallback as z, useEffect as V, useContext as Xe, useSyncExternalStore as Nt, useMemo as Ct, useId as Rt, useReducer as Ot, useLayoutEffect as Dt, lazy as Ze, Suspense as et } from "react";
|
|
4
3
|
import g from "clsx";
|
|
5
|
-
var
|
|
4
|
+
var Mt = Object.defineProperty, Lt = (e, t, r) => t in e ? Mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ye = (e, t, r) => Lt(e, typeof t != "symbol" ? t + "" : t, r);
|
|
6
5
|
/*!
|
|
7
|
-
@versini/auth-provider v5.1.
|
|
6
|
+
@versini/auth-provider v5.1.3
|
|
8
7
|
© 2024 gizmette.com
|
|
9
8
|
*/
|
|
10
9
|
try {
|
|
11
10
|
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
12
|
-
version: "5.1.
|
|
13
|
-
buildTime: "07/
|
|
11
|
+
version: "5.1.3",
|
|
12
|
+
buildTime: "07/09/2024 03:32 PM EDT",
|
|
14
13
|
homepage: "https://github.com/aversini/auth-client",
|
|
15
14
|
license: "MIT"
|
|
16
15
|
});
|
|
@@ -23,7 +22,7 @@ try {
|
|
|
23
22
|
try {
|
|
24
23
|
window.__VERSINI_AUTH_COMMON__ || (window.__VERSINI_AUTH_COMMON__ = {
|
|
25
24
|
version: "2.11.0",
|
|
26
|
-
buildTime: "07/
|
|
25
|
+
buildTime: "07/09/2024 03:32 PM EDT",
|
|
27
26
|
homepage: "https://github.com/aversini/auth-client",
|
|
28
27
|
license: "MIT"
|
|
29
28
|
});
|
|
@@ -35,16 +34,16 @@ const Q = {
|
|
|
35
34
|
ID_AND_ACCESS_TOKEN: "id_token token",
|
|
36
35
|
CODE: "code",
|
|
37
36
|
REFRESH_TOKEN: "refresh_token"
|
|
38
|
-
},
|
|
37
|
+
}, Pt = {
|
|
39
38
|
CLIENT_ID: "X-Auth-ClientId"
|
|
40
|
-
},
|
|
39
|
+
}, _ = {
|
|
41
40
|
ALG: "RS256",
|
|
42
41
|
USER_ID_KEY: "sub",
|
|
43
42
|
TOKEN_ID_KEY: "__raw",
|
|
44
43
|
NONCE_KEY: "_nonce",
|
|
45
44
|
USERNAME_KEY: "username",
|
|
46
45
|
ISSUER: "gizmette.com"
|
|
47
|
-
},
|
|
46
|
+
}, $t = `-----BEGIN PUBLIC KEY-----
|
|
48
47
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
49
48
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
50
49
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -57,14 +56,14 @@ awIDAQAB
|
|
|
57
56
|
CODE: "code",
|
|
58
57
|
LOGOUT: "logout"
|
|
59
58
|
}, he = crypto, tt = (e) => e instanceof CryptoKey, X = new TextEncoder(), pe = new TextDecoder();
|
|
60
|
-
function
|
|
59
|
+
function Ut(...e) {
|
|
61
60
|
const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
|
|
62
61
|
let a = 0;
|
|
63
62
|
for (const n of e)
|
|
64
63
|
r.set(n, a), a += n.length;
|
|
65
64
|
return r;
|
|
66
65
|
}
|
|
67
|
-
const
|
|
66
|
+
const Ht = (e) => {
|
|
68
67
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
69
68
|
for (let a = 0; a < t.length; a++)
|
|
70
69
|
r[a] = t.charCodeAt(a);
|
|
@@ -73,12 +72,12 @@ const Ut = (e) => {
|
|
|
73
72
|
let t = e;
|
|
74
73
|
t instanceof Uint8Array && (t = pe.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
75
74
|
try {
|
|
76
|
-
return
|
|
75
|
+
return Ht(t);
|
|
77
76
|
} catch {
|
|
78
77
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
79
78
|
}
|
|
80
79
|
};
|
|
81
|
-
|
|
80
|
+
class G extends Error {
|
|
82
81
|
static get code() {
|
|
83
82
|
return "ERR_JOSE_GENERIC";
|
|
84
83
|
}
|
|
@@ -86,7 +85,8 @@ let j = class extends Error {
|
|
|
86
85
|
var r;
|
|
87
86
|
super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
|
|
88
87
|
}
|
|
89
|
-
}
|
|
88
|
+
}
|
|
89
|
+
let L = class extends G {
|
|
90
90
|
static get code() {
|
|
91
91
|
return "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
92
92
|
}
|
|
@@ -94,7 +94,7 @@ let j = class extends Error {
|
|
|
94
94
|
super(t), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = a, this.reason = n, this.payload = r;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
class
|
|
97
|
+
class Le extends G {
|
|
98
98
|
static get code() {
|
|
99
99
|
return "ERR_JWT_EXPIRED";
|
|
100
100
|
}
|
|
@@ -102,7 +102,7 @@ class Me extends j {
|
|
|
102
102
|
super(t), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
class
|
|
105
|
+
class Kt extends G {
|
|
106
106
|
constructor() {
|
|
107
107
|
super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
108
108
|
}
|
|
@@ -110,30 +110,29 @@ class Ht extends j {
|
|
|
110
110
|
return "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
let
|
|
113
|
+
let K = class extends G {
|
|
114
114
|
constructor() {
|
|
115
115
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
116
116
|
}
|
|
117
117
|
static get code() {
|
|
118
118
|
return "ERR_JOSE_NOT_SUPPORTED";
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, S = class extends G {
|
|
121
121
|
constructor() {
|
|
122
122
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
123
123
|
}
|
|
124
124
|
static get code() {
|
|
125
125
|
return "ERR_JWS_INVALID";
|
|
126
126
|
}
|
|
127
|
-
}
|
|
128
|
-
class rt extends j {
|
|
127
|
+
}, rt = class extends G {
|
|
129
128
|
constructor() {
|
|
130
129
|
super(...arguments), this.code = "ERR_JWT_INVALID";
|
|
131
130
|
}
|
|
132
131
|
static get code() {
|
|
133
132
|
return "ERR_JWT_INVALID";
|
|
134
133
|
}
|
|
135
|
-
}
|
|
136
|
-
class
|
|
134
|
+
};
|
|
135
|
+
class Bt extends G {
|
|
137
136
|
constructor() {
|
|
138
137
|
super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
|
|
139
138
|
}
|
|
@@ -141,7 +140,7 @@ class Kt extends j {
|
|
|
141
140
|
return "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
|
-
function
|
|
143
|
+
function P(e, t = "algorithm.name") {
|
|
145
144
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
146
145
|
}
|
|
147
146
|
function Z(e, t) {
|
|
@@ -150,7 +149,7 @@ function Z(e, t) {
|
|
|
150
149
|
function be(e) {
|
|
151
150
|
return parseInt(e.name.slice(4), 10);
|
|
152
151
|
}
|
|
153
|
-
function
|
|
152
|
+
function Wt(e) {
|
|
154
153
|
switch (e) {
|
|
155
154
|
case "ES256":
|
|
156
155
|
return "P-256";
|
|
@@ -162,83 +161,81 @@ function Bt(e) {
|
|
|
162
161
|
throw new Error("unreachable");
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
|
-
function
|
|
164
|
+
function jt(e, t) {
|
|
166
165
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
167
166
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
168
167
|
if (t.length > 2) {
|
|
169
168
|
const a = t.pop();
|
|
170
169
|
r += `one of ${t.join(", ")}, or ${a}.`;
|
|
171
|
-
} else
|
|
172
|
-
t.length === 2 ? r += `one of ${t[0]} or ${t[1]}.` : r += `${t[0]}.`;
|
|
170
|
+
} else t.length === 2 ? r += `one of ${t[0]} or ${t[1]}.` : r += `${t[0]}.`;
|
|
173
171
|
throw new TypeError(r);
|
|
174
172
|
}
|
|
175
173
|
}
|
|
176
|
-
function
|
|
174
|
+
function Gt(e, t, ...r) {
|
|
177
175
|
switch (t) {
|
|
178
176
|
case "HS256":
|
|
179
177
|
case "HS384":
|
|
180
178
|
case "HS512": {
|
|
181
179
|
if (!Z(e.algorithm, "HMAC"))
|
|
182
|
-
throw
|
|
180
|
+
throw P("HMAC");
|
|
183
181
|
const a = parseInt(t.slice(2), 10);
|
|
184
182
|
if (be(e.algorithm.hash) !== a)
|
|
185
|
-
throw
|
|
183
|
+
throw P(`SHA-${a}`, "algorithm.hash");
|
|
186
184
|
break;
|
|
187
185
|
}
|
|
188
186
|
case "RS256":
|
|
189
187
|
case "RS384":
|
|
190
188
|
case "RS512": {
|
|
191
189
|
if (!Z(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
192
|
-
throw
|
|
190
|
+
throw P("RSASSA-PKCS1-v1_5");
|
|
193
191
|
const a = parseInt(t.slice(2), 10);
|
|
194
192
|
if (be(e.algorithm.hash) !== a)
|
|
195
|
-
throw
|
|
193
|
+
throw P(`SHA-${a}`, "algorithm.hash");
|
|
196
194
|
break;
|
|
197
195
|
}
|
|
198
196
|
case "PS256":
|
|
199
197
|
case "PS384":
|
|
200
198
|
case "PS512": {
|
|
201
199
|
if (!Z(e.algorithm, "RSA-PSS"))
|
|
202
|
-
throw
|
|
200
|
+
throw P("RSA-PSS");
|
|
203
201
|
const a = parseInt(t.slice(2), 10);
|
|
204
202
|
if (be(e.algorithm.hash) !== a)
|
|
205
|
-
throw
|
|
203
|
+
throw P(`SHA-${a}`, "algorithm.hash");
|
|
206
204
|
break;
|
|
207
205
|
}
|
|
208
206
|
case "EdDSA": {
|
|
209
207
|
if (e.algorithm.name !== "Ed25519" && e.algorithm.name !== "Ed448")
|
|
210
|
-
throw
|
|
208
|
+
throw P("Ed25519 or Ed448");
|
|
211
209
|
break;
|
|
212
210
|
}
|
|
213
211
|
case "ES256":
|
|
214
212
|
case "ES384":
|
|
215
213
|
case "ES512": {
|
|
216
214
|
if (!Z(e.algorithm, "ECDSA"))
|
|
217
|
-
throw
|
|
218
|
-
const a =
|
|
215
|
+
throw P("ECDSA");
|
|
216
|
+
const a = Wt(t);
|
|
219
217
|
if (e.algorithm.namedCurve !== a)
|
|
220
|
-
throw
|
|
218
|
+
throw P(a, "algorithm.namedCurve");
|
|
221
219
|
break;
|
|
222
220
|
}
|
|
223
221
|
default:
|
|
224
222
|
throw new TypeError("CryptoKey does not support this operation");
|
|
225
223
|
}
|
|
226
|
-
|
|
224
|
+
jt(e, r);
|
|
227
225
|
}
|
|
228
226
|
function at(e, t, ...r) {
|
|
229
227
|
var a;
|
|
230
228
|
if (r.length > 2) {
|
|
231
229
|
const n = r.pop();
|
|
232
230
|
e += `one of type ${r.join(", ")}, or ${n}.`;
|
|
233
|
-
} else
|
|
234
|
-
r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
231
|
+
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
235
232
|
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;
|
|
236
233
|
}
|
|
237
|
-
const
|
|
234
|
+
const Pe = (e, ...t) => at("Key must be ", e, ...t);
|
|
238
235
|
function nt(e, t, ...r) {
|
|
239
236
|
return at(`Key for the ${e} algorithm must be `, t, ...r);
|
|
240
237
|
}
|
|
241
|
-
const ot = (e) => tt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", de = ["CryptoKey"],
|
|
238
|
+
const ot = (e) => tt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", de = ["CryptoKey"], Vt = (...e) => {
|
|
242
239
|
const t = e.filter(Boolean);
|
|
243
240
|
if (t.length === 0 || t.length === 1)
|
|
244
241
|
return !0;
|
|
@@ -257,11 +254,11 @@ const ot = (e) => tt(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
257
254
|
}
|
|
258
255
|
return !0;
|
|
259
256
|
};
|
|
260
|
-
function
|
|
257
|
+
function Jt(e) {
|
|
261
258
|
return typeof e == "object" && e !== null;
|
|
262
259
|
}
|
|
263
|
-
function
|
|
264
|
-
if (!
|
|
260
|
+
function Ie(e) {
|
|
261
|
+
if (!Jt(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
265
262
|
return !1;
|
|
266
263
|
if (Object.getPrototypeOf(e) === null)
|
|
267
264
|
return !0;
|
|
@@ -270,14 +267,14 @@ function _e(e) {
|
|
|
270
267
|
t = Object.getPrototypeOf(t);
|
|
271
268
|
return Object.getPrototypeOf(e) === t;
|
|
272
269
|
}
|
|
273
|
-
const
|
|
270
|
+
const Ft = (e, t) => {
|
|
274
271
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
275
272
|
const { modulusLength: r } = t.algorithm;
|
|
276
273
|
if (typeof r != "number" || r < 2048)
|
|
277
274
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
278
275
|
}
|
|
279
276
|
};
|
|
280
|
-
function
|
|
277
|
+
function zt(e) {
|
|
281
278
|
let t, r;
|
|
282
279
|
switch (e.kty) {
|
|
283
280
|
case "RSA": {
|
|
@@ -302,7 +299,7 @@ function Ft(e) {
|
|
|
302
299
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
303
300
|
break;
|
|
304
301
|
default:
|
|
305
|
-
throw new
|
|
302
|
+
throw new K('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
306
303
|
}
|
|
307
304
|
break;
|
|
308
305
|
}
|
|
@@ -324,7 +321,7 @@ function Ft(e) {
|
|
|
324
321
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
325
322
|
break;
|
|
326
323
|
default:
|
|
327
|
-
throw new
|
|
324
|
+
throw new K('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
328
325
|
}
|
|
329
326
|
break;
|
|
330
327
|
}
|
|
@@ -340,19 +337,19 @@ function Ft(e) {
|
|
|
340
337
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
341
338
|
break;
|
|
342
339
|
default:
|
|
343
|
-
throw new
|
|
340
|
+
throw new K('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
344
341
|
}
|
|
345
342
|
break;
|
|
346
343
|
}
|
|
347
344
|
default:
|
|
348
|
-
throw new
|
|
345
|
+
throw new K('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
349
346
|
}
|
|
350
347
|
return { algorithm: t, keyUsages: r };
|
|
351
348
|
}
|
|
352
|
-
const
|
|
349
|
+
const Yt = async (e) => {
|
|
353
350
|
if (!e.alg)
|
|
354
351
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
355
|
-
const { algorithm: t, keyUsages: r } =
|
|
352
|
+
const { algorithm: t, keyUsages: r } = zt(e), a = [
|
|
356
353
|
t,
|
|
357
354
|
e.ext ?? !1,
|
|
358
355
|
e.key_ops ?? r
|
|
@@ -364,47 +361,47 @@ const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
364
361
|
let n = e.get(t);
|
|
365
362
|
if (n != null && n[a])
|
|
366
363
|
return n[a];
|
|
367
|
-
const o = await
|
|
364
|
+
const o = await Yt({ ...r, alg: a });
|
|
368
365
|
return n ? n[a] = o : e.set(t, { [a]: o }), o;
|
|
369
|
-
},
|
|
366
|
+
}, qt = (e, t) => {
|
|
370
367
|
if (it(e)) {
|
|
371
368
|
let r = e.export({ format: "jwk" });
|
|
372
369
|
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? st(r.k) : (Ee || (Ee = /* @__PURE__ */ new WeakMap()), ct(Ee, e, r, t));
|
|
373
370
|
}
|
|
374
371
|
return e;
|
|
375
|
-
},
|
|
372
|
+
}, Qt = (e, t) => {
|
|
376
373
|
if (it(e)) {
|
|
377
374
|
let r = e.export({ format: "jwk" });
|
|
378
375
|
return r.k ? st(r.k) : (we || (we = /* @__PURE__ */ new WeakMap()), ct(we, e, r, t));
|
|
379
376
|
}
|
|
380
377
|
return e;
|
|
381
|
-
},
|
|
378
|
+
}, Xt = { normalizePublicKey: qt, normalizePrivateKey: Qt }, U = (e, t, r = 0) => {
|
|
382
379
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
383
380
|
const a = e.indexOf(t[0], r);
|
|
384
381
|
if (a === -1)
|
|
385
382
|
return !1;
|
|
386
383
|
const n = e.subarray(a, a + t.length);
|
|
387
|
-
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) ||
|
|
388
|
-
},
|
|
384
|
+
return n.length !== t.length ? !1 : n.every((o, s) => o === t[s]) || U(e, t, a + 1);
|
|
385
|
+
}, $e = (e) => {
|
|
389
386
|
switch (!0) {
|
|
390
|
-
case
|
|
387
|
+
case U(e, [42, 134, 72, 206, 61, 3, 1, 7]):
|
|
391
388
|
return "P-256";
|
|
392
|
-
case
|
|
389
|
+
case U(e, [43, 129, 4, 0, 34]):
|
|
393
390
|
return "P-384";
|
|
394
|
-
case
|
|
391
|
+
case U(e, [43, 129, 4, 0, 35]):
|
|
395
392
|
return "P-521";
|
|
396
|
-
case
|
|
393
|
+
case U(e, [43, 101, 110]):
|
|
397
394
|
return "X25519";
|
|
398
|
-
case
|
|
395
|
+
case U(e, [43, 101, 111]):
|
|
399
396
|
return "X448";
|
|
400
|
-
case
|
|
397
|
+
case U(e, [43, 101, 112]):
|
|
401
398
|
return "Ed25519";
|
|
402
|
-
case
|
|
399
|
+
case U(e, [43, 101, 113]):
|
|
403
400
|
return "Ed448";
|
|
404
401
|
default:
|
|
405
|
-
throw new
|
|
402
|
+
throw new K("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
406
403
|
}
|
|
407
|
-
},
|
|
404
|
+
}, Zt = async (e, t, r, a, n) => {
|
|
408
405
|
let o, s;
|
|
409
406
|
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((l) => l.charCodeAt(0)));
|
|
410
407
|
switch (a) {
|
|
@@ -440,31 +437,31 @@ const it = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
440
437
|
case "ECDH-ES+A128KW":
|
|
441
438
|
case "ECDH-ES+A192KW":
|
|
442
439
|
case "ECDH-ES+A256KW": {
|
|
443
|
-
const l =
|
|
440
|
+
const l = $e(i);
|
|
444
441
|
o = l.startsWith("P-") ? { name: "ECDH", namedCurve: l } : { name: l }, s = [];
|
|
445
442
|
break;
|
|
446
443
|
}
|
|
447
444
|
case "EdDSA":
|
|
448
|
-
o = { name:
|
|
445
|
+
o = { name: $e(i) }, s = ["verify"];
|
|
449
446
|
break;
|
|
450
447
|
default:
|
|
451
|
-
throw new
|
|
448
|
+
throw new K('Invalid or unsupported "alg" (Algorithm) value');
|
|
452
449
|
}
|
|
453
450
|
return he.subtle.importKey(t, i, o, !1, s);
|
|
454
|
-
},
|
|
455
|
-
async function
|
|
451
|
+
}, er = (e, t, r) => Zt(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
452
|
+
async function tr(e, t, r) {
|
|
456
453
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
457
454
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
458
|
-
return
|
|
455
|
+
return er(e, t);
|
|
459
456
|
}
|
|
460
|
-
const le = (e) => e == null ? void 0 : e[Symbol.toStringTag],
|
|
457
|
+
const le = (e) => e == null ? void 0 : e[Symbol.toStringTag], rr = (e, t) => {
|
|
461
458
|
if (!(t instanceof Uint8Array)) {
|
|
462
459
|
if (!ot(t))
|
|
463
460
|
throw new TypeError(nt(e, t, ...de, "Uint8Array"));
|
|
464
461
|
if (t.type !== "secret")
|
|
465
462
|
throw new TypeError(`${le(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
466
463
|
}
|
|
467
|
-
},
|
|
464
|
+
}, ar = (e, t, r) => {
|
|
468
465
|
if (!ot(t))
|
|
469
466
|
throw new TypeError(nt(e, t, ...de));
|
|
470
467
|
if (t.type === "secret")
|
|
@@ -473,10 +470,10 @@ const le = (e) => e == null ? void 0 : e[Symbol.toStringTag], tr = (e, t) => {
|
|
|
473
470
|
throw new TypeError(`${le(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
474
471
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
475
472
|
throw new TypeError(`${le(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
476
|
-
},
|
|
477
|
-
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ?
|
|
473
|
+
}, nr = (e, t, r) => {
|
|
474
|
+
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? rr(e, t) : ar(e, t, r);
|
|
478
475
|
};
|
|
479
|
-
function
|
|
476
|
+
function or(e, t, r, a, n) {
|
|
480
477
|
if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
|
|
481
478
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
482
479
|
if (!a || a.crit === void 0)
|
|
@@ -487,7 +484,7 @@ function nr(e, t, r, a, n) {
|
|
|
487
484
|
r !== void 0 ? o = new Map([...Object.entries(r), ...t.entries()]) : o = t;
|
|
488
485
|
for (const s of a.crit) {
|
|
489
486
|
if (!o.has(s))
|
|
490
|
-
throw new
|
|
487
|
+
throw new K(`Extension Header Parameter "${s}" is not recognized`);
|
|
491
488
|
if (n[s] === void 0)
|
|
492
489
|
throw new e(`Extension Header Parameter "${s}" is missing`);
|
|
493
490
|
if (o.get(s) && a[s] === void 0)
|
|
@@ -495,13 +492,13 @@ function nr(e, t, r, a, n) {
|
|
|
495
492
|
}
|
|
496
493
|
return new Set(a.crit);
|
|
497
494
|
}
|
|
498
|
-
const
|
|
495
|
+
const sr = (e, t) => {
|
|
499
496
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
500
497
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
501
498
|
if (t)
|
|
502
499
|
return new Set(t);
|
|
503
500
|
};
|
|
504
|
-
function
|
|
501
|
+
function ir(e, t) {
|
|
505
502
|
const r = `SHA-${e.slice(-3)}`;
|
|
506
503
|
switch (e) {
|
|
507
504
|
case "HS256":
|
|
@@ -523,104 +520,103 @@ function sr(e, t) {
|
|
|
523
520
|
case "EdDSA":
|
|
524
521
|
return { name: t.name };
|
|
525
522
|
default:
|
|
526
|
-
throw new
|
|
523
|
+
throw new K(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
527
524
|
}
|
|
528
525
|
}
|
|
529
|
-
async function
|
|
530
|
-
if (t = await
|
|
531
|
-
return
|
|
526
|
+
async function cr(e, t, r) {
|
|
527
|
+
if (t = await Xt.normalizePublicKey(t, e), tt(t))
|
|
528
|
+
return Gt(t, e, r), t;
|
|
532
529
|
if (t instanceof Uint8Array) {
|
|
533
530
|
if (!e.startsWith("HS"))
|
|
534
|
-
throw new TypeError(
|
|
531
|
+
throw new TypeError(Pe(t, ...de));
|
|
535
532
|
return he.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
536
533
|
}
|
|
537
|
-
throw new TypeError(
|
|
534
|
+
throw new TypeError(Pe(t, ...de, "Uint8Array"));
|
|
538
535
|
}
|
|
539
|
-
const
|
|
540
|
-
const n = await
|
|
541
|
-
|
|
542
|
-
const o =
|
|
536
|
+
const lr = async (e, t, r, a) => {
|
|
537
|
+
const n = await cr(e, t, "verify");
|
|
538
|
+
Ft(e, n);
|
|
539
|
+
const o = ir(e, n.algorithm);
|
|
543
540
|
try {
|
|
544
541
|
return await he.subtle.verify(o, n, r, a);
|
|
545
542
|
} catch {
|
|
546
543
|
return !1;
|
|
547
544
|
}
|
|
548
545
|
};
|
|
549
|
-
async function
|
|
550
|
-
if (!
|
|
551
|
-
throw new
|
|
546
|
+
async function dr(e, t, r) {
|
|
547
|
+
if (!Ie(e))
|
|
548
|
+
throw new S("Flattened JWS must be an object");
|
|
552
549
|
if (e.protected === void 0 && e.header === void 0)
|
|
553
|
-
throw new
|
|
550
|
+
throw new S('Flattened JWS must have either of the "protected" or "header" members');
|
|
554
551
|
if (e.protected !== void 0 && typeof e.protected != "string")
|
|
555
|
-
throw new
|
|
552
|
+
throw new S("JWS Protected Header incorrect type");
|
|
556
553
|
if (e.payload === void 0)
|
|
557
|
-
throw new
|
|
554
|
+
throw new S("JWS Payload missing");
|
|
558
555
|
if (typeof e.signature != "string")
|
|
559
|
-
throw new
|
|
560
|
-
if (e.header !== void 0 && !
|
|
561
|
-
throw new
|
|
556
|
+
throw new S("JWS Signature missing or incorrect type");
|
|
557
|
+
if (e.header !== void 0 && !Ie(e.header))
|
|
558
|
+
throw new S("JWS Unprotected Header incorrect type");
|
|
562
559
|
let a = {};
|
|
563
560
|
if (e.protected)
|
|
564
561
|
try {
|
|
565
562
|
const f = ce(e.protected);
|
|
566
563
|
a = JSON.parse(pe.decode(f));
|
|
567
564
|
} catch {
|
|
568
|
-
throw new
|
|
565
|
+
throw new S("JWS Protected Header is invalid");
|
|
569
566
|
}
|
|
570
|
-
if (!
|
|
571
|
-
throw new
|
|
567
|
+
if (!Vt(a, e.header))
|
|
568
|
+
throw new S("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
572
569
|
const n = {
|
|
573
570
|
...a,
|
|
574
571
|
...e.header
|
|
575
|
-
}, o =
|
|
572
|
+
}, o = or(S, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
|
|
576
573
|
let s = !0;
|
|
577
574
|
if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
|
|
578
|
-
throw new
|
|
575
|
+
throw new S('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
579
576
|
const { alg: i } = n;
|
|
580
577
|
if (typeof i != "string" || !i)
|
|
581
|
-
throw new
|
|
582
|
-
const l = r &&
|
|
578
|
+
throw new S('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
579
|
+
const l = r && sr("algorithms", r.algorithms);
|
|
583
580
|
if (l && !l.has(i))
|
|
584
|
-
throw new
|
|
581
|
+
throw new Kt('"alg" (Algorithm) Header Parameter value not allowed');
|
|
585
582
|
if (s) {
|
|
586
583
|
if (typeof e.payload != "string")
|
|
587
|
-
throw new
|
|
584
|
+
throw new S("JWS Payload must be a string");
|
|
588
585
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
589
|
-
throw new
|
|
586
|
+
throw new S("JWS Payload must be a string or an Uint8Array instance");
|
|
590
587
|
let d = !1;
|
|
591
|
-
typeof t == "function" && (t = await t(a, e), d = !0),
|
|
592
|
-
const h =
|
|
588
|
+
typeof t == "function" && (t = await t(a, e), d = !0), nr(i, t, "verify");
|
|
589
|
+
const h = Ut(X.encode(e.protected ?? ""), X.encode("."), typeof e.payload == "string" ? X.encode(e.payload) : e.payload);
|
|
593
590
|
let u;
|
|
594
591
|
try {
|
|
595
592
|
u = ce(e.signature);
|
|
596
593
|
} catch {
|
|
597
|
-
throw new
|
|
594
|
+
throw new S("Failed to base64url decode the signature");
|
|
598
595
|
}
|
|
599
|
-
if (!await
|
|
600
|
-
throw new
|
|
596
|
+
if (!await lr(i, t, u, h))
|
|
597
|
+
throw new Bt();
|
|
601
598
|
let m;
|
|
602
599
|
if (s)
|
|
603
600
|
try {
|
|
604
601
|
m = ce(e.payload);
|
|
605
602
|
} catch {
|
|
606
|
-
throw new
|
|
603
|
+
throw new S("Failed to base64url decode the payload");
|
|
607
604
|
}
|
|
608
|
-
else
|
|
609
|
-
typeof e.payload == "string" ? m = X.encode(e.payload) : m = e.payload;
|
|
605
|
+
else typeof e.payload == "string" ? m = X.encode(e.payload) : m = e.payload;
|
|
610
606
|
const p = { payload: m };
|
|
611
607
|
return e.protected !== void 0 && (p.protectedHeader = a), e.header !== void 0 && (p.unprotectedHeader = e.header), d ? { ...p, key: t } : p;
|
|
612
608
|
}
|
|
613
|
-
async function
|
|
609
|
+
async function ur(e, t, r) {
|
|
614
610
|
if (e instanceof Uint8Array && (e = pe.decode(e)), typeof e != "string")
|
|
615
|
-
throw new
|
|
611
|
+
throw new S("Compact JWS must be a string or Uint8Array");
|
|
616
612
|
const { 0: a, 1: n, 2: o, length: s } = e.split(".");
|
|
617
613
|
if (s !== 3)
|
|
618
|
-
throw new
|
|
619
|
-
const i = await
|
|
614
|
+
throw new S("Invalid Compact JWS");
|
|
615
|
+
const i = await dr({ payload: n, protected: a, signature: o }, t, r), l = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
620
616
|
return typeof t == "function" ? { ...l, key: i.key } : l;
|
|
621
617
|
}
|
|
622
|
-
const
|
|
623
|
-
const t =
|
|
618
|
+
const mr = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, _e = dt * 24, hr = _e * 7, pr = _e * 365.25, gr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, Ue = (e) => {
|
|
619
|
+
const t = gr.exec(e);
|
|
624
620
|
if (!t || t[4] && t[1])
|
|
625
621
|
throw new TypeError("Invalid time period format");
|
|
626
622
|
const r = parseFloat(t[2]), a = t[3].toLowerCase();
|
|
@@ -650,40 +646,40 @@ const ur = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt
|
|
|
650
646
|
case "day":
|
|
651
647
|
case "days":
|
|
652
648
|
case "d":
|
|
653
|
-
n = Math.round(r *
|
|
649
|
+
n = Math.round(r * _e);
|
|
654
650
|
break;
|
|
655
651
|
case "week":
|
|
656
652
|
case "weeks":
|
|
657
653
|
case "w":
|
|
658
|
-
n = Math.round(r *
|
|
654
|
+
n = Math.round(r * hr);
|
|
659
655
|
break;
|
|
660
656
|
default:
|
|
661
|
-
n = Math.round(r *
|
|
657
|
+
n = Math.round(r * pr);
|
|
662
658
|
break;
|
|
663
659
|
}
|
|
664
660
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
665
|
-
}, He = (e) => e.toLowerCase().replace(/^application\//, ""),
|
|
661
|
+
}, He = (e) => e.toLowerCase().replace(/^application\//, ""), fr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, yr = (e, t, r = {}) => {
|
|
666
662
|
let a;
|
|
667
663
|
try {
|
|
668
664
|
a = JSON.parse(pe.decode(t));
|
|
669
665
|
} catch {
|
|
670
666
|
}
|
|
671
|
-
if (!
|
|
667
|
+
if (!Ie(a))
|
|
672
668
|
throw new rt("JWT Claims Set must be a top-level JSON object");
|
|
673
669
|
const { typ: n } = r;
|
|
674
670
|
if (n && (typeof e.typ != "string" || He(e.typ) !== He(n)))
|
|
675
|
-
throw new
|
|
671
|
+
throw new L('unexpected "typ" JWT header value', a, "typ", "check_failed");
|
|
676
672
|
const { requiredClaims: o = [], issuer: s, subject: i, audience: l, maxTokenAge: d } = r, h = [...o];
|
|
677
673
|
d !== void 0 && h.push("iat"), l !== void 0 && h.push("aud"), i !== void 0 && h.push("sub"), s !== void 0 && h.push("iss");
|
|
678
674
|
for (const f of new Set(h.reverse()))
|
|
679
675
|
if (!(f in a))
|
|
680
|
-
throw new
|
|
676
|
+
throw new L(`missing required "${f}" claim`, a, f, "missing");
|
|
681
677
|
if (s && !(Array.isArray(s) ? s : [s]).includes(a.iss))
|
|
682
|
-
throw new
|
|
678
|
+
throw new L('unexpected "iss" claim value', a, "iss", "check_failed");
|
|
683
679
|
if (i && a.sub !== i)
|
|
684
|
-
throw new
|
|
685
|
-
if (l && !
|
|
686
|
-
throw new
|
|
680
|
+
throw new L('unexpected "sub" claim value', a, "sub", "check_failed");
|
|
681
|
+
if (l && !fr(a.aud, typeof l == "string" ? [l] : l))
|
|
682
|
+
throw new L('unexpected "aud" claim value', a, "aud", "check_failed");
|
|
687
683
|
let u;
|
|
688
684
|
switch (typeof r.clockTolerance) {
|
|
689
685
|
case "string":
|
|
@@ -698,84 +694,84 @@ const ur = (e) => Math.floor(e.getTime() / 1e3), lt = 60, dt = lt * 60, Ie = dt
|
|
|
698
694
|
default:
|
|
699
695
|
throw new TypeError("Invalid clockTolerance option type");
|
|
700
696
|
}
|
|
701
|
-
const { currentDate: m } = r, p =
|
|
697
|
+
const { currentDate: m } = r, p = mr(m || /* @__PURE__ */ new Date());
|
|
702
698
|
if ((a.iat !== void 0 || d) && typeof a.iat != "number")
|
|
703
|
-
throw new
|
|
699
|
+
throw new L('"iat" claim must be a number', a, "iat", "invalid");
|
|
704
700
|
if (a.nbf !== void 0) {
|
|
705
701
|
if (typeof a.nbf != "number")
|
|
706
|
-
throw new
|
|
702
|
+
throw new L('"nbf" claim must be a number', a, "nbf", "invalid");
|
|
707
703
|
if (a.nbf > p + u)
|
|
708
|
-
throw new
|
|
704
|
+
throw new L('"nbf" claim timestamp check failed', a, "nbf", "check_failed");
|
|
709
705
|
}
|
|
710
706
|
if (a.exp !== void 0) {
|
|
711
707
|
if (typeof a.exp != "number")
|
|
712
|
-
throw new
|
|
708
|
+
throw new L('"exp" claim must be a number', a, "exp", "invalid");
|
|
713
709
|
if (a.exp <= p - u)
|
|
714
|
-
throw new
|
|
710
|
+
throw new Le('"exp" claim timestamp check failed', a, "exp", "check_failed");
|
|
715
711
|
}
|
|
716
712
|
if (d) {
|
|
717
|
-
const f = p - a.iat,
|
|
718
|
-
if (f - u >
|
|
719
|
-
throw new
|
|
713
|
+
const f = p - a.iat, E = typeof d == "number" ? d : Ue(d);
|
|
714
|
+
if (f - u > E)
|
|
715
|
+
throw new Le('"iat" claim timestamp check failed (too far in the past)', a, "iat", "check_failed");
|
|
720
716
|
if (f < 0 - u)
|
|
721
|
-
throw new
|
|
717
|
+
throw new L('"iat" claim timestamp check failed (it should be in the past)', a, "iat", "check_failed");
|
|
722
718
|
}
|
|
723
719
|
return a;
|
|
724
720
|
};
|
|
725
|
-
async function
|
|
721
|
+
async function br(e, t, r) {
|
|
726
722
|
var a;
|
|
727
|
-
const n = await
|
|
723
|
+
const n = await ur(e, t, r);
|
|
728
724
|
if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
|
|
729
725
|
throw new rt("JWTs MUST NOT use unencoded payload");
|
|
730
|
-
const o = { payload:
|
|
726
|
+
const o = { payload: yr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
|
|
731
727
|
return typeof t == "function" ? { ...o, key: n.key } : o;
|
|
732
728
|
}
|
|
733
729
|
const Y = async (e) => {
|
|
734
730
|
try {
|
|
735
|
-
const t =
|
|
736
|
-
return await
|
|
737
|
-
issuer:
|
|
731
|
+
const t = _.ALG, r = await tr($t, t);
|
|
732
|
+
return await br(e, r, {
|
|
733
|
+
issuer: _.ISSUER
|
|
738
734
|
});
|
|
739
735
|
} catch {
|
|
740
736
|
return;
|
|
741
737
|
}
|
|
742
738
|
};
|
|
743
|
-
var
|
|
739
|
+
var v = [];
|
|
744
740
|
for (var ve = 0; ve < 256; ++ve)
|
|
745
|
-
|
|
746
|
-
function
|
|
747
|
-
return (
|
|
741
|
+
v.push((ve + 256).toString(16).slice(1));
|
|
742
|
+
function wr(e, t = 0) {
|
|
743
|
+
return (v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]]).toLowerCase();
|
|
748
744
|
}
|
|
749
|
-
var ee,
|
|
750
|
-
function
|
|
745
|
+
var ee, Er = new Uint8Array(16);
|
|
746
|
+
function vr() {
|
|
751
747
|
if (!ee && (ee = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ee))
|
|
752
748
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
753
|
-
return ee(
|
|
749
|
+
return ee(Er);
|
|
754
750
|
}
|
|
755
|
-
var
|
|
751
|
+
var kr = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
756
752
|
const Ke = {
|
|
757
|
-
randomUUID:
|
|
753
|
+
randomUUID: kr
|
|
758
754
|
};
|
|
759
755
|
function Be(e, t, r) {
|
|
760
756
|
if (Ke.randomUUID && !t && !e)
|
|
761
757
|
return Ke.randomUUID();
|
|
762
758
|
e = e || {};
|
|
763
|
-
var a = e.random || (e.rng ||
|
|
764
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
759
|
+
var a = e.random || (e.rng || vr)();
|
|
760
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, wr(a);
|
|
765
761
|
}
|
|
766
|
-
const We = globalThis.crypto,
|
|
762
|
+
const We = globalThis.crypto, Sr = (e) => `${Be()}${Be()}`.slice(0, e), Tr = (e) => btoa(
|
|
767
763
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
768
764
|
);
|
|
769
|
-
async function
|
|
765
|
+
async function Ar(e) {
|
|
770
766
|
if (!We.subtle)
|
|
771
767
|
throw new Error(
|
|
772
768
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
773
769
|
);
|
|
774
770
|
const t = new TextEncoder().encode(e), r = await We.subtle.digest("SHA-256", t);
|
|
775
|
-
return
|
|
771
|
+
return Tr(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
776
772
|
}
|
|
777
|
-
async function
|
|
778
|
-
const t =
|
|
773
|
+
async function Ir(e) {
|
|
774
|
+
const t = Sr(43), r = await Ar(t);
|
|
779
775
|
return {
|
|
780
776
|
code_verifier: t,
|
|
781
777
|
code_challenge: r
|
|
@@ -791,77 +787,74 @@ const je = (e, t) => {
|
|
|
791
787
|
window.localStorage.setItem(e, r), ut(e, r);
|
|
792
788
|
}, _r = (e) => {
|
|
793
789
|
window.localStorage.removeItem(e), ut(e, null);
|
|
794
|
-
}, Ge = (e) => window.localStorage.getItem(e),
|
|
790
|
+
}, Ge = (e) => window.localStorage.getItem(e), xr = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
795
791
|
function te({
|
|
796
792
|
key: e,
|
|
797
793
|
initialValue: t
|
|
798
794
|
}) {
|
|
799
|
-
const r = () => Ge(e), a =
|
|
800
|
-
|
|
801
|
-
r
|
|
802
|
-
), n = F.useCallback(
|
|
803
|
-
(i) => {
|
|
795
|
+
const r = Nt(xr, () => Ge(e)), a = z(
|
|
796
|
+
(s) => {
|
|
804
797
|
try {
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
} catch (
|
|
808
|
-
console.warn(
|
|
798
|
+
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
799
|
+
i == null ? _r(e) : je(e, i);
|
|
800
|
+
} catch (i) {
|
|
801
|
+
console.warn(i);
|
|
809
802
|
}
|
|
810
803
|
},
|
|
811
|
-
[e,
|
|
812
|
-
),
|
|
813
|
-
|
|
814
|
-
}, [t,
|
|
815
|
-
|
|
816
|
-
}, [
|
|
817
|
-
return
|
|
804
|
+
[e, r]
|
|
805
|
+
), n = z(() => {
|
|
806
|
+
a(t);
|
|
807
|
+
}, [t, a]), o = z(() => {
|
|
808
|
+
a(null);
|
|
809
|
+
}, [a]);
|
|
810
|
+
return V(() => {
|
|
818
811
|
try {
|
|
819
812
|
Ge(e) === null && typeof t < "u" && je(e, t);
|
|
820
|
-
} catch (
|
|
821
|
-
console.warn(
|
|
813
|
+
} catch (s) {
|
|
814
|
+
console.warn(s);
|
|
822
815
|
}
|
|
823
|
-
}, [e, t]), [
|
|
816
|
+
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
824
817
|
}
|
|
825
|
-
var
|
|
818
|
+
var k = [];
|
|
826
819
|
for (var ke = 0; ke < 256; ++ke)
|
|
827
|
-
|
|
828
|
-
function
|
|
829
|
-
return (
|
|
820
|
+
k.push((ke + 256).toString(16).slice(1));
|
|
821
|
+
function Nr(e, t = 0) {
|
|
822
|
+
return (k[e[t + 0]] + k[e[t + 1]] + k[e[t + 2]] + k[e[t + 3]] + "-" + k[e[t + 4]] + k[e[t + 5]] + "-" + k[e[t + 6]] + k[e[t + 7]] + "-" + k[e[t + 8]] + k[e[t + 9]] + "-" + k[e[t + 10]] + k[e[t + 11]] + k[e[t + 12]] + k[e[t + 13]] + k[e[t + 14]] + k[e[t + 15]]).toLowerCase();
|
|
830
823
|
}
|
|
831
|
-
var re,
|
|
832
|
-
function
|
|
824
|
+
var re, Cr = new Uint8Array(16);
|
|
825
|
+
function Rr() {
|
|
833
826
|
if (!re && (re = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !re))
|
|
834
827
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
835
|
-
return re(
|
|
828
|
+
return re(Cr);
|
|
836
829
|
}
|
|
837
|
-
var
|
|
830
|
+
var Or = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
838
831
|
const Ve = {
|
|
839
|
-
randomUUID:
|
|
832
|
+
randomUUID: Or
|
|
840
833
|
};
|
|
841
|
-
function
|
|
834
|
+
function Dr(e, t, r) {
|
|
842
835
|
if (Ve.randomUUID && !t && !e)
|
|
843
836
|
return Ve.randomUUID();
|
|
844
837
|
e = e || {};
|
|
845
|
-
var a = e.random || (e.rng ||
|
|
846
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
838
|
+
var a = e.random || (e.rng || Rr)();
|
|
839
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Nr(a);
|
|
847
840
|
}
|
|
848
|
-
const ae = "Oops! It looks like your session has expired. For your security, please log in again to continue.",
|
|
841
|
+
const ae = "Oops! It looks like your session has expired. For your security, please log in again to continue.", Mr = "Your session has been successfully terminated.", Je = "Login failed. Please try again.", Se = "Error getting access token, please re-authenticate.", Lr = "You forgot to wrap your component in <AuthProvider>.", Fe = {
|
|
849
842
|
dev: "https://auth.gizmette.local.com:3003",
|
|
850
843
|
prod: "https://mylogin.gizmette.com"
|
|
851
|
-
}, ne = "@@auth@@",
|
|
844
|
+
}, ne = "@@auth@@", Pr = process.env.NODE_ENV === "production", $r = !Pr, ge = async ({
|
|
852
845
|
type: e,
|
|
853
846
|
clientId: t,
|
|
854
847
|
params: r = {}
|
|
855
848
|
}) => {
|
|
856
849
|
try {
|
|
857
850
|
const a = await fetch(
|
|
858
|
-
|
|
851
|
+
$r ? `${Fe.dev}/${e}` : `${Fe.prod}/${e}`,
|
|
859
852
|
{
|
|
860
853
|
credentials: "include",
|
|
861
854
|
method: "POST",
|
|
862
855
|
headers: {
|
|
863
856
|
"Content-Type": "application/json",
|
|
864
|
-
[
|
|
857
|
+
[Pt.CLIENT_ID]: `${t}`
|
|
865
858
|
},
|
|
866
859
|
body: JSON.stringify(r)
|
|
867
860
|
}
|
|
@@ -877,23 +870,25 @@ const ae = "Oops! It looks like your session has expired. For your security, ple
|
|
|
877
870
|
} catch (a) {
|
|
878
871
|
return console.error(a), { status: 500, data: [] };
|
|
879
872
|
}
|
|
880
|
-
},
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
873
|
+
}, Ur = async ({
|
|
874
|
+
userId: e,
|
|
875
|
+
idToken: t,
|
|
876
|
+
accessToken: r,
|
|
877
|
+
refreshToken: a,
|
|
878
|
+
clientId: n,
|
|
879
|
+
domain: o
|
|
886
880
|
}) => {
|
|
887
881
|
try {
|
|
888
882
|
return {
|
|
889
883
|
status: (await ge({
|
|
890
884
|
type: me.LOGOUT,
|
|
891
|
-
clientId:
|
|
885
|
+
clientId: n,
|
|
892
886
|
params: {
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
887
|
+
userId: e,
|
|
888
|
+
idToken: t,
|
|
889
|
+
accessToken: r,
|
|
890
|
+
refreshToken: a,
|
|
891
|
+
domain: o
|
|
897
892
|
}
|
|
898
893
|
})).status === 200
|
|
899
894
|
};
|
|
@@ -928,11 +923,11 @@ const ae = "Oops! It looks like your session has expired. For your security, ple
|
|
|
928
923
|
domain: l
|
|
929
924
|
}
|
|
930
925
|
}), h = await Y(d.data.idToken);
|
|
931
|
-
return h && h.payload[
|
|
926
|
+
return h && h.payload[_.USER_ID_KEY] !== "" && h.payload[_.NONCE_KEY] === a ? {
|
|
932
927
|
idToken: d.data.idToken,
|
|
933
928
|
accessToken: d.data.accessToken,
|
|
934
929
|
refreshToken: d.data.refreshToken,
|
|
935
|
-
userId: h.payload[
|
|
930
|
+
userId: h.payload[_.USER_ID_KEY],
|
|
936
931
|
status: !0
|
|
937
932
|
} : {
|
|
938
933
|
status: !1
|
|
@@ -942,7 +937,7 @@ const ae = "Oops! It looks like your session has expired. For your security, ple
|
|
|
942
937
|
status: !1
|
|
943
938
|
};
|
|
944
939
|
}
|
|
945
|
-
},
|
|
940
|
+
}, Hr = async ({
|
|
946
941
|
nonce: e,
|
|
947
942
|
clientId: t,
|
|
948
943
|
code_challenge: r
|
|
@@ -968,7 +963,7 @@ const ae = "Oops! It looks like your session has expired. For your security, ple
|
|
|
968
963
|
status: !1
|
|
969
964
|
};
|
|
970
965
|
}
|
|
971
|
-
},
|
|
966
|
+
}, Kr = async ({
|
|
972
967
|
clientId: e,
|
|
973
968
|
userId: t,
|
|
974
969
|
nonce: r,
|
|
@@ -989,10 +984,10 @@ const ae = "Oops! It looks like your session has expired. For your security, ple
|
|
|
989
984
|
domain: o
|
|
990
985
|
}
|
|
991
986
|
}), i = await Y(s.data.accessToken);
|
|
992
|
-
return i && i.payload[
|
|
987
|
+
return i && i.payload[_.USER_ID_KEY] !== "" && i.payload[_.NONCE_KEY] === r ? {
|
|
993
988
|
accessToken: s.data.accessToken,
|
|
994
989
|
refreshToken: s.data.refreshToken,
|
|
995
|
-
userId: i.payload[
|
|
990
|
+
userId: i.payload[_.USER_ID_KEY],
|
|
996
991
|
status: !0
|
|
997
992
|
} : {
|
|
998
993
|
status: !1
|
|
@@ -1003,7 +998,7 @@ const ae = "Oops! It looks like your session has expired. For your security, ple
|
|
|
1003
998
|
};
|
|
1004
999
|
}
|
|
1005
1000
|
};
|
|
1006
|
-
class
|
|
1001
|
+
class Br {
|
|
1007
1002
|
constructor(t = null, r = null) {
|
|
1008
1003
|
ye(this, "refreshTokenPromise", null), ye(this, "accessToken"), ye(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1009
1004
|
}
|
|
@@ -1032,8 +1027,8 @@ class Kr {
|
|
|
1032
1027
|
domain: n
|
|
1033
1028
|
}) {
|
|
1034
1029
|
const o = await Y(this.refreshToken);
|
|
1035
|
-
if (o && o.payload[
|
|
1036
|
-
const s = await
|
|
1030
|
+
if (o && o.payload[_.USER_ID_KEY] !== "") {
|
|
1031
|
+
const s = await Kr({
|
|
1037
1032
|
clientId: t,
|
|
1038
1033
|
userId: r,
|
|
1039
1034
|
nonce: a,
|
|
@@ -1055,7 +1050,7 @@ class Kr {
|
|
|
1055
1050
|
}
|
|
1056
1051
|
}
|
|
1057
1052
|
const oe = () => {
|
|
1058
|
-
throw new Error(
|
|
1053
|
+
throw new Error(Lr);
|
|
1059
1054
|
}, mt = xt({
|
|
1060
1055
|
isAuthenticated: !1,
|
|
1061
1056
|
isLoading: !1,
|
|
@@ -1064,13 +1059,13 @@ const oe = () => {
|
|
|
1064
1059
|
getAccessToken: oe,
|
|
1065
1060
|
getIdToken: oe,
|
|
1066
1061
|
logoutReason: ""
|
|
1067
|
-
}),
|
|
1062
|
+
}), Wr = ({
|
|
1068
1063
|
children: e,
|
|
1069
1064
|
sessionExpiration: t,
|
|
1070
1065
|
clientId: r,
|
|
1071
1066
|
domain: a = ""
|
|
1072
1067
|
}) => {
|
|
1073
|
-
const n =
|
|
1068
|
+
const n = j(!1), [o, s, , i] = te({
|
|
1074
1069
|
key: `${ne}::${r}::@@user@@`
|
|
1075
1070
|
}), [l, d, , h] = te({
|
|
1076
1071
|
key: `${ne}::${r}::@@access@@`
|
|
@@ -1078,16 +1073,16 @@ const oe = () => {
|
|
|
1078
1073
|
{
|
|
1079
1074
|
key: `${ne}::${r}::@@refresh@@`
|
|
1080
1075
|
}
|
|
1081
|
-
), [f,
|
|
1076
|
+
), [f, E, , x] = te({
|
|
1082
1077
|
key: `${ne}::${r}::@@nonce@@`
|
|
1083
|
-
}),
|
|
1078
|
+
}), D = new Br(l, u), [A, w] = H({
|
|
1084
1079
|
isLoading: !0,
|
|
1085
1080
|
isAuthenticated: !1,
|
|
1086
1081
|
user: void 0,
|
|
1087
1082
|
logoutReason: ""
|
|
1088
|
-
}),
|
|
1083
|
+
}), M = z(
|
|
1089
1084
|
(y) => {
|
|
1090
|
-
console.warn(y),
|
|
1085
|
+
console.warn(y), w({
|
|
1091
1086
|
isLoading: !0,
|
|
1092
1087
|
isAuthenticated: !1,
|
|
1093
1088
|
user: void 0,
|
|
@@ -1095,118 +1090,127 @@ const oe = () => {
|
|
|
1095
1090
|
}), i(), h(), p(), x();
|
|
1096
1091
|
},
|
|
1097
1092
|
[h, i, x, p]
|
|
1098
|
-
), C =
|
|
1093
|
+
), C = z(
|
|
1099
1094
|
async (y) => {
|
|
1100
|
-
|
|
1095
|
+
const { user: O } = A;
|
|
1096
|
+
M(y || ae), await Ur({
|
|
1097
|
+
userId: (O == null ? void 0 : O.userId) || "",
|
|
1101
1098
|
idToken: o,
|
|
1102
1099
|
accessToken: l,
|
|
1103
1100
|
refreshToken: u,
|
|
1104
1101
|
clientId: r,
|
|
1105
1102
|
domain: a
|
|
1106
|
-
}),
|
|
1107
|
-
|
|
1103
|
+
}), w((b) => ({
|
|
1104
|
+
...b,
|
|
1108
1105
|
isLoading: !1
|
|
1109
1106
|
}));
|
|
1110
1107
|
},
|
|
1111
1108
|
[
|
|
1112
1109
|
l,
|
|
1110
|
+
A,
|
|
1113
1111
|
r,
|
|
1114
1112
|
a,
|
|
1115
1113
|
o,
|
|
1116
1114
|
u,
|
|
1117
|
-
|
|
1115
|
+
M
|
|
1118
1116
|
]
|
|
1119
1117
|
);
|
|
1120
|
-
|
|
1118
|
+
V(() => {
|
|
1121
1119
|
if (!n.current)
|
|
1122
|
-
return
|
|
1120
|
+
return A.isLoading && o !== null ? (async () => {
|
|
1123
1121
|
try {
|
|
1124
1122
|
const y = await Y(o);
|
|
1125
|
-
y && y.payload[
|
|
1123
|
+
y && y.payload[_.USER_ID_KEY] !== "" ? w({
|
|
1126
1124
|
isLoading: !1,
|
|
1127
1125
|
isAuthenticated: !0,
|
|
1128
1126
|
user: {
|
|
1129
|
-
userId: y.payload[
|
|
1130
|
-
username: y.payload[
|
|
1127
|
+
userId: y.payload[_.USER_ID_KEY],
|
|
1128
|
+
username: y.payload[_.USERNAME_KEY]
|
|
1131
1129
|
},
|
|
1132
1130
|
logoutReason: ""
|
|
1133
1131
|
}) : await C(ae);
|
|
1134
1132
|
} catch {
|
|
1135
1133
|
await C(ae);
|
|
1136
1134
|
}
|
|
1137
|
-
})() :
|
|
1135
|
+
})() : w((y) => ({
|
|
1138
1136
|
...y,
|
|
1139
1137
|
isLoading: !1
|
|
1140
1138
|
})), () => {
|
|
1141
1139
|
n.current = !0;
|
|
1142
1140
|
};
|
|
1143
|
-
}, [
|
|
1144
|
-
const N = async (y,
|
|
1145
|
-
const
|
|
1146
|
-
if (
|
|
1147
|
-
|
|
1141
|
+
}, [A.isLoading, o, C]);
|
|
1142
|
+
const N = async (y, O, b) => {
|
|
1143
|
+
const I = Dr();
|
|
1144
|
+
if (E(I), w(($) => ({
|
|
1145
|
+
...$,
|
|
1148
1146
|
isLoading: !0
|
|
1149
1147
|
})), i(), h(), p(), b === Q.CODE) {
|
|
1150
|
-
const { code_verifier:
|
|
1151
|
-
nonce:
|
|
1148
|
+
const { code_verifier: $, code_challenge: It } = await Ir(), Me = await Hr({
|
|
1149
|
+
nonce: I,
|
|
1152
1150
|
clientId: r,
|
|
1153
1151
|
code_challenge: It
|
|
1154
1152
|
});
|
|
1155
|
-
if (
|
|
1156
|
-
const
|
|
1153
|
+
if (Me.status) {
|
|
1154
|
+
const F = await ze({
|
|
1157
1155
|
username: y,
|
|
1158
|
-
password:
|
|
1156
|
+
password: O,
|
|
1159
1157
|
clientId: r,
|
|
1160
1158
|
sessionExpiration: t,
|
|
1161
|
-
nonce:
|
|
1159
|
+
nonce: I,
|
|
1162
1160
|
type: b,
|
|
1163
|
-
code:
|
|
1164
|
-
code_verifier:
|
|
1161
|
+
code: Me.code,
|
|
1162
|
+
code_verifier: $,
|
|
1165
1163
|
domain: a
|
|
1166
1164
|
});
|
|
1167
|
-
return
|
|
1165
|
+
return F.status ? (s(F.idToken), d(F.accessToken), m(F.refreshToken), w({
|
|
1168
1166
|
isLoading: !1,
|
|
1169
1167
|
isAuthenticated: !0,
|
|
1170
1168
|
user: {
|
|
1171
|
-
userId:
|
|
1169
|
+
userId: F.userId,
|
|
1172
1170
|
username: y
|
|
1173
1171
|
},
|
|
1174
1172
|
logoutReason: ""
|
|
1175
|
-
}), !0) : (
|
|
1173
|
+
}), !0) : (M(Je), w((_t) => ({
|
|
1174
|
+
..._t,
|
|
1175
|
+
isLoading: !1
|
|
1176
|
+
})), !1);
|
|
1176
1177
|
}
|
|
1177
1178
|
return !1;
|
|
1178
1179
|
}
|
|
1179
|
-
const
|
|
1180
|
+
const W = await ze({
|
|
1180
1181
|
username: y,
|
|
1181
|
-
password:
|
|
1182
|
+
password: O,
|
|
1182
1183
|
clientId: r,
|
|
1183
1184
|
sessionExpiration: t,
|
|
1184
|
-
nonce:
|
|
1185
|
+
nonce: I,
|
|
1185
1186
|
type: b,
|
|
1186
1187
|
domain: a
|
|
1187
1188
|
});
|
|
1188
|
-
return
|
|
1189
|
+
return W.status ? (s(W.idToken), d(W.accessToken), m(W.refreshToken), w({
|
|
1189
1190
|
isLoading: !1,
|
|
1190
1191
|
isAuthenticated: !0,
|
|
1191
1192
|
user: {
|
|
1192
|
-
userId:
|
|
1193
|
+
userId: W.userId,
|
|
1193
1194
|
username: y
|
|
1194
1195
|
}
|
|
1195
|
-
}), !0) : (
|
|
1196
|
-
|
|
1197
|
-
|
|
1196
|
+
}), !0) : (M(Je), w(($) => ({
|
|
1197
|
+
...$,
|
|
1198
|
+
isLoading: !1
|
|
1199
|
+
})), !1);
|
|
1200
|
+
}, J = async (y) => {
|
|
1201
|
+
y == null || y.preventDefault(), await C(Mr);
|
|
1198
1202
|
}, R = async () => {
|
|
1199
|
-
const { isAuthenticated: y, user:
|
|
1203
|
+
const { isAuthenticated: y, user: O } = A;
|
|
1200
1204
|
try {
|
|
1201
|
-
if (y &&
|
|
1205
|
+
if (y && O && O.userId) {
|
|
1202
1206
|
if (l) {
|
|
1203
|
-
const
|
|
1204
|
-
if (
|
|
1207
|
+
const I = await Y(l);
|
|
1208
|
+
if (I && I.payload[_.USER_ID_KEY] !== "")
|
|
1205
1209
|
return l;
|
|
1206
1210
|
}
|
|
1207
|
-
const b = await
|
|
1211
|
+
const b = await D.refreshtoken({
|
|
1208
1212
|
clientId: r,
|
|
1209
|
-
userId:
|
|
1213
|
+
userId: O.userId,
|
|
1210
1214
|
nonce: f,
|
|
1211
1215
|
domain: a
|
|
1212
1216
|
});
|
|
@@ -1217,17 +1221,188 @@ const oe = () => {
|
|
|
1217
1221
|
return await C(Se), "";
|
|
1218
1222
|
}
|
|
1219
1223
|
}, fe = () => {
|
|
1220
|
-
if (
|
|
1224
|
+
if (A.isAuthenticated && o)
|
|
1221
1225
|
return o;
|
|
1222
1226
|
};
|
|
1223
1227
|
return /* @__PURE__ */ c(
|
|
1224
1228
|
mt.Provider,
|
|
1225
1229
|
{
|
|
1226
|
-
value: { ...
|
|
1230
|
+
value: { ...A, login: N, logout: J, getAccessToken: R, getIdToken: fe },
|
|
1227
1231
|
children: e
|
|
1228
1232
|
}
|
|
1229
1233
|
);
|
|
1230
|
-
}, xe = (e = mt) => Xe(e),
|
|
1234
|
+
}, xe = (e = mt) => Xe(e), an = "user", nn = "assistant", on = "system", sn = "internal", cn = "hidden", ln = "I'm having trouble right now. Please try again later.", dn = "gpt-4", un = 128e3, mn = "action-message", hn = "action-reset", pn = "action-model", gn = "action-restore", fn = "action-location", yn = "action-streaming", bn = "action-search", wn = "action-sort", En = "sassy-saint-", vn = "details", kn = "search", Sn = "sort", Tn = "location", An = "==stats==", jr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Ye = (e) => Number.isFinite(e) ? e : 0;
|
|
1235
|
+
function Gr(e) {
|
|
1236
|
+
return {
|
|
1237
|
+
days: Math.trunc(e / 864e5),
|
|
1238
|
+
hours: Math.trunc(e / 36e5 % 24),
|
|
1239
|
+
minutes: Math.trunc(e / 6e4 % 60),
|
|
1240
|
+
seconds: Math.trunc(e / 1e3 % 60),
|
|
1241
|
+
milliseconds: Math.trunc(e % 1e3),
|
|
1242
|
+
microseconds: Math.trunc(Ye(e * 1e3) % 1e3),
|
|
1243
|
+
nanoseconds: Math.trunc(Ye(e * 1e6) % 1e3)
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
function Vr(e) {
|
|
1247
|
+
return {
|
|
1248
|
+
days: e / 86400000n,
|
|
1249
|
+
hours: e / 3600000n % 24n,
|
|
1250
|
+
minutes: e / 60000n % 60n,
|
|
1251
|
+
seconds: e / 1000n % 60n,
|
|
1252
|
+
milliseconds: e % 1000n,
|
|
1253
|
+
microseconds: 0n,
|
|
1254
|
+
nanoseconds: 0n
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
function Jr(e) {
|
|
1258
|
+
switch (typeof e) {
|
|
1259
|
+
case "number": {
|
|
1260
|
+
if (Number.isFinite(e))
|
|
1261
|
+
return Gr(e);
|
|
1262
|
+
break;
|
|
1263
|
+
}
|
|
1264
|
+
case "bigint":
|
|
1265
|
+
return Vr(e);
|
|
1266
|
+
}
|
|
1267
|
+
throw new TypeError("Expected a finite number or bigint");
|
|
1268
|
+
}
|
|
1269
|
+
const Fr = (e) => e === 0 || e === 0n, zr = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Yr = 1e-7, qr = 24n * 60n * 60n * 1000n;
|
|
1270
|
+
function Qr(e, t) {
|
|
1271
|
+
const r = typeof e == "bigint";
|
|
1272
|
+
if (!r && !Number.isFinite(e))
|
|
1273
|
+
throw new TypeError("Expected a finite number or bigint");
|
|
1274
|
+
t = { ...t }, 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);
|
|
1275
|
+
let a = [];
|
|
1276
|
+
const n = (d, h) => {
|
|
1277
|
+
const u = Math.floor(d * 10 ** h + Yr);
|
|
1278
|
+
return (Math.round(u) / 10 ** h).toFixed(h);
|
|
1279
|
+
}, o = (d, h, u, m) => {
|
|
1280
|
+
if (!((a.length === 0 || !t.colonNotation) && Fr(d) && !(t.colonNotation && u === "m"))) {
|
|
1281
|
+
if (m = m ?? String(d), t.colonNotation) {
|
|
1282
|
+
const p = m.includes(".") ? m.split(".")[0].length : m.length, f = a.length > 0 ? 2 : 1;
|
|
1283
|
+
m = "0".repeat(Math.max(0, f - p)) + m;
|
|
1284
|
+
} else
|
|
1285
|
+
m += t.verbose ? " " + zr(h, d) : u;
|
|
1286
|
+
a.push(m);
|
|
1287
|
+
}
|
|
1288
|
+
}, s = Jr(e), i = BigInt(s.days);
|
|
1289
|
+
if (o(i / 365n, "year", "y"), o(i % 365n, "day", "d"), o(Number(s.hours), "hour", "h"), o(Number(s.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
1290
|
+
const d = Number(s.seconds), h = Number(s.milliseconds), u = Number(s.microseconds), m = Number(s.nanoseconds);
|
|
1291
|
+
if (o(d, "second", "s"), t.formatSubMilliseconds)
|
|
1292
|
+
o(h, "millisecond", "ms"), o(u, "microsecond", "µs"), o(m, "nanosecond", "ns");
|
|
1293
|
+
else {
|
|
1294
|
+
const p = h + u / 1e3 + m / 1e6, f = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, E = p >= 1 ? Math.round(p) : Math.ceil(p), x = f ? p.toFixed(f) : E;
|
|
1295
|
+
o(
|
|
1296
|
+
Number.parseFloat(x),
|
|
1297
|
+
"millisecond",
|
|
1298
|
+
"ms",
|
|
1299
|
+
x
|
|
1300
|
+
);
|
|
1301
|
+
}
|
|
1302
|
+
} else {
|
|
1303
|
+
const d = (r ? Number(e % qr) : e) / 1e3 % 60, h = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, u = n(d, h), m = t.keepDecimalsOnWholeSeconds ? u : u.replace(/\.0+$/, "");
|
|
1304
|
+
o(Number.parseFloat(m), "second", "s", m);
|
|
1305
|
+
}
|
|
1306
|
+
if (a.length === 0)
|
|
1307
|
+
return "0" + (t.verbose ? " milliseconds" : "ms");
|
|
1308
|
+
const l = t.colonNotation ? ":" : " ";
|
|
1309
|
+
return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), a.join(l);
|
|
1310
|
+
}
|
|
1311
|
+
const Xr = process.env.NODE_ENV === "production", Ne = !Xr, Zr = Ne ? "gizmette.local.com" : "gizmette.com", In = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, ht = (e, t) => {
|
|
1312
|
+
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;
|
|
1313
|
+
return {
|
|
1314
|
+
dir: r,
|
|
1315
|
+
deg: a,
|
|
1316
|
+
min: n,
|
|
1317
|
+
sec: o
|
|
1318
|
+
};
|
|
1319
|
+
}, _n = (e) => {
|
|
1320
|
+
if (!e && e !== 0)
|
|
1321
|
+
return "N/A";
|
|
1322
|
+
const t = ht(e, !1);
|
|
1323
|
+
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
1324
|
+
}, xn = (e) => {
|
|
1325
|
+
if (!e && e !== 0)
|
|
1326
|
+
return "N/A";
|
|
1327
|
+
const t = ht(e, !0);
|
|
1328
|
+
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
1329
|
+
}, Nn = async () => {
|
|
1330
|
+
const e = {
|
|
1331
|
+
/**
|
|
1332
|
+
* A boolean value that indicates the application would
|
|
1333
|
+
* like to receive the best possible results. If true
|
|
1334
|
+
* and if the device is able to provide a more accurate
|
|
1335
|
+
* position, it will do so. Note that this can result in
|
|
1336
|
+
* slower response times or increased power consumption
|
|
1337
|
+
* (with a GPS chip on a mobile device for example). On
|
|
1338
|
+
* the other hand, if false, the device can take the
|
|
1339
|
+
* liberty to save resources by responding more quickly
|
|
1340
|
+
* and/or using less power. Default: false.
|
|
1341
|
+
*/
|
|
1342
|
+
enableHighAccuracy: !1,
|
|
1343
|
+
/**
|
|
1344
|
+
* A positive long value representing the maximum length
|
|
1345
|
+
* of time (in milliseconds) the device is allowed to
|
|
1346
|
+
* take in order to return a position. The default value
|
|
1347
|
+
* is Infinity, meaning that getCurrentPosition() won't
|
|
1348
|
+
* return until the position is available.
|
|
1349
|
+
*/
|
|
1350
|
+
timeout: 1e4,
|
|
1351
|
+
/**
|
|
1352
|
+
* A positive long value indicating the maximum age in
|
|
1353
|
+
* milliseconds of a possible cached position that is
|
|
1354
|
+
* acceptable to return. If set to 0, it means that the
|
|
1355
|
+
* device cannot use a cached position and must attempt
|
|
1356
|
+
* to retrieve the real current position. If set to
|
|
1357
|
+
* Infinity the device must return a cached position
|
|
1358
|
+
* regardless of its age. Default: 0.
|
|
1359
|
+
*/
|
|
1360
|
+
maximumAge: 6e4
|
|
1361
|
+
};
|
|
1362
|
+
return new Promise((t, r) => {
|
|
1363
|
+
var a;
|
|
1364
|
+
(a = navigator == null ? void 0 : navigator.geolocation) == null || a.getCurrentPosition(
|
|
1365
|
+
(n) => {
|
|
1366
|
+
t({
|
|
1367
|
+
latitude: n.coords.latitude,
|
|
1368
|
+
longitude: n.coords.longitude,
|
|
1369
|
+
accuracy: n.coords.accuracy
|
|
1370
|
+
});
|
|
1371
|
+
},
|
|
1372
|
+
(n) => {
|
|
1373
|
+
r(n);
|
|
1374
|
+
},
|
|
1375
|
+
e
|
|
1376
|
+
);
|
|
1377
|
+
});
|
|
1378
|
+
}, Cn = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ T("div", { className: "flex items-center justify-between", children: [
|
|
1379
|
+
/* @__PURE__ */ c("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
1380
|
+
/* @__PURE__ */ c("dd", { className: "inline-block", children: t[r] })
|
|
1381
|
+
] }) }, `${e}-${r}`)) : null;
|
|
1382
|
+
function Rn({
|
|
1383
|
+
data: e,
|
|
1384
|
+
formatter: t = (r) => r
|
|
1385
|
+
}) {
|
|
1386
|
+
const r = e.filter(
|
|
1387
|
+
(n) => typeof n == "number" && n > 0
|
|
1388
|
+
), a = r.reduce(
|
|
1389
|
+
(n, o) => (n || 0) + (o || 0),
|
|
1390
|
+
0
|
|
1391
|
+
);
|
|
1392
|
+
return t(a ? a / r.length : 0);
|
|
1393
|
+
}
|
|
1394
|
+
const On = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Dn = new Intl.NumberFormat("en", {
|
|
1395
|
+
style: "decimal",
|
|
1396
|
+
signDisplay: "never",
|
|
1397
|
+
minimumFractionDigits: 0,
|
|
1398
|
+
maximumFractionDigits: 0
|
|
1399
|
+
}), Mn = (e) => Qr(e, {
|
|
1400
|
+
secondsDecimalDigits: 2,
|
|
1401
|
+
unitCount: 2
|
|
1402
|
+
}), ea = (e) => g(
|
|
1403
|
+
"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",
|
|
1404
|
+
e || Ne ? "pt-4" : "pt-10"
|
|
1405
|
+
), Ln = (e, t) => t === 1 ? e : `${e}s`, Ce = (e) => {
|
|
1231
1406
|
let t = "";
|
|
1232
1407
|
if (typeof e == "number" || typeof e == "string")
|
|
1233
1408
|
t = "m-" + e;
|
|
@@ -1236,7 +1411,7 @@ const oe = () => {
|
|
|
1236
1411
|
(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(" ");
|
|
1237
1412
|
}
|
|
1238
1413
|
return t;
|
|
1239
|
-
},
|
|
1414
|
+
}, Pn = "av-bubble", qe = "av-button", $n = "av-card", ta = "av-footer", ra = "av-main", Un = "av-messagebox", Hn = "av-panel", Kn = "av-spinner", pt = "icon", gt = "button", aa = "link", na = ({
|
|
1240
1415
|
type: e,
|
|
1241
1416
|
size: t,
|
|
1242
1417
|
labelRight: r,
|
|
@@ -1245,19 +1420,19 @@ const oe = () => {
|
|
|
1245
1420
|
}) => {
|
|
1246
1421
|
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";
|
|
1247
1422
|
switch (e) {
|
|
1248
|
-
case
|
|
1423
|
+
case gt:
|
|
1249
1424
|
return g("px-4", {
|
|
1250
1425
|
[o]: t === "small",
|
|
1251
1426
|
[s]: t === "medium",
|
|
1252
1427
|
[i]: t === "large"
|
|
1253
1428
|
});
|
|
1254
|
-
case
|
|
1429
|
+
case aa:
|
|
1255
1430
|
return g("px-4 text-center", {
|
|
1256
1431
|
[o]: t === "small",
|
|
1257
1432
|
[s]: t === "medium",
|
|
1258
1433
|
[i]: t === "large"
|
|
1259
1434
|
});
|
|
1260
|
-
case
|
|
1435
|
+
case pt:
|
|
1261
1436
|
return g("inline-flex items-center", {
|
|
1262
1437
|
"justify-center": n === "center",
|
|
1263
1438
|
"justify-start": n === "left",
|
|
@@ -1270,7 +1445,7 @@ const oe = () => {
|
|
|
1270
1445
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
1271
1446
|
});
|
|
1272
1447
|
}
|
|
1273
|
-
},
|
|
1448
|
+
}, oa = ({
|
|
1274
1449
|
mode: e,
|
|
1275
1450
|
noBackground: t,
|
|
1276
1451
|
noTruncate: r,
|
|
@@ -1302,7 +1477,7 @@ const oe = () => {
|
|
|
1302
1477
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
1303
1478
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
1304
1479
|
});
|
|
1305
|
-
},
|
|
1480
|
+
}, sa = ({
|
|
1306
1481
|
mode: e,
|
|
1307
1482
|
disabled: t,
|
|
1308
1483
|
variant: r
|
|
@@ -1330,7 +1505,7 @@ const oe = () => {
|
|
|
1330
1505
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
1331
1506
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
1332
1507
|
});
|
|
1333
|
-
},
|
|
1508
|
+
}, ia = ({
|
|
1334
1509
|
mode: e,
|
|
1335
1510
|
disabled: t,
|
|
1336
1511
|
variant: r
|
|
@@ -1358,7 +1533,7 @@ const oe = () => {
|
|
|
1358
1533
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
1359
1534
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
1360
1535
|
});
|
|
1361
|
-
},
|
|
1536
|
+
}, ca = ({
|
|
1362
1537
|
mode: e,
|
|
1363
1538
|
noBorder: t,
|
|
1364
1539
|
variant: r
|
|
@@ -1386,12 +1561,12 @@ const oe = () => {
|
|
|
1386
1561
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
1387
1562
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
1388
1563
|
});
|
|
1389
|
-
},
|
|
1564
|
+
}, la = ({ focusMode: e }) => g("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1390
1565
|
"focus:outline-focus-dark": e === "dark",
|
|
1391
1566
|
"focus:outline-focus-light": e === "light",
|
|
1392
1567
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1393
1568
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1394
|
-
}),
|
|
1569
|
+
}), ft = ({
|
|
1395
1570
|
type: e,
|
|
1396
1571
|
className: t,
|
|
1397
1572
|
raw: r,
|
|
@@ -1407,25 +1582,25 @@ const oe = () => {
|
|
|
1407
1582
|
noBackground: m,
|
|
1408
1583
|
variant: p,
|
|
1409
1584
|
noTruncate: f,
|
|
1410
|
-
align:
|
|
1411
|
-
}) => (p || (p = "primary"), r ? g(
|
|
1412
|
-
|
|
1585
|
+
align: E
|
|
1586
|
+
}) => (p || (p = "primary"), r ? g(qe, t) : g(
|
|
1587
|
+
qe,
|
|
1413
1588
|
t,
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1589
|
+
Ce(u),
|
|
1590
|
+
oa({ mode: a, variant: p, noBackground: m, noTruncate: f }),
|
|
1591
|
+
na({ type: e, size: i, labelRight: d, labelLeft: h, align: E }),
|
|
1592
|
+
ca({ mode: a, variant: p, noBorder: l }),
|
|
1593
|
+
la({ focusMode: n }),
|
|
1594
|
+
sa({ mode: a, variant: p, disabled: o }),
|
|
1595
|
+
ia({ mode: a, variant: p, disabled: o }),
|
|
1421
1596
|
{
|
|
1422
1597
|
"w-full": s,
|
|
1423
1598
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
1424
1599
|
}
|
|
1425
|
-
)),
|
|
1600
|
+
)), da = (e, t, r) => {
|
|
1426
1601
|
var a;
|
|
1427
1602
|
!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);
|
|
1428
|
-
},
|
|
1603
|
+
}, Re = B.forwardRef(
|
|
1429
1604
|
(e, t) => {
|
|
1430
1605
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
1431
1606
|
return /* @__PURE__ */ c(
|
|
@@ -1433,15 +1608,15 @@ const oe = () => {
|
|
|
1433
1608
|
{
|
|
1434
1609
|
ref: t,
|
|
1435
1610
|
onClick: (o) => {
|
|
1436
|
-
|
|
1611
|
+
da(o, a, r);
|
|
1437
1612
|
},
|
|
1438
1613
|
...n
|
|
1439
1614
|
}
|
|
1440
1615
|
);
|
|
1441
1616
|
}
|
|
1442
1617
|
);
|
|
1443
|
-
|
|
1444
|
-
const
|
|
1618
|
+
Re.displayName = "BaseButton";
|
|
1619
|
+
const yt = B.forwardRef(
|
|
1445
1620
|
({
|
|
1446
1621
|
children: e,
|
|
1447
1622
|
disabled: t = !1,
|
|
@@ -1458,12 +1633,12 @@ const ft = K.forwardRef(
|
|
|
1458
1633
|
labelRight: m,
|
|
1459
1634
|
labelLeft: p,
|
|
1460
1635
|
spacing: f,
|
|
1461
|
-
noBackground:
|
|
1636
|
+
noBackground: E = !1,
|
|
1462
1637
|
align: x = "center",
|
|
1463
|
-
...
|
|
1464
|
-
},
|
|
1465
|
-
const
|
|
1466
|
-
type:
|
|
1638
|
+
...D
|
|
1639
|
+
}, A) => {
|
|
1640
|
+
const w = ft({
|
|
1641
|
+
type: pt,
|
|
1467
1642
|
mode: r,
|
|
1468
1643
|
focusMode: a,
|
|
1469
1644
|
fullWidth: n,
|
|
@@ -1475,34 +1650,34 @@ const ft = K.forwardRef(
|
|
|
1475
1650
|
labelRight: m,
|
|
1476
1651
|
labelLeft: p,
|
|
1477
1652
|
spacing: f,
|
|
1478
|
-
noBackground:
|
|
1653
|
+
noBackground: E,
|
|
1479
1654
|
align: x
|
|
1480
|
-
}),
|
|
1655
|
+
}), M = g({
|
|
1481
1656
|
"text-copy-accent-dark": r === "light" && !i,
|
|
1482
1657
|
"text-copy-light": r === "dark" && !i,
|
|
1483
1658
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
1484
1659
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
1485
1660
|
});
|
|
1486
1661
|
return /* @__PURE__ */ T(
|
|
1487
|
-
|
|
1662
|
+
Re,
|
|
1488
1663
|
{
|
|
1489
|
-
ref:
|
|
1490
|
-
className:
|
|
1664
|
+
ref: A,
|
|
1665
|
+
className: w,
|
|
1491
1666
|
disabled: t,
|
|
1492
1667
|
type: s,
|
|
1493
1668
|
"aria-label": d || h,
|
|
1494
|
-
...
|
|
1669
|
+
...D,
|
|
1495
1670
|
children: [
|
|
1496
1671
|
p && /* @__PURE__ */ c("span", { className: "pr-2", children: p }),
|
|
1497
|
-
/* @__PURE__ */ c("div", { className:
|
|
1672
|
+
/* @__PURE__ */ c("div", { className: M, children: e }),
|
|
1498
1673
|
m && /* @__PURE__ */ c("span", { className: "pl-2", children: m })
|
|
1499
1674
|
]
|
|
1500
1675
|
}
|
|
1501
1676
|
);
|
|
1502
1677
|
}
|
|
1503
1678
|
);
|
|
1504
|
-
|
|
1505
|
-
const
|
|
1679
|
+
yt.displayName = "ButtonIcon";
|
|
1680
|
+
const bt = B.forwardRef(
|
|
1506
1681
|
({
|
|
1507
1682
|
children: e,
|
|
1508
1683
|
disabled: t = !1,
|
|
@@ -1518,8 +1693,8 @@ const yt = K.forwardRef(
|
|
|
1518
1693
|
noTruncate: u = !1,
|
|
1519
1694
|
...m
|
|
1520
1695
|
}, p) => {
|
|
1521
|
-
const f =
|
|
1522
|
-
type:
|
|
1696
|
+
const f = ft({
|
|
1697
|
+
type: gt,
|
|
1523
1698
|
mode: r,
|
|
1524
1699
|
focusMode: a,
|
|
1525
1700
|
fullWidth: n,
|
|
@@ -1533,7 +1708,7 @@ const yt = K.forwardRef(
|
|
|
1533
1708
|
noTruncate: u
|
|
1534
1709
|
});
|
|
1535
1710
|
return /* @__PURE__ */ c(
|
|
1536
|
-
|
|
1711
|
+
Re,
|
|
1537
1712
|
{
|
|
1538
1713
|
ref: p,
|
|
1539
1714
|
className: f,
|
|
@@ -1544,8 +1719,8 @@ const yt = K.forwardRef(
|
|
|
1544
1719
|
);
|
|
1545
1720
|
}
|
|
1546
1721
|
);
|
|
1547
|
-
|
|
1548
|
-
const
|
|
1722
|
+
bt.displayName = "Button";
|
|
1723
|
+
const ua = ({
|
|
1549
1724
|
className: e,
|
|
1550
1725
|
mode: t = "system",
|
|
1551
1726
|
row1: r,
|
|
@@ -1554,7 +1729,7 @@ const Zr = ({
|
|
|
1554
1729
|
spacing: o,
|
|
1555
1730
|
raw: s = !1
|
|
1556
1731
|
}) => {
|
|
1557
|
-
const i = g(
|
|
1732
|
+
const i = g(ta, e, Ce(o), {
|
|
1558
1733
|
"text-copy-dark": !s && t === "dark",
|
|
1559
1734
|
"text-copy-lighter": !s && t === "light",
|
|
1560
1735
|
"text-copy-dark dark:text-copy-lighter": !s && t === "system",
|
|
@@ -1566,13 +1741,13 @@ const Zr = ({
|
|
|
1566
1741
|
r && /* @__PURE__ */ c("div", { children: r }),
|
|
1567
1742
|
a && /* @__PURE__ */ c("div", { children: a })
|
|
1568
1743
|
] });
|
|
1569
|
-
},
|
|
1744
|
+
}, ma = ({
|
|
1570
1745
|
children: e,
|
|
1571
1746
|
className: t,
|
|
1572
1747
|
raw: r = !1,
|
|
1573
1748
|
spacing: a
|
|
1574
1749
|
}) => {
|
|
1575
|
-
const n = g(t,
|
|
1750
|
+
const n = g(t, ra, Ce(a), {
|
|
1576
1751
|
"mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
|
|
1577
1752
|
});
|
|
1578
1753
|
return /* @__PURE__ */ c("main", { className: n, children: e });
|
|
@@ -1590,16 +1765,16 @@ try {
|
|
|
1590
1765
|
});
|
|
1591
1766
|
} catch {
|
|
1592
1767
|
}
|
|
1593
|
-
function
|
|
1594
|
-
return
|
|
1768
|
+
function ha(e) {
|
|
1769
|
+
return Ct(() => e.every((t) => t == null) ? () => {
|
|
1595
1770
|
} : (t) => {
|
|
1596
1771
|
e.forEach((r) => {
|
|
1597
1772
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
1598
1773
|
});
|
|
1599
1774
|
}, e);
|
|
1600
1775
|
}
|
|
1601
|
-
function
|
|
1602
|
-
const t =
|
|
1776
|
+
function pa(e) {
|
|
1777
|
+
const t = Rt();
|
|
1603
1778
|
if (!e)
|
|
1604
1779
|
return t;
|
|
1605
1780
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -1609,7 +1784,7 @@ function ra(e) {
|
|
|
1609
1784
|
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
1610
1785
|
}
|
|
1611
1786
|
}
|
|
1612
|
-
const
|
|
1787
|
+
const wt = "SET_ANNOUNCEMENT", Et = "CLEAR_ANNOUNCEMENT", ga = {
|
|
1613
1788
|
alert: null,
|
|
1614
1789
|
alertdialog: null,
|
|
1615
1790
|
log: "polite",
|
|
@@ -1617,14 +1792,14 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
|
|
|
1617
1792
|
progressbar: null,
|
|
1618
1793
|
status: "polite",
|
|
1619
1794
|
timer: "assertive"
|
|
1620
|
-
},
|
|
1795
|
+
}, fa = (e, t) => {
|
|
1621
1796
|
switch (t == null ? void 0 : t.type) {
|
|
1622
|
-
case
|
|
1797
|
+
case wt:
|
|
1623
1798
|
return {
|
|
1624
1799
|
...e,
|
|
1625
1800
|
announcement: t.payload
|
|
1626
1801
|
};
|
|
1627
|
-
case
|
|
1802
|
+
case Et:
|
|
1628
1803
|
return {
|
|
1629
1804
|
...e,
|
|
1630
1805
|
announcement: null
|
|
@@ -1632,14 +1807,14 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
|
|
|
1632
1807
|
default:
|
|
1633
1808
|
return e;
|
|
1634
1809
|
}
|
|
1635
|
-
},
|
|
1810
|
+
}, ya = ({
|
|
1636
1811
|
onAnnouncementClear: e,
|
|
1637
1812
|
dispatch: t
|
|
1638
1813
|
}) => {
|
|
1639
1814
|
t({
|
|
1640
|
-
type:
|
|
1815
|
+
type: Et
|
|
1641
1816
|
}), typeof e == "function" && e();
|
|
1642
|
-
},
|
|
1817
|
+
}, Qe = ({
|
|
1643
1818
|
children: e,
|
|
1644
1819
|
clearAnnouncementDelay: t,
|
|
1645
1820
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -1647,16 +1822,16 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
|
|
|
1647
1822
|
dispatch: n
|
|
1648
1823
|
}) => {
|
|
1649
1824
|
(r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && n({
|
|
1650
|
-
type:
|
|
1825
|
+
type: wt,
|
|
1651
1826
|
payload: e
|
|
1652
1827
|
}), t && (r.current = setTimeout(
|
|
1653
|
-
() =>
|
|
1828
|
+
() => ya({
|
|
1654
1829
|
onAnnouncementClear: a,
|
|
1655
1830
|
dispatch: n
|
|
1656
1831
|
}),
|
|
1657
1832
|
t
|
|
1658
1833
|
));
|
|
1659
|
-
},
|
|
1834
|
+
}, ba = ({
|
|
1660
1835
|
children: e,
|
|
1661
1836
|
announcementTimeoutRef: t,
|
|
1662
1837
|
announcementDelay: r,
|
|
@@ -1665,13 +1840,13 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
|
|
|
1665
1840
|
onAnnouncementClear: o,
|
|
1666
1841
|
dispatch: s
|
|
1667
1842
|
}) => {
|
|
1668
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
1843
|
+
clearTimeout(t.current), r ? t.current = setTimeout(Qe, r, {
|
|
1669
1844
|
children: e,
|
|
1670
1845
|
clearAnnouncementDelay: a,
|
|
1671
1846
|
clearAnnouncementTimeoutRef: n,
|
|
1672
1847
|
onAnnouncementClear: o,
|
|
1673
1848
|
dispatch: s
|
|
1674
|
-
}) :
|
|
1849
|
+
}) : Qe({
|
|
1675
1850
|
children: e,
|
|
1676
1851
|
clearAnnouncementDelay: a,
|
|
1677
1852
|
clearAnnouncementTimeoutRef: n,
|
|
@@ -1679,7 +1854,7 @@ const bt = "SET_ANNOUNCEMENT", wt = "CLEAR_ANNOUNCEMENT", aa = {
|
|
|
1679
1854
|
dispatch: s
|
|
1680
1855
|
});
|
|
1681
1856
|
};
|
|
1682
|
-
function
|
|
1857
|
+
function vt({
|
|
1683
1858
|
children: e,
|
|
1684
1859
|
className: t,
|
|
1685
1860
|
politeness: r,
|
|
@@ -1690,12 +1865,12 @@ function Et({
|
|
|
1690
1865
|
visible: i,
|
|
1691
1866
|
...l
|
|
1692
1867
|
}) {
|
|
1693
|
-
const d =
|
|
1868
|
+
const d = j(), h = j(), [u, m] = Ot(fa, {
|
|
1694
1869
|
announcement: null
|
|
1695
1870
|
});
|
|
1696
1871
|
let p = r;
|
|
1697
|
-
typeof p > "u" && (p = a ?
|
|
1698
|
-
|
|
1872
|
+
typeof p > "u" && (p = a ? ga[a] : "assertive"), V(() => {
|
|
1873
|
+
ba({
|
|
1699
1874
|
announcementTimeoutRef: d,
|
|
1700
1875
|
announcementDelay: n,
|
|
1701
1876
|
children: e,
|
|
@@ -1725,19 +1900,19 @@ function Et({
|
|
|
1725
1900
|
);
|
|
1726
1901
|
}
|
|
1727
1902
|
/*!
|
|
1728
|
-
@versini/ui-private v1.4.
|
|
1903
|
+
@versini/ui-private v1.4.6
|
|
1729
1904
|
© 2024 gizmette.com
|
|
1730
1905
|
*/
|
|
1731
1906
|
try {
|
|
1732
1907
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
1733
|
-
version: "1.4.
|
|
1734
|
-
buildTime: "07/
|
|
1908
|
+
version: "1.4.6",
|
|
1909
|
+
buildTime: "07/08/2024 04:31 PM EDT",
|
|
1735
1910
|
homepage: "https://github.com/aversini/ui-components",
|
|
1736
1911
|
license: "MIT"
|
|
1737
1912
|
});
|
|
1738
1913
|
} catch {
|
|
1739
1914
|
}
|
|
1740
|
-
const
|
|
1915
|
+
const wa = (e) => {
|
|
1741
1916
|
let t = "";
|
|
1742
1917
|
if (typeof e == "number" || typeof e == "string")
|
|
1743
1918
|
t = "m-" + e;
|
|
@@ -1746,21 +1921,21 @@ const ia = (e) => {
|
|
|
1746
1921
|
(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(" ");
|
|
1747
1922
|
}
|
|
1748
1923
|
return t;
|
|
1749
|
-
},
|
|
1924
|
+
}, kt = "av-text-input", Ea = "av-text-input-wrapper", Te = "av-text-input-helper-text", Bn = "av-text-area", Wn = "av-text-area-wrapper", jn = "av-text-area-helper-text", Gn = "av-text-area__control--right", Vn = "av-toggle", va = ({
|
|
1750
1925
|
mode: e
|
|
1751
1926
|
}) => g({
|
|
1752
1927
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
1753
1928
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
1754
1929
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
1755
1930
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
1756
|
-
}),
|
|
1931
|
+
}), ka = ({
|
|
1757
1932
|
focusMode: e
|
|
1758
1933
|
}) => g("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
1759
1934
|
"focus:outline-focus-dark": e === "dark",
|
|
1760
1935
|
"focus:outline-focus-light": e === "light",
|
|
1761
1936
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1762
1937
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1763
|
-
}),
|
|
1938
|
+
}), Sa = ({
|
|
1764
1939
|
noBorder: e,
|
|
1765
1940
|
error: t
|
|
1766
1941
|
}) => g("border-2", {
|
|
@@ -1768,7 +1943,7 @@ const ia = (e) => {
|
|
|
1768
1943
|
"focus:border-border-dark": !e && t,
|
|
1769
1944
|
"border-border-error-dark": !e && t,
|
|
1770
1945
|
"border-transparent": e
|
|
1771
|
-
}),
|
|
1946
|
+
}), Ta = ({
|
|
1772
1947
|
disabled: e,
|
|
1773
1948
|
raw: t,
|
|
1774
1949
|
error: r,
|
|
@@ -1792,7 +1967,7 @@ const ia = (e) => {
|
|
|
1792
1967
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
|
|
1793
1968
|
"text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
|
|
1794
1969
|
});
|
|
1795
|
-
},
|
|
1970
|
+
}, Aa = ({
|
|
1796
1971
|
error: e,
|
|
1797
1972
|
raw: t,
|
|
1798
1973
|
mode: r,
|
|
@@ -1819,7 +1994,7 @@ const ia = (e) => {
|
|
|
1819
1994
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
1820
1995
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
1821
1996
|
});
|
|
1822
|
-
},
|
|
1997
|
+
}, Ia = ({
|
|
1823
1998
|
className: e,
|
|
1824
1999
|
inputClassName: t,
|
|
1825
2000
|
raw: r,
|
|
@@ -1832,25 +2007,25 @@ const ia = (e) => {
|
|
|
1832
2007
|
}) => {
|
|
1833
2008
|
const d = r ? e : g(
|
|
1834
2009
|
"relative flex w-full flex-col justify-center",
|
|
1835
|
-
|
|
2010
|
+
Ea,
|
|
1836
2011
|
e,
|
|
1837
|
-
|
|
2012
|
+
wa(s)
|
|
1838
2013
|
), h = r ? g(t) : g(
|
|
1839
|
-
|
|
2014
|
+
kt,
|
|
1840
2015
|
t,
|
|
1841
2016
|
"h-12 rounded-md px-4 text-base",
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
2017
|
+
va({ mode: i }),
|
|
2018
|
+
ka({ focusMode: l }),
|
|
2019
|
+
Sa({ noBorder: n, error: o }),
|
|
1845
2020
|
{
|
|
1846
2021
|
"disabled:cursor-not-allowed disabled:opacity-50": a
|
|
1847
2022
|
}
|
|
1848
|
-
), u = r ? void 0 : "sr-only", m =
|
|
2023
|
+
), u = r ? void 0 : "sr-only", m = Ta({
|
|
1849
2024
|
disabled: a,
|
|
1850
2025
|
raw: r,
|
|
1851
2026
|
error: o,
|
|
1852
2027
|
mode: i
|
|
1853
|
-
}), p =
|
|
2028
|
+
}), p = Aa({
|
|
1854
2029
|
error: o,
|
|
1855
2030
|
raw: r,
|
|
1856
2031
|
mode: i,
|
|
@@ -1864,7 +2039,7 @@ const ia = (e) => {
|
|
|
1864
2039
|
helperText: p,
|
|
1865
2040
|
rightElement: r ? void 0 : "absolute right-3"
|
|
1866
2041
|
};
|
|
1867
|
-
},
|
|
2042
|
+
}, Oe = B.forwardRef(
|
|
1868
2043
|
({
|
|
1869
2044
|
id: e,
|
|
1870
2045
|
name: t,
|
|
@@ -1881,11 +2056,11 @@ const ia = (e) => {
|
|
|
1881
2056
|
labelHidden: m = !1,
|
|
1882
2057
|
type: p = "text",
|
|
1883
2058
|
helperText: f = "",
|
|
1884
|
-
rightElement:
|
|
2059
|
+
rightElement: E,
|
|
1885
2060
|
spacing: x,
|
|
1886
|
-
...
|
|
1887
|
-
},
|
|
1888
|
-
const
|
|
2061
|
+
...D
|
|
2062
|
+
}, A) => {
|
|
2063
|
+
const w = j(null), [M, C] = H(0), N = pa({ id: e, prefix: `${kt}-` }), J = `${t} error, ${f}`, R = Ia({
|
|
1889
2064
|
className: o,
|
|
1890
2065
|
inputClassName: s,
|
|
1891
2066
|
error: a,
|
|
@@ -1896,8 +2071,8 @@ const ia = (e) => {
|
|
|
1896
2071
|
spacing: x,
|
|
1897
2072
|
mode: i
|
|
1898
2073
|
});
|
|
1899
|
-
return
|
|
1900
|
-
|
|
2074
|
+
return Dt(() => {
|
|
2075
|
+
w.current && C(w.current.offsetWidth + 18 + 10);
|
|
1901
2076
|
}, []), /* @__PURE__ */ T("div", { className: R.wrapper, children: [
|
|
1902
2077
|
/* @__PURE__ */ c(
|
|
1903
2078
|
"label",
|
|
@@ -1911,7 +2086,7 @@ const ia = (e) => {
|
|
|
1911
2086
|
/* @__PURE__ */ c(
|
|
1912
2087
|
"input",
|
|
1913
2088
|
{
|
|
1914
|
-
ref:
|
|
2089
|
+
ref: A,
|
|
1915
2090
|
id: N,
|
|
1916
2091
|
name: t,
|
|
1917
2092
|
type: p,
|
|
@@ -1920,8 +2095,8 @@ const ia = (e) => {
|
|
|
1920
2095
|
className: R.input,
|
|
1921
2096
|
...f && { "aria-describedby": `${N}-helper` },
|
|
1922
2097
|
...a && { "aria-invalid": "true" },
|
|
1923
|
-
...
|
|
1924
|
-
...
|
|
2098
|
+
...E && !n && { style: { paddingRight: M } },
|
|
2099
|
+
...D
|
|
1925
2100
|
}
|
|
1926
2101
|
),
|
|
1927
2102
|
!n && !m && /* @__PURE__ */ c(
|
|
@@ -1941,20 +2116,20 @@ const ia = (e) => {
|
|
|
1941
2116
|
children: f
|
|
1942
2117
|
}
|
|
1943
2118
|
),
|
|
1944
|
-
|
|
2119
|
+
E && /* @__PURE__ */ c(
|
|
1945
2120
|
"div",
|
|
1946
2121
|
{
|
|
1947
|
-
ref:
|
|
2122
|
+
ref: w,
|
|
1948
2123
|
className: R.rightElement,
|
|
1949
|
-
children:
|
|
2124
|
+
children: E
|
|
1950
2125
|
}
|
|
1951
2126
|
),
|
|
1952
|
-
a && f && /* @__PURE__ */ c(
|
|
2127
|
+
a && f && /* @__PURE__ */ c(vt, { politeness: "polite", clearAnnouncementDelay: 500, children: J })
|
|
1953
2128
|
] });
|
|
1954
2129
|
}
|
|
1955
2130
|
);
|
|
1956
|
-
|
|
1957
|
-
const
|
|
2131
|
+
Oe.displayName = "TextInput";
|
|
2132
|
+
const _a = 500, xa = 5e3, Na = 2e4, St = B.forwardRef(
|
|
1958
2133
|
({
|
|
1959
2134
|
name: e,
|
|
1960
2135
|
disabled: t,
|
|
@@ -1969,43 +2144,43 @@ const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
|
|
|
1969
2144
|
spacing: h,
|
|
1970
2145
|
...u
|
|
1971
2146
|
}, m) => {
|
|
1972
|
-
const [p, f] =
|
|
2147
|
+
const [p, f] = H(!0), [E, x] = H({
|
|
1973
2148
|
message: null,
|
|
1974
2149
|
politeness: null
|
|
1975
|
-
}),
|
|
1976
|
-
clearTimeout(
|
|
1977
|
-
|
|
1978
|
-
announcementTimeout:
|
|
2150
|
+
}), D = j(!0), A = j(), w = j(null), M = ha([m, w]), C = p ? "Show" : "Hide", N = () => {
|
|
2151
|
+
clearTimeout(A.current), D.current || (A.current = window.setTimeout(() => {
|
|
2152
|
+
D.current = !0, f(!0), x({
|
|
2153
|
+
announcementTimeout: xa,
|
|
1979
2154
|
politeness: "polite",
|
|
1980
2155
|
message: `${r} hiding characters`
|
|
1981
2156
|
}), n && n(!0);
|
|
1982
|
-
},
|
|
1983
|
-
},
|
|
2157
|
+
}, Na));
|
|
2158
|
+
}, J = (b) => {
|
|
1984
2159
|
b.preventDefault();
|
|
1985
|
-
const
|
|
1986
|
-
|
|
1987
|
-
announcementTimeout:
|
|
2160
|
+
const I = !D.current;
|
|
2161
|
+
D.current = I, N(), f(I), x({
|
|
2162
|
+
announcementTimeout: _a,
|
|
1988
2163
|
politeness: "assertive",
|
|
1989
|
-
message:
|
|
1990
|
-
}), n && n(
|
|
2164
|
+
message: I ? "Characters hidden" : "Characters showing"
|
|
2165
|
+
}), n && n(I);
|
|
1991
2166
|
}, R = (b) => {
|
|
1992
|
-
var
|
|
1993
|
-
const { relatedTarget:
|
|
1994
|
-
|
|
2167
|
+
var I;
|
|
2168
|
+
const { relatedTarget: W } = b, $ = (I = w.current) == null ? void 0 : I.parentElement;
|
|
2169
|
+
$ != null && $.contains(W) || l && l();
|
|
1995
2170
|
}, fe = (b) => {
|
|
1996
2171
|
N(), s && s(b), R(b);
|
|
1997
2172
|
}, y = (b) => {
|
|
1998
2173
|
N(), i && i(b);
|
|
1999
|
-
},
|
|
2174
|
+
}, O = (b) => {
|
|
2000
2175
|
N(), o && o(b);
|
|
2001
2176
|
};
|
|
2002
|
-
return
|
|
2003
|
-
clearTimeout(
|
|
2177
|
+
return V(() => () => {
|
|
2178
|
+
clearTimeout(A.current);
|
|
2004
2179
|
}, []), /* @__PURE__ */ T(q, { children: [
|
|
2005
2180
|
/* @__PURE__ */ c(
|
|
2006
|
-
|
|
2181
|
+
Oe,
|
|
2007
2182
|
{
|
|
2008
|
-
ref:
|
|
2183
|
+
ref: M,
|
|
2009
2184
|
name: e,
|
|
2010
2185
|
label: r,
|
|
2011
2186
|
labelHidden: a,
|
|
@@ -2014,11 +2189,11 @@ const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
|
|
|
2014
2189
|
spacing: h,
|
|
2015
2190
|
onBlur: fe,
|
|
2016
2191
|
onFocus: y,
|
|
2017
|
-
onChange:
|
|
2018
|
-
rightElement:
|
|
2192
|
+
onChange: O,
|
|
2193
|
+
rightElement: B.cloneElement(d, {
|
|
2019
2194
|
ref: m,
|
|
2020
2195
|
label: C,
|
|
2021
|
-
onClick:
|
|
2196
|
+
onClick: J,
|
|
2022
2197
|
onBlur: R,
|
|
2023
2198
|
disabled: t
|
|
2024
2199
|
}),
|
|
@@ -2026,32 +2201,32 @@ const ga = 500, fa = 5e3, ya = 2e4, kt = K.forwardRef(
|
|
|
2026
2201
|
}
|
|
2027
2202
|
),
|
|
2028
2203
|
/* @__PURE__ */ c(
|
|
2029
|
-
|
|
2204
|
+
vt,
|
|
2030
2205
|
{
|
|
2031
2206
|
role: "status",
|
|
2032
|
-
politeness:
|
|
2033
|
-
clearAnnouncementDelay:
|
|
2034
|
-
children:
|
|
2207
|
+
politeness: E.politeness,
|
|
2208
|
+
clearAnnouncementDelay: E.announcementTimeout,
|
|
2209
|
+
children: E.message
|
|
2035
2210
|
}
|
|
2036
2211
|
)
|
|
2037
2212
|
] });
|
|
2038
2213
|
}
|
|
2039
2214
|
);
|
|
2040
|
-
|
|
2215
|
+
St.displayName = "TextInputMask";
|
|
2041
2216
|
/*!
|
|
2042
|
-
@versini/ui-form v1.3.
|
|
2217
|
+
@versini/ui-form v1.3.6
|
|
2043
2218
|
© 2024 gizmette.com
|
|
2044
2219
|
*/
|
|
2045
2220
|
try {
|
|
2046
2221
|
window.__VERSINI_UI_FORM__ || (window.__VERSINI_UI_FORM__ = {
|
|
2047
|
-
version: "1.3.
|
|
2048
|
-
buildTime: "07/
|
|
2222
|
+
version: "1.3.6",
|
|
2223
|
+
buildTime: "07/08/2024 04:31 PM EDT",
|
|
2049
2224
|
homepage: "https://github.com/aversini/ui-components",
|
|
2050
2225
|
license: "MIT"
|
|
2051
2226
|
});
|
|
2052
2227
|
} catch {
|
|
2053
2228
|
}
|
|
2054
|
-
const
|
|
2229
|
+
const Ca = (e) => {
|
|
2055
2230
|
let t = "";
|
|
2056
2231
|
if (typeof e == "number" || typeof e == "string")
|
|
2057
2232
|
t = "m-" + e;
|
|
@@ -2060,7 +2235,7 @@ const ba = (e) => {
|
|
|
2060
2235
|
(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(" ");
|
|
2061
2236
|
}
|
|
2062
2237
|
return t;
|
|
2063
|
-
},
|
|
2238
|
+
}, De = ({
|
|
2064
2239
|
children: e,
|
|
2065
2240
|
fill: t,
|
|
2066
2241
|
viewBox: r,
|
|
@@ -2072,7 +2247,7 @@ const ba = (e) => {
|
|
|
2072
2247
|
semantic: l = !1,
|
|
2073
2248
|
...d
|
|
2074
2249
|
}) => {
|
|
2075
|
-
const h =
|
|
2250
|
+
const h = Ca(s), u = g(
|
|
2076
2251
|
h,
|
|
2077
2252
|
a || o
|
|
2078
2253
|
);
|
|
@@ -2107,13 +2282,13 @@ try {
|
|
|
2107
2282
|
});
|
|
2108
2283
|
} catch {
|
|
2109
2284
|
}
|
|
2110
|
-
const
|
|
2285
|
+
const Ra = ({
|
|
2111
2286
|
className: e,
|
|
2112
2287
|
viewBox: t,
|
|
2113
2288
|
spacing: r,
|
|
2114
2289
|
...a
|
|
2115
2290
|
}) => /* @__PURE__ */ c(
|
|
2116
|
-
|
|
2291
|
+
De,
|
|
2117
2292
|
{
|
|
2118
2293
|
defaultViewBox: "0 0 1200 500",
|
|
2119
2294
|
defaultClassName: "w-full",
|
|
@@ -2132,7 +2307,7 @@ const wa = ({
|
|
|
2132
2307
|
}
|
|
2133
2308
|
) })
|
|
2134
2309
|
}
|
|
2135
|
-
),
|
|
2310
|
+
), Oa = ({
|
|
2136
2311
|
className: e,
|
|
2137
2312
|
viewBox: t,
|
|
2138
2313
|
spacing: r,
|
|
@@ -2140,7 +2315,7 @@ const wa = ({
|
|
|
2140
2315
|
monotone: n,
|
|
2141
2316
|
...o
|
|
2142
2317
|
}) => /* @__PURE__ */ T(
|
|
2143
|
-
|
|
2318
|
+
De,
|
|
2144
2319
|
{
|
|
2145
2320
|
defaultViewBox: "0 0 640 512",
|
|
2146
2321
|
defaultClassName: "size-5",
|
|
@@ -2160,7 +2335,7 @@ const wa = ({
|
|
|
2160
2335
|
/* @__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" })
|
|
2161
2336
|
]
|
|
2162
2337
|
}
|
|
2163
|
-
),
|
|
2338
|
+
), Da = ({
|
|
2164
2339
|
className: e,
|
|
2165
2340
|
viewBox: t,
|
|
2166
2341
|
spacing: r,
|
|
@@ -2168,7 +2343,7 @@ const wa = ({
|
|
|
2168
2343
|
monotone: n,
|
|
2169
2344
|
...o
|
|
2170
2345
|
}) => /* @__PURE__ */ T(
|
|
2171
|
-
|
|
2346
|
+
De,
|
|
2172
2347
|
{
|
|
2173
2348
|
defaultViewBox: "0 0 576 512",
|
|
2174
2349
|
defaultClassName: "size-5",
|
|
@@ -2202,7 +2377,7 @@ try {
|
|
|
2202
2377
|
});
|
|
2203
2378
|
} catch {
|
|
2204
2379
|
}
|
|
2205
|
-
const
|
|
2380
|
+
const Ma = (e) => {
|
|
2206
2381
|
let t = "";
|
|
2207
2382
|
if (typeof e == "number" || typeof e == "string")
|
|
2208
2383
|
t = "m-" + e;
|
|
@@ -2211,10 +2386,10 @@ const ka = (e) => {
|
|
|
2211
2386
|
(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(" ");
|
|
2212
2387
|
}
|
|
2213
2388
|
return t;
|
|
2214
|
-
},
|
|
2389
|
+
}, La = "av-flexgrid", se = "av-flexgrid-item", ue = 0.25, Tt = B.createContext({
|
|
2215
2390
|
columnGap: 0,
|
|
2216
2391
|
rowGap: 0
|
|
2217
|
-
}),
|
|
2392
|
+
}), Pa = ({
|
|
2218
2393
|
children: e,
|
|
2219
2394
|
className: t,
|
|
2220
2395
|
columnGap: r = 1,
|
|
@@ -2241,11 +2416,11 @@ const ka = (e) => {
|
|
|
2241
2416
|
marginLeft: r * -1 * ue + "rem",
|
|
2242
2417
|
marginTop: a * -1 * ue + "rem"
|
|
2243
2418
|
}, m = g(
|
|
2244
|
-
|
|
2419
|
+
La,
|
|
2245
2420
|
t,
|
|
2246
2421
|
"box-border flex flex-wrap"
|
|
2247
|
-
), p = { columnGap: r, rowGap: a }, f = d ? "div" :
|
|
2248
|
-
return /* @__PURE__ */ c(f, { ...d ? { className:
|
|
2422
|
+
), p = { columnGap: r, rowGap: a }, f = d ? "div" : B.Fragment;
|
|
2423
|
+
return /* @__PURE__ */ c(f, { ...d ? { className: Ma(d) } : {}, children: /* @__PURE__ */ c("div", { className: m, style: u, ...h, children: /* @__PURE__ */ c(Tt.Provider, { value: p, children: e }) }) });
|
|
2249
2424
|
}, Ae = (e, t) => g({
|
|
2250
2425
|
"basis-1/12": e === 1 && !t,
|
|
2251
2426
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
@@ -2319,7 +2494,7 @@ const ka = (e) => {
|
|
|
2319
2494
|
"lg:basis-full": e === 12 && t === "lg",
|
|
2320
2495
|
"xl:basis-full": e === 12 && t === "xl",
|
|
2321
2496
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
2322
|
-
}),
|
|
2497
|
+
}), $a = ({
|
|
2323
2498
|
className: e,
|
|
2324
2499
|
span: t
|
|
2325
2500
|
}) => {
|
|
@@ -2348,10 +2523,10 @@ const ka = (e) => {
|
|
|
2348
2523
|
span: r,
|
|
2349
2524
|
...a
|
|
2350
2525
|
}) => {
|
|
2351
|
-
const { columnGap: n, rowGap: o } = Xe(
|
|
2526
|
+
const { columnGap: n, rowGap: o } = Xe(Tt), s = {
|
|
2352
2527
|
paddingLeft: n * ue + "rem",
|
|
2353
2528
|
paddingTop: o * ue + "rem"
|
|
2354
|
-
}, i =
|
|
2529
|
+
}, i = $a({
|
|
2355
2530
|
className: t,
|
|
2356
2531
|
span: r
|
|
2357
2532
|
});
|
|
@@ -2370,7 +2545,7 @@ try {
|
|
|
2370
2545
|
});
|
|
2371
2546
|
} catch {
|
|
2372
2547
|
}
|
|
2373
|
-
const
|
|
2548
|
+
const Ua = "ASK! ME! ANYTHING!", At = "Sassy Saint", Ha = "gizmette.com", Ka = "Log in", Jn = "Log out", Ba = "Password", Wa = "Powered by OpenAI", Fn = "Send", zn = "Profile", Yn = "Statistics", qn = "Chat history", Qn = "About", Xn = "Type your question here", Zn = "Clear chat", eo = "Cancel chat", to = "N/A", ro = {
|
|
2374
2549
|
PREFERENCES: {
|
|
2375
2550
|
TITLE: "User preferences",
|
|
2376
2551
|
NAME: "Name",
|
|
@@ -2402,212 +2577,41 @@ const _a = "ASK! ME! ANYTHING!", Tt = "Sassy Saint", Ia = "gizmette.com", xa = "
|
|
|
2402
2577
|
ENGINE: "OpenAI model",
|
|
2403
2578
|
PLUGIN: "Plugin"
|
|
2404
2579
|
}
|
|
2405
|
-
},
|
|
2406
|
-
function Ra(e) {
|
|
2407
|
-
return {
|
|
2408
|
-
days: Math.trunc(e / 864e5),
|
|
2409
|
-
hours: Math.trunc(e / 36e5 % 24),
|
|
2410
|
-
minutes: Math.trunc(e / 6e4 % 60),
|
|
2411
|
-
seconds: Math.trunc(e / 1e3 % 60),
|
|
2412
|
-
milliseconds: Math.trunc(e % 1e3),
|
|
2413
|
-
microseconds: Math.trunc(Qe(e * 1e3) % 1e3),
|
|
2414
|
-
nanoseconds: Math.trunc(Qe(e * 1e6) % 1e3)
|
|
2415
|
-
};
|
|
2416
|
-
}
|
|
2417
|
-
function Oa(e) {
|
|
2418
|
-
return {
|
|
2419
|
-
days: e / 86400000n,
|
|
2420
|
-
hours: e / 3600000n % 24n,
|
|
2421
|
-
minutes: e / 60000n % 60n,
|
|
2422
|
-
seconds: e / 1000n % 60n,
|
|
2423
|
-
milliseconds: e % 1000n,
|
|
2424
|
-
microseconds: 0n,
|
|
2425
|
-
nanoseconds: 0n
|
|
2426
|
-
};
|
|
2427
|
-
}
|
|
2428
|
-
function Da(e) {
|
|
2429
|
-
switch (typeof e) {
|
|
2430
|
-
case "number": {
|
|
2431
|
-
if (Number.isFinite(e))
|
|
2432
|
-
return Ra(e);
|
|
2433
|
-
break;
|
|
2434
|
-
}
|
|
2435
|
-
case "bigint":
|
|
2436
|
-
return Oa(e);
|
|
2437
|
-
}
|
|
2438
|
-
throw new TypeError("Expected a finite number or bigint");
|
|
2439
|
-
}
|
|
2440
|
-
const $a = (e) => e === 0 || e === 0n, Ma = (e, t) => t === 1 || t === 1n ? e : `${e}s`, La = 1e-7, Pa = 24n * 60n * 60n * 1000n;
|
|
2441
|
-
function Ua(e, t) {
|
|
2442
|
-
const r = typeof e == "bigint";
|
|
2443
|
-
if (!r && !Number.isFinite(e))
|
|
2444
|
-
throw new TypeError("Expected a finite number or bigint");
|
|
2445
|
-
t = { ...t }, 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);
|
|
2446
|
-
let a = [];
|
|
2447
|
-
const n = (d, h) => {
|
|
2448
|
-
const u = Math.floor(d * 10 ** h + La);
|
|
2449
|
-
return (Math.round(u) / 10 ** h).toFixed(h);
|
|
2450
|
-
}, o = (d, h, u, m) => {
|
|
2451
|
-
if (!((a.length === 0 || !t.colonNotation) && $a(d) && !(t.colonNotation && u === "m"))) {
|
|
2452
|
-
if (m = m ?? String(d), t.colonNotation) {
|
|
2453
|
-
const p = m.includes(".") ? m.split(".")[0].length : m.length, f = a.length > 0 ? 2 : 1;
|
|
2454
|
-
m = "0".repeat(Math.max(0, f - p)) + m;
|
|
2455
|
-
} else
|
|
2456
|
-
m += t.verbose ? " " + Ma(h, d) : u;
|
|
2457
|
-
a.push(m);
|
|
2458
|
-
}
|
|
2459
|
-
}, s = Da(e), i = BigInt(s.days);
|
|
2460
|
-
if (o(i / 365n, "year", "y"), o(i % 365n, "day", "d"), o(Number(s.hours), "hour", "h"), o(Number(s.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
|
|
2461
|
-
const d = Number(s.seconds), h = Number(s.milliseconds), u = Number(s.microseconds), m = Number(s.nanoseconds);
|
|
2462
|
-
if (o(d, "second", "s"), t.formatSubMilliseconds)
|
|
2463
|
-
o(h, "millisecond", "ms"), o(u, "microsecond", "µs"), o(m, "nanosecond", "ns");
|
|
2464
|
-
else {
|
|
2465
|
-
const p = h + u / 1e3 + m / 1e6, f = typeof t.millisecondsDecimalDigits == "number" ? t.millisecondsDecimalDigits : 0, w = p >= 1 ? Math.round(p) : Math.ceil(p), x = f ? p.toFixed(f) : w;
|
|
2466
|
-
o(
|
|
2467
|
-
Number.parseFloat(x),
|
|
2468
|
-
"millisecond",
|
|
2469
|
-
"ms",
|
|
2470
|
-
x
|
|
2471
|
-
);
|
|
2472
|
-
}
|
|
2473
|
-
} else {
|
|
2474
|
-
const d = (r ? Number(e % Pa) : e) / 1e3 % 60, h = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, u = n(d, h), m = t.keepDecimalsOnWholeSeconds ? u : u.replace(/\.0+$/, "");
|
|
2475
|
-
o(Number.parseFloat(m), "second", "s", m);
|
|
2476
|
-
}
|
|
2477
|
-
if (a.length === 0)
|
|
2478
|
-
return "0" + (t.verbose ? " milliseconds" : "ms");
|
|
2479
|
-
const l = t.colonNotation ? ":" : " ";
|
|
2480
|
-
return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), a.join(l);
|
|
2481
|
-
}
|
|
2482
|
-
const Ha = process.env.NODE_ENV === "production", At = !Ha, Vn = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, _t = (e, t) => {
|
|
2483
|
-
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;
|
|
2484
|
-
return {
|
|
2485
|
-
dir: r,
|
|
2486
|
-
deg: a,
|
|
2487
|
-
min: n,
|
|
2488
|
-
sec: o
|
|
2489
|
-
};
|
|
2490
|
-
}, Jn = (e) => {
|
|
2491
|
-
if (!e && e !== 0)
|
|
2492
|
-
return "N/A";
|
|
2493
|
-
const t = _t(e, !1);
|
|
2494
|
-
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
2495
|
-
}, Fn = (e) => {
|
|
2496
|
-
if (!e && e !== 0)
|
|
2497
|
-
return "N/A";
|
|
2498
|
-
const t = _t(e, !0);
|
|
2499
|
-
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
2500
|
-
}, zn = async () => {
|
|
2501
|
-
const e = {
|
|
2502
|
-
/**
|
|
2503
|
-
* A boolean value that indicates the application would
|
|
2504
|
-
* like to receive the best possible results. If true
|
|
2505
|
-
* and if the device is able to provide a more accurate
|
|
2506
|
-
* position, it will do so. Note that this can result in
|
|
2507
|
-
* slower response times or increased power consumption
|
|
2508
|
-
* (with a GPS chip on a mobile device for example). On
|
|
2509
|
-
* the other hand, if false, the device can take the
|
|
2510
|
-
* liberty to save resources by responding more quickly
|
|
2511
|
-
* and/or using less power. Default: false.
|
|
2512
|
-
*/
|
|
2513
|
-
enableHighAccuracy: !1,
|
|
2514
|
-
/**
|
|
2515
|
-
* A positive long value representing the maximum length
|
|
2516
|
-
* of time (in milliseconds) the device is allowed to
|
|
2517
|
-
* take in order to return a position. The default value
|
|
2518
|
-
* is Infinity, meaning that getCurrentPosition() won't
|
|
2519
|
-
* return until the position is available.
|
|
2520
|
-
*/
|
|
2521
|
-
timeout: 1e4,
|
|
2522
|
-
/**
|
|
2523
|
-
* A positive long value indicating the maximum age in
|
|
2524
|
-
* milliseconds of a possible cached position that is
|
|
2525
|
-
* acceptable to return. If set to 0, it means that the
|
|
2526
|
-
* device cannot use a cached position and must attempt
|
|
2527
|
-
* to retrieve the real current position. If set to
|
|
2528
|
-
* Infinity the device must return a cached position
|
|
2529
|
-
* regardless of its age. Default: 0.
|
|
2530
|
-
*/
|
|
2531
|
-
maximumAge: 6e4
|
|
2532
|
-
};
|
|
2533
|
-
return new Promise((t, r) => {
|
|
2534
|
-
var a;
|
|
2535
|
-
(a = navigator == null ? void 0 : navigator.geolocation) == null || a.getCurrentPosition(
|
|
2536
|
-
(n) => {
|
|
2537
|
-
t({
|
|
2538
|
-
latitude: n.coords.latitude,
|
|
2539
|
-
longitude: n.coords.longitude,
|
|
2540
|
-
accuracy: n.coords.accuracy
|
|
2541
|
-
});
|
|
2542
|
-
},
|
|
2543
|
-
(n) => {
|
|
2544
|
-
r(n);
|
|
2545
|
-
},
|
|
2546
|
-
e
|
|
2547
|
-
);
|
|
2548
|
-
});
|
|
2549
|
-
}, Yn = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ T("div", { className: "flex items-center justify-between", children: [
|
|
2550
|
-
/* @__PURE__ */ c("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
2551
|
-
/* @__PURE__ */ c("dd", { className: "inline-block", children: t[r] })
|
|
2552
|
-
] }) }, `${e}-${r}`)) : null;
|
|
2553
|
-
function qn({
|
|
2554
|
-
data: e,
|
|
2555
|
-
formatter: t = (r) => r
|
|
2556
|
-
}) {
|
|
2557
|
-
const r = e.filter(
|
|
2558
|
-
(n) => typeof n == "number" && n > 0
|
|
2559
|
-
), a = r.reduce(
|
|
2560
|
-
(n, o) => (n || 0) + (o || 0),
|
|
2561
|
-
0
|
|
2562
|
-
);
|
|
2563
|
-
return t(a ? a / r.length : 0);
|
|
2564
|
-
}
|
|
2565
|
-
const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Xn = new Intl.NumberFormat("en", {
|
|
2566
|
-
style: "decimal",
|
|
2567
|
-
signDisplay: "never",
|
|
2568
|
-
minimumFractionDigits: 0,
|
|
2569
|
-
maximumFractionDigits: 0
|
|
2570
|
-
}), Zn = (e) => Ua(e, {
|
|
2571
|
-
secondsDecimalDigits: 2,
|
|
2572
|
-
unitCount: 2
|
|
2573
|
-
}), Ka = (e) => g(
|
|
2574
|
-
"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",
|
|
2575
|
-
e || At ? "pt-4" : "pt-10"
|
|
2576
|
-
), eo = (e, t) => t === 1 ? e : `${e}s`, Ba = ({
|
|
2580
|
+
}, ja = ({
|
|
2577
2581
|
serverStats: e
|
|
2578
2582
|
}) => /* @__PURE__ */ c(
|
|
2579
|
-
|
|
2583
|
+
ua,
|
|
2580
2584
|
{
|
|
2581
2585
|
mode: "light",
|
|
2582
2586
|
row1: /* @__PURE__ */ T("div", { children: [
|
|
2583
|
-
|
|
2587
|
+
At,
|
|
2584
2588
|
" v",
|
|
2585
|
-
"3.
|
|
2589
|
+
"3.2.2",
|
|
2586
2590
|
" - ",
|
|
2587
|
-
|
|
2588
|
-
|
|
2591
|
+
Wa,
|
|
2592
|
+
Ne && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
|
|
2589
2593
|
] }),
|
|
2590
2594
|
row2: /* @__PURE__ */ T("div", { children: [
|
|
2591
2595
|
"© ",
|
|
2592
2596
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
2593
2597
|
" ",
|
|
2594
|
-
|
|
2598
|
+
Ha
|
|
2595
2599
|
] })
|
|
2596
2600
|
}
|
|
2597
|
-
),
|
|
2601
|
+
), Ga = Ze(() => import("./LazyHeader.DioQirr-.js")), Va = () => {
|
|
2598
2602
|
const { isAuthenticated: e } = xe();
|
|
2599
2603
|
return /* @__PURE__ */ T(q, { children: [
|
|
2600
|
-
e && /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(
|
|
2604
|
+
e && /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Ga, {}) }),
|
|
2601
2605
|
/* @__PURE__ */ T("div", { className: "flex items-center justify-center", children: [
|
|
2602
|
-
/* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(
|
|
2606
|
+
/* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(Ra, {}) }),
|
|
2603
2607
|
/* @__PURE__ */ T("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
2604
|
-
/* @__PURE__ */ c("h1", { children:
|
|
2605
|
-
/* @__PURE__ */ c("h2", { children:
|
|
2608
|
+
/* @__PURE__ */ c("h1", { children: At }),
|
|
2609
|
+
/* @__PURE__ */ c("h2", { children: Ua })
|
|
2606
2610
|
] })
|
|
2607
2611
|
] })
|
|
2608
2612
|
] });
|
|
2609
|
-
},
|
|
2610
|
-
const { login: e, logoutReason: t } = xe(), [r, a] =
|
|
2613
|
+
}, Ja = () => {
|
|
2614
|
+
const { login: e, logoutReason: t } = xe(), [r, a] = H(""), [n, o] = H(""), [s, i] = H(!0), [l, d] = H({
|
|
2611
2615
|
username: "",
|
|
2612
2616
|
password: ""
|
|
2613
2617
|
}), h = async (u) => {
|
|
@@ -2617,21 +2621,21 @@ const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2617
2621
|
Q.CODE
|
|
2618
2622
|
) || (o(""), a("Invalid username or password"));
|
|
2619
2623
|
};
|
|
2620
|
-
return
|
|
2624
|
+
return V(() => {
|
|
2621
2625
|
var u;
|
|
2622
2626
|
(u = document.getElementById("logo")) == null || u.classList.add("fadeOut"), setTimeout(() => {
|
|
2623
2627
|
var m;
|
|
2624
2628
|
(m = document.getElementById("root")) == null || m.classList.replace("app-hidden", "fadeIn");
|
|
2625
2629
|
}, 500);
|
|
2626
|
-
}),
|
|
2630
|
+
}), V(() => {
|
|
2627
2631
|
t && o(t);
|
|
2628
2632
|
}, [t]), /* @__PURE__ */ T(q, { children: [
|
|
2629
|
-
/* @__PURE__ */ T(
|
|
2630
|
-
/* @__PURE__ */ c("div", { className:
|
|
2631
|
-
/* @__PURE__ */ c("form", { className: "mx-auto mt-5", onSubmit: h, children: /* @__PURE__ */ T(
|
|
2633
|
+
/* @__PURE__ */ T(ma, { children: [
|
|
2634
|
+
/* @__PURE__ */ c("div", { className: ea(), children: /* @__PURE__ */ c(Va, {}) }),
|
|
2635
|
+
/* @__PURE__ */ c("form", { className: "mx-auto mt-5", onSubmit: h, children: /* @__PURE__ */ T(Pa, { rowGap: 7, width: "350px", children: [
|
|
2632
2636
|
/* @__PURE__ */ c(ie, { span: 12, children: n && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: n }) }),
|
|
2633
2637
|
/* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
|
|
2634
|
-
|
|
2638
|
+
Oe,
|
|
2635
2639
|
{
|
|
2636
2640
|
required: !0,
|
|
2637
2641
|
autoCapitalize: "off",
|
|
@@ -2651,7 +2655,7 @@ const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2651
2655
|
}
|
|
2652
2656
|
) }),
|
|
2653
2657
|
/* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
|
|
2654
|
-
|
|
2658
|
+
St,
|
|
2655
2659
|
{
|
|
2656
2660
|
required: !0,
|
|
2657
2661
|
autoCapitalize: "off",
|
|
@@ -2660,8 +2664,8 @@ const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2660
2664
|
mode: "dark",
|
|
2661
2665
|
focusMode: "light",
|
|
2662
2666
|
name: "password",
|
|
2663
|
-
label:
|
|
2664
|
-
rightElement: /* @__PURE__ */ c(
|
|
2667
|
+
label: Ba,
|
|
2668
|
+
rightElement: /* @__PURE__ */ c(yt, { focusMode: "light", children: s ? /* @__PURE__ */ c(Da, {}) : /* @__PURE__ */ c(Oa, {}) }),
|
|
2665
2669
|
onMaskChange: i,
|
|
2666
2670
|
onChange: (u) => {
|
|
2667
2671
|
d({
|
|
@@ -2674,98 +2678,100 @@ const Qn = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
2674
2678
|
}
|
|
2675
2679
|
) }),
|
|
2676
2680
|
/* @__PURE__ */ c(ie, { span: 12, children: /* @__PURE__ */ c(
|
|
2677
|
-
|
|
2681
|
+
bt,
|
|
2678
2682
|
{
|
|
2679
2683
|
focusMode: "light",
|
|
2680
2684
|
fullWidth: !0,
|
|
2681
2685
|
noBorder: !0,
|
|
2682
2686
|
type: "submit",
|
|
2683
2687
|
className: "mb-4 mt-6",
|
|
2684
|
-
children:
|
|
2688
|
+
children: Ka
|
|
2685
2689
|
}
|
|
2686
2690
|
) })
|
|
2687
2691
|
] }) })
|
|
2688
2692
|
] }),
|
|
2689
|
-
/* @__PURE__ */ c(
|
|
2693
|
+
/* @__PURE__ */ c(ja, {})
|
|
2690
2694
|
] });
|
|
2691
|
-
},
|
|
2695
|
+
}, Fa = Ze(() => import("./App.llFW8bC9.js").then((e) => e.App)), za = ({ isComponent: e }) => {
|
|
2692
2696
|
const { isAuthenticated: t } = xe();
|
|
2693
|
-
return t ? /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(
|
|
2694
|
-
},
|
|
2695
|
-
isComponent: e = !1
|
|
2696
|
-
|
|
2697
|
+
return t ? /* @__PURE__ */ c(et, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Fa, { isComponent: e }) }) : /* @__PURE__ */ c(Ja, {});
|
|
2698
|
+
}, Ya = ({
|
|
2699
|
+
isComponent: e = !1,
|
|
2700
|
+
domain: t = Zr
|
|
2701
|
+
}) => /* @__PURE__ */ c(q, { children: /* @__PURE__ */ c(Wr, { clientId: jr, domain: t, children: /* @__PURE__ */ c(za, { isComponent: e }) }) }), qa = ({ domain: e }) => /* @__PURE__ */ c(Ya, { isComponent: !0, domain: e });
|
|
2702
|
+
qa.displayName = "SassySaint-3.2.2";
|
|
2697
2703
|
export {
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2704
|
+
ft as A,
|
|
2705
|
+
Qn as ABOUT_TITLE,
|
|
2706
|
+
fn as ACTION_LOCATION,
|
|
2707
|
+
mn as ACTION_MESSAGE,
|
|
2708
|
+
pn as ACTION_MODEL,
|
|
2709
|
+
hn as ACTION_RESET,
|
|
2710
|
+
gn as ACTION_RESTORE,
|
|
2711
|
+
bn as ACTION_SEARCH,
|
|
2712
|
+
wn as ACTION_SORT,
|
|
2713
|
+
yn as ACTION_STREAMING,
|
|
2714
|
+
ja as AppFooter,
|
|
2715
|
+
eo as CANCEL,
|
|
2716
|
+
ro as CARDS,
|
|
2717
|
+
Zn as CLEAR,
|
|
2718
|
+
$n as E,
|
|
2719
|
+
ln as ERROR_MESSAGE,
|
|
2720
|
+
Oe as G,
|
|
2721
|
+
un as GPT4_MAX_TOKENS,
|
|
2722
|
+
qn as HISTORY_TITLE,
|
|
2723
|
+
vn as LOCAL_STORAGE_CHAT_DETAILS,
|
|
2724
|
+
Tn as LOCAL_STORAGE_LOCATION,
|
|
2725
|
+
En as LOCAL_STORAGE_PREFIX,
|
|
2726
|
+
kn as LOCAL_STORAGE_SEARCH,
|
|
2727
|
+
Sn as LOCAL_STORAGE_SORT,
|
|
2728
|
+
Jn as LOG_OUT,
|
|
2729
|
+
pa as M,
|
|
2730
|
+
dn as MODEL_GPT4,
|
|
2731
|
+
Va as MessagesContainerHeader,
|
|
2732
|
+
Un as N,
|
|
2733
|
+
to as NA,
|
|
2734
|
+
yt as O,
|
|
2735
|
+
zn as PROFILE_TITLE,
|
|
2736
|
+
nn as ROLE_ASSISTANT,
|
|
2737
|
+
cn as ROLE_HIDDEN,
|
|
2738
|
+
sn as ROLE_INTERNAL,
|
|
2739
|
+
on as ROLE_SYSTEM,
|
|
2740
|
+
an as ROLE_USER,
|
|
2741
|
+
Ce as S,
|
|
2742
|
+
Fn as SEND,
|
|
2743
|
+
Yn as STATS,
|
|
2744
|
+
An as STATS_SEPARATOR,
|
|
2745
|
+
qa as SassySaint,
|
|
2746
|
+
Xn as TYPE_QUESTION,
|
|
2747
|
+
vt as U,
|
|
2748
|
+
jn as a,
|
|
2749
|
+
Pa as b,
|
|
2750
|
+
ma as c,
|
|
2751
|
+
Kn as c$1,
|
|
2752
|
+
_n as convertLatitudeToDMS,
|
|
2753
|
+
xn as convertLongitudeToDMS,
|
|
2748
2754
|
xe as dr,
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2755
|
+
Mn as durationFormatter,
|
|
2756
|
+
Rn as extractAverage,
|
|
2757
|
+
pt as f,
|
|
2758
|
+
ha as f$1,
|
|
2759
|
+
De as g,
|
|
2760
|
+
Nn as getCurrentGeoLocation,
|
|
2761
|
+
ea as getMessageContaintWrapperClass,
|
|
2762
|
+
Re as i,
|
|
2763
|
+
Hn as i$1,
|
|
2764
|
+
On as isLastMessageFromRole,
|
|
2759
2765
|
ie as j,
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2766
|
+
Gn as l,
|
|
2767
|
+
Bn as n,
|
|
2768
|
+
Dn as numberFormatter,
|
|
2769
|
+
wa as o,
|
|
2770
|
+
Vn as p,
|
|
2771
|
+
Ln as pluralize,
|
|
2772
|
+
Wn as r,
|
|
2773
|
+
Cn as renderDataAsList,
|
|
2774
|
+
Pn as s,
|
|
2775
|
+
In as truncate,
|
|
2776
|
+
bt as x
|
|
2771
2777
|
};
|