@myxtra/authentication-green 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-C2fLzzLZ.mjs → App-f237c9e5.mjs} +949 -946
- package/dist/index-6f642db0.mjs +8476 -0
- package/dist/xtra-authentication.mjs +1 -1
- package/package.json +4 -4
- package/dist/App.css +0 -1
- package/dist/TermsAndConditions.css +0 -1
- package/dist/global.css +0 -1
- package/dist/index-DibhjQ0Y.mjs +0 -8476
- package/dist/index.css +0 -1
- /package/dist/{Authentication.css → style.css} +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
1
|
+
var he = (t, e, s) => {
|
|
2
|
+
if (!e.has(t))
|
|
3
3
|
throw TypeError("Cannot " + s);
|
|
4
4
|
};
|
|
5
|
-
var a = (
|
|
6
|
-
if (
|
|
5
|
+
var a = (t, e, s) => (he(t, e, "read from private field"), s ? s.call(t) : e.get(t)), g = (t, e, s) => {
|
|
6
|
+
if (e.has(t))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
}, f = (
|
|
10
|
-
var
|
|
8
|
+
e instanceof WeakSet ? e.add(t) : e.set(t, s);
|
|
9
|
+
}, f = (t, e, s, r) => (he(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s);
|
|
10
|
+
var ee = (t, e, s, r) => ({
|
|
11
11
|
set _(n) {
|
|
12
|
-
f(
|
|
12
|
+
f(t, e, n, s);
|
|
13
13
|
},
|
|
14
14
|
get _() {
|
|
15
|
-
return a(
|
|
15
|
+
return a(t, e, r);
|
|
16
16
|
}
|
|
17
|
-
}), b = (
|
|
18
|
-
import { r as h, j as i, u as $s, a as Ks, b as
|
|
19
|
-
var
|
|
17
|
+
}), b = (t, e, s) => (he(t, e, "access private method"), s);
|
|
18
|
+
import { r as h, j as i, u as $s, a as Ks, b as bt, P as Re, c as ns, d as qs, e as Gs, E as Vs, C as Ws } from "./index-6f642db0.mjs";
|
|
19
|
+
var Ut = class {
|
|
20
20
|
constructor() {
|
|
21
21
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
22
22
|
}
|
|
23
|
-
subscribe(
|
|
24
|
-
return this.listeners.add(
|
|
25
|
-
this.listeners.delete(
|
|
23
|
+
subscribe(t) {
|
|
24
|
+
return this.listeners.add(t), this.onSubscribe(), () => {
|
|
25
|
+
this.listeners.delete(t), this.onUnsubscribe();
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
hasListeners() {
|
|
@@ -32,19 +32,19 @@ var Ue = class {
|
|
|
32
32
|
}
|
|
33
33
|
onUnsubscribe() {
|
|
34
34
|
}
|
|
35
|
-
},
|
|
35
|
+
}, Tt = typeof window > "u" || "Deno" in globalThis;
|
|
36
36
|
function V() {
|
|
37
37
|
}
|
|
38
|
-
function Zs(
|
|
39
|
-
return typeof
|
|
38
|
+
function Zs(t, e) {
|
|
39
|
+
return typeof t == "function" ? t(e) : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return typeof
|
|
41
|
+
function fe(t) {
|
|
42
|
+
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
43
43
|
}
|
|
44
|
-
function as(
|
|
45
|
-
return Math.max(
|
|
44
|
+
function as(t, e) {
|
|
45
|
+
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function De(t, e) {
|
|
48
48
|
const {
|
|
49
49
|
type: s = "all",
|
|
50
50
|
exact: r,
|
|
@@ -52,109 +52,109 @@ function Dt(e, t) {
|
|
|
52
52
|
predicate: l,
|
|
53
53
|
queryKey: o,
|
|
54
54
|
stale: c
|
|
55
|
-
} =
|
|
55
|
+
} = t;
|
|
56
56
|
if (o) {
|
|
57
57
|
if (r) {
|
|
58
|
-
if (
|
|
58
|
+
if (e.queryHash !== Ae(o, e.options))
|
|
59
59
|
return !1;
|
|
60
|
-
} else if (!
|
|
60
|
+
} else if (!Ht(e.queryKey, o))
|
|
61
61
|
return !1;
|
|
62
62
|
}
|
|
63
63
|
if (s !== "all") {
|
|
64
|
-
const m =
|
|
64
|
+
const m = e.isActive();
|
|
65
65
|
if (s === "active" && !m || s === "inactive" && m)
|
|
66
66
|
return !1;
|
|
67
67
|
}
|
|
68
|
-
return !(typeof c == "boolean" &&
|
|
68
|
+
return !(typeof c == "boolean" && e.isStale() !== c || n && n !== e.state.fetchStatus || l && !l(e));
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
const { exact: s, status: r, predicate: n, mutationKey: l } =
|
|
70
|
+
function Te(t, e) {
|
|
71
|
+
const { exact: s, status: r, predicate: n, mutationKey: l } = t;
|
|
72
72
|
if (l) {
|
|
73
|
-
if (!
|
|
73
|
+
if (!e.options.mutationKey)
|
|
74
74
|
return !1;
|
|
75
75
|
if (s) {
|
|
76
|
-
if (
|
|
76
|
+
if (Ct(e.options.mutationKey) !== Ct(l))
|
|
77
77
|
return !1;
|
|
78
|
-
} else if (!
|
|
78
|
+
} else if (!Ht(e.options.mutationKey, l))
|
|
79
79
|
return !1;
|
|
80
80
|
}
|
|
81
|
-
return !(r &&
|
|
81
|
+
return !(r && e.state.status !== r || n && !n(e));
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
return ((
|
|
83
|
+
function Ae(t, e) {
|
|
84
|
+
return ((e == null ? void 0 : e.queryKeyHashFn) || Ct)(t);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Ct(t) {
|
|
87
87
|
return JSON.stringify(
|
|
88
|
-
|
|
89
|
-
(
|
|
88
|
+
t,
|
|
89
|
+
(e, s) => pe(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
92
|
+
function Ht(t, e) {
|
|
93
|
+
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !Ht(t[s], e[s])) : !1;
|
|
94
94
|
}
|
|
95
|
-
function os(
|
|
96
|
-
if (
|
|
97
|
-
return
|
|
98
|
-
const s =
|
|
99
|
-
if (s ||
|
|
100
|
-
const r = s ?
|
|
95
|
+
function os(t, e) {
|
|
96
|
+
if (t === e)
|
|
97
|
+
return t;
|
|
98
|
+
const s = Ue(t) && Ue(e);
|
|
99
|
+
if (s || pe(t) && pe(e)) {
|
|
100
|
+
const r = s ? t : Object.keys(t), n = r.length, l = s ? e : Object.keys(e), o = l.length, c = s ? [] : {};
|
|
101
101
|
let m = 0;
|
|
102
102
|
for (let y = 0; y < o; y++) {
|
|
103
103
|
const d = s ? y : l[y];
|
|
104
|
-
(!s && r.includes(d) || s) &&
|
|
104
|
+
(!s && r.includes(d) || s) && t[d] === void 0 && e[d] === void 0 ? (c[d] = void 0, m++) : (c[d] = os(t[d], e[d]), c[d] === t[d] && t[d] !== void 0 && m++);
|
|
105
105
|
}
|
|
106
|
-
return n === o && m === n ?
|
|
106
|
+
return n === o && m === n ? t : c;
|
|
107
107
|
}
|
|
108
|
-
return
|
|
108
|
+
return e;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (!
|
|
110
|
+
function ie(t, e) {
|
|
111
|
+
if (!e || Object.keys(t).length !== Object.keys(e).length)
|
|
112
112
|
return !1;
|
|
113
|
-
for (const s in
|
|
114
|
-
if (
|
|
113
|
+
for (const s in t)
|
|
114
|
+
if (t[s] !== e[s])
|
|
115
115
|
return !1;
|
|
116
116
|
return !0;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
return Array.isArray(
|
|
118
|
+
function Ue(t) {
|
|
119
|
+
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
if (!
|
|
121
|
+
function pe(t) {
|
|
122
|
+
if (!Qe(t))
|
|
123
123
|
return !1;
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
124
|
+
const e = t.constructor;
|
|
125
|
+
if (e === void 0)
|
|
126
126
|
return !0;
|
|
127
|
-
const s =
|
|
128
|
-
return !(!
|
|
127
|
+
const s = e.prototype;
|
|
128
|
+
return !(!Qe(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return Object.prototype.toString.call(
|
|
130
|
+
function Qe(t) {
|
|
131
|
+
return Object.prototype.toString.call(t) === "[object Object]";
|
|
132
132
|
}
|
|
133
|
-
function Ys(
|
|
134
|
-
return new Promise((
|
|
135
|
-
setTimeout(
|
|
133
|
+
function Ys(t) {
|
|
134
|
+
return new Promise((e) => {
|
|
135
|
+
setTimeout(e, t);
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
return typeof s.structuralSharing == "function" ? s.structuralSharing(
|
|
138
|
+
function me(t, e, s) {
|
|
139
|
+
return typeof s.structuralSharing == "function" ? s.structuralSharing(t, e) : s.structuralSharing !== !1 ? os(t, e) : e;
|
|
140
140
|
}
|
|
141
|
-
function zs(
|
|
142
|
-
const r = [...
|
|
141
|
+
function zs(t, e, s = 0) {
|
|
142
|
+
const r = [...t, e];
|
|
143
143
|
return s && r.length > s ? r.slice(1) : r;
|
|
144
144
|
}
|
|
145
|
-
function Js(
|
|
146
|
-
const r = [
|
|
145
|
+
function Js(t, e, s = 0) {
|
|
146
|
+
const r = [e, ...t];
|
|
147
147
|
return s && r.length > s ? r.slice(0, -1) : r;
|
|
148
148
|
}
|
|
149
|
-
var
|
|
149
|
+
var Ne = Symbol(), ht, rt, jt, ze, Xs = (ze = class extends Ut {
|
|
150
150
|
constructor() {
|
|
151
151
|
super();
|
|
152
|
-
g(this,
|
|
153
|
-
g(this,
|
|
154
|
-
g(this,
|
|
155
|
-
f(this,
|
|
156
|
-
if (!
|
|
157
|
-
const s = () =>
|
|
152
|
+
g(this, ht, void 0);
|
|
153
|
+
g(this, rt, void 0);
|
|
154
|
+
g(this, jt, void 0);
|
|
155
|
+
f(this, jt, (e) => {
|
|
156
|
+
if (!Tt && window.addEventListener) {
|
|
157
|
+
const s = () => e();
|
|
158
158
|
return window.addEventListener("visibilitychange", s, !1), () => {
|
|
159
159
|
window.removeEventListener("visibilitychange", s);
|
|
160
160
|
};
|
|
@@ -162,40 +162,40 @@ var Nt = Symbol(), he, re, je, zt, Xs = (zt = class extends Ue {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
onSubscribe() {
|
|
165
|
-
a(this,
|
|
165
|
+
a(this, rt) || this.setEventListener(a(this, jt));
|
|
166
166
|
}
|
|
167
167
|
onUnsubscribe() {
|
|
168
|
-
var
|
|
169
|
-
this.hasListeners() || ((
|
|
168
|
+
var e;
|
|
169
|
+
this.hasListeners() || ((e = a(this, rt)) == null || e.call(this), f(this, rt, void 0));
|
|
170
170
|
}
|
|
171
|
-
setEventListener(
|
|
171
|
+
setEventListener(e) {
|
|
172
172
|
var s;
|
|
173
|
-
f(this,
|
|
173
|
+
f(this, jt, e), (s = a(this, rt)) == null || s.call(this), f(this, rt, e((r) => {
|
|
174
174
|
typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
|
|
175
175
|
}));
|
|
176
176
|
}
|
|
177
|
-
setFocused(
|
|
178
|
-
a(this,
|
|
177
|
+
setFocused(e) {
|
|
178
|
+
a(this, ht) !== e && (f(this, ht, e), this.onFocus());
|
|
179
179
|
}
|
|
180
180
|
onFocus() {
|
|
181
|
-
const
|
|
181
|
+
const e = this.isFocused();
|
|
182
182
|
this.listeners.forEach((s) => {
|
|
183
|
-
s(
|
|
183
|
+
s(e);
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
isFocused() {
|
|
187
|
-
var
|
|
188
|
-
return typeof a(this,
|
|
187
|
+
var e;
|
|
188
|
+
return typeof a(this, ht) == "boolean" ? a(this, ht) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
|
|
189
189
|
}
|
|
190
|
-
},
|
|
190
|
+
}, ht = new WeakMap(), rt = new WeakMap(), jt = new WeakMap(), ze), ke = new Xs(), _t, it, St, Je, Is = (Je = class extends Ut {
|
|
191
191
|
constructor() {
|
|
192
192
|
super();
|
|
193
|
-
g(this,
|
|
194
|
-
g(this,
|
|
195
|
-
g(this,
|
|
196
|
-
f(this,
|
|
197
|
-
if (!
|
|
198
|
-
const s = () =>
|
|
193
|
+
g(this, _t, !0);
|
|
194
|
+
g(this, it, void 0);
|
|
195
|
+
g(this, St, void 0);
|
|
196
|
+
f(this, St, (e) => {
|
|
197
|
+
if (!Tt && window.addEventListener) {
|
|
198
|
+
const s = () => e(!0), r = () => e(!1);
|
|
199
199
|
return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
|
|
200
200
|
window.removeEventListener("online", s), window.removeEventListener("offline", r);
|
|
201
201
|
};
|
|
@@ -203,70 +203,70 @@ var Nt = Symbol(), he, re, je, zt, Xs = (zt = class extends Ue {
|
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
onSubscribe() {
|
|
206
|
-
a(this,
|
|
206
|
+
a(this, it) || this.setEventListener(a(this, St));
|
|
207
207
|
}
|
|
208
208
|
onUnsubscribe() {
|
|
209
|
-
var
|
|
210
|
-
this.hasListeners() || ((
|
|
209
|
+
var e;
|
|
210
|
+
this.hasListeners() || ((e = a(this, it)) == null || e.call(this), f(this, it, void 0));
|
|
211
211
|
}
|
|
212
|
-
setEventListener(
|
|
212
|
+
setEventListener(e) {
|
|
213
213
|
var s;
|
|
214
|
-
f(this,
|
|
214
|
+
f(this, St, e), (s = a(this, it)) == null || s.call(this), f(this, it, e(this.setOnline.bind(this)));
|
|
215
215
|
}
|
|
216
|
-
setOnline(
|
|
217
|
-
a(this,
|
|
218
|
-
r(
|
|
216
|
+
setOnline(e) {
|
|
217
|
+
a(this, _t) !== e && (f(this, _t, e), this.listeners.forEach((r) => {
|
|
218
|
+
r(e);
|
|
219
219
|
}));
|
|
220
220
|
}
|
|
221
221
|
isOnline() {
|
|
222
|
-
return a(this,
|
|
222
|
+
return a(this, _t);
|
|
223
223
|
}
|
|
224
|
-
},
|
|
225
|
-
function Bs(
|
|
226
|
-
return Math.min(1e3 * 2 **
|
|
224
|
+
}, _t = new WeakMap(), it = new WeakMap(), St = new WeakMap(), Je), ne = new Is();
|
|
225
|
+
function Bs(t) {
|
|
226
|
+
return Math.min(1e3 * 2 ** t, 3e4);
|
|
227
227
|
}
|
|
228
|
-
function ls(
|
|
229
|
-
return (
|
|
228
|
+
function ls(t) {
|
|
229
|
+
return (t ?? "online") === "online" ? ne.isOnline() : !0;
|
|
230
230
|
}
|
|
231
231
|
var cs = class {
|
|
232
|
-
constructor(
|
|
233
|
-
this.revert =
|
|
232
|
+
constructor(t) {
|
|
233
|
+
this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
-
function
|
|
237
|
-
return
|
|
236
|
+
function de(t) {
|
|
237
|
+
return t instanceof cs;
|
|
238
238
|
}
|
|
239
|
-
function us(
|
|
240
|
-
let
|
|
239
|
+
function us(t) {
|
|
240
|
+
let e = !1, s = 0, r = !1, n, l, o;
|
|
241
241
|
const c = new Promise((x, C) => {
|
|
242
242
|
l = x, o = C;
|
|
243
243
|
}), m = (x) => {
|
|
244
244
|
var C;
|
|
245
|
-
r || (E(new cs(x)), (C =
|
|
245
|
+
r || (E(new cs(x)), (C = t.abort) == null || C.call(t));
|
|
246
246
|
}, y = () => {
|
|
247
|
-
|
|
247
|
+
e = !0;
|
|
248
248
|
}, d = () => {
|
|
249
|
-
|
|
250
|
-
}, v = () =>
|
|
249
|
+
e = !1;
|
|
250
|
+
}, v = () => ke.isFocused() && (t.networkMode === "always" || ne.isOnline()) && t.canRun(), u = () => ls(t.networkMode) && t.canRun(), p = (x) => {
|
|
251
251
|
var C;
|
|
252
|
-
r || (r = !0, (C =
|
|
252
|
+
r || (r = !0, (C = t.onSuccess) == null || C.call(t, x), n == null || n(), l(x));
|
|
253
253
|
}, E = (x) => {
|
|
254
254
|
var C;
|
|
255
|
-
r || (r = !0, (C =
|
|
255
|
+
r || (r = !0, (C = t.onError) == null || C.call(t, x), n == null || n(), o(x));
|
|
256
256
|
}, S = () => new Promise((x) => {
|
|
257
257
|
var C;
|
|
258
258
|
n = (_) => {
|
|
259
259
|
(r || v()) && x(_);
|
|
260
|
-
}, (C =
|
|
260
|
+
}, (C = t.onPause) == null || C.call(t);
|
|
261
261
|
}).then(() => {
|
|
262
262
|
var x;
|
|
263
|
-
n = void 0, r || (x =
|
|
263
|
+
n = void 0, r || (x = t.onContinue) == null || x.call(t);
|
|
264
264
|
}), j = () => {
|
|
265
265
|
if (r)
|
|
266
266
|
return;
|
|
267
267
|
let x;
|
|
268
268
|
try {
|
|
269
|
-
x =
|
|
269
|
+
x = t.fn();
|
|
270
270
|
} catch (C) {
|
|
271
271
|
x = Promise.reject(C);
|
|
272
272
|
}
|
|
@@ -274,13 +274,13 @@ function us(e) {
|
|
|
274
274
|
var z;
|
|
275
275
|
if (r)
|
|
276
276
|
return;
|
|
277
|
-
const _ =
|
|
278
|
-
if (
|
|
277
|
+
const _ = t.retry ?? (Tt ? 0 : 3), O = t.retryDelay ?? Bs, F = typeof O == "function" ? O(s, C) : O, Y = _ === !0 || typeof _ == "number" && s < _ || typeof _ == "function" && _(s, C);
|
|
278
|
+
if (e || !Y) {
|
|
279
279
|
E(C);
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
|
-
s++, (z =
|
|
283
|
-
|
|
282
|
+
s++, (z = t.onFail) == null || z.call(t, s, C), Ys(F).then(() => v() ? void 0 : S()).then(() => {
|
|
283
|
+
e ? E(C) : j();
|
|
284
284
|
});
|
|
285
285
|
});
|
|
286
286
|
};
|
|
@@ -294,8 +294,8 @@ function us(e) {
|
|
|
294
294
|
start: () => (u() ? j() : S().then(j), c)
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
let
|
|
297
|
+
function tr() {
|
|
298
|
+
let t = [], e = 0, s = (u) => {
|
|
299
299
|
u();
|
|
300
300
|
}, r = (u) => {
|
|
301
301
|
u();
|
|
@@ -304,15 +304,15 @@ function er() {
|
|
|
304
304
|
n = u;
|
|
305
305
|
}, o = (u) => {
|
|
306
306
|
let p;
|
|
307
|
-
|
|
307
|
+
e++;
|
|
308
308
|
try {
|
|
309
309
|
p = u();
|
|
310
310
|
} finally {
|
|
311
|
-
|
|
311
|
+
e--, e || y();
|
|
312
312
|
}
|
|
313
313
|
return p;
|
|
314
314
|
}, c = (u) => {
|
|
315
|
-
|
|
315
|
+
e ? t.push(u) : n(() => {
|
|
316
316
|
s(u);
|
|
317
317
|
});
|
|
318
318
|
}, m = (u) => (...p) => {
|
|
@@ -320,8 +320,8 @@ function er() {
|
|
|
320
320
|
u(...p);
|
|
321
321
|
});
|
|
322
322
|
}, y = () => {
|
|
323
|
-
const u =
|
|
324
|
-
|
|
323
|
+
const u = t;
|
|
324
|
+
t = [], u.length && n(() => {
|
|
325
325
|
r(() => {
|
|
326
326
|
u.forEach((p) => {
|
|
327
327
|
s(p);
|
|
@@ -342,108 +342,108 @@ function er() {
|
|
|
342
342
|
setScheduler: l
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
|
-
var R =
|
|
345
|
+
var R = tr(), dt, Xe, hs = (Xe = class {
|
|
346
346
|
constructor() {
|
|
347
|
-
g(this,
|
|
347
|
+
g(this, dt, void 0);
|
|
348
348
|
}
|
|
349
349
|
destroy() {
|
|
350
350
|
this.clearGcTimeout();
|
|
351
351
|
}
|
|
352
352
|
scheduleGc() {
|
|
353
|
-
this.clearGcTimeout(),
|
|
353
|
+
this.clearGcTimeout(), fe(this.gcTime) && f(this, dt, setTimeout(() => {
|
|
354
354
|
this.optionalRemove();
|
|
355
355
|
}, this.gcTime));
|
|
356
356
|
}
|
|
357
|
-
updateGcTime(
|
|
357
|
+
updateGcTime(t) {
|
|
358
358
|
this.gcTime = Math.max(
|
|
359
359
|
this.gcTime || 0,
|
|
360
|
-
|
|
360
|
+
t ?? (Tt ? 1 / 0 : 5 * 60 * 1e3)
|
|
361
361
|
);
|
|
362
362
|
}
|
|
363
363
|
clearGcTimeout() {
|
|
364
|
-
a(this,
|
|
364
|
+
a(this, dt) && (clearTimeout(a(this, dt)), f(this, dt, void 0));
|
|
365
365
|
}
|
|
366
|
-
},
|
|
367
|
-
constructor(
|
|
366
|
+
}, dt = new WeakMap(), Xe), Et, Pt, G, D, $t, ft, Z, tt, Ie, er = (Ie = class extends hs {
|
|
367
|
+
constructor(e) {
|
|
368
368
|
super();
|
|
369
369
|
g(this, Z);
|
|
370
|
-
g(this,
|
|
371
|
-
g(this,
|
|
370
|
+
g(this, Et, void 0);
|
|
371
|
+
g(this, Pt, void 0);
|
|
372
372
|
g(this, G, void 0);
|
|
373
373
|
g(this, D, void 0);
|
|
374
|
-
g(this, $
|
|
375
|
-
g(this,
|
|
376
|
-
f(this,
|
|
374
|
+
g(this, $t, void 0);
|
|
375
|
+
g(this, ft, void 0);
|
|
376
|
+
f(this, ft, !1), f(this, $t, e.defaultOptions), this.setOptions(e.options), this.observers = [], f(this, G, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, f(this, Et, e.state || sr(this.options)), this.state = a(this, Et), this.scheduleGc();
|
|
377
377
|
}
|
|
378
378
|
get meta() {
|
|
379
379
|
return this.options.meta;
|
|
380
380
|
}
|
|
381
|
-
setOptions(
|
|
382
|
-
this.options = { ...a(this, $
|
|
381
|
+
setOptions(e) {
|
|
382
|
+
this.options = { ...a(this, $t), ...e }, this.updateGcTime(this.options.gcTime);
|
|
383
383
|
}
|
|
384
384
|
optionalRemove() {
|
|
385
385
|
!this.observers.length && this.state.fetchStatus === "idle" && a(this, G).remove(this);
|
|
386
386
|
}
|
|
387
|
-
setData(
|
|
388
|
-
const r =
|
|
389
|
-
return b(this, Z,
|
|
387
|
+
setData(e, s) {
|
|
388
|
+
const r = me(this.state.data, e, this.options);
|
|
389
|
+
return b(this, Z, tt).call(this, {
|
|
390
390
|
data: r,
|
|
391
391
|
type: "success",
|
|
392
392
|
dataUpdatedAt: s == null ? void 0 : s.updatedAt,
|
|
393
393
|
manual: s == null ? void 0 : s.manual
|
|
394
394
|
}), r;
|
|
395
395
|
}
|
|
396
|
-
setState(
|
|
397
|
-
b(this, Z,
|
|
396
|
+
setState(e, s) {
|
|
397
|
+
b(this, Z, tt).call(this, { type: "setState", state: e, setStateOptions: s });
|
|
398
398
|
}
|
|
399
|
-
cancel(
|
|
399
|
+
cancel(e) {
|
|
400
400
|
var r, n;
|
|
401
401
|
const s = (r = a(this, D)) == null ? void 0 : r.promise;
|
|
402
|
-
return (n = a(this, D)) == null || n.cancel(
|
|
402
|
+
return (n = a(this, D)) == null || n.cancel(e), s ? s.then(V).catch(V) : Promise.resolve();
|
|
403
403
|
}
|
|
404
404
|
destroy() {
|
|
405
405
|
super.destroy(), this.cancel({ silent: !0 });
|
|
406
406
|
}
|
|
407
407
|
reset() {
|
|
408
|
-
this.destroy(), this.setState(a(this,
|
|
408
|
+
this.destroy(), this.setState(a(this, Et));
|
|
409
409
|
}
|
|
410
410
|
isActive() {
|
|
411
|
-
return this.observers.some((
|
|
411
|
+
return this.observers.some((e) => e.options.enabled !== !1);
|
|
412
412
|
}
|
|
413
413
|
isDisabled() {
|
|
414
414
|
return this.getObserversCount() > 0 && !this.isActive();
|
|
415
415
|
}
|
|
416
416
|
isStale() {
|
|
417
417
|
return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
|
|
418
|
-
(
|
|
418
|
+
(e) => e.getCurrentResult().isStale
|
|
419
419
|
) : this.state.data === void 0;
|
|
420
420
|
}
|
|
421
|
-
isStaleByTime(
|
|
422
|
-
return this.state.isInvalidated || this.state.data === void 0 || !as(this.state.dataUpdatedAt,
|
|
421
|
+
isStaleByTime(e = 0) {
|
|
422
|
+
return this.state.isInvalidated || this.state.data === void 0 || !as(this.state.dataUpdatedAt, e);
|
|
423
423
|
}
|
|
424
424
|
onFocus() {
|
|
425
425
|
var s;
|
|
426
|
-
const
|
|
427
|
-
|
|
426
|
+
const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
|
|
427
|
+
e == null || e.refetch({ cancelRefetch: !1 }), (s = a(this, D)) == null || s.continue();
|
|
428
428
|
}
|
|
429
429
|
onOnline() {
|
|
430
430
|
var s;
|
|
431
|
-
const
|
|
432
|
-
|
|
431
|
+
const e = this.observers.find((r) => r.shouldFetchOnReconnect());
|
|
432
|
+
e == null || e.refetch({ cancelRefetch: !1 }), (s = a(this, D)) == null || s.continue();
|
|
433
433
|
}
|
|
434
|
-
addObserver(
|
|
435
|
-
this.observers.includes(
|
|
434
|
+
addObserver(e) {
|
|
435
|
+
this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), a(this, G).notify({ type: "observerAdded", query: this, observer: e }));
|
|
436
436
|
}
|
|
437
|
-
removeObserver(
|
|
438
|
-
this.observers.includes(
|
|
437
|
+
removeObserver(e) {
|
|
438
|
+
this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (a(this, D) && (a(this, ft) ? a(this, D).cancel({ revert: !0 }) : a(this, D).cancelRetry()), this.scheduleGc()), a(this, G).notify({ type: "observerRemoved", query: this, observer: e }));
|
|
439
439
|
}
|
|
440
440
|
getObserversCount() {
|
|
441
441
|
return this.observers.length;
|
|
442
442
|
}
|
|
443
443
|
invalidate() {
|
|
444
|
-
this.state.isInvalidated || b(this, Z,
|
|
444
|
+
this.state.isInvalidated || b(this, Z, tt).call(this, { type: "invalidate" });
|
|
445
445
|
}
|
|
446
|
-
fetch(
|
|
446
|
+
fetch(e, s) {
|
|
447
447
|
var y, d, v;
|
|
448
448
|
if (this.state.fetchStatus !== "idle") {
|
|
449
449
|
if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
|
|
@@ -451,7 +451,7 @@ var R = er(), de, Xt, hs = (Xt = class {
|
|
|
451
451
|
else if (a(this, D))
|
|
452
452
|
return a(this, D).continueRetry(), a(this, D).promise;
|
|
453
453
|
}
|
|
454
|
-
if (
|
|
454
|
+
if (e && this.setOptions(e), !this.options.queryFn) {
|
|
455
455
|
const u = this.observers.find((p) => p.options.queryFn);
|
|
456
456
|
u && this.setOptions(u.options);
|
|
457
457
|
}
|
|
@@ -461,13 +461,13 @@ var R = er(), de, Xt, hs = (Xt = class {
|
|
|
461
461
|
}, l = (u) => {
|
|
462
462
|
Object.defineProperty(u, "signal", {
|
|
463
463
|
enumerable: !0,
|
|
464
|
-
get: () => (f(this,
|
|
464
|
+
get: () => (f(this, ft, !0), r.signal)
|
|
465
465
|
});
|
|
466
466
|
};
|
|
467
467
|
l(n);
|
|
468
|
-
const o = () => !this.options.queryFn || this.options.queryFn ===
|
|
468
|
+
const o = () => !this.options.queryFn || this.options.queryFn === Ne ? Promise.reject(
|
|
469
469
|
new Error(`Missing queryFn: '${this.options.queryHash}'`)
|
|
470
|
-
) : (f(this,
|
|
470
|
+
) : (f(this, ft, !1), this.options.persister ? this.options.persister(
|
|
471
471
|
this.options.queryFn,
|
|
472
472
|
n,
|
|
473
473
|
this
|
|
@@ -483,13 +483,13 @@ var R = er(), de, Xt, hs = (Xt = class {
|
|
|
483
483
|
l(c), (y = this.options.behavior) == null || y.onFetch(
|
|
484
484
|
c,
|
|
485
485
|
this
|
|
486
|
-
), f(this,
|
|
486
|
+
), f(this, Pt, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = c.fetchOptions) == null ? void 0 : d.meta)) && b(this, Z, tt).call(this, { type: "fetch", meta: (v = c.fetchOptions) == null ? void 0 : v.meta });
|
|
487
487
|
const m = (u) => {
|
|
488
488
|
var p, E, S, j;
|
|
489
|
-
|
|
489
|
+
de(u) && u.silent || b(this, Z, tt).call(this, {
|
|
490
490
|
type: "error",
|
|
491
491
|
error: u
|
|
492
|
-
}),
|
|
492
|
+
}), de(u) || ((E = (p = a(this, G).config).onError) == null || E.call(
|
|
493
493
|
p,
|
|
494
494
|
u,
|
|
495
495
|
this
|
|
@@ -518,13 +518,13 @@ var R = er(), de, Xt, hs = (Xt = class {
|
|
|
518
518
|
},
|
|
519
519
|
onError: m,
|
|
520
520
|
onFail: (u, p) => {
|
|
521
|
-
b(this, Z,
|
|
521
|
+
b(this, Z, tt).call(this, { type: "failed", failureCount: u, error: p });
|
|
522
522
|
},
|
|
523
523
|
onPause: () => {
|
|
524
|
-
b(this, Z,
|
|
524
|
+
b(this, Z, tt).call(this, { type: "pause" });
|
|
525
525
|
},
|
|
526
526
|
onContinue: () => {
|
|
527
|
-
b(this, Z,
|
|
527
|
+
b(this, Z, tt).call(this, { type: "continue" });
|
|
528
528
|
},
|
|
529
529
|
retry: c.options.retry,
|
|
530
530
|
retryDelay: c.options.retryDelay,
|
|
@@ -532,14 +532,14 @@ var R = er(), de, Xt, hs = (Xt = class {
|
|
|
532
532
|
canRun: () => !0
|
|
533
533
|
})), a(this, D).start();
|
|
534
534
|
}
|
|
535
|
-
},
|
|
535
|
+
}, Et = new WeakMap(), Pt = new WeakMap(), G = new WeakMap(), D = new WeakMap(), $t = new WeakMap(), ft = new WeakMap(), Z = new WeakSet(), tt = function(e) {
|
|
536
536
|
const s = (r) => {
|
|
537
|
-
switch (
|
|
537
|
+
switch (e.type) {
|
|
538
538
|
case "failed":
|
|
539
539
|
return {
|
|
540
540
|
...r,
|
|
541
|
-
fetchFailureCount:
|
|
542
|
-
fetchFailureReason:
|
|
541
|
+
fetchFailureCount: e.failureCount,
|
|
542
|
+
fetchFailureReason: e.error
|
|
543
543
|
};
|
|
544
544
|
case "pause":
|
|
545
545
|
return {
|
|
@@ -555,26 +555,26 @@ var R = er(), de, Xt, hs = (Xt = class {
|
|
|
555
555
|
return {
|
|
556
556
|
...r,
|
|
557
557
|
...ds(r.data, this.options),
|
|
558
|
-
fetchMeta:
|
|
558
|
+
fetchMeta: e.meta ?? null
|
|
559
559
|
};
|
|
560
560
|
case "success":
|
|
561
561
|
return {
|
|
562
562
|
...r,
|
|
563
|
-
data:
|
|
563
|
+
data: e.data,
|
|
564
564
|
dataUpdateCount: r.dataUpdateCount + 1,
|
|
565
|
-
dataUpdatedAt:
|
|
565
|
+
dataUpdatedAt: e.dataUpdatedAt ?? Date.now(),
|
|
566
566
|
error: null,
|
|
567
567
|
isInvalidated: !1,
|
|
568
568
|
status: "success",
|
|
569
|
-
...!
|
|
569
|
+
...!e.manual && {
|
|
570
570
|
fetchStatus: "idle",
|
|
571
571
|
fetchFailureCount: 0,
|
|
572
572
|
fetchFailureReason: null
|
|
573
573
|
}
|
|
574
574
|
};
|
|
575
575
|
case "error":
|
|
576
|
-
const n =
|
|
577
|
-
return
|
|
576
|
+
const n = e.error;
|
|
577
|
+
return de(n) && n.revert && a(this, Pt) ? { ...a(this, Pt), fetchStatus: "idle" } : {
|
|
578
578
|
...r,
|
|
579
579
|
error: n,
|
|
580
580
|
errorUpdateCount: r.errorUpdateCount + 1,
|
|
@@ -592,31 +592,31 @@ var R = er(), de, Xt, hs = (Xt = class {
|
|
|
592
592
|
case "setState":
|
|
593
593
|
return {
|
|
594
594
|
...r,
|
|
595
|
-
...
|
|
595
|
+
...e.state
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
598
|
};
|
|
599
599
|
this.state = s(this.state), R.batch(() => {
|
|
600
600
|
this.observers.forEach((r) => {
|
|
601
601
|
r.onQueryUpdate();
|
|
602
|
-
}), a(this, G).notify({ query: this, type: "updated", action:
|
|
602
|
+
}), a(this, G).notify({ query: this, type: "updated", action: e });
|
|
603
603
|
});
|
|
604
|
-
},
|
|
605
|
-
function ds(
|
|
604
|
+
}, Ie);
|
|
605
|
+
function ds(t, e) {
|
|
606
606
|
return {
|
|
607
607
|
fetchFailureCount: 0,
|
|
608
608
|
fetchFailureReason: null,
|
|
609
|
-
fetchStatus: ls(
|
|
610
|
-
...
|
|
609
|
+
fetchStatus: ls(e.networkMode) ? "fetching" : "paused",
|
|
610
|
+
...t === void 0 && {
|
|
611
611
|
error: null,
|
|
612
612
|
status: "pending"
|
|
613
613
|
}
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
-
function sr(
|
|
617
|
-
const
|
|
616
|
+
function sr(t) {
|
|
617
|
+
const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, s = e !== void 0, r = s ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
|
|
618
618
|
return {
|
|
619
|
-
data:
|
|
619
|
+
data: e,
|
|
620
620
|
dataUpdateCount: 0,
|
|
621
621
|
dataUpdatedAt: s ? r ?? Date.now() : 0,
|
|
622
622
|
error: null,
|
|
@@ -630,176 +630,176 @@ function sr(e) {
|
|
|
630
630
|
fetchStatus: "idle"
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
|
-
var J,
|
|
634
|
-
constructor(
|
|
633
|
+
var J, Be, rr = (Be = class extends Ut {
|
|
634
|
+
constructor(e = {}) {
|
|
635
635
|
super();
|
|
636
636
|
g(this, J, void 0);
|
|
637
|
-
this.config =
|
|
637
|
+
this.config = e, f(this, J, /* @__PURE__ */ new Map());
|
|
638
638
|
}
|
|
639
|
-
build(
|
|
640
|
-
const n = s.queryKey, l = s.queryHash ??
|
|
639
|
+
build(e, s, r) {
|
|
640
|
+
const n = s.queryKey, l = s.queryHash ?? Ae(n, s);
|
|
641
641
|
let o = this.get(l);
|
|
642
|
-
return o || (o = new
|
|
642
|
+
return o || (o = new er({
|
|
643
643
|
cache: this,
|
|
644
644
|
queryKey: n,
|
|
645
645
|
queryHash: l,
|
|
646
|
-
options:
|
|
646
|
+
options: e.defaultQueryOptions(s),
|
|
647
647
|
state: r,
|
|
648
|
-
defaultOptions:
|
|
648
|
+
defaultOptions: e.getQueryDefaults(n)
|
|
649
649
|
}), this.add(o)), o;
|
|
650
650
|
}
|
|
651
|
-
add(
|
|
652
|
-
a(this, J).has(
|
|
651
|
+
add(e) {
|
|
652
|
+
a(this, J).has(e.queryHash) || (a(this, J).set(e.queryHash, e), this.notify({
|
|
653
653
|
type: "added",
|
|
654
|
-
query:
|
|
654
|
+
query: e
|
|
655
655
|
}));
|
|
656
656
|
}
|
|
657
|
-
remove(
|
|
658
|
-
const s = a(this, J).get(
|
|
659
|
-
s && (
|
|
657
|
+
remove(e) {
|
|
658
|
+
const s = a(this, J).get(e.queryHash);
|
|
659
|
+
s && (e.destroy(), s === e && a(this, J).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
660
660
|
}
|
|
661
661
|
clear() {
|
|
662
662
|
R.batch(() => {
|
|
663
|
-
this.getAll().forEach((
|
|
664
|
-
this.remove(
|
|
663
|
+
this.getAll().forEach((e) => {
|
|
664
|
+
this.remove(e);
|
|
665
665
|
});
|
|
666
666
|
});
|
|
667
667
|
}
|
|
668
|
-
get(
|
|
669
|
-
return a(this, J).get(
|
|
668
|
+
get(e) {
|
|
669
|
+
return a(this, J).get(e);
|
|
670
670
|
}
|
|
671
671
|
getAll() {
|
|
672
672
|
return [...a(this, J).values()];
|
|
673
673
|
}
|
|
674
|
-
find(
|
|
675
|
-
const s = { exact: !0, ...
|
|
674
|
+
find(e) {
|
|
675
|
+
const s = { exact: !0, ...e };
|
|
676
676
|
return this.getAll().find(
|
|
677
|
-
(r) =>
|
|
677
|
+
(r) => De(s, r)
|
|
678
678
|
);
|
|
679
679
|
}
|
|
680
|
-
findAll(
|
|
680
|
+
findAll(e = {}) {
|
|
681
681
|
const s = this.getAll();
|
|
682
|
-
return Object.keys(
|
|
682
|
+
return Object.keys(e).length > 0 ? s.filter((r) => De(e, r)) : s;
|
|
683
683
|
}
|
|
684
|
-
notify(
|
|
684
|
+
notify(e) {
|
|
685
685
|
R.batch(() => {
|
|
686
686
|
this.listeners.forEach((s) => {
|
|
687
|
-
s(
|
|
687
|
+
s(e);
|
|
688
688
|
});
|
|
689
689
|
});
|
|
690
690
|
}
|
|
691
691
|
onFocus() {
|
|
692
692
|
R.batch(() => {
|
|
693
|
-
this.getAll().forEach((
|
|
694
|
-
|
|
693
|
+
this.getAll().forEach((e) => {
|
|
694
|
+
e.onFocus();
|
|
695
695
|
});
|
|
696
696
|
});
|
|
697
697
|
}
|
|
698
698
|
onOnline() {
|
|
699
699
|
R.batch(() => {
|
|
700
|
-
this.getAll().forEach((
|
|
701
|
-
|
|
700
|
+
this.getAll().forEach((e) => {
|
|
701
|
+
e.onOnline();
|
|
702
702
|
});
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
|
-
}, J = new WeakMap(),
|
|
706
|
-
constructor(
|
|
705
|
+
}, J = new WeakMap(), Be), X, T, pt, I, st, ts, ir = (ts = class extends hs {
|
|
706
|
+
constructor(e) {
|
|
707
707
|
super();
|
|
708
708
|
g(this, I);
|
|
709
709
|
g(this, X, void 0);
|
|
710
710
|
g(this, T, void 0);
|
|
711
|
-
g(this,
|
|
712
|
-
this.mutationId =
|
|
711
|
+
g(this, pt, void 0);
|
|
712
|
+
this.mutationId = e.mutationId, f(this, T, e.mutationCache), f(this, X, []), this.state = e.state || fs(), this.setOptions(e.options), this.scheduleGc();
|
|
713
713
|
}
|
|
714
|
-
setOptions(
|
|
715
|
-
this.options =
|
|
714
|
+
setOptions(e) {
|
|
715
|
+
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
716
716
|
}
|
|
717
717
|
get meta() {
|
|
718
718
|
return this.options.meta;
|
|
719
719
|
}
|
|
720
|
-
addObserver(
|
|
721
|
-
a(this, X).includes(
|
|
720
|
+
addObserver(e) {
|
|
721
|
+
a(this, X).includes(e) || (a(this, X).push(e), this.clearGcTimeout(), a(this, T).notify({
|
|
722
722
|
type: "observerAdded",
|
|
723
723
|
mutation: this,
|
|
724
|
-
observer:
|
|
724
|
+
observer: e
|
|
725
725
|
}));
|
|
726
726
|
}
|
|
727
|
-
removeObserver(
|
|
728
|
-
f(this, X, a(this, X).filter((s) => s !==
|
|
727
|
+
removeObserver(e) {
|
|
728
|
+
f(this, X, a(this, X).filter((s) => s !== e)), this.scheduleGc(), a(this, T).notify({
|
|
729
729
|
type: "observerRemoved",
|
|
730
730
|
mutation: this,
|
|
731
|
-
observer:
|
|
731
|
+
observer: e
|
|
732
732
|
});
|
|
733
733
|
}
|
|
734
734
|
optionalRemove() {
|
|
735
735
|
a(this, X).length || (this.state.status === "pending" ? this.scheduleGc() : a(this, T).remove(this));
|
|
736
736
|
}
|
|
737
737
|
continue() {
|
|
738
|
-
var
|
|
739
|
-
return ((
|
|
738
|
+
var e;
|
|
739
|
+
return ((e = a(this, pt)) == null ? void 0 : e.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
740
740
|
this.execute(this.state.variables);
|
|
741
741
|
}
|
|
742
|
-
async execute(
|
|
742
|
+
async execute(e) {
|
|
743
743
|
var n, l, o, c, m, y, d, v, u, p, E, S, j, x, C, _, O, F, Y, z;
|
|
744
|
-
f(this,
|
|
745
|
-
fn: () => this.options.mutationFn ? this.options.mutationFn(
|
|
744
|
+
f(this, pt, us({
|
|
745
|
+
fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
|
|
746
746
|
onFail: (P, W) => {
|
|
747
|
-
b(this, I,
|
|
747
|
+
b(this, I, st).call(this, { type: "failed", failureCount: P, error: W });
|
|
748
748
|
},
|
|
749
749
|
onPause: () => {
|
|
750
|
-
b(this, I,
|
|
750
|
+
b(this, I, st).call(this, { type: "pause" });
|
|
751
751
|
},
|
|
752
752
|
onContinue: () => {
|
|
753
|
-
b(this, I,
|
|
753
|
+
b(this, I, st).call(this, { type: "continue" });
|
|
754
754
|
},
|
|
755
755
|
retry: this.options.retry ?? 0,
|
|
756
756
|
retryDelay: this.options.retryDelay,
|
|
757
757
|
networkMode: this.options.networkMode,
|
|
758
758
|
canRun: () => a(this, T).canRun(this)
|
|
759
759
|
}));
|
|
760
|
-
const s = this.state.status === "pending", r = !a(this,
|
|
760
|
+
const s = this.state.status === "pending", r = !a(this, pt).canStart();
|
|
761
761
|
try {
|
|
762
762
|
if (!s) {
|
|
763
|
-
b(this, I,
|
|
763
|
+
b(this, I, st).call(this, { type: "pending", variables: e, isPaused: r }), await ((l = (n = a(this, T).config).onMutate) == null ? void 0 : l.call(
|
|
764
764
|
n,
|
|
765
|
-
|
|
765
|
+
e,
|
|
766
766
|
this
|
|
767
767
|
));
|
|
768
|
-
const W = await ((c = (o = this.options).onMutate) == null ? void 0 : c.call(o,
|
|
769
|
-
W !== this.state.context && b(this, I,
|
|
768
|
+
const W = await ((c = (o = this.options).onMutate) == null ? void 0 : c.call(o, e));
|
|
769
|
+
W !== this.state.context && b(this, I, st).call(this, {
|
|
770
770
|
type: "pending",
|
|
771
771
|
context: W,
|
|
772
|
-
variables:
|
|
772
|
+
variables: e,
|
|
773
773
|
isPaused: r
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
|
-
const P = await a(this,
|
|
776
|
+
const P = await a(this, pt).start();
|
|
777
777
|
return await ((y = (m = a(this, T).config).onSuccess) == null ? void 0 : y.call(
|
|
778
778
|
m,
|
|
779
779
|
P,
|
|
780
|
-
|
|
780
|
+
e,
|
|
781
781
|
this.state.context,
|
|
782
782
|
this
|
|
783
|
-
)), await ((v = (d = this.options).onSuccess) == null ? void 0 : v.call(d, P,
|
|
783
|
+
)), await ((v = (d = this.options).onSuccess) == null ? void 0 : v.call(d, P, e, this.state.context)), await ((p = (u = a(this, T).config).onSettled) == null ? void 0 : p.call(
|
|
784
784
|
u,
|
|
785
785
|
P,
|
|
786
786
|
null,
|
|
787
787
|
this.state.variables,
|
|
788
788
|
this.state.context,
|
|
789
789
|
this
|
|
790
|
-
)), await ((S = (E = this.options).onSettled) == null ? void 0 : S.call(E, P, null,
|
|
790
|
+
)), await ((S = (E = this.options).onSettled) == null ? void 0 : S.call(E, P, null, e, this.state.context)), b(this, I, st).call(this, { type: "success", data: P }), P;
|
|
791
791
|
} catch (P) {
|
|
792
792
|
try {
|
|
793
793
|
throw await ((x = (j = a(this, T).config).onError) == null ? void 0 : x.call(
|
|
794
794
|
j,
|
|
795
795
|
P,
|
|
796
|
-
|
|
796
|
+
e,
|
|
797
797
|
this.state.context,
|
|
798
798
|
this
|
|
799
799
|
)), await ((_ = (C = this.options).onError) == null ? void 0 : _.call(
|
|
800
800
|
C,
|
|
801
801
|
P,
|
|
802
|
-
|
|
802
|
+
e,
|
|
803
803
|
this.state.context
|
|
804
804
|
)), await ((F = (O = a(this, T).config).onSettled) == null ? void 0 : F.call(
|
|
805
805
|
O,
|
|
@@ -812,24 +812,24 @@ var J, Bt, rr = (Bt = class extends Ue {
|
|
|
812
812
|
Y,
|
|
813
813
|
void 0,
|
|
814
814
|
P,
|
|
815
|
-
|
|
815
|
+
e,
|
|
816
816
|
this.state.context
|
|
817
817
|
)), P;
|
|
818
818
|
} finally {
|
|
819
|
-
b(this, I,
|
|
819
|
+
b(this, I, st).call(this, { type: "error", error: P });
|
|
820
820
|
}
|
|
821
821
|
} finally {
|
|
822
822
|
a(this, T).runNext(this);
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
|
-
}, X = new WeakMap(), T = new WeakMap(),
|
|
825
|
+
}, X = new WeakMap(), T = new WeakMap(), pt = new WeakMap(), I = new WeakSet(), st = function(e) {
|
|
826
826
|
const s = (r) => {
|
|
827
|
-
switch (
|
|
827
|
+
switch (e.type) {
|
|
828
828
|
case "failed":
|
|
829
829
|
return {
|
|
830
830
|
...r,
|
|
831
|
-
failureCount:
|
|
832
|
-
failureReason:
|
|
831
|
+
failureCount: e.failureCount,
|
|
832
|
+
failureReason: e.error
|
|
833
833
|
};
|
|
834
834
|
case "pause":
|
|
835
835
|
return {
|
|
@@ -844,20 +844,20 @@ var J, Bt, rr = (Bt = class extends Ue {
|
|
|
844
844
|
case "pending":
|
|
845
845
|
return {
|
|
846
846
|
...r,
|
|
847
|
-
context:
|
|
847
|
+
context: e.context,
|
|
848
848
|
data: void 0,
|
|
849
849
|
failureCount: 0,
|
|
850
850
|
failureReason: null,
|
|
851
851
|
error: null,
|
|
852
|
-
isPaused:
|
|
852
|
+
isPaused: e.isPaused,
|
|
853
853
|
status: "pending",
|
|
854
|
-
variables:
|
|
854
|
+
variables: e.variables,
|
|
855
855
|
submittedAt: Date.now()
|
|
856
856
|
};
|
|
857
857
|
case "success":
|
|
858
858
|
return {
|
|
859
859
|
...r,
|
|
860
|
-
data:
|
|
860
|
+
data: e.data,
|
|
861
861
|
failureCount: 0,
|
|
862
862
|
failureReason: null,
|
|
863
863
|
error: null,
|
|
@@ -868,9 +868,9 @@ var J, Bt, rr = (Bt = class extends Ue {
|
|
|
868
868
|
return {
|
|
869
869
|
...r,
|
|
870
870
|
data: void 0,
|
|
871
|
-
error:
|
|
871
|
+
error: e.error,
|
|
872
872
|
failureCount: r.failureCount + 1,
|
|
873
|
-
failureReason:
|
|
873
|
+
failureReason: e.error,
|
|
874
874
|
isPaused: !1,
|
|
875
875
|
status: "error"
|
|
876
876
|
};
|
|
@@ -878,14 +878,14 @@ var J, Bt, rr = (Bt = class extends Ue {
|
|
|
878
878
|
};
|
|
879
879
|
this.state = s(this.state), R.batch(() => {
|
|
880
880
|
a(this, X).forEach((r) => {
|
|
881
|
-
r.onMutationUpdate(
|
|
881
|
+
r.onMutationUpdate(e);
|
|
882
882
|
}), a(this, T).notify({
|
|
883
883
|
mutation: this,
|
|
884
884
|
type: "updated",
|
|
885
|
-
action:
|
|
885
|
+
action: e
|
|
886
886
|
});
|
|
887
887
|
});
|
|
888
|
-
},
|
|
888
|
+
}, ts);
|
|
889
889
|
function fs() {
|
|
890
890
|
return {
|
|
891
891
|
context: void 0,
|
|
@@ -899,115 +899,115 @@ function fs() {
|
|
|
899
899
|
submittedAt: 0
|
|
900
900
|
};
|
|
901
901
|
}
|
|
902
|
-
var K,
|
|
903
|
-
constructor(
|
|
902
|
+
var K, Kt, es, nr = (es = class extends Ut {
|
|
903
|
+
constructor(e = {}) {
|
|
904
904
|
super();
|
|
905
905
|
g(this, K, void 0);
|
|
906
|
-
g(this,
|
|
907
|
-
this.config =
|
|
906
|
+
g(this, Kt, void 0);
|
|
907
|
+
this.config = e, f(this, K, /* @__PURE__ */ new Map()), f(this, Kt, Date.now());
|
|
908
908
|
}
|
|
909
|
-
build(
|
|
909
|
+
build(e, s, r) {
|
|
910
910
|
const n = new ir({
|
|
911
911
|
mutationCache: this,
|
|
912
|
-
mutationId: ++
|
|
913
|
-
options:
|
|
912
|
+
mutationId: ++ee(this, Kt)._,
|
|
913
|
+
options: e.defaultMutationOptions(s),
|
|
914
914
|
state: r
|
|
915
915
|
});
|
|
916
916
|
return this.add(n), n;
|
|
917
917
|
}
|
|
918
|
-
add(
|
|
919
|
-
const s =
|
|
920
|
-
r.push(
|
|
918
|
+
add(e) {
|
|
919
|
+
const s = se(e), r = a(this, K).get(s) ?? [];
|
|
920
|
+
r.push(e), a(this, K).set(s, r), this.notify({ type: "added", mutation: e });
|
|
921
921
|
}
|
|
922
|
-
remove(
|
|
922
|
+
remove(e) {
|
|
923
923
|
var r;
|
|
924
|
-
const s =
|
|
924
|
+
const s = se(e);
|
|
925
925
|
if (a(this, K).has(s)) {
|
|
926
|
-
const n = (r = a(this, K).get(s)) == null ? void 0 : r.filter((l) => l !==
|
|
926
|
+
const n = (r = a(this, K).get(s)) == null ? void 0 : r.filter((l) => l !== e);
|
|
927
927
|
n && (n.length === 0 ? a(this, K).delete(s) : a(this, K).set(s, n));
|
|
928
928
|
}
|
|
929
|
-
this.notify({ type: "removed", mutation:
|
|
929
|
+
this.notify({ type: "removed", mutation: e });
|
|
930
930
|
}
|
|
931
|
-
canRun(
|
|
931
|
+
canRun(e) {
|
|
932
932
|
var r;
|
|
933
|
-
const s = (r = a(this, K).get(
|
|
934
|
-
return !s || s ===
|
|
933
|
+
const s = (r = a(this, K).get(se(e))) == null ? void 0 : r.find((n) => n.state.status === "pending");
|
|
934
|
+
return !s || s === e;
|
|
935
935
|
}
|
|
936
|
-
runNext(
|
|
936
|
+
runNext(e) {
|
|
937
937
|
var r;
|
|
938
|
-
const s = (r = a(this, K).get(
|
|
938
|
+
const s = (r = a(this, K).get(se(e))) == null ? void 0 : r.find((n) => n !== e && n.state.isPaused);
|
|
939
939
|
return (s == null ? void 0 : s.continue()) ?? Promise.resolve();
|
|
940
940
|
}
|
|
941
941
|
clear() {
|
|
942
942
|
R.batch(() => {
|
|
943
|
-
this.getAll().forEach((
|
|
944
|
-
this.remove(
|
|
943
|
+
this.getAll().forEach((e) => {
|
|
944
|
+
this.remove(e);
|
|
945
945
|
});
|
|
946
946
|
});
|
|
947
947
|
}
|
|
948
948
|
getAll() {
|
|
949
949
|
return [...a(this, K).values()].flat();
|
|
950
950
|
}
|
|
951
|
-
find(
|
|
952
|
-
const s = { exact: !0, ...
|
|
951
|
+
find(e) {
|
|
952
|
+
const s = { exact: !0, ...e };
|
|
953
953
|
return this.getAll().find(
|
|
954
|
-
(r) =>
|
|
954
|
+
(r) => Te(s, r)
|
|
955
955
|
);
|
|
956
956
|
}
|
|
957
|
-
findAll(
|
|
958
|
-
return this.getAll().filter((s) =>
|
|
957
|
+
findAll(e = {}) {
|
|
958
|
+
return this.getAll().filter((s) => Te(e, s));
|
|
959
959
|
}
|
|
960
|
-
notify(
|
|
960
|
+
notify(e) {
|
|
961
961
|
R.batch(() => {
|
|
962
962
|
this.listeners.forEach((s) => {
|
|
963
|
-
s(
|
|
963
|
+
s(e);
|
|
964
964
|
});
|
|
965
965
|
});
|
|
966
966
|
}
|
|
967
967
|
resumePausedMutations() {
|
|
968
|
-
const
|
|
968
|
+
const e = this.getAll().filter((s) => s.state.isPaused);
|
|
969
969
|
return R.batch(
|
|
970
970
|
() => Promise.all(
|
|
971
|
-
|
|
971
|
+
e.map((s) => s.continue().catch(V))
|
|
972
972
|
)
|
|
973
973
|
);
|
|
974
974
|
}
|
|
975
|
-
}, K = new WeakMap(),
|
|
976
|
-
function
|
|
977
|
-
var
|
|
978
|
-
return ((
|
|
975
|
+
}, K = new WeakMap(), Kt = new WeakMap(), es);
|
|
976
|
+
function se(t) {
|
|
977
|
+
var e;
|
|
978
|
+
return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
|
|
979
979
|
}
|
|
980
|
-
function ar(
|
|
980
|
+
function ar(t) {
|
|
981
981
|
return {
|
|
982
|
-
onFetch: (
|
|
982
|
+
onFetch: (e, s) => {
|
|
983
983
|
const r = async () => {
|
|
984
984
|
var E, S, j, x, C;
|
|
985
|
-
const n =
|
|
985
|
+
const n = e.options, l = (j = (S = (E = e.fetchOptions) == null ? void 0 : E.meta) == null ? void 0 : S.fetchMore) == null ? void 0 : j.direction, o = ((x = e.state.data) == null ? void 0 : x.pages) || [], c = ((C = e.state.data) == null ? void 0 : C.pageParams) || [], m = { pages: [], pageParams: [] };
|
|
986
986
|
let y = !1;
|
|
987
987
|
const d = (_) => {
|
|
988
988
|
Object.defineProperty(_, "signal", {
|
|
989
989
|
enumerable: !0,
|
|
990
|
-
get: () => (
|
|
990
|
+
get: () => (e.signal.aborted ? y = !0 : e.signal.addEventListener("abort", () => {
|
|
991
991
|
y = !0;
|
|
992
|
-
}),
|
|
992
|
+
}), e.signal)
|
|
993
993
|
});
|
|
994
|
-
}, v =
|
|
995
|
-
new Error(`Missing queryFn: '${
|
|
994
|
+
}, v = e.options.queryFn && e.options.queryFn !== Ne ? e.options.queryFn : () => Promise.reject(
|
|
995
|
+
new Error(`Missing queryFn: '${e.options.queryHash}'`)
|
|
996
996
|
), u = async (_, O, F) => {
|
|
997
997
|
if (y)
|
|
998
998
|
return Promise.reject();
|
|
999
999
|
if (O == null && _.pages.length)
|
|
1000
1000
|
return Promise.resolve(_);
|
|
1001
1001
|
const Y = {
|
|
1002
|
-
queryKey:
|
|
1002
|
+
queryKey: e.queryKey,
|
|
1003
1003
|
pageParam: O,
|
|
1004
1004
|
direction: F ? "backward" : "forward",
|
|
1005
|
-
meta:
|
|
1005
|
+
meta: e.options.meta
|
|
1006
1006
|
};
|
|
1007
1007
|
d(Y);
|
|
1008
1008
|
const z = await v(
|
|
1009
1009
|
Y
|
|
1010
|
-
), { maxPages: P } =
|
|
1010
|
+
), { maxPages: P } = e.options, W = F ? Js : zs;
|
|
1011
1011
|
return {
|
|
1012
1012
|
pages: W(_.pages, z, P),
|
|
1013
1013
|
pageParams: W(_.pageParams, O, P)
|
|
@@ -1015,7 +1015,7 @@ function ar(e) {
|
|
|
1015
1015
|
};
|
|
1016
1016
|
let p;
|
|
1017
1017
|
if (l && o.length) {
|
|
1018
|
-
const _ = l === "backward", O = _ ? or :
|
|
1018
|
+
const _ = l === "backward", O = _ ? or : He, F = {
|
|
1019
1019
|
pages: o,
|
|
1020
1020
|
pageParams: c
|
|
1021
1021
|
}, Y = O(n, F);
|
|
@@ -1025,378 +1025,378 @@ function ar(e) {
|
|
|
1025
1025
|
m,
|
|
1026
1026
|
c[0] ?? n.initialPageParam
|
|
1027
1027
|
);
|
|
1028
|
-
const _ =
|
|
1028
|
+
const _ = t ?? o.length;
|
|
1029
1029
|
for (let O = 1; O < _; O++) {
|
|
1030
|
-
const F =
|
|
1030
|
+
const F = He(n, p);
|
|
1031
1031
|
p = await u(p, F);
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
return p;
|
|
1035
1035
|
};
|
|
1036
|
-
|
|
1036
|
+
e.options.persister ? e.fetchFn = () => {
|
|
1037
1037
|
var n, l;
|
|
1038
|
-
return (l = (n =
|
|
1038
|
+
return (l = (n = e.options).persister) == null ? void 0 : l.call(
|
|
1039
1039
|
n,
|
|
1040
1040
|
r,
|
|
1041
1041
|
{
|
|
1042
|
-
queryKey:
|
|
1043
|
-
meta:
|
|
1044
|
-
signal:
|
|
1042
|
+
queryKey: e.queryKey,
|
|
1043
|
+
meta: e.options.meta,
|
|
1044
|
+
signal: e.signal
|
|
1045
1045
|
},
|
|
1046
1046
|
s
|
|
1047
1047
|
);
|
|
1048
|
-
} :
|
|
1048
|
+
} : e.fetchFn = r;
|
|
1049
1049
|
}
|
|
1050
1050
|
};
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1053
|
-
const r =
|
|
1054
|
-
return
|
|
1055
|
-
|
|
1056
|
-
|
|
1052
|
+
function He(t, { pages: e, pageParams: s }) {
|
|
1053
|
+
const r = e.length - 1;
|
|
1054
|
+
return t.getNextPageParam(
|
|
1055
|
+
e[r],
|
|
1056
|
+
e,
|
|
1057
1057
|
s[r],
|
|
1058
1058
|
s
|
|
1059
1059
|
);
|
|
1060
1060
|
}
|
|
1061
|
-
function or(
|
|
1061
|
+
function or(t, { pages: e, pageParams: s }) {
|
|
1062
1062
|
var r;
|
|
1063
|
-
return (r =
|
|
1064
|
-
e,
|
|
1065
|
-
t[0],
|
|
1063
|
+
return (r = t.getPreviousPageParam) == null ? void 0 : r.call(
|
|
1066
1064
|
t,
|
|
1065
|
+
e[0],
|
|
1066
|
+
e,
|
|
1067
1067
|
s[0],
|
|
1068
1068
|
s
|
|
1069
1069
|
);
|
|
1070
1070
|
}
|
|
1071
|
-
var M,
|
|
1072
|
-
constructor(
|
|
1071
|
+
var M, nt, at, At, Nt, ot, kt, Ot, ss, ps = (ss = class {
|
|
1072
|
+
constructor(t = {}) {
|
|
1073
1073
|
g(this, M, void 0);
|
|
1074
|
-
g(this,
|
|
1075
|
-
g(this,
|
|
1076
|
-
g(this,
|
|
1077
|
-
g(this,
|
|
1078
|
-
g(this,
|
|
1079
|
-
g(this,
|
|
1080
|
-
g(this,
|
|
1081
|
-
f(this, M,
|
|
1074
|
+
g(this, nt, void 0);
|
|
1075
|
+
g(this, at, void 0);
|
|
1076
|
+
g(this, At, void 0);
|
|
1077
|
+
g(this, Nt, void 0);
|
|
1078
|
+
g(this, ot, void 0);
|
|
1079
|
+
g(this, kt, void 0);
|
|
1080
|
+
g(this, Ot, void 0);
|
|
1081
|
+
f(this, M, t.queryCache || new rr()), f(this, nt, t.mutationCache || new nr()), f(this, at, t.defaultOptions || {}), f(this, At, /* @__PURE__ */ new Map()), f(this, Nt, /* @__PURE__ */ new Map()), f(this, ot, 0);
|
|
1082
1082
|
}
|
|
1083
1083
|
mount() {
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
})), f(this,
|
|
1087
|
-
|
|
1084
|
+
ee(this, ot)._++, a(this, ot) === 1 && (f(this, kt, ke.subscribe(async (t) => {
|
|
1085
|
+
t && (await this.resumePausedMutations(), a(this, M).onFocus());
|
|
1086
|
+
})), f(this, Ot, ne.subscribe(async (t) => {
|
|
1087
|
+
t && (await this.resumePausedMutations(), a(this, M).onOnline());
|
|
1088
1088
|
})));
|
|
1089
1089
|
}
|
|
1090
1090
|
unmount() {
|
|
1091
|
-
var
|
|
1092
|
-
|
|
1091
|
+
var t, e;
|
|
1092
|
+
ee(this, ot)._--, a(this, ot) === 0 && ((t = a(this, kt)) == null || t.call(this), f(this, kt, void 0), (e = a(this, Ot)) == null || e.call(this), f(this, Ot, void 0));
|
|
1093
1093
|
}
|
|
1094
|
-
isFetching(
|
|
1095
|
-
return a(this, M).findAll({ ...
|
|
1094
|
+
isFetching(t) {
|
|
1095
|
+
return a(this, M).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
1096
1096
|
}
|
|
1097
|
-
isMutating(
|
|
1098
|
-
return a(this,
|
|
1097
|
+
isMutating(t) {
|
|
1098
|
+
return a(this, nt).findAll({ ...t, status: "pending" }).length;
|
|
1099
1099
|
}
|
|
1100
|
-
getQueryData(
|
|
1100
|
+
getQueryData(t) {
|
|
1101
1101
|
var s;
|
|
1102
|
-
const
|
|
1103
|
-
return (s = a(this, M).get(
|
|
1102
|
+
const e = this.defaultQueryOptions({ queryKey: t });
|
|
1103
|
+
return (s = a(this, M).get(e.queryHash)) == null ? void 0 : s.state.data;
|
|
1104
1104
|
}
|
|
1105
|
-
ensureQueryData(
|
|
1106
|
-
const
|
|
1107
|
-
if (
|
|
1108
|
-
return this.fetchQuery(
|
|
1105
|
+
ensureQueryData(t) {
|
|
1106
|
+
const e = this.getQueryData(t.queryKey);
|
|
1107
|
+
if (e === void 0)
|
|
1108
|
+
return this.fetchQuery(t);
|
|
1109
1109
|
{
|
|
1110
|
-
const s = this.defaultQueryOptions(
|
|
1111
|
-
return
|
|
1110
|
+
const s = this.defaultQueryOptions(t), r = a(this, M).build(this, s);
|
|
1111
|
+
return t.revalidateIfStale && r.isStaleByTime(s.staleTime) && this.prefetchQuery(s), Promise.resolve(e);
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
|
-
getQueriesData(
|
|
1115
|
-
return a(this, M).findAll(
|
|
1114
|
+
getQueriesData(t) {
|
|
1115
|
+
return a(this, M).findAll(t).map(({ queryKey: e, state: s }) => {
|
|
1116
1116
|
const r = s.data;
|
|
1117
|
-
return [
|
|
1117
|
+
return [e, r];
|
|
1118
1118
|
});
|
|
1119
1119
|
}
|
|
1120
|
-
setQueryData(
|
|
1121
|
-
const r = this.defaultQueryOptions({ queryKey:
|
|
1120
|
+
setQueryData(t, e, s) {
|
|
1121
|
+
const r = this.defaultQueryOptions({ queryKey: t }), n = a(this, M).get(
|
|
1122
1122
|
r.queryHash
|
|
1123
|
-
), l = n == null ? void 0 : n.state.data, o = Zs(
|
|
1123
|
+
), l = n == null ? void 0 : n.state.data, o = Zs(e, l);
|
|
1124
1124
|
if (o !== void 0)
|
|
1125
1125
|
return a(this, M).build(this, r).setData(o, { ...s, manual: !0 });
|
|
1126
1126
|
}
|
|
1127
|
-
setQueriesData(
|
|
1127
|
+
setQueriesData(t, e, s) {
|
|
1128
1128
|
return R.batch(
|
|
1129
|
-
() => a(this, M).findAll(
|
|
1129
|
+
() => a(this, M).findAll(t).map(({ queryKey: r }) => [
|
|
1130
1130
|
r,
|
|
1131
|
-
this.setQueryData(r,
|
|
1131
|
+
this.setQueryData(r, e, s)
|
|
1132
1132
|
])
|
|
1133
1133
|
);
|
|
1134
1134
|
}
|
|
1135
|
-
getQueryState(
|
|
1135
|
+
getQueryState(t) {
|
|
1136
1136
|
var s;
|
|
1137
|
-
const
|
|
1138
|
-
return (s = a(this, M).get(
|
|
1137
|
+
const e = this.defaultQueryOptions({ queryKey: t });
|
|
1138
|
+
return (s = a(this, M).get(e.queryHash)) == null ? void 0 : s.state;
|
|
1139
1139
|
}
|
|
1140
|
-
removeQueries(
|
|
1141
|
-
const
|
|
1140
|
+
removeQueries(t) {
|
|
1141
|
+
const e = a(this, M);
|
|
1142
1142
|
R.batch(() => {
|
|
1143
|
-
|
|
1144
|
-
|
|
1143
|
+
e.findAll(t).forEach((s) => {
|
|
1144
|
+
e.remove(s);
|
|
1145
1145
|
});
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
resetQueries(
|
|
1148
|
+
resetQueries(t, e) {
|
|
1149
1149
|
const s = a(this, M), r = {
|
|
1150
1150
|
type: "active",
|
|
1151
|
-
...
|
|
1151
|
+
...t
|
|
1152
1152
|
};
|
|
1153
|
-
return R.batch(() => (s.findAll(
|
|
1153
|
+
return R.batch(() => (s.findAll(t).forEach((n) => {
|
|
1154
1154
|
n.reset();
|
|
1155
|
-
}), this.refetchQueries(r,
|
|
1155
|
+
}), this.refetchQueries(r, e)));
|
|
1156
1156
|
}
|
|
1157
|
-
cancelQueries(
|
|
1158
|
-
const s = { revert: !0, ...
|
|
1159
|
-
() => a(this, M).findAll(
|
|
1157
|
+
cancelQueries(t = {}, e = {}) {
|
|
1158
|
+
const s = { revert: !0, ...e }, r = R.batch(
|
|
1159
|
+
() => a(this, M).findAll(t).map((n) => n.cancel(s))
|
|
1160
1160
|
);
|
|
1161
1161
|
return Promise.all(r).then(V).catch(V);
|
|
1162
1162
|
}
|
|
1163
|
-
invalidateQueries(
|
|
1163
|
+
invalidateQueries(t = {}, e = {}) {
|
|
1164
1164
|
return R.batch(() => {
|
|
1165
|
-
if (a(this, M).findAll(
|
|
1165
|
+
if (a(this, M).findAll(t).forEach((r) => {
|
|
1166
1166
|
r.invalidate();
|
|
1167
|
-
}),
|
|
1167
|
+
}), t.refetchType === "none")
|
|
1168
1168
|
return Promise.resolve();
|
|
1169
1169
|
const s = {
|
|
1170
|
-
...
|
|
1171
|
-
type:
|
|
1170
|
+
...t,
|
|
1171
|
+
type: t.refetchType ?? t.type ?? "active"
|
|
1172
1172
|
};
|
|
1173
|
-
return this.refetchQueries(s,
|
|
1173
|
+
return this.refetchQueries(s, e);
|
|
1174
1174
|
});
|
|
1175
1175
|
}
|
|
1176
|
-
refetchQueries(
|
|
1176
|
+
refetchQueries(t = {}, e) {
|
|
1177
1177
|
const s = {
|
|
1178
|
-
...
|
|
1179
|
-
cancelRefetch: (
|
|
1178
|
+
...e,
|
|
1179
|
+
cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
|
|
1180
1180
|
}, r = R.batch(
|
|
1181
|
-
() => a(this, M).findAll(
|
|
1181
|
+
() => a(this, M).findAll(t).filter((n) => !n.isDisabled()).map((n) => {
|
|
1182
1182
|
let l = n.fetch(void 0, s);
|
|
1183
1183
|
return s.throwOnError || (l = l.catch(V)), n.state.fetchStatus === "paused" ? Promise.resolve() : l;
|
|
1184
1184
|
})
|
|
1185
1185
|
);
|
|
1186
1186
|
return Promise.all(r).then(V);
|
|
1187
1187
|
}
|
|
1188
|
-
fetchQuery(
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1191
|
-
const s = a(this, M).build(this,
|
|
1192
|
-
return s.isStaleByTime(
|
|
1188
|
+
fetchQuery(t) {
|
|
1189
|
+
const e = this.defaultQueryOptions(t);
|
|
1190
|
+
e.retry === void 0 && (e.retry = !1);
|
|
1191
|
+
const s = a(this, M).build(this, e);
|
|
1192
|
+
return s.isStaleByTime(e.staleTime) ? s.fetch(e) : Promise.resolve(s.state.data);
|
|
1193
1193
|
}
|
|
1194
|
-
prefetchQuery(
|
|
1195
|
-
return this.fetchQuery(
|
|
1194
|
+
prefetchQuery(t) {
|
|
1195
|
+
return this.fetchQuery(t).then(V).catch(V);
|
|
1196
1196
|
}
|
|
1197
|
-
fetchInfiniteQuery(
|
|
1198
|
-
return
|
|
1197
|
+
fetchInfiniteQuery(t) {
|
|
1198
|
+
return t.behavior = ar(t.pages), this.fetchQuery(t);
|
|
1199
1199
|
}
|
|
1200
|
-
prefetchInfiniteQuery(
|
|
1201
|
-
return this.fetchInfiniteQuery(
|
|
1200
|
+
prefetchInfiniteQuery(t) {
|
|
1201
|
+
return this.fetchInfiniteQuery(t).then(V).catch(V);
|
|
1202
1202
|
}
|
|
1203
1203
|
resumePausedMutations() {
|
|
1204
|
-
return
|
|
1204
|
+
return ne.isOnline() ? a(this, nt).resumePausedMutations() : Promise.resolve();
|
|
1205
1205
|
}
|
|
1206
1206
|
getQueryCache() {
|
|
1207
1207
|
return a(this, M);
|
|
1208
1208
|
}
|
|
1209
1209
|
getMutationCache() {
|
|
1210
|
-
return a(this,
|
|
1210
|
+
return a(this, nt);
|
|
1211
1211
|
}
|
|
1212
1212
|
getDefaultOptions() {
|
|
1213
|
-
return a(this,
|
|
1213
|
+
return a(this, at);
|
|
1214
1214
|
}
|
|
1215
|
-
setDefaultOptions(
|
|
1216
|
-
f(this,
|
|
1215
|
+
setDefaultOptions(t) {
|
|
1216
|
+
f(this, at, t);
|
|
1217
1217
|
}
|
|
1218
|
-
setQueryDefaults(
|
|
1219
|
-
a(this,
|
|
1220
|
-
queryKey:
|
|
1221
|
-
defaultOptions:
|
|
1218
|
+
setQueryDefaults(t, e) {
|
|
1219
|
+
a(this, At).set(Ct(t), {
|
|
1220
|
+
queryKey: t,
|
|
1221
|
+
defaultOptions: e
|
|
1222
1222
|
});
|
|
1223
1223
|
}
|
|
1224
|
-
getQueryDefaults(
|
|
1225
|
-
const
|
|
1224
|
+
getQueryDefaults(t) {
|
|
1225
|
+
const e = [...a(this, At).values()];
|
|
1226
1226
|
let s = {};
|
|
1227
|
-
return
|
|
1228
|
-
|
|
1227
|
+
return e.forEach((r) => {
|
|
1228
|
+
Ht(t, r.queryKey) && (s = { ...s, ...r.defaultOptions });
|
|
1229
1229
|
}), s;
|
|
1230
1230
|
}
|
|
1231
|
-
setMutationDefaults(
|
|
1232
|
-
a(this,
|
|
1233
|
-
mutationKey:
|
|
1234
|
-
defaultOptions:
|
|
1231
|
+
setMutationDefaults(t, e) {
|
|
1232
|
+
a(this, Nt).set(Ct(t), {
|
|
1233
|
+
mutationKey: t,
|
|
1234
|
+
defaultOptions: e
|
|
1235
1235
|
});
|
|
1236
1236
|
}
|
|
1237
|
-
getMutationDefaults(
|
|
1238
|
-
const
|
|
1237
|
+
getMutationDefaults(t) {
|
|
1238
|
+
const e = [...a(this, Nt).values()];
|
|
1239
1239
|
let s = {};
|
|
1240
|
-
return
|
|
1241
|
-
|
|
1240
|
+
return e.forEach((r) => {
|
|
1241
|
+
Ht(t, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
|
|
1242
1242
|
}), s;
|
|
1243
1243
|
}
|
|
1244
|
-
defaultQueryOptions(
|
|
1245
|
-
if (
|
|
1246
|
-
return
|
|
1247
|
-
const
|
|
1248
|
-
...a(this,
|
|
1249
|
-
...this.getQueryDefaults(
|
|
1250
|
-
...
|
|
1244
|
+
defaultQueryOptions(t) {
|
|
1245
|
+
if (t._defaulted)
|
|
1246
|
+
return t;
|
|
1247
|
+
const e = {
|
|
1248
|
+
...a(this, at).queries,
|
|
1249
|
+
...this.getQueryDefaults(t.queryKey),
|
|
1250
|
+
...t,
|
|
1251
1251
|
_defaulted: !0
|
|
1252
1252
|
};
|
|
1253
|
-
return
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
)),
|
|
1253
|
+
return e.queryHash || (e.queryHash = Ae(
|
|
1254
|
+
e.queryKey,
|
|
1255
|
+
e
|
|
1256
|
+
)), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === Ne && (e.enabled = !1), e;
|
|
1257
1257
|
}
|
|
1258
|
-
defaultMutationOptions(
|
|
1259
|
-
return
|
|
1260
|
-
...a(this,
|
|
1261
|
-
...(
|
|
1262
|
-
...
|
|
1258
|
+
defaultMutationOptions(t) {
|
|
1259
|
+
return t != null && t._defaulted ? t : {
|
|
1260
|
+
...a(this, at).mutations,
|
|
1261
|
+
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
1262
|
+
...t,
|
|
1263
1263
|
_defaulted: !0
|
|
1264
1264
|
};
|
|
1265
1265
|
}
|
|
1266
1266
|
clear() {
|
|
1267
|
-
a(this, M).clear(), a(this,
|
|
1267
|
+
a(this, M).clear(), a(this, nt).clear();
|
|
1268
1268
|
}
|
|
1269
|
-
}, M = new WeakMap(),
|
|
1270
|
-
constructor(
|
|
1269
|
+
}, M = new WeakMap(), nt = new WeakMap(), at = new WeakMap(), At = new WeakMap(), Nt = new WeakMap(), ot = new WeakMap(), kt = new WeakMap(), Ot = new WeakMap(), ss), Q, k, qt, U, mt, Mt, B, Gt, Lt, Ft, vt, gt, lt, Rt, yt, Qt, Vt, ve, Wt, ge, Zt, ye, Yt, Ce, zt, xe, Jt, be, Xt, we, ce, ms, rs, lr = (rs = class extends Ut {
|
|
1270
|
+
constructor(e, s) {
|
|
1271
1271
|
super();
|
|
1272
|
-
g(this,
|
|
1273
|
-
g(this,
|
|
1274
|
-
g(this,
|
|
1275
|
-
g(this,
|
|
1276
|
-
g(this,
|
|
1277
|
-
g(this,
|
|
1278
|
-
g(this,
|
|
1279
|
-
g(this,
|
|
1280
|
-
g(this,
|
|
1272
|
+
g(this, yt);
|
|
1273
|
+
g(this, Vt);
|
|
1274
|
+
g(this, Wt);
|
|
1275
|
+
g(this, Zt);
|
|
1276
|
+
g(this, Yt);
|
|
1277
|
+
g(this, zt);
|
|
1278
|
+
g(this, Jt);
|
|
1279
|
+
g(this, Xt);
|
|
1280
|
+
g(this, ce);
|
|
1281
1281
|
g(this, Q, void 0);
|
|
1282
1282
|
g(this, k, void 0);
|
|
1283
|
-
g(this,
|
|
1283
|
+
g(this, qt, void 0);
|
|
1284
1284
|
g(this, U, void 0);
|
|
1285
|
-
g(this,
|
|
1286
|
-
g(this,
|
|
1285
|
+
g(this, mt, void 0);
|
|
1286
|
+
g(this, Mt, void 0);
|
|
1287
1287
|
g(this, B, void 0);
|
|
1288
|
-
g(this,
|
|
1289
|
-
g(this,
|
|
1288
|
+
g(this, Gt, void 0);
|
|
1289
|
+
g(this, Lt, void 0);
|
|
1290
1290
|
// This property keeps track of the last query with defined data.
|
|
1291
1291
|
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
1292
|
-
g(this,
|
|
1293
|
-
g(this,
|
|
1294
|
-
g(this,
|
|
1295
|
-
g(this,
|
|
1296
|
-
g(this,
|
|
1297
|
-
this.options = s, f(this, Q,
|
|
1292
|
+
g(this, Ft, void 0);
|
|
1293
|
+
g(this, vt, void 0);
|
|
1294
|
+
g(this, gt, void 0);
|
|
1295
|
+
g(this, lt, void 0);
|
|
1296
|
+
g(this, Rt, /* @__PURE__ */ new Set());
|
|
1297
|
+
this.options = s, f(this, Q, e), f(this, B, null), this.bindMethods(), this.setOptions(s);
|
|
1298
1298
|
}
|
|
1299
1299
|
bindMethods() {
|
|
1300
1300
|
this.refetch = this.refetch.bind(this);
|
|
1301
1301
|
}
|
|
1302
1302
|
onSubscribe() {
|
|
1303
|
-
this.listeners.size === 1 && (a(this, k).addObserver(this), $
|
|
1303
|
+
this.listeners.size === 1 && (a(this, k).addObserver(this), $e(a(this, k), this.options) ? b(this, yt, Qt).call(this) : this.updateResult(), b(this, Yt, Ce).call(this));
|
|
1304
1304
|
}
|
|
1305
1305
|
onUnsubscribe() {
|
|
1306
1306
|
this.hasListeners() || this.destroy();
|
|
1307
1307
|
}
|
|
1308
1308
|
shouldFetchOnReconnect() {
|
|
1309
|
-
return
|
|
1309
|
+
return je(
|
|
1310
1310
|
a(this, k),
|
|
1311
1311
|
this.options,
|
|
1312
1312
|
this.options.refetchOnReconnect
|
|
1313
1313
|
);
|
|
1314
1314
|
}
|
|
1315
1315
|
shouldFetchOnWindowFocus() {
|
|
1316
|
-
return
|
|
1316
|
+
return je(
|
|
1317
1317
|
a(this, k),
|
|
1318
1318
|
this.options,
|
|
1319
1319
|
this.options.refetchOnWindowFocus
|
|
1320
1320
|
);
|
|
1321
1321
|
}
|
|
1322
1322
|
destroy() {
|
|
1323
|
-
this.listeners = /* @__PURE__ */ new Set(), b(this,
|
|
1323
|
+
this.listeners = /* @__PURE__ */ new Set(), b(this, zt, xe).call(this), b(this, Jt, be).call(this), a(this, k).removeObserver(this);
|
|
1324
1324
|
}
|
|
1325
|
-
setOptions(
|
|
1325
|
+
setOptions(e, s) {
|
|
1326
1326
|
const r = this.options, n = a(this, k);
|
|
1327
|
-
if (this.options = a(this, Q).defaultQueryOptions(
|
|
1327
|
+
if (this.options = a(this, Q).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean")
|
|
1328
1328
|
throw new Error("Expected enabled to be a boolean");
|
|
1329
|
-
b(this,
|
|
1329
|
+
b(this, Xt, we).call(this), a(this, k).setOptions(this.options), r._defaulted && !ie(this.options, r) && a(this, Q).getQueryCache().notify({
|
|
1330
1330
|
type: "observerOptionsUpdated",
|
|
1331
1331
|
query: a(this, k),
|
|
1332
1332
|
observer: this
|
|
1333
1333
|
});
|
|
1334
1334
|
const l = this.hasListeners();
|
|
1335
|
-
l &&
|
|
1335
|
+
l && Ke(
|
|
1336
1336
|
a(this, k),
|
|
1337
1337
|
n,
|
|
1338
1338
|
this.options,
|
|
1339
1339
|
r
|
|
1340
|
-
) && b(this,
|
|
1341
|
-
const o = b(this,
|
|
1342
|
-
l && (a(this, k) !== n || this.options.enabled !== r.enabled || o !== a(this,
|
|
1340
|
+
) && b(this, yt, Qt).call(this), this.updateResult(s), l && (a(this, k) !== n || this.options.enabled !== r.enabled || this.options.staleTime !== r.staleTime) && b(this, Vt, ve).call(this);
|
|
1341
|
+
const o = b(this, Wt, ge).call(this);
|
|
1342
|
+
l && (a(this, k) !== n || this.options.enabled !== r.enabled || o !== a(this, lt)) && b(this, Zt, ye).call(this, o);
|
|
1343
1343
|
}
|
|
1344
|
-
getOptimisticResult(
|
|
1345
|
-
const s = a(this, Q).getQueryCache().build(a(this, Q),
|
|
1346
|
-
return ur(this, r) && (f(this, U, r), f(this,
|
|
1344
|
+
getOptimisticResult(e) {
|
|
1345
|
+
const s = a(this, Q).getQueryCache().build(a(this, Q), e), r = this.createResult(s, e);
|
|
1346
|
+
return ur(this, r) && (f(this, U, r), f(this, Mt, this.options), f(this, mt, a(this, k).state)), r;
|
|
1347
1347
|
}
|
|
1348
1348
|
getCurrentResult() {
|
|
1349
1349
|
return a(this, U);
|
|
1350
1350
|
}
|
|
1351
|
-
trackResult(
|
|
1351
|
+
trackResult(e, s) {
|
|
1352
1352
|
const r = {};
|
|
1353
|
-
return Object.keys(
|
|
1353
|
+
return Object.keys(e).forEach((n) => {
|
|
1354
1354
|
Object.defineProperty(r, n, {
|
|
1355
1355
|
configurable: !1,
|
|
1356
1356
|
enumerable: !0,
|
|
1357
|
-
get: () => (this.trackProp(n), s == null || s(n),
|
|
1357
|
+
get: () => (this.trackProp(n), s == null || s(n), e[n])
|
|
1358
1358
|
});
|
|
1359
1359
|
}), r;
|
|
1360
1360
|
}
|
|
1361
|
-
trackProp(
|
|
1362
|
-
a(this,
|
|
1361
|
+
trackProp(e) {
|
|
1362
|
+
a(this, Rt).add(e);
|
|
1363
1363
|
}
|
|
1364
1364
|
getCurrentQuery() {
|
|
1365
1365
|
return a(this, k);
|
|
1366
1366
|
}
|
|
1367
|
-
refetch({ ...
|
|
1367
|
+
refetch({ ...e } = {}) {
|
|
1368
1368
|
return this.fetch({
|
|
1369
|
-
...
|
|
1369
|
+
...e
|
|
1370
1370
|
});
|
|
1371
1371
|
}
|
|
1372
|
-
fetchOptimistic(
|
|
1373
|
-
const s = a(this, Q).defaultQueryOptions(
|
|
1372
|
+
fetchOptimistic(e) {
|
|
1373
|
+
const s = a(this, Q).defaultQueryOptions(e), r = a(this, Q).getQueryCache().build(a(this, Q), s);
|
|
1374
1374
|
return r.isFetchingOptimistic = !0, r.fetch().then(() => this.createResult(r, s));
|
|
1375
1375
|
}
|
|
1376
|
-
fetch(
|
|
1377
|
-
return b(this,
|
|
1378
|
-
...
|
|
1379
|
-
cancelRefetch:
|
|
1376
|
+
fetch(e) {
|
|
1377
|
+
return b(this, yt, Qt).call(this, {
|
|
1378
|
+
...e,
|
|
1379
|
+
cancelRefetch: e.cancelRefetch ?? !0
|
|
1380
1380
|
}).then(() => (this.updateResult(), a(this, U)));
|
|
1381
1381
|
}
|
|
1382
|
-
createResult(
|
|
1382
|
+
createResult(e, s) {
|
|
1383
1383
|
var z;
|
|
1384
|
-
const r = a(this, k), n = this.options, l = a(this, U), o = a(this,
|
|
1384
|
+
const r = a(this, k), n = this.options, l = a(this, U), o = a(this, mt), c = a(this, Mt), y = e !== r ? e.state : a(this, qt), { state: d } = e;
|
|
1385
1385
|
let v = { ...d }, u = !1, p;
|
|
1386
1386
|
if (s._optimisticResults) {
|
|
1387
|
-
const P = this.hasListeners(), W = !P && $
|
|
1387
|
+
const P = this.hasListeners(), W = !P && $e(e, s), Hs = P && Ke(e, r, s, n);
|
|
1388
1388
|
(W || Hs) && (v = {
|
|
1389
1389
|
...v,
|
|
1390
|
-
...ds(d.data,
|
|
1390
|
+
...ds(d.data, e.options)
|
|
1391
1391
|
}), s._optimisticResults === "isRestoring" && (v.fetchStatus = "idle");
|
|
1392
1392
|
}
|
|
1393
1393
|
let { error: E, errorUpdatedAt: S, status: j } = v;
|
|
1394
1394
|
if (s.select && v.data !== void 0)
|
|
1395
|
-
if (l && v.data === (o == null ? void 0 : o.data) && s.select === a(this,
|
|
1396
|
-
p = a(this,
|
|
1395
|
+
if (l && v.data === (o == null ? void 0 : o.data) && s.select === a(this, Gt))
|
|
1396
|
+
p = a(this, Lt);
|
|
1397
1397
|
else
|
|
1398
1398
|
try {
|
|
1399
|
-
f(this,
|
|
1399
|
+
f(this, Gt, s.select), p = s.select(v.data), p = me(l == null ? void 0 : l.data, p, s), f(this, Lt, p), f(this, B, null);
|
|
1400
1400
|
} catch (P) {
|
|
1401
1401
|
f(this, B, P);
|
|
1402
1402
|
}
|
|
@@ -1407,21 +1407,21 @@ var M, ne, ae, Ae, Ne, oe, ke, Oe, ss, ps = (ss = class {
|
|
|
1407
1407
|
if (l != null && l.isPlaceholderData && s.placeholderData === (c == null ? void 0 : c.placeholderData))
|
|
1408
1408
|
P = l.data;
|
|
1409
1409
|
else if (P = typeof s.placeholderData == "function" ? s.placeholderData(
|
|
1410
|
-
(z = a(this,
|
|
1411
|
-
a(this,
|
|
1410
|
+
(z = a(this, Ft)) == null ? void 0 : z.state.data,
|
|
1411
|
+
a(this, Ft)
|
|
1412
1412
|
) : s.placeholderData, s.select && P !== void 0)
|
|
1413
1413
|
try {
|
|
1414
1414
|
P = s.select(P), f(this, B, null);
|
|
1415
1415
|
} catch (W) {
|
|
1416
1416
|
f(this, B, W);
|
|
1417
1417
|
}
|
|
1418
|
-
P !== void 0 && (j = "success", p =
|
|
1418
|
+
P !== void 0 && (j = "success", p = me(
|
|
1419
1419
|
l == null ? void 0 : l.data,
|
|
1420
1420
|
P,
|
|
1421
1421
|
s
|
|
1422
1422
|
), u = !0);
|
|
1423
1423
|
}
|
|
1424
|
-
a(this, B) && (E = a(this, B), p = a(this,
|
|
1424
|
+
a(this, B) && (E = a(this, B), p = a(this, Lt), S = Date.now(), j = "error");
|
|
1425
1425
|
const x = v.fetchStatus === "fetching", C = j === "pending", _ = j === "error", O = C && x, F = p !== void 0;
|
|
1426
1426
|
return {
|
|
1427
1427
|
status: j,
|
|
@@ -1446,72 +1446,72 @@ var M, ne, ae, Ae, Ne, oe, ke, Oe, ss, ps = (ss = class {
|
|
|
1446
1446
|
isPaused: v.fetchStatus === "paused",
|
|
1447
1447
|
isPlaceholderData: u,
|
|
1448
1448
|
isRefetchError: _ && F,
|
|
1449
|
-
isStale:
|
|
1449
|
+
isStale: Oe(e, s),
|
|
1450
1450
|
refetch: this.refetch
|
|
1451
1451
|
};
|
|
1452
1452
|
}
|
|
1453
|
-
updateResult(
|
|
1453
|
+
updateResult(e) {
|
|
1454
1454
|
const s = a(this, U), r = this.createResult(a(this, k), this.options);
|
|
1455
|
-
if (f(this,
|
|
1455
|
+
if (f(this, mt, a(this, k).state), f(this, Mt, this.options), a(this, mt).data !== void 0 && f(this, Ft, a(this, k)), ie(r, s))
|
|
1456
1456
|
return;
|
|
1457
1457
|
f(this, U, r);
|
|
1458
1458
|
const n = {}, l = () => {
|
|
1459
1459
|
if (!s)
|
|
1460
1460
|
return !0;
|
|
1461
1461
|
const { notifyOnChangeProps: o } = this.options, c = typeof o == "function" ? o() : o;
|
|
1462
|
-
if (c === "all" || !c && !a(this,
|
|
1462
|
+
if (c === "all" || !c && !a(this, Rt).size)
|
|
1463
1463
|
return !0;
|
|
1464
1464
|
const m = new Set(
|
|
1465
|
-
c ?? a(this,
|
|
1465
|
+
c ?? a(this, Rt)
|
|
1466
1466
|
);
|
|
1467
1467
|
return this.options.throwOnError && m.add("error"), Object.keys(a(this, U)).some((y) => {
|
|
1468
1468
|
const d = y;
|
|
1469
1469
|
return a(this, U)[d] !== s[d] && m.has(d);
|
|
1470
1470
|
});
|
|
1471
1471
|
};
|
|
1472
|
-
(
|
|
1472
|
+
(e == null ? void 0 : e.listeners) !== !1 && l() && (n.listeners = !0), b(this, ce, ms).call(this, { ...n, ...e });
|
|
1473
1473
|
}
|
|
1474
1474
|
onQueryUpdate() {
|
|
1475
|
-
this.updateResult(), this.hasListeners() && b(this,
|
|
1475
|
+
this.updateResult(), this.hasListeners() && b(this, Yt, Ce).call(this);
|
|
1476
1476
|
}
|
|
1477
|
-
}, Q = new WeakMap(), k = new WeakMap(),
|
|
1478
|
-
b(this,
|
|
1477
|
+
}, Q = new WeakMap(), k = new WeakMap(), qt = new WeakMap(), U = new WeakMap(), mt = new WeakMap(), Mt = new WeakMap(), B = new WeakMap(), Gt = new WeakMap(), Lt = new WeakMap(), Ft = new WeakMap(), vt = new WeakMap(), gt = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), yt = new WeakSet(), Qt = function(e) {
|
|
1478
|
+
b(this, Xt, we).call(this);
|
|
1479
1479
|
let s = a(this, k).fetch(
|
|
1480
1480
|
this.options,
|
|
1481
|
-
|
|
1481
|
+
e
|
|
1482
1482
|
);
|
|
1483
|
-
return
|
|
1484
|
-
},
|
|
1485
|
-
if (b(this,
|
|
1483
|
+
return e != null && e.throwOnError || (s = s.catch(V)), s;
|
|
1484
|
+
}, Vt = new WeakSet(), ve = function() {
|
|
1485
|
+
if (b(this, zt, xe).call(this), Tt || a(this, U).isStale || !fe(this.options.staleTime))
|
|
1486
1486
|
return;
|
|
1487
1487
|
const s = as(
|
|
1488
1488
|
a(this, U).dataUpdatedAt,
|
|
1489
1489
|
this.options.staleTime
|
|
1490
1490
|
) + 1;
|
|
1491
|
-
f(this,
|
|
1491
|
+
f(this, vt, setTimeout(() => {
|
|
1492
1492
|
a(this, U).isStale || this.updateResult();
|
|
1493
1493
|
}, s));
|
|
1494
|
-
},
|
|
1494
|
+
}, Wt = new WeakSet(), ge = function() {
|
|
1495
1495
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(a(this, k)) : this.options.refetchInterval) ?? !1;
|
|
1496
|
-
},
|
|
1497
|
-
b(this,
|
|
1498
|
-
(this.options.refetchIntervalInBackground ||
|
|
1499
|
-
}, a(this,
|
|
1500
|
-
},
|
|
1501
|
-
b(this,
|
|
1502
|
-
},
|
|
1503
|
-
a(this,
|
|
1504
|
-
},
|
|
1505
|
-
a(this,
|
|
1506
|
-
},
|
|
1507
|
-
const
|
|
1508
|
-
if (
|
|
1496
|
+
}, Zt = new WeakSet(), ye = function(e) {
|
|
1497
|
+
b(this, Jt, be).call(this), f(this, lt, e), !(Tt || this.options.enabled === !1 || !fe(a(this, lt)) || a(this, lt) === 0) && f(this, gt, setInterval(() => {
|
|
1498
|
+
(this.options.refetchIntervalInBackground || ke.isFocused()) && b(this, yt, Qt).call(this);
|
|
1499
|
+
}, a(this, lt)));
|
|
1500
|
+
}, Yt = new WeakSet(), Ce = function() {
|
|
1501
|
+
b(this, Vt, ve).call(this), b(this, Zt, ye).call(this, b(this, Wt, ge).call(this));
|
|
1502
|
+
}, zt = new WeakSet(), xe = function() {
|
|
1503
|
+
a(this, vt) && (clearTimeout(a(this, vt)), f(this, vt, void 0));
|
|
1504
|
+
}, Jt = new WeakSet(), be = function() {
|
|
1505
|
+
a(this, gt) && (clearInterval(a(this, gt)), f(this, gt, void 0));
|
|
1506
|
+
}, Xt = new WeakSet(), we = function() {
|
|
1507
|
+
const e = a(this, Q).getQueryCache().build(a(this, Q), this.options);
|
|
1508
|
+
if (e === a(this, k))
|
|
1509
1509
|
return;
|
|
1510
1510
|
const s = a(this, k);
|
|
1511
|
-
f(this, k,
|
|
1512
|
-
},
|
|
1511
|
+
f(this, k, e), f(this, qt, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
|
|
1512
|
+
}, ce = new WeakSet(), ms = function(e) {
|
|
1513
1513
|
R.batch(() => {
|
|
1514
|
-
|
|
1514
|
+
e.listeners && this.listeners.forEach((s) => {
|
|
1515
1515
|
s(a(this, U));
|
|
1516
1516
|
}), a(this, Q).getQueryCache().notify({
|
|
1517
1517
|
query: a(this, k),
|
|
@@ -1519,151 +1519,153 @@ var M, ne, ae, Ae, Ne, oe, ke, Oe, ss, ps = (ss = class {
|
|
|
1519
1519
|
});
|
|
1520
1520
|
});
|
|
1521
1521
|
}, rs);
|
|
1522
|
-
function cr(
|
|
1523
|
-
return
|
|
1522
|
+
function cr(t, e) {
|
|
1523
|
+
return e.enabled !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
1524
1524
|
}
|
|
1525
|
-
function $t
|
|
1526
|
-
return cr(
|
|
1525
|
+
function $e(t, e) {
|
|
1526
|
+
return cr(t, e) || t.state.data !== void 0 && je(t, e, e.refetchOnMount);
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
if (
|
|
1530
|
-
const r = typeof s == "function" ? s(
|
|
1531
|
-
return r === "always" || r !== !1 &&
|
|
1528
|
+
function je(t, e, s) {
|
|
1529
|
+
if (e.enabled !== !1) {
|
|
1530
|
+
const r = typeof s == "function" ? s(t) : s;
|
|
1531
|
+
return r === "always" || r !== !1 && Oe(t, e);
|
|
1532
1532
|
}
|
|
1533
1533
|
return !1;
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1536
|
-
return (
|
|
1535
|
+
function Ke(t, e, s, r) {
|
|
1536
|
+
return (t !== e || r.enabled === !1) && (!s.suspense || t.state.status !== "error") && Oe(t, s);
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1539
|
-
return
|
|
1538
|
+
function Oe(t, e) {
|
|
1539
|
+
return e.enabled !== !1 && t.isStaleByTime(e.staleTime);
|
|
1540
1540
|
}
|
|
1541
|
-
function ur(
|
|
1542
|
-
return !
|
|
1541
|
+
function ur(t, e) {
|
|
1542
|
+
return !ie(t.getCurrentResult(), e);
|
|
1543
1543
|
}
|
|
1544
|
-
var
|
|
1545
|
-
constructor(
|
|
1544
|
+
var ct, ut, H, et, Dt, re, It, _e, is, hr = (is = class extends Ut {
|
|
1545
|
+
constructor(e, s) {
|
|
1546
1546
|
super();
|
|
1547
|
-
g(this,
|
|
1548
|
-
g(this,
|
|
1549
|
-
g(this,
|
|
1550
|
-
g(this,
|
|
1547
|
+
g(this, Dt);
|
|
1548
|
+
g(this, It);
|
|
1549
|
+
g(this, ct, void 0);
|
|
1550
|
+
g(this, ut, void 0);
|
|
1551
1551
|
g(this, H, void 0);
|
|
1552
|
-
g(this,
|
|
1553
|
-
f(this,
|
|
1552
|
+
g(this, et, void 0);
|
|
1553
|
+
f(this, ct, e), this.setOptions(s), this.bindMethods(), b(this, Dt, re).call(this);
|
|
1554
1554
|
}
|
|
1555
1555
|
bindMethods() {
|
|
1556
1556
|
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
1557
1557
|
}
|
|
1558
|
-
setOptions(
|
|
1558
|
+
setOptions(e) {
|
|
1559
1559
|
var r;
|
|
1560
1560
|
const s = this.options;
|
|
1561
|
-
this.options = a(this,
|
|
1561
|
+
this.options = a(this, ct).defaultMutationOptions(e), ie(this.options, s) || a(this, ct).getMutationCache().notify({
|
|
1562
1562
|
type: "observerOptionsUpdated",
|
|
1563
1563
|
mutation: a(this, H),
|
|
1564
1564
|
observer: this
|
|
1565
|
-
}), s != null && s.mutationKey && this.options.mutationKey &&
|
|
1565
|
+
}), s != null && s.mutationKey && this.options.mutationKey && Ct(s.mutationKey) !== Ct(this.options.mutationKey) ? this.reset() : ((r = a(this, H)) == null ? void 0 : r.state.status) === "pending" && a(this, H).setOptions(this.options);
|
|
1566
1566
|
}
|
|
1567
1567
|
onUnsubscribe() {
|
|
1568
|
-
var
|
|
1569
|
-
this.hasListeners() || (
|
|
1568
|
+
var e;
|
|
1569
|
+
this.hasListeners() || (e = a(this, H)) == null || e.removeObserver(this);
|
|
1570
1570
|
}
|
|
1571
|
-
onMutationUpdate(
|
|
1572
|
-
b(this,
|
|
1571
|
+
onMutationUpdate(e) {
|
|
1572
|
+
b(this, Dt, re).call(this), b(this, It, _e).call(this, e);
|
|
1573
1573
|
}
|
|
1574
1574
|
getCurrentResult() {
|
|
1575
|
-
return a(this,
|
|
1575
|
+
return a(this, ut);
|
|
1576
1576
|
}
|
|
1577
1577
|
reset() {
|
|
1578
|
-
var
|
|
1579
|
-
(
|
|
1578
|
+
var e;
|
|
1579
|
+
(e = a(this, H)) == null || e.removeObserver(this), f(this, H, void 0), b(this, Dt, re).call(this), b(this, It, _e).call(this);
|
|
1580
1580
|
}
|
|
1581
|
-
mutate(
|
|
1581
|
+
mutate(e, s) {
|
|
1582
1582
|
var r;
|
|
1583
|
-
return f(this,
|
|
1583
|
+
return f(this, et, s), (r = a(this, H)) == null || r.removeObserver(this), f(this, H, a(this, ct).getMutationCache().build(a(this, ct), this.options)), a(this, H).addObserver(this), a(this, H).execute(e);
|
|
1584
1584
|
}
|
|
1585
|
-
},
|
|
1585
|
+
}, ct = new WeakMap(), ut = new WeakMap(), H = new WeakMap(), et = new WeakMap(), Dt = new WeakSet(), re = function() {
|
|
1586
1586
|
var s;
|
|
1587
|
-
const
|
|
1588
|
-
f(this,
|
|
1589
|
-
...
|
|
1590
|
-
isPending:
|
|
1591
|
-
isSuccess:
|
|
1592
|
-
isError:
|
|
1593
|
-
isIdle:
|
|
1587
|
+
const e = ((s = a(this, H)) == null ? void 0 : s.state) ?? fs();
|
|
1588
|
+
f(this, ut, {
|
|
1589
|
+
...e,
|
|
1590
|
+
isPending: e.status === "pending",
|
|
1591
|
+
isSuccess: e.status === "success",
|
|
1592
|
+
isError: e.status === "error",
|
|
1593
|
+
isIdle: e.status === "idle",
|
|
1594
1594
|
mutate: this.mutate,
|
|
1595
1595
|
reset: this.reset
|
|
1596
1596
|
});
|
|
1597
|
-
},
|
|
1597
|
+
}, It = new WeakSet(), _e = function(e) {
|
|
1598
1598
|
R.batch(() => {
|
|
1599
1599
|
var s, r, n, l, o, c, m, y;
|
|
1600
|
-
if (a(this,
|
|
1601
|
-
const d = a(this,
|
|
1602
|
-
(
|
|
1600
|
+
if (a(this, et) && this.hasListeners()) {
|
|
1601
|
+
const d = a(this, ut).variables, v = a(this, ut).context;
|
|
1602
|
+
(e == null ? void 0 : e.type) === "success" ? ((r = (s = a(this, et)).onSuccess) == null || r.call(s, e.data, d, v), (l = (n = a(this, et)).onSettled) == null || l.call(n, e.data, null, d, v)) : (e == null ? void 0 : e.type) === "error" && ((c = (o = a(this, et)).onError) == null || c.call(o, e.error, d, v), (y = (m = a(this, et)).onSettled) == null || y.call(
|
|
1603
1603
|
m,
|
|
1604
1604
|
void 0,
|
|
1605
|
-
|
|
1605
|
+
e.error,
|
|
1606
1606
|
d,
|
|
1607
1607
|
v
|
|
1608
1608
|
));
|
|
1609
1609
|
}
|
|
1610
1610
|
this.listeners.forEach((d) => {
|
|
1611
|
-
d(a(this,
|
|
1611
|
+
d(a(this, ut));
|
|
1612
1612
|
});
|
|
1613
1613
|
});
|
|
1614
1614
|
}, is), vs = h.createContext(
|
|
1615
1615
|
void 0
|
|
1616
|
-
),
|
|
1617
|
-
const
|
|
1618
|
-
if (
|
|
1616
|
+
), Me = (t) => {
|
|
1617
|
+
const e = h.useContext(vs);
|
|
1618
|
+
if (t)
|
|
1619
|
+
return t;
|
|
1620
|
+
if (!e)
|
|
1619
1621
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1620
|
-
return
|
|
1622
|
+
return e;
|
|
1621
1623
|
}, dr = ({
|
|
1622
|
-
client:
|
|
1623
|
-
children:
|
|
1624
|
-
}) => (h.useEffect(() => (
|
|
1625
|
-
|
|
1626
|
-
}), [
|
|
1624
|
+
client: t,
|
|
1625
|
+
children: e
|
|
1626
|
+
}) => (h.useEffect(() => (t.mount(), () => {
|
|
1627
|
+
t.unmount();
|
|
1628
|
+
}), [t]), /* @__PURE__ */ i.jsx(vs.Provider, { value: t, children: e })), gs = h.createContext(!1), fr = () => h.useContext(gs);
|
|
1627
1629
|
gs.Provider;
|
|
1628
1630
|
function pr() {
|
|
1629
|
-
let
|
|
1631
|
+
let t = !1;
|
|
1630
1632
|
return {
|
|
1631
1633
|
clearReset: () => {
|
|
1632
|
-
|
|
1634
|
+
t = !1;
|
|
1633
1635
|
},
|
|
1634
1636
|
reset: () => {
|
|
1635
|
-
|
|
1637
|
+
t = !0;
|
|
1636
1638
|
},
|
|
1637
|
-
isReset: () =>
|
|
1639
|
+
isReset: () => t
|
|
1638
1640
|
};
|
|
1639
1641
|
}
|
|
1640
1642
|
var mr = h.createContext(pr()), vr = () => h.useContext(mr);
|
|
1641
|
-
function ys(
|
|
1642
|
-
return typeof
|
|
1643
|
+
function ys(t, e) {
|
|
1644
|
+
return typeof t == "function" ? t(...e) : !!t;
|
|
1643
1645
|
}
|
|
1644
1646
|
function gr() {
|
|
1645
1647
|
}
|
|
1646
|
-
var yr = (
|
|
1647
|
-
(
|
|
1648
|
-
}, Cr = (
|
|
1648
|
+
var yr = (t, e) => {
|
|
1649
|
+
(t.suspense || t.throwOnError) && (e.isReset() || (t.retryOnMount = !1));
|
|
1650
|
+
}, Cr = (t) => {
|
|
1649
1651
|
h.useEffect(() => {
|
|
1650
|
-
|
|
1651
|
-
}, [
|
|
1652
|
+
t.clearReset();
|
|
1653
|
+
}, [t]);
|
|
1652
1654
|
}, xr = ({
|
|
1653
|
-
result:
|
|
1654
|
-
errorResetBoundary:
|
|
1655
|
+
result: t,
|
|
1656
|
+
errorResetBoundary: e,
|
|
1655
1657
|
throwOnError: s,
|
|
1656
1658
|
query: r
|
|
1657
|
-
}) =>
|
|
1658
|
-
|
|
1659
|
-
}, wr = (
|
|
1659
|
+
}) => t.isError && !e.isReset() && !t.isFetching && r && ys(s, [t.error, r]), br = (t) => {
|
|
1660
|
+
t.suspense && typeof t.staleTime != "number" && (t.staleTime = 1e3);
|
|
1661
|
+
}, wr = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, jr = (t, e, s) => e.fetchOptimistic(t).catch(() => {
|
|
1660
1662
|
s.clearReset();
|
|
1661
1663
|
});
|
|
1662
|
-
function _r(
|
|
1663
|
-
const r =
|
|
1664
|
+
function _r(t, e, s) {
|
|
1665
|
+
const r = Me(s), n = fr(), l = vr(), o = r.defaultQueryOptions(t);
|
|
1664
1666
|
o._optimisticResults = n ? "isRestoring" : "optimistic", br(o), yr(o, l), Cr(l);
|
|
1665
1667
|
const [c] = h.useState(
|
|
1666
|
-
() => new
|
|
1668
|
+
() => new e(
|
|
1667
1669
|
r,
|
|
1668
1670
|
o
|
|
1669
1671
|
)
|
|
@@ -1692,19 +1694,19 @@ function _r(e, t, s) {
|
|
|
1692
1694
|
throw m.error;
|
|
1693
1695
|
return o.notifyOnChangeProps ? m : c.trackResult(m);
|
|
1694
1696
|
}
|
|
1695
|
-
function Cs(
|
|
1696
|
-
return _r(
|
|
1697
|
+
function Cs(t, e) {
|
|
1698
|
+
return _r(t, lr, e);
|
|
1697
1699
|
}
|
|
1698
|
-
function Sr(
|
|
1699
|
-
const s =
|
|
1700
|
+
function Sr(t, e) {
|
|
1701
|
+
const s = Me(e), [r] = h.useState(
|
|
1700
1702
|
() => new hr(
|
|
1701
1703
|
s,
|
|
1702
|
-
|
|
1704
|
+
t
|
|
1703
1705
|
)
|
|
1704
1706
|
);
|
|
1705
1707
|
h.useEffect(() => {
|
|
1706
|
-
r.setOptions(
|
|
1707
|
-
}, [r,
|
|
1708
|
+
r.setOptions(t);
|
|
1709
|
+
}, [r, t]);
|
|
1708
1710
|
const n = h.useSyncExternalStore(
|
|
1709
1711
|
h.useCallback(
|
|
1710
1712
|
(o) => r.subscribe(R.batchCalls(o)),
|
|
@@ -1722,87 +1724,87 @@ function Sr(e, t) {
|
|
|
1722
1724
|
throw n.error;
|
|
1723
1725
|
return { ...n, mutate: l, mutateAsync: n.mutate };
|
|
1724
1726
|
}
|
|
1725
|
-
function xs(
|
|
1726
|
-
var
|
|
1727
|
-
if (typeof
|
|
1728
|
-
r +=
|
|
1729
|
-
else if (typeof
|
|
1730
|
-
if (Array.isArray(
|
|
1731
|
-
var n =
|
|
1732
|
-
for (
|
|
1733
|
-
e
|
|
1727
|
+
function xs(t) {
|
|
1728
|
+
var e, s, r = "";
|
|
1729
|
+
if (typeof t == "string" || typeof t == "number")
|
|
1730
|
+
r += t;
|
|
1731
|
+
else if (typeof t == "object")
|
|
1732
|
+
if (Array.isArray(t)) {
|
|
1733
|
+
var n = t.length;
|
|
1734
|
+
for (e = 0; e < n; e++)
|
|
1735
|
+
t[e] && (s = xs(t[e])) && (r && (r += " "), r += s);
|
|
1734
1736
|
} else
|
|
1735
|
-
for (s in
|
|
1736
|
-
|
|
1737
|
+
for (s in t)
|
|
1738
|
+
t[s] && (r && (r += " "), r += s);
|
|
1737
1739
|
return r;
|
|
1738
1740
|
}
|
|
1739
1741
|
function N() {
|
|
1740
|
-
for (var
|
|
1741
|
-
(
|
|
1742
|
+
for (var t, e, s = 0, r = "", n = arguments.length; s < n; s++)
|
|
1743
|
+
(t = arguments[s]) && (e = xs(t)) && (r && (r += " "), r += e);
|
|
1742
1744
|
return r;
|
|
1743
1745
|
}
|
|
1744
|
-
var Er = Object.defineProperty, Pr = Object.defineProperties, Ar = Object.getOwnPropertyDescriptors,
|
|
1745
|
-
for (var s in
|
|
1746
|
-
bs.call(
|
|
1747
|
-
if (
|
|
1748
|
-
for (var s of
|
|
1749
|
-
ws.call(
|
|
1750
|
-
return
|
|
1751
|
-
}, A = (
|
|
1746
|
+
var Er = Object.defineProperty, Pr = Object.defineProperties, Ar = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, bs = Object.prototype.hasOwnProperty, ws = Object.prototype.propertyIsEnumerable, qe = (t, e, s) => e in t ? Er(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, w = (t, e) => {
|
|
1747
|
+
for (var s in e || (e = {}))
|
|
1748
|
+
bs.call(e, s) && qe(t, s, e[s]);
|
|
1749
|
+
if (ae)
|
|
1750
|
+
for (var s of ae(e))
|
|
1751
|
+
ws.call(e, s) && qe(t, s, e[s]);
|
|
1752
|
+
return t;
|
|
1753
|
+
}, A = (t, e) => Pr(t, Ar(e)), L = (t, e) => {
|
|
1752
1754
|
var s = {};
|
|
1753
|
-
for (var r in
|
|
1754
|
-
bs.call(
|
|
1755
|
-
if (
|
|
1756
|
-
for (var r of
|
|
1757
|
-
|
|
1755
|
+
for (var r in t)
|
|
1756
|
+
bs.call(t, r) && e.indexOf(r) < 0 && (s[r] = t[r]);
|
|
1757
|
+
if (t != null && ae)
|
|
1758
|
+
for (var r of ae(t))
|
|
1759
|
+
e.indexOf(r) < 0 && ws.call(t, r) && (s[r] = t[r]);
|
|
1758
1760
|
return s;
|
|
1759
1761
|
};
|
|
1760
|
-
function
|
|
1761
|
-
return
|
|
1762
|
-
for (var
|
|
1763
|
-
var s = arguments[
|
|
1762
|
+
function oe() {
|
|
1763
|
+
return oe = Object.assign ? Object.assign.bind() : function(t) {
|
|
1764
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
1765
|
+
var s = arguments[e];
|
|
1764
1766
|
for (var r in s)
|
|
1765
|
-
Object.prototype.hasOwnProperty.call(s, r) && (
|
|
1767
|
+
Object.prototype.hasOwnProperty.call(s, r) && (t[r] = s[r]);
|
|
1766
1768
|
}
|
|
1767
|
-
return
|
|
1768
|
-
},
|
|
1769
|
+
return t;
|
|
1770
|
+
}, oe.apply(this, arguments);
|
|
1769
1771
|
}
|
|
1770
|
-
function Nr(
|
|
1771
|
-
typeof
|
|
1772
|
+
function Nr(t, e) {
|
|
1773
|
+
typeof t == "function" ? t(e) : t != null && (t.current = e);
|
|
1772
1774
|
}
|
|
1773
|
-
function kr(...
|
|
1774
|
-
return (
|
|
1775
|
-
(s) => Nr(s,
|
|
1775
|
+
function kr(...t) {
|
|
1776
|
+
return (e) => t.forEach(
|
|
1777
|
+
(s) => Nr(s, e)
|
|
1776
1778
|
);
|
|
1777
1779
|
}
|
|
1778
|
-
var Or = /* @__PURE__ */ h.forwardRef((
|
|
1779
|
-
const s =
|
|
1780
|
+
var Or = /* @__PURE__ */ h.forwardRef((t, e) => {
|
|
1781
|
+
const s = t, { children: r } = s, n = L(s, ["children"]), l = h.Children.toArray(r), o = l.find(Lr);
|
|
1780
1782
|
if (o) {
|
|
1781
1783
|
const c = o.props.children, m = l.map((y) => y === o ? h.Children.count(c) > 1 ? h.Children.only(null) : /* @__PURE__ */ h.isValidElement(c) ? c.props.children : null : y);
|
|
1782
|
-
return /* @__PURE__ */ h.createElement(
|
|
1783
|
-
ref:
|
|
1784
|
+
return /* @__PURE__ */ h.createElement(Se, oe({}, n, {
|
|
1785
|
+
ref: e
|
|
1784
1786
|
}), /* @__PURE__ */ h.isValidElement(c) ? /* @__PURE__ */ h.cloneElement(c, void 0, m) : null);
|
|
1785
1787
|
}
|
|
1786
|
-
return /* @__PURE__ */ h.createElement(
|
|
1787
|
-
ref:
|
|
1788
|
+
return /* @__PURE__ */ h.createElement(Se, oe({}, n, {
|
|
1789
|
+
ref: e
|
|
1788
1790
|
}), r);
|
|
1789
1791
|
});
|
|
1790
1792
|
Or.displayName = "Slot";
|
|
1791
|
-
var
|
|
1792
|
-
const s =
|
|
1793
|
+
var Se = /* @__PURE__ */ h.forwardRef((t, e) => {
|
|
1794
|
+
const s = t, { children: r } = s, n = L(s, ["children"]);
|
|
1793
1795
|
return /* @__PURE__ */ h.isValidElement(r) ? /* @__PURE__ */ h.cloneElement(r, A(w({}, Fr(n, r.props)), {
|
|
1794
|
-
ref:
|
|
1796
|
+
ref: e ? kr(e, r.ref) : r.ref
|
|
1795
1797
|
})) : h.Children.count(r) > 1 ? h.Children.only(null) : null;
|
|
1796
1798
|
});
|
|
1797
|
-
|
|
1798
|
-
var Mr = ({ children:
|
|
1799
|
-
function Lr(
|
|
1800
|
-
return /* @__PURE__ */ h.isValidElement(
|
|
1799
|
+
Se.displayName = "SlotClone";
|
|
1800
|
+
var Mr = ({ children: t }) => /* @__PURE__ */ h.createElement(h.Fragment, null, t);
|
|
1801
|
+
function Lr(t) {
|
|
1802
|
+
return /* @__PURE__ */ h.isValidElement(t) && t.type === Mr;
|
|
1801
1803
|
}
|
|
1802
|
-
function Fr(
|
|
1803
|
-
const s = w({},
|
|
1804
|
-
for (const r in
|
|
1805
|
-
const n =
|
|
1804
|
+
function Fr(t, e) {
|
|
1805
|
+
const s = w({}, e);
|
|
1806
|
+
for (const r in e) {
|
|
1807
|
+
const n = t[r], l = e[r];
|
|
1806
1808
|
/^on[A-Z]/.test(r) ? n && l ? s[r] = (...c) => {
|
|
1807
1809
|
l(...c), n(...c);
|
|
1808
1810
|
} : n && (s[r] = n) : r === "style" ? s[r] = w(w({}, n), l) : r === "className" && (s[r] = [
|
|
@@ -1810,22 +1812,22 @@ function Fr(e, t) {
|
|
|
1810
1812
|
l
|
|
1811
1813
|
].filter(Boolean).join(" "));
|
|
1812
1814
|
}
|
|
1813
|
-
return w(w({},
|
|
1815
|
+
return w(w({}, t), s);
|
|
1814
1816
|
}
|
|
1815
|
-
var Rr = ({ firstName:
|
|
1816
|
-
const r = `${
|
|
1817
|
+
var Rr = ({ firstName: t, lastName: e, variant: s = "small" }) => {
|
|
1818
|
+
const r = `${t.charAt(0)}${e.charAt(0)}`;
|
|
1817
1819
|
return /* @__PURE__ */ i.jsx(
|
|
1818
1820
|
"span",
|
|
1819
1821
|
{
|
|
1820
1822
|
className: `avatar avatar--${s}`,
|
|
1821
|
-
"aria-label": `${
|
|
1823
|
+
"aria-label": `${t} ${e}`,
|
|
1822
1824
|
role: "img",
|
|
1823
1825
|
children: /* @__PURE__ */ i.jsx("span", { className: "avatar__initials", children: r })
|
|
1824
1826
|
}
|
|
1825
1827
|
);
|
|
1826
|
-
},
|
|
1827
|
-
(
|
|
1828
|
-
var s =
|
|
1828
|
+
}, Bt = h.forwardRef(
|
|
1829
|
+
(t, e) => {
|
|
1830
|
+
var s = t, {
|
|
1829
1831
|
iconLeft: r,
|
|
1830
1832
|
iconRight: n,
|
|
1831
1833
|
isPending: l = !1,
|
|
@@ -1846,7 +1848,7 @@ var Rr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1846
1848
|
return /* @__PURE__ */ i.jsxs(
|
|
1847
1849
|
"button",
|
|
1848
1850
|
A(w({
|
|
1849
|
-
ref:
|
|
1851
|
+
ref: e
|
|
1850
1852
|
}, d), {
|
|
1851
1853
|
className: N(
|
|
1852
1854
|
"button",
|
|
@@ -1865,17 +1867,17 @@ var Rr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1865
1867
|
);
|
|
1866
1868
|
}
|
|
1867
1869
|
);
|
|
1868
|
-
|
|
1870
|
+
Bt.displayName = "Button";
|
|
1869
1871
|
h.createContext(void 0);
|
|
1870
1872
|
var Dr = h.forwardRef(
|
|
1871
|
-
(
|
|
1872
|
-
var s =
|
|
1873
|
+
(t, e) => {
|
|
1874
|
+
var s = t, { prefix: r, suffix: n, className: l } = s, o = L(s, ["prefix", "suffix", "className"]);
|
|
1873
1875
|
return /* @__PURE__ */ i.jsxs("div", { className: "input__wrapper", children: [
|
|
1874
1876
|
r && /* @__PURE__ */ i.jsx("span", { className: "input__prefix", children: r }),
|
|
1875
1877
|
/* @__PURE__ */ i.jsx(
|
|
1876
1878
|
"input",
|
|
1877
1879
|
w({
|
|
1878
|
-
ref:
|
|
1880
|
+
ref: e,
|
|
1879
1881
|
className: N(
|
|
1880
1882
|
"input",
|
|
1881
1883
|
r && "input--with-prefix",
|
|
@@ -1890,10 +1892,10 @@ var Dr = h.forwardRef(
|
|
|
1890
1892
|
);
|
|
1891
1893
|
Dr.displayName = "TextField";
|
|
1892
1894
|
h.createContext(void 0);
|
|
1893
|
-
var Tr = ({ children:
|
|
1894
|
-
var
|
|
1895
|
+
var Tr = ({ children: t }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: t }), Ur = (t) => {
|
|
1896
|
+
var e = t, { children: s, className: r } = e, n = L(e, ["children", "className"]);
|
|
1895
1897
|
return /* @__PURE__ */ i.jsx("div", A(w({ className: N("card__body", r) }, n), { children: s }));
|
|
1896
|
-
}, Qr = (
|
|
1898
|
+
}, Qr = (t) => /* @__PURE__ */ i.jsx(
|
|
1897
1899
|
"svg",
|
|
1898
1900
|
A(w({
|
|
1899
1901
|
width: "24",
|
|
@@ -1901,7 +1903,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1901
1903
|
viewBox: "0 0 24 24",
|
|
1902
1904
|
fill: "none",
|
|
1903
1905
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1904
|
-
},
|
|
1906
|
+
}, t), {
|
|
1905
1907
|
children: /* @__PURE__ */ i.jsx(
|
|
1906
1908
|
"path",
|
|
1907
1909
|
{
|
|
@@ -1913,7 +1915,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1913
1915
|
}
|
|
1914
1916
|
)
|
|
1915
1917
|
})
|
|
1916
|
-
),
|
|
1918
|
+
), Le = Qr, Hr = (t) => /* @__PURE__ */ i.jsx(
|
|
1917
1919
|
"svg",
|
|
1918
1920
|
A(w({
|
|
1919
1921
|
width: "24",
|
|
@@ -1921,7 +1923,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1921
1923
|
viewBox: "0 0 24 24",
|
|
1922
1924
|
fill: "none",
|
|
1923
1925
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1924
|
-
},
|
|
1926
|
+
}, t), {
|
|
1925
1927
|
children: /* @__PURE__ */ i.jsx(
|
|
1926
1928
|
"path",
|
|
1927
1929
|
{
|
|
@@ -1933,7 +1935,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1933
1935
|
}
|
|
1934
1936
|
)
|
|
1935
1937
|
})
|
|
1936
|
-
), $r = Hr, Kr = (
|
|
1938
|
+
), $r = Hr, Kr = (t) => /* @__PURE__ */ i.jsx(
|
|
1937
1939
|
"svg",
|
|
1938
1940
|
A(w({
|
|
1939
1941
|
width: "24",
|
|
@@ -1941,7 +1943,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1941
1943
|
viewBox: "0 0 24 24",
|
|
1942
1944
|
fill: "none",
|
|
1943
1945
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1944
|
-
},
|
|
1946
|
+
}, t), {
|
|
1945
1947
|
children: /* @__PURE__ */ i.jsx(
|
|
1946
1948
|
"path",
|
|
1947
1949
|
{
|
|
@@ -1952,7 +1954,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1952
1954
|
}
|
|
1953
1955
|
)
|
|
1954
1956
|
})
|
|
1955
|
-
), qr = Kr, Gr = (
|
|
1957
|
+
), qr = Kr, Gr = (t) => /* @__PURE__ */ i.jsx(
|
|
1956
1958
|
"svg",
|
|
1957
1959
|
A(w({
|
|
1958
1960
|
width: "24",
|
|
@@ -1960,7 +1962,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1960
1962
|
viewBox: "0 0 24 24",
|
|
1961
1963
|
fill: "none",
|
|
1962
1964
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1963
|
-
},
|
|
1965
|
+
}, t), {
|
|
1964
1966
|
children: /* @__PURE__ */ i.jsx(
|
|
1965
1967
|
"path",
|
|
1966
1968
|
{
|
|
@@ -1971,7 +1973,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1971
1973
|
}
|
|
1972
1974
|
)
|
|
1973
1975
|
})
|
|
1974
|
-
), Vr = Gr, Wr = (
|
|
1976
|
+
), Vr = Gr, Wr = (t) => /* @__PURE__ */ i.jsx(
|
|
1975
1977
|
"svg",
|
|
1976
1978
|
A(w({
|
|
1977
1979
|
width: "24",
|
|
@@ -1979,7 +1981,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1979
1981
|
viewBox: "0 0 24 24",
|
|
1980
1982
|
fill: "none",
|
|
1981
1983
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1982
|
-
},
|
|
1984
|
+
}, t), {
|
|
1983
1985
|
children: /* @__PURE__ */ i.jsx(
|
|
1984
1986
|
"path",
|
|
1985
1987
|
{
|
|
@@ -1990,7 +1992,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1990
1992
|
}
|
|
1991
1993
|
)
|
|
1992
1994
|
})
|
|
1993
|
-
), Zr = Wr, Yr = (
|
|
1995
|
+
), Zr = Wr, Yr = (t) => /* @__PURE__ */ i.jsxs(
|
|
1994
1996
|
"svg",
|
|
1995
1997
|
A(w({
|
|
1996
1998
|
width: "24",
|
|
@@ -1998,7 +2000,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1998
2000
|
fill: "none",
|
|
1999
2001
|
viewBox: "0 0 24 24",
|
|
2000
2002
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2001
|
-
},
|
|
2003
|
+
}, t), {
|
|
2002
2004
|
children: [
|
|
2003
2005
|
/* @__PURE__ */ i.jsxs("g", { clipPath: "url(#clip0_19_444)", children: [
|
|
2004
2006
|
/* @__PURE__ */ i.jsx(
|
|
@@ -2027,7 +2029,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2027
2029
|
/* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_19_444", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
|
|
2028
2030
|
]
|
|
2029
2031
|
})
|
|
2030
|
-
), zr = Yr, Jr = (
|
|
2032
|
+
), zr = Yr, Jr = (t) => /* @__PURE__ */ i.jsxs(
|
|
2031
2033
|
"svg",
|
|
2032
2034
|
A(w({
|
|
2033
2035
|
width: "24",
|
|
@@ -2035,7 +2037,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2035
2037
|
viewBox: "0 0 24 24",
|
|
2036
2038
|
fill: "none",
|
|
2037
2039
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2038
|
-
},
|
|
2040
|
+
}, t), {
|
|
2039
2041
|
children: [
|
|
2040
2042
|
/* @__PURE__ */ i.jsx(
|
|
2041
2043
|
"path",
|
|
@@ -2059,7 +2061,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2059
2061
|
)
|
|
2060
2062
|
]
|
|
2061
2063
|
})
|
|
2062
|
-
), Xr = Jr, Ir = (
|
|
2064
|
+
), Xr = Jr, Ir = (t) => /* @__PURE__ */ i.jsxs(
|
|
2063
2065
|
"svg",
|
|
2064
2066
|
A(w({
|
|
2065
2067
|
width: "24",
|
|
@@ -2067,7 +2069,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2067
2069
|
viewBox: "0 0 24 24",
|
|
2068
2070
|
fill: "none",
|
|
2069
2071
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2070
|
-
},
|
|
2072
|
+
}, t), {
|
|
2071
2073
|
children: [
|
|
2072
2074
|
/* @__PURE__ */ i.jsx(
|
|
2073
2075
|
"path",
|
|
@@ -2111,8 +2113,8 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2111
2113
|
)
|
|
2112
2114
|
]
|
|
2113
2115
|
})
|
|
2114
|
-
), Br = Ir,
|
|
2115
|
-
var
|
|
2116
|
+
), Br = Ir, ti = (t) => {
|
|
2117
|
+
var e = t, { className: s } = e, r = L(e, ["className"]);
|
|
2116
2118
|
return /* @__PURE__ */ i.jsxs(
|
|
2117
2119
|
"svg",
|
|
2118
2120
|
A(w({
|
|
@@ -2140,7 +2142,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2140
2142
|
]
|
|
2141
2143
|
})
|
|
2142
2144
|
);
|
|
2143
|
-
},
|
|
2145
|
+
}, ei = ti, si = (t) => /* @__PURE__ */ i.jsxs(
|
|
2144
2146
|
"svg",
|
|
2145
2147
|
A(w({
|
|
2146
2148
|
width: "24",
|
|
@@ -2148,7 +2150,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2148
2150
|
fill: "none",
|
|
2149
2151
|
viewBox: "0 0 24 24",
|
|
2150
2152
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2151
|
-
},
|
|
2153
|
+
}, t), {
|
|
2152
2154
|
children: [
|
|
2153
2155
|
/* @__PURE__ */ i.jsxs("g", { clipPath: "url(#clip0_762_2934)", children: [
|
|
2154
2156
|
/* @__PURE__ */ i.jsx(
|
|
@@ -2174,8 +2176,8 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2174
2176
|
/* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_762_2934", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
|
|
2175
2177
|
]
|
|
2176
2178
|
})
|
|
2177
|
-
), ri = si, ii = (
|
|
2178
|
-
const
|
|
2179
|
+
), ri = si, ii = (t) => {
|
|
2180
|
+
const e = (s) => `${s}${t.suffix ? `_${t.suffix}` : ""}`;
|
|
2179
2181
|
return /* @__PURE__ */ i.jsxs(
|
|
2180
2182
|
"svg",
|
|
2181
2183
|
A(w({
|
|
@@ -2184,13 +2186,13 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2184
2186
|
viewBox: "0 0 24 24",
|
|
2185
2187
|
fill: "none",
|
|
2186
2188
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2187
|
-
},
|
|
2189
|
+
}, t), {
|
|
2188
2190
|
children: [
|
|
2189
2191
|
/* @__PURE__ */ i.jsx(
|
|
2190
2192
|
"path",
|
|
2191
2193
|
{
|
|
2192
2194
|
d: "M17.6214 11.1549C20.4161 8.33951 21.712 5.41047 20.6067 3.876C19.1586 1.85988 14.1278 2.98841 9.3766 6.39936C8.31103 7.15864 7.31229 8.00725 6.39122 8.93598L17.6214 11.1549Z",
|
|
2193
|
-
fill:
|
|
2195
|
+
fill: e("url(#paint0")
|
|
2194
2196
|
}
|
|
2195
2197
|
),
|
|
2196
2198
|
/* @__PURE__ */ i.jsx(
|
|
@@ -2198,14 +2200,14 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2198
2200
|
{
|
|
2199
2201
|
opacity: "0.9",
|
|
2200
2202
|
d: "M17.6214 11.1548C17.1178 9.955 16.5189 8.79735 15.8301 7.693C12.6925 2.58286 8.41126 -0.498612 6.30132 0.794902C4.66377 1.79657 4.80319 5.119 6.39145 8.93562L17.6214 11.1548Z",
|
|
2201
|
-
fill:
|
|
2203
|
+
fill: e("url(#paint1")
|
|
2202
2204
|
}
|
|
2203
2205
|
),
|
|
2204
2206
|
/* @__PURE__ */ i.jsx(
|
|
2205
2207
|
"path",
|
|
2206
2208
|
{
|
|
2207
2209
|
d: "M6.39122 8.93591C6.89474 10.1357 7.49373 11.2934 8.18245 12.3977C11.3329 17.5079 15.6006 20.5894 17.7229 19.2958C19.3616 18.2942 19.221 14.9718 17.6339 11.1549L6.39122 8.93591Z",
|
|
2208
|
-
fill:
|
|
2210
|
+
fill: e("url(#paint2")
|
|
2209
2211
|
}
|
|
2210
2212
|
),
|
|
2211
2213
|
/* @__PURE__ */ i.jsx(
|
|
@@ -2213,7 +2215,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2213
2215
|
{
|
|
2214
2216
|
opacity: "0.85",
|
|
2215
2217
|
d: "M6.39113 8.93591C3.5836 11.7637 2.28796 14.6927 3.39319 16.2272C4.8413 18.2433 9.87186 17.1147 14.6224 13.7038C15.6888 12.9404 16.6916 12.0922 17.6213 11.1677L6.39113 8.93591Z",
|
|
2216
|
-
fill:
|
|
2218
|
+
fill: e("url(#paint3")
|
|
2217
2219
|
}
|
|
2218
2220
|
),
|
|
2219
2221
|
/* @__PURE__ */ i.jsx(
|
|
@@ -2221,21 +2223,21 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2221
2223
|
{
|
|
2222
2224
|
opacity: "0.87",
|
|
2223
2225
|
d: "M6.39113 8.93591C3.5836 11.7509 2.28796 14.6801 3.39319 16.2272C4.8413 18.2433 9.87186 17.1147 14.6224 13.7038C15.6888 12.9404 16.6916 12.0922 17.6213 11.1677L6.39113 8.93591Z",
|
|
2224
|
-
fill:
|
|
2226
|
+
fill: e("url(#paint4")
|
|
2225
2227
|
}
|
|
2226
2228
|
),
|
|
2227
2229
|
/* @__PURE__ */ i.jsx(
|
|
2228
2230
|
"path",
|
|
2229
2231
|
{
|
|
2230
2232
|
d: "M12.0064 23.2897C16.2652 23.2897 19.7177 22.9093 19.7177 22.4402C19.7177 21.971 16.2652 21.5907 12.0064 21.5907C7.74761 21.5907 4.29517 21.971 4.29517 22.4402C4.29517 22.9093 7.74761 23.2897 12.0064 23.2897Z",
|
|
2231
|
-
fill:
|
|
2233
|
+
fill: e("url(#paint5")
|
|
2232
2234
|
}
|
|
2233
2235
|
),
|
|
2234
2236
|
/* @__PURE__ */ i.jsxs("defs", { children: [
|
|
2235
2237
|
/* @__PURE__ */ i.jsxs(
|
|
2236
2238
|
"linearGradient",
|
|
2237
2239
|
{
|
|
2238
|
-
id:
|
|
2240
|
+
id: e("paint0"),
|
|
2239
2241
|
x1: "10.6862",
|
|
2240
2242
|
y1: "11.0225",
|
|
2241
2243
|
x2: "14.9751",
|
|
@@ -2255,7 +2257,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2255
2257
|
/* @__PURE__ */ i.jsxs(
|
|
2256
2258
|
"linearGradient",
|
|
2257
2259
|
{
|
|
2258
|
-
id:
|
|
2260
|
+
id: e("paint1"),
|
|
2259
2261
|
x1: "11.5281",
|
|
2260
2262
|
y1: "8.85339",
|
|
2261
2263
|
x2: "12.4519",
|
|
@@ -2272,7 +2274,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2272
2274
|
/* @__PURE__ */ i.jsxs(
|
|
2273
2275
|
"linearGradient",
|
|
2274
2276
|
{
|
|
2275
|
-
id:
|
|
2277
|
+
id: e("paint2"),
|
|
2276
2278
|
x1: "15.0651",
|
|
2277
2279
|
y1: "18.7384",
|
|
2278
2280
|
x2: "12.9747",
|
|
@@ -2292,7 +2294,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2292
2294
|
/* @__PURE__ */ i.jsxs(
|
|
2293
2295
|
"linearGradient",
|
|
2294
2296
|
{
|
|
2295
|
-
id:
|
|
2297
|
+
id: e("paint3"),
|
|
2296
2298
|
x1: "13.9806",
|
|
2297
2299
|
y1: "8.29749",
|
|
2298
2300
|
x2: "10.8203",
|
|
@@ -2309,7 +2311,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2309
2311
|
/* @__PURE__ */ i.jsxs(
|
|
2310
2312
|
"linearGradient",
|
|
2311
2313
|
{
|
|
2312
|
-
id:
|
|
2314
|
+
id: e("paint4"),
|
|
2313
2315
|
x1: "13.9806",
|
|
2314
2316
|
y1: "8.2892",
|
|
2315
2317
|
x2: "10.8212",
|
|
@@ -2326,7 +2328,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2326
2328
|
/* @__PURE__ */ i.jsxs(
|
|
2327
2329
|
"radialGradient",
|
|
2328
2330
|
{
|
|
2329
|
-
id:
|
|
2331
|
+
id: e("paint5"),
|
|
2330
2332
|
cx: "0",
|
|
2331
2333
|
cy: "0",
|
|
2332
2334
|
r: "1",
|
|
@@ -2345,7 +2347,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2345
2347
|
]
|
|
2346
2348
|
})
|
|
2347
2349
|
);
|
|
2348
|
-
}, js = ii, ni = (
|
|
2350
|
+
}, js = ii, ni = (t) => /* @__PURE__ */ i.jsxs(
|
|
2349
2351
|
"svg",
|
|
2350
2352
|
A(w({
|
|
2351
2353
|
fill: "none",
|
|
@@ -2353,7 +2355,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2353
2355
|
viewBox: "0 0 24 24",
|
|
2354
2356
|
width: "24",
|
|
2355
2357
|
height: "24"
|
|
2356
|
-
},
|
|
2358
|
+
}, t), {
|
|
2357
2359
|
children: [
|
|
2358
2360
|
/* @__PURE__ */ i.jsx(
|
|
2359
2361
|
"path",
|
|
@@ -2407,7 +2409,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2407
2409
|
)
|
|
2408
2410
|
]
|
|
2409
2411
|
})
|
|
2410
|
-
), ai = ni, oi = (
|
|
2412
|
+
), ai = ni, oi = (t) => /* @__PURE__ */ i.jsx(
|
|
2411
2413
|
"svg",
|
|
2412
2414
|
A(w({
|
|
2413
2415
|
fill: "none",
|
|
@@ -2415,7 +2417,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2415
2417
|
viewBox: "0 0 21 16",
|
|
2416
2418
|
width: "21",
|
|
2417
2419
|
height: "16"
|
|
2418
|
-
},
|
|
2420
|
+
}, t), {
|
|
2419
2421
|
children: /* @__PURE__ */ i.jsx(
|
|
2420
2422
|
"path",
|
|
2421
2423
|
{
|
|
@@ -2427,7 +2429,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2427
2429
|
}
|
|
2428
2430
|
)
|
|
2429
2431
|
})
|
|
2430
|
-
), li = oi, ci = (
|
|
2432
|
+
), li = oi, ci = (t) => /* @__PURE__ */ i.jsxs(
|
|
2431
2433
|
"svg",
|
|
2432
2434
|
A(w({
|
|
2433
2435
|
width: "24",
|
|
@@ -2435,7 +2437,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2435
2437
|
fill: "none",
|
|
2436
2438
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2437
2439
|
viewBox: "0 0 24 24"
|
|
2438
|
-
},
|
|
2440
|
+
}, t), {
|
|
2439
2441
|
children: [
|
|
2440
2442
|
/* @__PURE__ */ i.jsx(
|
|
2441
2443
|
"path",
|
|
@@ -2454,15 +2456,15 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2454
2456
|
/* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
|
|
2455
2457
|
]
|
|
2456
2458
|
})
|
|
2457
|
-
), ui = ci, hi = (
|
|
2458
|
-
var
|
|
2459
|
+
), ui = ci, hi = (t) => {
|
|
2460
|
+
var e = t, {
|
|
2459
2461
|
variant: s,
|
|
2460
2462
|
icon: r,
|
|
2461
2463
|
isStandalone: n,
|
|
2462
2464
|
title: l,
|
|
2463
2465
|
description: o,
|
|
2464
2466
|
className: c
|
|
2465
|
-
} =
|
|
2467
|
+
} = e, m = L(e, [
|
|
2466
2468
|
"variant",
|
|
2467
2469
|
"icon",
|
|
2468
2470
|
"isStandalone",
|
|
@@ -2488,13 +2490,13 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2488
2490
|
] })
|
|
2489
2491
|
})
|
|
2490
2492
|
);
|
|
2491
|
-
}, di = ({ children:
|
|
2492
|
-
var
|
|
2493
|
+
}, di = ({ children: t }) => /* @__PURE__ */ i.jsx("div", { className: "card__footer", children: t }), fi = (t) => {
|
|
2494
|
+
var e = t, {
|
|
2493
2495
|
variant: s = "default",
|
|
2494
2496
|
sticky: r,
|
|
2495
2497
|
className: n,
|
|
2496
2498
|
children: l
|
|
2497
|
-
} =
|
|
2499
|
+
} = e, o = L(e, [
|
|
2498
2500
|
"variant",
|
|
2499
2501
|
"sticky",
|
|
2500
2502
|
"className",
|
|
@@ -2512,12 +2514,12 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2512
2514
|
children: l
|
|
2513
2515
|
})
|
|
2514
2516
|
);
|
|
2515
|
-
}, pi = ({ children:
|
|
2516
|
-
|
|
2517
|
-
|
|
2517
|
+
}, pi = ({ children: t }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: t }), mi = ({ children: t, className: e }) => /* @__PURE__ */ i.jsx("div", { className: N("card__body__item", e), children: t }), vi = ({ children: t }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: t }), gi = ({ icon: t, children: e }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
|
|
2518
|
+
t && /* @__PURE__ */ i.jsx("span", { className: "card__header__title__icon", children: t }),
|
|
2519
|
+
e
|
|
2518
2520
|
] }), _s = h.forwardRef(
|
|
2519
|
-
(
|
|
2520
|
-
var s =
|
|
2521
|
+
(t, e) => {
|
|
2522
|
+
var s = t, { type: r, children: n, className: l, variant: o = "default", disabled: c = !1 } = s, m = L(s, ["type", "children", "className", "variant", "disabled"]);
|
|
2521
2523
|
return h.createElement(
|
|
2522
2524
|
r,
|
|
2523
2525
|
w({
|
|
@@ -2527,7 +2529,7 @@ var Tr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2527
2529
|
o && `card--${o}`,
|
|
2528
2530
|
l
|
|
2529
2531
|
),
|
|
2530
|
-
ref:
|
|
2532
|
+
ref: e
|
|
2531
2533
|
}, m),
|
|
2532
2534
|
n
|
|
2533
2535
|
);
|
|
@@ -2545,23 +2547,23 @@ Object.assign(_s, {
|
|
|
2545
2547
|
Footer: di,
|
|
2546
2548
|
EmptyState: hi
|
|
2547
2549
|
});
|
|
2548
|
-
var yi = (
|
|
2549
|
-
var
|
|
2550
|
+
var yi = (t) => {
|
|
2551
|
+
var e = t, { className: s, children: r } = e, n = L(e, ["className", "children"]);
|
|
2550
2552
|
return /* @__PURE__ */ i.jsx("div", A(w({ className: N("checkbox__content", s) }, n), { children: r }));
|
|
2551
|
-
}, Ci = (
|
|
2552
|
-
var
|
|
2553
|
+
}, Ci = (t) => {
|
|
2554
|
+
var e = t, { className: s, children: r } = e, n = L(e, ["className", "children"]);
|
|
2553
2555
|
return /* @__PURE__ */ i.jsx("span", A(w({ className: N("checkbox__hint", s) }, n), { children: r }));
|
|
2554
|
-
}, Ss = h.createContext(void 0), xi = ({ id:
|
|
2555
|
-
const
|
|
2556
|
-
if (!
|
|
2556
|
+
}, Ss = h.createContext(void 0), xi = ({ id: t, name: e, children: s }) => /* @__PURE__ */ i.jsx(Ss.Provider, { value: { id: t, name: e }, children: s }), bi = () => {
|
|
2557
|
+
const t = h.useContext(Ss);
|
|
2558
|
+
if (!t)
|
|
2557
2559
|
throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
|
|
2558
|
-
return
|
|
2559
|
-
}, wi = (
|
|
2560
|
-
var
|
|
2560
|
+
return t;
|
|
2561
|
+
}, wi = (t) => {
|
|
2562
|
+
var e = t, { className: s, children: r } = e, n = L(e, ["className", "children"]);
|
|
2561
2563
|
const { id: l } = bi();
|
|
2562
2564
|
return /* @__PURE__ */ i.jsx("label", A(w({ htmlFor: l, className: N("checkbox__label", s) }, n), { children: r }));
|
|
2563
|
-
},
|
|
2564
|
-
var
|
|
2565
|
+
}, xt = (t) => {
|
|
2566
|
+
var e = t, {
|
|
2565
2567
|
id: s,
|
|
2566
2568
|
name: r,
|
|
2567
2569
|
isPending: n = !1,
|
|
@@ -2570,7 +2572,7 @@ var yi = (e) => {
|
|
|
2570
2572
|
single: c,
|
|
2571
2573
|
className: m,
|
|
2572
2574
|
children: y
|
|
2573
|
-
} =
|
|
2575
|
+
} = e, d = L(e, [
|
|
2574
2576
|
"id",
|
|
2575
2577
|
"name",
|
|
2576
2578
|
"isPending",
|
|
@@ -2599,22 +2601,22 @@ var yi = (e) => {
|
|
|
2599
2601
|
value: c ? "true" : ""
|
|
2600
2602
|
}, d)
|
|
2601
2603
|
),
|
|
2602
|
-
n ? /* @__PURE__ */ i.jsx(
|
|
2604
|
+
n ? /* @__PURE__ */ i.jsx(ei, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx($r, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
|
|
2603
2605
|
/* @__PURE__ */ i.jsx(xi, { id: s, name: r, children: y })
|
|
2604
2606
|
]
|
|
2605
2607
|
}
|
|
2606
2608
|
);
|
|
2607
2609
|
};
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
var ji = (
|
|
2613
|
-
var
|
|
2610
|
+
xt.Content = yi;
|
|
2611
|
+
xt.Label = wi;
|
|
2612
|
+
xt.Hint = Ci;
|
|
2613
|
+
xt.Error = Error;
|
|
2614
|
+
var ji = (t) => {
|
|
2615
|
+
var e = t, { type: s = "div", className: r, children: n } = e, l = L(e, ["type", "className", "children"]);
|
|
2614
2616
|
return h.createElement(s, w({ className: N("dialog__body", r) }, l), n);
|
|
2615
|
-
},
|
|
2616
|
-
var
|
|
2617
|
-
const { ref: o, defaultOpen: c, isModal: m, onClose: y } =
|
|
2617
|
+
}, Ee = () => document.body.style.removeProperty("overflow"), Ge = (t) => t.preventDefault(), _i = 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])', Si = (t) => {
|
|
2618
|
+
var e = t, { className: s, children: r, shouldAnimate: n = !0 } = e, l = L(e, ["className", "children", "shouldAnimate"]);
|
|
2619
|
+
const { ref: o, defaultOpen: c, isModal: m, onClose: y } = te();
|
|
2618
2620
|
return h.useEffect(() => {
|
|
2619
2621
|
const d = o == null ? void 0 : o.current;
|
|
2620
2622
|
if (d != null && d.open) {
|
|
@@ -2623,8 +2625,8 @@ var ji = (e) => {
|
|
|
2623
2625
|
return;
|
|
2624
2626
|
S.shiftKey ? document.activeElement === u && (p.focus(), S.preventDefault()) : document.activeElement === p && (u.focus(), S.preventDefault());
|
|
2625
2627
|
};
|
|
2626
|
-
return document.body.style.overflow = "hidden", d.addEventListener("keydown", E), window.addEventListener("popstate", () =>
|
|
2627
|
-
d.removeEventListener("keydown", E), window.removeEventListener("popstate", () =>
|
|
2628
|
+
return document.body.style.overflow = "hidden", d.addEventListener("keydown", E), window.addEventListener("popstate", () => Ee()), () => {
|
|
2629
|
+
d.removeEventListener("keydown", E), window.removeEventListener("popstate", () => Ee());
|
|
2628
2630
|
};
|
|
2629
2631
|
}
|
|
2630
2632
|
}, [o]), h.useEffect(() => {
|
|
@@ -2632,7 +2634,7 @@ var ji = (e) => {
|
|
|
2632
2634
|
if (!d)
|
|
2633
2635
|
return;
|
|
2634
2636
|
if (c && (d.removeAttribute("open"), d.showModal(), d.focus()), m)
|
|
2635
|
-
return d.addEventListener("cancel",
|
|
2637
|
+
return d.addEventListener("cancel", Ge), () => d.removeEventListener("cancel", Ge);
|
|
2636
2638
|
const v = ({ clientX: u, clientY: p }) => {
|
|
2637
2639
|
const { top: E, right: S, bottom: j, left: x } = d.getBoundingClientRect(), C = 0 < p && 0 < u, _ = E < p && p < j, O = x < u && u < S;
|
|
2638
2640
|
C && !(_ && O) && y();
|
|
@@ -2652,29 +2654,29 @@ var ji = (e) => {
|
|
|
2652
2654
|
children: r
|
|
2653
2655
|
})
|
|
2654
2656
|
);
|
|
2655
|
-
}, Es = h.createContext(void 0), Ei = ({ defaultOpen:
|
|
2656
|
-
const n = h.useRef(null), l = h.useRef(
|
|
2657
|
+
}, Es = h.createContext(void 0), Ei = ({ defaultOpen: t, onClose: e, isModal: s, children: r }) => {
|
|
2658
|
+
const n = h.useRef(null), l = h.useRef(e), o = h.useCallback(() => {
|
|
2657
2659
|
var c;
|
|
2658
|
-
|
|
2660
|
+
Ee(), (c = n.current) == null || c.close(), l.current && (l == null || l.current());
|
|
2659
2661
|
}, [n]);
|
|
2660
|
-
return /* @__PURE__ */ i.jsx(Es.Provider, { value: { ref: n, defaultOpen:
|
|
2661
|
-
},
|
|
2662
|
-
const
|
|
2663
|
-
if (!
|
|
2662
|
+
return /* @__PURE__ */ i.jsx(Es.Provider, { value: { ref: n, defaultOpen: t, isModal: s, onClose: o }, children: r });
|
|
2663
|
+
}, te = () => {
|
|
2664
|
+
const t = h.useContext(Es);
|
|
2665
|
+
if (!t)
|
|
2664
2666
|
throw new Error("Dialog compound components can not be rendered outside of Dialog");
|
|
2665
|
-
return
|
|
2666
|
-
}, Pi = (
|
|
2667
|
-
var
|
|
2668
|
-
const { onClose: n } =
|
|
2669
|
-
return /* @__PURE__ */ i.jsx(
|
|
2670
|
-
}, Ps = h.forwardRef((
|
|
2671
|
-
var s =
|
|
2672
|
-
const { onClose: l } =
|
|
2667
|
+
return t;
|
|
2668
|
+
}, Pi = (t) => {
|
|
2669
|
+
var e = t, { children: s } = e, r = L(e, ["children"]);
|
|
2670
|
+
const { onClose: n } = te();
|
|
2671
|
+
return /* @__PURE__ */ i.jsx(Bt, A(w({ onClick: n }, r), { children: s }));
|
|
2672
|
+
}, Ps = h.forwardRef((t, e) => {
|
|
2673
|
+
var s = t, { className: r } = s, n = L(s, ["className"]);
|
|
2674
|
+
const { onClose: l } = te();
|
|
2673
2675
|
return /* @__PURE__ */ i.jsx(
|
|
2674
|
-
|
|
2676
|
+
Bt,
|
|
2675
2677
|
w({
|
|
2676
2678
|
type: "submit",
|
|
2677
|
-
ref:
|
|
2679
|
+
ref: e,
|
|
2678
2680
|
formMethod: "dialog",
|
|
2679
2681
|
onClick: l,
|
|
2680
2682
|
iconLeft: /* @__PURE__ */ i.jsx(qr, {}),
|
|
@@ -2684,12 +2686,12 @@ var ji = (e) => {
|
|
|
2684
2686
|
);
|
|
2685
2687
|
});
|
|
2686
2688
|
Ps.displayName = "Close";
|
|
2687
|
-
var Ai = (
|
|
2688
|
-
var
|
|
2689
|
+
var Ai = (t) => {
|
|
2690
|
+
var e = t, { className: s, children: r } = e, n = L(e, ["className", "children"]);
|
|
2689
2691
|
return /* @__PURE__ */ i.jsx("div", A(w({ className: N("dialog__footer", s) }, n), { children: r }));
|
|
2690
|
-
}, Ni = ({ children:
|
|
2691
|
-
var
|
|
2692
|
-
const { ref: o } =
|
|
2692
|
+
}, Ni = ({ children: t }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: t }), ki = (t) => {
|
|
2693
|
+
var e = t, { icon: s, children: r, className: n } = e, l = L(e, ["icon", "children", "className"]);
|
|
2694
|
+
const { ref: o } = te(), c = h.useRef(null);
|
|
2693
2695
|
return h.useEffect(() => {
|
|
2694
2696
|
o != null && o.current && o.current.focus();
|
|
2695
2697
|
}, [o]), /* @__PURE__ */ i.jsxs(
|
|
@@ -2706,14 +2708,14 @@ var Ai = (e) => {
|
|
|
2706
2708
|
]
|
|
2707
2709
|
})
|
|
2708
2710
|
);
|
|
2709
|
-
}, Oi = (
|
|
2710
|
-
var
|
|
2711
|
-
const { ref: n } =
|
|
2712
|
-
return /* @__PURE__ */ i.jsx(
|
|
2711
|
+
}, Oi = (t) => {
|
|
2712
|
+
var e = t, { children: s } = e, r = L(e, ["children"]);
|
|
2713
|
+
const { ref: n } = te();
|
|
2714
|
+
return /* @__PURE__ */ i.jsx(Bt, A(w({ onClick: () => {
|
|
2713
2715
|
var l;
|
|
2714
2716
|
return (l = n == null ? void 0 : n.current) == null ? void 0 : l.showModal();
|
|
2715
2717
|
} }, r), { children: s }));
|
|
2716
|
-
}, $ = ({ defaultOpen:
|
|
2718
|
+
}, $ = ({ defaultOpen: t, isModal: e, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(Ei, { defaultOpen: !!t, isModal: e, onClose: r, children: s });
|
|
2717
2719
|
$.Trigger = Oi;
|
|
2718
2720
|
$.Root = Si;
|
|
2719
2721
|
$.Title = ki;
|
|
@@ -2723,8 +2725,8 @@ $.Footer = Ai;
|
|
|
2723
2725
|
$.Button = Pi;
|
|
2724
2726
|
$.Close = Ps;
|
|
2725
2727
|
var As = h.createContext(void 0), Mi = ({
|
|
2726
|
-
id:
|
|
2727
|
-
position:
|
|
2728
|
+
id: t,
|
|
2729
|
+
position: e,
|
|
2728
2730
|
isOpen: s,
|
|
2729
2731
|
setIsOpen: r,
|
|
2730
2732
|
activeItemIndex: n,
|
|
@@ -2737,8 +2739,8 @@ var As = h.createContext(void 0), Mi = ({
|
|
|
2737
2739
|
As.Provider,
|
|
2738
2740
|
{
|
|
2739
2741
|
value: {
|
|
2740
|
-
id:
|
|
2741
|
-
position:
|
|
2742
|
+
id: t,
|
|
2743
|
+
position: e,
|
|
2742
2744
|
isOpen: s,
|
|
2743
2745
|
setIsOpen: r,
|
|
2744
2746
|
activeItemIndex: n,
|
|
@@ -2750,11 +2752,11 @@ var As = h.createContext(void 0), Mi = ({
|
|
|
2750
2752
|
children: y
|
|
2751
2753
|
}
|
|
2752
2754
|
), Ns = () => {
|
|
2753
|
-
const
|
|
2754
|
-
if (
|
|
2755
|
+
const t = h.useContext(As);
|
|
2756
|
+
if (t === void 0)
|
|
2755
2757
|
throw new Error("useMenu must be used within a MenuProvider");
|
|
2756
|
-
return
|
|
2757
|
-
}, Li = ({ as:
|
|
2758
|
+
return t;
|
|
2759
|
+
}, Li = ({ as: t, children: e }) => {
|
|
2758
2760
|
const {
|
|
2759
2761
|
id: s,
|
|
2760
2762
|
position: r,
|
|
@@ -2798,15 +2800,15 @@ var As = h.createContext(void 0), Mi = ({
|
|
|
2798
2800
|
return u.preventDefault(), c(S);
|
|
2799
2801
|
}
|
|
2800
2802
|
};
|
|
2801
|
-
return
|
|
2802
|
-
|
|
2803
|
+
return t ? h.createElement(
|
|
2804
|
+
t,
|
|
2803
2805
|
{
|
|
2804
2806
|
id: `${s}-content`,
|
|
2805
2807
|
ref: d,
|
|
2806
2808
|
className: N("menu__list", `menu__list--${r}`, n && "menu__list--active"),
|
|
2807
2809
|
onKeyDown: v
|
|
2808
2810
|
},
|
|
2809
|
-
|
|
2811
|
+
e
|
|
2810
2812
|
) : (
|
|
2811
2813
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
2812
2814
|
/* @__PURE__ */ i.jsx(
|
|
@@ -2816,14 +2818,14 @@ var As = h.createContext(void 0), Mi = ({
|
|
|
2816
2818
|
ref: d,
|
|
2817
2819
|
className: N("menu__list", `menu__list--${r}`, n && "menu__list--active"),
|
|
2818
2820
|
onKeyDown: v,
|
|
2819
|
-
children:
|
|
2821
|
+
children: e
|
|
2820
2822
|
}
|
|
2821
2823
|
)
|
|
2822
2824
|
);
|
|
2823
|
-
}, Fi = (
|
|
2824
|
-
var
|
|
2825
|
+
}, Fi = (t) => {
|
|
2826
|
+
var e = t, { children: s, className: r } = e, n = L(e, ["children", "className"]);
|
|
2825
2827
|
return /* @__PURE__ */ i.jsx("li", A(w({}, n), { className: N("menu__list-item", r), children: s }));
|
|
2826
|
-
}, ks = ({ children:
|
|
2828
|
+
}, ks = ({ children: t, className: e }) => {
|
|
2827
2829
|
const { id: s, isOpen: r, setIsOpen: n, clearActiveItemIndex: l, setActiveItemIndex: o, triggerRef: c } = Ns(), m = () => {
|
|
2828
2830
|
l(), n((d) => !d), r || o(0);
|
|
2829
2831
|
}, y = (d) => {
|
|
@@ -2833,10 +2835,10 @@ var As = h.createContext(void 0), Mi = ({
|
|
|
2833
2835
|
d.key === "ArrowDown" && (d.preventDefault(), o(0));
|
|
2834
2836
|
}
|
|
2835
2837
|
};
|
|
2836
|
-
return h.cloneElement(
|
|
2838
|
+
return h.cloneElement(t, {
|
|
2837
2839
|
id: `${s}-trigger`,
|
|
2838
2840
|
ref: c,
|
|
2839
|
-
className: N("menu__trigger",
|
|
2841
|
+
className: N("menu__trigger", e),
|
|
2840
2842
|
onClick: m,
|
|
2841
2843
|
onKeyDown: y,
|
|
2842
2844
|
"aria-expanded": r,
|
|
@@ -2844,8 +2846,8 @@ var As = h.createContext(void 0), Mi = ({
|
|
|
2844
2846
|
});
|
|
2845
2847
|
};
|
|
2846
2848
|
ks.displayName = "Trigger";
|
|
2847
|
-
var Os = (
|
|
2848
|
-
var
|
|
2849
|
+
var Os = (t) => t ? t.tagName === "UL" ? t.children : Array.from(t.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], q = (t) => {
|
|
2850
|
+
var e = t, { type: s, id: r, position: n = "bottom-end", children: l, className: o } = e, c = L(e, ["type", "id", "position", "children", "className"]);
|
|
2849
2851
|
const m = h.useRef(null), y = h.useRef(null), d = h.useRef(null), [v, u] = h.useState(!1), [p, E] = h.useState(), [S, j] = h.useState(p);
|
|
2850
2852
|
p !== S && p !== void 0 && d.current && (Os(d.current)[p].firstChild.focus(), j(p));
|
|
2851
2853
|
const x = () => {
|
|
@@ -2884,118 +2886,118 @@ q.Content = Li;
|
|
|
2884
2886
|
q.Item = Fi;
|
|
2885
2887
|
h.createContext(void 0);
|
|
2886
2888
|
var Ri = (/* @__PURE__ */ new Map()).set("BE", "32").set("FR", "33").set("NL", "31").set("LU", "352").set("DE", "49").set("CA", "1").set("PR", "1").set("TC", "1").set("US", "1").set("BS", "1242").set("BB", "1246").set("AI", "1264").set("AG", "1268").set("KY", "1345").set("BM", "1441").set("GD", "1473").set("MS", "1664").set("GU", "1671").set("LC", "1758").set("DM", "1767").set("VC", "1784").set("DO", "1809").set("TT", "1868").set("KN", "1869").set("JM", "1876").set("EG", "20").set("SS", "211").set("MA", "212").set("DZ", "213").set("TN", "216").set("LY", "218").set("GM", "220").set("SN", "221").set("MR", "222").set("ML", "223").set("GN", "224").set("CI", "225").set("BF", "226").set("NE", "227").set("TG", "228").set("BJ", "229").set("MU", "230").set("LR", "231").set("SL", "232").set("GH", "233").set("NG", "234").set("TD", "235").set("CF", "236").set("CM", "237").set("CV", "238").set("ST", "239").set("GQ", "240").set("GA", "241").set("CG", "242").set("CD", "243").set("AO", "244").set("GW", "245").set("SC", "248").set("SD", "249").set("RW", "250").set("ET", "251").set("SO", "252").set("DJ", "253").set("KE", "254").set("TZ", "255").set("UG", "256").set("BI", "257").set("MZ", "258").set("ZM", "260").set("MG", "261").set("RE", "262").set("ZW", "263").set("NA", "264").set("MW", "265").set("LS", "266").set("BW", "267").set("SZ", "268").set("KM", "269").set("ZA", "27").set("VG", "284").set("ER", "291").set("AW", "297").set("FO", "298").set("GL", "299").set("GR", "30").set("ES", "34").set("GI", "350").set("PT", "351").set("IE", "353").set("IS", "354").set("AL", "355").set("MT", "356").set("CY", "357").set("FI", "358").set("BG", "359").set("HU", "36").set("LT", "370").set("LV", "371").set("EE", "372").set("MD", "373").set("AM", "374").set("BY", "375").set("AD", "376").set("MC", "377").set("SM", "378").set("UA", "380").set("RS", "381").set("ME", "382").set("HR", "385").set("SI", "386").set("BA", "387").set("MK", "389").set("IT", "39").set("RO", "40").set("CH", "41").set("CZ", "420").set("SK", "421").set("LI", "423").set("AT", "43").set("GB", "44").set("DK", "45").set("SE", "46").set("NO", "47").set("PL", "48").set("FK", "500").set("BZ", "501").set("GT", "502").set("SV", "503").set("HN", "504").set("NI", "505").set("CR", "506").set("PA", "507").set("PM", "508").set("HT", "509").set("PE", "51").set("MX", "52").set("CU", "53").set("AR", "54").set("BR", "55").set("CL", "56").set("CO", "57").set("VE", "58").set("GP", "590").set("BO", "591").set("GY", "592").set("EC", "593").set("FG", "594").set("PY", "595").set("MQ", "596").set("SR", "597").set("UY", "598").set("CW", "599").set("AN", "599").set("MY", "60").set("AU", "61").set("ID", "62").set("PH", "63").set("NZ", "64").set("SG", "65").set("TH", "66").set("TP", "670").set("BN", "673").set("PG", "675").set("TO", "676").set("SB", "677").set("VU", "678").set("FJ", "679").set("PW", "680").set("CK", "682").set("NU", "683").set("AS", "684").set("WS", "685").set("KI", "686").set("NC", "687").set("TV", "688").set("PF", "689").set("FM", "691").set("KZ", "7").set("RU", "7").set("JP", "81").set("KR", "82").set("VN", "84").set("KP", "850").set("HK", "852").set("MO", "853").set("KH", "855").set("LA", "856").set("CN", "86").set("BD", "880").set("TW", "886").set("TR", "90").set("IN", "91").set("PK", "92").set("AF", "93").set("LK", "94").set("MM", "95").set("MV", "960").set("LB", "961").set("JO", "962").set("SY", "963").set("IQ", "964").set("KW", "965").set("SA", "966").set("YE", "967").set("OM", "968").set("PS", "970").set("AE", "971").set("IL", "972").set("BH", "973").set("QA", "974").set("BT", "975").set("MN", "976").set("NP", "977").set("IR", "98").set("TK", "992").set("TM", "993").set("AZ", "994").set("GE", "995").set("KG", "996").set("UZ", "998");
|
|
2887
|
-
[...new Set(Ri.values())].map((
|
|
2888
|
-
label: `+${
|
|
2889
|
-
value:
|
|
2889
|
+
[...new Set(Ri.values())].map((t) => ({
|
|
2890
|
+
label: `+${t}`,
|
|
2891
|
+
value: t
|
|
2890
2892
|
}));
|
|
2891
2893
|
h.createContext(void 0);
|
|
2892
2894
|
h.createContext(void 0);
|
|
2893
|
-
var
|
|
2895
|
+
var le = /* @__PURE__ */ ((t) => (t[t.categoriesVegetables = 0] = "categoriesVegetables", t[t.categoriesMeat = 1] = "categoriesMeat", t[t.categoriesFish = 2] = "categoriesFish", t[t.categoriesDairy = 3] = "categoriesDairy", t[t.categoriesBreakfast = 4] = "categoriesBreakfast", t[t.categoriesSnacks = 5] = "categoriesSnacks", t[t.categoriesCandy = 6] = "categoriesCandy", t[t.categoriesNonFood = 7] = "categoriesNonFood", t[t.categoriesDryFood = 8] = "categoriesDryFood", t[t.categoriesTins = 9] = "categoriesTins", t[t.categoriesGrid = 10] = "categoriesGrid", t[t.categoriesSoda = 11] = "categoriesSoda", t[t.categoriesBakery = 12] = "categoriesBakery", t[t.categoriesWine = 13] = "categoriesWine", t[t.categoriesBaby = 14] = "categoriesBaby", t[t.categoriesDiet = 15] = "categoriesDiet", t[t.categoriesHygiene = 16] = "categoriesHygiene", t[t.categoriesCleaning = 17] = "categoriesCleaning", t[t.categoriesPets = 18] = "categoriesPets", t[t.categoriesFreezer = 19] = "categoriesFreezer", t[t.categoriesBbq = 20] = "categoriesBbq", t[t.categoriesMealbox = 21] = "categoriesMealbox", t[t.categoriesBrik = 22] = "categoriesBrik", t[t.categoriesGranen = 23] = "categoriesGranen", t[t.categoriesConserve = 24] = "categoriesConserve", t[t.categoriesHome = 25] = "categoriesHome", t[t.categoriesEaster = 26] = "categoriesEaster", t[t.categoriesOnlinePromo = 27] = "categoriesOnlinePromo", t[t.categoriesSportFood = 28] = "categoriesSportFood", t[t.categoriesClothing = 29] = "categoriesClothing", t[t.categoriesEnergy = 30] = "categoriesEnergy", t[t.categoriesDeskAndTravel = 31] = "categoriesDeskAndTravel", t[t.categoriesCigarette = 32] = "categoriesCigarette", t[t.categoriesFood = 33] = "categoriesFood", t[t.categoriesChild = 34] = "categoriesChild", t[t.categoriesPuzzle = 35] = "categoriesPuzzle", t[t.categoriesToys = 36] = "categoriesToys", t[t.categoriesCar = 37] = "categoriesCar", t[t.categoriesPlaceholder = 38] = "categoriesPlaceholder", t[t.categoriesFuel = 39] = "categoriesFuel", t[t.categoriesCarAndBike = 40] = "categoriesCarAndBike", t[t.categoriesToyAndHobby = 41] = "categoriesToyAndHobby", t[t.categoriesMultimedia = 42] = "categoriesMultimedia", t[t.categoriesParty = 43] = "categoriesParty", t[t.toolsPay = 44] = "toolsPay", t[t.toolsReceipt = 45] = "toolsReceipt", t[t.toolsFuel = 46] = "toolsFuel", t[t.toolsStoreLocator = 47] = "toolsStoreLocator", t[t.toolsStats = 48] = "toolsStats", t[t.toolsShowXtraOld = 49] = "toolsShowXtraOld", t[t.toolsShowXtraNew = 50] = "toolsShowXtraNew", t[t.toolsScan2 = 51] = "toolsScan2", t[t.toolsRecipes2 = 52] = "toolsRecipes2", t[t.toolsWarranty = 53] = "toolsWarranty", t[t.toolsCoupons = 54] = "toolsCoupons", t[t.toolsFavoriteInactive = 55] = "toolsFavoriteInactive", t[t.toolsFavoriteActive = 56] = "toolsFavoriteActive", t[t.toolsAssortment = 57] = "toolsAssortment", t[t.toolsPromo = 58] = "toolsPromo", t[t.fuelCng = 59] = "fuelCng", t[t.fuelE5 = 60] = "fuelE5", t[t.fuelAdblue = 61] = "fuelAdblue", t[t.fuelB7 = 62] = "fuelB7", t[t.fuelH2 = 63] = "fuelH2", t[t.fuelE10 = 64] = "fuelE10", t[t.fuelFreeTireInflation = 65] = "fuelFreeTireInflation", t[t.functionalClose = 66] = "functionalClose", t[t.functionalBack = 67] = "functionalBack", t[t.functionalSearch = 68] = "functionalSearch", t[t.functionalEdit = 69] = "functionalEdit", t[t.functionalShare = 70] = "functionalShare", t[t.functionalLocation = 71] = "functionalLocation", t[t.functionalTrash = 72] = "functionalTrash", t[t.functionalCamera = 73] = "functionalCamera", t[t.functionalPhone = 74] = "functionalPhone", t[t.functionalPushNotifications = 75] = "functionalPushNotifications", t[t.functionalMail = 76] = "functionalMail", t[t.functionalGift = 77] = "functionalGift", t[t.functionalPresent = 78] = "functionalPresent", t[t.functionalLoading = 79] = "functionalLoading", t[t.functionalChevronRight = 80] = "functionalChevronRight", t[t.functionalCheck = 81] = "functionalCheck", t[t.functionalChevronDown = 82] = "functionalChevronDown", t[t.functionalChevronUp = 83] = "functionalChevronUp", t[t.functionalPlus = 84] = "functionalPlus", t[t.functionalReset = 85] = "functionalReset", t[t.functionalDownload = 86] = "functionalDownload", t[t.functionalExport = 87] = "functionalExport", t[t.functionalCustomerService = 88] = "functionalCustomerService", t[t.functionalTruck = 89] = "functionalTruck", t[t.functionalBox = 90] = "functionalBox", t[t.functionalEllipsis = 91] = "functionalEllipsis", t[t.functionalLocationHome = 92] = "functionalLocationHome", t[t.functionalLocationPickup = 93] = "functionalLocationPickup", t[t.functionalAccount = 94] = "functionalAccount", t[t.functionalPrivacy = 95] = "functionalPrivacy", t[t.functionalSettings = 96] = "functionalSettings", t[t.functionalUserInfo = 97] = "functionalUserInfo", t[t.functionalPinOutlines = 98] = "functionalPinOutlines", t[t.functionalCalendar = 99] = "functionalCalendar", t[t.functionalMinus = 100] = "functionalMinus", t[t.functionalLifestyle = 101] = "functionalLifestyle", t[t.functionalSms = 102] = "functionalSms", t[t.functionalSwitch = 103] = "functionalSwitch", t[t.functionalSorting = 104] = "functionalSorting", t[t.functionalWarningCircle = 105] = "functionalWarningCircle", t[t.functionalQuestionCircle = 106] = "functionalQuestionCircle", t[t.functionalErrorCircle = 107] = "functionalErrorCircle", t[t.functionalSuccessCircle = 108] = "functionalSuccessCircle", t[t.functionalMessage = 109] = "functionalMessage", t[t.functionalExternalLink = 110] = "functionalExternalLink", t[t.functionalAddToList = 111] = "functionalAddToList", t[t.functionalShoppingcart = 112] = "functionalShoppingcart", t[t.functionalFilter = 113] = "functionalFilter", t[t.functionalLocate = 114] = "functionalLocate", t[t.functionalBarcode = 115] = "functionalBarcode", t[t.functionalClock = 116] = "functionalClock", t[t.functionalHistory = 117] = "functionalHistory", t[t.functionalShops = 118] = "functionalShops", t[t.functionalAddUser = 119] = "functionalAddUser", t[t.functionalOther = 120] = "functionalOther", t[t.functionalInAppNotifications = 121] = "functionalInAppNotifications", t[t.functionalExit = 122] = "functionalExit", t[t.functionalShared = 123] = "functionalShared", t[t.functionalThumbsup = 124] = "functionalThumbsup", t[t.functionalDiscount = 125] = "functionalDiscount", t[t.functionalPercentage = 126] = "functionalPercentage", t[t.functionalList = 127] = "functionalList", t[t.functionalMapLocation = 128] = "functionalMapLocation", t[t.functionalNoConnection = 129] = "functionalNoConnection", t[t.functionalSwap = 130] = "functionalSwap", t[t.functionalPiece = 131] = "functionalPiece", t[t.functionalWeight = 132] = "functionalWeight", t[t.functionalPack = 133] = "functionalPack", t[t.functionalCommunications = 134] = "functionalCommunications", t[t.functionalDeliveryAddresses = 135] = "functionalDeliveryAddresses", t[t["functional18+"] = 136] = "functional18+", t[t.functionalReadtime = 137] = "functionalReadtime", t[t.functionalCopy = 138] = "functionalCopy", t[t.functionalMessageField = 139] = "functionalMessageField", t[t.functionalNext = 140] = "functionalNext", t[t.functionalSave = 141] = "functionalSave", t[t.functionalLogin = 142] = "functionalLogin", t[t.functionalLogout = 143] = "functionalLogout", t[t.functionalWebsite = 144] = "functionalWebsite", t[t.functionalMenu = 145] = "functionalMenu", t[t.functionalRegister = 146] = "functionalRegister", t[t.functionalNews = 147] = "functionalNews", t[t.functionalTimer = 148] = "functionalTimer", t[t.functionalEyeShow = 149] = "functionalEyeShow", t[t.functionalMobilePay = 150] = "functionalMobilePay", t[t.functionalConnectionCable = 151] = "functionalConnectionCable", t[t.functionalDryCleaning = 152] = "functionalDryCleaning", t[t.functionalKiosk = 153] = "functionalKiosk", t[t.functionalConnectedDevice = 154] = "functionalConnectedDevice", t[t.functionalCookies = 155] = "functionalCookies", t[t.functionalViewFile = 156] = "functionalViewFile", t[t.functionalLastAdded = 157] = "functionalLastAdded", t[t.functionalFirstAdded = 158] = "functionalFirstAdded", t[t.functionalStoreLayout = 159] = "functionalStoreLayout", t[t.functionalBlock = 160] = "functionalBlock", t[t.functionalChecklist = 161] = "functionalChecklist", t[t.functionalCartCheckout = 162] = "functionalCartCheckout", t[t.functionalCartEdit = 163] = "functionalCartEdit", t[t.functionalEyeHidden = 164] = "functionalEyeHidden", t[t.functionalWarningCircleFilled = 165] = "functionalWarningCircleFilled", t[t.functionalErrorCircleFilled = 166] = "functionalErrorCircleFilled", t[t.functionalSuccessCircleFilled = 167] = "functionalSuccessCircleFilled", t[t.functionalPlusCircle = 168] = "functionalPlusCircle", t[t.functionalSpinner = 169] = "functionalSpinner", t[t.functionalEcoEarth = 170] = "functionalEcoEarth", t[t.functionalAlphaBeta = 171] = "functionalAlphaBeta", t[t.functionalEuro = 172] = "functionalEuro", t[t.functionalNumber = 173] = "functionalNumber", t[t.functionalIdea = 174] = "functionalIdea", t[t.functionalMultifactorAuthenticator = 175] = "functionalMultifactorAuthenticator", t[t.functionalPassword = 176] = "functionalPassword", t[t.functionalDiscountCode = 177] = "functionalDiscountCode", t))(le || {});
|
|
2894
2896
|
const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
2895
|
-
bouIconId:
|
|
2896
|
-
...
|
|
2897
|
-
}) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...
|
|
2898
|
-
label:
|
|
2899
|
-
className:
|
|
2897
|
+
bouIconId: t,
|
|
2898
|
+
...e
|
|
2899
|
+
}) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ i.jsx("use", { href: `${Di}#${le[t]}` }) }), Pe = (t) => typeof t.icon == "string" && t.icon in le ? /* @__PURE__ */ i.jsx(Ti, { bouIconId: le[t.icon] }) : t.icon, Ui = ({
|
|
2900
|
+
label: t,
|
|
2901
|
+
className: e,
|
|
2900
2902
|
onClick: s,
|
|
2901
2903
|
icon: r
|
|
2902
|
-
}) => /* @__PURE__ */ i.jsx(q.Item, { className:
|
|
2903
|
-
/* @__PURE__ */ i.jsx(
|
|
2904
|
-
|
|
2905
|
-
] }) }),
|
|
2906
|
-
const
|
|
2904
|
+
}) => /* @__PURE__ */ i.jsx(q.Item, { className: e, children: /* @__PURE__ */ i.jsxs("button", { onClick: s, children: [
|
|
2905
|
+
/* @__PURE__ */ i.jsx(Pe, { icon: r }),
|
|
2906
|
+
t
|
|
2907
|
+
] }) }), wt = (t) => {
|
|
2908
|
+
const e = $s(), { className: s, label: r, mobileUrl: n, desktopUrl: l, icon: o } = t;
|
|
2907
2909
|
return /* @__PURE__ */ i.jsxs(q.Item, { className: s, children: [
|
|
2908
|
-
(!
|
|
2909
|
-
/* @__PURE__ */ i.jsx(
|
|
2910
|
+
(!e || e && !l) && /* @__PURE__ */ i.jsxs("a", { href: n, referrerPolicy: "no-referrer-when-downgrade", children: [
|
|
2911
|
+
/* @__PURE__ */ i.jsx(Pe, { icon: o }),
|
|
2910
2912
|
r
|
|
2911
2913
|
] }),
|
|
2912
2914
|
!!l && /* @__PURE__ */ i.jsxs("a", { href: l, referrerPolicy: "no-referrer-when-downgrade", children: [
|
|
2913
|
-
/* @__PURE__ */ i.jsx(
|
|
2915
|
+
/* @__PURE__ */ i.jsx(Pe, { icon: o }),
|
|
2914
2916
|
r
|
|
2915
2917
|
] })
|
|
2916
2918
|
] });
|
|
2917
|
-
}, Ms = h.createContext(void 0), Qi = ({ position:
|
|
2918
|
-
const
|
|
2919
|
-
if (!
|
|
2919
|
+
}, Ms = h.createContext(void 0), Qi = ({ position: t, bouMenuItems: e, children: s }) => /* @__PURE__ */ i.jsx(Ms.Provider, { value: { position: t, bouMenuItems: e }, children: s }), Ls = () => {
|
|
2920
|
+
const t = h.useContext(Ms);
|
|
2921
|
+
if (!t)
|
|
2920
2922
|
throw new Error("Authentication context can not be rendered outside of Authentication");
|
|
2921
|
-
return
|
|
2922
|
-
}, Fs = h.createContext(void 0), Hi = ({ apiUrl:
|
|
2923
|
-
const
|
|
2924
|
-
if (!
|
|
2923
|
+
return t;
|
|
2924
|
+
}, Fs = h.createContext(void 0), Hi = ({ apiUrl: t, redirectUrl: e, children: s }) => /* @__PURE__ */ i.jsx(Fs.Provider, { value: { apiUrl: t, redirectUrl: e }, children: s }), Fe = () => {
|
|
2925
|
+
const t = h.useContext(Fs);
|
|
2926
|
+
if (!t)
|
|
2925
2927
|
throw new Error("Api context can not be rendered outside of Api");
|
|
2926
|
-
return
|
|
2927
|
-
}, Rs = ({ apiUrl:
|
|
2928
|
-
const r = new URLSearchParams({ redirectUrl:
|
|
2928
|
+
return t;
|
|
2929
|
+
}, Rs = ({ apiUrl: t, redirectUrl: e, trackingInfo: s }) => {
|
|
2930
|
+
const r = new URLSearchParams({ redirectUrl: e });
|
|
2929
2931
|
s && r.append("trackingInfo", s);
|
|
2930
|
-
const n = `${
|
|
2932
|
+
const n = `${t}/login?${r.toString()}`, l = `${t}/logout?${r.toString()}`;
|
|
2931
2933
|
return { loginUrl: n, logoutUrl: l };
|
|
2932
|
-
},
|
|
2933
|
-
const { apiUrl:
|
|
2934
|
-
return Rs({ apiUrl:
|
|
2934
|
+
}, ue = () => {
|
|
2935
|
+
const { apiUrl: t, redirectUrl: e } = Fe(), s = Ks();
|
|
2936
|
+
return Rs({ apiUrl: t, redirectUrl: e, trackingInfo: s });
|
|
2935
2937
|
}, $i = () => {
|
|
2936
|
-
const { apiUrl:
|
|
2937
|
-
return `${`${
|
|
2938
|
-
},
|
|
2939
|
-
const { loginUrl: s } = Rs({ apiUrl:
|
|
2938
|
+
const { apiUrl: t } = Fe();
|
|
2939
|
+
return `${`${t}/xtra`}/authentication/v1/user/profile`;
|
|
2940
|
+
}, Ve = (t) => t ? `+${t.countryCode} ${t.number}` : "", We = (t, e) => e == null ? void 0 : e.find((s) => s.type === t), Ze = ({ apiUrl: t, redirectUrl: e }) => {
|
|
2941
|
+
const { loginUrl: s } = Rs({ apiUrl: t, redirectUrl: e });
|
|
2940
2942
|
window.location.replace(s);
|
|
2941
|
-
},
|
|
2943
|
+
}, Ye = (t) => {
|
|
2942
2944
|
var l;
|
|
2943
|
-
if (!
|
|
2944
|
-
return { user: { state: () => "NotAuthenticated" }, tryToLogon:
|
|
2945
|
-
const
|
|
2945
|
+
if (!t)
|
|
2946
|
+
return { user: { state: () => "NotAuthenticated" }, tryToLogon: Ze };
|
|
2947
|
+
const e = new Date(t.dateOfBirth), s = We(Re.Mobile, t.phone), r = We(Re.Fixed, t.phone), n = Ve(s) ?? Ve(r) ?? "";
|
|
2946
2948
|
return {
|
|
2947
2949
|
user: {
|
|
2948
2950
|
...(l = window.XTRA) == null ? void 0 : l.user,
|
|
2949
|
-
firstName: () =>
|
|
2950
|
-
lastName: () =>
|
|
2951
|
-
dob: () =>
|
|
2952
|
-
mob: () =>
|
|
2953
|
-
yob: () =>
|
|
2954
|
-
gender: () =>
|
|
2951
|
+
firstName: () => t.firstName,
|
|
2952
|
+
lastName: () => t.lastName,
|
|
2953
|
+
dob: () => e.getDate(),
|
|
2954
|
+
mob: () => e.getMonth() + 1,
|
|
2955
|
+
yob: () => e.getFullYear(),
|
|
2956
|
+
gender: () => t.genderCode,
|
|
2955
2957
|
phone: () => n,
|
|
2956
2958
|
streetName: () => {
|
|
2957
2959
|
var o;
|
|
2958
|
-
return (o =
|
|
2960
|
+
return (o = t.address) == null ? void 0 : o.streetName;
|
|
2959
2961
|
},
|
|
2960
2962
|
houseNr: () => {
|
|
2961
2963
|
var o;
|
|
2962
|
-
return (o =
|
|
2964
|
+
return (o = t.address) == null ? void 0 : o.houseNumber;
|
|
2963
2965
|
},
|
|
2964
2966
|
box: () => {
|
|
2965
2967
|
var o;
|
|
2966
|
-
return (o =
|
|
2968
|
+
return (o = t.address) == null ? void 0 : o.letterBoxName;
|
|
2967
2969
|
},
|
|
2968
2970
|
zip: () => {
|
|
2969
2971
|
var o;
|
|
2970
|
-
return (o =
|
|
2972
|
+
return (o = t.address) == null ? void 0 : o.postalCode;
|
|
2971
2973
|
},
|
|
2972
2974
|
city: () => {
|
|
2973
2975
|
var o;
|
|
2974
|
-
return (o =
|
|
2976
|
+
return (o = t.address) == null ? void 0 : o.locationName;
|
|
2975
2977
|
},
|
|
2976
2978
|
country: () => {
|
|
2977
2979
|
var o;
|
|
2978
|
-
return (o =
|
|
2980
|
+
return (o = t.address) == null ? void 0 : o.countryCode;
|
|
2979
2981
|
},
|
|
2980
|
-
email: () =>
|
|
2981
|
-
cbh: () =>
|
|
2982
|
+
email: () => t.email,
|
|
2983
|
+
cbh: () => t.customerIdentifier,
|
|
2982
2984
|
state: () => "Authenticated"
|
|
2983
2985
|
},
|
|
2984
|
-
tryToLogon:
|
|
2986
|
+
tryToLogon: Ze
|
|
2985
2987
|
};
|
|
2986
2988
|
}, Ds = ["profile"], Ts = () => {
|
|
2987
|
-
const { i18n:
|
|
2989
|
+
const { i18n: t } = bt(), e = $i(), s = sessionStorage.getItem("profile"), r = !!s;
|
|
2988
2990
|
return Cs({
|
|
2989
2991
|
queryKey: Ds,
|
|
2990
2992
|
queryFn: async () => {
|
|
2991
|
-
const l = await fetch(
|
|
2993
|
+
const l = await fetch(e, {
|
|
2992
2994
|
credentials: "include",
|
|
2993
2995
|
mode: "cors",
|
|
2994
|
-
headers: { "Accept-Language":
|
|
2996
|
+
headers: { "Accept-Language": t.language }
|
|
2995
2997
|
});
|
|
2996
2998
|
if (!l.ok) {
|
|
2997
2999
|
if (l.status === 401)
|
|
2998
|
-
return window.XTRA = { ...window.XTRA, ...
|
|
3000
|
+
return window.XTRA = { ...window.XTRA, ...Ye() }, window.postMessage(
|
|
2999
3001
|
{ source: "xtra-authentication", isAuthenticated: !1 },
|
|
3000
3002
|
new URL(window.location.href).origin
|
|
3001
3003
|
), sessionStorage.removeItem("profile"), { authenticationStatus: "NotAuthenticated" };
|
|
@@ -3007,7 +3009,7 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3007
3009
|
return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName: m })), window.postMessage(
|
|
3008
3010
|
{ source: "xtra-authentication", isAuthenticated: !0 },
|
|
3009
3011
|
new URL(window.location.href).origin
|
|
3010
|
-
), window.XTRA = { ...window.XTRA, ...
|
|
3012
|
+
), window.XTRA = { ...window.XTRA, ...Ye(o) }, {
|
|
3011
3013
|
authenticationStatus: "Authenticated",
|
|
3012
3014
|
profile: { firstName: o.firstName, lastName: o.lastName }
|
|
3013
3015
|
};
|
|
@@ -3020,7 +3022,7 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3020
3022
|
refetchOnWindowFocus: !1
|
|
3021
3023
|
});
|
|
3022
3024
|
}, Ki = () => {
|
|
3023
|
-
const { t
|
|
3025
|
+
const { t } = bt(), e = ns(), { position: s, bouMenuItems: r } = Ls(), { logoutUrl: n } = ue(), o = Me().getQueryData(Ds), c = (o == null ? void 0 : o.profile.firstName) ?? "", m = (o == null ? void 0 : o.profile.lastName) ?? "", y = () => {
|
|
3024
3026
|
sessionStorage.removeItem("profile"), window.location.href = n;
|
|
3025
3027
|
};
|
|
3026
3028
|
return /* @__PURE__ */ i.jsxs(q, { type: "nav", id: "xtra-menu", position: s, children: [
|
|
@@ -3036,13 +3038,13 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3036
3038
|
children: /* @__PURE__ */ i.jsxs("button", { children: [
|
|
3037
3039
|
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Rr, { variant: "small", firstName: c, lastName: m }) }),
|
|
3038
3040
|
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: c }),
|
|
3039
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(
|
|
3041
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Le, {}) })
|
|
3040
3042
|
] })
|
|
3041
3043
|
}
|
|
3042
3044
|
),
|
|
3043
3045
|
/* @__PURE__ */ i.jsxs(q.Content, { as: "div", children: [
|
|
3044
3046
|
!!r && r.length > 0 && /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: r.map(({ label: d, icon: v, url: u }, p) => /* @__PURE__ */ i.jsx(
|
|
3045
|
-
|
|
3047
|
+
wt,
|
|
3046
3048
|
{
|
|
3047
3049
|
className: "bou-menu-item",
|
|
3048
3050
|
mobileUrl: u,
|
|
@@ -3053,66 +3055,66 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3053
3055
|
)) }),
|
|
3054
3056
|
/* @__PURE__ */ i.jsxs("ul", { children: [
|
|
3055
3057
|
/* @__PURE__ */ i.jsx(
|
|
3056
|
-
|
|
3058
|
+
wt,
|
|
3057
3059
|
{
|
|
3058
3060
|
className: "manage-profile",
|
|
3059
|
-
mobileUrl: `${
|
|
3060
|
-
desktopUrl: `${
|
|
3061
|
+
mobileUrl: `${e}/manage-profile`,
|
|
3062
|
+
desktopUrl: `${e}/manage-profile/personal-data`,
|
|
3061
3063
|
icon: /* @__PURE__ */ i.jsx(Xr, {}),
|
|
3062
|
-
label:
|
|
3064
|
+
label: t("manageProfile")
|
|
3063
3065
|
}
|
|
3064
3066
|
),
|
|
3065
3067
|
/* @__PURE__ */ i.jsx(
|
|
3066
|
-
|
|
3068
|
+
wt,
|
|
3067
3069
|
{
|
|
3068
3070
|
className: "payment",
|
|
3069
|
-
mobileUrl: `${
|
|
3071
|
+
mobileUrl: `${e}/payment`,
|
|
3070
3072
|
icon: /* @__PURE__ */ i.jsx(li, {}),
|
|
3071
|
-
label:
|
|
3073
|
+
label: t("payment")
|
|
3072
3074
|
}
|
|
3073
3075
|
),
|
|
3074
3076
|
/* @__PURE__ */ i.jsx(
|
|
3075
|
-
|
|
3077
|
+
wt,
|
|
3076
3078
|
{
|
|
3077
3079
|
className: "gift-cards",
|
|
3078
|
-
mobileUrl: `${
|
|
3080
|
+
mobileUrl: `${e}/gift-cards`,
|
|
3079
3081
|
icon: /* @__PURE__ */ i.jsx(ai, {}),
|
|
3080
|
-
label:
|
|
3082
|
+
label: t("giftCards")
|
|
3081
3083
|
}
|
|
3082
3084
|
),
|
|
3083
3085
|
/* @__PURE__ */ i.jsx(
|
|
3084
|
-
|
|
3086
|
+
wt,
|
|
3085
3087
|
{
|
|
3086
|
-
mobileUrl: `${
|
|
3088
|
+
mobileUrl: `${e}/identifiers`,
|
|
3087
3089
|
icon: /* @__PURE__ */ i.jsx(ui, {}),
|
|
3088
|
-
label:
|
|
3090
|
+
label: t("qrCode")
|
|
3089
3091
|
}
|
|
3090
3092
|
),
|
|
3091
3093
|
/* @__PURE__ */ i.jsx(
|
|
3092
|
-
|
|
3094
|
+
wt,
|
|
3093
3095
|
{
|
|
3094
3096
|
className: "manage-privacy",
|
|
3095
|
-
mobileUrl: `${
|
|
3096
|
-
desktopUrl: `${
|
|
3097
|
+
mobileUrl: `${e}/manage-privacy`,
|
|
3098
|
+
desktopUrl: `${e}/manage-privacy/permissions`,
|
|
3097
3099
|
icon: /* @__PURE__ */ i.jsx(zr, {}),
|
|
3098
|
-
label:
|
|
3100
|
+
label: t("privacy")
|
|
3099
3101
|
}
|
|
3100
3102
|
),
|
|
3101
|
-
/* @__PURE__ */ i.jsx(Ui, { onClick: y, icon: /* @__PURE__ */ i.jsx(Zr, {}), label:
|
|
3103
|
+
/* @__PURE__ */ i.jsx(Ui, { onClick: y, icon: /* @__PURE__ */ i.jsx(Zr, {}), label: t("logout") })
|
|
3102
3104
|
] })
|
|
3103
3105
|
] })
|
|
3104
3106
|
] });
|
|
3105
3107
|
}, qi = () => {
|
|
3106
|
-
const { t
|
|
3108
|
+
const { t } = bt();
|
|
3107
3109
|
return /* @__PURE__ */ i.jsxs("button", { className: N("button", "button--neutral", "button--authentication"), children: [
|
|
3108
3110
|
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx("i", { className: "spinner" }) }),
|
|
3109
3111
|
/* @__PURE__ */ i.jsxs("span", { className: "button__label", children: [
|
|
3110
|
-
|
|
3112
|
+
t("loading"),
|
|
3111
3113
|
"..."
|
|
3112
3114
|
] })
|
|
3113
3115
|
] });
|
|
3114
|
-
}, Gi = ({ className:
|
|
3115
|
-
const { t } =
|
|
3116
|
+
}, Gi = ({ className: t }) => {
|
|
3117
|
+
const { t: e } = bt(), { loginUrl: s } = ue();
|
|
3116
3118
|
return /* @__PURE__ */ i.jsxs(
|
|
3117
3119
|
"a",
|
|
3118
3120
|
{
|
|
@@ -3122,17 +3124,18 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3122
3124
|
"button--neutral",
|
|
3123
3125
|
"button--authentication",
|
|
3124
3126
|
"button--authentication--unauthenticated",
|
|
3125
|
-
|
|
3127
|
+
t
|
|
3126
3128
|
),
|
|
3127
3129
|
children: [
|
|
3128
3130
|
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(js, { width: 24, height: 24, suffix: "desktop" }) }),
|
|
3129
|
-
/* @__PURE__ */ i.jsx("span", { className: "button__label", children:
|
|
3130
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(
|
|
3131
|
+
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("login") }),
|
|
3132
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Le, {}) })
|
|
3131
3133
|
]
|
|
3132
3134
|
}
|
|
3133
3135
|
);
|
|
3134
|
-
}
|
|
3135
|
-
|
|
3136
|
+
};
|
|
3137
|
+
const Vi = () => {
|
|
3138
|
+
const { t } = bt(), { loginUrl: e } = ue(), s = ns(), { position: r } = Ls();
|
|
3136
3139
|
return /* @__PURE__ */ i.jsxs(
|
|
3137
3140
|
q,
|
|
3138
3141
|
{
|
|
@@ -3140,40 +3143,40 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3140
3143
|
id: "xtra-menu",
|
|
3141
3144
|
position: r,
|
|
3142
3145
|
className: "menu--unauthenticated",
|
|
3143
|
-
"aria-label":
|
|
3146
|
+
"aria-label": t("xtraMenuAriaLabel"),
|
|
3144
3147
|
children: [
|
|
3145
3148
|
/* @__PURE__ */ i.jsx(q.Trigger, { className: N("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
|
|
3146
3149
|
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(js, { width: 24, height: 24, suffix: "mobile" }) }),
|
|
3147
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(
|
|
3150
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Le, {}) })
|
|
3148
3151
|
] }) }),
|
|
3149
3152
|
/* @__PURE__ */ i.jsxs(q.Content, { children: [
|
|
3150
|
-
/* @__PURE__ */ i.jsx(q.Item, { children: /* @__PURE__ */ i.jsxs("a", { href:
|
|
3153
|
+
/* @__PURE__ */ i.jsx(q.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: e, className: "button button--with-icon", children: [
|
|
3151
3154
|
/* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Vr, {}) }),
|
|
3152
|
-
/* @__PURE__ */ i.jsx("span", { className: "button__label", children:
|
|
3155
|
+
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: t("login") })
|
|
3153
3156
|
] }) }),
|
|
3154
3157
|
/* @__PURE__ */ i.jsx(q.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
|
|
3155
3158
|
/* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Br, {}) }),
|
|
3156
|
-
/* @__PURE__ */ i.jsx("span", { className: "button__label", children:
|
|
3159
|
+
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: t("register") })
|
|
3157
3160
|
] }) })
|
|
3158
3161
|
] })
|
|
3159
3162
|
]
|
|
3160
3163
|
}
|
|
3161
3164
|
);
|
|
3162
3165
|
}, Wi = () => {
|
|
3163
|
-
var
|
|
3164
|
-
const
|
|
3165
|
-
return ((
|
|
3166
|
+
var e, s;
|
|
3167
|
+
const t = Ts();
|
|
3168
|
+
return ((e = t.data) == null ? void 0 : e.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ i.jsx(Ki, {}) : ((s = t.data) == null ? void 0 : s.authenticationStatus) === "NotAuthenticated" || t.isError ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
3166
3169
|
/* @__PURE__ */ i.jsx(Gi, {}),
|
|
3167
3170
|
/* @__PURE__ */ i.jsx(Vi, {})
|
|
3168
3171
|
] }) : /* @__PURE__ */ i.jsx(qi, {});
|
|
3169
3172
|
}, Us = () => {
|
|
3170
|
-
const { apiUrl:
|
|
3171
|
-
return `${`${
|
|
3173
|
+
const { apiUrl: t } = Fe();
|
|
3174
|
+
return `${`${t}/xtra`}/authentication/v1/gdpr`;
|
|
3172
3175
|
}, Zi = () => {
|
|
3173
|
-
const
|
|
3176
|
+
const t = Us(), e = new ps();
|
|
3174
3177
|
return Sr({
|
|
3175
3178
|
mutationFn: async (r) => {
|
|
3176
|
-
const n = await fetch(`${
|
|
3179
|
+
const n = await fetch(`${t}/tc`, {
|
|
3177
3180
|
body: JSON.stringify({ acceptedTC: r }),
|
|
3178
3181
|
credentials: "include",
|
|
3179
3182
|
method: "POST",
|
|
@@ -3184,19 +3187,19 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3184
3187
|
return n;
|
|
3185
3188
|
},
|
|
3186
3189
|
onSuccess: async () => {
|
|
3187
|
-
await
|
|
3190
|
+
await e.invalidateQueries({ queryKey: ["gdpr"] });
|
|
3188
3191
|
}
|
|
3189
3192
|
});
|
|
3190
3193
|
}, Yi = () => {
|
|
3191
3194
|
var l;
|
|
3192
|
-
const { i18n:
|
|
3195
|
+
const { i18n: t } = bt(), e = Us(), r = ((l = Ts().data) == null ? void 0 : l.authenticationStatus) === "Authenticated";
|
|
3193
3196
|
return Cs({
|
|
3194
3197
|
queryKey: ["gdpr"],
|
|
3195
3198
|
queryFn: async () => {
|
|
3196
|
-
const o = await fetch(`${
|
|
3199
|
+
const o = await fetch(`${e}/tc/check`, {
|
|
3197
3200
|
credentials: "include",
|
|
3198
3201
|
mode: "cors",
|
|
3199
|
-
headers: { "Accept-Language":
|
|
3202
|
+
headers: { "Accept-Language": t.language }
|
|
3200
3203
|
});
|
|
3201
3204
|
if (!o.ok)
|
|
3202
3205
|
throw new Error("Network response was not ok");
|
|
@@ -3206,9 +3209,9 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3206
3209
|
});
|
|
3207
3210
|
}, zi = () => {
|
|
3208
3211
|
var j;
|
|
3209
|
-
const { t
|
|
3212
|
+
const { t } = bt();
|
|
3210
3213
|
qs({ element: "xtra-authentication" });
|
|
3211
|
-
const { logoutUrl:
|
|
3214
|
+
const { logoutUrl: e } = ue(), s = h.useRef(null), [r, n] = h.useState(0), [l, o] = h.useState({}), { mutate: c, isError: m } = Zi(), { AccessibleFormMessage: y, formRef: d } = Gs({ submitCount: r, errors: l }), v = Yi(), u = !!((j = v.data) != null && j.length), p = t("termsAndConditions.error.required"), E = () => {
|
|
3212
3215
|
var x;
|
|
3213
3216
|
(x = s == null ? void 0 : s.current) == null || x.click(), document.body.style.removeProperty("overflow");
|
|
3214
3217
|
};
|
|
@@ -3229,22 +3232,22 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3229
3232
|
return u ? /* @__PURE__ */ i.jsxs($, { defaultOpen: u, isModal: !0, children: [
|
|
3230
3233
|
y,
|
|
3231
3234
|
/* @__PURE__ */ i.jsxs($.Root, { children: [
|
|
3232
|
-
/* @__PURE__ */ i.jsx($.Header, { children: /* @__PURE__ */ i.jsx($.Title, { icon: /* @__PURE__ */ i.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ i.jsx(Bi, { children:
|
|
3235
|
+
/* @__PURE__ */ i.jsx($.Header, { children: /* @__PURE__ */ i.jsx($.Title, { icon: /* @__PURE__ */ i.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ i.jsx(Bi, { children: t("termsAndConditions.title") }) }) }),
|
|
3233
3236
|
/* @__PURE__ */ i.jsx($.Body, { children: /* @__PURE__ */ i.jsxs(Qs, { ref: d, id: "tc-form", onSubmit: S, children: [
|
|
3234
3237
|
/* @__PURE__ */ i.jsxs(Xi, { children: [
|
|
3235
|
-
|
|
3236
|
-
l.acceptedTC && /* @__PURE__ */ i.jsx(
|
|
3238
|
+
t("termsAndConditions.description"),
|
|
3239
|
+
l.acceptedTC && /* @__PURE__ */ i.jsx(tn, { children: p })
|
|
3237
3240
|
] }),
|
|
3238
3241
|
v.data.map(({ tcCode: x, title: C, URL: _ }) => /* @__PURE__ */ i.jsx(
|
|
3239
|
-
|
|
3242
|
+
xt,
|
|
3240
3243
|
{
|
|
3241
3244
|
id: x,
|
|
3242
3245
|
value: x,
|
|
3243
3246
|
name: "acceptedTC",
|
|
3244
3247
|
variant: "primary",
|
|
3245
|
-
children: /* @__PURE__ */ i.jsxs(
|
|
3248
|
+
children: /* @__PURE__ */ i.jsxs(xt.Content, { children: [
|
|
3246
3249
|
/* @__PURE__ */ i.jsx(Ji, { children: C }),
|
|
3247
|
-
/* @__PURE__ */ i.jsx(Ii, { href: _, children:
|
|
3250
|
+
/* @__PURE__ */ i.jsx(Ii, { href: _, children: t("termsAndConditions.action", { title: C }) })
|
|
3248
3251
|
] })
|
|
3249
3252
|
},
|
|
3250
3253
|
x
|
|
@@ -3255,23 +3258,23 @@ const Di = "/icons/bouMenuIcons.svg", Ti = ({
|
|
|
3255
3258
|
"a",
|
|
3256
3259
|
{
|
|
3257
3260
|
className: N("button", "button--secondary", "button--terms-and-conditions"),
|
|
3258
|
-
href:
|
|
3259
|
-
children:
|
|
3261
|
+
href: e,
|
|
3262
|
+
children: t("logout")
|
|
3260
3263
|
}
|
|
3261
3264
|
),
|
|
3262
|
-
/* @__PURE__ */ i.jsx(
|
|
3265
|
+
/* @__PURE__ */ i.jsx(Bt, { form: "tc-form", type: "submit", variant: "primary", children: t("confirm") })
|
|
3263
3266
|
] })
|
|
3264
3267
|
] })
|
|
3265
3268
|
] }) : /* @__PURE__ */ i.jsx(i.Fragment, {});
|
|
3266
3269
|
}, Ji = ({
|
|
3267
|
-
children:
|
|
3268
|
-
...
|
|
3269
|
-
}) => /* @__PURE__ */ i.jsx(
|
|
3270
|
+
children: t,
|
|
3271
|
+
...e
|
|
3272
|
+
}) => /* @__PURE__ */ i.jsx(xt.Label, { className: "form--tc__label", ...e, children: t }), Qs = h.forwardRef(({ children: t, ...e }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...e, children: t }));
|
|
3270
3273
|
Qs.displayName = "TermsAndConditionsForm";
|
|
3271
3274
|
const Xi = ({
|
|
3272
|
-
children:
|
|
3273
|
-
...
|
|
3274
|
-
}) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...
|
|
3275
|
+
children: t,
|
|
3276
|
+
...e
|
|
3277
|
+
}) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...e, children: t }), Ii = ({ children: t, ...e }) => /* @__PURE__ */ i.jsx(
|
|
3275
3278
|
"a",
|
|
3276
3279
|
{
|
|
3277
3280
|
className: "form--tc__link",
|
|
@@ -3279,10 +3282,10 @@ const Xi = ({
|
|
|
3279
3282
|
rel: "noreferrer",
|
|
3280
3283
|
role: "button",
|
|
3281
3284
|
download: !0,
|
|
3282
|
-
...
|
|
3283
|
-
children:
|
|
3285
|
+
...e,
|
|
3286
|
+
children: t
|
|
3284
3287
|
}
|
|
3285
|
-
), Bi = ({ children:
|
|
3288
|
+
), Bi = ({ children: t }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: t }), tn = ({ children: t, ...e }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...e, children: t }), en = new ps(), nn = ({ environment: t, redirectUrl: e, apiUrl: s, position: r, commerceId: n, bouMenuItems: l }) => /* @__PURE__ */ i.jsx(Vs, { environment: t, children: /* @__PURE__ */ i.jsx(Ws, { commerceId: n, children: /* @__PURE__ */ i.jsx(Hi, { apiUrl: s, redirectUrl: e, children: /* @__PURE__ */ i.jsxs(dr, { client: en, children: [
|
|
3286
3289
|
/* @__PURE__ */ i.jsx(Qi, { position: r, bouMenuItems: l, children: /* @__PURE__ */ i.jsx(Wi, {}) }),
|
|
3287
3290
|
/* @__PURE__ */ i.jsx(zi, {})
|
|
3288
3291
|
] }) }) }) });
|