@versini/sassysaint 8.70.1 → 8.70.3

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.
Files changed (26) hide show
  1. package/dist/chunks/{AboutChangelog._T5Lr2_6.js → AboutChangelog.D7hu4Qqk.js} +2 -2
  2. package/dist/chunks/{AboutEntry.DJ0OUM4_.js → AboutEntry.CXGcXe6K.js} +7 -7
  3. package/dist/chunks/{App.CcqDGZun.js → App.DsIUXmFA.js} +1723 -1743
  4. package/dist/chunks/{Chart.Dm81lz3L.js → Chart.Ckm3ANSq.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.D4Ru1U9N.js → ChatBubbleAssistant.3ROQNV_n.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.CvpUTP0y.js → ChatBubbleUser.B3m6lXZh.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.CDC3cvyT.js → ChatHistoryTable.CoZAK6Eh.js} +3 -3
  8. package/dist/chunks/{HistoryEntry.C_3ek905.js → HistoryEntry.BB34Lt3G.js} +107 -113
  9. package/dist/chunks/{ProfileEntry.BcL78DD5.js → ProfileEntry.CJ47oHQw.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.F8OD9jcf.js → SettingsEntry.Cb1kQyJ0.js} +29 -29
  11. package/dist/chunks/{Table.DvDzjCKJ.js → Table.CbLJ09Ts.js} +2 -2
  12. package/dist/chunks/{UsageEntry.BJMW3Rxc.js → UsageEntry.Dsmj0zqB.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.BByjrVlZ.js → UserMemoriesPanel.BfA8qOUH.js} +4 -4
  14. package/dist/chunks/{index.CpmMOFcw.js → index.BBkOItAA.js} +1 -1
  15. package/dist/chunks/{index.DZlzg3MC.js → index.BJjl5HBk.js} +1 -1
  16. package/dist/chunks/{index.CRvAVi49.js → index.BUHFHowY.js} +3 -3
  17. package/dist/chunks/{index.5sFEsLHg.js → index.BgfJhLwR.js} +1 -1
  18. package/dist/chunks/{index.DAjlwxaV.js → index.BuTELlmM.js} +1 -1
  19. package/dist/chunks/{index.ByjDYmg9.js → index.ByEQpFTA.js} +909 -837
  20. package/dist/chunks/{index.BE-5S88E.js → index.CTp_-pvG.js} +1 -1
  21. package/dist/chunks/{index.B-4Q-F7F.js → index.DvP4TYvo.js} +2 -2
  22. package/dist/chunks/{useMarkdown.4pam55Dz.js → useMarkdown.SFGGCgew.js} +6 -6
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +1 -1
  26. package/package.json +3 -3
@@ -1,8 +1,8 @@
1
- import { jsx as h, jsxs as q, Fragment as Cr } from "react/jsx-runtime";
1
+ import { jsx as h, jsxs as V, Fragment as Or } from "react/jsx-runtime";
2
2
  import * as H from "react";
3
- import oe, { createContext as Lt, useReducer as Or, useCallback as z, useRef as j, useEffect as W, useSyncExternalStore as Ks, useContext as it, useState as ie, useMemo as Ye, useId as Gs, useLayoutEffect as ze, Suspense as Bs, lazy as Ws } from "react";
3
+ import oe, { createContext as Ft, useReducer as kr, useCallback as X, useRef as j, useEffect as W, useSyncExternalStore as Ks, useContext as ct, useState as ie, useMemo as ze, useId as Gs, useLayoutEffect as Xe, Suspense as Bs, lazy as qs } from "react";
4
4
  import y from "clsx";
5
- var ke = class {
5
+ var Ne = class {
6
6
  constructor() {
7
7
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
8
8
  }
@@ -18,7 +18,7 @@ var ke = class {
18
18
  }
19
19
  onUnsubscribe() {
20
20
  }
21
- }, qs = {
21
+ }, Ws = {
22
22
  // We need the wrapper function syntax below instead of direct references to
23
23
  // global setTimeout etc.
24
24
  //
@@ -33,14 +33,14 @@ var ke = class {
33
33
  clearTimeout: (e) => clearTimeout(e),
34
34
  setInterval: (e, t) => setInterval(e, t),
35
35
  clearInterval: (e) => clearInterval(e)
36
- }, js = class {
36
+ }, Vs = class {
37
37
  // We cannot have TimeoutManager<T> as we must instantiate it with a concrete
38
38
  // type at app boot; and if we leave that type, then any new timer provider
39
39
  // would need to support ReturnType<typeof setTimeout>, which is infeasible.
40
40
  //
41
41
  // We settle for type safety for the TimeoutProvider type, and accept that
42
42
  // this class is unsafe internally to allow for extension.
43
- #e = qs;
43
+ #e = Ws;
44
44
  #t = !1;
45
45
  setTimeoutProvider(e) {
46
46
  process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error(
@@ -60,29 +60,29 @@ var ke = class {
60
60
  clearInterval(e) {
61
61
  this.#e.clearInterval(e);
62
62
  }
63
- }, fe = new js();
64
- function Vs(e) {
63
+ }, ge = new Vs();
64
+ function js(e) {
65
65
  setTimeout(e, 0);
66
66
  }
67
- var me = typeof window > "u" || "Deno" in globalThis;
68
- function B() {
67
+ var be = typeof window > "u" || "Deno" in globalThis;
68
+ function q() {
69
69
  }
70
70
  function Qs(e, t) {
71
71
  return typeof e == "function" ? e(t) : e;
72
72
  }
73
- function _t(e) {
73
+ function Ct(e) {
74
74
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
75
75
  }
76
- function kr(e, t) {
76
+ function Nr(e, t) {
77
77
  return Math.max(e + (t || 0) - Date.now(), 0);
78
78
  }
79
79
  function de(e, t) {
80
80
  return typeof e == "function" ? e(t) : e;
81
81
  }
82
- function Q(e, t) {
82
+ function Y(e, t) {
83
83
  return typeof e == "function" ? e(t) : e;
84
84
  }
85
- function Zt(e, t) {
85
+ function er(e, t) {
86
86
  const {
87
87
  type: r = "all",
88
88
  exact: s,
@@ -93,9 +93,9 @@ function Zt(e, t) {
93
93
  } = e;
94
94
  if (i) {
95
95
  if (s) {
96
- if (t.queryHash !== Ut(i, t.options))
96
+ if (t.queryHash !== Ht(i, t.options))
97
97
  return !1;
98
- } else if (!xe(t.queryKey, i))
98
+ } else if (!De(t.queryKey, i))
99
99
  return !1;
100
100
  }
101
101
  if (r !== "all") {
@@ -105,37 +105,37 @@ function Zt(e, t) {
105
105
  }
106
106
  return !(typeof o == "boolean" && t.isStale() !== o || a && a !== t.state.fetchStatus || n && !n(t));
107
107
  }
108
- function er(e, t) {
108
+ function tr(e, t) {
109
109
  const { exact: r, status: s, predicate: a, mutationKey: n } = e;
110
110
  if (n) {
111
111
  if (!t.options.mutationKey)
112
112
  return !1;
113
113
  if (r) {
114
- if (pe(t.options.mutationKey) !== pe(n))
114
+ if (Ee(t.options.mutationKey) !== Ee(n))
115
115
  return !1;
116
- } else if (!xe(t.options.mutationKey, n))
116
+ } else if (!De(t.options.mutationKey, n))
117
117
  return !1;
118
118
  }
119
119
  return !(s && t.state.status !== s || a && !a(t));
120
120
  }
121
- function Ut(e, t) {
122
- return (t?.queryKeyHashFn || pe)(e);
121
+ function Ht(e, t) {
122
+ return (t?.queryKeyHashFn || Ee)(e);
123
123
  }
124
- function pe(e) {
124
+ function Ee(e) {
125
125
  return JSON.stringify(
126
126
  e,
127
- (t, r) => Ct(r) ? Object.keys(r).sort().reduce((s, a) => (s[a] = r[a], s), {}) : r
127
+ (t, r) => kt(r) ? Object.keys(r).sort().reduce((s, a) => (s[a] = r[a], s), {}) : r
128
128
  );
129
129
  }
130
- function xe(e, t) {
131
- return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((r) => xe(e[r], t[r])) : !1;
130
+ function De(e, t) {
131
+ return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((r) => De(e[r], t[r])) : !1;
132
132
  }
133
133
  var Js = Object.prototype.hasOwnProperty;
134
- function Rt(e, t) {
134
+ function Ot(e, t) {
135
135
  if (e === t)
136
136
  return e;
137
- const r = tr(e) && tr(t);
138
- if (!r && !(Ct(e) && Ct(t))) return t;
137
+ const r = rr(e) && rr(t);
138
+ if (!r && !(kt(e) && kt(t))) return t;
139
139
  const a = (r ? e : Object.keys(e)).length, n = r ? t : Object.keys(t), i = n.length, o = r ? new Array(i) : {};
140
140
  let c = 0;
141
141
  for (let f = 0; f < i; f++) {
@@ -148,12 +148,12 @@ function Rt(e, t) {
148
148
  o[d] = l;
149
149
  continue;
150
150
  }
151
- const m = Rt(u, l);
151
+ const m = Ot(u, l);
152
152
  o[d] = m, m === u && c++;
153
153
  }
154
154
  return a === i && c === a ? e : o;
155
155
  }
156
- function Xe(e, t) {
156
+ function Ze(e, t) {
157
157
  if (!t || Object.keys(e).length !== Object.keys(t).length)
158
158
  return !1;
159
159
  for (const r in e)
@@ -161,39 +161,39 @@ function Xe(e, t) {
161
161
  return !1;
162
162
  return !0;
163
163
  }
164
- function tr(e) {
164
+ function rr(e) {
165
165
  return Array.isArray(e) && e.length === Object.keys(e).length;
166
166
  }
167
- function Ct(e) {
168
- if (!rr(e))
167
+ function kt(e) {
168
+ if (!sr(e))
169
169
  return !1;
170
170
  const t = e.constructor;
171
171
  if (t === void 0)
172
172
  return !0;
173
173
  const r = t.prototype;
174
- return !(!rr(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
174
+ return !(!sr(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
175
175
  }
176
- function rr(e) {
176
+ function sr(e) {
177
177
  return Object.prototype.toString.call(e) === "[object Object]";
178
178
  }
179
179
  function Ys(e) {
180
180
  return new Promise((t) => {
181
- fe.setTimeout(t, e);
181
+ ge.setTimeout(t, e);
182
182
  });
183
183
  }
184
- function Ot(e, t, r) {
184
+ function Nt(e, t, r) {
185
185
  if (typeof r.structuralSharing == "function")
186
186
  return r.structuralSharing(e, t);
187
187
  if (r.structuralSharing !== !1) {
188
188
  if (process.env.NODE_ENV !== "production")
189
189
  try {
190
- return Rt(e, t);
190
+ return Ot(e, t);
191
191
  } catch (s) {
192
192
  throw console.error(
193
193
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${s}`
194
194
  ), s;
195
195
  }
196
- return Rt(e, t);
196
+ return Ot(e, t);
197
197
  }
198
198
  return t;
199
199
  }
@@ -205,22 +205,22 @@ function Xs(e, t, r = 0) {
205
205
  const s = [t, ...e];
206
206
  return r && s.length > r ? s.slice(0, -1) : s;
207
207
  }
208
- var Ze = Symbol();
209
- function Nr(e, t) {
210
- return process.env.NODE_ENV !== "production" && e.queryFn === Ze && console.error(
208
+ var et = Symbol();
209
+ function Pr(e, t) {
210
+ return process.env.NODE_ENV !== "production" && e.queryFn === et && console.error(
211
211
  `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
212
- ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === Ze ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
212
+ ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === et ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
213
213
  }
214
- function Pr(e, t) {
214
+ function $r(e, t) {
215
215
  return typeof e == "function" ? e(...t) : !!e;
216
216
  }
217
- var Zs = class extends ke {
217
+ var Zs = class extends Ne {
218
218
  #e;
219
219
  #t;
220
220
  #r;
221
221
  constructor() {
222
222
  super(), this.#r = (e) => {
223
- if (!me && window.addEventListener) {
223
+ if (!be && window.addEventListener) {
224
224
  const t = () => e();
225
225
  return window.addEventListener("visibilitychange", t, !1), () => {
226
226
  window.removeEventListener("visibilitychange", t);
@@ -251,8 +251,8 @@ var Zs = class extends ke {
251
251
  isFocused() {
252
252
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
253
253
  }
254
- }, Ft = new Zs();
255
- function kt() {
254
+ }, Kt = new Zs();
255
+ function Pt() {
256
256
  let e, t;
257
257
  const r = new Promise((a, n) => {
258
258
  e = a, t = n;
@@ -274,7 +274,7 @@ function kt() {
274
274
  }), t(a);
275
275
  }, r;
276
276
  }
277
- var ea = Vs;
277
+ var ea = js;
278
278
  function ta() {
279
279
  let e = [], t = 0, r = (o) => {
280
280
  o();
@@ -334,13 +334,13 @@ function ta() {
334
334
  }
335
335
  };
336
336
  }
337
- var $ = ta(), ra = class extends ke {
337
+ var $ = ta(), ra = class extends Ne {
338
338
  #e = !0;
339
339
  #t;
340
340
  #r;
341
341
  constructor() {
342
342
  super(), this.#r = (e) => {
343
- if (!me && window.addEventListener) {
343
+ if (!be && window.addEventListener) {
344
344
  const t = () => e(!0), r = () => e(!1);
345
345
  return window.addEventListener("online", t, !1), window.addEventListener("offline", r, !1), () => {
346
346
  window.removeEventListener("online", t), window.removeEventListener("offline", r);
@@ -365,30 +365,30 @@ var $ = ta(), ra = class extends ke {
365
365
  isOnline() {
366
366
  return this.#e;
367
367
  }
368
- }, et = new ra();
368
+ }, tt = new ra();
369
369
  function sa(e) {
370
370
  return Math.min(1e3 * 2 ** e, 3e4);
371
371
  }
372
- function $r(e) {
373
- return (e ?? "online") === "online" ? et.isOnline() : !0;
372
+ function xr(e) {
373
+ return (e ?? "online") === "online" ? tt.isOnline() : !0;
374
374
  }
375
- var Nt = class extends Error {
375
+ var $t = class extends Error {
376
376
  constructor(e) {
377
377
  super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
378
378
  }
379
379
  };
380
- function xr(e) {
380
+ function Mr(e) {
381
381
  let t = !1, r = 0, s;
382
- const a = kt(), n = () => a.status !== "pending", i = (g) => {
382
+ const a = Pt(), n = () => a.status !== "pending", i = (g) => {
383
383
  if (!n()) {
384
- const b = new Nt(g);
384
+ const b = new $t(g);
385
385
  l(b), e.onCancel?.(b);
386
386
  }
387
387
  }, o = () => {
388
388
  t = !0;
389
389
  }, c = () => {
390
390
  t = !1;
391
- }, f = () => Ft.isFocused() && (e.networkMode === "always" || et.isOnline()) && e.canRun(), d = () => $r(e.networkMode) && e.canRun(), u = (g) => {
391
+ }, f = () => Kt.isFocused() && (e.networkMode === "always" || tt.isOnline()) && e.canRun(), d = () => xr(e.networkMode) && e.canRun(), u = (g) => {
392
392
  n() || (s?.(), a.resolve(g));
393
393
  }, l = (g) => {
394
394
  n() || (s?.(), a.reject(g));
@@ -411,7 +411,7 @@ function xr(e) {
411
411
  Promise.resolve(g).then(u).catch((E) => {
412
412
  if (n())
413
413
  return;
414
- const O = e.retry ?? (me ? 0 : 3), A = e.retryDelay ?? sa, K = typeof A == "function" ? A(r, E) : A, R = O === !0 || typeof O == "number" && r < O || typeof O == "function" && O(r, E);
414
+ const O = e.retry ?? (be ? 0 : 3), A = e.retryDelay ?? sa, K = typeof A == "function" ? A(r, E) : A, R = O === !0 || typeof O == "number" && r < O || typeof O == "function" && O(r, E);
415
415
  if (t || !R) {
416
416
  l(E);
417
417
  return;
@@ -432,26 +432,26 @@ function xr(e) {
432
432
  start: () => (d() ? p() : m().then(p), a)
433
433
  };
434
434
  }
435
- var Mr = class {
435
+ var Dr = class {
436
436
  #e;
437
437
  destroy() {
438
438
  this.clearGcTimeout();
439
439
  }
440
440
  scheduleGc() {
441
- this.clearGcTimeout(), _t(this.gcTime) && (this.#e = fe.setTimeout(() => {
441
+ this.clearGcTimeout(), Ct(this.gcTime) && (this.#e = ge.setTimeout(() => {
442
442
  this.optionalRemove();
443
443
  }, this.gcTime));
444
444
  }
445
445
  updateGcTime(e) {
446
446
  this.gcTime = Math.max(
447
447
  this.gcTime || 0,
448
- e ?? (me ? 1 / 0 : 300 * 1e3)
448
+ e ?? (be ? 1 / 0 : 300 * 1e3)
449
449
  );
450
450
  }
451
451
  clearGcTimeout() {
452
- this.#e && (fe.clearTimeout(this.#e), this.#e = void 0);
452
+ this.#e && (ge.clearTimeout(this.#e), this.#e = void 0);
453
453
  }
454
- }, aa = class extends Mr {
454
+ }, aa = class extends Dr {
455
455
  #e;
456
456
  #t;
457
457
  #r;
@@ -460,7 +460,7 @@ var Mr = class {
460
460
  #i;
461
461
  #o;
462
462
  constructor(e) {
463
- super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#a = e.client, this.#r = this.#a.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = sr(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
463
+ super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#a = e.client, this.#r = this.#a.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = ar(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
464
464
  }
465
465
  get meta() {
466
466
  return this.options.meta;
@@ -470,7 +470,7 @@ var Mr = class {
470
470
  }
471
471
  setOptions(e) {
472
472
  if (this.options = { ...this.#i, ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
473
- const t = sr(this.options);
473
+ const t = ar(this.options);
474
474
  t.data !== void 0 && (this.setData(t.data, {
475
475
  updatedAt: t.dataUpdatedAt,
476
476
  manual: !0
@@ -481,7 +481,7 @@ var Mr = class {
481
481
  !this.observers.length && this.state.fetchStatus === "idle" && this.#r.remove(this);
482
482
  }
483
483
  setData(e, t) {
484
- const r = Ot(this.state.data, e, this.options);
484
+ const r = Nt(this.state.data, e, this.options);
485
485
  return this.#n({
486
486
  data: r,
487
487
  type: "success",
@@ -494,7 +494,7 @@ var Mr = class {
494
494
  }
495
495
  cancel(e) {
496
496
  const t = this.#s?.promise;
497
- return this.#s?.cancel(e), t ? t.then(B).catch(B) : Promise.resolve();
497
+ return this.#s?.cancel(e), t ? t.then(q).catch(q) : Promise.resolve();
498
498
  }
499
499
  destroy() {
500
500
  super.destroy(), this.cancel({ silent: !0 });
@@ -504,11 +504,11 @@ var Mr = class {
504
504
  }
505
505
  isActive() {
506
506
  return this.observers.some(
507
- (e) => Q(e.options.enabled, this) !== !1
507
+ (e) => Y(e.options.enabled, this) !== !1
508
508
  );
509
509
  }
510
510
  isDisabled() {
511
- return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === Ze || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
511
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === et || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
512
512
  }
513
513
  isStatic() {
514
514
  return this.getObserversCount() > 0 ? this.observers.some(
@@ -521,7 +521,7 @@ var Mr = class {
521
521
  ) : this.state.data === void 0 || this.state.isInvalidated;
522
522
  }
523
523
  isStaleByTime(e = 0) {
524
- return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !kr(this.state.dataUpdatedAt, e);
524
+ return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !Nr(this.state.dataUpdatedAt, e);
525
525
  }
526
526
  onFocus() {
527
527
  this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#s?.continue();
@@ -564,7 +564,7 @@ var Mr = class {
564
564
  get: () => (this.#o = !0, r.signal)
565
565
  });
566
566
  }, a = () => {
567
- const o = Nr(this.options, t), f = (() => {
567
+ const o = Pr(this.options, t), f = (() => {
568
568
  const d = {
569
569
  client: this.#a,
570
570
  queryKey: this.queryKey,
@@ -588,11 +588,11 @@ var Mr = class {
588
588
  };
589
589
  return s(o), o;
590
590
  })();
591
- this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#n({ type: "fetch", meta: i.fetchOptions?.meta }), this.#s = xr({
591
+ this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#n({ type: "fetch", meta: i.fetchOptions?.meta }), this.#s = Mr({
592
592
  initialPromise: t?.initialPromise,
593
593
  fn: i.fetchFn,
594
594
  onCancel: (o) => {
595
- o instanceof Nt && o.revert && this.setState({
595
+ o instanceof $t && o.revert && this.setState({
596
596
  ...this.#t,
597
597
  fetchStatus: "idle"
598
598
  }), r.abort();
@@ -623,7 +623,7 @@ var Mr = class {
623
623
  this
624
624
  ), o;
625
625
  } catch (o) {
626
- if (o instanceof Nt) {
626
+ if (o instanceof $t) {
627
627
  if (o.silent)
628
628
  return this.#s.promise;
629
629
  if (o.revert) {
@@ -669,7 +669,7 @@ var Mr = class {
669
669
  case "fetch":
670
670
  return {
671
671
  ...r,
672
- ...Dr(r.data, this.options),
672
+ ...Lr(r.data, this.options),
673
673
  fetchMeta: e.meta ?? null
674
674
  };
675
675
  case "success":
@@ -719,18 +719,18 @@ var Mr = class {
719
719
  });
720
720
  }
721
721
  };
722
- function Dr(e, t) {
722
+ function Lr(e, t) {
723
723
  return {
724
724
  fetchFailureCount: 0,
725
725
  fetchFailureReason: null,
726
- fetchStatus: $r(t.networkMode) ? "fetching" : "paused",
726
+ fetchStatus: xr(t.networkMode) ? "fetching" : "paused",
727
727
  ...e === void 0 && {
728
728
  error: null,
729
729
  status: "pending"
730
730
  }
731
731
  };
732
732
  }
733
- function sr(e) {
733
+ function ar(e) {
734
734
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, r = t !== void 0, s = r ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
735
735
  return {
736
736
  data: t,
@@ -747,9 +747,9 @@ function sr(e) {
747
747
  fetchStatus: "idle"
748
748
  };
749
749
  }
750
- var na = class extends ke {
750
+ var na = class extends Ne {
751
751
  constructor(e, t) {
752
- super(), this.options = t, this.#e = e, this.#n = null, this.#o = kt(), this.bindMethods(), this.setOptions(t);
752
+ super(), this.options = t, this.#e = e, this.#n = null, this.#o = Pt(), this.bindMethods(), this.setOptions(t);
753
753
  }
754
754
  #e;
755
755
  #t = void 0;
@@ -772,20 +772,20 @@ var na = class extends ke {
772
772
  this.refetch = this.refetch.bind(this);
773
773
  }
774
774
  onSubscribe() {
775
- this.listeners.size === 1 && (this.#t.addObserver(this), ar(this.#t, this.options) ? this.#d() : this.updateResult(), this.#E());
775
+ this.listeners.size === 1 && (this.#t.addObserver(this), nr(this.#t, this.options) ? this.#d() : this.updateResult(), this.#E());
776
776
  }
777
777
  onUnsubscribe() {
778
778
  this.hasListeners() || this.destroy();
779
779
  }
780
780
  shouldFetchOnReconnect() {
781
- return Pt(
781
+ return xt(
782
782
  this.#t,
783
783
  this.options,
784
784
  this.options.refetchOnReconnect
785
785
  );
786
786
  }
787
787
  shouldFetchOnWindowFocus() {
788
- return Pt(
788
+ return xt(
789
789
  this.#t,
790
790
  this.options,
791
791
  this.options.refetchOnWindowFocus
@@ -796,24 +796,24 @@ var na = class extends ke {
796
796
  }
797
797
  setOptions(e) {
798
798
  const t = this.options, r = this.#t;
799
- if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Q(this.options.enabled, this.#t) != "boolean")
799
+ if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Y(this.options.enabled, this.#t) != "boolean")
800
800
  throw new Error(
801
801
  "Expected enabled to be a boolean or a callback that returns a boolean"
802
802
  );
803
- this.#v(), this.#t.setOptions(this.options), t._defaulted && !Xe(this.options, t) && this.#e.getQueryCache().notify({
803
+ this.#v(), this.#t.setOptions(this.options), t._defaulted && !Ze(this.options, t) && this.#e.getQueryCache().notify({
804
804
  type: "observerOptionsUpdated",
805
805
  query: this.#t,
806
806
  observer: this
807
807
  });
808
808
  const s = this.hasListeners();
809
- s && nr(
809
+ s && ir(
810
810
  this.#t,
811
811
  r,
812
812
  this.options,
813
813
  t
814
- ) && this.#d(), this.updateResult(), s && (this.#t !== r || Q(this.options.enabled, this.#t) !== Q(t.enabled, this.#t) || de(this.options.staleTime, this.#t) !== de(t.staleTime, this.#t)) && this.#y();
814
+ ) && this.#d(), this.updateResult(), s && (this.#t !== r || Y(this.options.enabled, this.#t) !== Y(t.enabled, this.#t) || de(this.options.staleTime, this.#t) !== de(t.staleTime, this.#t)) && this.#y();
815
815
  const a = this.#g();
816
- s && (this.#t !== r || Q(this.options.enabled, this.#t) !== Q(t.enabled, this.#t) || a !== this.#c) && this.#b(a);
816
+ s && (this.#t !== r || Y(this.options.enabled, this.#t) !== Y(t.enabled, this.#t) || a !== this.#c) && this.#b(a);
817
817
  }
818
818
  getOptimisticResult(e) {
819
819
  const t = this.#e.getQueryCache().build(this.#e, e), r = this.createResult(t, e);
@@ -858,7 +858,7 @@ var na = class extends ke {
858
858
  this.options,
859
859
  e
860
860
  );
861
- return e?.throwOnError || (t = t.catch(B)), t;
861
+ return e?.throwOnError || (t = t.catch(q)), t;
862
862
  }
863
863
  #y() {
864
864
  this.#w();
@@ -866,10 +866,10 @@ var na = class extends ke {
866
866
  this.options.staleTime,
867
867
  this.#t
868
868
  );
869
- if (me || this.#a.isStale || !_t(e))
869
+ if (be || this.#a.isStale || !Ct(e))
870
870
  return;
871
- const r = kr(this.#a.dataUpdatedAt, e) + 1;
872
- this.#l = fe.setTimeout(() => {
871
+ const r = Nr(this.#a.dataUpdatedAt, e) + 1;
872
+ this.#l = ge.setTimeout(() => {
873
873
  this.#a.isStale || this.updateResult();
874
874
  }, r);
875
875
  }
@@ -877,27 +877,27 @@ var na = class extends ke {
877
877
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
878
878
  }
879
879
  #b(e) {
880
- this.#S(), this.#c = e, !(me || Q(this.options.enabled, this.#t) === !1 || !_t(this.#c) || this.#c === 0) && (this.#u = fe.setInterval(() => {
881
- (this.options.refetchIntervalInBackground || Ft.isFocused()) && this.#d();
880
+ this.#S(), this.#c = e, !(be || Y(this.options.enabled, this.#t) === !1 || !Ct(this.#c) || this.#c === 0) && (this.#u = ge.setInterval(() => {
881
+ (this.options.refetchIntervalInBackground || Kt.isFocused()) && this.#d();
882
882
  }, this.#c));
883
883
  }
884
884
  #E() {
885
885
  this.#y(), this.#b(this.#g());
886
886
  }
887
887
  #w() {
888
- this.#l && (fe.clearTimeout(this.#l), this.#l = void 0);
888
+ this.#l && (ge.clearTimeout(this.#l), this.#l = void 0);
889
889
  }
890
890
  #S() {
891
- this.#u && (fe.clearInterval(this.#u), this.#u = void 0);
891
+ this.#u && (ge.clearInterval(this.#u), this.#u = void 0);
892
892
  }
893
893
  createResult(e, t) {
894
894
  const r = this.#t, s = this.options, a = this.#a, n = this.#s, i = this.#i, c = e !== r ? e.state : this.#r, { state: f } = e;
895
895
  let d = { ...f }, u = !1, l;
896
896
  if (t._optimisticResults) {
897
- const v = this.hasListeners(), x = !v && ar(e, t), _ = v && nr(e, r, t, s);
897
+ const v = this.hasListeners(), x = !v && nr(e, t), _ = v && ir(e, r, t, s);
898
898
  (x || _) && (d = {
899
899
  ...d,
900
- ...Dr(f.data, e.options)
900
+ ...Lr(f.data, e.options)
901
901
  }), t._optimisticResults === "isRestoring" && (d.fetchStatus = "idle");
902
902
  }
903
903
  let { error: m, errorUpdatedAt: p, status: g } = d;
@@ -908,7 +908,7 @@ var na = class extends ke {
908
908
  a?.isPlaceholderData && t.placeholderData === i?.placeholderData ? (v = a.data, b = !0) : v = typeof t.placeholderData == "function" ? t.placeholderData(
909
909
  this.#f?.state.data,
910
910
  this.#f
911
- ) : t.placeholderData, v !== void 0 && (g = "success", l = Ot(
911
+ ) : t.placeholderData, v !== void 0 && (g = "success", l = Nt(
912
912
  a?.data,
913
913
  v,
914
914
  t
@@ -919,7 +919,7 @@ var na = class extends ke {
919
919
  l = this.#h;
920
920
  else
921
921
  try {
922
- this.#p = t.select, l = t.select(l), l = Ot(a?.data, l, t), this.#h = l, this.#n = null;
922
+ this.#p = t.select, l = t.select(l), l = Nt(a?.data, l, t), this.#h = l, this.#n = null;
923
923
  } catch (v) {
924
924
  this.#n = v;
925
925
  }
@@ -947,16 +947,16 @@ var na = class extends ke {
947
947
  isPaused: d.fetchStatus === "paused",
948
948
  isPlaceholderData: u,
949
949
  isRefetchError: A && R,
950
- isStale: Ht(e, t),
950
+ isStale: Gt(e, t),
951
951
  refetch: this.refetch,
952
952
  promise: this.#o,
953
- isEnabled: Q(t.enabled, e) !== !1
953
+ isEnabled: Y(t.enabled, e) !== !1
954
954
  };
955
955
  if (this.options.experimental_prefetchInRender) {
956
956
  const v = (I) => {
957
957
  C.status === "error" ? I.reject(C.error) : C.data !== void 0 && I.resolve(C.data);
958
958
  }, x = () => {
959
- const I = this.#o = C.promise = kt();
959
+ const I = this.#o = C.promise = Pt();
960
960
  v(I);
961
961
  }, _ = this.#o;
962
962
  switch (_.status) {
@@ -975,7 +975,7 @@ var na = class extends ke {
975
975
  }
976
976
  updateResult() {
977
977
  const e = this.#a, t = this.createResult(this.#t, this.options);
978
- if (this.#s = this.#t.state, this.#i = this.options, this.#s.data !== void 0 && (this.#f = this.#t), Xe(t, e))
978
+ if (this.#s = this.#t.state, this.#i = this.options, this.#s.data !== void 0 && (this.#f = this.#t), Ze(t, e))
979
979
  return;
980
980
  this.#a = t;
981
981
  const r = () => {
@@ -1016,28 +1016,28 @@ var na = class extends ke {
1016
1016
  }
1017
1017
  };
1018
1018
  function ia(e, t) {
1019
- return Q(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1019
+ return Y(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1020
1020
  }
1021
- function ar(e, t) {
1022
- return ia(e, t) || e.state.data !== void 0 && Pt(e, t, t.refetchOnMount);
1021
+ function nr(e, t) {
1022
+ return ia(e, t) || e.state.data !== void 0 && xt(e, t, t.refetchOnMount);
1023
1023
  }
1024
- function Pt(e, t, r) {
1025
- if (Q(t.enabled, e) !== !1 && de(t.staleTime, e) !== "static") {
1024
+ function xt(e, t, r) {
1025
+ if (Y(t.enabled, e) !== !1 && de(t.staleTime, e) !== "static") {
1026
1026
  const s = typeof r == "function" ? r(e) : r;
1027
- return s === "always" || s !== !1 && Ht(e, t);
1027
+ return s === "always" || s !== !1 && Gt(e, t);
1028
1028
  }
1029
1029
  return !1;
1030
1030
  }
1031
- function nr(e, t, r, s) {
1032
- return (e !== t || Q(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Ht(e, r);
1031
+ function ir(e, t, r, s) {
1032
+ return (e !== t || Y(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Gt(e, r);
1033
1033
  }
1034
- function Ht(e, t) {
1035
- return Q(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
1034
+ function Gt(e, t) {
1035
+ return Y(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
1036
1036
  }
1037
1037
  function oa(e, t) {
1038
- return !Xe(e.getCurrentResult(), t);
1038
+ return !Ze(e.getCurrentResult(), t);
1039
1039
  }
1040
- function ir(e) {
1040
+ function or(e) {
1041
1041
  return {
1042
1042
  onFetch: (t, r) => {
1043
1043
  const s = t.options, a = t.fetchOptions?.meta?.fetchMore?.direction, n = t.state.data?.pages || [], i = t.state.data?.pageParams || [];
@@ -1051,20 +1051,20 @@ function ir(e) {
1051
1051
  d = !0;
1052
1052
  }), t.signal)
1053
1053
  });
1054
- }, l = Nr(t.options, t.fetchOptions), m = async (p, g, b) => {
1054
+ }, l = Pr(t.options, t.fetchOptions), m = async (p, g, b) => {
1055
1055
  if (d)
1056
1056
  return Promise.reject();
1057
1057
  if (g == null && p.pages.length)
1058
1058
  return Promise.resolve(p);
1059
1059
  const O = (() => {
1060
- const Y = {
1060
+ const z = {
1061
1061
  client: t.client,
1062
1062
  queryKey: t.queryKey,
1063
1063
  pageParam: g,
1064
1064
  direction: b ? "backward" : "forward",
1065
1065
  meta: t.options.meta
1066
1066
  };
1067
- return u(Y), Y;
1067
+ return u(z), z;
1068
1068
  })(), A = await l(O), { maxPages: K } = t.options, R = b ? Xs : zs;
1069
1069
  return {
1070
1070
  pages: R(p.pages, A, K),
@@ -1072,7 +1072,7 @@ function ir(e) {
1072
1072
  };
1073
1073
  };
1074
1074
  if (a && n.length) {
1075
- const p = a === "backward", g = p ? ca : or, b = {
1075
+ const p = a === "backward", g = p ? ca : cr, b = {
1076
1076
  pages: n,
1077
1077
  pageParams: i
1078
1078
  }, E = g(s, b);
@@ -1080,7 +1080,7 @@ function ir(e) {
1080
1080
  } else {
1081
1081
  const p = e ?? n.length;
1082
1082
  do {
1083
- const g = c === 0 ? i[0] ?? s.initialPageParam : or(s, o);
1083
+ const g = c === 0 ? i[0] ?? s.initialPageParam : cr(s, o);
1084
1084
  if (c > 0 && g == null)
1085
1085
  break;
1086
1086
  o = await m(o, g), c++;
@@ -1101,7 +1101,7 @@ function ir(e) {
1101
1101
  }
1102
1102
  };
1103
1103
  }
1104
- function or(e, { pages: t, pageParams: r }) {
1104
+ function cr(e, { pages: t, pageParams: r }) {
1105
1105
  const s = t.length - 1;
1106
1106
  return t.length > 0 ? e.getNextPageParam(
1107
1107
  t[s],
@@ -1113,13 +1113,13 @@ function or(e, { pages: t, pageParams: r }) {
1113
1113
  function ca(e, { pages: t, pageParams: r }) {
1114
1114
  return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, r[0], r) : void 0;
1115
1115
  }
1116
- var la = class extends Mr {
1116
+ var la = class extends Dr {
1117
1117
  #e;
1118
1118
  #t;
1119
1119
  #r;
1120
1120
  #a;
1121
1121
  constructor(e) {
1122
- super(), this.#e = e.client, this.mutationId = e.mutationId, this.#r = e.mutationCache, this.#t = [], this.state = e.state || Lr(), this.setOptions(e.options), this.scheduleGc();
1122
+ super(), this.#e = e.client, this.mutationId = e.mutationId, this.#r = e.mutationCache, this.#t = [], this.state = e.state || Ur(), this.setOptions(e.options), this.scheduleGc();
1123
1123
  }
1124
1124
  setOptions(e) {
1125
1125
  this.options = e, this.updateGcTime(this.options.gcTime);
@@ -1156,7 +1156,7 @@ var la = class extends Mr {
1156
1156
  meta: this.options.meta,
1157
1157
  mutationKey: this.options.mutationKey
1158
1158
  };
1159
- this.#a = xr({
1159
+ this.#a = Mr({
1160
1160
  fn: () => this.options.mutationFn ? this.options.mutationFn(e, r) : Promise.reject(new Error("No mutationFn found")),
1161
1161
  onFail: (n, i) => {
1162
1162
  this.#s({ type: "failed", failureCount: n, error: i });
@@ -1316,7 +1316,7 @@ var la = class extends Mr {
1316
1316
  });
1317
1317
  }
1318
1318
  };
1319
- function Lr() {
1319
+ function Ur() {
1320
1320
  return {
1321
1321
  context: void 0,
1322
1322
  data: void 0,
@@ -1329,7 +1329,7 @@ function Lr() {
1329
1329
  submittedAt: 0
1330
1330
  };
1331
1331
  }
1332
- var ua = class extends ke {
1332
+ var ua = class extends Ne {
1333
1333
  constructor(e = {}) {
1334
1334
  super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#r = 0;
1335
1335
  }
@@ -1348,7 +1348,7 @@ var ua = class extends ke {
1348
1348
  }
1349
1349
  add(e) {
1350
1350
  this.#e.add(e);
1351
- const t = He(e);
1351
+ const t = Ke(e);
1352
1352
  if (typeof t == "string") {
1353
1353
  const r = this.#t.get(t);
1354
1354
  r ? r.push(e) : this.#t.set(t, [e]);
@@ -1357,7 +1357,7 @@ var ua = class extends ke {
1357
1357
  }
1358
1358
  remove(e) {
1359
1359
  if (this.#e.delete(e)) {
1360
- const t = He(e);
1360
+ const t = Ke(e);
1361
1361
  if (typeof t == "string") {
1362
1362
  const r = this.#t.get(t);
1363
1363
  if (r)
@@ -1370,7 +1370,7 @@ var ua = class extends ke {
1370
1370
  this.notify({ type: "removed", mutation: e });
1371
1371
  }
1372
1372
  canRun(e) {
1373
- const t = He(e);
1373
+ const t = Ke(e);
1374
1374
  if (typeof t == "string") {
1375
1375
  const s = this.#t.get(t)?.find(
1376
1376
  (a) => a.state.status === "pending"
@@ -1380,7 +1380,7 @@ var ua = class extends ke {
1380
1380
  return !0;
1381
1381
  }
1382
1382
  runNext(e) {
1383
- const t = He(e);
1383
+ const t = Ke(e);
1384
1384
  return typeof t == "string" ? this.#t.get(t)?.find((s) => s !== e && s.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
1385
1385
  }
1386
1386
  clear() {
@@ -1396,11 +1396,11 @@ var ua = class extends ke {
1396
1396
  find(e) {
1397
1397
  const t = { exact: !0, ...e };
1398
1398
  return this.getAll().find(
1399
- (r) => er(t, r)
1399
+ (r) => tr(t, r)
1400
1400
  );
1401
1401
  }
1402
1402
  findAll(e = {}) {
1403
- return this.getAll().filter((t) => er(e, t));
1403
+ return this.getAll().filter((t) => tr(e, t));
1404
1404
  }
1405
1405
  notify(e) {
1406
1406
  $.batch(() => {
@@ -1413,15 +1413,15 @@ var ua = class extends ke {
1413
1413
  const e = this.getAll().filter((t) => t.state.isPaused);
1414
1414
  return $.batch(
1415
1415
  () => Promise.all(
1416
- e.map((t) => t.continue().catch(B))
1416
+ e.map((t) => t.continue().catch(q))
1417
1417
  )
1418
1418
  );
1419
1419
  }
1420
1420
  };
1421
- function He(e) {
1421
+ function Ke(e) {
1422
1422
  return e.options.scope?.id;
1423
1423
  }
1424
- var da = class extends ke {
1424
+ var da = class extends Ne {
1425
1425
  #e;
1426
1426
  #t = void 0;
1427
1427
  #r;
@@ -1434,11 +1434,11 @@ var da = class extends ke {
1434
1434
  }
1435
1435
  setOptions(e) {
1436
1436
  const t = this.options;
1437
- this.options = this.#e.defaultMutationOptions(e), Xe(this.options, t) || this.#e.getMutationCache().notify({
1437
+ this.options = this.#e.defaultMutationOptions(e), Ze(this.options, t) || this.#e.getMutationCache().notify({
1438
1438
  type: "observerOptionsUpdated",
1439
1439
  mutation: this.#r,
1440
1440
  observer: this
1441
- }), t?.mutationKey && this.options.mutationKey && pe(t.mutationKey) !== pe(this.options.mutationKey) ? this.reset() : this.#r?.state.status === "pending" && this.#r.setOptions(this.options);
1441
+ }), t?.mutationKey && this.options.mutationKey && Ee(t.mutationKey) !== Ee(this.options.mutationKey) ? this.reset() : this.#r?.state.status === "pending" && this.#r.setOptions(this.options);
1442
1442
  }
1443
1443
  onUnsubscribe() {
1444
1444
  this.hasListeners() || this.#r?.removeObserver(this);
@@ -1456,7 +1456,7 @@ var da = class extends ke {
1456
1456
  return this.#a = t, this.#r?.removeObserver(this), this.#r = this.#e.getMutationCache().build(this.#e, this.options), this.#r.addObserver(this), this.#r.execute(e);
1457
1457
  }
1458
1458
  #s() {
1459
- const e = this.#r?.state ?? Lr();
1459
+ const e = this.#r?.state ?? Ur();
1460
1460
  this.#t = {
1461
1461
  ...e,
1462
1462
  isPending: e.status === "pending",
@@ -1504,13 +1504,13 @@ var da = class extends ke {
1504
1504
  });
1505
1505
  });
1506
1506
  }
1507
- }, ha = class extends ke {
1507
+ }, ha = class extends Ne {
1508
1508
  constructor(e = {}) {
1509
1509
  super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
1510
1510
  }
1511
1511
  #e;
1512
1512
  build(e, t, r) {
1513
- const s = t.queryKey, a = t.queryHash ?? Ut(s, t);
1513
+ const s = t.queryKey, a = t.queryHash ?? Ht(s, t);
1514
1514
  let n = this.get(a);
1515
1515
  return n || (n = new aa({
1516
1516
  client: e,
@@ -1547,12 +1547,12 @@ var da = class extends ke {
1547
1547
  find(e) {
1548
1548
  const t = { exact: !0, ...e };
1549
1549
  return this.getAll().find(
1550
- (r) => Zt(t, r)
1550
+ (r) => er(t, r)
1551
1551
  );
1552
1552
  }
1553
1553
  findAll(e = {}) {
1554
1554
  const t = this.getAll();
1555
- return Object.keys(e).length > 0 ? t.filter((r) => Zt(e, r)) : t;
1555
+ return Object.keys(e).length > 0 ? t.filter((r) => er(e, r)) : t;
1556
1556
  }
1557
1557
  notify(e) {
1558
1558
  $.batch(() => {
@@ -1588,9 +1588,9 @@ var da = class extends ke {
1588
1588
  this.#e = e.queryCache || new ha(), this.#t = e.mutationCache || new ua(), this.#r = e.defaultOptions || {}, this.#a = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#i = 0;
1589
1589
  }
1590
1590
  mount() {
1591
- this.#i++, this.#i === 1 && (this.#o = Ft.subscribe(async (e) => {
1591
+ this.#i++, this.#i === 1 && (this.#o = Kt.subscribe(async (e) => {
1592
1592
  e && (await this.resumePausedMutations(), this.#e.onFocus());
1593
- }), this.#n = et.subscribe(async (e) => {
1593
+ }), this.#n = tt.subscribe(async (e) => {
1594
1594
  e && (await this.resumePausedMutations(), this.#e.onOnline());
1595
1595
  }));
1596
1596
  }
@@ -1669,7 +1669,7 @@ var da = class extends ke {
1669
1669
  const r = { revert: !0, ...t }, s = $.batch(
1670
1670
  () => this.#e.findAll(e).map((a) => a.cancel(r))
1671
1671
  );
1672
- return Promise.all(s).then(B).catch(B);
1672
+ return Promise.all(s).then(q).catch(q);
1673
1673
  }
1674
1674
  invalidateQueries(e, t = {}) {
1675
1675
  return $.batch(() => (this.#e.findAll(e).forEach((r) => {
@@ -1689,10 +1689,10 @@ var da = class extends ke {
1689
1689
  }, s = $.batch(
1690
1690
  () => this.#e.findAll(e).filter((a) => !a.isDisabled() && !a.isStatic()).map((a) => {
1691
1691
  let n = a.fetch(void 0, r);
1692
- return r.throwOnError || (n = n.catch(B)), a.state.fetchStatus === "paused" ? Promise.resolve() : n;
1692
+ return r.throwOnError || (n = n.catch(q)), a.state.fetchStatus === "paused" ? Promise.resolve() : n;
1693
1693
  })
1694
1694
  );
1695
- return Promise.all(s).then(B);
1695
+ return Promise.all(s).then(q);
1696
1696
  }
1697
1697
  fetchQuery(e) {
1698
1698
  const t = this.defaultQueryOptions(e);
@@ -1703,19 +1703,19 @@ var da = class extends ke {
1703
1703
  ) ? r.fetch(t) : Promise.resolve(r.state.data);
1704
1704
  }
1705
1705
  prefetchQuery(e) {
1706
- return this.fetchQuery(e).then(B).catch(B);
1706
+ return this.fetchQuery(e).then(q).catch(q);
1707
1707
  }
1708
1708
  fetchInfiniteQuery(e) {
1709
- return e.behavior = ir(e.pages), this.fetchQuery(e);
1709
+ return e.behavior = or(e.pages), this.fetchQuery(e);
1710
1710
  }
1711
1711
  prefetchInfiniteQuery(e) {
1712
- return this.fetchInfiniteQuery(e).then(B).catch(B);
1712
+ return this.fetchInfiniteQuery(e).then(q).catch(q);
1713
1713
  }
1714
1714
  ensureInfiniteQueryData(e) {
1715
- return e.behavior = ir(e.pages), this.ensureQueryData(e);
1715
+ return e.behavior = or(e.pages), this.ensureQueryData(e);
1716
1716
  }
1717
1717
  resumePausedMutations() {
1718
- return et.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
1718
+ return tt.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
1719
1719
  }
1720
1720
  getQueryCache() {
1721
1721
  return this.#e;
@@ -1730,7 +1730,7 @@ var da = class extends ke {
1730
1730
  this.#r = e;
1731
1731
  }
1732
1732
  setQueryDefaults(e, t) {
1733
- this.#a.set(pe(e), {
1733
+ this.#a.set(Ee(e), {
1734
1734
  queryKey: e,
1735
1735
  defaultOptions: t
1736
1736
  });
@@ -1738,11 +1738,11 @@ var da = class extends ke {
1738
1738
  getQueryDefaults(e) {
1739
1739
  const t = [...this.#a.values()], r = {};
1740
1740
  return t.forEach((s) => {
1741
- xe(e, s.queryKey) && Object.assign(r, s.defaultOptions);
1741
+ De(e, s.queryKey) && Object.assign(r, s.defaultOptions);
1742
1742
  }), r;
1743
1743
  }
1744
1744
  setMutationDefaults(e, t) {
1745
- this.#s.set(pe(e), {
1745
+ this.#s.set(Ee(e), {
1746
1746
  mutationKey: e,
1747
1747
  defaultOptions: t
1748
1748
  });
@@ -1750,7 +1750,7 @@ var da = class extends ke {
1750
1750
  getMutationDefaults(e) {
1751
1751
  const t = [...this.#s.values()], r = {};
1752
1752
  return t.forEach((s) => {
1753
- xe(e, s.mutationKey) && Object.assign(r, s.defaultOptions);
1753
+ De(e, s.mutationKey) && Object.assign(r, s.defaultOptions);
1754
1754
  }), r;
1755
1755
  }
1756
1756
  defaultQueryOptions(e) {
@@ -1762,10 +1762,10 @@ var da = class extends ke {
1762
1762
  ...e,
1763
1763
  _defaulted: !0
1764
1764
  };
1765
- return t.queryHash || (t.queryHash = Ut(
1765
+ return t.queryHash || (t.queryHash = Ht(
1766
1766
  t.queryKey,
1767
1767
  t
1768
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === Ze && (t.enabled = !1), t;
1768
+ )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === et && (t.enabled = !1), t;
1769
1769
  }
1770
1770
  defaultMutationOptions(e) {
1771
1771
  return e?._defaulted ? e : {
@@ -1778,10 +1778,10 @@ var da = class extends ke {
1778
1778
  clear() {
1779
1779
  this.#e.clear(), this.#t.clear();
1780
1780
  }
1781
- }, Ur = H.createContext(
1781
+ }, Fr = H.createContext(
1782
1782
  void 0
1783
- ), Le = (e) => {
1784
- const t = H.useContext(Ur);
1783
+ ), he = (e) => {
1784
+ const t = H.useContext(Fr);
1785
1785
  if (!t)
1786
1786
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1787
1787
  return t;
@@ -1790,7 +1790,7 @@ var da = class extends ke {
1790
1790
  children: t
1791
1791
  }) => (H.useEffect(() => (e.mount(), () => {
1792
1792
  e.unmount();
1793
- }), [e]), /* @__PURE__ */ h(Ur.Provider, { value: e, children: t })), pa = H.createContext(!1), ya = () => H.useContext(pa);
1793
+ }), [e]), /* @__PURE__ */ h(Fr.Provider, { value: e, children: t })), pa = H.createContext(!1), ya = () => H.useContext(pa);
1794
1794
  function ga() {
1795
1795
  let e = !1;
1796
1796
  return {
@@ -1815,7 +1815,7 @@ var ba = H.createContext(ga()), Ea = () => H.useContext(ba), wa = (e, t) => {
1815
1815
  throwOnError: r,
1816
1816
  query: s,
1817
1817
  suspense: a
1818
- }) => e.isError && !t.isReset() && !e.isFetching && s && (a && e.data === void 0 || Pr(r, [e.error, s])), Ta = (e) => {
1818
+ }) => e.isError && !t.isReset() && !e.isFetching && s && (a && e.data === void 0 || $r(r, [e.error, s])), Ta = (e) => {
1819
1819
  if (e.suspense) {
1820
1820
  const r = (a) => a === "static" ? a : Math.max(a ?? 1e3, 1e3), s = e.staleTime;
1821
1821
  e.staleTime = typeof s == "function" ? (...a) => r(s(...a)) : r(s), typeof e.gcTime == "number" && (e.gcTime = Math.max(
@@ -1823,7 +1823,7 @@ var ba = H.createContext(ga()), Ea = () => H.useContext(ba), wa = (e, t) => {
1823
1823
  1e3
1824
1824
  ));
1825
1825
  }
1826
- }, Aa = (e, t) => e.isLoading && e.isFetching && !t, Ia = (e, t) => e?.suspense && t.isPending, cr = (e, t, r) => t.fetchOptimistic(e).catch(() => {
1826
+ }, Aa = (e, t) => e.isLoading && e.isFetching && !t, Ia = (e, t) => e?.suspense && t.isPending, lr = (e, t, r) => t.fetchOptimistic(e).catch(() => {
1827
1827
  r.clearReset();
1828
1828
  });
1829
1829
  function _a(e, t, r) {
@@ -1831,7 +1831,7 @@ function _a(e, t, r) {
1831
1831
  throw new Error(
1832
1832
  'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
1833
1833
  );
1834
- const s = ya(), a = Ea(), n = Le(), i = n.defaultQueryOptions(e);
1834
+ const s = ya(), a = Ea(), n = he(), i = n.defaultQueryOptions(e);
1835
1835
  n.getDefaultOptions().queries?._experimental_beforeQuery?.(
1836
1836
  i
1837
1837
  ), process.env.NODE_ENV !== "production" && (i.queryFn || console.error(
@@ -1846,7 +1846,7 @@ function _a(e, t, r) {
1846
1846
  if (H.useSyncExternalStore(
1847
1847
  H.useCallback(
1848
1848
  (u) => {
1849
- const l = d ? c.subscribe($.batchCalls(u)) : B;
1849
+ const l = d ? c.subscribe($.batchCalls(u)) : q;
1850
1850
  return c.updateResult(), l;
1851
1851
  },
1852
1852
  [c, d]
@@ -1856,7 +1856,7 @@ function _a(e, t, r) {
1856
1856
  ), H.useEffect(() => {
1857
1857
  c.setOptions(i);
1858
1858
  }, [i, c]), Ia(i, f))
1859
- throw cr(i, c, a);
1859
+ throw lr(i, c, a);
1860
1860
  if (va({
1861
1861
  result: f,
1862
1862
  errorResetBoundary: a,
@@ -1868,21 +1868,21 @@ function _a(e, t, r) {
1868
1868
  return n.getDefaultOptions().queries?._experimental_afterQuery?.(
1869
1869
  i,
1870
1870
  f
1871
- ), i.experimental_prefetchInRender && !me && Aa(f, s) && (o ? (
1871
+ ), i.experimental_prefetchInRender && !be && Aa(f, s) && (o ? (
1872
1872
  // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1873
- cr(i, c, a)
1873
+ lr(i, c, a)
1874
1874
  ) : (
1875
1875
  // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1876
1876
  n.getQueryCache().get(i.queryHash)?.promise
1877
- ))?.catch(B).finally(() => {
1877
+ ))?.catch(q).finally(() => {
1878
1878
  c.updateResult();
1879
1879
  }), i.notifyOnChangeProps ? f : c.trackResult(f);
1880
1880
  }
1881
- function ge(e, t) {
1881
+ function fe(e, t) {
1882
1882
  return _a(e, na);
1883
1883
  }
1884
- function Kt(e, t) {
1885
- const r = Le(), [s] = H.useState(
1884
+ function Pe(e, t) {
1885
+ const r = he(), [s] = H.useState(
1886
1886
  () => new da(
1887
1887
  r,
1888
1888
  e
@@ -1900,11 +1900,11 @@ function Kt(e, t) {
1900
1900
  () => s.getCurrentResult()
1901
1901
  ), n = H.useCallback(
1902
1902
  (i, o) => {
1903
- s.mutate(i, o).catch(B);
1903
+ s.mutate(i, o).catch(q);
1904
1904
  },
1905
1905
  [s]
1906
1906
  );
1907
- if (a.error && Pr(s.options.throwOnError, [a.error]))
1907
+ if (a.error && $r(s.options.throwOnError, [a.error]))
1908
1908
  throw a.error;
1909
1909
  return { ...a, mutate: n, mutateAsync: a.mutate };
1910
1910
  }
@@ -1921,11 +1921,11 @@ try {
1921
1921
  });
1922
1922
  } catch {
1923
1923
  }
1924
- const Pe = {
1924
+ const xe = {
1925
1925
  CODE: "code",
1926
1926
  REFRESH_TOKEN: "refresh_token",
1927
1927
  PASSKEY: "passkey"
1928
- }, Fr = {
1928
+ }, Hr = {
1929
1929
  CLIENT_ID: "X-Auth-ClientId"
1930
1930
  }, F = {
1931
1931
  ALG: "RS256",
@@ -1943,12 +1943,12 @@ aMwPFOIcJH+rKfFgNcHLcaS5syp7zU1ANwZ+trgR+DifBr8TLVkBynmNeTyhDm2+
1943
1943
  l0haqjMk0UoNPPE8iYBWUHQJJE1Dqstj65d6Eh5g64Pao25y4cmYJbKjiblIGEkE
1944
1944
  sjqybA9mARAqh9k/eiIopecWSiffNQTwVQVd2I9ZH3BalhEXHlqFgrjz51kFqg81
1945
1945
  awIDAQAB
1946
- -----END PUBLIC KEY-----`, ot = {
1946
+ -----END PUBLIC KEY-----`, lt = {
1947
1947
  CODE: "code",
1948
1948
  LOGOUT: "logout",
1949
1949
  LOGIN: "login",
1950
1950
  REFRESH: "refresh"
1951
- }, Ke = new TextEncoder(), Oe = new TextDecoder();
1951
+ }, Ge = new TextEncoder(), ke = new TextDecoder();
1952
1952
  function Ca(...e) {
1953
1953
  const t = e.reduce((a, { length: n }) => a + n, 0), r = new Uint8Array(t);
1954
1954
  let s = 0;
@@ -1956,7 +1956,7 @@ function Ca(...e) {
1956
1956
  r.set(a, s), s += a.length;
1957
1957
  return r;
1958
1958
  }
1959
- function Hr(e) {
1959
+ function Kr(e) {
1960
1960
  if (Uint8Array.fromBase64)
1961
1961
  return Uint8Array.fromBase64(e);
1962
1962
  const t = atob(e), r = new Uint8Array(t.length);
@@ -1964,26 +1964,26 @@ function Hr(e) {
1964
1964
  r[s] = t.charCodeAt(s);
1965
1965
  return r;
1966
1966
  }
1967
- function $e(e) {
1967
+ function Me(e) {
1968
1968
  if (Uint8Array.fromBase64)
1969
- return Uint8Array.fromBase64(typeof e == "string" ? e : Oe.decode(e), {
1969
+ return Uint8Array.fromBase64(typeof e == "string" ? e : ke.decode(e), {
1970
1970
  alphabet: "base64url"
1971
1971
  });
1972
1972
  let t = e;
1973
- t instanceof Uint8Array && (t = Oe.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
1973
+ t instanceof Uint8Array && (t = ke.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
1974
1974
  try {
1975
- return Hr(t);
1975
+ return Kr(t);
1976
1976
  } catch {
1977
1977
  throw new TypeError("The input to be decoded is not correctly encoded.");
1978
1978
  }
1979
1979
  }
1980
- let be = class extends Error {
1980
+ let we = class extends Error {
1981
1981
  static code = "ERR_JOSE_GENERIC";
1982
1982
  code = "ERR_JOSE_GENERIC";
1983
1983
  constructor(t, r) {
1984
1984
  super(t, r), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
1985
1985
  }
1986
- }, X = class extends be {
1986
+ }, Z = class extends we {
1987
1987
  static code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
1988
1988
  code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
1989
1989
  claim;
@@ -1992,7 +1992,7 @@ let be = class extends Error {
1992
1992
  constructor(t, r, s = "unspecified", a = "unspecified") {
1993
1993
  super(t, { cause: { claim: s, reason: a, payload: r } }), this.claim = s, this.reason = a, this.payload = r;
1994
1994
  }
1995
- }, lr = class extends be {
1995
+ }, ur = class extends we {
1996
1996
  static code = "ERR_JWT_EXPIRED";
1997
1997
  code = "ERR_JWT_EXPIRED";
1998
1998
  claim;
@@ -2001,33 +2001,33 @@ let be = class extends Error {
2001
2001
  constructor(t, r, s = "unspecified", a = "unspecified") {
2002
2002
  super(t, { cause: { claim: s, reason: a, payload: r } }), this.claim = s, this.reason = a, this.payload = r;
2003
2003
  }
2004
- }, Oa = class extends be {
2004
+ }, Oa = class extends we {
2005
2005
  static code = "ERR_JOSE_ALG_NOT_ALLOWED";
2006
2006
  code = "ERR_JOSE_ALG_NOT_ALLOWED";
2007
- }, ne = class extends be {
2007
+ }, ne = class extends we {
2008
2008
  static code = "ERR_JOSE_NOT_SUPPORTED";
2009
2009
  code = "ERR_JOSE_NOT_SUPPORTED";
2010
- }, L = class extends be {
2010
+ }, L = class extends we {
2011
2011
  static code = "ERR_JWS_INVALID";
2012
2012
  code = "ERR_JWS_INVALID";
2013
- }, se = class extends be {
2013
+ }, se = class extends we {
2014
2014
  static code = "ERR_JWT_INVALID";
2015
2015
  code = "ERR_JWT_INVALID";
2016
2016
  };
2017
- class ka extends be {
2017
+ class ka extends we {
2018
2018
  static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2019
2019
  code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
2020
2020
  constructor(t = "signature verification failed", r) {
2021
2021
  super(t, r);
2022
2022
  }
2023
2023
  }
2024
- function Z(e, t = "algorithm.name") {
2024
+ function ee(e, t = "algorithm.name") {
2025
2025
  return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
2026
2026
  }
2027
- function ve(e, t) {
2027
+ function Te(e, t) {
2028
2028
  return e.name === t;
2029
2029
  }
2030
- function ft(e) {
2030
+ function pt(e) {
2031
2031
  return parseInt(e.name.slice(4), 10);
2032
2032
  }
2033
2033
  function Na(e) {
@@ -2051,54 +2051,54 @@ function $a(e, t, r) {
2051
2051
  case "HS256":
2052
2052
  case "HS384":
2053
2053
  case "HS512": {
2054
- if (!ve(e.algorithm, "HMAC"))
2055
- throw Z("HMAC");
2054
+ if (!Te(e.algorithm, "HMAC"))
2055
+ throw ee("HMAC");
2056
2056
  const s = parseInt(t.slice(2), 10);
2057
- if (ft(e.algorithm.hash) !== s)
2058
- throw Z(`SHA-${s}`, "algorithm.hash");
2057
+ if (pt(e.algorithm.hash) !== s)
2058
+ throw ee(`SHA-${s}`, "algorithm.hash");
2059
2059
  break;
2060
2060
  }
2061
2061
  case "RS256":
2062
2062
  case "RS384":
2063
2063
  case "RS512": {
2064
- if (!ve(e.algorithm, "RSASSA-PKCS1-v1_5"))
2065
- throw Z("RSASSA-PKCS1-v1_5");
2064
+ if (!Te(e.algorithm, "RSASSA-PKCS1-v1_5"))
2065
+ throw ee("RSASSA-PKCS1-v1_5");
2066
2066
  const s = parseInt(t.slice(2), 10);
2067
- if (ft(e.algorithm.hash) !== s)
2068
- throw Z(`SHA-${s}`, "algorithm.hash");
2067
+ if (pt(e.algorithm.hash) !== s)
2068
+ throw ee(`SHA-${s}`, "algorithm.hash");
2069
2069
  break;
2070
2070
  }
2071
2071
  case "PS256":
2072
2072
  case "PS384":
2073
2073
  case "PS512": {
2074
- if (!ve(e.algorithm, "RSA-PSS"))
2075
- throw Z("RSA-PSS");
2074
+ if (!Te(e.algorithm, "RSA-PSS"))
2075
+ throw ee("RSA-PSS");
2076
2076
  const s = parseInt(t.slice(2), 10);
2077
- if (ft(e.algorithm.hash) !== s)
2078
- throw Z(`SHA-${s}`, "algorithm.hash");
2077
+ if (pt(e.algorithm.hash) !== s)
2078
+ throw ee(`SHA-${s}`, "algorithm.hash");
2079
2079
  break;
2080
2080
  }
2081
2081
  case "Ed25519":
2082
2082
  case "EdDSA": {
2083
- if (!ve(e.algorithm, "Ed25519"))
2084
- throw Z("Ed25519");
2083
+ if (!Te(e.algorithm, "Ed25519"))
2084
+ throw ee("Ed25519");
2085
2085
  break;
2086
2086
  }
2087
2087
  case "ML-DSA-44":
2088
2088
  case "ML-DSA-65":
2089
2089
  case "ML-DSA-87": {
2090
- if (!ve(e.algorithm, t))
2091
- throw Z(t);
2090
+ if (!Te(e.algorithm, t))
2091
+ throw ee(t);
2092
2092
  break;
2093
2093
  }
2094
2094
  case "ES256":
2095
2095
  case "ES384":
2096
2096
  case "ES512": {
2097
- if (!ve(e.algorithm, "ECDSA"))
2098
- throw Z("ECDSA");
2097
+ if (!Te(e.algorithm, "ECDSA"))
2098
+ throw ee("ECDSA");
2099
2099
  const s = Na(t);
2100
2100
  if (e.algorithm.namedCurve !== s)
2101
- throw Z(s, "algorithm.namedCurve");
2101
+ throw ee(s, "algorithm.namedCurve");
2102
2102
  break;
2103
2103
  }
2104
2104
  default:
@@ -2106,24 +2106,24 @@ function $a(e, t, r) {
2106
2106
  }
2107
2107
  Pa(e, r);
2108
2108
  }
2109
- function Kr(e, t, ...r) {
2109
+ function Gr(e, t, ...r) {
2110
2110
  if (r = r.filter(Boolean), r.length > 2) {
2111
2111
  const s = r.pop();
2112
2112
  e += `one of type ${r.join(", ")}, or ${s}.`;
2113
2113
  } else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
2114
2114
  return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && t.constructor?.name && (e += ` Received an instance of ${t.constructor.name}`), e;
2115
2115
  }
2116
- const xa = (e, ...t) => Kr("Key must be ", e, ...t);
2117
- function Gr(e, t, ...r) {
2118
- return Kr(`Key for the ${e} algorithm must be `, t, ...r);
2116
+ const xa = (e, ...t) => Gr("Key must be ", e, ...t);
2117
+ function Br(e, t, ...r) {
2118
+ return Gr(`Key for the ${e} algorithm must be `, t, ...r);
2119
2119
  }
2120
- function Br(e) {
2120
+ function qr(e) {
2121
2121
  return e?.[Symbol.toStringTag] === "CryptoKey";
2122
2122
  }
2123
2123
  function Wr(e) {
2124
2124
  return e?.[Symbol.toStringTag] === "KeyObject";
2125
2125
  }
2126
- const qr = (e) => Br(e) || Wr(e), Ma = (...e) => {
2126
+ const Vr = (e) => qr(e) || Wr(e), Ma = (...e) => {
2127
2127
  const t = e.filter(Boolean);
2128
2128
  if (t.length === 0 || t.length === 1)
2129
2129
  return !0;
@@ -2145,7 +2145,7 @@ const qr = (e) => Br(e) || Wr(e), Ma = (...e) => {
2145
2145
  function Da(e) {
2146
2146
  return typeof e == "object" && e !== null;
2147
2147
  }
2148
- const Me = (e) => {
2148
+ const Le = (e) => {
2149
2149
  if (!Da(e) || Object.prototype.toString.call(e) !== "[object Object]")
2150
2150
  return !1;
2151
2151
  if (Object.getPrototypeOf(e) === null)
@@ -2160,14 +2160,14 @@ const Me = (e) => {
2160
2160
  if (typeof r != "number" || r < 2048)
2161
2161
  throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
2162
2162
  }
2163
- }, mt = (e, t) => {
2163
+ }, yt = (e, t) => {
2164
2164
  if (e.byteLength !== t.length)
2165
2165
  return !1;
2166
2166
  for (let r = 0; r < e.byteLength; r++)
2167
2167
  if (e[r] !== t[r])
2168
2168
  return !1;
2169
2169
  return !0;
2170
- }, Ua = (e) => ({ data: e, pos: 0 }), tt = (e) => {
2170
+ }, Ua = (e) => ({ data: e, pos: 0 }), rt = (e) => {
2171
2171
  const t = e.data[e.pos++];
2172
2172
  if (t & 128) {
2173
2173
  const r = t & 127;
@@ -2177,36 +2177,36 @@ const Me = (e) => {
2177
2177
  return s;
2178
2178
  }
2179
2179
  return t;
2180
- }, rt = (e, t, r) => {
2180
+ }, st = (e, t, r) => {
2181
2181
  if (e.data[e.pos++] !== t)
2182
2182
  throw new Error(r);
2183
2183
  }, jr = (e, t) => {
2184
2184
  const r = e.data.subarray(e.pos, e.pos + t);
2185
2185
  return e.pos += t, r;
2186
2186
  }, Fa = (e) => {
2187
- rt(e, 6, "Expected algorithm OID");
2188
- const t = tt(e);
2187
+ st(e, 6, "Expected algorithm OID");
2188
+ const t = rt(e);
2189
2189
  return jr(e, t);
2190
2190
  };
2191
2191
  function Ha(e) {
2192
- rt(e, 48, "Invalid SPKI structure"), tt(e), rt(e, 48, "Expected algorithm identifier");
2193
- const t = tt(e);
2192
+ st(e, 48, "Invalid SPKI structure"), rt(e), st(e, 48, "Expected algorithm identifier");
2193
+ const t = rt(e);
2194
2194
  return { algIdStart: e.pos, algIdLength: t };
2195
2195
  }
2196
2196
  const Ka = (e) => {
2197
2197
  const t = Fa(e);
2198
- if (mt(t, [43, 101, 110]))
2198
+ if (yt(t, [43, 101, 110]))
2199
2199
  return "X25519";
2200
- if (!mt(t, [42, 134, 72, 206, 61, 2, 1]))
2200
+ if (!yt(t, [42, 134, 72, 206, 61, 2, 1]))
2201
2201
  throw new Error("Unsupported key algorithm");
2202
- rt(e, 6, "Expected curve OID");
2203
- const r = tt(e), s = jr(e, r);
2202
+ st(e, 6, "Expected curve OID");
2203
+ const r = rt(e), s = jr(e, r);
2204
2204
  for (const { name: a, oid: n } of [
2205
2205
  { name: "P-256", oid: [42, 134, 72, 206, 61, 3, 1, 7] },
2206
2206
  { name: "P-384", oid: [43, 129, 4, 0, 34] },
2207
2207
  { name: "P-521", oid: [43, 129, 4, 0, 35] }
2208
2208
  ])
2209
- if (mt(s, n))
2209
+ if (yt(s, n))
2210
2210
  return a;
2211
2211
  throw new Error("Unsupported named curve");
2212
2212
  }, Ga = async (e, t, r, s) => {
@@ -2264,7 +2264,7 @@ const Ka = (e) => {
2264
2264
  throw new ne('Invalid or unsupported "alg" (Algorithm) value');
2265
2265
  }
2266
2266
  return crypto.subtle.importKey(e, t, a, s?.extractable ?? !0, n);
2267
- }, Ba = (e, t) => Hr(e.replace(t, "")), Wa = (e, t, r) => {
2267
+ }, Ba = (e, t) => Kr(e.replace(t, "")), qa = (e, t, r) => {
2268
2268
  const s = Ba(e, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
2269
2269
  let a = r;
2270
2270
  return t?.startsWith?.("ECDH-ES") && (a ||= {}, a.getNamedCurve = (n) => {
@@ -2272,7 +2272,7 @@ const Ka = (e) => {
2272
2272
  return Ha(i), Ka(i);
2273
2273
  }), Ga("spki", s, t, a);
2274
2274
  };
2275
- function qa(e) {
2275
+ function Wa(e) {
2276
2276
  let t, r;
2277
2277
  switch (e.kty) {
2278
2278
  case "AKP": {
@@ -2357,16 +2357,16 @@ function qa(e) {
2357
2357
  }
2358
2358
  return { algorithm: t, keyUsages: r };
2359
2359
  }
2360
- const ja = async (e) => {
2360
+ const Va = async (e) => {
2361
2361
  if (!e.alg)
2362
2362
  throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
2363
- const { algorithm: t, keyUsages: r } = qa(e), s = { ...e };
2363
+ const { algorithm: t, keyUsages: r } = Wa(e), s = { ...e };
2364
2364
  return s.kty !== "AKP" && delete s.alg, delete s.use, crypto.subtle.importKey("jwk", s, t, e.ext ?? !(e.d || e.priv), e.key_ops ?? r);
2365
2365
  };
2366
- async function Va(e, t, r) {
2366
+ async function ja(e, t, r) {
2367
2367
  if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
2368
2368
  throw new TypeError('"spki" must be SPKI formatted string');
2369
- return Wa(e, t, r);
2369
+ return qa(e, t, r);
2370
2370
  }
2371
2371
  const Qa = (e, t, r, s, a) => {
2372
2372
  if (a.crit !== void 0 && s?.crit === void 0)
@@ -2392,8 +2392,8 @@ const Qa = (e, t, r, s, a) => {
2392
2392
  if (t)
2393
2393
  return new Set(t);
2394
2394
  };
2395
- function Gt(e) {
2396
- return Me(e) && typeof e.kty == "string";
2395
+ function Bt(e) {
2396
+ return Le(e) && typeof e.kty == "string";
2397
2397
  }
2398
2398
  function Ya(e) {
2399
2399
  return e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string");
@@ -2404,17 +2404,17 @@ function za(e) {
2404
2404
  function Xa(e) {
2405
2405
  return e.kty === "oct" && typeof e.k == "string";
2406
2406
  }
2407
- let Ce;
2408
- const ur = async (e, t, r, s = !1) => {
2409
- Ce ||= /* @__PURE__ */ new WeakMap();
2410
- let a = Ce.get(e);
2407
+ let Oe;
2408
+ const dr = async (e, t, r, s = !1) => {
2409
+ Oe ||= /* @__PURE__ */ new WeakMap();
2410
+ let a = Oe.get(e);
2411
2411
  if (a?.[r])
2412
2412
  return a[r];
2413
- const n = await ja({ ...t, alg: r });
2414
- return s && Object.freeze(e), a ? a[r] = n : Ce.set(e, { [r]: n }), n;
2413
+ const n = await Va({ ...t, alg: r });
2414
+ return s && Object.freeze(e), a ? a[r] = n : Oe.set(e, { [r]: n }), n;
2415
2415
  }, Za = (e, t) => {
2416
- Ce ||= /* @__PURE__ */ new WeakMap();
2417
- let r = Ce.get(e);
2416
+ Oe ||= /* @__PURE__ */ new WeakMap();
2417
+ let r = Oe.get(e);
2418
2418
  if (r?.[t])
2419
2419
  return r[t];
2420
2420
  const s = e.type === "public", a = !!s;
@@ -2507,9 +2507,9 @@ const ur = async (e, t, r, s = !1) => {
2507
2507
  }
2508
2508
  if (!n)
2509
2509
  throw new TypeError("given KeyObject instance cannot be used for this algorithm");
2510
- return r ? r[t] = n : Ce.set(e, { [t]: n }), n;
2510
+ return r ? r[t] = n : Oe.set(e, { [t]: n }), n;
2511
2511
  }, en = async (e, t) => {
2512
- if (e instanceof Uint8Array || Br(e))
2512
+ if (e instanceof Uint8Array || qr(e))
2513
2513
  return e;
2514
2514
  if (Wr(e)) {
2515
2515
  if (e.type === "secret")
@@ -2522,12 +2522,12 @@ const ur = async (e, t, r, s = !1) => {
2522
2522
  throw s;
2523
2523
  }
2524
2524
  let r = e.export({ format: "jwk" });
2525
- return ur(e, r, t);
2525
+ return dr(e, r, t);
2526
2526
  }
2527
- if (Gt(e))
2528
- return e.k ? $e(e.k) : ur(e, e, t, !0);
2527
+ if (Bt(e))
2528
+ return e.k ? Me(e.k) : dr(e, e, t, !0);
2529
2529
  throw new Error("unreachable");
2530
- }, Re = (e) => e?.[Symbol.toStringTag], $t = (e, t, r) => {
2530
+ }, Ce = (e) => e?.[Symbol.toStringTag], Mt = (e, t, r) => {
2531
2531
  if (t.use !== void 0) {
2532
2532
  let s;
2533
2533
  switch (r) {
@@ -2572,47 +2572,47 @@ const ur = async (e, t, r, s = !1) => {
2572
2572
  return !0;
2573
2573
  }, tn = (e, t, r) => {
2574
2574
  if (!(t instanceof Uint8Array)) {
2575
- if (Gt(t)) {
2576
- if (Xa(t) && $t(e, t, r))
2575
+ if (Bt(t)) {
2576
+ if (Xa(t) && Mt(e, t, r))
2577
2577
  return;
2578
2578
  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');
2579
2579
  }
2580
- if (!qr(t))
2581
- throw new TypeError(Gr(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2580
+ if (!Vr(t))
2581
+ throw new TypeError(Br(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
2582
2582
  if (t.type !== "secret")
2583
- throw new TypeError(`${Re(t)} instances for symmetric algorithms must be of type "secret"`);
2583
+ throw new TypeError(`${Ce(t)} instances for symmetric algorithms must be of type "secret"`);
2584
2584
  }
2585
2585
  }, rn = (e, t, r) => {
2586
- if (Gt(t))
2586
+ if (Bt(t))
2587
2587
  switch (r) {
2588
2588
  case "decrypt":
2589
2589
  case "sign":
2590
- if (Ya(t) && $t(e, t, r))
2590
+ if (Ya(t) && Mt(e, t, r))
2591
2591
  return;
2592
2592
  throw new TypeError("JSON Web Key for this operation be a private JWK");
2593
2593
  case "encrypt":
2594
2594
  case "verify":
2595
- if (za(t) && $t(e, t, r))
2595
+ if (za(t) && Mt(e, t, r))
2596
2596
  return;
2597
2597
  throw new TypeError("JSON Web Key for this operation be a public JWK");
2598
2598
  }
2599
- if (!qr(t))
2600
- throw new TypeError(Gr(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2599
+ if (!Vr(t))
2600
+ throw new TypeError(Br(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
2601
2601
  if (t.type === "secret")
2602
- throw new TypeError(`${Re(t)} instances for asymmetric algorithms must not be of type "secret"`);
2602
+ throw new TypeError(`${Ce(t)} instances for asymmetric algorithms must not be of type "secret"`);
2603
2603
  if (t.type === "public")
2604
2604
  switch (r) {
2605
2605
  case "sign":
2606
- throw new TypeError(`${Re(t)} instances for asymmetric algorithm signing must be of type "private"`);
2606
+ throw new TypeError(`${Ce(t)} instances for asymmetric algorithm signing must be of type "private"`);
2607
2607
  case "decrypt":
2608
- throw new TypeError(`${Re(t)} instances for asymmetric algorithm decryption must be of type "private"`);
2608
+ throw new TypeError(`${Ce(t)} instances for asymmetric algorithm decryption must be of type "private"`);
2609
2609
  }
2610
2610
  if (t.type === "private")
2611
2611
  switch (r) {
2612
2612
  case "verify":
2613
- throw new TypeError(`${Re(t)} instances for asymmetric algorithm verifying must be of type "public"`);
2613
+ throw new TypeError(`${Ce(t)} instances for asymmetric algorithm verifying must be of type "public"`);
2614
2614
  case "encrypt":
2615
- throw new TypeError(`${Re(t)} instances for asymmetric algorithm encryption must be of type "public"`);
2615
+ throw new TypeError(`${Ce(t)} instances for asymmetric algorithm encryption must be of type "public"`);
2616
2616
  }
2617
2617
  }, sn = (e, t, r) => {
2618
2618
  e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e) ? tn(e, t, r) : rn(e, t, r);
@@ -2663,7 +2663,7 @@ const ur = async (e, t, r, s = !1) => {
2663
2663
  }
2664
2664
  };
2665
2665
  async function cn(e, t, r) {
2666
- if (!Me(e))
2666
+ if (!Le(e))
2667
2667
  throw new L("Flattened JWS must be an object");
2668
2668
  if (e.protected === void 0 && e.header === void 0)
2669
2669
  throw new L('Flattened JWS must have either of the "protected" or "header" members');
@@ -2673,13 +2673,13 @@ async function cn(e, t, r) {
2673
2673
  throw new L("JWS Payload missing");
2674
2674
  if (typeof e.signature != "string")
2675
2675
  throw new L("JWS Signature missing or incorrect type");
2676
- if (e.header !== void 0 && !Me(e.header))
2676
+ if (e.header !== void 0 && !Le(e.header))
2677
2677
  throw new L("JWS Unprotected Header incorrect type");
2678
2678
  let s = {};
2679
2679
  if (e.protected)
2680
2680
  try {
2681
- const g = $e(e.protected);
2682
- s = JSON.parse(Oe.decode(g));
2681
+ const g = Me(e.protected);
2682
+ s = JSON.parse(ke.decode(g));
2683
2683
  } catch {
2684
2684
  throw new L("JWS Protected Header is invalid");
2685
2685
  }
@@ -2705,10 +2705,10 @@ async function cn(e, t, r) {
2705
2705
  throw new L("JWS Payload must be a string or an Uint8Array instance");
2706
2706
  let f = !1;
2707
2707
  typeof t == "function" && (t = await t(s, e), f = !0), sn(o, t, "verify");
2708
- const d = Ca(Ke.encode(e.protected ?? ""), Ke.encode("."), typeof e.payload == "string" ? Ke.encode(e.payload) : e.payload);
2708
+ const d = Ca(Ge.encode(e.protected ?? ""), Ge.encode("."), typeof e.payload == "string" ? Ge.encode(e.payload) : e.payload);
2709
2709
  let u;
2710
2710
  try {
2711
- u = $e(e.signature);
2711
+ u = Me(e.signature);
2712
2712
  } catch {
2713
2713
  throw new L("Failed to base64url decode the signature");
2714
2714
  }
@@ -2718,16 +2718,16 @@ async function cn(e, t, r) {
2718
2718
  let m;
2719
2719
  if (i)
2720
2720
  try {
2721
- m = $e(e.payload);
2721
+ m = Me(e.payload);
2722
2722
  } catch {
2723
2723
  throw new L("Failed to base64url decode the payload");
2724
2724
  }
2725
- else typeof e.payload == "string" ? m = Ke.encode(e.payload) : m = e.payload;
2725
+ else typeof e.payload == "string" ? m = Ge.encode(e.payload) : m = e.payload;
2726
2726
  const p = { payload: m };
2727
2727
  return e.protected !== void 0 && (p.protectedHeader = s), e.header !== void 0 && (p.unprotectedHeader = e.header), f ? { ...p, key: l } : p;
2728
2728
  }
2729
2729
  async function ln(e, t, r) {
2730
- if (e instanceof Uint8Array && (e = Oe.decode(e)), typeof e != "string")
2730
+ if (e instanceof Uint8Array && (e = ke.decode(e)), typeof e != "string")
2731
2731
  throw new L("Compact JWS must be a string or Uint8Array");
2732
2732
  const { 0: s, 1: a, 2: n, length: i } = e.split(".");
2733
2733
  if (i !== 3)
@@ -2735,7 +2735,7 @@ async function ln(e, t, r) {
2735
2735
  const o = await cn({ payload: a, protected: s, signature: n }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
2736
2736
  return typeof t == "function" ? { ...c, key: o.key } : c;
2737
2737
  }
2738
- const un = (e) => Math.floor(e.getTime() / 1e3), Vr = 60, Qr = Vr * 60, Bt = Qr * 24, dn = Bt * 7, hn = Bt * 365.25, fn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, dr = (e) => {
2738
+ const un = (e) => Math.floor(e.getTime() / 1e3), Qr = 60, Jr = Qr * 60, qt = Jr * 24, dn = qt * 7, hn = qt * 365.25, fn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, hr = (e) => {
2739
2739
  const t = fn.exec(e);
2740
2740
  if (!t || t[4] && t[1])
2741
2741
  throw new TypeError("Invalid time period format");
@@ -2754,19 +2754,19 @@ const un = (e) => Math.floor(e.getTime() / 1e3), Vr = 60, Qr = Vr * 60, Bt = Qr
2754
2754
  case "min":
2755
2755
  case "mins":
2756
2756
  case "m":
2757
- a = Math.round(r * Vr);
2757
+ a = Math.round(r * Qr);
2758
2758
  break;
2759
2759
  case "hour":
2760
2760
  case "hours":
2761
2761
  case "hr":
2762
2762
  case "hrs":
2763
2763
  case "h":
2764
- a = Math.round(r * Qr);
2764
+ a = Math.round(r * Jr);
2765
2765
  break;
2766
2766
  case "day":
2767
2767
  case "days":
2768
2768
  case "d":
2769
- a = Math.round(r * Bt);
2769
+ a = Math.round(r * qt);
2770
2770
  break;
2771
2771
  case "week":
2772
2772
  case "weeks":
@@ -2778,33 +2778,33 @@ const un = (e) => Math.floor(e.getTime() / 1e3), Vr = 60, Qr = Vr * 60, Bt = Qr
2778
2778
  break;
2779
2779
  }
2780
2780
  return t[1] === "-" || t[4] === "ago" ? -a : a;
2781
- }, hr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, mn = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
2781
+ }, fr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, mn = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
2782
2782
  function pn(e, t, r = {}) {
2783
2783
  let s;
2784
2784
  try {
2785
- s = JSON.parse(Oe.decode(t));
2785
+ s = JSON.parse(ke.decode(t));
2786
2786
  } catch {
2787
2787
  }
2788
- if (!Me(s))
2788
+ if (!Le(s))
2789
2789
  throw new se("JWT Claims Set must be a top-level JSON object");
2790
2790
  const { typ: a } = r;
2791
- if (a && (typeof e.typ != "string" || hr(e.typ) !== hr(a)))
2792
- throw new X('unexpected "typ" JWT header value', s, "typ", "check_failed");
2791
+ if (a && (typeof e.typ != "string" || fr(e.typ) !== fr(a)))
2792
+ throw new Z('unexpected "typ" JWT header value', s, "typ", "check_failed");
2793
2793
  const { requiredClaims: n = [], issuer: i, subject: o, audience: c, maxTokenAge: f } = r, d = [...n];
2794
2794
  f !== void 0 && d.push("iat"), c !== void 0 && d.push("aud"), o !== void 0 && d.push("sub"), i !== void 0 && d.push("iss");
2795
2795
  for (const p of new Set(d.reverse()))
2796
2796
  if (!(p in s))
2797
- throw new X(`missing required "${p}" claim`, s, p, "missing");
2797
+ throw new Z(`missing required "${p}" claim`, s, p, "missing");
2798
2798
  if (i && !(Array.isArray(i) ? i : [i]).includes(s.iss))
2799
- throw new X('unexpected "iss" claim value', s, "iss", "check_failed");
2799
+ throw new Z('unexpected "iss" claim value', s, "iss", "check_failed");
2800
2800
  if (o && s.sub !== o)
2801
- throw new X('unexpected "sub" claim value', s, "sub", "check_failed");
2801
+ throw new Z('unexpected "sub" claim value', s, "sub", "check_failed");
2802
2802
  if (c && !mn(s.aud, typeof c == "string" ? [c] : c))
2803
- throw new X('unexpected "aud" claim value', s, "aud", "check_failed");
2803
+ throw new Z('unexpected "aud" claim value', s, "aud", "check_failed");
2804
2804
  let u;
2805
2805
  switch (typeof r.clockTolerance) {
2806
2806
  case "string":
2807
- u = dr(r.clockTolerance);
2807
+ u = hr(r.clockTolerance);
2808
2808
  break;
2809
2809
  case "number":
2810
2810
  u = r.clockTolerance;
@@ -2817,25 +2817,25 @@ function pn(e, t, r = {}) {
2817
2817
  }
2818
2818
  const { currentDate: l } = r, m = un(l || /* @__PURE__ */ new Date());
2819
2819
  if ((s.iat !== void 0 || f) && typeof s.iat != "number")
2820
- throw new X('"iat" claim must be a number', s, "iat", "invalid");
2820
+ throw new Z('"iat" claim must be a number', s, "iat", "invalid");
2821
2821
  if (s.nbf !== void 0) {
2822
2822
  if (typeof s.nbf != "number")
2823
- throw new X('"nbf" claim must be a number', s, "nbf", "invalid");
2823
+ throw new Z('"nbf" claim must be a number', s, "nbf", "invalid");
2824
2824
  if (s.nbf > m + u)
2825
- throw new X('"nbf" claim timestamp check failed', s, "nbf", "check_failed");
2825
+ throw new Z('"nbf" claim timestamp check failed', s, "nbf", "check_failed");
2826
2826
  }
2827
2827
  if (s.exp !== void 0) {
2828
2828
  if (typeof s.exp != "number")
2829
- throw new X('"exp" claim must be a number', s, "exp", "invalid");
2829
+ throw new Z('"exp" claim must be a number', s, "exp", "invalid");
2830
2830
  if (s.exp <= m - u)
2831
- throw new lr('"exp" claim timestamp check failed', s, "exp", "check_failed");
2831
+ throw new ur('"exp" claim timestamp check failed', s, "exp", "check_failed");
2832
2832
  }
2833
2833
  if (f) {
2834
- const p = m - s.iat, g = typeof f == "number" ? f : dr(f);
2834
+ const p = m - s.iat, g = typeof f == "number" ? f : hr(f);
2835
2835
  if (p - u > g)
2836
- throw new lr('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
2836
+ throw new ur('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
2837
2837
  if (p < 0 - u)
2838
- throw new X('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
2838
+ throw new Z('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
2839
2839
  }
2840
2840
  return s;
2841
2841
  }
@@ -2858,23 +2858,23 @@ function gn(e) {
2858
2858
  throw new se("JWTs must contain a payload");
2859
2859
  let s;
2860
2860
  try {
2861
- s = $e(t);
2861
+ s = Me(t);
2862
2862
  } catch {
2863
2863
  throw new se("Failed to base64url decode the payload");
2864
2864
  }
2865
2865
  let a;
2866
2866
  try {
2867
- a = JSON.parse(Oe.decode(s));
2867
+ a = JSON.parse(ke.decode(s));
2868
2868
  } catch {
2869
2869
  throw new se("Failed to parse the decoded payload as JSON");
2870
2870
  }
2871
- if (!Me(a))
2871
+ if (!Le(a))
2872
2872
  throw new se("Invalid JWT Claims Set");
2873
2873
  return a;
2874
2874
  }
2875
- const De = async (e) => {
2875
+ const Ue = async (e) => {
2876
2876
  try {
2877
- const t = F.ALG, r = await Va(Ra, t);
2877
+ const t = F.ALG, r = await ja(Ra, t);
2878
2878
  return await yn(e, r, {
2879
2879
  issuer: F.ISSUER
2880
2880
  });
@@ -2893,35 +2893,35 @@ for (let e = 0; e < 256; ++e)
2893
2893
  function En(e, t = 0) {
2894
2894
  return (M[e[t + 0]] + M[e[t + 1]] + M[e[t + 2]] + M[e[t + 3]] + "-" + M[e[t + 4]] + M[e[t + 5]] + "-" + M[e[t + 6]] + M[e[t + 7]] + "-" + M[e[t + 8]] + M[e[t + 9]] + "-" + M[e[t + 10]] + M[e[t + 11]] + M[e[t + 12]] + M[e[t + 13]] + M[e[t + 14]] + M[e[t + 15]]).toLowerCase();
2895
2895
  }
2896
- let pt;
2896
+ let gt;
2897
2897
  const wn = new Uint8Array(16);
2898
2898
  function Sn() {
2899
- if (!pt) {
2899
+ if (!gt) {
2900
2900
  if (typeof crypto > "u" || !crypto.getRandomValues)
2901
2901
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2902
- pt = crypto.getRandomValues.bind(crypto);
2902
+ gt = crypto.getRandomValues.bind(crypto);
2903
2903
  }
2904
- return pt(wn);
2904
+ return gt(wn);
2905
2905
  }
2906
- const vn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), fr = { randomUUID: vn };
2907
- function mr(e, t, r) {
2908
- if (fr.randomUUID && !e)
2909
- return fr.randomUUID();
2906
+ const vn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mr = { randomUUID: vn };
2907
+ function pr(e, t, r) {
2908
+ if (mr.randomUUID && !e)
2909
+ return mr.randomUUID();
2910
2910
  e = e || {};
2911
2911
  const s = e.random ?? e.rng?.() ?? Sn();
2912
2912
  if (s.length < 16)
2913
2913
  throw new Error("Random bytes length must be >= 16");
2914
2914
  return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, En(s);
2915
2915
  }
2916
- const pr = globalThis.crypto, Tn = (e) => `${mr()}${mr()}`.slice(0, e), An = (e) => btoa(
2916
+ const yr = globalThis.crypto, Tn = (e) => `${pr()}${pr()}`.slice(0, e), An = (e) => btoa(
2917
2917
  [...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
2918
2918
  );
2919
2919
  async function In(e) {
2920
- if (!pr.subtle)
2920
+ if (!yr.subtle)
2921
2921
  throw new Error(
2922
2922
  "crypto.subtle is available only in secure contexts (HTTPS)."
2923
2923
  );
2924
- const t = new TextEncoder().encode(e), r = await pr.subtle.digest("SHA-256", t);
2924
+ const t = new TextEncoder().encode(e), r = await yr.subtle.digest("SHA-256", t);
2925
2925
  return An(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2926
2926
  }
2927
2927
  async function _n(e) {
@@ -2931,8 +2931,8 @@ async function _n(e) {
2931
2931
  code_challenge: s
2932
2932
  };
2933
2933
  }
2934
- const Jr = Lt(null);
2935
- var Rn = Object.defineProperty, Cn = (e, t, r) => t in e ? Rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, yt = (e, t, r) => Cn(e, typeof t != "symbol" ? t + "" : t, r);
2934
+ const Yr = Ft(null);
2935
+ var Rn = Object.defineProperty, Cn = (e, t, r) => t in e ? Rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, bt = (e, t, r) => Cn(e, typeof t != "symbol" ? t + "" : t, r);
2936
2936
  /*!
2937
2937
  @versini/auth-provider v8.0.5
2938
2938
  © 2025 gizmette.com
@@ -2946,14 +2946,14 @@ try {
2946
2946
  });
2947
2947
  } catch {
2948
2948
  }
2949
- function ee(e) {
2949
+ function te(e) {
2950
2950
  const t = new Uint8Array(e);
2951
2951
  let r = "";
2952
2952
  for (const s of t)
2953
2953
  r += String.fromCharCode(s);
2954
2954
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2955
2955
  }
2956
- function st(e) {
2956
+ function at(e) {
2957
2957
  const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, s = t.padEnd(t.length + r, "="), a = atob(s), n = new ArrayBuffer(a.length), i = new Uint8Array(n);
2958
2958
  for (let o = 0; o < a.length; o++)
2959
2959
  i[o] = a.charCodeAt(o);
@@ -2965,11 +2965,11 @@ function Wt() {
2965
2965
  const On = {
2966
2966
  stubThis: (e) => e
2967
2967
  };
2968
- function Yr(e) {
2968
+ function zr(e) {
2969
2969
  const { id: t } = e;
2970
2970
  return {
2971
2971
  ...e,
2972
- id: st(t),
2972
+ id: at(t),
2973
2973
  /**
2974
2974
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2975
2975
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2978,7 +2978,7 @@ function Yr(e) {
2978
2978
  transports: e.transports
2979
2979
  };
2980
2980
  }
2981
- function zr(e) {
2981
+ function Xr(e) {
2982
2982
  return (
2983
2983
  // Consider localhost valid as well since it's okay wrt Secure Contexts
2984
2984
  e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)
@@ -3052,7 +3052,7 @@ function kn({ error: e, options: t }) {
3052
3052
  });
3053
3053
  if (e.name === "SecurityError") {
3054
3054
  const s = globalThis.location.hostname;
3055
- if (zr(s)) {
3055
+ if (Xr(s)) {
3056
3056
  if (r.rp.id !== s)
3057
3057
  return new U({
3058
3058
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
@@ -3104,8 +3104,8 @@ class Nn {
3104
3104
  }
3105
3105
  }
3106
3106
  }
3107
- const Xr = new Nn(), Pn = ["cross-platform", "platform"];
3108
- function Zr(e) {
3107
+ const Zr = new Nn(), Pn = ["cross-platform", "platform"];
3108
+ function es(e) {
3109
3109
  if (e && !(Pn.indexOf(e) < 0))
3110
3110
  return e;
3111
3111
  }
@@ -3116,14 +3116,14 @@ async function $n(e) {
3116
3116
  throw new Error("WebAuthn is not supported in this browser");
3117
3117
  const s = {
3118
3118
  ...t,
3119
- challenge: st(t.challenge),
3119
+ challenge: at(t.challenge),
3120
3120
  user: {
3121
3121
  ...t.user,
3122
- id: st(t.user.id)
3122
+ id: at(t.user.id)
3123
3123
  },
3124
- excludeCredentials: t.excludeCredentials?.map(Yr)
3124
+ excludeCredentials: t.excludeCredentials?.map(zr)
3125
3125
  }, a = {};
3126
- r && (a.mediation = "conditional"), a.publicKey = s, a.signal = Xr.createNewAbortSignal();
3126
+ r && (a.mediation = "conditional"), a.publicKey = s, a.signal = Zr.createNewAbortSignal();
3127
3127
  let n;
3128
3128
  try {
3129
3129
  n = await navigator.credentials.create(a);
@@ -3140,29 +3140,29 @@ async function $n(e) {
3140
3140
  try {
3141
3141
  u = c.getPublicKeyAlgorithm();
3142
3142
  } catch (p) {
3143
- gt("getPublicKeyAlgorithm()", p);
3143
+ Et("getPublicKeyAlgorithm()", p);
3144
3144
  }
3145
3145
  let l;
3146
3146
  if (typeof c.getPublicKey == "function")
3147
3147
  try {
3148
3148
  const p = c.getPublicKey();
3149
- p !== null && (l = ee(p));
3149
+ p !== null && (l = te(p));
3150
3150
  } catch (p) {
3151
- gt("getPublicKey()", p);
3151
+ Et("getPublicKey()", p);
3152
3152
  }
3153
3153
  let m;
3154
3154
  if (typeof c.getAuthenticatorData == "function")
3155
3155
  try {
3156
- m = ee(c.getAuthenticatorData());
3156
+ m = te(c.getAuthenticatorData());
3157
3157
  } catch (p) {
3158
- gt("getAuthenticatorData()", p);
3158
+ Et("getAuthenticatorData()", p);
3159
3159
  }
3160
3160
  return {
3161
3161
  id: i,
3162
- rawId: ee(o),
3162
+ rawId: te(o),
3163
3163
  response: {
3164
- attestationObject: ee(c.attestationObject),
3165
- clientDataJSON: ee(c.clientDataJSON),
3164
+ attestationObject: te(c.attestationObject),
3165
+ clientDataJSON: te(c.clientDataJSON),
3166
3166
  transports: d,
3167
3167
  publicKeyAlgorithm: u,
3168
3168
  publicKey: l,
@@ -3170,20 +3170,20 @@ async function $n(e) {
3170
3170
  },
3171
3171
  type: f,
3172
3172
  clientExtensionResults: n.getClientExtensionResults(),
3173
- authenticatorAttachment: Zr(n.authenticatorAttachment)
3173
+ authenticatorAttachment: es(n.authenticatorAttachment)
3174
3174
  };
3175
3175
  }
3176
- function gt(e, t) {
3176
+ function Et(e, t) {
3177
3177
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
3178
3178
  `, t);
3179
3179
  }
3180
3180
  function xn() {
3181
3181
  if (!Wt())
3182
- return bt.stubThis(new Promise((t) => t(!1)));
3182
+ return wt.stubThis(new Promise((t) => t(!1)));
3183
3183
  const e = globalThis.PublicKeyCredential;
3184
- return e?.isConditionalMediationAvailable === void 0 ? bt.stubThis(new Promise((t) => t(!1))) : bt.stubThis(e.isConditionalMediationAvailable());
3184
+ return e?.isConditionalMediationAvailable === void 0 ? wt.stubThis(new Promise((t) => t(!1))) : wt.stubThis(e.isConditionalMediationAvailable());
3185
3185
  }
3186
- const bt = {
3186
+ const wt = {
3187
3187
  stubThis: (e) => e
3188
3188
  };
3189
3189
  function Mn({ error: e, options: t }) {
@@ -3206,7 +3206,7 @@ function Mn({ error: e, options: t }) {
3206
3206
  });
3207
3207
  if (e.name === "SecurityError") {
3208
3208
  const s = globalThis.location.hostname;
3209
- if (zr(s)) {
3209
+ if (Xr(s)) {
3210
3210
  if (r.rpId !== s)
3211
3211
  return new U({
3212
3212
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
@@ -3233,10 +3233,10 @@ async function Dn(e) {
3233
3233
  if (!Wt())
3234
3234
  throw new Error("WebAuthn is not supported in this browser");
3235
3235
  let a;
3236
- t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(Yr));
3236
+ t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(zr));
3237
3237
  const n = {
3238
3238
  ...t,
3239
- challenge: st(t.challenge),
3239
+ challenge: at(t.challenge),
3240
3240
  allowCredentials: a
3241
3241
  }, i = {};
3242
3242
  if (r) {
@@ -3246,7 +3246,7 @@ async function Dn(e) {
3246
3246
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
3247
3247
  i.mediation = "conditional", n.allowCredentials = [];
3248
3248
  }
3249
- i.publicKey = n, i.signal = Xr.createNewAbortSignal();
3249
+ i.publicKey = n, i.signal = Zr.createNewAbortSignal();
3250
3250
  let o;
3251
3251
  try {
3252
3252
  o = await navigator.credentials.get(i);
@@ -3257,53 +3257,53 @@ async function Dn(e) {
3257
3257
  throw new Error("Authentication was not completed");
3258
3258
  const { id: c, rawId: f, response: d, type: u } = o;
3259
3259
  let l;
3260
- return d.userHandle && (l = ee(d.userHandle)), {
3260
+ return d.userHandle && (l = te(d.userHandle)), {
3261
3261
  id: c,
3262
- rawId: ee(f),
3262
+ rawId: te(f),
3263
3263
  response: {
3264
- authenticatorData: ee(d.authenticatorData),
3265
- clientDataJSON: ee(d.clientDataJSON),
3266
- signature: ee(d.signature),
3264
+ authenticatorData: te(d.authenticatorData),
3265
+ clientDataJSON: te(d.clientDataJSON),
3266
+ signature: te(d.signature),
3267
3267
  userHandle: l
3268
3268
  },
3269
3269
  type: u,
3270
3270
  clientExtensionResults: o.getClientExtensionResults(),
3271
- authenticatorAttachment: Zr(o.authenticatorAttachment)
3271
+ authenticatorAttachment: es(o.authenticatorAttachment)
3272
3272
  };
3273
3273
  }
3274
- function es(e, t) {
3274
+ function ts(e, t) {
3275
3275
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
3276
3276
  }
3277
- const yr = (e, t) => {
3277
+ const gr = (e, t) => {
3278
3278
  const r = JSON.stringify(
3279
3279
  typeof t == "function" ? t() : t
3280
3280
  );
3281
- window.localStorage.setItem(e, r), es(e, r);
3281
+ window.localStorage.setItem(e, r), ts(e, r);
3282
3282
  }, Ln = (e) => {
3283
- window.localStorage.removeItem(e), es(e, null);
3284
- }, gr = (e) => window.localStorage.getItem(e), Un = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3285
- function Ge({
3283
+ window.localStorage.removeItem(e), ts(e, null);
3284
+ }, br = (e) => window.localStorage.getItem(e), Un = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
3285
+ function Be({
3286
3286
  key: e,
3287
3287
  initialValue: t
3288
3288
  }) {
3289
- const r = Ks(Un, () => gr(e)), s = z(
3289
+ const r = Ks(Un, () => br(e)), s = X(
3290
3290
  (i) => {
3291
3291
  try {
3292
3292
  const o = typeof i == "function" ? i(JSON.parse(r)) : i;
3293
- o == null ? Ln(e) : yr(e, o);
3293
+ o == null ? Ln(e) : gr(e, o);
3294
3294
  } catch (o) {
3295
3295
  console.warn(o);
3296
3296
  }
3297
3297
  },
3298
3298
  [e, r]
3299
- ), a = z(() => {
3299
+ ), a = X(() => {
3300
3300
  s(t);
3301
- }, [t, s]), n = z(() => {
3301
+ }, [t, s]), n = X(() => {
3302
3302
  s(null);
3303
3303
  }, [s]);
3304
3304
  return W(() => {
3305
3305
  try {
3306
- gr(e) === null && typeof t < "u" && yr(e, t);
3306
+ br(e) === null && typeof t < "u" && gr(e, t);
3307
3307
  } catch (i) {
3308
3308
  console.warn(i);
3309
3309
  }
@@ -3315,27 +3315,27 @@ for (let e = 0; e < 256; ++e)
3315
3315
  function Fn(e, t = 0) {
3316
3316
  return (D[e[t + 0]] + D[e[t + 1]] + D[e[t + 2]] + D[e[t + 3]] + "-" + D[e[t + 4]] + D[e[t + 5]] + "-" + D[e[t + 6]] + D[e[t + 7]] + "-" + D[e[t + 8]] + D[e[t + 9]] + "-" + D[e[t + 10]] + D[e[t + 11]] + D[e[t + 12]] + D[e[t + 13]] + D[e[t + 14]] + D[e[t + 15]]).toLowerCase();
3317
3317
  }
3318
- let Et;
3318
+ let St;
3319
3319
  const Hn = new Uint8Array(16);
3320
3320
  function Kn() {
3321
- if (!Et) {
3321
+ if (!St) {
3322
3322
  if (typeof crypto > "u" || !crypto.getRandomValues)
3323
3323
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3324
- Et = crypto.getRandomValues.bind(crypto);
3324
+ St = crypto.getRandomValues.bind(crypto);
3325
3325
  }
3326
- return Et(Hn);
3326
+ return St(Hn);
3327
3327
  }
3328
- const Gn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), br = { randomUUID: Gn };
3329
- function wt(e, t, r) {
3330
- if (br.randomUUID && !e)
3331
- return br.randomUUID();
3328
+ const Gn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Er = { randomUUID: Gn };
3329
+ function vt(e, t, r) {
3330
+ if (Er.randomUUID && !e)
3331
+ return Er.randomUUID();
3332
3332
  e = e || {};
3333
3333
  const s = e.random ?? e.rng?.() ?? Kn();
3334
3334
  if (s.length < 16)
3335
3335
  throw new Error("Random bytes length must be >= 16");
3336
3336
  return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Fn(s);
3337
3337
  }
3338
- const Te = "Your session has expired. For your security, please log in again to continue.", Bn = "Your session has been successfully terminated.", St = "Login failed. Please try again.", Wn = "Error getting access token, please re-authenticate.", qn = "You forgot to wrap your component in <AuthProvider>.", Be = "@@auth@@", Ne = "LOADING", Ve = "LOGIN", ts = "LOGOUT", Ue = "success", te = "failure", rs = "include", ss = "POST", as = "application/json", We = {
3338
+ const Ae = "Your session has expired. For your security, please log in again to continue.", Bn = "Your session has been successfully terminated.", Tt = "Login failed. Please try again.", qn = "Error getting access token, please re-authenticate.", Wn = "You forgot to wrap your component in <AuthProvider>.", qe = "@@auth@@", $e = "LOADING", Qe = "LOGIN", rs = "LOGOUT", Fe = "success", re = "failure", ss = "include", as = "POST", ns = "application/json", We = {
3339
3339
  GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
3340
3340
  $clientId: String!,
3341
3341
  $username: String!,
@@ -3416,7 +3416,7 @@ const Te = "Your session has expired. For your security, please log in again to
3416
3416
  email
3417
3417
  }
3418
3418
  }`
3419
- }, Ae = {
3419
+ }, Ie = {
3420
3420
  GET_REGISTRATION_OPTIONS: {
3421
3421
  schema: We.GET_REGISTRATION_OPTIONS,
3422
3422
  method: "getPasskeyRegistrationOptions"
@@ -3433,7 +3433,7 @@ const Te = "Your session has expired. For your security, please log in again to
3433
3433
  schema: We.VERIFY_AUTHENTICATION,
3434
3434
  method: "verifyPasskeyAuthentication"
3435
3435
  }
3436
- }, Ie = async ({
3436
+ }, _e = async ({
3437
3437
  accessToken: e,
3438
3438
  type: t,
3439
3439
  clientId: r,
@@ -3442,12 +3442,12 @@ const Te = "Your session has expired. For your security, please log in again to
3442
3442
  }) => {
3443
3443
  try {
3444
3444
  const n = `Bearer ${e}`, i = await fetch(`${a}/graphql`, {
3445
- credentials: rs,
3446
- method: ss,
3445
+ credentials: ss,
3446
+ method: as,
3447
3447
  headers: {
3448
3448
  authorization: n,
3449
- "Content-Type": as,
3450
- [Fr.CLIENT_ID]: `${r}`
3449
+ "Content-Type": ns,
3450
+ [Hr.CLIENT_ID]: `${r}`
3451
3451
  },
3452
3452
  body: JSON.stringify({
3453
3453
  query: t.schema,
@@ -3455,16 +3455,16 @@ const Te = "Your session has expired. For your security, please log in again to
3455
3455
  })
3456
3456
  });
3457
3457
  if (i.status !== 200)
3458
- return { status: te, data: [] };
3458
+ return { status: re, data: [] };
3459
3459
  const { data: o } = await i.json();
3460
3460
  return {
3461
- status: Ue,
3461
+ status: Fe,
3462
3462
  data: o[t.method]
3463
3463
  };
3464
3464
  } catch (n) {
3465
- return console.error(n), { status: te, data: [] };
3465
+ return console.error(n), { status: re, data: [] };
3466
3466
  }
3467
- }, ct = async ({
3467
+ }, ut = async ({
3468
3468
  type: e,
3469
3469
  clientId: t,
3470
3470
  params: r = {},
@@ -3472,25 +3472,25 @@ const Te = "Your session has expired. For your security, please log in again to
3472
3472
  }) => {
3473
3473
  try {
3474
3474
  const a = await fetch(`${s}/${e}`, {
3475
- credentials: rs,
3476
- method: ss,
3475
+ credentials: ss,
3476
+ method: as,
3477
3477
  headers: {
3478
- "Content-Type": as,
3479
- [Fr.CLIENT_ID]: `${t}`
3478
+ "Content-Type": ns,
3479
+ [Hr.CLIENT_ID]: `${t}`
3480
3480
  },
3481
3481
  body: JSON.stringify(r)
3482
3482
  });
3483
3483
  if (a.status !== 200)
3484
- return { status: te, data: [] };
3484
+ return { status: re, data: [] };
3485
3485
  const { data: n } = await a.json();
3486
3486
  return {
3487
- status: Ue,
3487
+ status: Fe,
3488
3488
  data: n || []
3489
3489
  };
3490
3490
  } catch (a) {
3491
- return console.error(a), { status: te, data: [] };
3491
+ return console.error(a), { status: re, data: [] };
3492
3492
  }
3493
- }, jn = process.env.NODE_ENV === "production", Vn = !jn, ns = {
3493
+ }, Vn = process.env.NODE_ENV === "production", jn = !Vn, is = {
3494
3494
  isLoading: !0,
3495
3495
  isAuthenticated: !1,
3496
3496
  user: void 0,
@@ -3513,20 +3513,20 @@ const Te = "Your session has expired. For your security, please log in again to
3513
3513
  }) => {
3514
3514
  try {
3515
3515
  return {
3516
- status: (await ct({
3516
+ status: (await ut({
3517
3517
  endpoint: a,
3518
- type: ot.LOGOUT,
3518
+ type: lt.LOGOUT,
3519
3519
  clientId: t,
3520
3520
  params: {
3521
3521
  userId: e,
3522
3522
  domain: r,
3523
3523
  idToken: s
3524
3524
  }
3525
- }))?.status || te
3525
+ }))?.status || re
3526
3526
  };
3527
3527
  } catch {
3528
3528
  return {
3529
- status: te
3529
+ status: re
3530
3530
  };
3531
3531
  }
3532
3532
  }, Yn = async ({
@@ -3543,9 +3543,9 @@ const Te = "Your session has expired. For your security, please log in again to
3543
3543
  endpoint: d
3544
3544
  }) => {
3545
3545
  try {
3546
- const u = await ct({
3546
+ const u = await ut({
3547
3547
  endpoint: d,
3548
- type: ot.LOGIN,
3548
+ type: lt.LOGIN,
3549
3549
  clientId: r,
3550
3550
  params: {
3551
3551
  type: a,
@@ -3558,7 +3558,7 @@ const Te = "Your session has expired. For your security, please log in again to
3558
3558
  domain: c,
3559
3559
  ua: f
3560
3560
  }
3561
- }), l = await De(u?.data?.idToken);
3561
+ }), l = await Ue(u?.data?.idToken);
3562
3562
  return l && l.payload[F.USER_ID_KEY] !== "" && l.payload[F.NONCE_KEY] === s ? {
3563
3563
  idToken: u.data.idToken,
3564
3564
  accessToken: u.data.accessToken,
@@ -3581,26 +3581,26 @@ const Te = "Your session has expired. For your security, please log in again to
3581
3581
  endpoint: s
3582
3582
  }) => {
3583
3583
  try {
3584
- const a = await ct({
3584
+ const a = await ut({
3585
3585
  endpoint: s,
3586
- type: ot.CODE,
3586
+ type: lt.CODE,
3587
3587
  clientId: t,
3588
3588
  params: {
3589
- type: Pe.CODE,
3589
+ type: xe.CODE,
3590
3590
  nonce: e,
3591
3591
  code_challenge: r
3592
3592
  }
3593
3593
  });
3594
3594
  return a?.data?.code ? {
3595
- status: Ue,
3595
+ status: Fe,
3596
3596
  data: a.data.code
3597
3597
  } : {
3598
- status: te,
3598
+ status: re,
3599
3599
  data: ""
3600
3600
  };
3601
3601
  } catch {
3602
3602
  return {
3603
- status: te,
3603
+ status: re,
3604
3604
  data: ""
3605
3605
  };
3606
3606
  }
@@ -3614,19 +3614,19 @@ const Te = "Your session has expired. For your security, please log in again to
3614
3614
  endpoint: i
3615
3615
  }) => {
3616
3616
  try {
3617
- const o = await ct({
3617
+ const o = await ut({
3618
3618
  endpoint: i,
3619
- type: ot.REFRESH,
3619
+ type: lt.REFRESH,
3620
3620
  clientId: e,
3621
3621
  params: {
3622
- type: Pe.REFRESH_TOKEN,
3622
+ type: xe.REFRESH_TOKEN,
3623
3623
  userId: t,
3624
3624
  nonce: r,
3625
3625
  refreshToken: s,
3626
3626
  accessToken: a,
3627
3627
  domain: n
3628
3628
  }
3629
- }), c = await De(o?.data?.accessToken);
3629
+ }), c = await Ue(o?.data?.accessToken);
3630
3630
  return c && c.payload[F.USER_ID_KEY] !== "" && c.payload[F.NONCE_KEY] === r ? {
3631
3631
  accessToken: o.data.accessToken,
3632
3632
  refreshToken: o.data.refreshToken,
@@ -3643,7 +3643,7 @@ const Te = "Your session has expired. For your security, please log in again to
3643
3643
  };
3644
3644
  class Zn {
3645
3645
  constructor(t = null, r = null) {
3646
- yt(this, "refreshTokenPromise", null), yt(this, "accessToken"), yt(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
3646
+ bt(this, "refreshTokenPromise", null), bt(this, "accessToken"), bt(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
3647
3647
  }
3648
3648
  async refreshtoken({
3649
3649
  clientId: t,
@@ -3672,7 +3672,7 @@ class Zn {
3672
3672
  nonce: a,
3673
3673
  domain: n
3674
3674
  }) {
3675
- const i = await De(this.refreshToken);
3675
+ const i = await Ue(this.refreshToken);
3676
3676
  if (i && i.payload[F.USER_ID_KEY] !== "") {
3677
3677
  const o = await Xn({
3678
3678
  endpoint: t,
@@ -3684,53 +3684,53 @@ class Zn {
3684
3684
  domain: n
3685
3685
  });
3686
3686
  return o.status ? (this.accessToken = o.accessToken, this.refreshToken = o.refreshToken, {
3687
- status: Ue,
3687
+ status: Fe,
3688
3688
  newAccessToken: o.accessToken,
3689
3689
  newRefreshToken: o.refreshToken
3690
3690
  }) : {
3691
- status: te
3691
+ status: re
3692
3692
  };
3693
3693
  } else
3694
3694
  return {
3695
- status: te
3695
+ status: re
3696
3696
  };
3697
3697
  }
3698
3698
  }
3699
- const _e = () => {
3700
- throw new Error(qn);
3701
- }, is = Lt({
3699
+ const Re = () => {
3700
+ throw new Error(Wn);
3701
+ }, os = Ft({
3702
3702
  isAuthenticated: !1,
3703
3703
  isLoading: !1,
3704
- login: _e,
3705
- logout: _e,
3706
- getAccessToken: _e,
3707
- getIdToken: _e,
3708
- registeringForPasskey: _e,
3709
- loginWithPasskey: _e,
3704
+ login: Re,
3705
+ logout: Re,
3706
+ getAccessToken: Re,
3707
+ getIdToken: Re,
3708
+ registeringForPasskey: Re,
3709
+ loginWithPasskey: Re,
3710
3710
  logoutReason: "",
3711
3711
  authenticationType: ""
3712
3712
  }), ei = () => ({
3713
- ...it(is)
3714
- }), ti = (e) => z(
3713
+ ...ct(os)
3714
+ }), ti = (e) => X(
3715
3715
  (...t) => {
3716
3716
  e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
3717
3717
  },
3718
3718
  [e]
3719
3719
  ), ri = oe.createContext({
3720
- state: ns,
3720
+ state: is,
3721
3721
  dispatch: () => {
3722
3722
  }
3723
- }), si = (e, t) => t?.type === Ne ? {
3723
+ }), si = (e, t) => t?.type === $e ? {
3724
3724
  ...e,
3725
3725
  isLoading: t.payload.isLoading
3726
- } : t?.type === Ve ? {
3726
+ } : t?.type === Qe ? {
3727
3727
  ...e,
3728
3728
  isLoading: !1,
3729
3729
  isAuthenticated: !0,
3730
3730
  user: t.payload.user,
3731
3731
  authenticationType: t.payload.authenticationType,
3732
3732
  logoutReason: ""
3733
- } : t?.type === ts ? {
3733
+ } : t?.type === rs ? {
3734
3734
  ...e,
3735
3735
  isLoading: !1,
3736
3736
  isAuthenticated: !1,
@@ -3739,29 +3739,29 @@ const _e = () => {
3739
3739
  logoutReason: t.payload.logoutReason
3740
3740
  } : e, ai = ({ children: e }) => {
3741
3741
  const t = ei();
3742
- return /* @__PURE__ */ h(Jr.Provider, { value: t, children: e });
3743
- }, Er = ({
3742
+ return /* @__PURE__ */ h(Yr.Provider, { value: t, children: e });
3743
+ }, wr = ({
3744
3744
  children: e,
3745
3745
  sessionExpiration: t,
3746
3746
  clientId: r,
3747
3747
  domain: s = "",
3748
3748
  debug: a = !1,
3749
- endpoint: n = Vn ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
3749
+ endpoint: n = jn ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
3750
3750
  }) => {
3751
- const [i, o] = Or(si, {
3752
- ...ns,
3751
+ const [i, o] = kr(si, {
3752
+ ...is,
3753
3753
  debug: a
3754
- }), c = ti(a), f = j(!1), [d, u, , l] = Ge({
3755
- key: `${Be}::${r}::@@user@@`
3756
- }), [m, p, , g] = Ge({
3757
- key: `${Be}::${r}::@@access@@`
3758
- }), [b, E, , O] = Ge(
3754
+ }), c = ti(a), f = j(!1), [d, u, , l] = Be({
3755
+ key: `${qe}::${r}::@@user@@`
3756
+ }), [m, p, , g] = Be({
3757
+ key: `${qe}::${r}::@@access@@`
3758
+ }), [b, E, , O] = Be(
3759
3759
  {
3760
- key: `${Be}::${r}::@@refresh@@`
3760
+ key: `${qe}::${r}::@@refresh@@`
3761
3761
  }
3762
- ), [A, K, , R] = Ge({
3763
- key: `${Be}::${r}::@@nonce@@`
3764
- }), Y = new Zn(m, b), C = z(() => {
3762
+ ), [A, K, , R] = Be({
3763
+ key: `${qe}::${r}::@@nonce@@`
3764
+ }), z = new Zn(m, b), C = X(() => {
3765
3765
  c("removeLocalStorage: removing local storage"), l(), g(), O(), R();
3766
3766
  }, [
3767
3767
  g,
@@ -3769,20 +3769,20 @@ const _e = () => {
3769
3769
  R,
3770
3770
  O,
3771
3771
  c
3772
- ]), v = z(
3772
+ ]), v = X(
3773
3773
  (w) => {
3774
3774
  c(
3775
3775
  "removeStateAndLocalStorage: removing state and local storage with reason: ",
3776
3776
  w
3777
3777
  ), o({
3778
- type: ts,
3778
+ type: rs,
3779
3779
  payload: {
3780
- logoutReason: w || Te
3780
+ logoutReason: w || Ae
3781
3781
  }
3782
- }), C(), o({ type: Ne, payload: { isLoading: !1 } });
3782
+ }), C(), o({ type: $e, payload: { isLoading: !1 } });
3783
3783
  },
3784
3784
  [C, c]
3785
- ), x = z(
3785
+ ), x = X(
3786
3786
  async (w) => {
3787
3787
  c("invalidateAndLogout: invalidating and logging out");
3788
3788
  const { user: T } = i, S = T?.userId || Qn(d);
@@ -3794,7 +3794,7 @@ const _e = () => {
3794
3794
  domain: s,
3795
3795
  idToken: d,
3796
3796
  endpoint: n
3797
- }), v(w || Te);
3797
+ }), v(w || Ae);
3798
3798
  },
3799
3799
  [
3800
3800
  d,
@@ -3810,9 +3810,9 @@ const _e = () => {
3810
3810
  if (!f.current)
3811
3811
  return i.isLoading && d !== null ? (async () => {
3812
3812
  try {
3813
- const w = await De(d);
3813
+ const w = await Ue(d);
3814
3814
  w && w.payload[F.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), o({
3815
- type: Ve,
3815
+ type: Qe,
3816
3816
  payload: {
3817
3817
  authenticationType: w.payload[F.AUTH_TYPE_KEY],
3818
3818
  user: {
@@ -3821,51 +3821,51 @@ const _e = () => {
3821
3821
  email: w.payload[F.EMAIL_KEY]
3822
3822
  }
3823
3823
  }
3824
- })) : (c("useEffect: invalid JWT, invalidating and logging out"), await x(Te));
3824
+ })) : (c("useEffect: invalid JWT, invalidating and logging out"), await x(Ae));
3825
3825
  } catch {
3826
3826
  c(
3827
3827
  "useEffect: exception validating JWT, invalidating and logging out"
3828
- ), await x(Te);
3828
+ ), await x(Ae);
3829
3829
  }
3830
- })() : (c("useEffect: setting the loading state to false"), o({ type: Ne, payload: { isLoading: !1 } })), () => {
3830
+ })() : (c("useEffect: setting the loading state to false"), o({ type: $e, payload: { isLoading: !1 } })), () => {
3831
3831
  f.current = !0;
3832
3832
  };
3833
3833
  }, [i.isLoading, d, x, c]);
3834
3834
  const _ = async (w, T) => {
3835
- o({ type: Ne, payload: { isLoading: !0 } }), C();
3836
- const S = wt();
3835
+ o({ type: $e, payload: { isLoading: !0 } }), C();
3836
+ const S = vt();
3837
3837
  K(S), c("login: Logging in with password");
3838
- const { code_verifier: le, code_challenge: ue } = await _n(), Xt = await zn({
3838
+ const { code_verifier: le, code_challenge: ue } = await _n(), Zt = await zn({
3839
3839
  endpoint: n,
3840
3840
  nonce: S,
3841
3841
  clientId: r,
3842
3842
  code_challenge: ue
3843
3843
  });
3844
- if (Xt.status) {
3845
- const Se = await Yn({
3844
+ if (Zt.status) {
3845
+ const ve = await Yn({
3846
3846
  endpoint: n,
3847
3847
  username: w,
3848
3848
  password: T,
3849
3849
  clientId: r,
3850
3850
  sessionExpiration: t,
3851
3851
  nonce: S,
3852
- type: Pe.CODE,
3853
- code: Xt.data,
3852
+ type: xe.CODE,
3853
+ code: Zt.data,
3854
3854
  code_verifier: le,
3855
3855
  domain: s,
3856
3856
  ua: navigator.userAgent
3857
3857
  });
3858
- return Se.status ? (u(Se.idToken), p(Se.accessToken), E(Se.refreshToken), o({
3859
- type: Ve,
3858
+ return ve.status ? (u(ve.idToken), p(ve.accessToken), E(ve.refreshToken), o({
3859
+ type: Qe,
3860
3860
  payload: {
3861
- authenticationType: Pe.CODE,
3861
+ authenticationType: xe.CODE,
3862
3862
  user: {
3863
- userId: Se.userId,
3863
+ userId: ve.userId,
3864
3864
  username: w,
3865
- email: Se.email
3865
+ email: ve.email
3866
3866
  }
3867
3867
  }
3868
- }), !0) : (v(St), !1);
3868
+ }), !0) : (v(Tt), !1);
3869
3869
  }
3870
3870
  return !1;
3871
3871
  }, I = async (w) => {
@@ -3876,12 +3876,12 @@ const _e = () => {
3876
3876
  if (w && T && T.userId) {
3877
3877
  if (m) {
3878
3878
  c("getAccessToken");
3879
- const le = await De(m);
3879
+ const le = await Ue(m);
3880
3880
  if (le && le.payload[F.USER_ID_KEY] !== "")
3881
3881
  return m;
3882
3882
  }
3883
3883
  c("getAccessToken: invalid access token, trying to refresh it");
3884
- const S = await Y.refreshtoken({
3884
+ const S = await z.refreshtoken({
3885
3885
  endpoint: n,
3886
3886
  clientId: r,
3887
3887
  userId: T.userId,
@@ -3890,23 +3890,23 @@ const _e = () => {
3890
3890
  });
3891
3891
  return S.status && S.status === "success" && S.newAccessToken ? (p(S.newAccessToken), E(S.newRefreshToken), S.newAccessToken) : (c(
3892
3892
  "getAccessToken: invalid refresh token, need to re-authenticate"
3893
- ), await x(Te), "");
3893
+ ), await x(Ae), "");
3894
3894
  }
3895
3895
  return c(
3896
3896
  "getAccessToken: user is not authenticated, cannot get access token"
3897
- ), await x(Te), "";
3897
+ ), await x(Ae), "";
3898
3898
  } catch {
3899
3899
  return c(
3900
3900
  "getAccessToken: exception occurred, invalidating and logging out"
3901
- ), await x(Wn), "";
3901
+ ), await x(qn), "";
3902
3902
  }
3903
- }, V = () => i.isAuthenticated && d ? d : "", ce = async () => {
3903
+ }, J = () => i.isAuthenticated && d ? d : "", ce = async () => {
3904
3904
  const { user: w } = i;
3905
- let T = await Ie({
3905
+ let T = await _e({
3906
3906
  endpoint: n,
3907
3907
  accessToken: m,
3908
3908
  clientId: r,
3909
- type: Ae.GET_REGISTRATION_OPTIONS,
3909
+ type: Ie.GET_REGISTRATION_OPTIONS,
3910
3910
  params: {
3911
3911
  clientId: r,
3912
3912
  id: w?.userId,
@@ -3918,11 +3918,11 @@ const _e = () => {
3918
3918
  const S = await $n({
3919
3919
  optionsJSON: T.data
3920
3920
  });
3921
- return T = await Ie({
3921
+ return T = await _e({
3922
3922
  endpoint: n,
3923
3923
  accessToken: m,
3924
3924
  clientId: r,
3925
- type: Ae.VERIFY_REGISTRATION,
3925
+ type: Ie.VERIFY_REGISTRATION,
3926
3926
  params: {
3927
3927
  clientId: r,
3928
3928
  id: w?.userId,
@@ -3931,11 +3931,11 @@ const _e = () => {
3931
3931
  }
3932
3932
  }), !!(T.status && T.data.length > 0);
3933
3933
  } catch {
3934
- return await Ie({
3934
+ return await _e({
3935
3935
  endpoint: n,
3936
3936
  accessToken: m,
3937
3937
  clientId: r,
3938
- type: Ae.VERIFY_REGISTRATION,
3938
+ type: Ie.VERIFY_REGISTRATION,
3939
3939
  params: {
3940
3940
  clientId: r,
3941
3941
  id: w?.userId,
@@ -3945,16 +3945,16 @@ const _e = () => {
3945
3945
  }), !1;
3946
3946
  }
3947
3947
  return !1;
3948
- }, we = async () => {
3949
- o({ type: Ne, payload: { isLoading: !0 } }), C();
3950
- const w = wt();
3948
+ }, Se = async () => {
3949
+ o({ type: $e, payload: { isLoading: !0 } }), C();
3950
+ const w = vt();
3951
3951
  K(w), c("loginWithPasskey");
3952
- const T = wt();
3953
- let S = await Ie({
3952
+ const T = vt();
3953
+ let S = await _e({
3954
3954
  endpoint: n,
3955
3955
  accessToken: m,
3956
3956
  clientId: r,
3957
- type: Ae.GET_AUTHENTICATION_OPTIONS,
3957
+ type: Ie.GET_AUTHENTICATION_OPTIONS,
3958
3958
  params: {
3959
3959
  id: T,
3960
3960
  clientId: r
@@ -3965,11 +3965,11 @@ const _e = () => {
3965
3965
  const le = await Dn({
3966
3966
  optionsJSON: S.data
3967
3967
  });
3968
- return S = await Ie({
3968
+ return S = await _e({
3969
3969
  endpoint: n,
3970
3970
  accessToken: m,
3971
3971
  clientId: r,
3972
- type: Ae.VERIFY_AUTHENTICATION,
3972
+ type: Ie.VERIFY_AUTHENTICATION,
3973
3973
  params: {
3974
3974
  clientId: r,
3975
3975
  id: T,
@@ -3979,23 +3979,23 @@ const _e = () => {
3979
3979
  sessionExpiration: t,
3980
3980
  ua: navigator.userAgent
3981
3981
  }
3982
- }), S.data.status === Ue ? (u(S.data.idToken), p(S.data.accessToken), E(S.data.refreshToken), o({
3983
- type: Ve,
3982
+ }), S.data.status === Fe ? (u(S.data.idToken), p(S.data.accessToken), E(S.data.refreshToken), o({
3983
+ type: Qe,
3984
3984
  payload: {
3985
- authenticationType: Pe.PASSKEY,
3985
+ authenticationType: xe.PASSKEY,
3986
3986
  user: {
3987
3987
  userId: S.data.userId,
3988
3988
  username: S.data.username,
3989
3989
  email: S.data.email
3990
3990
  }
3991
3991
  }
3992
- }), !0) : (v(St), !1);
3992
+ }), !0) : (v(Tt), !1);
3993
3993
  } catch {
3994
- return await Ie({
3994
+ return await _e({
3995
3995
  endpoint: n,
3996
3996
  accessToken: m,
3997
3997
  clientId: r,
3998
- type: Ae.VERIFY_AUTHENTICATION,
3998
+ type: Ie.VERIFY_AUTHENTICATION,
3999
3999
  params: {
4000
4000
  clientId: r,
4001
4001
  id: T,
@@ -4004,21 +4004,21 @@ const _e = () => {
4004
4004
  domain: s,
4005
4005
  sessionExpiration: t
4006
4006
  }
4007
- }), v(St), !1;
4007
+ }), v(Tt), !1;
4008
4008
  }
4009
4009
  return !1;
4010
4010
  };
4011
4011
  return /* @__PURE__ */ h(ri.Provider, { value: { state: i, dispatch: o }, children: /* @__PURE__ */ h(
4012
- is.Provider,
4012
+ os.Provider,
4013
4013
  {
4014
4014
  value: {
4015
4015
  ...i,
4016
4016
  login: _,
4017
4017
  logout: I,
4018
4018
  getAccessToken: N,
4019
- getIdToken: V,
4019
+ getIdToken: J,
4020
4020
  registeringForPasskey: ce,
4021
- loginWithPasskey: we
4021
+ loginWithPasskey: Se
4022
4022
  },
4023
4023
  children: /* @__PURE__ */ h(ai, { children: e })
4024
4024
  }
@@ -4037,41 +4037,41 @@ try {
4037
4037
  });
4038
4038
  } catch {
4039
4039
  }
4040
- const os = () => {
4041
- const e = it(Jr);
4040
+ const cs = () => {
4041
+ const e = ct(Yr);
4042
4042
  if (!e)
4043
4043
  throw new Error("useAuth must be used within an AuthHookProvider");
4044
4044
  return e;
4045
- }, nc = "I'm having trouble right now. Please try again later.", ic = "action-search", oc = "action-sort", cc = "action-toggle-prompt", lc = "action-reset-prompt", cs = "sassy-saint-", uc = "search", dc = "sort", hc = "sort-timestamp", fc = "sort-token-usage", mc = "sort-memory-direction", pc = "sort-memory-column", yc = "favorites-only", gc = "private-disclosure", bc = "reasoning-disclosure", ls = "service-worker", Ec = "chat-id", wr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", wc = 10, Sc = 30, vc = "av-prompt", Tc = "av-prompt-editable", Ac = "size-5 sm:size-4", Ic = 30, _c = 15, Rc = 130, Cc = 160, Oc = 16, kc = 24, Nc = 76, Pc = 76;
4046
- let vt = null, ae = !1;
4045
+ }, nc = "I'm having trouble right now. Please try again later.", ic = "action-search", oc = "action-sort", cc = "action-toggle-prompt", lc = "action-reset-prompt", ls = "sassy-saint-", uc = "search", dc = "sort", hc = "sort-timestamp", fc = "sort-token-usage", mc = "sort-memory-direction", pc = "sort-memory-column", yc = "favorites-only", gc = "private-disclosure", bc = "reasoning-disclosure", us = "service-worker", Ec = "chat-id", Sr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", wc = 10, Sc = 30, vc = "av-prompt", Tc = "av-prompt-editable", Ac = "size-5 sm:size-4", Ic = 30, _c = 15, Rc = 130, Cc = 160, Oc = 16, kc = 24, Nc = 76, Pc = 76;
4046
+ let At = null, ae = !1;
4047
4047
  typeof window < "u" && "serviceWorker" in navigator && navigator.serviceWorker.addEventListener("controllerchange", () => {
4048
4048
  ae && (ae = !1, window.location.reload());
4049
4049
  });
4050
- function qt() {
4050
+ function Vt() {
4051
4051
  return "serviceWorker" in navigator;
4052
4052
  }
4053
- function xt() {
4053
+ function Dt() {
4054
4054
  const e = localStorage.getItem(
4055
- cs + ls
4055
+ ls + us
4056
4056
  );
4057
4057
  return e === null ? !1 : e === "true";
4058
4058
  }
4059
4059
  function ni(e) {
4060
4060
  localStorage.setItem(
4061
- cs + ls,
4061
+ ls + us,
4062
4062
  e.toString()
4063
4063
  );
4064
4064
  }
4065
- async function us() {
4066
- if (!xt())
4065
+ async function ds() {
4066
+ if (!Dt())
4067
4067
  return !1;
4068
- if (!qt())
4068
+ if (!Vt())
4069
4069
  return console.warn("[SW] Service workers not supported"), !1;
4070
4070
  try {
4071
- return vt = await navigator.serviceWorker.register("/sw.js", {
4071
+ return At = await navigator.serviceWorker.register("/sw.js", {
4072
4072
  scope: "/"
4073
- }), vt.addEventListener("updatefound", () => {
4074
- const e = vt?.installing;
4073
+ }), At.addEventListener("updatefound", () => {
4074
+ const e = At?.installing;
4075
4075
  e && e.addEventListener("statechange", () => {
4076
4076
  e.state === "installed" && navigator.serviceWorker.controller && confirm(
4077
4077
  "A new version of the app is available. Reload to update cache?"
@@ -4083,7 +4083,7 @@ async function us() {
4083
4083
  }
4084
4084
  }
4085
4085
  async function ii() {
4086
- if (!qt())
4086
+ if (!Vt())
4087
4087
  return !1;
4088
4088
  try {
4089
4089
  const e = await navigator.serviceWorker.getRegistration();
@@ -4099,12 +4099,12 @@ async function $c(e) {
4099
4099
  sessionStorage.setItem("sw-toggle-pending", "enabled");
4100
4100
  } catch {
4101
4101
  }
4102
- await us(), navigator.serviceWorker.controller && ae && (ae = !1, window.location.reload());
4102
+ await ds(), navigator.serviceWorker.controller && ae && (ae = !1, window.location.reload());
4103
4103
  try {
4104
4104
  navigator.serviceWorker.ready.then(() => {
4105
- ae && xt() && (ae = !1, window.location.reload());
4105
+ ae && Dt() && (ae = !1, window.location.reload());
4106
4106
  }), setTimeout(() => {
4107
- ae && xt() && (ae = !1, window.location.reload());
4107
+ ae && Dt() && (ae = !1, window.location.reload());
4108
4108
  }, 3e3);
4109
4109
  } catch {
4110
4110
  }
@@ -4114,7 +4114,7 @@ async function $c(e) {
4114
4114
  } catch {
4115
4115
  }
4116
4116
  try {
4117
- qt() && await oi();
4117
+ Vt() && await oi();
4118
4118
  } catch (t) {
4119
4119
  console.warn("[SW] Failed to invalidate cache:", t);
4120
4120
  }
@@ -4144,13 +4144,13 @@ async function oi() {
4144
4144
  console.warn("[SW] Failed to invalidate cache:", e);
4145
4145
  }
4146
4146
  }
4147
- function Tt() {
4147
+ function It() {
4148
4148
  return "unknown";
4149
4149
  }
4150
4150
  async function xc(e = {}) {
4151
4151
  const { urlLimitPerCache: t } = e;
4152
4152
  if (!("caches" in window))
4153
- return { version: Tt(), caches: [], totalItems: 0 };
4153
+ return { version: It(), caches: [], totalItems: 0 };
4154
4154
  try {
4155
4155
  const r = await caches.keys(), s = [];
4156
4156
  let a = 0;
@@ -4166,51 +4166,51 @@ async function xc(e = {}) {
4166
4166
  console.warn("[SW] Failed reading cache", n, i);
4167
4167
  }
4168
4168
  return {
4169
- version: Tt(),
4169
+ version: It(),
4170
4170
  caches: s,
4171
4171
  totalItems: a
4172
4172
  };
4173
4173
  } catch (r) {
4174
- return console.warn("[SW] getCacheInfo failed:", r), { version: Tt(), caches: [], totalItems: 0 };
4175
- }
4176
- }
4177
- const Mc = "user", Dc = "assistant", Lc = "data", Fe = "OpenAI", lt = "Anthropic", ut = "Google", ds = "Perplexity", Uc = Fe, ci = [
4178
- Fe,
4179
- lt,
4180
- ut
4181
- ], hs = "gpt-5", fs = "gpt-5-mini", ms = "gpt-5-nano", ps = "gpt-4.1-nano", ys = "claude-haiku-4-5-20251001", gs = "claude-sonnet-4-5-20250929", bs = "gemini-2.5-flash", Es = "gemini-2.5-pro", ws = "sonar", Ss = "sonar-pro", Fc = {
4182
- [hs]: "GPT-5",
4183
- [fs]: "GPT-5 Mini",
4184
- [ms]: "GPT-5 Nano",
4185
- [ps]: "GPT-4.1 Nano",
4186
- [ys]: "Claude Haiku 4.5",
4187
- [gs]: "Claude Sonnet 4.5",
4188
- [bs]: "Gemini 2.5 Flash",
4189
- [Es]: "Gemini 2.5 Pro",
4190
- [ws]: "Sonar",
4191
- [Ss]: "Sonar Pro"
4192
- }, vs = {
4193
- [Fe]: [
4194
- ps,
4195
- hs,
4174
+ return console.warn("[SW] getCacheInfo failed:", r), { version: It(), caches: [], totalItems: 0 };
4175
+ }
4176
+ }
4177
+ const Mc = "user", Dc = "assistant", Lc = "data", He = "OpenAI", dt = "Anthropic", ht = "Google", hs = "Perplexity", Uc = He, ci = [
4178
+ He,
4179
+ dt,
4180
+ ht
4181
+ ], fs = "gpt-5", ms = "gpt-5-mini", ps = "gpt-5-nano", ys = "gpt-4.1-nano", gs = "claude-haiku-4-5-20251001", bs = "claude-sonnet-4-5-20250929", Es = "gemini-2.5-flash", ws = "gemini-2.5-pro", Ss = "sonar", vs = "sonar-pro", Fc = {
4182
+ [fs]: "GPT-5",
4183
+ [ms]: "GPT-5 Mini",
4184
+ [ps]: "GPT-5 Nano",
4185
+ [ys]: "GPT-4.1 Nano",
4186
+ [gs]: "Claude Haiku 4.5",
4187
+ [bs]: "Claude Sonnet 4.5",
4188
+ [Es]: "Gemini 2.5 Flash",
4189
+ [ws]: "Gemini 2.5 Pro",
4190
+ [Ss]: "Sonar",
4191
+ [vs]: "Sonar Pro"
4192
+ }, Ts = {
4193
+ [He]: [
4194
+ ys,
4196
4195
  fs,
4197
- ms
4196
+ ms,
4197
+ ps
4198
4198
  ],
4199
- [lt]: [ys, gs],
4200
- [ut]: [bs, Es],
4201
- [ds]: [ws, Ss]
4199
+ [dt]: [gs, bs],
4200
+ [ht]: [Es, ws],
4201
+ [hs]: [Ss, vs]
4202
4202
  }, li = "claude-sonnet-4", ui = "claude-3", di = "gpt-", hi = "o3", fi = "o4", mi = "gemini", pi = "sonar", yi = {
4203
- [lt]: [
4203
+ [dt]: [
4204
4204
  li,
4205
4205
  ui
4206
4206
  ],
4207
- [Fe]: [
4207
+ [He]: [
4208
4208
  di,
4209
4209
  hi,
4210
4210
  fi
4211
4211
  ],
4212
- [ut]: [mi],
4213
- [ds]: [pi]
4212
+ [ht]: [mi],
4213
+ [hs]: [pi]
4214
4214
  }, Hc = "x-diggidy-chat-id", Kc = "timestamp", Gc = "tokenUsage", k = "Diggidy", Bc = {
4215
4215
  TOOL: {
4216
4216
  MEMORIES: "getUserMemories"
@@ -4219,22 +4219,22 @@ const Mc = "user", Dc = "assistant", Lc = "data", Fe = "OpenAI", lt = "Anthropic
4219
4219
  ATTACHMENTS: "addon:attachments",
4220
4220
  REASONING: "addon:reasoning"
4221
4221
  }
4222
- }, Wc = (e) => {
4222
+ }, qc = (e) => {
4223
4223
  for (const [t, r] of Object.entries(
4224
4224
  yi
4225
4225
  ))
4226
4226
  if (r.some((s) => e.startsWith(s)))
4227
4227
  return t;
4228
4228
  return null;
4229
- }, qc = (e) => {
4229
+ }, Wc = (e) => {
4230
4230
  if (!e || e.length === 0)
4231
4231
  return [];
4232
4232
  const t = /* @__PURE__ */ new Set();
4233
4233
  for (const r of e)
4234
4234
  for (const [s, a] of Object.entries(
4235
- vs
4235
+ Ts
4236
4236
  ))
4237
- a.includes(r) && (s === Fe || s === lt || s === ut) && t.add(s);
4237
+ a.includes(r) && (s === He || s === dt || s === ht) && t.add(s);
4238
4238
  return ci.filter((r) => t.has(r));
4239
4239
  }, gi = (e) => {
4240
4240
  const t = /* @__PURE__ */ new Map();
@@ -4242,20 +4242,20 @@ const Mc = "user", Dc = "assistant", Lc = "data", Fe = "OpenAI", lt = "Anthropic
4242
4242
  return t;
4243
4243
  for (const r of e)
4244
4244
  for (const [s, a] of Object.entries(
4245
- vs
4245
+ Ts
4246
4246
  ))
4247
4247
  if (a.includes(r)) {
4248
4248
  t.has(s) || t.set(s, []), t.get(s)?.push(r);
4249
4249
  break;
4250
4250
  }
4251
4251
  return t;
4252
- }, jc = (e) => {
4252
+ }, Vc = (e) => {
4253
4253
  const t = gi(e);
4254
4254
  for (const r of t.values())
4255
4255
  if (r.length > 1)
4256
4256
  return !0;
4257
4257
  return !1;
4258
- }, Vc = (e, t) => !e || !t || t.length === 0 ? !1 : t.includes(e);
4258
+ }, jc = (e, t) => !e || !t || t.length === 0 ? !1 : t.includes(e);
4259
4259
  function bi(e) {
4260
4260
  return e ? new Set(e) : null;
4261
4261
  }
@@ -4466,7 +4466,7 @@ const G = {
4466
4466
  DELETE_MEMORIES: `mutation DeleteMemories($user: String!) {
4467
4467
  deleteMemories(user: $user)
4468
4468
  }`
4469
- }, J = {
4469
+ }, B = {
4470
4470
  GET_LOCATION: {
4471
4471
  schema: G.GET_LOCATION,
4472
4472
  method: "location"
@@ -4520,15 +4520,18 @@ const G = {
4520
4520
  method: "getUserMemories"
4521
4521
  },
4522
4522
  DELETE_MEMORY: {
4523
- schema: G.DELETE_MEMORY
4523
+ schema: G.DELETE_MEMORY,
4524
+ method: "deleteMemory"
4524
4525
  },
4525
4526
  UPDATE_MEMORY: {
4526
- schema: G.UPDATE_MEMORY
4527
+ schema: G.UPDATE_MEMORY,
4528
+ method: "updateMemory"
4527
4529
  },
4528
4530
  DELETE_MEMORIES: {
4529
- schema: G.DELETE_MEMORIES
4531
+ schema: G.DELETE_MEMORIES,
4532
+ method: "deleteMemories"
4530
4533
  }
4531
- }, wi = process.env.PUBLIC_SASSY_API_SERVER_URL, ye = async ({
4534
+ }, wi = process.env.PUBLIC_SASSY_API_SERVER_URL, nt = async ({
4532
4535
  query: e,
4533
4536
  data: t,
4534
4537
  headers: r = {},
@@ -4546,18 +4549,18 @@ const G = {
4546
4549
  variables: t
4547
4550
  }),
4548
4551
  ...s
4549
- }), Ts = async (e) => {
4552
+ }), me = async (e) => {
4550
4553
  const t = e.type?.data ? e.type.data(e.params) : e.params;
4551
4554
  try {
4552
4555
  let r;
4553
4556
  if (e.noAuth === !0)
4554
- r = await ye({
4557
+ r = await nt({
4555
4558
  query: e.type.schema,
4556
4559
  data: t
4557
4560
  });
4558
4561
  else {
4559
4562
  const n = `Bearer ${e.accessToken}`;
4560
- r = await ye({
4563
+ r = await nt({
4561
4564
  headers: {
4562
4565
  authorization: n
4563
4566
  },
@@ -4588,23 +4591,24 @@ const G = {
4588
4591
  user: s,
4589
4592
  provider: e
4590
4593
  };
4591
- return t && (a.model = t), await Ts({
4594
+ return t && (a.model = t), await me({
4592
4595
  accessToken: r,
4593
- type: J.SET_USER_PREFERENCES,
4596
+ type: B.SET_USER_PREFERENCES,
4594
4597
  params: a
4595
4598
  });
4596
4599
  }, Jc = async ({
4597
4600
  plan: e,
4598
4601
  accessToken: t,
4599
4602
  username: r
4600
- }) => await Ts({
4603
+ }) => await me({
4601
4604
  accessToken: t,
4602
- type: J.SET_USER_PREFERENCES,
4605
+ type: B.SET_USER_PREFERENCES,
4603
4606
  params: {
4604
4607
  user: r,
4605
4608
  plan: e
4606
4609
  }
4607
- }), re = {
4610
+ }), Q = {
4611
+ CHAT: "chat",
4608
4612
  CHATS: "chats",
4609
4613
  CHATS_STATS: "chatsStats",
4610
4614
  CAPABILITIES: "capabilities",
@@ -4612,16 +4616,16 @@ const G = {
4612
4616
  PREFERENCES: "preferences",
4613
4617
  USAGE: "usage",
4614
4618
  USER_MEMORIES: "userMemories"
4615
- }, Yc = () => ge({
4616
- queryKey: [re.CAPABILITIES],
4617
- queryFn: async () => await Ee({
4618
- type: J.GET_SERVER_CAPABILITIES,
4619
+ }, Yc = () => fe({
4620
+ queryKey: [Q.CAPABILITIES],
4621
+ queryFn: async () => await pe({
4622
+ type: B.GET_SERVER_CAPABILITIES,
4619
4623
  noAuth: !0
4620
4624
  })
4621
- }), zc = () => ge({
4622
- queryKey: [re.CHANGELOGS],
4623
- queryFn: async () => await Ee({
4624
- type: J.GET_CHANGELOGS,
4625
+ }), zc = () => fe({
4626
+ queryKey: [Q.CHANGELOGS],
4627
+ queryFn: async () => await pe({
4628
+ type: B.GET_CHANGELOGS,
4625
4629
  noAuth: !0,
4626
4630
  params: {
4627
4631
  client: !0
@@ -4630,25 +4634,25 @@ const G = {
4630
4634
  }), Si = ({
4631
4635
  user: e,
4632
4636
  getAccessToken: t
4633
- }) => ge({
4634
- queryKey: [re.PREFERENCES, e],
4635
- queryFn: async () => await Ee({
4637
+ }) => fe({
4638
+ queryKey: [Q.PREFERENCES, e],
4639
+ queryFn: async () => await pe({
4636
4640
  params: {
4637
4641
  user: e
4638
4642
  },
4639
- type: J.GET_USER_PREFERENCES,
4643
+ type: B.GET_USER_PREFERENCES,
4640
4644
  getAccessToken: t
4641
4645
  })
4642
4646
  }), Xc = ({
4643
4647
  user: e,
4644
4648
  getAccessToken: t
4645
- }) => ge({
4646
- queryKey: [re.CHATS_STATS, e],
4647
- queryFn: async () => await Ee({
4649
+ }) => fe({
4650
+ queryKey: [Q.CHATS_STATS, e],
4651
+ queryFn: async () => await pe({
4648
4652
  params: {
4649
4653
  user: e
4650
4654
  },
4651
- type: J.GET_CHATS_STATS,
4655
+ type: B.GET_CHATS_STATS,
4652
4656
  getAccessToken: t
4653
4657
  })
4654
4658
  }), Zc = ({
@@ -4658,12 +4662,12 @@ const G = {
4658
4662
  sortedCell: s,
4659
4663
  getAccessToken: a,
4660
4664
  enabled: n = !0
4661
- }) => ge({
4665
+ }) => fe({
4662
4666
  enabled: n,
4663
4667
  staleTime: 60 * 1e3,
4664
4668
  // 1 minute
4665
- queryKey: [re.CHATS, e, t, r, s],
4666
- queryFn: async () => await Ee({
4669
+ queryKey: [Q.CHATS, e, t, r, s],
4670
+ queryFn: async () => await pe({
4667
4671
  params: {
4668
4672
  user: e,
4669
4673
  searchString: t,
@@ -4672,111 +4676,174 @@ const G = {
4672
4676
  limit: 1,
4673
4677
  truncateSize: 100
4674
4678
  },
4675
- type: J.GET_CHATS,
4679
+ type: B.GET_CHATS,
4676
4680
  getAccessToken: a
4677
4681
  })
4678
4682
  }), el = ({
4683
+ chatId: e,
4684
+ getAccessToken: t,
4685
+ enabled: r = !0
4686
+ }) => fe({
4687
+ enabled: r && !!e,
4688
+ queryKey: [Q.CHAT, e],
4689
+ queryFn: async () => await pe({
4690
+ params: { id: e },
4691
+ type: B.GET_CHAT,
4692
+ getAccessToken: t
4693
+ })
4694
+ }), tl = ({
4695
+ getAccessToken: e
4696
+ }) => {
4697
+ const t = he();
4698
+ return Pe({
4699
+ mutationFn: async ({
4700
+ userId: r,
4701
+ id: s,
4702
+ messages: a,
4703
+ provider: n,
4704
+ tokenUsage: i
4705
+ }) => {
4706
+ const o = await e();
4707
+ return (await me({
4708
+ accessToken: o,
4709
+ type: B.SAVE_CHAT,
4710
+ params: { userId: r, id: s, messages: a, provider: n, tokenUsage: i }
4711
+ })).data;
4712
+ },
4713
+ onSuccess: (r, s) => {
4714
+ t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
4715
+ }
4716
+ });
4717
+ }, rl = ({
4718
+ getAccessToken: e
4719
+ }) => {
4720
+ const t = he();
4721
+ return Pe({
4722
+ mutationFn: async ({ userId: r, id: s }) => {
4723
+ const a = await e();
4724
+ return (await me({
4725
+ accessToken: a,
4726
+ type: B.DELETE_CHAT,
4727
+ params: { userId: r, id: s }
4728
+ })).data;
4729
+ },
4730
+ onSuccess: (r, s) => {
4731
+ t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
4732
+ }
4733
+ });
4734
+ }, sl = ({
4735
+ getAccessToken: e
4736
+ }) => {
4737
+ const t = he();
4738
+ return Pe({
4739
+ mutationFn: async ({ userId: r, id: s }) => {
4740
+ const a = await e();
4741
+ return (await me({
4742
+ accessToken: a,
4743
+ type: B.TOGGLE_FAVORITE_CHAT,
4744
+ params: { userId: r, id: s }
4745
+ })).data;
4746
+ },
4747
+ onSuccess: (r, s) => {
4748
+ t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
4749
+ }
4750
+ });
4751
+ }, al = ({
4679
4752
  user: e,
4680
4753
  month: t,
4681
4754
  year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
4682
4755
  getAccessToken: s,
4683
4756
  enabled: a = !0
4684
- }) => ge({
4757
+ }) => fe({
4685
4758
  enabled: a,
4686
- queryKey: [re.USAGE, e, t, r],
4687
- queryFn: async () => await Ee({
4759
+ queryKey: [Q.USAGE, e, t, r],
4760
+ queryFn: async () => await pe({
4688
4761
  params: {
4689
4762
  user: e,
4690
4763
  month: t,
4691
4764
  year: r
4692
4765
  },
4693
- type: J.GET_USAGE,
4766
+ type: B.GET_USAGE,
4694
4767
  getAccessToken: s
4695
4768
  })
4696
- }), tl = ({
4769
+ }), nl = ({
4697
4770
  user: e,
4698
4771
  query: t,
4699
4772
  getAccessToken: r,
4700
4773
  enabled: s = !0
4701
- }) => ge({
4774
+ }) => fe({
4702
4775
  enabled: s && !!e,
4703
- queryKey: [re.USER_MEMORIES, e, t],
4704
- queryFn: async () => await Ee({
4776
+ queryKey: [Q.USER_MEMORIES, e, t],
4777
+ queryFn: async () => await pe({
4705
4778
  params: { user: e, query: t },
4706
- type: J.GET_USER_MEMORIES,
4779
+ type: B.GET_USER_MEMORIES,
4707
4780
  getAccessToken: r
4708
4781
  })
4709
- }), rl = ({
4782
+ }), il = ({
4710
4783
  getAccessToken: e
4711
4784
  }) => {
4712
- const t = Le();
4713
- return Kt({
4785
+ const t = he();
4786
+ return Pe({
4714
4787
  mutationFn: async ({
4715
4788
  user: r,
4716
4789
  memoryId: s,
4717
4790
  description: a
4718
4791
  }) => {
4719
- const n = await e(), i = await ye({
4720
- query: J.UPDATE_MEMORY.schema,
4721
- data: { user: r, memoryId: s, description: a },
4722
- headers: { authorization: `Bearer ${n}` }
4723
- }), { data: o, errors: c } = await i.json();
4724
- if (c)
4725
- throw new Error(c[0]?.message || "Update memory failed");
4726
- return o.updateMemory;
4792
+ const n = await e();
4793
+ return (await me({
4794
+ accessToken: n,
4795
+ type: B.UPDATE_MEMORY,
4796
+ params: { user: r, memoryId: s, description: a }
4797
+ })).data;
4727
4798
  },
4728
4799
  onSuccess: (r, s) => {
4729
4800
  t.invalidateQueries({
4730
- queryKey: [re.USER_MEMORIES, s.user]
4801
+ queryKey: [Q.USER_MEMORIES, s.user]
4731
4802
  });
4732
4803
  }
4733
4804
  });
4734
- }, sl = ({
4805
+ }, ol = ({
4735
4806
  getAccessToken: e
4736
4807
  }) => {
4737
- const t = Le();
4738
- return Kt({
4808
+ const t = he();
4809
+ return Pe({
4739
4810
  mutationFn: async ({
4740
4811
  user: r,
4741
4812
  memoryId: s
4742
4813
  }) => {
4743
- const a = await e(), n = await ye({
4744
- query: J.DELETE_MEMORY.schema,
4745
- data: { user: r, memoryId: s },
4746
- headers: { authorization: `Bearer ${a}` }
4747
- }), { data: i, errors: o } = await n.json();
4748
- if (o)
4749
- throw new Error(o[0]?.message || "Delete memory failed");
4750
- return i.deleteMemory;
4814
+ const a = await e();
4815
+ return (await me({
4816
+ accessToken: a,
4817
+ type: B.DELETE_MEMORY,
4818
+ params: { user: r, memoryId: s }
4819
+ })).data;
4751
4820
  },
4752
4821
  onSuccess: (r, s) => {
4753
4822
  t.invalidateQueries({
4754
- queryKey: [re.USER_MEMORIES, s.user]
4823
+ queryKey: [Q.USER_MEMORIES, s.user]
4755
4824
  });
4756
4825
  }
4757
4826
  });
4758
- }, al = ({
4827
+ }, cl = ({
4759
4828
  getAccessToken: e
4760
4829
  }) => {
4761
- const t = Le();
4762
- return Kt({
4830
+ const t = he();
4831
+ return Pe({
4763
4832
  mutationFn: async ({ user: r }) => {
4764
- const s = await e(), a = await ye({
4765
- query: J.DELETE_MEMORIES.schema,
4766
- data: { user: r },
4767
- headers: { authorization: `Bearer ${s}` }
4768
- }), { data: n, errors: i } = await a.json();
4769
- if (i)
4770
- throw new Error(i[0]?.message || "Delete memories failed");
4771
- return n.deleteMemories;
4833
+ const s = await e();
4834
+ return (await me({
4835
+ accessToken: s,
4836
+ type: B.DELETE_MEMORIES,
4837
+ params: { user: r }
4838
+ })).data;
4772
4839
  },
4773
4840
  onSuccess: (r, s) => {
4774
4841
  t.invalidateQueries({
4775
- queryKey: [re.USER_MEMORIES, s.user]
4842
+ queryKey: [Q.USER_MEMORIES, s.user]
4776
4843
  });
4777
4844
  }
4778
4845
  });
4779
- }, Ee = async ({
4846
+ }, pe = async ({
4780
4847
  params: e,
4781
4848
  type: t,
4782
4849
  noAuth: r,
@@ -4786,13 +4853,13 @@ const G = {
4786
4853
  const a = t?.data ? t.data(e) : e;
4787
4854
  let n;
4788
4855
  if (r === !0)
4789
- n = await ye({
4856
+ n = await nt({
4790
4857
  query: t.schema,
4791
4858
  data: a
4792
4859
  });
4793
4860
  else if (s) {
4794
4861
  const f = await s();
4795
- n = await ye({
4862
+ n = await nt({
4796
4863
  headers: {
4797
4864
  authorization: `Bearer ${f}`
4798
4865
  },
@@ -4812,9 +4879,9 @@ const G = {
4812
4879
  } catch (a) {
4813
4880
  return Promise.reject(a);
4814
4881
  }
4815
- }, As = Lt(
4882
+ }, As = Ft(
4816
4883
  void 0
4817
- ), Sr = {
4884
+ ), vr = {
4818
4885
  capabilities: /* @__PURE__ */ new Set(),
4819
4886
  allowedModels: [],
4820
4887
  version: null,
@@ -4824,10 +4891,10 @@ const G = {
4824
4891
  getAccessToken: t,
4825
4892
  children: r
4826
4893
  }) => {
4827
- const [s, a] = ie(Sr), n = Ye(
4894
+ const [s, a] = ie(vr), n = ze(
4828
4895
  () => e ? `entitlements:${e}` : null,
4829
4896
  [e]
4830
- ), i = z(() => {
4897
+ ), i = X(() => {
4831
4898
  if (!n)
4832
4899
  return !1;
4833
4900
  try {
@@ -4878,7 +4945,7 @@ const G = {
4878
4945
  } catch {
4879
4946
  }
4880
4947
  }, [o.data, n]);
4881
- const c = z(
4948
+ const c = X(
4882
4949
  (u) => {
4883
4950
  const l = u?.entitlements;
4884
4951
  if (l && (a({
@@ -4900,13 +4967,13 @@ const G = {
4900
4967
  }
4901
4968
  },
4902
4969
  [n]
4903
- ), f = z(() => {
4904
- if (a(Sr), n)
4970
+ ), f = X(() => {
4971
+ if (a(vr), n)
4905
4972
  try {
4906
4973
  sessionStorage.removeItem(n);
4907
4974
  } catch {
4908
4975
  }
4909
- }, [n]), d = Ye(
4976
+ }, [n]), d = ze(
4910
4977
  () => ({
4911
4978
  ...s,
4912
4979
  check: (u, l) => s.status !== "ready" ? !1 : Ei(s.capabilities, u, { any: l?.any }),
@@ -4917,13 +4984,13 @@ const G = {
4917
4984
  );
4918
4985
  return /* @__PURE__ */ h(As.Provider, { value: d, children: r });
4919
4986
  };
4920
- function nl() {
4921
- const e = it(As);
4987
+ function ll() {
4988
+ const e = ct(As);
4922
4989
  if (!e)
4923
4990
  throw new Error("useEntitlements must be used within EntitlementsProvider");
4924
4991
  return e;
4925
4992
  }
4926
- const vr = (e) => Number.isFinite(e) ? e : 0;
4993
+ const Tr = (e) => Number.isFinite(e) ? e : 0;
4927
4994
  function Ti(e) {
4928
4995
  return {
4929
4996
  days: Math.trunc(e / 864e5),
@@ -4931,8 +4998,8 @@ function Ti(e) {
4931
4998
  minutes: Math.trunc(e / 6e4 % 60),
4932
4999
  seconds: Math.trunc(e / 1e3 % 60),
4933
5000
  milliseconds: Math.trunc(e % 1e3),
4934
- microseconds: Math.trunc(vr(e * 1e3) % 1e3),
4935
- nanoseconds: Math.trunc(vr(e * 1e6) % 1e3)
5001
+ microseconds: Math.trunc(Tr(e * 1e3) % 1e3),
5002
+ nanoseconds: Math.trunc(Tr(e * 1e6) % 1e3)
4936
5003
  };
4937
5004
  }
4938
5005
  function Ai(e) {
@@ -5003,7 +5070,7 @@ function ki(e, t) {
5003
5070
  const f = t.colonNotation ? ":" : " ";
5004
5071
  return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), s + a.join(f);
5005
5072
  }
5006
- const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.local.com" : "gizmette.com", Vt = (e, t) => {
5073
+ const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.local.com" : "gizmette.com", Qt = (e, t) => {
5007
5074
  const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", s = 0 | Math.abs(e), a = 0 | Math.abs(e) * 60 % 60, n = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
5008
5075
  return {
5009
5076
  dir: r,
@@ -5014,12 +5081,12 @@ const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.
5014
5081
  }, Ni = (e) => {
5015
5082
  if (!e && e !== 0)
5016
5083
  return "N/A";
5017
- const t = Vt(e, !1);
5084
+ const t = Qt(e, !1);
5018
5085
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
5019
5086
  }, Pi = (e) => {
5020
5087
  if (!e && e !== 0)
5021
5088
  return "N/A";
5022
- const t = Vt(e, !0);
5089
+ const t = Qt(e, !0);
5023
5090
  return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
5024
5091
  }, $i = async () => {
5025
5092
  const e = {
@@ -5075,7 +5142,7 @@ const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.
5075
5142
  window.atob(e).split("").map(function(t) {
5076
5143
  return `%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`;
5077
5144
  }).join("")
5078
- ), Di = (e, t, r) => t ? Object.keys(t).map((s) => /* @__PURE__ */ h("dl", { className: "my-0", children: /* @__PURE__ */ q("div", { className: "flex items-center justify-between", children: [
5145
+ ), Di = (e, t, r) => t ? Object.keys(t).map((s) => /* @__PURE__ */ h("dl", { className: "my-0", children: /* @__PURE__ */ V("div", { className: "flex items-center justify-between", children: [
5079
5146
  /* @__PURE__ */ h(
5080
5147
  "dt",
5081
5148
  {
@@ -5142,13 +5209,13 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5142
5209
  }, Os = () => !!window?.__VERSINI_DIGGIDY_TAURI__, ks = () => window.innerWidth < 403, Ns = () => window.innerWidth >= 403 && window.innerWidth <= 1220, Bi = () => {
5143
5210
  const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r = ks(), s = navigator.maxTouchPoints > 1;
5144
5211
  return e && t && r && s;
5145
- }, Wi = () => {
5212
+ }, qi = () => {
5146
5213
  const e = ["iPad Simulator", "iPad"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = Ns(), r = navigator.maxTouchPoints > 1;
5147
5214
  return e && t && r;
5148
- }, qi = () => window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === !0, ji = (e) => {
5215
+ }, Wi = () => window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === !0, Vi = (e) => {
5149
5216
  const t = e.replace(/([A-Z])/g, " $1");
5150
5217
  return t.charAt(0).toUpperCase() + t.slice(1);
5151
- }, Vi = ({
5218
+ }, ji = ({
5152
5219
  autoClose: e = 3e3,
5153
5220
  containerId: t,
5154
5221
  position: r = "top-center",
@@ -5172,7 +5239,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5172
5239
  theme: c,
5173
5240
  transition: f,
5174
5241
  icon: d
5175
- }), Qi = (e, t) => t === "ready" && !!e && e.length > 0, il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: _s, canEvaluateModels: Qi, convertCamelCaseToReadable: ji, convertDDToDMS: Vt, convertLatitudeToDMS: Ni, convertLongitudeToDMS: Pi, debounce: Gi, durationFormatter: Hi, extractAverage: Li, getCurrentGeoLocation: $i, getLayoutPaddingClass: Cs, getMessageContaintWrapperClass: Rs, isDev: jt, isLastMessageFromRole: Ui, isPWAMode: qi, isProbablyMobile: ks, isProbablyTablet: Ns, isProbablyiPad: Wi, isProbablyiPhone: Bi, isProd: Is, isTauri: Os, numberFormatter: Fi, obfuscate: xi, pluralize: Ki, renderDataAsList: Di, toastOptions: Vi, unObfuscate: Mi }, Symbol.toStringTag, { value: "Module" })), Tr = "av-button", dt = "icon", Qt = "button", Mt = "link", Ji = ({
5242
+ }), Qi = (e, t) => t === "ready" && !!e && e.length > 0, ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: _s, canEvaluateModels: Qi, convertCamelCaseToReadable: Vi, convertDDToDMS: Qt, convertLatitudeToDMS: Ni, convertLongitudeToDMS: Pi, debounce: Gi, durationFormatter: Hi, extractAverage: Li, getCurrentGeoLocation: $i, getLayoutPaddingClass: Cs, getMessageContaintWrapperClass: Rs, isDev: jt, isLastMessageFromRole: Ui, isPWAMode: Wi, isProbablyMobile: ks, isProbablyTablet: Ns, isProbablyiPad: qi, isProbablyiPhone: Bi, isProd: Is, isTauri: Os, numberFormatter: Fi, obfuscate: xi, pluralize: Ki, renderDataAsList: Di, toastOptions: ji, unObfuscate: Mi }, Symbol.toStringTag, { value: "Module" })), Ar = "av-button", ft = "icon", Jt = "button", Lt = "link", Ji = ({
5176
5243
  type: e,
5177
5244
  size: t,
5178
5245
  labelRight: r,
@@ -5182,14 +5249,14 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5182
5249
  }) => {
5183
5250
  const i = "max-h-8 py-0 px-2", o = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
5184
5251
  switch (e) {
5185
- case Qt:
5186
- case Mt:
5252
+ case Jt:
5253
+ case Lt:
5187
5254
  return y({
5188
5255
  [i]: t === "small",
5189
5256
  [o]: t === "medium",
5190
5257
  [c]: t === "large"
5191
5258
  });
5192
- case dt:
5259
+ case ft:
5193
5260
  return y("flex items-center", {
5194
5261
  "justify-center": a === "center",
5195
5262
  "justify-start": a === "left",
@@ -5216,15 +5283,15 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5216
5283
  }) => {
5217
5284
  const a = "text-sm font-medium", n = "text-base font-medium", i = "text-lg font-medium";
5218
5285
  switch (e) {
5219
- case Qt:
5220
- case Mt:
5286
+ case Jt:
5287
+ case Lt:
5221
5288
  return y({
5222
- "text-center": e === Mt,
5289
+ "text-center": e === Lt,
5223
5290
  [a]: t === "small",
5224
5291
  [n]: t === "medium",
5225
5292
  [i]: t === "large"
5226
5293
  });
5227
- case dt:
5294
+ case ft:
5228
5295
  return y({
5229
5296
  [a]: t === "small" && (r || s),
5230
5297
  [n]: t === "medium" && (r || s),
@@ -5465,8 +5532,8 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5465
5532
  align: p,
5466
5533
  radius: g,
5467
5534
  animated: b
5468
- }) => (l || (l = "primary"), r ? y(Tr, t) : y(
5469
- Tr,
5535
+ }) => (l || (l = "primary"), r ? y(Ar, t) : y(
5536
+ Ar,
5470
5537
  zi({
5471
5538
  mode: s,
5472
5539
  variant: l,
@@ -5493,12 +5560,12 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5493
5560
  "disabled:cursor-not-allowed disabled:opacity-50": n
5494
5561
  },
5495
5562
  y({
5496
- "transition-[width] duration-300 ease-in": e === dt && b
5563
+ "transition-[width] duration-300 ease-in": e === ft && b
5497
5564
  }),
5498
5565
  t
5499
5566
  )), io = (e, t, r) => {
5500
5567
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
5501
- }, Jt = oe.forwardRef((e, t) => {
5568
+ }, Yt = oe.forwardRef((e, t) => {
5502
5569
  const { onClick: r, noInternalClick: s = !1, ...a } = e;
5503
5570
  return /* @__PURE__ */ h(
5504
5571
  "button",
@@ -5511,7 +5578,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
5511
5578
  }
5512
5579
  );
5513
5580
  });
5514
- Jt.displayName = "BaseButton";
5581
+ Yt.displayName = "BaseButton";
5515
5582
  const $s = oe.forwardRef(
5516
5583
  ({
5517
5584
  children: e,
@@ -5529,7 +5596,7 @@ const $s = oe.forwardRef(
5529
5596
  ...l
5530
5597
  }, m) => {
5531
5598
  const p = Ps({
5532
- type: Qt,
5599
+ type: Jt,
5533
5600
  mode: r,
5534
5601
  focusMode: s,
5535
5602
  fullWidth: a,
@@ -5543,7 +5610,7 @@ const $s = oe.forwardRef(
5543
5610
  radius: u
5544
5611
  });
5545
5612
  return /* @__PURE__ */ h(
5546
- Jt,
5613
+ Yt,
5547
5614
  {
5548
5615
  ref: m,
5549
5616
  className: p,
@@ -5559,10 +5626,10 @@ function oo() {
5559
5626
  const e = j(!1);
5560
5627
  return W(() => (e.current = !0, () => {
5561
5628
  e.current = !1;
5562
- }), []), z(() => e.current, []);
5629
+ }), []), X(() => e.current, []);
5563
5630
  }
5564
5631
  function xs(e) {
5565
- return Ye(() => e.every((t) => t == null) ? () => {
5632
+ return ze(() => e.every((t) => t == null) ? () => {
5566
5633
  } : (t) => {
5567
5634
  e.forEach((r) => {
5568
5635
  typeof r == "function" ? r(t) : r != null && (r.current = t);
@@ -5579,8 +5646,8 @@ const co = {
5579
5646
  bottom: 0,
5580
5647
  right: 0
5581
5648
  };
5582
- function Qe(e) {
5583
- const t = oo(), r = j(0), s = j(null), [a, n] = ie(co), i = Ye(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
5649
+ function Je(e) {
5650
+ const t = oo(), r = j(0), s = j(null), [a, n] = ie(co), i = ze(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
5584
5651
  const c = o[0];
5585
5652
  c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
5586
5653
  s.current && t() && n(c.contentRect);
@@ -5601,7 +5668,7 @@ function Ms(e) {
5601
5668
  return typeof r == "number" || typeof r == "string" ? `${s}${r}` : `${s}${t}`;
5602
5669
  }
5603
5670
  }
5604
- const qe = {
5671
+ const Ve = {
5605
5672
  small: 24,
5606
5673
  // w-6
5607
5674
  medium: 32,
@@ -5615,7 +5682,7 @@ const qe = {
5615
5682
  // px-3 x 2
5616
5683
  large: 32
5617
5684
  // px-4 x 2
5618
- }, uo = 2, ho = 300, at = oe.forwardRef(
5685
+ }, uo = 2, ho = 300, it = oe.forwardRef(
5619
5686
  ({
5620
5687
  children: e,
5621
5688
  disabled: t = !1,
@@ -5639,8 +5706,8 @@ const qe = {
5639
5706
  animated: A = !1,
5640
5707
  ...K
5641
5708
  }, R) => {
5642
- const Y = Ps({
5643
- type: dt,
5709
+ const z = Ps({
5710
+ type: ft,
5644
5711
  mode: r,
5645
5712
  focusMode: s,
5646
5713
  fullWidth: a,
@@ -5656,21 +5723,21 @@ const qe = {
5656
5723
  radius: b,
5657
5724
  variant: E,
5658
5725
  animated: A
5659
- }), C = ao({ mode: r, raw: o, iconClassName: O, variant: E }), v = no({ animated: A }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, I] = Qe(), [N, V] = Qe(), [ce, we] = Qe(), w = j(0), T = j(null), S = j(null), le = xs([R, T]);
5660
- return ze(() => {
5661
- ce && ce.current && A && (w.current = we.width + lo[u] + (c ? 0 : uo), T.current && !T.current.style.width && (T.current.style.width = `${qe[u]}px`));
5662
- }, [we, ce, u, c, A]), ze(() => {
5726
+ }), C = ao({ mode: r, raw: o, iconClassName: O, variant: E }), v = no({ animated: A }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, I] = Je(), [N, J] = Je(), [ce, Se] = Je(), w = j(0), T = j(null), S = j(null), le = xs([R, T]);
5727
+ return Xe(() => {
5728
+ ce && ce.current && A && (w.current = Se.width + lo[u] + (c ? 0 : uo), T.current && !T.current.style.width && (T.current.style.width = `${Ve[u]}px`));
5729
+ }, [Se, ce, u, c, A]), Xe(() => {
5663
5730
  if (T && T.current && A) {
5664
- let ue = qe[u];
5665
- l && _ && I.width > 0 ? ue = I.width + w.current : m && N && V.width > 0 && (ue = V.width + w.current), S.current && clearTimeout(S.current), ue !== parseInt(T.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"), T.current.style.width = `${ue}px`, ue > qe[u] && (S.current = setTimeout(() => {
5731
+ let ue = Ve[u];
5732
+ l && _ && I.width > 0 ? ue = I.width + w.current : m && N && J.width > 0 && (ue = J.width + w.current), S.current && clearTimeout(S.current), ue !== parseInt(T.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"), T.current.style.width = `${ue}px`, ue > Ve[u] && (S.current = setTimeout(() => {
5666
5733
  _.current && l && (_.current.style.opacity = "1"), N.current && m && (N.current.style.opacity = "1"), S.current = null;
5667
- }, ho * 0.8))), ue === qe[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5734
+ }, ho * 0.8))), ue === Ve[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
5668
5735
  }
5669
5736
  }, [
5670
5737
  I,
5671
5738
  l,
5672
5739
  _,
5673
- V,
5740
+ J,
5674
5741
  m,
5675
5742
  N,
5676
5743
  u,
@@ -5678,17 +5745,17 @@ const qe = {
5678
5745
  ]), W(() => () => {
5679
5746
  S.current && clearTimeout(S.current);
5680
5747
  }, []), /* @__PURE__ */ h(
5681
- Jt,
5748
+ Yt,
5682
5749
  {
5683
5750
  ref: le,
5684
- className: Y,
5751
+ className: z,
5685
5752
  disabled: t,
5686
5753
  type: i,
5687
5754
  "aria-label": f || d,
5688
5755
  ...K,
5689
- children: /* @__PURE__ */ q("div", { className: x, children: [
5756
+ children: /* @__PURE__ */ V("div", { className: x, children: [
5690
5757
  /* @__PURE__ */ h(
5691
- Ar,
5758
+ Ir,
5692
5759
  {
5693
5760
  label: m,
5694
5761
  labelRef: N,
@@ -5699,7 +5766,7 @@ const qe = {
5699
5766
  ),
5700
5767
  /* @__PURE__ */ h("span", { ref: ce, className: C, children: e }),
5701
5768
  /* @__PURE__ */ h(
5702
- Ar,
5769
+ Ir,
5703
5770
  {
5704
5771
  label: l,
5705
5772
  labelRef: _,
@@ -5712,7 +5779,7 @@ const qe = {
5712
5779
  }
5713
5780
  );
5714
5781
  }
5715
- ), Ar = ({
5782
+ ), Ir = ({
5716
5783
  labelRef: e,
5717
5784
  labelClass: t,
5718
5785
  label: r,
@@ -5727,7 +5794,7 @@ const qe = {
5727
5794
  children: r && /* @__PURE__ */ h("span", { className: s, children: r })
5728
5795
  }
5729
5796
  );
5730
- at.displayName = "ButtonIcon";
5797
+ it.displayName = "ButtonIcon";
5731
5798
  /*!
5732
5799
  @versini/ui-button v8.1.3
5733
5800
  © 2025 gizmette.com
@@ -5767,7 +5834,7 @@ const fo = oe.forwardRef(
5767
5834
  }
5768
5835
  ) : "";
5769
5836
  return /* @__PURE__ */ h("div", { className: i, children: /* @__PURE__ */ h(
5770
- at,
5837
+ it,
5771
5838
  {
5772
5839
  className: r,
5773
5840
  ref: n,
@@ -5782,7 +5849,7 @@ const fo = oe.forwardRef(
5782
5849
  }
5783
5850
  );
5784
5851
  fo.displayName = "ButtonSort";
5785
- const Je = "av-card", mo = ({
5852
+ const Ye = "av-card", mo = ({
5786
5853
  className: e,
5787
5854
  headerClassName: t,
5788
5855
  bodyClassName: r,
@@ -5792,7 +5859,7 @@ const Je = "av-card", mo = ({
5792
5859
  noBorder: i
5793
5860
  }) => {
5794
5861
  const o = y(
5795
- Je,
5862
+ Ye,
5796
5863
  "rounded-md",
5797
5864
  {
5798
5865
  "border-none": i,
@@ -5806,7 +5873,7 @@ const Je = "av-card", mo = ({
5806
5873
  "border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": a === "alt-system"
5807
5874
  },
5808
5875
  e
5809
- ), c = t || y(`${Je}__header mt-0 border-b-2`, {
5876
+ ), c = t || y(`${Ye}__header mt-0 border-b-2`, {
5810
5877
  "text-copy-light border-border-accent": a === "darker",
5811
5878
  "border-border-accent": a === "dark",
5812
5879
  "border-border-medium": a === "light",
@@ -5814,7 +5881,7 @@ const Je = "av-card", mo = ({
5814
5881
  "border-border-accent dark:border-border-medium": a === "alt-system",
5815
5882
  "mb-4": !n,
5816
5883
  "mb-2": n
5817
- }), f = y(r), d = s || y(`${Je}__footer pt-2`);
5884
+ }), f = y(r), d = s || y(`${Ye}__footer pt-2`);
5818
5885
  return {
5819
5886
  wrapper: o,
5820
5887
  header: c,
@@ -5845,7 +5912,7 @@ const yo = ({
5845
5912
  ...u
5846
5913
  }) => {
5847
5914
  let l = null, m = null;
5848
- const p = typeof e == "string", g = Ms(Je), b = mo({
5915
+ const p = typeof e == "string", g = Ms(Ye), b = mo({
5849
5916
  className: n,
5850
5917
  headerClassName: t,
5851
5918
  bodyClassName: i,
@@ -5854,7 +5921,7 @@ const yo = ({
5854
5921
  compact: f,
5855
5922
  noBorder: d
5856
5923
  });
5857
- return p ? (l = g, m = l) : !p && e && o ? (l = null, m = o) : !p && e && !o ? (l = g, m = l) : (l = null, m = o || null), /* @__PURE__ */ h("div", { className: b.wrapper, children: /* @__PURE__ */ q(
5924
+ return p ? (l = g, m = l) : !p && e && o ? (l = null, m = o) : !p && e && !o ? (l = g, m = l) : (l = null, m = o || null), /* @__PURE__ */ h("div", { className: b.wrapper, children: /* @__PURE__ */ V(
5858
5925
  "section",
5859
5926
  {
5860
5927
  ...m && {
@@ -5891,7 +5958,7 @@ try {
5891
5958
  });
5892
5959
  } catch {
5893
5960
  }
5894
- const ht = ({
5961
+ const mt = ({
5895
5962
  children: e,
5896
5963
  fill: t,
5897
5964
  viewBox: r,
@@ -5903,7 +5970,7 @@ const ht = ({
5903
5970
  ...c
5904
5971
  }) => {
5905
5972
  const f = y(n, s);
5906
- return /* @__PURE__ */ q(
5973
+ return /* @__PURE__ */ V(
5907
5974
  "svg",
5908
5975
  {
5909
5976
  xmlns: "http://www.w3.org/2000/svg",
@@ -5941,7 +6008,7 @@ const go = ({
5941
6008
  monotone: s,
5942
6009
  ...a
5943
6010
  }) => /* @__PURE__ */ h(
5944
- ht,
6011
+ mt,
5945
6012
  {
5946
6013
  defaultViewBox: "0 0 1200 500",
5947
6014
  size: "w-full",
@@ -5957,8 +6024,8 @@ const go = ({
5957
6024
  title: r,
5958
6025
  monotone: s,
5959
6026
  ...a
5960
- }) => /* @__PURE__ */ q(
5961
- ht,
6027
+ }) => /* @__PURE__ */ V(
6028
+ mt,
5962
6029
  {
5963
6030
  defaultViewBox: "0 0 640 512",
5964
6031
  size: "size-5",
@@ -5985,8 +6052,8 @@ const go = ({
5985
6052
  ...a
5986
6053
  }) => {
5987
6054
  const n = s ? "1" : "0.4";
5988
- return /* @__PURE__ */ q(
5989
- ht,
6055
+ return /* @__PURE__ */ V(
6056
+ mt,
5990
6057
  {
5991
6058
  defaultViewBox: "0 0 190 190",
5992
6059
  size: "size-5",
@@ -6019,8 +6086,8 @@ const go = ({
6019
6086
  title: r,
6020
6087
  monotone: s,
6021
6088
  ...a
6022
- }) => /* @__PURE__ */ q(
6023
- ht,
6089
+ }) => /* @__PURE__ */ V(
6090
+ mt,
6024
6091
  {
6025
6092
  defaultViewBox: "0 0 576 512",
6026
6093
  size: "size-5",
@@ -6053,7 +6120,7 @@ try {
6053
6120
  });
6054
6121
  } catch {
6055
6122
  }
6056
- const So = "av-flexgrid", je = "av-flexgrid-item", nt = 0.25, Dt = oe.createContext({
6123
+ const So = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createContext({
6057
6124
  columnGap: 0,
6058
6125
  rowGap: 0
6059
6126
  }), vo = ({
@@ -6079,14 +6146,14 @@ const So = "av-flexgrid", je = "av-flexgrid-item", nt = 0.25, Dt = oe.createCont
6079
6146
  * by the columnGap and rowGap that will be applied
6080
6147
  * to all FlexgridItems (see context and paddings).
6081
6148
  */
6082
- marginLeft: r * -1 * nt + "rem",
6083
- marginTop: s * -1 * nt + "rem"
6149
+ marginLeft: r * -1 * ot + "rem",
6150
+ marginTop: s * -1 * ot + "rem"
6084
6151
  }, u = y(
6085
6152
  So,
6086
6153
  "box-border flex flex-wrap"
6087
6154
  ), l = { columnGap: r, rowGap: s };
6088
- return t ? /* @__PURE__ */ h("div", { className: t, children: /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Dt.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Dt.Provider, { value: l, children: e }) });
6089
- }, At = (e, t) => y({
6155
+ return t ? /* @__PURE__ */ h("div", { className: t, children: /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Ut.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Ut.Provider, { value: l, children: e }) });
6156
+ }, _t = (e, t) => y({
6090
6157
  "basis-1/12": e === 1 && !t,
6091
6158
  "sm:basis-1/12": e === 1 && t === "sm",
6092
6159
  "md:basis-1/12": e === 1 && t === "md",
@@ -6167,14 +6234,14 @@ const So = "av-flexgrid", je = "av-flexgrid-item", nt = 0.25, Dt = oe.createCont
6167
6234
  return y(e, je, "box-border basis-auto");
6168
6235
  if (typeof t == "number")
6169
6236
  return y(e, je, "box-border max-w-full", {
6170
- [`${At(t)}`]: !0
6237
+ [`${_t(t)}`]: !0
6171
6238
  });
6172
6239
  if (typeof t == "string")
6173
6240
  return y(e, je, "box-border basis-auto", {
6174
6241
  "max-w-full grow": t === "auto"
6175
6242
  });
6176
6243
  if (typeof t == "object") {
6177
- const r = Object.entries(t).map(([s, a]) => s === "fallback" ? At(a) : At(a, s));
6244
+ const r = Object.entries(t).map(([s, a]) => s === "fallback" ? _t(a) : _t(a, s));
6178
6245
  return y(
6179
6246
  e,
6180
6247
  je,
@@ -6182,15 +6249,15 @@ const So = "av-flexgrid", je = "av-flexgrid-item", nt = 0.25, Dt = oe.createCont
6182
6249
  r
6183
6250
  );
6184
6251
  }
6185
- }, he = ({
6252
+ }, ye = ({
6186
6253
  children: e,
6187
6254
  className: t,
6188
6255
  span: r,
6189
6256
  ...s
6190
6257
  }) => {
6191
- const { columnGap: a, rowGap: n } = it(Dt), i = {
6192
- paddingLeft: a * nt + "rem",
6193
- paddingTop: n * nt + "rem"
6258
+ const { columnGap: a, rowGap: n } = ct(Ut), i = {
6259
+ paddingLeft: a * ot + "rem",
6260
+ paddingTop: n * ot + "rem"
6194
6261
  }, o = To({
6195
6262
  className: t,
6196
6263
  span: r
@@ -6240,7 +6307,7 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
6240
6307
  t({
6241
6308
  type: Ls
6242
6309
  }), typeof e == "function" && e();
6243
- }, Ir = ({
6310
+ }, _r = ({
6244
6311
  children: e,
6245
6312
  clearAnnouncementDelay: t,
6246
6313
  clearAnnouncementTimeoutRef: r,
@@ -6266,13 +6333,13 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
6266
6333
  onAnnouncementClear: n,
6267
6334
  dispatch: i
6268
6335
  }) => {
6269
- clearTimeout(t.current), r ? t.current = setTimeout(Ir, r, {
6336
+ clearTimeout(t.current), r ? t.current = setTimeout(_r, r, {
6270
6337
  children: e,
6271
6338
  clearAnnouncementDelay: s,
6272
6339
  clearAnnouncementTimeoutRef: a,
6273
6340
  onAnnouncementClear: n,
6274
6341
  dispatch: i
6275
- }) : Ir({
6342
+ }) : _r({
6276
6343
  children: e,
6277
6344
  clearAnnouncementDelay: s,
6278
6345
  clearAnnouncementTimeoutRef: a,
@@ -6291,7 +6358,7 @@ function Us({
6291
6358
  visible: o,
6292
6359
  ...c
6293
6360
  }) {
6294
- const f = j(null), d = j(null), [u, l] = Or(Io, {
6361
+ const f = j(null), d = j(null), [u, l] = kr(Io, {
6295
6362
  announcement: null
6296
6363
  });
6297
6364
  let m = r;
@@ -6338,7 +6405,7 @@ try {
6338
6405
  });
6339
6406
  } catch {
6340
6407
  }
6341
- const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-helper-text", Oo = ({
6408
+ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-helper-text", Oo = ({
6342
6409
  mode: e
6343
6410
  }) => y({
6344
6411
  "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
@@ -6394,18 +6461,18 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
6394
6461
  return "";
6395
6462
  if (s)
6396
6463
  return y(
6397
- It,
6464
+ Rt,
6398
6465
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
6399
6466
  );
6400
6467
  if (!e)
6401
- return y(It, "absolute px-2 font-medium", {
6468
+ return y(Rt, "absolute px-2 font-medium", {
6402
6469
  "text-copy-lighter": r === "dark",
6403
6470
  "text-copy-dark": r === "light",
6404
6471
  "text-copy-dark dark:text-copy-lighter": r === "system",
6405
6472
  "text-copy-lighter dark:text-copy-dark": r === "alt-system"
6406
6473
  });
6407
6474
  if (e)
6408
- return y(It, "absolute px-2 font-medium", {
6475
+ return y(Rt, "absolute px-2 font-medium", {
6409
6476
  "text-copy-error-light bg-surface-darker": r === "dark",
6410
6477
  "text-copy-error-dark": r === "light",
6411
6478
  "text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
@@ -6476,7 +6543,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
6476
6543
  helperText: g,
6477
6544
  rightElement: b
6478
6545
  };
6479
- }, Yt = oe.forwardRef(
6546
+ }, zt = oe.forwardRef(
6480
6547
  ({
6481
6548
  id: e,
6482
6549
  name: t,
@@ -6498,13 +6565,13 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
6498
6565
  size: E = "md",
6499
6566
  ...O
6500
6567
  }, A) => {
6501
- const [K, R] = Qe(), [Y, C] = ie(0), v = Ms({ id: e, prefix: `${Fs}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
6568
+ const [K, R] = Je(), [z, C] = ie(0), v = Ms({ id: e, prefix: `${Fs}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
6502
6569
  xs: { label: "-25px", helperText: "30px" },
6503
6570
  sm: { label: "-29px", helperText: "34px" },
6504
6571
  md: { label: "-33px", helperText: "38px" },
6505
6572
  lg: { label: "-15px", helperText: "22px" },
6506
6573
  xl: { label: "-19px", helperText: "25px" }
6507
- }, V = xo({
6574
+ }, J = xo({
6508
6575
  className: n,
6509
6576
  inputClassName: i,
6510
6577
  error: s,
@@ -6516,21 +6583,21 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
6516
6583
  size: E,
6517
6584
  rightElementClassName: b
6518
6585
  });
6519
- return ze(() => {
6586
+ return Xe(() => {
6520
6587
  R && R.width && C(R.width + 18 + 10);
6521
- }, [R]), ze(() => {
6522
- const { label: ce, helperText: we } = N[E];
6588
+ }, [R]), Xe(() => {
6589
+ const { label: ce, helperText: Se } = N[E];
6523
6590
  _?.current?.style.setProperty("--av-text-input-label", ce), I?.current?.style.setProperty(
6524
6591
  "--av-text-input-helper-text",
6525
- we
6592
+ Se
6526
6593
  );
6527
- }, [E]), /* @__PURE__ */ q("div", { className: V.wrapper, children: [
6594
+ }, [E]), /* @__PURE__ */ V("div", { className: J.wrapper, children: [
6528
6595
  /* @__PURE__ */ h(
6529
6596
  "label",
6530
6597
  {
6531
6598
  htmlFor: v,
6532
6599
  id: u,
6533
- className: V.accessibleLabel,
6600
+ className: J.accessibleLabel,
6534
6601
  children: r
6535
6602
  }
6536
6603
  ),
@@ -6543,10 +6610,10 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
6543
6610
  type: m,
6544
6611
  disabled: f,
6545
6612
  placeholder: a ? void 0 : " ",
6546
- className: V.input,
6613
+ className: J.input,
6547
6614
  ...p && { "aria-describedby": `${v}-helper` },
6548
6615
  ...s && { "aria-invalid": "true" },
6549
- ...g && !a && { style: { paddingRight: Y } },
6616
+ ...g && !a && { style: { paddingRight: z } },
6550
6617
  ...O
6551
6618
  }
6552
6619
  ),
@@ -6556,7 +6623,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
6556
6623
  ref: _,
6557
6624
  "aria-hidden": !0,
6558
6625
  htmlFor: v,
6559
- className: V.visibleLabel,
6626
+ className: J.visibleLabel,
6560
6627
  children: r
6561
6628
  }
6562
6629
  ),
@@ -6565,7 +6632,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
6565
6632
  {
6566
6633
  ref: I,
6567
6634
  id: `${v}-helper`,
6568
- className: V.helperText,
6635
+ className: J.helperText,
6569
6636
  children: p
6570
6637
  }
6571
6638
  ),
@@ -6573,7 +6640,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
6573
6640
  "div",
6574
6641
  {
6575
6642
  ref: K,
6576
- className: V.rightElement,
6643
+ className: J.rightElement,
6577
6644
  children: g
6578
6645
  }
6579
6646
  ),
@@ -6581,7 +6648,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
6581
6648
  ] });
6582
6649
  }
6583
6650
  );
6584
- Yt.displayName = "TextInput";
6651
+ zt.displayName = "TextInput";
6585
6652
  const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
6586
6653
  ({
6587
6654
  name: e,
@@ -6607,7 +6674,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
6607
6674
  message: `${r} hiding characters`
6608
6675
  }), a && a(!0);
6609
6676
  }, Lo));
6610
- }, Y = (I) => {
6677
+ }, z = (I) => {
6611
6678
  I.preventDefault();
6612
6679
  const N = !b.current;
6613
6680
  b.current = N, R(), m(N), g({
@@ -6627,9 +6694,9 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
6627
6694
  };
6628
6695
  return W(() => () => {
6629
6696
  E.current && clearTimeout(E.current);
6630
- }, []), /* @__PURE__ */ q(Cr, { children: [
6697
+ }, []), /* @__PURE__ */ V(Or, { children: [
6631
6698
  /* @__PURE__ */ h(
6632
- Yt,
6699
+ zt,
6633
6700
  {
6634
6701
  ref: A,
6635
6702
  name: e,
@@ -6643,7 +6710,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
6643
6710
  rightElement: oe.cloneElement(f, {
6644
6711
  ref: u,
6645
6712
  label: K,
6646
- onClick: Y,
6713
+ onClick: z,
6647
6714
  onBlur: C,
6648
6715
  disabled: t
6649
6716
  }),
@@ -6676,9 +6743,9 @@ try {
6676
6743
  });
6677
6744
  } catch {
6678
6745
  }
6679
- const Uo = "ASK! ME! ANYTHING!", Fo = "Log in with a password", Ho = "Log in with a Passkey", ol = "Log out", Ko = "Password", cl = "Usage", ll = "Profile", ul = "Settings", dl = "Chat history", hl = "About", zt = "Type your message here.", fl = zt, ml = `${zt}
6680
- Press Enter to send it or Shift+Enter for new line.`, pl = `${zt}
6681
- Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "Review important details.", gl = [
6746
+ const Uo = "ASK! ME! ANYTHING!", Fo = "Log in with a password", Ho = "Log in with a Passkey", dl = "Log out", Ko = "Password", hl = "Usage", fl = "Profile", ml = "Settings", pl = "Chat history", yl = "About", Xt = "Type your message here.", gl = Xt, bl = `${Xt}
6747
+ Press Enter to send it or Shift+Enter for new line.`, El = `${Xt}
6748
+ Press Ctrl+Enter to send it or Enter for new line.`, wl = "{{clipboard}}", P = "Review important details.", Sl = [
6682
6749
  `Sometimes, ${k} just makes stuff up. ${P}`,
6683
6750
  `${k} may invent facts on the fly. ${P}`,
6684
6751
  `${k} may be confidently wrong. ${P}`,
@@ -6699,17 +6766,17 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6699
6766
  `Sometimes, ${k} howls at the moon. ${P}`,
6700
6767
  `${k} may dig up imaginary bones. ${P}`,
6701
6768
  `${k} may sniff out nonsense. ${P}`
6702
- ], bl = "Prompts are pre-filled menus available on the main screen, to help you quickly start requests. If you select the 'Private 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.", El = "Default provider set to", wl = "Chat successfully deleted!", Sl = "Chat successfully saved!", vl = "Caching enabled. Assets are now stored locally.", Tl = "Caching disabled. Local asset cache cleared.", Al = "av-sassy", Il = {
6769
+ ], vl = "Prompts are pre-filled menus available on the main screen, to help you quickly start requests. If you select the 'Private 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.", Tl = "Default provider set to", Al = "Chat successfully deleted!", Il = "Chat successfully saved!", _l = "Caching enabled. Assets are now stored locally.", Rl = "Caching disabled. Local asset cache cleared.", Cl = "av-sassy", Ol = {
6703
6770
  0: ["January", "February", "March"],
6704
6771
  3: ["April", "May", "June"],
6705
6772
  6: ["July", "August", "September"],
6706
6773
  9: ["October", "November", "December"]
6707
- }, _l = {
6774
+ }, kl = {
6708
6775
  0: ["Jan", "Feb", "Mar"],
6709
6776
  3: ["Apr", "May", "Jun"],
6710
6777
  6: ["Jul", "Aug", "Sep"],
6711
6778
  9: ["Oct", "Nov", "Dec"]
6712
- }, Rl = {
6779
+ }, Nl = {
6713
6780
  PREFERENCES: {
6714
6781
  TITLE: "User profile",
6715
6782
  USERNAME: "Username",
@@ -6762,7 +6829,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6762
6829
  className: e,
6763
6830
  isCapabilitiesSuccess: t,
6764
6831
  capabilities: r
6765
- }) => /* @__PURE__ */ q(
6832
+ }) => /* @__PURE__ */ V(
6766
6833
  "div",
6767
6834
  {
6768
6835
  className: y(
@@ -6771,7 +6838,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6771
6838
  ),
6772
6839
  children: [
6773
6840
  /* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(go, {}) }),
6774
- /* @__PURE__ */ q("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
6841
+ /* @__PURE__ */ V("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
6775
6842
  /* @__PURE__ */ h("h1", { children: k }),
6776
6843
  /* @__PURE__ */ h(
6777
6844
  "h2",
@@ -6786,7 +6853,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6786
6853
  ]
6787
6854
  }
6788
6855
  ), Bo = () => {
6789
- const { login: e, logoutReason: t, loginWithPasskey: r } = os(), [s, a] = ie(""), [n, i] = ie(""), [o, c] = ie(!0), [f, d] = ie({
6856
+ const { login: e, logoutReason: t, loginWithPasskey: r } = cs(), [s, a] = ie(""), [n, i] = ie(""), [o, c] = ie(!0), [f, d] = ie({
6790
6857
  username: "",
6791
6858
  password: ""
6792
6859
  }), u = async (l) => {
@@ -6798,7 +6865,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6798
6865
  }, 500);
6799
6866
  }), W(() => {
6800
6867
  t && i(t);
6801
- }, [t]), /* @__PURE__ */ q("main", { className: Cs({ extraClass: "mt-5" }), children: [
6868
+ }, [t]), /* @__PURE__ */ V("main", { className: Cs({ extraClass: "mt-5" }), children: [
6802
6869
  /* @__PURE__ */ h(
6803
6870
  "div",
6804
6871
  {
@@ -6808,10 +6875,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6808
6875
  children: /* @__PURE__ */ h(Go, {})
6809
6876
  }
6810
6877
  ),
6811
- /* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(vo, { alignHorizontal: "center", children: /* @__PURE__ */ h(he, { span: 6, children: /* @__PURE__ */ q(yo, { mode: "dark", children: [
6812
- /* @__PURE__ */ h(he, { span: 12, className: "mt-7", children: n && /* @__PURE__ */ h("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: n }) }),
6813
- /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6814
- Yt,
6878
+ /* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(vo, { alignHorizontal: "center", children: /* @__PURE__ */ h(ye, { span: 6, children: /* @__PURE__ */ V(yo, { mode: "dark", children: [
6879
+ /* @__PURE__ */ h(ye, { span: 12, className: "mt-7", children: n && /* @__PURE__ */ h("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: n }) }),
6880
+ /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
6881
+ zt,
6815
6882
  {
6816
6883
  className: "mt-7",
6817
6884
  required: !0,
@@ -6831,7 +6898,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6831
6898
  error: s !== ""
6832
6899
  }
6833
6900
  ) }),
6834
- /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6901
+ /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
6835
6902
  Hs,
6836
6903
  {
6837
6904
  className: "mt-7",
@@ -6844,7 +6911,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6844
6911
  name: "password",
6845
6912
  label: Ko,
6846
6913
  rightElement: /* @__PURE__ */ h(
6847
- at,
6914
+ it,
6848
6915
  {
6849
6916
  focusMode: "light",
6850
6917
  mode: "dark",
@@ -6863,7 +6930,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6863
6930
  helperText: s
6864
6931
  }
6865
6932
  ) }),
6866
- /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6933
+ /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
6867
6934
  $s,
6868
6935
  {
6869
6936
  mode: "dark",
@@ -6875,10 +6942,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6875
6942
  children: Fo
6876
6943
  }
6877
6944
  ) }),
6878
- !Os() && /* @__PURE__ */ q(Cr, { children: [
6879
- /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
6880
- /* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
6881
- at,
6945
+ !Os() && /* @__PURE__ */ V(Or, { children: [
6946
+ /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
6947
+ /* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
6948
+ it,
6882
6949
  {
6883
6950
  variant: "selected",
6884
6951
  mode: "dark",
@@ -6893,41 +6960,41 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6893
6960
  ] })
6894
6961
  ] }) }) }) })
6895
6962
  ] });
6896
- }, Wo = new URL(document.location.href).searchParams, _r = !!Wo.get("debug") || !1, qo = Ws(() => import(
6963
+ }, qo = new URL(document.location.href).searchParams, Rr = !!qo.get("debug") || !1, Wo = qs(() => import(
6897
6964
  /* webpackChunkName: "LazyApp" */
6898
- "./App.CcqDGZun.js"
6899
- ).then((e) => e.App)), jo = new fa(), Rr = ({
6965
+ "./App.DsIUXmFA.js"
6966
+ ).then((e) => e.App)), Vo = new fa(), Cr = ({
6900
6967
  isComponent: e,
6901
6968
  headerHeight: t
6902
6969
  }) => {
6903
- const { isAuthenticated: r, isLoading: s, user: a, getAccessToken: n } = os();
6904
- return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(Bs, { fallback: /* @__PURE__ */ h("div", {}), children: /* @__PURE__ */ h(ma, { client: jo, children: /* @__PURE__ */ h(
6970
+ const { isAuthenticated: r, isLoading: s, user: a, getAccessToken: n } = cs();
6971
+ return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(Bs, { fallback: /* @__PURE__ */ h("div", {}), children: /* @__PURE__ */ h(ma, { client: Vo, children: /* @__PURE__ */ h(
6905
6972
  vi,
6906
6973
  {
6907
6974
  user: a?.username,
6908
6975
  getAccessToken: n,
6909
- children: /* @__PURE__ */ h(qo, { isComponent: e, headerHeight: t })
6976
+ children: /* @__PURE__ */ h(Wo, { isComponent: e, headerHeight: t })
6910
6977
  }
6911
6978
  ) }) }) : /* @__PURE__ */ h(Bo, {});
6912
- }, Vo = ({
6979
+ }, jo = ({
6913
6980
  isComponent: e = !1,
6914
6981
  headerHeight: t = 0,
6915
6982
  domain: r = _s
6916
6983
  }) => (W(() => {
6917
- e || us().catch((s) => {
6984
+ e || ds().catch((s) => {
6918
6985
  console.error("[SW] Failed to register service worker:", s);
6919
6986
  });
6920
6987
  }, [e]), jt ? /* @__PURE__ */ h(
6921
- Er,
6988
+ wr,
6922
6989
  {
6923
- clientId: wr,
6990
+ clientId: Sr,
6924
6991
  domain: r,
6925
- debug: _r,
6992
+ debug: Rr,
6926
6993
  endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
6927
- children: /* @__PURE__ */ h(Rr, { isComponent: e, headerHeight: t })
6994
+ children: /* @__PURE__ */ h(Cr, { isComponent: e, headerHeight: t })
6928
6995
  }
6929
- ) : /* @__PURE__ */ h(Er, { clientId: wr, domain: r, debug: _r, children: /* @__PURE__ */ h(Rr, { isComponent: e, headerHeight: t }) })), Cl = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
6930
- Vo,
6996
+ ) : /* @__PURE__ */ h(wr, { clientId: Sr, domain: r, debug: Rr, children: /* @__PURE__ */ h(Cr, { isComponent: e, headerHeight: t }) })), Pl = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
6997
+ jo,
6931
6998
  {
6932
6999
  isComponent: !0,
6933
7000
  domain: e,
@@ -6935,39 +7002,39 @@ Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "
6935
7002
  }
6936
7003
  );
6937
7004
  export {
6938
- hl as ABOUT_TITLE,
7005
+ yl as ABOUT_TITLE,
6939
7006
  lc as ACTION_RESET_PROMPT,
6940
7007
  ic as ACTION_SEARCH,
6941
7008
  oc as ACTION_SORT,
6942
7009
  cc as ACTION_TOGGLE_PROMPT,
6943
- Al as APP_CLASSNAME,
7010
+ Cl as APP_CLASSNAME,
6944
7011
  Uc as B,
6945
7012
  $s as C,
6946
- Rl as CARDS,
6947
- yl as CLIPBOARD_PROMPT,
7013
+ Nl as CARDS,
7014
+ wl as CLIPBOARD_PROMPT,
6948
7015
  Ac as DEFAULT_ICON_ACTION_SIZE,
6949
7016
  Dc as E,
6950
7017
  nc as ERROR_MESSAGE,
6951
- Vc as Et,
6952
- gl as FOOTER_DISCLAIMERS,
7018
+ jc as Et,
7019
+ Sl as FOOTER_DISCLAIMERS,
6953
7020
  gi as H,
6954
- dl as HISTORY_TITLE,
6955
- ht as I,
7021
+ pl as HISTORY_TITLE,
7022
+ mt as I,
6956
7023
  Sc as INFINITE_SCROLL_LIMIT,
6957
7024
  wc as INFINITE_SCROLL_THRESHOLD,
6958
7025
  Oc as INPUT_BOTTOM_OFFSET,
6959
7026
  Pc as INPUT_BOTTOM_OFFSET_EXTRA,
6960
7027
  Nc as INPUT_BOTTOM_OFFSET_IPAD,
6961
7028
  kc as INPUT_BOTTOM_OFFSET_IPHONE,
6962
- pl as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
6963
- ml as INPUT_PLACEHOLDER_TEXT_ENTER,
6964
- fl as INPUT_PLACEHOLDER_TEXT_MOBILE,
7029
+ El as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
7030
+ bl as INPUT_PLACEHOLDER_TEXT_ENTER,
7031
+ gl as INPUT_PLACEHOLDER_TEXT_MOBILE,
6965
7032
  Gc as J,
6966
7033
  Hc as K,
6967
7034
  vo as L,
6968
7035
  Ec as LOCAL_STORAGE_CHAT_ID,
6969
7036
  yc as LOCAL_STORAGE_FAVORITES_ONLY,
6970
- cs as LOCAL_STORAGE_PREFIX,
7037
+ ls as LOCAL_STORAGE_PREFIX,
6971
7038
  gc as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
6972
7039
  bc as LOCAL_STORAGE_REASONING_DISCLOSURE,
6973
7040
  uc as LOCAL_STORAGE_SEARCH,
@@ -6976,85 +7043,90 @@ export {
6976
7043
  mc as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
6977
7044
  hc as LOCAL_STORAGE_SORT_TIMESTAMP,
6978
7045
  fc as LOCAL_STORAGE_SORT_TOKEN_USAGE,
6979
- ol as LOG_OUT,
7046
+ dl as LOG_OUT,
6980
7047
  Go as Logo,
6981
- lt as O,
6982
- ll as PROFILE_TITLE,
6983
- bl as PROMPTS_DESCRIPTION,
7048
+ dt as O,
7049
+ fl as PROFILE_TITLE,
7050
+ vl as PROMPTS_DESCRIPTION,
6984
7051
  vc as PROMPT_CLASSNAME,
6985
7052
  Tc as PROMPT_EDITABLE_AREA_CLASSNAME,
6986
7053
  k as Q,
6987
7054
  yo as S,
6988
- J as SERVICE_TYPES,
6989
- ul as SETTINGS_TITLE,
6990
- Cl as SassySaint,
6991
- Tl as TOAST_CACHE_DISABLED,
6992
- vl as TOAST_CACHE_ENABLED,
6993
- wl as TOAST_CHAT_DELETED,
6994
- Sl as TOAST_CHAT_SAVED,
6995
- El as TOAST_PROVIDER_CHANGED,
6996
- Il as TRIMESTERS,
6997
- _l as TRIMESTERS_SHORT,
7055
+ B as SERVICE_TYPES,
7056
+ ml as SETTINGS_TITLE,
7057
+ Pl as SassySaint,
7058
+ Rl as TOAST_CACHE_DISABLED,
7059
+ _l as TOAST_CACHE_ENABLED,
7060
+ Al as TOAST_CHAT_DELETED,
7061
+ Il as TOAST_CHAT_SAVED,
7062
+ Tl as TOAST_PROVIDER_CHANGED,
7063
+ Ol as TRIMESTERS,
7064
+ kl as TRIMESTERS_SHORT,
6998
7065
  _c as UI_BUTTON_SCROLL_BUFFER,
6999
7066
  Rc as UI_DEFAULT_MAIN_HEIGHT,
7000
7067
  Cc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
7001
7068
  Ic as UI_FOOTER_BUFFER,
7002
- cl as USAGE_TITLE,
7069
+ hl as USAGE_TITLE,
7003
7070
  Lc as Y,
7004
- Yt as Y$1,
7071
+ zt as Y$1,
7005
7072
  Kc as Z,
7006
7073
  fo as b,
7007
- ut as c,
7074
+ ht as c,
7008
7075
  Qi as canEvaluateModels,
7009
- ji as convertCamelCaseToReadable,
7076
+ Vi as convertCamelCaseToReadable,
7010
7077
  Gi as debounce,
7011
7078
  Mc as e,
7012
- jc as et,
7079
+ Vc as et,
7013
7080
  xc as getCacheInfo,
7014
7081
  $i as getCurrentGeoLocation,
7015
7082
  Cs as getLayoutPaddingClass,
7016
7083
  Rs as getMessageContaintWrapperClass,
7017
- Qe as h,
7084
+ me as graphQLRequest,
7085
+ Je as h,
7018
7086
  $c as handleServiceWorkerToggle,
7019
7087
  Ms as i,
7020
7088
  jt as isDev,
7021
- qi as isPWAMode,
7089
+ Wi as isPWAMode,
7022
7090
  ks as isProbablyMobile,
7023
- Wi as isProbablyiPad,
7091
+ qi as isProbablyiPad,
7024
7092
  Bi as isProbablyiPhone,
7025
- xt as isServiceWorkerEnabled,
7093
+ Dt as isServiceWorkerEnabled,
7026
7094
  Os as isTauri,
7027
- Pe as it,
7028
- he as j,
7095
+ xe as it,
7096
+ ye as j,
7029
7097
  Eo as l,
7030
- Ts as mutateCall,
7031
- os as n,
7098
+ cs as n,
7032
7099
  Bc as nt,
7033
7100
  Fi as numberFormatter,
7034
7101
  xs as o,
7035
7102
  xi as obfuscate,
7036
- Wc as ot,
7103
+ qc as ot,
7037
7104
  Ki as pluralize,
7038
- Fe as r,
7105
+ He as r,
7039
7106
  Di as renderDataAsList,
7040
7107
  wi as serverUrl,
7041
7108
  Qc as setNewProvider,
7042
7109
  Jc as setUserPlan,
7043
- qc as st,
7044
- at as te,
7110
+ Wc as st,
7111
+ it as te,
7045
7112
  Mi as unObfuscate,
7046
7113
  zc as useChangelogs,
7114
+ el as useChat,
7047
7115
  Zc as useChatsHistory,
7048
- el as useChatsUsage,
7049
- al as useDeleteAllMemories,
7050
- sl as useDeleteMemory,
7051
- nl as useEntitlements,
7116
+ al as useChatsUsage,
7117
+ cl as useDeleteAllMemories,
7118
+ rl as useDeleteChat,
7119
+ ol as useDeleteMemory,
7120
+ ll as useEntitlements,
7121
+ he as useQueryClient,
7122
+ tl as useSaveChat,
7052
7123
  Yc as useServerCapabilities,
7053
- rl as useUpdateMemory,
7124
+ sl as useToggleFavoriteChat,
7125
+ il as useUpdateMemory,
7054
7126
  Xc as useUserChatStats,
7055
- tl as useUserMemories,
7127
+ nl as useUserMemories,
7056
7128
  Si as useUserPreferences,
7057
- il as utilities,
7129
+ ul as utilities,
7058
7130
  Fc as x,
7059
7131
  Us as x$1
7060
7132
  };