@myxtra/authentication-green 1.12.2 → 1.12.4
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, u as bt, g as wt, a as H, b as Qe, P as Se, c as jt, E as St } from "./index-a36d0e63.mjs";
|
|
2
2
|
class V {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
@@ -22,7 +22,7 @@ class V {
|
|
|
22
22
|
const Z = typeof window > "u" || "Deno" in window;
|
|
23
23
|
function N() {
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Et(e, t) {
|
|
26
26
|
return typeof e == "function" ? e(t) : e;
|
|
27
27
|
}
|
|
28
28
|
function ce(e) {
|
|
@@ -41,7 +41,7 @@ function $(e, t, s) {
|
|
|
41
41
|
queryKey: e
|
|
42
42
|
} : e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Rt(e, t, s) {
|
|
45
45
|
return z(e) ? typeof t == "function" ? {
|
|
46
46
|
...s,
|
|
47
47
|
mutationKey: e,
|
|
@@ -164,14 +164,14 @@ function Ve(e) {
|
|
|
164
164
|
function Ae(e) {
|
|
165
165
|
Ve(0).then(e);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Pt() {
|
|
168
168
|
if (typeof AbortController == "function")
|
|
169
169
|
return new AbortController();
|
|
170
170
|
}
|
|
171
171
|
function de(e, t, s) {
|
|
172
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 _t extends V {
|
|
175
175
|
constructor() {
|
|
176
176
|
super(), this.setup = (t) => {
|
|
177
177
|
if (!Z && window.addEventListener) {
|
|
@@ -211,8 +211,8 @@ class Rt 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 _t(), Oe = ["online", "offline"];
|
|
215
|
+
class At extends V {
|
|
216
216
|
constructor() {
|
|
217
217
|
super(), this.setup = (t) => {
|
|
218
218
|
if (!Z && window.addEventListener) {
|
|
@@ -256,8 +256,8 @@ class Pt 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 At();
|
|
260
|
+
function Ot(e) {
|
|
261
261
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
262
262
|
}
|
|
263
263
|
function ae(e) {
|
|
@@ -273,52 +273,52 @@ function I(e) {
|
|
|
273
273
|
}
|
|
274
274
|
function We(e) {
|
|
275
275
|
let t = !1, s = 0, r = !1, i, a, o;
|
|
276
|
-
const l = new Promise((
|
|
277
|
-
a =
|
|
278
|
-
}), c = (
|
|
279
|
-
r || (p(new Ge(
|
|
276
|
+
const l = new Promise((v, y) => {
|
|
277
|
+
a = v, o = y;
|
|
278
|
+
}), c = (v) => {
|
|
279
|
+
r || (p(new Ge(v)), e.abort == null || e.abort());
|
|
280
280
|
}, h = () => {
|
|
281
281
|
t = !0;
|
|
282
282
|
}, u = () => {
|
|
283
283
|
t = !1;
|
|
284
|
-
}, f = () => !te.isFocused() || e.networkMode !== "always" && !se.isOnline(),
|
|
285
|
-
r || (r = !0, e.onSuccess == null || e.onSuccess(
|
|
286
|
-
}, p = (
|
|
287
|
-
r || (r = !0, e.onError == null || e.onError(
|
|
288
|
-
},
|
|
289
|
-
i = (
|
|
290
|
-
const
|
|
291
|
-
return
|
|
284
|
+
}, f = () => !te.isFocused() || e.networkMode !== "always" && !se.isOnline(), m = (v) => {
|
|
285
|
+
r || (r = !0, e.onSuccess == null || e.onSuccess(v), i == null || i(), a(v));
|
|
286
|
+
}, p = (v) => {
|
|
287
|
+
r || (r = !0, e.onError == null || e.onError(v), i == null || i(), o(v));
|
|
288
|
+
}, g = () => new Promise((v) => {
|
|
289
|
+
i = (y) => {
|
|
290
|
+
const _ = r || !f();
|
|
291
|
+
return _ && v(y), _;
|
|
292
292
|
}, e.onPause == null || e.onPause();
|
|
293
293
|
}).then(() => {
|
|
294
294
|
i = void 0, r || e.onContinue == null || e.onContinue();
|
|
295
|
-
}),
|
|
295
|
+
}), b = () => {
|
|
296
296
|
if (r)
|
|
297
297
|
return;
|
|
298
|
-
let
|
|
298
|
+
let v;
|
|
299
299
|
try {
|
|
300
|
-
|
|
301
|
-
} catch (
|
|
302
|
-
|
|
300
|
+
v = e.fn();
|
|
301
|
+
} catch (y) {
|
|
302
|
+
v = Promise.reject(y);
|
|
303
303
|
}
|
|
304
|
-
Promise.resolve(
|
|
305
|
-
var
|
|
304
|
+
Promise.resolve(v).then(m).catch((y) => {
|
|
305
|
+
var _, j;
|
|
306
306
|
if (r)
|
|
307
307
|
return;
|
|
308
|
-
const
|
|
309
|
-
if (t || !
|
|
310
|
-
p(
|
|
308
|
+
const S = (_ = e.retry) != null ? _ : 3, M = (j = e.retryDelay) != null ? j : Ot, E = typeof M == "function" ? M(s, y) : M, w = S === !0 || typeof S == "number" && s < S || typeof S == "function" && S(s, y);
|
|
309
|
+
if (t || !w) {
|
|
310
|
+
p(y);
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
|
-
s++, e.onFail == null || e.onFail(s,
|
|
313
|
+
s++, e.onFail == null || e.onFail(s, y), Ve(E).then(() => {
|
|
314
314
|
if (f())
|
|
315
|
-
return
|
|
315
|
+
return g();
|
|
316
316
|
}).then(() => {
|
|
317
|
-
t ? p(
|
|
317
|
+
t ? p(y) : b();
|
|
318
318
|
});
|
|
319
319
|
});
|
|
320
320
|
};
|
|
321
|
-
return ae(e.networkMode) ?
|
|
321
|
+
return ae(e.networkMode) ? b() : g().then(b), {
|
|
322
322
|
promise: l,
|
|
323
323
|
cancel: c,
|
|
324
324
|
continue: () => (i == null ? void 0 : i()) ? l : Promise.resolve(),
|
|
@@ -327,7 +327,7 @@ function We(e) {
|
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
329
|
const ge = console;
|
|
330
|
-
function
|
|
330
|
+
function kt() {
|
|
331
331
|
let e = [], t = 0, s = (u) => {
|
|
332
332
|
u();
|
|
333
333
|
}, r = (u) => {
|
|
@@ -372,7 +372,7 @@ function At() {
|
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
const A =
|
|
375
|
+
const A = kt();
|
|
376
376
|
class $e {
|
|
377
377
|
destroy() {
|
|
378
378
|
this.clearGcTimeout();
|
|
@@ -389,9 +389,9 @@ class $e {
|
|
|
389
389
|
this.gcTimeout && (clearTimeout(this.gcTimeout), this.gcTimeout = void 0);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
class
|
|
392
|
+
class Ft 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 || Mt(this.options), this.state = this.initialState, this.scheduleGc();
|
|
395
395
|
}
|
|
396
396
|
get meta() {
|
|
397
397
|
return this.options.meta;
|
|
@@ -497,10 +497,10 @@ class Ot extends $e {
|
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
if (t && this.setOptions(t), !this.options.queryFn) {
|
|
500
|
-
const p = this.observers.find((
|
|
500
|
+
const p = this.observers.find((g) => g.options.queryFn);
|
|
501
501
|
p && this.setOptions(p.options);
|
|
502
502
|
}
|
|
503
|
-
const o =
|
|
503
|
+
const o = Pt(), l = {
|
|
504
504
|
queryKey: this.queryKey,
|
|
505
505
|
pageParam: void 0,
|
|
506
506
|
meta: this.meta
|
|
@@ -528,13 +528,13 @@ class Ot extends $e {
|
|
|
528
528
|
meta: (f = u.fetchOptions) == null ? void 0 : f.meta
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
|
-
const
|
|
531
|
+
const m = (p) => {
|
|
532
532
|
if (I(p) && p.silent || this.dispatch({
|
|
533
533
|
type: "error",
|
|
534
534
|
error: p
|
|
535
535
|
}), !I(p)) {
|
|
536
|
-
var
|
|
537
|
-
(
|
|
536
|
+
var g, b, v, y;
|
|
537
|
+
(g = (b = this.cache.config).onError) == null || g.call(b, p, this), (v = (y = this.cache.config).onSettled) == null || v.call(y, this.state.data, p, this);
|
|
538
538
|
}
|
|
539
539
|
this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
540
540
|
};
|
|
@@ -542,19 +542,19 @@ class Ot extends $e {
|
|
|
542
542
|
fn: u.fetchFn,
|
|
543
543
|
abort: o == null ? void 0 : o.abort.bind(o),
|
|
544
544
|
onSuccess: (p) => {
|
|
545
|
-
var
|
|
545
|
+
var g, b, v, y;
|
|
546
546
|
if (typeof p > "u") {
|
|
547
|
-
|
|
547
|
+
m(new Error(this.queryHash + " data is undefined"));
|
|
548
548
|
return;
|
|
549
549
|
}
|
|
550
|
-
this.setData(p), (
|
|
550
|
+
this.setData(p), (g = (b = this.cache.config).onSuccess) == null || g.call(b, p, this), (v = (y = this.cache.config).onSettled) == null || v.call(y, p, this.state.error, this), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
551
551
|
},
|
|
552
|
-
onError:
|
|
553
|
-
onFail: (p,
|
|
552
|
+
onError: m,
|
|
553
|
+
onFail: (p, g) => {
|
|
554
554
|
this.dispatch({
|
|
555
555
|
type: "failed",
|
|
556
556
|
failureCount: p,
|
|
557
|
-
error:
|
|
557
|
+
error: g
|
|
558
558
|
});
|
|
559
559
|
},
|
|
560
560
|
onPause: () => {
|
|
@@ -657,7 +657,7 @@ class Ot extends $e {
|
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function Mt(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 kt(e) {
|
|
|
674
674
|
fetchStatus: "idle"
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
|
-
class
|
|
677
|
+
class Nt extends V {
|
|
678
678
|
constructor(t) {
|
|
679
679
|
super(), this.config = t || {}, this.queries = [], this.queriesMap = {};
|
|
680
680
|
}
|
|
@@ -682,7 +682,7 @@ class Ft 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 Ft({
|
|
686
686
|
cache: this,
|
|
687
687
|
logger: t.getLogger(),
|
|
688
688
|
queryKey: a,
|
|
@@ -750,7 +750,7 @@ class Ft extends V {
|
|
|
750
750
|
});
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
class
|
|
753
|
+
class Lt extends $e {
|
|
754
754
|
constructor(t) {
|
|
755
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
|
}
|
|
@@ -792,14 +792,14 @@ class Mt extends $e {
|
|
|
792
792
|
}
|
|
793
793
|
async execute() {
|
|
794
794
|
const t = () => {
|
|
795
|
-
var
|
|
795
|
+
var w;
|
|
796
796
|
return this.retryer = We({
|
|
797
797
|
fn: () => this.options.mutationFn ? this.options.mutationFn(this.state.variables) : Promise.reject("No mutationFn found"),
|
|
798
|
-
onFail: (
|
|
798
|
+
onFail: (x, k) => {
|
|
799
799
|
this.dispatch({
|
|
800
800
|
type: "failed",
|
|
801
|
-
failureCount:
|
|
802
|
-
error:
|
|
801
|
+
failureCount: x,
|
|
802
|
+
error: k
|
|
803
803
|
});
|
|
804
804
|
},
|
|
805
805
|
onPause: () => {
|
|
@@ -812,7 +812,7 @@ class Mt extends $e {
|
|
|
812
812
|
type: "continue"
|
|
813
813
|
});
|
|
814
814
|
},
|
|
815
|
-
retry: (
|
|
815
|
+
retry: (w = this.options.retry) != null ? w : 0,
|
|
816
816
|
retryDelay: this.options.retryDelay,
|
|
817
817
|
networkMode: this.options.networkMode
|
|
818
818
|
}), this.retryer.promise;
|
|
@@ -820,31 +820,31 @@ class Mt extends $e {
|
|
|
820
820
|
try {
|
|
821
821
|
var r, i, a, o, l, c, h, u;
|
|
822
822
|
if (!s) {
|
|
823
|
-
var f,
|
|
823
|
+
var f, m, p, g;
|
|
824
824
|
this.dispatch({
|
|
825
825
|
type: "loading",
|
|
826
826
|
variables: this.options.variables
|
|
827
|
-
}), await ((f = (
|
|
828
|
-
const
|
|
829
|
-
|
|
827
|
+
}), await ((f = (m = this.mutationCache.config).onMutate) == null ? void 0 : f.call(m, this.state.variables, this));
|
|
828
|
+
const x = await ((p = (g = this.options).onMutate) == null ? void 0 : p.call(g, this.state.variables));
|
|
829
|
+
x !== this.state.context && this.dispatch({
|
|
830
830
|
type: "loading",
|
|
831
|
-
context:
|
|
831
|
+
context: x,
|
|
832
832
|
variables: this.state.variables
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
|
-
const
|
|
836
|
-
return await ((r = (i = this.mutationCache.config).onSuccess) == null ? void 0 : r.call(i,
|
|
835
|
+
const w = await t();
|
|
836
|
+
return await ((r = (i = this.mutationCache.config).onSuccess) == null ? void 0 : r.call(i, w, this.state.variables, this.state.context, this)), await ((a = (o = this.options).onSuccess) == null ? void 0 : a.call(o, w, this.state.variables, this.state.context)), await ((l = (c = this.mutationCache.config).onSettled) == null ? void 0 : l.call(c, w, null, this.state.variables, this.state.context, this)), await ((h = (u = this.options).onSettled) == null ? void 0 : h.call(u, w, null, this.state.variables, this.state.context)), this.dispatch({
|
|
837
837
|
type: "success",
|
|
838
|
-
data:
|
|
839
|
-
}),
|
|
840
|
-
} catch (
|
|
838
|
+
data: w
|
|
839
|
+
}), w;
|
|
840
|
+
} catch (w) {
|
|
841
841
|
try {
|
|
842
|
-
var
|
|
843
|
-
throw await ((
|
|
842
|
+
var b, v, y, _, j, S, M, E;
|
|
843
|
+
throw await ((b = (v = this.mutationCache.config).onError) == null ? void 0 : b.call(v, w, this.state.variables, this.state.context, this)), await ((y = (_ = this.options).onError) == null ? void 0 : y.call(_, w, this.state.variables, this.state.context)), await ((j = (S = this.mutationCache.config).onSettled) == null ? void 0 : j.call(S, void 0, w, this.state.variables, this.state.context, this)), await ((M = (E = this.options).onSettled) == null ? void 0 : M.call(E, void 0, w, this.state.variables, this.state.context)), w;
|
|
844
844
|
} finally {
|
|
845
845
|
this.dispatch({
|
|
846
846
|
type: "error",
|
|
847
|
-
error:
|
|
847
|
+
error: w
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
850
|
}
|
|
@@ -930,12 +930,12 @@ function Ze() {
|
|
|
930
930
|
variables: void 0
|
|
931
931
|
};
|
|
932
932
|
}
|
|
933
|
-
class
|
|
933
|
+
class Dt 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 Lt({
|
|
939
939
|
mutationCache: this,
|
|
940
940
|
logger: t.getLogger(),
|
|
941
941
|
mutationId: ++this.mutationId,
|
|
@@ -992,68 +992,68 @@ class Nt extends V {
|
|
|
992
992
|
}), this.resuming;
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function Tt() {
|
|
996
996
|
return {
|
|
997
997
|
onFetch: (e) => {
|
|
998
998
|
e.fetchFn = () => {
|
|
999
999
|
var t, s, r, i, a, o;
|
|
1000
|
-
const l = (t = e.fetchOptions) == null || (s = t.meta) == null ? void 0 : s.refetchPage, c = (r = e.fetchOptions) == null || (i = r.meta) == null ? void 0 : i.fetchMore, h = c == null ? void 0 : c.pageParam, u = (c == null ? void 0 : c.direction) === "forward", f = (c == null ? void 0 : c.direction) === "backward",
|
|
1001
|
-
let
|
|
1002
|
-
const
|
|
1000
|
+
const l = (t = e.fetchOptions) == null || (s = t.meta) == null ? void 0 : s.refetchPage, c = (r = e.fetchOptions) == null || (i = r.meta) == null ? void 0 : i.fetchMore, h = c == null ? void 0 : c.pageParam, u = (c == null ? void 0 : c.direction) === "forward", f = (c == null ? void 0 : c.direction) === "backward", m = ((a = e.state.data) == null ? void 0 : a.pages) || [], p = ((o = e.state.data) == null ? void 0 : o.pageParams) || [];
|
|
1001
|
+
let g = p, b = !1;
|
|
1002
|
+
const v = (E) => {
|
|
1003
1003
|
Object.defineProperty(E, "signal", {
|
|
1004
1004
|
enumerable: !0,
|
|
1005
1005
|
get: () => {
|
|
1006
|
-
var
|
|
1007
|
-
if ((
|
|
1008
|
-
|
|
1006
|
+
var w;
|
|
1007
|
+
if ((w = e.signal) != null && w.aborted)
|
|
1008
|
+
b = !0;
|
|
1009
1009
|
else {
|
|
1010
|
-
var
|
|
1011
|
-
(
|
|
1012
|
-
|
|
1010
|
+
var x;
|
|
1011
|
+
(x = e.signal) == null || x.addEventListener("abort", () => {
|
|
1012
|
+
b = !0;
|
|
1013
1013
|
});
|
|
1014
1014
|
}
|
|
1015
1015
|
return e.signal;
|
|
1016
1016
|
}
|
|
1017
1017
|
});
|
|
1018
|
-
},
|
|
1019
|
-
if (
|
|
1018
|
+
}, y = e.options.queryFn || (() => Promise.reject("Missing queryFn for queryKey '" + e.options.queryHash + "'")), _ = (E, w, x, k) => (g = k ? [w, ...g] : [...g, w], k ? [x, ...E] : [...E, x]), j = (E, w, x, k) => {
|
|
1019
|
+
if (b)
|
|
1020
1020
|
return Promise.reject("Cancelled");
|
|
1021
|
-
if (typeof
|
|
1021
|
+
if (typeof x > "u" && !w && E.length)
|
|
1022
1022
|
return Promise.resolve(E);
|
|
1023
1023
|
const W = {
|
|
1024
1024
|
queryKey: e.queryKey,
|
|
1025
|
-
pageParam:
|
|
1025
|
+
pageParam: x,
|
|
1026
1026
|
meta: e.options.meta
|
|
1027
1027
|
};
|
|
1028
|
-
|
|
1029
|
-
const oe =
|
|
1030
|
-
return Promise.resolve(oe).then((
|
|
1028
|
+
v(W);
|
|
1029
|
+
const oe = y(W);
|
|
1030
|
+
return Promise.resolve(oe).then((xt) => _(E, x, xt, k));
|
|
1031
1031
|
};
|
|
1032
|
-
let
|
|
1033
|
-
if (!
|
|
1034
|
-
|
|
1032
|
+
let S;
|
|
1033
|
+
if (!m.length)
|
|
1034
|
+
S = j([]);
|
|
1035
1035
|
else if (u) {
|
|
1036
|
-
const E = typeof h < "u",
|
|
1037
|
-
|
|
1036
|
+
const E = typeof h < "u", w = E ? h : ke(e.options, m);
|
|
1037
|
+
S = j(m, E, w);
|
|
1038
1038
|
} else if (f) {
|
|
1039
|
-
const E = typeof h < "u",
|
|
1040
|
-
|
|
1039
|
+
const E = typeof h < "u", w = E ? h : Ut(e.options, m);
|
|
1040
|
+
S = j(m, E, w, !0);
|
|
1041
1041
|
} else {
|
|
1042
|
-
|
|
1042
|
+
g = [];
|
|
1043
1043
|
const E = typeof e.options.getNextPageParam > "u";
|
|
1044
|
-
|
|
1045
|
-
for (let
|
|
1046
|
-
|
|
1047
|
-
if (l &&
|
|
1048
|
-
const oe = E ? p[
|
|
1049
|
-
return
|
|
1044
|
+
S = (l && m[0] ? l(m[0], 0, m) : !0) ? j([], E, p[0]) : Promise.resolve(_([], p[0], m[0]));
|
|
1045
|
+
for (let x = 1; x < m.length; x++)
|
|
1046
|
+
S = S.then((k) => {
|
|
1047
|
+
if (l && m[x] ? l(m[x], x, m) : !0) {
|
|
1048
|
+
const oe = E ? p[x] : ke(e.options, k);
|
|
1049
|
+
return j(k, E, oe);
|
|
1050
1050
|
}
|
|
1051
|
-
return Promise.resolve(
|
|
1051
|
+
return Promise.resolve(_(k, p[x], m[x]));
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
|
-
return
|
|
1054
|
+
return S.then((E) => ({
|
|
1055
1055
|
pages: E,
|
|
1056
|
-
pageParams:
|
|
1056
|
+
pageParams: g
|
|
1057
1057
|
}));
|
|
1058
1058
|
};
|
|
1059
1059
|
}
|
|
@@ -1062,12 +1062,12 @@ function Lt() {
|
|
|
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 Ut(e, t) {
|
|
1066
1066
|
return e.getPreviousPageParam == null ? void 0 : e.getPreviousPageParam(t[0], t);
|
|
1067
1067
|
}
|
|
1068
1068
|
class ze {
|
|
1069
1069
|
constructor(t = {}) {
|
|
1070
|
-
this.queryCache = t.queryCache || new
|
|
1070
|
+
this.queryCache = t.queryCache || new Nt(), this.mutationCache = t.mutationCache || new Dt(), 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 ze {
|
|
|
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 = Et(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 ze {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
fetchInfiniteQuery(t, s, r) {
|
|
1191
1191
|
const i = $(t, s, r);
|
|
1192
|
-
return i.behavior =
|
|
1192
|
+
return i.behavior = Tt(), 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 ze {
|
|
|
1261
1261
|
this.queryCache.clear(), this.mutationCache.clear();
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
class
|
|
1264
|
+
class Qt 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
|
}
|
|
@@ -1299,7 +1299,7 @@ class Tt extends V {
|
|
|
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 Ht(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;
|
|
@@ -1378,65 +1378,65 @@ class Tt extends V {
|
|
|
1378
1378
|
state: f
|
|
1379
1379
|
} = t;
|
|
1380
1380
|
let {
|
|
1381
|
-
dataUpdatedAt:
|
|
1381
|
+
dataUpdatedAt: m,
|
|
1382
1382
|
error: p,
|
|
1383
|
-
errorUpdatedAt:
|
|
1384
|
-
fetchStatus:
|
|
1385
|
-
status:
|
|
1386
|
-
} = f,
|
|
1383
|
+
errorUpdatedAt: g,
|
|
1384
|
+
fetchStatus: b,
|
|
1385
|
+
status: v
|
|
1386
|
+
} = f, y = !1, _ = !1, j;
|
|
1387
1387
|
if (s._optimisticResults) {
|
|
1388
|
-
const
|
|
1389
|
-
(
|
|
1388
|
+
const x = this.hasListeners(), k = !x && Fe(t, s), W = x && Me(t, r, s, i);
|
|
1389
|
+
(k || W) && (b = ae(t.options.networkMode) ? "fetching" : "paused", m || (v = "loading")), s._optimisticResults === "isRestoring" && (b = "idle");
|
|
1390
1390
|
}
|
|
1391
|
-
if (s.keepPreviousData && !f.dataUpdatedAt && u != null && u.isSuccess &&
|
|
1392
|
-
|
|
1391
|
+
if (s.keepPreviousData && !f.dataUpdatedAt && u != null && u.isSuccess && v !== "error")
|
|
1392
|
+
j = u.data, m = u.dataUpdatedAt, v = u.status, y = !0;
|
|
1393
1393
|
else if (s.select && typeof f.data < "u")
|
|
1394
1394
|
if (a && f.data === (o == null ? void 0 : o.data) && s.select === this.selectFn)
|
|
1395
|
-
|
|
1395
|
+
j = this.selectResult;
|
|
1396
1396
|
else
|
|
1397
1397
|
try {
|
|
1398
|
-
this.selectFn = s.select,
|
|
1399
|
-
} catch (
|
|
1400
|
-
this.selectError =
|
|
1398
|
+
this.selectFn = s.select, j = s.select(f.data), j = de(a == null ? void 0 : a.data, j, s), this.selectResult = j, this.selectError = null;
|
|
1399
|
+
} catch (x) {
|
|
1400
|
+
this.selectError = x;
|
|
1401
1401
|
}
|
|
1402
1402
|
else
|
|
1403
|
-
|
|
1404
|
-
if (typeof s.placeholderData < "u" && typeof
|
|
1405
|
-
let
|
|
1403
|
+
j = f.data;
|
|
1404
|
+
if (typeof s.placeholderData < "u" && typeof j > "u" && v === "loading") {
|
|
1405
|
+
let x;
|
|
1406
1406
|
if (a != null && a.isPlaceholderData && s.placeholderData === (l == null ? void 0 : l.placeholderData))
|
|
1407
|
-
|
|
1408
|
-
else if (
|
|
1407
|
+
x = a.data;
|
|
1408
|
+
else if (x = typeof s.placeholderData == "function" ? s.placeholderData() : s.placeholderData, s.select && typeof x < "u")
|
|
1409
1409
|
try {
|
|
1410
|
-
|
|
1411
|
-
} catch (
|
|
1412
|
-
this.selectError =
|
|
1410
|
+
x = s.select(x), this.selectError = null;
|
|
1411
|
+
} catch (k) {
|
|
1412
|
+
this.selectError = k;
|
|
1413
1413
|
}
|
|
1414
|
-
typeof
|
|
1414
|
+
typeof x < "u" && (v = "success", j = de(a == null ? void 0 : a.data, x, s), _ = !0);
|
|
1415
1415
|
}
|
|
1416
|
-
this.selectError && (p = this.selectError,
|
|
1417
|
-
const
|
|
1416
|
+
this.selectError && (p = this.selectError, j = this.selectResult, g = Date.now(), v = "error");
|
|
1417
|
+
const S = b === "fetching", M = v === "loading", E = v === "error";
|
|
1418
1418
|
return {
|
|
1419
|
-
status:
|
|
1420
|
-
fetchStatus:
|
|
1421
|
-
isLoading:
|
|
1422
|
-
isSuccess:
|
|
1419
|
+
status: v,
|
|
1420
|
+
fetchStatus: b,
|
|
1421
|
+
isLoading: M,
|
|
1422
|
+
isSuccess: v === "success",
|
|
1423
1423
|
isError: E,
|
|
1424
|
-
isInitialLoading:
|
|
1425
|
-
data:
|
|
1426
|
-
dataUpdatedAt:
|
|
1424
|
+
isInitialLoading: M && S,
|
|
1425
|
+
data: j,
|
|
1426
|
+
dataUpdatedAt: m,
|
|
1427
1427
|
error: p,
|
|
1428
|
-
errorUpdatedAt:
|
|
1428
|
+
errorUpdatedAt: g,
|
|
1429
1429
|
failureCount: f.fetchFailureCount,
|
|
1430
1430
|
failureReason: f.fetchFailureReason,
|
|
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: S,
|
|
1435
|
+
isRefetching: S && !M,
|
|
1436
1436
|
isLoadingError: E && f.dataUpdatedAt === 0,
|
|
1437
|
-
isPaused:
|
|
1438
|
-
isPlaceholderData:
|
|
1439
|
-
isPreviousData:
|
|
1437
|
+
isPaused: b === "paused",
|
|
1438
|
+
isPlaceholderData: _,
|
|
1439
|
+
isPreviousData: y,
|
|
1440
1440
|
isRefetchError: E && f.dataUpdatedAt !== 0,
|
|
1441
1441
|
isStale: xe(t, s),
|
|
1442
1442
|
refetch: this.refetch,
|
|
@@ -1500,11 +1500,11 @@ class Tt extends V {
|
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1503
|
+
function qt(e, t) {
|
|
1504
1504
|
return t.enabled !== !1 && !e.state.dataUpdatedAt && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
1505
1505
|
}
|
|
1506
1506
|
function Fe(e, t) {
|
|
1507
|
-
return
|
|
1507
|
+
return qt(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) {
|
|
@@ -1519,10 +1519,10 @@ function Me(e, t, s, r) {
|
|
|
1519
1519
|
function xe(e, t) {
|
|
1520
1520
|
return e.isStaleByTime(t.staleTime);
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1522
|
+
function Ht(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 Kt extends V {
|
|
1526
1526
|
constructor(t, s) {
|
|
1527
1527
|
super(), this.client = t, this.setOptions(s), this.bindMethods(), this.updateResult();
|
|
1528
1528
|
}
|
|
@@ -1607,38 +1607,38 @@ var Ye = { exports: {} }, Je = {};
|
|
|
1607
1607
|
* LICENSE file in the root directory of this source tree.
|
|
1608
1608
|
*/
|
|
1609
1609
|
var K = d;
|
|
1610
|
-
function
|
|
1610
|
+
function Vt(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 Gt = typeof Object.is == "function" ? Object.is : Vt, Wt = K.useState, $t = K.useEffect, Zt = K.useLayoutEffect, zt = K.useDebugValue;
|
|
1614
|
+
function Yt(e, t) {
|
|
1615
|
+
var s = t(), r = Wt({ inst: { value: s, getSnapshot: t } }), i = r[0].inst, a = r[1];
|
|
1616
|
+
return Zt(function() {
|
|
1617
1617
|
i.value = s, i.getSnapshot = t, le(i) && a({ inst: i });
|
|
1618
|
-
}, [e, s, t]),
|
|
1618
|
+
}, [e, s, t]), $t(function() {
|
|
1619
1619
|
return le(i) && a({ inst: i }), e(function() {
|
|
1620
1620
|
le(i) && a({ inst: i });
|
|
1621
1621
|
});
|
|
1622
|
-
}, [e]),
|
|
1622
|
+
}, [e]), zt(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 !Gt(e, s);
|
|
1630
1630
|
} catch {
|
|
1631
1631
|
return !0;
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function Jt(e, t) {
|
|
1635
1635
|
return t();
|
|
1636
1636
|
}
|
|
1637
|
-
var
|
|
1638
|
-
Je.useSyncExternalStore = K.useSyncExternalStore !== void 0 ? K.useSyncExternalStore :
|
|
1637
|
+
var Xt = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? Jt : Yt;
|
|
1638
|
+
Je.useSyncExternalStore = K.useSyncExternalStore !== void 0 ? K.useSyncExternalStore : Xt;
|
|
1639
1639
|
Ye.exports = Je;
|
|
1640
|
-
var
|
|
1641
|
-
const Xe =
|
|
1640
|
+
var It = Ye.exports;
|
|
1641
|
+
const Xe = It.useSyncExternalStore, Ne = /* @__PURE__ */ d.createContext(void 0), Ie = /* @__PURE__ */ d.createContext(!1);
|
|
1642
1642
|
function Be(e, t) {
|
|
1643
1643
|
return e || (t && typeof window < "u" ? (window.ReactQueryClientContext || (window.ReactQueryClientContext = Ne), window.ReactQueryClientContext) : Ne);
|
|
1644
1644
|
}
|
|
@@ -1649,7 +1649,7 @@ const et = ({
|
|
|
1649
1649
|
if (!t)
|
|
1650
1650
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1651
1651
|
return t;
|
|
1652
|
-
},
|
|
1652
|
+
}, Bt = ({
|
|
1653
1653
|
client: e,
|
|
1654
1654
|
children: t,
|
|
1655
1655
|
context: s,
|
|
@@ -1664,9 +1664,9 @@ const et = ({
|
|
|
1664
1664
|
}, /* @__PURE__ */ d.createElement(i.Provider, {
|
|
1665
1665
|
value: e
|
|
1666
1666
|
}, t));
|
|
1667
|
-
}, tt = /* @__PURE__ */ d.createContext(!1),
|
|
1667
|
+
}, tt = /* @__PURE__ */ d.createContext(!1), es = () => d.useContext(tt);
|
|
1668
1668
|
tt.Provider;
|
|
1669
|
-
function
|
|
1669
|
+
function ts() {
|
|
1670
1670
|
let e = !1;
|
|
1671
1671
|
return {
|
|
1672
1672
|
clearReset: () => {
|
|
@@ -1678,35 +1678,35 @@ function Bt() {
|
|
|
1678
1678
|
isReset: () => e
|
|
1679
1679
|
};
|
|
1680
1680
|
}
|
|
1681
|
-
const
|
|
1681
|
+
const ss = /* @__PURE__ */ d.createContext(ts()), rs = () => d.useContext(ss);
|
|
1682
1682
|
function st(e, t) {
|
|
1683
1683
|
return typeof e == "function" ? e(...t) : !!e;
|
|
1684
1684
|
}
|
|
1685
|
-
const
|
|
1685
|
+
const ns = (e, t) => {
|
|
1686
1686
|
(e.suspense || e.useErrorBoundary) && (t.isReset() || (e.retryOnMount = !1));
|
|
1687
|
-
},
|
|
1687
|
+
}, is = (e) => {
|
|
1688
1688
|
d.useEffect(() => {
|
|
1689
1689
|
e.clearReset();
|
|
1690
1690
|
}, [e]);
|
|
1691
|
-
},
|
|
1691
|
+
}, as = ({
|
|
1692
1692
|
result: e,
|
|
1693
1693
|
errorResetBoundary: t,
|
|
1694
1694
|
useErrorBoundary: s,
|
|
1695
1695
|
query: r
|
|
1696
|
-
}) => e.isError && !t.isReset() && !e.isFetching && st(s, [e.error, r]),
|
|
1696
|
+
}) => e.isError && !t.isReset() && !e.isFetching && st(s, [e.error, r]), os = (e) => {
|
|
1697
1697
|
e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3);
|
|
1698
|
-
},
|
|
1698
|
+
}, ls = (e, t) => e.isLoading && e.isFetching && !t, cs = (e, t, s) => (e == null ? void 0 : e.suspense) && ls(t, s), us = (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
|
|
1705
|
+
function ds(e, t) {
|
|
1706
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 = es(), i = rs(), 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)), os(a), ns(a, i), is(i);
|
|
1710
1710
|
const [o] = d.useState(() => new t(s, a)), l = o.getOptimisticResult(a);
|
|
1711
1711
|
if (Xe(d.useCallback((c) => {
|
|
1712
1712
|
const h = r ? () => {
|
|
@@ -1716,9 +1716,9 @@ function cs(e, t) {
|
|
|
1716
1716
|
o.setOptions(a, {
|
|
1717
1717
|
listeners: !1
|
|
1718
1718
|
});
|
|
1719
|
-
}, [a, o]),
|
|
1720
|
-
throw
|
|
1721
|
-
if (
|
|
1719
|
+
}, [a, o]), cs(a, l, r))
|
|
1720
|
+
throw us(a, o, i);
|
|
1721
|
+
if (as({
|
|
1722
1722
|
result: l,
|
|
1723
1723
|
errorResetBoundary: i,
|
|
1724
1724
|
useErrorBoundary: a.useErrorBoundary,
|
|
@@ -1729,17 +1729,17 @@ function cs(e, t) {
|
|
|
1729
1729
|
}
|
|
1730
1730
|
function rt(e, t, s) {
|
|
1731
1731
|
const r = $(e, t, s);
|
|
1732
|
-
return
|
|
1732
|
+
return ds(r, Qt);
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1735
|
-
const r =
|
|
1734
|
+
function hs(e, t, s) {
|
|
1735
|
+
const r = Rt(e, t, s), i = et({
|
|
1736
1736
|
context: r.context
|
|
1737
|
-
}), [a] = d.useState(() => new
|
|
1737
|
+
}), [a] = d.useState(() => new Kt(i, r));
|
|
1738
1738
|
d.useEffect(() => {
|
|
1739
1739
|
a.setOptions(r);
|
|
1740
1740
|
}, [a, r]);
|
|
1741
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(
|
|
1742
|
+
a.mutate(c, h).catch(fs);
|
|
1743
1743
|
}, [a]);
|
|
1744
1744
|
if (o.error && st(a.options.useErrorBoundary, [o.error]))
|
|
1745
1745
|
throw o.error;
|
|
@@ -1749,7 +1749,7 @@ function us(e, t, s) {
|
|
|
1749
1749
|
mutateAsync: o.mutate
|
|
1750
1750
|
};
|
|
1751
1751
|
}
|
|
1752
|
-
function
|
|
1752
|
+
function fs() {
|
|
1753
1753
|
}
|
|
1754
1754
|
function nt(e) {
|
|
1755
1755
|
var t, s, r = "";
|
|
@@ -1764,19 +1764,19 @@ function nt(e) {
|
|
|
1764
1764
|
e[t] && (r && (r += " "), r += t);
|
|
1765
1765
|
return r;
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function P() {
|
|
1768
1768
|
for (var e, t, s = 0, r = ""; s < arguments.length; )
|
|
1769
1769
|
(e = arguments[s++]) && (t = nt(e)) && (r && (r += " "), r += t);
|
|
1770
1770
|
return r;
|
|
1771
1771
|
}
|
|
1772
|
-
var
|
|
1772
|
+
var ps = Object.defineProperty, vs = Object.defineProperties, ms = Object.getOwnPropertyDescriptors, re = Object.getOwnPropertySymbols, it = Object.prototype.hasOwnProperty, at = Object.prototype.propertyIsEnumerable, Le = (e, t, s) => t in e ? ps(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, C = (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) => vs(e, ms(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]);
|
|
@@ -1795,16 +1795,16 @@ function ne() {
|
|
|
1795
1795
|
return e;
|
|
1796
1796
|
}, ne.apply(this, arguments);
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function ys(e, t) {
|
|
1799
1799
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function Cs(...e) {
|
|
1802
1802
|
return (t) => e.forEach(
|
|
1803
|
-
(s) =>
|
|
1803
|
+
(s) => ys(s, t)
|
|
1804
1804
|
);
|
|
1805
1805
|
}
|
|
1806
|
-
var
|
|
1807
|
-
const s = e, { children: r } = s, i = O(s, ["children"]), a = d.Children.toArray(r), o = a.find(
|
|
1806
|
+
var gs = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
1807
|
+
const s = e, { children: r } = s, i = O(s, ["children"]), a = d.Children.toArray(r), o = a.find(bs);
|
|
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,32 +1815,32 @@ var ys = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
|
1815
1815
|
ref: t
|
|
1816
1816
|
}), r);
|
|
1817
1817
|
});
|
|
1818
|
-
|
|
1818
|
+
gs.displayName = "Slot";
|
|
1819
1819
|
var fe = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
1820
1820
|
const s = e, { children: r } = s, i = O(s, ["children"]);
|
|
1821
|
-
return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, R(
|
|
1822
|
-
ref: t ?
|
|
1821
|
+
return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, R(C({}, ws(i, r.props)), {
|
|
1822
|
+
ref: t ? Cs(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 xs = ({ children: e }) => /* @__PURE__ */ d.createElement(d.Fragment, null, e);
|
|
1827
|
+
function bs(e) {
|
|
1828
|
+
return /* @__PURE__ */ d.isValidElement(e) && e.type === xs;
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1831
|
-
const s =
|
|
1830
|
+
function ws(e, t) {
|
|
1831
|
+
const s = C({}, t);
|
|
1832
1832
|
for (const r in t) {
|
|
1833
1833
|
const i = e[r], a = t[r];
|
|
1834
1834
|
/^on[A-Z]/.test(r) ? i && a ? s[r] = (...l) => {
|
|
1835
1835
|
a(...l), i(...l);
|
|
1836
|
-
} : i && (s[r] = i) : r === "style" ? s[r] =
|
|
1836
|
+
} : i && (s[r] = i) : r === "style" ? s[r] = C(C({}, i), a) : r === "className" && (s[r] = [
|
|
1837
1837
|
i,
|
|
1838
1838
|
a
|
|
1839
1839
|
].filter(Boolean).join(" "));
|
|
1840
1840
|
}
|
|
1841
|
-
return
|
|
1841
|
+
return C(C({}, e), s);
|
|
1842
1842
|
}
|
|
1843
|
-
var
|
|
1843
|
+
var js = ({ 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",
|
|
@@ -1873,10 +1873,10 @@ var bs = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1873
1873
|
const f = !!r || !!i;
|
|
1874
1874
|
return /* @__PURE__ */ n.jsxs(
|
|
1875
1875
|
"button",
|
|
1876
|
-
R(
|
|
1876
|
+
R(C({
|
|
1877
1877
|
ref: t
|
|
1878
1878
|
}, u), {
|
|
1879
|
-
className:
|
|
1879
|
+
className: P(
|
|
1880
1880
|
"button",
|
|
1881
1881
|
l && `button--${l}`,
|
|
1882
1882
|
l && o && `button--${l}--filled`,
|
|
@@ -1895,16 +1895,16 @@ var bs = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1895
1895
|
);
|
|
1896
1896
|
Y.displayName = "Button";
|
|
1897
1897
|
d.createContext(void 0);
|
|
1898
|
-
var
|
|
1898
|
+
var Ss = d.forwardRef(
|
|
1899
1899
|
(e, t) => {
|
|
1900
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
|
+
C({
|
|
1906
1906
|
ref: t,
|
|
1907
|
-
className:
|
|
1907
|
+
className: P(
|
|
1908
1908
|
"input",
|
|
1909
1909
|
r && "input--with-prefix",
|
|
1910
1910
|
i && "input--with-suffix",
|
|
@@ -1916,14 +1916,14 @@ var ws = d.forwardRef(
|
|
|
1916
1916
|
] });
|
|
1917
1917
|
}
|
|
1918
1918
|
);
|
|
1919
|
-
|
|
1919
|
+
Ss.displayName = "TextField";
|
|
1920
1920
|
d.createContext(void 0);
|
|
1921
|
-
var
|
|
1921
|
+
var Es = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__header__action", children: e }), Rs = (e) => {
|
|
1922
1922
|
var t = e, { children: s } = t, r = O(t, ["children"]);
|
|
1923
|
-
return /* @__PURE__ */ n.jsx("div", R(
|
|
1924
|
-
},
|
|
1923
|
+
return /* @__PURE__ */ n.jsx("div", R(C({ className: "card__body" }, r), { children: s }));
|
|
1924
|
+
}, Ps = (e) => /* @__PURE__ */ n.jsx(
|
|
1925
1925
|
"svg",
|
|
1926
|
-
R(
|
|
1926
|
+
R(C({
|
|
1927
1927
|
width: "24",
|
|
1928
1928
|
height: "24",
|
|
1929
1929
|
viewBox: "0 0 24 24",
|
|
@@ -1941,9 +1941,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1941
1941
|
}
|
|
1942
1942
|
)
|
|
1943
1943
|
})
|
|
1944
|
-
), be =
|
|
1944
|
+
), be = Ps, _s = (e) => /* @__PURE__ */ n.jsx(
|
|
1945
1945
|
"svg",
|
|
1946
|
-
R(
|
|
1946
|
+
R(C({
|
|
1947
1947
|
width: "24",
|
|
1948
1948
|
height: "24",
|
|
1949
1949
|
viewBox: "0 0 24 24",
|
|
@@ -1961,9 +1961,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1961
1961
|
}
|
|
1962
1962
|
)
|
|
1963
1963
|
})
|
|
1964
|
-
),
|
|
1964
|
+
), As = _s, Os = (e) => /* @__PURE__ */ n.jsx(
|
|
1965
1965
|
"svg",
|
|
1966
|
-
R(
|
|
1966
|
+
R(C({
|
|
1967
1967
|
width: "24",
|
|
1968
1968
|
height: "24",
|
|
1969
1969
|
viewBox: "0 0 24 24",
|
|
@@ -1980,9 +1980,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1980
1980
|
}
|
|
1981
1981
|
)
|
|
1982
1982
|
})
|
|
1983
|
-
),
|
|
1983
|
+
), ks = Os, Fs = (e) => /* @__PURE__ */ n.jsx(
|
|
1984
1984
|
"svg",
|
|
1985
|
-
R(
|
|
1985
|
+
R(C({
|
|
1986
1986
|
width: "24",
|
|
1987
1987
|
height: "24",
|
|
1988
1988
|
viewBox: "0 0 24 24",
|
|
@@ -1999,9 +1999,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1999
1999
|
}
|
|
2000
2000
|
)
|
|
2001
2001
|
})
|
|
2002
|
-
),
|
|
2002
|
+
), Ms = Fs, Ns = (e) => /* @__PURE__ */ n.jsx(
|
|
2003
2003
|
"svg",
|
|
2004
|
-
R(
|
|
2004
|
+
R(C({
|
|
2005
2005
|
width: "24",
|
|
2006
2006
|
height: "24",
|
|
2007
2007
|
viewBox: "0 0 24 24",
|
|
@@ -2018,9 +2018,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2018
2018
|
}
|
|
2019
2019
|
)
|
|
2020
2020
|
})
|
|
2021
|
-
),
|
|
2021
|
+
), Ls = Ns, Ds = (e) => /* @__PURE__ */ n.jsxs(
|
|
2022
2022
|
"svg",
|
|
2023
|
-
R(
|
|
2023
|
+
R(C({
|
|
2024
2024
|
width: "24",
|
|
2025
2025
|
height: "24",
|
|
2026
2026
|
fill: "none",
|
|
@@ -2055,9 +2055,9 @@ var js = ({ 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
|
+
), Ts = Ds, Us = (e) => /* @__PURE__ */ n.jsxs(
|
|
2059
2059
|
"svg",
|
|
2060
|
-
R(
|
|
2060
|
+
R(C({
|
|
2061
2061
|
width: "24",
|
|
2062
2062
|
height: "24",
|
|
2063
2063
|
viewBox: "0 0 24 24",
|
|
@@ -2087,9 +2087,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2087
2087
|
)
|
|
2088
2088
|
]
|
|
2089
2089
|
})
|
|
2090
|
-
),
|
|
2090
|
+
), Qs = Us, qs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2091
2091
|
"svg",
|
|
2092
|
-
R(
|
|
2092
|
+
R(C({
|
|
2093
2093
|
width: "24",
|
|
2094
2094
|
height: "24",
|
|
2095
2095
|
viewBox: "0 0 24 24",
|
|
@@ -2139,9 +2139,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2139
2139
|
)
|
|
2140
2140
|
]
|
|
2141
2141
|
})
|
|
2142
|
-
),
|
|
2142
|
+
), Hs = qs, Ks = (e) => /* @__PURE__ */ n.jsxs(
|
|
2143
2143
|
"svg",
|
|
2144
|
-
R(
|
|
2144
|
+
R(C({
|
|
2145
2145
|
width: "20",
|
|
2146
2146
|
height: "21",
|
|
2147
2147
|
fill: "none",
|
|
@@ -2163,9 +2163,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2163
2163
|
)
|
|
2164
2164
|
]
|
|
2165
2165
|
})
|
|
2166
|
-
),
|
|
2166
|
+
), Vs = Ks, Gs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2167
2167
|
"svg",
|
|
2168
|
-
R(
|
|
2168
|
+
R(C({
|
|
2169
2169
|
width: "24",
|
|
2170
2170
|
height: "24",
|
|
2171
2171
|
fill: "none",
|
|
@@ -2197,11 +2197,11 @@ var js = ({ 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
|
+
), Ws = Gs, $s = (e) => {
|
|
2201
2201
|
const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
|
|
2202
2202
|
return /* @__PURE__ */ n.jsxs(
|
|
2203
2203
|
"svg",
|
|
2204
|
-
R(
|
|
2204
|
+
R(C({
|
|
2205
2205
|
width: "24",
|
|
2206
2206
|
height: "24",
|
|
2207
2207
|
viewBox: "0 0 24 24",
|
|
@@ -2368,9 +2368,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2368
2368
|
]
|
|
2369
2369
|
})
|
|
2370
2370
|
);
|
|
2371
|
-
}, we =
|
|
2371
|
+
}, we = $s, Zs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2372
2372
|
"svg",
|
|
2373
|
-
R(
|
|
2373
|
+
R(C({
|
|
2374
2374
|
fill: "none",
|
|
2375
2375
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2376
2376
|
viewBox: "0 0 24 24",
|
|
@@ -2430,9 +2430,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2430
2430
|
)
|
|
2431
2431
|
]
|
|
2432
2432
|
})
|
|
2433
|
-
),
|
|
2433
|
+
), zs = Zs, Ys = (e) => /* @__PURE__ */ n.jsx(
|
|
2434
2434
|
"svg",
|
|
2435
|
-
R(
|
|
2435
|
+
R(C({
|
|
2436
2436
|
fill: "none",
|
|
2437
2437
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2438
2438
|
viewBox: "0 0 21 16",
|
|
@@ -2450,9 +2450,9 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2450
2450
|
}
|
|
2451
2451
|
)
|
|
2452
2452
|
})
|
|
2453
|
-
),
|
|
2453
|
+
), Js = Ys, Xs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2454
2454
|
"svg",
|
|
2455
|
-
R(
|
|
2455
|
+
R(C({
|
|
2456
2456
|
width: "24",
|
|
2457
2457
|
height: "24",
|
|
2458
2458
|
fill: "none",
|
|
@@ -2477,7 +2477,7 @@ var js = ({ 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
|
+
), Is = Xs, Bs = (e) => {
|
|
2481
2481
|
var t = e, {
|
|
2482
2482
|
variant: s,
|
|
2483
2483
|
icon: r,
|
|
@@ -2495,15 +2495,15 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2495
2495
|
]);
|
|
2496
2496
|
return /* @__PURE__ */ n.jsx(
|
|
2497
2497
|
"div",
|
|
2498
|
-
R(
|
|
2499
|
-
className:
|
|
2498
|
+
R(C({}, c), {
|
|
2499
|
+
className: P(
|
|
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(Ws, {}) : 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,7 +2511,7 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2511
2511
|
] })
|
|
2512
2512
|
})
|
|
2513
2513
|
);
|
|
2514
|
-
},
|
|
2514
|
+
}, er = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__footer", children: e }), tr = (e) => {
|
|
2515
2515
|
var t = e, {
|
|
2516
2516
|
variant: s = "default",
|
|
2517
2517
|
sticky: r,
|
|
@@ -2525,8 +2525,8 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2525
2525
|
]);
|
|
2526
2526
|
return /* @__PURE__ */ n.jsx(
|
|
2527
2527
|
"div",
|
|
2528
|
-
R(
|
|
2529
|
-
className:
|
|
2528
|
+
R(C({}, o), {
|
|
2529
|
+
className: P(
|
|
2530
2530
|
"card__header",
|
|
2531
2531
|
s && `card__header--${s}`,
|
|
2532
2532
|
r && "card__header--sticky",
|
|
@@ -2535,7 +2535,7 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2535
2535
|
children: a
|
|
2536
2536
|
})
|
|
2537
2537
|
);
|
|
2538
|
-
},
|
|
2538
|
+
}, sr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: e }), rr = ({ children: e, className: t }) => /* @__PURE__ */ n.jsx("div", { className: P("card__body__item", t), children: e }), nr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__body__subtitle", children: e }), ir = ({ 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(
|
|
@@ -2543,8 +2543,8 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2543
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
|
-
|
|
2547
|
-
className:
|
|
2546
|
+
C({
|
|
2547
|
+
className: P(
|
|
2548
2548
|
"card",
|
|
2549
2549
|
l && "card--disabled",
|
|
2550
2550
|
o && `card--${o}`,
|
|
@@ -2558,31 +2558,31 @@ var js = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2558
2558
|
);
|
|
2559
2559
|
ot.displayName = "Card";
|
|
2560
2560
|
Object.assign(ot, {
|
|
2561
|
-
Header:
|
|
2562
|
-
Action:
|
|
2563
|
-
Title:
|
|
2564
|
-
Subtitle:
|
|
2565
|
-
Body:
|
|
2566
|
-
Image:
|
|
2567
|
-
Item:
|
|
2568
|
-
Footer:
|
|
2569
|
-
EmptyState:
|
|
2561
|
+
Header: tr,
|
|
2562
|
+
Action: Es,
|
|
2563
|
+
Title: ir,
|
|
2564
|
+
Subtitle: nr,
|
|
2565
|
+
Body: Rs,
|
|
2566
|
+
Image: sr,
|
|
2567
|
+
Item: rr,
|
|
2568
|
+
Footer: er,
|
|
2569
|
+
EmptyState: Bs
|
|
2570
2570
|
});
|
|
2571
|
-
var
|
|
2571
|
+
var ar = (e) => {
|
|
2572
2572
|
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2573
|
-
return /* @__PURE__ */ n.jsx("div", R(
|
|
2574
|
-
},
|
|
2573
|
+
return /* @__PURE__ */ n.jsx("div", R(C({ className: P("checkbox__content", s) }, i), { children: r }));
|
|
2574
|
+
}, or = (e) => {
|
|
2575
2575
|
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2576
|
-
return /* @__PURE__ */ n.jsx("span", R(
|
|
2577
|
-
}, lt = d.createContext(void 0),
|
|
2576
|
+
return /* @__PURE__ */ n.jsx("span", R(C({ className: P("checkbox__hint", s) }, i), { children: r }));
|
|
2577
|
+
}, lt = d.createContext(void 0), lr = ({ id: e, name: t, children: s }) => /* @__PURE__ */ n.jsx(lt.Provider, { value: { id: e, name: t }, children: s }), cr = () => {
|
|
2578
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
|
-
},
|
|
2582
|
+
}, ur = (e) => {
|
|
2583
2583
|
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2584
|
-
const { id: a } =
|
|
2585
|
-
return /* @__PURE__ */ n.jsx("label", R(
|
|
2584
|
+
const { id: a } = cr();
|
|
2585
|
+
return /* @__PURE__ */ n.jsx("label", R(C({ htmlFor: a, className: P("checkbox__label", s) }, i), { children: r }));
|
|
2586
2586
|
}, q = (e) => {
|
|
2587
2587
|
var t = e, {
|
|
2588
2588
|
id: s,
|
|
@@ -2609,45 +2609,45 @@ var nr = (e) => {
|
|
|
2609
2609
|
}, [i]), /* @__PURE__ */ n.jsxs(
|
|
2610
2610
|
"div",
|
|
2611
2611
|
{
|
|
2612
|
-
className:
|
|
2612
|
+
className: P("checkbox", a && `checkbox--${a}`, o && "checkbox--error"),
|
|
2613
2613
|
children: [
|
|
2614
2614
|
/* @__PURE__ */ n.jsx(
|
|
2615
2615
|
"input",
|
|
2616
|
-
|
|
2616
|
+
C({
|
|
2617
2617
|
id: s,
|
|
2618
2618
|
name: r,
|
|
2619
2619
|
type: "checkbox",
|
|
2620
2620
|
ref: f,
|
|
2621
|
-
className:
|
|
2621
|
+
className: P("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(Vs, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(As, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
|
|
2626
|
+
/* @__PURE__ */ n.jsx(lr, { 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 = ar;
|
|
2632
|
+
q.Label = ur;
|
|
2633
|
+
q.Hint = or;
|
|
2634
2634
|
q.Error = Error;
|
|
2635
|
-
var
|
|
2635
|
+
var dr = (e) => {
|
|
2636
2636
|
var t = e, { type: s = "div", className: r, children: i } = t, a = O(t, ["type", "className", "children"]);
|
|
2637
|
-
return d.createElement(s,
|
|
2638
|
-
}, pe = () => document.body.style.removeProperty("overflow"), De = (e) => e.preventDefault(),
|
|
2637
|
+
return d.createElement(s, C({ className: P("dialog__body", r) }, a), i);
|
|
2638
|
+
}, pe = () => document.body.style.removeProperty("overflow"), De = (e) => e.preventDefault(), hr = '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])', fr = (e) => {
|
|
2639
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(
|
|
2645
|
-
if (!(
|
|
2644
|
+
const f = u.querySelectorAll(hr), m = f[0], p = f[f.length - 1], g = (b) => {
|
|
2645
|
+
if (!(b.key === "Tab"))
|
|
2646
2646
|
return;
|
|
2647
|
-
|
|
2647
|
+
b.shiftKey ? document.activeElement === m && (p.focus(), b.preventDefault()) : document.activeElement === p && (m.focus(), b.preventDefault());
|
|
2648
2648
|
};
|
|
2649
|
-
return document.body.style.overflow = "hidden", u.addEventListener("keydown",
|
|
2650
|
-
u.removeEventListener("keydown",
|
|
2649
|
+
return document.body.style.overflow = "hidden", u.addEventListener("keydown", g), window.addEventListener("popstate", () => pe()), () => {
|
|
2650
|
+
u.removeEventListener("keydown", g), window.removeEventListener("popstate", () => pe());
|
|
2651
2651
|
};
|
|
2652
2652
|
}
|
|
2653
2653
|
}, [o]), d.useEffect(() => {
|
|
@@ -2656,26 +2656,26 @@ var cr = (e) => {
|
|
|
2656
2656
|
return;
|
|
2657
2657
|
if (l && (u.removeAttribute("open"), u.showModal(), u.focus()), c)
|
|
2658
2658
|
return u.addEventListener("cancel", De), () => u.removeEventListener("cancel", De);
|
|
2659
|
-
const f = ({ clientX:
|
|
2660
|
-
const { top:
|
|
2661
|
-
|
|
2659
|
+
const f = ({ clientX: m, clientY: p }) => {
|
|
2660
|
+
const { top: g, right: b, bottom: v, left: y } = u.getBoundingClientRect(), _ = 0 < p && 0 < m, j = g < p && p < v, S = y < m && m < b;
|
|
2661
|
+
_ && !(j && S) && h();
|
|
2662
2662
|
};
|
|
2663
2663
|
return u.addEventListener("cancel", h), u.addEventListener("mousedown", f), () => {
|
|
2664
2664
|
u.removeEventListener("cancel", h), u.removeEventListener("mousedown", f);
|
|
2665
2665
|
};
|
|
2666
2666
|
}, [o, c, h, l]), /* @__PURE__ */ n.jsx(
|
|
2667
2667
|
"dialog",
|
|
2668
|
-
R(
|
|
2668
|
+
R(C({
|
|
2669
2669
|
ref: o,
|
|
2670
2670
|
open: l,
|
|
2671
2671
|
"aria-modal": !!c,
|
|
2672
2672
|
"aria-labelledby": "dialogTitle",
|
|
2673
|
-
className:
|
|
2673
|
+
className: P("dialog", i && "dialog--animated", s)
|
|
2674
2674
|
}, a), {
|
|
2675
2675
|
children: r
|
|
2676
2676
|
})
|
|
2677
2677
|
);
|
|
2678
|
-
}, ct = d.createContext(void 0),
|
|
2678
|
+
}, ct = d.createContext(void 0), pr = ({ 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());
|
|
@@ -2686,42 +2686,42 @@ var cr = (e) => {
|
|
|
2686
2686
|
if (!e)
|
|
2687
2687
|
throw new Error("Dialog compound components can not be rendered outside of Dialog");
|
|
2688
2688
|
return e;
|
|
2689
|
-
},
|
|
2689
|
+
}, vr = (e) => {
|
|
2690
2690
|
var t = e, { children: s } = t, r = O(t, ["children"]);
|
|
2691
2691
|
const { onClose: i } = J();
|
|
2692
|
-
return /* @__PURE__ */ n.jsx(Y, R(
|
|
2692
|
+
return /* @__PURE__ */ n.jsx(Y, R(C({ onClick: i }, r), { children: s }));
|
|
2693
2693
|
}, ut = d.forwardRef((e, t) => {
|
|
2694
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,
|
|
2698
|
-
|
|
2698
|
+
C({
|
|
2699
2699
|
type: "submit",
|
|
2700
2700
|
ref: t,
|
|
2701
2701
|
formMethod: "dialog",
|
|
2702
2702
|
onClick: a,
|
|
2703
|
-
iconLeft: /* @__PURE__ */ n.jsx(
|
|
2703
|
+
iconLeft: /* @__PURE__ */ n.jsx(ks, {}),
|
|
2704
2704
|
variant: "icon--secondary",
|
|
2705
|
-
className:
|
|
2705
|
+
className: P("dialog__close button--icon", r)
|
|
2706
2706
|
}, i)
|
|
2707
2707
|
);
|
|
2708
2708
|
});
|
|
2709
2709
|
ut.displayName = "Close";
|
|
2710
|
-
var
|
|
2710
|
+
var mr = (e) => {
|
|
2711
2711
|
var t = e, { className: s, children: r } = t, i = O(t, ["className", "children"]);
|
|
2712
|
-
return /* @__PURE__ */ n.jsx("div", R(
|
|
2713
|
-
},
|
|
2712
|
+
return /* @__PURE__ */ n.jsx("div", R(C({ className: P("dialog__footer", s) }, i), { children: r }));
|
|
2713
|
+
}, yr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: e }), Cr = (e) => {
|
|
2714
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();
|
|
2718
2718
|
}, [o]), /* @__PURE__ */ n.jsxs(
|
|
2719
2719
|
"div",
|
|
2720
|
-
R(
|
|
2720
|
+
R(C({
|
|
2721
2721
|
tabIndex: 0,
|
|
2722
2722
|
ref: l,
|
|
2723
2723
|
id: "dialogTitle",
|
|
2724
|
-
className:
|
|
2724
|
+
className: P("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 pr = (e) => {
|
|
|
2729
2729
|
]
|
|
2730
2730
|
})
|
|
2731
2731
|
);
|
|
2732
|
-
},
|
|
2732
|
+
}, gr = (e) => {
|
|
2733
2733
|
var t = e, { children: s } = t, r = O(t, ["children"]);
|
|
2734
2734
|
const { ref: i } = J();
|
|
2735
|
-
return /* @__PURE__ */ n.jsx(Y, R(
|
|
2735
|
+
return /* @__PURE__ */ n.jsx(Y, R(C({ 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
|
-
},
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
var dt = d.createContext(void 0),
|
|
2739
|
+
}, F = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ n.jsx(pr, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
|
|
2740
|
+
F.Trigger = gr;
|
|
2741
|
+
F.Root = fr;
|
|
2742
|
+
F.Title = Cr;
|
|
2743
|
+
F.Header = yr;
|
|
2744
|
+
F.Body = dr;
|
|
2745
|
+
F.Footer = mr;
|
|
2746
|
+
F.Button = vr;
|
|
2747
|
+
F.Close = ut;
|
|
2748
|
+
var dt = d.createContext(void 0), xr = ({
|
|
2749
2749
|
id: e,
|
|
2750
2750
|
position: t,
|
|
2751
2751
|
isOpen: s,
|
|
@@ -2777,7 +2777,7 @@ var dt = d.createContext(void 0), Cr = ({
|
|
|
2777
2777
|
if (e === void 0)
|
|
2778
2778
|
throw new Error("useMenu must be used within a MenuProvider");
|
|
2779
2779
|
return e;
|
|
2780
|
-
},
|
|
2780
|
+
}, br = ({ as: e, children: t }) => {
|
|
2781
2781
|
const {
|
|
2782
2782
|
id: s,
|
|
2783
2783
|
position: r,
|
|
@@ -2788,27 +2788,27 @@ var dt = d.createContext(void 0), Cr = ({
|
|
|
2788
2788
|
clearActiveItemIndex: c,
|
|
2789
2789
|
triggerRef: h,
|
|
2790
2790
|
contentRef: u
|
|
2791
|
-
} = ht(), f = (
|
|
2791
|
+
} = ht(), f = (m) => {
|
|
2792
2792
|
var p;
|
|
2793
2793
|
if (!i)
|
|
2794
2794
|
return;
|
|
2795
|
-
if (
|
|
2795
|
+
if (m.key === "Escape")
|
|
2796
2796
|
return c(), a(!1), (p = h.current) == null ? void 0 : p.focus();
|
|
2797
|
-
const
|
|
2798
|
-
switch (
|
|
2797
|
+
const g = u.current.childElementCount - 1;
|
|
2798
|
+
switch (m.key) {
|
|
2799
2799
|
case "ArrowUp":
|
|
2800
2800
|
case "ArrowLeft":
|
|
2801
|
-
return
|
|
2801
|
+
return m.preventDefault(), l(o ? Math.max(0, o - 1) : 0);
|
|
2802
2802
|
case "ArrowDown":
|
|
2803
2803
|
case "ArrowRight": {
|
|
2804
|
-
|
|
2805
|
-
const
|
|
2806
|
-
return l(Math.min(
|
|
2804
|
+
m.preventDefault();
|
|
2805
|
+
const b = o !== void 0 ? o + 1 : 0;
|
|
2806
|
+
return l(Math.min(g, b));
|
|
2807
2807
|
}
|
|
2808
2808
|
case "Home":
|
|
2809
|
-
return
|
|
2809
|
+
return m.preventDefault(), l(0);
|
|
2810
2810
|
case "End":
|
|
2811
|
-
return
|
|
2811
|
+
return m.preventDefault(), l(g);
|
|
2812
2812
|
}
|
|
2813
2813
|
};
|
|
2814
2814
|
return e ? d.createElement(
|
|
@@ -2816,7 +2816,7 @@ var dt = d.createContext(void 0), Cr = ({
|
|
|
2816
2816
|
{
|
|
2817
2817
|
id: `${s}-content`,
|
|
2818
2818
|
ref: u,
|
|
2819
|
-
className:
|
|
2819
|
+
className: P("menu__list", `menu__list--${r}`, i && "menu__list--active"),
|
|
2820
2820
|
onKeyDown: f
|
|
2821
2821
|
},
|
|
2822
2822
|
t
|
|
@@ -2827,15 +2827,15 @@ var dt = d.createContext(void 0), Cr = ({
|
|
|
2827
2827
|
{
|
|
2828
2828
|
id: `${s}-content`,
|
|
2829
2829
|
ref: u,
|
|
2830
|
-
className:
|
|
2830
|
+
className: P("menu__list", `menu__list--${r}`, i && "menu__list--active"),
|
|
2831
2831
|
onKeyDown: f,
|
|
2832
2832
|
children: t
|
|
2833
2833
|
}
|
|
2834
2834
|
)
|
|
2835
2835
|
);
|
|
2836
|
-
},
|
|
2836
|
+
}, wr = (e) => {
|
|
2837
2837
|
var t = e, { children: s, className: r } = t, i = O(t, ["children", "className"]);
|
|
2838
|
-
return /* @__PURE__ */ n.jsx("li", R(
|
|
2838
|
+
return /* @__PURE__ */ n.jsx("li", R(C({}, i), { className: P("menu__list-item", r), children: s }));
|
|
2839
2839
|
}, ft = ({ children: e, className: t }) => {
|
|
2840
2840
|
const { id: s, isOpen: r, setIsOpen: i, clearActiveItemIndex: a, setActiveItemIndex: o, triggerRef: l } = ht(), c = () => {
|
|
2841
2841
|
a(), i((u) => !u);
|
|
@@ -2849,7 +2849,7 @@ var dt = d.createContext(void 0), Cr = ({
|
|
|
2849
2849
|
return d.cloneElement(e, {
|
|
2850
2850
|
id: `${s}-trigger`,
|
|
2851
2851
|
ref: l,
|
|
2852
|
-
className:
|
|
2852
|
+
className: P("menu__trigger", t),
|
|
2853
2853
|
onClick: c,
|
|
2854
2854
|
onKeyDown: h,
|
|
2855
2855
|
"aria-expanded": r,
|
|
@@ -2859,33 +2859,33 @@ var dt = d.createContext(void 0), Cr = ({
|
|
|
2859
2859
|
ft.displayName = "Trigger";
|
|
2860
2860
|
var L = (e) => {
|
|
2861
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
|
-
const c = d.useRef(null), h = d.useRef(null), u = d.useRef(null), [f,
|
|
2863
|
-
p !==
|
|
2864
|
-
const
|
|
2865
|
-
|
|
2866
|
-
},
|
|
2867
|
-
var
|
|
2868
|
-
((
|
|
2862
|
+
const c = d.useRef(null), h = d.useRef(null), u = d.useRef(null), [f, m] = d.useState(!1), [p, g] = d.useState(), [b, v] = d.useState(p);
|
|
2863
|
+
p !== b && p !== void 0 && (u.current.children[p].firstChild.focus(), v(p));
|
|
2864
|
+
const y = () => {
|
|
2865
|
+
g(void 0), v(void 0);
|
|
2866
|
+
}, _ = (j) => {
|
|
2867
|
+
var S;
|
|
2868
|
+
((S = c.current) == null ? void 0 : S.contains(j.relatedTarget)) || (y(), m(!1));
|
|
2869
2869
|
};
|
|
2870
2870
|
return /* @__PURE__ */ n.jsx(
|
|
2871
|
-
|
|
2871
|
+
xr,
|
|
2872
2872
|
{
|
|
2873
2873
|
id: r,
|
|
2874
2874
|
position: i,
|
|
2875
2875
|
isOpen: f,
|
|
2876
|
-
setIsOpen:
|
|
2876
|
+
setIsOpen: m,
|
|
2877
2877
|
activeItemIndex: p,
|
|
2878
|
-
setActiveItemIndex:
|
|
2879
|
-
clearActiveItemIndex:
|
|
2878
|
+
setActiveItemIndex: g,
|
|
2879
|
+
clearActiveItemIndex: y,
|
|
2880
2880
|
triggerRef: h,
|
|
2881
2881
|
contentRef: u,
|
|
2882
2882
|
children: d.createElement(
|
|
2883
2883
|
s,
|
|
2884
|
-
R(
|
|
2884
|
+
R(C({}, l), {
|
|
2885
2885
|
id: r,
|
|
2886
2886
|
ref: c,
|
|
2887
2887
|
className: `menu ${o || ""}`,
|
|
2888
|
-
onBlur:
|
|
2888
|
+
onBlur: _
|
|
2889
2889
|
}),
|
|
2890
2890
|
a
|
|
2891
2891
|
)
|
|
@@ -2893,28 +2893,28 @@ var L = (e) => {
|
|
|
2893
2893
|
);
|
|
2894
2894
|
};
|
|
2895
2895
|
L.Trigger = ft;
|
|
2896
|
-
L.Content =
|
|
2897
|
-
L.Item =
|
|
2896
|
+
L.Content = br;
|
|
2897
|
+
L.Item = wr;
|
|
2898
2898
|
d.createContext(void 0);
|
|
2899
|
-
var
|
|
2900
|
-
[...new Set(
|
|
2899
|
+
var jr = (/* @__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(jr.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 Sr = "/icons/bouMenuIcons.svg", Er = ({
|
|
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: `${Sr}#${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(Er, { 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,7 +2925,7 @@ const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
|
2925
2925
|
t
|
|
2926
2926
|
] })
|
|
2927
2927
|
] });
|
|
2928
|
-
}, pt = d.createContext(void 0),
|
|
2928
|
+
}, pt = d.createContext(void 0), Rr = ({
|
|
2929
2929
|
position: e,
|
|
2930
2930
|
bouMenuItems: t,
|
|
2931
2931
|
authenticationStatus: s,
|
|
@@ -2936,21 +2936,24 @@ const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
|
2936
2936
|
if (!e)
|
|
2937
2937
|
throw new Error("Authentication context can not be rendered outside of Authentication");
|
|
2938
2938
|
return e;
|
|
2939
|
-
}, vt = d.createContext(void 0),
|
|
2939
|
+
}, vt = d.createContext(void 0), Pr = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ n.jsx(vt.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), mt = () => {
|
|
2940
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
|
+
}, yt = () => {
|
|
2945
|
+
const { apiUrl: e, redirectUrl: t } = mt(), s = bt();
|
|
2946
|
+
return wt({ apiUrl: e, redirectUrl: t, trackingInfo: s });
|
|
2944
2947
|
}, G = () => {
|
|
2945
|
-
const { apiUrl: e
|
|
2948
|
+
const { apiUrl: e } = mt(), { loginUrl: t, logoutUrl: s } = yt(), r = `${e}/user/profile`, i = `${e}/gdpr/tc/check`, a = `${e}/gdpr/tc`;
|
|
2946
2949
|
return {
|
|
2947
|
-
loginUrl:
|
|
2948
|
-
logoutUrl:
|
|
2949
|
-
profileEndpoint:
|
|
2950
|
-
getTermsAndConditionsEndpoint:
|
|
2951
|
-
postTermsAndConditionsEndpoint:
|
|
2950
|
+
loginUrl: t,
|
|
2951
|
+
logoutUrl: s,
|
|
2952
|
+
profileEndpoint: r,
|
|
2953
|
+
getTermsAndConditionsEndpoint: i,
|
|
2954
|
+
postTermsAndConditionsEndpoint: a
|
|
2952
2955
|
};
|
|
2953
|
-
},
|
|
2956
|
+
}, _r = (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
2957
|
U,
|
|
2955
2958
|
{
|
|
2956
2959
|
className: "bou-menu-item",
|
|
@@ -2960,27 +2963,27 @@ const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
|
2960
2963
|
label: t
|
|
2961
2964
|
},
|
|
2962
2965
|
i
|
|
2963
|
-
)) }) : null,
|
|
2966
|
+
)) }) : null, Ar = () => {
|
|
2964
2967
|
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
2968
|
return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: s, children: [
|
|
2966
2969
|
/* @__PURE__ */ n.jsx(
|
|
2967
2970
|
L.Trigger,
|
|
2968
2971
|
{
|
|
2969
|
-
className:
|
|
2972
|
+
className: P(
|
|
2970
2973
|
"button",
|
|
2971
2974
|
"button--neutral",
|
|
2972
2975
|
"button--authentication",
|
|
2973
2976
|
"button--authentication--authenticated"
|
|
2974
2977
|
),
|
|
2975
2978
|
children: /* @__PURE__ */ n.jsxs("button", { children: [
|
|
2976
|
-
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(
|
|
2979
|
+
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(js, { variant: "small", firstName: o, lastName: l }) }),
|
|
2977
2980
|
/* @__PURE__ */ n.jsx("span", { className: "button__label", children: o }),
|
|
2978
2981
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(be, {}) })
|
|
2979
2982
|
] })
|
|
2980
2983
|
}
|
|
2981
2984
|
),
|
|
2982
2985
|
/* @__PURE__ */ n.jsxs(L.Content, { as: "div", children: [
|
|
2983
|
-
|
|
2986
|
+
_r(i),
|
|
2984
2987
|
/* @__PURE__ */ n.jsxs("ul", { children: [
|
|
2985
2988
|
/* @__PURE__ */ n.jsx(
|
|
2986
2989
|
U,
|
|
@@ -2988,7 +2991,7 @@ const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
|
2988
2991
|
className: "manage-profile",
|
|
2989
2992
|
mobileUrl: `${t}/manage-profile`,
|
|
2990
2993
|
desktopUrl: `${t}/manage-profile/personal-data`,
|
|
2991
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
2994
|
+
icon: /* @__PURE__ */ n.jsx(Qs, {}),
|
|
2992
2995
|
label: e("manageProfile")
|
|
2993
2996
|
}
|
|
2994
2997
|
),
|
|
@@ -2997,7 +3000,7 @@ const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
|
2997
3000
|
{
|
|
2998
3001
|
className: "payment",
|
|
2999
3002
|
mobileUrl: `${t}/payment`,
|
|
3000
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3003
|
+
icon: /* @__PURE__ */ n.jsx(Js, {}),
|
|
3001
3004
|
label: e("payment")
|
|
3002
3005
|
}
|
|
3003
3006
|
),
|
|
@@ -3006,7 +3009,7 @@ const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
|
3006
3009
|
{
|
|
3007
3010
|
className: "gift-cards",
|
|
3008
3011
|
mobileUrl: `${t}/gift-cards`,
|
|
3009
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3012
|
+
icon: /* @__PURE__ */ n.jsx(zs, {}),
|
|
3010
3013
|
label: e("giftCards")
|
|
3011
3014
|
}
|
|
3012
3015
|
),
|
|
@@ -3014,7 +3017,7 @@ const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
|
3014
3017
|
U,
|
|
3015
3018
|
{
|
|
3016
3019
|
mobileUrl: `${t}/identifiers`,
|
|
3017
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3020
|
+
icon: /* @__PURE__ */ n.jsx(Is, {}),
|
|
3018
3021
|
label: e("qrCode")
|
|
3019
3022
|
}
|
|
3020
3023
|
),
|
|
@@ -3024,30 +3027,30 @@ const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
|
3024
3027
|
className: "manage-privacy",
|
|
3025
3028
|
mobileUrl: `${t}/manage-privacy`,
|
|
3026
3029
|
desktopUrl: `${t}/manage-privacy/permissions`,
|
|
3027
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3030
|
+
icon: /* @__PURE__ */ n.jsx(Ts, {}),
|
|
3028
3031
|
label: e("privacy")
|
|
3029
3032
|
}
|
|
3030
3033
|
),
|
|
3031
|
-
/* @__PURE__ */ n.jsx(U, { mobileUrl: a, icon: /* @__PURE__ */ n.jsx(
|
|
3034
|
+
/* @__PURE__ */ n.jsx(U, { mobileUrl: a, icon: /* @__PURE__ */ n.jsx(Ls, {}), label: e("logout") })
|
|
3032
3035
|
] })
|
|
3033
3036
|
] })
|
|
3034
3037
|
] });
|
|
3035
|
-
},
|
|
3038
|
+
}, Or = () => {
|
|
3036
3039
|
const { t: e } = H();
|
|
3037
|
-
return /* @__PURE__ */ n.jsxs("button", { className:
|
|
3040
|
+
return /* @__PURE__ */ n.jsxs("button", { className: P("button", "button--neutral", "button--authentication"), children: [
|
|
3038
3041
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx("i", { className: "spinner" }) }),
|
|
3039
3042
|
/* @__PURE__ */ n.jsxs("span", { className: "button__label", children: [
|
|
3040
3043
|
e("loading"),
|
|
3041
3044
|
"..."
|
|
3042
3045
|
] })
|
|
3043
3046
|
] });
|
|
3044
|
-
},
|
|
3047
|
+
}, kr = ({ className: e }) => {
|
|
3045
3048
|
const { t } = H(), { loginUrl: s } = G();
|
|
3046
3049
|
return /* @__PURE__ */ n.jsxs(
|
|
3047
3050
|
"a",
|
|
3048
3051
|
{
|
|
3049
3052
|
href: s,
|
|
3050
|
-
className:
|
|
3053
|
+
className: P(
|
|
3051
3054
|
"button",
|
|
3052
3055
|
"button--neutral",
|
|
3053
3056
|
"button--authentication",
|
|
@@ -3062,7 +3065,7 @@ const wr = "/icons/bouMenuIcons.svg", jr = ({
|
|
|
3062
3065
|
}
|
|
3063
3066
|
);
|
|
3064
3067
|
};
|
|
3065
|
-
const
|
|
3068
|
+
const Fr = () => {
|
|
3066
3069
|
const { t: e } = H(), { loginUrl: t } = G(), s = Qe(), { position: r } = je();
|
|
3067
3070
|
return /* @__PURE__ */ n.jsxs(
|
|
3068
3071
|
L,
|
|
@@ -3073,17 +3076,17 @@ const Or = () => {
|
|
|
3073
3076
|
className: "menu--unauthenticated",
|
|
3074
3077
|
"aria-label": e("xtraMenuAriaLabel"),
|
|
3075
3078
|
children: [
|
|
3076
|
-
/* @__PURE__ */ n.jsx(L.Trigger, { className:
|
|
3079
|
+
/* @__PURE__ */ n.jsx(L.Trigger, { className: P("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ n.jsxs("button", { children: [
|
|
3077
3080
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(we, { width: 24, height: 24, suffix: "mobile" }) }),
|
|
3078
3081
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(be, {}) })
|
|
3079
3082
|
] }) }),
|
|
3080
3083
|
/* @__PURE__ */ n.jsxs(L.Content, { children: [
|
|
3081
3084
|
/* @__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(
|
|
3085
|
+
/* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Ms, {}) }),
|
|
3083
3086
|
/* @__PURE__ */ n.jsx("span", { className: "button__label", children: e("login") })
|
|
3084
3087
|
] }) }),
|
|
3085
3088
|
/* @__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(
|
|
3089
|
+
/* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Hs, {}) }),
|
|
3087
3090
|
/* @__PURE__ */ n.jsx("span", { className: "button__label", children: e("register") })
|
|
3088
3091
|
] }) })
|
|
3089
3092
|
] })
|
|
@@ -3092,12 +3095,12 @@ const Or = () => {
|
|
|
3092
3095
|
);
|
|
3093
3096
|
};
|
|
3094
3097
|
var D = /* @__PURE__ */ ((e) => (e.Authenticated = "authenticated", e.NotAuthenticated = "notAuthenticated", e.Pending = "pending", e))(D || {});
|
|
3095
|
-
const
|
|
3098
|
+
const Mr = () => {
|
|
3096
3099
|
const { authenticationStatus: e } = je();
|
|
3097
3100
|
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(
|
|
3101
|
+
/* @__PURE__ */ n.jsx(kr, {}),
|
|
3102
|
+
/* @__PURE__ */ n.jsx(Fr, {})
|
|
3103
|
+
] }) : e === D.Pending ? /* @__PURE__ */ n.jsx(Or, {}) : /* @__PURE__ */ n.jsx(Ar, {});
|
|
3101
3104
|
};
|
|
3102
3105
|
/*! js-cookie v3.0.5 | MIT */
|
|
3103
3106
|
function X(e) {
|
|
@@ -3108,7 +3111,7 @@ function X(e) {
|
|
|
3108
3111
|
}
|
|
3109
3112
|
return e;
|
|
3110
3113
|
}
|
|
3111
|
-
var
|
|
3114
|
+
var Nr = {
|
|
3112
3115
|
read: function(e) {
|
|
3113
3116
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
3114
3117
|
},
|
|
@@ -3169,13 +3172,13 @@ function ve(e, t) {
|
|
|
3169
3172
|
}
|
|
3170
3173
|
);
|
|
3171
3174
|
}
|
|
3172
|
-
var me = ve(
|
|
3175
|
+
var me = ve(Nr, { path: "/" });
|
|
3173
3176
|
class ye extends Error {
|
|
3174
3177
|
constructor(t) {
|
|
3175
3178
|
super(t), this.name = "UnauthorizedError";
|
|
3176
3179
|
}
|
|
3177
3180
|
}
|
|
3178
|
-
const
|
|
3181
|
+
const Lr = () => {
|
|
3179
3182
|
const { i18n: e } = H(), { profileEndpoint: t } = G();
|
|
3180
3183
|
return rt({
|
|
3181
3184
|
queryKey: ["profile"],
|
|
@@ -3192,7 +3195,7 @@ const Mr = () => {
|
|
|
3192
3195
|
retry: (r, i) => i instanceof ye ? !1 : r < 2,
|
|
3193
3196
|
refetchOnWindowFocus: !1
|
|
3194
3197
|
});
|
|
3195
|
-
}, Te = (e) => e ? `+${e.countryCode} ${e.number}` : "", Ue = (e, t) => t == null ? void 0 : t.find((s) => s.type === e),
|
|
3198
|
+
}, Te = (e) => e ? `+${e.countryCode} ${e.number}` : "", Ue = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), Dr = (e) => {
|
|
3196
3199
|
const t = new Date(e.dateOfBirth), s = Ue(Se.Mobile, e.phone), r = Ue(Se.Fixed, e.phone), i = Te(s) ?? Te(r) ?? "";
|
|
3197
3200
|
return {
|
|
3198
3201
|
user: {
|
|
@@ -3232,8 +3235,8 @@ const Mr = () => {
|
|
|
3232
3235
|
state: () => D.Authenticated
|
|
3233
3236
|
}
|
|
3234
3237
|
};
|
|
3235
|
-
},
|
|
3236
|
-
const e =
|
|
3238
|
+
}, Ct = () => {
|
|
3239
|
+
const e = Lr(), t = me.get("profile"), s = !!t, [r, i] = d.useState(
|
|
3237
3240
|
s ? D.Authenticated : D.Pending
|
|
3238
3241
|
), [a, o] = d.useState(
|
|
3239
3242
|
s ? JSON.parse(t) : void 0
|
|
@@ -3244,7 +3247,7 @@ const Mr = () => {
|
|
|
3244
3247
|
), e.isSuccess) {
|
|
3245
3248
|
i(D.Authenticated);
|
|
3246
3249
|
const l = e.data;
|
|
3247
|
-
o(l), window.XTRA =
|
|
3250
|
+
o(l), window.XTRA = Dr(l);
|
|
3248
3251
|
}
|
|
3249
3252
|
}, [
|
|
3250
3253
|
s,
|
|
@@ -3253,21 +3256,21 @@ const Mr = () => {
|
|
|
3253
3256
|
e.isError,
|
|
3254
3257
|
e.isSuccess
|
|
3255
3258
|
]), { authenticationStatus: r, profile: a };
|
|
3256
|
-
},
|
|
3257
|
-
const { authenticationStatus: s, profile: r } =
|
|
3259
|
+
}, Tr = ({ position: e, bouMenuItems: t }) => {
|
|
3260
|
+
const { authenticationStatus: s, profile: r } = Ct();
|
|
3258
3261
|
return /* @__PURE__ */ n.jsx(
|
|
3259
|
-
|
|
3262
|
+
Rr,
|
|
3260
3263
|
{
|
|
3261
3264
|
bouMenuItems: t,
|
|
3262
3265
|
authenticationStatus: s,
|
|
3263
3266
|
position: e,
|
|
3264
3267
|
profile: r,
|
|
3265
|
-
children: /* @__PURE__ */ n.jsx(
|
|
3268
|
+
children: /* @__PURE__ */ n.jsx(Mr, {})
|
|
3266
3269
|
}
|
|
3267
3270
|
);
|
|
3268
|
-
},
|
|
3271
|
+
}, Ur = () => {
|
|
3269
3272
|
const { postTermsAndConditionsEndpoint: e } = G(), t = new ze();
|
|
3270
|
-
return
|
|
3273
|
+
return hs({
|
|
3271
3274
|
mutationFn: async (r) => {
|
|
3272
3275
|
const i = await fetch(e, {
|
|
3273
3276
|
method: "post",
|
|
@@ -3283,8 +3286,8 @@ const Mr = () => {
|
|
|
3283
3286
|
await t.invalidateQueries({ queryKey: ["gdpr"] });
|
|
3284
3287
|
}
|
|
3285
3288
|
});
|
|
3286
|
-
},
|
|
3287
|
-
const { i18n: e } = H(), { getTermsAndConditionsEndpoint: t } = G(), { authenticationStatus: s } =
|
|
3289
|
+
}, Qr = () => {
|
|
3290
|
+
const { i18n: e } = H(), { getTermsAndConditionsEndpoint: t } = G(), { authenticationStatus: s } = Ct(), r = me.get("hasAcceptedLatestTermsAndConditions"), i = [], a = r === "true", o = s === D.Authenticated;
|
|
3288
3291
|
return rt({
|
|
3289
3292
|
queryKey: ["gdpr"],
|
|
3290
3293
|
queryFn: async () => {
|
|
@@ -3300,71 +3303,71 @@ const Mr = () => {
|
|
|
3300
3303
|
enabled: o && !a,
|
|
3301
3304
|
initialData: i
|
|
3302
3305
|
});
|
|
3303
|
-
},
|
|
3304
|
-
const { t } = H(), {
|
|
3305
|
-
var
|
|
3306
|
-
(
|
|
3306
|
+
}, qr = () => {
|
|
3307
|
+
const { t: e } = H(), { logoutUrl: t } = yt(), s = d.useRef(null), [r, i] = d.useState(0), [a, o] = d.useState({}), { mutate: l, isError: c } = Ur(), { AccessibleFormMessage: h, formRef: u } = jt({ submitCount: r, errors: a }), { data: f } = Qr(), m = !!(f != null && f.length), p = e("termsAndConditions.error.required"), g = () => {
|
|
3308
|
+
var v;
|
|
3309
|
+
(v = s == null ? void 0 : s.current) == null || v.click(), document.body.style.removeProperty("overflow");
|
|
3307
3310
|
};
|
|
3308
3311
|
d.useEffect(() => {
|
|
3309
|
-
|
|
3310
|
-
}, [
|
|
3311
|
-
|
|
3312
|
-
}, [
|
|
3313
|
-
const
|
|
3314
|
-
|
|
3315
|
-
const { acceptedTC:
|
|
3316
|
-
if (
|
|
3317
|
-
const
|
|
3318
|
-
|
|
3312
|
+
m && document.body.style.setProperty("overflow", "hidden");
|
|
3313
|
+
}, [m]), d.useEffect(() => {
|
|
3314
|
+
c && o({ acceptedTC: p });
|
|
3315
|
+
}, [p, c]);
|
|
3316
|
+
const b = (v) => {
|
|
3317
|
+
v.preventDefault(), i(r + 1);
|
|
3318
|
+
const { acceptedTC: y } = v.target;
|
|
3319
|
+
if (y instanceof RadioNodeList) {
|
|
3320
|
+
const _ = Object.values(y);
|
|
3321
|
+
_.every((S) => S.checked) ? (o({}), l(_.map((S) => S.value)), g()) : o({ acceptedTC: p });
|
|
3319
3322
|
} else
|
|
3320
|
-
|
|
3323
|
+
y != null && y.checked ? (o({}), l([y.value]), g()) : o({ acceptedTC: p });
|
|
3321
3324
|
};
|
|
3322
|
-
return
|
|
3323
|
-
|
|
3324
|
-
/* @__PURE__ */ n.jsxs(
|
|
3325
|
-
/* @__PURE__ */ n.jsx(
|
|
3326
|
-
/* @__PURE__ */ n.jsx(
|
|
3327
|
-
/* @__PURE__ */ n.jsxs(
|
|
3328
|
-
|
|
3329
|
-
|
|
3325
|
+
return m ? /* @__PURE__ */ n.jsxs(F, { defaultOpen: m, isModal: !0, children: [
|
|
3326
|
+
h,
|
|
3327
|
+
/* @__PURE__ */ n.jsxs(F.Root, { children: [
|
|
3328
|
+
/* @__PURE__ */ n.jsx(F.Header, { children: /* @__PURE__ */ n.jsx(F.Title, { icon: /* @__PURE__ */ n.jsx(we, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(Gr, { children: e("termsAndConditions.title") }) }) }),
|
|
3329
|
+
/* @__PURE__ */ n.jsx(F.Body, { children: /* @__PURE__ */ n.jsxs(gt, { ref: u, id: "tc-form", onSubmit: b, children: [
|
|
3330
|
+
/* @__PURE__ */ n.jsxs(Kr, { children: [
|
|
3331
|
+
e("termsAndConditions.description"),
|
|
3332
|
+
a.acceptedTC && /* @__PURE__ */ n.jsx(Wr, { children: p })
|
|
3330
3333
|
] }),
|
|
3331
|
-
|
|
3334
|
+
f.map(({ tcCode: v, title: y, URL: _ }) => /* @__PURE__ */ n.jsx(
|
|
3332
3335
|
q,
|
|
3333
3336
|
{
|
|
3334
|
-
id:
|
|
3335
|
-
value:
|
|
3337
|
+
id: v,
|
|
3338
|
+
value: v,
|
|
3336
3339
|
name: "acceptedTC",
|
|
3337
3340
|
variant: "primary",
|
|
3338
3341
|
children: /* @__PURE__ */ n.jsxs(q.Content, { children: [
|
|
3339
|
-
/* @__PURE__ */ n.jsx(
|
|
3340
|
-
/* @__PURE__ */ n.jsx(
|
|
3342
|
+
/* @__PURE__ */ n.jsx(Hr, { children: y }),
|
|
3343
|
+
/* @__PURE__ */ n.jsx(Vr, { href: _, children: e("termsAndConditions.action", { title: y }) })
|
|
3341
3344
|
] })
|
|
3342
3345
|
},
|
|
3343
|
-
|
|
3346
|
+
v
|
|
3344
3347
|
))
|
|
3345
3348
|
] }) }),
|
|
3346
|
-
/* @__PURE__ */ n.jsxs(
|
|
3349
|
+
/* @__PURE__ */ n.jsxs(F.Footer, { children: [
|
|
3347
3350
|
/* @__PURE__ */ n.jsx(
|
|
3348
3351
|
"a",
|
|
3349
3352
|
{
|
|
3350
|
-
className:
|
|
3351
|
-
href:
|
|
3352
|
-
children:
|
|
3353
|
+
className: P("button", "button--secondary", "button--terms-and-conditions"),
|
|
3354
|
+
href: t,
|
|
3355
|
+
children: e("logout")
|
|
3353
3356
|
}
|
|
3354
3357
|
),
|
|
3355
|
-
/* @__PURE__ */ n.jsx(Y, { form: "tc-form", type: "submit", variant: "primary", children:
|
|
3358
|
+
/* @__PURE__ */ n.jsx(Y, { form: "tc-form", type: "submit", variant: "primary", children: e("confirm") })
|
|
3356
3359
|
] })
|
|
3357
3360
|
] })
|
|
3358
3361
|
] }) : /* @__PURE__ */ n.jsx(n.Fragment, {});
|
|
3359
|
-
},
|
|
3362
|
+
}, Hr = ({
|
|
3360
3363
|
children: e,
|
|
3361
3364
|
...t
|
|
3362
|
-
}) => /* @__PURE__ */ n.jsx(q.Label, { className: "form--tc__label", ...t, children: e }),
|
|
3363
|
-
|
|
3364
|
-
const
|
|
3365
|
+
}) => /* @__PURE__ */ n.jsx(q.Label, { className: "form--tc__label", ...t, children: e }), gt = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
|
|
3366
|
+
gt.displayName = "TermsAndConditionsForm";
|
|
3367
|
+
const Kr = ({
|
|
3365
3368
|
children: e,
|
|
3366
3369
|
...t
|
|
3367
|
-
}) => /* @__PURE__ */ n.jsx("p", { className: "form--tc__description", ...t, children: e }),
|
|
3370
|
+
}) => /* @__PURE__ */ n.jsx("p", { className: "form--tc__description", ...t, children: e }), Vr = ({ children: e, ...t }) => /* @__PURE__ */ n.jsx(
|
|
3368
3371
|
"a",
|
|
3369
3372
|
{
|
|
3370
3373
|
className: "form--tc__link",
|
|
@@ -3375,10 +3378,10 @@ const qr = ({
|
|
|
3375
3378
|
...t,
|
|
3376
3379
|
children: e
|
|
3377
3380
|
}
|
|
3378
|
-
),
|
|
3379
|
-
/* @__PURE__ */ n.jsx(
|
|
3380
|
-
/* @__PURE__ */ n.jsx(
|
|
3381
|
+
), Gr = ({ children: e }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: e }), Wr = ({ children: e, ...t }) => /* @__PURE__ */ n.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), $r = new ze(), Yr = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, bouMenuItems: i }) => /* @__PURE__ */ n.jsx(St, { environment: e, children: /* @__PURE__ */ n.jsx(Pr, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ n.jsxs(Bt, { client: $r, children: [
|
|
3382
|
+
/* @__PURE__ */ n.jsx(Tr, { position: r, bouMenuItems: i }),
|
|
3383
|
+
/* @__PURE__ */ n.jsx(qr, {})
|
|
3381
3384
|
] }) }) });
|
|
3382
3385
|
export {
|
|
3383
|
-
|
|
3386
|
+
Yr as default
|
|
3384
3387
|
};
|