@versini/sassysaint 7.4.0 → 8.0.1
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.Dms7Y9sn.js → App.Bdb192pb.js} +3832 -2473
- package/dist/chunks/ChatBubbleAssistant.CiaCBXya.js +11353 -0
- package/dist/chunks/{MarkdownWithExtra.3sK44pYw.js → MarkdownWithExtra.DSOgVkLr.js} +21 -20
- package/dist/chunks/{index.KUSjESlg.js → index.DQKfDWnQ.js} +395 -419
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/ChatBubbleAssistant.BSDC-abi.js +0 -8673
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as h, jsxs as
|
|
2
|
-
import Z, { createContext as Vr, useReducer as Wr, useRef as x, useCallback as re, useEffect as se, useContext as Zt, useSyncExternalStore as
|
|
1
|
+
import { jsx as h, jsxs as Q, Fragment as at } from "react/jsx-runtime";
|
|
2
|
+
import Z, { createContext as Vr, useReducer as Wr, useRef as x, useCallback as re, useEffect as se, useContext as Zt, useSyncExternalStore as Mn, useLayoutEffect as Ue, useMemo as Ke, useDebugValue as Hn, useState as Ee, useId as Gr, lazy as Kn, Suspense as Vn } from "react";
|
|
3
3
|
import E from "clsx";
|
|
4
|
-
var
|
|
4
|
+
var Wn = Object.defineProperty, Gn = (e, t, r) => t in e ? Wn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Tt = (e, t, r) => Gn(e, typeof t != "symbol" ? t + "" : t, r);
|
|
5
5
|
/*!
|
|
6
6
|
@versini/auth-provider v7.5.0
|
|
7
7
|
© 2025 gizmette.com
|
|
@@ -47,7 +47,7 @@ let Y = class extends Error {
|
|
|
47
47
|
super(t, { cause: n }), this.name = a ?? n.name, this.code = r;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
function
|
|
50
|
+
function Bn({ error: e, options: t }) {
|
|
51
51
|
var n, a;
|
|
52
52
|
const { publicKey: r } = t;
|
|
53
53
|
if (!r)
|
|
@@ -125,7 +125,7 @@ function Fn({ error: e, options: t }) {
|
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class Fn {
|
|
129
129
|
createNewAbortSignal() {
|
|
130
130
|
if (this.controller) {
|
|
131
131
|
const r = new Error("Cancelling existing WebAuthn API call for new one");
|
|
@@ -141,12 +141,12 @@ class Jn {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const Jr = new
|
|
144
|
+
const Jr = new Fn(), Jn = ["cross-platform", "platform"];
|
|
145
145
|
function Yr(e) {
|
|
146
|
-
if (e && !(
|
|
146
|
+
if (e && !(Jn.indexOf(e) < 0))
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function Yn(e) {
|
|
150
150
|
var u;
|
|
151
151
|
if (!er())
|
|
152
152
|
throw new Error("WebAuthn is not supported in this browser");
|
|
@@ -164,7 +164,7 @@ async function jn(e) {
|
|
|
164
164
|
try {
|
|
165
165
|
r = await navigator.credentials.create(t);
|
|
166
166
|
} catch (l) {
|
|
167
|
-
throw
|
|
167
|
+
throw Bn({ error: l, options: t });
|
|
168
168
|
}
|
|
169
169
|
if (!r)
|
|
170
170
|
throw new Error("Registration was not completed");
|
|
@@ -213,13 +213,13 @@ function _t(e, t) {
|
|
|
213
213
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
214
214
|
`, t);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function jn() {
|
|
217
217
|
if (!er())
|
|
218
218
|
return new Promise((t) => t(!1));
|
|
219
219
|
const e = window.PublicKeyCredential;
|
|
220
220
|
return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function qn({ error: e, options: t }) {
|
|
223
223
|
const { publicKey: r } = t;
|
|
224
224
|
if (!r)
|
|
225
225
|
throw Error("options was missing required publicKey property");
|
|
@@ -260,7 +260,7 @@ function zn({ error: e, options: t }) {
|
|
|
260
260
|
}
|
|
261
261
|
return e;
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
263
|
+
async function zn(e, t = !1) {
|
|
264
264
|
var u, l;
|
|
265
265
|
if (!er())
|
|
266
266
|
throw new Error("WebAuthn is not supported in this browser");
|
|
@@ -272,7 +272,7 @@ async function Qn(e, t = !1) {
|
|
|
272
272
|
allowCredentials: r
|
|
273
273
|
}, a = {};
|
|
274
274
|
if (t) {
|
|
275
|
-
if (!await
|
|
275
|
+
if (!await jn())
|
|
276
276
|
throw Error("Browser does not support WebAuthn autofill");
|
|
277
277
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
|
|
278
278
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
@@ -283,7 +283,7 @@ async function Qn(e, t = !1) {
|
|
|
283
283
|
try {
|
|
284
284
|
s = await navigator.credentials.get(a);
|
|
285
285
|
} catch (d) {
|
|
286
|
-
throw
|
|
286
|
+
throw qn({ error: d, options: a });
|
|
287
287
|
}
|
|
288
288
|
if (!s)
|
|
289
289
|
throw new Error("Authentication was not completed");
|
|
@@ -352,14 +352,14 @@ awIDAQAB
|
|
|
352
352
|
LOGIN: "login",
|
|
353
353
|
REFRESH: "refresh"
|
|
354
354
|
}, ut = crypto, qr = (e) => e instanceof CryptoKey, Ye = new TextEncoder(), Ve = new TextDecoder();
|
|
355
|
-
function
|
|
355
|
+
function Qn(...e) {
|
|
356
356
|
const t = e.reduce((a, { length: s }) => a + s, 0), r = new Uint8Array(t);
|
|
357
357
|
let n = 0;
|
|
358
358
|
for (const a of e)
|
|
359
359
|
r.set(a, n), n += a.length;
|
|
360
360
|
return r;
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const Zn = (e) => {
|
|
363
363
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
364
364
|
for (let n = 0; n < t.length; n++)
|
|
365
365
|
r[n] = t.charCodeAt(n);
|
|
@@ -368,7 +368,7 @@ const ea = (e) => {
|
|
|
368
368
|
let t = e;
|
|
369
369
|
t instanceof Uint8Array && (t = Ve.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
370
370
|
try {
|
|
371
|
-
return
|
|
371
|
+
return Zn(t);
|
|
372
372
|
} catch {
|
|
373
373
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
374
374
|
}
|
|
@@ -404,18 +404,18 @@ let ae = class extends z {
|
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
ae.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
407
|
-
class
|
|
407
|
+
class ea extends z {
|
|
408
408
|
constructor(t = "decryption operation failed", r) {
|
|
409
409
|
super(t, r), this.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
class
|
|
412
|
+
ea.code = "ERR_JWE_DECRYPTION_FAILED";
|
|
413
|
+
class ta extends z {
|
|
414
414
|
constructor() {
|
|
415
415
|
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
|
|
418
|
+
ta.code = "ERR_JWE_INVALID";
|
|
419
419
|
let H = class extends z {
|
|
420
420
|
constructor() {
|
|
421
421
|
super(...arguments), this.code = "ERR_JWS_INVALID";
|
|
@@ -428,42 +428,42 @@ let ie = class extends z {
|
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
430
|
ie.code = "ERR_JWT_INVALID";
|
|
431
|
-
class
|
|
431
|
+
class ra extends z {
|
|
432
432
|
constructor() {
|
|
433
433
|
super(...arguments), this.code = "ERR_JWK_INVALID";
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
|
|
437
|
-
class
|
|
436
|
+
ra.code = "ERR_JWK_INVALID";
|
|
437
|
+
class na extends z {
|
|
438
438
|
constructor() {
|
|
439
439
|
super(...arguments), this.code = "ERR_JWKS_INVALID";
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
|
|
443
|
-
class
|
|
442
|
+
na.code = "ERR_JWKS_INVALID";
|
|
443
|
+
class aa extends z {
|
|
444
444
|
constructor(t = "no applicable key found in the JSON Web Key Set", r) {
|
|
445
445
|
super(t, r), this.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
|
|
449
|
-
class
|
|
448
|
+
aa.code = "ERR_JWKS_NO_MATCHING_KEY";
|
|
449
|
+
class sa extends z {
|
|
450
450
|
constructor(t = "multiple matching keys found in the JSON Web Key Set", r) {
|
|
451
451
|
super(t, r), this.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
|
|
455
|
-
class
|
|
454
|
+
sa.code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
|
|
455
|
+
class oa extends z {
|
|
456
456
|
constructor(t = "request timed out", r) {
|
|
457
457
|
super(t, r), this.code = "ERR_JWKS_TIMEOUT";
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
|
|
461
|
-
class
|
|
460
|
+
oa.code = "ERR_JWKS_TIMEOUT";
|
|
461
|
+
class Xr extends z {
|
|
462
462
|
constructor(t = "signature verification failed", r) {
|
|
463
463
|
super(t, r), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
|
|
466
|
+
Xr.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
467
467
|
function ge(e, t = "algorithm.name") {
|
|
468
468
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
469
469
|
}
|
|
@@ -473,7 +473,7 @@ function je(e, t) {
|
|
|
473
473
|
function It(e) {
|
|
474
474
|
return parseInt(e.name.slice(4), 10);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function ia(e) {
|
|
477
477
|
switch (e) {
|
|
478
478
|
case "ES256":
|
|
479
479
|
return "P-256";
|
|
@@ -485,7 +485,7 @@ function ca(e) {
|
|
|
485
485
|
throw new Error("unreachable");
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function ca(e, t) {
|
|
489
489
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
490
490
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
491
491
|
if (t.length > 2) {
|
|
@@ -495,7 +495,7 @@ function la(e, t) {
|
|
|
495
495
|
throw new TypeError(r);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function la(e, t, ...r) {
|
|
499
499
|
switch (t) {
|
|
500
500
|
case "HS256":
|
|
501
501
|
case "HS384":
|
|
@@ -537,7 +537,7 @@ function da(e, t, ...r) {
|
|
|
537
537
|
case "ES512": {
|
|
538
538
|
if (!je(e.algorithm, "ECDSA"))
|
|
539
539
|
throw ge("ECDSA");
|
|
540
|
-
const n =
|
|
540
|
+
const n = ia(t);
|
|
541
541
|
if (e.algorithm.namedCurve !== n)
|
|
542
542
|
throw ge(n, "algorithm.namedCurve");
|
|
543
543
|
break;
|
|
@@ -545,9 +545,9 @@ function da(e, t, ...r) {
|
|
|
545
545
|
default:
|
|
546
546
|
throw new TypeError("CryptoKey does not support this operation");
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
ca(e, r);
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Qr(e, t, ...r) {
|
|
551
551
|
var n;
|
|
552
552
|
if (r = r.filter(Boolean), r.length > 2) {
|
|
553
553
|
const a = r.pop();
|
|
@@ -555,11 +555,11 @@ function Xr(e, t, ...r) {
|
|
|
555
555
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
556
556
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (n = t.constructor) != null && n.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
557
557
|
}
|
|
558
|
-
const fr = (e, ...t) =>
|
|
558
|
+
const fr = (e, ...t) => Qr("Key must be ", e, ...t);
|
|
559
559
|
function Zr(e, t, ...r) {
|
|
560
|
-
return
|
|
560
|
+
return Qr(`Key for the ${e} algorithm must be `, t, ...r);
|
|
561
561
|
}
|
|
562
|
-
const en = (e) => qr(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ot = ["CryptoKey"],
|
|
562
|
+
const en = (e) => qr(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ot = ["CryptoKey"], da = (...e) => {
|
|
563
563
|
const t = e.filter(Boolean);
|
|
564
564
|
if (t.length === 0 || t.length === 1)
|
|
565
565
|
return !0;
|
|
@@ -578,11 +578,11 @@ const en = (e) => qr(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
|
|
|
578
578
|
}
|
|
579
579
|
return !0;
|
|
580
580
|
};
|
|
581
|
-
function
|
|
581
|
+
function ua(e) {
|
|
582
582
|
return typeof e == "object" && e !== null;
|
|
583
583
|
}
|
|
584
584
|
function Pe(e) {
|
|
585
|
-
if (!
|
|
585
|
+
if (!ua(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
586
586
|
return !1;
|
|
587
587
|
if (Object.getPrototypeOf(e) === null)
|
|
588
588
|
return !0;
|
|
@@ -591,7 +591,7 @@ function Pe(e) {
|
|
|
591
591
|
t = Object.getPrototypeOf(t);
|
|
592
592
|
return Object.getPrototypeOf(e) === t;
|
|
593
593
|
}
|
|
594
|
-
const
|
|
594
|
+
const ha = (e, t) => {
|
|
595
595
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
596
596
|
const { modulusLength: r } = t.algorithm;
|
|
597
597
|
if (typeof r != "number" || r < 2048)
|
|
@@ -601,16 +601,16 @@ const fa = (e, t) => {
|
|
|
601
601
|
function De(e) {
|
|
602
602
|
return Pe(e) && typeof e.kty == "string";
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function fa(e) {
|
|
605
605
|
return e.kty !== "oct" && typeof e.d == "string";
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function ma(e) {
|
|
608
608
|
return e.kty !== "oct" && typeof e.d > "u";
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function pa(e) {
|
|
611
611
|
return De(e) && e.kty === "oct" && typeof e.k == "string";
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function ga(e) {
|
|
614
614
|
let t, r;
|
|
615
615
|
switch (e.kty) {
|
|
616
616
|
case "RSA": {
|
|
@@ -685,7 +685,7 @@ function ya(e) {
|
|
|
685
685
|
const tn = async (e) => {
|
|
686
686
|
if (!e.alg)
|
|
687
687
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
688
|
-
const { algorithm: t, keyUsages: r } =
|
|
688
|
+
const { algorithm: t, keyUsages: r } = ga(e), n = [
|
|
689
689
|
t,
|
|
690
690
|
e.ext ?? !1,
|
|
691
691
|
e.key_ops ?? r
|
|
@@ -699,19 +699,19 @@ const nn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
699
699
|
return s[n];
|
|
700
700
|
const o = await tn({ ...r, alg: n });
|
|
701
701
|
return a && Object.freeze(t), s ? s[n] = o : e.set(t, { [n]: o }), o;
|
|
702
|
-
},
|
|
702
|
+
}, ya = (e, t) => {
|
|
703
703
|
if (nn(e)) {
|
|
704
704
|
let r = e.export({ format: "jwk" });
|
|
705
705
|
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? rn(r.k) : (Re || (Re = /* @__PURE__ */ new WeakMap()), it(Re, e, r, t));
|
|
706
706
|
}
|
|
707
707
|
return De(e) ? e.k ? we(e.k) : (Re || (Re = /* @__PURE__ */ new WeakMap()), it(Re, e, e, t, !0)) : e;
|
|
708
|
-
},
|
|
708
|
+
}, Ea = (e, t) => {
|
|
709
709
|
if (nn(e)) {
|
|
710
710
|
let r = e.export({ format: "jwk" });
|
|
711
711
|
return r.k ? rn(r.k) : (Ae || (Ae = /* @__PURE__ */ new WeakMap()), it(Ae, e, r, t));
|
|
712
712
|
}
|
|
713
713
|
return De(e) ? e.k ? we(e.k) : (Ae || (Ae = /* @__PURE__ */ new WeakMap()), it(Ae, e, e, t, !0)) : e;
|
|
714
|
-
},
|
|
714
|
+
}, ba = { normalizePublicKey: ya, normalizePrivateKey: Ea }, be = (e, t, r = 0) => {
|
|
715
715
|
r === 0 && (t.unshift(t.length), t.unshift(6));
|
|
716
716
|
const n = e.indexOf(t[0], r);
|
|
717
717
|
if (n === -1)
|
|
@@ -737,7 +737,7 @@ const nn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
737
737
|
default:
|
|
738
738
|
throw new ae("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
|
|
739
739
|
}
|
|
740
|
-
},
|
|
740
|
+
}, Sa = async (e, t, r, n, a) => {
|
|
741
741
|
let s, o;
|
|
742
742
|
const i = new Uint8Array(atob(r.replace(e, "")).split("").map((c) => c.charCodeAt(0)));
|
|
743
743
|
switch (n) {
|
|
@@ -784,13 +784,13 @@ const nn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
|
|
|
784
784
|
throw new ae('Invalid or unsupported "alg" (Algorithm) value');
|
|
785
785
|
}
|
|
786
786
|
return ut.subtle.importKey(t, i, s, !1, o);
|
|
787
|
-
},
|
|
788
|
-
async function
|
|
787
|
+
}, wa = (e, t, r) => Sa(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
|
|
788
|
+
async function Ta(e, t, r) {
|
|
789
789
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
790
790
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
791
|
-
return
|
|
791
|
+
return wa(e, t);
|
|
792
792
|
}
|
|
793
|
-
async function
|
|
793
|
+
async function _a(e, t) {
|
|
794
794
|
if (!Pe(e))
|
|
795
795
|
throw new TypeError("JWK must be an object");
|
|
796
796
|
switch (t || (t = e.alg), e.kty) {
|
|
@@ -808,7 +808,7 @@ async function Ia(e, t) {
|
|
|
808
808
|
throw new ae('Unsupported "kty" (Key Type) Parameter value');
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
|
-
const
|
|
811
|
+
const Oe = (e) => e == null ? void 0 : e[Symbol.toStringTag], Vt = (e, t, r) => {
|
|
812
812
|
var n, a;
|
|
813
813
|
if (t.use !== void 0 && t.use !== "sig")
|
|
814
814
|
throw new TypeError("Invalid key for this operation, when present its use must be sig");
|
|
@@ -817,49 +817,49 @@ const Ce = (e) => e == null ? void 0 : e[Symbol.toStringTag], Vt = (e, t, r) =>
|
|
|
817
817
|
if (t.alg !== void 0 && t.alg !== e)
|
|
818
818
|
throw new TypeError(`Invalid key for this operation, when present its alg must be ${e}`);
|
|
819
819
|
return !0;
|
|
820
|
-
},
|
|
820
|
+
}, Ia = (e, t, r, n) => {
|
|
821
821
|
if (!(t instanceof Uint8Array)) {
|
|
822
822
|
if (n && De(t)) {
|
|
823
|
-
if (
|
|
823
|
+
if (pa(t) && Vt(e, t, r))
|
|
824
824
|
return;
|
|
825
825
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
826
826
|
}
|
|
827
827
|
if (!en(t))
|
|
828
828
|
throw new TypeError(Zr(e, t, ...ot, "Uint8Array", n ? "JSON Web Key" : null));
|
|
829
829
|
if (t.type !== "secret")
|
|
830
|
-
throw new TypeError(`${
|
|
830
|
+
throw new TypeError(`${Oe(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
831
831
|
}
|
|
832
|
-
},
|
|
832
|
+
}, Aa = (e, t, r, n) => {
|
|
833
833
|
if (n && De(t))
|
|
834
834
|
switch (r) {
|
|
835
835
|
case "sign":
|
|
836
|
-
if (
|
|
836
|
+
if (fa(t) && Vt(e, t, r))
|
|
837
837
|
return;
|
|
838
838
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
839
839
|
case "verify":
|
|
840
|
-
if (
|
|
840
|
+
if (ma(t) && Vt(e, t, r))
|
|
841
841
|
return;
|
|
842
842
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
843
843
|
}
|
|
844
844
|
if (!en(t))
|
|
845
845
|
throw new TypeError(Zr(e, t, ...ot, n ? "JSON Web Key" : null));
|
|
846
846
|
if (t.type === "secret")
|
|
847
|
-
throw new TypeError(`${
|
|
847
|
+
throw new TypeError(`${Oe(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
848
848
|
if (r === "sign" && t.type === "public")
|
|
849
|
-
throw new TypeError(`${
|
|
849
|
+
throw new TypeError(`${Oe(t)} instances for asymmetric algorithm signing must be of type "private"`);
|
|
850
850
|
if (r === "decrypt" && t.type === "public")
|
|
851
|
-
throw new TypeError(`${
|
|
851
|
+
throw new TypeError(`${Oe(t)} instances for asymmetric algorithm decryption must be of type "private"`);
|
|
852
852
|
if (t.algorithm && r === "verify" && t.type === "private")
|
|
853
|
-
throw new TypeError(`${
|
|
853
|
+
throw new TypeError(`${Oe(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
854
854
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
855
|
-
throw new TypeError(`${
|
|
855
|
+
throw new TypeError(`${Oe(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
856
856
|
};
|
|
857
857
|
function an(e, t, r, n) {
|
|
858
|
-
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ?
|
|
858
|
+
t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Ia(t, r, n, e) : Aa(t, r, n, e);
|
|
859
859
|
}
|
|
860
860
|
an.bind(void 0, !1);
|
|
861
861
|
const pr = an.bind(void 0, !0);
|
|
862
|
-
function
|
|
862
|
+
function Ra(e, t, r, n, a) {
|
|
863
863
|
if (a.crit !== void 0 && (n == null ? void 0 : n.crit) === void 0)
|
|
864
864
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
865
865
|
if (!n || n.crit === void 0)
|
|
@@ -878,13 +878,13 @@ function va(e, t, r, n, a) {
|
|
|
878
878
|
}
|
|
879
879
|
return new Set(n.crit);
|
|
880
880
|
}
|
|
881
|
-
const
|
|
881
|
+
const va = (e, t) => {
|
|
882
882
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
883
883
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
884
884
|
if (t)
|
|
885
885
|
return new Set(t);
|
|
886
886
|
};
|
|
887
|
-
function
|
|
887
|
+
function ka(e, t) {
|
|
888
888
|
const r = `SHA-${e.slice(-3)}`;
|
|
889
889
|
switch (e) {
|
|
890
890
|
case "HS256":
|
|
@@ -909,9 +909,9 @@ function Na(e, t) {
|
|
|
909
909
|
throw new ae(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
|
-
async function
|
|
913
|
-
if (t = await
|
|
914
|
-
return
|
|
912
|
+
async function Na(e, t, r) {
|
|
913
|
+
if (t = await ba.normalizePublicKey(t, e), qr(t))
|
|
914
|
+
return la(t, e, r), t;
|
|
915
915
|
if (t instanceof Uint8Array) {
|
|
916
916
|
if (!e.startsWith("HS"))
|
|
917
917
|
throw new TypeError(fr(t, ...ot));
|
|
@@ -920,16 +920,16 @@ async function Oa(e, t, r) {
|
|
|
920
920
|
throw new TypeError(fr(t, ...ot, "Uint8Array", "JSON Web Key"));
|
|
921
921
|
}
|
|
922
922
|
const Ca = async (e, t, r, n) => {
|
|
923
|
-
const a = await
|
|
924
|
-
|
|
925
|
-
const s =
|
|
923
|
+
const a = await Na(e, t, "verify");
|
|
924
|
+
ha(e, a);
|
|
925
|
+
const s = ka(e, a.algorithm);
|
|
926
926
|
try {
|
|
927
927
|
return await ut.subtle.verify(s, a, r, n);
|
|
928
928
|
} catch {
|
|
929
929
|
return !1;
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
|
-
async function
|
|
932
|
+
async function Oa(e, t, r) {
|
|
933
933
|
if (!Pe(e))
|
|
934
934
|
throw new H("Flattened JWS must be an object");
|
|
935
935
|
if (e.protected === void 0 && e.header === void 0)
|
|
@@ -950,19 +950,19 @@ async function xa(e, t, r) {
|
|
|
950
950
|
} catch {
|
|
951
951
|
throw new H("JWS Protected Header is invalid");
|
|
952
952
|
}
|
|
953
|
-
if (!
|
|
953
|
+
if (!da(n, e.header))
|
|
954
954
|
throw new H("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
955
955
|
const a = {
|
|
956
956
|
...n,
|
|
957
957
|
...e.header
|
|
958
|
-
}, s =
|
|
958
|
+
}, s = Ra(H, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, n, a);
|
|
959
959
|
let o = !0;
|
|
960
960
|
if (s.has("b64") && (o = n.b64, typeof o != "boolean"))
|
|
961
961
|
throw new H('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
962
962
|
const { alg: i } = a;
|
|
963
963
|
if (typeof i != "string" || !i)
|
|
964
964
|
throw new H('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
965
|
-
const c =
|
|
965
|
+
const c = va("algorithms", r.algorithms);
|
|
966
966
|
if (c && !c.has(i))
|
|
967
967
|
throw new zr('"alg" (Algorithm) Header Parameter value not allowed');
|
|
968
968
|
if (o) {
|
|
@@ -971,8 +971,8 @@ async function xa(e, t, r) {
|
|
|
971
971
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
972
972
|
throw new H("JWS Payload must be a string or an Uint8Array instance");
|
|
973
973
|
let m = !1;
|
|
974
|
-
typeof t == "function" ? (t = await t(n, e), m = !0, pr(i, t, "verify"), De(t) && (t = await
|
|
975
|
-
const f =
|
|
974
|
+
typeof t == "function" ? (t = await t(n, e), m = !0, pr(i, t, "verify"), De(t) && (t = await _a(t, i))) : pr(i, t, "verify");
|
|
975
|
+
const f = Qn(Ye.encode(e.protected ?? ""), Ye.encode("."), typeof e.payload == "string" ? Ye.encode(e.payload) : e.payload);
|
|
976
976
|
let u;
|
|
977
977
|
try {
|
|
978
978
|
u = we(e.signature);
|
|
@@ -980,7 +980,7 @@ async function xa(e, t, r) {
|
|
|
980
980
|
throw new H("Failed to base64url decode the signature");
|
|
981
981
|
}
|
|
982
982
|
if (!await Ca(i, t, u, f))
|
|
983
|
-
throw new
|
|
983
|
+
throw new Xr();
|
|
984
984
|
let l;
|
|
985
985
|
if (o)
|
|
986
986
|
try {
|
|
@@ -992,17 +992,17 @@ async function xa(e, t, r) {
|
|
|
992
992
|
const d = { payload: l };
|
|
993
993
|
return e.protected !== void 0 && (d.protectedHeader = n), e.header !== void 0 && (d.unprotectedHeader = e.header), m ? { ...d, key: t } : d;
|
|
994
994
|
}
|
|
995
|
-
async function
|
|
995
|
+
async function xa(e, t, r) {
|
|
996
996
|
if (e instanceof Uint8Array && (e = Ve.decode(e)), typeof e != "string")
|
|
997
997
|
throw new H("Compact JWS must be a string or Uint8Array");
|
|
998
998
|
const { 0: n, 1: a, 2: s, length: o } = e.split(".");
|
|
999
999
|
if (o !== 3)
|
|
1000
1000
|
throw new H("Invalid Compact JWS");
|
|
1001
|
-
const i = await
|
|
1001
|
+
const i = await Oa({ payload: a, protected: n, signature: s }, t, r), c = { payload: i.payload, protectedHeader: i.protectedHeader };
|
|
1002
1002
|
return typeof t == "function" ? { ...c, key: i.key } : c;
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1005
|
-
const t =
|
|
1004
|
+
const Pa = (e) => Math.floor(e.getTime() / 1e3), sn = 60, on = sn * 60, tr = on * 24, Da = tr * 7, La = tr * 365.25, $a = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, gr = (e) => {
|
|
1005
|
+
const t = $a.exec(e);
|
|
1006
1006
|
if (!t || t[4] && t[1])
|
|
1007
1007
|
throw new TypeError("Invalid time period format");
|
|
1008
1008
|
const r = parseFloat(t[2]), n = t[3].toLowerCase();
|
|
@@ -1037,14 +1037,14 @@ const Da = (e) => Math.floor(e.getTime() / 1e3), sn = 60, on = sn * 60, tr = on
|
|
|
1037
1037
|
case "week":
|
|
1038
1038
|
case "weeks":
|
|
1039
1039
|
case "w":
|
|
1040
|
-
a = Math.round(r *
|
|
1040
|
+
a = Math.round(r * Da);
|
|
1041
1041
|
break;
|
|
1042
1042
|
default:
|
|
1043
|
-
a = Math.round(r *
|
|
1043
|
+
a = Math.round(r * La);
|
|
1044
1044
|
break;
|
|
1045
1045
|
}
|
|
1046
1046
|
return t[1] === "-" || t[4] === "ago" ? -a : a;
|
|
1047
|
-
}, yr = (e) => e.toLowerCase().replace(/^application\//, ""),
|
|
1047
|
+
}, yr = (e) => e.toLowerCase().replace(/^application\//, ""), Ua = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, Ma = (e, t, r = {}) => {
|
|
1048
1048
|
let n;
|
|
1049
1049
|
try {
|
|
1050
1050
|
n = JSON.parse(Ve.decode(t));
|
|
@@ -1064,7 +1064,7 @@ const Da = (e) => Math.floor(e.getTime() / 1e3), sn = 60, on = sn * 60, tr = on
|
|
|
1064
1064
|
throw new ne('unexpected "iss" claim value', n, "iss", "check_failed");
|
|
1065
1065
|
if (i && n.sub !== i)
|
|
1066
1066
|
throw new ne('unexpected "sub" claim value', n, "sub", "check_failed");
|
|
1067
|
-
if (c && !
|
|
1067
|
+
if (c && !Ua(n.aud, typeof c == "string" ? [c] : c))
|
|
1068
1068
|
throw new ne('unexpected "aud" claim value', n, "aud", "check_failed");
|
|
1069
1069
|
let u;
|
|
1070
1070
|
switch (typeof r.clockTolerance) {
|
|
@@ -1080,7 +1080,7 @@ const Da = (e) => Math.floor(e.getTime() / 1e3), sn = 60, on = sn * 60, tr = on
|
|
|
1080
1080
|
default:
|
|
1081
1081
|
throw new TypeError("Invalid clockTolerance option type");
|
|
1082
1082
|
}
|
|
1083
|
-
const { currentDate: l } = r, d =
|
|
1083
|
+
const { currentDate: l } = r, d = Pa(l || /* @__PURE__ */ new Date());
|
|
1084
1084
|
if ((n.iat !== void 0 || m) && typeof n.iat != "number")
|
|
1085
1085
|
throw new ne('"iat" claim must be a number', n, "iat", "invalid");
|
|
1086
1086
|
if (n.nbf !== void 0) {
|
|
@@ -1104,16 +1104,16 @@ const Da = (e) => Math.floor(e.getTime() / 1e3), sn = 60, on = sn * 60, tr = on
|
|
|
1104
1104
|
}
|
|
1105
1105
|
return n;
|
|
1106
1106
|
};
|
|
1107
|
-
async function
|
|
1107
|
+
async function Ha(e, t, r) {
|
|
1108
1108
|
var n;
|
|
1109
|
-
const a = await
|
|
1109
|
+
const a = await xa(e, t, r);
|
|
1110
1110
|
if ((n = a.protectedHeader.crit) != null && n.includes("b64") && a.protectedHeader.b64 === !1)
|
|
1111
1111
|
throw new ie("JWTs MUST NOT use unencoded payload");
|
|
1112
|
-
const s = { payload:
|
|
1112
|
+
const s = { payload: Ma(a.protectedHeader, a.payload, r), protectedHeader: a.protectedHeader };
|
|
1113
1113
|
return typeof t == "function" ? { ...s, key: a.key } : s;
|
|
1114
1114
|
}
|
|
1115
|
-
const
|
|
1116
|
-
function
|
|
1115
|
+
const Ka = we;
|
|
1116
|
+
function Va(e) {
|
|
1117
1117
|
if (typeof e != "string")
|
|
1118
1118
|
throw new ie("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
1119
1119
|
const { 1: t, length: r } = e.split(".");
|
|
@@ -1125,7 +1125,7 @@ function Wa(e) {
|
|
|
1125
1125
|
throw new ie("JWTs must contain a payload");
|
|
1126
1126
|
let n;
|
|
1127
1127
|
try {
|
|
1128
|
-
n =
|
|
1128
|
+
n = Ka(t);
|
|
1129
1129
|
} catch {
|
|
1130
1130
|
throw new ie("Failed to base64url decode the payload");
|
|
1131
1131
|
}
|
|
@@ -1141,56 +1141,56 @@ function Wa(e) {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
const Me = async (e) => {
|
|
1143
1143
|
try {
|
|
1144
|
-
const t = F.ALG, r = await
|
|
1145
|
-
return await
|
|
1144
|
+
const t = F.ALG, r = await Ta(Xn, t);
|
|
1145
|
+
return await Ha(e, r, {
|
|
1146
1146
|
issuer: F.ISSUER
|
|
1147
1147
|
});
|
|
1148
1148
|
} catch {
|
|
1149
1149
|
return;
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, Wa = (e) => {
|
|
1152
1152
|
try {
|
|
1153
|
-
return
|
|
1153
|
+
return Va(e);
|
|
1154
1154
|
} catch {
|
|
1155
1155
|
return;
|
|
1156
1156
|
}
|
|
1157
1157
|
}, G = [];
|
|
1158
1158
|
for (let e = 0; e < 256; ++e)
|
|
1159
1159
|
G.push((e + 256).toString(16).slice(1));
|
|
1160
|
-
function
|
|
1160
|
+
function Ga(e, t = 0) {
|
|
1161
1161
|
return (G[e[t + 0]] + G[e[t + 1]] + G[e[t + 2]] + G[e[t + 3]] + "-" + G[e[t + 4]] + G[e[t + 5]] + "-" + G[e[t + 6]] + G[e[t + 7]] + "-" + G[e[t + 8]] + G[e[t + 9]] + "-" + G[e[t + 10]] + G[e[t + 11]] + G[e[t + 12]] + G[e[t + 13]] + G[e[t + 14]] + G[e[t + 15]]).toLowerCase();
|
|
1162
1162
|
}
|
|
1163
1163
|
let At;
|
|
1164
|
-
const
|
|
1165
|
-
function
|
|
1164
|
+
const Ba = new Uint8Array(16);
|
|
1165
|
+
function Fa() {
|
|
1166
1166
|
if (!At) {
|
|
1167
1167
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1168
1168
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1169
1169
|
At = crypto.getRandomValues.bind(crypto);
|
|
1170
1170
|
}
|
|
1171
|
-
return At(
|
|
1171
|
+
return At(Ba);
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1173
|
+
const Ja = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Er = { randomUUID: Ja };
|
|
1174
1174
|
function br(e, t, r) {
|
|
1175
1175
|
if (Er.randomUUID && !e)
|
|
1176
1176
|
return Er.randomUUID();
|
|
1177
1177
|
e = e || {};
|
|
1178
|
-
const n = e.random || (e.rng ||
|
|
1179
|
-
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128,
|
|
1178
|
+
const n = e.random || (e.rng || Fa)();
|
|
1179
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Ga(n);
|
|
1180
1180
|
}
|
|
1181
|
-
const Sr = globalThis.crypto,
|
|
1181
|
+
const Sr = globalThis.crypto, Ya = (e) => `${br()}${br()}`.slice(0, e), ja = (e) => btoa(
|
|
1182
1182
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
1183
1183
|
);
|
|
1184
|
-
async function
|
|
1184
|
+
async function qa(e) {
|
|
1185
1185
|
if (!Sr.subtle)
|
|
1186
1186
|
throw new Error(
|
|
1187
1187
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
1188
1188
|
);
|
|
1189
1189
|
const t = new TextEncoder().encode(e), r = await Sr.subtle.digest("SHA-256", t);
|
|
1190
|
-
return
|
|
1190
|
+
return ja(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
1191
1191
|
}
|
|
1192
|
-
async function
|
|
1193
|
-
const t =
|
|
1192
|
+
async function za(e) {
|
|
1193
|
+
const t = Ya(43), r = await qa(t);
|
|
1194
1194
|
return {
|
|
1195
1195
|
code_verifier: t,
|
|
1196
1196
|
code_challenge: r
|
|
@@ -1206,12 +1206,12 @@ const wr = (e, t) => {
|
|
|
1206
1206
|
window.localStorage.setItem(e, r), cn(e, r);
|
|
1207
1207
|
}, Xa = (e) => {
|
|
1208
1208
|
window.localStorage.removeItem(e), cn(e, null);
|
|
1209
|
-
}, Tr = (e) => window.localStorage.getItem(e),
|
|
1209
|
+
}, Tr = (e) => window.localStorage.getItem(e), Qa = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
1210
1210
|
function qe({
|
|
1211
1211
|
key: e,
|
|
1212
1212
|
initialValue: t
|
|
1213
1213
|
}) {
|
|
1214
|
-
const r =
|
|
1214
|
+
const r = Mn(Qa, () => Tr(e)), n = re(
|
|
1215
1215
|
(o) => {
|
|
1216
1216
|
try {
|
|
1217
1217
|
const i = typeof o == "function" ? o(JSON.parse(r)) : o;
|
|
@@ -1237,28 +1237,28 @@ function qe({
|
|
|
1237
1237
|
const B = [];
|
|
1238
1238
|
for (let e = 0; e < 256; ++e)
|
|
1239
1239
|
B.push((e + 256).toString(16).slice(1));
|
|
1240
|
-
function
|
|
1240
|
+
function Za(e, t = 0) {
|
|
1241
1241
|
return (B[e[t + 0]] + B[e[t + 1]] + B[e[t + 2]] + B[e[t + 3]] + "-" + B[e[t + 4]] + B[e[t + 5]] + "-" + B[e[t + 6]] + B[e[t + 7]] + "-" + B[e[t + 8]] + B[e[t + 9]] + "-" + B[e[t + 10]] + B[e[t + 11]] + B[e[t + 12]] + B[e[t + 13]] + B[e[t + 14]] + B[e[t + 15]]).toLowerCase();
|
|
1242
1242
|
}
|
|
1243
1243
|
let Rt;
|
|
1244
|
-
const
|
|
1245
|
-
function
|
|
1244
|
+
const es = new Uint8Array(16);
|
|
1245
|
+
function ts() {
|
|
1246
1246
|
if (!Rt) {
|
|
1247
1247
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1248
1248
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1249
1249
|
Rt = crypto.getRandomValues.bind(crypto);
|
|
1250
1250
|
}
|
|
1251
|
-
return Rt(
|
|
1251
|
+
return Rt(es);
|
|
1252
1252
|
}
|
|
1253
|
-
const
|
|
1253
|
+
const rs = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), _r = { randomUUID: rs };
|
|
1254
1254
|
function vt(e, t, r) {
|
|
1255
1255
|
if (_r.randomUUID && !e)
|
|
1256
1256
|
return _r.randomUUID();
|
|
1257
1257
|
e = e || {};
|
|
1258
|
-
const n = e.random || (e.rng ||
|
|
1259
|
-
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128,
|
|
1258
|
+
const n = e.random || (e.rng || ts)();
|
|
1259
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Za(n);
|
|
1260
1260
|
}
|
|
1261
|
-
const ve = "Your session has expired. For your security, please log in again to continue.",
|
|
1261
|
+
const ve = "Your session has expired. For your security, please log in again to continue.", ns = "Your session has been successfully terminated.", kt = "Login failed. Please try again.", as = "Error getting access token, please re-authenticate.", ss = "You forgot to wrap your component in <AuthProvider>.", ze = "@@auth@@", $e = "LOADING", rt = "LOGIN", ln = "LOGOUT", We = "success", ue = "failure", dn = "include", un = "POST", hn = "application/json", Xe = {
|
|
1262
1262
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
1263
1263
|
$clientId: String!,
|
|
1264
1264
|
$username: String!,
|
|
@@ -1341,19 +1341,19 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
1341
1341
|
}`
|
|
1342
1342
|
}, ke = {
|
|
1343
1343
|
GET_REGISTRATION_OPTIONS: {
|
|
1344
|
-
schema:
|
|
1344
|
+
schema: Xe.GET_REGISTRATION_OPTIONS,
|
|
1345
1345
|
method: "getPasskeyRegistrationOptions"
|
|
1346
1346
|
},
|
|
1347
1347
|
VERIFY_REGISTRATION: {
|
|
1348
|
-
schema:
|
|
1348
|
+
schema: Xe.VERIFY_REGISTRATION,
|
|
1349
1349
|
method: "verifyPasskeyRegistration"
|
|
1350
1350
|
},
|
|
1351
1351
|
GET_AUTHENTICATION_OPTIONS: {
|
|
1352
|
-
schema:
|
|
1352
|
+
schema: Xe.GET_AUTHENTICATION_OPTIONS,
|
|
1353
1353
|
method: "getPasskeyAuthenticationOptions"
|
|
1354
1354
|
},
|
|
1355
1355
|
VERIFY_AUTHENTICATION: {
|
|
1356
|
-
schema:
|
|
1356
|
+
schema: Xe.VERIFY_AUTHENTICATION,
|
|
1357
1357
|
method: "verifyPasskeyAuthentication"
|
|
1358
1358
|
}
|
|
1359
1359
|
}, Ne = async ({
|
|
@@ -1413,21 +1413,21 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
1413
1413
|
} catch (a) {
|
|
1414
1414
|
return console.error(a), { status: ue, data: [] };
|
|
1415
1415
|
}
|
|
1416
|
-
},
|
|
1416
|
+
}, os = process.env.NODE_ENV === "production", is = !os, fn = {
|
|
1417
1417
|
isLoading: !0,
|
|
1418
1418
|
isAuthenticated: !1,
|
|
1419
1419
|
user: void 0,
|
|
1420
1420
|
logoutReason: "",
|
|
1421
1421
|
debug: !1,
|
|
1422
1422
|
authenticationType: ""
|
|
1423
|
-
},
|
|
1423
|
+
}, cs = (e) => {
|
|
1424
1424
|
try {
|
|
1425
|
-
const t =
|
|
1425
|
+
const t = Wa(e);
|
|
1426
1426
|
return t ? t[F.USER_ID_KEY] : "";
|
|
1427
1427
|
} catch {
|
|
1428
1428
|
return "";
|
|
1429
1429
|
}
|
|
1430
|
-
},
|
|
1430
|
+
}, ls = async ({
|
|
1431
1431
|
userId: e,
|
|
1432
1432
|
clientId: t,
|
|
1433
1433
|
domain: r,
|
|
@@ -1453,7 +1453,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
1453
1453
|
status: ue
|
|
1454
1454
|
};
|
|
1455
1455
|
}
|
|
1456
|
-
},
|
|
1456
|
+
}, ds = async ({
|
|
1457
1457
|
username: e,
|
|
1458
1458
|
password: t,
|
|
1459
1459
|
clientId: r,
|
|
@@ -1499,7 +1499,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
1499
1499
|
status: !1
|
|
1500
1500
|
};
|
|
1501
1501
|
}
|
|
1502
|
-
},
|
|
1502
|
+
}, us = async ({
|
|
1503
1503
|
nonce: e,
|
|
1504
1504
|
clientId: t,
|
|
1505
1505
|
code_challenge: r,
|
|
@@ -1530,7 +1530,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
1530
1530
|
data: ""
|
|
1531
1531
|
};
|
|
1532
1532
|
}
|
|
1533
|
-
},
|
|
1533
|
+
}, hs = async ({
|
|
1534
1534
|
clientId: e,
|
|
1535
1535
|
userId: t,
|
|
1536
1536
|
nonce: r,
|
|
@@ -1568,7 +1568,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
1568
1568
|
};
|
|
1569
1569
|
}
|
|
1570
1570
|
};
|
|
1571
|
-
class
|
|
1571
|
+
class fs {
|
|
1572
1572
|
constructor(t = null, r = null) {
|
|
1573
1573
|
Tt(this, "refreshTokenPromise", null), Tt(this, "accessToken"), Tt(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
1574
1574
|
}
|
|
@@ -1601,7 +1601,7 @@ class ms {
|
|
|
1601
1601
|
}) {
|
|
1602
1602
|
const o = await Me(this.refreshToken);
|
|
1603
1603
|
if (o && o.payload[F.USER_ID_KEY] !== "") {
|
|
1604
|
-
const i = await
|
|
1604
|
+
const i = await hs({
|
|
1605
1605
|
endpoint: t,
|
|
1606
1606
|
clientId: r,
|
|
1607
1607
|
userId: n,
|
|
@@ -1623,29 +1623,29 @@ class ms {
|
|
|
1623
1623
|
};
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
|
-
const
|
|
1626
|
+
const ms = (e) => re(
|
|
1627
1627
|
(...t) => {
|
|
1628
1628
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
1629
1629
|
},
|
|
1630
1630
|
[e]
|
|
1631
|
-
),
|
|
1632
|
-
throw new Error(
|
|
1631
|
+
), Ce = () => {
|
|
1632
|
+
throw new Error(ss);
|
|
1633
1633
|
}, mn = Vr({
|
|
1634
1634
|
isAuthenticated: !1,
|
|
1635
1635
|
isLoading: !1,
|
|
1636
|
-
login:
|
|
1637
|
-
logout:
|
|
1638
|
-
getAccessToken:
|
|
1639
|
-
getIdToken:
|
|
1640
|
-
registeringForPasskey:
|
|
1641
|
-
loginWithPasskey:
|
|
1636
|
+
login: Ce,
|
|
1637
|
+
logout: Ce,
|
|
1638
|
+
getAccessToken: Ce,
|
|
1639
|
+
getIdToken: Ce,
|
|
1640
|
+
registeringForPasskey: Ce,
|
|
1641
|
+
loginWithPasskey: Ce,
|
|
1642
1642
|
logoutReason: "",
|
|
1643
1643
|
authenticationType: ""
|
|
1644
|
-
}),
|
|
1644
|
+
}), ps = Z.createContext({
|
|
1645
1645
|
state: fn,
|
|
1646
1646
|
dispatch: () => {
|
|
1647
1647
|
}
|
|
1648
|
-
}),
|
|
1648
|
+
}), gs = (e, t) => (t == null ? void 0 : t.type) === $e ? {
|
|
1649
1649
|
...e,
|
|
1650
1650
|
isLoading: t.payload.isLoading
|
|
1651
1651
|
} : (t == null ? void 0 : t.type) === rt ? {
|
|
@@ -1668,12 +1668,12 @@ const ps = (e) => re(
|
|
|
1668
1668
|
clientId: r,
|
|
1669
1669
|
domain: n = "",
|
|
1670
1670
|
debug: a = !1,
|
|
1671
|
-
endpoint: s =
|
|
1671
|
+
endpoint: s = is ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
|
|
1672
1672
|
}) => {
|
|
1673
|
-
const [o, i] = Wr(
|
|
1673
|
+
const [o, i] = Wr(gs, {
|
|
1674
1674
|
...fn,
|
|
1675
1675
|
debug: a
|
|
1676
|
-
}), c =
|
|
1676
|
+
}), c = ms(a), m = x(!1), [f, u, , l] = qe({
|
|
1677
1677
|
key: `${ze}::${r}::@@user@@`
|
|
1678
1678
|
}), [d, p, , y] = qe({
|
|
1679
1679
|
key: `${ze}::${r}::@@access@@`
|
|
@@ -1683,7 +1683,7 @@ const ps = (e) => re(
|
|
|
1683
1683
|
}
|
|
1684
1684
|
), [U, K, , I] = qe({
|
|
1685
1685
|
key: `${ze}::${r}::@@nonce@@`
|
|
1686
|
-
}), D = new
|
|
1686
|
+
}), D = new fs(d, w), M = re(() => {
|
|
1687
1687
|
c("removeLocalStorage: removing local storage"), l(), y(), $(), I();
|
|
1688
1688
|
}, [
|
|
1689
1689
|
y,
|
|
@@ -1707,10 +1707,10 @@ const ps = (e) => re(
|
|
|
1707
1707
|
), v = re(
|
|
1708
1708
|
async (b) => {
|
|
1709
1709
|
c("invalidateAndLogout: invalidating and logging out");
|
|
1710
|
-
const { user: k } = o, T = (k == null ? void 0 : k.userId) ||
|
|
1710
|
+
const { user: k } = o, T = (k == null ? void 0 : k.userId) || cs(f);
|
|
1711
1711
|
T || c(
|
|
1712
1712
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
1713
|
-
), await
|
|
1713
|
+
), await ls({
|
|
1714
1714
|
userId: T,
|
|
1715
1715
|
clientId: r,
|
|
1716
1716
|
domain: n,
|
|
@@ -1757,14 +1757,14 @@ const ps = (e) => re(
|
|
|
1757
1757
|
i({ type: $e, payload: { isLoading: !0 } }), M();
|
|
1758
1758
|
const T = vt();
|
|
1759
1759
|
K(T), c("login: Logging in with password");
|
|
1760
|
-
const { code_verifier: he, code_challenge: Et } = await
|
|
1760
|
+
const { code_verifier: he, code_challenge: Et } = await za(), fe = await us({
|
|
1761
1761
|
endpoint: s,
|
|
1762
1762
|
nonce: T,
|
|
1763
1763
|
clientId: r,
|
|
1764
1764
|
code_challenge: Et
|
|
1765
1765
|
});
|
|
1766
1766
|
if (fe.status) {
|
|
1767
|
-
const
|
|
1767
|
+
const X = await ds({
|
|
1768
1768
|
endpoint: s,
|
|
1769
1769
|
username: b,
|
|
1770
1770
|
password: k,
|
|
@@ -1777,22 +1777,22 @@ const ps = (e) => re(
|
|
|
1777
1777
|
domain: n,
|
|
1778
1778
|
ua: navigator.userAgent
|
|
1779
1779
|
});
|
|
1780
|
-
return
|
|
1780
|
+
return X.status ? (u(X.idToken), p(X.accessToken), g(X.refreshToken), i({
|
|
1781
1781
|
type: rt,
|
|
1782
1782
|
payload: {
|
|
1783
1783
|
authenticationType: xe.CODE,
|
|
1784
1784
|
user: {
|
|
1785
|
-
userId:
|
|
1785
|
+
userId: X.userId,
|
|
1786
1786
|
username: b,
|
|
1787
|
-
email:
|
|
1787
|
+
email: X.email
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
}), !0) : (S(kt), !1);
|
|
1791
1791
|
}
|
|
1792
1792
|
return !1;
|
|
1793
1793
|
}, A = async (b) => {
|
|
1794
|
-
b == null || b.preventDefault(), await v(
|
|
1795
|
-
},
|
|
1794
|
+
b == null || b.preventDefault(), await v(ns);
|
|
1795
|
+
}, O = async () => {
|
|
1796
1796
|
const { isAuthenticated: b, user: k } = o;
|
|
1797
1797
|
try {
|
|
1798
1798
|
if (b && k && k.userId) {
|
|
@@ -1820,7 +1820,7 @@ const ps = (e) => re(
|
|
|
1820
1820
|
} catch {
|
|
1821
1821
|
return c(
|
|
1822
1822
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
1823
|
-
), await v(
|
|
1823
|
+
), await v(as), "";
|
|
1824
1824
|
}
|
|
1825
1825
|
}, R = () => o.isAuthenticated && f ? f : "", V = async () => {
|
|
1826
1826
|
const { user: b } = o;
|
|
@@ -1837,7 +1837,7 @@ const ps = (e) => re(
|
|
|
1837
1837
|
});
|
|
1838
1838
|
if (k.status)
|
|
1839
1839
|
try {
|
|
1840
|
-
const T = await
|
|
1840
|
+
const T = await Yn(k.data);
|
|
1841
1841
|
return k = await Ne({
|
|
1842
1842
|
endpoint: s,
|
|
1843
1843
|
accessToken: d,
|
|
@@ -1882,7 +1882,7 @@ const ps = (e) => re(
|
|
|
1882
1882
|
});
|
|
1883
1883
|
if (T.status)
|
|
1884
1884
|
try {
|
|
1885
|
-
const he = await
|
|
1885
|
+
const he = await zn(T.data);
|
|
1886
1886
|
return T = await Ne({
|
|
1887
1887
|
endpoint: s,
|
|
1888
1888
|
accessToken: d,
|
|
@@ -1926,14 +1926,14 @@ const ps = (e) => re(
|
|
|
1926
1926
|
}
|
|
1927
1927
|
return !1;
|
|
1928
1928
|
};
|
|
1929
|
-
return /* @__PURE__ */ h(
|
|
1929
|
+
return /* @__PURE__ */ h(ps.Provider, { value: { state: o, dispatch: i }, children: /* @__PURE__ */ h(
|
|
1930
1930
|
mn.Provider,
|
|
1931
1931
|
{
|
|
1932
1932
|
value: {
|
|
1933
1933
|
...o,
|
|
1934
1934
|
login: P,
|
|
1935
1935
|
logout: A,
|
|
1936
|
-
getAccessToken:
|
|
1936
|
+
getAccessToken: O,
|
|
1937
1937
|
getIdToken: R,
|
|
1938
1938
|
registeringForPasskey: V,
|
|
1939
1939
|
loginWithPasskey: ee
|
|
@@ -1941,8 +1941,8 @@ const ps = (e) => re(
|
|
|
1941
1941
|
children: e
|
|
1942
1942
|
}
|
|
1943
1943
|
) });
|
|
1944
|
-
}, pn = (e = mn) => Zt(e),
|
|
1945
|
-
var
|
|
1944
|
+
}, pn = (e = mn) => Zt(e), Oi = "user", xi = "assistant", Pi = "data", Di = "I'm having trouble right now. Please try again later.", Li = "OpenAI", $i = "OpenAI", Ui = "Anthropic", Mi = "action-search", Hi = "action-sort", Ki = "action-toggle-prompt", Vi = "action-reset-prompt", Wi = "sassy-saint-", Gi = "details", Bi = "search", Fi = "sort", Ji = "private-disclosure", Ar = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Yi = 10, ji = 30, qi = "av-prompt", zi = "av-prompt-editable", Xi = "size-5 sm:size-4", Qi = 30, Zi = 10, ec = 130;
|
|
1945
|
+
var Qe = { exports: {} }, Nt = {};
|
|
1946
1946
|
/**
|
|
1947
1947
|
* @license React
|
|
1948
1948
|
* use-sync-external-store-shim.production.js
|
|
@@ -1953,7 +1953,7 @@ var Xe = { exports: {} }, Nt = {};
|
|
|
1953
1953
|
* LICENSE file in the root directory of this source tree.
|
|
1954
1954
|
*/
|
|
1955
1955
|
var Rr;
|
|
1956
|
-
function
|
|
1956
|
+
function ys() {
|
|
1957
1957
|
if (Rr) return Nt;
|
|
1958
1958
|
Rr = 1;
|
|
1959
1959
|
var e = Z;
|
|
@@ -1993,7 +1993,7 @@ function Es() {
|
|
|
1993
1993
|
var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? m : i;
|
|
1994
1994
|
return Nt.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, Nt;
|
|
1995
1995
|
}
|
|
1996
|
-
var
|
|
1996
|
+
var Ct = {};
|
|
1997
1997
|
/**
|
|
1998
1998
|
* @license React
|
|
1999
1999
|
* use-sync-external-store-shim.development.js
|
|
@@ -2004,7 +2004,7 @@ var Ot = {};
|
|
|
2004
2004
|
* LICENSE file in the root directory of this source tree.
|
|
2005
2005
|
*/
|
|
2006
2006
|
var vr;
|
|
2007
|
-
function
|
|
2007
|
+
function Es() {
|
|
2008
2008
|
return vr || (vr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2009
2009
|
function e(d, p) {
|
|
2010
2010
|
return d === p && (d !== 0 || 1 / d === 1 / p) || d !== d && p !== p;
|
|
@@ -2053,16 +2053,16 @@ function bs() {
|
|
|
2053
2053
|
}
|
|
2054
2054
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
2055
2055
|
var a = Z, s = typeof Object.is == "function" ? Object.is : e, o = a.useState, i = a.useEffect, c = a.useLayoutEffect, m = a.useDebugValue, f = !1, u = !1, l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : t;
|
|
2056
|
-
|
|
2057
|
-
}()),
|
|
2056
|
+
Ct.useSyncExternalStore = a.useSyncExternalStore !== void 0 ? a.useSyncExternalStore : l, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
2057
|
+
}()), Ct;
|
|
2058
2058
|
}
|
|
2059
2059
|
var kr;
|
|
2060
|
-
function
|
|
2061
|
-
return kr || (kr = 1, process.env.NODE_ENV === "production" ?
|
|
2060
|
+
function bs() {
|
|
2061
|
+
return kr || (kr = 1, process.env.NODE_ENV === "production" ? Qe.exports = /* @__PURE__ */ ys() : Qe.exports = /* @__PURE__ */ Es()), Qe.exports;
|
|
2062
2062
|
}
|
|
2063
|
-
var
|
|
2063
|
+
var Ss = /* @__PURE__ */ bs();
|
|
2064
2064
|
const gn = 0, yn = 1, En = 2, Nr = 3;
|
|
2065
|
-
var
|
|
2065
|
+
var Cr = Object.prototype.hasOwnProperty;
|
|
2066
2066
|
function Wt(e, t) {
|
|
2067
2067
|
var r, n;
|
|
2068
2068
|
if (e === t) return !0;
|
|
@@ -2077,7 +2077,7 @@ function Wt(e, t) {
|
|
|
2077
2077
|
if (!r || typeof e == "object") {
|
|
2078
2078
|
n = 0;
|
|
2079
2079
|
for (r in e)
|
|
2080
|
-
if (
|
|
2080
|
+
if (Cr.call(e, r) && ++n && !Cr.call(t, r) || !(r in t) || !Wt(e[r], t[r])) return !1;
|
|
2081
2081
|
return Object.keys(t).length === n;
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
@@ -2090,37 +2090,37 @@ const le = /* @__PURE__ */ new WeakMap(), Se = () => {
|
|
|
2090
2090
|
), Gt = Object, _ = (e) => e === q, de = (e) => typeof e == "function", Te = (e, t) => ({
|
|
2091
2091
|
...e,
|
|
2092
2092
|
...t
|
|
2093
|
-
}), bn = (e) => de(e.then),
|
|
2093
|
+
}), bn = (e) => de(e.then), Ot = {}, Ze = {}, rr = "undefined", Ge = typeof window != rr, Bt = typeof document != rr, ws = Ge && "Deno" in window, Ts = () => Ge && typeof window.requestAnimationFrame != rr, Sn = (e, t) => {
|
|
2094
2094
|
const r = le.get(e);
|
|
2095
2095
|
return [
|
|
2096
2096
|
// Getter
|
|
2097
|
-
() => !_(t) && e.get(t) ||
|
|
2097
|
+
() => !_(t) && e.get(t) || Ot,
|
|
2098
2098
|
// Setter
|
|
2099
2099
|
(n) => {
|
|
2100
2100
|
if (!_(t)) {
|
|
2101
2101
|
const a = e.get(t);
|
|
2102
|
-
t in Ze || (Ze[t] = a), r[5](t, Te(a, n), a ||
|
|
2102
|
+
t in Ze || (Ze[t] = a), r[5](t, Te(a, n), a || Ot);
|
|
2103
2103
|
}
|
|
2104
2104
|
},
|
|
2105
2105
|
// Subscriber
|
|
2106
2106
|
r[6],
|
|
2107
2107
|
// Get server cache snapshot
|
|
2108
|
-
() => !_(t) && t in Ze ? Ze[t] : !_(t) && e.get(t) ||
|
|
2108
|
+
() => !_(t) && t in Ze ? Ze[t] : !_(t) && e.get(t) || Ot
|
|
2109
2109
|
];
|
|
2110
2110
|
};
|
|
2111
2111
|
let Ft = !0;
|
|
2112
|
-
const
|
|
2112
|
+
const _s = () => Ft, [Jt, Yt] = Ge && window.addEventListener ? [
|
|
2113
2113
|
window.addEventListener.bind(window),
|
|
2114
2114
|
window.removeEventListener.bind(window)
|
|
2115
2115
|
] : [
|
|
2116
2116
|
Se,
|
|
2117
2117
|
Se
|
|
2118
|
-
],
|
|
2118
|
+
], Is = () => {
|
|
2119
2119
|
const e = Bt && document.visibilityState;
|
|
2120
2120
|
return _(e) || e !== "hidden";
|
|
2121
|
-
},
|
|
2121
|
+
}, As = (e) => (Bt && document.addEventListener("visibilitychange", e), Jt("focus", e), () => {
|
|
2122
2122
|
Bt && document.removeEventListener("visibilitychange", e), Yt("focus", e);
|
|
2123
|
-
}),
|
|
2123
|
+
}), Rs = (e) => {
|
|
2124
2124
|
const t = () => {
|
|
2125
2125
|
Ft = !0, e();
|
|
2126
2126
|
}, r = () => {
|
|
@@ -2129,13 +2129,13 @@ const Is = () => Ft, [Jt, Yt] = Ge && window.addEventListener ? [
|
|
|
2129
2129
|
return Jt("online", t), Jt("offline", r), () => {
|
|
2130
2130
|
Yt("online", t), Yt("offline", r);
|
|
2131
2131
|
};
|
|
2132
|
+
}, vs = {
|
|
2133
|
+
isOnline: _s,
|
|
2134
|
+
isVisible: Is
|
|
2132
2135
|
}, ks = {
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
}, Ns =
|
|
2136
|
-
initFocus: Rs,
|
|
2137
|
-
initReconnect: vs
|
|
2138
|
-
}, Cr = !Z.useId, He = !Ge || Ts, Os = (e) => _s() ? window.requestAnimationFrame(e) : setTimeout(e, 1), xt = He ? se : Ue, Pt = typeof navigator < "u" && navigator.connection, xr = !He && Pt && ([
|
|
2136
|
+
initFocus: As,
|
|
2137
|
+
initReconnect: Rs
|
|
2138
|
+
}, Or = !Z.useId, He = !Ge || ws, Ns = (e) => Ts() ? window.requestAnimationFrame(e) : setTimeout(e, 1), xt = He ? se : Ue, Pt = typeof navigator < "u" && navigator.connection, xr = !He && Pt && ([
|
|
2139
2139
|
"slow-2g",
|
|
2140
2140
|
"2g"
|
|
2141
2141
|
].includes(Pt.effectiveType) || Pt.saveData), et = /* @__PURE__ */ new WeakMap(), Dt = (e, t) => Gt.prototype.toString.call(e) === `[object ${t}]`;
|
|
@@ -2173,8 +2173,8 @@ const jt = (e) => {
|
|
|
2173
2173
|
t
|
|
2174
2174
|
];
|
|
2175
2175
|
};
|
|
2176
|
-
let
|
|
2177
|
-
const qt = () => ++
|
|
2176
|
+
let Os = 0;
|
|
2177
|
+
const qt = () => ++Os;
|
|
2178
2178
|
async function wn(...e) {
|
|
2179
2179
|
const [t, r, n, a] = e, s = Te({
|
|
2180
2180
|
populateCache: !0,
|
|
@@ -2209,13 +2209,13 @@ async function wn(...e) {
|
|
|
2209
2209
|
M,
|
|
2210
2210
|
0
|
|
2211
2211
|
];
|
|
2212
|
-
const S = !_(c), v = p(), P = v.data, A = v._c,
|
|
2213
|
-
if (S && (c = de(c) ? c(
|
|
2212
|
+
const S = !_(c), v = p(), P = v.data, A = v._c, O = _(A) ? P : A;
|
|
2213
|
+
if (S && (c = de(c) ? c(O, P) : c, y({
|
|
2214
2214
|
data: c,
|
|
2215
|
-
_c:
|
|
2215
|
+
_c: O
|
|
2216
2216
|
})), de(I))
|
|
2217
2217
|
try {
|
|
2218
|
-
I = I(
|
|
2218
|
+
I = I(O);
|
|
2219
2219
|
} catch (R) {
|
|
2220
2220
|
D = R;
|
|
2221
2221
|
}
|
|
@@ -2226,12 +2226,12 @@ async function wn(...e) {
|
|
|
2226
2226
|
if (D) throw D;
|
|
2227
2227
|
return I;
|
|
2228
2228
|
} else D && S && m(D) && (o = !0, y({
|
|
2229
|
-
data:
|
|
2229
|
+
data: O,
|
|
2230
2230
|
_c: q
|
|
2231
2231
|
}));
|
|
2232
2232
|
if (o && !D)
|
|
2233
2233
|
if (de(o)) {
|
|
2234
|
-
const R = o(I,
|
|
2234
|
+
const R = o(I, O);
|
|
2235
2235
|
y({
|
|
2236
2236
|
data: R,
|
|
2237
2237
|
error: q,
|
|
@@ -2257,9 +2257,9 @@ async function wn(...e) {
|
|
|
2257
2257
|
const Pr = (e, t) => {
|
|
2258
2258
|
for (const r in e)
|
|
2259
2259
|
e[r][0] && e[r][0](t);
|
|
2260
|
-
},
|
|
2260
|
+
}, xs = (e, t) => {
|
|
2261
2261
|
if (!le.has(e)) {
|
|
2262
|
-
const r = Te(
|
|
2262
|
+
const r = Te(ks, t), n = {}, a = wn.bind(q, e);
|
|
2263
2263
|
let s = Se;
|
|
2264
2264
|
const o = {}, i = (f, u) => {
|
|
2265
2265
|
const l = o[f] || [];
|
|
@@ -2297,16 +2297,16 @@ const Pr = (e, t) => {
|
|
|
2297
2297
|
e,
|
|
2298
2298
|
le.get(e)[4]
|
|
2299
2299
|
];
|
|
2300
|
-
},
|
|
2300
|
+
}, Ps = (e, t, r, n, a) => {
|
|
2301
2301
|
const s = r.errorRetryCount, o = a.retryCount, i = ~~((Math.random() + 0.5) * (1 << (o < 8 ? o : 8))) * r.errorRetryInterval;
|
|
2302
2302
|
!_(s) && o > s || setTimeout(n, i, a);
|
|
2303
|
-
},
|
|
2303
|
+
}, Ds = Wt, [nr, Ls] = xs(/* @__PURE__ */ new Map()), $s = Te(
|
|
2304
2304
|
{
|
|
2305
2305
|
// events
|
|
2306
2306
|
onLoadingSlow: Se,
|
|
2307
2307
|
onSuccess: Se,
|
|
2308
2308
|
onError: Se,
|
|
2309
|
-
onErrorRetry:
|
|
2309
|
+
onErrorRetry: Ps,
|
|
2310
2310
|
onDiscarded: Se,
|
|
2311
2311
|
// switches
|
|
2312
2312
|
revalidateOnFocus: !0,
|
|
@@ -2319,24 +2319,24 @@ const Pr = (e, t) => {
|
|
|
2319
2319
|
dedupingInterval: 2 * 1e3,
|
|
2320
2320
|
loadingTimeout: xr ? 5e3 : 3e3,
|
|
2321
2321
|
// providers
|
|
2322
|
-
compare:
|
|
2322
|
+
compare: Ds,
|
|
2323
2323
|
isPaused: () => !1,
|
|
2324
2324
|
cache: nr,
|
|
2325
|
-
mutate:
|
|
2325
|
+
mutate: Ls,
|
|
2326
2326
|
fallback: {}
|
|
2327
2327
|
},
|
|
2328
2328
|
// use web preset by default
|
|
2329
|
-
|
|
2330
|
-
),
|
|
2329
|
+
vs
|
|
2330
|
+
), Us = (e, t) => {
|
|
2331
2331
|
const r = Te(e, t);
|
|
2332
2332
|
if (t) {
|
|
2333
2333
|
const { use: n, fallback: a } = e, { use: s, fallback: o } = t;
|
|
2334
2334
|
n && s && (r.use = n.concat(s)), a && o && (r.fallback = Te(a, o));
|
|
2335
2335
|
}
|
|
2336
2336
|
return r;
|
|
2337
|
-
},
|
|
2337
|
+
}, Ms = Vr({}), Hs = "$inf$", Tn = Ge && window.__SWR_DEVTOOLS_USE__, Ks = Tn ? window.__SWR_DEVTOOLS_USE__ : [], Vs = () => {
|
|
2338
2338
|
Tn && (window.__SWR_DEVTOOLS_REACT__ = Z);
|
|
2339
|
-
},
|
|
2339
|
+
}, Ws = (e) => de(e[1]) ? [
|
|
2340
2340
|
e[0],
|
|
2341
2341
|
e[1],
|
|
2342
2342
|
e[2] || {}
|
|
@@ -2344,32 +2344,32 @@ const Pr = (e, t) => {
|
|
|
2344
2344
|
e[0],
|
|
2345
2345
|
null,
|
|
2346
2346
|
(e[1] === null ? e[2] : e[1]) || {}
|
|
2347
|
-
],
|
|
2347
|
+
], Gs = () => Te($s, Zt(Ms)), _n = (e, t) => {
|
|
2348
2348
|
const [r, n] = ft(e), [, , , a] = le.get(nr);
|
|
2349
2349
|
if (a[r]) return a[r];
|
|
2350
2350
|
const s = t(n);
|
|
2351
2351
|
return a[r] = s, s;
|
|
2352
|
-
},
|
|
2352
|
+
}, Bs = (e) => (t, r, n) => e(t, r && ((...s) => {
|
|
2353
2353
|
const [o] = ft(t), [, , , i] = le.get(nr);
|
|
2354
|
-
if (o.startsWith(
|
|
2354
|
+
if (o.startsWith(Hs))
|
|
2355
2355
|
return r(...s);
|
|
2356
2356
|
const c = i[o];
|
|
2357
2357
|
return _(c) ? r(...s) : (delete i[o], c);
|
|
2358
|
-
}), n),
|
|
2359
|
-
const n =
|
|
2358
|
+
}), n), Fs = Ks.concat(Bs), Js = (e) => function(...r) {
|
|
2359
|
+
const n = Gs(), [a, s, o] = Ws(r), i = Us(n, o);
|
|
2360
2360
|
let c = e;
|
|
2361
|
-
const { use: m } = i, f = (m || []).concat(
|
|
2361
|
+
const { use: m } = i, f = (m || []).concat(Fs);
|
|
2362
2362
|
for (let u = f.length; u--; )
|
|
2363
2363
|
c = f[u](c);
|
|
2364
2364
|
return c(a, s || i.fetcher || null, i);
|
|
2365
|
-
},
|
|
2365
|
+
}, Ys = (e, t, r) => {
|
|
2366
2366
|
const n = t[e] || (t[e] = []);
|
|
2367
2367
|
return n.push(r), () => {
|
|
2368
2368
|
const a = n.indexOf(r);
|
|
2369
2369
|
a >= 0 && (n[a] = n[n.length - 1], n.pop());
|
|
2370
2370
|
};
|
|
2371
2371
|
};
|
|
2372
|
-
|
|
2372
|
+
Vs();
|
|
2373
2373
|
const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
|
|
2374
2374
|
// and emitting an error.
|
|
2375
2375
|
// We assume that this is only for the `use(thenable)` case, not `use(context)`.
|
|
@@ -2391,30 +2391,30 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2391
2391
|
}
|
|
2392
2392
|
}), $t = {
|
|
2393
2393
|
dedupe: !0
|
|
2394
|
-
},
|
|
2395
|
-
const { cache: n, compare: a, suspense: s, fallbackData: o, revalidateOnMount: i, revalidateIfStale: c, refreshInterval: m, refreshWhenHidden: f, refreshWhenOffline: u, keepPreviousData: l } = r, [d, p, y, w] = le.get(n), [g, $] = ft(e), U = x(!1), K = x(!1), I = x(g), D = x(t), M = x(r), S = () => M.current, v = () => S().isVisible() && S().isOnline(), [P, A,
|
|
2394
|
+
}, js = (e, t, r) => {
|
|
2395
|
+
const { cache: n, compare: a, suspense: s, fallbackData: o, revalidateOnMount: i, revalidateIfStale: c, refreshInterval: m, refreshWhenHidden: f, refreshWhenOffline: u, keepPreviousData: l } = r, [d, p, y, w] = le.get(n), [g, $] = ft(e), U = x(!1), K = x(!1), I = x(g), D = x(t), M = x(r), S = () => M.current, v = () => S().isVisible() && S().isOnline(), [P, A, O, R] = Sn(n, g), V = x({}).current, ee = _(o) ? _(r.fallback) ? q : r.fallback[g] : o, b = (N, C) => {
|
|
2396
2396
|
for (const J in V) {
|
|
2397
2397
|
const L = J;
|
|
2398
2398
|
if (L === "data") {
|
|
2399
|
-
if (!a(N[L],
|
|
2399
|
+
if (!a(N[L], C[L]) && (!_(N[L]) || !a(Je, C[L])))
|
|
2400
2400
|
return !1;
|
|
2401
|
-
} else if (
|
|
2401
|
+
} else if (C[L] !== N[L])
|
|
2402
2402
|
return !1;
|
|
2403
2403
|
}
|
|
2404
2404
|
return !0;
|
|
2405
2405
|
}, k = Ke(() => {
|
|
2406
|
-
const N = !g || !t ? !1 : _(i) ? S().isPaused() || s ? !1 : c !== !1 : i,
|
|
2406
|
+
const N = !g || !t ? !1 : _(i) ? S().isPaused() || s ? !1 : c !== !1 : i, C = (j) => {
|
|
2407
2407
|
const me = Te(j);
|
|
2408
2408
|
return delete me._k, N ? {
|
|
2409
2409
|
isValidating: !0,
|
|
2410
2410
|
isLoading: !0,
|
|
2411
2411
|
...me
|
|
2412
2412
|
} : me;
|
|
2413
|
-
}, J = P(), L = R(), oe =
|
|
2413
|
+
}, J = P(), L = R(), oe = C(J), Ie = J === L ? oe : C(L);
|
|
2414
2414
|
let W = oe;
|
|
2415
2415
|
return [
|
|
2416
2416
|
() => {
|
|
2417
|
-
const j =
|
|
2417
|
+
const j = C(P());
|
|
2418
2418
|
return b(j, W) ? (W.data = j.data, W.isLoading = j.isLoading, W.isValidating = j.isValidating, W.error = j.error, W) : (W = j, j);
|
|
2419
2419
|
},
|
|
2420
2420
|
() => Ie
|
|
@@ -2422,22 +2422,22 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2422
2422
|
}, [
|
|
2423
2423
|
n,
|
|
2424
2424
|
g
|
|
2425
|
-
]), T =
|
|
2426
|
-
(N) =>
|
|
2427
|
-
b(J,
|
|
2425
|
+
]), T = Ss.useSyncExternalStore(re(
|
|
2426
|
+
(N) => O(g, (C, J) => {
|
|
2427
|
+
b(J, C) || N();
|
|
2428
2428
|
}),
|
|
2429
2429
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2430
2430
|
[
|
|
2431
2431
|
n,
|
|
2432
2432
|
g
|
|
2433
2433
|
]
|
|
2434
|
-
), k[0], k[1]), he = !U.current, Et = d[g] && d[g].length > 0, fe = T.data,
|
|
2434
|
+
), k[0], k[1]), he = !U.current, Et = d[g] && d[g].length > 0, fe = T.data, X = _(fe) ? ee && bn(ee) ? Lt(ee) : ee : fe, Fe = T.error, bt = x(X), Je = l ? _(fe) ? _(bt.current) ? X : bt.current : fe : X, ir = Et && !_(Fe) ? !1 : he && !_(i) ? i : S().isPaused() ? !1 : s ? _(X) ? !1 : c : _(X) || c, cr = !!(g && t && he && ir), Ln = _(T.isValidating) ? cr : T.isValidating, $n = _(T.isLoading) ? cr : T.isLoading, Le = re(
|
|
2435
2435
|
async (N) => {
|
|
2436
|
-
const
|
|
2437
|
-
if (!g || !
|
|
2436
|
+
const C = D.current;
|
|
2437
|
+
if (!g || !C || K.current || S().isPaused())
|
|
2438
2438
|
return !1;
|
|
2439
2439
|
let J, L, oe = !0;
|
|
2440
|
-
const Ie = N || {}, W = !y[g] || !Ie.dedupe, j = () =>
|
|
2440
|
+
const Ie = N || {}, W = !y[g] || !Ie.dedupe, j = () => Or ? !K.current && g === I.current && U.current : g === I.current, me = {
|
|
2441
2441
|
isValidating: !1,
|
|
2442
2442
|
isLoading: !1
|
|
2443
2443
|
}, dr = () => {
|
|
@@ -2453,7 +2453,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2453
2453
|
if (W && (A(hr), r.loadingTimeout && _(P().data) && setTimeout(() => {
|
|
2454
2454
|
oe && j() && S().onLoadingSlow(g, r);
|
|
2455
2455
|
}, r.loadingTimeout), y[g] = [
|
|
2456
|
-
|
|
2456
|
+
C($),
|
|
2457
2457
|
qt()
|
|
2458
2458
|
]), [J, L] = y[g], J = await J, W && setTimeout(ur, r.dedupingInterval), !y[g] || y[g][1] !== L)
|
|
2459
2459
|
return W && j() && S().onDiscarded(g), !1;
|
|
@@ -2469,9 +2469,9 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2469
2469
|
} catch (te) {
|
|
2470
2470
|
ur();
|
|
2471
2471
|
const pe = S(), { shouldRetryOnError: St } = pe;
|
|
2472
|
-
pe.isPaused() || (me.error = te, W && j() && (pe.onError(te, g, pe), (St === !0 || de(St) && St(te)) && (!S().revalidateOnFocus || !S().revalidateOnReconnect || v()) && pe.onErrorRetry(te, g, pe, (
|
|
2472
|
+
pe.isPaused() || (me.error = te, W && j() && (pe.onError(te, g, pe), (St === !0 || de(St) && St(te)) && (!S().revalidateOnFocus || !S().revalidateOnReconnect || v()) && pe.onErrorRetry(te, g, pe, (Un) => {
|
|
2473
2473
|
const wt = d[g];
|
|
2474
|
-
wt && wt[0] && wt[0](Nr,
|
|
2474
|
+
wt && wt[0] && wt[0](Nr, Un);
|
|
2475
2475
|
}, {
|
|
2476
2476
|
retryCount: (Ie.retryCount || 0) + 1,
|
|
2477
2477
|
dedupe: !0
|
|
@@ -2505,11 +2505,11 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2505
2505
|
}), xt(() => {
|
|
2506
2506
|
if (!g) return;
|
|
2507
2507
|
const N = Le.bind(q, $t);
|
|
2508
|
-
let
|
|
2509
|
-
const L =
|
|
2508
|
+
let C = 0;
|
|
2509
|
+
const L = Ys(g, d, (oe, Ie = {}) => {
|
|
2510
2510
|
if (oe == gn) {
|
|
2511
2511
|
const W = Date.now();
|
|
2512
|
-
S().revalidateOnFocus && W >
|
|
2512
|
+
S().revalidateOnFocus && W > C && v() && (C = W + S().focusThrottleInterval, N());
|
|
2513
2513
|
} else if (oe == yn)
|
|
2514
2514
|
S().revalidateOnReconnect && v() && N();
|
|
2515
2515
|
else {
|
|
@@ -2521,21 +2521,21 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2521
2521
|
});
|
|
2522
2522
|
return K.current = !1, I.current = g, U.current = !0, A({
|
|
2523
2523
|
_k: $
|
|
2524
|
-
}), ir && (_(
|
|
2524
|
+
}), ir && (_(X) || He ? N() : Ns(N)), () => {
|
|
2525
2525
|
K.current = !0, L();
|
|
2526
2526
|
};
|
|
2527
2527
|
}, [
|
|
2528
2528
|
g
|
|
2529
2529
|
]), xt(() => {
|
|
2530
2530
|
let N;
|
|
2531
|
-
function
|
|
2531
|
+
function C() {
|
|
2532
2532
|
const L = de(m) ? m(P().data) : m;
|
|
2533
2533
|
L && N !== -1 && (N = setTimeout(J, L));
|
|
2534
2534
|
}
|
|
2535
2535
|
function J() {
|
|
2536
|
-
!P().error && (f || S().isVisible()) && (u || S().isOnline()) ? Le($t).then(
|
|
2536
|
+
!P().error && (f || S().isVisible()) && (u || S().isOnline()) ? Le($t).then(C) : C();
|
|
2537
2537
|
}
|
|
2538
|
-
return
|
|
2538
|
+
return C(), () => {
|
|
2539
2539
|
N && (clearTimeout(N), N = -1);
|
|
2540
2540
|
};
|
|
2541
2541
|
}, [
|
|
@@ -2543,18 +2543,18 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2543
2543
|
f,
|
|
2544
2544
|
u,
|
|
2545
2545
|
g
|
|
2546
|
-
]),
|
|
2547
|
-
if (!
|
|
2546
|
+
]), Hn(Je), s && _(X) && g) {
|
|
2547
|
+
if (!Or && He)
|
|
2548
2548
|
throw new Error("Fallback data is required when using Suspense in SSR.");
|
|
2549
2549
|
D.current = t, M.current = r, K.current = !1;
|
|
2550
2550
|
const N = w[g];
|
|
2551
2551
|
if (!_(N)) {
|
|
2552
|
-
const
|
|
2553
|
-
Lt(
|
|
2552
|
+
const C = lr(N);
|
|
2553
|
+
Lt(C);
|
|
2554
2554
|
}
|
|
2555
2555
|
if (_(Fe)) {
|
|
2556
|
-
const
|
|
2557
|
-
_(Je) || (
|
|
2556
|
+
const C = Le($t);
|
|
2557
|
+
_(Je) || (C.status = "fulfilled", C.value = !0), Lt(C);
|
|
2558
2558
|
} else
|
|
2559
2559
|
throw Fe;
|
|
2560
2560
|
}
|
|
@@ -2567,13 +2567,13 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2567
2567
|
return V.error = !0, Fe;
|
|
2568
2568
|
},
|
|
2569
2569
|
get isValidating() {
|
|
2570
|
-
return V.isValidating = !0,
|
|
2570
|
+
return V.isValidating = !0, Ln;
|
|
2571
2571
|
},
|
|
2572
2572
|
get isLoading() {
|
|
2573
|
-
return V.isLoading = !0,
|
|
2573
|
+
return V.isLoading = !0, $n;
|
|
2574
2574
|
}
|
|
2575
2575
|
};
|
|
2576
|
-
},
|
|
2576
|
+
}, qs = Js(js), ye = {
|
|
2577
2577
|
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
|
2578
2578
|
location(latitude: $latitude, longitude: $longitude) {
|
|
2579
2579
|
country
|
|
@@ -2613,13 +2613,10 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2613
2613
|
chatById(id: $id) {
|
|
2614
2614
|
model
|
|
2615
2615
|
provider
|
|
2616
|
-
usage
|
|
2617
2616
|
summary
|
|
2618
2617
|
messages {
|
|
2619
2618
|
content
|
|
2620
2619
|
role
|
|
2621
|
-
name
|
|
2622
|
-
processingTime
|
|
2623
2620
|
}
|
|
2624
2621
|
}
|
|
2625
2622
|
}`,
|
|
@@ -2729,11 +2726,11 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2729
2726
|
schema: ye.SET_USER_PREFERENCES,
|
|
2730
2727
|
method: "setUserPreferences"
|
|
2731
2728
|
}
|
|
2732
|
-
},
|
|
2729
|
+
}, zs = process.env.PUBLIC_SASSY_API_SERVER_URL, Dr = async ({
|
|
2733
2730
|
query: e,
|
|
2734
2731
|
data: t,
|
|
2735
2732
|
headers: r = {}
|
|
2736
|
-
}) => await fetch(`${
|
|
2733
|
+
}) => await fetch(`${zs}/graphql`, {
|
|
2737
2734
|
method: "POST",
|
|
2738
2735
|
credentials: "include",
|
|
2739
2736
|
headers: {
|
|
@@ -2776,23 +2773,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2776
2773
|
} catch (n) {
|
|
2777
2774
|
return console.error(n), { status: 500, data: [] };
|
|
2778
2775
|
}
|
|
2779
|
-
},
|
|
2780
|
-
accessToken: e,
|
|
2781
|
-
name: t,
|
|
2782
|
-
data: r,
|
|
2783
|
-
method: n = "POST"
|
|
2784
|
-
}) => {
|
|
2785
|
-
const a = `Bearer ${e}`;
|
|
2786
|
-
return await fetch(`${In}/api/${t}`, {
|
|
2787
|
-
method: n,
|
|
2788
|
-
credentials: "include",
|
|
2789
|
-
headers: {
|
|
2790
|
-
"Content-Type": "application/json",
|
|
2791
|
-
authorization: a
|
|
2792
|
-
},
|
|
2793
|
-
body: JSON.stringify(r)
|
|
2794
|
-
});
|
|
2795
|
-
}, oc = async ({
|
|
2776
|
+
}, tc = async ({
|
|
2796
2777
|
provider: e,
|
|
2797
2778
|
accessToken: t,
|
|
2798
2779
|
username: r
|
|
@@ -2815,7 +2796,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2815
2796
|
swrOptions: n,
|
|
2816
2797
|
getAccessToken: a
|
|
2817
2798
|
}) => {
|
|
2818
|
-
const { data: s, error: o, isLoading: i, mutate: c } =
|
|
2799
|
+
const { data: s, error: o, isLoading: i, mutate: c } = qs(
|
|
2819
2800
|
[t, ...r],
|
|
2820
2801
|
(m) => e(m, a),
|
|
2821
2802
|
{ ...n }
|
|
@@ -2840,18 +2821,18 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2840
2821
|
if (t.status === 200 && t.errors === void 0)
|
|
2841
2822
|
return t.data;
|
|
2842
2823
|
throw new Error("An error occurred while fetching the data.");
|
|
2843
|
-
},
|
|
2824
|
+
}, Xs = async ([e, t], r) => pt({
|
|
2844
2825
|
getAccessToken: r,
|
|
2845
2826
|
type: Be.GET_USER_PREFERENCES,
|
|
2846
2827
|
params: {
|
|
2847
2828
|
user: t
|
|
2848
2829
|
}
|
|
2849
|
-
}),
|
|
2830
|
+
}), rc = ({
|
|
2850
2831
|
keys: e,
|
|
2851
2832
|
getAccessToken: t,
|
|
2852
2833
|
isPaused: r = !1
|
|
2853
2834
|
}) => mt({
|
|
2854
|
-
fetcher:
|
|
2835
|
+
fetcher: Xs,
|
|
2855
2836
|
scope: "/preferences",
|
|
2856
2837
|
keys: e,
|
|
2857
2838
|
swrOptions: {
|
|
@@ -2861,17 +2842,17 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2861
2842
|
revalidateOnReconnect: r
|
|
2862
2843
|
},
|
|
2863
2844
|
getAccessToken: t
|
|
2864
|
-
}),
|
|
2845
|
+
}), Qs = async ([e, t], r) => pt({
|
|
2865
2846
|
getAccessToken: r,
|
|
2866
2847
|
type: Be.GET_CHATS_STATS,
|
|
2867
2848
|
params: {
|
|
2868
2849
|
user: t
|
|
2869
2850
|
}
|
|
2870
|
-
}),
|
|
2851
|
+
}), nc = ({
|
|
2871
2852
|
keys: e,
|
|
2872
2853
|
getAccessToken: t
|
|
2873
2854
|
}) => mt({
|
|
2874
|
-
fetcher:
|
|
2855
|
+
fetcher: Qs,
|
|
2875
2856
|
scope: "/stats",
|
|
2876
2857
|
keys: e,
|
|
2877
2858
|
swrOptions: {
|
|
@@ -2882,7 +2863,7 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2882
2863
|
revalidateOnReconnect: !0
|
|
2883
2864
|
},
|
|
2884
2865
|
getAccessToken: t
|
|
2885
|
-
}),
|
|
2866
|
+
}), In = async ([e, t, r, n], a) => pt({
|
|
2886
2867
|
getAccessToken: a,
|
|
2887
2868
|
type: Be.GET_CHATS,
|
|
2888
2869
|
params: {
|
|
@@ -2892,11 +2873,11 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2892
2873
|
limit: 1,
|
|
2893
2874
|
truncateSize: 100
|
|
2894
2875
|
}
|
|
2895
|
-
}),
|
|
2876
|
+
}), ac = ({
|
|
2896
2877
|
keys: e,
|
|
2897
2878
|
getAccessToken: t
|
|
2898
2879
|
}) => mt({
|
|
2899
|
-
fetcher:
|
|
2880
|
+
fetcher: In,
|
|
2900
2881
|
scope: "/history",
|
|
2901
2882
|
keys: e,
|
|
2902
2883
|
getAccessToken: t,
|
|
@@ -2907,22 +2888,22 @@ const Lt = Z.use || // This extra generic is to avoid TypeScript mixing up the g
|
|
|
2907
2888
|
revalidateOnFocus: !1,
|
|
2908
2889
|
revalidateOnReconnect: !0
|
|
2909
2890
|
}
|
|
2910
|
-
}),
|
|
2891
|
+
}), sc = ({
|
|
2911
2892
|
keys: e,
|
|
2912
2893
|
getAccessToken: t
|
|
2913
2894
|
}) => {
|
|
2914
|
-
_n(["/history", ...e], (r) =>
|
|
2915
|
-
},
|
|
2895
|
+
_n(["/history", ...e], (r) => In(r, t));
|
|
2896
|
+
}, An = async ([e]) => pt({
|
|
2916
2897
|
noAuth: !0,
|
|
2917
2898
|
type: Be.GET_SERVER_CAPABILITIES
|
|
2918
|
-
}),
|
|
2919
|
-
fetcher:
|
|
2899
|
+
}), oc = () => mt({
|
|
2900
|
+
fetcher: An,
|
|
2920
2901
|
scope: "/capabilities",
|
|
2921
2902
|
keys: [],
|
|
2922
2903
|
getAccessToken: () => Promise.resolve("")
|
|
2923
2904
|
// No auth required
|
|
2924
2905
|
}), Zs = () => {
|
|
2925
|
-
_n(["/capabilities"], (e) =>
|
|
2906
|
+
_n(["/capabilities"], (e) => An(e));
|
|
2926
2907
|
}, Lr = (e) => Number.isFinite(e) ? e : 0;
|
|
2927
2908
|
function eo(e) {
|
|
2928
2909
|
return {
|
|
@@ -3003,7 +2984,7 @@ function io(e, t) {
|
|
|
3003
2984
|
const m = t.colonNotation ? ":" : " ";
|
|
3004
2985
|
return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), n + a.join(m);
|
|
3005
2986
|
}
|
|
3006
|
-
const co = process.env.NODE_ENV === "production",
|
|
2987
|
+
const co = process.env.NODE_ENV === "production", Rn = !co, lo = Rn ? "gizmette.local.com" : "gizmette.com", ic = async () => {
|
|
3007
2988
|
const e = {
|
|
3008
2989
|
/**
|
|
3009
2990
|
* A boolean value that indicates the application would
|
|
@@ -3052,15 +3033,10 @@ const co = process.env.NODE_ENV === "production", vn = !co, lo = vn ? "gizmette.
|
|
|
3052
3033
|
e
|
|
3053
3034
|
);
|
|
3054
3035
|
});
|
|
3055
|
-
},
|
|
3036
|
+
}, cc = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ h("dl", { className: "my-0", children: /* @__PURE__ */ Q("div", { className: "flex items-center justify-between", children: [
|
|
3056
3037
|
/* @__PURE__ */ h("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
|
|
3057
3038
|
/* @__PURE__ */ h("dd", { className: "my-1 inline-block", children: t[r] })
|
|
3058
|
-
] }) }, `${e}-${r}`)) : null,
|
|
3059
|
-
style: "decimal",
|
|
3060
|
-
signDisplay: "never",
|
|
3061
|
-
minimumFractionDigits: 0,
|
|
3062
|
-
maximumFractionDigits: 0
|
|
3063
|
-
}), pc = (e) => e > 0 ? io(e, {
|
|
3039
|
+
] }) }, `${e}-${r}`)) : null, lc = (e) => e > 0 ? io(e, {
|
|
3064
3040
|
secondsDecimalDigits: 2,
|
|
3065
3041
|
unitCount: 2
|
|
3066
3042
|
}) : "N/A", uo = ({
|
|
@@ -3072,15 +3048,18 @@ const co = process.env.NODE_ENV === "production", vn = !co, lo = vn ? "gizmette.
|
|
|
3072
3048
|
t
|
|
3073
3049
|
), ho = ({
|
|
3074
3050
|
extraClass: e
|
|
3075
|
-
} = {}) => E("px-2 sm:px-0", e),
|
|
3051
|
+
} = {}) => E("px-2 sm:px-0", e), dc = (e, t) => t === 1 ? e : `${e}s`, uc = (e, t) => {
|
|
3076
3052
|
let r;
|
|
3077
3053
|
return (...n) => {
|
|
3078
3054
|
window.clearTimeout(r), r = window.setTimeout(() => e(...n), t);
|
|
3079
3055
|
};
|
|
3080
|
-
}, fo = () => !!(window != null && window.__VERSINI_CALLISTO_ELECTRON__), mo = () => window.innerWidth < 403,
|
|
3056
|
+
}, fo = () => !!(window != null && window.__VERSINI_CALLISTO_ELECTRON__), mo = () => window.innerWidth < 403, hc = () => {
|
|
3081
3057
|
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r = mo(), n = navigator.maxTouchPoints > 1;
|
|
3082
3058
|
return e && t && r && n;
|
|
3083
|
-
},
|
|
3059
|
+
}, fc = (e) => {
|
|
3060
|
+
const t = e.replace(/([A-Z])/g, " $1");
|
|
3061
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
3062
|
+
}, $r = "av-button", gt = "icon", ar = "button", Xt = "link", po = ({
|
|
3084
3063
|
type: e,
|
|
3085
3064
|
size: t,
|
|
3086
3065
|
labelRight: r,
|
|
@@ -3091,7 +3070,7 @@ const co = process.env.NODE_ENV === "production", vn = !co, lo = vn ? "gizmette.
|
|
|
3091
3070
|
const o = "max-h-8 py-0 px-2", i = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
|
3092
3071
|
switch (e) {
|
|
3093
3072
|
case ar:
|
|
3094
|
-
case
|
|
3073
|
+
case Xt:
|
|
3095
3074
|
return E({
|
|
3096
3075
|
[o]: t === "small",
|
|
3097
3076
|
[i]: t === "medium",
|
|
@@ -3125,9 +3104,9 @@ const co = process.env.NODE_ENV === "production", vn = !co, lo = vn ? "gizmette.
|
|
|
3125
3104
|
const a = "text-sm font-medium", s = "text-base font-medium", o = "text-lg font-medium";
|
|
3126
3105
|
switch (e) {
|
|
3127
3106
|
case ar:
|
|
3128
|
-
case
|
|
3107
|
+
case Xt:
|
|
3129
3108
|
return E({
|
|
3130
|
-
"text-center": e ===
|
|
3109
|
+
"text-center": e === Xt,
|
|
3131
3110
|
[a]: t === "small",
|
|
3132
3111
|
[s]: t === "medium",
|
|
3133
3112
|
[o]: t === "large"
|
|
@@ -3324,7 +3303,7 @@ const co = process.env.NODE_ENV === "production", vn = !co, lo = vn ? "gizmette.
|
|
|
3324
3303
|
animated: e
|
|
3325
3304
|
}) => E({
|
|
3326
3305
|
"transition-opacity duration-300 ease-in": e
|
|
3327
|
-
}),
|
|
3306
|
+
}), vn = ({
|
|
3328
3307
|
type: e,
|
|
3329
3308
|
className: t,
|
|
3330
3309
|
raw: r,
|
|
@@ -3390,7 +3369,7 @@ const co = process.env.NODE_ENV === "production", vn = !co, lo = vn ? "gizmette.
|
|
|
3390
3369
|
);
|
|
3391
3370
|
});
|
|
3392
3371
|
sr.displayName = "BaseButton";
|
|
3393
|
-
const
|
|
3372
|
+
const kn = Z.forwardRef(
|
|
3394
3373
|
({
|
|
3395
3374
|
children: e,
|
|
3396
3375
|
disabled: t = !1,
|
|
@@ -3406,7 +3385,7 @@ const Nn = Z.forwardRef(
|
|
|
3406
3385
|
radius: u = "large",
|
|
3407
3386
|
...l
|
|
3408
3387
|
}, d) => {
|
|
3409
|
-
const p =
|
|
3388
|
+
const p = vn({
|
|
3410
3389
|
type: ar,
|
|
3411
3390
|
mode: r,
|
|
3412
3391
|
focusMode: n,
|
|
@@ -3432,7 +3411,7 @@ const Nn = Z.forwardRef(
|
|
|
3432
3411
|
);
|
|
3433
3412
|
}
|
|
3434
3413
|
);
|
|
3435
|
-
|
|
3414
|
+
kn.displayName = "Button";
|
|
3436
3415
|
function vo() {
|
|
3437
3416
|
const e = x(!1);
|
|
3438
3417
|
return se(() => (e.current = !0, () => {
|
|
@@ -3468,14 +3447,14 @@ function Ut(e) {
|
|
|
3468
3447
|
o == null || o.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
3469
3448
|
}), [o, e]), [n, a];
|
|
3470
3449
|
}
|
|
3471
|
-
const
|
|
3450
|
+
const Co = {
|
|
3472
3451
|
small: 24,
|
|
3473
3452
|
// w-6
|
|
3474
3453
|
medium: 32,
|
|
3475
3454
|
// w-8
|
|
3476
3455
|
large: 48
|
|
3477
3456
|
// w-12
|
|
3478
|
-
},
|
|
3457
|
+
}, Oo = {
|
|
3479
3458
|
small: 8 * 2,
|
|
3480
3459
|
// px-2 x 2
|
|
3481
3460
|
medium: 12 * 2,
|
|
@@ -3506,7 +3485,7 @@ const Oo = {
|
|
|
3506
3485
|
animated: U = !1,
|
|
3507
3486
|
...K
|
|
3508
3487
|
}, I) => {
|
|
3509
|
-
const D =
|
|
3488
|
+
const D = vn({
|
|
3510
3489
|
type: gt,
|
|
3511
3490
|
mode: r,
|
|
3512
3491
|
focusMode: n,
|
|
@@ -3523,21 +3502,21 @@ const Oo = {
|
|
|
3523
3502
|
radius: w,
|
|
3524
3503
|
variant: g,
|
|
3525
3504
|
animated: U
|
|
3526
|
-
}), M = Io({ mode: r, raw: i, iconClassName: $ }), S = Ao({ animated: U }), [v, P] = Ut(), [A,
|
|
3505
|
+
}), M = Io({ mode: r, raw: i, iconClassName: $ }), S = Ao({ animated: U }), [v, P] = Ut(), [A, O] = Ut(), [R, V] = Ut(), ee = x(0), b = x(null), k = ko([I, b]);
|
|
3527
3506
|
return Ue(() => {
|
|
3528
|
-
R && R.current && U && (ee.current = V.width +
|
|
3507
|
+
R && R.current && U && (ee.current = V.width + Oo[u] + (c ? 0 : xo));
|
|
3529
3508
|
}, [V, R, u, c, U]), Ue(() => {
|
|
3530
|
-
b && b.current && U && (l && v && P.width > 0 ? (v.current && (v.current.style.opacity = "100"), b.current.style.width = `${P.width + ee.current}px`) : d &&
|
|
3509
|
+
b && b.current && U && (l && v && P.width > 0 ? (v.current && (v.current.style.opacity = "100"), b.current.style.width = `${P.width + ee.current}px`) : d && O.width > 0 ? (A.current && (A.current.style.opacity = "100"), b.current.style.width = `${O.width + ee.current}px`) : (v.current && (v.current.style.opacity = "0"), A.current && (A.current.style.opacity = "0"), b.current.style.width = `${Co[u]}px`));
|
|
3531
3510
|
}, [
|
|
3532
3511
|
P,
|
|
3533
3512
|
l,
|
|
3534
3513
|
v,
|
|
3535
|
-
|
|
3514
|
+
O,
|
|
3536
3515
|
d,
|
|
3537
3516
|
A,
|
|
3538
3517
|
u,
|
|
3539
3518
|
U
|
|
3540
|
-
]), /* @__PURE__ */
|
|
3519
|
+
]), /* @__PURE__ */ Q(
|
|
3541
3520
|
sr,
|
|
3542
3521
|
{
|
|
3543
3522
|
ref: k,
|
|
@@ -3719,7 +3698,7 @@ const Uo = ({
|
|
|
3719
3698
|
compact: m,
|
|
3720
3699
|
noBorder: f
|
|
3721
3700
|
});
|
|
3722
|
-
return p ? (l = y, d = l) : !p && e && i ? (l = null, d = i) : !p && e && !i ? (l = y, d = l) : (l = null, d = i || null), /* @__PURE__ */ h("div", { className: w.wrapper, children: /* @__PURE__ */
|
|
3701
|
+
return p ? (l = y, d = l) : !p && e && i ? (l = null, d = i) : !p && e && !i ? (l = y, d = l) : (l = null, d = i || null), /* @__PURE__ */ h("div", { className: w.wrapper, children: /* @__PURE__ */ Q(
|
|
3723
3702
|
"section",
|
|
3724
3703
|
{
|
|
3725
3704
|
...d && {
|
|
@@ -3754,7 +3733,7 @@ const Uo = ({
|
|
|
3754
3733
|
...c
|
|
3755
3734
|
}) => {
|
|
3756
3735
|
const m = E(s, n);
|
|
3757
|
-
return /* @__PURE__ */
|
|
3736
|
+
return /* @__PURE__ */ Q(at, { children: [
|
|
3758
3737
|
/* @__PURE__ */ h(
|
|
3759
3738
|
"svg",
|
|
3760
3739
|
{
|
|
@@ -3808,7 +3787,7 @@ const Mo = ({
|
|
|
3808
3787
|
title: r,
|
|
3809
3788
|
monotone: n,
|
|
3810
3789
|
...a
|
|
3811
|
-
}) => /* @__PURE__ */
|
|
3790
|
+
}) => /* @__PURE__ */ Q(
|
|
3812
3791
|
yt,
|
|
3813
3792
|
{
|
|
3814
3793
|
defaultViewBox: "0 0 640 512",
|
|
@@ -3836,7 +3815,7 @@ const Mo = ({
|
|
|
3836
3815
|
...a
|
|
3837
3816
|
}) => {
|
|
3838
3817
|
const s = n ? "1" : "0.4";
|
|
3839
|
-
return /* @__PURE__ */
|
|
3818
|
+
return /* @__PURE__ */ Q(
|
|
3840
3819
|
yt,
|
|
3841
3820
|
{
|
|
3842
3821
|
defaultViewBox: "0 0 190 190",
|
|
@@ -3870,7 +3849,7 @@ const Mo = ({
|
|
|
3870
3849
|
title: r,
|
|
3871
3850
|
monotone: n,
|
|
3872
3851
|
...a
|
|
3873
|
-
}) => /* @__PURE__ */
|
|
3852
|
+
}) => /* @__PURE__ */ Q(
|
|
3874
3853
|
yt,
|
|
3875
3854
|
{
|
|
3876
3855
|
defaultViewBox: "0 0 576 512",
|
|
@@ -3935,7 +3914,7 @@ const Wo = "av-main", Go = ({
|
|
|
3935
3914
|
t
|
|
3936
3915
|
);
|
|
3937
3916
|
return /* @__PURE__ */ h("main", { className: o, ...s, children: e });
|
|
3938
|
-
}, Bo = "av-flexgrid", tt = "av-flexgrid-item", lt = 0.25,
|
|
3917
|
+
}, Bo = "av-flexgrid", tt = "av-flexgrid-item", lt = 0.25, Qt = Z.createContext({
|
|
3939
3918
|
columnGap: 0,
|
|
3940
3919
|
rowGap: 0
|
|
3941
3920
|
}), Fo = ({
|
|
@@ -3967,7 +3946,7 @@ const Wo = "av-main", Go = ({
|
|
|
3967
3946
|
Bo,
|
|
3968
3947
|
"box-border flex flex-wrap"
|
|
3969
3948
|
), l = { columnGap: r, rowGap: n };
|
|
3970
|
-
return t ? /* @__PURE__ */ h("div", { className: t, children: /* @__PURE__ */ h("div", { className: u, style: f, ...m, children: /* @__PURE__ */ h(
|
|
3949
|
+
return t ? /* @__PURE__ */ h("div", { className: t, children: /* @__PURE__ */ h("div", { className: u, style: f, ...m, children: /* @__PURE__ */ h(Qt.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ h("div", { className: u, style: f, ...m, children: /* @__PURE__ */ h(Qt.Provider, { value: l, children: e }) });
|
|
3971
3950
|
}, Mt = (e, t) => E({
|
|
3972
3951
|
"basis-1/12": e === 1 && !t,
|
|
3973
3952
|
"sm:basis-1/12": e === 1 && t === "sm",
|
|
@@ -4070,7 +4049,7 @@ const Wo = "av-main", Go = ({
|
|
|
4070
4049
|
span: r,
|
|
4071
4050
|
...n
|
|
4072
4051
|
}) => {
|
|
4073
|
-
const { columnGap: a, rowGap: s } = Zt(
|
|
4052
|
+
const { columnGap: a, rowGap: s } = Zt(Qt), o = {
|
|
4074
4053
|
paddingLeft: a * lt + "rem",
|
|
4075
4054
|
paddingTop: s * lt + "rem"
|
|
4076
4055
|
}, i = Jo({
|
|
@@ -4092,7 +4071,7 @@ try {
|
|
|
4092
4071
|
});
|
|
4093
4072
|
} catch {
|
|
4094
4073
|
}
|
|
4095
|
-
const
|
|
4074
|
+
const Nn = "av-text-input", Yo = "av-text-input-wrapper", Ht = "av-text-input-helper-text";
|
|
4096
4075
|
function jo() {
|
|
4097
4076
|
const e = x(!1);
|
|
4098
4077
|
return se(() => (e.current = !0, () => {
|
|
@@ -4120,7 +4099,7 @@ function zo(e) {
|
|
|
4120
4099
|
o == null || o.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
4121
4100
|
}), [o, e]), [n, a];
|
|
4122
4101
|
}
|
|
4123
|
-
function
|
|
4102
|
+
function Xo(e) {
|
|
4124
4103
|
const t = Gr();
|
|
4125
4104
|
if (!e)
|
|
4126
4105
|
return t;
|
|
@@ -4131,7 +4110,7 @@ function Qo(e) {
|
|
|
4131
4110
|
return typeof r == "number" || typeof r == "string" ? `${n}${r}` : `${n}${t}`;
|
|
4132
4111
|
}
|
|
4133
4112
|
}
|
|
4134
|
-
const Cn = "SET_ANNOUNCEMENT",
|
|
4113
|
+
const Cn = "SET_ANNOUNCEMENT", On = "CLEAR_ANNOUNCEMENT", Qo = {
|
|
4135
4114
|
alert: null,
|
|
4136
4115
|
alertdialog: null,
|
|
4137
4116
|
log: "polite",
|
|
@@ -4146,7 +4125,7 @@ const Cn = "SET_ANNOUNCEMENT", xn = "CLEAR_ANNOUNCEMENT", Xo = {
|
|
|
4146
4125
|
...e,
|
|
4147
4126
|
announcement: t.payload
|
|
4148
4127
|
};
|
|
4149
|
-
case
|
|
4128
|
+
case On:
|
|
4150
4129
|
return {
|
|
4151
4130
|
...e,
|
|
4152
4131
|
announcement: null
|
|
@@ -4159,7 +4138,7 @@ const Cn = "SET_ANNOUNCEMENT", xn = "CLEAR_ANNOUNCEMENT", Xo = {
|
|
|
4159
4138
|
dispatch: t
|
|
4160
4139
|
}) => {
|
|
4161
4140
|
t({
|
|
4162
|
-
type:
|
|
4141
|
+
type: On
|
|
4163
4142
|
}), typeof e == "function" && e();
|
|
4164
4143
|
}, Mr = ({
|
|
4165
4144
|
children: e,
|
|
@@ -4201,7 +4180,7 @@ const Cn = "SET_ANNOUNCEMENT", xn = "CLEAR_ANNOUNCEMENT", Xo = {
|
|
|
4201
4180
|
dispatch: o
|
|
4202
4181
|
});
|
|
4203
4182
|
};
|
|
4204
|
-
function
|
|
4183
|
+
function xn({
|
|
4205
4184
|
children: e,
|
|
4206
4185
|
className: t,
|
|
4207
4186
|
politeness: r,
|
|
@@ -4216,7 +4195,7 @@ function Pn({
|
|
|
4216
4195
|
announcement: null
|
|
4217
4196
|
});
|
|
4218
4197
|
let d = r;
|
|
4219
|
-
typeof d > "u" && (d = n ?
|
|
4198
|
+
typeof d > "u" && (d = n ? Qo[n] : "assertive"), se(() => {
|
|
4220
4199
|
ti({
|
|
4221
4200
|
announcementTimeoutRef: m,
|
|
4222
4201
|
announcementDelay: a,
|
|
@@ -4368,7 +4347,7 @@ const ri = ({
|
|
|
4368
4347
|
break;
|
|
4369
4348
|
}
|
|
4370
4349
|
const l = r ? E(t) : E(
|
|
4371
|
-
|
|
4350
|
+
Nn,
|
|
4372
4351
|
u,
|
|
4373
4352
|
"rounded-md text-base px-4",
|
|
4374
4353
|
ri({ mode: o }),
|
|
@@ -4419,7 +4398,7 @@ const ri = ({
|
|
|
4419
4398
|
size: g = "md",
|
|
4420
4399
|
...$
|
|
4421
4400
|
}, U) => {
|
|
4422
|
-
const [K, I] = zo(), [D, M] = Ee(0), S =
|
|
4401
|
+
const [K, I] = zo(), [D, M] = Ee(0), S = Xo({ id: e, prefix: `${Nn}-` }), v = `${t} error, ${p}`, P = x(null), A = x(null), O = {
|
|
4423
4402
|
xs: { label: "-25px", helperText: "30px" },
|
|
4424
4403
|
sm: { label: "-29px", helperText: "34px" },
|
|
4425
4404
|
md: { label: "-33px", helperText: "38px" },
|
|
@@ -4441,12 +4420,12 @@ const ri = ({
|
|
|
4441
4420
|
I && I.width && M(I.width + 18 + 10);
|
|
4442
4421
|
}, [I]), Ue(() => {
|
|
4443
4422
|
var V, ee;
|
|
4444
|
-
const { label: b, helperText: k } =
|
|
4423
|
+
const { label: b, helperText: k } = O[g];
|
|
4445
4424
|
(V = P == null ? void 0 : P.current) == null || V.style.setProperty("--av-text-input-label", b), (ee = A == null ? void 0 : A.current) == null || ee.style.setProperty(
|
|
4446
4425
|
"--av-text-input-helper-text",
|
|
4447
4426
|
k
|
|
4448
4427
|
);
|
|
4449
|
-
}, [g]), /* @__PURE__ */
|
|
4428
|
+
}, [g]), /* @__PURE__ */ Q("div", { className: R.wrapper, children: [
|
|
4450
4429
|
/* @__PURE__ */ h(
|
|
4451
4430
|
"label",
|
|
4452
4431
|
{
|
|
@@ -4499,7 +4478,7 @@ const ri = ({
|
|
|
4499
4478
|
children: y
|
|
4500
4479
|
}
|
|
4501
4480
|
),
|
|
4502
|
-
n && p && /* @__PURE__ */ h(
|
|
4481
|
+
n && p && /* @__PURE__ */ h(xn, { politeness: "polite", clearAnnouncementDelay: 500, children: v })
|
|
4503
4482
|
] });
|
|
4504
4483
|
}
|
|
4505
4484
|
);
|
|
@@ -4512,7 +4491,7 @@ function ci(e) {
|
|
|
4512
4491
|
});
|
|
4513
4492
|
}, e);
|
|
4514
4493
|
}
|
|
4515
|
-
const li = 500, di = 5e3, ui = 2e4,
|
|
4494
|
+
const li = 500, di = 5e3, ui = 2e4, Pn = Z.forwardRef(
|
|
4516
4495
|
({
|
|
4517
4496
|
name: e,
|
|
4518
4497
|
disabled: t,
|
|
@@ -4539,15 +4518,15 @@ const li = 500, di = 5e3, ui = 2e4, Dn = Z.forwardRef(
|
|
|
4539
4518
|
}, ui));
|
|
4540
4519
|
}, D = (A) => {
|
|
4541
4520
|
A.preventDefault();
|
|
4542
|
-
const
|
|
4543
|
-
w.current =
|
|
4521
|
+
const O = !w.current;
|
|
4522
|
+
w.current = O, I(), d(O), y({
|
|
4544
4523
|
announcementTimeout: li,
|
|
4545
4524
|
politeness: "assertive",
|
|
4546
|
-
message:
|
|
4547
|
-
}), a && a(
|
|
4525
|
+
message: O ? "Characters hidden" : "Characters showing"
|
|
4526
|
+
}), a && a(O);
|
|
4548
4527
|
}, M = (A) => {
|
|
4549
|
-
var
|
|
4550
|
-
const { relatedTarget: R } = A, V = (
|
|
4528
|
+
var O;
|
|
4529
|
+
const { relatedTarget: R } = A, V = (O = $.current) == null ? void 0 : O.parentElement;
|
|
4551
4530
|
V != null && V.contains(R) || c && c();
|
|
4552
4531
|
}, S = (A) => {
|
|
4553
4532
|
I(), o && o(A), M(A);
|
|
@@ -4558,7 +4537,7 @@ const li = 500, di = 5e3, ui = 2e4, Dn = Z.forwardRef(
|
|
|
4558
4537
|
};
|
|
4559
4538
|
return se(() => () => {
|
|
4560
4539
|
g.current && clearTimeout(g.current);
|
|
4561
|
-
}, []), /* @__PURE__ */
|
|
4540
|
+
}, []), /* @__PURE__ */ Q(at, { children: [
|
|
4562
4541
|
/* @__PURE__ */ h(
|
|
4563
4542
|
or,
|
|
4564
4543
|
{
|
|
@@ -4582,7 +4561,7 @@ const li = 500, di = 5e3, ui = 2e4, Dn = Z.forwardRef(
|
|
|
4582
4561
|
}
|
|
4583
4562
|
),
|
|
4584
4563
|
/* @__PURE__ */ h(
|
|
4585
|
-
|
|
4564
|
+
xn,
|
|
4586
4565
|
{
|
|
4587
4566
|
role: "status",
|
|
4588
4567
|
politeness: p.politeness,
|
|
@@ -4593,7 +4572,7 @@ const li = 500, di = 5e3, ui = 2e4, Dn = Z.forwardRef(
|
|
|
4593
4572
|
] });
|
|
4594
4573
|
}
|
|
4595
4574
|
);
|
|
4596
|
-
|
|
4575
|
+
Pn.displayName = "TextInputMask";
|
|
4597
4576
|
/*!
|
|
4598
4577
|
@versini/ui-textinput v3.0.17
|
|
4599
4578
|
© 2025 gizmette.com
|
|
@@ -4607,7 +4586,7 @@ try {
|
|
|
4607
4586
|
});
|
|
4608
4587
|
} catch {
|
|
4609
4588
|
}
|
|
4610
|
-
const hi = "ASK! ME! ANYTHING!",
|
|
4589
|
+
const hi = "ASK! ME! ANYTHING!", Dn = "Callisto", fi = "Log in", mi = "Sign in with a Passkey", mc = "Log out", pi = "Password", pc = "Profile", gc = "Settings", yc = "Chat history", Ec = "About", bc = "Type your question here", Sc = "{{clipboard}}", wc = `Sometimes, ${Dn} hallucinates. Review important details.`, Tc = "Prompts are pre-filled menus available on the main screen, to help you quickly start requests. If you select the 'Temporary Chat' checkbox, the corresponding chat will not be saved. If you select the 'Clipboard Access' checkbox, your clipboard content (if any) will be provided to the request.", _c = {
|
|
4611
4590
|
PREFERENCES: {
|
|
4612
4591
|
TITLE: "User profile",
|
|
4613
4592
|
NAME: "Name",
|
|
@@ -4644,12 +4623,12 @@ const hi = "ASK! ME! ANYTHING!", Ln = "Callisto", fi = "Log in", mi = "Sign in w
|
|
|
4644
4623
|
},
|
|
4645
4624
|
SETTINGS_DETAILS: {
|
|
4646
4625
|
TITLE: "Chat Details",
|
|
4647
|
-
INSTRUCTION: "This option adds individual statistics for each messages under their respective bubbles, such as
|
|
4626
|
+
INSTRUCTION: "This option adds individual statistics for each messages under their respective bubbles, such as model name, and more."
|
|
4648
4627
|
}
|
|
4649
|
-
}, gi = () => /* @__PURE__ */
|
|
4628
|
+
}, gi = () => /* @__PURE__ */ Q("div", { className: "flex items-center justify-center", children: [
|
|
4650
4629
|
/* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(Mo, {}) }),
|
|
4651
|
-
/* @__PURE__ */
|
|
4652
|
-
/* @__PURE__ */ h("h1", { children:
|
|
4630
|
+
/* @__PURE__ */ Q("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
4631
|
+
/* @__PURE__ */ h("h1", { children: Dn }),
|
|
4653
4632
|
/* @__PURE__ */ h("h2", { children: hi })
|
|
4654
4633
|
] })
|
|
4655
4634
|
] }), yi = () => {
|
|
@@ -4667,7 +4646,7 @@ const hi = "ASK! ME! ANYTHING!", Ln = "Callisto", fi = "Log in", mi = "Sign in w
|
|
|
4667
4646
|
}, 500);
|
|
4668
4647
|
}), se(() => {
|
|
4669
4648
|
t && o(t);
|
|
4670
|
-
}, [t]), /* @__PURE__ */ h(at, { children: /* @__PURE__ */
|
|
4649
|
+
}, [t]), /* @__PURE__ */ h(at, { children: /* @__PURE__ */ Q(
|
|
4671
4650
|
Go,
|
|
4672
4651
|
{
|
|
4673
4652
|
className: ho({
|
|
@@ -4685,7 +4664,7 @@ const hi = "ASK! ME! ANYTHING!", Ln = "Callisto", fi = "Log in", mi = "Sign in w
|
|
|
4685
4664
|
children: /* @__PURE__ */ h(gi, {})
|
|
4686
4665
|
}
|
|
4687
4666
|
),
|
|
4688
|
-
/* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(Fo, { alignHorizontal: "center", children: /* @__PURE__ */ h(_e, { span: 6, children: /* @__PURE__ */
|
|
4667
|
+
/* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(Fo, { alignHorizontal: "center", children: /* @__PURE__ */ h(_e, { span: 6, children: /* @__PURE__ */ Q(Uo, { mode: "dark", children: [
|
|
4689
4668
|
/* @__PURE__ */ h(_e, { span: 12, className: "mt-7", children: s && /* @__PURE__ */ h("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: s }) }),
|
|
4690
4669
|
/* @__PURE__ */ h(_e, { span: 12, children: /* @__PURE__ */ h(
|
|
4691
4670
|
or,
|
|
@@ -4709,7 +4688,7 @@ const hi = "ASK! ME! ANYTHING!", Ln = "Callisto", fi = "Log in", mi = "Sign in w
|
|
|
4709
4688
|
}
|
|
4710
4689
|
) }),
|
|
4711
4690
|
/* @__PURE__ */ h(_e, { span: 12, children: /* @__PURE__ */ h(
|
|
4712
|
-
|
|
4691
|
+
Pn,
|
|
4713
4692
|
{
|
|
4714
4693
|
className: "mt-7",
|
|
4715
4694
|
required: !0,
|
|
@@ -4741,7 +4720,7 @@ const hi = "ASK! ME! ANYTHING!", Ln = "Callisto", fi = "Log in", mi = "Sign in w
|
|
|
4741
4720
|
}
|
|
4742
4721
|
) }),
|
|
4743
4722
|
/* @__PURE__ */ h(_e, { span: 12, children: /* @__PURE__ */ h(
|
|
4744
|
-
|
|
4723
|
+
kn,
|
|
4745
4724
|
{
|
|
4746
4725
|
mode: "light",
|
|
4747
4726
|
focusMode: "light",
|
|
@@ -4752,7 +4731,7 @@ const hi = "ASK! ME! ANYTHING!", Ln = "Callisto", fi = "Log in", mi = "Sign in w
|
|
|
4752
4731
|
children: fi
|
|
4753
4732
|
}
|
|
4754
4733
|
) }),
|
|
4755
|
-
!fo() && /* @__PURE__ */
|
|
4734
|
+
!fo() && /* @__PURE__ */ Q(at, { children: [
|
|
4756
4735
|
/* @__PURE__ */ h(_e, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
|
4757
4736
|
/* @__PURE__ */ h(_e, { span: 12, children: /* @__PURE__ */ h(
|
|
4758
4737
|
ct,
|
|
@@ -4772,20 +4751,20 @@ const hi = "ASK! ME! ANYTHING!", Ln = "Callisto", fi = "Log in", mi = "Sign in w
|
|
|
4772
4751
|
]
|
|
4773
4752
|
}
|
|
4774
4753
|
) });
|
|
4775
|
-
}, Ei = new URL(document.location.href).searchParams, Hr = !!Ei.get("debug") || !1, bi =
|
|
4754
|
+
}, Ei = new URL(document.location.href).searchParams, Hr = !!Ei.get("debug") || !1, bi = Kn(() => import(
|
|
4776
4755
|
/* webpackChunkName: "LazyApp" */
|
|
4777
|
-
"./App.
|
|
4756
|
+
"./App.Bdb192pb.js"
|
|
4778
4757
|
).then((e) => e.App)), Kr = ({
|
|
4779
4758
|
isComponent: e,
|
|
4780
4759
|
headerHeight: t
|
|
4781
4760
|
}) => {
|
|
4782
4761
|
const { isAuthenticated: r } = pn();
|
|
4783
|
-
return r ? /* @__PURE__ */ h(
|
|
4762
|
+
return r ? /* @__PURE__ */ h(Vn, { fallback: /* @__PURE__ */ h("div", {}), children: /* @__PURE__ */ h(bi, { isComponent: e, headerHeight: t }) }) : /* @__PURE__ */ h(yi, {});
|
|
4784
4763
|
}, Si = ({
|
|
4785
4764
|
isComponent: e = !1,
|
|
4786
4765
|
headerHeight: t = 0,
|
|
4787
4766
|
domain: r = lo
|
|
4788
|
-
}) => (Zs(),
|
|
4767
|
+
}) => (Zs(), Rn ? /* @__PURE__ */ h(
|
|
4789
4768
|
Ir,
|
|
4790
4769
|
{
|
|
4791
4770
|
clientId: Ar,
|
|
@@ -4794,7 +4773,7 @@ const hi = "ASK! ME! ANYTHING!", Ln = "Callisto", fi = "Log in", mi = "Sign in w
|
|
|
4794
4773
|
endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
|
|
4795
4774
|
children: /* @__PURE__ */ h(Kr, { isComponent: e, headerHeight: t })
|
|
4796
4775
|
}
|
|
4797
|
-
) : /* @__PURE__ */ h(Ir, { clientId: Ar, domain: r, debug: Hr, children: /* @__PURE__ */ h(Kr, { isComponent: e, headerHeight: t }) })),
|
|
4776
|
+
) : /* @__PURE__ */ h(Ir, { clientId: Ar, domain: r, debug: Hr, children: /* @__PURE__ */ h(Kr, { isComponent: e, headerHeight: t }) })), Ic = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
|
|
4798
4777
|
Si,
|
|
4799
4778
|
{
|
|
4800
4779
|
isComponent: !0,
|
|
@@ -4803,75 +4782,72 @@ const hi = "ASK! ME! ANYTHING!", Ln = "Callisto", fi = "Log in", mi = "Sign in w
|
|
|
4803
4782
|
}
|
|
4804
4783
|
);
|
|
4805
4784
|
export {
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4785
|
+
Ec as ABOUT_TITLE,
|
|
4786
|
+
Vi as ACTION_RESET_PROMPT,
|
|
4787
|
+
Mi as ACTION_SEARCH,
|
|
4788
|
+
Hi as ACTION_SORT,
|
|
4789
|
+
Ki as ACTION_TOGGLE_PROMPT,
|
|
4790
|
+
Dn as APP_NAME,
|
|
4791
|
+
kn as C,
|
|
4792
|
+
_c as CARDS,
|
|
4793
|
+
Sc as CLIPBOARD_PROMPT,
|
|
4794
|
+
Li as DEFAULT_AI_PROVIDER,
|
|
4795
|
+
Xi as DEFAULT_ICON_ACTION_SIZE,
|
|
4796
|
+
Di as ERROR_MESSAGE,
|
|
4797
|
+
wc as FOOTER_DISCLAIMER,
|
|
4798
|
+
yc as HISTORY_TITLE,
|
|
4820
4799
|
Go as I,
|
|
4821
|
-
|
|
4822
|
-
|
|
4800
|
+
ji as INFINITE_SCROLL_LIMIT,
|
|
4801
|
+
Yi as INFINITE_SCROLL_THRESHOLD,
|
|
4802
|
+
bc as INPUT_PLACEHOLDER_TEXT,
|
|
4823
4803
|
Fo as L,
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4804
|
+
Gi as LOCAL_STORAGE_CHAT_DETAILS,
|
|
4805
|
+
Wi as LOCAL_STORAGE_PREFIX,
|
|
4806
|
+
Ji as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
|
4807
|
+
Bi as LOCAL_STORAGE_SEARCH,
|
|
4808
|
+
Fi as LOCAL_STORAGE_SORT,
|
|
4809
|
+
mc as LOG_OUT,
|
|
4830
4810
|
gi as Logo,
|
|
4831
4811
|
xe as M,
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4812
|
+
pc as PROFILE_TITLE,
|
|
4813
|
+
Tc as PROMPTS_DESCRIPTION,
|
|
4814
|
+
qi as PROMPT_CLASSNAME,
|
|
4815
|
+
zi as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
4816
|
+
Ui as PROVIDER_ANTHROPIC,
|
|
4817
|
+
$i as PROVIDER_OPENAI,
|
|
4838
4818
|
Uo as R,
|
|
4839
4819
|
xi as ROLE_ASSISTANT,
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
Pi as ROLE_SYSTEM,
|
|
4843
|
-
Ci as ROLE_USER,
|
|
4820
|
+
Pi as ROLE_INTERNAL,
|
|
4821
|
+
Oi as ROLE_USER,
|
|
4844
4822
|
Be as SERVICE_TYPES,
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
yc as debounce,
|
|
4854
|
-
pc as durationFormatter,
|
|
4823
|
+
gc as SETTINGS_TITLE,
|
|
4824
|
+
Ic as SassySaint,
|
|
4825
|
+
Zi as UI_BUTTON_SCROLL_BUFFER,
|
|
4826
|
+
ec as UI_DEFAULT_MAIN_HEIGHT,
|
|
4827
|
+
Qi as UI_FOOTER_BUFFER,
|
|
4828
|
+
fc as convertCamelCaseToReadable,
|
|
4829
|
+
uc as debounce,
|
|
4830
|
+
lc as durationFormatter,
|
|
4855
4831
|
yt as f,
|
|
4856
4832
|
or as fe,
|
|
4857
|
-
|
|
4833
|
+
ic as getCurrentGeoLocation,
|
|
4858
4834
|
ho as getMainPaddingClass,
|
|
4859
4835
|
uo as getMessageContaintWrapperClass,
|
|
4860
4836
|
fo as isElectron,
|
|
4861
|
-
|
|
4837
|
+
hc as isProbablyiPhone,
|
|
4862
4838
|
_e as j,
|
|
4863
4839
|
Ko as l,
|
|
4864
|
-
|
|
4865
|
-
gc as pluralize,
|
|
4840
|
+
dc as pluralize,
|
|
4866
4841
|
ct as re,
|
|
4867
|
-
|
|
4868
|
-
|
|
4842
|
+
cc as renderDataAsList,
|
|
4843
|
+
zs as serverUrl,
|
|
4869
4844
|
zt as serviceCall,
|
|
4870
|
-
|
|
4845
|
+
tc as setNewProvider,
|
|
4871
4846
|
pn as un,
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4847
|
+
ac as useChatsHistory,
|
|
4848
|
+
sc as usePreloadChatsHistory,
|
|
4849
|
+
qs as useSWR,
|
|
4850
|
+
oc as useServerCapabilities,
|
|
4851
|
+
nc as useUserChatStats,
|
|
4852
|
+
rc as useUserPreferences
|
|
4877
4853
|
};
|