@versini/sassysaint 4.1.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { jsx as c, jsxs as I, Fragment as le } from "react/jsx-runtime";
2
- import V, { createContext as ar, useReducer as ft, useRef as G, useCallback as z, useEffect as j, useContext as yt, useSyncExternalStore as nr, useId as bt, useMemo as Et, useState as J, useLayoutEffect as or, lazy as wt, Suspense as Tt } from "react";
2
+ import V, { createContext as rr, useReducer as ft, useRef as G, useCallback as z, useEffect as j, useContext as yt, useSyncExternalStore as ar, useId as bt, useMemo as Et, useState as J, useLayoutEffect as nr, lazy as wt, Suspense as Tt } from "react";
3
3
  import f from "clsx";
4
- var sr = Object.defineProperty, ir = (e, t, r) => t in e ? sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Le = (e, t, r) => ir(e, typeof t != "symbol" ? t + "" : t, r);
4
+ var or = Object.defineProperty, sr = (e, t, r) => t in e ? or(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Le = (e, t, r) => sr(e, typeof t != "symbol" ? t + "" : t, r);
5
5
  /*!
6
6
  @versini/auth-provider v7.3.0
7
7
  © 2024 gizmette.com
@@ -47,7 +47,7 @@ let _ = class extends Error {
47
47
  super(t, { cause: a }), this.name = n ?? a.name, this.code = r;
48
48
  }
49
49
  };
50
- function cr({ error: e, options: t }) {
50
+ function ir({ error: e, options: t }) {
51
51
  var a, n;
52
52
  const { publicKey: r } = t;
53
53
  if (!r)
@@ -125,7 +125,7 @@ function cr({ error: e, options: t }) {
125
125
  }
126
126
  return e;
127
127
  }
128
- class lr {
128
+ class cr {
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 lr {
141
141
  }
142
142
  }
143
143
  }
144
- const At = new lr(), dr = ["cross-platform", "platform"];
145
- function vt(e) {
146
- if (e && !(dr.indexOf(e) < 0))
144
+ const vt = new cr(), lr = ["cross-platform", "platform"];
145
+ function At(e) {
146
+ if (e && !(lr.indexOf(e) < 0))
147
147
  return e;
148
148
  }
149
- async function ur(e) {
149
+ async function dr(e) {
150
150
  var m;
151
151
  if (!ze())
152
152
  throw new Error("WebAuthn is not supported in this browser");
@@ -159,12 +159,12 @@ async function ur(e) {
159
159
  },
160
160
  excludeCredentials: (m = e.excludeCredentials) == null ? void 0 : m.map(It)
161
161
  } };
162
- t.signal = At.createNewAbortSignal();
162
+ t.signal = vt.createNewAbortSignal();
163
163
  let r;
164
164
  try {
165
165
  r = await navigator.credentials.create(t);
166
166
  } catch (l) {
167
- throw cr({ error: l, options: t });
167
+ throw ir({ error: l, options: t });
168
168
  }
169
169
  if (!r)
170
170
  throw new Error("Registration was not completed");
@@ -206,20 +206,20 @@ async function ur(e) {
206
206
  },
207
207
  type: s,
208
208
  clientExtensionResults: r.getClientExtensionResults(),
209
- authenticatorAttachment: vt(r.authenticatorAttachment)
209
+ authenticatorAttachment: At(r.authenticatorAttachment)
210
210
  };
211
211
  }
212
212
  function Me(e, t) {
213
213
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
214
214
  `, t);
215
215
  }
216
- function mr() {
216
+ function ur() {
217
217
  if (!ze())
218
218
  return new Promise((t) => t(!1));
219
219
  const e = window.PublicKeyCredential;
220
220
  return e.isConditionalMediationAvailable === void 0 ? new Promise((t) => t(!1)) : e.isConditionalMediationAvailable();
221
221
  }
222
- function hr({ error: e, options: t }) {
222
+ function mr({ 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 hr({ error: e, options: t }) {
260
260
  }
261
261
  return e;
262
262
  }
263
- async function pr(e, t = !1) {
263
+ async function hr(e, t = !1) {
264
264
  var m, l;
265
265
  if (!ze())
266
266
  throw new Error("WebAuthn is not supported in this browser");
@@ -272,18 +272,18 @@ async function pr(e, t = !1) {
272
272
  allowCredentials: r
273
273
  }, n = {};
274
274
  if (t) {
275
- if (!await mr())
275
+ if (!await ur())
276
276
  throw Error("Browser does not support WebAuthn autofill");
277
277
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1)
278
278
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
279
279
  n.mediation = "conditional", a.allowCredentials = [];
280
280
  }
281
- n.publicKey = a, n.signal = At.createNewAbortSignal();
281
+ n.publicKey = a, n.signal = vt.createNewAbortSignal();
282
282
  let o;
283
283
  try {
284
284
  o = await navigator.credentials.get(n);
285
285
  } catch (d) {
286
- throw hr({ error: d, options: n });
286
+ throw mr({ error: d, options: n });
287
287
  }
288
288
  if (!o)
289
289
  throw new Error("Authentication was not completed");
@@ -300,7 +300,7 @@ async function pr(e, t = !1) {
300
300
  },
301
301
  type: h,
302
302
  clientExtensionResults: o.getClientExtensionResults(),
303
- authenticatorAttachment: vt(o.authenticatorAttachment)
303
+ authenticatorAttachment: At(o.authenticatorAttachment)
304
304
  };
305
305
  }
306
306
  /*!
@@ -338,7 +338,7 @@ const ne = {
338
338
  SCOPES_KEY: "scopes",
339
339
  CLIENT_ID_KEY: "aud",
340
340
  ISSUER: "gizmette.com"
341
- }, gr = `-----BEGIN PUBLIC KEY-----
341
+ }, pr = `-----BEGIN PUBLIC KEY-----
342
342
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
343
343
  w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
344
344
  i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
@@ -352,14 +352,14 @@ awIDAQAB
352
352
  LOGIN: "login",
353
353
  REFRESH: "refresh"
354
354
  }, Ne = crypto, _t = (e) => e instanceof CryptoKey, me = new TextEncoder(), de = new TextDecoder();
355
- function fr(...e) {
355
+ function gr(...e) {
356
356
  const t = e.reduce((n, { length: o }) => n + o, 0), r = new Uint8Array(t);
357
357
  let a = 0;
358
358
  for (const n of e)
359
359
  r.set(n, a), a += n.length;
360
360
  return r;
361
361
  }
362
- const yr = (e) => {
362
+ const fr = (e) => {
363
363
  const t = atob(e), r = new Uint8Array(t.length);
364
364
  for (let a = 0; a < t.length; a++)
365
365
  r[a] = t.charCodeAt(a);
@@ -368,7 +368,7 @@ const yr = (e) => {
368
368
  let t = e;
369
369
  t instanceof Uint8Array && (t = de.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
370
370
  try {
371
- return yr(t);
371
+ return fr(t);
372
372
  } catch {
373
373
  throw new TypeError("The input to be decoded is not correctly encoded.");
374
374
  }
@@ -398,7 +398,7 @@ class tt extends q {
398
398
  super(t), this.code = "ERR_JWT_EXPIRED", this.claim = a, this.reason = n, this.payload = r;
399
399
  }
400
400
  }
401
- class br extends q {
401
+ class yr extends q {
402
402
  constructor() {
403
403
  super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
404
404
  }
@@ -414,7 +414,7 @@ class F extends q {
414
414
  return "ERR_JOSE_NOT_SUPPORTED";
415
415
  }
416
416
  }
417
- let v = class extends q {
417
+ let A = class extends q {
418
418
  constructor() {
419
419
  super(...arguments), this.code = "ERR_JWS_INVALID";
420
420
  }
@@ -429,7 +429,7 @@ let v = class extends q {
429
429
  return "ERR_JWT_INVALID";
430
430
  }
431
431
  };
432
- class Er extends q {
432
+ class br extends q {
433
433
  constructor() {
434
434
  super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
435
435
  }
@@ -446,7 +446,7 @@ function he(e, t) {
446
446
  function Ue(e) {
447
447
  return parseInt(e.name.slice(4), 10);
448
448
  }
449
- function wr(e) {
449
+ function Er(e) {
450
450
  switch (e) {
451
451
  case "ES256":
452
452
  return "P-256";
@@ -458,7 +458,7 @@ function wr(e) {
458
458
  throw new Error("unreachable");
459
459
  }
460
460
  }
461
- function Tr(e, t) {
461
+ function wr(e, t) {
462
462
  if (t.length && !t.some((r) => e.usages.includes(r))) {
463
463
  let r = "CryptoKey does not support this operation, its usages must include ";
464
464
  if (t.length > 2) {
@@ -468,7 +468,7 @@ function Tr(e, t) {
468
468
  throw new TypeError(r);
469
469
  }
470
470
  }
471
- function Ir(e, t, ...r) {
471
+ function Tr(e, t, ...r) {
472
472
  switch (t) {
473
473
  case "HS256":
474
474
  case "HS384":
@@ -510,7 +510,7 @@ function Ir(e, t, ...r) {
510
510
  case "ES512": {
511
511
  if (!he(e.algorithm, "ECDSA"))
512
512
  throw B("ECDSA");
513
- const a = wr(t);
513
+ const a = Er(t);
514
514
  if (e.algorithm.namedCurve !== a)
515
515
  throw B(a, "algorithm.namedCurve");
516
516
  break;
@@ -518,7 +518,7 @@ function Ir(e, t, ...r) {
518
518
  default:
519
519
  throw new TypeError("CryptoKey does not support this operation");
520
520
  }
521
- Tr(e, r);
521
+ wr(e, r);
522
522
  }
523
523
  function Rt(e, t, ...r) {
524
524
  var a;
@@ -532,7 +532,7 @@ const rt = (e, ...t) => Rt("Key must be ", e, ...t);
532
532
  function Nt(e, t, ...r) {
533
533
  return Rt(`Key for the ${e} algorithm must be `, t, ...r);
534
534
  }
535
- const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Ae = ["CryptoKey"], Sr = (...e) => {
535
+ const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ve = ["CryptoKey"], Ir = (...e) => {
536
536
  const t = e.filter(Boolean);
537
537
  if (t.length === 0 || t.length === 1)
538
538
  return !0;
@@ -551,11 +551,11 @@ const xt = (e) => _t(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) ===
551
551
  }
552
552
  return !0;
553
553
  };
554
- function Ar(e) {
554
+ function Sr(e) {
555
555
  return typeof e == "object" && e !== null;
556
556
  }
557
- function ve(e) {
558
- if (!Ar(e) || Object.prototype.toString.call(e) !== "[object Object]")
557
+ function Ae(e) {
558
+ if (!Sr(e) || Object.prototype.toString.call(e) !== "[object Object]")
559
559
  return !1;
560
560
  if (Object.getPrototypeOf(e) === null)
561
561
  return !0;
@@ -571,7 +571,7 @@ const vr = (e, t) => {
571
571
  throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
572
572
  }
573
573
  };
574
- function kr(e) {
574
+ function Ar(e) {
575
575
  let t, r;
576
576
  switch (e.kty) {
577
577
  case "RSA": {
@@ -643,10 +643,10 @@ function kr(e) {
643
643
  }
644
644
  return { algorithm: t, keyUsages: r };
645
645
  }
646
- const _r = async (e) => {
646
+ const kr = async (e) => {
647
647
  if (!e.alg)
648
648
  throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
649
- const { algorithm: t, keyUsages: r } = kr(e), a = [
649
+ const { algorithm: t, keyUsages: r } = Ar(e), a = [
650
650
  t,
651
651
  e.ext ?? !1,
652
652
  e.key_ops ?? r
@@ -658,21 +658,21 @@ const Ot = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
658
658
  let n = e.get(t);
659
659
  if (n != null && n[a])
660
660
  return n[a];
661
- const o = await _r({ ...r, alg: a });
661
+ const o = await kr({ ...r, alg: a });
662
662
  return n ? n[a] = o : e.set(t, { [a]: o }), o;
663
- }, Rr = (e, t) => {
663
+ }, _r = (e, t) => {
664
664
  if (Ot(e)) {
665
665
  let r = e.export({ format: "jwk" });
666
666
  return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Ct(r.k) : (Ke || (Ke = /* @__PURE__ */ new WeakMap()), Pt(Ke, e, r, t));
667
667
  }
668
668
  return e;
669
- }, Nr = (e, t) => {
669
+ }, Rr = (e, t) => {
670
670
  if (Ot(e)) {
671
671
  let r = e.export({ format: "jwk" });
672
672
  return r.k ? Ct(r.k) : (He || (He = /* @__PURE__ */ new WeakMap()), Pt(He, e, r, t));
673
673
  }
674
674
  return e;
675
- }, xr = { normalizePublicKey: Rr, normalizePrivateKey: Nr }, Y = (e, t, r = 0) => {
675
+ }, Nr = { normalizePublicKey: _r, normalizePrivateKey: Rr }, Y = (e, t, r = 0) => {
676
676
  r === 0 && (t.unshift(t.length), t.unshift(6));
677
677
  const a = e.indexOf(t[0], r);
678
678
  if (a === -1)
@@ -698,7 +698,7 @@ const Ot = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
698
698
  default:
699
699
  throw new F("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
700
700
  }
701
- }, Cr = async (e, t, r, a, n) => {
701
+ }, xr = async (e, t, r, a, n) => {
702
702
  let o, s;
703
703
  const i = new Uint8Array(atob(r.replace(e, "")).split("").map((u) => u.charCodeAt(0)));
704
704
  switch (a) {
@@ -745,32 +745,32 @@ const Ot = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject",
745
745
  throw new F('Invalid or unsupported "alg" (Algorithm) value');
746
746
  }
747
747
  return Ne.subtle.importKey(t, i, o, !1, s);
748
- }, Or = (e, t, r) => Cr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
749
- async function Pr(e, t, r) {
748
+ }, Cr = (e, t, r) => xr(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "spki", e, t);
749
+ async function Or(e, t, r) {
750
750
  if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
751
751
  throw new TypeError('"spki" must be SPKI formatted string');
752
- return Or(e, t);
752
+ return Cr(e, t);
753
753
  }
754
- const we = (e) => e == null ? void 0 : e[Symbol.toStringTag], Dr = (e, t) => {
754
+ const we = (e) => e == null ? void 0 : e[Symbol.toStringTag], Pr = (e, t) => {
755
755
  if (!(t instanceof Uint8Array)) {
756
756
  if (!xt(t))
757
- throw new TypeError(Nt(e, t, ...Ae, "Uint8Array"));
757
+ throw new TypeError(Nt(e, t, ...ve, "Uint8Array"));
758
758
  if (t.type !== "secret")
759
759
  throw new TypeError(`${we(t)} instances for symmetric algorithms must be of type "secret"`);
760
760
  }
761
- }, $r = (e, t, r) => {
761
+ }, Dr = (e, t, r) => {
762
762
  if (!xt(t))
763
- throw new TypeError(Nt(e, t, ...Ae));
763
+ throw new TypeError(Nt(e, t, ...ve));
764
764
  if (t.type === "secret")
765
765
  throw new TypeError(`${we(t)} instances for asymmetric algorithms must not be of type "secret"`);
766
766
  if (t.algorithm && r === "verify" && t.type === "private")
767
767
  throw new TypeError(`${we(t)} instances for asymmetric algorithm verifying must be of type "public"`);
768
768
  if (t.algorithm && r === "encrypt" && t.type === "private")
769
769
  throw new TypeError(`${we(t)} instances for asymmetric algorithm encryption must be of type "public"`);
770
- }, Lr = (e, t, r) => {
771
- e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? Dr(e, t) : $r(e, t, r);
770
+ }, $r = (e, t, r) => {
771
+ e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? Pr(e, t) : Dr(e, t, r);
772
772
  };
773
- function Mr(e, t, r, a, n) {
773
+ function Lr(e, t, r, a, n) {
774
774
  if (n.crit !== void 0 && (a == null ? void 0 : a.crit) === void 0)
775
775
  throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
776
776
  if (!a || a.crit === void 0)
@@ -789,13 +789,13 @@ function Mr(e, t, r, a, n) {
789
789
  }
790
790
  return new Set(a.crit);
791
791
  }
792
- const Ur = (e, t) => {
792
+ const Mr = (e, t) => {
793
793
  if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
794
794
  throw new TypeError(`"${e}" option must be an array of strings`);
795
795
  if (t)
796
796
  return new Set(t);
797
797
  };
798
- function Hr(e, t) {
798
+ function Ur(e, t) {
799
799
  const r = `SHA-${e.slice(-3)}`;
800
800
  switch (e) {
801
801
  case "HS256":
@@ -820,100 +820,100 @@ function Hr(e, t) {
820
820
  throw new F(`alg ${e} is not supported either by JOSE or your javascript runtime`);
821
821
  }
822
822
  }
823
- async function Kr(e, t, r) {
824
- if (t = await xr.normalizePublicKey(t, e), _t(t))
825
- return Ir(t, e, r), t;
823
+ async function Hr(e, t, r) {
824
+ if (t = await Nr.normalizePublicKey(t, e), _t(t))
825
+ return Tr(t, e, r), t;
826
826
  if (t instanceof Uint8Array) {
827
827
  if (!e.startsWith("HS"))
828
- throw new TypeError(rt(t, ...Ae));
828
+ throw new TypeError(rt(t, ...ve));
829
829
  return Ne.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
830
830
  }
831
- throw new TypeError(rt(t, ...Ae, "Uint8Array"));
831
+ throw new TypeError(rt(t, ...ve, "Uint8Array"));
832
832
  }
833
- const Br = async (e, t, r, a) => {
834
- const n = await Kr(e, t, "verify");
833
+ const Kr = async (e, t, r, a) => {
834
+ const n = await Hr(e, t, "verify");
835
835
  vr(e, n);
836
- const o = Hr(e, n.algorithm);
836
+ const o = Ur(e, n.algorithm);
837
837
  try {
838
838
  return await Ne.subtle.verify(o, n, r, a);
839
839
  } catch {
840
840
  return !1;
841
841
  }
842
842
  };
843
- async function Wr(e, t, r) {
844
- if (!ve(e))
845
- throw new v("Flattened JWS must be an object");
843
+ async function Br(e, t, r) {
844
+ if (!Ae(e))
845
+ throw new A("Flattened JWS must be an object");
846
846
  if (e.protected === void 0 && e.header === void 0)
847
- throw new v('Flattened JWS must have either of the "protected" or "header" members');
847
+ throw new A('Flattened JWS must have either of the "protected" or "header" members');
848
848
  if (e.protected !== void 0 && typeof e.protected != "string")
849
- throw new v("JWS Protected Header incorrect type");
849
+ throw new A("JWS Protected Header incorrect type");
850
850
  if (e.payload === void 0)
851
- throw new v("JWS Payload missing");
851
+ throw new A("JWS Payload missing");
852
852
  if (typeof e.signature != "string")
853
- throw new v("JWS Signature missing or incorrect type");
854
- if (e.header !== void 0 && !ve(e.header))
855
- throw new v("JWS Unprotected Header incorrect type");
853
+ throw new A("JWS Signature missing or incorrect type");
854
+ if (e.header !== void 0 && !Ae(e.header))
855
+ throw new A("JWS Unprotected Header incorrect type");
856
856
  let a = {};
857
857
  if (e.protected)
858
858
  try {
859
859
  const y = ie(e.protected);
860
860
  a = JSON.parse(de.decode(y));
861
861
  } catch {
862
- throw new v("JWS Protected Header is invalid");
862
+ throw new A("JWS Protected Header is invalid");
863
863
  }
864
- if (!Sr(a, e.header))
865
- throw new v("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
864
+ if (!Ir(a, e.header))
865
+ throw new A("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
866
866
  const n = {
867
867
  ...a,
868
868
  ...e.header
869
- }, o = Mr(v, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
869
+ }, o = Lr(A, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, n);
870
870
  let s = !0;
871
871
  if (o.has("b64") && (s = a.b64, typeof s != "boolean"))
872
- throw new v('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
872
+ throw new A('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
873
873
  const { alg: i } = n;
874
874
  if (typeof i != "string" || !i)
875
- throw new v('JWS "alg" (Algorithm) Header Parameter missing or invalid');
876
- const u = r && Ur("algorithms", r.algorithms);
875
+ throw new A('JWS "alg" (Algorithm) Header Parameter missing or invalid');
876
+ const u = r && Mr("algorithms", r.algorithms);
877
877
  if (u && !u.has(i))
878
- throw new br('"alg" (Algorithm) Header Parameter value not allowed');
878
+ throw new yr('"alg" (Algorithm) Header Parameter value not allowed');
879
879
  if (s) {
880
880
  if (typeof e.payload != "string")
881
- throw new v("JWS Payload must be a string");
881
+ throw new A("JWS Payload must be a string");
882
882
  } else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
883
- throw new v("JWS Payload must be a string or an Uint8Array instance");
883
+ throw new A("JWS Payload must be a string or an Uint8Array instance");
884
884
  let h = !1;
885
- typeof t == "function" && (t = await t(a, e), h = !0), Lr(i, t, "verify");
886
- const p = fr(me.encode(e.protected ?? ""), me.encode("."), typeof e.payload == "string" ? me.encode(e.payload) : e.payload);
885
+ typeof t == "function" && (t = await t(a, e), h = !0), $r(i, t, "verify");
886
+ const p = gr(me.encode(e.protected ?? ""), me.encode("."), typeof e.payload == "string" ? me.encode(e.payload) : e.payload);
887
887
  let m;
888
888
  try {
889
889
  m = ie(e.signature);
890
890
  } catch {
891
- throw new v("Failed to base64url decode the signature");
891
+ throw new A("Failed to base64url decode the signature");
892
892
  }
893
- if (!await Br(i, t, m, p))
894
- throw new Er();
893
+ if (!await Kr(i, t, m, p))
894
+ throw new br();
895
895
  let l;
896
896
  if (s)
897
897
  try {
898
898
  l = ie(e.payload);
899
899
  } catch {
900
- throw new v("Failed to base64url decode the payload");
900
+ throw new A("Failed to base64url decode the payload");
901
901
  }
902
902
  else typeof e.payload == "string" ? l = me.encode(e.payload) : l = e.payload;
903
903
  const d = { payload: l };
904
904
  return e.protected !== void 0 && (d.protectedHeader = a), e.header !== void 0 && (d.unprotectedHeader = e.header), h ? { ...d, key: t } : d;
905
905
  }
906
- async function Gr(e, t, r) {
906
+ async function Wr(e, t, r) {
907
907
  if (e instanceof Uint8Array && (e = de.decode(e)), typeof e != "string")
908
- throw new v("Compact JWS must be a string or Uint8Array");
908
+ throw new A("Compact JWS must be a string or Uint8Array");
909
909
  const { 0: a, 1: n, 2: o, length: s } = e.split(".");
910
910
  if (s !== 3)
911
- throw new v("Invalid Compact JWS");
912
- const i = await Wr({ payload: n, protected: a, signature: o }, t, r), u = { payload: i.payload, protectedHeader: i.protectedHeader };
911
+ throw new A("Invalid Compact JWS");
912
+ const i = await Br({ payload: n, protected: a, signature: o }, t, r), u = { payload: i.payload, protectedHeader: i.protectedHeader };
913
913
  return typeof t == "function" ? { ...u, key: i.key } : u;
914
914
  }
915
- const Vr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t * 24, Yr = je * 7, Jr = je * 365.25, Fr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, nt = (e) => {
916
- const t = Fr.exec(e);
915
+ const Gr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t * 24, Vr = je * 7, Yr = je * 365.25, Jr = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, nt = (e) => {
916
+ const t = Jr.exec(e);
917
917
  if (!t || t[4] && t[1])
918
918
  throw new TypeError("Invalid time period format");
919
919
  const r = parseFloat(t[2]), a = t[3].toLowerCase();
@@ -948,20 +948,20 @@ const Vr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
948
948
  case "week":
949
949
  case "weeks":
950
950
  case "w":
951
- n = Math.round(r * Yr);
951
+ n = Math.round(r * Vr);
952
952
  break;
953
953
  default:
954
- n = Math.round(r * Jr);
954
+ n = Math.round(r * Yr);
955
955
  break;
956
956
  }
957
957
  return t[1] === "-" || t[4] === "ago" ? -n : n;
958
- }, ot = (e) => e.toLowerCase().replace(/^application\//, ""), zr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, jr = (e, t, r = {}) => {
958
+ }, ot = (e) => e.toLowerCase().replace(/^application\//, ""), Fr = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, zr = (e, t, r = {}) => {
959
959
  let a;
960
960
  try {
961
961
  a = JSON.parse(de.decode(t));
962
962
  } catch {
963
963
  }
964
- if (!ve(a))
964
+ if (!Ae(a))
965
965
  throw new W("JWT Claims Set must be a top-level JSON object");
966
966
  const { typ: n } = r;
967
967
  if (n && (typeof e.typ != "string" || ot(e.typ) !== ot(n)))
@@ -975,7 +975,7 @@ const Vr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
975
975
  throw new $('unexpected "iss" claim value', a, "iss", "check_failed");
976
976
  if (i && a.sub !== i)
977
977
  throw new $('unexpected "sub" claim value', a, "sub", "check_failed");
978
- if (u && !zr(a.aud, typeof u == "string" ? [u] : u))
978
+ if (u && !Fr(a.aud, typeof u == "string" ? [u] : u))
979
979
  throw new $('unexpected "aud" claim value', a, "aud", "check_failed");
980
980
  let m;
981
981
  switch (typeof r.clockTolerance) {
@@ -991,7 +991,7 @@ const Vr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
991
991
  default:
992
992
  throw new TypeError("Invalid clockTolerance option type");
993
993
  }
994
- const { currentDate: l } = r, d = Vr(l || /* @__PURE__ */ new Date());
994
+ const { currentDate: l } = r, d = Gr(l || /* @__PURE__ */ new Date());
995
995
  if ((a.iat !== void 0 || h) && typeof a.iat != "number")
996
996
  throw new $('"iat" claim must be a number', a, "iat", "invalid");
997
997
  if (a.nbf !== void 0) {
@@ -1015,16 +1015,16 @@ const Vr = (e) => Math.floor(e.getTime() / 1e3), Dt = 60, $t = Dt * 60, je = $t
1015
1015
  }
1016
1016
  return a;
1017
1017
  };
1018
- async function qr(e, t, r) {
1018
+ async function jr(e, t, r) {
1019
1019
  var a;
1020
- const n = await Gr(e, t, r);
1020
+ const n = await Wr(e, t, r);
1021
1021
  if ((a = n.protectedHeader.crit) != null && a.includes("b64") && n.protectedHeader.b64 === !1)
1022
1022
  throw new W("JWTs MUST NOT use unencoded payload");
1023
- const o = { payload: jr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
1023
+ const o = { payload: zr(n.protectedHeader, n.payload, r), protectedHeader: n.protectedHeader };
1024
1024
  return typeof t == "function" ? { ...o, key: n.key } : o;
1025
1025
  }
1026
- const Qr = ie;
1027
- function Xr(e) {
1026
+ const qr = ie;
1027
+ function Qr(e) {
1028
1028
  if (typeof e != "string")
1029
1029
  throw new W("JWTs must use Compact JWS serialization, JWT must be a string");
1030
1030
  const { 1: t, length: r } = e.split(".");
@@ -1036,7 +1036,7 @@ function Xr(e) {
1036
1036
  throw new W("JWTs must contain a payload");
1037
1037
  let a;
1038
1038
  try {
1039
- a = Qr(t);
1039
+ a = qr(t);
1040
1040
  } catch {
1041
1041
  throw new W("Failed to base64url decode the payload");
1042
1042
  }
@@ -1046,22 +1046,22 @@ function Xr(e) {
1046
1046
  } catch {
1047
1047
  throw new W("Failed to parse the decoded payload as JSON");
1048
1048
  }
1049
- if (!ve(n))
1049
+ if (!Ae(n))
1050
1050
  throw new W("Invalid JWT Claims Set");
1051
1051
  return n;
1052
1052
  }
1053
1053
  const ce = async (e) => {
1054
1054
  try {
1055
- const t = k.ALG, r = await Pr(gr, t);
1056
- return await qr(e, r, {
1055
+ const t = k.ALG, r = await Or(pr, t);
1056
+ return await jr(e, r, {
1057
1057
  issuer: k.ISSUER
1058
1058
  });
1059
1059
  } catch {
1060
1060
  return;
1061
1061
  }
1062
- }, Zr = (e) => {
1062
+ }, Xr = (e) => {
1063
1063
  try {
1064
- return Xr(e);
1064
+ return Qr(e);
1065
1065
  } catch {
1066
1066
  return;
1067
1067
  }
@@ -1069,39 +1069,39 @@ const ce = async (e) => {
1069
1069
  var S = [];
1070
1070
  for (var Be = 0; Be < 256; ++Be)
1071
1071
  S.push((Be + 256).toString(16).slice(1));
1072
- function ea(e, t = 0) {
1072
+ function Zr(e, t = 0) {
1073
1073
  return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
1074
1074
  }
1075
- var pe, ta = new Uint8Array(16);
1076
- function ra() {
1075
+ var pe, ea = new Uint8Array(16);
1076
+ function ta() {
1077
1077
  if (!pe && (pe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !pe))
1078
1078
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1079
- return pe(ta);
1079
+ return pe(ea);
1080
1080
  }
1081
- var aa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1081
+ var ra = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1082
1082
  const st = {
1083
- randomUUID: aa
1083
+ randomUUID: ra
1084
1084
  };
1085
1085
  function it(e, t, r) {
1086
1086
  if (st.randomUUID && !t && !e)
1087
1087
  return st.randomUUID();
1088
1088
  e = e || {};
1089
- var a = e.random || (e.rng || ra)();
1090
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, ea(a);
1089
+ var a = e.random || (e.rng || ta)();
1090
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Zr(a);
1091
1091
  }
1092
- const ct = globalThis.crypto, na = (e) => `${it()}${it()}`.slice(0, e), oa = (e) => btoa(
1092
+ const ct = globalThis.crypto, aa = (e) => `${it()}${it()}`.slice(0, e), na = (e) => btoa(
1093
1093
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
1094
1094
  );
1095
- async function sa(e) {
1095
+ async function oa(e) {
1096
1096
  if (!ct.subtle)
1097
1097
  throw new Error(
1098
1098
  "crypto.subtle is available only in secure contexts (HTTPS)."
1099
1099
  );
1100
1100
  const t = new TextEncoder().encode(e), r = await ct.subtle.digest("SHA-256", t);
1101
- return oa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
1101
+ return na(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
1102
1102
  }
1103
- async function ia(e) {
1104
- const t = na(43), r = await sa(t);
1103
+ async function sa(e) {
1104
+ const t = aa(43), r = await oa(t);
1105
1105
  return {
1106
1106
  code_verifier: t,
1107
1107
  code_challenge: r
@@ -1115,18 +1115,18 @@ const lt = (e, t) => {
1115
1115
  typeof t == "function" ? t() : t
1116
1116
  );
1117
1117
  window.localStorage.setItem(e, r), Lt(e, r);
1118
- }, ca = (e) => {
1118
+ }, ia = (e) => {
1119
1119
  window.localStorage.removeItem(e), Lt(e, null);
1120
- }, dt = (e) => window.localStorage.getItem(e), la = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
1120
+ }, dt = (e) => window.localStorage.getItem(e), ca = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
1121
1121
  function ge({
1122
1122
  key: e,
1123
1123
  initialValue: t
1124
1124
  }) {
1125
- const r = nr(la, () => dt(e)), a = z(
1125
+ const r = ar(ca, () => dt(e)), a = z(
1126
1126
  (s) => {
1127
1127
  try {
1128
1128
  const i = typeof s == "function" ? s(JSON.parse(r)) : s;
1129
- i == null ? ca(e) : lt(e, i);
1129
+ i == null ? ia(e) : lt(e, i);
1130
1130
  } catch (i) {
1131
1131
  console.warn(i);
1132
1132
  }
@@ -1145,30 +1145,30 @@ function ge({
1145
1145
  }
1146
1146
  }, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
1147
1147
  }
1148
- var A = [];
1148
+ var v = [];
1149
1149
  for (var We = 0; We < 256; ++We)
1150
- A.push((We + 256).toString(16).slice(1));
1151
- function da(e, t = 0) {
1152
- return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
1150
+ v.push((We + 256).toString(16).slice(1));
1151
+ function la(e, t = 0) {
1152
+ return (v[e[t + 0]] + v[e[t + 1]] + v[e[t + 2]] + v[e[t + 3]] + "-" + v[e[t + 4]] + v[e[t + 5]] + "-" + v[e[t + 6]] + v[e[t + 7]] + "-" + v[e[t + 8]] + v[e[t + 9]] + "-" + v[e[t + 10]] + v[e[t + 11]] + v[e[t + 12]] + v[e[t + 13]] + v[e[t + 14]] + v[e[t + 15]]).toLowerCase();
1153
1153
  }
1154
- var fe, ua = new Uint8Array(16);
1155
- function ma() {
1154
+ var fe, da = new Uint8Array(16);
1155
+ function ua() {
1156
1156
  if (!fe && (fe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !fe))
1157
1157
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1158
- return fe(ua);
1158
+ return fe(da);
1159
1159
  }
1160
- var ha = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1160
+ var ma = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1161
1161
  const ut = {
1162
- randomUUID: ha
1162
+ randomUUID: ma
1163
1163
  };
1164
1164
  function Ge(e, t, r) {
1165
1165
  if (ut.randomUUID && !t && !e)
1166
1166
  return ut.randomUUID();
1167
1167
  e = e || {};
1168
- var a = e.random || (e.rng || ma)();
1169
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, da(a);
1168
+ var a = e.random || (e.rng || ua)();
1169
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, la(a);
1170
1170
  }
1171
- const Z = "Your session has expired. For your security, please log in again to continue.", pa = "Your session has been successfully terminated.", Ve = "Login failed. Please try again.", ga = "Error getting access token, please re-authenticate.", fa = "You forgot to wrap your component in <AuthProvider>.", ke = {
1171
+ const Z = "Your session has expired. For your security, please log in again to continue.", ha = "Your session has been successfully terminated.", Ve = "Login failed. Please try again.", pa = "Error getting access token, please re-authenticate.", ga = "You forgot to wrap your component in <AuthProvider>.", ke = {
1172
1172
  dev: "https://auth.gizmette.local.com:3003",
1173
1173
  prod: "https://mylogin.gizmette.com/auth"
1174
1174
  }, ye = "@@auth@@", se = "LOADING", Te = "LOGIN", Mt = "LOGOUT", ue = "success", M = "failure", Ut = "include", Ht = "POST", Kt = "application/json", be = {
@@ -1330,21 +1330,21 @@ const Z = "Your session has expired. For your security, please log in again to c
1330
1330
  } catch (a) {
1331
1331
  return console.error(a), { status: M, data: [] };
1332
1332
  }
1333
- }, ya = process.env.NODE_ENV === "production", Bt = !ya, Wt = {
1333
+ }, fa = process.env.NODE_ENV === "production", Bt = !fa, Wt = {
1334
1334
  isLoading: !0,
1335
1335
  isAuthenticated: !1,
1336
1336
  user: void 0,
1337
1337
  logoutReason: "",
1338
1338
  debug: !1,
1339
1339
  authenticationType: ""
1340
- }, ba = (e) => {
1340
+ }, ya = (e) => {
1341
1341
  try {
1342
- const t = Zr(e);
1342
+ const t = Xr(e);
1343
1343
  return t ? t[k.USER_ID_KEY] : "";
1344
1344
  } catch {
1345
1345
  return "";
1346
1346
  }
1347
- }, Ea = async ({
1347
+ }, ba = async ({
1348
1348
  userId: e,
1349
1349
  clientId: t,
1350
1350
  domain: r,
@@ -1368,7 +1368,7 @@ const Z = "Your session has expired. For your security, please log in again to c
1368
1368
  status: M
1369
1369
  };
1370
1370
  }
1371
- }, wa = async ({
1371
+ }, Ea = async ({
1372
1372
  username: e,
1373
1373
  password: t,
1374
1374
  clientId: r,
@@ -1412,7 +1412,7 @@ const Z = "Your session has expired. For your security, please log in again to c
1412
1412
  status: !1
1413
1413
  };
1414
1414
  }
1415
- }, Ta = async ({
1415
+ }, wa = async ({
1416
1416
  nonce: e,
1417
1417
  clientId: t,
1418
1418
  code_challenge: r
@@ -1441,7 +1441,7 @@ const Z = "Your session has expired. For your security, please log in again to c
1441
1441
  data: ""
1442
1442
  };
1443
1443
  }
1444
- }, Ia = async ({
1444
+ }, Ta = async ({
1445
1445
  clientId: e,
1446
1446
  userId: t,
1447
1447
  nonce: r,
@@ -1477,7 +1477,7 @@ const Z = "Your session has expired. For your security, please log in again to c
1477
1477
  };
1478
1478
  }
1479
1479
  };
1480
- class Sa {
1480
+ class Ia {
1481
1481
  constructor(t = null, r = null) {
1482
1482
  Le(this, "refreshTokenPromise", null), Le(this, "accessToken"), Le(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
1483
1483
  }
@@ -1507,7 +1507,7 @@ class Sa {
1507
1507
  }) {
1508
1508
  const o = await ce(this.refreshToken);
1509
1509
  if (o && o.payload[k.USER_ID_KEY] !== "") {
1510
- const s = await Ia({
1510
+ const s = await Ta({
1511
1511
  clientId: t,
1512
1512
  userId: r,
1513
1513
  nonce: a,
@@ -1528,14 +1528,14 @@ class Sa {
1528
1528
  };
1529
1529
  }
1530
1530
  }
1531
- const Aa = (e) => z(
1531
+ const Sa = (e) => z(
1532
1532
  (...t) => {
1533
1533
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
1534
1534
  },
1535
1535
  [e]
1536
1536
  ), re = () => {
1537
- throw new Error(fa);
1538
- }, Gt = ar({
1537
+ throw new Error(ga);
1538
+ }, Gt = rr({
1539
1539
  isAuthenticated: !1,
1540
1540
  isLoading: !1,
1541
1541
  login: re,
@@ -1550,7 +1550,7 @@ const Aa = (e) => z(
1550
1550
  state: Wt,
1551
1551
  dispatch: () => {
1552
1552
  }
1553
- }), ka = (e, t) => (t == null ? void 0 : t.type) === se ? {
1553
+ }), Aa = (e, t) => (t == null ? void 0 : t.type) === se ? {
1554
1554
  ...e,
1555
1555
  isLoading: t.payload.isLoading
1556
1556
  } : (t == null ? void 0 : t.type) === Te ? {
@@ -1567,17 +1567,17 @@ const Aa = (e) => z(
1567
1567
  user: void 0,
1568
1568
  authenticationType: "",
1569
1569
  logoutReason: t.payload.logoutReason
1570
- } : e, _a = ({
1570
+ } : e, ka = ({
1571
1571
  children: e,
1572
1572
  sessionExpiration: t,
1573
1573
  clientId: r,
1574
1574
  domain: a = "",
1575
1575
  debug: n = !1
1576
1576
  }) => {
1577
- const [o, s] = ft(ka, {
1577
+ const [o, s] = ft(Aa, {
1578
1578
  ...Wt,
1579
1579
  debug: n
1580
- }), i = Aa(n), u = G(!1), [h, p, , m] = ge({
1580
+ }), i = Sa(n), u = G(!1), [h, p, , m] = ge({
1581
1581
  key: `${ye}::${r}::@@user@@`
1582
1582
  }), [l, d, , y] = ge({
1583
1583
  key: `${ye}::${r}::@@access@@`
@@ -1587,7 +1587,7 @@ const Aa = (e) => z(
1587
1587
  }
1588
1588
  ), [U, H, , O] = ge({
1589
1589
  key: `${ye}::${r}::@@nonce@@`
1590
- }), oe = new Sa(l, E), P = z(() => {
1590
+ }), oe = new Ia(l, E), P = z(() => {
1591
1591
  i("removeLocalStorage: removing local storage"), m(), y(), w(), O();
1592
1592
  }, [
1593
1593
  y,
@@ -1611,10 +1611,10 @@ const Aa = (e) => z(
1611
1611
  ), x = z(
1612
1612
  async (g) => {
1613
1613
  i("invalidateAndLogout: invalidating and logging out");
1614
- const { user: T } = o, b = (T == null ? void 0 : T.userId) || ba(h);
1614
+ const { user: T } = o, b = (T == null ? void 0 : T.userId) || ya(h);
1615
1615
  b || i(
1616
1616
  "invalidateAndLogout: user cannot be identified, logging out without userId"
1617
- ), await Ea({
1617
+ ), await ba({
1618
1618
  userId: b,
1619
1619
  clientId: r,
1620
1620
  domain: a,
@@ -1652,13 +1652,13 @@ const Aa = (e) => z(
1652
1652
  s({ type: se, payload: { isLoading: !0 } }), P();
1653
1653
  const b = Ge();
1654
1654
  H(b), i("login: Logging in with password");
1655
- const { code_verifier: Q, code_challenge: rr } = await ia(), et = await Ta({
1655
+ const { code_verifier: Q, code_challenge: tr } = await sa(), et = await wa({
1656
1656
  nonce: b,
1657
1657
  clientId: r,
1658
- code_challenge: rr
1658
+ code_challenge: tr
1659
1659
  });
1660
1660
  if (et.status) {
1661
- const X = await wa({
1661
+ const X = await Ea({
1662
1662
  username: g,
1663
1663
  password: T,
1664
1664
  clientId: r,
@@ -1684,7 +1684,7 @@ const Aa = (e) => z(
1684
1684
  }
1685
1685
  return !1;
1686
1686
  }, Pe = async (g) => {
1687
- g == null || g.preventDefault(), await x(pa);
1687
+ g == null || g.preventDefault(), await x(ha);
1688
1688
  }, De = async () => {
1689
1689
  const { isAuthenticated: g, user: T } = o;
1690
1690
  try {
@@ -1712,7 +1712,7 @@ const Aa = (e) => z(
1712
1712
  } catch {
1713
1713
  return i(
1714
1714
  "getAccessToken: exception occurred, invalidating and logging out"
1715
- ), await x(ga), "";
1715
+ ), await x(pa), "";
1716
1716
  }
1717
1717
  }, C = () => o.isAuthenticated && h ? h : "", K = async () => {
1718
1718
  const { user: g } = o;
@@ -1728,7 +1728,7 @@ const Aa = (e) => z(
1728
1728
  });
1729
1729
  if (T.status)
1730
1730
  try {
1731
- const b = await ur(T.data);
1731
+ const b = await dr(T.data);
1732
1732
  return T = await te({
1733
1733
  accessToken: l,
1734
1734
  clientId: r,
@@ -1770,7 +1770,7 @@ const Aa = (e) => z(
1770
1770
  });
1771
1771
  if (b.status)
1772
1772
  try {
1773
- const Q = await pr(b.data);
1773
+ const Q = await hr(b.data);
1774
1774
  return b = await te({
1775
1775
  accessToken: l,
1776
1776
  clientId: r,
@@ -1827,8 +1827,8 @@ const Aa = (e) => z(
1827
1827
  children: e
1828
1828
  }
1829
1829
  ) });
1830
- }, qe = (e = Gt) => yt(e), Zn = "user", eo = "assistant", to = "system", ro = "internal", ao = "hidden", no = "I'm having trouble right now. Please try again later.", oo = "gpt-4", so = 128e3, io = "action-message", co = "action-reset", lo = "action-model", uo = "action-restore", mo = "action-location", ho = "action-streaming", po = "action-search", go = "action-sort", fo = "sassy-saint-", yo = "details", bo = "search", Eo = "sort", wo = "location", To = "==stats==", Ra = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", mt = (e) => Number.isFinite(e) ? e : 0;
1831
- function Na(e) {
1830
+ }, qe = (e = Gt) => yt(e), Xn = "user", Zn = "assistant", eo = "system", to = "internal", ro = "hidden", ao = "I'm having trouble right now. Please try again later.", no = "gpt-4", oo = 128e3, so = "action-message", io = "action-reset", co = "action-model", lo = "action-restore", uo = "action-streaming", mo = "action-search", ho = "action-sort", po = "sassy-saint-", go = "details", fo = "search", yo = "sort", bo = "==stats==", _a = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", mt = (e) => Number.isFinite(e) ? e : 0;
1831
+ function Ra(e) {
1832
1832
  return {
1833
1833
  days: Math.trunc(e / 864e5),
1834
1834
  hours: Math.trunc(e / 36e5 % 24),
@@ -1839,7 +1839,7 @@ function Na(e) {
1839
1839
  nanoseconds: Math.trunc(mt(e * 1e6) % 1e3)
1840
1840
  };
1841
1841
  }
1842
- function xa(e) {
1842
+ function Na(e) {
1843
1843
  return {
1844
1844
  days: e / 86400000n,
1845
1845
  hours: e / 3600000n % 24n,
@@ -1850,20 +1850,20 @@ function xa(e) {
1850
1850
  nanoseconds: 0n
1851
1851
  };
1852
1852
  }
1853
- function Ca(e) {
1853
+ function xa(e) {
1854
1854
  switch (typeof e) {
1855
1855
  case "number": {
1856
1856
  if (Number.isFinite(e))
1857
- return Na(e);
1857
+ return Ra(e);
1858
1858
  break;
1859
1859
  }
1860
1860
  case "bigint":
1861
- return xa(e);
1861
+ return Na(e);
1862
1862
  }
1863
1863
  throw new TypeError("Expected a finite number or bigint");
1864
1864
  }
1865
- const Oa = (e) => e === 0 || e === 0n, Pa = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Da = 1e-7, $a = 24n * 60n * 60n * 1000n;
1866
- function La(e, t) {
1865
+ const Ca = (e) => e === 0 || e === 0n, Oa = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Pa = 1e-7, Da = 24n * 60n * 60n * 1000n;
1866
+ function $a(e, t) {
1867
1867
  const r = typeof e == "bigint";
1868
1868
  if (!r && !Number.isFinite(e))
1869
1869
  throw new TypeError("Expected a finite number or bigint");
@@ -1872,18 +1872,18 @@ function La(e, t) {
1872
1872
  e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
1873
1873
  let n = [];
1874
1874
  const o = (p, m) => {
1875
- const l = Math.floor(p * 10 ** m + Da);
1875
+ const l = Math.floor(p * 10 ** m + Pa);
1876
1876
  return (Math.round(l) / 10 ** m).toFixed(m);
1877
1877
  }, s = (p, m, l, d) => {
1878
- if (!((n.length === 0 || !t.colonNotation) && Oa(p) && !(t.colonNotation && l === "m"))) {
1878
+ if (!((n.length === 0 || !t.colonNotation) && Ca(p) && !(t.colonNotation && l === "m"))) {
1879
1879
  if (d ?? (d = String(p)), t.colonNotation) {
1880
1880
  const y = d.includes(".") ? d.split(".")[0].length : d.length, E = n.length > 0 ? 2 : 1;
1881
1881
  d = "0".repeat(Math.max(0, E - y)) + d;
1882
1882
  } else
1883
- d += t.verbose ? " " + Pa(m, p) : l;
1883
+ d += t.verbose ? " " + Oa(m, p) : l;
1884
1884
  n.push(d);
1885
1885
  }
1886
- }, i = Ca(e), u = BigInt(i.days);
1886
+ }, i = xa(e), u = BigInt(i.days);
1887
1887
  if (s(u / 365n, "year", "y"), s(u % 365n, "day", "d"), s(Number(i.hours), "hour", "h"), s(Number(i.minutes), "minute", "m"), t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3) {
1888
1888
  const p = Number(i.seconds), m = Number(i.milliseconds), l = Number(i.microseconds), d = Number(i.nanoseconds);
1889
1889
  if (s(p, "second", "s"), t.formatSubMilliseconds)
@@ -1898,7 +1898,7 @@ function La(e, t) {
1898
1898
  );
1899
1899
  }
1900
1900
  } else {
1901
- const p = (r ? Number(e % $a) : e) / 1e3 % 60, m = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = o(p, m), d = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
1901
+ const p = (r ? Number(e % Da) : e) / 1e3 % 60, m = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = o(p, m), d = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
1902
1902
  s(Number.parseFloat(d), "second", "s", d);
1903
1903
  }
1904
1904
  if (n.length === 0)
@@ -1906,25 +1906,7 @@ function La(e, t) {
1906
1906
  const h = t.colonNotation ? ":" : " ";
1907
1907
  return typeof t.unitCount == "number" && (n = n.slice(0, Math.max(t.unitCount, 1))), a + n.join(h);
1908
1908
  }
1909
- const Ma = process.env.NODE_ENV === "production", Qe = !Ma, Ua = Qe ? "gizmette.local.com" : "gizmette.com", Io = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, Vt = (e, t) => {
1910
- const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", a = 0 | Math.abs(e), n = 0 | Math.abs(e) * 60 % 60, o = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
1911
- return {
1912
- dir: r,
1913
- deg: a,
1914
- min: n,
1915
- sec: o
1916
- };
1917
- }, So = (e) => {
1918
- if (!e && e !== 0)
1919
- return "N/A";
1920
- const t = Vt(e, !1);
1921
- return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
1922
- }, Ao = (e) => {
1923
- if (!e && e !== 0)
1924
- return "N/A";
1925
- const t = Vt(e, !0);
1926
- return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
1927
- }, vo = async () => {
1909
+ const La = process.env.NODE_ENV === "production", Qe = !La, Ma = Qe ? "gizmette.local.com" : "gizmette.com", Eo = (e, t) => e.length > t ? e.substring(0, t) + "..." : e, wo = async () => {
1928
1910
  const e = {
1929
1911
  /**
1930
1912
  * A boolean value that indicates the application would
@@ -1973,11 +1955,11 @@ const Ma = process.env.NODE_ENV === "production", Qe = !Ma, Ua = Qe ? "gizmette.
1973
1955
  e
1974
1956
  );
1975
1957
  });
1976
- }, ko = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: [
1977
- /* @__PURE__ */ c("dt", { className: "inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
1978
- /* @__PURE__ */ c("dd", { className: "inline-block", children: t[r] })
1958
+ }, To = (e, t) => t ? Object.keys(t).map((r) => /* @__PURE__ */ c("dl", { className: "my-0", children: /* @__PURE__ */ I("div", { className: "flex items-center justify-between", children: [
1959
+ /* @__PURE__ */ c("dt", { className: "my-1 inline-block font-bold text-copy-dark dark:text-copy-lighter", children: r }),
1960
+ /* @__PURE__ */ c("dd", { className: "my-1 inline-block", children: t[r] })
1979
1961
  ] }) }, `${e}-${r}`)) : null;
1980
- function _o({
1962
+ function Io({
1981
1963
  data: e,
1982
1964
  formatter: t = (r) => r
1983
1965
  }) {
@@ -1989,18 +1971,18 @@ function _o({
1989
1971
  );
1990
1972
  return t(a ? a / r.length : 0);
1991
1973
  }
1992
- const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, No = new Intl.NumberFormat("en", {
1974
+ const So = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, vo = new Intl.NumberFormat("en", {
1993
1975
  style: "decimal",
1994
1976
  signDisplay: "never",
1995
1977
  minimumFractionDigits: 0,
1996
1978
  maximumFractionDigits: 0
1997
- }), xo = (e) => e > 0 ? La(e, {
1979
+ }), Ao = (e) => e > 0 ? $a(e, {
1998
1980
  secondsDecimalDigits: 2,
1999
1981
  unitCount: 2
2000
- }) : "N/A", Ha = (e) => f(
1982
+ }) : "N/A", Ua = (e) => f(
2001
1983
  "flex-1 space-y-6 overflow-y-auto rounded-md bg-slate-900 px-4 pb-10 text-base leading-6 text-slate-300 shadow-sm sm:text-base sm:leading-7",
2002
1984
  e || Qe ? "pt-4" : "pt-10"
2003
- ), Co = (e, t) => t === 1 ? e : `${e}s`, Ce = (e) => {
1985
+ ), ko = (e, t) => t === 1 ? e : `${e}s`, Ce = (e) => {
2004
1986
  let t = "";
2005
1987
  if (typeof e == "number" || typeof e == "string")
2006
1988
  t = "m-" + e;
@@ -2009,7 +1991,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2009
1991
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2010
1992
  }
2011
1993
  return t;
2012
- }, Oo = "av-bubble", ht = "av-button", Ie = "av-card", Ka = "av-footer", Ba = "av-main", Po = "av-messagebox", Do = "av-panel", $o = "av-spinner", Yt = "icon", Jt = "button", Wa = "link", Ga = ({
1994
+ }, _o = "av-bubble", ht = "av-button", Ie = "av-card", Ha = "av-footer", Ka = "av-main", Ro = "av-messagebox", No = "av-panel", xo = "av-spinner", Vt = "icon", Yt = "button", Ba = "link", Wa = ({
2013
1995
  type: e,
2014
1996
  size: t,
2015
1997
  labelRight: r,
@@ -2018,19 +2000,19 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2018
2000
  }) => {
2019
2001
  const o = "text-sm font-medium max-h-8 py-0", s = "text-base font-medium max-h-9 py-1", i = "text-lg font-medium max-h-12 py-2";
2020
2002
  switch (e) {
2021
- case Jt:
2003
+ case Yt:
2022
2004
  return f("px-4", {
2023
2005
  [o]: t === "small",
2024
2006
  [s]: t === "medium",
2025
2007
  [i]: t === "large"
2026
2008
  });
2027
- case Wa:
2009
+ case Ba:
2028
2010
  return f("px-4 text-center", {
2029
2011
  [o]: t === "small",
2030
2012
  [s]: t === "medium",
2031
2013
  [i]: t === "large"
2032
2014
  });
2033
- case Yt:
2015
+ case Vt:
2034
2016
  return f("inline-flex items-center", {
2035
2017
  "justify-center": n === "center",
2036
2018
  "justify-start": n === "left",
@@ -2043,7 +2025,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2043
2025
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
2044
2026
  });
2045
2027
  }
2046
- }, Va = ({
2028
+ }, Ga = ({
2047
2029
  mode: e,
2048
2030
  noBackground: t,
2049
2031
  noTruncate: r,
@@ -2075,7 +2057,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2075
2057
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
2076
2058
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
2077
2059
  });
2078
- }, Ya = ({
2060
+ }, Va = ({
2079
2061
  mode: e,
2080
2062
  disabled: t,
2081
2063
  variant: r
@@ -2103,7 +2085,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2103
2085
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
2104
2086
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
2105
2087
  });
2106
- }, Ja = ({
2088
+ }, Ya = ({
2107
2089
  mode: e,
2108
2090
  disabled: t,
2109
2091
  variant: r
@@ -2131,7 +2113,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2131
2113
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
2132
2114
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
2133
2115
  });
2134
- }, Fa = ({
2116
+ }, Ja = ({
2135
2117
  mode: e,
2136
2118
  noBorder: t,
2137
2119
  variant: r
@@ -2159,12 +2141,12 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2159
2141
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
2160
2142
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
2161
2143
  });
2162
- }, za = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
2144
+ }, Fa = ({ focusMode: e }) => f("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
2163
2145
  "focus:outline-focus-dark": e === "dark",
2164
2146
  "focus:outline-focus-light": e === "light",
2165
2147
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
2166
2148
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
2167
- }), Ft = ({
2149
+ }), Jt = ({
2168
2150
  type: e,
2169
2151
  className: t,
2170
2152
  raw: r,
@@ -2185,17 +2167,17 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2185
2167
  ht,
2186
2168
  t,
2187
2169
  Ce(m),
2188
- Va({ mode: a, variant: d, noBackground: l, noTruncate: y }),
2189
- Ga({ type: e, size: i, labelRight: h, labelLeft: p, align: E }),
2190
- Fa({ mode: a, variant: d, noBorder: u }),
2191
- za({ focusMode: n }),
2170
+ Ga({ mode: a, variant: d, noBackground: l, noTruncate: y }),
2171
+ Wa({ type: e, size: i, labelRight: h, labelLeft: p, align: E }),
2172
+ Ja({ mode: a, variant: d, noBorder: u }),
2173
+ Fa({ focusMode: n }),
2174
+ Va({ mode: a, variant: d, disabled: o }),
2192
2175
  Ya({ mode: a, variant: d, disabled: o }),
2193
- Ja({ mode: a, variant: d, disabled: o }),
2194
2176
  {
2195
2177
  "w-full": s,
2196
2178
  "disabled:cursor-not-allowed disabled:opacity-50": o
2197
2179
  }
2198
- )), ja = (e, t, r) => {
2180
+ )), za = (e, t, r) => {
2199
2181
  var a;
2200
2182
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
2201
2183
  }, Xe = V.forwardRef(
@@ -2206,7 +2188,7 @@ const Ro = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
2206
2188
  {
2207
2189
  ref: t,
2208
2190
  onClick: (o) => {
2209
- ja(o, a, r);
2191
+ za(o, a, r);
2210
2192
  },
2211
2193
  ...n
2212
2194
  }
@@ -2235,8 +2217,8 @@ const Fe = V.forwardRef(
2235
2217
  align: R = "center",
2236
2218
  ...w
2237
2219
  }, U) => {
2238
- const H = Ft({
2239
- type: Yt,
2220
+ const H = Jt({
2221
+ type: Vt,
2240
2222
  mode: r,
2241
2223
  focusMode: a,
2242
2224
  fullWidth: n,
@@ -2275,7 +2257,7 @@ const Fe = V.forwardRef(
2275
2257
  }
2276
2258
  );
2277
2259
  Fe.displayName = "ButtonIcon";
2278
- const zt = V.forwardRef(
2260
+ const Ft = V.forwardRef(
2279
2261
  ({
2280
2262
  children: e,
2281
2263
  disabled: t = !1,
@@ -2291,8 +2273,8 @@ const zt = V.forwardRef(
2291
2273
  noTruncate: m = !1,
2292
2274
  ...l
2293
2275
  }, d) => {
2294
- const y = Ft({
2295
- type: Jt,
2276
+ const y = Jt({
2277
+ type: Yt,
2296
2278
  mode: r,
2297
2279
  focusMode: a,
2298
2280
  fullWidth: n,
@@ -2317,12 +2299,12 @@ const zt = V.forwardRef(
2317
2299
  );
2318
2300
  }
2319
2301
  );
2320
- zt.displayName = "Button";
2321
- function qa(e) {
2302
+ Ft.displayName = "Button";
2303
+ function ja(e) {
2322
2304
  const t = bt();
2323
2305
  return `${e}${t}`;
2324
2306
  }
2325
- const Qa = ({
2307
+ const qa = ({
2326
2308
  className: e,
2327
2309
  headerClassName: t,
2328
2310
  bodyClassName: r,
@@ -2364,7 +2346,7 @@ const Qa = ({
2364
2346
  footer: m
2365
2347
  };
2366
2348
  };
2367
- function Xa({
2349
+ function Qa({
2368
2350
  id: e,
2369
2351
  content: t,
2370
2352
  userAriaLabelledby: r,
@@ -2372,7 +2354,7 @@ function Xa({
2372
2354
  }) {
2373
2355
  return typeof t == "string" ? /* @__PURE__ */ c("h2", { id: e, className: a, children: t }) : r ? /* @__PURE__ */ c("div", { className: a, children: t }) : t ? /* @__PURE__ */ c("div", { className: a, id: e, children: t }) : null;
2374
2356
  }
2375
- const Za = ({
2357
+ const Xa = ({
2376
2358
  header: e,
2377
2359
  headerClassName: t,
2378
2360
  footer: r,
@@ -2388,7 +2370,7 @@ const Za = ({
2388
2370
  ...l
2389
2371
  }) => {
2390
2372
  let d = null, y = null;
2391
- const E = typeof e == "string", R = qa(Ie), w = Qa({
2373
+ const E = typeof e == "string", R = ja(Ie), w = qa({
2392
2374
  className: o,
2393
2375
  headerClassName: t,
2394
2376
  bodyClassName: s,
@@ -2408,7 +2390,7 @@ const Za = ({
2408
2390
  ...l,
2409
2391
  children: [
2410
2392
  /* @__PURE__ */ c(
2411
- Xa,
2393
+ Qa,
2412
2394
  {
2413
2395
  ...d && { id: d },
2414
2396
  content: e,
@@ -2421,7 +2403,7 @@ const Za = ({
2421
2403
  ]
2422
2404
  }
2423
2405
  ) });
2424
- }, en = ({
2406
+ }, Za = ({
2425
2407
  className: e,
2426
2408
  mode: t = "system",
2427
2409
  row1: r,
@@ -2430,7 +2412,7 @@ const Za = ({
2430
2412
  spacing: o,
2431
2413
  raw: s = !1
2432
2414
  }) => {
2433
- const i = f(Ka, e, Ce(o), {
2415
+ const i = f(Ha, e, Ce(o), {
2434
2416
  "text-copy-dark": !s && t === "dark",
2435
2417
  "text-copy-lighter": !s && t === "light",
2436
2418
  "text-copy-dark dark:text-copy-lighter": !s && t === "system",
@@ -2442,13 +2424,13 @@ const Za = ({
2442
2424
  r && /* @__PURE__ */ c("div", { children: r }),
2443
2425
  a && /* @__PURE__ */ c("div", { children: a })
2444
2426
  ] });
2445
- }, tn = ({
2427
+ }, en = ({
2446
2428
  children: e,
2447
2429
  className: t,
2448
2430
  raw: r = !1,
2449
2431
  spacing: a
2450
2432
  }) => {
2451
- const n = f(t, Ba, Ce(a), {
2433
+ const n = f(t, Ka, Ce(a), {
2452
2434
  "mt-2 flex w-full flex-col p-2 sm:mt-3 md:mx-auto md:max-w-4xl": !r
2453
2435
  });
2454
2436
  return /* @__PURE__ */ c("main", { className: n, children: e });
@@ -2466,7 +2448,7 @@ try {
2466
2448
  });
2467
2449
  } catch {
2468
2450
  }
2469
- function rn(e) {
2451
+ function tn(e) {
2470
2452
  return Et(() => e.every((t) => t == null) ? () => {
2471
2453
  } : (t) => {
2472
2454
  e.forEach((r) => {
@@ -2474,7 +2456,7 @@ function rn(e) {
2474
2456
  });
2475
2457
  }, e);
2476
2458
  }
2477
- function an(e) {
2459
+ function rn(e) {
2478
2460
  const t = bt();
2479
2461
  if (!e)
2480
2462
  return t;
@@ -2485,7 +2467,7 @@ function an(e) {
2485
2467
  return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
2486
2468
  }
2487
2469
  }
2488
- const jt = "SET_ANNOUNCEMENT", qt = "CLEAR_ANNOUNCEMENT", nn = {
2470
+ const zt = "SET_ANNOUNCEMENT", jt = "CLEAR_ANNOUNCEMENT", an = {
2489
2471
  alert: null,
2490
2472
  alertdialog: null,
2491
2473
  log: "polite",
@@ -2493,14 +2475,14 @@ const jt = "SET_ANNOUNCEMENT", qt = "CLEAR_ANNOUNCEMENT", nn = {
2493
2475
  progressbar: null,
2494
2476
  status: "polite",
2495
2477
  timer: "assertive"
2496
- }, on = (e, t) => {
2478
+ }, nn = (e, t) => {
2497
2479
  switch (t == null ? void 0 : t.type) {
2498
- case jt:
2480
+ case zt:
2499
2481
  return {
2500
2482
  ...e,
2501
2483
  announcement: t.payload
2502
2484
  };
2503
- case qt:
2485
+ case jt:
2504
2486
  return {
2505
2487
  ...e,
2506
2488
  announcement: null
@@ -2508,12 +2490,12 @@ const jt = "SET_ANNOUNCEMENT", qt = "CLEAR_ANNOUNCEMENT", nn = {
2508
2490
  default:
2509
2491
  return e;
2510
2492
  }
2511
- }, sn = ({
2493
+ }, on = ({
2512
2494
  onAnnouncementClear: e,
2513
2495
  dispatch: t
2514
2496
  }) => {
2515
2497
  t({
2516
- type: qt
2498
+ type: jt
2517
2499
  }), typeof e == "function" && e();
2518
2500
  }, pt = ({
2519
2501
  children: e,
@@ -2523,16 +2505,16 @@ const jt = "SET_ANNOUNCEMENT", qt = "CLEAR_ANNOUNCEMENT", nn = {
2523
2505
  dispatch: n
2524
2506
  }) => {
2525
2507
  (r == null ? void 0 : r.current) !== null && clearTimeout(r.current), e !== null && n({
2526
- type: jt,
2508
+ type: zt,
2527
2509
  payload: e
2528
2510
  }), t && (r.current = setTimeout(
2529
- () => sn({
2511
+ () => on({
2530
2512
  onAnnouncementClear: a,
2531
2513
  dispatch: n
2532
2514
  }),
2533
2515
  t
2534
2516
  ));
2535
- }, cn = ({
2517
+ }, sn = ({
2536
2518
  children: e,
2537
2519
  announcementTimeoutRef: t,
2538
2520
  announcementDelay: r,
@@ -2555,7 +2537,7 @@ const jt = "SET_ANNOUNCEMENT", qt = "CLEAR_ANNOUNCEMENT", nn = {
2555
2537
  dispatch: s
2556
2538
  });
2557
2539
  };
2558
- function Qt({
2540
+ function qt({
2559
2541
  children: e,
2560
2542
  className: t,
2561
2543
  politeness: r,
@@ -2566,12 +2548,12 @@ function Qt({
2566
2548
  visible: i,
2567
2549
  ...u
2568
2550
  }) {
2569
- const h = G(), p = G(), [m, l] = ft(on, {
2551
+ const h = G(), p = G(), [m, l] = ft(nn, {
2570
2552
  announcement: null
2571
2553
  });
2572
2554
  let d = r;
2573
- typeof d > "u" && (d = a ? nn[a] : "assertive"), j(() => {
2574
- cn({
2555
+ typeof d > "u" && (d = a ? an[a] : "assertive"), j(() => {
2556
+ sn({
2575
2557
  announcementTimeoutRef: h,
2576
2558
  announcementDelay: n,
2577
2559
  children: e,
@@ -2613,7 +2595,7 @@ try {
2613
2595
  });
2614
2596
  } catch {
2615
2597
  }
2616
- const ln = (e) => {
2598
+ const cn = (e) => {
2617
2599
  let t = "";
2618
2600
  if (typeof e == "number" || typeof e == "string")
2619
2601
  t = "m-" + e;
@@ -2622,14 +2604,14 @@ const ln = (e) => {
2622
2604
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
2623
2605
  }
2624
2606
  return t;
2625
- }, Xt = "av-text-input", dn = "av-text-input-wrapper", Ye = "av-text-input-helper-text", Lo = "av-text-area", Mo = "av-text-area-wrapper", Uo = "av-text-area-helper-text", Ho = "av-text-area__control--right", Ko = "av-toggle";
2626
- function un() {
2607
+ }, Qt = "av-text-input", ln = "av-text-input-wrapper", Ye = "av-text-input-helper-text", Co = "av-text-area", Oo = "av-text-area-wrapper", Po = "av-text-area-helper-text", Do = "av-text-area__control--right", $o = "av-toggle";
2608
+ function dn() {
2627
2609
  const e = G(!1);
2628
2610
  return j(() => (e.current = !0, () => {
2629
2611
  e.current = !1;
2630
2612
  }), []), z(() => e.current, []);
2631
2613
  }
2632
- const mn = {
2614
+ const un = {
2633
2615
  x: 0,
2634
2616
  y: 0,
2635
2617
  width: 0,
@@ -2639,8 +2621,8 @@ const mn = {
2639
2621
  bottom: 0,
2640
2622
  right: 0
2641
2623
  };
2642
- function hn(e) {
2643
- const t = un(), r = G(0), a = G(null), [n, o] = J(mn), s = Et(
2624
+ function mn(e) {
2625
+ const t = dn(), r = G(0), a = G(null), [n, o] = J(un), s = Et(
2644
2626
  () => typeof window < "u" ? new ResizeObserver((i) => {
2645
2627
  const u = i[0];
2646
2628
  u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
@@ -2653,21 +2635,21 @@ function hn(e) {
2653
2635
  s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
2654
2636
  }), [s, e]), [a, n];
2655
2637
  }
2656
- const pn = ({
2638
+ const hn = ({
2657
2639
  mode: e
2658
2640
  }) => f({
2659
2641
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
2660
2642
  "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
2661
2643
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
2662
2644
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
2663
- }), gn = ({
2645
+ }), pn = ({
2664
2646
  focusMode: e
2665
2647
  }) => f("focus:outline focus:outline-2 focus:outline-offset-2", {
2666
2648
  "focus:outline-focus-dark": e === "dark",
2667
2649
  "focus:outline-focus-light": e === "light",
2668
2650
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
2669
2651
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
2670
- }), fn = ({
2652
+ }), gn = ({
2671
2653
  noBorder: e,
2672
2654
  error: t
2673
2655
  }) => f("border-2", {
@@ -2675,7 +2657,7 @@ const pn = ({
2675
2657
  "focus:border-border-dark": !e && t,
2676
2658
  "border-border-error-dark": !e && t,
2677
2659
  "border-transparent": e
2678
- }), yn = ({
2660
+ }), fn = ({
2679
2661
  disabled: e,
2680
2662
  raw: t,
2681
2663
  error: r,
@@ -2699,7 +2681,7 @@ const pn = ({
2699
2681
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": a === "system",
2700
2682
  "text-copy-lighter dark:text-copy-error-dark": a === "alt-system"
2701
2683
  });
2702
- }, bn = ({
2684
+ }, yn = ({
2703
2685
  error: e,
2704
2686
  raw: t,
2705
2687
  mode: r,
@@ -2726,7 +2708,7 @@ const pn = ({
2726
2708
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
2727
2709
  "dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
2728
2710
  });
2729
- }, En = ({
2711
+ }, bn = ({
2730
2712
  className: e,
2731
2713
  inputClassName: t,
2732
2714
  raw: r,
@@ -2739,25 +2721,25 @@ const pn = ({
2739
2721
  }) => {
2740
2722
  const h = r ? e : f(
2741
2723
  "relative flex w-full flex-col justify-center",
2742
- dn,
2724
+ ln,
2743
2725
  e,
2744
- ln(s)
2726
+ cn(s)
2745
2727
  ), p = r ? f(t) : f(
2746
- Xt,
2728
+ Qt,
2747
2729
  t,
2748
2730
  "h-12 rounded-md px-4 text-base",
2749
- pn({ mode: i }),
2750
- gn({ focusMode: u }),
2751
- fn({ noBorder: n, error: o }),
2731
+ hn({ mode: i }),
2732
+ pn({ focusMode: u }),
2733
+ gn({ noBorder: n, error: o }),
2752
2734
  {
2753
2735
  "disabled:cursor-not-allowed disabled:opacity-50": a
2754
2736
  }
2755
- ), m = r ? void 0 : "sr-only", l = yn({
2737
+ ), m = r ? void 0 : "sr-only", l = fn({
2756
2738
  disabled: a,
2757
2739
  raw: r,
2758
2740
  error: o,
2759
2741
  mode: i
2760
- }), d = bn({
2742
+ }), d = yn({
2761
2743
  error: o,
2762
2744
  raw: r,
2763
2745
  mode: i,
@@ -2792,7 +2774,7 @@ const pn = ({
2792
2774
  spacing: R,
2793
2775
  ...w
2794
2776
  }, U) => {
2795
- const [H, O] = hn(), [oe, P] = J(0), N = an({ id: e, prefix: `${Xt}-` }), x = `${t} error, ${y}`, D = En({
2777
+ const [H, O] = mn(), [oe, P] = J(0), N = rn({ id: e, prefix: `${Qt}-` }), x = `${t} error, ${y}`, D = bn({
2796
2778
  className: o,
2797
2779
  inputClassName: s,
2798
2780
  error: a,
@@ -2803,7 +2785,7 @@ const pn = ({
2803
2785
  spacing: R,
2804
2786
  mode: i
2805
2787
  });
2806
- return or(() => {
2788
+ return nr(() => {
2807
2789
  O && O.width && P(O.width + 18 + 10);
2808
2790
  }, [O]), /* @__PURE__ */ I("div", { className: D.wrapper, children: [
2809
2791
  /* @__PURE__ */ c(
@@ -2856,12 +2838,12 @@ const pn = ({
2856
2838
  children: E
2857
2839
  }
2858
2840
  ),
2859
- a && y && /* @__PURE__ */ c(Qt, { politeness: "polite", clearAnnouncementDelay: 500, children: x })
2841
+ a && y && /* @__PURE__ */ c(qt, { politeness: "polite", clearAnnouncementDelay: 500, children: x })
2860
2842
  ] });
2861
2843
  }
2862
2844
  );
2863
2845
  Ze.displayName = "TextInput";
2864
- const wn = 500, Tn = 5e3, In = 2e4, Zt = V.forwardRef(
2846
+ const En = 500, wn = 5e3, Tn = 2e4, Xt = V.forwardRef(
2865
2847
  ({
2866
2848
  name: e,
2867
2849
  disabled: t,
@@ -2879,19 +2861,19 @@ const wn = 500, Tn = 5e3, In = 2e4, Zt = V.forwardRef(
2879
2861
  const [d, y] = J(!0), [E, R] = J({
2880
2862
  message: null,
2881
2863
  politeness: null
2882
- }), w = G(!0), U = G(), H = G(null), O = rn([l, H]), oe = d ? "Show" : "Hide", P = () => {
2864
+ }), w = G(!0), U = G(), H = G(null), O = tn([l, H]), oe = d ? "Show" : "Hide", P = () => {
2883
2865
  clearTimeout(U.current), w.current || (U.current = window.setTimeout(() => {
2884
2866
  w.current = !0, y(!0), R({
2885
- announcementTimeout: Tn,
2867
+ announcementTimeout: wn,
2886
2868
  politeness: "polite",
2887
2869
  message: `${r} hiding characters`
2888
2870
  }), n && n(!0);
2889
- }, In));
2871
+ }, Tn));
2890
2872
  }, N = (C) => {
2891
2873
  C.preventDefault();
2892
2874
  const K = !w.current;
2893
2875
  w.current = K, P(), y(K), R({
2894
- announcementTimeout: wn,
2876
+ announcementTimeout: En,
2895
2877
  politeness: "assertive",
2896
2878
  message: K ? "Characters hidden" : "Characters showing"
2897
2879
  }), n && n(K);
@@ -2933,7 +2915,7 @@ const wn = 500, Tn = 5e3, In = 2e4, Zt = V.forwardRef(
2933
2915
  }
2934
2916
  ),
2935
2917
  /* @__PURE__ */ c(
2936
- Qt,
2918
+ qt,
2937
2919
  {
2938
2920
  role: "status",
2939
2921
  politeness: E.politeness,
@@ -2944,7 +2926,7 @@ const wn = 500, Tn = 5e3, In = 2e4, Zt = V.forwardRef(
2944
2926
  ] });
2945
2927
  }
2946
2928
  );
2947
- Zt.displayName = "TextInputMask";
2929
+ Xt.displayName = "TextInputMask";
2948
2930
  /*!
2949
2931
  @versini/ui-form v1.3.7
2950
2932
  © 2024 gizmette.com
@@ -2958,7 +2940,7 @@ try {
2958
2940
  });
2959
2941
  } catch {
2960
2942
  }
2961
- const Sn = (e) => {
2943
+ const In = (e) => {
2962
2944
  let t = "";
2963
2945
  if (typeof e == "number" || typeof e == "string")
2964
2946
  t = "m-" + e;
@@ -2979,7 +2961,7 @@ const Sn = (e) => {
2979
2961
  semantic: u = !1,
2980
2962
  ...h
2981
2963
  }) => {
2982
- const p = Sn(s), m = f(
2964
+ const p = In(s), m = f(
2983
2965
  p,
2984
2966
  a || o
2985
2967
  );
@@ -3014,7 +2996,7 @@ try {
3014
2996
  });
3015
2997
  } catch {
3016
2998
  }
3017
- const An = ({
2999
+ const Sn = ({
3018
3000
  className: e,
3019
3001
  viewBox: t,
3020
3002
  spacing: r,
@@ -3067,7 +3049,7 @@ const An = ({
3067
3049
  /* @__PURE__ */ c("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1L9.2 42.9C-1.2 34.7-3.1 19.6 5.1 9.2z" })
3068
3050
  ]
3069
3051
  }
3070
- ), kn = ({
3052
+ ), An = ({
3071
3053
  className: e,
3072
3054
  viewBox: t,
3073
3055
  spacing: r,
@@ -3106,7 +3088,7 @@ const An = ({
3106
3088
  ]
3107
3089
  }
3108
3090
  );
3109
- }, _n = ({
3091
+ }, kn = ({
3110
3092
  className: e,
3111
3093
  viewBox: t,
3112
3094
  spacing: r,
@@ -3148,7 +3130,7 @@ try {
3148
3130
  });
3149
3131
  } catch {
3150
3132
  }
3151
- const Rn = (e) => {
3133
+ const _n = (e) => {
3152
3134
  let t = "";
3153
3135
  if (typeof e == "number" || typeof e == "string")
3154
3136
  t = "m-" + e;
@@ -3157,7 +3139,7 @@ const Rn = (e) => {
3157
3139
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
3158
3140
  }
3159
3141
  return t;
3160
- }, Nn = "av-flexgrid", Ee = "av-flexgrid-item", _e = 0.25, er = V.createContext({
3142
+ }, Rn = "av-flexgrid", Ee = "av-flexgrid-item", _e = 0.25, Zt = V.createContext({
3161
3143
  columnGap: 0,
3162
3144
  rowGap: 0
3163
3145
  }), gt = ({
@@ -3187,11 +3169,11 @@ const Rn = (e) => {
3187
3169
  marginLeft: r * -1 * _e + "rem",
3188
3170
  marginTop: a * -1 * _e + "rem"
3189
3171
  }, l = f(
3190
- Nn,
3172
+ Rn,
3191
3173
  t,
3192
3174
  "box-border flex flex-wrap"
3193
3175
  ), d = { columnGap: r, rowGap: a }, y = h ? "div" : V.Fragment;
3194
- return /* @__PURE__ */ c(y, { ...h ? { className: Rn(h) } : {}, children: /* @__PURE__ */ c("div", { className: l, style: m, ...p, children: /* @__PURE__ */ c(er.Provider, { value: d, children: e }) }) });
3176
+ return /* @__PURE__ */ c(y, { ...h ? { className: _n(h) } : {}, children: /* @__PURE__ */ c("div", { className: l, style: m, ...p, children: /* @__PURE__ */ c(Zt.Provider, { value: d, children: e }) }) });
3195
3177
  }, Je = (e, t) => f({
3196
3178
  "basis-1/12": e === 1 && !t,
3197
3179
  "sm:basis-1/12": e === 1 && t === "sm",
@@ -3265,7 +3247,7 @@ const Rn = (e) => {
3265
3247
  "lg:basis-full": e === 12 && t === "lg",
3266
3248
  "xl:basis-full": e === 12 && t === "xl",
3267
3249
  "2xl:basis-full": e === 12 && t === "2xl"
3268
- }), xn = ({
3250
+ }), Nn = ({
3269
3251
  className: e,
3270
3252
  span: t
3271
3253
  }) => {
@@ -3294,10 +3276,10 @@ const Rn = (e) => {
3294
3276
  span: r,
3295
3277
  ...a
3296
3278
  }) => {
3297
- const { columnGap: n, rowGap: o } = yt(er), s = {
3279
+ const { columnGap: n, rowGap: o } = yt(Zt), s = {
3298
3280
  paddingLeft: n * _e + "rem",
3299
3281
  paddingTop: o * _e + "rem"
3300
- }, i = xn({
3282
+ }, i = Nn({
3301
3283
  className: t,
3302
3284
  span: r
3303
3285
  });
@@ -3316,7 +3298,7 @@ try {
3316
3298
  });
3317
3299
  } catch {
3318
3300
  }
3319
- const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "Log in", Dn = "Sign in with a Passkey", Bo = "Log out", $n = "Password", Ln = "Powered by OpenAI", Wo = "Send", Go = "Profile", Vo = "Statistics", Yo = "Chat history", Jo = "About", Fo = "Type your question here", zo = "Clear chat", jo = "Cancel chat", qo = "N/A", Qo = {
3301
+ const xn = "ASK! ME! ANYTHING!", er = "Sassy Saint", Cn = "gizmette.com", On = "Log in", Pn = "Sign in with a Passkey", Lo = "Log out", Dn = "Password", $n = "Powered by OpenAI", Mo = "Send", Uo = "Profile", Ho = "Statistics", Ko = "Chat history", Bo = "About", Wo = "Type your question here", Go = "Clear chat", Vo = "Cancel chat", Yo = "N/A", Jo = {
3320
3302
  PREFERENCES: {
3321
3303
  TITLE: "User settings",
3322
3304
  NAME: "Name",
@@ -3350,40 +3332,40 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
3350
3332
  ENGINE: "OpenAI model",
3351
3333
  PLUGIN: "Plugin"
3352
3334
  }
3353
- }, Mn = ({
3335
+ }, Ln = ({
3354
3336
  serverStats: e
3355
3337
  }) => /* @__PURE__ */ c(
3356
- en,
3338
+ Za,
3357
3339
  {
3358
3340
  mode: "light",
3359
3341
  row1: /* @__PURE__ */ I("div", { children: [
3360
- tr,
3342
+ er,
3361
3343
  " v",
3362
- "4.1.0",
3344
+ "4.3.0",
3363
3345
  " - ",
3364
- Ln,
3346
+ $n,
3365
3347
  Qe && e && e.models.length > 0 && e.models[0] === "development" ? " - Development Mode" : ""
3366
3348
  ] }),
3367
3349
  row2: /* @__PURE__ */ I("div", { children: [
3368
3350
  "© ",
3369
3351
  (/* @__PURE__ */ new Date()).getFullYear(),
3370
3352
  " ",
3371
- On
3353
+ Cn
3372
3354
  ] })
3373
3355
  }
3374
- ), Un = wt(() => import("./LazyHeader.D_ViNWrh.js")), Hn = () => {
3356
+ ), Mn = wt(() => import("./LazyHeader.rUgvWsxk.js")), Un = () => {
3375
3357
  const { isAuthenticated: e } = qe();
3376
3358
  return /* @__PURE__ */ I(le, { children: [
3377
- e && /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Un, {}) }),
3359
+ e && /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Mn, {}) }),
3378
3360
  /* @__PURE__ */ I("div", { className: "flex items-center justify-center", children: [
3379
- /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(An, {}) }),
3361
+ /* @__PURE__ */ c("div", { className: "basis-1/4", children: /* @__PURE__ */ c(Sn, {}) }),
3380
3362
  /* @__PURE__ */ I("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
3381
- /* @__PURE__ */ c("h1", { children: tr }),
3382
- /* @__PURE__ */ c("h2", { children: Cn })
3363
+ /* @__PURE__ */ c("h1", { children: er }),
3364
+ /* @__PURE__ */ c("h2", { children: xn })
3383
3365
  ] })
3384
3366
  ] })
3385
3367
  ] });
3386
- }, Kn = () => {
3368
+ }, Hn = () => {
3387
3369
  const { login: e, logoutReason: t, loginWithPasskey: r } = qe(), [a, n] = J(""), [o, s] = J(""), [i, u] = J(!0), [h, p] = J({
3388
3370
  username: "",
3389
3371
  password: ""
@@ -3399,10 +3381,10 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
3399
3381
  }), j(() => {
3400
3382
  t && s(t);
3401
3383
  }, [t]), /* @__PURE__ */ I(le, { children: [
3402
- /* @__PURE__ */ I(tn, { children: [
3403
- /* @__PURE__ */ c("div", { className: Ha(), children: /* @__PURE__ */ c(Hn, {}) }),
3384
+ /* @__PURE__ */ I(en, { children: [
3385
+ /* @__PURE__ */ c("div", { className: Ua(), children: /* @__PURE__ */ c(Un, {}) }),
3404
3386
  /* @__PURE__ */ I("form", { className: "mt-5", onSubmit: m, children: [
3405
- /* @__PURE__ */ c(gt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ c(ae, { span: 6, children: /* @__PURE__ */ I(Za, { mode: "dark", children: [
3387
+ /* @__PURE__ */ c(gt, { alignHorizontal: "center", rowGap: 7, children: /* @__PURE__ */ c(ae, { span: 6, children: /* @__PURE__ */ I(Xa, { mode: "dark", children: [
3406
3388
  /* @__PURE__ */ c(ae, { span: 12, children: o && /* @__PURE__ */ c("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: o }) }),
3407
3389
  /* @__PURE__ */ c(ae, { span: 12, children: /* @__PURE__ */ c(
3408
3390
  Ze,
@@ -3425,7 +3407,7 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
3425
3407
  }
3426
3408
  ) }),
3427
3409
  /* @__PURE__ */ c(ae, { span: 12, children: /* @__PURE__ */ c(
3428
- Zt,
3410
+ Xt,
3429
3411
  {
3430
3412
  required: !0,
3431
3413
  autoCapitalize: "off",
@@ -3434,8 +3416,8 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
3434
3416
  mode: "dark",
3435
3417
  focusMode: "light",
3436
3418
  name: "password",
3437
- label: $n,
3438
- rightElement: /* @__PURE__ */ c(Fe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(_n, {}) : /* @__PURE__ */ c(vn, {}) }),
3419
+ label: Dn,
3420
+ rightElement: /* @__PURE__ */ c(Fe, { focusMode: "light", mode: "dark", children: i ? /* @__PURE__ */ c(kn, {}) : /* @__PURE__ */ c(vn, {}) }),
3439
3421
  onMaskChange: u,
3440
3422
  onChange: (l) => {
3441
3423
  p({
@@ -3448,7 +3430,7 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
3448
3430
  }
3449
3431
  ) }),
3450
3432
  /* @__PURE__ */ c(ae, { span: 12, children: /* @__PURE__ */ c(
3451
- zt,
3433
+ Ft,
3452
3434
  {
3453
3435
  mode: "light",
3454
3436
  focusMode: "light",
@@ -3456,7 +3438,7 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
3456
3438
  noBorder: !0,
3457
3439
  type: "submit",
3458
3440
  className: "mb-4 mt-6",
3459
- children: Pn
3441
+ children: On
3460
3442
  }
3461
3443
  ) })
3462
3444
  ] }) }) }),
@@ -3469,96 +3451,92 @@ const Cn = "ASK! ME! ANYTHING!", tr = "Sassy Saint", On = "gizmette.com", Pn = "
3469
3451
  fullWidth: !0,
3470
3452
  noBorder: !0,
3471
3453
  className: "mb-4 mt-1",
3472
- labelRight: Dn,
3454
+ labelRight: Pn,
3473
3455
  onClick: r,
3474
- children: /* @__PURE__ */ c(kn, { className: "size-7" })
3456
+ children: /* @__PURE__ */ c(An, { className: "size-7" })
3475
3457
  }
3476
3458
  ) }) })
3477
3459
  ] })
3478
3460
  ] }),
3479
- /* @__PURE__ */ c(Mn, {})
3461
+ /* @__PURE__ */ c(Ln, {})
3480
3462
  ] });
3481
- }, Bn = new URL(document.location.href).searchParams, Wn = !!Bn.get("debug") || !1, Gn = wt(() => import("./App.8LsHfy0z.js").then((e) => e.App)), Vn = ({ isComponent: e }) => {
3463
+ }, Kn = new URL(document.location.href).searchParams, Bn = !!Kn.get("debug") || !1, Wn = wt(() => import("./App.BjgAzPtR.js").then((e) => e.App)), Gn = ({ isComponent: e }) => {
3482
3464
  const { isAuthenticated: t } = qe();
3483
- return t ? /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Gn, { isComponent: e }) }) : /* @__PURE__ */ c(Kn, {});
3484
- }, Yn = ({
3465
+ return t ? /* @__PURE__ */ c(Tt, { fallback: /* @__PURE__ */ c("div", {}), children: /* @__PURE__ */ c(Wn, { isComponent: e }) }) : /* @__PURE__ */ c(Hn, {});
3466
+ }, Vn = ({
3485
3467
  isComponent: e = !1,
3486
- domain: t = Ua
3487
- }) => /* @__PURE__ */ c(le, { children: /* @__PURE__ */ c(_a, { clientId: Ra, domain: t, debug: Wn, children: /* @__PURE__ */ c(Vn, { isComponent: e }) }) }), Xo = ({ domain: e }) => /* @__PURE__ */ c(Yn, { isComponent: !0, domain: e });
3468
+ domain: t = Ma
3469
+ }) => /* @__PURE__ */ c(le, { children: /* @__PURE__ */ c(ka, { clientId: _a, domain: t, debug: Bn, children: /* @__PURE__ */ c(Gn, { isComponent: e }) }) }), Fo = ({ domain: e }) => /* @__PURE__ */ c(Vn, { isComponent: !0, domain: e });
3488
3470
  export {
3489
- Ft as A,
3490
- Jo as ABOUT_TITLE,
3491
- mo as ACTION_LOCATION,
3492
- io as ACTION_MESSAGE,
3493
- lo as ACTION_MODEL,
3494
- co as ACTION_RESET,
3495
- uo as ACTION_RESTORE,
3496
- po as ACTION_SEARCH,
3497
- go as ACTION_SORT,
3498
- ho as ACTION_STREAMING,
3499
- Mn as AppFooter,
3500
- jo as CANCEL,
3501
- Qo as CARDS,
3502
- zo as CLEAR,
3503
- no as ERROR_MESSAGE,
3504
- so as GPT4_MAX_TOKENS,
3505
- Yo as HISTORY_TITLE,
3506
- yo as LOCAL_STORAGE_CHAT_DETAILS,
3507
- wo as LOCAL_STORAGE_LOCATION,
3508
- fo as LOCAL_STORAGE_PREFIX,
3509
- bo as LOCAL_STORAGE_SEARCH,
3510
- Eo as LOCAL_STORAGE_SORT,
3511
- Bo as LOG_OUT,
3512
- an as M,
3513
- oo as MODEL_GPT4,
3514
- Hn as MessagesContainerHeader,
3515
- Po as N,
3516
- Za as N$1,
3517
- qo as NA,
3471
+ Jt as A,
3472
+ Bo as ABOUT_TITLE,
3473
+ so as ACTION_MESSAGE,
3474
+ co as ACTION_MODEL,
3475
+ io as ACTION_RESET,
3476
+ lo as ACTION_RESTORE,
3477
+ mo as ACTION_SEARCH,
3478
+ ho as ACTION_SORT,
3479
+ uo as ACTION_STREAMING,
3480
+ Ln as AppFooter,
3481
+ Vo as CANCEL,
3482
+ Jo as CARDS,
3483
+ Go as CLEAR,
3484
+ ao as ERROR_MESSAGE,
3485
+ oo as GPT4_MAX_TOKENS,
3486
+ Ko as HISTORY_TITLE,
3487
+ go as LOCAL_STORAGE_CHAT_DETAILS,
3488
+ po as LOCAL_STORAGE_PREFIX,
3489
+ fo as LOCAL_STORAGE_SEARCH,
3490
+ yo as LOCAL_STORAGE_SORT,
3491
+ Lo as LOG_OUT,
3492
+ rn as M,
3493
+ no as MODEL_GPT4,
3494
+ Un as MessagesContainerHeader,
3495
+ Ro as N,
3496
+ Xa as N$1,
3497
+ Yo as NA,
3518
3498
  Fe as O,
3519
- Go as PROFILE_TITLE,
3520
- eo as ROLE_ASSISTANT,
3521
- ao as ROLE_HIDDEN,
3522
- ro as ROLE_INTERNAL,
3523
- to as ROLE_SYSTEM,
3524
- Zn as ROLE_USER,
3499
+ Uo as PROFILE_TITLE,
3500
+ Zn as ROLE_ASSISTANT,
3501
+ ro as ROLE_HIDDEN,
3502
+ to as ROLE_INTERNAL,
3503
+ eo as ROLE_SYSTEM,
3504
+ Xn as ROLE_USER,
3525
3505
  Ce as S,
3526
- Wo as SEND,
3527
- Vo as STATS,
3528
- To as STATS_SEPARATOR,
3529
- Xo as SassySaint,
3530
- Fo as TYPE_QUESTION,
3531
- Qt as U,
3506
+ Mo as SEND,
3507
+ Ho as STATS,
3508
+ bo as STATS_SEPARATOR,
3509
+ Fo as SassySaint,
3510
+ Wo as TYPE_QUESTION,
3511
+ qt as U,
3532
3512
  ne as W,
3533
3513
  Ze as Y,
3534
- Uo as a,
3514
+ Po as a,
3535
3515
  gt as b,
3536
- tn as c,
3537
- $o as c$1,
3538
- So as convertLatitudeToDMS,
3539
- Ao as convertLongitudeToDMS,
3540
- xo as durationFormatter,
3541
- _o as extractAverage,
3542
- Yt as f,
3543
- rn as f$1,
3516
+ en as c,
3517
+ xo as c$1,
3518
+ Ao as durationFormatter,
3519
+ Io as extractAverage,
3520
+ Vt as f,
3521
+ tn as f$1,
3544
3522
  Oe as g,
3545
- vo as getCurrentGeoLocation,
3546
- Ha as getMessageContaintWrapperClass,
3523
+ wo as getCurrentGeoLocation,
3524
+ Ua as getMessageContaintWrapperClass,
3547
3525
  Xe as i,
3548
- Do as i$1,
3549
- Ro as isLastMessageFromRole,
3526
+ No as i$1,
3527
+ So as isLastMessageFromRole,
3550
3528
  ae as j,
3551
- Ho as l,
3552
- Lo as n,
3553
- No as numberFormatter,
3554
- ln as o,
3555
- Ko as p,
3556
- Co as pluralize,
3529
+ Do as l,
3530
+ Co as n,
3531
+ vo as numberFormatter,
3532
+ cn as o,
3533
+ $o as p,
3534
+ ko as pluralize,
3557
3535
  qe as qr,
3558
- Mo as r,
3559
- ko as renderDataAsList,
3560
- Oo as s,
3561
- Io as truncate,
3562
- kn as v,
3563
- zt as x
3536
+ Oo as r,
3537
+ To as renderDataAsList,
3538
+ _o as s,
3539
+ Eo as truncate,
3540
+ An as v,
3541
+ Ft as x
3564
3542
  };