@myxtra/authentication-green 1.11.0 → 1.12.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,4 +1,4 @@
|
|
|
1
|
-
import { r as d, j as n, g as
|
|
1
|
+
import { r as d, j as n, g as xt, u as H, a as Qe, P as Se, b as bt, E as wt } from "./index-7ce3748d.mjs";
|
|
2
2
|
class V {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
@@ -22,13 +22,13 @@ class V {
|
|
|
22
22
|
const Z = typeof window > "u" || "Deno" in window;
|
|
23
23
|
function N() {
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function jt(e, t) {
|
|
26
26
|
return typeof e == "function" ? e(t) : e;
|
|
27
27
|
}
|
|
28
28
|
function ce(e) {
|
|
29
29
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function qe(e, t) {
|
|
32
32
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
33
33
|
}
|
|
34
34
|
function $(e, t, s) {
|
|
@@ -41,7 +41,7 @@ function $(e, t, s) {
|
|
|
41
41
|
queryKey: e
|
|
42
42
|
} : e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function St(e, t, s) {
|
|
45
45
|
return z(e) ? typeof t == "function" ? {
|
|
46
46
|
...s,
|
|
47
47
|
mutationKey: e,
|
|
@@ -62,7 +62,7 @@ function T(e, t, s) {
|
|
|
62
62
|
queryKey: e
|
|
63
63
|
}, s] : [e || {}, t];
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Ee(e, t) {
|
|
66
66
|
const {
|
|
67
67
|
type: s = "all",
|
|
68
68
|
exact: r,
|
|
@@ -85,7 +85,7 @@ function Se(e, t) {
|
|
|
85
85
|
}
|
|
86
86
|
return !(typeof l == "boolean" && t.isStale() !== l || typeof i < "u" && i !== t.state.fetchStatus || a && !a(t));
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Re(e, t) {
|
|
89
89
|
const {
|
|
90
90
|
exact: s,
|
|
91
91
|
fetching: r,
|
|
@@ -110,21 +110,21 @@ function Q(e) {
|
|
|
110
110
|
return JSON.stringify(e, (t, s) => ue(s) ? Object.keys(s).sort().reduce((r, i) => (r[i] = s[i], r), {}) : s);
|
|
111
111
|
}
|
|
112
112
|
function B(e, t) {
|
|
113
|
-
return
|
|
113
|
+
return He(e, t);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !
|
|
115
|
+
function He(e, t) {
|
|
116
|
+
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !He(e[s], t[s])) : !1;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Ke(e, t) {
|
|
119
119
|
if (e === t)
|
|
120
120
|
return e;
|
|
121
|
-
const s =
|
|
121
|
+
const s = Pe(e) && Pe(t);
|
|
122
122
|
if (s || ue(e) && ue(t)) {
|
|
123
123
|
const r = s ? e.length : Object.keys(e).length, i = s ? t : Object.keys(t), a = i.length, o = s ? [] : {};
|
|
124
124
|
let l = 0;
|
|
125
125
|
for (let c = 0; c < a; c++) {
|
|
126
126
|
const h = s ? c : i[c];
|
|
127
|
-
o[h] =
|
|
127
|
+
o[h] = Ke(e[h], t[h]), o[h] === e[h] && l++;
|
|
128
128
|
}
|
|
129
129
|
return r === a && l === r ? e : o;
|
|
130
130
|
}
|
|
@@ -138,7 +138,7 @@ function ee(e, t) {
|
|
|
138
138
|
return !1;
|
|
139
139
|
return !0;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Pe(e) {
|
|
142
142
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
143
143
|
}
|
|
144
144
|
function ue(e) {
|
|
@@ -156,22 +156,22 @@ function _e(e) {
|
|
|
156
156
|
function z(e) {
|
|
157
157
|
return Array.isArray(e);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Ve(e) {
|
|
160
160
|
return new Promise((t) => {
|
|
161
161
|
setTimeout(t, e);
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
164
|
+
function Ae(e) {
|
|
165
|
+
Ve(0).then(e);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Et() {
|
|
168
168
|
if (typeof AbortController == "function")
|
|
169
169
|
return new AbortController();
|
|
170
170
|
}
|
|
171
171
|
function de(e, t, s) {
|
|
172
|
-
return s.isDataEqual != null && s.isDataEqual(e, t) ? e : typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ?
|
|
172
|
+
return s.isDataEqual != null && s.isDataEqual(e, t) ? e : typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Ke(e, t) : t;
|
|
173
173
|
}
|
|
174
|
-
class
|
|
174
|
+
class Rt extends V {
|
|
175
175
|
constructor() {
|
|
176
176
|
super(), this.setup = (t) => {
|
|
177
177
|
if (!Z && window.addEventListener) {
|
|
@@ -211,16 +211,16 @@ class jt extends V {
|
|
|
211
211
|
return typeof this.focused == "boolean" ? this.focused : typeof document > "u" ? !0 : [void 0, "visible", "prerender"].includes(document.visibilityState);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
const te = new
|
|
215
|
-
class
|
|
214
|
+
const te = new Rt(), Oe = ["online", "offline"];
|
|
215
|
+
class Pt extends V {
|
|
216
216
|
constructor() {
|
|
217
217
|
super(), this.setup = (t) => {
|
|
218
218
|
if (!Z && window.addEventListener) {
|
|
219
219
|
const s = () => t();
|
|
220
|
-
return
|
|
220
|
+
return Oe.forEach((r) => {
|
|
221
221
|
window.addEventListener(r, s, !1);
|
|
222
222
|
}), () => {
|
|
223
|
-
|
|
223
|
+
Oe.forEach((r) => {
|
|
224
224
|
window.removeEventListener(r, s);
|
|
225
225
|
});
|
|
226
226
|
};
|
|
@@ -256,27 +256,27 @@ class St extends V {
|
|
|
256
256
|
return typeof this.online == "boolean" ? this.online : typeof navigator > "u" || typeof navigator.onLine > "u" ? !0 : navigator.onLine;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
const se = new
|
|
260
|
-
function
|
|
259
|
+
const se = new Pt();
|
|
260
|
+
function _t(e) {
|
|
261
261
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
262
262
|
}
|
|
263
263
|
function ae(e) {
|
|
264
264
|
return (e ?? "online") === "online" ? se.isOnline() : !0;
|
|
265
265
|
}
|
|
266
|
-
class
|
|
266
|
+
class Ge {
|
|
267
267
|
constructor(t) {
|
|
268
268
|
this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
function I(e) {
|
|
272
|
-
return e instanceof
|
|
272
|
+
return e instanceof Ge;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function We(e) {
|
|
275
275
|
let t = !1, s = 0, r = !1, i, a, o;
|
|
276
276
|
const l = new Promise((m, C) => {
|
|
277
277
|
a = m, o = C;
|
|
278
278
|
}), c = (m) => {
|
|
279
|
-
r || (p(new
|
|
279
|
+
r || (p(new Ge(m)), e.abort == null || e.abort());
|
|
280
280
|
}, h = () => {
|
|
281
281
|
t = !0;
|
|
282
282
|
}, u = () => {
|
|
@@ -305,12 +305,12 @@ function Ke(e) {
|
|
|
305
305
|
var S, w;
|
|
306
306
|
if (r)
|
|
307
307
|
return;
|
|
308
|
-
const
|
|
308
|
+
const P = (S = e.retry) != null ? S : 3, k = (w = e.retryDelay) != null ? w : _t, E = typeof k == "function" ? k(s, C) : k, j = P === !0 || typeof P == "number" && s < P || typeof P == "function" && P(s, C);
|
|
309
309
|
if (t || !j) {
|
|
310
310
|
p(C);
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
|
-
s++, e.onFail == null || e.onFail(s, C),
|
|
313
|
+
s++, e.onFail == null || e.onFail(s, C), Ve(E).then(() => {
|
|
314
314
|
if (f())
|
|
315
315
|
return y();
|
|
316
316
|
}).then(() => {
|
|
@@ -327,7 +327,7 @@ function Ke(e) {
|
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
329
|
const ge = console;
|
|
330
|
-
function
|
|
330
|
+
function At() {
|
|
331
331
|
let e = [], t = 0, s = (u) => {
|
|
332
332
|
u();
|
|
333
333
|
}, r = (u) => {
|
|
@@ -343,7 +343,7 @@ function Rt() {
|
|
|
343
343
|
}
|
|
344
344
|
return f;
|
|
345
345
|
}, a = (u) => {
|
|
346
|
-
t ? e.push(u) :
|
|
346
|
+
t ? e.push(u) : Ae(() => {
|
|
347
347
|
s(u);
|
|
348
348
|
});
|
|
349
349
|
}, o = (u) => (...f) => {
|
|
@@ -352,7 +352,7 @@ function Rt() {
|
|
|
352
352
|
});
|
|
353
353
|
}, l = () => {
|
|
354
354
|
const u = e;
|
|
355
|
-
e = [], u.length &&
|
|
355
|
+
e = [], u.length && Ae(() => {
|
|
356
356
|
r(() => {
|
|
357
357
|
u.forEach((f) => {
|
|
358
358
|
s(f);
|
|
@@ -372,8 +372,8 @@ function Rt() {
|
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
const A =
|
|
376
|
-
class
|
|
375
|
+
const A = At();
|
|
376
|
+
class $e {
|
|
377
377
|
destroy() {
|
|
378
378
|
this.clearGcTimeout();
|
|
379
379
|
}
|
|
@@ -389,9 +389,9 @@ class Ve {
|
|
|
389
389
|
this.gcTimeout && (clearTimeout(this.gcTimeout), this.gcTimeout = void 0);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
class
|
|
392
|
+
class Ot extends $e {
|
|
393
393
|
constructor(t) {
|
|
394
|
-
super(), this.abortSignalConsumed = !1, this.defaultOptions = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.cache = t.cache, this.logger = t.logger || ge, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.initialState = t.state ||
|
|
394
|
+
super(), this.abortSignalConsumed = !1, this.defaultOptions = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.cache = t.cache, this.logger = t.logger || ge, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.initialState = t.state || kt(this.options), this.state = this.initialState, this.scheduleGc();
|
|
395
395
|
}
|
|
396
396
|
get meta() {
|
|
397
397
|
return this.options.meta;
|
|
@@ -444,7 +444,7 @@ class _t extends Ve {
|
|
|
444
444
|
return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some((t) => t.getCurrentResult().isStale);
|
|
445
445
|
}
|
|
446
446
|
isStaleByTime(t = 0) {
|
|
447
|
-
return this.state.isInvalidated || !this.state.dataUpdatedAt || !
|
|
447
|
+
return this.state.isInvalidated || !this.state.dataUpdatedAt || !qe(this.state.dataUpdatedAt, t);
|
|
448
448
|
}
|
|
449
449
|
onFocus() {
|
|
450
450
|
var t;
|
|
@@ -500,7 +500,7 @@ class _t extends Ve {
|
|
|
500
500
|
const p = this.observers.find((y) => y.options.queryFn);
|
|
501
501
|
p && this.setOptions(p.options);
|
|
502
502
|
}
|
|
503
|
-
const o =
|
|
503
|
+
const o = Et(), l = {
|
|
504
504
|
queryKey: this.queryKey,
|
|
505
505
|
pageParam: void 0,
|
|
506
506
|
meta: this.meta
|
|
@@ -538,7 +538,7 @@ class _t extends Ve {
|
|
|
538
538
|
}
|
|
539
539
|
this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
540
540
|
};
|
|
541
|
-
return this.retryer =
|
|
541
|
+
return this.retryer = We({
|
|
542
542
|
fn: u.fetchFn,
|
|
543
543
|
abort: o == null ? void 0 : o.abort.bind(o),
|
|
544
544
|
onSuccess: (p) => {
|
|
@@ -657,7 +657,7 @@ class _t extends Ve {
|
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function kt(e) {
|
|
661
661
|
const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = typeof t < "u", r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
|
|
662
662
|
return {
|
|
663
663
|
data: t,
|
|
@@ -674,7 +674,7 @@ function Pt(e) {
|
|
|
674
674
|
fetchStatus: "idle"
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
|
-
class
|
|
677
|
+
class Ft extends V {
|
|
678
678
|
constructor(t) {
|
|
679
679
|
super(), this.config = t || {}, this.queries = [], this.queriesMap = {};
|
|
680
680
|
}
|
|
@@ -682,7 +682,7 @@ class At extends V {
|
|
|
682
682
|
var i;
|
|
683
683
|
const a = s.queryKey, o = (i = s.queryHash) != null ? i : Ce(a, s);
|
|
684
684
|
let l = this.get(o);
|
|
685
|
-
return l || (l = new
|
|
685
|
+
return l || (l = new Ot({
|
|
686
686
|
cache: this,
|
|
687
687
|
logger: t.getLogger(),
|
|
688
688
|
queryKey: a,
|
|
@@ -720,11 +720,11 @@ class At extends V {
|
|
|
720
720
|
}
|
|
721
721
|
find(t, s) {
|
|
722
722
|
const [r] = T(t, s);
|
|
723
|
-
return typeof r.exact > "u" && (r.exact = !0), this.queries.find((i) =>
|
|
723
|
+
return typeof r.exact > "u" && (r.exact = !0), this.queries.find((i) => Ee(r, i));
|
|
724
724
|
}
|
|
725
725
|
findAll(t, s) {
|
|
726
726
|
const [r] = T(t, s);
|
|
727
|
-
return Object.keys(r).length > 0 ? this.queries.filter((i) =>
|
|
727
|
+
return Object.keys(r).length > 0 ? this.queries.filter((i) => Ee(r, i)) : this.queries;
|
|
728
728
|
}
|
|
729
729
|
notify(t) {
|
|
730
730
|
A.batch(() => {
|
|
@@ -750,9 +750,9 @@ class At extends V {
|
|
|
750
750
|
});
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
class
|
|
753
|
+
class Mt extends $e {
|
|
754
754
|
constructor(t) {
|
|
755
|
-
super(), this.defaultOptions = t.defaultOptions, this.mutationId = t.mutationId, this.mutationCache = t.mutationCache, this.logger = t.logger || ge, this.observers = [], this.state = t.state ||
|
|
755
|
+
super(), this.defaultOptions = t.defaultOptions, this.mutationId = t.mutationId, this.mutationCache = t.mutationCache, this.logger = t.logger || ge, this.observers = [], this.state = t.state || Ze(), this.setOptions(t.options), this.scheduleGc();
|
|
756
756
|
}
|
|
757
757
|
setOptions(t) {
|
|
758
758
|
this.options = {
|
|
@@ -793,7 +793,7 @@ class kt extends Ve {
|
|
|
793
793
|
async execute() {
|
|
794
794
|
const t = () => {
|
|
795
795
|
var j;
|
|
796
|
-
return this.retryer =
|
|
796
|
+
return this.retryer = We({
|
|
797
797
|
fn: () => this.options.mutationFn ? this.options.mutationFn(this.state.variables) : Promise.reject("No mutationFn found"),
|
|
798
798
|
onFail: (b, F) => {
|
|
799
799
|
this.dispatch({
|
|
@@ -839,8 +839,8 @@ class kt extends Ve {
|
|
|
839
839
|
}), j;
|
|
840
840
|
} catch (j) {
|
|
841
841
|
try {
|
|
842
|
-
var x, m, C, S, w,
|
|
843
|
-
throw await ((x = (m = this.mutationCache.config).onError) == null ? void 0 : x.call(m, j, this.state.variables, this.state.context, this)), await ((C = (S = this.options).onError) == null ? void 0 : C.call(S, j, this.state.variables, this.state.context)), await ((w = (
|
|
842
|
+
var x, m, C, S, w, P, k, E;
|
|
843
|
+
throw await ((x = (m = this.mutationCache.config).onError) == null ? void 0 : x.call(m, j, this.state.variables, this.state.context, this)), await ((C = (S = this.options).onError) == null ? void 0 : C.call(S, j, this.state.variables, this.state.context)), await ((w = (P = this.mutationCache.config).onSettled) == null ? void 0 : w.call(P, void 0, j, this.state.variables, this.state.context, this)), await ((k = (E = this.options).onSettled) == null ? void 0 : k.call(E, void 0, j, this.state.variables, this.state.context)), j;
|
|
844
844
|
} finally {
|
|
845
845
|
this.dispatch({
|
|
846
846
|
type: "error",
|
|
@@ -918,7 +918,7 @@ class kt extends Ve {
|
|
|
918
918
|
});
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Ze() {
|
|
922
922
|
return {
|
|
923
923
|
context: void 0,
|
|
924
924
|
data: void 0,
|
|
@@ -930,12 +930,12 @@ function Ge() {
|
|
|
930
930
|
variables: void 0
|
|
931
931
|
};
|
|
932
932
|
}
|
|
933
|
-
class
|
|
933
|
+
class Nt extends V {
|
|
934
934
|
constructor(t) {
|
|
935
935
|
super(), this.config = t || {}, this.mutations = [], this.mutationId = 0;
|
|
936
936
|
}
|
|
937
937
|
build(t, s, r) {
|
|
938
|
-
const i = new
|
|
938
|
+
const i = new Mt({
|
|
939
939
|
mutationCache: this,
|
|
940
940
|
logger: t.getLogger(),
|
|
941
941
|
mutationId: ++this.mutationId,
|
|
@@ -968,10 +968,10 @@ class Ot extends V {
|
|
|
968
968
|
return this.mutations;
|
|
969
969
|
}
|
|
970
970
|
find(t) {
|
|
971
|
-
return typeof t.exact > "u" && (t.exact = !0), this.mutations.find((s) =>
|
|
971
|
+
return typeof t.exact > "u" && (t.exact = !0), this.mutations.find((s) => Re(t, s));
|
|
972
972
|
}
|
|
973
973
|
findAll(t) {
|
|
974
|
-
return this.mutations.filter((s) =>
|
|
974
|
+
return this.mutations.filter((s) => Re(t, s));
|
|
975
975
|
}
|
|
976
976
|
notify(t) {
|
|
977
977
|
A.batch(() => {
|
|
@@ -992,7 +992,7 @@ class Ot extends V {
|
|
|
992
992
|
}), this.resuming;
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function Lt() {
|
|
996
996
|
return {
|
|
997
997
|
onFetch: (e) => {
|
|
998
998
|
e.fetchFn = () => {
|
|
@@ -1027,23 +1027,23 @@ function Ft() {
|
|
|
1027
1027
|
};
|
|
1028
1028
|
m(W);
|
|
1029
1029
|
const oe = C(W);
|
|
1030
|
-
return Promise.resolve(oe).then((
|
|
1030
|
+
return Promise.resolve(oe).then((gt) => S(E, b, gt, F));
|
|
1031
1031
|
};
|
|
1032
|
-
let
|
|
1032
|
+
let P;
|
|
1033
1033
|
if (!v.length)
|
|
1034
|
-
|
|
1034
|
+
P = w([]);
|
|
1035
1035
|
else if (u) {
|
|
1036
1036
|
const E = typeof h < "u", j = E ? h : ke(e.options, v);
|
|
1037
|
-
|
|
1037
|
+
P = w(v, E, j);
|
|
1038
1038
|
} else if (f) {
|
|
1039
|
-
const E = typeof h < "u", j = E ? h :
|
|
1040
|
-
|
|
1039
|
+
const E = typeof h < "u", j = E ? h : Dt(e.options, v);
|
|
1040
|
+
P = w(v, E, j, !0);
|
|
1041
1041
|
} else {
|
|
1042
1042
|
y = [];
|
|
1043
1043
|
const E = typeof e.options.getNextPageParam > "u";
|
|
1044
|
-
|
|
1044
|
+
P = (l && v[0] ? l(v[0], 0, v) : !0) ? w([], E, p[0]) : Promise.resolve(S([], p[0], v[0]));
|
|
1045
1045
|
for (let b = 1; b < v.length; b++)
|
|
1046
|
-
|
|
1046
|
+
P = P.then((F) => {
|
|
1047
1047
|
if (l && v[b] ? l(v[b], b, v) : !0) {
|
|
1048
1048
|
const oe = E ? p[b] : ke(e.options, F);
|
|
1049
1049
|
return w(F, E, oe);
|
|
@@ -1051,7 +1051,7 @@ function Ft() {
|
|
|
1051
1051
|
return Promise.resolve(S(F, p[b], v[b]));
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
|
-
return
|
|
1054
|
+
return P.then((E) => ({
|
|
1055
1055
|
pages: E,
|
|
1056
1056
|
pageParams: y
|
|
1057
1057
|
}));
|
|
@@ -1062,12 +1062,12 @@ function Ft() {
|
|
|
1062
1062
|
function ke(e, t) {
|
|
1063
1063
|
return e.getNextPageParam == null ? void 0 : e.getNextPageParam(t[t.length - 1], t);
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function Dt(e, t) {
|
|
1066
1066
|
return e.getPreviousPageParam == null ? void 0 : e.getPreviousPageParam(t[0], t);
|
|
1067
1067
|
}
|
|
1068
|
-
class
|
|
1068
|
+
class ze {
|
|
1069
1069
|
constructor(t = {}) {
|
|
1070
|
-
this.queryCache = t.queryCache || new
|
|
1070
|
+
this.queryCache = t.queryCache || new Ft(), this.mutationCache = t.mutationCache || new Nt(), this.logger = t.logger || ge, this.defaultOptions = t.defaultOptions || {}, this.queryDefaults = [], this.mutationDefaults = [], this.mountCount = 0;
|
|
1071
1071
|
}
|
|
1072
1072
|
mount() {
|
|
1073
1073
|
this.mountCount++, this.mountCount === 1 && (this.unsubscribeFocus = te.subscribe(() => {
|
|
@@ -1108,7 +1108,7 @@ class We {
|
|
|
1108
1108
|
});
|
|
1109
1109
|
}
|
|
1110
1110
|
setQueryData(t, s, r) {
|
|
1111
|
-
const i = this.queryCache.find(t), a = i == null ? void 0 : i.state.data, o =
|
|
1111
|
+
const i = this.queryCache.find(t), a = i == null ? void 0 : i.state.data, o = jt(s, a);
|
|
1112
1112
|
if (typeof o > "u")
|
|
1113
1113
|
return;
|
|
1114
1114
|
const l = $(t), c = this.defaultQueryOptions(l);
|
|
@@ -1189,7 +1189,7 @@ class We {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
fetchInfiniteQuery(t, s, r) {
|
|
1191
1191
|
const i = $(t, s, r);
|
|
1192
|
-
return i.behavior =
|
|
1192
|
+
return i.behavior = Lt(), this.fetchQuery(i);
|
|
1193
1193
|
}
|
|
1194
1194
|
prefetchInfiniteQuery(t, s, r) {
|
|
1195
1195
|
return this.fetchInfiniteQuery(t, s, r).then(N).catch(N);
|
|
@@ -1261,7 +1261,7 @@ class We {
|
|
|
1261
1261
|
this.queryCache.clear(), this.mutationCache.clear();
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
class
|
|
1264
|
+
class Tt extends V {
|
|
1265
1265
|
constructor(t, s) {
|
|
1266
1266
|
super(), this.client = t, this.options = s, this.trackedProps = /* @__PURE__ */ new Set(), this.selectError = null, this.bindMethods(), this.setOptions(s);
|
|
1267
1267
|
}
|
|
@@ -1269,7 +1269,7 @@ class Nt extends V {
|
|
|
1269
1269
|
this.remove = this.remove.bind(this), this.refetch = this.refetch.bind(this);
|
|
1270
1270
|
}
|
|
1271
1271
|
onSubscribe() {
|
|
1272
|
-
this.listeners.size === 1 && (this.currentQuery.addObserver(this),
|
|
1272
|
+
this.listeners.size === 1 && (this.currentQuery.addObserver(this), Fe(this.currentQuery, this.options) && this.executeFetch(), this.updateTimers());
|
|
1273
1273
|
}
|
|
1274
1274
|
onUnsubscribe() {
|
|
1275
1275
|
this.hasListeners() || this.destroy();
|
|
@@ -1293,13 +1293,13 @@ class Nt extends V {
|
|
|
1293
1293
|
throw new Error("Expected enabled to be a boolean");
|
|
1294
1294
|
this.options.queryKey || (this.options.queryKey = r.queryKey), this.updateQuery();
|
|
1295
1295
|
const a = this.hasListeners();
|
|
1296
|
-
a &&
|
|
1296
|
+
a && Me(this.currentQuery, i, this.options, r) && this.executeFetch(), this.updateResult(s), a && (this.currentQuery !== i || this.options.enabled !== r.enabled || this.options.staleTime !== r.staleTime) && this.updateStaleTimeout();
|
|
1297
1297
|
const o = this.computeRefetchInterval();
|
|
1298
1298
|
a && (this.currentQuery !== i || this.options.enabled !== r.enabled || o !== this.currentRefetchInterval) && this.updateRefetchInterval(o);
|
|
1299
1299
|
}
|
|
1300
1300
|
getOptimisticResult(t) {
|
|
1301
1301
|
const s = this.client.getQueryCache().build(this.client, t), r = this.createResult(s, t);
|
|
1302
|
-
return
|
|
1302
|
+
return Qt(this, r, t) && (this.currentResult = r, this.currentResultOptions = this.options, this.currentResultState = this.currentQuery.state), r;
|
|
1303
1303
|
}
|
|
1304
1304
|
getCurrentResult() {
|
|
1305
1305
|
return this.currentResult;
|
|
@@ -1350,7 +1350,7 @@ class Nt extends V {
|
|
|
1350
1350
|
updateStaleTimeout() {
|
|
1351
1351
|
if (this.clearStaleTimeout(), Z || this.currentResult.isStale || !ce(this.options.staleTime))
|
|
1352
1352
|
return;
|
|
1353
|
-
const s =
|
|
1353
|
+
const s = qe(this.currentResult.dataUpdatedAt, this.options.staleTime) + 1;
|
|
1354
1354
|
this.staleTimeoutId = setTimeout(() => {
|
|
1355
1355
|
this.currentResult.isStale || this.updateResult();
|
|
1356
1356
|
}, s);
|
|
@@ -1385,7 +1385,7 @@ class Nt extends V {
|
|
|
1385
1385
|
status: m
|
|
1386
1386
|
} = f, C = !1, S = !1, w;
|
|
1387
1387
|
if (s._optimisticResults) {
|
|
1388
|
-
const b = this.hasListeners(), F = !b &&
|
|
1388
|
+
const b = this.hasListeners(), F = !b && Fe(t, s), W = b && Me(t, r, s, i);
|
|
1389
1389
|
(F || W) && (x = ae(t.options.networkMode) ? "fetching" : "paused", v || (m = "loading")), s._optimisticResults === "isRestoring" && (x = "idle");
|
|
1390
1390
|
}
|
|
1391
1391
|
if (s.keepPreviousData && !f.dataUpdatedAt && u != null && u.isSuccess && m !== "error")
|
|
@@ -1414,14 +1414,14 @@ class Nt extends V {
|
|
|
1414
1414
|
typeof b < "u" && (m = "success", w = de(a == null ? void 0 : a.data, b, s), S = !0);
|
|
1415
1415
|
}
|
|
1416
1416
|
this.selectError && (p = this.selectError, w = this.selectResult, y = Date.now(), m = "error");
|
|
1417
|
-
const
|
|
1417
|
+
const P = x === "fetching", k = m === "loading", E = m === "error";
|
|
1418
1418
|
return {
|
|
1419
1419
|
status: m,
|
|
1420
1420
|
fetchStatus: x,
|
|
1421
|
-
isLoading:
|
|
1421
|
+
isLoading: k,
|
|
1422
1422
|
isSuccess: m === "success",
|
|
1423
1423
|
isError: E,
|
|
1424
|
-
isInitialLoading:
|
|
1424
|
+
isInitialLoading: k && P,
|
|
1425
1425
|
data: w,
|
|
1426
1426
|
dataUpdatedAt: v,
|
|
1427
1427
|
error: p,
|
|
@@ -1431,8 +1431,8 @@ class Nt extends V {
|
|
|
1431
1431
|
errorUpdateCount: f.errorUpdateCount,
|
|
1432
1432
|
isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
|
|
1433
1433
|
isFetchedAfterMount: f.dataUpdateCount > h.dataUpdateCount || f.errorUpdateCount > h.errorUpdateCount,
|
|
1434
|
-
isFetching:
|
|
1435
|
-
isRefetching:
|
|
1434
|
+
isFetching: P,
|
|
1435
|
+
isRefetching: P && !k,
|
|
1436
1436
|
isLoadingError: E && f.dataUpdatedAt === 0,
|
|
1437
1437
|
isPaused: x === "paused",
|
|
1438
1438
|
isPlaceholderData: S,
|
|
@@ -1500,11 +1500,11 @@ class Nt extends V {
|
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1503
|
+
function Ut(e, t) {
|
|
1504
1504
|
return t.enabled !== !1 && !e.state.dataUpdatedAt && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1507
|
-
return
|
|
1506
|
+
function Fe(e, t) {
|
|
1507
|
+
return Ut(e, t) || e.state.dataUpdatedAt > 0 && he(e, t, t.refetchOnMount);
|
|
1508
1508
|
}
|
|
1509
1509
|
function he(e, t, s) {
|
|
1510
1510
|
if (t.enabled !== !1) {
|
|
@@ -1513,16 +1513,16 @@ function he(e, t, s) {
|
|
|
1513
1513
|
}
|
|
1514
1514
|
return !1;
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function Me(e, t, s, r) {
|
|
1517
1517
|
return s.enabled !== !1 && (e !== t || r.enabled === !1) && (!s.suspense || e.state.status !== "error") && xe(e, s);
|
|
1518
1518
|
}
|
|
1519
1519
|
function xe(e, t) {
|
|
1520
1520
|
return e.isStaleByTime(t.staleTime);
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1522
|
+
function Qt(e, t, s) {
|
|
1523
1523
|
return s.keepPreviousData ? !1 : s.placeholderData !== void 0 ? t.isPlaceholderData : !ee(e.getCurrentResult(), t);
|
|
1524
1524
|
}
|
|
1525
|
-
class
|
|
1525
|
+
class qt extends V {
|
|
1526
1526
|
constructor(t, s) {
|
|
1527
1527
|
super(), this.client = t, this.setOptions(s), this.bindMethods(), this.updateResult();
|
|
1528
1528
|
}
|
|
@@ -1566,7 +1566,7 @@ class Tt extends V {
|
|
|
1566
1566
|
}), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
|
1567
1567
|
}
|
|
1568
1568
|
updateResult() {
|
|
1569
|
-
const t = this.currentMutation ? this.currentMutation.state :
|
|
1569
|
+
const t = this.currentMutation ? this.currentMutation.state : Ze(), s = {
|
|
1570
1570
|
...t,
|
|
1571
1571
|
isLoading: t.status === "loading",
|
|
1572
1572
|
isSuccess: t.status === "success",
|
|
@@ -1596,7 +1596,7 @@ class Tt extends V {
|
|
|
1596
1596
|
});
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
|
-
var
|
|
1599
|
+
var Ye = { exports: {} }, Je = {};
|
|
1600
1600
|
/**
|
|
1601
1601
|
* @license React
|
|
1602
1602
|
* use-sync-external-store-shim.production.min.js
|
|
@@ -1607,49 +1607,49 @@ var $e = { exports: {} }, Ze = {};
|
|
|
1607
1607
|
* LICENSE file in the root directory of this source tree.
|
|
1608
1608
|
*/
|
|
1609
1609
|
var K = d;
|
|
1610
|
-
function
|
|
1610
|
+
function Ht(e, t) {
|
|
1611
1611
|
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
1612
1612
|
}
|
|
1613
|
-
var
|
|
1614
|
-
function
|
|
1615
|
-
var s = t(), r =
|
|
1616
|
-
return
|
|
1613
|
+
var Kt = typeof Object.is == "function" ? Object.is : Ht, Vt = K.useState, Gt = K.useEffect, Wt = K.useLayoutEffect, $t = K.useDebugValue;
|
|
1614
|
+
function Zt(e, t) {
|
|
1615
|
+
var s = t(), r = Vt({ inst: { value: s, getSnapshot: t } }), i = r[0].inst, a = r[1];
|
|
1616
|
+
return Wt(function() {
|
|
1617
1617
|
i.value = s, i.getSnapshot = t, le(i) && a({ inst: i });
|
|
1618
|
-
}, [e, s, t]),
|
|
1618
|
+
}, [e, s, t]), Gt(function() {
|
|
1619
1619
|
return le(i) && a({ inst: i }), e(function() {
|
|
1620
1620
|
le(i) && a({ inst: i });
|
|
1621
1621
|
});
|
|
1622
|
-
}, [e]),
|
|
1622
|
+
}, [e]), $t(s), s;
|
|
1623
1623
|
}
|
|
1624
1624
|
function le(e) {
|
|
1625
1625
|
var t = e.getSnapshot;
|
|
1626
1626
|
e = e.value;
|
|
1627
1627
|
try {
|
|
1628
1628
|
var s = t();
|
|
1629
|
-
return !
|
|
1629
|
+
return !Kt(e, s);
|
|
1630
1630
|
} catch {
|
|
1631
1631
|
return !0;
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function zt(e, t) {
|
|
1635
1635
|
return t();
|
|
1636
1636
|
}
|
|
1637
|
-
var
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
var
|
|
1641
|
-
const
|
|
1642
|
-
function
|
|
1643
|
-
return e || (t && typeof window < "u" ? (window.ReactQueryClientContext || (window.ReactQueryClientContext =
|
|
1637
|
+
var Yt = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? zt : Zt;
|
|
1638
|
+
Je.useSyncExternalStore = K.useSyncExternalStore !== void 0 ? K.useSyncExternalStore : Yt;
|
|
1639
|
+
Ye.exports = Je;
|
|
1640
|
+
var Jt = Ye.exports;
|
|
1641
|
+
const Xe = Jt.useSyncExternalStore, Ne = /* @__PURE__ */ d.createContext(void 0), Ie = /* @__PURE__ */ d.createContext(!1);
|
|
1642
|
+
function Be(e, t) {
|
|
1643
|
+
return e || (t && typeof window < "u" ? (window.ReactQueryClientContext || (window.ReactQueryClientContext = Ne), window.ReactQueryClientContext) : Ne);
|
|
1644
1644
|
}
|
|
1645
|
-
const
|
|
1645
|
+
const et = ({
|
|
1646
1646
|
context: e
|
|
1647
1647
|
} = {}) => {
|
|
1648
|
-
const t = d.useContext(
|
|
1648
|
+
const t = d.useContext(Be(e, d.useContext(Ie)));
|
|
1649
1649
|
if (!t)
|
|
1650
1650
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1651
1651
|
return t;
|
|
1652
|
-
},
|
|
1652
|
+
}, Xt = ({
|
|
1653
1653
|
client: e,
|
|
1654
1654
|
children: t,
|
|
1655
1655
|
context: s,
|
|
@@ -1658,15 +1658,15 @@ const Xe = ({
|
|
|
1658
1658
|
d.useEffect(() => (e.mount(), () => {
|
|
1659
1659
|
e.unmount();
|
|
1660
1660
|
}), [e]);
|
|
1661
|
-
const i =
|
|
1662
|
-
return /* @__PURE__ */ d.createElement(
|
|
1661
|
+
const i = Be(s, r);
|
|
1662
|
+
return /* @__PURE__ */ d.createElement(Ie.Provider, {
|
|
1663
1663
|
value: !s && r
|
|
1664
1664
|
}, /* @__PURE__ */ d.createElement(i.Provider, {
|
|
1665
1665
|
value: e
|
|
1666
1666
|
}, t));
|
|
1667
|
-
},
|
|
1668
|
-
|
|
1669
|
-
function
|
|
1667
|
+
}, tt = /* @__PURE__ */ d.createContext(!1), It = () => d.useContext(tt);
|
|
1668
|
+
tt.Provider;
|
|
1669
|
+
function Bt() {
|
|
1670
1670
|
let e = !1;
|
|
1671
1671
|
return {
|
|
1672
1672
|
clearReset: () => {
|
|
@@ -1678,37 +1678,37 @@ function Jt() {
|
|
|
1678
1678
|
isReset: () => e
|
|
1679
1679
|
};
|
|
1680
1680
|
}
|
|
1681
|
-
const
|
|
1682
|
-
function
|
|
1681
|
+
const es = /* @__PURE__ */ d.createContext(Bt()), ts = () => d.useContext(es);
|
|
1682
|
+
function st(e, t) {
|
|
1683
1683
|
return typeof e == "function" ? e(...t) : !!e;
|
|
1684
1684
|
}
|
|
1685
|
-
const
|
|
1685
|
+
const ss = (e, t) => {
|
|
1686
1686
|
(e.suspense || e.useErrorBoundary) && (t.isReset() || (e.retryOnMount = !1));
|
|
1687
|
-
},
|
|
1687
|
+
}, rs = (e) => {
|
|
1688
1688
|
d.useEffect(() => {
|
|
1689
1689
|
e.clearReset();
|
|
1690
1690
|
}, [e]);
|
|
1691
|
-
},
|
|
1691
|
+
}, ns = ({
|
|
1692
1692
|
result: e,
|
|
1693
1693
|
errorResetBoundary: t,
|
|
1694
1694
|
useErrorBoundary: s,
|
|
1695
1695
|
query: r
|
|
1696
|
-
}) => e.isError && !t.isReset() && !e.isFetching &&
|
|
1696
|
+
}) => e.isError && !t.isReset() && !e.isFetching && st(s, [e.error, r]), is = (e) => {
|
|
1697
1697
|
e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3);
|
|
1698
|
-
},
|
|
1698
|
+
}, as = (e, t) => e.isLoading && e.isFetching && !t, os = (e, t, s) => (e == null ? void 0 : e.suspense) && as(t, s), ls = (e, t, s) => t.fetchOptimistic(e).then(({
|
|
1699
1699
|
data: r
|
|
1700
1700
|
}) => {
|
|
1701
1701
|
e.onSuccess == null || e.onSuccess(r), e.onSettled == null || e.onSettled(r, null);
|
|
1702
1702
|
}).catch((r) => {
|
|
1703
1703
|
s.clearReset(), e.onError == null || e.onError(r), e.onSettled == null || e.onSettled(void 0, r);
|
|
1704
1704
|
});
|
|
1705
|
-
function
|
|
1706
|
-
const s =
|
|
1705
|
+
function cs(e, t) {
|
|
1706
|
+
const s = et({
|
|
1707
1707
|
context: e.context
|
|
1708
|
-
}), r =
|
|
1709
|
-
a._optimisticResults = r ? "isRestoring" : "optimistic", a.onError && (a.onError = A.batchCalls(a.onError)), a.onSuccess && (a.onSuccess = A.batchCalls(a.onSuccess)), a.onSettled && (a.onSettled = A.batchCalls(a.onSettled)),
|
|
1708
|
+
}), r = It(), i = ts(), a = s.defaultQueryOptions(e);
|
|
1709
|
+
a._optimisticResults = r ? "isRestoring" : "optimistic", a.onError && (a.onError = A.batchCalls(a.onError)), a.onSuccess && (a.onSuccess = A.batchCalls(a.onSuccess)), a.onSettled && (a.onSettled = A.batchCalls(a.onSettled)), is(a), ss(a, i), rs(i);
|
|
1710
1710
|
const [o] = d.useState(() => new t(s, a)), l = o.getOptimisticResult(a);
|
|
1711
|
-
if (
|
|
1711
|
+
if (Xe(d.useCallback((c) => {
|
|
1712
1712
|
const h = r ? () => {
|
|
1713
1713
|
} : o.subscribe(A.batchCalls(c));
|
|
1714
1714
|
return o.updateResult(), h;
|
|
@@ -1716,9 +1716,9 @@ function as(e, t) {
|
|
|
1716
1716
|
o.setOptions(a, {
|
|
1717
1717
|
listeners: !1
|
|
1718
1718
|
});
|
|
1719
|
-
}, [a, o]),
|
|
1720
|
-
throw
|
|
1721
|
-
if (
|
|
1719
|
+
}, [a, o]), os(a, l, r))
|
|
1720
|
+
throw ls(a, o, i);
|
|
1721
|
+
if (ns({
|
|
1722
1722
|
result: l,
|
|
1723
1723
|
errorResetBoundary: i,
|
|
1724
1724
|
useErrorBoundary: a.useErrorBoundary,
|
|
@@ -1727,21 +1727,21 @@ function as(e, t) {
|
|
|
1727
1727
|
throw l.error;
|
|
1728
1728
|
return a.notifyOnChangeProps ? l : o.trackResult(l);
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1730
|
+
function rt(e, t, s) {
|
|
1731
1731
|
const r = $(e, t, s);
|
|
1732
|
-
return
|
|
1732
|
+
return cs(r, Tt);
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1735
|
-
const r =
|
|
1734
|
+
function us(e, t, s) {
|
|
1735
|
+
const r = St(e, t, s), i = et({
|
|
1736
1736
|
context: r.context
|
|
1737
|
-
}), [a] = d.useState(() => new
|
|
1737
|
+
}), [a] = d.useState(() => new qt(i, r));
|
|
1738
1738
|
d.useEffect(() => {
|
|
1739
1739
|
a.setOptions(r);
|
|
1740
1740
|
}, [a, r]);
|
|
1741
|
-
const o =
|
|
1742
|
-
a.mutate(c, h).catch(
|
|
1741
|
+
const o = Xe(d.useCallback((c) => a.subscribe(A.batchCalls(c)), [a]), () => a.getCurrentResult(), () => a.getCurrentResult()), l = d.useCallback((c, h) => {
|
|
1742
|
+
a.mutate(c, h).catch(ds);
|
|
1743
1743
|
}, [a]);
|
|
1744
|
-
if (o.error &&
|
|
1744
|
+
if (o.error && st(a.options.useErrorBoundary, [o.error]))
|
|
1745
1745
|
throw o.error;
|
|
1746
1746
|
return {
|
|
1747
1747
|
...o,
|
|
@@ -1749,40 +1749,40 @@ function os(e, t, s) {
|
|
|
1749
1749
|
mutateAsync: o.mutate
|
|
1750
1750
|
};
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function ds() {
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function nt(e) {
|
|
1755
1755
|
var t, s, r = "";
|
|
1756
1756
|
if (typeof e == "string" || typeof e == "number")
|
|
1757
1757
|
r += e;
|
|
1758
1758
|
else if (typeof e == "object")
|
|
1759
1759
|
if (Array.isArray(e))
|
|
1760
1760
|
for (t = 0; t < e.length; t++)
|
|
1761
|
-
e[t] && (s =
|
|
1761
|
+
e[t] && (s = nt(e[t])) && (r && (r += " "), r += s);
|
|
1762
1762
|
else
|
|
1763
1763
|
for (t in e)
|
|
1764
1764
|
e[t] && (r && (r += " "), r += t);
|
|
1765
1765
|
return r;
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function _() {
|
|
1768
1768
|
for (var e, t, s = 0, r = ""; s < arguments.length; )
|
|
1769
|
-
(e = arguments[s++]) && (t =
|
|
1769
|
+
(e = arguments[s++]) && (t = nt(e)) && (r && (r += " "), r += t);
|
|
1770
1770
|
return r;
|
|
1771
1771
|
}
|
|
1772
|
-
var
|
|
1772
|
+
var hs = Object.defineProperty, fs = Object.defineProperties, ps = Object.getOwnPropertyDescriptors, re = Object.getOwnPropertySymbols, it = Object.prototype.hasOwnProperty, at = Object.prototype.propertyIsEnumerable, Le = (e, t, s) => t in e ? hs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, g = (e, t) => {
|
|
1773
1773
|
for (var s in t || (t = {}))
|
|
1774
|
-
|
|
1774
|
+
it.call(t, s) && Le(e, s, t[s]);
|
|
1775
1775
|
if (re)
|
|
1776
1776
|
for (var s of re(t))
|
|
1777
|
-
|
|
1777
|
+
at.call(t, s) && Le(e, s, t[s]);
|
|
1778
1778
|
return e;
|
|
1779
|
-
}, R = (e, t) =>
|
|
1779
|
+
}, R = (e, t) => fs(e, ps(t)), O = (e, t) => {
|
|
1780
1780
|
var s = {};
|
|
1781
1781
|
for (var r in e)
|
|
1782
|
-
|
|
1782
|
+
it.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
|
|
1783
1783
|
if (e != null && re)
|
|
1784
1784
|
for (var r of re(e))
|
|
1785
|
-
t.indexOf(r) < 0 &&
|
|
1785
|
+
t.indexOf(r) < 0 && at.call(e, r) && (s[r] = e[r]);
|
|
1786
1786
|
return s;
|
|
1787
1787
|
};
|
|
1788
1788
|
function ne() {
|
|
@@ -1795,16 +1795,16 @@ function ne() {
|
|
|
1795
1795
|
return e;
|
|
1796
1796
|
}, ne.apply(this, arguments);
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function vs(e, t) {
|
|
1799
1799
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function ms(...e) {
|
|
1802
1802
|
return (t) => e.forEach(
|
|
1803
|
-
(s) =>
|
|
1803
|
+
(s) => vs(s, t)
|
|
1804
1804
|
);
|
|
1805
1805
|
}
|
|
1806
|
-
var
|
|
1807
|
-
const s = e, { children: r } = s, i =
|
|
1806
|
+
var ys = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
1807
|
+
const s = e, { children: r } = s, i = O(s, ["children"]), a = d.Children.toArray(r), o = a.find(gs);
|
|
1808
1808
|
if (o) {
|
|
1809
1809
|
const l = o.props.children, c = a.map((h) => h === o ? d.Children.count(l) > 1 ? d.Children.only(null) : /* @__PURE__ */ d.isValidElement(l) ? l.props.children : null : h);
|
|
1810
1810
|
return /* @__PURE__ */ d.createElement(fe, ne({}, i, {
|
|
@@ -1815,19 +1815,19 @@ var ps = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
|
1815
1815
|
ref: t
|
|
1816
1816
|
}), r);
|
|
1817
1817
|
});
|
|
1818
|
-
|
|
1818
|
+
ys.displayName = "Slot";
|
|
1819
1819
|
var fe = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
1820
|
-
const s = e, { children: r } = s, i =
|
|
1821
|
-
return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, R(g({},
|
|
1822
|
-
ref: t ?
|
|
1820
|
+
const s = e, { children: r } = s, i = O(s, ["children"]);
|
|
1821
|
+
return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, R(g({}, xs(i, r.props)), {
|
|
1822
|
+
ref: t ? ms(t, r.ref) : r.ref
|
|
1823
1823
|
})) : d.Children.count(r) > 1 ? d.Children.only(null) : null;
|
|
1824
1824
|
});
|
|
1825
1825
|
fe.displayName = "SlotClone";
|
|
1826
|
-
var
|
|
1827
|
-
function
|
|
1828
|
-
return /* @__PURE__ */ d.isValidElement(e) && e.type ===
|
|
1826
|
+
var Cs = ({ children: e }) => /* @__PURE__ */ d.createElement(d.Fragment, null, e);
|
|
1827
|
+
function gs(e) {
|
|
1828
|
+
return /* @__PURE__ */ d.isValidElement(e) && e.type === Cs;
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function xs(e, t) {
|
|
1831
1831
|
const s = g({}, t);
|
|
1832
1832
|
for (const r in t) {
|
|
1833
1833
|
const i = e[r], a = t[r];
|
|
@@ -1840,7 +1840,7 @@ function ys(e, t) {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
return g(g({}, e), s);
|
|
1842
1842
|
}
|
|
1843
|
-
var
|
|
1843
|
+
var bs = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
1844
1844
|
const r = `${e.charAt(0)}${t.charAt(0)}`;
|
|
1845
1845
|
return /* @__PURE__ */ n.jsx(
|
|
1846
1846
|
"span",
|
|
@@ -1861,7 +1861,7 @@ var Cs = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1861
1861
|
variant: l,
|
|
1862
1862
|
className: c,
|
|
1863
1863
|
children: h
|
|
1864
|
-
} = s, u =
|
|
1864
|
+
} = s, u = O(s, [
|
|
1865
1865
|
"iconLeft",
|
|
1866
1866
|
"iconRight",
|
|
1867
1867
|
"isPending",
|
|
@@ -1876,7 +1876,7 @@ var Cs = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1876
1876
|
R(g({
|
|
1877
1877
|
ref: t
|
|
1878
1878
|
}, u), {
|
|
1879
|
-
className:
|
|
1879
|
+
className: _(
|
|
1880
1880
|
"button",
|
|
1881
1881
|
l && `button--${l}`,
|
|
1882
1882
|
l && o && `button--${l}--filled`,
|
|
@@ -1895,16 +1895,16 @@ var Cs = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1895
1895
|
);
|
|
1896
1896
|
Y.displayName = "Button";
|
|
1897
1897
|
d.createContext(void 0);
|
|
1898
|
-
var
|
|
1898
|
+
var ws = d.forwardRef(
|
|
1899
1899
|
(e, t) => {
|
|
1900
|
-
var s = e, { prefix: r, suffix: i, className: a } = s, o =
|
|
1900
|
+
var s = e, { prefix: r, suffix: i, className: a } = s, o = O(s, ["prefix", "suffix", "className"]);
|
|
1901
1901
|
return /* @__PURE__ */ n.jsxs("div", { className: "input__wrapper", children: [
|
|
1902
1902
|
r && /* @__PURE__ */ n.jsx("span", { className: "input__prefix", children: r }),
|
|
1903
1903
|
/* @__PURE__ */ n.jsx(
|
|
1904
1904
|
"input",
|
|
1905
1905
|
g({
|
|
1906
1906
|
ref: t,
|
|
1907
|
-
className:
|
|
1907
|
+
className: _(
|
|
1908
1908
|
"input",
|
|
1909
1909
|
r && "input--with-prefix",
|
|
1910
1910
|
i && "input--with-suffix",
|
|
@@ -1916,12 +1916,12 @@ var gs = d.forwardRef(
|
|
|
1916
1916
|
] });
|
|
1917
1917
|
}
|
|
1918
1918
|
);
|
|
1919
|
-
|
|
1919
|
+
ws.displayName = "TextField";
|
|
1920
1920
|
d.createContext(void 0);
|
|
1921
|
-
var
|
|
1922
|
-
var t = e, { children: s } = t, r =
|
|
1921
|
+
var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__header__action", children: e }), Ss = (e) => {
|
|
1922
|
+
var t = e, { children: s } = t, r = O(t, ["children"]);
|
|
1923
1923
|
return /* @__PURE__ */ n.jsx("div", R(g({ className: "card__body" }, r), { children: s }));
|
|
1924
|
-
},
|
|
1924
|
+
}, Es = (e) => /* @__PURE__ */ n.jsx(
|
|
1925
1925
|
"svg",
|
|
1926
1926
|
R(g({
|
|
1927
1927
|
width: "24",
|
|
@@ -1941,7 +1941,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1941
1941
|
}
|
|
1942
1942
|
)
|
|
1943
1943
|
})
|
|
1944
|
-
), be =
|
|
1944
|
+
), be = Es, Rs = (e) => /* @__PURE__ */ n.jsx(
|
|
1945
1945
|
"svg",
|
|
1946
1946
|
R(g({
|
|
1947
1947
|
width: "24",
|
|
@@ -1961,7 +1961,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1961
1961
|
}
|
|
1962
1962
|
)
|
|
1963
1963
|
})
|
|
1964
|
-
),
|
|
1964
|
+
), Ps = Rs, _s = (e) => /* @__PURE__ */ n.jsx(
|
|
1965
1965
|
"svg",
|
|
1966
1966
|
R(g({
|
|
1967
1967
|
width: "24",
|
|
@@ -1980,7 +1980,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1980
1980
|
}
|
|
1981
1981
|
)
|
|
1982
1982
|
})
|
|
1983
|
-
),
|
|
1983
|
+
), As = _s, Os = (e) => /* @__PURE__ */ n.jsx(
|
|
1984
1984
|
"svg",
|
|
1985
1985
|
R(g({
|
|
1986
1986
|
width: "24",
|
|
@@ -1999,7 +1999,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1999
1999
|
}
|
|
2000
2000
|
)
|
|
2001
2001
|
})
|
|
2002
|
-
),
|
|
2002
|
+
), ks = Os, Fs = (e) => /* @__PURE__ */ n.jsx(
|
|
2003
2003
|
"svg",
|
|
2004
2004
|
R(g({
|
|
2005
2005
|
width: "24",
|
|
@@ -2018,7 +2018,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2018
2018
|
}
|
|
2019
2019
|
)
|
|
2020
2020
|
})
|
|
2021
|
-
),
|
|
2021
|
+
), Ms = Fs, Ns = (e) => /* @__PURE__ */ n.jsxs(
|
|
2022
2022
|
"svg",
|
|
2023
2023
|
R(g({
|
|
2024
2024
|
width: "24",
|
|
@@ -2055,7 +2055,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2055
2055
|
/* @__PURE__ */ n.jsx("defs", { children: /* @__PURE__ */ n.jsx("clipPath", { id: "clip0_19_444", children: /* @__PURE__ */ n.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
|
|
2056
2056
|
]
|
|
2057
2057
|
})
|
|
2058
|
-
),
|
|
2058
|
+
), Ls = Ns, Ds = (e) => /* @__PURE__ */ n.jsxs(
|
|
2059
2059
|
"svg",
|
|
2060
2060
|
R(g({
|
|
2061
2061
|
width: "24",
|
|
@@ -2087,7 +2087,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2087
2087
|
)
|
|
2088
2088
|
]
|
|
2089
2089
|
})
|
|
2090
|
-
),
|
|
2090
|
+
), Ts = Ds, Us = (e) => /* @__PURE__ */ n.jsxs(
|
|
2091
2091
|
"svg",
|
|
2092
2092
|
R(g({
|
|
2093
2093
|
width: "24",
|
|
@@ -2139,7 +2139,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2139
2139
|
)
|
|
2140
2140
|
]
|
|
2141
2141
|
})
|
|
2142
|
-
),
|
|
2142
|
+
), Qs = Us, qs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2143
2143
|
"svg",
|
|
2144
2144
|
R(g({
|
|
2145
2145
|
width: "20",
|
|
@@ -2163,7 +2163,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2163
2163
|
)
|
|
2164
2164
|
]
|
|
2165
2165
|
})
|
|
2166
|
-
),
|
|
2166
|
+
), Hs = qs, Ks = (e) => /* @__PURE__ */ n.jsxs(
|
|
2167
2167
|
"svg",
|
|
2168
2168
|
R(g({
|
|
2169
2169
|
width: "24",
|
|
@@ -2197,7 +2197,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2197
2197
|
/* @__PURE__ */ n.jsx("defs", { children: /* @__PURE__ */ n.jsx("clipPath", { id: "clip0_762_2934", children: /* @__PURE__ */ n.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
|
|
2198
2198
|
]
|
|
2199
2199
|
})
|
|
2200
|
-
),
|
|
2200
|
+
), Vs = Ks, Gs = (e) => {
|
|
2201
2201
|
const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
|
|
2202
2202
|
return /* @__PURE__ */ n.jsxs(
|
|
2203
2203
|
"svg",
|
|
@@ -2368,7 +2368,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2368
2368
|
]
|
|
2369
2369
|
})
|
|
2370
2370
|
);
|
|
2371
|
-
}, we =
|
|
2371
|
+
}, we = Gs, Ws = (e) => /* @__PURE__ */ n.jsxs(
|
|
2372
2372
|
"svg",
|
|
2373
2373
|
R(g({
|
|
2374
2374
|
fill: "none",
|
|
@@ -2430,7 +2430,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2430
2430
|
)
|
|
2431
2431
|
]
|
|
2432
2432
|
})
|
|
2433
|
-
),
|
|
2433
|
+
), $s = Ws, Zs = (e) => /* @__PURE__ */ n.jsx(
|
|
2434
2434
|
"svg",
|
|
2435
2435
|
R(g({
|
|
2436
2436
|
fill: "none",
|
|
@@ -2450,7 +2450,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2450
2450
|
}
|
|
2451
2451
|
)
|
|
2452
2452
|
})
|
|
2453
|
-
),
|
|
2453
|
+
), zs = Zs, Ys = (e) => /* @__PURE__ */ n.jsxs(
|
|
2454
2454
|
"svg",
|
|
2455
2455
|
R(g({
|
|
2456
2456
|
width: "24",
|
|
@@ -2477,7 +2477,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2477
2477
|
/* @__PURE__ */ n.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
|
|
2478
2478
|
]
|
|
2479
2479
|
})
|
|
2480
|
-
),
|
|
2480
|
+
), Js = Ys, Xs = (e) => {
|
|
2481
2481
|
var t = e, {
|
|
2482
2482
|
variant: s,
|
|
2483
2483
|
icon: r,
|
|
@@ -2485,7 +2485,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2485
2485
|
title: a,
|
|
2486
2486
|
description: o,
|
|
2487
2487
|
className: l
|
|
2488
|
-
} = t, c =
|
|
2488
|
+
} = t, c = O(t, [
|
|
2489
2489
|
"variant",
|
|
2490
2490
|
"icon",
|
|
2491
2491
|
"isStandalone",
|
|
@@ -2496,14 +2496,14 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2496
2496
|
return /* @__PURE__ */ n.jsx(
|
|
2497
2497
|
"div",
|
|
2498
2498
|
R(g({}, c), {
|
|
2499
|
-
className:
|
|
2499
|
+
className: _(
|
|
2500
2500
|
"card__empty-state",
|
|
2501
2501
|
s === "error" && "card__empty-state--error",
|
|
2502
2502
|
i && "card__empty-state--standalone",
|
|
2503
2503
|
l
|
|
2504
2504
|
),
|
|
2505
2505
|
children: /* @__PURE__ */ n.jsxs("div", { className: "card__empty-state__wrapper", children: [
|
|
2506
|
-
/* @__PURE__ */ n.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ n.jsx(
|
|
2506
|
+
/* @__PURE__ */ n.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ n.jsx(Vs, {}) : r }),
|
|
2507
2507
|
/* @__PURE__ */ n.jsxs("div", { className: "card__empty-state__content", children: [
|
|
2508
2508
|
/* @__PURE__ */ n.jsx("p", { className: "card__empty-state__title", children: a }),
|
|
2509
2509
|
/* @__PURE__ */ n.jsx("p", { className: "card__empty-state__description", children: o })
|
|
@@ -2511,13 +2511,13 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2511
2511
|
] })
|
|
2512
2512
|
})
|
|
2513
2513
|
);
|
|
2514
|
-
},
|
|
2514
|
+
}, Is = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__footer", children: e }), Bs = (e) => {
|
|
2515
2515
|
var t = e, {
|
|
2516
2516
|
variant: s = "default",
|
|
2517
2517
|
sticky: r,
|
|
2518
2518
|
className: i,
|
|
2519
2519
|
children: a
|
|
2520
|
-
} = t, o =
|
|
2520
|
+
} = t, o = O(t, [
|
|
2521
2521
|
"variant",
|
|
2522
2522
|
"sticky",
|
|
2523
2523
|
"className",
|
|
@@ -2526,7 +2526,7 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2526
2526
|
return /* @__PURE__ */ n.jsx(
|
|
2527
2527
|
"div",
|
|
2528
2528
|
R(g({}, o), {
|
|
2529
|
-
className:
|
|
2529
|
+
className: _(
|
|
2530
2530
|
"card__header",
|
|
2531
2531
|
s && `card__header--${s}`,
|
|
2532
2532
|
r && "card__header--sticky",
|
|
@@ -2535,16 +2535,16 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2535
2535
|
children: a
|
|
2536
2536
|
})
|
|
2537
2537
|
);
|
|
2538
|
-
},
|
|
2538
|
+
}, er = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: e }), tr = ({ children: e, className: t }) => /* @__PURE__ */ n.jsx("div", { className: _("card__body__item", t), children: e }), sr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__body__subtitle", children: e }), rr = ({ icon: e, children: t }) => /* @__PURE__ */ n.jsxs("div", { className: "card__header__title", children: [
|
|
2539
2539
|
e && /* @__PURE__ */ n.jsx("span", { className: "card__header__title__icon", children: e }),
|
|
2540
2540
|
t
|
|
2541
|
-
] }),
|
|
2541
|
+
] }), ot = d.forwardRef(
|
|
2542
2542
|
(e, t) => {
|
|
2543
|
-
var s = e, { type: r, children: i, className: a, variant: o = "default", disabled: l = !1 } = s, c =
|
|
2543
|
+
var s = e, { type: r, children: i, className: a, variant: o = "default", disabled: l = !1 } = s, c = O(s, ["type", "children", "className", "variant", "disabled"]);
|
|
2544
2544
|
return d.createElement(
|
|
2545
2545
|
r,
|
|
2546
2546
|
g({
|
|
2547
|
-
className:
|
|
2547
|
+
className: _(
|
|
2548
2548
|
"card",
|
|
2549
2549
|
l && "card--disabled",
|
|
2550
2550
|
o && `card--${o}`,
|
|
@@ -2556,33 +2556,33 @@ var xs = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2556
2556
|
);
|
|
2557
2557
|
}
|
|
2558
2558
|
);
|
|
2559
|
-
|
|
2560
|
-
Object.assign(
|
|
2561
|
-
Header:
|
|
2562
|
-
Action:
|
|
2563
|
-
Title:
|
|
2564
|
-
Subtitle:
|
|
2565
|
-
Body:
|
|
2566
|
-
Image:
|
|
2567
|
-
Item:
|
|
2568
|
-
Footer:
|
|
2569
|
-
EmptyState:
|
|
2559
|
+
ot.displayName = "Card";
|
|
2560
|
+
Object.assign(ot, {
|
|
2561
|
+
Header: Bs,
|
|
2562
|
+
Action: js,
|
|
2563
|
+
Title: rr,
|
|
2564
|
+
Subtitle: sr,
|
|
2565
|
+
Body: Ss,
|
|
2566
|
+
Image: er,
|
|
2567
|
+
Item: tr,
|
|
2568
|
+
Footer: Is,
|
|
2569
|
+
EmptyState: Xs
|
|
2570
2570
|
});
|
|
2571
|
-
var
|
|
2572
|
-
var t = e, { className: s, children: r } = t, i =
|
|
2573
|
-
return /* @__PURE__ */ n.jsx("div", R(g({ className:
|
|
2574
|
-
},
|
|
2575
|
-
var t = e, { className: s, children: r } = t, i =
|
|
2576
|
-
return /* @__PURE__ */ n.jsx("span", R(g({ className:
|
|
2577
|
-
},
|
|
2578
|
-
const e = d.useContext(
|
|
2571
|
+
var nr = (e) => {
|
|
2572
|
+
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2573
|
+
return /* @__PURE__ */ n.jsx("div", R(g({ className: _("checkbox__content", s) }, i), { children: r }));
|
|
2574
|
+
}, ir = (e) => {
|
|
2575
|
+
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2576
|
+
return /* @__PURE__ */ n.jsx("span", R(g({ className: _("checkbox__hint", s) }, i), { children: r }));
|
|
2577
|
+
}, lt = d.createContext(void 0), ar = ({ id: e, name: t, children: s }) => /* @__PURE__ */ n.jsx(lt.Provider, { value: { id: e, name: t }, children: s }), or = () => {
|
|
2578
|
+
const e = d.useContext(lt);
|
|
2579
2579
|
if (!e)
|
|
2580
2580
|
throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
|
|
2581
2581
|
return e;
|
|
2582
|
-
},
|
|
2583
|
-
var t = e, { className: s, children: r } = t, i =
|
|
2584
|
-
const { id: a } =
|
|
2585
|
-
return /* @__PURE__ */ n.jsx("label", R(g({ htmlFor: a, className:
|
|
2582
|
+
}, lr = (e) => {
|
|
2583
|
+
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2584
|
+
const { id: a } = or();
|
|
2585
|
+
return /* @__PURE__ */ n.jsx("label", R(g({ htmlFor: a, className: _("checkbox__label", s) }, i), { children: r }));
|
|
2586
2586
|
}, q = (e) => {
|
|
2587
2587
|
var t = e, {
|
|
2588
2588
|
id: s,
|
|
@@ -2593,7 +2593,7 @@ var tr = (e) => {
|
|
|
2593
2593
|
single: l,
|
|
2594
2594
|
className: c,
|
|
2595
2595
|
children: h
|
|
2596
|
-
} = t, u =
|
|
2596
|
+
} = t, u = O(t, [
|
|
2597
2597
|
"id",
|
|
2598
2598
|
"name",
|
|
2599
2599
|
"isPending",
|
|
@@ -2609,7 +2609,7 @@ var tr = (e) => {
|
|
|
2609
2609
|
}, [i]), /* @__PURE__ */ n.jsxs(
|
|
2610
2610
|
"div",
|
|
2611
2611
|
{
|
|
2612
|
-
className:
|
|
2612
|
+
className: _("checkbox", a && `checkbox--${a}`, o && "checkbox--error"),
|
|
2613
2613
|
children: [
|
|
2614
2614
|
/* @__PURE__ */ n.jsx(
|
|
2615
2615
|
"input",
|
|
@@ -2618,30 +2618,30 @@ var tr = (e) => {
|
|
|
2618
2618
|
name: r,
|
|
2619
2619
|
type: "checkbox",
|
|
2620
2620
|
ref: f,
|
|
2621
|
-
className:
|
|
2621
|
+
className: _("checkbox__input", c),
|
|
2622
2622
|
value: l ? "true" : ""
|
|
2623
2623
|
}, u)
|
|
2624
2624
|
),
|
|
2625
|
-
i ? /* @__PURE__ */ n.jsx(
|
|
2626
|
-
/* @__PURE__ */ n.jsx(
|
|
2625
|
+
i ? /* @__PURE__ */ n.jsx(Hs, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(Ps, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
|
|
2626
|
+
/* @__PURE__ */ n.jsx(ar, { id: s, name: r, children: h })
|
|
2627
2627
|
]
|
|
2628
2628
|
}
|
|
2629
2629
|
);
|
|
2630
2630
|
};
|
|
2631
|
-
q.Content =
|
|
2632
|
-
q.Label =
|
|
2633
|
-
q.Hint =
|
|
2631
|
+
q.Content = nr;
|
|
2632
|
+
q.Label = lr;
|
|
2633
|
+
q.Hint = ir;
|
|
2634
2634
|
q.Error = Error;
|
|
2635
|
-
var
|
|
2636
|
-
var t = e, { type: s = "div", className: r, children: i } = t, a =
|
|
2637
|
-
return d.createElement(s, g({ className:
|
|
2638
|
-
}, pe = () => document.body.style.removeProperty("overflow"),
|
|
2639
|
-
var t = e, { className: s, children: r, shouldAnimate: i = !0 } = t, a =
|
|
2635
|
+
var cr = (e) => {
|
|
2636
|
+
var t = e, { type: s = "div", className: r, children: i } = t, a = O(t, ["type", "className", "children"]);
|
|
2637
|
+
return d.createElement(s, g({ className: _("dialog__body", r) }, a), i);
|
|
2638
|
+
}, pe = () => document.body.style.removeProperty("overflow"), De = (e) => e.preventDefault(), ur = '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])', dr = (e) => {
|
|
2639
|
+
var t = e, { className: s, children: r, shouldAnimate: i = !0 } = t, a = O(t, ["className", "children", "shouldAnimate"]);
|
|
2640
2640
|
const { ref: o, defaultOpen: l, isModal: c, onClose: h } = J();
|
|
2641
2641
|
return d.useEffect(() => {
|
|
2642
2642
|
const u = o == null ? void 0 : o.current;
|
|
2643
2643
|
if (u != null && u.open) {
|
|
2644
|
-
const f = u.querySelectorAll(
|
|
2644
|
+
const f = u.querySelectorAll(ur), v = f[0], p = f[f.length - 1], y = (x) => {
|
|
2645
2645
|
if (!(x.key === "Tab"))
|
|
2646
2646
|
return;
|
|
2647
2647
|
x.shiftKey ? document.activeElement === v && (p.focus(), x.preventDefault()) : document.activeElement === p && (v.focus(), x.preventDefault());
|
|
@@ -2655,10 +2655,10 @@ var ar = (e) => {
|
|
|
2655
2655
|
if (!u)
|
|
2656
2656
|
return;
|
|
2657
2657
|
if (l && (u.removeAttribute("open"), u.showModal(), u.focus()), c)
|
|
2658
|
-
return u.addEventListener("cancel",
|
|
2658
|
+
return u.addEventListener("cancel", De), () => u.removeEventListener("cancel", De);
|
|
2659
2659
|
const f = ({ clientX: v, clientY: p }) => {
|
|
2660
|
-
const { top: y, right: x, bottom: m, left: C } = u.getBoundingClientRect(), S = 0 < p && 0 < v, w = y < p && p < m,
|
|
2661
|
-
S && !(w &&
|
|
2660
|
+
const { top: y, right: x, bottom: m, left: C } = u.getBoundingClientRect(), S = 0 < p && 0 < v, w = y < p && p < m, P = C < v && v < x;
|
|
2661
|
+
S && !(w && P) && h();
|
|
2662
2662
|
};
|
|
2663
2663
|
return u.addEventListener("cancel", h), u.addEventListener("mousedown", f), () => {
|
|
2664
2664
|
u.removeEventListener("cancel", h), u.removeEventListener("mousedown", f);
|
|
@@ -2670,28 +2670,28 @@ var ar = (e) => {
|
|
|
2670
2670
|
open: l,
|
|
2671
2671
|
"aria-modal": !!c,
|
|
2672
2672
|
"aria-labelledby": "dialogTitle",
|
|
2673
|
-
className:
|
|
2673
|
+
className: _("dialog", i && "dialog--animated", s)
|
|
2674
2674
|
}, a), {
|
|
2675
2675
|
children: r
|
|
2676
2676
|
})
|
|
2677
2677
|
);
|
|
2678
|
-
},
|
|
2678
|
+
}, ct = d.createContext(void 0), hr = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
|
|
2679
2679
|
const i = d.useRef(null), a = d.useRef(t), o = d.useCallback(() => {
|
|
2680
2680
|
var l;
|
|
2681
2681
|
pe(), (l = i.current) == null || l.close(), a.current && (a == null || a.current());
|
|
2682
2682
|
}, [i]);
|
|
2683
|
-
return /* @__PURE__ */ n.jsx(
|
|
2683
|
+
return /* @__PURE__ */ n.jsx(ct.Provider, { value: { ref: i, defaultOpen: e, isModal: s, onClose: o }, children: r });
|
|
2684
2684
|
}, J = () => {
|
|
2685
|
-
const e = d.useContext(
|
|
2685
|
+
const e = d.useContext(ct);
|
|
2686
2686
|
if (!e)
|
|
2687
2687
|
throw new Error("Dialog compound components can not be rendered outside of Dialog");
|
|
2688
2688
|
return e;
|
|
2689
|
-
},
|
|
2690
|
-
var t = e, { children: s } = t, r =
|
|
2689
|
+
}, fr = (e) => {
|
|
2690
|
+
var t = e, { children: s } = t, r = O(t, ["children"]);
|
|
2691
2691
|
const { onClose: i } = J();
|
|
2692
2692
|
return /* @__PURE__ */ n.jsx(Y, R(g({ onClick: i }, r), { children: s }));
|
|
2693
|
-
},
|
|
2694
|
-
var s = e, { className: r } = s, i =
|
|
2693
|
+
}, ut = d.forwardRef((e, t) => {
|
|
2694
|
+
var s = e, { className: r } = s, i = O(s, ["className"]);
|
|
2695
2695
|
const { onClose: a } = J();
|
|
2696
2696
|
return /* @__PURE__ */ n.jsx(
|
|
2697
2697
|
Y,
|
|
@@ -2700,18 +2700,18 @@ var ar = (e) => {
|
|
|
2700
2700
|
ref: t,
|
|
2701
2701
|
formMethod: "dialog",
|
|
2702
2702
|
onClick: a,
|
|
2703
|
-
iconLeft: /* @__PURE__ */ n.jsx(
|
|
2703
|
+
iconLeft: /* @__PURE__ */ n.jsx(As, {}),
|
|
2704
2704
|
variant: "icon--secondary",
|
|
2705
|
-
className:
|
|
2705
|
+
className: _("dialog__close button--icon", r)
|
|
2706
2706
|
}, i)
|
|
2707
2707
|
);
|
|
2708
2708
|
});
|
|
2709
|
-
|
|
2710
|
-
var
|
|
2711
|
-
var t = e, { className: s, children: r } = t, i =
|
|
2712
|
-
return /* @__PURE__ */ n.jsx("div", R(g({ className:
|
|
2713
|
-
},
|
|
2714
|
-
var t = e, { icon: s, children: r, className: i } = t, a =
|
|
2709
|
+
ut.displayName = "Close";
|
|
2710
|
+
var pr = (e) => {
|
|
2711
|
+
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2712
|
+
return /* @__PURE__ */ n.jsx("div", R(g({ className: _("dialog__footer", s) }, i), { children: r }));
|
|
2713
|
+
}, vr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: e }), mr = (e) => {
|
|
2714
|
+
var t = e, { icon: s, children: r, className: i } = t, a = O(t, ["icon", "children", "className"]);
|
|
2715
2715
|
const { ref: o } = J(), l = d.useRef(null);
|
|
2716
2716
|
return d.useEffect(() => {
|
|
2717
2717
|
o != null && o.current && o.current.focus();
|
|
@@ -2721,7 +2721,7 @@ var dr = (e) => {
|
|
|
2721
2721
|
tabIndex: 0,
|
|
2722
2722
|
ref: l,
|
|
2723
2723
|
id: "dialogTitle",
|
|
2724
|
-
className:
|
|
2724
|
+
className: _("dialog__header__title", i)
|
|
2725
2725
|
}, a), {
|
|
2726
2726
|
children: [
|
|
2727
2727
|
s && /* @__PURE__ */ n.jsx("span", { className: "dialog__header__icon", children: s }),
|
|
@@ -2729,23 +2729,23 @@ var dr = (e) => {
|
|
|
2729
2729
|
]
|
|
2730
2730
|
})
|
|
2731
2731
|
);
|
|
2732
|
-
},
|
|
2733
|
-
var t = e, { children: s } = t, r =
|
|
2732
|
+
}, yr = (e) => {
|
|
2733
|
+
var t = e, { children: s } = t, r = O(t, ["children"]);
|
|
2734
2734
|
const { ref: i } = J();
|
|
2735
2735
|
return /* @__PURE__ */ n.jsx(Y, R(g({ onClick: () => {
|
|
2736
2736
|
var a;
|
|
2737
2737
|
return (a = i == null ? void 0 : i.current) == null ? void 0 : a.showModal();
|
|
2738
2738
|
} }, r), { children: s }));
|
|
2739
|
-
}, M = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ n.jsx(
|
|
2740
|
-
M.Trigger =
|
|
2741
|
-
M.Root =
|
|
2742
|
-
M.Title =
|
|
2743
|
-
M.Header =
|
|
2744
|
-
M.Body =
|
|
2745
|
-
M.Footer =
|
|
2746
|
-
M.Button =
|
|
2747
|
-
M.Close =
|
|
2748
|
-
var
|
|
2739
|
+
}, M = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ n.jsx(hr, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
|
|
2740
|
+
M.Trigger = yr;
|
|
2741
|
+
M.Root = dr;
|
|
2742
|
+
M.Title = mr;
|
|
2743
|
+
M.Header = vr;
|
|
2744
|
+
M.Body = cr;
|
|
2745
|
+
M.Footer = pr;
|
|
2746
|
+
M.Button = fr;
|
|
2747
|
+
M.Close = ut;
|
|
2748
|
+
var dt = d.createContext(void 0), Cr = ({
|
|
2749
2749
|
id: e,
|
|
2750
2750
|
position: t,
|
|
2751
2751
|
isOpen: s,
|
|
@@ -2757,7 +2757,7 @@ var lt = d.createContext(void 0), vr = ({
|
|
|
2757
2757
|
contentRef: c,
|
|
2758
2758
|
children: h
|
|
2759
2759
|
}) => /* @__PURE__ */ n.jsx(
|
|
2760
|
-
|
|
2760
|
+
dt.Provider,
|
|
2761
2761
|
{
|
|
2762
2762
|
value: {
|
|
2763
2763
|
id: e,
|
|
@@ -2772,12 +2772,12 @@ var lt = d.createContext(void 0), vr = ({
|
|
|
2772
2772
|
},
|
|
2773
2773
|
children: h
|
|
2774
2774
|
}
|
|
2775
|
-
),
|
|
2776
|
-
const e = d.useContext(
|
|
2775
|
+
), ht = () => {
|
|
2776
|
+
const e = d.useContext(dt);
|
|
2777
2777
|
if (e === void 0)
|
|
2778
2778
|
throw new Error("useMenu must be used within a MenuProvider");
|
|
2779
2779
|
return e;
|
|
2780
|
-
},
|
|
2780
|
+
}, gr = ({ as: e, children: t }) => {
|
|
2781
2781
|
const {
|
|
2782
2782
|
id: s,
|
|
2783
2783
|
position: r,
|
|
@@ -2788,7 +2788,7 @@ var lt = d.createContext(void 0), vr = ({
|
|
|
2788
2788
|
clearActiveItemIndex: c,
|
|
2789
2789
|
triggerRef: h,
|
|
2790
2790
|
contentRef: u
|
|
2791
|
-
} =
|
|
2791
|
+
} = ht(), f = (v) => {
|
|
2792
2792
|
var p;
|
|
2793
2793
|
if (!i)
|
|
2794
2794
|
return;
|
|
@@ -2816,7 +2816,7 @@ var lt = d.createContext(void 0), vr = ({
|
|
|
2816
2816
|
{
|
|
2817
2817
|
id: `${s}-content`,
|
|
2818
2818
|
ref: u,
|
|
2819
|
-
className:
|
|
2819
|
+
className: _("menu__list", `menu__list--${r}`, i && "menu__list--active"),
|
|
2820
2820
|
onKeyDown: f
|
|
2821
2821
|
},
|
|
2822
2822
|
t
|
|
@@ -2827,17 +2827,17 @@ var lt = d.createContext(void 0), vr = ({
|
|
|
2827
2827
|
{
|
|
2828
2828
|
id: `${s}-content`,
|
|
2829
2829
|
ref: u,
|
|
2830
|
-
className:
|
|
2830
|
+
className: _("menu__list", `menu__list--${r}`, i && "menu__list--active"),
|
|
2831
2831
|
onKeyDown: f,
|
|
2832
2832
|
children: t
|
|
2833
2833
|
}
|
|
2834
2834
|
)
|
|
2835
2835
|
);
|
|
2836
|
-
},
|
|
2837
|
-
var t = e, { children: s, className: r } = t, i =
|
|
2838
|
-
return /* @__PURE__ */ n.jsx("li", R(g({}, i), { className:
|
|
2839
|
-
},
|
|
2840
|
-
const { id: s, isOpen: r, setIsOpen: i, clearActiveItemIndex: a, setActiveItemIndex: o, triggerRef: l } =
|
|
2836
|
+
}, xr = (e) => {
|
|
2837
|
+
var t = e, { children: s, className: r } = t, i = O(t, ["children", "className"]);
|
|
2838
|
+
return /* @__PURE__ */ n.jsx("li", R(g({}, i), { className: _("menu__list-item", r), children: s }));
|
|
2839
|
+
}, ft = ({ children: e, className: t }) => {
|
|
2840
|
+
const { id: s, isOpen: r, setIsOpen: i, clearActiveItemIndex: a, setActiveItemIndex: o, triggerRef: l } = ht(), c = () => {
|
|
2841
2841
|
a(), i((u) => !u);
|
|
2842
2842
|
}, h = (u) => {
|
|
2843
2843
|
if (r) {
|
|
@@ -2849,26 +2849,26 @@ var lt = d.createContext(void 0), vr = ({
|
|
|
2849
2849
|
return d.cloneElement(e, {
|
|
2850
2850
|
id: `${s}-trigger`,
|
|
2851
2851
|
ref: l,
|
|
2852
|
-
className:
|
|
2852
|
+
className: _("menu__trigger", t),
|
|
2853
2853
|
onClick: c,
|
|
2854
2854
|
onKeyDown: h,
|
|
2855
2855
|
"aria-expanded": r,
|
|
2856
2856
|
"aria-controls": `${s}-content`
|
|
2857
2857
|
});
|
|
2858
2858
|
};
|
|
2859
|
-
|
|
2859
|
+
ft.displayName = "Trigger";
|
|
2860
2860
|
var L = (e) => {
|
|
2861
|
-
var t = e, { type: s, id: r, position: i = "right", children: a, className: o } = t, l =
|
|
2861
|
+
var t = e, { type: s, id: r, position: i = "right", children: a, className: o } = t, l = O(t, ["type", "id", "position", "children", "className"]);
|
|
2862
2862
|
const c = d.useRef(null), h = d.useRef(null), u = d.useRef(null), [f, v] = d.useState(!1), [p, y] = d.useState(), [x, m] = d.useState(p);
|
|
2863
2863
|
p !== x && p !== void 0 && (u.current.children[p].firstChild.focus(), m(p));
|
|
2864
2864
|
const C = () => {
|
|
2865
2865
|
y(void 0), m(void 0);
|
|
2866
2866
|
}, S = (w) => {
|
|
2867
|
-
var
|
|
2868
|
-
((
|
|
2867
|
+
var P;
|
|
2868
|
+
((P = c.current) == null ? void 0 : P.contains(w.relatedTarget)) || (C(), v(!1));
|
|
2869
2869
|
};
|
|
2870
2870
|
return /* @__PURE__ */ n.jsx(
|
|
2871
|
-
|
|
2871
|
+
Cr,
|
|
2872
2872
|
{
|
|
2873
2873
|
id: r,
|
|
2874
2874
|
position: i,
|
|
@@ -2892,29 +2892,29 @@ var L = (e) => {
|
|
|
2892
2892
|
}
|
|
2893
2893
|
);
|
|
2894
2894
|
};
|
|
2895
|
-
L.Trigger =
|
|
2896
|
-
L.Content =
|
|
2897
|
-
L.Item =
|
|
2895
|
+
L.Trigger = ft;
|
|
2896
|
+
L.Content = gr;
|
|
2897
|
+
L.Item = xr;
|
|
2898
2898
|
d.createContext(void 0);
|
|
2899
|
-
var
|
|
2900
|
-
[...new Set(
|
|
2899
|
+
var br = (/* @__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");
|
|
2900
|
+
[...new Set(br.values())].map((e) => ({
|
|
2901
2901
|
label: `+${e}`,
|
|
2902
2902
|
value: e
|
|
2903
2903
|
}));
|
|
2904
2904
|
d.createContext(void 0);
|
|
2905
2905
|
d.createContext(void 0);
|
|
2906
2906
|
var ie = /* @__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))(ie || {});
|
|
2907
|
-
const
|
|
2907
|
+
const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
2908
2908
|
bouIconId: e,
|
|
2909
2909
|
...t
|
|
2910
|
-
}) => /* @__PURE__ */ n.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ n.jsx("use", { href: `${
|
|
2910
|
+
}) => /* @__PURE__ */ n.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ n.jsx("use", { href: `${wr}#${ie[e]}` }) }), U = ({
|
|
2911
2911
|
className: e,
|
|
2912
2912
|
label: t,
|
|
2913
2913
|
mobileUrl: s,
|
|
2914
2914
|
desktopUrl: r,
|
|
2915
2915
|
icon: i
|
|
2916
2916
|
}) => {
|
|
2917
|
-
const a = () => typeof i == "string" && i in ie ? /* @__PURE__ */ n.jsx(
|
|
2917
|
+
const a = () => typeof i == "string" && i in ie ? /* @__PURE__ */ n.jsx(jr, { bouIconId: ie[i] }) : i;
|
|
2918
2918
|
return /* @__PURE__ */ n.jsxs(L.Item, { className: e, children: [
|
|
2919
2919
|
/* @__PURE__ */ n.jsxs("a", { href: s, referrerPolicy: "no-referrer-when-downgrade", children: [
|
|
2920
2920
|
a(),
|
|
@@ -2925,24 +2925,24 @@ const gr = "/icons/bouMenuIcons.svg", xr = ({
|
|
|
2925
2925
|
t
|
|
2926
2926
|
] })
|
|
2927
2927
|
] });
|
|
2928
|
-
},
|
|
2928
|
+
}, pt = d.createContext(void 0), Sr = ({
|
|
2929
2929
|
position: e,
|
|
2930
2930
|
bouMenuItems: t,
|
|
2931
2931
|
authenticationStatus: s,
|
|
2932
2932
|
profile: r,
|
|
2933
2933
|
children: i
|
|
2934
|
-
}) => /* @__PURE__ */ n.jsx(
|
|
2935
|
-
const e = d.useContext(
|
|
2934
|
+
}) => /* @__PURE__ */ n.jsx(pt.Provider, { value: { position: e, bouMenuItems: t, authenticationStatus: s, profile: r }, children: i }), je = () => {
|
|
2935
|
+
const e = d.useContext(pt);
|
|
2936
2936
|
if (!e)
|
|
2937
2937
|
throw new Error("Authentication context can not be rendered outside of Authentication");
|
|
2938
2938
|
return e;
|
|
2939
|
-
},
|
|
2940
|
-
const e = d.useContext(
|
|
2939
|
+
}, vt = d.createContext(void 0), Er = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ n.jsx(vt.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), mt = () => {
|
|
2940
|
+
const e = d.useContext(vt);
|
|
2941
2941
|
if (!e)
|
|
2942
2942
|
throw new Error("Api context can not be rendered outside of Api");
|
|
2943
2943
|
return e;
|
|
2944
2944
|
}, G = () => {
|
|
2945
|
-
const { apiUrl: e, redirectUrl: t } =
|
|
2945
|
+
const { apiUrl: e, redirectUrl: t } = mt(), s = xt({ apiUrl: e, redirectUrl: t }), r = `${e}/logout?redirectUrl=${t}`, i = `${e}/user/profile`, a = `${e}/gdpr/tc/check`, o = `${e}/gdpr/tc`;
|
|
2946
2946
|
return {
|
|
2947
2947
|
loginUrl: s,
|
|
2948
2948
|
logoutUrl: r,
|
|
@@ -2950,7 +2950,7 @@ const gr = "/icons/bouMenuIcons.svg", xr = ({
|
|
|
2950
2950
|
getTermsAndConditionsEndpoint: a,
|
|
2951
2951
|
postTermsAndConditionsEndpoint: o
|
|
2952
2952
|
};
|
|
2953
|
-
},
|
|
2953
|
+
}, Rr = (e) => e != null && e.length ? /* @__PURE__ */ n.jsx("ul", { className: "bou-menu__list", children: e == null ? void 0 : e.map(({ label: t, icon: s, url: r }, i) => /* @__PURE__ */ n.jsx(
|
|
2954
2954
|
U,
|
|
2955
2955
|
{
|
|
2956
2956
|
className: "bou-menu-item",
|
|
@@ -2960,27 +2960,27 @@ const gr = "/icons/bouMenuIcons.svg", xr = ({
|
|
|
2960
2960
|
label: t
|
|
2961
2961
|
},
|
|
2962
2962
|
i
|
|
2963
|
-
)) }) : null,
|
|
2964
|
-
const { t: e } = H(), t =
|
|
2963
|
+
)) }) : null, Pr = () => {
|
|
2964
|
+
const { t: e } = H(), t = Qe(), { position: s, profile: r, bouMenuItems: i } = je(), { logoutUrl: a } = G(), o = (r == null ? void 0 : r.firstName) ?? "", l = (r == null ? void 0 : r.lastName) ?? "";
|
|
2965
2965
|
return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: s, children: [
|
|
2966
2966
|
/* @__PURE__ */ n.jsx(
|
|
2967
2967
|
L.Trigger,
|
|
2968
2968
|
{
|
|
2969
|
-
className:
|
|
2969
|
+
className: _(
|
|
2970
2970
|
"button",
|
|
2971
2971
|
"button--neutral",
|
|
2972
2972
|
"button--authentication",
|
|
2973
2973
|
"button--authentication--authenticated"
|
|
2974
2974
|
),
|
|
2975
2975
|
children: /* @__PURE__ */ n.jsxs("button", { children: [
|
|
2976
|
-
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(
|
|
2976
|
+
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(bs, { variant: "small", firstName: o, lastName: l }) }),
|
|
2977
2977
|
/* @__PURE__ */ n.jsx("span", { className: "button__label", children: o }),
|
|
2978
2978
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(be, {}) })
|
|
2979
2979
|
] })
|
|
2980
2980
|
}
|
|
2981
2981
|
),
|
|
2982
2982
|
/* @__PURE__ */ n.jsxs(L.Content, { as: "div", children: [
|
|
2983
|
-
|
|
2983
|
+
Rr(i),
|
|
2984
2984
|
/* @__PURE__ */ n.jsxs("ul", { children: [
|
|
2985
2985
|
/* @__PURE__ */ n.jsx(
|
|
2986
2986
|
U,
|
|
@@ -2988,7 +2988,7 @@ const gr = "/icons/bouMenuIcons.svg", xr = ({
|
|
|
2988
2988
|
className: "manage-profile",
|
|
2989
2989
|
mobileUrl: `${t}/manage-profile`,
|
|
2990
2990
|
desktopUrl: `${t}/manage-profile/personal-data`,
|
|
2991
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
2991
|
+
icon: /* @__PURE__ */ n.jsx(Ts, {}),
|
|
2992
2992
|
label: e("manageProfile")
|
|
2993
2993
|
}
|
|
2994
2994
|
),
|
|
@@ -2997,7 +2997,7 @@ const gr = "/icons/bouMenuIcons.svg", xr = ({
|
|
|
2997
2997
|
{
|
|
2998
2998
|
className: "payment",
|
|
2999
2999
|
mobileUrl: `${t}/payment`,
|
|
3000
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3000
|
+
icon: /* @__PURE__ */ n.jsx(zs, {}),
|
|
3001
3001
|
label: e("payment")
|
|
3002
3002
|
}
|
|
3003
3003
|
),
|
|
@@ -3006,7 +3006,7 @@ const gr = "/icons/bouMenuIcons.svg", xr = ({
|
|
|
3006
3006
|
{
|
|
3007
3007
|
className: "gift-cards",
|
|
3008
3008
|
mobileUrl: `${t}/gift-cards`,
|
|
3009
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3009
|
+
icon: /* @__PURE__ */ n.jsx($s, {}),
|
|
3010
3010
|
label: e("giftCards")
|
|
3011
3011
|
}
|
|
3012
3012
|
),
|
|
@@ -3014,7 +3014,7 @@ const gr = "/icons/bouMenuIcons.svg", xr = ({
|
|
|
3014
3014
|
U,
|
|
3015
3015
|
{
|
|
3016
3016
|
mobileUrl: `${t}/identifiers`,
|
|
3017
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3017
|
+
icon: /* @__PURE__ */ n.jsx(Js, {}),
|
|
3018
3018
|
label: e("qrCode")
|
|
3019
3019
|
}
|
|
3020
3020
|
),
|
|
@@ -3024,30 +3024,30 @@ const gr = "/icons/bouMenuIcons.svg", xr = ({
|
|
|
3024
3024
|
className: "manage-privacy",
|
|
3025
3025
|
mobileUrl: `${t}/manage-privacy`,
|
|
3026
3026
|
desktopUrl: `${t}/manage-privacy/permissions`,
|
|
3027
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3027
|
+
icon: /* @__PURE__ */ n.jsx(Ls, {}),
|
|
3028
3028
|
label: e("privacy")
|
|
3029
3029
|
}
|
|
3030
3030
|
),
|
|
3031
|
-
/* @__PURE__ */ n.jsx(U, { mobileUrl: a, icon: /* @__PURE__ */ n.jsx(
|
|
3031
|
+
/* @__PURE__ */ n.jsx(U, { mobileUrl: a, icon: /* @__PURE__ */ n.jsx(Ms, {}), label: e("logout") })
|
|
3032
3032
|
] })
|
|
3033
3033
|
] })
|
|
3034
3034
|
] });
|
|
3035
|
-
},
|
|
3035
|
+
}, _r = () => {
|
|
3036
3036
|
const { t: e } = H();
|
|
3037
|
-
return /* @__PURE__ */ n.jsxs("button", { className:
|
|
3037
|
+
return /* @__PURE__ */ n.jsxs("button", { className: _("button", "button--neutral", "button--authentication"), children: [
|
|
3038
3038
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx("i", { className: "spinner" }) }),
|
|
3039
3039
|
/* @__PURE__ */ n.jsxs("span", { className: "button__label", children: [
|
|
3040
3040
|
e("loading"),
|
|
3041
3041
|
"..."
|
|
3042
3042
|
] })
|
|
3043
3043
|
] });
|
|
3044
|
-
},
|
|
3044
|
+
}, Ar = ({ className: e }) => {
|
|
3045
3045
|
const { t } = H(), { loginUrl: s } = G();
|
|
3046
3046
|
return /* @__PURE__ */ n.jsxs(
|
|
3047
3047
|
"a",
|
|
3048
3048
|
{
|
|
3049
3049
|
href: s,
|
|
3050
|
-
className:
|
|
3050
|
+
className: _(
|
|
3051
3051
|
"button",
|
|
3052
3052
|
"button--neutral",
|
|
3053
3053
|
"button--authentication",
|
|
@@ -3062,8 +3062,8 @@ const gr = "/icons/bouMenuIcons.svg", xr = ({
|
|
|
3062
3062
|
}
|
|
3063
3063
|
);
|
|
3064
3064
|
};
|
|
3065
|
-
const
|
|
3066
|
-
const { t: e } = H(), { loginUrl: t } = G(), s =
|
|
3065
|
+
const Or = () => {
|
|
3066
|
+
const { t: e } = H(), { loginUrl: t } = G(), s = Qe(), { position: r } = je();
|
|
3067
3067
|
return /* @__PURE__ */ n.jsxs(
|
|
3068
3068
|
L,
|
|
3069
3069
|
{
|
|
@@ -3073,17 +3073,17 @@ const _r = () => {
|
|
|
3073
3073
|
className: "menu--unauthenticated",
|
|
3074
3074
|
"aria-label": e("xtraMenuAriaLabel"),
|
|
3075
3075
|
children: [
|
|
3076
|
-
/* @__PURE__ */ n.jsx(L.Trigger, { className:
|
|
3076
|
+
/* @__PURE__ */ n.jsx(L.Trigger, { className: _("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ n.jsxs("button", { children: [
|
|
3077
3077
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(we, { width: 24, height: 24, suffix: "mobile" }) }),
|
|
3078
3078
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(be, {}) })
|
|
3079
3079
|
] }) }),
|
|
3080
3080
|
/* @__PURE__ */ n.jsxs(L.Content, { children: [
|
|
3081
3081
|
/* @__PURE__ */ n.jsx(L.Item, { children: /* @__PURE__ */ n.jsxs("a", { href: t, className: "button button--with-icon", children: [
|
|
3082
|
-
/* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(
|
|
3082
|
+
/* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(ks, {}) }),
|
|
3083
3083
|
/* @__PURE__ */ n.jsx("span", { className: "button__label", children: e("login") })
|
|
3084
3084
|
] }) }),
|
|
3085
3085
|
/* @__PURE__ */ n.jsx(L.Item, { children: /* @__PURE__ */ n.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
|
|
3086
|
-
/* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(
|
|
3086
|
+
/* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Qs, {}) }),
|
|
3087
3087
|
/* @__PURE__ */ n.jsx("span", { className: "button__label", children: e("register") })
|
|
3088
3088
|
] }) })
|
|
3089
3089
|
] })
|
|
@@ -3092,12 +3092,12 @@ const _r = () => {
|
|
|
3092
3092
|
);
|
|
3093
3093
|
};
|
|
3094
3094
|
var D = /* @__PURE__ */ ((e) => (e.Authenticated = "authenticated", e.NotAuthenticated = "notAuthenticated", e.Pending = "pending", e))(D || {});
|
|
3095
|
-
const
|
|
3095
|
+
const kr = () => {
|
|
3096
3096
|
const { authenticationStatus: e } = je();
|
|
3097
3097
|
return e === D.NotAuthenticated ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3098
|
-
/* @__PURE__ */ n.jsx(
|
|
3099
|
-
/* @__PURE__ */ n.jsx(
|
|
3100
|
-
] }) : e === D.Pending ? /* @__PURE__ */ n.jsx(
|
|
3098
|
+
/* @__PURE__ */ n.jsx(Ar, {}),
|
|
3099
|
+
/* @__PURE__ */ n.jsx(Or, {})
|
|
3100
|
+
] }) : e === D.Pending ? /* @__PURE__ */ n.jsx(_r, {}) : /* @__PURE__ */ n.jsx(Pr, {});
|
|
3101
3101
|
};
|
|
3102
3102
|
/*! js-cookie v3.0.5 | MIT */
|
|
3103
3103
|
function X(e) {
|
|
@@ -3108,7 +3108,7 @@ function X(e) {
|
|
|
3108
3108
|
}
|
|
3109
3109
|
return e;
|
|
3110
3110
|
}
|
|
3111
|
-
var
|
|
3111
|
+
var Fr = {
|
|
3112
3112
|
read: function(e) {
|
|
3113
3113
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
3114
3114
|
},
|
|
@@ -3169,15 +3169,15 @@ function ve(e, t) {
|
|
|
3169
3169
|
}
|
|
3170
3170
|
);
|
|
3171
3171
|
}
|
|
3172
|
-
var me = ve(
|
|
3172
|
+
var me = ve(Fr, { path: "/" });
|
|
3173
3173
|
class ye extends Error {
|
|
3174
3174
|
constructor(t) {
|
|
3175
3175
|
super(t), this.name = "UnauthorizedError";
|
|
3176
3176
|
}
|
|
3177
3177
|
}
|
|
3178
|
-
const
|
|
3178
|
+
const Mr = () => {
|
|
3179
3179
|
const { i18n: e } = H(), { profileEndpoint: t } = G();
|
|
3180
|
-
return
|
|
3180
|
+
return rt({
|
|
3181
3181
|
queryKey: ["profile"],
|
|
3182
3182
|
queryFn: async () => {
|
|
3183
3183
|
const r = await fetch(t, {
|
|
@@ -3192,47 +3192,79 @@ const kr = () => {
|
|
|
3192
3192
|
retry: (r, i) => i instanceof ye ? !1 : r < 2,
|
|
3193
3193
|
refetchOnWindowFocus: !1
|
|
3194
3194
|
});
|
|
3195
|
-
},
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3195
|
+
}, Te = (e) => e ? `+${e.countryCode} ${e.number}` : "", Ue = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), Nr = (e) => {
|
|
3196
|
+
const t = new Date(e.dateOfBirth), s = Ue(Se.Mobile, e.phone), r = Ue(Se.Fixed, e.phone), i = Te(s) ?? Te(r) ?? "";
|
|
3197
|
+
return {
|
|
3198
|
+
firstName: () => e.firstName,
|
|
3199
|
+
lastName: () => e.lastName,
|
|
3200
|
+
dob: () => t.getDate(),
|
|
3201
|
+
mob: () => t.getMonth() + 1,
|
|
3202
|
+
yob: () => t.getFullYear(),
|
|
3203
|
+
gender: () => e.genderCode,
|
|
3204
|
+
phone: () => i,
|
|
3205
|
+
streetName: () => {
|
|
3206
|
+
var a;
|
|
3207
|
+
return (a = e.address) == null ? void 0 : a.streetName;
|
|
3208
|
+
},
|
|
3209
|
+
houseNr: () => {
|
|
3210
|
+
var a;
|
|
3211
|
+
return (a = e.address) == null ? void 0 : a.houseNumber;
|
|
3212
|
+
},
|
|
3213
|
+
box: () => {
|
|
3214
|
+
var a;
|
|
3215
|
+
return (a = e.address) == null ? void 0 : a.letterBoxName;
|
|
3216
|
+
},
|
|
3217
|
+
zip: () => {
|
|
3218
|
+
var a;
|
|
3219
|
+
return (a = e.address) == null ? void 0 : a.postalCode;
|
|
3220
|
+
},
|
|
3221
|
+
city: () => {
|
|
3222
|
+
var a;
|
|
3223
|
+
return (a = e.address) == null ? void 0 : a.locationName;
|
|
3224
|
+
},
|
|
3225
|
+
country: () => {
|
|
3226
|
+
var a;
|
|
3227
|
+
return (a = e.address) == null ? void 0 : a.countryCode;
|
|
3228
|
+
},
|
|
3229
|
+
email: () => e.email,
|
|
3230
|
+
cbh: () => e.customerIdentifier
|
|
3231
|
+
};
|
|
3232
|
+
}, yt = () => {
|
|
3233
|
+
const e = Mr(), t = me.get("profile"), s = !!t, [r, i] = d.useState(
|
|
3234
|
+
s ? D.Authenticated : D.Pending
|
|
3235
|
+
), [a, o] = d.useState(
|
|
3236
|
+
s ? JSON.parse(t) : void 0
|
|
3237
|
+
);
|
|
3202
3238
|
return d.useEffect(() => {
|
|
3203
|
-
if (
|
|
3204
|
-
|
|
3205
|
-
),
|
|
3206
|
-
|
|
3207
|
-
const
|
|
3208
|
-
|
|
3209
|
-
lastName: o.data.lastName
|
|
3210
|
-
};
|
|
3211
|
-
a(h);
|
|
3239
|
+
if (e.isError && e.error instanceof ye && (me.remove("profile"), i(D.NotAuthenticated)), e.isError && i(
|
|
3240
|
+
s ? D.Authenticated : D.NotAuthenticated
|
|
3241
|
+
), e.isSuccess) {
|
|
3242
|
+
i(D.Authenticated);
|
|
3243
|
+
const l = e.data;
|
|
3244
|
+
o(l), window.XTRA = Nr(l);
|
|
3212
3245
|
}
|
|
3213
3246
|
}, [
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
const { authenticationStatus: s, profile: r } = pt();
|
|
3247
|
+
s,
|
|
3248
|
+
e.data,
|
|
3249
|
+
e.error,
|
|
3250
|
+
e.isError,
|
|
3251
|
+
e.isSuccess
|
|
3252
|
+
]), { authenticationStatus: r, profile: a };
|
|
3253
|
+
}, Lr = ({ position: e, bouMenuItems: t }) => {
|
|
3254
|
+
const { authenticationStatus: s, profile: r } = yt();
|
|
3223
3255
|
return /* @__PURE__ */ n.jsx(
|
|
3224
|
-
|
|
3256
|
+
Sr,
|
|
3225
3257
|
{
|
|
3226
3258
|
bouMenuItems: t,
|
|
3227
3259
|
authenticationStatus: s,
|
|
3228
3260
|
position: e,
|
|
3229
3261
|
profile: r,
|
|
3230
|
-
children: /* @__PURE__ */ n.jsx(
|
|
3262
|
+
children: /* @__PURE__ */ n.jsx(kr, {})
|
|
3231
3263
|
}
|
|
3232
3264
|
);
|
|
3233
|
-
},
|
|
3234
|
-
const { postTermsAndConditionsEndpoint: e } = G(), t = new
|
|
3235
|
-
return
|
|
3265
|
+
}, Dr = () => {
|
|
3266
|
+
const { postTermsAndConditionsEndpoint: e } = G(), t = new ze();
|
|
3267
|
+
return us({
|
|
3236
3268
|
mutationFn: async (r) => {
|
|
3237
3269
|
const i = await fetch(e, {
|
|
3238
3270
|
method: "post",
|
|
@@ -3248,9 +3280,9 @@ const kr = () => {
|
|
|
3248
3280
|
await t.invalidateQueries({ queryKey: ["gdpr"] });
|
|
3249
3281
|
}
|
|
3250
3282
|
});
|
|
3251
|
-
},
|
|
3252
|
-
const { i18n: e } = H(), { getTermsAndConditionsEndpoint: t } = G(), { authenticationStatus: s } =
|
|
3253
|
-
return
|
|
3283
|
+
}, Tr = () => {
|
|
3284
|
+
const { i18n: e } = H(), { getTermsAndConditionsEndpoint: t } = G(), { authenticationStatus: s } = yt(), r = me.get("hasAcceptedLatestTermsAndConditions"), i = [], a = r === "true", o = s === D.Authenticated;
|
|
3285
|
+
return rt({
|
|
3254
3286
|
queryKey: ["gdpr"],
|
|
3255
3287
|
queryFn: async () => {
|
|
3256
3288
|
const c = await fetch(t, {
|
|
@@ -3265,8 +3297,8 @@ const kr = () => {
|
|
|
3265
3297
|
enabled: o && !a,
|
|
3266
3298
|
initialData: i
|
|
3267
3299
|
});
|
|
3268
|
-
},
|
|
3269
|
-
const { t } = H(), { apiUrl: s } =
|
|
3300
|
+
}, Ur = ({ redirectUrl: e }) => {
|
|
3301
|
+
const { t } = H(), { apiUrl: s } = mt(), r = d.useRef(null), [i, a] = d.useState(0), [o, l] = d.useState({}), { mutate: c, isError: h } = Dr(), { AccessibleFormMessage: u, formRef: f } = bt({ submitCount: i, errors: o }), { data: v } = Tr(), p = !!(v != null && v.length), y = t("termsAndConditions.error.required"), x = () => {
|
|
3270
3302
|
var C;
|
|
3271
3303
|
(C = r == null ? void 0 : r.current) == null || C.click(), document.body.style.removeProperty("overflow");
|
|
3272
3304
|
};
|
|
@@ -3280,18 +3312,18 @@ const kr = () => {
|
|
|
3280
3312
|
const { acceptedTC: S } = C.target;
|
|
3281
3313
|
if (S instanceof RadioNodeList) {
|
|
3282
3314
|
const w = Object.values(S);
|
|
3283
|
-
w.every((
|
|
3315
|
+
w.every((k) => k.checked) ? (l({}), c(w.map((k) => k.value)), x()) : l({ acceptedTC: y });
|
|
3284
3316
|
} else
|
|
3285
3317
|
S != null && S.checked ? (l({}), c([S.value]), x()) : l({ acceptedTC: y });
|
|
3286
3318
|
};
|
|
3287
3319
|
return p ? /* @__PURE__ */ n.jsxs(M, { defaultOpen: p, isModal: !0, children: [
|
|
3288
3320
|
u,
|
|
3289
3321
|
/* @__PURE__ */ n.jsxs(M.Root, { children: [
|
|
3290
|
-
/* @__PURE__ */ n.jsx(M.Header, { children: /* @__PURE__ */ n.jsx(M.Title, { icon: /* @__PURE__ */ n.jsx(we, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(
|
|
3291
|
-
/* @__PURE__ */ n.jsx(M.Body, { children: /* @__PURE__ */ n.jsxs(
|
|
3292
|
-
/* @__PURE__ */ n.jsxs(
|
|
3322
|
+
/* @__PURE__ */ n.jsx(M.Header, { children: /* @__PURE__ */ n.jsx(M.Title, { icon: /* @__PURE__ */ n.jsx(we, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(Kr, { children: t("termsAndConditions.title") }) }) }),
|
|
3323
|
+
/* @__PURE__ */ n.jsx(M.Body, { children: /* @__PURE__ */ n.jsxs(Ct, { ref: f, id: "tc-form", onSubmit: m, children: [
|
|
3324
|
+
/* @__PURE__ */ n.jsxs(qr, { children: [
|
|
3293
3325
|
t("termsAndConditions.description"),
|
|
3294
|
-
o.acceptedTC && /* @__PURE__ */ n.jsx(
|
|
3326
|
+
o.acceptedTC && /* @__PURE__ */ n.jsx(Vr, { children: y })
|
|
3295
3327
|
] }),
|
|
3296
3328
|
v.map(({ tcCode: C, title: S, URL: w }) => /* @__PURE__ */ n.jsx(
|
|
3297
3329
|
q,
|
|
@@ -3301,8 +3333,8 @@ const kr = () => {
|
|
|
3301
3333
|
name: "acceptedTC",
|
|
3302
3334
|
variant: "primary",
|
|
3303
3335
|
children: /* @__PURE__ */ n.jsxs(q.Content, { children: [
|
|
3304
|
-
/* @__PURE__ */ n.jsx(
|
|
3305
|
-
/* @__PURE__ */ n.jsx(
|
|
3336
|
+
/* @__PURE__ */ n.jsx(Qr, { children: S }),
|
|
3337
|
+
/* @__PURE__ */ n.jsx(Hr, { href: w, children: t("termsAndConditions.action", { title: S }) })
|
|
3306
3338
|
] })
|
|
3307
3339
|
},
|
|
3308
3340
|
C
|
|
@@ -3312,7 +3344,7 @@ const kr = () => {
|
|
|
3312
3344
|
/* @__PURE__ */ n.jsx(
|
|
3313
3345
|
"a",
|
|
3314
3346
|
{
|
|
3315
|
-
className:
|
|
3347
|
+
className: _("button", "button--secondary", "button--terms-and-conditions"),
|
|
3316
3348
|
href: `${s}/logout?redirectUrl=${e}`,
|
|
3317
3349
|
children: t("logout")
|
|
3318
3350
|
}
|
|
@@ -3321,15 +3353,15 @@ const kr = () => {
|
|
|
3321
3353
|
] })
|
|
3322
3354
|
] })
|
|
3323
3355
|
] }) : /* @__PURE__ */ n.jsx(n.Fragment, {});
|
|
3324
|
-
},
|
|
3356
|
+
}, Qr = ({
|
|
3325
3357
|
children: e,
|
|
3326
3358
|
...t
|
|
3327
|
-
}) => /* @__PURE__ */ n.jsx(q.Label, { className: "form--tc__label", ...t, children: e }),
|
|
3328
|
-
|
|
3329
|
-
const
|
|
3359
|
+
}) => /* @__PURE__ */ n.jsx(q.Label, { className: "form--tc__label", ...t, children: e }), Ct = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
|
|
3360
|
+
Ct.displayName = "TermsAndConditionsForm";
|
|
3361
|
+
const qr = ({
|
|
3330
3362
|
children: e,
|
|
3331
3363
|
...t
|
|
3332
|
-
}) => /* @__PURE__ */ n.jsx("p", { className: "form--tc__description", ...t, children: e }),
|
|
3364
|
+
}) => /* @__PURE__ */ n.jsx("p", { className: "form--tc__description", ...t, children: e }), Hr = ({ children: e, ...t }) => /* @__PURE__ */ n.jsx(
|
|
3333
3365
|
"a",
|
|
3334
3366
|
{
|
|
3335
3367
|
className: "form--tc__link",
|
|
@@ -3340,10 +3372,10 @@ const Dr = ({
|
|
|
3340
3372
|
...t,
|
|
3341
3373
|
children: e
|
|
3342
3374
|
}
|
|
3343
|
-
),
|
|
3344
|
-
/* @__PURE__ */ n.jsx(
|
|
3345
|
-
/* @__PURE__ */ n.jsx(
|
|
3375
|
+
), Kr = ({ children: e }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: e }), Vr = ({ children: e, ...t }) => /* @__PURE__ */ n.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), Gr = new ze(), Zr = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, bouMenuItems: i }) => /* @__PURE__ */ n.jsx(wt, { environment: e, children: /* @__PURE__ */ n.jsx(Er, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ n.jsxs(Xt, { client: Gr, children: [
|
|
3376
|
+
/* @__PURE__ */ n.jsx(Lr, { position: r, bouMenuItems: i }),
|
|
3377
|
+
/* @__PURE__ */ n.jsx(Ur, { redirectUrl: t })
|
|
3346
3378
|
] }) }) });
|
|
3347
3379
|
export {
|
|
3348
|
-
|
|
3380
|
+
Zr as default
|
|
3349
3381
|
};
|