@myxtra/authentication-green 2.16.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var kt = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
set _(
|
|
8
|
-
p(e, t,
|
|
4
|
+
var it = (e, t, s) => t.has(e) || kt("Cannot " + s);
|
|
5
|
+
var a = (e, t, s) => (it(e, t, "read from private field"), s ? s.call(e) : t.get(e)), y = (e, t, s) => t.has(e) ? kt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), p = (e, t, s, r) => (it(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), w = (e, t, s) => (it(e, t, "access private method"), s);
|
|
6
|
+
var Ye = (e, t, s, r) => ({
|
|
7
|
+
set _(n) {
|
|
8
|
+
p(e, t, n, s);
|
|
9
9
|
},
|
|
10
10
|
get _() {
|
|
11
|
-
return
|
|
11
|
+
return a(e, t, r);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
import { r as
|
|
14
|
+
import { r as f, j as i, u as Qs, a as Hs, b as je, P as At, c as ts, d as Ks, e as Gs, E as qs, C as Ws } from "./index-BEO_i3HI.js";
|
|
15
15
|
var He = class {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
@@ -31,46 +31,46 @@ var He = class {
|
|
|
31
31
|
}, Qe = typeof window > "u" || "Deno" in globalThis;
|
|
32
32
|
function $() {
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Vs(e, t) {
|
|
35
35
|
return typeof e == "function" ? e(t) : e;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function at(e) {
|
|
38
38
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ss(e, t) {
|
|
41
41
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
42
42
|
}
|
|
43
43
|
function Se(e, t) {
|
|
44
44
|
return typeof e == "function" ? e(t) : e;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Y(e, t) {
|
|
47
47
|
return typeof e == "function" ? e(t) : e;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Nt(e, t) {
|
|
50
50
|
const {
|
|
51
51
|
type: s = "all",
|
|
52
52
|
exact: r,
|
|
53
|
-
fetchStatus:
|
|
53
|
+
fetchStatus: n,
|
|
54
54
|
predicate: l,
|
|
55
55
|
queryKey: o,
|
|
56
56
|
stale: c
|
|
57
57
|
} = e;
|
|
58
58
|
if (o) {
|
|
59
59
|
if (r) {
|
|
60
|
-
if (t.queryHash !==
|
|
60
|
+
if (t.queryHash !== wt(o, t.options))
|
|
61
61
|
return !1;
|
|
62
62
|
} else if (!Ge(t.queryKey, o))
|
|
63
63
|
return !1;
|
|
64
64
|
}
|
|
65
65
|
if (s !== "all") {
|
|
66
|
-
const
|
|
67
|
-
if (s === "active" && !
|
|
66
|
+
const d = t.isActive();
|
|
67
|
+
if (s === "active" && !d || s === "inactive" && d)
|
|
68
68
|
return !1;
|
|
69
69
|
}
|
|
70
|
-
return !(typeof c == "boolean" && t.isStale() !== c ||
|
|
70
|
+
return !(typeof c == "boolean" && t.isStale() !== c || n && n !== t.state.fetchStatus || l && !l(t));
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
const { exact: s, status: r, predicate:
|
|
72
|
+
function Mt(e, t) {
|
|
73
|
+
const { exact: s, status: r, predicate: n, mutationKey: l } = e;
|
|
74
74
|
if (l) {
|
|
75
75
|
if (!t.options.mutationKey)
|
|
76
76
|
return !1;
|
|
@@ -80,36 +80,36 @@ function kt(e, t) {
|
|
|
80
80
|
} else if (!Ge(t.options.mutationKey, l))
|
|
81
81
|
return !1;
|
|
82
82
|
}
|
|
83
|
-
return !(r && t.state.status !== r ||
|
|
83
|
+
return !(r && t.state.status !== r || n && !n(t));
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function wt(e, t) {
|
|
86
86
|
return ((t == null ? void 0 : t.queryKeyHashFn) || be)(e);
|
|
87
87
|
}
|
|
88
88
|
function be(e) {
|
|
89
89
|
return JSON.stringify(
|
|
90
90
|
e,
|
|
91
|
-
(t, s) =>
|
|
91
|
+
(t, s) => ot(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
94
|
function Ge(e, t) {
|
|
95
95
|
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ge(e[s], t[s])) : !1;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function rs(e, t) {
|
|
98
98
|
if (e === t)
|
|
99
99
|
return e;
|
|
100
|
-
const s =
|
|
101
|
-
if (s ||
|
|
102
|
-
const r = s ? e : Object.keys(e),
|
|
103
|
-
let
|
|
100
|
+
const s = Rt(e) && Rt(t);
|
|
101
|
+
if (s || ot(e) && ot(t)) {
|
|
102
|
+
const r = s ? e : Object.keys(e), n = r.length, l = s ? t : Object.keys(t), o = l.length, c = s ? [] : {};
|
|
103
|
+
let d = 0;
|
|
104
104
|
for (let m = 0; m < o; m++) {
|
|
105
105
|
const h = s ? m : l[m];
|
|
106
|
-
(!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (c[h] = void 0,
|
|
106
|
+
(!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (c[h] = void 0, d++) : (c[h] = rs(e[h], t[h]), c[h] === e[h] && e[h] !== void 0 && d++);
|
|
107
107
|
}
|
|
108
|
-
return
|
|
108
|
+
return n === o && d === n ? e : c;
|
|
109
109
|
}
|
|
110
110
|
return t;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Be(e, t) {
|
|
113
113
|
if (!t || Object.keys(e).length !== Object.keys(t).length)
|
|
114
114
|
return !1;
|
|
115
115
|
for (const s in e)
|
|
@@ -117,42 +117,42 @@ function Ie(e, t) {
|
|
|
117
117
|
return !1;
|
|
118
118
|
return !0;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Rt(e) {
|
|
121
121
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
if (!
|
|
123
|
+
function ot(e) {
|
|
124
|
+
if (!Ot(e))
|
|
125
125
|
return !1;
|
|
126
126
|
const t = e.constructor;
|
|
127
127
|
if (t === void 0)
|
|
128
128
|
return !0;
|
|
129
129
|
const s = t.prototype;
|
|
130
|
-
return !(!
|
|
130
|
+
return !(!Ot(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Ot(e) {
|
|
133
133
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function $s(e) {
|
|
136
136
|
return new Promise((t) => {
|
|
137
137
|
setTimeout(t, e);
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ?
|
|
140
|
+
function lt(e, t, s) {
|
|
141
|
+
return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? rs(e, t) : t;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Zs(e, t, s = 0) {
|
|
144
144
|
const r = [...e, t];
|
|
145
145
|
return s && r.length > s ? r.slice(1) : r;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function zs(e, t, s = 0) {
|
|
148
148
|
const r = [t, ...e];
|
|
149
149
|
return s && r.length > s ? r.slice(0, -1) : r;
|
|
150
150
|
}
|
|
151
|
-
var
|
|
152
|
-
function
|
|
153
|
-
return !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn ===
|
|
151
|
+
var is = Symbol();
|
|
152
|
+
function ns(e, t) {
|
|
153
|
+
return !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === is ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
|
|
154
154
|
}
|
|
155
|
-
var pe, ae, Ee,
|
|
155
|
+
var pe, ae, Ee, Vt, Ys = (Vt = class extends He {
|
|
156
156
|
constructor() {
|
|
157
157
|
super();
|
|
158
158
|
y(this, pe);
|
|
@@ -168,20 +168,20 @@ var pe, ae, Ee, Gt, $s = (Gt = class extends He {
|
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
onSubscribe() {
|
|
171
|
-
|
|
171
|
+
a(this, ae) || this.setEventListener(a(this, Ee));
|
|
172
172
|
}
|
|
173
173
|
onUnsubscribe() {
|
|
174
174
|
var t;
|
|
175
|
-
this.hasListeners() || ((t =
|
|
175
|
+
this.hasListeners() || ((t = a(this, ae)) == null || t.call(this), p(this, ae, void 0));
|
|
176
176
|
}
|
|
177
177
|
setEventListener(t) {
|
|
178
178
|
var s;
|
|
179
|
-
p(this, Ee, t), (s =
|
|
179
|
+
p(this, Ee, t), (s = a(this, ae)) == null || s.call(this), p(this, ae, t((r) => {
|
|
180
180
|
typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
|
|
181
181
|
}));
|
|
182
182
|
}
|
|
183
183
|
setFocused(t) {
|
|
184
|
-
|
|
184
|
+
a(this, pe) !== t && (p(this, pe, t), this.onFocus());
|
|
185
185
|
}
|
|
186
186
|
onFocus() {
|
|
187
187
|
const t = this.isFocused();
|
|
@@ -191,15 +191,15 @@ var pe, ae, Ee, Gt, $s = (Gt = class extends He {
|
|
|
191
191
|
}
|
|
192
192
|
isFocused() {
|
|
193
193
|
var t;
|
|
194
|
-
return typeof
|
|
194
|
+
return typeof a(this, pe) == "boolean" ? a(this, pe) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
|
|
195
195
|
}
|
|
196
|
-
}, pe = new WeakMap(), ae = new WeakMap(), Ee = new WeakMap(),
|
|
196
|
+
}, pe = new WeakMap(), ae = new WeakMap(), Ee = new WeakMap(), Vt), jt = new Ys(), Pe, oe, ke, $t, Js = ($t = class extends He {
|
|
197
197
|
constructor() {
|
|
198
198
|
super();
|
|
199
199
|
y(this, Pe, !0);
|
|
200
200
|
y(this, oe);
|
|
201
|
-
y(this,
|
|
202
|
-
p(this,
|
|
201
|
+
y(this, ke);
|
|
202
|
+
p(this, ke, (t) => {
|
|
203
203
|
if (!Qe && window.addEventListener) {
|
|
204
204
|
const s = () => t(!0), r = () => t(!1);
|
|
205
205
|
return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
|
|
@@ -209,64 +209,64 @@ var pe, ae, Ee, Gt, $s = (Gt = class extends He {
|
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
onSubscribe() {
|
|
212
|
-
|
|
212
|
+
a(this, oe) || this.setEventListener(a(this, ke));
|
|
213
213
|
}
|
|
214
214
|
onUnsubscribe() {
|
|
215
215
|
var t;
|
|
216
|
-
this.hasListeners() || ((t =
|
|
216
|
+
this.hasListeners() || ((t = a(this, oe)) == null || t.call(this), p(this, oe, void 0));
|
|
217
217
|
}
|
|
218
218
|
setEventListener(t) {
|
|
219
219
|
var s;
|
|
220
|
-
p(this,
|
|
220
|
+
p(this, ke, t), (s = a(this, oe)) == null || s.call(this), p(this, oe, t(this.setOnline.bind(this)));
|
|
221
221
|
}
|
|
222
222
|
setOnline(t) {
|
|
223
|
-
|
|
223
|
+
a(this, Pe) !== t && (p(this, Pe, t), this.listeners.forEach((r) => {
|
|
224
224
|
r(t);
|
|
225
225
|
}));
|
|
226
226
|
}
|
|
227
227
|
isOnline() {
|
|
228
|
-
return
|
|
228
|
+
return a(this, Pe);
|
|
229
229
|
}
|
|
230
|
-
}, Pe = new WeakMap(), oe = new WeakMap(),
|
|
231
|
-
function
|
|
230
|
+
}, Pe = new WeakMap(), oe = new WeakMap(), ke = new WeakMap(), $t), et = new Js();
|
|
231
|
+
function Xs(e) {
|
|
232
232
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
return (e ?? "online") === "online" ?
|
|
234
|
+
function as(e) {
|
|
235
|
+
return (e ?? "online") === "online" ? et.isOnline() : !0;
|
|
236
236
|
}
|
|
237
|
-
var
|
|
237
|
+
var os = class extends Error {
|
|
238
238
|
constructor(e) {
|
|
239
239
|
super("CancelledError"), this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
|
|
240
240
|
}
|
|
241
241
|
};
|
|
242
|
-
function
|
|
243
|
-
return e instanceof
|
|
242
|
+
function nt(e) {
|
|
243
|
+
return e instanceof os;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
let t = !1, s = 0, r = !1,
|
|
245
|
+
function ls(e) {
|
|
246
|
+
let t = !1, s = 0, r = !1, n, l, o;
|
|
247
247
|
const c = new Promise((C, j) => {
|
|
248
248
|
l = C, o = j;
|
|
249
|
-
}),
|
|
249
|
+
}), d = (C) => {
|
|
250
250
|
var j;
|
|
251
|
-
r || (S(new
|
|
251
|
+
r || (S(new os(C)), (j = e.abort) == null || j.call(e));
|
|
252
252
|
}, m = () => {
|
|
253
253
|
t = !0;
|
|
254
254
|
}, h = () => {
|
|
255
255
|
t = !1;
|
|
256
|
-
}, u = () =>
|
|
256
|
+
}, u = () => jt.isFocused() && (e.networkMode === "always" || et.isOnline()) && e.canRun(), v = () => as(e.networkMode) && e.canRun(), g = (C) => {
|
|
257
257
|
var j;
|
|
258
|
-
r || (r = !0, (j = e.onSuccess) == null || j.call(e, C),
|
|
258
|
+
r || (r = !0, (j = e.onSuccess) == null || j.call(e, C), n == null || n(), l(C));
|
|
259
259
|
}, S = (C) => {
|
|
260
260
|
var j;
|
|
261
|
-
r || (r = !0, (j = e.onError) == null || j.call(e, C),
|
|
261
|
+
r || (r = !0, (j = e.onError) == null || j.call(e, C), n == null || n(), o(C));
|
|
262
262
|
}, _ = () => new Promise((C) => {
|
|
263
263
|
var j;
|
|
264
|
-
|
|
264
|
+
n = (b) => {
|
|
265
265
|
(r || u()) && C(b);
|
|
266
266
|
}, (j = e.onPause) == null || j.call(e);
|
|
267
267
|
}).then(() => {
|
|
268
268
|
var C;
|
|
269
|
-
|
|
269
|
+
n = void 0, r || (C = e.onContinue) == null || C.call(e);
|
|
270
270
|
}), P = () => {
|
|
271
271
|
if (r)
|
|
272
272
|
return;
|
|
@@ -278,66 +278,66 @@ function ns(e) {
|
|
|
278
278
|
C = Promise.reject(b);
|
|
279
279
|
}
|
|
280
280
|
Promise.resolve(C).then(g).catch((b) => {
|
|
281
|
-
var
|
|
281
|
+
var k;
|
|
282
282
|
if (r)
|
|
283
283
|
return;
|
|
284
|
-
const M = e.retry ?? (Qe ? 0 : 3), F = e.retryDelay ??
|
|
284
|
+
const M = e.retry ?? (Qe ? 0 : 3), F = e.retryDelay ?? Xs, J = typeof F == "function" ? F(s, b) : F, te = M === !0 || typeof M == "number" && s < M || typeof M == "function" && M(s, b);
|
|
285
285
|
if (t || !te) {
|
|
286
286
|
S(b);
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
|
-
s++, (
|
|
289
|
+
s++, (k = e.onFail) == null || k.call(e, s, b), $s(J).then(() => u() ? void 0 : _()).then(() => {
|
|
290
290
|
t ? S(b) : P();
|
|
291
291
|
});
|
|
292
292
|
});
|
|
293
293
|
};
|
|
294
294
|
return {
|
|
295
295
|
promise: c,
|
|
296
|
-
cancel:
|
|
297
|
-
continue: () => (
|
|
296
|
+
cancel: d,
|
|
297
|
+
continue: () => (n == null || n(), c),
|
|
298
298
|
cancelRetry: m,
|
|
299
299
|
continueRetry: h,
|
|
300
300
|
canStart: v,
|
|
301
301
|
start: () => (v() ? P() : _().then(P), c)
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function Is() {
|
|
305
305
|
let e = [], t = 0, s = (c) => {
|
|
306
306
|
c();
|
|
307
307
|
}, r = (c) => {
|
|
308
308
|
c();
|
|
309
|
-
},
|
|
309
|
+
}, n = (c) => setTimeout(c, 0);
|
|
310
310
|
const l = (c) => {
|
|
311
|
-
t ? e.push(c) :
|
|
311
|
+
t ? e.push(c) : n(() => {
|
|
312
312
|
s(c);
|
|
313
313
|
});
|
|
314
314
|
}, o = () => {
|
|
315
315
|
const c = e;
|
|
316
|
-
e = [], c.length &&
|
|
316
|
+
e = [], c.length && n(() => {
|
|
317
317
|
r(() => {
|
|
318
|
-
c.forEach((
|
|
319
|
-
s(
|
|
318
|
+
c.forEach((d) => {
|
|
319
|
+
s(d);
|
|
320
320
|
});
|
|
321
321
|
});
|
|
322
322
|
});
|
|
323
323
|
};
|
|
324
324
|
return {
|
|
325
325
|
batch: (c) => {
|
|
326
|
-
let
|
|
326
|
+
let d;
|
|
327
327
|
t++;
|
|
328
328
|
try {
|
|
329
|
-
|
|
329
|
+
d = c();
|
|
330
330
|
} finally {
|
|
331
331
|
t--, t || o();
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return d;
|
|
334
334
|
},
|
|
335
335
|
/**
|
|
336
336
|
* All calls to the wrapped function will be batched.
|
|
337
337
|
*/
|
|
338
|
-
batchCalls: (c) => (...
|
|
338
|
+
batchCalls: (c) => (...d) => {
|
|
339
339
|
l(() => {
|
|
340
|
-
c(...
|
|
340
|
+
c(...d);
|
|
341
341
|
});
|
|
342
342
|
},
|
|
343
343
|
schedule: l,
|
|
@@ -356,11 +356,11 @@ function zs() {
|
|
|
356
356
|
r = c;
|
|
357
357
|
},
|
|
358
358
|
setScheduler: (c) => {
|
|
359
|
-
|
|
359
|
+
n = c;
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
|
-
var D =
|
|
363
|
+
var D = Is(), me, Zt, cs = (Zt = class {
|
|
364
364
|
constructor() {
|
|
365
365
|
y(this, me);
|
|
366
366
|
}
|
|
@@ -368,7 +368,7 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
368
368
|
this.clearGcTimeout();
|
|
369
369
|
}
|
|
370
370
|
scheduleGc() {
|
|
371
|
-
this.clearGcTimeout(),
|
|
371
|
+
this.clearGcTimeout(), at(this.gcTime) && p(this, me, setTimeout(() => {
|
|
372
372
|
this.optionalRemove();
|
|
373
373
|
}, this.gcTime));
|
|
374
374
|
}
|
|
@@ -379,36 +379,36 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
379
379
|
);
|
|
380
380
|
}
|
|
381
381
|
clearGcTimeout() {
|
|
382
|
-
|
|
382
|
+
a(this, me) && (clearTimeout(a(this, me)), p(this, me, void 0));
|
|
383
383
|
}
|
|
384
|
-
}, me = new WeakMap(),
|
|
384
|
+
}, me = new WeakMap(), Zt), Ae, Ne, V, T, qe, ve, z, se, zt, Bs = (zt = class extends cs {
|
|
385
385
|
constructor(t) {
|
|
386
386
|
super();
|
|
387
|
-
y(this,
|
|
388
|
-
y(this,
|
|
387
|
+
y(this, z);
|
|
388
|
+
y(this, Ae);
|
|
389
389
|
y(this, Ne);
|
|
390
390
|
y(this, V);
|
|
391
391
|
y(this, T);
|
|
392
392
|
y(this, qe);
|
|
393
393
|
y(this, ve);
|
|
394
|
-
p(this, ve, !1), p(this, qe, t.defaultOptions), this.setOptions(t.options), this.observers = [], p(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, p(this,
|
|
394
|
+
p(this, ve, !1), p(this, qe, t.defaultOptions), this.setOptions(t.options), this.observers = [], p(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, p(this, Ae, er(this.options)), this.state = t.state ?? a(this, Ae), this.scheduleGc();
|
|
395
395
|
}
|
|
396
396
|
get meta() {
|
|
397
397
|
return this.options.meta;
|
|
398
398
|
}
|
|
399
399
|
get promise() {
|
|
400
400
|
var t;
|
|
401
|
-
return (t =
|
|
401
|
+
return (t = a(this, T)) == null ? void 0 : t.promise;
|
|
402
402
|
}
|
|
403
403
|
setOptions(t) {
|
|
404
|
-
this.options = { ...
|
|
404
|
+
this.options = { ...a(this, qe), ...t }, this.updateGcTime(this.options.gcTime);
|
|
405
405
|
}
|
|
406
406
|
optionalRemove() {
|
|
407
|
-
!this.observers.length && this.state.fetchStatus === "idle" &&
|
|
407
|
+
!this.observers.length && this.state.fetchStatus === "idle" && a(this, V).remove(this);
|
|
408
408
|
}
|
|
409
409
|
setData(t, s) {
|
|
410
|
-
const r =
|
|
411
|
-
return w(this,
|
|
410
|
+
const r = lt(this.state.data, t, this.options);
|
|
411
|
+
return w(this, z, se).call(this, {
|
|
412
412
|
data: r,
|
|
413
413
|
type: "success",
|
|
414
414
|
dataUpdatedAt: s == null ? void 0 : s.updatedAt,
|
|
@@ -416,22 +416,22 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
416
416
|
}), r;
|
|
417
417
|
}
|
|
418
418
|
setState(t, s) {
|
|
419
|
-
w(this,
|
|
419
|
+
w(this, z, se).call(this, { type: "setState", state: t, setStateOptions: s });
|
|
420
420
|
}
|
|
421
421
|
cancel(t) {
|
|
422
|
-
var r,
|
|
423
|
-
const s = (r =
|
|
424
|
-
return (
|
|
422
|
+
var r, n;
|
|
423
|
+
const s = (r = a(this, T)) == null ? void 0 : r.promise;
|
|
424
|
+
return (n = a(this, T)) == null || n.cancel(t), s ? s.then($).catch($) : Promise.resolve();
|
|
425
425
|
}
|
|
426
426
|
destroy() {
|
|
427
427
|
super.destroy(), this.cancel({ silent: !0 });
|
|
428
428
|
}
|
|
429
429
|
reset() {
|
|
430
|
-
this.destroy(), this.setState(
|
|
430
|
+
this.destroy(), this.setState(a(this, Ae));
|
|
431
431
|
}
|
|
432
432
|
isActive() {
|
|
433
433
|
return this.observers.some(
|
|
434
|
-
(t) =>
|
|
434
|
+
(t) => Y(t.options.enabled, this) !== !1
|
|
435
435
|
);
|
|
436
436
|
}
|
|
437
437
|
isDisabled() {
|
|
@@ -443,53 +443,53 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
443
443
|
) : this.state.data === void 0;
|
|
444
444
|
}
|
|
445
445
|
isStaleByTime(t = 0) {
|
|
446
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
446
|
+
return this.state.isInvalidated || this.state.data === void 0 || !ss(this.state.dataUpdatedAt, t);
|
|
447
447
|
}
|
|
448
448
|
onFocus() {
|
|
449
449
|
var s;
|
|
450
450
|
const t = this.observers.find((r) => r.shouldFetchOnWindowFocus());
|
|
451
|
-
t == null || t.refetch({ cancelRefetch: !1 }), (s =
|
|
451
|
+
t == null || t.refetch({ cancelRefetch: !1 }), (s = a(this, T)) == null || s.continue();
|
|
452
452
|
}
|
|
453
453
|
onOnline() {
|
|
454
454
|
var s;
|
|
455
455
|
const t = this.observers.find((r) => r.shouldFetchOnReconnect());
|
|
456
|
-
t == null || t.refetch({ cancelRefetch: !1 }), (s =
|
|
456
|
+
t == null || t.refetch({ cancelRefetch: !1 }), (s = a(this, T)) == null || s.continue();
|
|
457
457
|
}
|
|
458
458
|
addObserver(t) {
|
|
459
|
-
this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(),
|
|
459
|
+
this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), a(this, V).notify({ type: "observerAdded", query: this, observer: t }));
|
|
460
460
|
}
|
|
461
461
|
removeObserver(t) {
|
|
462
|
-
this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (
|
|
462
|
+
this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (a(this, T) && (a(this, ve) ? a(this, T).cancel({ revert: !0 }) : a(this, T).cancelRetry()), this.scheduleGc()), a(this, V).notify({ type: "observerRemoved", query: this, observer: t }));
|
|
463
463
|
}
|
|
464
464
|
getObserversCount() {
|
|
465
465
|
return this.observers.length;
|
|
466
466
|
}
|
|
467
467
|
invalidate() {
|
|
468
|
-
this.state.isInvalidated || w(this,
|
|
468
|
+
this.state.isInvalidated || w(this, z, se).call(this, { type: "invalidate" });
|
|
469
469
|
}
|
|
470
470
|
fetch(t, s) {
|
|
471
|
-
var
|
|
471
|
+
var d, m, h;
|
|
472
472
|
if (this.state.fetchStatus !== "idle") {
|
|
473
473
|
if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
|
|
474
474
|
this.cancel({ silent: !0 });
|
|
475
|
-
else if (
|
|
476
|
-
return
|
|
475
|
+
else if (a(this, T))
|
|
476
|
+
return a(this, T).continueRetry(), a(this, T).promise;
|
|
477
477
|
}
|
|
478
478
|
if (t && this.setOptions(t), !this.options.queryFn) {
|
|
479
479
|
const u = this.observers.find((v) => v.options.queryFn);
|
|
480
480
|
u && this.setOptions(u.options);
|
|
481
481
|
}
|
|
482
|
-
const r = new AbortController(),
|
|
482
|
+
const r = new AbortController(), n = (u) => {
|
|
483
483
|
Object.defineProperty(u, "signal", {
|
|
484
484
|
enumerable: !0,
|
|
485
485
|
get: () => (p(this, ve, !0), r.signal)
|
|
486
486
|
});
|
|
487
487
|
}, l = () => {
|
|
488
|
-
const u =
|
|
488
|
+
const u = ns(this.options, s), v = {
|
|
489
489
|
queryKey: this.queryKey,
|
|
490
490
|
meta: this.meta
|
|
491
491
|
};
|
|
492
|
-
return
|
|
492
|
+
return n(v), p(this, ve, !1), this.options.persister ? this.options.persister(
|
|
493
493
|
u,
|
|
494
494
|
v,
|
|
495
495
|
this
|
|
@@ -501,27 +501,27 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
501
501
|
state: this.state,
|
|
502
502
|
fetchFn: l
|
|
503
503
|
};
|
|
504
|
-
|
|
504
|
+
n(o), (d = this.options.behavior) == null || d.onFetch(
|
|
505
505
|
o,
|
|
506
506
|
this
|
|
507
|
-
), p(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((m = o.fetchOptions) == null ? void 0 : m.meta)) && w(this,
|
|
507
|
+
), p(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((m = o.fetchOptions) == null ? void 0 : m.meta)) && w(this, z, se).call(this, { type: "fetch", meta: (h = o.fetchOptions) == null ? void 0 : h.meta });
|
|
508
508
|
const c = (u) => {
|
|
509
509
|
var v, g, S, _;
|
|
510
|
-
|
|
510
|
+
nt(u) && u.silent || w(this, z, se).call(this, {
|
|
511
511
|
type: "error",
|
|
512
512
|
error: u
|
|
513
|
-
}),
|
|
513
|
+
}), nt(u) || ((g = (v = a(this, V).config).onError) == null || g.call(
|
|
514
514
|
v,
|
|
515
515
|
u,
|
|
516
516
|
this
|
|
517
|
-
), (_ = (S =
|
|
517
|
+
), (_ = (S = a(this, V).config).onSettled) == null || _.call(
|
|
518
518
|
S,
|
|
519
519
|
this.state.data,
|
|
520
520
|
u,
|
|
521
521
|
this
|
|
522
522
|
)), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
523
523
|
};
|
|
524
|
-
return p(this, T,
|
|
524
|
+
return p(this, T, ls({
|
|
525
525
|
initialPromise: s == null ? void 0 : s.initialPromise,
|
|
526
526
|
fn: o.fetchFn,
|
|
527
527
|
abort: r.abort.bind(r),
|
|
@@ -537,7 +537,7 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
537
537
|
c(P);
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
(g = (v =
|
|
540
|
+
(g = (v = a(this, V).config).onSuccess) == null || g.call(v, u, this), (_ = (S = a(this, V).config).onSettled) == null || _.call(
|
|
541
541
|
S,
|
|
542
542
|
u,
|
|
543
543
|
this.state.error,
|
|
@@ -546,21 +546,21 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
546
546
|
},
|
|
547
547
|
onError: c,
|
|
548
548
|
onFail: (u, v) => {
|
|
549
|
-
w(this,
|
|
549
|
+
w(this, z, se).call(this, { type: "failed", failureCount: u, error: v });
|
|
550
550
|
},
|
|
551
551
|
onPause: () => {
|
|
552
|
-
w(this,
|
|
552
|
+
w(this, z, se).call(this, { type: "pause" });
|
|
553
553
|
},
|
|
554
554
|
onContinue: () => {
|
|
555
|
-
w(this,
|
|
555
|
+
w(this, z, se).call(this, { type: "continue" });
|
|
556
556
|
},
|
|
557
557
|
retry: o.options.retry,
|
|
558
558
|
retryDelay: o.options.retryDelay,
|
|
559
559
|
networkMode: o.options.networkMode,
|
|
560
560
|
canRun: () => !0
|
|
561
|
-
})),
|
|
561
|
+
})), a(this, T).start();
|
|
562
562
|
}
|
|
563
|
-
},
|
|
563
|
+
}, Ae = new WeakMap(), Ne = new WeakMap(), V = new WeakMap(), T = new WeakMap(), qe = new WeakMap(), ve = new WeakMap(), z = new WeakSet(), se = function(t) {
|
|
564
564
|
const s = (r) => {
|
|
565
565
|
switch (t.type) {
|
|
566
566
|
case "failed":
|
|
@@ -582,7 +582,7 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
582
582
|
case "fetch":
|
|
583
583
|
return {
|
|
584
584
|
...r,
|
|
585
|
-
...
|
|
585
|
+
...us(r.data, this.options),
|
|
586
586
|
fetchMeta: t.meta ?? null
|
|
587
587
|
};
|
|
588
588
|
case "success":
|
|
@@ -601,14 +601,14 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
601
601
|
}
|
|
602
602
|
};
|
|
603
603
|
case "error":
|
|
604
|
-
const
|
|
605
|
-
return
|
|
604
|
+
const n = t.error;
|
|
605
|
+
return nt(n) && n.revert && a(this, Ne) ? { ...a(this, Ne), fetchStatus: "idle" } : {
|
|
606
606
|
...r,
|
|
607
|
-
error:
|
|
607
|
+
error: n,
|
|
608
608
|
errorUpdateCount: r.errorUpdateCount + 1,
|
|
609
609
|
errorUpdatedAt: Date.now(),
|
|
610
610
|
fetchFailureCount: r.fetchFailureCount + 1,
|
|
611
|
-
fetchFailureReason:
|
|
611
|
+
fetchFailureReason: n,
|
|
612
612
|
fetchStatus: "idle",
|
|
613
613
|
status: "error"
|
|
614
614
|
};
|
|
@@ -627,21 +627,21 @@ var D = zs(), me, Wt, as = (Wt = class {
|
|
|
627
627
|
this.state = s(this.state), D.batch(() => {
|
|
628
628
|
this.observers.forEach((r) => {
|
|
629
629
|
r.onQueryUpdate();
|
|
630
|
-
}),
|
|
630
|
+
}), a(this, V).notify({ query: this, type: "updated", action: t });
|
|
631
631
|
});
|
|
632
|
-
},
|
|
633
|
-
function
|
|
632
|
+
}, zt);
|
|
633
|
+
function us(e, t) {
|
|
634
634
|
return {
|
|
635
635
|
fetchFailureCount: 0,
|
|
636
636
|
fetchFailureReason: null,
|
|
637
|
-
fetchStatus:
|
|
637
|
+
fetchStatus: as(t.networkMode) ? "fetching" : "paused",
|
|
638
638
|
...e === void 0 && {
|
|
639
639
|
error: null,
|
|
640
640
|
status: "pending"
|
|
641
641
|
}
|
|
642
642
|
};
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function er(e) {
|
|
645
645
|
const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
|
|
646
646
|
return {
|
|
647
647
|
data: t,
|
|
@@ -658,33 +658,33 @@ function Xs(e) {
|
|
|
658
658
|
fetchStatus: "idle"
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
|
-
var X,
|
|
661
|
+
var X, Yt, tr = (Yt = class extends He {
|
|
662
662
|
constructor(t = {}) {
|
|
663
663
|
super();
|
|
664
664
|
y(this, X);
|
|
665
665
|
this.config = t, p(this, X, /* @__PURE__ */ new Map());
|
|
666
666
|
}
|
|
667
667
|
build(t, s, r) {
|
|
668
|
-
const
|
|
668
|
+
const n = s.queryKey, l = s.queryHash ?? wt(n, s);
|
|
669
669
|
let o = this.get(l);
|
|
670
|
-
return o || (o = new
|
|
670
|
+
return o || (o = new Bs({
|
|
671
671
|
cache: this,
|
|
672
|
-
queryKey:
|
|
672
|
+
queryKey: n,
|
|
673
673
|
queryHash: l,
|
|
674
674
|
options: t.defaultQueryOptions(s),
|
|
675
675
|
state: r,
|
|
676
|
-
defaultOptions: t.getQueryDefaults(
|
|
676
|
+
defaultOptions: t.getQueryDefaults(n)
|
|
677
677
|
}), this.add(o)), o;
|
|
678
678
|
}
|
|
679
679
|
add(t) {
|
|
680
|
-
|
|
680
|
+
a(this, X).has(t.queryHash) || (a(this, X).set(t.queryHash, t), this.notify({
|
|
681
681
|
type: "added",
|
|
682
682
|
query: t
|
|
683
683
|
}));
|
|
684
684
|
}
|
|
685
685
|
remove(t) {
|
|
686
|
-
const s =
|
|
687
|
-
s && (t.destroy(), s === t &&
|
|
686
|
+
const s = a(this, X).get(t.queryHash);
|
|
687
|
+
s && (t.destroy(), s === t && a(this, X).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
688
688
|
}
|
|
689
689
|
clear() {
|
|
690
690
|
D.batch(() => {
|
|
@@ -694,20 +694,20 @@ var X, $t, Is = ($t = class extends He {
|
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
696
|
get(t) {
|
|
697
|
-
return
|
|
697
|
+
return a(this, X).get(t);
|
|
698
698
|
}
|
|
699
699
|
getAll() {
|
|
700
|
-
return [...
|
|
700
|
+
return [...a(this, X).values()];
|
|
701
701
|
}
|
|
702
702
|
find(t) {
|
|
703
703
|
const s = { exact: !0, ...t };
|
|
704
704
|
return this.getAll().find(
|
|
705
|
-
(r) =>
|
|
705
|
+
(r) => Nt(s, r)
|
|
706
706
|
);
|
|
707
707
|
}
|
|
708
708
|
findAll(t = {}) {
|
|
709
709
|
const s = this.getAll();
|
|
710
|
-
return Object.keys(t).length > 0 ? s.filter((r) =>
|
|
710
|
+
return Object.keys(t).length > 0 ? s.filter((r) => Nt(t, r)) : s;
|
|
711
711
|
}
|
|
712
712
|
notify(t) {
|
|
713
713
|
D.batch(() => {
|
|
@@ -730,14 +730,14 @@ var X, $t, Is = ($t = class extends He {
|
|
|
730
730
|
});
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
|
-
}, X = new WeakMap(),
|
|
733
|
+
}, X = new WeakMap(), Yt), I, U, ge, B, ne, Jt, sr = (Jt = class extends cs {
|
|
734
734
|
constructor(t) {
|
|
735
735
|
super();
|
|
736
736
|
y(this, B);
|
|
737
737
|
y(this, I);
|
|
738
738
|
y(this, U);
|
|
739
739
|
y(this, ge);
|
|
740
|
-
this.mutationId = t.mutationId, p(this, U, t.mutationCache), p(this, I, []), this.state = t.state ||
|
|
740
|
+
this.mutationId = t.mutationId, p(this, U, t.mutationCache), p(this, I, []), this.state = t.state || hs(), this.setOptions(t.options), this.scheduleGc();
|
|
741
741
|
}
|
|
742
742
|
setOptions(t) {
|
|
743
743
|
this.options = t, this.updateGcTime(this.options.gcTime);
|
|
@@ -746,33 +746,33 @@ var X, $t, Is = ($t = class extends He {
|
|
|
746
746
|
return this.options.meta;
|
|
747
747
|
}
|
|
748
748
|
addObserver(t) {
|
|
749
|
-
|
|
749
|
+
a(this, I).includes(t) || (a(this, I).push(t), this.clearGcTimeout(), a(this, U).notify({
|
|
750
750
|
type: "observerAdded",
|
|
751
751
|
mutation: this,
|
|
752
752
|
observer: t
|
|
753
753
|
}));
|
|
754
754
|
}
|
|
755
755
|
removeObserver(t) {
|
|
756
|
-
p(this, I,
|
|
756
|
+
p(this, I, a(this, I).filter((s) => s !== t)), this.scheduleGc(), a(this, U).notify({
|
|
757
757
|
type: "observerRemoved",
|
|
758
758
|
mutation: this,
|
|
759
759
|
observer: t
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
762
|
optionalRemove() {
|
|
763
|
-
|
|
763
|
+
a(this, I).length || (this.state.status === "pending" ? this.scheduleGc() : a(this, U).remove(this));
|
|
764
764
|
}
|
|
765
765
|
continue() {
|
|
766
766
|
var t;
|
|
767
|
-
return ((t =
|
|
767
|
+
return ((t = a(this, ge)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
768
768
|
this.execute(this.state.variables);
|
|
769
769
|
}
|
|
770
770
|
async execute(t) {
|
|
771
|
-
var
|
|
772
|
-
p(this, ge,
|
|
771
|
+
var n, l, o, c, d, m, h, u, v, g, S, _, P, C, j, b, M, F, J, te;
|
|
772
|
+
p(this, ge, ls({
|
|
773
773
|
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
774
|
-
onFail: (
|
|
775
|
-
w(this, B, ne).call(this, { type: "failed", failureCount:
|
|
774
|
+
onFail: (k, Z) => {
|
|
775
|
+
w(this, B, ne).call(this, { type: "failed", failureCount: k, error: Z });
|
|
776
776
|
},
|
|
777
777
|
onPause: () => {
|
|
778
778
|
w(this, B, ne).call(this, { type: "pause" });
|
|
@@ -783,13 +783,13 @@ var X, $t, Is = ($t = class extends He {
|
|
|
783
783
|
retry: this.options.retry ?? 0,
|
|
784
784
|
retryDelay: this.options.retryDelay,
|
|
785
785
|
networkMode: this.options.networkMode,
|
|
786
|
-
canRun: () =>
|
|
786
|
+
canRun: () => a(this, U).canRun(this)
|
|
787
787
|
}));
|
|
788
|
-
const s = this.state.status === "pending", r = !
|
|
788
|
+
const s = this.state.status === "pending", r = !a(this, ge).canStart();
|
|
789
789
|
try {
|
|
790
790
|
if (!s) {
|
|
791
|
-
w(this, B, ne).call(this, { type: "pending", variables: t, isPaused: r }), await ((l = (
|
|
792
|
-
|
|
791
|
+
w(this, B, ne).call(this, { type: "pending", variables: t, isPaused: r }), await ((l = (n = a(this, U).config).onMutate) == null ? void 0 : l.call(
|
|
792
|
+
n,
|
|
793
793
|
t,
|
|
794
794
|
this
|
|
795
795
|
));
|
|
@@ -801,53 +801,53 @@ var X, $t, Is = ($t = class extends He {
|
|
|
801
801
|
isPaused: r
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
|
-
const
|
|
805
|
-
return await ((m = (
|
|
806
|
-
|
|
807
|
-
|
|
804
|
+
const k = await a(this, ge).start();
|
|
805
|
+
return await ((m = (d = a(this, U).config).onSuccess) == null ? void 0 : m.call(
|
|
806
|
+
d,
|
|
807
|
+
k,
|
|
808
808
|
t,
|
|
809
809
|
this.state.context,
|
|
810
810
|
this
|
|
811
|
-
)), await ((u = (h = this.options).onSuccess) == null ? void 0 : u.call(h,
|
|
811
|
+
)), await ((u = (h = this.options).onSuccess) == null ? void 0 : u.call(h, k, t, this.state.context)), await ((g = (v = a(this, U).config).onSettled) == null ? void 0 : g.call(
|
|
812
812
|
v,
|
|
813
|
-
|
|
813
|
+
k,
|
|
814
814
|
null,
|
|
815
815
|
this.state.variables,
|
|
816
816
|
this.state.context,
|
|
817
817
|
this
|
|
818
|
-
)), await ((_ = (S = this.options).onSettled) == null ? void 0 : _.call(S,
|
|
819
|
-
} catch (
|
|
818
|
+
)), await ((_ = (S = this.options).onSettled) == null ? void 0 : _.call(S, k, null, t, this.state.context)), w(this, B, ne).call(this, { type: "success", data: k }), k;
|
|
819
|
+
} catch (k) {
|
|
820
820
|
try {
|
|
821
|
-
throw await ((C = (P =
|
|
821
|
+
throw await ((C = (P = a(this, U).config).onError) == null ? void 0 : C.call(
|
|
822
822
|
P,
|
|
823
|
-
|
|
823
|
+
k,
|
|
824
824
|
t,
|
|
825
825
|
this.state.context,
|
|
826
826
|
this
|
|
827
827
|
)), await ((b = (j = this.options).onError) == null ? void 0 : b.call(
|
|
828
828
|
j,
|
|
829
|
-
|
|
829
|
+
k,
|
|
830
830
|
t,
|
|
831
831
|
this.state.context
|
|
832
|
-
)), await ((F = (M =
|
|
832
|
+
)), await ((F = (M = a(this, U).config).onSettled) == null ? void 0 : F.call(
|
|
833
833
|
M,
|
|
834
834
|
void 0,
|
|
835
|
-
|
|
835
|
+
k,
|
|
836
836
|
this.state.variables,
|
|
837
837
|
this.state.context,
|
|
838
838
|
this
|
|
839
839
|
)), await ((te = (J = this.options).onSettled) == null ? void 0 : te.call(
|
|
840
840
|
J,
|
|
841
841
|
void 0,
|
|
842
|
-
|
|
842
|
+
k,
|
|
843
843
|
t,
|
|
844
844
|
this.state.context
|
|
845
|
-
)),
|
|
845
|
+
)), k;
|
|
846
846
|
} finally {
|
|
847
|
-
w(this, B, ne).call(this, { type: "error", error:
|
|
847
|
+
w(this, B, ne).call(this, { type: "error", error: k });
|
|
848
848
|
}
|
|
849
849
|
} finally {
|
|
850
|
-
|
|
850
|
+
a(this, U).runNext(this);
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
853
|
}, I = new WeakMap(), U = new WeakMap(), ge = new WeakMap(), B = new WeakSet(), ne = function(t) {
|
|
@@ -905,16 +905,16 @@ var X, $t, Is = ($t = class extends He {
|
|
|
905
905
|
}
|
|
906
906
|
};
|
|
907
907
|
this.state = s(this.state), D.batch(() => {
|
|
908
|
-
|
|
908
|
+
a(this, I).forEach((r) => {
|
|
909
909
|
r.onMutationUpdate(t);
|
|
910
|
-
}),
|
|
910
|
+
}), a(this, U).notify({
|
|
911
911
|
mutation: this,
|
|
912
912
|
type: "updated",
|
|
913
913
|
action: t
|
|
914
914
|
});
|
|
915
915
|
});
|
|
916
|
-
},
|
|
917
|
-
function
|
|
916
|
+
}, Jt);
|
|
917
|
+
function hs() {
|
|
918
918
|
return {
|
|
919
919
|
context: void 0,
|
|
920
920
|
data: void 0,
|
|
@@ -927,7 +927,7 @@ function ls() {
|
|
|
927
927
|
submittedAt: 0
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
|
-
var q, We,
|
|
930
|
+
var q, We, Xt, rr = (Xt = class extends He {
|
|
931
931
|
constructor(t = {}) {
|
|
932
932
|
super();
|
|
933
933
|
y(this, q);
|
|
@@ -935,35 +935,35 @@ var q, We, Yt, er = (Yt = class extends He {
|
|
|
935
935
|
this.config = t, p(this, q, /* @__PURE__ */ new Map()), p(this, We, Date.now());
|
|
936
936
|
}
|
|
937
937
|
build(t, s, r) {
|
|
938
|
-
const
|
|
938
|
+
const n = new sr({
|
|
939
939
|
mutationCache: this,
|
|
940
|
-
mutationId: ++
|
|
940
|
+
mutationId: ++Ye(this, We)._,
|
|
941
941
|
options: t.defaultMutationOptions(s),
|
|
942
942
|
state: r
|
|
943
943
|
});
|
|
944
|
-
return this.add(
|
|
944
|
+
return this.add(n), n;
|
|
945
945
|
}
|
|
946
946
|
add(t) {
|
|
947
|
-
const s = Je(t), r =
|
|
948
|
-
r.push(t),
|
|
947
|
+
const s = Je(t), r = a(this, q).get(s) ?? [];
|
|
948
|
+
r.push(t), a(this, q).set(s, r), this.notify({ type: "added", mutation: t });
|
|
949
949
|
}
|
|
950
950
|
remove(t) {
|
|
951
951
|
var r;
|
|
952
952
|
const s = Je(t);
|
|
953
|
-
if (
|
|
954
|
-
const
|
|
955
|
-
|
|
953
|
+
if (a(this, q).has(s)) {
|
|
954
|
+
const n = (r = a(this, q).get(s)) == null ? void 0 : r.filter((l) => l !== t);
|
|
955
|
+
n && (n.length === 0 ? a(this, q).delete(s) : a(this, q).set(s, n));
|
|
956
956
|
}
|
|
957
957
|
this.notify({ type: "removed", mutation: t });
|
|
958
958
|
}
|
|
959
959
|
canRun(t) {
|
|
960
960
|
var r;
|
|
961
|
-
const s = (r =
|
|
961
|
+
const s = (r = a(this, q).get(Je(t))) == null ? void 0 : r.find((n) => n.state.status === "pending");
|
|
962
962
|
return !s || s === t;
|
|
963
963
|
}
|
|
964
964
|
runNext(t) {
|
|
965
965
|
var r;
|
|
966
|
-
const s = (r =
|
|
966
|
+
const s = (r = a(this, q).get(Je(t))) == null ? void 0 : r.find((n) => n !== t && n.state.isPaused);
|
|
967
967
|
return (s == null ? void 0 : s.continue()) ?? Promise.resolve();
|
|
968
968
|
}
|
|
969
969
|
clear() {
|
|
@@ -974,16 +974,16 @@ var q, We, Yt, er = (Yt = class extends He {
|
|
|
974
974
|
});
|
|
975
975
|
}
|
|
976
976
|
getAll() {
|
|
977
|
-
return [...
|
|
977
|
+
return [...a(this, q).values()].flat();
|
|
978
978
|
}
|
|
979
979
|
find(t) {
|
|
980
980
|
const s = { exact: !0, ...t };
|
|
981
981
|
return this.getAll().find(
|
|
982
|
-
(r) =>
|
|
982
|
+
(r) => Mt(s, r)
|
|
983
983
|
);
|
|
984
984
|
}
|
|
985
985
|
findAll(t = {}) {
|
|
986
|
-
return this.getAll().filter((s) =>
|
|
986
|
+
return this.getAll().filter((s) => Mt(t, s));
|
|
987
987
|
}
|
|
988
988
|
notify(t) {
|
|
989
989
|
D.batch(() => {
|
|
@@ -1000,17 +1000,17 @@ var q, We, Yt, er = (Yt = class extends He {
|
|
|
1000
1000
|
)
|
|
1001
1001
|
);
|
|
1002
1002
|
}
|
|
1003
|
-
}, q = new WeakMap(), We = new WeakMap(),
|
|
1003
|
+
}, q = new WeakMap(), We = new WeakMap(), Xt);
|
|
1004
1004
|
function Je(e) {
|
|
1005
1005
|
var t;
|
|
1006
1006
|
return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function Lt(e) {
|
|
1009
1009
|
return {
|
|
1010
1010
|
onFetch: (t, s) => {
|
|
1011
1011
|
var h, u, v, g, S;
|
|
1012
|
-
const r = t.options,
|
|
1013
|
-
let c = { pages: [], pageParams: [] },
|
|
1012
|
+
const r = t.options, n = (v = (u = (h = t.fetchOptions) == null ? void 0 : h.meta) == null ? void 0 : u.fetchMore) == null ? void 0 : v.direction, l = ((g = t.state.data) == null ? void 0 : g.pages) || [], o = ((S = t.state.data) == null ? void 0 : S.pageParams) || [];
|
|
1013
|
+
let c = { pages: [], pageParams: [] }, d = 0;
|
|
1014
1014
|
const m = async () => {
|
|
1015
1015
|
let _ = !1;
|
|
1016
1016
|
const P = (b) => {
|
|
@@ -1020,7 +1020,7 @@ function Ot(e) {
|
|
|
1020
1020
|
_ = !0;
|
|
1021
1021
|
}), t.signal)
|
|
1022
1022
|
});
|
|
1023
|
-
}, C =
|
|
1023
|
+
}, C = ns(t.options, t.fetchOptions), j = async (b, M, F) => {
|
|
1024
1024
|
if (_)
|
|
1025
1025
|
return Promise.reject();
|
|
1026
1026
|
if (M == null && b.pages.length)
|
|
@@ -1034,14 +1034,14 @@ function Ot(e) {
|
|
|
1034
1034
|
P(J);
|
|
1035
1035
|
const te = await C(
|
|
1036
1036
|
J
|
|
1037
|
-
), { maxPages:
|
|
1037
|
+
), { maxPages: k } = t.options, Z = F ? zs : Zs;
|
|
1038
1038
|
return {
|
|
1039
|
-
pages: Z(b.pages, te,
|
|
1040
|
-
pageParams: Z(b.pageParams, M,
|
|
1039
|
+
pages: Z(b.pages, te, k),
|
|
1040
|
+
pageParams: Z(b.pageParams, M, k)
|
|
1041
1041
|
};
|
|
1042
1042
|
};
|
|
1043
|
-
if (
|
|
1044
|
-
const b =
|
|
1043
|
+
if (n && l.length) {
|
|
1044
|
+
const b = n === "backward", M = b ? ir : Ft, F = {
|
|
1045
1045
|
pages: l,
|
|
1046
1046
|
pageParams: o
|
|
1047
1047
|
}, J = M(r, F);
|
|
@@ -1049,11 +1049,11 @@ function Ot(e) {
|
|
|
1049
1049
|
} else {
|
|
1050
1050
|
const b = e ?? l.length;
|
|
1051
1051
|
do {
|
|
1052
|
-
const M =
|
|
1053
|
-
if (
|
|
1052
|
+
const M = d === 0 ? o[0] ?? r.initialPageParam : Ft(r, c);
|
|
1053
|
+
if (d > 0 && M == null)
|
|
1054
1054
|
break;
|
|
1055
|
-
c = await j(c, M),
|
|
1056
|
-
} while (
|
|
1055
|
+
c = await j(c, M), d++;
|
|
1056
|
+
} while (d < b);
|
|
1057
1057
|
}
|
|
1058
1058
|
return c;
|
|
1059
1059
|
};
|
|
@@ -1073,7 +1073,7 @@ function Ot(e) {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1076
|
+
function Ft(e, { pages: t, pageParams: s }) {
|
|
1077
1077
|
const r = t.length - 1;
|
|
1078
1078
|
return t.length > 0 ? e.getNextPageParam(
|
|
1079
1079
|
t[r],
|
|
@@ -1082,69 +1082,69 @@ function Rt(e, { pages: t, pageParams: s }) {
|
|
|
1082
1082
|
s
|
|
1083
1083
|
) : void 0;
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function ir(e, { pages: t, pageParams: s }) {
|
|
1086
1086
|
var r;
|
|
1087
1087
|
return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, s[0], s) : void 0;
|
|
1088
1088
|
}
|
|
1089
|
-
var
|
|
1089
|
+
var O, le, ce, Me, Re, ue, Oe, Le, It, ds = (It = class {
|
|
1090
1090
|
constructor(e = {}) {
|
|
1091
|
-
y(this,
|
|
1091
|
+
y(this, O);
|
|
1092
1092
|
y(this, le);
|
|
1093
1093
|
y(this, ce);
|
|
1094
1094
|
y(this, Me);
|
|
1095
|
-
y(this, Oe);
|
|
1096
|
-
y(this, ue);
|
|
1097
1095
|
y(this, Re);
|
|
1096
|
+
y(this, ue);
|
|
1097
|
+
y(this, Oe);
|
|
1098
1098
|
y(this, Le);
|
|
1099
|
-
p(this,
|
|
1099
|
+
p(this, O, e.queryCache || new tr()), p(this, le, e.mutationCache || new rr()), p(this, ce, e.defaultOptions || {}), p(this, Me, /* @__PURE__ */ new Map()), p(this, Re, /* @__PURE__ */ new Map()), p(this, ue, 0);
|
|
1100
1100
|
}
|
|
1101
1101
|
mount() {
|
|
1102
|
-
|
|
1103
|
-
e && (await this.resumePausedMutations(),
|
|
1104
|
-
})), p(this, Le,
|
|
1105
|
-
e && (await this.resumePausedMutations(),
|
|
1102
|
+
Ye(this, ue)._++, a(this, ue) === 1 && (p(this, Oe, jt.subscribe(async (e) => {
|
|
1103
|
+
e && (await this.resumePausedMutations(), a(this, O).onFocus());
|
|
1104
|
+
})), p(this, Le, et.subscribe(async (e) => {
|
|
1105
|
+
e && (await this.resumePausedMutations(), a(this, O).onOnline());
|
|
1106
1106
|
})));
|
|
1107
1107
|
}
|
|
1108
1108
|
unmount() {
|
|
1109
1109
|
var e, t;
|
|
1110
|
-
|
|
1110
|
+
Ye(this, ue)._--, a(this, ue) === 0 && ((e = a(this, Oe)) == null || e.call(this), p(this, Oe, void 0), (t = a(this, Le)) == null || t.call(this), p(this, Le, void 0));
|
|
1111
1111
|
}
|
|
1112
1112
|
isFetching(e) {
|
|
1113
|
-
return
|
|
1113
|
+
return a(this, O).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
1114
1114
|
}
|
|
1115
1115
|
isMutating(e) {
|
|
1116
|
-
return
|
|
1116
|
+
return a(this, le).findAll({ ...e, status: "pending" }).length;
|
|
1117
1117
|
}
|
|
1118
1118
|
getQueryData(e) {
|
|
1119
1119
|
var s;
|
|
1120
1120
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
1121
|
-
return (s =
|
|
1121
|
+
return (s = a(this, O).get(t.queryHash)) == null ? void 0 : s.state.data;
|
|
1122
1122
|
}
|
|
1123
1123
|
ensureQueryData(e) {
|
|
1124
1124
|
const t = this.getQueryData(e.queryKey);
|
|
1125
1125
|
if (t === void 0)
|
|
1126
1126
|
return this.fetchQuery(e);
|
|
1127
1127
|
{
|
|
1128
|
-
const s = this.defaultQueryOptions(e), r =
|
|
1128
|
+
const s = this.defaultQueryOptions(e), r = a(this, O).build(this, s);
|
|
1129
1129
|
return e.revalidateIfStale && r.isStaleByTime(Se(s.staleTime, r)) && this.prefetchQuery(s), Promise.resolve(t);
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
1132
|
getQueriesData(e) {
|
|
1133
|
-
return
|
|
1133
|
+
return a(this, O).findAll(e).map(({ queryKey: t, state: s }) => {
|
|
1134
1134
|
const r = s.data;
|
|
1135
1135
|
return [t, r];
|
|
1136
1136
|
});
|
|
1137
1137
|
}
|
|
1138
1138
|
setQueryData(e, t, s) {
|
|
1139
|
-
const r = this.defaultQueryOptions({ queryKey: e }),
|
|
1139
|
+
const r = this.defaultQueryOptions({ queryKey: e }), n = a(this, O).get(
|
|
1140
1140
|
r.queryHash
|
|
1141
|
-
), l =
|
|
1141
|
+
), l = n == null ? void 0 : n.state.data, o = Vs(t, l);
|
|
1142
1142
|
if (o !== void 0)
|
|
1143
|
-
return
|
|
1143
|
+
return a(this, O).build(this, r).setData(o, { ...s, manual: !0 });
|
|
1144
1144
|
}
|
|
1145
1145
|
setQueriesData(e, t, s) {
|
|
1146
1146
|
return D.batch(
|
|
1147
|
-
() =>
|
|
1147
|
+
() => a(this, O).findAll(e).map(({ queryKey: r }) => [
|
|
1148
1148
|
r,
|
|
1149
1149
|
this.setQueryData(r, t, s)
|
|
1150
1150
|
])
|
|
@@ -1153,10 +1153,10 @@ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
|
1153
1153
|
getQueryState(e) {
|
|
1154
1154
|
var s;
|
|
1155
1155
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
1156
|
-
return (s =
|
|
1156
|
+
return (s = a(this, O).get(t.queryHash)) == null ? void 0 : s.state;
|
|
1157
1157
|
}
|
|
1158
1158
|
removeQueries(e) {
|
|
1159
|
-
const t =
|
|
1159
|
+
const t = a(this, O);
|
|
1160
1160
|
D.batch(() => {
|
|
1161
1161
|
t.findAll(e).forEach((s) => {
|
|
1162
1162
|
t.remove(s);
|
|
@@ -1164,23 +1164,23 @@ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
|
1164
1164
|
});
|
|
1165
1165
|
}
|
|
1166
1166
|
resetQueries(e, t) {
|
|
1167
|
-
const s =
|
|
1167
|
+
const s = a(this, O), r = {
|
|
1168
1168
|
type: "active",
|
|
1169
1169
|
...e
|
|
1170
1170
|
};
|
|
1171
|
-
return D.batch(() => (s.findAll(e).forEach((
|
|
1172
|
-
|
|
1171
|
+
return D.batch(() => (s.findAll(e).forEach((n) => {
|
|
1172
|
+
n.reset();
|
|
1173
1173
|
}), this.refetchQueries(r, t)));
|
|
1174
1174
|
}
|
|
1175
1175
|
cancelQueries(e = {}, t = {}) {
|
|
1176
1176
|
const s = { revert: !0, ...t }, r = D.batch(
|
|
1177
|
-
() =>
|
|
1177
|
+
() => a(this, O).findAll(e).map((n) => n.cancel(s))
|
|
1178
1178
|
);
|
|
1179
1179
|
return Promise.all(r).then($).catch($);
|
|
1180
1180
|
}
|
|
1181
1181
|
invalidateQueries(e = {}, t = {}) {
|
|
1182
1182
|
return D.batch(() => {
|
|
1183
|
-
if (
|
|
1183
|
+
if (a(this, O).findAll(e).forEach((r) => {
|
|
1184
1184
|
r.invalidate();
|
|
1185
1185
|
}), e.refetchType === "none")
|
|
1186
1186
|
return Promise.resolve();
|
|
@@ -1196,9 +1196,9 @@ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
|
1196
1196
|
...t,
|
|
1197
1197
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
1198
1198
|
}, r = D.batch(
|
|
1199
|
-
() =>
|
|
1200
|
-
let l =
|
|
1201
|
-
return s.throwOnError || (l = l.catch($)),
|
|
1199
|
+
() => a(this, O).findAll(e).filter((n) => !n.isDisabled()).map((n) => {
|
|
1200
|
+
let l = n.fetch(void 0, s);
|
|
1201
|
+
return s.throwOnError || (l = l.catch($)), n.state.fetchStatus === "paused" ? Promise.resolve() : l;
|
|
1202
1202
|
})
|
|
1203
1203
|
);
|
|
1204
1204
|
return Promise.all(r).then($);
|
|
@@ -1206,7 +1206,7 @@ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
|
1206
1206
|
fetchQuery(e) {
|
|
1207
1207
|
const t = this.defaultQueryOptions(e);
|
|
1208
1208
|
t.retry === void 0 && (t.retry = !1);
|
|
1209
|
-
const s =
|
|
1209
|
+
const s = a(this, O).build(this, t);
|
|
1210
1210
|
return s.isStaleByTime(
|
|
1211
1211
|
Se(t.staleTime, s)
|
|
1212
1212
|
) ? s.fetch(t) : Promise.resolve(s.state.data);
|
|
@@ -1215,50 +1215,50 @@ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
|
1215
1215
|
return this.fetchQuery(e).then($).catch($);
|
|
1216
1216
|
}
|
|
1217
1217
|
fetchInfiniteQuery(e) {
|
|
1218
|
-
return e.behavior =
|
|
1218
|
+
return e.behavior = Lt(e.pages), this.fetchQuery(e);
|
|
1219
1219
|
}
|
|
1220
1220
|
prefetchInfiniteQuery(e) {
|
|
1221
1221
|
return this.fetchInfiniteQuery(e).then($).catch($);
|
|
1222
1222
|
}
|
|
1223
1223
|
ensureInfiniteQueryData(e) {
|
|
1224
|
-
return e.behavior =
|
|
1224
|
+
return e.behavior = Lt(e.pages), this.ensureQueryData(e);
|
|
1225
1225
|
}
|
|
1226
1226
|
resumePausedMutations() {
|
|
1227
|
-
return
|
|
1227
|
+
return et.isOnline() ? a(this, le).resumePausedMutations() : Promise.resolve();
|
|
1228
1228
|
}
|
|
1229
1229
|
getQueryCache() {
|
|
1230
|
-
return
|
|
1230
|
+
return a(this, O);
|
|
1231
1231
|
}
|
|
1232
1232
|
getMutationCache() {
|
|
1233
|
-
return
|
|
1233
|
+
return a(this, le);
|
|
1234
1234
|
}
|
|
1235
1235
|
getDefaultOptions() {
|
|
1236
|
-
return
|
|
1236
|
+
return a(this, ce);
|
|
1237
1237
|
}
|
|
1238
1238
|
setDefaultOptions(e) {
|
|
1239
1239
|
p(this, ce, e);
|
|
1240
1240
|
}
|
|
1241
1241
|
setQueryDefaults(e, t) {
|
|
1242
|
-
|
|
1242
|
+
a(this, Me).set(be(e), {
|
|
1243
1243
|
queryKey: e,
|
|
1244
1244
|
defaultOptions: t
|
|
1245
1245
|
});
|
|
1246
1246
|
}
|
|
1247
1247
|
getQueryDefaults(e) {
|
|
1248
|
-
const t = [...
|
|
1248
|
+
const t = [...a(this, Me).values()];
|
|
1249
1249
|
let s = {};
|
|
1250
1250
|
return t.forEach((r) => {
|
|
1251
1251
|
Ge(e, r.queryKey) && (s = { ...s, ...r.defaultOptions });
|
|
1252
1252
|
}), s;
|
|
1253
1253
|
}
|
|
1254
1254
|
setMutationDefaults(e, t) {
|
|
1255
|
-
|
|
1255
|
+
a(this, Re).set(be(e), {
|
|
1256
1256
|
mutationKey: e,
|
|
1257
1257
|
defaultOptions: t
|
|
1258
1258
|
});
|
|
1259
1259
|
}
|
|
1260
1260
|
getMutationDefaults(e) {
|
|
1261
|
-
const t = [...
|
|
1261
|
+
const t = [...a(this, Re).values()];
|
|
1262
1262
|
let s = {};
|
|
1263
1263
|
return t.forEach((r) => {
|
|
1264
1264
|
Ge(e, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
|
|
@@ -1268,28 +1268,28 @@ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
|
1268
1268
|
if (e._defaulted)
|
|
1269
1269
|
return e;
|
|
1270
1270
|
const t = {
|
|
1271
|
-
...
|
|
1271
|
+
...a(this, ce).queries,
|
|
1272
1272
|
...this.getQueryDefaults(e.queryKey),
|
|
1273
1273
|
...e,
|
|
1274
1274
|
_defaulted: !0
|
|
1275
1275
|
};
|
|
1276
|
-
return t.queryHash || (t.queryHash =
|
|
1276
|
+
return t.queryHash || (t.queryHash = wt(
|
|
1277
1277
|
t.queryKey,
|
|
1278
1278
|
t
|
|
1279
|
-
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn ===
|
|
1279
|
+
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === is && (t.enabled = !1), t;
|
|
1280
1280
|
}
|
|
1281
1281
|
defaultMutationOptions(e) {
|
|
1282
1282
|
return e != null && e._defaulted ? e : {
|
|
1283
|
-
...
|
|
1283
|
+
...a(this, ce).mutations,
|
|
1284
1284
|
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
|
|
1285
1285
|
...e,
|
|
1286
1286
|
_defaulted: !0
|
|
1287
1287
|
};
|
|
1288
1288
|
}
|
|
1289
1289
|
clear() {
|
|
1290
|
-
|
|
1290
|
+
a(this, O).clear(), a(this, le).clear();
|
|
1291
1291
|
}
|
|
1292
|
-
},
|
|
1292
|
+
}, O = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), Me = new WeakMap(), Re = new WeakMap(), ue = new WeakMap(), Oe = new WeakMap(), Le = new WeakMap(), It), H, E, Ve, Q, ye, Fe, ee, $e, De, Te, Ce, xe, he, Ue, N, Ke, ct, ut, ht, dt, ft, pt, mt, fs, Bt, nr = (Bt = class extends He {
|
|
1293
1293
|
constructor(t, s) {
|
|
1294
1294
|
super();
|
|
1295
1295
|
y(this, N);
|
|
@@ -1315,71 +1315,71 @@ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
|
1315
1315
|
this.refetch = this.refetch.bind(this);
|
|
1316
1316
|
}
|
|
1317
1317
|
onSubscribe() {
|
|
1318
|
-
this.listeners.size === 1 && (
|
|
1318
|
+
this.listeners.size === 1 && (a(this, E).addObserver(this), Dt(a(this, E), this.options) ? w(this, N, Ke).call(this) : this.updateResult(), w(this, N, dt).call(this));
|
|
1319
1319
|
}
|
|
1320
1320
|
onUnsubscribe() {
|
|
1321
1321
|
this.hasListeners() || this.destroy();
|
|
1322
1322
|
}
|
|
1323
1323
|
shouldFetchOnReconnect() {
|
|
1324
|
-
return
|
|
1325
|
-
|
|
1324
|
+
return vt(
|
|
1325
|
+
a(this, E),
|
|
1326
1326
|
this.options,
|
|
1327
1327
|
this.options.refetchOnReconnect
|
|
1328
1328
|
);
|
|
1329
1329
|
}
|
|
1330
1330
|
shouldFetchOnWindowFocus() {
|
|
1331
|
-
return
|
|
1332
|
-
|
|
1331
|
+
return vt(
|
|
1332
|
+
a(this, E),
|
|
1333
1333
|
this.options,
|
|
1334
1334
|
this.options.refetchOnWindowFocus
|
|
1335
1335
|
);
|
|
1336
1336
|
}
|
|
1337
1337
|
destroy() {
|
|
1338
|
-
this.listeners = /* @__PURE__ */ new Set(), w(this, N,
|
|
1338
|
+
this.listeners = /* @__PURE__ */ new Set(), w(this, N, ft).call(this), w(this, N, pt).call(this), a(this, E).removeObserver(this);
|
|
1339
1339
|
}
|
|
1340
1340
|
setOptions(t, s) {
|
|
1341
|
-
const r = this.options,
|
|
1342
|
-
if (this.options =
|
|
1341
|
+
const r = this.options, n = a(this, E);
|
|
1342
|
+
if (this.options = a(this, H).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Y(this.options.enabled, a(this, E)) != "boolean")
|
|
1343
1343
|
throw new Error(
|
|
1344
1344
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
1345
1345
|
);
|
|
1346
|
-
w(this, N,
|
|
1346
|
+
w(this, N, mt).call(this), a(this, E).setOptions(this.options), r._defaulted && !Be(this.options, r) && a(this, H).getQueryCache().notify({
|
|
1347
1347
|
type: "observerOptionsUpdated",
|
|
1348
|
-
query:
|
|
1348
|
+
query: a(this, E),
|
|
1349
1349
|
observer: this
|
|
1350
1350
|
});
|
|
1351
1351
|
const l = this.hasListeners();
|
|
1352
|
-
l &&
|
|
1353
|
-
|
|
1354
|
-
|
|
1352
|
+
l && Tt(
|
|
1353
|
+
a(this, E),
|
|
1354
|
+
n,
|
|
1355
1355
|
this.options,
|
|
1356
1356
|
r
|
|
1357
|
-
) && w(this, N, Ke).call(this), this.updateResult(s), l && (
|
|
1358
|
-
const o = w(this, N,
|
|
1359
|
-
l && (
|
|
1357
|
+
) && w(this, N, Ke).call(this), this.updateResult(s), l && (a(this, E) !== n || Y(this.options.enabled, a(this, E)) !== Y(r.enabled, a(this, E)) || Se(this.options.staleTime, a(this, E)) !== Se(r.staleTime, a(this, E))) && w(this, N, ct).call(this);
|
|
1358
|
+
const o = w(this, N, ut).call(this);
|
|
1359
|
+
l && (a(this, E) !== n || Y(this.options.enabled, a(this, E)) !== Y(r.enabled, a(this, E)) || o !== a(this, he)) && w(this, N, ht).call(this, o);
|
|
1360
1360
|
}
|
|
1361
1361
|
getOptimisticResult(t) {
|
|
1362
|
-
const s =
|
|
1363
|
-
return
|
|
1362
|
+
const s = a(this, H).getQueryCache().build(a(this, H), t), r = this.createResult(s, t);
|
|
1363
|
+
return or(this, r) && (p(this, Q, r), p(this, Fe, this.options), p(this, ye, a(this, E).state)), r;
|
|
1364
1364
|
}
|
|
1365
1365
|
getCurrentResult() {
|
|
1366
|
-
return
|
|
1366
|
+
return a(this, Q);
|
|
1367
1367
|
}
|
|
1368
1368
|
trackResult(t, s) {
|
|
1369
1369
|
const r = {};
|
|
1370
|
-
return Object.keys(t).forEach((
|
|
1371
|
-
Object.defineProperty(r,
|
|
1370
|
+
return Object.keys(t).forEach((n) => {
|
|
1371
|
+
Object.defineProperty(r, n, {
|
|
1372
1372
|
configurable: !1,
|
|
1373
1373
|
enumerable: !0,
|
|
1374
|
-
get: () => (this.trackProp(
|
|
1374
|
+
get: () => (this.trackProp(n), s == null || s(n), t[n])
|
|
1375
1375
|
});
|
|
1376
1376
|
}), r;
|
|
1377
1377
|
}
|
|
1378
1378
|
trackProp(t) {
|
|
1379
|
-
|
|
1379
|
+
a(this, Ue).add(t);
|
|
1380
1380
|
}
|
|
1381
1381
|
getCurrentQuery() {
|
|
1382
|
-
return
|
|
1382
|
+
return a(this, E);
|
|
1383
1383
|
}
|
|
1384
1384
|
refetch({ ...t } = {}) {
|
|
1385
1385
|
return this.fetch({
|
|
@@ -1387,58 +1387,58 @@ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
|
1387
1387
|
});
|
|
1388
1388
|
}
|
|
1389
1389
|
fetchOptimistic(t) {
|
|
1390
|
-
const s =
|
|
1390
|
+
const s = a(this, H).defaultQueryOptions(t), r = a(this, H).getQueryCache().build(a(this, H), s);
|
|
1391
1391
|
return r.isFetchingOptimistic = !0, r.fetch().then(() => this.createResult(r, s));
|
|
1392
1392
|
}
|
|
1393
1393
|
fetch(t) {
|
|
1394
1394
|
return w(this, N, Ke).call(this, {
|
|
1395
1395
|
...t,
|
|
1396
1396
|
cancelRefetch: t.cancelRefetch ?? !0
|
|
1397
|
-
}).then(() => (this.updateResult(),
|
|
1397
|
+
}).then(() => (this.updateResult(), a(this, Q)));
|
|
1398
1398
|
}
|
|
1399
1399
|
createResult(t, s) {
|
|
1400
1400
|
var te;
|
|
1401
|
-
const r =
|
|
1401
|
+
const r = a(this, E), n = this.options, l = a(this, Q), o = a(this, ye), c = a(this, Fe), m = t !== r ? t.state : a(this, Ve), { state: h } = t;
|
|
1402
1402
|
let u = { ...h }, v = !1, g;
|
|
1403
1403
|
if (s._optimisticResults) {
|
|
1404
|
-
const
|
|
1405
|
-
(Z ||
|
|
1404
|
+
const k = this.hasListeners(), Z = !k && Dt(t, s), Us = k && Tt(t, r, s, n);
|
|
1405
|
+
(Z || Us) && (u = {
|
|
1406
1406
|
...u,
|
|
1407
|
-
...
|
|
1407
|
+
...us(h.data, t.options)
|
|
1408
1408
|
}), s._optimisticResults === "isRestoring" && (u.fetchStatus = "idle");
|
|
1409
1409
|
}
|
|
1410
1410
|
let { error: S, errorUpdatedAt: _, status: P } = u;
|
|
1411
1411
|
if (s.select && u.data !== void 0)
|
|
1412
|
-
if (l && u.data === (o == null ? void 0 : o.data) && s.select ===
|
|
1413
|
-
g =
|
|
1412
|
+
if (l && u.data === (o == null ? void 0 : o.data) && s.select === a(this, $e))
|
|
1413
|
+
g = a(this, De);
|
|
1414
1414
|
else
|
|
1415
1415
|
try {
|
|
1416
|
-
p(this, $e, s.select), g = s.select(u.data), g =
|
|
1417
|
-
} catch (
|
|
1418
|
-
p(this, ee,
|
|
1416
|
+
p(this, $e, s.select), g = s.select(u.data), g = lt(l == null ? void 0 : l.data, g, s), p(this, De, g), p(this, ee, null);
|
|
1417
|
+
} catch (k) {
|
|
1418
|
+
p(this, ee, k);
|
|
1419
1419
|
}
|
|
1420
1420
|
else
|
|
1421
1421
|
g = u.data;
|
|
1422
1422
|
if (s.placeholderData !== void 0 && g === void 0 && P === "pending") {
|
|
1423
|
-
let
|
|
1423
|
+
let k;
|
|
1424
1424
|
if (l != null && l.isPlaceholderData && s.placeholderData === (c == null ? void 0 : c.placeholderData))
|
|
1425
|
-
|
|
1426
|
-
else if (
|
|
1427
|
-
(te =
|
|
1428
|
-
|
|
1429
|
-
) : s.placeholderData, s.select &&
|
|
1425
|
+
k = l.data;
|
|
1426
|
+
else if (k = typeof s.placeholderData == "function" ? s.placeholderData(
|
|
1427
|
+
(te = a(this, Te)) == null ? void 0 : te.state.data,
|
|
1428
|
+
a(this, Te)
|
|
1429
|
+
) : s.placeholderData, s.select && k !== void 0)
|
|
1430
1430
|
try {
|
|
1431
|
-
|
|
1431
|
+
k = s.select(k), p(this, ee, null);
|
|
1432
1432
|
} catch (Z) {
|
|
1433
1433
|
p(this, ee, Z);
|
|
1434
1434
|
}
|
|
1435
|
-
|
|
1435
|
+
k !== void 0 && (P = "success", g = lt(
|
|
1436
1436
|
l == null ? void 0 : l.data,
|
|
1437
|
-
|
|
1437
|
+
k,
|
|
1438
1438
|
s
|
|
1439
1439
|
), v = !0);
|
|
1440
1440
|
}
|
|
1441
|
-
|
|
1441
|
+
a(this, ee) && (S = a(this, ee), g = a(this, De), _ = Date.now(), P = "error");
|
|
1442
1442
|
const C = u.fetchStatus === "fetching", j = P === "pending", b = P === "error", M = j && C, F = g !== void 0;
|
|
1443
1443
|
return {
|
|
1444
1444
|
status: P,
|
|
@@ -1463,104 +1463,104 @@ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
|
|
|
1463
1463
|
isPaused: u.fetchStatus === "paused",
|
|
1464
1464
|
isPlaceholderData: v,
|
|
1465
1465
|
isRefetchError: b && F,
|
|
1466
|
-
isStale:
|
|
1466
|
+
isStale: _t(t, s),
|
|
1467
1467
|
refetch: this.refetch
|
|
1468
1468
|
};
|
|
1469
1469
|
}
|
|
1470
1470
|
updateResult(t) {
|
|
1471
|
-
const s =
|
|
1472
|
-
if (p(this, ye,
|
|
1471
|
+
const s = a(this, Q), r = this.createResult(a(this, E), this.options);
|
|
1472
|
+
if (p(this, ye, a(this, E).state), p(this, Fe, this.options), a(this, ye).data !== void 0 && p(this, Te, a(this, E)), Be(r, s))
|
|
1473
1473
|
return;
|
|
1474
1474
|
p(this, Q, r);
|
|
1475
|
-
const
|
|
1475
|
+
const n = {}, l = () => {
|
|
1476
1476
|
if (!s)
|
|
1477
1477
|
return !0;
|
|
1478
1478
|
const { notifyOnChangeProps: o } = this.options, c = typeof o == "function" ? o() : o;
|
|
1479
|
-
if (c === "all" || !c && !
|
|
1479
|
+
if (c === "all" || !c && !a(this, Ue).size)
|
|
1480
1480
|
return !0;
|
|
1481
|
-
const
|
|
1482
|
-
c ??
|
|
1481
|
+
const d = new Set(
|
|
1482
|
+
c ?? a(this, Ue)
|
|
1483
1483
|
);
|
|
1484
|
-
return this.options.throwOnError &&
|
|
1484
|
+
return this.options.throwOnError && d.add("error"), Object.keys(a(this, Q)).some((m) => {
|
|
1485
1485
|
const h = m;
|
|
1486
|
-
return
|
|
1486
|
+
return a(this, Q)[h] !== s[h] && d.has(h);
|
|
1487
1487
|
});
|
|
1488
1488
|
};
|
|
1489
|
-
(t == null ? void 0 : t.listeners) !== !1 && l() && (
|
|
1489
|
+
(t == null ? void 0 : t.listeners) !== !1 && l() && (n.listeners = !0), w(this, N, fs).call(this, { ...n, ...t });
|
|
1490
1490
|
}
|
|
1491
1491
|
onQueryUpdate() {
|
|
1492
|
-
this.updateResult(), this.hasListeners() && w(this, N,
|
|
1492
|
+
this.updateResult(), this.hasListeners() && w(this, N, dt).call(this);
|
|
1493
1493
|
}
|
|
1494
1494
|
}, H = new WeakMap(), E = new WeakMap(), Ve = new WeakMap(), Q = new WeakMap(), ye = new WeakMap(), Fe = new WeakMap(), ee = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), xe = new WeakMap(), he = new WeakMap(), Ue = new WeakMap(), N = new WeakSet(), Ke = function(t) {
|
|
1495
|
-
w(this, N,
|
|
1496
|
-
let s =
|
|
1495
|
+
w(this, N, mt).call(this);
|
|
1496
|
+
let s = a(this, E).fetch(
|
|
1497
1497
|
this.options,
|
|
1498
1498
|
t
|
|
1499
1499
|
);
|
|
1500
1500
|
return t != null && t.throwOnError || (s = s.catch($)), s;
|
|
1501
|
-
},
|
|
1502
|
-
w(this, N,
|
|
1501
|
+
}, ct = function() {
|
|
1502
|
+
w(this, N, ft).call(this);
|
|
1503
1503
|
const t = Se(
|
|
1504
1504
|
this.options.staleTime,
|
|
1505
|
-
|
|
1505
|
+
a(this, E)
|
|
1506
1506
|
);
|
|
1507
|
-
if (Qe ||
|
|
1507
|
+
if (Qe || a(this, Q).isStale || !at(t))
|
|
1508
1508
|
return;
|
|
1509
|
-
const r =
|
|
1509
|
+
const r = ss(a(this, Q).dataUpdatedAt, t) + 1;
|
|
1510
1510
|
p(this, Ce, setTimeout(() => {
|
|
1511
|
-
|
|
1511
|
+
a(this, Q).isStale || this.updateResult();
|
|
1512
1512
|
}, r));
|
|
1513
|
-
},
|
|
1514
|
-
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(
|
|
1515
|
-
},
|
|
1516
|
-
w(this, N,
|
|
1517
|
-
(this.options.refetchIntervalInBackground ||
|
|
1518
|
-
},
|
|
1519
|
-
}, ht = function() {
|
|
1520
|
-
w(this, N, lt).call(this), w(this, N, ut).call(this, w(this, N, ct).call(this));
|
|
1513
|
+
}, ut = function() {
|
|
1514
|
+
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(a(this, E)) : this.options.refetchInterval) ?? !1;
|
|
1515
|
+
}, ht = function(t) {
|
|
1516
|
+
w(this, N, pt).call(this), p(this, he, t), !(Qe || Y(this.options.enabled, a(this, E)) === !1 || !at(a(this, he)) || a(this, he) === 0) && p(this, xe, setInterval(() => {
|
|
1517
|
+
(this.options.refetchIntervalInBackground || jt.isFocused()) && w(this, N, Ke).call(this);
|
|
1518
|
+
}, a(this, he)));
|
|
1521
1519
|
}, dt = function() {
|
|
1522
|
-
|
|
1520
|
+
w(this, N, ct).call(this), w(this, N, ht).call(this, w(this, N, ut).call(this));
|
|
1523
1521
|
}, ft = function() {
|
|
1524
|
-
|
|
1522
|
+
a(this, Ce) && (clearTimeout(a(this, Ce)), p(this, Ce, void 0));
|
|
1525
1523
|
}, pt = function() {
|
|
1526
|
-
|
|
1527
|
-
|
|
1524
|
+
a(this, xe) && (clearInterval(a(this, xe)), p(this, xe, void 0));
|
|
1525
|
+
}, mt = function() {
|
|
1526
|
+
const t = a(this, H).getQueryCache().build(a(this, H), this.options);
|
|
1527
|
+
if (t === a(this, E))
|
|
1528
1528
|
return;
|
|
1529
|
-
const s =
|
|
1529
|
+
const s = a(this, E);
|
|
1530
1530
|
p(this, E, t), p(this, Ve, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
|
|
1531
|
-
},
|
|
1531
|
+
}, fs = function(t) {
|
|
1532
1532
|
D.batch(() => {
|
|
1533
1533
|
t.listeners && this.listeners.forEach((s) => {
|
|
1534
|
-
s(
|
|
1535
|
-
}),
|
|
1536
|
-
query:
|
|
1534
|
+
s(a(this, Q));
|
|
1535
|
+
}), a(this, H).getQueryCache().notify({
|
|
1536
|
+
query: a(this, E),
|
|
1537
1537
|
type: "observerResultsUpdated"
|
|
1538
1538
|
});
|
|
1539
1539
|
});
|
|
1540
|
-
},
|
|
1541
|
-
function
|
|
1542
|
-
return
|
|
1540
|
+
}, Bt);
|
|
1541
|
+
function ar(e, t) {
|
|
1542
|
+
return Y(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1545
|
-
return
|
|
1544
|
+
function Dt(e, t) {
|
|
1545
|
+
return ar(e, t) || e.state.data !== void 0 && vt(e, t, t.refetchOnMount);
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1548
|
-
if (
|
|
1547
|
+
function vt(e, t, s) {
|
|
1548
|
+
if (Y(t.enabled, e) !== !1) {
|
|
1549
1549
|
const r = typeof s == "function" ? s(e) : s;
|
|
1550
|
-
return r === "always" || r !== !1 &&
|
|
1550
|
+
return r === "always" || r !== !1 && _t(e, t);
|
|
1551
1551
|
}
|
|
1552
1552
|
return !1;
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1555
|
-
return (e !== t ||
|
|
1554
|
+
function Tt(e, t, s, r) {
|
|
1555
|
+
return (e !== t || Y(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && _t(e, s);
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1558
|
-
return
|
|
1557
|
+
function _t(e, t) {
|
|
1558
|
+
return Y(t.enabled, e) !== !1 && e.isStaleByTime(Se(t.staleTime, e));
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1561
|
-
return !
|
|
1560
|
+
function or(e, t) {
|
|
1561
|
+
return !Be(e.getCurrentResult(), t);
|
|
1562
1562
|
}
|
|
1563
|
-
var de, fe, K, re, ie,
|
|
1563
|
+
var de, fe, K, re, ie, Ie, gt, es, lr = (es = class extends He {
|
|
1564
1564
|
constructor(t, s) {
|
|
1565
1565
|
super();
|
|
1566
1566
|
y(this, ie);
|
|
@@ -1568,7 +1568,7 @@ var de, fe, K, re, ie, Xe, vt, Xt, nr = (Xt = class extends He {
|
|
|
1568
1568
|
y(this, fe);
|
|
1569
1569
|
y(this, K);
|
|
1570
1570
|
y(this, re);
|
|
1571
|
-
p(this, de, t), this.setOptions(s), this.bindMethods(), w(this, ie,
|
|
1571
|
+
p(this, de, t), this.setOptions(s), this.bindMethods(), w(this, ie, Ie).call(this);
|
|
1572
1572
|
}
|
|
1573
1573
|
bindMethods() {
|
|
1574
1574
|
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
@@ -1576,33 +1576,33 @@ var de, fe, K, re, ie, Xe, vt, Xt, nr = (Xt = class extends He {
|
|
|
1576
1576
|
setOptions(t) {
|
|
1577
1577
|
var r;
|
|
1578
1578
|
const s = this.options;
|
|
1579
|
-
this.options =
|
|
1579
|
+
this.options = a(this, de).defaultMutationOptions(t), Be(this.options, s) || a(this, de).getMutationCache().notify({
|
|
1580
1580
|
type: "observerOptionsUpdated",
|
|
1581
|
-
mutation:
|
|
1581
|
+
mutation: a(this, K),
|
|
1582
1582
|
observer: this
|
|
1583
|
-
}), s != null && s.mutationKey && this.options.mutationKey && be(s.mutationKey) !== be(this.options.mutationKey) ? this.reset() : ((r =
|
|
1583
|
+
}), s != null && s.mutationKey && this.options.mutationKey && be(s.mutationKey) !== be(this.options.mutationKey) ? this.reset() : ((r = a(this, K)) == null ? void 0 : r.state.status) === "pending" && a(this, K).setOptions(this.options);
|
|
1584
1584
|
}
|
|
1585
1585
|
onUnsubscribe() {
|
|
1586
1586
|
var t;
|
|
1587
|
-
this.hasListeners() || (t =
|
|
1587
|
+
this.hasListeners() || (t = a(this, K)) == null || t.removeObserver(this);
|
|
1588
1588
|
}
|
|
1589
1589
|
onMutationUpdate(t) {
|
|
1590
|
-
w(this, ie,
|
|
1590
|
+
w(this, ie, Ie).call(this), w(this, ie, gt).call(this, t);
|
|
1591
1591
|
}
|
|
1592
1592
|
getCurrentResult() {
|
|
1593
|
-
return
|
|
1593
|
+
return a(this, fe);
|
|
1594
1594
|
}
|
|
1595
1595
|
reset() {
|
|
1596
1596
|
var t;
|
|
1597
|
-
(t =
|
|
1597
|
+
(t = a(this, K)) == null || t.removeObserver(this), p(this, K, void 0), w(this, ie, Ie).call(this), w(this, ie, gt).call(this);
|
|
1598
1598
|
}
|
|
1599
1599
|
mutate(t, s) {
|
|
1600
1600
|
var r;
|
|
1601
|
-
return p(this, re, s), (r =
|
|
1601
|
+
return p(this, re, s), (r = a(this, K)) == null || r.removeObserver(this), p(this, K, a(this, de).getMutationCache().build(a(this, de), this.options)), a(this, K).addObserver(this), a(this, K).execute(t);
|
|
1602
1602
|
}
|
|
1603
|
-
}, de = new WeakMap(), fe = new WeakMap(), K = new WeakMap(), re = new WeakMap(), ie = new WeakSet(),
|
|
1603
|
+
}, de = new WeakMap(), fe = new WeakMap(), K = new WeakMap(), re = new WeakMap(), ie = new WeakSet(), Ie = function() {
|
|
1604
1604
|
var s;
|
|
1605
|
-
const t = ((s =
|
|
1605
|
+
const t = ((s = a(this, K)) == null ? void 0 : s.state) ?? hs();
|
|
1606
1606
|
p(this, fe, {
|
|
1607
1607
|
...t,
|
|
1608
1608
|
isPending: t.status === "pending",
|
|
@@ -1612,13 +1612,13 @@ var de, fe, K, re, ie, Xe, vt, Xt, nr = (Xt = class extends He {
|
|
|
1612
1612
|
mutate: this.mutate,
|
|
1613
1613
|
reset: this.reset
|
|
1614
1614
|
});
|
|
1615
|
-
},
|
|
1615
|
+
}, gt = function(t) {
|
|
1616
1616
|
D.batch(() => {
|
|
1617
|
-
var s, r,
|
|
1618
|
-
if (
|
|
1619
|
-
const h =
|
|
1620
|
-
(t == null ? void 0 : t.type) === "success" ? ((r = (s =
|
|
1621
|
-
|
|
1617
|
+
var s, r, n, l, o, c, d, m;
|
|
1618
|
+
if (a(this, re) && this.hasListeners()) {
|
|
1619
|
+
const h = a(this, fe).variables, u = a(this, fe).context;
|
|
1620
|
+
(t == null ? void 0 : t.type) === "success" ? ((r = (s = a(this, re)).onSuccess) == null || r.call(s, t.data, h, u), (l = (n = a(this, re)).onSettled) == null || l.call(n, t.data, null, h, u)) : (t == null ? void 0 : t.type) === "error" && ((c = (o = a(this, re)).onError) == null || c.call(o, t.error, h, u), (m = (d = a(this, re)).onSettled) == null || m.call(
|
|
1621
|
+
d,
|
|
1622
1622
|
void 0,
|
|
1623
1623
|
t.error,
|
|
1624
1624
|
h,
|
|
@@ -1626,24 +1626,24 @@ var de, fe, K, re, ie, Xe, vt, Xt, nr = (Xt = class extends He {
|
|
|
1626
1626
|
));
|
|
1627
1627
|
}
|
|
1628
1628
|
this.listeners.forEach((h) => {
|
|
1629
|
-
h(
|
|
1629
|
+
h(a(this, fe));
|
|
1630
1630
|
});
|
|
1631
1631
|
});
|
|
1632
|
-
},
|
|
1632
|
+
}, es), ps = f.createContext(
|
|
1633
1633
|
void 0
|
|
1634
|
-
),
|
|
1635
|
-
const t =
|
|
1634
|
+
), St = (e) => {
|
|
1635
|
+
const t = f.useContext(ps);
|
|
1636
1636
|
if (!t)
|
|
1637
1637
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1638
1638
|
return t;
|
|
1639
|
-
},
|
|
1639
|
+
}, cr = ({
|
|
1640
1640
|
client: e,
|
|
1641
1641
|
children: t
|
|
1642
|
-
}) => (
|
|
1642
|
+
}) => (f.useEffect(() => (e.mount(), () => {
|
|
1643
1643
|
e.unmount();
|
|
1644
|
-
}), [e]), /* @__PURE__ */ i.jsx(
|
|
1645
|
-
|
|
1646
|
-
function
|
|
1644
|
+
}), [e]), /* @__PURE__ */ i.jsx(ps.Provider, { value: e, children: t })), ms = f.createContext(!1), ur = () => f.useContext(ms);
|
|
1645
|
+
ms.Provider;
|
|
1646
|
+
function hr() {
|
|
1647
1647
|
let e = !1;
|
|
1648
1648
|
return {
|
|
1649
1649
|
clearReset: () => {
|
|
@@ -1655,175 +1655,175 @@ function lr() {
|
|
|
1655
1655
|
isReset: () => e
|
|
1656
1656
|
};
|
|
1657
1657
|
}
|
|
1658
|
-
var
|
|
1659
|
-
function
|
|
1658
|
+
var dr = f.createContext(hr()), fr = () => f.useContext(dr);
|
|
1659
|
+
function vs(e, t) {
|
|
1660
1660
|
return typeof e == "function" ? e(...t) : !!e;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function pr() {
|
|
1663
1663
|
}
|
|
1664
|
-
var
|
|
1664
|
+
var mr = (e, t) => {
|
|
1665
1665
|
(e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
|
|
1666
|
-
},
|
|
1667
|
-
|
|
1666
|
+
}, vr = (e) => {
|
|
1667
|
+
f.useEffect(() => {
|
|
1668
1668
|
e.clearReset();
|
|
1669
1669
|
}, [e]);
|
|
1670
|
-
},
|
|
1670
|
+
}, gr = ({
|
|
1671
1671
|
result: e,
|
|
1672
1672
|
errorResetBoundary: t,
|
|
1673
1673
|
throwOnError: s,
|
|
1674
1674
|
query: r
|
|
1675
|
-
}) => e.isError && !t.isReset() && !e.isFetching && r &&
|
|
1675
|
+
}) => e.isError && !t.isReset() && !e.isFetching && r && vs(s, [e.error, r]), yr = (e) => {
|
|
1676
1676
|
e.suspense && (typeof e.staleTime != "number" && (e.staleTime = 1e3), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, 1e3)));
|
|
1677
|
-
},
|
|
1677
|
+
}, Cr = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, xr = (e, t, s) => t.fetchOptimistic(e).catch(() => {
|
|
1678
1678
|
s.clearReset();
|
|
1679
1679
|
});
|
|
1680
|
-
function
|
|
1680
|
+
function br(e, t, s) {
|
|
1681
1681
|
var m, h, u, v;
|
|
1682
|
-
const r =
|
|
1682
|
+
const r = St(), n = ur(), l = fr(), o = r.defaultQueryOptions(e);
|
|
1683
1683
|
(h = (m = r.getDefaultOptions().queries) == null ? void 0 : m._experimental_beforeQuery) == null || h.call(
|
|
1684
1684
|
m,
|
|
1685
1685
|
o
|
|
1686
|
-
), o._optimisticResults =
|
|
1687
|
-
const [c] =
|
|
1686
|
+
), o._optimisticResults = n ? "isRestoring" : "optimistic", yr(o), mr(o, l), vr(l);
|
|
1687
|
+
const [c] = f.useState(
|
|
1688
1688
|
() => new t(
|
|
1689
1689
|
r,
|
|
1690
1690
|
o
|
|
1691
1691
|
)
|
|
1692
|
-
),
|
|
1693
|
-
if (
|
|
1694
|
-
|
|
1692
|
+
), d = c.getOptimisticResult(o);
|
|
1693
|
+
if (f.useSyncExternalStore(
|
|
1694
|
+
f.useCallback(
|
|
1695
1695
|
(g) => {
|
|
1696
|
-
const S =
|
|
1696
|
+
const S = n ? () => {
|
|
1697
1697
|
} : c.subscribe(D.batchCalls(g));
|
|
1698
1698
|
return c.updateResult(), S;
|
|
1699
1699
|
},
|
|
1700
|
-
[c,
|
|
1700
|
+
[c, n]
|
|
1701
1701
|
),
|
|
1702
1702
|
() => c.getCurrentResult(),
|
|
1703
1703
|
() => c.getCurrentResult()
|
|
1704
|
-
),
|
|
1704
|
+
), f.useEffect(() => {
|
|
1705
1705
|
c.setOptions(o, { listeners: !1 });
|
|
1706
|
-
}, [o, c]),
|
|
1707
|
-
throw
|
|
1708
|
-
if (
|
|
1709
|
-
result:
|
|
1706
|
+
}, [o, c]), Cr(o, d))
|
|
1707
|
+
throw xr(o, c, l);
|
|
1708
|
+
if (gr({
|
|
1709
|
+
result: d,
|
|
1710
1710
|
errorResetBoundary: l,
|
|
1711
1711
|
throwOnError: o.throwOnError,
|
|
1712
1712
|
query: r.getQueryCache().get(o.queryHash)
|
|
1713
1713
|
}))
|
|
1714
|
-
throw
|
|
1714
|
+
throw d.error;
|
|
1715
1715
|
return (v = (u = r.getDefaultOptions().queries) == null ? void 0 : u._experimental_afterQuery) == null || v.call(
|
|
1716
1716
|
u,
|
|
1717
1717
|
o,
|
|
1718
|
-
|
|
1719
|
-
), o.notifyOnChangeProps ?
|
|
1718
|
+
d
|
|
1719
|
+
), o.notifyOnChangeProps ? d : c.trackResult(d);
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1721
|
+
function gs(e, t) {
|
|
1722
|
+
return br(e, nr);
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1725
|
-
const s =
|
|
1726
|
-
() => new
|
|
1724
|
+
function wr(e, t) {
|
|
1725
|
+
const s = St(), [r] = f.useState(
|
|
1726
|
+
() => new lr(
|
|
1727
1727
|
s,
|
|
1728
1728
|
e
|
|
1729
1729
|
)
|
|
1730
1730
|
);
|
|
1731
|
-
|
|
1731
|
+
f.useEffect(() => {
|
|
1732
1732
|
r.setOptions(e);
|
|
1733
1733
|
}, [r, e]);
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1734
|
+
const n = f.useSyncExternalStore(
|
|
1735
|
+
f.useCallback(
|
|
1736
1736
|
(o) => r.subscribe(D.batchCalls(o)),
|
|
1737
1737
|
[r]
|
|
1738
1738
|
),
|
|
1739
1739
|
() => r.getCurrentResult(),
|
|
1740
1740
|
() => r.getCurrentResult()
|
|
1741
|
-
), l =
|
|
1741
|
+
), l = f.useCallback(
|
|
1742
1742
|
(o, c) => {
|
|
1743
|
-
r.mutate(o, c).catch(
|
|
1743
|
+
r.mutate(o, c).catch(pr);
|
|
1744
1744
|
},
|
|
1745
1745
|
[r]
|
|
1746
1746
|
);
|
|
1747
|
-
if (
|
|
1748
|
-
throw
|
|
1749
|
-
return { ...
|
|
1747
|
+
if (n.error && vs(r.options.throwOnError, [n.error]))
|
|
1748
|
+
throw n.error;
|
|
1749
|
+
return { ...n, mutate: l, mutateAsync: n.mutate };
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function ys(e) {
|
|
1752
1752
|
var t, s, r = "";
|
|
1753
1753
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
1754
1754
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1755
|
-
var
|
|
1756
|
-
for (t = 0; t <
|
|
1755
|
+
var n = e.length;
|
|
1756
|
+
for (t = 0; t < n; t++) e[t] && (s = ys(e[t])) && (r && (r += " "), r += s);
|
|
1757
1757
|
} else for (s in e) e[s] && (r && (r += " "), r += s);
|
|
1758
1758
|
return r;
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1761
|
-
for (var e, t, s = 0, r = "",
|
|
1760
|
+
function R() {
|
|
1761
|
+
for (var e, t, s = 0, r = "", n = arguments.length; s < n; s++) (e = arguments[s]) && (t = ys(e)) && (r && (r += " "), r += t);
|
|
1762
1762
|
return r;
|
|
1763
1763
|
}
|
|
1764
|
-
var
|
|
1764
|
+
var jr = Object.defineProperty, _r = Object.defineProperties, Sr = Object.getOwnPropertyDescriptors, tt = Object.getOwnPropertySymbols, Cs = Object.prototype.hasOwnProperty, xs = Object.prototype.propertyIsEnumerable, Ut = (e, t, s) => t in e ? jr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, x = (e, t) => {
|
|
1765
1765
|
for (var s in t || (t = {}))
|
|
1766
|
-
|
|
1767
|
-
if (
|
|
1768
|
-
for (var s of
|
|
1769
|
-
|
|
1766
|
+
Cs.call(t, s) && Ut(e, s, t[s]);
|
|
1767
|
+
if (tt)
|
|
1768
|
+
for (var s of tt(t))
|
|
1769
|
+
xs.call(t, s) && Ut(e, s, t[s]);
|
|
1770
1770
|
return e;
|
|
1771
|
-
},
|
|
1771
|
+
}, A = (e, t) => _r(e, Sr(t)), L = (e, t) => {
|
|
1772
1772
|
var s = {};
|
|
1773
1773
|
for (var r in e)
|
|
1774
|
-
|
|
1775
|
-
if (e != null &&
|
|
1776
|
-
for (var r of
|
|
1777
|
-
t.indexOf(r) < 0 &&
|
|
1774
|
+
Cs.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
|
|
1775
|
+
if (e != null && tt)
|
|
1776
|
+
for (var r of tt(e))
|
|
1777
|
+
t.indexOf(r) < 0 && xs.call(e, r) && (s[r] = e[r]);
|
|
1778
1778
|
return s;
|
|
1779
1779
|
};
|
|
1780
|
-
function
|
|
1780
|
+
function Er(e, t) {
|
|
1781
1781
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1784
|
-
return (t) => e.forEach((s) =>
|
|
1783
|
+
function Pr(...e) {
|
|
1784
|
+
return (t) => e.forEach((s) => Er(s, t));
|
|
1785
1785
|
}
|
|
1786
|
-
var
|
|
1787
|
-
const s = e, { children: r } = s,
|
|
1786
|
+
var kr = f.forwardRef((e, t) => {
|
|
1787
|
+
const s = e, { children: r } = s, n = L(s, ["children"]), l = f.Children.toArray(r), o = l.find(Nr);
|
|
1788
1788
|
if (o) {
|
|
1789
|
-
const c = o.props.children,
|
|
1790
|
-
return /* @__PURE__ */ i.jsx(
|
|
1789
|
+
const c = o.props.children, d = l.map((m) => m === o ? f.Children.count(c) > 1 ? f.Children.only(null) : f.isValidElement(c) ? c.props.children : null : m);
|
|
1790
|
+
return /* @__PURE__ */ i.jsx(yt, A(x({}, n), { ref: t, children: f.isValidElement(c) ? f.cloneElement(c, void 0, d) : null }));
|
|
1791
1791
|
}
|
|
1792
|
-
return /* @__PURE__ */ i.jsx(
|
|
1792
|
+
return /* @__PURE__ */ i.jsx(yt, A(x({}, n), { ref: t, children: r }));
|
|
1793
1793
|
});
|
|
1794
|
-
|
|
1795
|
-
var
|
|
1796
|
-
const s = e, { children: r } = s,
|
|
1797
|
-
if (
|
|
1798
|
-
const l =
|
|
1799
|
-
return
|
|
1794
|
+
kr.displayName = "Slot";
|
|
1795
|
+
var yt = f.forwardRef((e, t) => {
|
|
1796
|
+
const s = e, { children: r } = s, n = L(s, ["children"]);
|
|
1797
|
+
if (f.isValidElement(r)) {
|
|
1798
|
+
const l = Rr(r);
|
|
1799
|
+
return f.cloneElement(r, A(x({}, Mr(n, r.props)), {
|
|
1800
1800
|
// @ts-ignore
|
|
1801
|
-
ref: t ?
|
|
1801
|
+
ref: t ? Pr(t, l) : l
|
|
1802
1802
|
}));
|
|
1803
1803
|
}
|
|
1804
|
-
return
|
|
1804
|
+
return f.Children.count(r) > 1 ? f.Children.only(null) : null;
|
|
1805
1805
|
});
|
|
1806
|
-
|
|
1807
|
-
var
|
|
1808
|
-
function
|
|
1809
|
-
return
|
|
1806
|
+
yt.displayName = "SlotClone";
|
|
1807
|
+
var Ar = ({ children: e }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e });
|
|
1808
|
+
function Nr(e) {
|
|
1809
|
+
return f.isValidElement(e) && e.type === Ar;
|
|
1810
1810
|
}
|
|
1811
|
-
function
|
|
1811
|
+
function Mr(e, t) {
|
|
1812
1812
|
const s = x({}, t);
|
|
1813
1813
|
for (const r in t) {
|
|
1814
|
-
const
|
|
1815
|
-
/^on[A-Z]/.test(r) ?
|
|
1816
|
-
l(...c),
|
|
1817
|
-
} :
|
|
1814
|
+
const n = e[r], l = t[r];
|
|
1815
|
+
/^on[A-Z]/.test(r) ? n && l ? s[r] = (...c) => {
|
|
1816
|
+
l(...c), n(...c);
|
|
1817
|
+
} : n && (s[r] = n) : r === "style" ? s[r] = x(x({}, n), l) : r === "className" && (s[r] = [n, l].filter(Boolean).join(" "));
|
|
1818
1818
|
}
|
|
1819
1819
|
return x(x({}, e), s);
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1821
|
+
function Rr(e) {
|
|
1822
1822
|
var t, s;
|
|
1823
|
-
let r = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get,
|
|
1824
|
-
return
|
|
1823
|
+
let r = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, n = r && "isReactWarning" in r && r.isReactWarning;
|
|
1824
|
+
return n ? e.ref : (r = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, n = r && "isReactWarning" in r && r.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
1825
1825
|
}
|
|
1826
|
-
var
|
|
1826
|
+
var Or = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
1827
1827
|
const r = `${e.charAt(0)}${t.charAt(0)}`;
|
|
1828
1828
|
return /* @__PURE__ */ i.jsx(
|
|
1829
1829
|
"span",
|
|
@@ -1834,15 +1834,15 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1834
1834
|
children: /* @__PURE__ */ i.jsx("span", { className: "avatar__initials", children: r })
|
|
1835
1835
|
}
|
|
1836
1836
|
);
|
|
1837
|
-
}, Ze =
|
|
1837
|
+
}, Ze = f.forwardRef(
|
|
1838
1838
|
(e, t) => {
|
|
1839
1839
|
var s = e, {
|
|
1840
1840
|
iconLeft: r,
|
|
1841
|
-
iconRight:
|
|
1841
|
+
iconRight: n,
|
|
1842
1842
|
isPending: l = !1,
|
|
1843
1843
|
isFilled: o = !1,
|
|
1844
1844
|
variant: c,
|
|
1845
|
-
className:
|
|
1845
|
+
className: d,
|
|
1846
1846
|
children: m
|
|
1847
1847
|
} = s, h = L(s, [
|
|
1848
1848
|
"iconLeft",
|
|
@@ -1853,60 +1853,60 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1853
1853
|
"className",
|
|
1854
1854
|
"children"
|
|
1855
1855
|
]);
|
|
1856
|
-
const u = !!r || !!
|
|
1856
|
+
const u = !!r || !!n;
|
|
1857
1857
|
return /* @__PURE__ */ i.jsxs(
|
|
1858
1858
|
"button",
|
|
1859
|
-
|
|
1859
|
+
A(x({
|
|
1860
1860
|
ref: t
|
|
1861
1861
|
}, h), {
|
|
1862
|
-
className:
|
|
1862
|
+
className: R(
|
|
1863
1863
|
"button",
|
|
1864
1864
|
c && `button--${c}`,
|
|
1865
1865
|
c && o && `button--${c}--filled`,
|
|
1866
1866
|
u && "button--with-icon",
|
|
1867
1867
|
l && "button--pending",
|
|
1868
|
-
|
|
1868
|
+
d
|
|
1869
1869
|
),
|
|
1870
1870
|
children: [
|
|
1871
1871
|
r && /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: r }),
|
|
1872
1872
|
!!m && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: m }),
|
|
1873
|
-
|
|
1873
|
+
n && /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: n })
|
|
1874
1874
|
]
|
|
1875
1875
|
})
|
|
1876
1876
|
);
|
|
1877
1877
|
}
|
|
1878
1878
|
);
|
|
1879
1879
|
Ze.displayName = "Button";
|
|
1880
|
-
|
|
1881
|
-
var
|
|
1880
|
+
f.createContext(void 0);
|
|
1881
|
+
var Lr = f.forwardRef(
|
|
1882
1882
|
(e, t) => {
|
|
1883
|
-
var s = e, { prefix: r, suffix:
|
|
1883
|
+
var s = e, { prefix: r, suffix: n, className: l } = s, o = L(s, ["prefix", "suffix", "className"]);
|
|
1884
1884
|
return /* @__PURE__ */ i.jsxs("div", { className: "input__wrapper", children: [
|
|
1885
1885
|
r && /* @__PURE__ */ i.jsx("span", { className: "input__prefix", children: r }),
|
|
1886
1886
|
/* @__PURE__ */ i.jsx(
|
|
1887
1887
|
"input",
|
|
1888
1888
|
x({
|
|
1889
1889
|
ref: t,
|
|
1890
|
-
className:
|
|
1890
|
+
className: R(
|
|
1891
1891
|
"input",
|
|
1892
1892
|
r && "input--with-prefix",
|
|
1893
|
-
|
|
1893
|
+
n && "input--with-suffix",
|
|
1894
1894
|
l
|
|
1895
1895
|
)
|
|
1896
1896
|
}, o)
|
|
1897
1897
|
),
|
|
1898
|
-
|
|
1898
|
+
n && /* @__PURE__ */ i.jsx("span", { className: "input__suffix", children: n })
|
|
1899
1899
|
] });
|
|
1900
1900
|
}
|
|
1901
1901
|
);
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
var
|
|
1905
|
-
var t = e, { children: s, className: r } = t,
|
|
1906
|
-
return /* @__PURE__ */ i.jsx("div",
|
|
1907
|
-
},
|
|
1902
|
+
Lr.displayName = "TextField";
|
|
1903
|
+
f.createContext(void 0);
|
|
1904
|
+
var Fr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), Dr = (e) => {
|
|
1905
|
+
var t = e, { children: s, className: r } = t, n = L(t, ["children", "className"]);
|
|
1906
|
+
return /* @__PURE__ */ i.jsx("div", A(x({ className: R("card__body", r) }, n), { children: s }));
|
|
1907
|
+
}, Tr = (e) => /* @__PURE__ */ i.jsx(
|
|
1908
1908
|
"svg",
|
|
1909
|
-
|
|
1909
|
+
A(x({
|
|
1910
1910
|
width: "24",
|
|
1911
1911
|
height: "24",
|
|
1912
1912
|
viewBox: "0 0 24 24",
|
|
@@ -1924,9 +1924,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1924
1924
|
}
|
|
1925
1925
|
)
|
|
1926
1926
|
})
|
|
1927
|
-
),
|
|
1927
|
+
), Et = Tr, Ur = (e) => /* @__PURE__ */ i.jsx(
|
|
1928
1928
|
"svg",
|
|
1929
|
-
|
|
1929
|
+
A(x({
|
|
1930
1930
|
width: "24",
|
|
1931
1931
|
height: "24",
|
|
1932
1932
|
viewBox: "0 0 24 24",
|
|
@@ -1944,9 +1944,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1944
1944
|
}
|
|
1945
1945
|
)
|
|
1946
1946
|
})
|
|
1947
|
-
),
|
|
1947
|
+
), Qr = Ur, Hr = (e) => /* @__PURE__ */ i.jsx(
|
|
1948
1948
|
"svg",
|
|
1949
|
-
|
|
1949
|
+
A(x({
|
|
1950
1950
|
width: "24",
|
|
1951
1951
|
height: "24",
|
|
1952
1952
|
viewBox: "0 0 24 24",
|
|
@@ -1963,9 +1963,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1963
1963
|
}
|
|
1964
1964
|
)
|
|
1965
1965
|
})
|
|
1966
|
-
),
|
|
1966
|
+
), Kr = Hr, Gr = (e) => /* @__PURE__ */ i.jsx(
|
|
1967
1967
|
"svg",
|
|
1968
|
-
|
|
1968
|
+
A(x({
|
|
1969
1969
|
width: "24",
|
|
1970
1970
|
height: "24",
|
|
1971
1971
|
viewBox: "0 0 24 24",
|
|
@@ -1982,9 +1982,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
1982
1982
|
}
|
|
1983
1983
|
)
|
|
1984
1984
|
})
|
|
1985
|
-
),
|
|
1985
|
+
), qr = Gr, Wr = (e) => /* @__PURE__ */ i.jsx(
|
|
1986
1986
|
"svg",
|
|
1987
|
-
|
|
1987
|
+
A(x({
|
|
1988
1988
|
width: "24",
|
|
1989
1989
|
height: "24",
|
|
1990
1990
|
viewBox: "0 0 24 24",
|
|
@@ -2001,9 +2001,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2001
2001
|
}
|
|
2002
2002
|
)
|
|
2003
2003
|
})
|
|
2004
|
-
),
|
|
2004
|
+
), Vr = Wr, $r = (e) => /* @__PURE__ */ i.jsxs(
|
|
2005
2005
|
"svg",
|
|
2006
|
-
|
|
2006
|
+
A(x({
|
|
2007
2007
|
width: "24",
|
|
2008
2008
|
height: "24",
|
|
2009
2009
|
fill: "none",
|
|
@@ -2038,9 +2038,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2038
2038
|
/* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_19_444", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
|
|
2039
2039
|
]
|
|
2040
2040
|
})
|
|
2041
|
-
),
|
|
2041
|
+
), Zr = $r, zr = (e) => /* @__PURE__ */ i.jsxs(
|
|
2042
2042
|
"svg",
|
|
2043
|
-
|
|
2043
|
+
A(x({
|
|
2044
2044
|
width: "24",
|
|
2045
2045
|
height: "24",
|
|
2046
2046
|
viewBox: "0 0 24 24",
|
|
@@ -2070,9 +2070,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2070
2070
|
)
|
|
2071
2071
|
]
|
|
2072
2072
|
})
|
|
2073
|
-
),
|
|
2073
|
+
), Yr = zr, Jr = (e) => /* @__PURE__ */ i.jsxs(
|
|
2074
2074
|
"svg",
|
|
2075
|
-
|
|
2075
|
+
A(x({
|
|
2076
2076
|
width: "24",
|
|
2077
2077
|
height: "24",
|
|
2078
2078
|
viewBox: "0 0 24 24",
|
|
@@ -2122,17 +2122,17 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2122
2122
|
)
|
|
2123
2123
|
]
|
|
2124
2124
|
})
|
|
2125
|
-
),
|
|
2125
|
+
), Xr = Jr, Ir = (e) => {
|
|
2126
2126
|
var t = e, { className: s } = t, r = L(t, ["className"]);
|
|
2127
2127
|
return /* @__PURE__ */ i.jsxs(
|
|
2128
2128
|
"svg",
|
|
2129
|
-
|
|
2129
|
+
A(x({
|
|
2130
2130
|
width: "20",
|
|
2131
2131
|
height: "20",
|
|
2132
2132
|
viewBox: "0 0 20 20",
|
|
2133
2133
|
fill: "none",
|
|
2134
2134
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2135
|
-
className:
|
|
2135
|
+
className: R("spinner", s)
|
|
2136
2136
|
}, r), {
|
|
2137
2137
|
children: [
|
|
2138
2138
|
/* @__PURE__ */ i.jsx("circle", { cx: "10", cy: "10", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "1.5" }),
|
|
@@ -2151,9 +2151,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2151
2151
|
]
|
|
2152
2152
|
})
|
|
2153
2153
|
);
|
|
2154
|
-
},
|
|
2154
|
+
}, Br = Ir, ei = (e) => /* @__PURE__ */ i.jsxs(
|
|
2155
2155
|
"svg",
|
|
2156
|
-
|
|
2156
|
+
A(x({
|
|
2157
2157
|
width: "24",
|
|
2158
2158
|
height: "24",
|
|
2159
2159
|
fill: "none",
|
|
@@ -2185,11 +2185,11 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2185
2185
|
/* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_762_2934", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
|
|
2186
2186
|
]
|
|
2187
2187
|
})
|
|
2188
|
-
),
|
|
2188
|
+
), ti = ei, si = (e) => {
|
|
2189
2189
|
const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
|
|
2190
2190
|
return /* @__PURE__ */ i.jsxs(
|
|
2191
2191
|
"svg",
|
|
2192
|
-
|
|
2192
|
+
A(x({
|
|
2193
2193
|
width: "24",
|
|
2194
2194
|
height: "24",
|
|
2195
2195
|
viewBox: "0 0 24 24",
|
|
@@ -2356,9 +2356,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2356
2356
|
]
|
|
2357
2357
|
})
|
|
2358
2358
|
);
|
|
2359
|
-
},
|
|
2359
|
+
}, bs = si, ri = (e) => /* @__PURE__ */ i.jsxs(
|
|
2360
2360
|
"svg",
|
|
2361
|
-
|
|
2361
|
+
A(x({
|
|
2362
2362
|
fill: "none",
|
|
2363
2363
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2364
2364
|
viewBox: "0 0 24 24",
|
|
@@ -2418,9 +2418,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2418
2418
|
)
|
|
2419
2419
|
]
|
|
2420
2420
|
})
|
|
2421
|
-
),
|
|
2421
|
+
), ii = ri, ni = (e) => /* @__PURE__ */ i.jsx(
|
|
2422
2422
|
"svg",
|
|
2423
|
-
|
|
2423
|
+
A(x({
|
|
2424
2424
|
fill: "none",
|
|
2425
2425
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2426
2426
|
viewBox: "0 0 21 16",
|
|
@@ -2438,9 +2438,9 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2438
2438
|
}
|
|
2439
2439
|
)
|
|
2440
2440
|
})
|
|
2441
|
-
),
|
|
2441
|
+
), ai = ni, oi = (e) => /* @__PURE__ */ i.jsxs(
|
|
2442
2442
|
"svg",
|
|
2443
|
-
|
|
2443
|
+
A(x({
|
|
2444
2444
|
width: "24",
|
|
2445
2445
|
height: "24",
|
|
2446
2446
|
fill: "none",
|
|
@@ -2465,15 +2465,15 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2465
2465
|
/* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
|
|
2466
2466
|
]
|
|
2467
2467
|
})
|
|
2468
|
-
),
|
|
2468
|
+
), li = oi, ci = (e) => {
|
|
2469
2469
|
var t = e, {
|
|
2470
2470
|
variant: s,
|
|
2471
2471
|
icon: r,
|
|
2472
|
-
isStandalone:
|
|
2472
|
+
isStandalone: n,
|
|
2473
2473
|
title: l,
|
|
2474
2474
|
description: o,
|
|
2475
2475
|
className: c
|
|
2476
|
-
} = t,
|
|
2476
|
+
} = t, d = L(t, [
|
|
2477
2477
|
"variant",
|
|
2478
2478
|
"icon",
|
|
2479
2479
|
"isStandalone",
|
|
@@ -2483,15 +2483,15 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2483
2483
|
]);
|
|
2484
2484
|
return /* @__PURE__ */ i.jsx(
|
|
2485
2485
|
"div",
|
|
2486
|
-
|
|
2487
|
-
className:
|
|
2486
|
+
A(x({}, d), {
|
|
2487
|
+
className: R(
|
|
2488
2488
|
"card__empty-state",
|
|
2489
2489
|
s === "error" && "card__empty-state--error",
|
|
2490
|
-
|
|
2490
|
+
n && "card__empty-state--standalone",
|
|
2491
2491
|
c
|
|
2492
2492
|
),
|
|
2493
2493
|
children: /* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__wrapper", children: [
|
|
2494
|
-
/* @__PURE__ */ i.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ i.jsx(
|
|
2494
|
+
/* @__PURE__ */ i.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ i.jsx(ti, {}) : r }),
|
|
2495
2495
|
/* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__content", children: [
|
|
2496
2496
|
/* @__PURE__ */ i.jsx("p", { className: "card__empty-state__title", children: l }),
|
|
2497
2497
|
/* @__PURE__ */ i.jsx("p", { className: "card__empty-state__description", children: o })
|
|
@@ -2499,11 +2499,11 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2499
2499
|
] })
|
|
2500
2500
|
})
|
|
2501
2501
|
);
|
|
2502
|
-
},
|
|
2502
|
+
}, ui = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__footer", children: e }), hi = (e) => {
|
|
2503
2503
|
var t = e, {
|
|
2504
2504
|
variant: s = "default",
|
|
2505
2505
|
sticky: r,
|
|
2506
|
-
className:
|
|
2506
|
+
className: n,
|
|
2507
2507
|
children: l
|
|
2508
2508
|
} = t, o = L(t, [
|
|
2509
2509
|
"variant",
|
|
@@ -2513,73 +2513,73 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
|
|
|
2513
2513
|
]);
|
|
2514
2514
|
return /* @__PURE__ */ i.jsx(
|
|
2515
2515
|
"div",
|
|
2516
|
-
|
|
2517
|
-
className:
|
|
2516
|
+
A(x({}, o), {
|
|
2517
|
+
className: R(
|
|
2518
2518
|
"card__header",
|
|
2519
2519
|
s && `card__header--${s}`,
|
|
2520
2520
|
r && "card__header--sticky",
|
|
2521
|
-
|
|
2521
|
+
n
|
|
2522
2522
|
),
|
|
2523
2523
|
children: l
|
|
2524
2524
|
})
|
|
2525
2525
|
);
|
|
2526
|
-
},
|
|
2526
|
+
}, di = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), fi = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: R("card__body__item", t), children: e }), pi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), mi = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
|
|
2527
2527
|
e && /* @__PURE__ */ i.jsx("span", { className: "card__header__title__icon", children: e }),
|
|
2528
2528
|
t
|
|
2529
|
-
] }),
|
|
2529
|
+
] }), ws = f.forwardRef(
|
|
2530
2530
|
(e, t) => {
|
|
2531
|
-
var s = e, { type: r, children:
|
|
2532
|
-
return
|
|
2531
|
+
var s = e, { type: r, children: n, className: l, variant: o = "default", disabled: c = !1 } = s, d = L(s, ["type", "children", "className", "variant", "disabled"]);
|
|
2532
|
+
return f.createElement(
|
|
2533
2533
|
r,
|
|
2534
2534
|
x({
|
|
2535
|
-
className:
|
|
2535
|
+
className: R(
|
|
2536
2536
|
"card",
|
|
2537
2537
|
c && "card--disabled",
|
|
2538
2538
|
o && `card--${o}`,
|
|
2539
2539
|
l
|
|
2540
2540
|
),
|
|
2541
2541
|
ref: t
|
|
2542
|
-
},
|
|
2543
|
-
|
|
2542
|
+
}, d),
|
|
2543
|
+
n
|
|
2544
2544
|
);
|
|
2545
2545
|
}
|
|
2546
2546
|
);
|
|
2547
|
-
|
|
2548
|
-
Object.assign(
|
|
2549
|
-
Header:
|
|
2550
|
-
Action:
|
|
2551
|
-
Title:
|
|
2552
|
-
Subtitle:
|
|
2553
|
-
Body:
|
|
2554
|
-
Image:
|
|
2555
|
-
Item:
|
|
2556
|
-
Footer:
|
|
2557
|
-
EmptyState:
|
|
2547
|
+
ws.displayName = "Card";
|
|
2548
|
+
Object.assign(ws, {
|
|
2549
|
+
Header: hi,
|
|
2550
|
+
Action: Fr,
|
|
2551
|
+
Title: mi,
|
|
2552
|
+
Subtitle: pi,
|
|
2553
|
+
Body: Dr,
|
|
2554
|
+
Image: di,
|
|
2555
|
+
Item: fi,
|
|
2556
|
+
Footer: ui,
|
|
2557
|
+
EmptyState: ci
|
|
2558
2558
|
});
|
|
2559
|
-
var
|
|
2560
|
-
var t = e, { className: s, children: r } = t,
|
|
2561
|
-
return /* @__PURE__ */ i.jsx("div",
|
|
2562
|
-
},
|
|
2563
|
-
var t = e, { className: s, children: r } = t,
|
|
2564
|
-
return /* @__PURE__ */ i.jsx("span",
|
|
2565
|
-
},
|
|
2566
|
-
const e =
|
|
2559
|
+
var vi = (e) => {
|
|
2560
|
+
var t = e, { className: s, children: r } = t, n = L(t, ["className", "children"]);
|
|
2561
|
+
return /* @__PURE__ */ i.jsx("div", A(x({ className: R("checkbox__content", s) }, n), { children: r }));
|
|
2562
|
+
}, gi = (e) => {
|
|
2563
|
+
var t = e, { className: s, children: r } = t, n = L(t, ["className", "children"]);
|
|
2564
|
+
return /* @__PURE__ */ i.jsx("span", A(x({ className: R("checkbox__hint", s) }, n), { children: r }));
|
|
2565
|
+
}, js = f.createContext(void 0), yi = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(js.Provider, { value: { id: e, name: t }, children: s }), Ci = () => {
|
|
2566
|
+
const e = f.useContext(js);
|
|
2567
2567
|
if (!e)
|
|
2568
2568
|
throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
|
|
2569
2569
|
return e;
|
|
2570
|
-
},
|
|
2571
|
-
var t = e, { className: s, children: r } = t,
|
|
2572
|
-
const { id: l } =
|
|
2573
|
-
return /* @__PURE__ */ i.jsx("label",
|
|
2570
|
+
}, xi = (e) => {
|
|
2571
|
+
var t = e, { className: s, children: r } = t, n = L(t, ["className", "children"]);
|
|
2572
|
+
const { id: l } = Ci();
|
|
2573
|
+
return /* @__PURE__ */ i.jsx("label", A(x({ htmlFor: l, className: R("checkbox__label", s) }, n), { children: r }));
|
|
2574
2574
|
}, we = (e) => {
|
|
2575
2575
|
var t = e, {
|
|
2576
2576
|
id: s,
|
|
2577
2577
|
name: r,
|
|
2578
|
-
isPending:
|
|
2578
|
+
isPending: n = !1,
|
|
2579
2579
|
variant: l = "neutral",
|
|
2580
2580
|
hasError: o = !1,
|
|
2581
2581
|
single: c,
|
|
2582
|
-
className:
|
|
2582
|
+
className: d,
|
|
2583
2583
|
children: m
|
|
2584
2584
|
} = t, h = L(t, [
|
|
2585
2585
|
"id",
|
|
@@ -2591,13 +2591,13 @@ var fi = (e) => {
|
|
|
2591
2591
|
"className",
|
|
2592
2592
|
"children"
|
|
2593
2593
|
]);
|
|
2594
|
-
const u =
|
|
2595
|
-
return
|
|
2596
|
-
u.current && (
|
|
2597
|
-
}, [
|
|
2594
|
+
const u = f.useRef(null);
|
|
2595
|
+
return f.useEffect(() => {
|
|
2596
|
+
u.current && (n ? u.current.indeterminate = !0 : u.current.indeterminate = !1);
|
|
2597
|
+
}, [n]), /* @__PURE__ */ i.jsxs(
|
|
2598
2598
|
"div",
|
|
2599
2599
|
{
|
|
2600
|
-
className:
|
|
2600
|
+
className: R("checkbox", l && `checkbox--${l}`, o && "checkbox--error"),
|
|
2601
2601
|
children: [
|
|
2602
2602
|
/* @__PURE__ */ i.jsx(
|
|
2603
2603
|
"input",
|
|
@@ -2606,44 +2606,44 @@ var fi = (e) => {
|
|
|
2606
2606
|
name: r,
|
|
2607
2607
|
type: "checkbox",
|
|
2608
2608
|
ref: u,
|
|
2609
|
-
className:
|
|
2609
|
+
className: R("checkbox__input", d),
|
|
2610
2610
|
value: c ? "true" : ""
|
|
2611
2611
|
}, h)
|
|
2612
2612
|
),
|
|
2613
|
-
|
|
2614
|
-
/* @__PURE__ */ i.jsx(
|
|
2613
|
+
n ? /* @__PURE__ */ i.jsx(Br, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(Qr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
|
|
2614
|
+
/* @__PURE__ */ i.jsx(yi, { id: s, name: r, children: m })
|
|
2615
2615
|
]
|
|
2616
2616
|
}
|
|
2617
2617
|
);
|
|
2618
2618
|
};
|
|
2619
|
-
we.Content =
|
|
2620
|
-
we.Label =
|
|
2621
|
-
we.Hint =
|
|
2619
|
+
we.Content = vi;
|
|
2620
|
+
we.Label = xi;
|
|
2621
|
+
we.Hint = gi;
|
|
2622
2622
|
we.Error = Error;
|
|
2623
|
-
var
|
|
2624
|
-
var t = e, { type: s = "div", className: r, children:
|
|
2625
|
-
return
|
|
2626
|
-
},
|
|
2627
|
-
var t = e, { className: s, children: r, shouldAnimate:
|
|
2628
|
-
const { ref: o, defaultOpen: c, isModal:
|
|
2629
|
-
return
|
|
2623
|
+
var bi = (e) => {
|
|
2624
|
+
var t = e, { type: s = "div", className: r, children: n } = t, l = L(t, ["type", "className", "children"]);
|
|
2625
|
+
return f.createElement(s, x({ className: R("dialog__body", r) }, l), n);
|
|
2626
|
+
}, Ct = () => document.body.style.removeProperty("overflow"), Qt = (e) => e.preventDefault(), wi = '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])', ji = (e) => {
|
|
2627
|
+
var t = e, { className: s, children: r, shouldAnimate: n = !0 } = t, l = L(t, ["className", "children", "shouldAnimate"]);
|
|
2628
|
+
const { ref: o, defaultOpen: c, isModal: d, onClose: m } = ze();
|
|
2629
|
+
return f.useEffect(() => {
|
|
2630
2630
|
const h = o == null ? void 0 : o.current;
|
|
2631
2631
|
if (h != null && h.open) {
|
|
2632
|
-
const u = h.querySelectorAll(
|
|
2632
|
+
const u = h.querySelectorAll(wi), v = u[0], g = u[u.length - 1], S = (_) => {
|
|
2633
2633
|
if (!(_.key === "Tab"))
|
|
2634
2634
|
return;
|
|
2635
2635
|
_.shiftKey ? document.activeElement === v && (g.focus(), _.preventDefault()) : document.activeElement === g && (v.focus(), _.preventDefault());
|
|
2636
2636
|
};
|
|
2637
|
-
return document.body.style.overflow = "hidden", h.addEventListener("keydown", S), window.addEventListener("popstate", () =>
|
|
2638
|
-
h.removeEventListener("keydown", S), window.removeEventListener("popstate", () =>
|
|
2637
|
+
return document.body.style.overflow = "hidden", h.addEventListener("keydown", S), window.addEventListener("popstate", () => Ct()), () => {
|
|
2638
|
+
h.removeEventListener("keydown", S), window.removeEventListener("popstate", () => Ct());
|
|
2639
2639
|
};
|
|
2640
2640
|
}
|
|
2641
|
-
}, [o]),
|
|
2641
|
+
}, [o]), f.useEffect(() => {
|
|
2642
2642
|
const h = o == null ? void 0 : o.current;
|
|
2643
2643
|
if (!h)
|
|
2644
2644
|
return;
|
|
2645
|
-
if (c && (h.removeAttribute("open"), h.showModal(), h.focus()),
|
|
2646
|
-
return h.addEventListener("cancel",
|
|
2645
|
+
if (c && (h.removeAttribute("open"), h.showModal(), h.focus()), d)
|
|
2646
|
+
return h.addEventListener("cancel", Qt), () => h.removeEventListener("cancel", Qt);
|
|
2647
2647
|
const u = ({ clientX: v, clientY: g }) => {
|
|
2648
2648
|
const { top: S, right: _, bottom: P, left: C } = h.getBoundingClientRect(), j = 0 < g && 0 < v, b = S < g && g < P, M = C < v && v < _;
|
|
2649
2649
|
j && !(b && M) && m();
|
|
@@ -2651,36 +2651,36 @@ var yi = (e) => {
|
|
|
2651
2651
|
return h.addEventListener("cancel", m), h.addEventListener("mousedown", u), () => {
|
|
2652
2652
|
h.removeEventListener("cancel", m), h.removeEventListener("mousedown", u);
|
|
2653
2653
|
};
|
|
2654
|
-
}, [o,
|
|
2654
|
+
}, [o, d, m, c]), /* @__PURE__ */ i.jsx(
|
|
2655
2655
|
"dialog",
|
|
2656
|
-
|
|
2656
|
+
A(x({
|
|
2657
2657
|
ref: o,
|
|
2658
2658
|
open: c,
|
|
2659
|
-
"aria-modal": !!
|
|
2659
|
+
"aria-modal": !!d,
|
|
2660
2660
|
"aria-labelledby": "dialogTitle",
|
|
2661
|
-
className:
|
|
2661
|
+
className: R("dialog", n && "dialog--animated", s)
|
|
2662
2662
|
}, l), {
|
|
2663
2663
|
children: r
|
|
2664
2664
|
})
|
|
2665
2665
|
);
|
|
2666
|
-
},
|
|
2667
|
-
const
|
|
2666
|
+
}, _s = f.createContext(void 0), _i = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
|
|
2667
|
+
const n = f.useRef(null), l = f.useRef(t), o = f.useCallback(() => {
|
|
2668
2668
|
var c;
|
|
2669
|
-
|
|
2670
|
-
}, [
|
|
2671
|
-
return /* @__PURE__ */ i.jsx(
|
|
2672
|
-
},
|
|
2673
|
-
const e =
|
|
2669
|
+
Ct(), (c = n.current) == null || c.close(), l.current && (l == null || l.current());
|
|
2670
|
+
}, [n]);
|
|
2671
|
+
return /* @__PURE__ */ i.jsx(_s.Provider, { value: { ref: n, defaultOpen: e, isModal: s, onClose: o }, children: r });
|
|
2672
|
+
}, ze = () => {
|
|
2673
|
+
const e = f.useContext(_s);
|
|
2674
2674
|
if (!e)
|
|
2675
2675
|
throw new Error("Dialog compound components can not be rendered outside of Dialog");
|
|
2676
2676
|
return e;
|
|
2677
|
-
},
|
|
2677
|
+
}, Si = (e) => {
|
|
2678
2678
|
var t = e, { children: s } = t, r = L(t, ["children"]);
|
|
2679
|
-
const { onClose:
|
|
2680
|
-
return /* @__PURE__ */ i.jsx(Ze,
|
|
2681
|
-
},
|
|
2682
|
-
var s = e, { className: r } = s,
|
|
2683
|
-
const { onClose: l } =
|
|
2679
|
+
const { onClose: n } = ze();
|
|
2680
|
+
return /* @__PURE__ */ i.jsx(Ze, A(x({ onClick: n }, r), { children: s }));
|
|
2681
|
+
}, Ss = f.forwardRef((e, t) => {
|
|
2682
|
+
var s = e, { className: r } = s, n = L(s, ["className"]);
|
|
2683
|
+
const { onClose: l } = ze();
|
|
2684
2684
|
return /* @__PURE__ */ i.jsx(
|
|
2685
2685
|
Ze,
|
|
2686
2686
|
x({
|
|
@@ -2688,28 +2688,28 @@ var yi = (e) => {
|
|
|
2688
2688
|
ref: t,
|
|
2689
2689
|
formMethod: "dialog",
|
|
2690
2690
|
onClick: l,
|
|
2691
|
-
iconLeft: /* @__PURE__ */ i.jsx(
|
|
2691
|
+
iconLeft: /* @__PURE__ */ i.jsx(Kr, {}),
|
|
2692
2692
|
variant: "icon--secondary",
|
|
2693
|
-
className:
|
|
2694
|
-
},
|
|
2693
|
+
className: R("dialog__close button--icon", r)
|
|
2694
|
+
}, n)
|
|
2695
2695
|
);
|
|
2696
2696
|
});
|
|
2697
|
-
|
|
2698
|
-
var
|
|
2699
|
-
var t = e, { className: s, children: r } = t,
|
|
2700
|
-
return /* @__PURE__ */ i.jsx("div",
|
|
2701
|
-
},
|
|
2702
|
-
var t = e, { icon: s, children: r, className:
|
|
2703
|
-
const { ref: o } =
|
|
2704
|
-
return
|
|
2697
|
+
Ss.displayName = "Close";
|
|
2698
|
+
var Ei = (e) => {
|
|
2699
|
+
var t = e, { className: s, children: r } = t, n = L(t, ["className", "children"]);
|
|
2700
|
+
return /* @__PURE__ */ i.jsx("div", A(x({ className: R("dialog__footer", s) }, n), { children: r }));
|
|
2701
|
+
}, Pi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), ki = (e) => {
|
|
2702
|
+
var t = e, { icon: s, children: r, className: n } = t, l = L(t, ["icon", "children", "className"]);
|
|
2703
|
+
const { ref: o } = ze(), c = f.useRef(null);
|
|
2704
|
+
return f.useEffect(() => {
|
|
2705
2705
|
o != null && o.current && o.current.focus();
|
|
2706
2706
|
}, [o]), /* @__PURE__ */ i.jsxs(
|
|
2707
2707
|
"div",
|
|
2708
|
-
|
|
2708
|
+
A(x({
|
|
2709
2709
|
tabIndex: 0,
|
|
2710
2710
|
ref: c,
|
|
2711
2711
|
id: "dialogTitle",
|
|
2712
|
-
className:
|
|
2712
|
+
className: R("dialog__header__title", n)
|
|
2713
2713
|
}, l), {
|
|
2714
2714
|
children: [
|
|
2715
2715
|
s && /* @__PURE__ */ i.jsx("span", { className: "dialog__header__icon", children: s }),
|
|
@@ -2717,72 +2717,72 @@ var ji = (e) => {
|
|
|
2717
2717
|
]
|
|
2718
2718
|
})
|
|
2719
2719
|
);
|
|
2720
|
-
},
|
|
2720
|
+
}, Ai = (e) => {
|
|
2721
2721
|
var t = e, { children: s } = t, r = L(t, ["children"]);
|
|
2722
|
-
const { ref:
|
|
2723
|
-
return /* @__PURE__ */ i.jsx(Ze,
|
|
2722
|
+
const { ref: n } = ze();
|
|
2723
|
+
return /* @__PURE__ */ i.jsx(Ze, A(x({ onClick: () => {
|
|
2724
2724
|
var l;
|
|
2725
|
-
return (l =
|
|
2725
|
+
return (l = n == null ? void 0 : n.current) == null ? void 0 : l.showModal();
|
|
2726
2726
|
} }, r), { children: s }));
|
|
2727
|
-
}, G = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(
|
|
2728
|
-
G.Trigger =
|
|
2729
|
-
G.Root =
|
|
2730
|
-
G.Title =
|
|
2731
|
-
G.Header =
|
|
2732
|
-
G.Body =
|
|
2733
|
-
G.Footer =
|
|
2734
|
-
G.Button =
|
|
2735
|
-
G.Close =
|
|
2736
|
-
var
|
|
2727
|
+
}, G = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(_i, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
|
|
2728
|
+
G.Trigger = Ai;
|
|
2729
|
+
G.Root = ji;
|
|
2730
|
+
G.Title = ki;
|
|
2731
|
+
G.Header = Pi;
|
|
2732
|
+
G.Body = bi;
|
|
2733
|
+
G.Footer = Ei;
|
|
2734
|
+
G.Button = Si;
|
|
2735
|
+
G.Close = Ss;
|
|
2736
|
+
var Es = f.createContext(void 0), Ni = ({
|
|
2737
2737
|
id: e,
|
|
2738
2738
|
position: t,
|
|
2739
2739
|
isOpen: s,
|
|
2740
2740
|
setIsOpen: r,
|
|
2741
|
-
activeItemIndex:
|
|
2741
|
+
activeItemIndex: n,
|
|
2742
2742
|
setActiveItemIndex: l,
|
|
2743
2743
|
clearActiveItemIndex: o,
|
|
2744
2744
|
triggerRef: c,
|
|
2745
|
-
contentRef:
|
|
2745
|
+
contentRef: d,
|
|
2746
2746
|
children: m
|
|
2747
2747
|
}) => /* @__PURE__ */ i.jsx(
|
|
2748
|
-
|
|
2748
|
+
Es.Provider,
|
|
2749
2749
|
{
|
|
2750
2750
|
value: {
|
|
2751
2751
|
id: e,
|
|
2752
2752
|
position: t,
|
|
2753
2753
|
isOpen: s,
|
|
2754
2754
|
setIsOpen: r,
|
|
2755
|
-
activeItemIndex:
|
|
2755
|
+
activeItemIndex: n,
|
|
2756
2756
|
setActiveItemIndex: l,
|
|
2757
2757
|
clearActiveItemIndex: o,
|
|
2758
2758
|
triggerRef: c,
|
|
2759
|
-
contentRef:
|
|
2759
|
+
contentRef: d
|
|
2760
2760
|
},
|
|
2761
2761
|
children: m
|
|
2762
2762
|
}
|
|
2763
|
-
),
|
|
2764
|
-
const e =
|
|
2763
|
+
), Ps = () => {
|
|
2764
|
+
const e = f.useContext(Es);
|
|
2765
2765
|
if (e === void 0)
|
|
2766
2766
|
throw new Error("useMenu must be used within a MenuProvider");
|
|
2767
2767
|
return e;
|
|
2768
|
-
},
|
|
2768
|
+
}, Mi = ({ as: e, children: t }) => {
|
|
2769
2769
|
const {
|
|
2770
2770
|
id: s,
|
|
2771
2771
|
position: r,
|
|
2772
|
-
isOpen:
|
|
2772
|
+
isOpen: n,
|
|
2773
2773
|
setIsOpen: l,
|
|
2774
2774
|
activeItemIndex: o,
|
|
2775
2775
|
setActiveItemIndex: c,
|
|
2776
|
-
clearActiveItemIndex:
|
|
2776
|
+
clearActiveItemIndex: d,
|
|
2777
2777
|
triggerRef: m,
|
|
2778
2778
|
contentRef: h
|
|
2779
|
-
} =
|
|
2779
|
+
} = Ps(), u = (v) => {
|
|
2780
2780
|
var g;
|
|
2781
|
-
if (!
|
|
2781
|
+
if (!n)
|
|
2782
2782
|
return;
|
|
2783
2783
|
if (v.key === "Escape")
|
|
2784
|
-
return
|
|
2785
|
-
const S = v.shiftKey, _ =
|
|
2784
|
+
return d(), l(!1), (g = m.current) == null ? void 0 : g.focus();
|
|
2785
|
+
const S = v.shiftKey, _ = As(h.current).length - 1;
|
|
2786
2786
|
switch (v.key) {
|
|
2787
2787
|
case "Tab": {
|
|
2788
2788
|
if (S && o !== 0)
|
|
@@ -2809,12 +2809,12 @@ var js = d.createContext(void 0), Pi = ({
|
|
|
2809
2809
|
return v.preventDefault(), c(_);
|
|
2810
2810
|
}
|
|
2811
2811
|
};
|
|
2812
|
-
return e ?
|
|
2812
|
+
return e ? f.createElement(
|
|
2813
2813
|
e,
|
|
2814
2814
|
{
|
|
2815
2815
|
id: `${s}-content`,
|
|
2816
2816
|
ref: h,
|
|
2817
|
-
className:
|
|
2817
|
+
className: R("menu__list", `menu__list--${r}`, n && "menu__list--active"),
|
|
2818
2818
|
onKeyDown: u
|
|
2819
2819
|
},
|
|
2820
2820
|
t
|
|
@@ -2825,51 +2825,51 @@ var js = d.createContext(void 0), Pi = ({
|
|
|
2825
2825
|
{
|
|
2826
2826
|
id: `${s}-content`,
|
|
2827
2827
|
ref: h,
|
|
2828
|
-
className:
|
|
2828
|
+
className: R("menu__list", `menu__list--${r}`, n && "menu__list--active"),
|
|
2829
2829
|
onKeyDown: u,
|
|
2830
2830
|
children: t
|
|
2831
2831
|
}
|
|
2832
2832
|
)
|
|
2833
2833
|
);
|
|
2834
|
-
},
|
|
2835
|
-
var t = e, { children: s, className: r } = t,
|
|
2836
|
-
return /* @__PURE__ */ i.jsx("li",
|
|
2837
|
-
},
|
|
2838
|
-
const { id: s, isOpen: r, setIsOpen:
|
|
2839
|
-
l(),
|
|
2834
|
+
}, Ri = (e) => {
|
|
2835
|
+
var t = e, { children: s, className: r } = t, n = L(t, ["children", "className"]);
|
|
2836
|
+
return /* @__PURE__ */ i.jsx("li", A(x({}, n), { className: R("menu__list-item", r), children: s }));
|
|
2837
|
+
}, ks = ({ children: e, className: t }) => {
|
|
2838
|
+
const { id: s, isOpen: r, setIsOpen: n, clearActiveItemIndex: l, setActiveItemIndex: o, triggerRef: c } = Ps(), d = () => {
|
|
2839
|
+
l(), n((h) => !h), r || o(0);
|
|
2840
2840
|
}, m = (h) => {
|
|
2841
2841
|
if (r) {
|
|
2842
2842
|
if (h.key === "Escape")
|
|
2843
|
-
return l(),
|
|
2843
|
+
return l(), n(!1);
|
|
2844
2844
|
h.key === "ArrowDown" && (h.preventDefault(), o(0));
|
|
2845
2845
|
}
|
|
2846
2846
|
};
|
|
2847
|
-
return
|
|
2847
|
+
return f.cloneElement(e, {
|
|
2848
2848
|
id: `${s}-trigger`,
|
|
2849
2849
|
ref: c,
|
|
2850
|
-
className:
|
|
2851
|
-
onClick:
|
|
2850
|
+
className: R("menu__trigger", t),
|
|
2851
|
+
onClick: d,
|
|
2852
2852
|
onKeyDown: m,
|
|
2853
2853
|
"aria-expanded": r,
|
|
2854
2854
|
"aria-controls": `${s}-content`
|
|
2855
2855
|
});
|
|
2856
2856
|
};
|
|
2857
|
-
|
|
2858
|
-
var
|
|
2859
|
-
var t = e, { type: s, id: r, position:
|
|
2860
|
-
const
|
|
2861
|
-
g !== _ && g !== void 0 && h.current && (
|
|
2857
|
+
ks.displayName = "Trigger";
|
|
2858
|
+
var As = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], W = (e) => {
|
|
2859
|
+
var t = e, { type: s, id: r, position: n = "bottom-end", children: l, className: o } = t, c = L(t, ["type", "id", "position", "children", "className"]);
|
|
2860
|
+
const d = f.useRef(null), m = f.useRef(null), h = f.useRef(null), [u, v] = f.useState(!1), [g, S] = f.useState(), [_, P] = f.useState(g);
|
|
2861
|
+
g !== _ && g !== void 0 && h.current && (As(h.current)[g].firstChild.focus(), P(g));
|
|
2862
2862
|
const C = () => {
|
|
2863
2863
|
S(void 0), P(void 0);
|
|
2864
2864
|
}, j = (b) => {
|
|
2865
2865
|
var M;
|
|
2866
|
-
((M =
|
|
2866
|
+
((M = d.current) == null ? void 0 : M.contains(b.relatedTarget)) || (C(), v(!1));
|
|
2867
2867
|
};
|
|
2868
2868
|
return /* @__PURE__ */ i.jsx(
|
|
2869
|
-
|
|
2869
|
+
Ni,
|
|
2870
2870
|
{
|
|
2871
2871
|
id: r,
|
|
2872
|
-
position:
|
|
2872
|
+
position: n,
|
|
2873
2873
|
isOpen: u,
|
|
2874
2874
|
setIsOpen: v,
|
|
2875
2875
|
activeItemIndex: g,
|
|
@@ -2877,11 +2877,11 @@ var Es = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsBy
|
|
|
2877
2877
|
clearActiveItemIndex: C,
|
|
2878
2878
|
triggerRef: m,
|
|
2879
2879
|
contentRef: h,
|
|
2880
|
-
children:
|
|
2880
|
+
children: f.createElement(
|
|
2881
2881
|
s,
|
|
2882
|
-
|
|
2882
|
+
A(x({}, c), {
|
|
2883
2883
|
id: r,
|
|
2884
|
-
ref:
|
|
2884
|
+
ref: d,
|
|
2885
2885
|
className: `menu ${o || ""}`,
|
|
2886
2886
|
onBlur: j
|
|
2887
2887
|
}),
|
|
@@ -2890,70 +2890,70 @@ var Es = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsBy
|
|
|
2890
2890
|
}
|
|
2891
2891
|
);
|
|
2892
2892
|
};
|
|
2893
|
-
W.Trigger =
|
|
2894
|
-
W.Content =
|
|
2895
|
-
W.Item =
|
|
2896
|
-
|
|
2897
|
-
var
|
|
2898
|
-
[...new Set(
|
|
2893
|
+
W.Trigger = ks;
|
|
2894
|
+
W.Content = Mi;
|
|
2895
|
+
W.Item = Ri;
|
|
2896
|
+
f.createContext(void 0);
|
|
2897
|
+
var Oi = (/* @__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");
|
|
2898
|
+
[...new Set(Oi.values())].map((e) => ({
|
|
2899
2899
|
label: `+${e}`,
|
|
2900
2900
|
value: e
|
|
2901
2901
|
}));
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
var
|
|
2905
|
-
const
|
|
2902
|
+
f.createContext(void 0);
|
|
2903
|
+
f.createContext(void 0);
|
|
2904
|
+
var st = /* @__PURE__ */ ((e) => (e[e.categoriesVegetables = 0] = "categoriesVegetables", e[e.categoriesMeat = 1] = "categoriesMeat", e[e.categoriesFish = 2] = "categoriesFish", e[e.categoriesDairy = 3] = "categoriesDairy", e[e.categoriesBreakfast = 4] = "categoriesBreakfast", e[e.categoriesSnacks = 5] = "categoriesSnacks", e[e.categoriesCandy = 6] = "categoriesCandy", e[e.categoriesNonFood = 7] = "categoriesNonFood", e[e.categoriesDryFood = 8] = "categoriesDryFood", e[e.categoriesTins = 9] = "categoriesTins", e[e.categoriesGrid = 10] = "categoriesGrid", e[e.categoriesSoda = 11] = "categoriesSoda", e[e.categoriesBakery = 12] = "categoriesBakery", e[e.categoriesWine = 13] = "categoriesWine", e[e.categoriesBaby = 14] = "categoriesBaby", e[e.categoriesDiet = 15] = "categoriesDiet", e[e.categoriesHygiene = 16] = "categoriesHygiene", e[e.categoriesCleaning = 17] = "categoriesCleaning", e[e.categoriesPets = 18] = "categoriesPets", e[e.categoriesFreezer = 19] = "categoriesFreezer", e[e.categoriesBbq = 20] = "categoriesBbq", e[e.categoriesMealbox = 21] = "categoriesMealbox", e[e.categoriesBrik = 22] = "categoriesBrik", e[e.categoriesGranen = 23] = "categoriesGranen", e[e.categoriesConserve = 24] = "categoriesConserve", e[e.categoriesHome = 25] = "categoriesHome", e[e.categoriesEaster = 26] = "categoriesEaster", e[e.categoriesOnlinePromo = 27] = "categoriesOnlinePromo", e[e.categoriesSportFood = 28] = "categoriesSportFood", e[e.categoriesClothing = 29] = "categoriesClothing", e[e.categoriesEnergy = 30] = "categoriesEnergy", e[e.categoriesDeskAndTravel = 31] = "categoriesDeskAndTravel", e[e.categoriesCigarette = 32] = "categoriesCigarette", e[e.categoriesFood = 33] = "categoriesFood", e[e.categoriesChild = 34] = "categoriesChild", e[e.categoriesPuzzle = 35] = "categoriesPuzzle", e[e.categoriesToys = 36] = "categoriesToys", e[e.categoriesCar = 37] = "categoriesCar", e[e.categoriesPlaceholder = 38] = "categoriesPlaceholder", e[e.categoriesFuel = 39] = "categoriesFuel", e[e.categoriesCarAndBike = 40] = "categoriesCarAndBike", e[e.categoriesToyAndHobby = 41] = "categoriesToyAndHobby", e[e.categoriesMultimedia = 42] = "categoriesMultimedia", e[e.categoriesParty = 43] = "categoriesParty", e[e.toolsPay = 44] = "toolsPay", e[e.toolsReceipt = 45] = "toolsReceipt", e[e.toolsFuel = 46] = "toolsFuel", e[e.toolsStoreLocator = 47] = "toolsStoreLocator", e[e.toolsStats = 48] = "toolsStats", e[e.toolsShowXtraOld = 49] = "toolsShowXtraOld", e[e.toolsShowXtraNew = 50] = "toolsShowXtraNew", e[e.toolsScan2 = 51] = "toolsScan2", e[e.toolsRecipes2 = 52] = "toolsRecipes2", e[e.toolsWarranty = 53] = "toolsWarranty", e[e.toolsCoupons = 54] = "toolsCoupons", e[e.toolsFavoriteInactive = 55] = "toolsFavoriteInactive", e[e.toolsFavoriteActive = 56] = "toolsFavoriteActive", e[e.toolsAssortment = 57] = "toolsAssortment", e[e.toolsPromo = 58] = "toolsPromo", e[e.fuelCng = 59] = "fuelCng", e[e.fuelE5 = 60] = "fuelE5", e[e.fuelAdblue = 61] = "fuelAdblue", e[e.fuelB7 = 62] = "fuelB7", e[e.fuelH2 = 63] = "fuelH2", e[e.fuelE10 = 64] = "fuelE10", e[e.fuelFreeTireInflation = 65] = "fuelFreeTireInflation", e[e.functionalClose = 66] = "functionalClose", e[e.functionalBack = 67] = "functionalBack", e[e.functionalSearch = 68] = "functionalSearch", e[e.functionalEdit = 69] = "functionalEdit", e[e.functionalShare = 70] = "functionalShare", e[e.functionalLocation = 71] = "functionalLocation", e[e.functionalTrash = 72] = "functionalTrash", e[e.functionalCamera = 73] = "functionalCamera", e[e.functionalPhone = 74] = "functionalPhone", e[e.functionalPushNotifications = 75] = "functionalPushNotifications", e[e.functionalMail = 76] = "functionalMail", e[e.functionalGift = 77] = "functionalGift", e[e.functionalPresent = 78] = "functionalPresent", e[e.functionalLoading = 79] = "functionalLoading", e[e.functionalChevronRight = 80] = "functionalChevronRight", e[e.functionalCheck = 81] = "functionalCheck", e[e.functionalChevronDown = 82] = "functionalChevronDown", e[e.functionalChevronUp = 83] = "functionalChevronUp", e[e.functionalPlus = 84] = "functionalPlus", e[e.functionalReset = 85] = "functionalReset", e[e.functionalDownload = 86] = "functionalDownload", e[e.functionalExport = 87] = "functionalExport", e[e.functionalCustomerService = 88] = "functionalCustomerService", e[e.functionalTruck = 89] = "functionalTruck", e[e.functionalBox = 90] = "functionalBox", e[e.functionalEllipsis = 91] = "functionalEllipsis", e[e.functionalLocationHome = 92] = "functionalLocationHome", e[e.functionalLocationPickup = 93] = "functionalLocationPickup", e[e.functionalAccount = 94] = "functionalAccount", e[e.functionalPrivacy = 95] = "functionalPrivacy", e[e.functionalSettings = 96] = "functionalSettings", e[e.functionalUserInfo = 97] = "functionalUserInfo", e[e.functionalPinOutlines = 98] = "functionalPinOutlines", e[e.functionalCalendar = 99] = "functionalCalendar", e[e.functionalMinus = 100] = "functionalMinus", e[e.functionalLifestyle = 101] = "functionalLifestyle", e[e.functionalSms = 102] = "functionalSms", e[e.functionalSwitch = 103] = "functionalSwitch", e[e.functionalSorting = 104] = "functionalSorting", e[e.functionalWarningCircle = 105] = "functionalWarningCircle", e[e.functionalQuestionCircle = 106] = "functionalQuestionCircle", e[e.functionalErrorCircle = 107] = "functionalErrorCircle", e[e.functionalSuccessCircle = 108] = "functionalSuccessCircle", e[e.functionalMessage = 109] = "functionalMessage", e[e.functionalExternalLink = 110] = "functionalExternalLink", e[e.functionalAddToList = 111] = "functionalAddToList", e[e.functionalShoppingcart = 112] = "functionalShoppingcart", e[e.functionalFilter = 113] = "functionalFilter", e[e.functionalLocate = 114] = "functionalLocate", e[e.functionalBarcode = 115] = "functionalBarcode", e[e.functionalClock = 116] = "functionalClock", e[e.functionalHistory = 117] = "functionalHistory", e[e.functionalShops = 118] = "functionalShops", e[e.functionalAddUser = 119] = "functionalAddUser", e[e.functionalOther = 120] = "functionalOther", e[e.functionalInAppNotifications = 121] = "functionalInAppNotifications", e[e.functionalExit = 122] = "functionalExit", e[e.functionalShared = 123] = "functionalShared", e[e.functionalThumbsup = 124] = "functionalThumbsup", e[e.functionalDiscount = 125] = "functionalDiscount", e[e.functionalPercentage = 126] = "functionalPercentage", e[e.functionalList = 127] = "functionalList", e[e.functionalMapLocation = 128] = "functionalMapLocation", e[e.functionalNoConnection = 129] = "functionalNoConnection", e[e.functionalSwap = 130] = "functionalSwap", e[e.functionalPiece = 131] = "functionalPiece", e[e.functionalWeight = 132] = "functionalWeight", e[e.functionalPack = 133] = "functionalPack", e[e.functionalCommunications = 134] = "functionalCommunications", e[e.functionalDeliveryAddresses = 135] = "functionalDeliveryAddresses", e[e["functional18+"] = 136] = "functional18+", e[e.functionalReadtime = 137] = "functionalReadtime", e[e.functionalCopy = 138] = "functionalCopy", e[e.functionalMessageField = 139] = "functionalMessageField", e[e.functionalNext = 140] = "functionalNext", e[e.functionalSave = 141] = "functionalSave", e[e.functionalLogin = 142] = "functionalLogin", e[e.functionalLogout = 143] = "functionalLogout", e[e.functionalWebsite = 144] = "functionalWebsite", e[e.functionalMenu = 145] = "functionalMenu", e[e.functionalRegister = 146] = "functionalRegister", e[e.functionalNews = 147] = "functionalNews", e[e.functionalTimer = 148] = "functionalTimer", e[e.functionalEyeShow = 149] = "functionalEyeShow", e[e.functionalMobilePay = 150] = "functionalMobilePay", e[e.functionalConnectionCable = 151] = "functionalConnectionCable", e[e.functionalDryCleaning = 152] = "functionalDryCleaning", e[e.functionalKiosk = 153] = "functionalKiosk", e[e.functionalConnectedDevice = 154] = "functionalConnectedDevice", e[e.functionalCookies = 155] = "functionalCookies", e[e.functionalViewFile = 156] = "functionalViewFile", e[e.functionalLastAdded = 157] = "functionalLastAdded", e[e.functionalFirstAdded = 158] = "functionalFirstAdded", e[e.functionalStoreLayout = 159] = "functionalStoreLayout", e[e.functionalBlock = 160] = "functionalBlock", e[e.functionalChecklist = 161] = "functionalChecklist", e[e.functionalCartCheckout = 162] = "functionalCartCheckout", e[e.functionalCartEdit = 163] = "functionalCartEdit", e[e.functionalEyeHidden = 164] = "functionalEyeHidden", e[e.functionalWarningCircleFilled = 165] = "functionalWarningCircleFilled", e[e.functionalErrorCircleFilled = 166] = "functionalErrorCircleFilled", e[e.functionalSuccessCircleFilled = 167] = "functionalSuccessCircleFilled", e[e.functionalPlusCircle = 168] = "functionalPlusCircle", e[e.functionalSpinner = 169] = "functionalSpinner", e[e.functionalEcoEarth = 170] = "functionalEcoEarth", e[e.functionalAlphaBeta = 171] = "functionalAlphaBeta", e[e.functionalEuro = 172] = "functionalEuro", e[e.functionalNumber = 173] = "functionalNumber", e[e.functionalIdea = 174] = "functionalIdea", e[e.functionalMultifactorAuthenticator = 175] = "functionalMultifactorAuthenticator", e[e.functionalPassword = 176] = "functionalPassword", e[e.functionalDiscountCode = 177] = "functionalDiscountCode", e))(st || {});
|
|
2905
|
+
const Li = "/icons/bouMenuIcons.svg", Fi = ({
|
|
2906
2906
|
bouIconId: e,
|
|
2907
2907
|
...t
|
|
2908
|
-
}) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i.jsx("use", { href: `${
|
|
2908
|
+
}) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i.jsx("use", { href: `${Li}#${st[e]}` }) }), xt = (e) => typeof e.icon == "string" && e.icon in st ? /* @__PURE__ */ i.jsx(Fi, { bouIconId: st[e.icon] }) : e.icon, Di = ({
|
|
2909
2909
|
label: e,
|
|
2910
2910
|
className: t,
|
|
2911
2911
|
onClick: s,
|
|
2912
2912
|
icon: r
|
|
2913
2913
|
}) => /* @__PURE__ */ i.jsx(W.Item, { className: t, children: /* @__PURE__ */ i.jsxs("button", { onClick: s, children: [
|
|
2914
|
-
/* @__PURE__ */ i.jsx(
|
|
2914
|
+
/* @__PURE__ */ i.jsx(xt, { icon: r }),
|
|
2915
2915
|
e
|
|
2916
2916
|
] }) }), _e = (e) => {
|
|
2917
|
-
const t =
|
|
2917
|
+
const t = Qs(), { className: s, label: r, mobileUrl: n, desktopUrl: l, icon: o } = e;
|
|
2918
2918
|
return /* @__PURE__ */ i.jsxs(W.Item, { className: s, children: [
|
|
2919
|
-
(!t || t && !l) && /* @__PURE__ */ i.jsxs("a", { href:
|
|
2920
|
-
/* @__PURE__ */ i.jsx(
|
|
2919
|
+
(!t || t && !l) && /* @__PURE__ */ i.jsxs("a", { href: n, referrerPolicy: "no-referrer-when-downgrade", children: [
|
|
2920
|
+
/* @__PURE__ */ i.jsx(xt, { icon: o }),
|
|
2921
2921
|
r
|
|
2922
2922
|
] }),
|
|
2923
2923
|
!!l && /* @__PURE__ */ i.jsxs("a", { href: l, referrerPolicy: "no-referrer-when-downgrade", children: [
|
|
2924
|
-
/* @__PURE__ */ i.jsx(
|
|
2924
|
+
/* @__PURE__ */ i.jsx(xt, { icon: o }),
|
|
2925
2925
|
r
|
|
2926
2926
|
] })
|
|
2927
2927
|
] });
|
|
2928
|
-
},
|
|
2929
|
-
const e =
|
|
2928
|
+
}, Ns = f.createContext(void 0), Ti = ({ position: e, bouMenuItems: t, country: s, children: r }) => /* @__PURE__ */ i.jsx(Ns.Provider, { value: { position: e, bouMenuItems: t, country: s }, children: r }), Ms = () => {
|
|
2929
|
+
const e = f.useContext(Ns);
|
|
2930
2930
|
if (!e)
|
|
2931
2931
|
throw new Error("Authentication context can not be rendered outside of Authentication");
|
|
2932
2932
|
return e;
|
|
2933
|
-
},
|
|
2934
|
-
const e =
|
|
2933
|
+
}, Rs = f.createContext(void 0), Ui = ({ apiUrl: e, authUrl: t, redirectUrl: s, children: r }) => /* @__PURE__ */ i.jsx(Rs.Provider, { value: { apiUrl: e, authUrl: t, redirectUrl: s }, children: r }), Pt = () => {
|
|
2934
|
+
const e = f.useContext(Rs);
|
|
2935
2935
|
if (!e)
|
|
2936
2936
|
throw new Error("Api context can not be rendered outside of Api");
|
|
2937
2937
|
return e;
|
|
2938
|
-
},
|
|
2938
|
+
}, Os = ({ authUrl: e, redirectUrl: t, trackingInfo: s }) => {
|
|
2939
2939
|
const r = new URLSearchParams({ redirectUrl: t });
|
|
2940
2940
|
s && r.append("trackingInfo", s);
|
|
2941
|
-
const
|
|
2942
|
-
return { loginUrl:
|
|
2943
|
-
},
|
|
2944
|
-
const {
|
|
2945
|
-
return
|
|
2946
|
-
},
|
|
2947
|
-
const { apiUrl: e } =
|
|
2941
|
+
const n = `${e}/login?${r.toString()}`, l = `${e}/logout?${r.toString()}`;
|
|
2942
|
+
return { loginUrl: n, logoutUrl: l };
|
|
2943
|
+
}, rt = () => {
|
|
2944
|
+
const { authUrl: e, redirectUrl: t } = Pt(), s = Hs();
|
|
2945
|
+
return Os({ authUrl: e, redirectUrl: t, trackingInfo: s });
|
|
2946
|
+
}, Qi = () => {
|
|
2947
|
+
const { apiUrl: e } = Pt();
|
|
2948
2948
|
return `${`${e}/xtra`}/authentication/v1/user/profile`;
|
|
2949
|
-
},
|
|
2950
|
-
const { loginUrl: s } =
|
|
2949
|
+
}, Ht = (e) => e ? `+${e.countryCode} ${e.number}` : "", Kt = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), Gt = ({ apiUrl: e, redirectUrl: t }) => {
|
|
2950
|
+
const { loginUrl: s } = Os({ authUrl: e, redirectUrl: t });
|
|
2951
2951
|
window.location.replace(s);
|
|
2952
|
-
},
|
|
2952
|
+
}, qt = (e) => {
|
|
2953
2953
|
var l;
|
|
2954
2954
|
if (!e)
|
|
2955
|
-
return { user: { state: () => "NotAuthenticated" }, tryToLogon:
|
|
2956
|
-
const t = new Date(e.dateOfBirth), s =
|
|
2955
|
+
return { user: { state: () => "NotAuthenticated" }, tryToLogon: Gt };
|
|
2956
|
+
const t = new Date(e.dateOfBirth), s = Kt(At.Mobile, e.phone), r = Kt(At.Fixed, e.phone), n = Ht(s) ?? Ht(r) ?? "";
|
|
2957
2957
|
return {
|
|
2958
2958
|
user: {
|
|
2959
2959
|
...(l = window.XTRA) == null ? void 0 : l.user,
|
|
@@ -2963,7 +2963,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
2963
2963
|
mob: () => t.getMonth() + 1,
|
|
2964
2964
|
yob: () => t.getFullYear(),
|
|
2965
2965
|
gender: () => e.genderCode,
|
|
2966
|
-
phone: () =>
|
|
2966
|
+
phone: () => n,
|
|
2967
2967
|
streetName: () => {
|
|
2968
2968
|
var o;
|
|
2969
2969
|
return (o = e.address) == null ? void 0 : o.streetName;
|
|
@@ -2992,12 +2992,12 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
2992
2992
|
cbh: () => e.customerIdentifier,
|
|
2993
2993
|
state: () => "Authenticated"
|
|
2994
2994
|
},
|
|
2995
|
-
tryToLogon:
|
|
2995
|
+
tryToLogon: Gt
|
|
2996
2996
|
};
|
|
2997
|
-
},
|
|
2998
|
-
const { i18n: e } = je(), t =
|
|
2999
|
-
return
|
|
3000
|
-
queryKey:
|
|
2997
|
+
}, Ls = ["profile"], Fs = () => {
|
|
2998
|
+
const { i18n: e } = je(), t = Qi(), s = sessionStorage.getItem("profile"), r = !!s;
|
|
2999
|
+
return gs({
|
|
3000
|
+
queryKey: Ls,
|
|
3001
3001
|
queryFn: async () => {
|
|
3002
3002
|
const l = await fetch(t, {
|
|
3003
3003
|
credentials: "include",
|
|
@@ -3006,7 +3006,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3006
3006
|
});
|
|
3007
3007
|
if (!l.ok) {
|
|
3008
3008
|
if (l.status === 401)
|
|
3009
|
-
return window.XTRA = { ...window.XTRA, ...
|
|
3009
|
+
return window.XTRA = { ...window.XTRA, ...qt() }, window.postMessage(
|
|
3010
3010
|
{ source: "xtra-authentication", isAuthenticated: !1 },
|
|
3011
3011
|
new URL(window.location.href).origin
|
|
3012
3012
|
), sessionStorage.removeItem("profile"), { authenticationStatus: "NotAuthenticated" };
|
|
@@ -3014,11 +3014,11 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3014
3014
|
return { authenticationStatus: "Authenticated", profile: JSON.parse(s) };
|
|
3015
3015
|
throw new Error("Failed to retrieve profile");
|
|
3016
3016
|
}
|
|
3017
|
-
const o = await l.json(), { firstName: c, lastName:
|
|
3018
|
-
return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName:
|
|
3017
|
+
const o = await l.json(), { firstName: c, lastName: d } = o;
|
|
3018
|
+
return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName: d })), window.postMessage(
|
|
3019
3019
|
{ source: "xtra-authentication", isAuthenticated: !0 },
|
|
3020
3020
|
new URL(window.location.href).origin
|
|
3021
|
-
), window.XTRA = { ...window.XTRA, ...
|
|
3021
|
+
), window.XTRA = { ...window.XTRA, ...qt(o) }, {
|
|
3022
3022
|
authenticationStatus: "Authenticated",
|
|
3023
3023
|
profile: { firstName: o.firstName, lastName: o.lastName }
|
|
3024
3024
|
};
|
|
@@ -3030,24 +3030,24 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3030
3030
|
placeholderData: { authenticationStatus: "Pending" },
|
|
3031
3031
|
refetchOnWindowFocus: !1
|
|
3032
3032
|
});
|
|
3033
|
-
},
|
|
3034
|
-
const { t: e } = je(), { position: t, bouMenuItems: s, country: r } =
|
|
3033
|
+
}, Hi = () => {
|
|
3034
|
+
const { t: e } = je(), { position: t, bouMenuItems: s, country: r } = Ms(), n = ts({ country: r }), { logoutUrl: l } = rt(), c = St().getQueryData(Ls), d = (c == null ? void 0 : c.profile.firstName) ?? "", m = (c == null ? void 0 : c.profile.lastName) ?? "", h = () => {
|
|
3035
3035
|
sessionStorage.removeItem("profile"), window.location.href = l;
|
|
3036
3036
|
};
|
|
3037
3037
|
return /* @__PURE__ */ i.jsxs(W, { type: "nav", id: "xtra-menu", position: t, children: [
|
|
3038
3038
|
/* @__PURE__ */ i.jsx(
|
|
3039
3039
|
W.Trigger,
|
|
3040
3040
|
{
|
|
3041
|
-
className:
|
|
3041
|
+
className: R(
|
|
3042
3042
|
"button",
|
|
3043
3043
|
"button--neutral",
|
|
3044
3044
|
"button--authentication",
|
|
3045
3045
|
"button--authentication--authenticated"
|
|
3046
3046
|
),
|
|
3047
3047
|
children: /* @__PURE__ */ i.jsxs("button", { children: [
|
|
3048
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(
|
|
3049
|
-
/* @__PURE__ */ i.jsx("span", { className: "button__label", children:
|
|
3050
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(
|
|
3048
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Or, { variant: "small", firstName: d, lastName: m }) }),
|
|
3049
|
+
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: d }),
|
|
3050
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Et, {}) })
|
|
3051
3051
|
] })
|
|
3052
3052
|
}
|
|
3053
3053
|
),
|
|
@@ -3067,9 +3067,9 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3067
3067
|
_e,
|
|
3068
3068
|
{
|
|
3069
3069
|
className: "manage-profile",
|
|
3070
|
-
mobileUrl: `${
|
|
3071
|
-
desktopUrl: `${
|
|
3072
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
3070
|
+
mobileUrl: `${n}/manage-profile`,
|
|
3071
|
+
desktopUrl: `${n}/manage-profile/personal-data`,
|
|
3072
|
+
icon: /* @__PURE__ */ i.jsx(Yr, {}),
|
|
3073
3073
|
label: e("manageProfile")
|
|
3074
3074
|
}
|
|
3075
3075
|
),
|
|
@@ -3077,8 +3077,8 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3077
3077
|
_e,
|
|
3078
3078
|
{
|
|
3079
3079
|
className: "payment",
|
|
3080
|
-
mobileUrl: `${
|
|
3081
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
3080
|
+
mobileUrl: `${n}/payment`,
|
|
3081
|
+
icon: /* @__PURE__ */ i.jsx(ai, {}),
|
|
3082
3082
|
label: e("payment")
|
|
3083
3083
|
}
|
|
3084
3084
|
),
|
|
@@ -3086,16 +3086,16 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3086
3086
|
_e,
|
|
3087
3087
|
{
|
|
3088
3088
|
className: "gift-cards",
|
|
3089
|
-
mobileUrl: `${
|
|
3090
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
3089
|
+
mobileUrl: `${n}/gift-cards`,
|
|
3090
|
+
icon: /* @__PURE__ */ i.jsx(ii, {}),
|
|
3091
3091
|
label: e("giftCards")
|
|
3092
3092
|
}
|
|
3093
3093
|
),
|
|
3094
3094
|
/* @__PURE__ */ i.jsx(
|
|
3095
3095
|
_e,
|
|
3096
3096
|
{
|
|
3097
|
-
mobileUrl: `${
|
|
3098
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
3097
|
+
mobileUrl: `${n}/identifiers`,
|
|
3098
|
+
icon: /* @__PURE__ */ i.jsx(li, {}),
|
|
3099
3099
|
label: e("qrCode")
|
|
3100
3100
|
}
|
|
3101
3101
|
),
|
|
@@ -3103,32 +3103,108 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3103
3103
|
_e,
|
|
3104
3104
|
{
|
|
3105
3105
|
className: "manage-privacy",
|
|
3106
|
-
mobileUrl: `${
|
|
3107
|
-
desktopUrl: `${
|
|
3108
|
-
icon: /* @__PURE__ */ i.jsx(
|
|
3106
|
+
mobileUrl: `${n}/manage-privacy`,
|
|
3107
|
+
desktopUrl: `${n}/manage-privacy/permissions`,
|
|
3108
|
+
icon: /* @__PURE__ */ i.jsx(Zr, {}),
|
|
3109
3109
|
label: e("privacy")
|
|
3110
3110
|
}
|
|
3111
3111
|
),
|
|
3112
|
-
/* @__PURE__ */ i.jsx(
|
|
3112
|
+
/* @__PURE__ */ i.jsx(Di, { onClick: h, icon: /* @__PURE__ */ i.jsx(Vr, {}), label: e("logout") })
|
|
3113
3113
|
] })
|
|
3114
3114
|
] })
|
|
3115
3115
|
] });
|
|
3116
|
-
},
|
|
3116
|
+
}, Ki = () => {
|
|
3117
3117
|
const { t: e } = je();
|
|
3118
|
-
return /* @__PURE__ */ i.jsxs("button", { className:
|
|
3118
|
+
return /* @__PURE__ */ i.jsxs("button", { className: R("button", "button--neutral", "button--authentication"), children: [
|
|
3119
3119
|
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx("i", { className: "spinner" }) }),
|
|
3120
3120
|
/* @__PURE__ */ i.jsxs("span", { className: "button__label", children: [
|
|
3121
3121
|
e("loading"),
|
|
3122
3122
|
"..."
|
|
3123
3123
|
] })
|
|
3124
3124
|
] });
|
|
3125
|
-
}
|
|
3126
|
-
|
|
3127
|
-
|
|
3125
|
+
};
|
|
3126
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
3127
|
+
function Xe(e) {
|
|
3128
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
3129
|
+
var s = arguments[t];
|
|
3130
|
+
for (var r in s)
|
|
3131
|
+
e[r] = s[r];
|
|
3132
|
+
}
|
|
3133
|
+
return e;
|
|
3134
|
+
}
|
|
3135
|
+
var Gi = {
|
|
3136
|
+
read: function(e) {
|
|
3137
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
3138
|
+
},
|
|
3139
|
+
write: function(e) {
|
|
3140
|
+
return encodeURIComponent(e).replace(
|
|
3141
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
3142
|
+
decodeURIComponent
|
|
3143
|
+
);
|
|
3144
|
+
}
|
|
3145
|
+
};
|
|
3146
|
+
function bt(e, t) {
|
|
3147
|
+
function s(n, l, o) {
|
|
3148
|
+
if (!(typeof document > "u")) {
|
|
3149
|
+
o = Xe({}, t, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
3150
|
+
var c = "";
|
|
3151
|
+
for (var d in o)
|
|
3152
|
+
o[d] && (c += "; " + d, o[d] !== !0 && (c += "=" + o[d].split(";")[0]));
|
|
3153
|
+
return document.cookie = n + "=" + e.write(l, n) + c;
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
function r(n) {
|
|
3157
|
+
if (!(typeof document > "u" || arguments.length && !n)) {
|
|
3158
|
+
for (var l = document.cookie ? document.cookie.split("; ") : [], o = {}, c = 0; c < l.length; c++) {
|
|
3159
|
+
var d = l[c].split("="), m = d.slice(1).join("=");
|
|
3160
|
+
try {
|
|
3161
|
+
var h = decodeURIComponent(d[0]);
|
|
3162
|
+
if (o[h] = e.read(m, h), n === h)
|
|
3163
|
+
break;
|
|
3164
|
+
} catch {
|
|
3165
|
+
}
|
|
3166
|
+
}
|
|
3167
|
+
return n ? o[n] : o;
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
return Object.create(
|
|
3171
|
+
{
|
|
3172
|
+
set: s,
|
|
3173
|
+
get: r,
|
|
3174
|
+
remove: function(n, l) {
|
|
3175
|
+
s(
|
|
3176
|
+
n,
|
|
3177
|
+
"",
|
|
3178
|
+
Xe({}, l, {
|
|
3179
|
+
expires: -1
|
|
3180
|
+
})
|
|
3181
|
+
);
|
|
3182
|
+
},
|
|
3183
|
+
withAttributes: function(n) {
|
|
3184
|
+
return bt(this.converter, Xe({}, this.attributes, n));
|
|
3185
|
+
},
|
|
3186
|
+
withConverter: function(n) {
|
|
3187
|
+
return bt(Xe({}, this.converter, n), this.attributes);
|
|
3188
|
+
}
|
|
3189
|
+
},
|
|
3190
|
+
{
|
|
3191
|
+
attributes: { value: Object.freeze(t) },
|
|
3192
|
+
converter: { value: Object.freeze(e) }
|
|
3193
|
+
}
|
|
3194
|
+
);
|
|
3195
|
+
}
|
|
3196
|
+
var Wt = bt(Gi, { path: "/" });
|
|
3197
|
+
const qi = ({ className: e }) => {
|
|
3198
|
+
const { t } = je(), { loginUrl: s } = rt(), r = f.useRef(null);
|
|
3199
|
+
return f.useEffect(() => {
|
|
3200
|
+
const n = Wt.get("shouldLogin"), l = !!n && !!atob(n);
|
|
3201
|
+
r != null && r.current && l && (Wt.remove("shouldLogin"), r.current.click());
|
|
3202
|
+
}, [r]), /* @__PURE__ */ i.jsxs(
|
|
3128
3203
|
"a",
|
|
3129
3204
|
{
|
|
3205
|
+
ref: r,
|
|
3130
3206
|
href: s,
|
|
3131
|
-
className:
|
|
3207
|
+
className: R(
|
|
3132
3208
|
"button",
|
|
3133
3209
|
"button--neutral",
|
|
3134
3210
|
"button--authentication",
|
|
@@ -3136,14 +3212,14 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3136
3212
|
e
|
|
3137
3213
|
),
|
|
3138
3214
|
children: [
|
|
3139
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(
|
|
3215
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(bs, { width: 24, height: 24, suffix: "desktop" }) }),
|
|
3140
3216
|
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: t("login") }),
|
|
3141
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(
|
|
3217
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Et, {}) })
|
|
3142
3218
|
]
|
|
3143
3219
|
}
|
|
3144
3220
|
);
|
|
3145
|
-
},
|
|
3146
|
-
const { t: e } = je(), { loginUrl: t } =
|
|
3221
|
+
}, Wi = () => {
|
|
3222
|
+
const { t: e } = je(), { loginUrl: t } = rt(), s = ts(), { position: r } = Ms();
|
|
3147
3223
|
return /* @__PURE__ */ i.jsxs(
|
|
3148
3224
|
W,
|
|
3149
3225
|
{
|
|
@@ -3153,56 +3229,56 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3153
3229
|
className: "menu--unauthenticated",
|
|
3154
3230
|
"aria-label": e("xtraMenuAriaLabel"),
|
|
3155
3231
|
children: [
|
|
3156
|
-
/* @__PURE__ */ i.jsx(W.Trigger, { className:
|
|
3157
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(
|
|
3158
|
-
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(
|
|
3232
|
+
/* @__PURE__ */ i.jsx(W.Trigger, { className: R("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
|
|
3233
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(bs, { width: 24, height: 24, suffix: "mobile" }) }),
|
|
3234
|
+
/* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Et, {}) })
|
|
3159
3235
|
] }) }),
|
|
3160
3236
|
/* @__PURE__ */ i.jsxs(W.Content, { children: [
|
|
3161
3237
|
/* @__PURE__ */ i.jsx(W.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: t, className: "button button--with-icon", children: [
|
|
3162
|
-
/* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(
|
|
3238
|
+
/* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(qr, {}) }),
|
|
3163
3239
|
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("login") })
|
|
3164
3240
|
] }) }),
|
|
3165
3241
|
/* @__PURE__ */ i.jsx(W.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
|
|
3166
|
-
/* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(
|
|
3242
|
+
/* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Xr, {}) }),
|
|
3167
3243
|
/* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("register") })
|
|
3168
3244
|
] }) })
|
|
3169
3245
|
] })
|
|
3170
3246
|
]
|
|
3171
3247
|
}
|
|
3172
3248
|
);
|
|
3173
|
-
},
|
|
3249
|
+
}, Vi = () => {
|
|
3174
3250
|
var t, s;
|
|
3175
|
-
const e =
|
|
3176
|
-
return ((t = e.data) == null ? void 0 : t.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ i.jsx(
|
|
3177
|
-
/* @__PURE__ */ i.jsx(
|
|
3178
|
-
/* @__PURE__ */ i.jsx(
|
|
3179
|
-
] }) : /* @__PURE__ */ i.jsx(
|
|
3180
|
-
},
|
|
3181
|
-
const { apiUrl: e } =
|
|
3251
|
+
const e = Fs();
|
|
3252
|
+
return ((t = e.data) == null ? void 0 : t.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ i.jsx(Hi, {}) : ((s = e.data) == null ? void 0 : s.authenticationStatus) === "NotAuthenticated" || e.isError ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
3253
|
+
/* @__PURE__ */ i.jsx(qi, {}),
|
|
3254
|
+
/* @__PURE__ */ i.jsx(Wi, {})
|
|
3255
|
+
] }) : /* @__PURE__ */ i.jsx(Ki, {});
|
|
3256
|
+
}, Ds = () => {
|
|
3257
|
+
const { apiUrl: e } = Pt();
|
|
3182
3258
|
return `${`${e}/xtra`}/authentication/v1/gdpr`;
|
|
3183
|
-
},
|
|
3184
|
-
const e =
|
|
3185
|
-
return
|
|
3259
|
+
}, $i = () => {
|
|
3260
|
+
const e = Ds(), t = new ds();
|
|
3261
|
+
return wr({
|
|
3186
3262
|
mutationFn: async (r) => {
|
|
3187
|
-
const
|
|
3263
|
+
const n = await fetch(`${e}/tc`, {
|
|
3188
3264
|
body: JSON.stringify({ acceptedTC: r }),
|
|
3189
3265
|
credentials: "include",
|
|
3190
3266
|
headers: { "Content-Type": "application/json" },
|
|
3191
3267
|
method: "POST",
|
|
3192
3268
|
mode: "cors"
|
|
3193
3269
|
});
|
|
3194
|
-
if (!
|
|
3270
|
+
if (!n.ok)
|
|
3195
3271
|
throw new Error("Network response was not ok");
|
|
3196
|
-
return
|
|
3272
|
+
return n;
|
|
3197
3273
|
},
|
|
3198
3274
|
onSuccess: async () => {
|
|
3199
3275
|
await t.invalidateQueries({ queryKey: ["gdpr"] });
|
|
3200
3276
|
}
|
|
3201
3277
|
});
|
|
3202
|
-
},
|
|
3278
|
+
}, Zi = () => {
|
|
3203
3279
|
var l;
|
|
3204
|
-
const { i18n: e } = je(), t =
|
|
3205
|
-
return
|
|
3280
|
+
const { i18n: e } = je(), t = Ds(), r = ((l = Fs().data) == null ? void 0 : l.authenticationStatus) === "Authenticated";
|
|
3281
|
+
return gs({
|
|
3206
3282
|
queryKey: ["gdpr"],
|
|
3207
3283
|
queryFn: async () => {
|
|
3208
3284
|
const o = await fetch(`${t}/tc/check`, {
|
|
@@ -3216,19 +3292,19 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3216
3292
|
},
|
|
3217
3293
|
enabled: r
|
|
3218
3294
|
});
|
|
3219
|
-
},
|
|
3295
|
+
}, zi = () => {
|
|
3220
3296
|
var P;
|
|
3221
|
-
const { t: e } = je(), { logoutUrl: t } =
|
|
3222
|
-
|
|
3297
|
+
const { t: e } = je(), { logoutUrl: t } = rt(), [s, r] = f.useState(0), [n, l] = f.useState({}), { AccessibleFormMessage: o, formRef: c } = Ks({ submitCount: s, errors: n }), { mutate: d, isError: m } = $i(), h = Zi(), [u, v] = f.useState(!1);
|
|
3298
|
+
Gs({ element: "xtra-authentication" });
|
|
3223
3299
|
const g = e("termsAndConditions.error.required"), S = () => {
|
|
3224
3300
|
v(!1), document.body.style.removeProperty("overflow");
|
|
3225
3301
|
};
|
|
3226
|
-
|
|
3302
|
+
f.useEffect(() => {
|
|
3227
3303
|
var C;
|
|
3228
3304
|
(C = h.data) != null && C.length && v(!0);
|
|
3229
|
-
}, [(P = h.data) == null ? void 0 : P.length]),
|
|
3305
|
+
}, [(P = h.data) == null ? void 0 : P.length]), f.useEffect(() => {
|
|
3230
3306
|
u && document.body.style.setProperty("overflow", "hidden");
|
|
3231
|
-
}, [u]),
|
|
3307
|
+
}, [u]), f.useEffect(() => {
|
|
3232
3308
|
m && l({ acceptedTC: g });
|
|
3233
3309
|
}, [g, m]);
|
|
3234
3310
|
const _ = (C) => {
|
|
@@ -3236,18 +3312,18 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3236
3312
|
const { acceptedTC: j } = C.target;
|
|
3237
3313
|
if (j instanceof RadioNodeList) {
|
|
3238
3314
|
const b = Object.values(j);
|
|
3239
|
-
b.every((F) => F.checked) ? (l({}),
|
|
3315
|
+
b.every((F) => F.checked) ? (l({}), d(b.map((F) => F.value)), S()) : l({ acceptedTC: g });
|
|
3240
3316
|
} else
|
|
3241
|
-
j != null && j.checked ? (l({}),
|
|
3317
|
+
j != null && j.checked ? (l({}), d([j.value]), S()) : l({ acceptedTC: g });
|
|
3242
3318
|
};
|
|
3243
3319
|
return u ? /* @__PURE__ */ i.jsxs(G, { defaultOpen: u, isModal: !0, children: [
|
|
3244
3320
|
o,
|
|
3245
3321
|
/* @__PURE__ */ i.jsxs(G.Root, { children: [
|
|
3246
|
-
/* @__PURE__ */ i.jsx(G.Header, { children: /* @__PURE__ */ i.jsx(G.Title, { icon: /* @__PURE__ */ i.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ i.jsx(
|
|
3247
|
-
/* @__PURE__ */ i.jsx(G.Body, { children: /* @__PURE__ */ i.jsxs(
|
|
3248
|
-
/* @__PURE__ */ i.jsxs(
|
|
3322
|
+
/* @__PURE__ */ i.jsx(G.Header, { children: /* @__PURE__ */ i.jsx(G.Title, { icon: /* @__PURE__ */ i.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ i.jsx(Ii, { children: e("termsAndConditions.title") }) }) }),
|
|
3323
|
+
/* @__PURE__ */ i.jsx(G.Body, { children: /* @__PURE__ */ i.jsxs(Ts, { ref: c, id: "tc-form", onSubmit: _, children: [
|
|
3324
|
+
/* @__PURE__ */ i.jsxs(Ji, { children: [
|
|
3249
3325
|
e("termsAndConditions.description"),
|
|
3250
|
-
|
|
3326
|
+
n.acceptedTC && /* @__PURE__ */ i.jsx(Bi, { children: g })
|
|
3251
3327
|
] }),
|
|
3252
3328
|
h.data.map(({ tcCode: C, title: j, URL: b }) => /* @__PURE__ */ i.jsx(
|
|
3253
3329
|
we,
|
|
@@ -3257,8 +3333,8 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3257
3333
|
name: "acceptedTC",
|
|
3258
3334
|
variant: "primary",
|
|
3259
3335
|
children: /* @__PURE__ */ i.jsxs(we.Content, { children: [
|
|
3260
|
-
/* @__PURE__ */ i.jsx(
|
|
3261
|
-
/* @__PURE__ */ i.jsx(
|
|
3336
|
+
/* @__PURE__ */ i.jsx(Yi, { children: j }),
|
|
3337
|
+
/* @__PURE__ */ i.jsx(Xi, { href: b, children: e("termsAndConditions.action", { title: j }) })
|
|
3262
3338
|
] })
|
|
3263
3339
|
},
|
|
3264
3340
|
C
|
|
@@ -3268,7 +3344,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3268
3344
|
/* @__PURE__ */ i.jsx(
|
|
3269
3345
|
"a",
|
|
3270
3346
|
{
|
|
3271
|
-
className:
|
|
3347
|
+
className: R("button", "button--secondary", "button--terms-and-conditions"),
|
|
3272
3348
|
href: t,
|
|
3273
3349
|
children: e("logout")
|
|
3274
3350
|
}
|
|
@@ -3277,15 +3353,15 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
|
|
|
3277
3353
|
] })
|
|
3278
3354
|
] })
|
|
3279
3355
|
] }) : null;
|
|
3280
|
-
},
|
|
3356
|
+
}, Yi = ({
|
|
3281
3357
|
children: e,
|
|
3282
3358
|
...t
|
|
3283
|
-
}) => /* @__PURE__ */ i.jsx(we.Label, { className: "form--tc__label", ...t, children: e }),
|
|
3284
|
-
|
|
3285
|
-
const
|
|
3359
|
+
}) => /* @__PURE__ */ i.jsx(we.Label, { className: "form--tc__label", ...t, children: e }), Ts = f.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
|
|
3360
|
+
Ts.displayName = "TermsAndConditionsForm";
|
|
3361
|
+
const Ji = ({
|
|
3286
3362
|
children: e,
|
|
3287
3363
|
...t
|
|
3288
|
-
}) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...t, children: e }),
|
|
3364
|
+
}) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...t, children: e }), Xi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx(
|
|
3289
3365
|
"a",
|
|
3290
3366
|
{
|
|
3291
3367
|
className: "form--tc__link",
|
|
@@ -3296,26 +3372,27 @@ const $i = ({
|
|
|
3296
3372
|
...t,
|
|
3297
3373
|
children: e
|
|
3298
3374
|
}
|
|
3299
|
-
),
|
|
3375
|
+
), Ii = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), Bi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), en = new ds(), rn = ({
|
|
3300
3376
|
environment: e,
|
|
3301
3377
|
redirectUrl: t,
|
|
3302
3378
|
apiUrl: s,
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3379
|
+
authUrl: r,
|
|
3380
|
+
position: n,
|
|
3381
|
+
commerceId: l,
|
|
3382
|
+
bouMenuItems: o,
|
|
3383
|
+
country: c
|
|
3384
|
+
}) => /* @__PURE__ */ i.jsx(qs, { environment: e, children: /* @__PURE__ */ i.jsx(Ws, { commerceId: l, children: /* @__PURE__ */ i.jsx(Ui, { apiUrl: s, authUrl: r, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(cr, { client: en, children: [
|
|
3308
3385
|
/* @__PURE__ */ i.jsx(
|
|
3309
|
-
|
|
3386
|
+
Ti,
|
|
3310
3387
|
{
|
|
3311
|
-
position:
|
|
3312
|
-
bouMenuItems:
|
|
3313
|
-
country:
|
|
3314
|
-
children: /* @__PURE__ */ i.jsx(
|
|
3388
|
+
position: n,
|
|
3389
|
+
bouMenuItems: o,
|
|
3390
|
+
country: c,
|
|
3391
|
+
children: /* @__PURE__ */ i.jsx(Vi, {})
|
|
3315
3392
|
}
|
|
3316
3393
|
),
|
|
3317
|
-
/* @__PURE__ */ i.jsx(
|
|
3394
|
+
/* @__PURE__ */ i.jsx(zi, {})
|
|
3318
3395
|
] }) }) }) });
|
|
3319
3396
|
export {
|
|
3320
|
-
|
|
3397
|
+
rn as default
|
|
3321
3398
|
};
|