@versini/sassysaint 8.111.4 → 8.112.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AboutChangelog.C99ZrqKf.js → AboutChangelog.Dayt987X.js} +2 -2
- package/dist/chunks/AboutEntry.C7nQnTaR.js +81 -0
- package/dist/chunks/{App.D7kYRe3a.js → App.1qxTcHhE.js} +1176 -1175
- package/dist/chunks/{Bubble.MXxGhdx0.js → Bubble.Bw-2eGqM.js} +1 -1
- package/dist/chunks/{ButtonIconDelete.Ca_-Z3g5.js → ButtonIconDelete.DZW_2G6c.js} +2 -2
- package/dist/chunks/{Chart.BmxHbT7B.js → Chart.Cx6km9TU.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.BjZa9CVT.js → ChatBubbleAssistant.BNu2Y1zq.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.BvDGQWGU.js → ChatBubbleUser.pPCI3WL0.js} +3 -3
- package/dist/chunks/ChatHistoryTable.DaVUivHo.js +234 -0
- package/dist/chunks/{HistoryEntry.m8eQcBA5.js → HistoryEntry.C3bboYln.js} +6 -6
- package/dist/chunks/{LoginEntry.BZ0MKlEZ.js → LoginEntry.Bn-GsVAB.js} +4 -4
- package/dist/chunks/{LogoEntry.VAaujt4V.js → LogoEntry.DReNqiYv.js} +717 -676
- package/dist/chunks/{MemoriesEntry.Dp9urYHa.js → MemoriesEntry.CAg5AW5F.js} +5 -5
- package/dist/chunks/{ProfileEntry.8-BhqMWc.js → ProfileEntry.COWhUBbO.js} +4 -4
- package/dist/chunks/{SettingsEntry.BfQY7V1X.js → SettingsEntry.e4vl4zRK.js} +5 -5
- package/dist/chunks/{UsageEntry.CzN_8YVL.js → UsageEntry.CnnazYSh.js} +5 -5
- package/dist/chunks/{_baseUniq.rh3h2tHg.js → _baseUniq.CNUFz9Ie.js} +1 -1
- package/dist/chunks/{arc.BKxb_yu5.js → arc.Bxl15E2D.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.B36n-DM7.js → architecture-U656AL7Q.DzlHQE5F.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.D3-Qxo-7.js → architectureDiagram-VXUJARFQ.DQBLcSlJ.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.Mp-Xb22B.js → blockDiagram-VD42YOAC.BSHnyqv8.js} +5 -5
- package/dist/chunks/{browser.DjQN4eNb.js → browser.ykQdyxYi.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.C9ltkFOr.js → c4Diagram-YG6GDRKO.Zzum1FZK.js} +2 -2
- package/dist/chunks/{channel.Bo0ytD01.js → channel._2RWo0R_.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.aYwLZcak.js → chunk-4BX2VUAB.C-pLiL50.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.5GYTuunv.js → chunk-55IACEB6.fMp9ubf_.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.0yBrgVYm.js → chunk-B4BG7PRW.BNmIeVTV.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.CTqvgAEF.js → chunk-DI55MBZ5.uDz3flQ8.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.DaPPU-p7.js → chunk-FMBD7UC4.Diy7mBue.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.By3k-QDP.js → chunk-QN33PNHL.ryixtm2U.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.DObI7QtE.js → chunk-QZHKN3VN.C7w_fpJx.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.DFJLOpRz.js → chunk-TZMSLE5B.BofTElRx.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.CiC1TMro.js → classDiagram-2ON5EDUG.Bcl4iHVO.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.CiC1TMro.js → classDiagram-v2-WZHVMYZB.Bcl4iHVO.js} +2 -2
- package/dist/chunks/{clone.snnq5L3s.js → clone.CXzi7x3n.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.CDA47A7Q.js → cose-bilkent-S5V4N54A.DAjW96yL.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.BQluIDmg.js → dagre-6UL2VRFP.CRpUm0Nd.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.Zu7EeNCT.js → diagram-PSM6KHXK.D8PLOyb_.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.C35h0Q1S.js → diagram-QEK2KX5R.DwNvsJ_b.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.DeIusNHA.js → diagram-S2PKOQOG.DyCzcwzE.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.uQxkucxo.js → erDiagram-Q2GNP2WA.BlUI5_4z.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.BqkLb-Cs.js → flowDiagram-NV44I4VS.Bfreb6t8.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.DxEo8Kjd.js → ganttDiagram-JELNMOA3.ib1rXCQk.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.Dco6xaH4.js → gitGraph-F6HP7TQM.CxufJdwn.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.Wnzx_yR3.js → gitGraphDiagram-NY62KEGX.BZt4MXEW.js} +4 -4
- package/dist/chunks/{graph.BWteyPdy.js → graph.hvB27c9D.js} +2 -2
- package/dist/chunks/{index.2IQnxrOb.js → index.92htXG5J.js} +1 -1
- package/dist/chunks/{index.D8xiBI-7.js → index.BB4J2Qi1.js} +1 -1
- package/dist/chunks/{index.fanc5b7k.js → index.BVCLFEiI.js} +1 -1
- package/dist/chunks/{index.DlSb-eu-.js → index.BXReSy4c.js} +637 -618
- package/dist/chunks/{index.BRLCj5yF.js → index.CmdM8OhV.js} +3 -3
- package/dist/chunks/index.DR0-P5h3.js +67 -0
- package/dist/chunks/{index.Byuy4Q49.js → index.DS1kY_8b.js} +1 -1
- package/dist/chunks/{index.CNqIVM7Q.js → index.Hd2XXux1.js} +3 -3
- package/dist/chunks/{index.uWhcsflb.js → index.IpQNrFt6.js} +1 -1
- package/dist/chunks/{index.CZrGRJVJ.js → index.TLbAcxWR.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.BEKQeHwA.js → info-NVLQJR56.B1fpEaU0.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.Dxbn3Ozt.js → infoDiagram-WHAUD3N6.Bq2JnNoD.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.BD7YwSgA.js → journeyDiagram-XKPGCS4Q.iqGtFhp_.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.CK8JRptb.js → kanban-definition-3W4ZIXB7.JMlNoVIk.js} +2 -2
- package/dist/chunks/{layout.CJKebkKn.js → layout.CP2AqVdG.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.CSYrCldG.js → mermaid-parser.core.Bi2yoxZq.js} +10 -10
- package/dist/chunks/{min.CQHAdIy9.js → min.C11Gc2EF.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.DM5DeM0F.js → mindmap-definition-VGOIOE7T.Cd1AilWi.js} +4 -4
- package/dist/chunks/{packet-BFZMPI3H.DEd3gHu2.js → packet-BFZMPI3H.fS8hEXjX.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.B6CjUa98.js → pie-7BOR55EZ.Ds7KQGmJ.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.Ch8Q0rB9.js → pieDiagram-ADFJNKIX.C1aHiwho.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.C0GD2d0M.js → quadrantDiagram-AYHSOK5B.1yLMviWL.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.D4DSygig.js → radar-NHE76QYJ.B9AoWAwO.js} +1 -1
- package/dist/chunks/{rehype-mermaid.cahUaoTc.js → rehype-mermaid.CTTnjcVn.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.VgYSoiVA.js → requirementDiagram-UZGBJVZJ.2S8yiwhm.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.BxpPU8Mb.js → sankeyDiagram-TZEHDZUN.DpCJXyYB.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.DaNv2DsB.js → sequenceDiagram-WL72ISMW.GhgH6avH.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.CA2_FEiS.js → stateDiagram-FKZM4ZOC.CcbwpENI.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.D7NqmU3X.js → stateDiagram-v2-4FDKWEC3.BhJWHBo_.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.Cg8zMgPR.js → timeline-definition-IT6M3QCI.eg5mNjCi.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.BVFWHatk.js → treemap-KMMF4GRG.Bn78avOP.js} +1 -1
- package/dist/chunks/{useMarkdown.Dupv6NhF.js → useMarkdown.js2o9U64.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.D_CVF5rq.js → xychartDiagram-PRI3JC2R.DuYEc52x.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
- package/dist/chunks/AboutEntry.YWAyYLjf.js +0 -77
- package/dist/chunks/ChatHistoryTable.gOA0wCai.js +0 -292
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsx as S, jsxs as
|
|
1
|
+
import { jsx as S, jsxs as ss } from "react/jsx-runtime";
|
|
2
2
|
import * as D from "react";
|
|
3
|
-
import
|
|
3
|
+
import ns, { createContext as pt, useReducer as as, useCallback as G, useRef as is, useEffect as re, useSyncExternalStore as os, useContext as yt, useState as rr, useMemo as It, Suspense as _t, lazy as sr } from "react";
|
|
4
4
|
import De from "clsx";
|
|
5
|
-
let
|
|
5
|
+
let Za = "standard";
|
|
6
6
|
var g, T = ((g = {})[g.NewChat = 0] = "NewChat", g[g.Prompts = 1] = "Prompts", g[g.Attachment = 2] = "Attachment", g[g.PrivateChat = 3] = "PrivateChat", g[g.Reasoning = 4] = "Reasoning", g[g.Send = 5] = "Send", g[g.Header = 6] = "Header", g[g.Provider = 7] = "Provider", g[g.Logo = 8] = "Logo", g[g.Placeholder = 9] = "Placeholder", g[g.Footer = 10] = "Footer", g);
|
|
7
|
-
let
|
|
7
|
+
let ei = "user", ti = "assistant", qe = "OpenAI", mt = "Anthropic", Et = "Google", cs = "Perplexity", ri = qe, us = [qe, mt, Et], nr = "gpt-5.2", ar = "gpt-5-mini", ir = "gpt-5-nano", or = "gpt-4.1-nano", cr = "claude-haiku-4-5", ur = "claude-sonnet-4-5", lr = "gemini-3-flash-preview", dr = "gemini-3-pro-preview", hr = "sonar", fr = "sonar-pro", si = { [nr]: "GPT-5.2", [ar]: "GPT-5 Mini", [ir]: "GPT-5 Nano", [or]: "GPT-4.1 Nano", [cr]: "Claude Haiku 4.5", [ur]: "Claude Sonnet 4.5", [lr]: "Gemini 3 Flash", [dr]: "Gemini 3 Pro", [hr]: "Sonar", [fr]: "Sonar Pro" }, pr = { [qe]: [or, nr, ar, ir], [mt]: [cr, ur], [Et]: [lr, dr], [cs]: [hr, fr] }, ni = "x-diggidy-chat-id", ai = "timestamp", ii = "tokenUsage", oi = "Diggidy", ci = { TOOL: { MEMORIES: "getUserMemories" }, ADDON: { ATTACHMENTS: "addon:attachments", REASONING: "addon:reasoning" } }, ui = (e) => {
|
|
8
8
|
if (!e || e.length === 0) return [];
|
|
9
9
|
let t = /* @__PURE__ */ new Set();
|
|
10
|
-
for (let r of e) for (let [s, n] of Object.entries(
|
|
11
|
-
return
|
|
12
|
-
},
|
|
10
|
+
for (let r of e) for (let [s, n] of Object.entries(pr)) n.includes(r) && (s === qe || s === mt || s === Et) && t.add(s);
|
|
11
|
+
return us.filter((r) => t.has(r));
|
|
12
|
+
}, ls = (e) => {
|
|
13
13
|
let t = /* @__PURE__ */ new Map();
|
|
14
14
|
if (!e || e.length === 0) return t;
|
|
15
|
-
for (let r of e) for (let [s, n] of Object.entries(
|
|
15
|
+
for (let r of e) for (let [s, n] of Object.entries(pr)) if (n.includes(r)) {
|
|
16
16
|
t.has(s) || t.set(s, []), t.get(s)?.push(r);
|
|
17
17
|
break;
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
|
-
},
|
|
21
|
-
for (let t of
|
|
20
|
+
}, li = (e) => {
|
|
21
|
+
for (let t of ls(e).values()) if (t.length > 1) return !0;
|
|
22
22
|
return !1;
|
|
23
|
-
},
|
|
24
|
-
function
|
|
23
|
+
}, di = (e, t) => !!e && !!t && t.length !== 0 && t.includes(e);
|
|
24
|
+
function ds(e, t, r) {
|
|
25
25
|
if (!t || Array.isArray(t) && t.length === 0) return !0;
|
|
26
26
|
let s = e instanceof Set ? e : e ? new Set(e) : null;
|
|
27
27
|
return !!s && s.size !== 0 && (typeof t == "string" ? s.has(t) : r?.any === !0 ? t.some((n) => s.has(n)) : t.every((n) => s.has(n)));
|
|
28
28
|
}
|
|
29
|
-
var
|
|
30
|
-
const
|
|
29
|
+
var hi = "subtle";
|
|
30
|
+
const hs = {
|
|
31
31
|
[T.NewChat]: "fill-[#7A9BC4]",
|
|
32
32
|
[T.Prompts]: "fill-[#B8A4D5]",
|
|
33
33
|
[T.Attachment]: "fill-[#D4B896]",
|
|
@@ -37,7 +37,7 @@ const ds = {
|
|
|
37
37
|
[T.Header]: "text-copy-medium",
|
|
38
38
|
[T.Provider]: "fill-copy-medium",
|
|
39
39
|
[T.Placeholder]: "placeholder:text-copy-medium/70"
|
|
40
|
-
},
|
|
40
|
+
}, fs = {
|
|
41
41
|
[T.NewChat]: "fill-[#91BBED] dark:fill-[#7A9BC4]",
|
|
42
42
|
[T.Prompts]: "fill-[#B89FDC] dark:fill-[#B8A4D5]",
|
|
43
43
|
[T.Attachment]: "fill-[#D7B286] dark:fill-[#D4B896]",
|
|
@@ -65,7 +65,7 @@ var we = class {
|
|
|
65
65
|
}
|
|
66
66
|
onUnsubscribe() {
|
|
67
67
|
}
|
|
68
|
-
},
|
|
68
|
+
}, ps = {
|
|
69
69
|
// We need the wrapper function syntax below instead of direct references to
|
|
70
70
|
// global setTimeout etc.
|
|
71
71
|
//
|
|
@@ -80,14 +80,14 @@ var we = class {
|
|
|
80
80
|
clearTimeout: (e) => clearTimeout(e),
|
|
81
81
|
setInterval: (e, t) => setInterval(e, t),
|
|
82
82
|
clearInterval: (e) => clearInterval(e)
|
|
83
|
-
},
|
|
83
|
+
}, ys = class {
|
|
84
84
|
// We cannot have TimeoutManager<T> as we must instantiate it with a concrete
|
|
85
85
|
// type at app boot; and if we leave that type, then any new timer provider
|
|
86
86
|
// would need to support ReturnType<typeof setTimeout>, which is infeasible.
|
|
87
87
|
//
|
|
88
88
|
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
89
89
|
// this class is unsafe internally to allow for extension.
|
|
90
|
-
#e =
|
|
90
|
+
#e = ps;
|
|
91
91
|
#t = !1;
|
|
92
92
|
setTimeoutProvider(e) {
|
|
93
93
|
process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error(
|
|
@@ -107,29 +107,29 @@ var we = class {
|
|
|
107
107
|
clearInterval(e) {
|
|
108
108
|
this.#e.clearInterval(e);
|
|
109
109
|
}
|
|
110
|
-
}, ae = new
|
|
111
|
-
function
|
|
110
|
+
}, ae = new ys();
|
|
111
|
+
function ms(e) {
|
|
112
112
|
setTimeout(e, 0);
|
|
113
113
|
}
|
|
114
114
|
var ie = typeof window > "u" || "Deno" in globalThis;
|
|
115
115
|
function U() {
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Es(e, t) {
|
|
118
118
|
return typeof e == "function" ? e(t) : e;
|
|
119
119
|
}
|
|
120
120
|
function nt(e) {
|
|
121
121
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function yr(e, t) {
|
|
124
124
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function se(e, t) {
|
|
127
127
|
return typeof e == "function" ? e(t) : e;
|
|
128
128
|
}
|
|
129
129
|
function K(e, t) {
|
|
130
130
|
return typeof e == "function" ? e(t) : e;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Ot(e, t) {
|
|
133
133
|
const {
|
|
134
134
|
type: r = "all",
|
|
135
135
|
exact: s,
|
|
@@ -140,7 +140,7 @@ function _t(e, t) {
|
|
|
140
140
|
} = e;
|
|
141
141
|
if (i) {
|
|
142
142
|
if (s) {
|
|
143
|
-
if (t.queryHash !==
|
|
143
|
+
if (t.queryHash !== gt(i, t.options))
|
|
144
144
|
return !1;
|
|
145
145
|
} else if (!be(t.queryKey, i))
|
|
146
146
|
return !1;
|
|
@@ -152,7 +152,7 @@ function _t(e, t) {
|
|
|
152
152
|
}
|
|
153
153
|
return !(typeof o == "boolean" && t.isStale() !== o || n && n !== t.state.fetchStatus || a && !a(t));
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ct(e, t) {
|
|
156
156
|
const { exact: r, status: s, predicate: n, mutationKey: a } = e;
|
|
157
157
|
if (a) {
|
|
158
158
|
if (!t.options.mutationKey)
|
|
@@ -165,7 +165,7 @@ function Ot(e, t) {
|
|
|
165
165
|
}
|
|
166
166
|
return !(s && t.state.status !== s || n && !n(t));
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function gt(e, t) {
|
|
169
169
|
return (t?.queryKeyHashFn || oe)(e);
|
|
170
170
|
}
|
|
171
171
|
function oe(e) {
|
|
@@ -177,18 +177,18 @@ function oe(e) {
|
|
|
177
177
|
function be(e, t) {
|
|
178
178
|
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((r) => be(e[r], t[r])) : !1;
|
|
179
179
|
}
|
|
180
|
-
var
|
|
180
|
+
var gs = Object.prototype.hasOwnProperty;
|
|
181
181
|
function at(e, t) {
|
|
182
182
|
if (e === t)
|
|
183
183
|
return e;
|
|
184
|
-
const r =
|
|
184
|
+
const r = Pt(e) && Pt(t);
|
|
185
185
|
if (!r && !(it(e) && it(t))) return t;
|
|
186
186
|
const n = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), i = a.length, o = r ? new Array(i) : {};
|
|
187
187
|
let c = 0;
|
|
188
188
|
for (let h = 0; h < i; h++) {
|
|
189
189
|
const u = r ? h : a[h], d = e[u], l = t[u];
|
|
190
190
|
if (d === l) {
|
|
191
|
-
o[u] = d, (r ? h < n :
|
|
191
|
+
o[u] = d, (r ? h < n : gs.call(e, u)) && c++;
|
|
192
192
|
continue;
|
|
193
193
|
}
|
|
194
194
|
if (d === null || l === null || typeof d != "object" || typeof l != "object") {
|
|
@@ -208,22 +208,22 @@ function Ne(e, t) {
|
|
|
208
208
|
return !1;
|
|
209
209
|
return !0;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function Pt(e) {
|
|
212
212
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
213
213
|
}
|
|
214
214
|
function it(e) {
|
|
215
|
-
if (!
|
|
215
|
+
if (!kt(e))
|
|
216
216
|
return !1;
|
|
217
217
|
const t = e.constructor;
|
|
218
218
|
if (t === void 0)
|
|
219
219
|
return !0;
|
|
220
220
|
const r = t.prototype;
|
|
221
|
-
return !(!
|
|
221
|
+
return !(!kt(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function kt(e) {
|
|
224
224
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Ss(e) {
|
|
227
227
|
return new Promise((t) => {
|
|
228
228
|
ae.setTimeout(t, e);
|
|
229
229
|
});
|
|
@@ -244,24 +244,24 @@ function ot(e, t, r) {
|
|
|
244
244
|
}
|
|
245
245
|
return t;
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function ws(e, t, r = 0) {
|
|
248
248
|
const s = [...e, t];
|
|
249
249
|
return r && s.length > r ? s.slice(1) : s;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Ts(e, t, r = 0) {
|
|
252
252
|
const s = [t, ...e];
|
|
253
253
|
return r && s.length > r ? s.slice(0, -1) : s;
|
|
254
254
|
}
|
|
255
255
|
var Ue = /* @__PURE__ */ Symbol();
|
|
256
|
-
function
|
|
256
|
+
function mr(e, t) {
|
|
257
257
|
return process.env.NODE_ENV !== "production" && e.queryFn === Ue && console.error(
|
|
258
258
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
|
|
259
259
|
), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === Ue ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Er(e, t) {
|
|
262
262
|
return typeof e == "function" ? e(...t) : !!e;
|
|
263
263
|
}
|
|
264
|
-
var
|
|
264
|
+
var vs = class extends we {
|
|
265
265
|
#e;
|
|
266
266
|
#t;
|
|
267
267
|
#r;
|
|
@@ -298,7 +298,7 @@ var Ts = class extends we {
|
|
|
298
298
|
isFocused() {
|
|
299
299
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
300
300
|
}
|
|
301
|
-
},
|
|
301
|
+
}, St = new vs();
|
|
302
302
|
function ct() {
|
|
303
303
|
let e, t;
|
|
304
304
|
const r = new Promise((n, a) => {
|
|
@@ -321,13 +321,13 @@ function ct() {
|
|
|
321
321
|
}), t(n);
|
|
322
322
|
}, r;
|
|
323
323
|
}
|
|
324
|
-
var
|
|
325
|
-
function
|
|
324
|
+
var As = ms;
|
|
325
|
+
function Rs() {
|
|
326
326
|
let e = [], t = 0, r = (o) => {
|
|
327
327
|
o();
|
|
328
328
|
}, s = (o) => {
|
|
329
329
|
o();
|
|
330
|
-
}, n =
|
|
330
|
+
}, n = As;
|
|
331
331
|
const a = (o) => {
|
|
332
332
|
t ? e.push(o) : n(() => {
|
|
333
333
|
r(o);
|
|
@@ -381,7 +381,7 @@ function As() {
|
|
|
381
381
|
}
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
|
-
var v =
|
|
384
|
+
var v = Rs(), bs = class extends we {
|
|
385
385
|
#e = !0;
|
|
386
386
|
#t;
|
|
387
387
|
#r;
|
|
@@ -412,11 +412,11 @@ var v = As(), Rs = class extends we {
|
|
|
412
412
|
isOnline() {
|
|
413
413
|
return this.#e;
|
|
414
414
|
}
|
|
415
|
-
}, Le = new
|
|
416
|
-
function
|
|
415
|
+
}, Le = new bs();
|
|
416
|
+
function Is(e) {
|
|
417
417
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function gr(e) {
|
|
420
420
|
return (e ?? "online") === "online" ? Le.isOnline() : !0;
|
|
421
421
|
}
|
|
422
422
|
var ut = class extends Error {
|
|
@@ -424,7 +424,7 @@ var ut = class extends Error {
|
|
|
424
424
|
super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
|
-
function
|
|
427
|
+
function Sr(e) {
|
|
428
428
|
let t = !1, r = 0, s;
|
|
429
429
|
const n = ct(), a = () => n.status !== "pending", i = (y) => {
|
|
430
430
|
if (!a()) {
|
|
@@ -435,7 +435,7 @@ function Er(e) {
|
|
|
435
435
|
t = !0;
|
|
436
436
|
}, c = () => {
|
|
437
437
|
t = !1;
|
|
438
|
-
}, h = () =>
|
|
438
|
+
}, h = () => St.isFocused() && (e.networkMode === "always" || Le.isOnline()) && e.canRun(), u = () => gr(e.networkMode) && e.canRun(), d = (y) => {
|
|
439
439
|
a() || (s?.(), n.resolve(y));
|
|
440
440
|
}, l = (y) => {
|
|
441
441
|
a() || (s?.(), n.reject(y));
|
|
@@ -458,12 +458,12 @@ function Er(e) {
|
|
|
458
458
|
Promise.resolve(y).then(d).catch((b) => {
|
|
459
459
|
if (a())
|
|
460
460
|
return;
|
|
461
|
-
const L = e.retry ?? (ie ? 0 : 3), H = e.retryDelay ??
|
|
462
|
-
if (t || !
|
|
461
|
+
const L = e.retry ?? (ie ? 0 : 3), H = e.retryDelay ?? Is, x = typeof H == "function" ? H(r, b) : H, q = L === !0 || typeof L == "number" && r < L || typeof L == "function" && L(r, b);
|
|
462
|
+
if (t || !q) {
|
|
463
463
|
l(b);
|
|
464
464
|
return;
|
|
465
465
|
}
|
|
466
|
-
r++, e.onFail?.(r, b),
|
|
466
|
+
r++, e.onFail?.(r, b), Ss(x).then(() => h() ? void 0 : p()).then(() => {
|
|
467
467
|
t ? l(b) : f();
|
|
468
468
|
});
|
|
469
469
|
});
|
|
@@ -479,7 +479,7 @@ function Er(e) {
|
|
|
479
479
|
start: () => (u() ? f() : p().then(f), n)
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
|
-
var
|
|
482
|
+
var wr = class {
|
|
483
483
|
#e;
|
|
484
484
|
destroy() {
|
|
485
485
|
this.clearGcTimeout();
|
|
@@ -498,7 +498,7 @@ var gr = class {
|
|
|
498
498
|
clearGcTimeout() {
|
|
499
499
|
this.#e && (ae.clearTimeout(this.#e), this.#e = void 0);
|
|
500
500
|
}
|
|
501
|
-
},
|
|
501
|
+
}, _s = class extends wr {
|
|
502
502
|
#e;
|
|
503
503
|
#t;
|
|
504
504
|
#r;
|
|
@@ -507,7 +507,7 @@ var gr = class {
|
|
|
507
507
|
#i;
|
|
508
508
|
#o;
|
|
509
509
|
constructor(e) {
|
|
510
|
-
super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#n = e.client, this.#r = this.#n.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e =
|
|
510
|
+
super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#n = e.client, this.#r = this.#n.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = $t(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
|
|
511
511
|
}
|
|
512
512
|
get meta() {
|
|
513
513
|
return this.options.meta;
|
|
@@ -517,9 +517,9 @@ var gr = class {
|
|
|
517
517
|
}
|
|
518
518
|
setOptions(e) {
|
|
519
519
|
if (this.options = { ...this.#i, ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
|
|
520
|
-
const t =
|
|
520
|
+
const t = $t(this.options);
|
|
521
521
|
t.data !== void 0 && (this.setState(
|
|
522
|
-
|
|
522
|
+
Mt(t.data, t.dataUpdatedAt)
|
|
523
523
|
), this.#e = t);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
@@ -558,7 +558,7 @@ var gr = class {
|
|
|
558
558
|
}
|
|
559
559
|
isStatic() {
|
|
560
560
|
return this.getObserversCount() > 0 ? this.observers.some(
|
|
561
|
-
(e) =>
|
|
561
|
+
(e) => se(e.options.staleTime, this) === "static"
|
|
562
562
|
) : !1;
|
|
563
563
|
}
|
|
564
564
|
isStale() {
|
|
@@ -567,7 +567,7 @@ var gr = class {
|
|
|
567
567
|
) : this.state.data === void 0 || this.state.isInvalidated;
|
|
568
568
|
}
|
|
569
569
|
isStaleByTime(e = 0) {
|
|
570
|
-
return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !
|
|
570
|
+
return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !yr(this.state.dataUpdatedAt, e);
|
|
571
571
|
}
|
|
572
572
|
onFocus() {
|
|
573
573
|
this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#s?.continue();
|
|
@@ -610,7 +610,7 @@ var gr = class {
|
|
|
610
610
|
get: () => (this.#o = !0, r.signal)
|
|
611
611
|
});
|
|
612
612
|
}, n = () => {
|
|
613
|
-
const o =
|
|
613
|
+
const o = mr(this.options, t), h = (() => {
|
|
614
614
|
const u = {
|
|
615
615
|
client: this.#n,
|
|
616
616
|
queryKey: this.queryKey,
|
|
@@ -634,7 +634,7 @@ var gr = class {
|
|
|
634
634
|
};
|
|
635
635
|
return s(o), o;
|
|
636
636
|
})();
|
|
637
|
-
this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#a({ type: "fetch", meta: i.fetchOptions?.meta }), this.#s =
|
|
637
|
+
this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#a({ type: "fetch", meta: i.fetchOptions?.meta }), this.#s = Sr({
|
|
638
638
|
initialPromise: t?.initialPromise,
|
|
639
639
|
fn: i.fetchFn,
|
|
640
640
|
onCancel: (o) => {
|
|
@@ -715,13 +715,13 @@ var gr = class {
|
|
|
715
715
|
case "fetch":
|
|
716
716
|
return {
|
|
717
717
|
...r,
|
|
718
|
-
...
|
|
718
|
+
...Tr(r.data, this.options),
|
|
719
719
|
fetchMeta: e.meta ?? null
|
|
720
720
|
};
|
|
721
721
|
case "success":
|
|
722
722
|
const s = {
|
|
723
723
|
...r,
|
|
724
|
-
...
|
|
724
|
+
...Mt(e.data, e.dataUpdatedAt),
|
|
725
725
|
dataUpdateCount: r.dataUpdateCount + 1,
|
|
726
726
|
...!e.manual && {
|
|
727
727
|
fetchStatus: "idle",
|
|
@@ -761,18 +761,18 @@ var gr = class {
|
|
|
761
761
|
});
|
|
762
762
|
}
|
|
763
763
|
};
|
|
764
|
-
function
|
|
764
|
+
function Tr(e, t) {
|
|
765
765
|
return {
|
|
766
766
|
fetchFailureCount: 0,
|
|
767
767
|
fetchFailureReason: null,
|
|
768
|
-
fetchStatus:
|
|
768
|
+
fetchStatus: gr(t.networkMode) ? "fetching" : "paused",
|
|
769
769
|
...e === void 0 && {
|
|
770
770
|
error: null,
|
|
771
771
|
status: "pending"
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function Mt(e, t) {
|
|
776
776
|
return {
|
|
777
777
|
data: e,
|
|
778
778
|
dataUpdatedAt: t ?? Date.now(),
|
|
@@ -781,7 +781,7 @@ function kt(e, t) {
|
|
|
781
781
|
status: "success"
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function $t(e) {
|
|
785
785
|
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;
|
|
786
786
|
return {
|
|
787
787
|
data: t,
|
|
@@ -798,7 +798,7 @@ function Mt(e) {
|
|
|
798
798
|
fetchStatus: "idle"
|
|
799
799
|
};
|
|
800
800
|
}
|
|
801
|
-
var
|
|
801
|
+
var Os = class extends we {
|
|
802
802
|
constructor(e, t) {
|
|
803
803
|
super(), this.options = t, this.#e = e, this.#a = null, this.#o = ct(), this.bindMethods(), this.setOptions(t);
|
|
804
804
|
}
|
|
@@ -823,7 +823,7 @@ var _s = class extends we {
|
|
|
823
823
|
this.refetch = this.refetch.bind(this);
|
|
824
824
|
}
|
|
825
825
|
onSubscribe() {
|
|
826
|
-
this.listeners.size === 1 && (this.#t.addObserver(this),
|
|
826
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), Dt(this.#t, this.options) ? this.#d() : this.updateResult(), this.#S());
|
|
827
827
|
}
|
|
828
828
|
onUnsubscribe() {
|
|
829
829
|
this.hasListeners() || this.destroy();
|
|
@@ -857,18 +857,18 @@ var _s = class extends we {
|
|
|
857
857
|
observer: this
|
|
858
858
|
});
|
|
859
859
|
const s = this.hasListeners();
|
|
860
|
-
s &&
|
|
860
|
+
s && Nt(
|
|
861
861
|
this.#t,
|
|
862
862
|
r,
|
|
863
863
|
this.options,
|
|
864
864
|
t
|
|
865
|
-
) && this.#d(), this.updateResult(), s && (this.#t !== r || K(this.options.enabled, this.#t) !== K(t.enabled, this.#t) ||
|
|
865
|
+
) && this.#d(), this.updateResult(), s && (this.#t !== r || K(this.options.enabled, this.#t) !== K(t.enabled, this.#t) || se(this.options.staleTime, this.#t) !== se(t.staleTime, this.#t)) && this.#m();
|
|
866
866
|
const n = this.#E();
|
|
867
867
|
s && (this.#t !== r || K(this.options.enabled, this.#t) !== K(t.enabled, this.#t) || n !== this.#c) && this.#g(n);
|
|
868
868
|
}
|
|
869
869
|
getOptimisticResult(e) {
|
|
870
870
|
const t = this.#e.getQueryCache().build(this.#e, e), r = this.createResult(t, e);
|
|
871
|
-
return
|
|
871
|
+
return Ps(this, r) && (this.#n = r, this.#i = this.options, this.#s = this.#t.state), r;
|
|
872
872
|
}
|
|
873
873
|
getCurrentResult() {
|
|
874
874
|
return this.#n;
|
|
@@ -913,13 +913,13 @@ var _s = class extends we {
|
|
|
913
913
|
}
|
|
914
914
|
#m() {
|
|
915
915
|
this.#w();
|
|
916
|
-
const e =
|
|
916
|
+
const e = se(
|
|
917
917
|
this.options.staleTime,
|
|
918
918
|
this.#t
|
|
919
919
|
);
|
|
920
920
|
if (ie || this.#n.isStale || !nt(e))
|
|
921
921
|
return;
|
|
922
|
-
const r =
|
|
922
|
+
const r = yr(this.#n.dataUpdatedAt, e) + 1;
|
|
923
923
|
this.#u = ae.setTimeout(() => {
|
|
924
924
|
this.#n.isStale || this.updateResult();
|
|
925
925
|
}, r);
|
|
@@ -929,7 +929,7 @@ var _s = class extends we {
|
|
|
929
929
|
}
|
|
930
930
|
#g(e) {
|
|
931
931
|
this.#T(), this.#c = e, !(ie || K(this.options.enabled, this.#t) === !1 || !nt(this.#c) || this.#c === 0) && (this.#l = ae.setInterval(() => {
|
|
932
|
-
(this.options.refetchIntervalInBackground ||
|
|
932
|
+
(this.options.refetchIntervalInBackground || St.isFocused()) && this.#d();
|
|
933
933
|
}, this.#c));
|
|
934
934
|
}
|
|
935
935
|
#S() {
|
|
@@ -945,10 +945,10 @@ var _s = class extends we {
|
|
|
945
945
|
const r = this.#t, s = this.options, n = this.#n, a = this.#s, i = this.#i, c = e !== r ? e.state : this.#r, { state: h } = e;
|
|
946
946
|
let u = { ...h }, d = !1, l;
|
|
947
947
|
if (t._optimisticResults) {
|
|
948
|
-
const I = this.hasListeners(), F = !I &&
|
|
948
|
+
const I = this.hasListeners(), F = !I && Dt(e, t), te = I && Nt(e, r, t, s);
|
|
949
949
|
(F || te) && (u = {
|
|
950
950
|
...u,
|
|
951
|
-
...
|
|
951
|
+
...Tr(h.data, e.options)
|
|
952
952
|
}), t._optimisticResults === "isRestoring" && (u.fetchStatus = "idle");
|
|
953
953
|
}
|
|
954
954
|
let { error: p, errorUpdatedAt: f, status: y } = u;
|
|
@@ -975,14 +975,14 @@ var _s = class extends we {
|
|
|
975
975
|
this.#a = I;
|
|
976
976
|
}
|
|
977
977
|
this.#a && (p = this.#a, l = this.#h, f = Date.now(), y = "error");
|
|
978
|
-
const b = u.fetchStatus === "fetching", L = y === "pending", H = y === "error",
|
|
978
|
+
const b = u.fetchStatus === "fetching", L = y === "pending", H = y === "error", x = L && b, q = l !== void 0, N = {
|
|
979
979
|
status: y,
|
|
980
980
|
fetchStatus: u.fetchStatus,
|
|
981
981
|
isPending: L,
|
|
982
982
|
isSuccess: y === "success",
|
|
983
983
|
isError: H,
|
|
984
|
-
isInitialLoading:
|
|
985
|
-
isLoading:
|
|
984
|
+
isInitialLoading: x,
|
|
985
|
+
isLoading: x,
|
|
986
986
|
data: l,
|
|
987
987
|
dataUpdatedAt: u.dataUpdatedAt,
|
|
988
988
|
error: p,
|
|
@@ -994,11 +994,11 @@ var _s = class extends we {
|
|
|
994
994
|
isFetchedAfterMount: u.dataUpdateCount > c.dataUpdateCount || u.errorUpdateCount > c.errorUpdateCount,
|
|
995
995
|
isFetching: b,
|
|
996
996
|
isRefetching: b && !L,
|
|
997
|
-
isLoadingError: H && !
|
|
997
|
+
isLoadingError: H && !q,
|
|
998
998
|
isPaused: u.fetchStatus === "paused",
|
|
999
999
|
isPlaceholderData: d,
|
|
1000
|
-
isRefetchError: H &&
|
|
1001
|
-
isStale:
|
|
1000
|
+
isRefetchError: H && q,
|
|
1001
|
+
isStale: wt(e, t),
|
|
1002
1002
|
refetch: this.refetch,
|
|
1003
1003
|
promise: this.#o,
|
|
1004
1004
|
isEnabled: K(t.enabled, e) !== !1
|
|
@@ -1066,29 +1066,29 @@ var _s = class extends we {
|
|
|
1066
1066
|
});
|
|
1067
1067
|
}
|
|
1068
1068
|
};
|
|
1069
|
-
function
|
|
1069
|
+
function Cs(e, t) {
|
|
1070
1070
|
return K(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
return
|
|
1072
|
+
function Dt(e, t) {
|
|
1073
|
+
return Cs(e, t) || e.state.data !== void 0 && lt(e, t, t.refetchOnMount);
|
|
1074
1074
|
}
|
|
1075
1075
|
function lt(e, t, r) {
|
|
1076
|
-
if (K(t.enabled, e) !== !1 &&
|
|
1076
|
+
if (K(t.enabled, e) !== !1 && se(t.staleTime, e) !== "static") {
|
|
1077
1077
|
const s = typeof r == "function" ? r(e) : r;
|
|
1078
|
-
return s === "always" || s !== !1 &&
|
|
1078
|
+
return s === "always" || s !== !1 && wt(e, t);
|
|
1079
1079
|
}
|
|
1080
1080
|
return !1;
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return (e !== t || K(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") &&
|
|
1082
|
+
function Nt(e, t, r, s) {
|
|
1083
|
+
return (e !== t || K(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && wt(e, r);
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return K(t.enabled, e) !== !1 && e.isStaleByTime(
|
|
1085
|
+
function wt(e, t) {
|
|
1086
|
+
return K(t.enabled, e) !== !1 && e.isStaleByTime(se(t.staleTime, e));
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function Ps(e, t) {
|
|
1089
1089
|
return !Ne(e.getCurrentResult(), t);
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Ut(e) {
|
|
1092
1092
|
return {
|
|
1093
1093
|
onFetch: (t, r) => {
|
|
1094
1094
|
const s = t.options, n = t.fetchOptions?.meta?.fetchMore?.direction, a = t.state.data?.pages || [], i = t.state.data?.pageParams || [];
|
|
@@ -1102,7 +1102,7 @@ function Nt(e) {
|
|
|
1102
1102
|
u = !0;
|
|
1103
1103
|
}), t.signal)
|
|
1104
1104
|
});
|
|
1105
|
-
}, l =
|
|
1105
|
+
}, l = mr(t.options, t.fetchOptions), p = async (f, y, _) => {
|
|
1106
1106
|
if (u)
|
|
1107
1107
|
return Promise.reject();
|
|
1108
1108
|
if (y == null && f.pages.length)
|
|
@@ -1116,14 +1116,14 @@ function Nt(e) {
|
|
|
1116
1116
|
meta: t.options.meta
|
|
1117
1117
|
};
|
|
1118
1118
|
return d(Te), Te;
|
|
1119
|
-
})(), H = await l(L), { maxPages:
|
|
1119
|
+
})(), H = await l(L), { maxPages: x } = t.options, q = _ ? Ts : ws;
|
|
1120
1120
|
return {
|
|
1121
|
-
pages:
|
|
1122
|
-
pageParams:
|
|
1121
|
+
pages: q(f.pages, H, x),
|
|
1122
|
+
pageParams: q(f.pageParams, y, x)
|
|
1123
1123
|
};
|
|
1124
1124
|
};
|
|
1125
1125
|
if (n && a.length) {
|
|
1126
|
-
const f = n === "backward", y = f ?
|
|
1126
|
+
const f = n === "backward", y = f ? ks : Lt, _ = {
|
|
1127
1127
|
pages: a,
|
|
1128
1128
|
pageParams: i
|
|
1129
1129
|
}, b = y(s, _);
|
|
@@ -1131,7 +1131,7 @@ function Nt(e) {
|
|
|
1131
1131
|
} else {
|
|
1132
1132
|
const f = e ?? a.length;
|
|
1133
1133
|
do {
|
|
1134
|
-
const y = c === 0 ? i[0] ?? s.initialPageParam :
|
|
1134
|
+
const y = c === 0 ? i[0] ?? s.initialPageParam : Lt(s, o);
|
|
1135
1135
|
if (c > 0 && y == null)
|
|
1136
1136
|
break;
|
|
1137
1137
|
o = await p(o, y), c++;
|
|
@@ -1152,7 +1152,7 @@ function Nt(e) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
};
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function Lt(e, { pages: t, pageParams: r }) {
|
|
1156
1156
|
const s = t.length - 1;
|
|
1157
1157
|
return t.length > 0 ? e.getNextPageParam(
|
|
1158
1158
|
t[s],
|
|
@@ -1161,16 +1161,16 @@ function Ut(e, { pages: t, pageParams: r }) {
|
|
|
1161
1161
|
r
|
|
1162
1162
|
) : void 0;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function ks(e, { pages: t, pageParams: r }) {
|
|
1165
1165
|
return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, r[0], r) : void 0;
|
|
1166
1166
|
}
|
|
1167
|
-
var
|
|
1167
|
+
var Ms = class extends wr {
|
|
1168
1168
|
#e;
|
|
1169
1169
|
#t;
|
|
1170
1170
|
#r;
|
|
1171
1171
|
#n;
|
|
1172
1172
|
constructor(e) {
|
|
1173
|
-
super(), this.#e = e.client, this.mutationId = e.mutationId, this.#r = e.mutationCache, this.#t = [], this.state = e.state ||
|
|
1173
|
+
super(), this.#e = e.client, this.mutationId = e.mutationId, this.#r = e.mutationCache, this.#t = [], this.state = e.state || vr(), this.setOptions(e.options), this.scheduleGc();
|
|
1174
1174
|
}
|
|
1175
1175
|
setOptions(e) {
|
|
1176
1176
|
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
@@ -1207,7 +1207,7 @@ var ks = class extends gr {
|
|
|
1207
1207
|
meta: this.options.meta,
|
|
1208
1208
|
mutationKey: this.options.mutationKey
|
|
1209
1209
|
};
|
|
1210
|
-
this.#n =
|
|
1210
|
+
this.#n = Sr({
|
|
1211
1211
|
fn: () => this.options.mutationFn ? this.options.mutationFn(e, r) : Promise.reject(new Error("No mutationFn found")),
|
|
1212
1212
|
onFail: (a, i) => {
|
|
1213
1213
|
this.#s({ type: "failed", failureCount: a, error: i });
|
|
@@ -1367,7 +1367,7 @@ var ks = class extends gr {
|
|
|
1367
1367
|
});
|
|
1368
1368
|
}
|
|
1369
1369
|
};
|
|
1370
|
-
function
|
|
1370
|
+
function vr() {
|
|
1371
1371
|
return {
|
|
1372
1372
|
context: void 0,
|
|
1373
1373
|
data: void 0,
|
|
@@ -1380,7 +1380,7 @@ function wr() {
|
|
|
1380
1380
|
submittedAt: 0
|
|
1381
1381
|
};
|
|
1382
1382
|
}
|
|
1383
|
-
var
|
|
1383
|
+
var $s = class extends we {
|
|
1384
1384
|
constructor(e = {}) {
|
|
1385
1385
|
super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#r = 0;
|
|
1386
1386
|
}
|
|
@@ -1388,7 +1388,7 @@ var Ms = class extends we {
|
|
|
1388
1388
|
#t;
|
|
1389
1389
|
#r;
|
|
1390
1390
|
build(e, t, r) {
|
|
1391
|
-
const s = new
|
|
1391
|
+
const s = new Ms({
|
|
1392
1392
|
client: e,
|
|
1393
1393
|
mutationCache: this,
|
|
1394
1394
|
mutationId: ++this.#r,
|
|
@@ -1447,11 +1447,11 @@ var Ms = class extends we {
|
|
|
1447
1447
|
find(e) {
|
|
1448
1448
|
const t = { exact: !0, ...e };
|
|
1449
1449
|
return this.getAll().find(
|
|
1450
|
-
(r) =>
|
|
1450
|
+
(r) => Ct(t, r)
|
|
1451
1451
|
);
|
|
1452
1452
|
}
|
|
1453
1453
|
findAll(e = {}) {
|
|
1454
|
-
return this.getAll().filter((t) =>
|
|
1454
|
+
return this.getAll().filter((t) => Ct(e, t));
|
|
1455
1455
|
}
|
|
1456
1456
|
notify(e) {
|
|
1457
1457
|
v.batch(() => {
|
|
@@ -1472,7 +1472,7 @@ var Ms = class extends we {
|
|
|
1472
1472
|
function Ce(e) {
|
|
1473
1473
|
return e.options.scope?.id;
|
|
1474
1474
|
}
|
|
1475
|
-
var
|
|
1475
|
+
var Ds = class extends we {
|
|
1476
1476
|
#e;
|
|
1477
1477
|
#t = void 0;
|
|
1478
1478
|
#r;
|
|
@@ -1507,7 +1507,7 @@ var $s = class extends we {
|
|
|
1507
1507
|
return this.#n = t, this.#r?.removeObserver(this), this.#r = this.#e.getMutationCache().build(this.#e, this.options), this.#r.addObserver(this), this.#r.execute(e);
|
|
1508
1508
|
}
|
|
1509
1509
|
#s() {
|
|
1510
|
-
const e = this.#r?.state ??
|
|
1510
|
+
const e = this.#r?.state ?? vr();
|
|
1511
1511
|
this.#t = {
|
|
1512
1512
|
...e,
|
|
1513
1513
|
isPending: e.status === "pending",
|
|
@@ -1555,15 +1555,15 @@ var $s = class extends we {
|
|
|
1555
1555
|
});
|
|
1556
1556
|
});
|
|
1557
1557
|
}
|
|
1558
|
-
},
|
|
1558
|
+
}, Ns = class extends we {
|
|
1559
1559
|
constructor(e = {}) {
|
|
1560
1560
|
super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
|
|
1561
1561
|
}
|
|
1562
1562
|
#e;
|
|
1563
1563
|
build(e, t, r) {
|
|
1564
|
-
const s = t.queryKey, n = t.queryHash ??
|
|
1564
|
+
const s = t.queryKey, n = t.queryHash ?? gt(s, t);
|
|
1565
1565
|
let a = this.get(n);
|
|
1566
|
-
return a || (a = new
|
|
1566
|
+
return a || (a = new _s({
|
|
1567
1567
|
client: e,
|
|
1568
1568
|
queryKey: s,
|
|
1569
1569
|
queryHash: n,
|
|
@@ -1598,12 +1598,12 @@ var $s = class extends we {
|
|
|
1598
1598
|
find(e) {
|
|
1599
1599
|
const t = { exact: !0, ...e };
|
|
1600
1600
|
return this.getAll().find(
|
|
1601
|
-
(r) =>
|
|
1601
|
+
(r) => Ot(t, r)
|
|
1602
1602
|
);
|
|
1603
1603
|
}
|
|
1604
1604
|
findAll(e = {}) {
|
|
1605
1605
|
const t = this.getAll();
|
|
1606
|
-
return Object.keys(e).length > 0 ? t.filter((r) =>
|
|
1606
|
+
return Object.keys(e).length > 0 ? t.filter((r) => Ot(e, r)) : t;
|
|
1607
1607
|
}
|
|
1608
1608
|
notify(e) {
|
|
1609
1609
|
v.batch(() => {
|
|
@@ -1626,7 +1626,7 @@ var $s = class extends we {
|
|
|
1626
1626
|
});
|
|
1627
1627
|
});
|
|
1628
1628
|
}
|
|
1629
|
-
},
|
|
1629
|
+
}, Us = class {
|
|
1630
1630
|
#e;
|
|
1631
1631
|
#t;
|
|
1632
1632
|
#r;
|
|
@@ -1636,10 +1636,10 @@ var $s = class extends we {
|
|
|
1636
1636
|
#o;
|
|
1637
1637
|
#a;
|
|
1638
1638
|
constructor(e = {}) {
|
|
1639
|
-
this.#e = e.queryCache || new
|
|
1639
|
+
this.#e = e.queryCache || new Ns(), this.#t = e.mutationCache || new $s(), this.#r = e.defaultOptions || {}, this.#n = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#i = 0;
|
|
1640
1640
|
}
|
|
1641
1641
|
mount() {
|
|
1642
|
-
this.#i++, this.#i === 1 && (this.#o =
|
|
1642
|
+
this.#i++, this.#i === 1 && (this.#o = St.subscribe(async (e) => {
|
|
1643
1643
|
e && (await this.resumePausedMutations(), this.#e.onFocus());
|
|
1644
1644
|
}), this.#a = Le.subscribe(async (e) => {
|
|
1645
1645
|
e && (await this.resumePausedMutations(), this.#e.onOnline());
|
|
@@ -1667,7 +1667,7 @@ var $s = class extends we {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
ensureQueryData(e) {
|
|
1669
1669
|
const t = this.defaultQueryOptions(e), r = this.#e.build(this, t), s = r.state.data;
|
|
1670
|
-
return s === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && r.isStaleByTime(
|
|
1670
|
+
return s === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && r.isStaleByTime(se(t.staleTime, r)) && this.prefetchQuery(t), Promise.resolve(s));
|
|
1671
1671
|
}
|
|
1672
1672
|
getQueriesData(e) {
|
|
1673
1673
|
return this.#e.findAll(e).map(({ queryKey: t, state: r }) => {
|
|
@@ -1678,7 +1678,7 @@ var $s = class extends we {
|
|
|
1678
1678
|
setQueryData(e, t, r) {
|
|
1679
1679
|
const s = this.defaultQueryOptions({ queryKey: e }), a = this.#e.get(
|
|
1680
1680
|
s.queryHash
|
|
1681
|
-
)?.state.data, i =
|
|
1681
|
+
)?.state.data, i = Es(t, a);
|
|
1682
1682
|
if (i !== void 0)
|
|
1683
1683
|
return this.#e.build(this, s).setData(i, { ...r, manual: !0 });
|
|
1684
1684
|
}
|
|
@@ -1750,20 +1750,20 @@ var $s = class extends we {
|
|
|
1750
1750
|
t.retry === void 0 && (t.retry = !1);
|
|
1751
1751
|
const r = this.#e.build(this, t);
|
|
1752
1752
|
return r.isStaleByTime(
|
|
1753
|
-
|
|
1753
|
+
se(t.staleTime, r)
|
|
1754
1754
|
) ? r.fetch(t) : Promise.resolve(r.state.data);
|
|
1755
1755
|
}
|
|
1756
1756
|
prefetchQuery(e) {
|
|
1757
1757
|
return this.fetchQuery(e).then(U).catch(U);
|
|
1758
1758
|
}
|
|
1759
1759
|
fetchInfiniteQuery(e) {
|
|
1760
|
-
return e.behavior =
|
|
1760
|
+
return e.behavior = Ut(e.pages), this.fetchQuery(e);
|
|
1761
1761
|
}
|
|
1762
1762
|
prefetchInfiniteQuery(e) {
|
|
1763
1763
|
return this.fetchInfiniteQuery(e).then(U).catch(U);
|
|
1764
1764
|
}
|
|
1765
1765
|
ensureInfiniteQueryData(e) {
|
|
1766
|
-
return e.behavior =
|
|
1766
|
+
return e.behavior = Ut(e.pages), this.ensureQueryData(e);
|
|
1767
1767
|
}
|
|
1768
1768
|
resumePausedMutations() {
|
|
1769
1769
|
return Le.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
|
|
@@ -1813,7 +1813,7 @@ var $s = class extends we {
|
|
|
1813
1813
|
...e,
|
|
1814
1814
|
_defaulted: !0
|
|
1815
1815
|
};
|
|
1816
|
-
return t.queryHash || (t.queryHash =
|
|
1816
|
+
return t.queryHash || (t.queryHash = gt(
|
|
1817
1817
|
t.queryKey,
|
|
1818
1818
|
t
|
|
1819
1819
|
)), 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 === Ue && (t.enabled = !1), t;
|
|
@@ -1829,20 +1829,20 @@ var $s = class extends we {
|
|
|
1829
1829
|
clear() {
|
|
1830
1830
|
this.#e.clear(), this.#t.clear();
|
|
1831
1831
|
}
|
|
1832
|
-
},
|
|
1832
|
+
}, Ar = D.createContext(
|
|
1833
1833
|
void 0
|
|
1834
1834
|
), V = (e) => {
|
|
1835
|
-
const t = D.useContext(
|
|
1835
|
+
const t = D.useContext(Ar);
|
|
1836
1836
|
if (!t)
|
|
1837
1837
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1838
1838
|
return t;
|
|
1839
|
-
},
|
|
1839
|
+
}, Ls = ({
|
|
1840
1840
|
client: e,
|
|
1841
1841
|
children: t
|
|
1842
1842
|
}) => (D.useEffect(() => (e.mount(), () => {
|
|
1843
1843
|
e.unmount();
|
|
1844
|
-
}), [e]), /* @__PURE__ */ S(
|
|
1845
|
-
function
|
|
1844
|
+
}), [e]), /* @__PURE__ */ S(Ar.Provider, { value: e, children: t })), Fs = D.createContext(!1), Ks = () => D.useContext(Fs);
|
|
1845
|
+
function Hs() {
|
|
1846
1846
|
let e = !1;
|
|
1847
1847
|
return {
|
|
1848
1848
|
clearReset: () => {
|
|
@@ -1854,19 +1854,19 @@ function Ks() {
|
|
|
1854
1854
|
isReset: () => e
|
|
1855
1855
|
};
|
|
1856
1856
|
}
|
|
1857
|
-
var
|
|
1857
|
+
var Gs = D.createContext(Hs()), xs = () => D.useContext(Gs), qs = (e, t) => {
|
|
1858
1858
|
(e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
|
|
1859
|
-
},
|
|
1859
|
+
}, Ws = (e) => {
|
|
1860
1860
|
D.useEffect(() => {
|
|
1861
1861
|
e.clearReset();
|
|
1862
1862
|
}, [e]);
|
|
1863
|
-
},
|
|
1863
|
+
}, Bs = ({
|
|
1864
1864
|
result: e,
|
|
1865
1865
|
errorResetBoundary: t,
|
|
1866
1866
|
throwOnError: r,
|
|
1867
1867
|
query: s,
|
|
1868
1868
|
suspense: n
|
|
1869
|
-
}) => e.isError && !t.isReset() && !e.isFetching && s && (n && e.data === void 0 ||
|
|
1869
|
+
}) => e.isError && !t.isReset() && !e.isFetching && s && (n && e.data === void 0 || Er(r, [e.error, s])), Qs = (e) => {
|
|
1870
1870
|
if (e.suspense) {
|
|
1871
1871
|
const r = (n) => n === "static" ? n : Math.max(n ?? 1e3, 1e3), s = e.staleTime;
|
|
1872
1872
|
e.staleTime = typeof s == "function" ? (...n) => r(s(...n)) : r(s), typeof e.gcTime == "number" && (e.gcTime = Math.max(
|
|
@@ -1874,20 +1874,20 @@ var Hs = D.createContext(Ks()), Gs = () => D.useContext(Hs), xs = (e, t) => {
|
|
|
1874
1874
|
1e3
|
|
1875
1875
|
));
|
|
1876
1876
|
}
|
|
1877
|
-
},
|
|
1877
|
+
}, js = (e, t) => e.isLoading && e.isFetching && !t, Vs = (e, t) => e?.suspense && t.isPending, Ft = (e, t, r) => t.fetchOptimistic(e).catch(() => {
|
|
1878
1878
|
r.clearReset();
|
|
1879
1879
|
});
|
|
1880
|
-
function
|
|
1880
|
+
function Js(e, t, r) {
|
|
1881
1881
|
if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
|
|
1882
1882
|
throw new Error(
|
|
1883
1883
|
'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'
|
|
1884
1884
|
);
|
|
1885
|
-
const s =
|
|
1885
|
+
const s = Ks(), n = xs(), a = V(), i = a.defaultQueryOptions(e);
|
|
1886
1886
|
a.getDefaultOptions().queries?._experimental_beforeQuery?.(
|
|
1887
1887
|
i
|
|
1888
1888
|
), process.env.NODE_ENV !== "production" && (i.queryFn || console.error(
|
|
1889
1889
|
`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
1890
|
-
)), i._optimisticResults = s ? "isRestoring" : "optimistic",
|
|
1890
|
+
)), i._optimisticResults = s ? "isRestoring" : "optimistic", Qs(i), qs(i, n), Ws(n);
|
|
1891
1891
|
const o = !a.getQueryCache().get(i.queryHash), [c] = D.useState(
|
|
1892
1892
|
() => new t(
|
|
1893
1893
|
a,
|
|
@@ -1906,9 +1906,9 @@ function Vs(e, t, r) {
|
|
|
1906
1906
|
() => c.getCurrentResult()
|
|
1907
1907
|
), D.useEffect(() => {
|
|
1908
1908
|
c.setOptions(i);
|
|
1909
|
-
}, [i, c]),
|
|
1910
|
-
throw
|
|
1911
|
-
if (
|
|
1909
|
+
}, [i, c]), Vs(i, h))
|
|
1910
|
+
throw Ft(i, c, n);
|
|
1911
|
+
if (Bs({
|
|
1912
1912
|
result: h,
|
|
1913
1913
|
errorResetBoundary: n,
|
|
1914
1914
|
throwOnError: i.throwOnError,
|
|
@@ -1919,9 +1919,9 @@ function Vs(e, t, r) {
|
|
|
1919
1919
|
return a.getDefaultOptions().queries?._experimental_afterQuery?.(
|
|
1920
1920
|
i,
|
|
1921
1921
|
h
|
|
1922
|
-
), i.experimental_prefetchInRender && !ie &&
|
|
1922
|
+
), i.experimental_prefetchInRender && !ie && js(h, s) && (o ? (
|
|
1923
1923
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
1924
|
-
|
|
1924
|
+
Ft(i, c, n)
|
|
1925
1925
|
) : (
|
|
1926
1926
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
1927
1927
|
a.getQueryCache().get(i.queryHash)?.promise
|
|
@@ -1930,11 +1930,11 @@ function Vs(e, t, r) {
|
|
|
1930
1930
|
}), i.notifyOnChangeProps ? h : c.trackResult(h);
|
|
1931
1931
|
}
|
|
1932
1932
|
function Z(e, t) {
|
|
1933
|
-
return
|
|
1933
|
+
return Js(e, Os);
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function ne(e, t) {
|
|
1936
1936
|
const r = V(), [s] = D.useState(
|
|
1937
|
-
() => new
|
|
1937
|
+
() => new Ds(
|
|
1938
1938
|
r,
|
|
1939
1939
|
e
|
|
1940
1940
|
)
|
|
@@ -1955,7 +1955,7 @@ function se(e, t) {
|
|
|
1955
1955
|
},
|
|
1956
1956
|
[s]
|
|
1957
1957
|
);
|
|
1958
|
-
if (n.error &&
|
|
1958
|
+
if (n.error && Er(s.options.throwOnError, [n.error]))
|
|
1959
1959
|
throw n.error;
|
|
1960
1960
|
return { ...n, mutate: a, mutateAsync: n.mutate };
|
|
1961
1961
|
}
|
|
@@ -1972,7 +1972,7 @@ const Ae = {
|
|
|
1972
1972
|
CODE: "code",
|
|
1973
1973
|
REFRESH_TOKEN: "refresh_token",
|
|
1974
1974
|
PASSKEY: "passkey"
|
|
1975
|
-
},
|
|
1975
|
+
}, Rr = {
|
|
1976
1976
|
CLIENT_ID: "X-Auth-ClientId"
|
|
1977
1977
|
}, $ = {
|
|
1978
1978
|
ALG: "RS256",
|
|
@@ -1982,7 +1982,7 @@ const Ae = {
|
|
|
1982
1982
|
NONCE_KEY: "_nonce",
|
|
1983
1983
|
AUTH_TYPE_KEY: "auth_type",
|
|
1984
1984
|
ISSUER: "gizmette.com"
|
|
1985
|
-
},
|
|
1985
|
+
}, Ys = `-----BEGIN PUBLIC KEY-----
|
|
1986
1986
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
1987
1987
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
1988
1988
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -1995,8 +1995,8 @@ awIDAQAB
|
|
|
1995
1995
|
LOGOUT: "logout",
|
|
1996
1996
|
LOGIN: "login",
|
|
1997
1997
|
REFRESH: "refresh"
|
|
1998
|
-
},
|
|
1999
|
-
function
|
|
1998
|
+
}, Kt = new TextEncoder(), Se = new TextDecoder();
|
|
1999
|
+
function zs(...e) {
|
|
2000
2000
|
const t = e.reduce((n, { length: a }) => n + a, 0), r = new Uint8Array(t);
|
|
2001
2001
|
let s = 0;
|
|
2002
2002
|
for (const n of e)
|
|
@@ -2013,7 +2013,7 @@ function Qe(e) {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
return t;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function br(e) {
|
|
2017
2017
|
if (Uint8Array.fromBase64)
|
|
2018
2018
|
return Uint8Array.fromBase64(e);
|
|
2019
2019
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
@@ -2029,7 +2029,7 @@ function Re(e) {
|
|
|
2029
2029
|
let t = e;
|
|
2030
2030
|
t instanceof Uint8Array && (t = Se.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
2031
2031
|
try {
|
|
2032
|
-
return
|
|
2032
|
+
return br(t);
|
|
2033
2033
|
} catch {
|
|
2034
2034
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
2035
2035
|
}
|
|
@@ -2040,7 +2040,7 @@ let ce = class extends Error {
|
|
|
2040
2040
|
constructor(t, r) {
|
|
2041
2041
|
super(t, r), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
|
|
2042
2042
|
}
|
|
2043
|
-
},
|
|
2043
|
+
}, W = class extends ce {
|
|
2044
2044
|
static code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
2045
2045
|
code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
2046
2046
|
claim;
|
|
@@ -2049,7 +2049,7 @@ let ce = class extends Error {
|
|
|
2049
2049
|
constructor(t, r, s = "unspecified", n = "unspecified") {
|
|
2050
2050
|
super(t, { cause: { claim: s, reason: n, payload: r } }), this.claim = s, this.reason = n, this.payload = r;
|
|
2051
2051
|
}
|
|
2052
|
-
},
|
|
2052
|
+
}, Ht = class extends ce {
|
|
2053
2053
|
static code = "ERR_JWT_EXPIRED";
|
|
2054
2054
|
code = "ERR_JWT_EXPIRED";
|
|
2055
2055
|
claim;
|
|
@@ -2059,7 +2059,7 @@ let ce = class extends Error {
|
|
|
2059
2059
|
super(t, { cause: { claim: s, reason: n, payload: r } }), this.claim = s, this.reason = n, this.payload = r;
|
|
2060
2060
|
}
|
|
2061
2061
|
};
|
|
2062
|
-
class
|
|
2062
|
+
class Xs extends ce {
|
|
2063
2063
|
static code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
2064
2064
|
code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
2065
2065
|
}
|
|
@@ -2075,18 +2075,18 @@ class Y extends ce {
|
|
|
2075
2075
|
static code = "ERR_JWT_INVALID";
|
|
2076
2076
|
code = "ERR_JWT_INVALID";
|
|
2077
2077
|
}
|
|
2078
|
-
let
|
|
2078
|
+
let Zs = class extends ce {
|
|
2079
2079
|
static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
2080
2080
|
code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
2081
2081
|
constructor(t = "signature verification failed", r) {
|
|
2082
2082
|
super(t, r);
|
|
2083
2083
|
}
|
|
2084
2084
|
};
|
|
2085
|
-
const
|
|
2085
|
+
const B = (e, t = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`), he = (e, t) => e.name === t;
|
|
2086
2086
|
function je(e) {
|
|
2087
2087
|
return parseInt(e.name.slice(4), 10);
|
|
2088
2088
|
}
|
|
2089
|
-
function
|
|
2089
|
+
function en(e) {
|
|
2090
2090
|
switch (e) {
|
|
2091
2091
|
case "ES256":
|
|
2092
2092
|
return "P-256";
|
|
@@ -2098,78 +2098,78 @@ function Zs(e) {
|
|
|
2098
2098
|
throw new Error("unreachable");
|
|
2099
2099
|
}
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2101
|
+
function tn(e, t) {
|
|
2102
2102
|
if (!e.usages.includes(t))
|
|
2103
2103
|
throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`);
|
|
2104
2104
|
}
|
|
2105
|
-
function
|
|
2105
|
+
function rn(e, t, r) {
|
|
2106
2106
|
switch (t) {
|
|
2107
2107
|
case "HS256":
|
|
2108
2108
|
case "HS384":
|
|
2109
2109
|
case "HS512": {
|
|
2110
2110
|
if (!he(e.algorithm, "HMAC"))
|
|
2111
|
-
throw
|
|
2111
|
+
throw B("HMAC");
|
|
2112
2112
|
const s = parseInt(t.slice(2), 10);
|
|
2113
2113
|
if (je(e.algorithm.hash) !== s)
|
|
2114
|
-
throw
|
|
2114
|
+
throw B(`SHA-${s}`, "algorithm.hash");
|
|
2115
2115
|
break;
|
|
2116
2116
|
}
|
|
2117
2117
|
case "RS256":
|
|
2118
2118
|
case "RS384":
|
|
2119
2119
|
case "RS512": {
|
|
2120
2120
|
if (!he(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
2121
|
-
throw
|
|
2121
|
+
throw B("RSASSA-PKCS1-v1_5");
|
|
2122
2122
|
const s = parseInt(t.slice(2), 10);
|
|
2123
2123
|
if (je(e.algorithm.hash) !== s)
|
|
2124
|
-
throw
|
|
2124
|
+
throw B(`SHA-${s}`, "algorithm.hash");
|
|
2125
2125
|
break;
|
|
2126
2126
|
}
|
|
2127
2127
|
case "PS256":
|
|
2128
2128
|
case "PS384":
|
|
2129
2129
|
case "PS512": {
|
|
2130
2130
|
if (!he(e.algorithm, "RSA-PSS"))
|
|
2131
|
-
throw
|
|
2131
|
+
throw B("RSA-PSS");
|
|
2132
2132
|
const s = parseInt(t.slice(2), 10);
|
|
2133
2133
|
if (je(e.algorithm.hash) !== s)
|
|
2134
|
-
throw
|
|
2134
|
+
throw B(`SHA-${s}`, "algorithm.hash");
|
|
2135
2135
|
break;
|
|
2136
2136
|
}
|
|
2137
2137
|
case "Ed25519":
|
|
2138
2138
|
case "EdDSA": {
|
|
2139
2139
|
if (!he(e.algorithm, "Ed25519"))
|
|
2140
|
-
throw
|
|
2140
|
+
throw B("Ed25519");
|
|
2141
2141
|
break;
|
|
2142
2142
|
}
|
|
2143
2143
|
case "ML-DSA-44":
|
|
2144
2144
|
case "ML-DSA-65":
|
|
2145
2145
|
case "ML-DSA-87": {
|
|
2146
2146
|
if (!he(e.algorithm, t))
|
|
2147
|
-
throw
|
|
2147
|
+
throw B(t);
|
|
2148
2148
|
break;
|
|
2149
2149
|
}
|
|
2150
2150
|
case "ES256":
|
|
2151
2151
|
case "ES384":
|
|
2152
2152
|
case "ES512": {
|
|
2153
2153
|
if (!he(e.algorithm, "ECDSA"))
|
|
2154
|
-
throw
|
|
2155
|
-
const s =
|
|
2154
|
+
throw B("ECDSA");
|
|
2155
|
+
const s = en(t);
|
|
2156
2156
|
if (e.algorithm.namedCurve !== s)
|
|
2157
|
-
throw
|
|
2157
|
+
throw B(s, "algorithm.namedCurve");
|
|
2158
2158
|
break;
|
|
2159
2159
|
}
|
|
2160
2160
|
default:
|
|
2161
2161
|
throw new TypeError("CryptoKey does not support this operation");
|
|
2162
2162
|
}
|
|
2163
|
-
|
|
2163
|
+
tn(e, r);
|
|
2164
2164
|
}
|
|
2165
|
-
function
|
|
2165
|
+
function Ir(e, t, ...r) {
|
|
2166
2166
|
if (r = r.filter(Boolean), r.length > 2) {
|
|
2167
2167
|
const s = r.pop();
|
|
2168
2168
|
e += `one of type ${r.join(", ")}, or ${s}.`;
|
|
2169
2169
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
2170
2170
|
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;
|
|
2171
2171
|
}
|
|
2172
|
-
const
|
|
2172
|
+
const sn = (e, ...t) => Ir("Key must be ", e, ...t), _r = (e, t, ...r) => Ir(`Key for the ${e} algorithm must be `, t, ...r), Or = (e) => {
|
|
2173
2173
|
if (e?.[Symbol.toStringTag] === "CryptoKey")
|
|
2174
2174
|
return !0;
|
|
2175
2175
|
try {
|
|
@@ -2177,8 +2177,8 @@ const rn = (e, ...t) => Rr("Key must be ", e, ...t), br = (e, t, ...r) => Rr(`Ke
|
|
|
2177
2177
|
} catch {
|
|
2178
2178
|
return !1;
|
|
2179
2179
|
}
|
|
2180
|
-
},
|
|
2181
|
-
function
|
|
2180
|
+
}, Cr = (e) => e?.[Symbol.toStringTag] === "KeyObject", Pr = (e) => Or(e) || Cr(e);
|
|
2181
|
+
function nn(...e) {
|
|
2182
2182
|
const t = e.filter(Boolean);
|
|
2183
2183
|
if (t.length === 0 || t.length === 1)
|
|
2184
2184
|
return !0;
|
|
@@ -2197,9 +2197,9 @@ function sn(...e) {
|
|
|
2197
2197
|
}
|
|
2198
2198
|
return !0;
|
|
2199
2199
|
}
|
|
2200
|
-
const
|
|
2200
|
+
const an = (e) => typeof e == "object" && e !== null;
|
|
2201
2201
|
function Ie(e) {
|
|
2202
|
-
if (!
|
|
2202
|
+
if (!an(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
2203
2203
|
return !1;
|
|
2204
2204
|
if (Object.getPrototypeOf(e) === null)
|
|
2205
2205
|
return !0;
|
|
@@ -2208,7 +2208,7 @@ function Ie(e) {
|
|
|
2208
2208
|
t = Object.getPrototypeOf(t);
|
|
2209
2209
|
return Object.getPrototypeOf(e) === t;
|
|
2210
2210
|
}
|
|
2211
|
-
function
|
|
2211
|
+
function on(e, t) {
|
|
2212
2212
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
2213
2213
|
const { modulusLength: r } = t.algorithm;
|
|
2214
2214
|
if (typeof r != "number" || r < 2048)
|
|
@@ -2222,7 +2222,7 @@ const Ve = (e, t) => {
|
|
|
2222
2222
|
if (e[r] !== t[r])
|
|
2223
2223
|
return !1;
|
|
2224
2224
|
return !0;
|
|
2225
|
-
},
|
|
2225
|
+
}, cn = (e) => ({ data: e, pos: 0 }), Fe = (e) => {
|
|
2226
2226
|
const t = e.data[e.pos++];
|
|
2227
2227
|
if (t & 128) {
|
|
2228
2228
|
const r = t & 127;
|
|
@@ -2235,27 +2235,27 @@ const Ve = (e, t) => {
|
|
|
2235
2235
|
}, Ke = (e, t, r) => {
|
|
2236
2236
|
if (e.data[e.pos++] !== t)
|
|
2237
2237
|
throw new Error(r);
|
|
2238
|
-
},
|
|
2238
|
+
}, kr = (e, t) => {
|
|
2239
2239
|
const r = e.data.subarray(e.pos, e.pos + t);
|
|
2240
2240
|
return e.pos += t, r;
|
|
2241
|
-
},
|
|
2241
|
+
}, un = (e) => {
|
|
2242
2242
|
Ke(e, 6, "Expected algorithm OID");
|
|
2243
2243
|
const t = Fe(e);
|
|
2244
|
-
return
|
|
2244
|
+
return kr(e, t);
|
|
2245
2245
|
};
|
|
2246
|
-
function
|
|
2246
|
+
function ln(e) {
|
|
2247
2247
|
Ke(e, 48, "Invalid SPKI structure"), Fe(e), Ke(e, 48, "Expected algorithm identifier");
|
|
2248
2248
|
const t = Fe(e);
|
|
2249
2249
|
return { algIdStart: e.pos, algIdLength: t };
|
|
2250
2250
|
}
|
|
2251
|
-
const
|
|
2252
|
-
const t =
|
|
2251
|
+
const dn = (e) => {
|
|
2252
|
+
const t = un(e);
|
|
2253
2253
|
if (Ve(t, [43, 101, 110]))
|
|
2254
2254
|
return "X25519";
|
|
2255
2255
|
if (!Ve(t, [42, 134, 72, 206, 61, 2, 1]))
|
|
2256
2256
|
throw new Error("Unsupported key algorithm");
|
|
2257
2257
|
Ke(e, 6, "Expected curve OID");
|
|
2258
|
-
const r = Fe(e), s =
|
|
2258
|
+
const r = Fe(e), s = kr(e, r);
|
|
2259
2259
|
for (const { name: n, oid: a } of [
|
|
2260
2260
|
{ name: "P-256", oid: [42, 134, 72, 206, 61, 3, 1, 7] },
|
|
2261
2261
|
{ name: "P-384", oid: [43, 129, 4, 0, 34] },
|
|
@@ -2264,7 +2264,7 @@ const ln = (e) => {
|
|
|
2264
2264
|
if (Ve(s, a))
|
|
2265
2265
|
return n;
|
|
2266
2266
|
throw new Error("Unsupported named curve");
|
|
2267
|
-
},
|
|
2267
|
+
}, hn = async (e, t, r, s) => {
|
|
2268
2268
|
let n, a;
|
|
2269
2269
|
const i = () => ["verify"], o = () => ["encrypt", "wrapKey"];
|
|
2270
2270
|
switch (r) {
|
|
@@ -2319,15 +2319,15 @@ const ln = (e) => {
|
|
|
2319
2319
|
throw new X('Invalid or unsupported "alg" (Algorithm) value');
|
|
2320
2320
|
}
|
|
2321
2321
|
return crypto.subtle.importKey(e, t, n, s?.extractable ?? !0, a);
|
|
2322
|
-
},
|
|
2323
|
-
const s =
|
|
2322
|
+
}, fn = (e, t) => br(e.replace(t, "")), pn = (e, t, r) => {
|
|
2323
|
+
const s = fn(e, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
|
|
2324
2324
|
let n = r;
|
|
2325
2325
|
return t?.startsWith?.("ECDH-ES") && (n ||= {}, n.getNamedCurve = (a) => {
|
|
2326
|
-
const i =
|
|
2327
|
-
return
|
|
2328
|
-
}),
|
|
2326
|
+
const i = cn(a);
|
|
2327
|
+
return ln(i), dn(i);
|
|
2328
|
+
}), hn("spki", s, t, n);
|
|
2329
2329
|
};
|
|
2330
|
-
function
|
|
2330
|
+
function yn(e) {
|
|
2331
2331
|
let t, r;
|
|
2332
2332
|
switch (e.kty) {
|
|
2333
2333
|
case "AKP": {
|
|
@@ -2412,18 +2412,18 @@ function pn(e) {
|
|
|
2412
2412
|
}
|
|
2413
2413
|
return { algorithm: t, keyUsages: r };
|
|
2414
2414
|
}
|
|
2415
|
-
async function
|
|
2415
|
+
async function mn(e) {
|
|
2416
2416
|
if (!e.alg)
|
|
2417
2417
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
2418
|
-
const { algorithm: t, keyUsages: r } =
|
|
2418
|
+
const { algorithm: t, keyUsages: r } = yn(e), s = { ...e };
|
|
2419
2419
|
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);
|
|
2420
2420
|
}
|
|
2421
|
-
async function
|
|
2421
|
+
async function En(e, t, r) {
|
|
2422
2422
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
2423
2423
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
2424
|
-
return
|
|
2424
|
+
return pn(e, t, r);
|
|
2425
2425
|
}
|
|
2426
|
-
function
|
|
2426
|
+
function gn(e, t, r, s, n) {
|
|
2427
2427
|
if (n.crit !== void 0 && s?.crit === void 0)
|
|
2428
2428
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
2429
2429
|
if (!s || s.crit === void 0)
|
|
@@ -2442,22 +2442,22 @@ function En(e, t, r, s, n) {
|
|
|
2442
2442
|
}
|
|
2443
2443
|
return new Set(s.crit);
|
|
2444
2444
|
}
|
|
2445
|
-
function
|
|
2445
|
+
function Sn(e, t) {
|
|
2446
2446
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
2447
2447
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
2448
2448
|
if (t)
|
|
2449
2449
|
return new Set(t);
|
|
2450
2450
|
}
|
|
2451
|
-
const
|
|
2451
|
+
const Tt = (e) => Ie(e) && typeof e.kty == "string", wn = (e) => e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string"), Tn = (e) => e.kty !== "oct" && e.d === void 0 && e.priv === void 0, vn = (e) => e.kty === "oct" && typeof e.k == "string";
|
|
2452
2452
|
let ge;
|
|
2453
|
-
const
|
|
2453
|
+
const Gt = async (e, t, r, s = !1) => {
|
|
2454
2454
|
ge ||= /* @__PURE__ */ new WeakMap();
|
|
2455
2455
|
let n = ge.get(e);
|
|
2456
2456
|
if (n?.[r])
|
|
2457
2457
|
return n[r];
|
|
2458
|
-
const a = await
|
|
2458
|
+
const a = await mn({ ...t, alg: r });
|
|
2459
2459
|
return s && Object.freeze(e), n ? n[r] = a : ge.set(e, { [r]: a }), a;
|
|
2460
|
-
},
|
|
2460
|
+
}, An = (e, t) => {
|
|
2461
2461
|
ge ||= /* @__PURE__ */ new WeakMap();
|
|
2462
2462
|
let r = ge.get(e);
|
|
2463
2463
|
if (r?.[t])
|
|
@@ -2554,24 +2554,24 @@ const Ht = async (e, t, r, s = !1) => {
|
|
|
2554
2554
|
throw new TypeError("given KeyObject instance cannot be used for this algorithm");
|
|
2555
2555
|
return r ? r[t] = a : ge.set(e, { [t]: a }), a;
|
|
2556
2556
|
};
|
|
2557
|
-
async function
|
|
2558
|
-
if (e instanceof Uint8Array ||
|
|
2557
|
+
async function Rn(e, t) {
|
|
2558
|
+
if (e instanceof Uint8Array || Or(e))
|
|
2559
2559
|
return e;
|
|
2560
|
-
if (
|
|
2560
|
+
if (Cr(e)) {
|
|
2561
2561
|
if (e.type === "secret")
|
|
2562
2562
|
return e.export();
|
|
2563
2563
|
if ("toCryptoKey" in e && typeof e.toCryptoKey == "function")
|
|
2564
2564
|
try {
|
|
2565
|
-
return
|
|
2565
|
+
return An(e, t);
|
|
2566
2566
|
} catch (s) {
|
|
2567
2567
|
if (s instanceof TypeError)
|
|
2568
2568
|
throw s;
|
|
2569
2569
|
}
|
|
2570
2570
|
let r = e.export({ format: "jwk" });
|
|
2571
|
-
return
|
|
2571
|
+
return Gt(e, r, t);
|
|
2572
2572
|
}
|
|
2573
|
-
if (
|
|
2574
|
-
return e.k ? Re(e.k) :
|
|
2573
|
+
if (Tt(e))
|
|
2574
|
+
return e.k ? Re(e.k) : Gt(e, e, t, !0);
|
|
2575
2575
|
throw new Error("unreachable");
|
|
2576
2576
|
}
|
|
2577
2577
|
const Ee = (e) => e?.[Symbol.toStringTag], dt = (e, t, r) => {
|
|
@@ -2617,34 +2617,34 @@ const Ee = (e) => e?.[Symbol.toStringTag], dt = (e, t, r) => {
|
|
|
2617
2617
|
throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${s}" when present`);
|
|
2618
2618
|
}
|
|
2619
2619
|
return !0;
|
|
2620
|
-
},
|
|
2620
|
+
}, bn = (e, t, r) => {
|
|
2621
2621
|
if (!(t instanceof Uint8Array)) {
|
|
2622
|
-
if (
|
|
2623
|
-
if (
|
|
2622
|
+
if (Tt(t)) {
|
|
2623
|
+
if (vn(t) && dt(e, t, r))
|
|
2624
2624
|
return;
|
|
2625
2625
|
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');
|
|
2626
2626
|
}
|
|
2627
|
-
if (!
|
|
2628
|
-
throw new TypeError(
|
|
2627
|
+
if (!Pr(t))
|
|
2628
|
+
throw new TypeError(_r(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
|
|
2629
2629
|
if (t.type !== "secret")
|
|
2630
2630
|
throw new TypeError(`${Ee(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
2631
2631
|
}
|
|
2632
|
-
},
|
|
2633
|
-
if (
|
|
2632
|
+
}, In = (e, t, r) => {
|
|
2633
|
+
if (Tt(t))
|
|
2634
2634
|
switch (r) {
|
|
2635
2635
|
case "decrypt":
|
|
2636
2636
|
case "sign":
|
|
2637
|
-
if (
|
|
2637
|
+
if (wn(t) && dt(e, t, r))
|
|
2638
2638
|
return;
|
|
2639
2639
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
2640
2640
|
case "encrypt":
|
|
2641
2641
|
case "verify":
|
|
2642
|
-
if (
|
|
2642
|
+
if (Tn(t) && dt(e, t, r))
|
|
2643
2643
|
return;
|
|
2644
2644
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
2645
2645
|
}
|
|
2646
|
-
if (!
|
|
2647
|
-
throw new TypeError(
|
|
2646
|
+
if (!Pr(t))
|
|
2647
|
+
throw new TypeError(_r(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
2648
2648
|
if (t.type === "secret")
|
|
2649
2649
|
throw new TypeError(`${Ee(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
2650
2650
|
if (t.type === "public")
|
|
@@ -2662,20 +2662,20 @@ const Ee = (e) => e?.[Symbol.toStringTag], dt = (e, t, r) => {
|
|
|
2662
2662
|
throw new TypeError(`${Ee(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
2663
2663
|
}
|
|
2664
2664
|
};
|
|
2665
|
-
function
|
|
2665
|
+
function _n(e, t, r) {
|
|
2666
2666
|
switch (e.substring(0, 2)) {
|
|
2667
2667
|
case "A1":
|
|
2668
2668
|
case "A2":
|
|
2669
2669
|
case "di":
|
|
2670
2670
|
case "HS":
|
|
2671
2671
|
case "PB":
|
|
2672
|
-
|
|
2672
|
+
bn(e, t, r);
|
|
2673
2673
|
break;
|
|
2674
2674
|
default:
|
|
2675
|
-
|
|
2675
|
+
In(e, t, r);
|
|
2676
2676
|
}
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2678
|
+
function On(e, t) {
|
|
2679
2679
|
const r = `SHA-${e.slice(-3)}`;
|
|
2680
2680
|
switch (e) {
|
|
2681
2681
|
case "HS256":
|
|
@@ -2705,25 +2705,25 @@ function _n(e, t) {
|
|
|
2705
2705
|
throw new X(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
2706
2706
|
}
|
|
2707
2707
|
}
|
|
2708
|
-
async function
|
|
2708
|
+
async function Cn(e, t, r) {
|
|
2709
2709
|
if (t instanceof Uint8Array) {
|
|
2710
2710
|
if (!e.startsWith("HS"))
|
|
2711
|
-
throw new TypeError(
|
|
2711
|
+
throw new TypeError(sn(t, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
2712
2712
|
return crypto.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
2713
2713
|
}
|
|
2714
|
-
return
|
|
2714
|
+
return rn(t, e, r), t;
|
|
2715
2715
|
}
|
|
2716
|
-
async function
|
|
2717
|
-
const n = await
|
|
2718
|
-
|
|
2719
|
-
const a =
|
|
2716
|
+
async function Pn(e, t, r, s) {
|
|
2717
|
+
const n = await Cn(e, t, "verify");
|
|
2718
|
+
on(e, n);
|
|
2719
|
+
const a = On(e, n.algorithm);
|
|
2720
2720
|
try {
|
|
2721
2721
|
return await crypto.subtle.verify(a, n, r, s);
|
|
2722
2722
|
} catch {
|
|
2723
2723
|
return !1;
|
|
2724
2724
|
}
|
|
2725
2725
|
}
|
|
2726
|
-
async function
|
|
2726
|
+
async function kn(e, t, r) {
|
|
2727
2727
|
if (!Ie(e))
|
|
2728
2728
|
throw new k("Flattened JWS must be an object");
|
|
2729
2729
|
if (e.protected === void 0 && e.header === void 0)
|
|
@@ -2744,38 +2744,38 @@ async function Pn(e, t, r) {
|
|
|
2744
2744
|
} catch {
|
|
2745
2745
|
throw new k("JWS Protected Header is invalid");
|
|
2746
2746
|
}
|
|
2747
|
-
if (!
|
|
2747
|
+
if (!nn(s, e.header))
|
|
2748
2748
|
throw new k("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
2749
2749
|
const n = {
|
|
2750
2750
|
...s,
|
|
2751
2751
|
...e.header
|
|
2752
|
-
}, a =
|
|
2752
|
+
}, a = gn(k, /* @__PURE__ */ new Map([["b64", !0]]), r?.crit, s, n);
|
|
2753
2753
|
let i = !0;
|
|
2754
2754
|
if (a.has("b64") && (i = s.b64, typeof i != "boolean"))
|
|
2755
2755
|
throw new k('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
2756
2756
|
const { alg: o } = n;
|
|
2757
2757
|
if (typeof o != "string" || !o)
|
|
2758
2758
|
throw new k('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
2759
|
-
const c = r &&
|
|
2759
|
+
const c = r && Sn("algorithms", r.algorithms);
|
|
2760
2760
|
if (c && !c.has(o))
|
|
2761
|
-
throw new
|
|
2761
|
+
throw new Xs('"alg" (Algorithm) Header Parameter value not allowed');
|
|
2762
2762
|
if (i) {
|
|
2763
2763
|
if (typeof e.payload != "string")
|
|
2764
2764
|
throw new k("JWS Payload must be a string");
|
|
2765
2765
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
2766
2766
|
throw new k("JWS Payload must be a string or an Uint8Array instance");
|
|
2767
2767
|
let h = !1;
|
|
2768
|
-
typeof t == "function" && (t = await t(s, e), h = !0),
|
|
2769
|
-
const u =
|
|
2768
|
+
typeof t == "function" && (t = await t(s, e), h = !0), _n(o, t, "verify");
|
|
2769
|
+
const u = zs(e.protected !== void 0 ? Qe(e.protected) : new Uint8Array(), Qe("."), typeof e.payload == "string" ? i ? Qe(e.payload) : Kt.encode(e.payload) : e.payload);
|
|
2770
2770
|
let d;
|
|
2771
2771
|
try {
|
|
2772
2772
|
d = Re(e.signature);
|
|
2773
2773
|
} catch {
|
|
2774
2774
|
throw new k("Failed to base64url decode the signature");
|
|
2775
2775
|
}
|
|
2776
|
-
const l = await
|
|
2777
|
-
if (!await
|
|
2778
|
-
throw new
|
|
2776
|
+
const l = await Rn(t, o);
|
|
2777
|
+
if (!await Pn(o, l, d, u))
|
|
2778
|
+
throw new Zs();
|
|
2779
2779
|
let p;
|
|
2780
2780
|
if (i)
|
|
2781
2781
|
try {
|
|
@@ -2783,22 +2783,22 @@ async function Pn(e, t, r) {
|
|
|
2783
2783
|
} catch {
|
|
2784
2784
|
throw new k("Failed to base64url decode the payload");
|
|
2785
2785
|
}
|
|
2786
|
-
else typeof e.payload == "string" ? p =
|
|
2786
|
+
else typeof e.payload == "string" ? p = Kt.encode(e.payload) : p = e.payload;
|
|
2787
2787
|
const f = { payload: p };
|
|
2788
2788
|
return e.protected !== void 0 && (f.protectedHeader = s), e.header !== void 0 && (f.unprotectedHeader = e.header), h ? { ...f, key: l } : f;
|
|
2789
2789
|
}
|
|
2790
|
-
async function
|
|
2790
|
+
async function Mn(e, t, r) {
|
|
2791
2791
|
if (e instanceof Uint8Array && (e = Se.decode(e)), typeof e != "string")
|
|
2792
2792
|
throw new k("Compact JWS must be a string or Uint8Array");
|
|
2793
2793
|
const { 0: s, 1: n, 2: a, length: i } = e.split(".");
|
|
2794
2794
|
if (i !== 3)
|
|
2795
2795
|
throw new k("Invalid Compact JWS");
|
|
2796
|
-
const o = await
|
|
2796
|
+
const o = await kn({ payload: n, protected: s, signature: a }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
|
|
2797
2797
|
return typeof t == "function" ? { ...c, key: o.key } : c;
|
|
2798
2798
|
}
|
|
2799
|
-
const
|
|
2800
|
-
function
|
|
2801
|
-
const t =
|
|
2799
|
+
const $n = (e) => Math.floor(e.getTime() / 1e3), Mr = 60, $r = Mr * 60, vt = $r * 24, Dn = vt * 7, Nn = vt * 365.25, Un = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;
|
|
2800
|
+
function xt(e) {
|
|
2801
|
+
const t = Un.exec(e);
|
|
2802
2802
|
if (!t || t[4] && t[1])
|
|
2803
2803
|
throw new TypeError("Invalid time period format");
|
|
2804
2804
|
const r = parseFloat(t[2]), s = t[3].toLowerCase();
|
|
@@ -2816,33 +2816,33 @@ function Gt(e) {
|
|
|
2816
2816
|
case "min":
|
|
2817
2817
|
case "mins":
|
|
2818
2818
|
case "m":
|
|
2819
|
-
n = Math.round(r *
|
|
2819
|
+
n = Math.round(r * Mr);
|
|
2820
2820
|
break;
|
|
2821
2821
|
case "hour":
|
|
2822
2822
|
case "hours":
|
|
2823
2823
|
case "hr":
|
|
2824
2824
|
case "hrs":
|
|
2825
2825
|
case "h":
|
|
2826
|
-
n = Math.round(r *
|
|
2826
|
+
n = Math.round(r * $r);
|
|
2827
2827
|
break;
|
|
2828
2828
|
case "day":
|
|
2829
2829
|
case "days":
|
|
2830
2830
|
case "d":
|
|
2831
|
-
n = Math.round(r *
|
|
2831
|
+
n = Math.round(r * vt);
|
|
2832
2832
|
break;
|
|
2833
2833
|
case "week":
|
|
2834
2834
|
case "weeks":
|
|
2835
2835
|
case "w":
|
|
2836
|
-
n = Math.round(r *
|
|
2836
|
+
n = Math.round(r * Dn);
|
|
2837
2837
|
break;
|
|
2838
2838
|
default:
|
|
2839
|
-
n = Math.round(r *
|
|
2839
|
+
n = Math.round(r * Nn);
|
|
2840
2840
|
break;
|
|
2841
2841
|
}
|
|
2842
2842
|
return t[1] === "-" || t[4] === "ago" ? -n : n;
|
|
2843
2843
|
}
|
|
2844
|
-
const
|
|
2845
|
-
function
|
|
2844
|
+
const qt = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, Ln = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
|
|
2845
|
+
function Fn(e, t, r = {}) {
|
|
2846
2846
|
let s;
|
|
2847
2847
|
try {
|
|
2848
2848
|
s = JSON.parse(Se.decode(t));
|
|
@@ -2851,23 +2851,23 @@ function Ln(e, t, r = {}) {
|
|
|
2851
2851
|
if (!Ie(s))
|
|
2852
2852
|
throw new Y("JWT Claims Set must be a top-level JSON object");
|
|
2853
2853
|
const { typ: n } = r;
|
|
2854
|
-
if (n && (typeof e.typ != "string" ||
|
|
2855
|
-
throw new
|
|
2854
|
+
if (n && (typeof e.typ != "string" || qt(e.typ) !== qt(n)))
|
|
2855
|
+
throw new W('unexpected "typ" JWT header value', s, "typ", "check_failed");
|
|
2856
2856
|
const { requiredClaims: a = [], issuer: i, subject: o, audience: c, maxTokenAge: h } = r, u = [...a];
|
|
2857
2857
|
h !== void 0 && u.push("iat"), c !== void 0 && u.push("aud"), o !== void 0 && u.push("sub"), i !== void 0 && u.push("iss");
|
|
2858
2858
|
for (const f of new Set(u.reverse()))
|
|
2859
2859
|
if (!(f in s))
|
|
2860
|
-
throw new
|
|
2860
|
+
throw new W(`missing required "${f}" claim`, s, f, "missing");
|
|
2861
2861
|
if (i && !(Array.isArray(i) ? i : [i]).includes(s.iss))
|
|
2862
|
-
throw new
|
|
2862
|
+
throw new W('unexpected "iss" claim value', s, "iss", "check_failed");
|
|
2863
2863
|
if (o && s.sub !== o)
|
|
2864
|
-
throw new
|
|
2865
|
-
if (c && !
|
|
2866
|
-
throw new
|
|
2864
|
+
throw new W('unexpected "sub" claim value', s, "sub", "check_failed");
|
|
2865
|
+
if (c && !Ln(s.aud, typeof c == "string" ? [c] : c))
|
|
2866
|
+
throw new W('unexpected "aud" claim value', s, "aud", "check_failed");
|
|
2867
2867
|
let d;
|
|
2868
2868
|
switch (typeof r.clockTolerance) {
|
|
2869
2869
|
case "string":
|
|
2870
|
-
d =
|
|
2870
|
+
d = xt(r.clockTolerance);
|
|
2871
2871
|
break;
|
|
2872
2872
|
case "number":
|
|
2873
2873
|
d = r.clockTolerance;
|
|
@@ -2878,38 +2878,38 @@ function Ln(e, t, r = {}) {
|
|
|
2878
2878
|
default:
|
|
2879
2879
|
throw new TypeError("Invalid clockTolerance option type");
|
|
2880
2880
|
}
|
|
2881
|
-
const { currentDate: l } = r, p =
|
|
2881
|
+
const { currentDate: l } = r, p = $n(l || /* @__PURE__ */ new Date());
|
|
2882
2882
|
if ((s.iat !== void 0 || h) && typeof s.iat != "number")
|
|
2883
|
-
throw new
|
|
2883
|
+
throw new W('"iat" claim must be a number', s, "iat", "invalid");
|
|
2884
2884
|
if (s.nbf !== void 0) {
|
|
2885
2885
|
if (typeof s.nbf != "number")
|
|
2886
|
-
throw new
|
|
2886
|
+
throw new W('"nbf" claim must be a number', s, "nbf", "invalid");
|
|
2887
2887
|
if (s.nbf > p + d)
|
|
2888
|
-
throw new
|
|
2888
|
+
throw new W('"nbf" claim timestamp check failed', s, "nbf", "check_failed");
|
|
2889
2889
|
}
|
|
2890
2890
|
if (s.exp !== void 0) {
|
|
2891
2891
|
if (typeof s.exp != "number")
|
|
2892
|
-
throw new
|
|
2892
|
+
throw new W('"exp" claim must be a number', s, "exp", "invalid");
|
|
2893
2893
|
if (s.exp <= p - d)
|
|
2894
|
-
throw new
|
|
2894
|
+
throw new Ht('"exp" claim timestamp check failed', s, "exp", "check_failed");
|
|
2895
2895
|
}
|
|
2896
2896
|
if (h) {
|
|
2897
|
-
const f = p - s.iat, y = typeof h == "number" ? h :
|
|
2897
|
+
const f = p - s.iat, y = typeof h == "number" ? h : xt(h);
|
|
2898
2898
|
if (f - d > y)
|
|
2899
|
-
throw new
|
|
2899
|
+
throw new Ht('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
|
|
2900
2900
|
if (f < 0 - d)
|
|
2901
|
-
throw new
|
|
2901
|
+
throw new W('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
|
|
2902
2902
|
}
|
|
2903
2903
|
return s;
|
|
2904
2904
|
}
|
|
2905
|
-
async function
|
|
2906
|
-
const s = await
|
|
2905
|
+
async function Kn(e, t, r) {
|
|
2906
|
+
const s = await Mn(e, t, r);
|
|
2907
2907
|
if (s.protectedHeader.crit?.includes("b64") && s.protectedHeader.b64 === !1)
|
|
2908
2908
|
throw new Y("JWTs MUST NOT use unencoded payload");
|
|
2909
|
-
const n = { payload:
|
|
2909
|
+
const n = { payload: Fn(s.protectedHeader, s.payload, r), protectedHeader: s.protectedHeader };
|
|
2910
2910
|
return typeof t == "function" ? { ...n, key: s.key } : n;
|
|
2911
2911
|
}
|
|
2912
|
-
function
|
|
2912
|
+
function Hn(e) {
|
|
2913
2913
|
if (typeof e != "string")
|
|
2914
2914
|
throw new Y("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
2915
2915
|
const { 1: t, length: r } = e.split(".");
|
|
@@ -2937,65 +2937,65 @@ function Kn(e) {
|
|
|
2937
2937
|
}
|
|
2938
2938
|
const _e = async (e) => {
|
|
2939
2939
|
try {
|
|
2940
|
-
const t = $.ALG, r = await
|
|
2941
|
-
return await
|
|
2940
|
+
const t = $.ALG, r = await En(Ys, t);
|
|
2941
|
+
return await Kn(e, r, {
|
|
2942
2942
|
issuer: $.ISSUER
|
|
2943
2943
|
});
|
|
2944
2944
|
} catch {
|
|
2945
2945
|
return;
|
|
2946
2946
|
}
|
|
2947
|
-
},
|
|
2947
|
+
}, Gn = (e) => {
|
|
2948
2948
|
try {
|
|
2949
|
-
return
|
|
2949
|
+
return Hn(e);
|
|
2950
2950
|
} catch {
|
|
2951
2951
|
return;
|
|
2952
2952
|
}
|
|
2953
2953
|
}, C = [];
|
|
2954
2954
|
for (let e = 0; e < 256; ++e)
|
|
2955
2955
|
C.push((e + 256).toString(16).slice(1));
|
|
2956
|
-
function
|
|
2956
|
+
function xn(e, t = 0) {
|
|
2957
2957
|
return (C[e[t + 0]] + C[e[t + 1]] + C[e[t + 2]] + C[e[t + 3]] + "-" + C[e[t + 4]] + C[e[t + 5]] + "-" + C[e[t + 6]] + C[e[t + 7]] + "-" + C[e[t + 8]] + C[e[t + 9]] + "-" + C[e[t + 10]] + C[e[t + 11]] + C[e[t + 12]] + C[e[t + 13]] + C[e[t + 14]] + C[e[t + 15]]).toLowerCase();
|
|
2958
2958
|
}
|
|
2959
2959
|
let Je;
|
|
2960
|
-
const
|
|
2961
|
-
function
|
|
2960
|
+
const qn = new Uint8Array(16);
|
|
2961
|
+
function Wn() {
|
|
2962
2962
|
if (!Je) {
|
|
2963
2963
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
2964
2964
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2965
2965
|
Je = crypto.getRandomValues.bind(crypto);
|
|
2966
2966
|
}
|
|
2967
|
-
return Je(
|
|
2967
|
+
return Je(qn);
|
|
2968
2968
|
}
|
|
2969
|
-
const
|
|
2970
|
-
function
|
|
2971
|
-
if (
|
|
2972
|
-
return
|
|
2969
|
+
const Bn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Wt = { randomUUID: Bn };
|
|
2970
|
+
function Bt(e, t, r) {
|
|
2971
|
+
if (Wt.randomUUID && !e)
|
|
2972
|
+
return Wt.randomUUID();
|
|
2973
2973
|
e = e || {};
|
|
2974
|
-
const s = e.random ?? e.rng?.() ??
|
|
2974
|
+
const s = e.random ?? e.rng?.() ?? Wn();
|
|
2975
2975
|
if (s.length < 16)
|
|
2976
2976
|
throw new Error("Random bytes length must be >= 16");
|
|
2977
|
-
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128,
|
|
2977
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, xn(s);
|
|
2978
2978
|
}
|
|
2979
|
-
const
|
|
2979
|
+
const Qt = globalThis.crypto, Qn = (e) => `${Bt()}${Bt()}`.slice(0, e), jn = (e) => btoa(
|
|
2980
2980
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
2981
2981
|
);
|
|
2982
|
-
async function
|
|
2983
|
-
if (!
|
|
2982
|
+
async function Vn(e) {
|
|
2983
|
+
if (!Qt.subtle)
|
|
2984
2984
|
throw new Error(
|
|
2985
2985
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
2986
2986
|
);
|
|
2987
|
-
const t = new TextEncoder().encode(e), r = await
|
|
2988
|
-
return
|
|
2987
|
+
const t = new TextEncoder().encode(e), r = await Qt.subtle.digest("SHA-256", t);
|
|
2988
|
+
return jn(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
2989
2989
|
}
|
|
2990
|
-
async function
|
|
2991
|
-
const r =
|
|
2990
|
+
async function Jn(e) {
|
|
2991
|
+
const r = Qn(43), s = await Vn(r);
|
|
2992
2992
|
return {
|
|
2993
2993
|
code_verifier: r,
|
|
2994
2994
|
code_challenge: s
|
|
2995
2995
|
};
|
|
2996
2996
|
}
|
|
2997
|
-
const
|
|
2998
|
-
var
|
|
2997
|
+
const Dr = pt(null);
|
|
2998
|
+
var Yn = Object.defineProperty, zn = (e, t, r) => t in e ? Yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ye = (e, t, r) => zn(e, typeof t != "symbol" ? t + "" : t, r);
|
|
2999
2999
|
try {
|
|
3000
3000
|
window.__VERSINI_AUTH_CLIENT__ || (window.__VERSINI_AUTH_CLIENT__ = {
|
|
3001
3001
|
version: "8.1.1",
|
|
@@ -3005,7 +3005,7 @@ try {
|
|
|
3005
3005
|
});
|
|
3006
3006
|
} catch {
|
|
3007
3007
|
}
|
|
3008
|
-
function
|
|
3008
|
+
function Q(e) {
|
|
3009
3009
|
const t = new Uint8Array(e);
|
|
3010
3010
|
let r = "";
|
|
3011
3011
|
for (const s of t)
|
|
@@ -3018,13 +3018,13 @@ function He(e) {
|
|
|
3018
3018
|
i[o] = n.charCodeAt(o);
|
|
3019
3019
|
return a;
|
|
3020
3020
|
}
|
|
3021
|
-
function
|
|
3022
|
-
return
|
|
3021
|
+
function At() {
|
|
3022
|
+
return Xn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
|
|
3023
3023
|
}
|
|
3024
|
-
const
|
|
3024
|
+
const Xn = {
|
|
3025
3025
|
stubThis: (e) => e
|
|
3026
3026
|
};
|
|
3027
|
-
function
|
|
3027
|
+
function Nr(e) {
|
|
3028
3028
|
const { id: t } = e;
|
|
3029
3029
|
return {
|
|
3030
3030
|
...e,
|
|
@@ -3037,7 +3037,7 @@ function $r(e) {
|
|
|
3037
3037
|
transports: e.transports
|
|
3038
3038
|
};
|
|
3039
3039
|
}
|
|
3040
|
-
function
|
|
3040
|
+
function Ur(e) {
|
|
3041
3041
|
return (
|
|
3042
3042
|
// Consider localhost valid as well since it's okay wrt Secure Contexts
|
|
3043
3043
|
e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)
|
|
@@ -3053,7 +3053,7 @@ class M extends Error {
|
|
|
3053
3053
|
}), this.name = n ?? s.name, this.code = r;
|
|
3054
3054
|
}
|
|
3055
3055
|
}
|
|
3056
|
-
function
|
|
3056
|
+
function Zn({ error: e, options: t }) {
|
|
3057
3057
|
const { publicKey: r } = t;
|
|
3058
3058
|
if (!r)
|
|
3059
3059
|
throw Error("options was missing required publicKey property");
|
|
@@ -3111,7 +3111,7 @@ function Xn({ error: e, options: t }) {
|
|
|
3111
3111
|
});
|
|
3112
3112
|
if (e.name === "SecurityError") {
|
|
3113
3113
|
const s = globalThis.location.hostname;
|
|
3114
|
-
if (
|
|
3114
|
+
if (Ur(s)) {
|
|
3115
3115
|
if (r.rp.id !== s)
|
|
3116
3116
|
return new M({
|
|
3117
3117
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
@@ -3139,7 +3139,7 @@ function Xn({ error: e, options: t }) {
|
|
|
3139
3139
|
}
|
|
3140
3140
|
return e;
|
|
3141
3141
|
}
|
|
3142
|
-
class
|
|
3142
|
+
class ea {
|
|
3143
3143
|
constructor() {
|
|
3144
3144
|
Object.defineProperty(this, "controller", {
|
|
3145
3145
|
enumerable: !0,
|
|
@@ -3163,15 +3163,15 @@ class Zn {
|
|
|
3163
3163
|
}
|
|
3164
3164
|
}
|
|
3165
3165
|
}
|
|
3166
|
-
const
|
|
3167
|
-
function
|
|
3168
|
-
if (e && !(
|
|
3166
|
+
const Lr = new ea(), ta = ["cross-platform", "platform"];
|
|
3167
|
+
function Fr(e) {
|
|
3168
|
+
if (e && !(ta.indexOf(e) < 0))
|
|
3169
3169
|
return e;
|
|
3170
3170
|
}
|
|
3171
|
-
async function
|
|
3171
|
+
async function ra(e) {
|
|
3172
3172
|
!e.optionsJSON && e.challenge && (console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
|
|
3173
3173
|
const { optionsJSON: t, useAutoRegister: r = !1 } = e;
|
|
3174
|
-
if (!
|
|
3174
|
+
if (!At())
|
|
3175
3175
|
throw new Error("WebAuthn is not supported in this browser");
|
|
3176
3176
|
const s = {
|
|
3177
3177
|
...t,
|
|
@@ -3180,14 +3180,14 @@ async function ta(e) {
|
|
|
3180
3180
|
...t.user,
|
|
3181
3181
|
id: He(t.user.id)
|
|
3182
3182
|
},
|
|
3183
|
-
excludeCredentials: t.excludeCredentials?.map(
|
|
3183
|
+
excludeCredentials: t.excludeCredentials?.map(Nr)
|
|
3184
3184
|
}, n = {};
|
|
3185
|
-
r && (n.mediation = "conditional"), n.publicKey = s, n.signal =
|
|
3185
|
+
r && (n.mediation = "conditional"), n.publicKey = s, n.signal = Lr.createNewAbortSignal();
|
|
3186
3186
|
let a;
|
|
3187
3187
|
try {
|
|
3188
3188
|
a = await navigator.credentials.create(n);
|
|
3189
3189
|
} catch (f) {
|
|
3190
|
-
throw
|
|
3190
|
+
throw Zn({ error: f, options: n });
|
|
3191
3191
|
}
|
|
3192
3192
|
if (!a)
|
|
3193
3193
|
throw new Error("Registration was not completed");
|
|
@@ -3205,23 +3205,23 @@ async function ta(e) {
|
|
|
3205
3205
|
if (typeof c.getPublicKey == "function")
|
|
3206
3206
|
try {
|
|
3207
3207
|
const f = c.getPublicKey();
|
|
3208
|
-
f !== null && (l =
|
|
3208
|
+
f !== null && (l = Q(f));
|
|
3209
3209
|
} catch (f) {
|
|
3210
3210
|
ze("getPublicKey()", f);
|
|
3211
3211
|
}
|
|
3212
3212
|
let p;
|
|
3213
3213
|
if (typeof c.getAuthenticatorData == "function")
|
|
3214
3214
|
try {
|
|
3215
|
-
p =
|
|
3215
|
+
p = Q(c.getAuthenticatorData());
|
|
3216
3216
|
} catch (f) {
|
|
3217
3217
|
ze("getAuthenticatorData()", f);
|
|
3218
3218
|
}
|
|
3219
3219
|
return {
|
|
3220
3220
|
id: i,
|
|
3221
|
-
rawId:
|
|
3221
|
+
rawId: Q(o),
|
|
3222
3222
|
response: {
|
|
3223
|
-
attestationObject:
|
|
3224
|
-
clientDataJSON:
|
|
3223
|
+
attestationObject: Q(c.attestationObject),
|
|
3224
|
+
clientDataJSON: Q(c.clientDataJSON),
|
|
3225
3225
|
transports: u,
|
|
3226
3226
|
publicKeyAlgorithm: d,
|
|
3227
3227
|
publicKey: l,
|
|
@@ -3229,15 +3229,15 @@ async function ta(e) {
|
|
|
3229
3229
|
},
|
|
3230
3230
|
type: h,
|
|
3231
3231
|
clientExtensionResults: a.getClientExtensionResults(),
|
|
3232
|
-
authenticatorAttachment:
|
|
3232
|
+
authenticatorAttachment: Fr(a.authenticatorAttachment)
|
|
3233
3233
|
};
|
|
3234
3234
|
}
|
|
3235
3235
|
function ze(e, t) {
|
|
3236
3236
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
3237
3237
|
`, t);
|
|
3238
3238
|
}
|
|
3239
|
-
function
|
|
3240
|
-
if (!
|
|
3239
|
+
function sa() {
|
|
3240
|
+
if (!At())
|
|
3241
3241
|
return Xe.stubThis(new Promise((t) => t(!1)));
|
|
3242
3242
|
const e = globalThis.PublicKeyCredential;
|
|
3243
3243
|
return e?.isConditionalMediationAvailable === void 0 ? Xe.stubThis(new Promise((t) => t(!1))) : Xe.stubThis(e.isConditionalMediationAvailable());
|
|
@@ -3245,7 +3245,7 @@ function ra() {
|
|
|
3245
3245
|
const Xe = {
|
|
3246
3246
|
stubThis: (e) => e
|
|
3247
3247
|
};
|
|
3248
|
-
function
|
|
3248
|
+
function na({ error: e, options: t }) {
|
|
3249
3249
|
const { publicKey: r } = t;
|
|
3250
3250
|
if (!r)
|
|
3251
3251
|
throw Error("options was missing required publicKey property");
|
|
@@ -3265,7 +3265,7 @@ function sa({ error: e, options: t }) {
|
|
|
3265
3265
|
});
|
|
3266
3266
|
if (e.name === "SecurityError") {
|
|
3267
3267
|
const s = globalThis.location.hostname;
|
|
3268
|
-
if (
|
|
3268
|
+
if (Ur(s)) {
|
|
3269
3269
|
if (r.rpId !== s)
|
|
3270
3270
|
return new M({
|
|
3271
3271
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
@@ -3286,48 +3286,48 @@ function sa({ error: e, options: t }) {
|
|
|
3286
3286
|
}
|
|
3287
3287
|
return e;
|
|
3288
3288
|
}
|
|
3289
|
-
async function
|
|
3289
|
+
async function aa(e) {
|
|
3290
3290
|
!e.optionsJSON && e.challenge && (console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
|
|
3291
3291
|
const { optionsJSON: t, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: s = !0 } = e;
|
|
3292
|
-
if (!
|
|
3292
|
+
if (!At())
|
|
3293
3293
|
throw new Error("WebAuthn is not supported in this browser");
|
|
3294
3294
|
let n;
|
|
3295
|
-
t.allowCredentials?.length !== 0 && (n = t.allowCredentials?.map(
|
|
3295
|
+
t.allowCredentials?.length !== 0 && (n = t.allowCredentials?.map(Nr));
|
|
3296
3296
|
const a = {
|
|
3297
3297
|
...t,
|
|
3298
3298
|
challenge: He(t.challenge),
|
|
3299
3299
|
allowCredentials: n
|
|
3300
3300
|
}, i = {};
|
|
3301
3301
|
if (r) {
|
|
3302
|
-
if (!await
|
|
3302
|
+
if (!await sa())
|
|
3303
3303
|
throw Error("Browser does not support WebAuthn autofill");
|
|
3304
3304
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && s)
|
|
3305
3305
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
3306
3306
|
i.mediation = "conditional", a.allowCredentials = [];
|
|
3307
3307
|
}
|
|
3308
|
-
i.publicKey = a, i.signal =
|
|
3308
|
+
i.publicKey = a, i.signal = Lr.createNewAbortSignal();
|
|
3309
3309
|
let o;
|
|
3310
3310
|
try {
|
|
3311
3311
|
o = await navigator.credentials.get(i);
|
|
3312
3312
|
} catch (p) {
|
|
3313
|
-
throw
|
|
3313
|
+
throw na({ error: p, options: i });
|
|
3314
3314
|
}
|
|
3315
3315
|
if (!o)
|
|
3316
3316
|
throw new Error("Authentication was not completed");
|
|
3317
3317
|
const { id: c, rawId: h, response: u, type: d } = o;
|
|
3318
3318
|
let l;
|
|
3319
|
-
return u.userHandle && (l =
|
|
3319
|
+
return u.userHandle && (l = Q(u.userHandle)), {
|
|
3320
3320
|
id: c,
|
|
3321
|
-
rawId:
|
|
3321
|
+
rawId: Q(h),
|
|
3322
3322
|
response: {
|
|
3323
|
-
authenticatorData:
|
|
3324
|
-
clientDataJSON:
|
|
3325
|
-
signature:
|
|
3323
|
+
authenticatorData: Q(u.authenticatorData),
|
|
3324
|
+
clientDataJSON: Q(u.clientDataJSON),
|
|
3325
|
+
signature: Q(u.signature),
|
|
3326
3326
|
userHandle: l
|
|
3327
3327
|
},
|
|
3328
3328
|
type: d,
|
|
3329
3329
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
3330
|
-
authenticatorAttachment:
|
|
3330
|
+
authenticatorAttachment: Fr(o.authenticatorAttachment)
|
|
3331
3331
|
};
|
|
3332
3332
|
}
|
|
3333
3333
|
try {
|
|
@@ -3339,42 +3339,42 @@ try {
|
|
|
3339
3339
|
});
|
|
3340
3340
|
} catch {
|
|
3341
3341
|
}
|
|
3342
|
-
function
|
|
3342
|
+
function Kr(e, t) {
|
|
3343
3343
|
window.dispatchEvent(new StorageEvent("storage", {
|
|
3344
3344
|
key: e,
|
|
3345
3345
|
newValue: t
|
|
3346
3346
|
}));
|
|
3347
3347
|
}
|
|
3348
|
-
const
|
|
3348
|
+
const jt = (e, t) => {
|
|
3349
3349
|
const r = JSON.stringify(typeof t == "function" ? t() : t);
|
|
3350
|
-
window.localStorage.setItem(e, r),
|
|
3351
|
-
},
|
|
3352
|
-
window.localStorage.removeItem(e),
|
|
3353
|
-
},
|
|
3350
|
+
window.localStorage.setItem(e, r), Kr(e, r);
|
|
3351
|
+
}, ia = (e) => {
|
|
3352
|
+
window.localStorage.removeItem(e), Kr(e, null);
|
|
3353
|
+
}, Vt = (e) => window.localStorage.getItem(e), oa = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
3354
3354
|
function Pe({ key: e, initialValue: t }) {
|
|
3355
|
-
const r =
|
|
3355
|
+
const r = os(oa, () => Vt(e)), s = G((i) => {
|
|
3356
3356
|
try {
|
|
3357
3357
|
const o = typeof i == "function" ? i(JSON.parse(r)) : i;
|
|
3358
|
-
o == null ?
|
|
3358
|
+
o == null ? ia(e) : jt(e, o);
|
|
3359
3359
|
} catch (o) {
|
|
3360
3360
|
console.warn(o);
|
|
3361
3361
|
}
|
|
3362
3362
|
}, [
|
|
3363
3363
|
e,
|
|
3364
3364
|
r
|
|
3365
|
-
]), n =
|
|
3365
|
+
]), n = G(() => {
|
|
3366
3366
|
s(t);
|
|
3367
3367
|
}, [
|
|
3368
3368
|
t,
|
|
3369
3369
|
s
|
|
3370
|
-
]), a =
|
|
3370
|
+
]), a = G(() => {
|
|
3371
3371
|
s(null);
|
|
3372
3372
|
}, [
|
|
3373
3373
|
s
|
|
3374
3374
|
]);
|
|
3375
|
-
return
|
|
3375
|
+
return re(() => {
|
|
3376
3376
|
try {
|
|
3377
|
-
|
|
3377
|
+
Vt(e) === null && typeof t < "u" && jt(e, t);
|
|
3378
3378
|
} catch (i) {
|
|
3379
3379
|
console.warn(i);
|
|
3380
3380
|
}
|
|
@@ -3391,30 +3391,30 @@ function Pe({ key: e, initialValue: t }) {
|
|
|
3391
3391
|
const P = [];
|
|
3392
3392
|
for (let e = 0; e < 256; ++e)
|
|
3393
3393
|
P.push((e + 256).toString(16).slice(1));
|
|
3394
|
-
function
|
|
3394
|
+
function ca(e, t = 0) {
|
|
3395
3395
|
return (P[e[t + 0]] + P[e[t + 1]] + P[e[t + 2]] + P[e[t + 3]] + "-" + P[e[t + 4]] + P[e[t + 5]] + "-" + P[e[t + 6]] + P[e[t + 7]] + "-" + P[e[t + 8]] + P[e[t + 9]] + "-" + P[e[t + 10]] + P[e[t + 11]] + P[e[t + 12]] + P[e[t + 13]] + P[e[t + 14]] + P[e[t + 15]]).toLowerCase();
|
|
3396
3396
|
}
|
|
3397
3397
|
let Ze;
|
|
3398
|
-
const
|
|
3399
|
-
function
|
|
3398
|
+
const ua = new Uint8Array(16);
|
|
3399
|
+
function la() {
|
|
3400
3400
|
if (!Ze) {
|
|
3401
3401
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
3402
3402
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3403
3403
|
Ze = crypto.getRandomValues.bind(crypto);
|
|
3404
3404
|
}
|
|
3405
|
-
return Ze(
|
|
3405
|
+
return Ze(ua);
|
|
3406
3406
|
}
|
|
3407
|
-
const
|
|
3407
|
+
const da = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Jt = { randomUUID: da };
|
|
3408
3408
|
function et(e, t, r) {
|
|
3409
|
-
if (
|
|
3410
|
-
return
|
|
3409
|
+
if (Jt.randomUUID && !e)
|
|
3410
|
+
return Jt.randomUUID();
|
|
3411
3411
|
e = e || {};
|
|
3412
|
-
const s = e.random ?? e.rng?.() ??
|
|
3412
|
+
const s = e.random ?? e.rng?.() ?? la();
|
|
3413
3413
|
if (s.length < 16)
|
|
3414
3414
|
throw new Error("Random bytes length must be >= 16");
|
|
3415
|
-
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128,
|
|
3415
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, ca(s);
|
|
3416
3416
|
}
|
|
3417
|
-
const fe = "Your session has expired. For your security, please log in again to continue.",
|
|
3417
|
+
const fe = "Your session has expired. For your security, please log in again to continue.", ha = "Your session has been successfully terminated.", tt = "Login failed. Please try again.", fa = "Error getting access token, please re-authenticate.", pa = "You forgot to wrap your component in <AuthProvider>.", ke = "@@auth@@", ve = "LOADING", $e = "LOGIN", Hr = "LOGOUT", Oe = "success", j = "failure", Gr = "include", xr = "POST", qr = "application/json", Me = {
|
|
3418
3418
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
3419
3419
|
$clientId: String!,
|
|
3420
3420
|
$username: String!,
|
|
@@ -3521,12 +3521,12 @@ const fe = "Your session has expired. For your security, please log in again to
|
|
|
3521
3521
|
}) => {
|
|
3522
3522
|
try {
|
|
3523
3523
|
const a = `Bearer ${e}`, i = await fetch(`${n}/graphql`, {
|
|
3524
|
-
credentials:
|
|
3525
|
-
method:
|
|
3524
|
+
credentials: Gr,
|
|
3525
|
+
method: xr,
|
|
3526
3526
|
headers: {
|
|
3527
3527
|
authorization: a,
|
|
3528
|
-
"Content-Type":
|
|
3529
|
-
[
|
|
3528
|
+
"Content-Type": qr,
|
|
3529
|
+
[Rr.CLIENT_ID]: `${r}`
|
|
3530
3530
|
},
|
|
3531
3531
|
body: JSON.stringify({
|
|
3532
3532
|
query: t.schema,
|
|
@@ -3551,11 +3551,11 @@ const fe = "Your session has expired. For your security, please log in again to
|
|
|
3551
3551
|
}) => {
|
|
3552
3552
|
try {
|
|
3553
3553
|
const n = await fetch(`${s}/${e}`, {
|
|
3554
|
-
credentials:
|
|
3555
|
-
method:
|
|
3554
|
+
credentials: Gr,
|
|
3555
|
+
method: xr,
|
|
3556
3556
|
headers: {
|
|
3557
|
-
"Content-Type":
|
|
3558
|
-
[
|
|
3557
|
+
"Content-Type": qr,
|
|
3558
|
+
[Rr.CLIENT_ID]: `${t}`
|
|
3559
3559
|
},
|
|
3560
3560
|
body: JSON.stringify(r)
|
|
3561
3561
|
});
|
|
@@ -3569,21 +3569,21 @@ const fe = "Your session has expired. For your security, please log in again to
|
|
|
3569
3569
|
} catch (n) {
|
|
3570
3570
|
return console.error(n), { status: j, data: [] };
|
|
3571
3571
|
}
|
|
3572
|
-
},
|
|
3572
|
+
}, ya = process.env.NODE_ENV === "production", ma = !ya, Wr = {
|
|
3573
3573
|
isLoading: !0,
|
|
3574
3574
|
isAuthenticated: !1,
|
|
3575
3575
|
user: void 0,
|
|
3576
3576
|
logoutReason: "",
|
|
3577
3577
|
debug: !1,
|
|
3578
3578
|
authenticationType: ""
|
|
3579
|
-
},
|
|
3579
|
+
}, Ea = (e) => {
|
|
3580
3580
|
try {
|
|
3581
|
-
const t =
|
|
3581
|
+
const t = Gn(e);
|
|
3582
3582
|
return t ? t[$.USER_ID_KEY] : "";
|
|
3583
3583
|
} catch {
|
|
3584
3584
|
return "";
|
|
3585
3585
|
}
|
|
3586
|
-
},
|
|
3586
|
+
}, ga = async ({
|
|
3587
3587
|
userId: e,
|
|
3588
3588
|
clientId: t,
|
|
3589
3589
|
domain: r,
|
|
@@ -3608,7 +3608,7 @@ const fe = "Your session has expired. For your security, please log in again to
|
|
|
3608
3608
|
status: j
|
|
3609
3609
|
};
|
|
3610
3610
|
}
|
|
3611
|
-
},
|
|
3611
|
+
}, Sa = async ({
|
|
3612
3612
|
username: e,
|
|
3613
3613
|
password: t,
|
|
3614
3614
|
clientId: r,
|
|
@@ -3653,7 +3653,7 @@ const fe = "Your session has expired. For your security, please log in again to
|
|
|
3653
3653
|
status: !1
|
|
3654
3654
|
};
|
|
3655
3655
|
}
|
|
3656
|
-
},
|
|
3656
|
+
}, wa = async ({
|
|
3657
3657
|
nonce: e,
|
|
3658
3658
|
clientId: t,
|
|
3659
3659
|
code_challenge: r,
|
|
@@ -3683,7 +3683,7 @@ const fe = "Your session has expired. For your security, please log in again to
|
|
|
3683
3683
|
data: ""
|
|
3684
3684
|
};
|
|
3685
3685
|
}
|
|
3686
|
-
},
|
|
3686
|
+
}, Ta = async ({
|
|
3687
3687
|
clientId: e,
|
|
3688
3688
|
userId: t,
|
|
3689
3689
|
nonce: r,
|
|
@@ -3720,7 +3720,7 @@ const fe = "Your session has expired. For your security, please log in again to
|
|
|
3720
3720
|
};
|
|
3721
3721
|
}
|
|
3722
3722
|
};
|
|
3723
|
-
class
|
|
3723
|
+
class va {
|
|
3724
3724
|
constructor(t = null, r = null) {
|
|
3725
3725
|
Ye(this, "refreshTokenPromise", null), Ye(this, "accessToken"), Ye(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
3726
3726
|
}
|
|
@@ -3753,7 +3753,7 @@ class Ta {
|
|
|
3753
3753
|
}) {
|
|
3754
3754
|
const i = await _e(this.refreshToken);
|
|
3755
3755
|
if (i && i.payload[$.USER_ID_KEY] !== "") {
|
|
3756
|
-
const o = await
|
|
3756
|
+
const o = await Ta({
|
|
3757
3757
|
endpoint: t,
|
|
3758
3758
|
clientId: r,
|
|
3759
3759
|
userId: s,
|
|
@@ -3776,8 +3776,8 @@ class Ta {
|
|
|
3776
3776
|
}
|
|
3777
3777
|
}
|
|
3778
3778
|
const me = () => {
|
|
3779
|
-
throw new Error(
|
|
3780
|
-
},
|
|
3779
|
+
throw new Error(pa);
|
|
3780
|
+
}, Br = pt({
|
|
3781
3781
|
isAuthenticated: !1,
|
|
3782
3782
|
isLoading: !1,
|
|
3783
3783
|
login: me,
|
|
@@ -3788,18 +3788,18 @@ const me = () => {
|
|
|
3788
3788
|
loginWithPasskey: me,
|
|
3789
3789
|
logoutReason: "",
|
|
3790
3790
|
authenticationType: ""
|
|
3791
|
-
}),
|
|
3792
|
-
...
|
|
3793
|
-
}),
|
|
3791
|
+
}), Aa = () => ({
|
|
3792
|
+
...yt(Br)
|
|
3793
|
+
}), Ra = (e) => G(
|
|
3794
3794
|
(...t) => {
|
|
3795
3795
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
3796
3796
|
},
|
|
3797
3797
|
[e]
|
|
3798
|
-
),
|
|
3799
|
-
state:
|
|
3798
|
+
), ba = ns.createContext({
|
|
3799
|
+
state: Wr,
|
|
3800
3800
|
dispatch: () => {
|
|
3801
3801
|
}
|
|
3802
|
-
}),
|
|
3802
|
+
}), Ia = (e, t) => t?.type === ve ? {
|
|
3803
3803
|
...e,
|
|
3804
3804
|
isLoading: t.payload.isLoading
|
|
3805
3805
|
} : t?.type === $e ? {
|
|
@@ -3809,28 +3809,28 @@ const me = () => {
|
|
|
3809
3809
|
user: t.payload.user,
|
|
3810
3810
|
authenticationType: t.payload.authenticationType,
|
|
3811
3811
|
logoutReason: ""
|
|
3812
|
-
} : t?.type ===
|
|
3812
|
+
} : t?.type === Hr ? {
|
|
3813
3813
|
...e,
|
|
3814
3814
|
isLoading: !1,
|
|
3815
3815
|
isAuthenticated: !1,
|
|
3816
3816
|
user: void 0,
|
|
3817
3817
|
authenticationType: "",
|
|
3818
3818
|
logoutReason: t.payload.logoutReason
|
|
3819
|
-
} : e,
|
|
3820
|
-
const t =
|
|
3821
|
-
return /* @__PURE__ */ S(
|
|
3822
|
-
},
|
|
3819
|
+
} : e, _a = ({ children: e }) => {
|
|
3820
|
+
const t = Aa();
|
|
3821
|
+
return /* @__PURE__ */ S(Dr.Provider, { value: t, children: e });
|
|
3822
|
+
}, Yt = ({
|
|
3823
3823
|
children: e,
|
|
3824
3824
|
sessionExpiration: t,
|
|
3825
3825
|
clientId: r,
|
|
3826
3826
|
domain: s = "",
|
|
3827
3827
|
debug: n = !1,
|
|
3828
|
-
endpoint: a =
|
|
3828
|
+
endpoint: a = ma ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
|
|
3829
3829
|
}) => {
|
|
3830
|
-
const [i, o] =
|
|
3831
|
-
...
|
|
3830
|
+
const [i, o] = as(Ia, {
|
|
3831
|
+
...Wr,
|
|
3832
3832
|
debug: n
|
|
3833
|
-
}), c =
|
|
3833
|
+
}), c = Ra(n), h = is(!1), [u, d, , l] = Pe({
|
|
3834
3834
|
key: `${ke}::${r}::@@user@@`
|
|
3835
3835
|
}), [p, f, , y] = Pe({
|
|
3836
3836
|
key: `${ke}::${r}::@@access@@`
|
|
@@ -3838,36 +3838,36 @@ const me = () => {
|
|
|
3838
3838
|
{
|
|
3839
3839
|
key: `${ke}::${r}::@@refresh@@`
|
|
3840
3840
|
}
|
|
3841
|
-
), [H,
|
|
3841
|
+
), [H, x, , q] = Pe({
|
|
3842
3842
|
key: `${ke}::${r}::@@nonce@@`
|
|
3843
|
-
}), Te = new
|
|
3844
|
-
c("removeLocalStorage: removing local storage"), l(), y(), L(),
|
|
3843
|
+
}), Te = new va(p, _), N = G(() => {
|
|
3844
|
+
c("removeLocalStorage: removing local storage"), l(), y(), L(), q();
|
|
3845
3845
|
}, [
|
|
3846
3846
|
y,
|
|
3847
3847
|
l,
|
|
3848
|
-
|
|
3848
|
+
q,
|
|
3849
3849
|
L,
|
|
3850
3850
|
c
|
|
3851
|
-
]), I =
|
|
3851
|
+
]), I = G(
|
|
3852
3852
|
(m) => {
|
|
3853
3853
|
c(
|
|
3854
3854
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
3855
3855
|
m
|
|
3856
3856
|
), o({
|
|
3857
|
-
type:
|
|
3857
|
+
type: Hr,
|
|
3858
3858
|
payload: {
|
|
3859
3859
|
logoutReason: m || fe
|
|
3860
3860
|
}
|
|
3861
3861
|
}), N(), o({ type: ve, payload: { isLoading: !1 } });
|
|
3862
3862
|
},
|
|
3863
3863
|
[N, c]
|
|
3864
|
-
), F =
|
|
3864
|
+
), F = G(
|
|
3865
3865
|
async (m) => {
|
|
3866
3866
|
c("invalidateAndLogout: invalidating and logging out");
|
|
3867
|
-
const { user: O } = i, E = O?.userId ||
|
|
3867
|
+
const { user: O } = i, E = O?.userId || Ea(u);
|
|
3868
3868
|
E || c(
|
|
3869
3869
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
3870
|
-
), await
|
|
3870
|
+
), await ga({
|
|
3871
3871
|
userId: E,
|
|
3872
3872
|
clientId: r,
|
|
3873
3873
|
domain: s,
|
|
@@ -3885,7 +3885,7 @@ const me = () => {
|
|
|
3885
3885
|
a
|
|
3886
3886
|
]
|
|
3887
3887
|
);
|
|
3888
|
-
|
|
3888
|
+
re(() => {
|
|
3889
3889
|
if (!h.current)
|
|
3890
3890
|
return i.isLoading && u !== null ? (async () => {
|
|
3891
3891
|
try {
|
|
@@ -3913,15 +3913,15 @@ const me = () => {
|
|
|
3913
3913
|
const te = async (m, O) => {
|
|
3914
3914
|
o({ type: ve, payload: { isLoading: !0 } }), N();
|
|
3915
3915
|
const E = et();
|
|
3916
|
-
|
|
3917
|
-
const { code_verifier: le, code_challenge:
|
|
3916
|
+
x(E), c("login: Logging in with password");
|
|
3917
|
+
const { code_verifier: le, code_challenge: rs } = await Jn(), bt = await wa({
|
|
3918
3918
|
endpoint: a,
|
|
3919
3919
|
nonce: E,
|
|
3920
3920
|
clientId: r,
|
|
3921
|
-
code_challenge:
|
|
3921
|
+
code_challenge: rs
|
|
3922
3922
|
});
|
|
3923
|
-
if (
|
|
3924
|
-
const de = await
|
|
3923
|
+
if (bt.status) {
|
|
3924
|
+
const de = await Sa({
|
|
3925
3925
|
endpoint: a,
|
|
3926
3926
|
username: m,
|
|
3927
3927
|
password: O,
|
|
@@ -3929,7 +3929,7 @@ const me = () => {
|
|
|
3929
3929
|
sessionExpiration: t,
|
|
3930
3930
|
nonce: E,
|
|
3931
3931
|
type: Ae.CODE,
|
|
3932
|
-
code:
|
|
3932
|
+
code: bt.data,
|
|
3933
3933
|
code_verifier: le,
|
|
3934
3934
|
domain: s,
|
|
3935
3935
|
ua: navigator.userAgent
|
|
@@ -3948,8 +3948,8 @@ const me = () => {
|
|
|
3948
3948
|
}
|
|
3949
3949
|
return !1;
|
|
3950
3950
|
}, ue = async (m) => {
|
|
3951
|
-
m?.preventDefault(), await F(
|
|
3952
|
-
},
|
|
3951
|
+
m?.preventDefault(), await F(ha);
|
|
3952
|
+
}, Xr = async () => {
|
|
3953
3953
|
const { isAuthenticated: m, user: O } = i;
|
|
3954
3954
|
try {
|
|
3955
3955
|
if (m && O && O.userId) {
|
|
@@ -3977,9 +3977,9 @@ const me = () => {
|
|
|
3977
3977
|
} catch {
|
|
3978
3978
|
return c(
|
|
3979
3979
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
3980
|
-
), await F(
|
|
3980
|
+
), await F(fa), "";
|
|
3981
3981
|
}
|
|
3982
|
-
},
|
|
3982
|
+
}, Zr = () => i.isAuthenticated && u ? u : "", es = async () => {
|
|
3983
3983
|
const { user: m } = i;
|
|
3984
3984
|
let O = await ye({
|
|
3985
3985
|
endpoint: a,
|
|
@@ -3994,7 +3994,7 @@ const me = () => {
|
|
|
3994
3994
|
});
|
|
3995
3995
|
if (O.status)
|
|
3996
3996
|
try {
|
|
3997
|
-
const E = await
|
|
3997
|
+
const E = await ra({
|
|
3998
3998
|
optionsJSON: O.data
|
|
3999
3999
|
});
|
|
4000
4000
|
return O = await ye({
|
|
@@ -4024,10 +4024,10 @@ const me = () => {
|
|
|
4024
4024
|
}), !1;
|
|
4025
4025
|
}
|
|
4026
4026
|
return !1;
|
|
4027
|
-
},
|
|
4027
|
+
}, ts = async () => {
|
|
4028
4028
|
o({ type: ve, payload: { isLoading: !0 } }), N();
|
|
4029
4029
|
const m = et();
|
|
4030
|
-
|
|
4030
|
+
x(m), c("loginWithPasskey");
|
|
4031
4031
|
const O = et();
|
|
4032
4032
|
let E = await ye({
|
|
4033
4033
|
endpoint: a,
|
|
@@ -4041,7 +4041,7 @@ const me = () => {
|
|
|
4041
4041
|
});
|
|
4042
4042
|
if (E.status)
|
|
4043
4043
|
try {
|
|
4044
|
-
const le = await
|
|
4044
|
+
const le = await aa({
|
|
4045
4045
|
optionsJSON: E.data
|
|
4046
4046
|
});
|
|
4047
4047
|
return E = await ye({
|
|
@@ -4087,19 +4087,19 @@ const me = () => {
|
|
|
4087
4087
|
}
|
|
4088
4088
|
return !1;
|
|
4089
4089
|
};
|
|
4090
|
-
return /* @__PURE__ */ S(
|
|
4091
|
-
|
|
4090
|
+
return /* @__PURE__ */ S(ba.Provider, { value: { state: i, dispatch: o }, children: /* @__PURE__ */ S(
|
|
4091
|
+
Br.Provider,
|
|
4092
4092
|
{
|
|
4093
4093
|
value: {
|
|
4094
4094
|
...i,
|
|
4095
4095
|
login: te,
|
|
4096
4096
|
logout: ue,
|
|
4097
|
-
getAccessToken:
|
|
4098
|
-
getIdToken:
|
|
4099
|
-
registeringForPasskey:
|
|
4100
|
-
loginWithPasskey:
|
|
4097
|
+
getAccessToken: Xr,
|
|
4098
|
+
getIdToken: Zr,
|
|
4099
|
+
registeringForPasskey: es,
|
|
4100
|
+
loginWithPasskey: ts
|
|
4101
4101
|
},
|
|
4102
|
-
children: /* @__PURE__ */ S(
|
|
4102
|
+
children: /* @__PURE__ */ S(_a, { children: e })
|
|
4103
4103
|
}
|
|
4104
4104
|
) });
|
|
4105
4105
|
};
|
|
@@ -4112,35 +4112,53 @@ try {
|
|
|
4112
4112
|
});
|
|
4113
4113
|
} catch {
|
|
4114
4114
|
}
|
|
4115
|
-
const
|
|
4116
|
-
const e =
|
|
4115
|
+
const Oa = () => {
|
|
4116
|
+
const e = yt(Dr);
|
|
4117
4117
|
if (!e)
|
|
4118
4118
|
throw new Error("useAuth must be used within an AuthHookProvider");
|
|
4119
4119
|
return e;
|
|
4120
|
-
},
|
|
4120
|
+
}, Ei = "I'm having trouble right now. Please try again later.", gi = "action-search", Si = "action-sort", wi = "action-toggle-prompt", Ti = "action-reset-prompt", Qr = "sassy-saint-", vi = "search", Ai = "sort", Ri = "sort-timestamp", bi = "sort-token-usage", Ii = "sort-memory-direction", _i = "sort-memory-column", Oi = "favorites-only", Ci = "keyword-match-all", Pi = "usage-view-mode", ki = "usage-time-range", Mi = "usage-selected-month", $i = "private-disclosure", Di = "reasoning-disclosure", jr = "service-worker", Ni = "chat-id", Ui = "sassysaint-oled-mode", Li = "sassysaint-full-screen", zt = "data-oled-mode", Xt = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Fi = 20, Ki = 30, Hi = "av-prompt", Gi = "av-prompt-editable", xi = "size-5 sm:size-4", qi = 30, Wi = 15, Bi = 130, Qi = 160, ji = 16, Vi = 24, Ji = 16, Yi = 76, ht = "sw-update-available";
|
|
4121
|
+
function zi() {
|
|
4122
|
+
const [e, t] = rr(!1);
|
|
4123
|
+
re(() => {
|
|
4124
|
+
const s = () => {
|
|
4125
|
+
t(!0);
|
|
4126
|
+
};
|
|
4127
|
+
return window.addEventListener(ht, s), () => {
|
|
4128
|
+
window.removeEventListener(
|
|
4129
|
+
ht,
|
|
4130
|
+
s
|
|
4131
|
+
);
|
|
4132
|
+
};
|
|
4133
|
+
}, []);
|
|
4134
|
+
const r = G(() => {
|
|
4135
|
+
e && window.location.reload();
|
|
4136
|
+
}, [e]);
|
|
4137
|
+
return { updateAvailable: e, applyUpdate: r };
|
|
4138
|
+
}
|
|
4121
4139
|
let rt = null, z = !1;
|
|
4122
4140
|
typeof window < "u" && "serviceWorker" in navigator && navigator.serviceWorker.addEventListener("controllerchange", () => {
|
|
4123
4141
|
z && (z = !1, window.location.reload());
|
|
4124
4142
|
});
|
|
4125
|
-
function
|
|
4143
|
+
function Rt() {
|
|
4126
4144
|
return "serviceWorker" in navigator;
|
|
4127
4145
|
}
|
|
4128
|
-
function
|
|
4146
|
+
function ft() {
|
|
4129
4147
|
const e = localStorage.getItem(
|
|
4130
|
-
|
|
4148
|
+
Qr + jr
|
|
4131
4149
|
);
|
|
4132
4150
|
return e === null ? !1 : e === "true";
|
|
4133
4151
|
}
|
|
4134
|
-
function
|
|
4152
|
+
function Ca(e) {
|
|
4135
4153
|
localStorage.setItem(
|
|
4136
|
-
|
|
4154
|
+
Qr + jr,
|
|
4137
4155
|
e.toString()
|
|
4138
4156
|
);
|
|
4139
4157
|
}
|
|
4140
|
-
async function
|
|
4141
|
-
if (!
|
|
4158
|
+
async function Vr() {
|
|
4159
|
+
if (!ft())
|
|
4142
4160
|
return !1;
|
|
4143
|
-
if (!
|
|
4161
|
+
if (!Rt())
|
|
4144
4162
|
return console.warn("[SW] Service workers not supported"), !1;
|
|
4145
4163
|
try {
|
|
4146
4164
|
return rt = await navigator.serviceWorker.register("/sw.js", {
|
|
@@ -4148,15 +4166,15 @@ async function Qr() {
|
|
|
4148
4166
|
}), rt.addEventListener("updatefound", () => {
|
|
4149
4167
|
const e = rt?.installing;
|
|
4150
4168
|
e && e.addEventListener("statechange", () => {
|
|
4151
|
-
e.state === "installed" && navigator.serviceWorker.controller &&
|
|
4169
|
+
e.state === "installed" && navigator.serviceWorker.controller && window.dispatchEvent(new CustomEvent(ht));
|
|
4152
4170
|
});
|
|
4153
4171
|
}), !0;
|
|
4154
4172
|
} catch (e) {
|
|
4155
4173
|
return console.error("[SW] Service worker registration failed:", e), !1;
|
|
4156
4174
|
}
|
|
4157
4175
|
}
|
|
4158
|
-
async function
|
|
4159
|
-
if (!
|
|
4176
|
+
async function Pa() {
|
|
4177
|
+
if (!Rt())
|
|
4160
4178
|
return !1;
|
|
4161
4179
|
try {
|
|
4162
4180
|
const e = await navigator.serviceWorker.getRegistration();
|
|
@@ -4165,19 +4183,19 @@ async function Ca() {
|
|
|
4165
4183
|
return console.error("[SW] Service worker un-registration failed:", e), !1;
|
|
4166
4184
|
}
|
|
4167
4185
|
}
|
|
4168
|
-
async function
|
|
4169
|
-
if (
|
|
4186
|
+
async function Xi(e) {
|
|
4187
|
+
if (Ca(e), e) {
|
|
4170
4188
|
z = !0;
|
|
4171
4189
|
try {
|
|
4172
4190
|
sessionStorage.setItem("sw-toggle-pending", "enabled");
|
|
4173
4191
|
} catch {
|
|
4174
4192
|
}
|
|
4175
|
-
await
|
|
4193
|
+
await Vr(), navigator.serviceWorker.controller && z && (z = !1, window.location.reload());
|
|
4176
4194
|
try {
|
|
4177
4195
|
navigator.serviceWorker.ready.then(() => {
|
|
4178
|
-
z &&
|
|
4196
|
+
z && ft() && (z = !1, window.location.reload());
|
|
4179
4197
|
}), setTimeout(() => {
|
|
4180
|
-
z &&
|
|
4198
|
+
z && ft() && (z = !1, window.location.reload());
|
|
4181
4199
|
}, 3e3);
|
|
4182
4200
|
} catch {
|
|
4183
4201
|
}
|
|
@@ -4187,14 +4205,14 @@ async function Yi(e) {
|
|
|
4187
4205
|
} catch {
|
|
4188
4206
|
}
|
|
4189
4207
|
try {
|
|
4190
|
-
|
|
4208
|
+
Rt() && await ka();
|
|
4191
4209
|
} catch (t) {
|
|
4192
4210
|
console.warn("[SW] Failed to invalidate cache:", t);
|
|
4193
4211
|
}
|
|
4194
|
-
await
|
|
4212
|
+
await Pa(), window.location.reload();
|
|
4195
4213
|
}
|
|
4196
4214
|
}
|
|
4197
|
-
async function
|
|
4215
|
+
async function ka() {
|
|
4198
4216
|
try {
|
|
4199
4217
|
if ("caches" in window) {
|
|
4200
4218
|
const e = await caches.keys();
|
|
@@ -4220,7 +4238,7 @@ async function Pa() {
|
|
|
4220
4238
|
function st() {
|
|
4221
4239
|
return "unknown";
|
|
4222
4240
|
}
|
|
4223
|
-
async function
|
|
4241
|
+
async function Zi(e = {}) {
|
|
4224
4242
|
const { urlLimitPerCache: t } = e;
|
|
4225
4243
|
if (!("caches" in window))
|
|
4226
4244
|
return { version: st(), caches: [], totalItems: 0 };
|
|
@@ -4247,7 +4265,7 @@ async function zi(e = {}) {
|
|
|
4247
4265
|
return console.warn("[SW] getCacheInfo failed:", r), { version: st(), caches: [], totalItems: 0 };
|
|
4248
4266
|
}
|
|
4249
4267
|
}
|
|
4250
|
-
const
|
|
4268
|
+
const Jr = process.env.NODE_ENV === "production", Ge = !Jr, Yr = Ge ? "gizmette.local.com" : "gizmette.com", Ma = async () => {
|
|
4251
4269
|
const e = {
|
|
4252
4270
|
/**
|
|
4253
4271
|
* A boolean value that indicates the application would like to receive the
|
|
@@ -4290,7 +4308,7 @@ const jr = process.env.NODE_ENV === "production", Ge = !jr, Vr = Ge ? "gizmette.
|
|
|
4290
4308
|
e
|
|
4291
4309
|
);
|
|
4292
4310
|
});
|
|
4293
|
-
},
|
|
4311
|
+
}, $a = (e, t, r) => t ? Object.keys(t).map((s) => /* @__PURE__ */ S("dl", { className: "my-0", children: /* @__PURE__ */ ss("div", { className: "flex items-center justify-between", children: [
|
|
4294
4312
|
/* @__PURE__ */ S(
|
|
4295
4313
|
"dt",
|
|
4296
4314
|
{
|
|
@@ -4311,14 +4329,14 @@ const jr = process.env.NODE_ENV === "production", Ge = !jr, Vr = Ge ? "gizmette.
|
|
|
4311
4329
|
children: t[s]
|
|
4312
4330
|
}
|
|
4313
4331
|
)
|
|
4314
|
-
] }) }, `${e}-${s}`)) : null,
|
|
4332
|
+
] }) }, `${e}-${s}`)) : null, Da = ({
|
|
4315
4333
|
isAuthenticated: e,
|
|
4316
4334
|
extraClass: t,
|
|
4317
4335
|
oledMode: r
|
|
4318
4336
|
}) => De("px-4", "flex-1 overflow-y-auto", e ? "pt-0" : "pt-10", t, {
|
|
4319
4337
|
"bg-surface-darker/95 dark:bg-surface-darker": r,
|
|
4320
4338
|
"bg-surface-darker": !r
|
|
4321
|
-
}),
|
|
4339
|
+
}), Na = ({
|
|
4322
4340
|
extraClass: e,
|
|
4323
4341
|
fullScreen: t
|
|
4324
4342
|
} = {}) => De(
|
|
@@ -4331,7 +4349,7 @@ const jr = process.env.NODE_ENV === "production", Ge = !jr, Vr = Ge ? "gizmette.
|
|
|
4331
4349
|
"md:max-w-svw": t
|
|
4332
4350
|
},
|
|
4333
4351
|
e
|
|
4334
|
-
),
|
|
4352
|
+
), Ua = () => !!window?.__VERSINI_DIGGIDY_TAURI__, La = ({
|
|
4335
4353
|
autoClose: e = 3e3,
|
|
4336
4354
|
containerId: t,
|
|
4337
4355
|
position: r = "top-center",
|
|
@@ -4355,9 +4373,9 @@ const jr = process.env.NODE_ENV === "production", Ge = !jr, Vr = Ge ? "gizmette.
|
|
|
4355
4373
|
theme: c,
|
|
4356
4374
|
transition: h,
|
|
4357
4375
|
icon: u
|
|
4358
|
-
}),
|
|
4359
|
-
e ? document.documentElement.setAttribute(
|
|
4360
|
-
},
|
|
4376
|
+
}), Fa = (e, t) => t === "ready" && !!e && e.length > 0, Ka = (e) => {
|
|
4377
|
+
e ? document.documentElement.setAttribute(zt, "true") : document.documentElement.removeAttribute(zt);
|
|
4378
|
+
}, Ha = new Intl.DateTimeFormat("en-US", {
|
|
4361
4379
|
year: "numeric",
|
|
4362
4380
|
month: "short",
|
|
4363
4381
|
day: "2-digit",
|
|
@@ -4365,11 +4383,11 @@ const jr = process.env.NODE_ENV === "production", Ge = !jr, Vr = Ge ? "gizmette.
|
|
|
4365
4383
|
minute: "2-digit",
|
|
4366
4384
|
hour12: !0
|
|
4367
4385
|
});
|
|
4368
|
-
function
|
|
4369
|
-
const t = typeof e == "string" ? new Date(parseInt(e, 10)) : new Date(e), r =
|
|
4386
|
+
function Ga(e) {
|
|
4387
|
+
const t = typeof e == "string" ? new Date(parseInt(e, 10)) : new Date(e), r = Ha.formatToParts(t), s = (n) => r.find((a) => a.type === n)?.value ?? "";
|
|
4370
4388
|
return `${s("month")} ${s("day")}, ${s("year")} - ${s("hour")}:${s("minute")} ${s("dayPeriod")}`;
|
|
4371
4389
|
}
|
|
4372
|
-
const
|
|
4390
|
+
const eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: Yr, applyOledMode: Ka, canEvaluateModels: Fa, formatTimestamp: Ga, getCurrentGeoLocation: Ma, getLayoutPaddingClass: Na, getMessageContaintWrapperClass: Da, isDev: Ge, isProd: Jr, isTauri: Ua, renderDataAsList: $a, toastOptions: La }, Symbol.toStringTag, { value: "Module" })), w = {
|
|
4373
4391
|
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
|
4374
4392
|
location(latitude: $latitude, longitude: $longitude) {
|
|
4375
4393
|
country
|
|
@@ -4701,12 +4719,12 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4701
4719
|
schema: w.RESTORE_MEMORY,
|
|
4702
4720
|
method: "restoreMemory"
|
|
4703
4721
|
}
|
|
4704
|
-
},
|
|
4722
|
+
}, xa = process.env.PUBLIC_SASSY_API_SERVER_URL, xe = async ({
|
|
4705
4723
|
query: e,
|
|
4706
4724
|
data: t,
|
|
4707
4725
|
headers: r = {},
|
|
4708
4726
|
...s
|
|
4709
|
-
}) => await fetch(`${
|
|
4727
|
+
}) => await fetch(`${xa}/graphql`, {
|
|
4710
4728
|
method: "POST",
|
|
4711
4729
|
credentials: "include",
|
|
4712
4730
|
headers: {
|
|
@@ -4751,7 +4769,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4751
4769
|
} catch (r) {
|
|
4752
4770
|
throw console.error(r), r;
|
|
4753
4771
|
}
|
|
4754
|
-
},
|
|
4772
|
+
}, to = async ({
|
|
4755
4773
|
provider: e,
|
|
4756
4774
|
model: t,
|
|
4757
4775
|
accessToken: r,
|
|
@@ -4766,7 +4784,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4766
4784
|
type: R.SET_USER_PREFERENCES,
|
|
4767
4785
|
params: n
|
|
4768
4786
|
});
|
|
4769
|
-
},
|
|
4787
|
+
}, ro = async ({
|
|
4770
4788
|
plan: e,
|
|
4771
4789
|
accessToken: t,
|
|
4772
4790
|
username: r
|
|
@@ -4787,13 +4805,13 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4787
4805
|
USAGE: "usage",
|
|
4788
4806
|
USER_MEMORIES: "userMemories",
|
|
4789
4807
|
EXPIRED_MEMORIES: "expiredMemories"
|
|
4790
|
-
},
|
|
4808
|
+
}, so = () => Z({
|
|
4791
4809
|
queryKey: [A.CAPABILITIES],
|
|
4792
4810
|
queryFn: async () => await ee({
|
|
4793
4811
|
type: R.GET_SERVER_CAPABILITIES,
|
|
4794
4812
|
noAuth: !0
|
|
4795
4813
|
})
|
|
4796
|
-
}),
|
|
4814
|
+
}), no = () => Z({
|
|
4797
4815
|
queryKey: [A.CHANGELOGS],
|
|
4798
4816
|
queryFn: async () => await ee({
|
|
4799
4817
|
type: R.GET_CHANGELOGS,
|
|
@@ -4802,7 +4820,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4802
4820
|
client: !0
|
|
4803
4821
|
}
|
|
4804
4822
|
})
|
|
4805
|
-
}),
|
|
4823
|
+
}), qa = ({
|
|
4806
4824
|
user: e,
|
|
4807
4825
|
getAccessToken: t
|
|
4808
4826
|
}) => Z({
|
|
@@ -4814,7 +4832,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4814
4832
|
type: R.GET_USER_PREFERENCES,
|
|
4815
4833
|
getAccessToken: t
|
|
4816
4834
|
})
|
|
4817
|
-
}),
|
|
4835
|
+
}), ao = ({
|
|
4818
4836
|
user: e,
|
|
4819
4837
|
getAccessToken: t
|
|
4820
4838
|
}) => Z({
|
|
@@ -4826,7 +4844,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4826
4844
|
type: R.GET_CHATS_STATS,
|
|
4827
4845
|
getAccessToken: t
|
|
4828
4846
|
})
|
|
4829
|
-
}),
|
|
4847
|
+
}), io = ({
|
|
4830
4848
|
user: e,
|
|
4831
4849
|
searchString: t,
|
|
4832
4850
|
sortDirection: r,
|
|
@@ -4867,7 +4885,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4867
4885
|
type: R.GET_CHATS,
|
|
4868
4886
|
getAccessToken: n
|
|
4869
4887
|
})
|
|
4870
|
-
}),
|
|
4888
|
+
}), oo = ({
|
|
4871
4889
|
chatId: e,
|
|
4872
4890
|
getAccessToken: t,
|
|
4873
4891
|
enabled: r = !0
|
|
@@ -4879,11 +4897,11 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4879
4897
|
type: R.GET_CHAT,
|
|
4880
4898
|
getAccessToken: t
|
|
4881
4899
|
})
|
|
4882
|
-
}),
|
|
4900
|
+
}), co = ({
|
|
4883
4901
|
getAccessToken: e
|
|
4884
4902
|
}) => {
|
|
4885
4903
|
const t = V();
|
|
4886
|
-
return
|
|
4904
|
+
return ne({
|
|
4887
4905
|
mutationFn: async ({
|
|
4888
4906
|
userId: r,
|
|
4889
4907
|
id: s,
|
|
@@ -4903,11 +4921,11 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4903
4921
|
t.invalidateQueries({ queryKey: [A.CHATS, s.userId] });
|
|
4904
4922
|
}
|
|
4905
4923
|
});
|
|
4906
|
-
},
|
|
4924
|
+
}, uo = ({
|
|
4907
4925
|
getAccessToken: e
|
|
4908
4926
|
}) => {
|
|
4909
4927
|
const t = V();
|
|
4910
|
-
return
|
|
4928
|
+
return ne({
|
|
4911
4929
|
mutationFn: async ({ userId: r, id: s }) => {
|
|
4912
4930
|
const n = await e();
|
|
4913
4931
|
return (await J({
|
|
@@ -4920,11 +4938,11 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4920
4938
|
t.invalidateQueries({ queryKey: [A.CHATS, s.userId] });
|
|
4921
4939
|
}
|
|
4922
4940
|
});
|
|
4923
|
-
},
|
|
4941
|
+
}, lo = ({
|
|
4924
4942
|
getAccessToken: e
|
|
4925
4943
|
}) => {
|
|
4926
4944
|
const t = V();
|
|
4927
|
-
return
|
|
4945
|
+
return ne({
|
|
4928
4946
|
mutationFn: async ({ userId: r, id: s }) => {
|
|
4929
4947
|
const n = await e();
|
|
4930
4948
|
return (await J({
|
|
@@ -4937,7 +4955,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4937
4955
|
t.invalidateQueries({ queryKey: [A.CHATS, s.userId] });
|
|
4938
4956
|
}
|
|
4939
4957
|
});
|
|
4940
|
-
},
|
|
4958
|
+
}, ho = ({
|
|
4941
4959
|
user: e,
|
|
4942
4960
|
month: t,
|
|
4943
4961
|
year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
|
|
@@ -4959,7 +4977,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4959
4977
|
type: R.GET_USAGE,
|
|
4960
4978
|
getAccessToken: a
|
|
4961
4979
|
})
|
|
4962
|
-
}),
|
|
4980
|
+
}), fo = ({
|
|
4963
4981
|
user: e,
|
|
4964
4982
|
query: t,
|
|
4965
4983
|
getAccessToken: r,
|
|
@@ -4972,11 +4990,11 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4972
4990
|
type: R.GET_USER_MEMORIES,
|
|
4973
4991
|
getAccessToken: r
|
|
4974
4992
|
})
|
|
4975
|
-
}),
|
|
4993
|
+
}), po = ({
|
|
4976
4994
|
getAccessToken: e
|
|
4977
4995
|
}) => {
|
|
4978
4996
|
const t = V();
|
|
4979
|
-
return
|
|
4997
|
+
return ne({
|
|
4980
4998
|
mutationFn: async ({
|
|
4981
4999
|
user: r,
|
|
4982
5000
|
memoryId: s,
|
|
@@ -4996,11 +5014,11 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4996
5014
|
});
|
|
4997
5015
|
}
|
|
4998
5016
|
});
|
|
4999
|
-
},
|
|
5017
|
+
}, yo = ({
|
|
5000
5018
|
getAccessToken: e
|
|
5001
5019
|
}) => {
|
|
5002
5020
|
const t = V();
|
|
5003
|
-
return
|
|
5021
|
+
return ne({
|
|
5004
5022
|
mutationFn: async ({
|
|
5005
5023
|
user: r,
|
|
5006
5024
|
memoryId: s
|
|
@@ -5020,11 +5038,11 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5020
5038
|
});
|
|
5021
5039
|
}
|
|
5022
5040
|
});
|
|
5023
|
-
},
|
|
5041
|
+
}, mo = ({
|
|
5024
5042
|
getAccessToken: e
|
|
5025
5043
|
}) => {
|
|
5026
5044
|
const t = V();
|
|
5027
|
-
return
|
|
5045
|
+
return ne({
|
|
5028
5046
|
mutationFn: async ({ user: r }) => {
|
|
5029
5047
|
const s = await e();
|
|
5030
5048
|
return (await J({
|
|
@@ -5039,11 +5057,11 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5039
5057
|
});
|
|
5040
5058
|
}
|
|
5041
5059
|
});
|
|
5042
|
-
},
|
|
5060
|
+
}, Eo = ({
|
|
5043
5061
|
getAccessToken: e
|
|
5044
5062
|
}) => {
|
|
5045
5063
|
const t = V();
|
|
5046
|
-
return
|
|
5064
|
+
return ne({
|
|
5047
5065
|
mutationFn: async ({ user: r }) => {
|
|
5048
5066
|
const s = await e();
|
|
5049
5067
|
return (await J({
|
|
@@ -5058,7 +5076,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5058
5076
|
});
|
|
5059
5077
|
}
|
|
5060
5078
|
});
|
|
5061
|
-
},
|
|
5079
|
+
}, go = ({
|
|
5062
5080
|
user: e,
|
|
5063
5081
|
query: t,
|
|
5064
5082
|
getAccessToken: r,
|
|
@@ -5071,11 +5089,11 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5071
5089
|
type: R.GET_EXPIRED_MEMORIES,
|
|
5072
5090
|
getAccessToken: r
|
|
5073
5091
|
})
|
|
5074
|
-
}),
|
|
5092
|
+
}), So = ({
|
|
5075
5093
|
getAccessToken: e
|
|
5076
5094
|
}) => {
|
|
5077
5095
|
const t = V();
|
|
5078
|
-
return
|
|
5096
|
+
return ne({
|
|
5079
5097
|
mutationFn: async ({
|
|
5080
5098
|
user: r,
|
|
5081
5099
|
memoryId: s
|
|
@@ -5131,22 +5149,22 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5131
5149
|
} catch (n) {
|
|
5132
5150
|
return Promise.reject(n);
|
|
5133
5151
|
}
|
|
5134
|
-
},
|
|
5152
|
+
}, zr = pt(
|
|
5135
5153
|
void 0
|
|
5136
|
-
),
|
|
5154
|
+
), Zt = {
|
|
5137
5155
|
capabilities: /* @__PURE__ */ new Set(),
|
|
5138
5156
|
allowedModels: [],
|
|
5139
5157
|
version: null,
|
|
5140
5158
|
status: "idle"
|
|
5141
|
-
},
|
|
5159
|
+
}, Wa = ({
|
|
5142
5160
|
user: e,
|
|
5143
5161
|
getAccessToken: t,
|
|
5144
5162
|
children: r
|
|
5145
5163
|
}) => {
|
|
5146
|
-
const [s, n] =
|
|
5164
|
+
const [s, n] = rr(Zt), a = It(
|
|
5147
5165
|
() => e ? `entitlements:${e}` : null,
|
|
5148
5166
|
[e]
|
|
5149
|
-
), i =
|
|
5167
|
+
), i = G(() => {
|
|
5150
5168
|
if (!a)
|
|
5151
5169
|
return !1;
|
|
5152
5170
|
try {
|
|
@@ -5165,19 +5183,19 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5165
5183
|
}
|
|
5166
5184
|
return !1;
|
|
5167
5185
|
}, [a]);
|
|
5168
|
-
|
|
5186
|
+
re(() => {
|
|
5169
5187
|
s.status === "idle" && i();
|
|
5170
5188
|
}, [i, s.status]);
|
|
5171
|
-
const o =
|
|
5172
|
-
|
|
5189
|
+
const o = qa({ user: e, getAccessToken: t });
|
|
5190
|
+
re(() => {
|
|
5173
5191
|
o.isLoading && s.status === "idle" && n((d) => ({ ...d, status: "loading" }));
|
|
5174
|
-
}, [o.isLoading, s.status]),
|
|
5192
|
+
}, [o.isLoading, s.status]), re(() => {
|
|
5175
5193
|
o.isError && n((d) => ({
|
|
5176
5194
|
...d,
|
|
5177
5195
|
status: "error",
|
|
5178
5196
|
error: String(o.error)
|
|
5179
5197
|
}));
|
|
5180
|
-
}, [o.isError, o.error]),
|
|
5198
|
+
}, [o.isError, o.error]), re(() => {
|
|
5181
5199
|
const d = o.data?.entitlements;
|
|
5182
5200
|
if (d && (n({
|
|
5183
5201
|
capabilities: new Set(d.capabilities || []),
|
|
@@ -5197,7 +5215,7 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5197
5215
|
} catch {
|
|
5198
5216
|
}
|
|
5199
5217
|
}, [o.data, a]);
|
|
5200
|
-
const c =
|
|
5218
|
+
const c = G(
|
|
5201
5219
|
(d) => {
|
|
5202
5220
|
const l = d?.entitlements;
|
|
5203
5221
|
if (l && (n({
|
|
@@ -5219,172 +5237,173 @@ const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5219
5237
|
}
|
|
5220
5238
|
},
|
|
5221
5239
|
[a]
|
|
5222
|
-
), h =
|
|
5223
|
-
if (n(
|
|
5240
|
+
), h = G(() => {
|
|
5241
|
+
if (n(Zt), a)
|
|
5224
5242
|
try {
|
|
5225
5243
|
sessionStorage.removeItem(a);
|
|
5226
5244
|
} catch {
|
|
5227
5245
|
}
|
|
5228
|
-
}, [a]), u =
|
|
5246
|
+
}, [a]), u = It(
|
|
5229
5247
|
() => ({
|
|
5230
5248
|
...s,
|
|
5231
|
-
check: (d, l) => s.status !== "ready" ? !1 :
|
|
5249
|
+
check: (d, l) => s.status !== "ready" ? !1 : ds(s.capabilities, d, { any: l?.any }),
|
|
5232
5250
|
loadFromProfile: c,
|
|
5233
5251
|
reset: h
|
|
5234
5252
|
}),
|
|
5235
5253
|
[s, c, h]
|
|
5236
5254
|
);
|
|
5237
|
-
return /* @__PURE__ */ S(
|
|
5255
|
+
return /* @__PURE__ */ S(zr.Provider, { value: u, children: r });
|
|
5238
5256
|
};
|
|
5239
|
-
function
|
|
5240
|
-
const e =
|
|
5257
|
+
function wo() {
|
|
5258
|
+
const e = yt(zr);
|
|
5241
5259
|
if (!e)
|
|
5242
5260
|
throw new Error("useEntitlements must be used within EntitlementsProvider");
|
|
5243
5261
|
return e;
|
|
5244
5262
|
}
|
|
5245
|
-
const
|
|
5263
|
+
const Ba = new URL(document.location.href).searchParams, er = !!Ba.get("debug") || !1, Qa = sr(() => import(
|
|
5246
5264
|
/* webpackChunkName: "LazyApp" */
|
|
5247
|
-
"./App.
|
|
5248
|
-
).then((e) => e.App)),
|
|
5265
|
+
"./App.1qxTcHhE.js"
|
|
5266
|
+
).then((e) => e.App)), ja = sr(
|
|
5249
5267
|
() => import(
|
|
5250
5268
|
/* webpackChunkName: "LazyLogin" */
|
|
5251
|
-
"./LoginEntry.
|
|
5269
|
+
"./LoginEntry.Bn-GsVAB.js"
|
|
5252
5270
|
)
|
|
5253
|
-
),
|
|
5271
|
+
), Va = new Us(), tr = ({
|
|
5254
5272
|
isComponent: e,
|
|
5255
5273
|
headerHeight: t
|
|
5256
5274
|
}) => {
|
|
5257
|
-
const { isAuthenticated: r, isLoading: s, user: n, getAccessToken: a } =
|
|
5258
|
-
return s ? /* @__PURE__ */ S("div", {}) : r ? /* @__PURE__ */ S(
|
|
5259
|
-
|
|
5275
|
+
const { isAuthenticated: r, isLoading: s, user: n, getAccessToken: a } = Oa();
|
|
5276
|
+
return s ? /* @__PURE__ */ S("div", {}) : r ? /* @__PURE__ */ S(_t, { fallback: /* @__PURE__ */ S("div", {}), children: /* @__PURE__ */ S(Ls, { client: Va, children: /* @__PURE__ */ S(
|
|
5277
|
+
Wa,
|
|
5260
5278
|
{
|
|
5261
5279
|
user: n?.username,
|
|
5262
5280
|
getAccessToken: a,
|
|
5263
|
-
children: /* @__PURE__ */ S(
|
|
5281
|
+
children: /* @__PURE__ */ S(Qa, { isComponent: e, headerHeight: t })
|
|
5264
5282
|
}
|
|
5265
|
-
) }) }) : /* @__PURE__ */ S(
|
|
5266
|
-
},
|
|
5283
|
+
) }) }) : /* @__PURE__ */ S(_t, { fallback: /* @__PURE__ */ S("div", {}), children: /* @__PURE__ */ S(ja, {}) });
|
|
5284
|
+
}, Ja = ({
|
|
5267
5285
|
isComponent: e = !1,
|
|
5268
5286
|
headerHeight: t = 0,
|
|
5269
|
-
domain: r =
|
|
5287
|
+
domain: r = Yr,
|
|
5270
5288
|
extraProps: s
|
|
5271
5289
|
}) => (Ge && console.info(
|
|
5272
5290
|
`==> [${Date.now()}] Bootstrapping SassySaint Client with props: `,
|
|
5273
5291
|
{ isComponent: e, domain: r, headerHeight: t, extraProps: s }
|
|
5274
|
-
),
|
|
5275
|
-
e ||
|
|
5292
|
+
), re(() => {
|
|
5293
|
+
e || Vr().catch((n) => {
|
|
5276
5294
|
console.error("[SW] Failed to register service worker:", n);
|
|
5277
5295
|
});
|
|
5278
5296
|
}, [e]), Ge ? /* @__PURE__ */ S(
|
|
5279
|
-
|
|
5297
|
+
Yt,
|
|
5280
5298
|
{
|
|
5281
|
-
clientId:
|
|
5299
|
+
clientId: Xt,
|
|
5282
5300
|
domain: r,
|
|
5283
|
-
debug:
|
|
5301
|
+
debug: er,
|
|
5284
5302
|
endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
|
|
5285
|
-
children: /* @__PURE__ */ S(
|
|
5303
|
+
children: /* @__PURE__ */ S(tr, { isComponent: e, headerHeight: t })
|
|
5286
5304
|
}
|
|
5287
|
-
) : /* @__PURE__ */ S(
|
|
5288
|
-
|
|
5305
|
+
) : /* @__PURE__ */ S(Yt, { clientId: Xt, domain: r, debug: er, children: /* @__PURE__ */ S(tr, { isComponent: e, headerHeight: t }) })), To = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ S(
|
|
5306
|
+
Ja,
|
|
5289
5307
|
{
|
|
5290
5308
|
isComponent: !0,
|
|
5291
5309
|
domain: e,
|
|
5292
5310
|
headerHeight: t,
|
|
5293
|
-
extraProps: [
|
|
5311
|
+
extraProps: [hs, fs]
|
|
5294
5312
|
}
|
|
5295
5313
|
);
|
|
5296
5314
|
export {
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5315
|
+
Ti as ACTION_RESET_PROMPT,
|
|
5316
|
+
gi as ACTION_SEARCH,
|
|
5317
|
+
Si as ACTION_SORT,
|
|
5318
|
+
wi as ACTION_TOGGLE_PROMPT,
|
|
5319
|
+
ci as B,
|
|
5320
|
+
xi as DEFAULT_ICON_ACTION_SIZE,
|
|
5321
|
+
Ei as ERROR_MESSAGE,
|
|
5322
|
+
Ki as INFINITE_SCROLL_LIMIT,
|
|
5323
|
+
Fi as INFINITE_SCROLL_THRESHOLD,
|
|
5324
|
+
ji as INPUT_BOTTOM_OFFSET,
|
|
5325
|
+
Yi as INPUT_BOTTOM_OFFSET_EXTRA,
|
|
5326
|
+
Ji as INPUT_BOTTOM_OFFSET_IPAD,
|
|
5327
|
+
Vi as INPUT_BOTTOM_OFFSET_IPHONE,
|
|
5328
|
+
hi as K,
|
|
5329
|
+
Ni as LOCAL_STORAGE_CHAT_ID,
|
|
5330
|
+
Oi as LOCAL_STORAGE_FAVORITES_ONLY,
|
|
5331
|
+
Li as LOCAL_STORAGE_FULL_SCREEN,
|
|
5332
|
+
Ci as LOCAL_STORAGE_KEYWORD_MATCH_ALL,
|
|
5333
|
+
Ui as LOCAL_STORAGE_OLED_MODE,
|
|
5334
|
+
Qr as LOCAL_STORAGE_PREFIX,
|
|
5335
|
+
$i as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
|
5336
|
+
Di as LOCAL_STORAGE_REASONING_DISCLOSURE,
|
|
5337
|
+
vi as LOCAL_STORAGE_SEARCH,
|
|
5338
|
+
Ai as LOCAL_STORAGE_SORT,
|
|
5339
|
+
_i as LOCAL_STORAGE_SORT_MEMORY_COLUMN,
|
|
5340
|
+
Ii as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
|
|
5341
|
+
Ri as LOCAL_STORAGE_SORT_TIMESTAMP,
|
|
5342
|
+
bi as LOCAL_STORAGE_SORT_TOKEN_USAGE,
|
|
5343
|
+
Mi as LOCAL_STORAGE_USAGE_SELECTED_MONTH,
|
|
5344
|
+
ki as LOCAL_STORAGE_USAGE_TIME_RANGE,
|
|
5345
|
+
Pi as LOCAL_STORAGE_USAGE_VIEW_MODE,
|
|
5346
|
+
ri as P,
|
|
5347
|
+
Hi as PROMPT_CLASSNAME,
|
|
5348
|
+
Gi as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
5331
5349
|
R as SERVICE_TYPES,
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5350
|
+
To as SassySaint,
|
|
5351
|
+
ni as U,
|
|
5352
|
+
Wi as UI_BUTTON_SCROLL_BUFFER,
|
|
5353
|
+
Bi as UI_DEFAULT_MAIN_HEIGHT,
|
|
5354
|
+
Qi as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
|
|
5355
|
+
qi as UI_FOOTER_BUFFER,
|
|
5356
|
+
oi as V,
|
|
5357
|
+
li as W,
|
|
5340
5358
|
qe as a,
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5359
|
+
Ka as applyOledMode,
|
|
5360
|
+
si as c,
|
|
5361
|
+
Fa as canEvaluateModels,
|
|
5362
|
+
Za as e,
|
|
5363
|
+
Ga as formatTimestamp,
|
|
5364
|
+
Zi as getCacheInfo,
|
|
5365
|
+
Ma as getCurrentGeoLocation,
|
|
5366
|
+
Na as getLayoutPaddingClass,
|
|
5367
|
+
Da as getMessageContaintWrapperClass,
|
|
5350
5368
|
J as graphQLRequest,
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5369
|
+
Xi as handleServiceWorkerToggle,
|
|
5370
|
+
mt as i,
|
|
5371
|
+
ft as isServiceWorkerEnabled,
|
|
5372
|
+
Ua as isTauri,
|
|
5373
|
+
di as j,
|
|
5374
|
+
ui as k,
|
|
5375
|
+
Oa as n,
|
|
5376
|
+
ei as n$1,
|
|
5377
|
+
ti as o,
|
|
5360
5378
|
T as r,
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5379
|
+
$a as renderDataAsList,
|
|
5380
|
+
Et as s,
|
|
5381
|
+
xa as serverUrl,
|
|
5382
|
+
to as setNewProvider,
|
|
5383
|
+
ro as setUserPlan,
|
|
5366
5384
|
Ae as st,
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5385
|
+
no as useChangelogs,
|
|
5386
|
+
oo as useChat,
|
|
5387
|
+
io as useChatsHistory,
|
|
5388
|
+
ho as useChatsUsage,
|
|
5389
|
+
mo as useDeleteAllActiveMemories,
|
|
5390
|
+
Eo as useDeleteAllExpiredMemories,
|
|
5391
|
+
uo as useDeleteChat,
|
|
5392
|
+
yo as useDeleteMemory,
|
|
5393
|
+
wo as useEntitlements,
|
|
5394
|
+
go as useExpiredMemories,
|
|
5377
5395
|
V as useQueryClient,
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5396
|
+
So as useRestoreMemory,
|
|
5397
|
+
co as useSaveChat,
|
|
5398
|
+
so as useServerCapabilities,
|
|
5399
|
+
zi as useServiceWorkerUpdate,
|
|
5400
|
+
lo as useToggleFavoriteChat,
|
|
5401
|
+
po as useUpdateMemory,
|
|
5402
|
+
ao as useUserChatStats,
|
|
5403
|
+
fo as useUserMemories,
|
|
5404
|
+
qa as useUserPreferences,
|
|
5405
|
+
eo as utilities,
|
|
5406
|
+
ii as v,
|
|
5407
|
+
ls as x,
|
|
5408
|
+
ai as y
|
|
5390
5409
|
};
|