@myxtra/authentication-green 1.9.5 → 1.10.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-123a0e54.mjs → App-540c6a00.mjs} +408 -336
- package/dist/index-66467a79.mjs +8501 -0
- package/dist/style.css +1 -1
- package/dist/xtra-authentication.mjs +1 -1
- package/package.json +24 -24
- package/dist/index-f380d606.mjs +0 -9050
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as d, j as n, g as _t, u as
|
|
2
|
-
class
|
|
1
|
+
import { r as d, j as n, g as _t, u as H, a as He, b as St, E as Et } from "./index-66467a79.mjs";
|
|
2
|
+
class G {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
5
5
|
}
|
|
@@ -20,7 +20,7 @@ class V {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
const X = typeof window > "u" || "Deno" in window;
|
|
23
|
-
function
|
|
23
|
+
function M() {
|
|
24
24
|
}
|
|
25
25
|
function Pt(e, t) {
|
|
26
26
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -28,7 +28,7 @@ function Pt(e, t) {
|
|
|
28
28
|
function fe(e) {
|
|
29
29
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Ke(e, t) {
|
|
32
32
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
33
33
|
}
|
|
34
34
|
function J(e, t, s) {
|
|
@@ -85,7 +85,7 @@ function Re(e, t) {
|
|
|
85
85
|
}
|
|
86
86
|
return !(typeof l == "boolean" && t.isStale() !== l || typeof i < "u" && i !== t.state.fetchStatus || a && !a(t));
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Oe(e, t) {
|
|
89
89
|
const {
|
|
90
90
|
exact: s,
|
|
91
91
|
fetching: r,
|
|
@@ -96,7 +96,7 @@ function Ae(e, t) {
|
|
|
96
96
|
if (!t.options.mutationKey)
|
|
97
97
|
return !1;
|
|
98
98
|
if (s) {
|
|
99
|
-
if (
|
|
99
|
+
if (Q(t.options.mutationKey) !== Q(a))
|
|
100
100
|
return !1;
|
|
101
101
|
} else if (!se(t.options.mutationKey, a))
|
|
102
102
|
return !1;
|
|
@@ -104,27 +104,27 @@ function Ae(e, t) {
|
|
|
104
104
|
return !(typeof r == "boolean" && t.state.status === "loading" !== r || i && !i(t));
|
|
105
105
|
}
|
|
106
106
|
function we(e, t) {
|
|
107
|
-
return ((t == null ? void 0 : t.queryKeyHashFn) ||
|
|
107
|
+
return ((t == null ? void 0 : t.queryKeyHashFn) || Q)(e);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Q(e) {
|
|
110
110
|
return JSON.stringify(e, (t, s) => pe(s) ? Object.keys(s).sort().reduce((r, i) => (r[i] = s[i], r), {}) : s);
|
|
111
111
|
}
|
|
112
112
|
function se(e, t) {
|
|
113
|
-
return
|
|
114
|
-
}
|
|
115
|
-
function Ge(e, t) {
|
|
116
|
-
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ge(e[s], t[s])) : !1;
|
|
113
|
+
return Ve(e, t);
|
|
117
114
|
}
|
|
118
115
|
function Ve(e, t) {
|
|
116
|
+
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ve(e[s], t[s])) : !1;
|
|
117
|
+
}
|
|
118
|
+
function Ge(e, t) {
|
|
119
119
|
if (e === t)
|
|
120
120
|
return e;
|
|
121
|
-
const s =
|
|
121
|
+
const s = Ae(e) && Ae(t);
|
|
122
122
|
if (s || pe(e) && pe(t)) {
|
|
123
123
|
const r = s ? e.length : Object.keys(e).length, i = s ? t : Object.keys(t), a = i.length, o = s ? [] : {};
|
|
124
124
|
let l = 0;
|
|
125
125
|
for (let c = 0; c < a; c++) {
|
|
126
126
|
const h = s ? c : i[c];
|
|
127
|
-
o[h] =
|
|
127
|
+
o[h] = Ge(e[h], t[h]), o[h] === e[h] && l++;
|
|
128
128
|
}
|
|
129
129
|
return r === a && l === r ? e : o;
|
|
130
130
|
}
|
|
@@ -138,19 +138,19 @@ function re(e, t) {
|
|
|
138
138
|
return !1;
|
|
139
139
|
return !0;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Ae(e) {
|
|
142
142
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
143
143
|
}
|
|
144
144
|
function pe(e) {
|
|
145
|
-
if (!
|
|
145
|
+
if (!ke(e))
|
|
146
146
|
return !1;
|
|
147
147
|
const t = e.constructor;
|
|
148
148
|
if (typeof t > "u")
|
|
149
149
|
return !0;
|
|
150
150
|
const s = t.prototype;
|
|
151
|
-
return !(!
|
|
151
|
+
return !(!ke(s) || !s.hasOwnProperty("isPrototypeOf"));
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function ke(e) {
|
|
154
154
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
155
155
|
}
|
|
156
156
|
function I(e) {
|
|
@@ -161,17 +161,17 @@ function $e(e) {
|
|
|
161
161
|
setTimeout(t, e);
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Fe(e) {
|
|
165
165
|
$e(0).then(e);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Ot() {
|
|
168
168
|
if (typeof AbortController == "function")
|
|
169
169
|
return new AbortController();
|
|
170
170
|
}
|
|
171
171
|
function ve(e, t, s) {
|
|
172
|
-
return s.isDataEqual != null && s.isDataEqual(e, t) ? e : typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ?
|
|
172
|
+
return s.isDataEqual != null && s.isDataEqual(e, t) ? e : typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Ge(e, t) : t;
|
|
173
173
|
}
|
|
174
|
-
class
|
|
174
|
+
class At extends G {
|
|
175
175
|
constructor() {
|
|
176
176
|
super(), this.setup = (t) => {
|
|
177
177
|
if (!X && window.addEventListener) {
|
|
@@ -211,16 +211,16 @@ class Ot 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 ne = new
|
|
215
|
-
class
|
|
214
|
+
const ne = new At(), Ne = ["online", "offline"];
|
|
215
|
+
class kt extends G {
|
|
216
216
|
constructor() {
|
|
217
217
|
super(), this.setup = (t) => {
|
|
218
218
|
if (!X && window.addEventListener) {
|
|
219
219
|
const s = () => t();
|
|
220
|
-
return
|
|
220
|
+
return Ne.forEach((r) => {
|
|
221
221
|
window.addEventListener(r, s, !1);
|
|
222
222
|
}), () => {
|
|
223
|
-
|
|
223
|
+
Ne.forEach((r) => {
|
|
224
224
|
window.removeEventListener(r, s);
|
|
225
225
|
});
|
|
226
226
|
};
|
|
@@ -256,8 +256,8 @@ class Ft 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 ie = new
|
|
260
|
-
function
|
|
259
|
+
const ie = new kt();
|
|
260
|
+
function Ft(e) {
|
|
261
261
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
262
262
|
}
|
|
263
263
|
function ue(e) {
|
|
@@ -273,8 +273,8 @@ function te(e) {
|
|
|
273
273
|
}
|
|
274
274
|
function Ze(e) {
|
|
275
275
|
let t = !1, s = 0, r = !1, i, a, o;
|
|
276
|
-
const l = new Promise((m,
|
|
277
|
-
a = m, o =
|
|
276
|
+
const l = new Promise((m, C) => {
|
|
277
|
+
a = m, o = C;
|
|
278
278
|
}), c = (m) => {
|
|
279
279
|
r || (p(new We(m)), e.abort == null || e.abort());
|
|
280
280
|
}, h = () => {
|
|
@@ -286,9 +286,9 @@ function Ze(e) {
|
|
|
286
286
|
}, p = (m) => {
|
|
287
287
|
r || (r = !0, e.onError == null || e.onError(m), i == null || i(), o(m));
|
|
288
288
|
}, y = () => new Promise((m) => {
|
|
289
|
-
i = (
|
|
289
|
+
i = (C) => {
|
|
290
290
|
const _ = r || !f();
|
|
291
|
-
return _ && m(
|
|
291
|
+
return _ && m(C), _;
|
|
292
292
|
}, e.onPause == null || e.onPause();
|
|
293
293
|
}).then(() => {
|
|
294
294
|
i = void 0, r || e.onContinue == null || e.onContinue();
|
|
@@ -298,23 +298,23 @@ function Ze(e) {
|
|
|
298
298
|
let m;
|
|
299
299
|
try {
|
|
300
300
|
m = e.fn();
|
|
301
|
-
} catch (
|
|
302
|
-
m = Promise.reject(
|
|
301
|
+
} catch (C) {
|
|
302
|
+
m = Promise.reject(C);
|
|
303
303
|
}
|
|
304
|
-
Promise.resolve(m).then(v).catch((
|
|
304
|
+
Promise.resolve(m).then(v).catch((C) => {
|
|
305
305
|
var _, w;
|
|
306
306
|
if (r)
|
|
307
307
|
return;
|
|
308
|
-
const P = (_ = e.retry) != null ? _ : 3,
|
|
308
|
+
const P = (_ = e.retry) != null ? _ : 3, k = (w = e.retryDelay) != null ? w : Ft, S = typeof k == "function" ? k(s, C) : k, j = P === !0 || typeof P == "number" && s < P || typeof P == "function" && P(s, C);
|
|
309
309
|
if (t || !j) {
|
|
310
|
-
p(
|
|
310
|
+
p(C);
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
|
-
s++, e.onFail == null || e.onFail(s,
|
|
313
|
+
s++, e.onFail == null || e.onFail(s, C), $e(S).then(() => {
|
|
314
314
|
if (f())
|
|
315
315
|
return y();
|
|
316
316
|
}).then(() => {
|
|
317
|
-
t ? p(
|
|
317
|
+
t ? p(C) : x();
|
|
318
318
|
});
|
|
319
319
|
});
|
|
320
320
|
};
|
|
@@ -327,7 +327,7 @@ function Ze(e) {
|
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
329
|
const je = console;
|
|
330
|
-
function
|
|
330
|
+
function Nt() {
|
|
331
331
|
let e = [], t = 0, s = (u) => {
|
|
332
332
|
u();
|
|
333
333
|
}, r = (u) => {
|
|
@@ -343,7 +343,7 @@ function Mt() {
|
|
|
343
343
|
}
|
|
344
344
|
return f;
|
|
345
345
|
}, a = (u) => {
|
|
346
|
-
t ? e.push(u) :
|
|
346
|
+
t ? e.push(u) : Fe(() => {
|
|
347
347
|
s(u);
|
|
348
348
|
});
|
|
349
349
|
}, o = (u) => (...f) => {
|
|
@@ -352,7 +352,7 @@ function Mt() {
|
|
|
352
352
|
});
|
|
353
353
|
}, l = () => {
|
|
354
354
|
const u = e;
|
|
355
|
-
e = [], u.length &&
|
|
355
|
+
e = [], u.length && Fe(() => {
|
|
356
356
|
r(() => {
|
|
357
357
|
u.forEach((f) => {
|
|
358
358
|
s(f);
|
|
@@ -372,7 +372,7 @@ function Mt() {
|
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
const
|
|
375
|
+
const O = Nt();
|
|
376
376
|
class ze {
|
|
377
377
|
destroy() {
|
|
378
378
|
this.clearGcTimeout();
|
|
@@ -389,7 +389,7 @@ class ze {
|
|
|
389
389
|
this.gcTimeout && (clearTimeout(this.gcTimeout), this.gcTimeout = void 0);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
class
|
|
392
|
+
class Mt extends ze {
|
|
393
393
|
constructor(t) {
|
|
394
394
|
super(), this.abortSignalConsumed = !1, this.defaultOptions = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.cache = t.cache, this.logger = t.logger || je, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.initialState = t.state || Lt(this.options), this.state = this.initialState, this.scheduleGc();
|
|
395
395
|
}
|
|
@@ -424,7 +424,7 @@ class kt extends ze {
|
|
|
424
424
|
cancel(t) {
|
|
425
425
|
var s;
|
|
426
426
|
const r = this.promise;
|
|
427
|
-
return (s = this.retryer) == null || s.cancel(t), r ? r.then(
|
|
427
|
+
return (s = this.retryer) == null || s.cancel(t), r ? r.then(M).catch(M) : Promise.resolve();
|
|
428
428
|
}
|
|
429
429
|
destroy() {
|
|
430
430
|
super.destroy(), this.cancel({
|
|
@@ -444,7 +444,7 @@ class kt extends ze {
|
|
|
444
444
|
return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some((t) => t.getCurrentResult().isStale);
|
|
445
445
|
}
|
|
446
446
|
isStaleByTime(t = 0) {
|
|
447
|
-
return this.state.isInvalidated || !this.state.dataUpdatedAt || !
|
|
447
|
+
return this.state.isInvalidated || !this.state.dataUpdatedAt || !Ke(this.state.dataUpdatedAt, t);
|
|
448
448
|
}
|
|
449
449
|
onFocus() {
|
|
450
450
|
var t;
|
|
@@ -500,8 +500,7 @@ class kt extends ze {
|
|
|
500
500
|
const p = this.observers.find((y) => y.options.queryFn);
|
|
501
501
|
p && this.setOptions(p.options);
|
|
502
502
|
}
|
|
503
|
-
|
|
504
|
-
const o = At(), l = {
|
|
503
|
+
const o = Ot(), l = {
|
|
505
504
|
queryKey: this.queryKey,
|
|
506
505
|
pageParam: void 0,
|
|
507
506
|
meta: this.meta
|
|
@@ -534,8 +533,8 @@ class kt extends ze {
|
|
|
534
533
|
type: "error",
|
|
535
534
|
error: p
|
|
536
535
|
}), !te(p)) {
|
|
537
|
-
var y, x, m,
|
|
538
|
-
(y = (x = this.cache.config).onError) == null || y.call(x, p, this), (m = (
|
|
536
|
+
var y, x, m, C;
|
|
537
|
+
(y = (x = this.cache.config).onError) == null || y.call(x, p, this), (m = (C = this.cache.config).onSettled) == null || m.call(C, this.state.data, p, this);
|
|
539
538
|
}
|
|
540
539
|
this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
541
540
|
};
|
|
@@ -543,12 +542,12 @@ class kt extends ze {
|
|
|
543
542
|
fn: u.fetchFn,
|
|
544
543
|
abort: o == null ? void 0 : o.abort.bind(o),
|
|
545
544
|
onSuccess: (p) => {
|
|
546
|
-
var y, x, m,
|
|
545
|
+
var y, x, m, C;
|
|
547
546
|
if (typeof p > "u") {
|
|
548
547
|
v(new Error(this.queryHash + " data is undefined"));
|
|
549
548
|
return;
|
|
550
549
|
}
|
|
551
|
-
this.setData(p), (y = (x = this.cache.config).onSuccess) == null || y.call(x, p, this), (m = (
|
|
550
|
+
this.setData(p), (y = (x = this.cache.config).onSuccess) == null || y.call(x, p, this), (m = (C = this.cache.config).onSettled) == null || m.call(C, p, this.state.error, this), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
552
551
|
},
|
|
553
552
|
onError: v,
|
|
554
553
|
onFail: (p, y) => {
|
|
@@ -623,7 +622,8 @@ class kt extends ze {
|
|
|
623
622
|
case "error":
|
|
624
623
|
const o = t.error;
|
|
625
624
|
return te(o) && o.revert && this.revertState ? {
|
|
626
|
-
...this.revertState
|
|
625
|
+
...this.revertState,
|
|
626
|
+
fetchStatus: "idle"
|
|
627
627
|
} : {
|
|
628
628
|
...r,
|
|
629
629
|
error: o,
|
|
@@ -646,7 +646,7 @@ class kt extends ze {
|
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
648
|
};
|
|
649
|
-
this.state = s(this.state),
|
|
649
|
+
this.state = s(this.state), O.batch(() => {
|
|
650
650
|
this.observers.forEach((r) => {
|
|
651
651
|
r.onQueryUpdate(t);
|
|
652
652
|
}), this.cache.notify({
|
|
@@ -674,7 +674,7 @@ function Lt(e) {
|
|
|
674
674
|
fetchStatus: "idle"
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
|
-
class Dt extends
|
|
677
|
+
class Dt extends G {
|
|
678
678
|
constructor(t) {
|
|
679
679
|
super(), this.config = t || {}, this.queries = [], this.queriesMap = {};
|
|
680
680
|
}
|
|
@@ -682,7 +682,7 @@ class Dt extends V {
|
|
|
682
682
|
var i;
|
|
683
683
|
const a = s.queryKey, o = (i = s.queryHash) != null ? i : we(a, s);
|
|
684
684
|
let l = this.get(o);
|
|
685
|
-
return l || (l = new
|
|
685
|
+
return l || (l = new Mt({
|
|
686
686
|
cache: this,
|
|
687
687
|
logger: t.getLogger(),
|
|
688
688
|
queryKey: a,
|
|
@@ -706,7 +706,7 @@ class Dt extends V {
|
|
|
706
706
|
}));
|
|
707
707
|
}
|
|
708
708
|
clear() {
|
|
709
|
-
|
|
709
|
+
O.batch(() => {
|
|
710
710
|
this.queries.forEach((t) => {
|
|
711
711
|
this.remove(t);
|
|
712
712
|
});
|
|
@@ -727,7 +727,7 @@ class Dt extends V {
|
|
|
727
727
|
return Object.keys(r).length > 0 ? this.queries.filter((i) => Re(r, i)) : this.queries;
|
|
728
728
|
}
|
|
729
729
|
notify(t) {
|
|
730
|
-
|
|
730
|
+
O.batch(() => {
|
|
731
731
|
this.listeners.forEach(({
|
|
732
732
|
listener: s
|
|
733
733
|
}) => {
|
|
@@ -736,14 +736,14 @@ class Dt extends V {
|
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
738
|
onFocus() {
|
|
739
|
-
|
|
739
|
+
O.batch(() => {
|
|
740
740
|
this.queries.forEach((t) => {
|
|
741
741
|
t.onFocus();
|
|
742
742
|
});
|
|
743
743
|
});
|
|
744
744
|
}
|
|
745
745
|
onOnline() {
|
|
746
|
-
|
|
746
|
+
O.batch(() => {
|
|
747
747
|
this.queries.forEach((t) => {
|
|
748
748
|
t.onOnline();
|
|
749
749
|
});
|
|
@@ -795,11 +795,11 @@ class Tt extends ze {
|
|
|
795
795
|
var j;
|
|
796
796
|
return this.retryer = Ze({
|
|
797
797
|
fn: () => this.options.mutationFn ? this.options.mutationFn(this.state.variables) : Promise.reject("No mutationFn found"),
|
|
798
|
-
onFail: (b,
|
|
798
|
+
onFail: (b, N) => {
|
|
799
799
|
this.dispatch({
|
|
800
800
|
type: "failed",
|
|
801
801
|
failureCount: b,
|
|
802
|
-
error:
|
|
802
|
+
error: N
|
|
803
803
|
});
|
|
804
804
|
},
|
|
805
805
|
onPause: () => {
|
|
@@ -839,8 +839,8 @@ class Tt extends ze {
|
|
|
839
839
|
}), j;
|
|
840
840
|
} catch (j) {
|
|
841
841
|
try {
|
|
842
|
-
var x, m,
|
|
843
|
-
throw await ((x = (m = this.mutationCache.config).onError) == null ? void 0 : x.call(m, j, this.state.variables, this.state.context, this)), await ((
|
|
842
|
+
var x, m, C, _, w, P, k, S;
|
|
843
|
+
throw await ((x = (m = this.mutationCache.config).onError) == null ? void 0 : x.call(m, j, this.state.variables, this.state.context, this)), await ((C = (_ = this.options).onError) == null ? void 0 : C.call(_, j, this.state.variables, this.state.context)), await ((w = (P = this.mutationCache.config).onSettled) == null ? void 0 : w.call(P, void 0, j, this.state.variables, this.state.context, this)), await ((k = (S = this.options).onSettled) == null ? void 0 : k.call(S, void 0, j, this.state.variables, this.state.context)), j;
|
|
844
844
|
} finally {
|
|
845
845
|
this.dispatch({
|
|
846
846
|
type: "error",
|
|
@@ -907,7 +907,7 @@ class Tt extends ze {
|
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
909
|
};
|
|
910
|
-
this.state = s(this.state),
|
|
910
|
+
this.state = s(this.state), O.batch(() => {
|
|
911
911
|
this.observers.forEach((r) => {
|
|
912
912
|
r.onMutationUpdate(t);
|
|
913
913
|
}), this.mutationCache.notify({
|
|
@@ -930,7 +930,7 @@ function Ye() {
|
|
|
930
930
|
variables: void 0
|
|
931
931
|
};
|
|
932
932
|
}
|
|
933
|
-
class Ut extends
|
|
933
|
+
class Ut extends G {
|
|
934
934
|
constructor(t) {
|
|
935
935
|
super(), this.config = t || {}, this.mutations = [], this.mutationId = 0;
|
|
936
936
|
}
|
|
@@ -958,7 +958,7 @@ class Ut extends V {
|
|
|
958
958
|
});
|
|
959
959
|
}
|
|
960
960
|
clear() {
|
|
961
|
-
|
|
961
|
+
O.batch(() => {
|
|
962
962
|
this.mutations.forEach((t) => {
|
|
963
963
|
this.remove(t);
|
|
964
964
|
});
|
|
@@ -968,13 +968,13 @@ class Ut extends V {
|
|
|
968
968
|
return this.mutations;
|
|
969
969
|
}
|
|
970
970
|
find(t) {
|
|
971
|
-
return typeof t.exact > "u" && (t.exact = !0), this.mutations.find((s) =>
|
|
971
|
+
return typeof t.exact > "u" && (t.exact = !0), this.mutations.find((s) => Oe(t, s));
|
|
972
972
|
}
|
|
973
973
|
findAll(t) {
|
|
974
|
-
return this.mutations.filter((s) =>
|
|
974
|
+
return this.mutations.filter((s) => Oe(t, s));
|
|
975
975
|
}
|
|
976
976
|
notify(t) {
|
|
977
|
-
|
|
977
|
+
O.batch(() => {
|
|
978
978
|
this.listeners.forEach(({
|
|
979
979
|
listener: s
|
|
980
980
|
}) => {
|
|
@@ -986,7 +986,7 @@ class Ut extends V {
|
|
|
986
986
|
var t;
|
|
987
987
|
return this.resuming = ((t = this.resuming) != null ? t : Promise.resolve()).then(() => {
|
|
988
988
|
const s = this.mutations.filter((r) => r.state.isPaused);
|
|
989
|
-
return
|
|
989
|
+
return O.batch(() => s.reduce((r, i) => r.then(() => i.continue().catch(M)), Promise.resolve()));
|
|
990
990
|
}).then(() => {
|
|
991
991
|
this.resuming = void 0;
|
|
992
992
|
}), this.resuming;
|
|
@@ -1015,7 +1015,7 @@ function Qt() {
|
|
|
1015
1015
|
return e.signal;
|
|
1016
1016
|
}
|
|
1017
1017
|
});
|
|
1018
|
-
},
|
|
1018
|
+
}, C = e.options.queryFn || (() => Promise.reject("Missing queryFn for queryKey '" + e.options.queryHash + "'")), _ = (S, j, b, N) => (y = N ? [j, ...y] : [...y, j], N ? [b, ...S] : [...S, b]), w = (S, j, b, N) => {
|
|
1019
1019
|
if (x)
|
|
1020
1020
|
return Promise.reject("Cancelled");
|
|
1021
1021
|
if (typeof b > "u" && !j && S.length)
|
|
@@ -1026,14 +1026,14 @@ function Qt() {
|
|
|
1026
1026
|
meta: e.options.meta
|
|
1027
1027
|
};
|
|
1028
1028
|
m(Y);
|
|
1029
|
-
const de =
|
|
1030
|
-
return Promise.resolve(de).then((jt) => _(S, b, jt,
|
|
1029
|
+
const de = C(Y);
|
|
1030
|
+
return Promise.resolve(de).then((jt) => _(S, b, jt, N));
|
|
1031
1031
|
};
|
|
1032
1032
|
let P;
|
|
1033
1033
|
if (!v.length)
|
|
1034
1034
|
P = w([]);
|
|
1035
1035
|
else if (u) {
|
|
1036
|
-
const S = typeof h < "u", j = S ? h :
|
|
1036
|
+
const S = typeof h < "u", j = S ? h : Me(e.options, v);
|
|
1037
1037
|
P = w(v, S, j);
|
|
1038
1038
|
} else if (f) {
|
|
1039
1039
|
const S = typeof h < "u", j = S ? h : qt(e.options, v);
|
|
@@ -1043,12 +1043,12 @@ function Qt() {
|
|
|
1043
1043
|
const S = typeof e.options.getNextPageParam > "u";
|
|
1044
1044
|
P = (l && v[0] ? l(v[0], 0, v) : !0) ? w([], S, p[0]) : Promise.resolve(_([], p[0], v[0]));
|
|
1045
1045
|
for (let b = 1; b < v.length; b++)
|
|
1046
|
-
P = P.then((
|
|
1046
|
+
P = P.then((N) => {
|
|
1047
1047
|
if (l && v[b] ? l(v[b], b, v) : !0) {
|
|
1048
|
-
const de = S ? p[b] :
|
|
1049
|
-
return w(
|
|
1048
|
+
const de = S ? p[b] : Me(e.options, N);
|
|
1049
|
+
return w(N, S, de);
|
|
1050
1050
|
}
|
|
1051
|
-
return Promise.resolve(_(
|
|
1051
|
+
return Promise.resolve(_(N, p[b], v[b]));
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
1054
|
return P.then((S) => ({
|
|
@@ -1059,7 +1059,7 @@ function Qt() {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1062
|
+
function Me(e, t) {
|
|
1063
1063
|
return e.getNextPageParam == null ? void 0 : e.getNextPageParam(t[t.length - 1], t);
|
|
1064
1064
|
}
|
|
1065
1065
|
function qt(e, t) {
|
|
@@ -1118,7 +1118,7 @@ class Je {
|
|
|
1118
1118
|
});
|
|
1119
1119
|
}
|
|
1120
1120
|
setQueriesData(t, s, r) {
|
|
1121
|
-
return
|
|
1121
|
+
return O.batch(() => this.getQueryCache().findAll(t).map(({
|
|
1122
1122
|
queryKey: i
|
|
1123
1123
|
}) => [i, this.setQueryData(i, s, r)]));
|
|
1124
1124
|
}
|
|
@@ -1128,7 +1128,7 @@ class Je {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
removeQueries(t, s) {
|
|
1130
1130
|
const [r] = T(t, s), i = this.queryCache;
|
|
1131
|
-
|
|
1131
|
+
O.batch(() => {
|
|
1132
1132
|
i.findAll(r).forEach((a) => {
|
|
1133
1133
|
i.remove(a);
|
|
1134
1134
|
});
|
|
@@ -1139,19 +1139,19 @@ class Je {
|
|
|
1139
1139
|
type: "active",
|
|
1140
1140
|
...i
|
|
1141
1141
|
};
|
|
1142
|
-
return
|
|
1142
|
+
return O.batch(() => (o.findAll(i).forEach((c) => {
|
|
1143
1143
|
c.reset();
|
|
1144
1144
|
}), this.refetchQueries(l, a)));
|
|
1145
1145
|
}
|
|
1146
1146
|
cancelQueries(t, s, r) {
|
|
1147
1147
|
const [i, a = {}] = T(t, s, r);
|
|
1148
1148
|
typeof a.revert > "u" && (a.revert = !0);
|
|
1149
|
-
const o =
|
|
1150
|
-
return Promise.all(o).then(
|
|
1149
|
+
const o = O.batch(() => this.queryCache.findAll(i).map((l) => l.cancel(a)));
|
|
1150
|
+
return Promise.all(o).then(M).catch(M);
|
|
1151
1151
|
}
|
|
1152
1152
|
invalidateQueries(t, s, r) {
|
|
1153
1153
|
const [i, a] = T(t, s, r);
|
|
1154
|
-
return
|
|
1154
|
+
return O.batch(() => {
|
|
1155
1155
|
var o, l;
|
|
1156
1156
|
if (this.queryCache.findAll(i).forEach((h) => {
|
|
1157
1157
|
h.invalidate();
|
|
@@ -1165,7 +1165,7 @@ class Je {
|
|
|
1165
1165
|
});
|
|
1166
1166
|
}
|
|
1167
1167
|
refetchQueries(t, s, r) {
|
|
1168
|
-
const [i, a] = T(t, s, r), o =
|
|
1168
|
+
const [i, a] = T(t, s, r), o = O.batch(() => this.queryCache.findAll(i).filter((c) => !c.isDisabled()).map((c) => {
|
|
1169
1169
|
var h;
|
|
1170
1170
|
return c.fetch(void 0, {
|
|
1171
1171
|
...a,
|
|
@@ -1175,8 +1175,8 @@ class Je {
|
|
|
1175
1175
|
}
|
|
1176
1176
|
});
|
|
1177
1177
|
}));
|
|
1178
|
-
let l = Promise.all(o).then(
|
|
1179
|
-
return a != null && a.throwOnError || (l = l.catch(
|
|
1178
|
+
let l = Promise.all(o).then(M);
|
|
1179
|
+
return a != null && a.throwOnError || (l = l.catch(M)), l;
|
|
1180
1180
|
}
|
|
1181
1181
|
fetchQuery(t, s, r) {
|
|
1182
1182
|
const i = J(t, s, r), a = this.defaultQueryOptions(i);
|
|
@@ -1185,14 +1185,14 @@ class Je {
|
|
|
1185
1185
|
return o.isStaleByTime(a.staleTime) ? o.fetch(a) : Promise.resolve(o.state.data);
|
|
1186
1186
|
}
|
|
1187
1187
|
prefetchQuery(t, s, r) {
|
|
1188
|
-
return this.fetchQuery(t, s, r).then(
|
|
1188
|
+
return this.fetchQuery(t, s, r).then(M).catch(M);
|
|
1189
1189
|
}
|
|
1190
1190
|
fetchInfiniteQuery(t, s, r) {
|
|
1191
1191
|
const i = J(t, s, r);
|
|
1192
1192
|
return i.behavior = Qt(), this.fetchQuery(i);
|
|
1193
1193
|
}
|
|
1194
1194
|
prefetchInfiniteQuery(t, s, r) {
|
|
1195
|
-
return this.fetchInfiniteQuery(t, s, r).then(
|
|
1195
|
+
return this.fetchInfiniteQuery(t, s, r).then(M).catch(M);
|
|
1196
1196
|
}
|
|
1197
1197
|
resumePausedMutations() {
|
|
1198
1198
|
return this.mutationCache.resumePausedMutations();
|
|
@@ -1213,7 +1213,7 @@ class Je {
|
|
|
1213
1213
|
this.defaultOptions = t;
|
|
1214
1214
|
}
|
|
1215
1215
|
setQueryDefaults(t, s) {
|
|
1216
|
-
const r = this.queryDefaults.find((i) =>
|
|
1216
|
+
const r = this.queryDefaults.find((i) => Q(t) === Q(i.queryKey));
|
|
1217
1217
|
r ? r.defaultOptions = s : this.queryDefaults.push({
|
|
1218
1218
|
queryKey: t,
|
|
1219
1219
|
defaultOptions: s
|
|
@@ -1226,7 +1226,7 @@ class Je {
|
|
|
1226
1226
|
return s == null ? void 0 : s.defaultOptions;
|
|
1227
1227
|
}
|
|
1228
1228
|
setMutationDefaults(t, s) {
|
|
1229
|
-
const r = this.mutationDefaults.find((i) =>
|
|
1229
|
+
const r = this.mutationDefaults.find((i) => Q(t) === Q(i.mutationKey));
|
|
1230
1230
|
r ? r.defaultOptions = s : this.mutationDefaults.push({
|
|
1231
1231
|
mutationKey: t,
|
|
1232
1232
|
defaultOptions: s
|
|
@@ -1261,7 +1261,7 @@ class Je {
|
|
|
1261
1261
|
this.queryCache.clear(), this.mutationCache.clear();
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
class
|
|
1264
|
+
class Ht extends G {
|
|
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 Kt 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 Vt(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;
|
|
@@ -1345,12 +1345,12 @@ class Kt extends V {
|
|
|
1345
1345
|
executeFetch(t) {
|
|
1346
1346
|
this.updateQuery();
|
|
1347
1347
|
let s = this.currentQuery.fetch(this.options, t);
|
|
1348
|
-
return t != null && t.throwOnError || (s = s.catch(
|
|
1348
|
+
return t != null && t.throwOnError || (s = s.catch(M)), s;
|
|
1349
1349
|
}
|
|
1350
1350
|
updateStaleTimeout() {
|
|
1351
1351
|
if (this.clearStaleTimeout(), X || this.currentResult.isStale || !fe(this.options.staleTime))
|
|
1352
1352
|
return;
|
|
1353
|
-
const s =
|
|
1353
|
+
const s = Ke(this.currentResult.dataUpdatedAt, this.options.staleTime) + 1;
|
|
1354
1354
|
this.staleTimeoutId = setTimeout(() => {
|
|
1355
1355
|
this.currentResult.isStale || this.updateResult();
|
|
1356
1356
|
}, s);
|
|
@@ -1383,13 +1383,13 @@ class Kt extends V {
|
|
|
1383
1383
|
errorUpdatedAt: y,
|
|
1384
1384
|
fetchStatus: x,
|
|
1385
1385
|
status: m
|
|
1386
|
-
} = f,
|
|
1386
|
+
} = f, C = !1, _ = !1, w;
|
|
1387
1387
|
if (s._optimisticResults) {
|
|
1388
|
-
const b = this.hasListeners(),
|
|
1389
|
-
(
|
|
1388
|
+
const b = this.hasListeners(), N = !b && Le(t, s), Y = b && De(t, r, s, i);
|
|
1389
|
+
(N || Y) && (x = ue(t.options.networkMode) ? "fetching" : "paused", v || (m = "loading")), s._optimisticResults === "isRestoring" && (x = "idle");
|
|
1390
1390
|
}
|
|
1391
1391
|
if (s.keepPreviousData && !f.dataUpdatedAt && u != null && u.isSuccess && m !== "error")
|
|
1392
|
-
w = u.data, v = u.dataUpdatedAt, m = u.status,
|
|
1392
|
+
w = u.data, v = u.dataUpdatedAt, m = u.status, C = !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
|
w = this.selectResult;
|
|
@@ -1408,20 +1408,20 @@ class Kt extends V {
|
|
|
1408
1408
|
else if (b = typeof s.placeholderData == "function" ? s.placeholderData() : s.placeholderData, s.select && typeof b < "u")
|
|
1409
1409
|
try {
|
|
1410
1410
|
b = s.select(b), this.selectError = null;
|
|
1411
|
-
} catch (
|
|
1412
|
-
this.selectError =
|
|
1411
|
+
} catch (N) {
|
|
1412
|
+
this.selectError = N;
|
|
1413
1413
|
}
|
|
1414
1414
|
typeof b < "u" && (m = "success", w = ve(a == null ? void 0 : a.data, b, s), _ = !0);
|
|
1415
1415
|
}
|
|
1416
1416
|
this.selectError && (p = this.selectError, w = this.selectResult, y = Date.now(), m = "error");
|
|
1417
|
-
const P = x === "fetching",
|
|
1417
|
+
const P = x === "fetching", k = m === "loading", S = m === "error";
|
|
1418
1418
|
return {
|
|
1419
1419
|
status: m,
|
|
1420
1420
|
fetchStatus: x,
|
|
1421
|
-
isLoading:
|
|
1421
|
+
isLoading: k,
|
|
1422
1422
|
isSuccess: m === "success",
|
|
1423
1423
|
isError: S,
|
|
1424
|
-
isInitialLoading:
|
|
1424
|
+
isInitialLoading: k && P,
|
|
1425
1425
|
data: w,
|
|
1426
1426
|
dataUpdatedAt: v,
|
|
1427
1427
|
error: p,
|
|
@@ -1432,11 +1432,11 @@ class Kt extends V {
|
|
|
1432
1432
|
isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
|
|
1433
1433
|
isFetchedAfterMount: f.dataUpdateCount > h.dataUpdateCount || f.errorUpdateCount > h.errorUpdateCount,
|
|
1434
1434
|
isFetching: P,
|
|
1435
|
-
isRefetching: P && !
|
|
1435
|
+
isRefetching: P && !k,
|
|
1436
1436
|
isLoadingError: S && f.dataUpdatedAt === 0,
|
|
1437
1437
|
isPaused: x === "paused",
|
|
1438
1438
|
isPlaceholderData: _,
|
|
1439
|
-
isPreviousData:
|
|
1439
|
+
isPreviousData: C,
|
|
1440
1440
|
isRefetchError: S && f.dataUpdatedAt !== 0,
|
|
1441
1441
|
isStale: _e(t, s),
|
|
1442
1442
|
refetch: this.refetch,
|
|
@@ -1481,7 +1481,7 @@ class Kt extends V {
|
|
|
1481
1481
|
t.type === "success" ? s.onSuccess = !t.manual : t.type === "error" && !te(t.error) && (s.onError = !0), this.updateResult(s), this.hasListeners() && this.updateTimers();
|
|
1482
1482
|
}
|
|
1483
1483
|
notify(t) {
|
|
1484
|
-
|
|
1484
|
+
O.batch(() => {
|
|
1485
1485
|
if (t.onSuccess) {
|
|
1486
1486
|
var s, r, i, a;
|
|
1487
1487
|
(s = (r = this.options).onSuccess) == null || s.call(r, this.currentResult.data), (i = (a = this.options).onSettled) == null || i.call(a, this.currentResult.data, null);
|
|
@@ -1500,11 +1500,11 @@ class Kt extends V {
|
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1503
|
+
function Kt(e, t) {
|
|
1504
1504
|
return t.enabled !== !1 && !e.state.dataUpdatedAt && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
1505
1505
|
}
|
|
1506
1506
|
function Le(e, t) {
|
|
1507
|
-
return
|
|
1507
|
+
return Kt(e, t) || e.state.dataUpdatedAt > 0 && me(e, t, t.refetchOnMount);
|
|
1508
1508
|
}
|
|
1509
1509
|
function me(e, t, s) {
|
|
1510
1510
|
if (t.enabled !== !1) {
|
|
@@ -1519,10 +1519,10 @@ function De(e, t, s, r) {
|
|
|
1519
1519
|
function _e(e, t) {
|
|
1520
1520
|
return e.isStaleByTime(t.staleTime);
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1522
|
+
function Vt(e, t, s) {
|
|
1523
1523
|
return s.keepPreviousData ? !1 : s.placeholderData !== void 0 ? t.isPlaceholderData : !re(e.getCurrentResult(), t);
|
|
1524
1524
|
}
|
|
1525
|
-
class
|
|
1525
|
+
class Gt extends G {
|
|
1526
1526
|
constructor(t, s) {
|
|
1527
1527
|
super(), this.client = t, this.setOptions(s), this.bindMethods(), this.updateResult();
|
|
1528
1528
|
}
|
|
@@ -1578,7 +1578,7 @@ class Vt extends V {
|
|
|
1578
1578
|
this.currentResult = s;
|
|
1579
1579
|
}
|
|
1580
1580
|
notify(t) {
|
|
1581
|
-
|
|
1581
|
+
O.batch(() => {
|
|
1582
1582
|
if (this.mutateOptions && this.hasListeners()) {
|
|
1583
1583
|
if (t.onSuccess) {
|
|
1584
1584
|
var s, r, i, a;
|
|
@@ -1606,11 +1606,11 @@ var Xe = { exports: {} }, Ie = {};
|
|
|
1606
1606
|
* This source code is licensed under the MIT license found in the
|
|
1607
1607
|
* LICENSE file in the root directory of this source tree.
|
|
1608
1608
|
*/
|
|
1609
|
-
var
|
|
1609
|
+
var V = d;
|
|
1610
1610
|
function $t(e, t) {
|
|
1611
1611
|
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
1612
1612
|
}
|
|
1613
|
-
var Wt = typeof Object.is == "function" ? Object.is : $t, Zt =
|
|
1613
|
+
var Wt = typeof Object.is == "function" ? Object.is : $t, Zt = V.useState, zt = V.useEffect, Yt = V.useLayoutEffect, Jt = V.useDebugValue;
|
|
1614
1614
|
function Xt(e, t) {
|
|
1615
1615
|
var s = t(), r = Zt({ inst: { value: s, getSnapshot: t } }), i = r[0].inst, a = r[1];
|
|
1616
1616
|
return Yt(function() {
|
|
@@ -1635,7 +1635,7 @@ function It(e, t) {
|
|
|
1635
1635
|
return t();
|
|
1636
1636
|
}
|
|
1637
1637
|
var Bt = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? It : Xt;
|
|
1638
|
-
Ie.useSyncExternalStore =
|
|
1638
|
+
Ie.useSyncExternalStore = V.useSyncExternalStore !== void 0 ? V.useSyncExternalStore : Bt;
|
|
1639
1639
|
Xe.exports = Ie;
|
|
1640
1640
|
var es = Xe.exports;
|
|
1641
1641
|
const Be = es.useSyncExternalStore, Te = /* @__PURE__ */ d.createContext(void 0), et = /* @__PURE__ */ d.createContext(!1);
|
|
@@ -1706,11 +1706,11 @@ function fs(e, t) {
|
|
|
1706
1706
|
const s = st({
|
|
1707
1707
|
context: e.context
|
|
1708
1708
|
}), r = ss(), i = is(), a = s.defaultQueryOptions(e);
|
|
1709
|
-
a._optimisticResults = r ? "isRestoring" : "optimistic", a.onError && (a.onError =
|
|
1709
|
+
a._optimisticResults = r ? "isRestoring" : "optimistic", a.onError && (a.onError = O.batchCalls(a.onError)), a.onSuccess && (a.onSuccess = O.batchCalls(a.onSuccess)), a.onSettled && (a.onSettled = O.batchCalls(a.onSettled)), cs(a), as(a, i), os(i);
|
|
1710
1710
|
const [o] = d.useState(() => new t(s, a)), l = o.getOptimisticResult(a);
|
|
1711
1711
|
if (Be(d.useCallback((c) => {
|
|
1712
1712
|
const h = r ? () => {
|
|
1713
|
-
} : o.subscribe(
|
|
1713
|
+
} : o.subscribe(O.batchCalls(c));
|
|
1714
1714
|
return o.updateResult(), h;
|
|
1715
1715
|
}, [o, r]), () => o.getCurrentResult(), () => o.getCurrentResult()), d.useEffect(() => {
|
|
1716
1716
|
o.setOptions(a, {
|
|
@@ -1729,16 +1729,16 @@ function fs(e, t) {
|
|
|
1729
1729
|
}
|
|
1730
1730
|
function it(e, t, s) {
|
|
1731
1731
|
const r = J(e, t, s);
|
|
1732
|
-
return fs(r,
|
|
1732
|
+
return fs(r, Ht);
|
|
1733
1733
|
}
|
|
1734
1734
|
function ps(e, t, s) {
|
|
1735
1735
|
const r = Rt(e, t, s), i = st({
|
|
1736
1736
|
context: r.context
|
|
1737
|
-
}), [a] = d.useState(() => new
|
|
1737
|
+
}), [a] = d.useState(() => new Gt(i, r));
|
|
1738
1738
|
d.useEffect(() => {
|
|
1739
1739
|
a.setOptions(r);
|
|
1740
1740
|
}, [a, r]);
|
|
1741
|
-
const o = Be(d.useCallback((c) => a.subscribe(
|
|
1741
|
+
const o = Be(d.useCallback((c) => a.subscribe(O.batchCalls(c)), [a]), () => a.getCurrentResult(), () => a.getCurrentResult()), l = d.useCallback((c, h) => {
|
|
1742
1742
|
a.mutate(c, h).catch(vs);
|
|
1743
1743
|
}, [a]);
|
|
1744
1744
|
if (o.error && nt(a.options.useErrorBoundary, [o.error]))
|
|
@@ -1769,14 +1769,14 @@ function R() {
|
|
|
1769
1769
|
(e = arguments[s++]) && (t = at(e)) && (r && (r += " "), r += t);
|
|
1770
1770
|
return r;
|
|
1771
1771
|
}
|
|
1772
|
-
var ms = Object.defineProperty, ys = Object.defineProperties,
|
|
1772
|
+
var ms = Object.defineProperty, ys = Object.defineProperties, Cs = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, ot = Object.prototype.hasOwnProperty, lt = Object.prototype.propertyIsEnumerable, Ue = (e, t, s) => t in e ? ms(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, g = (e, t) => {
|
|
1773
1773
|
for (var s in t || (t = {}))
|
|
1774
1774
|
ot.call(t, s) && Ue(e, s, t[s]);
|
|
1775
1775
|
if (ae)
|
|
1776
1776
|
for (var s of ae(t))
|
|
1777
1777
|
lt.call(t, s) && Ue(e, s, t[s]);
|
|
1778
1778
|
return e;
|
|
1779
|
-
}, E = (e, t) => ys(e,
|
|
1779
|
+
}, E = (e, t) => ys(e, Cs(t)), A = (e, t) => {
|
|
1780
1780
|
var s = {};
|
|
1781
1781
|
for (var r in e)
|
|
1782
1782
|
ot.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
|
|
@@ -1795,16 +1795,16 @@ function oe() {
|
|
|
1795
1795
|
return e;
|
|
1796
1796
|
}, oe.apply(this, arguments);
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function gs(e, t) {
|
|
1799
1799
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1800
1800
|
}
|
|
1801
1801
|
function xs(...e) {
|
|
1802
1802
|
return (t) => e.forEach(
|
|
1803
|
-
(s) =>
|
|
1803
|
+
(s) => gs(s, t)
|
|
1804
1804
|
);
|
|
1805
1805
|
}
|
|
1806
1806
|
var bs = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
1807
|
-
const s = e, { children: r } = s, i =
|
|
1807
|
+
const s = e, { children: r } = s, i = A(s, ["children"]), a = d.Children.toArray(r), o = a.find(js);
|
|
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(ye, oe({}, i, {
|
|
@@ -1817,8 +1817,8 @@ var bs = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
|
1817
1817
|
});
|
|
1818
1818
|
bs.displayName = "Slot";
|
|
1819
1819
|
var ye = /* @__PURE__ */ d.forwardRef((e, t) => {
|
|
1820
|
-
const s = e, { children: r } = s, i =
|
|
1821
|
-
return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, E(
|
|
1820
|
+
const s = e, { children: r } = s, i = A(s, ["children"]);
|
|
1821
|
+
return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, E(g({}, _s(i, r.props)), {
|
|
1822
1822
|
ref: t ? xs(t, r.ref) : r.ref
|
|
1823
1823
|
})) : d.Children.count(r) > 1 ? d.Children.only(null) : null;
|
|
1824
1824
|
});
|
|
@@ -1828,17 +1828,17 @@ function js(e) {
|
|
|
1828
1828
|
return /* @__PURE__ */ d.isValidElement(e) && e.type === ws;
|
|
1829
1829
|
}
|
|
1830
1830
|
function _s(e, t) {
|
|
1831
|
-
const s =
|
|
1831
|
+
const s = g({}, 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] = g(g({}, i), a) : r === "className" && (s[r] = [
|
|
1837
1837
|
i,
|
|
1838
1838
|
a
|
|
1839
1839
|
].filter(Boolean).join(" "));
|
|
1840
1840
|
}
|
|
1841
|
-
return
|
|
1841
|
+
return g(g({}, e), s);
|
|
1842
1842
|
}
|
|
1843
1843
|
var Ss = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
1844
1844
|
const r = `${e.charAt(0)}${t.charAt(0)}`;
|
|
@@ -1861,7 +1861,7 @@ var Ss = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1861
1861
|
variant: l,
|
|
1862
1862
|
className: c,
|
|
1863
1863
|
children: h
|
|
1864
|
-
} = s, u =
|
|
1864
|
+
} = s, u = A(s, [
|
|
1865
1865
|
"iconLeft",
|
|
1866
1866
|
"iconRight",
|
|
1867
1867
|
"isPending",
|
|
@@ -1873,7 +1873,7 @@ var Ss = ({ firstName: e, lastName: t, variant: s = "small" }) => {
|
|
|
1873
1873
|
const f = !!r || !!i;
|
|
1874
1874
|
return /* @__PURE__ */ n.jsxs(
|
|
1875
1875
|
"button",
|
|
1876
|
-
E(
|
|
1876
|
+
E(g({
|
|
1877
1877
|
ref: t
|
|
1878
1878
|
}, u), {
|
|
1879
1879
|
className: R(
|
|
@@ -1897,12 +1897,12 @@ $.displayName = "Button";
|
|
|
1897
1897
|
d.createContext(void 0);
|
|
1898
1898
|
var Es = d.forwardRef(
|
|
1899
1899
|
(e, t) => {
|
|
1900
|
-
var s = e, { prefix: r, suffix: i, className: a } = s, o =
|
|
1900
|
+
var s = e, { prefix: r, suffix: i, className: a } = s, o = A(s, ["prefix", "suffix", "className"]);
|
|
1901
1901
|
return /* @__PURE__ */ n.jsxs("div", { className: "input__wrapper", children: [
|
|
1902
1902
|
r && /* @__PURE__ */ n.jsx("span", { className: "input__prefix", children: r }),
|
|
1903
1903
|
/* @__PURE__ */ n.jsx(
|
|
1904
1904
|
"input",
|
|
1905
|
-
|
|
1905
|
+
g({
|
|
1906
1906
|
ref: t,
|
|
1907
1907
|
className: R(
|
|
1908
1908
|
"input",
|
|
@@ -1919,11 +1919,11 @@ var Es = d.forwardRef(
|
|
|
1919
1919
|
Es.displayName = "TextField";
|
|
1920
1920
|
d.createContext(void 0);
|
|
1921
1921
|
var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__header__action", children: e }), Rs = (e) => {
|
|
1922
|
-
var t = e, { children: s } = t, r =
|
|
1923
|
-
return /* @__PURE__ */ n.jsx("div", E(
|
|
1924
|
-
},
|
|
1922
|
+
var t = e, { children: s } = t, r = A(t, ["children"]);
|
|
1923
|
+
return /* @__PURE__ */ n.jsx("div", E(g({ className: "card__body" }, r), { children: s }));
|
|
1924
|
+
}, Os = (e) => /* @__PURE__ */ n.jsx(
|
|
1925
1925
|
"svg",
|
|
1926
|
-
E(
|
|
1926
|
+
E(g({
|
|
1927
1927
|
width: "24",
|
|
1928
1928
|
height: "24",
|
|
1929
1929
|
viewBox: "0 0 24 24",
|
|
@@ -1941,9 +1941,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1941
1941
|
}
|
|
1942
1942
|
)
|
|
1943
1943
|
})
|
|
1944
|
-
), Se =
|
|
1944
|
+
), Se = Os, As = (e) => /* @__PURE__ */ n.jsx(
|
|
1945
1945
|
"svg",
|
|
1946
|
-
E(
|
|
1946
|
+
E(g({
|
|
1947
1947
|
width: "24",
|
|
1948
1948
|
height: "24",
|
|
1949
1949
|
viewBox: "0 0 24 24",
|
|
@@ -1961,9 +1961,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1961
1961
|
}
|
|
1962
1962
|
)
|
|
1963
1963
|
})
|
|
1964
|
-
),
|
|
1964
|
+
), ks = As, Fs = (e) => /* @__PURE__ */ n.jsx(
|
|
1965
1965
|
"svg",
|
|
1966
|
-
E(
|
|
1966
|
+
E(g({
|
|
1967
1967
|
width: "24",
|
|
1968
1968
|
height: "24",
|
|
1969
1969
|
viewBox: "0 0 24 24",
|
|
@@ -1980,9 +1980,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1980
1980
|
}
|
|
1981
1981
|
)
|
|
1982
1982
|
})
|
|
1983
|
-
),
|
|
1983
|
+
), Ns = Fs, Ms = (e) => /* @__PURE__ */ n.jsx(
|
|
1984
1984
|
"svg",
|
|
1985
|
-
E(
|
|
1985
|
+
E(g({
|
|
1986
1986
|
width: "24",
|
|
1987
1987
|
height: "24",
|
|
1988
1988
|
viewBox: "0 0 24 24",
|
|
@@ -1999,9 +1999,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
1999
1999
|
}
|
|
2000
2000
|
)
|
|
2001
2001
|
})
|
|
2002
|
-
), Ls =
|
|
2002
|
+
), Ls = Ms, Ds = (e) => /* @__PURE__ */ n.jsx(
|
|
2003
2003
|
"svg",
|
|
2004
|
-
E(
|
|
2004
|
+
E(g({
|
|
2005
2005
|
width: "24",
|
|
2006
2006
|
height: "24",
|
|
2007
2007
|
viewBox: "0 0 24 24",
|
|
@@ -2020,7 +2020,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2020
2020
|
})
|
|
2021
2021
|
), Ts = Ds, Us = (e) => /* @__PURE__ */ n.jsxs(
|
|
2022
2022
|
"svg",
|
|
2023
|
-
E(
|
|
2023
|
+
E(g({
|
|
2024
2024
|
width: "24",
|
|
2025
2025
|
height: "24",
|
|
2026
2026
|
fill: "none",
|
|
@@ -2057,7 +2057,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2057
2057
|
})
|
|
2058
2058
|
), Qs = Us, qs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2059
2059
|
"svg",
|
|
2060
|
-
E(
|
|
2060
|
+
E(g({
|
|
2061
2061
|
width: "24",
|
|
2062
2062
|
height: "24",
|
|
2063
2063
|
viewBox: "0 0 24 24",
|
|
@@ -2087,9 +2087,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2087
2087
|
)
|
|
2088
2088
|
]
|
|
2089
2089
|
})
|
|
2090
|
-
),
|
|
2090
|
+
), Hs = qs, Ks = (e) => /* @__PURE__ */ n.jsxs(
|
|
2091
2091
|
"svg",
|
|
2092
|
-
E(
|
|
2092
|
+
E(g({
|
|
2093
2093
|
width: "24",
|
|
2094
2094
|
height: "24",
|
|
2095
2095
|
viewBox: "0 0 24 24",
|
|
@@ -2139,9 +2139,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2139
2139
|
)
|
|
2140
2140
|
]
|
|
2141
2141
|
})
|
|
2142
|
-
),
|
|
2142
|
+
), Vs = Ks, Gs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2143
2143
|
"svg",
|
|
2144
|
-
E(
|
|
2144
|
+
E(g({
|
|
2145
2145
|
width: "20",
|
|
2146
2146
|
height: "21",
|
|
2147
2147
|
fill: "none",
|
|
@@ -2163,9 +2163,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2163
2163
|
)
|
|
2164
2164
|
]
|
|
2165
2165
|
})
|
|
2166
|
-
), $s =
|
|
2166
|
+
), $s = Gs, Ws = (e) => /* @__PURE__ */ n.jsxs(
|
|
2167
2167
|
"svg",
|
|
2168
|
-
E(
|
|
2168
|
+
E(g({
|
|
2169
2169
|
width: "24",
|
|
2170
2170
|
height: "24",
|
|
2171
2171
|
fill: "none",
|
|
@@ -2201,7 +2201,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2201
2201
|
const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
|
|
2202
2202
|
return /* @__PURE__ */ n.jsxs(
|
|
2203
2203
|
"svg",
|
|
2204
|
-
E(
|
|
2204
|
+
E(g({
|
|
2205
2205
|
width: "24",
|
|
2206
2206
|
height: "24",
|
|
2207
2207
|
viewBox: "0 0 24 24",
|
|
@@ -2368,9 +2368,71 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2368
2368
|
]
|
|
2369
2369
|
})
|
|
2370
2370
|
);
|
|
2371
|
-
}, Ee = zs, Ys = (e) => /* @__PURE__ */ n.
|
|
2371
|
+
}, Ee = zs, Ys = (e) => /* @__PURE__ */ n.jsxs(
|
|
2372
2372
|
"svg",
|
|
2373
|
-
E(
|
|
2373
|
+
E(g({
|
|
2374
|
+
fill: "none",
|
|
2375
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2376
|
+
viewBox: "0 0 24 24",
|
|
2377
|
+
width: "24",
|
|
2378
|
+
height: "24"
|
|
2379
|
+
}, e), {
|
|
2380
|
+
children: [
|
|
2381
|
+
/* @__PURE__ */ n.jsx(
|
|
2382
|
+
"path",
|
|
2383
|
+
{
|
|
2384
|
+
d: "M16 3H8C5.23858 3 3 5.23858 3 8V16C3 18.7614 5.23858 21 8 21H16C18.7614 21 21 18.7614 21 16V8C21 5.23858 18.7614 3 16 3Z",
|
|
2385
|
+
stroke: "currentColor",
|
|
2386
|
+
strokeWidth: "1.5",
|
|
2387
|
+
strokeLinecap: "round",
|
|
2388
|
+
strokeLinejoin: "round"
|
|
2389
|
+
}
|
|
2390
|
+
),
|
|
2391
|
+
/* @__PURE__ */ n.jsx(
|
|
2392
|
+
"path",
|
|
2393
|
+
{
|
|
2394
|
+
d: "M12.001 11.258C12.001 8.906 13.634 7 15.648 7C16.515 7 17.218 7.703 17.218 8.57C17.218 10.464 14.881 12 11.999 12C9.117 12 6.78 10.465 6.78 8.57C6.78 7.703 7.483 7 8.351 7C10.365 7 11.998 8.906 11.998 11.258",
|
|
2395
|
+
stroke: "currentColor",
|
|
2396
|
+
strokeWidth: "1.5",
|
|
2397
|
+
strokeLinecap: "round",
|
|
2398
|
+
strokeLinejoin: "round"
|
|
2399
|
+
}
|
|
2400
|
+
),
|
|
2401
|
+
/* @__PURE__ */ n.jsx(
|
|
2402
|
+
"path",
|
|
2403
|
+
{
|
|
2404
|
+
d: "M8 15.854C10.208 15.854 11.998 13.764 11.998 11.186L12.002 11.2C12.002 13.778 13.792 15.868 16 15.868",
|
|
2405
|
+
stroke: "currentColor",
|
|
2406
|
+
strokeWidth: "1.5",
|
|
2407
|
+
strokeLinecap: "round",
|
|
2408
|
+
strokeLinejoin: "round"
|
|
2409
|
+
}
|
|
2410
|
+
),
|
|
2411
|
+
/* @__PURE__ */ n.jsx(
|
|
2412
|
+
"path",
|
|
2413
|
+
{
|
|
2414
|
+
d: "M12 3V21",
|
|
2415
|
+
stroke: "currentColor",
|
|
2416
|
+
strokeWidth: "1.5",
|
|
2417
|
+
strokeLinecap: "round",
|
|
2418
|
+
strokeLinejoin: "round"
|
|
2419
|
+
}
|
|
2420
|
+
),
|
|
2421
|
+
/* @__PURE__ */ n.jsx(
|
|
2422
|
+
"path",
|
|
2423
|
+
{
|
|
2424
|
+
d: "M21 12H3",
|
|
2425
|
+
stroke: "currentColor",
|
|
2426
|
+
strokeWidth: "1.5",
|
|
2427
|
+
strokeLinecap: "round",
|
|
2428
|
+
strokeLinejoin: "round"
|
|
2429
|
+
}
|
|
2430
|
+
)
|
|
2431
|
+
]
|
|
2432
|
+
})
|
|
2433
|
+
), Js = Ys, Xs = (e) => /* @__PURE__ */ n.jsx(
|
|
2434
|
+
"svg",
|
|
2435
|
+
E(g({
|
|
2374
2436
|
fill: "none",
|
|
2375
2437
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2376
2438
|
viewBox: "0 0 21 16",
|
|
@@ -2388,9 +2450,9 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2388
2450
|
}
|
|
2389
2451
|
)
|
|
2390
2452
|
})
|
|
2391
|
-
),
|
|
2453
|
+
), Is = Xs, Bs = (e) => /* @__PURE__ */ n.jsxs(
|
|
2392
2454
|
"svg",
|
|
2393
|
-
E(
|
|
2455
|
+
E(g({
|
|
2394
2456
|
width: "24",
|
|
2395
2457
|
height: "24",
|
|
2396
2458
|
fill: "none",
|
|
@@ -2415,7 +2477,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2415
2477
|
/* @__PURE__ */ n.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
|
|
2416
2478
|
]
|
|
2417
2479
|
})
|
|
2418
|
-
),
|
|
2480
|
+
), er = Bs, tr = (e) => {
|
|
2419
2481
|
var t = e, {
|
|
2420
2482
|
variant: s,
|
|
2421
2483
|
icon: r,
|
|
@@ -2423,7 +2485,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2423
2485
|
title: a,
|
|
2424
2486
|
description: o,
|
|
2425
2487
|
className: l
|
|
2426
|
-
} = t, c =
|
|
2488
|
+
} = t, c = A(t, [
|
|
2427
2489
|
"variant",
|
|
2428
2490
|
"icon",
|
|
2429
2491
|
"isStandalone",
|
|
@@ -2433,7 +2495,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2433
2495
|
]);
|
|
2434
2496
|
return /* @__PURE__ */ n.jsx(
|
|
2435
2497
|
"div",
|
|
2436
|
-
E(
|
|
2498
|
+
E(g({}, c), {
|
|
2437
2499
|
className: R(
|
|
2438
2500
|
"card__empty-state",
|
|
2439
2501
|
s === "error" && "card__empty-state--error",
|
|
@@ -2449,13 +2511,13 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2449
2511
|
] })
|
|
2450
2512
|
})
|
|
2451
2513
|
);
|
|
2452
|
-
},
|
|
2514
|
+
}, sr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__footer", children: e }), rr = (e) => {
|
|
2453
2515
|
var t = e, {
|
|
2454
2516
|
variant: s = "default",
|
|
2455
2517
|
sticky: r,
|
|
2456
2518
|
className: i,
|
|
2457
2519
|
children: a
|
|
2458
|
-
} = t, o =
|
|
2520
|
+
} = t, o = A(t, [
|
|
2459
2521
|
"variant",
|
|
2460
2522
|
"sticky",
|
|
2461
2523
|
"className",
|
|
@@ -2463,7 +2525,7 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2463
2525
|
]);
|
|
2464
2526
|
return /* @__PURE__ */ n.jsx(
|
|
2465
2527
|
"div",
|
|
2466
|
-
E(
|
|
2528
|
+
E(g({}, o), {
|
|
2467
2529
|
className: R(
|
|
2468
2530
|
"card__header",
|
|
2469
2531
|
s && `card__header--${s}`,
|
|
@@ -2473,15 +2535,15 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2473
2535
|
children: a
|
|
2474
2536
|
})
|
|
2475
2537
|
);
|
|
2476
|
-
},
|
|
2538
|
+
}, nr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: e }), ir = ({ children: e, className: t }) => /* @__PURE__ */ n.jsx("div", { className: R("card__body__item", t), children: e }), ar = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__body__subtitle", children: e }), or = ({ icon: e, children: t }) => /* @__PURE__ */ n.jsxs("div", { className: "card__header__title", children: [
|
|
2477
2539
|
e && /* @__PURE__ */ n.jsx("span", { className: "card__header__title__icon", children: e }),
|
|
2478
2540
|
t
|
|
2479
2541
|
] }), ct = d.forwardRef(
|
|
2480
2542
|
(e, t) => {
|
|
2481
|
-
var s = e, { type: r, children: i, className: a, variant: o = "default", disabled: l = !1 } = s, c =
|
|
2543
|
+
var s = e, { type: r, children: i, className: a, variant: o = "default", disabled: l = !1 } = s, c = A(s, ["type", "children", "className", "variant", "disabled"]);
|
|
2482
2544
|
return d.createElement(
|
|
2483
2545
|
r,
|
|
2484
|
-
|
|
2546
|
+
g({
|
|
2485
2547
|
className: R(
|
|
2486
2548
|
"card",
|
|
2487
2549
|
l && "card--disabled",
|
|
@@ -2496,32 +2558,32 @@ var Ps = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
|
|
|
2496
2558
|
);
|
|
2497
2559
|
ct.displayName = "Card";
|
|
2498
2560
|
Object.assign(ct, {
|
|
2499
|
-
Header:
|
|
2561
|
+
Header: rr,
|
|
2500
2562
|
Action: Ps,
|
|
2501
|
-
Title:
|
|
2502
|
-
Subtitle:
|
|
2563
|
+
Title: or,
|
|
2564
|
+
Subtitle: ar,
|
|
2503
2565
|
Body: Rs,
|
|
2504
|
-
Image:
|
|
2505
|
-
Item:
|
|
2506
|
-
Footer:
|
|
2507
|
-
EmptyState:
|
|
2566
|
+
Image: nr,
|
|
2567
|
+
Item: ir,
|
|
2568
|
+
Footer: sr,
|
|
2569
|
+
EmptyState: tr
|
|
2508
2570
|
});
|
|
2509
|
-
var
|
|
2510
|
-
var t = e, { className: s, children: r } = t, i =
|
|
2511
|
-
return /* @__PURE__ */ n.jsx("div", E(
|
|
2512
|
-
},
|
|
2513
|
-
var t = e, { className: s, children: r } = t, i =
|
|
2514
|
-
return /* @__PURE__ */ n.jsx("span", E(
|
|
2515
|
-
}, ut = d.createContext(void 0),
|
|
2571
|
+
var lr = (e) => {
|
|
2572
|
+
var t = e, { className: s, children: r } = t, i = A(t, ["className", "children"]);
|
|
2573
|
+
return /* @__PURE__ */ n.jsx("div", E(g({ className: R("checkbox__content", s) }, i), { children: r }));
|
|
2574
|
+
}, cr = (e) => {
|
|
2575
|
+
var t = e, { className: s, children: r } = t, i = A(t, ["className", "children"]);
|
|
2576
|
+
return /* @__PURE__ */ n.jsx("span", E(g({ className: R("checkbox__hint", s) }, i), { children: r }));
|
|
2577
|
+
}, ut = d.createContext(void 0), ur = ({ id: e, name: t, children: s }) => /* @__PURE__ */ n.jsx(ut.Provider, { value: { id: e, name: t }, children: s }), dr = () => {
|
|
2516
2578
|
const e = d.useContext(ut);
|
|
2517
2579
|
if (!e)
|
|
2518
2580
|
throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
|
|
2519
2581
|
return e;
|
|
2520
|
-
},
|
|
2521
|
-
var t = e, { className: s, children: r } = t, i =
|
|
2522
|
-
const { id: a } =
|
|
2523
|
-
return /* @__PURE__ */ n.jsx("label", E(
|
|
2524
|
-
},
|
|
2582
|
+
}, hr = (e) => {
|
|
2583
|
+
var t = e, { className: s, children: r } = t, i = A(t, ["className", "children"]);
|
|
2584
|
+
const { id: a } = dr();
|
|
2585
|
+
return /* @__PURE__ */ n.jsx("label", E(g({ htmlFor: a, className: R("checkbox__label", s) }, i), { children: r }));
|
|
2586
|
+
}, q = (e) => {
|
|
2525
2587
|
var t = e, {
|
|
2526
2588
|
id: s,
|
|
2527
2589
|
name: r,
|
|
@@ -2531,7 +2593,7 @@ var ar = (e) => {
|
|
|
2531
2593
|
single: l,
|
|
2532
2594
|
className: c,
|
|
2533
2595
|
children: h
|
|
2534
|
-
} = t, u =
|
|
2596
|
+
} = t, u = A(t, [
|
|
2535
2597
|
"id",
|
|
2536
2598
|
"name",
|
|
2537
2599
|
"isPending",
|
|
@@ -2551,7 +2613,7 @@ var ar = (e) => {
|
|
|
2551
2613
|
children: [
|
|
2552
2614
|
/* @__PURE__ */ n.jsx(
|
|
2553
2615
|
"input",
|
|
2554
|
-
|
|
2616
|
+
g({
|
|
2555
2617
|
id: s,
|
|
2556
2618
|
name: r,
|
|
2557
2619
|
type: "checkbox",
|
|
@@ -2560,32 +2622,32 @@ var ar = (e) => {
|
|
|
2560
2622
|
value: l ? "true" : ""
|
|
2561
2623
|
}, u)
|
|
2562
2624
|
),
|
|
2563
|
-
i ? /* @__PURE__ */ n.jsx($s, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(
|
|
2564
|
-
/* @__PURE__ */ n.jsx(
|
|
2625
|
+
i ? /* @__PURE__ */ n.jsx($s, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(ks, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
|
|
2626
|
+
/* @__PURE__ */ n.jsx(ur, { id: s, name: r, children: h })
|
|
2565
2627
|
]
|
|
2566
2628
|
}
|
|
2567
2629
|
);
|
|
2568
2630
|
};
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
var
|
|
2574
|
-
var t = e, { type: s = "div", className: r, children: i } = t, a =
|
|
2575
|
-
return d.createElement(s,
|
|
2576
|
-
},
|
|
2577
|
-
var t = e, { className: s, children: r, shouldAnimate: i = !0 } = t, a =
|
|
2631
|
+
q.Content = lr;
|
|
2632
|
+
q.Label = hr;
|
|
2633
|
+
q.Hint = cr;
|
|
2634
|
+
q.Error = Error;
|
|
2635
|
+
var fr = (e) => {
|
|
2636
|
+
var t = e, { type: s = "div", className: r, children: i } = t, a = A(t, ["type", "className", "children"]);
|
|
2637
|
+
return d.createElement(s, g({ className: R("dialog__body", r) }, a), i);
|
|
2638
|
+
}, Ce = () => document.body.style.removeProperty("overflow"), Qe = (e) => e.preventDefault(), pr = '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])', vr = (e) => {
|
|
2639
|
+
var t = e, { className: s, children: r, shouldAnimate: i = !0 } = t, a = A(t, ["className", "children", "shouldAnimate"]);
|
|
2578
2640
|
const { ref: o, defaultOpen: l, isModal: c, onClose: h } = B();
|
|
2579
2641
|
return d.useEffect(() => {
|
|
2580
2642
|
const u = o == null ? void 0 : o.current;
|
|
2581
2643
|
if (u != null && u.open) {
|
|
2582
|
-
const f = u.querySelectorAll(
|
|
2644
|
+
const f = u.querySelectorAll(pr), v = f[0], p = f[f.length - 1], y = (x) => {
|
|
2583
2645
|
if (!(x.key === "Tab"))
|
|
2584
2646
|
return;
|
|
2585
2647
|
x.shiftKey ? document.activeElement === v && (p.focus(), x.preventDefault()) : document.activeElement === p && (v.focus(), x.preventDefault());
|
|
2586
2648
|
};
|
|
2587
|
-
return document.body.style.overflow = "hidden", u.addEventListener("keydown", y), window.addEventListener("popstate", () =>
|
|
2588
|
-
u.removeEventListener("keydown", y), window.removeEventListener("popstate", () =>
|
|
2649
|
+
return document.body.style.overflow = "hidden", u.addEventListener("keydown", y), window.addEventListener("popstate", () => Ce()), () => {
|
|
2650
|
+
u.removeEventListener("keydown", y), window.removeEventListener("popstate", () => Ce());
|
|
2589
2651
|
};
|
|
2590
2652
|
}
|
|
2591
2653
|
}, [o]), d.useEffect(() => {
|
|
@@ -2595,7 +2657,7 @@ var dr = (e) => {
|
|
|
2595
2657
|
if (l && (u.removeAttribute("open"), u.showModal(), u.focus()), c)
|
|
2596
2658
|
return u.addEventListener("cancel", Qe), () => u.removeEventListener("cancel", Qe);
|
|
2597
2659
|
const f = ({ clientX: v, clientY: p }) => {
|
|
2598
|
-
const { top: y, right: x, bottom: m, left:
|
|
2660
|
+
const { top: y, right: x, bottom: m, left: C } = u.getBoundingClientRect(), _ = 0 < p && 0 < v, w = y < p && p < m, P = C < v && v < x;
|
|
2599
2661
|
_ && !(w && P) && h();
|
|
2600
2662
|
};
|
|
2601
2663
|
return u.addEventListener("cancel", h), u.addEventListener("mousedown", f), () => {
|
|
@@ -2603,7 +2665,7 @@ var dr = (e) => {
|
|
|
2603
2665
|
};
|
|
2604
2666
|
}, [o, c, h, l]), /* @__PURE__ */ n.jsx(
|
|
2605
2667
|
"dialog",
|
|
2606
|
-
E(
|
|
2668
|
+
E(g({
|
|
2607
2669
|
ref: o,
|
|
2608
2670
|
open: l,
|
|
2609
2671
|
"aria-modal": !!c,
|
|
@@ -2613,10 +2675,10 @@ var dr = (e) => {
|
|
|
2613
2675
|
children: r
|
|
2614
2676
|
})
|
|
2615
2677
|
);
|
|
2616
|
-
}, dt = d.createContext(void 0),
|
|
2678
|
+
}, dt = d.createContext(void 0), mr = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
|
|
2617
2679
|
const i = d.useRef(null), a = d.useRef(t), o = d.useCallback(() => {
|
|
2618
2680
|
var l;
|
|
2619
|
-
|
|
2681
|
+
Ce(), (l = i.current) == null || l.close(), a.current && (a == null || a.current());
|
|
2620
2682
|
}, [i]);
|
|
2621
2683
|
return /* @__PURE__ */ n.jsx(dt.Provider, { value: { ref: i, defaultOpen: e, isModal: s, onClose: o }, children: r });
|
|
2622
2684
|
}, B = () => {
|
|
@@ -2624,38 +2686,38 @@ var dr = (e) => {
|
|
|
2624
2686
|
if (!e)
|
|
2625
2687
|
throw new Error("Dialog compound components can not be rendered outside of Dialog");
|
|
2626
2688
|
return e;
|
|
2627
|
-
},
|
|
2628
|
-
var t = e, { children: s } = t, r =
|
|
2689
|
+
}, yr = (e) => {
|
|
2690
|
+
var t = e, { children: s } = t, r = A(t, ["children"]);
|
|
2629
2691
|
const { onClose: i } = B();
|
|
2630
|
-
return /* @__PURE__ */ n.jsx($, E(
|
|
2692
|
+
return /* @__PURE__ */ n.jsx($, E(g({ onClick: i }, r), { children: s }));
|
|
2631
2693
|
}, ht = d.forwardRef((e, t) => {
|
|
2632
|
-
var s = e, { className: r } = s, i =
|
|
2694
|
+
var s = e, { className: r } = s, i = A(s, ["className"]);
|
|
2633
2695
|
const { onClose: a } = B();
|
|
2634
2696
|
return /* @__PURE__ */ n.jsx(
|
|
2635
2697
|
$,
|
|
2636
|
-
|
|
2698
|
+
g({
|
|
2637
2699
|
type: "submit",
|
|
2638
2700
|
ref: t,
|
|
2639
2701
|
formMethod: "dialog",
|
|
2640
2702
|
onClick: a,
|
|
2641
|
-
iconLeft: /* @__PURE__ */ n.jsx(
|
|
2703
|
+
iconLeft: /* @__PURE__ */ n.jsx(Ns, {}),
|
|
2642
2704
|
variant: "icon--secondary",
|
|
2643
2705
|
className: R("dialog__close button--icon", r)
|
|
2644
2706
|
}, i)
|
|
2645
2707
|
);
|
|
2646
2708
|
});
|
|
2647
2709
|
ht.displayName = "Close";
|
|
2648
|
-
var
|
|
2649
|
-
var t = e, { className: s, children: r } = t, i =
|
|
2650
|
-
return /* @__PURE__ */ n.jsx("div", E(
|
|
2651
|
-
},
|
|
2652
|
-
var t = e, { icon: s, children: r, className: i } = t, a =
|
|
2710
|
+
var Cr = (e) => {
|
|
2711
|
+
var t = e, { className: s, children: r } = t, i = A(t, ["className", "children"]);
|
|
2712
|
+
return /* @__PURE__ */ n.jsx("div", E(g({ className: R("dialog__footer", s) }, i), { children: r }));
|
|
2713
|
+
}, gr = ({ children: e }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: e }), xr = (e) => {
|
|
2714
|
+
var t = e, { icon: s, children: r, className: i } = t, a = A(t, ["icon", "children", "className"]);
|
|
2653
2715
|
const { ref: o } = B(), l = d.useRef(null);
|
|
2654
2716
|
return d.useEffect(() => {
|
|
2655
2717
|
o != null && o.current && o.current.focus();
|
|
2656
2718
|
}, [o]), /* @__PURE__ */ n.jsxs(
|
|
2657
2719
|
"div",
|
|
2658
|
-
E(
|
|
2720
|
+
E(g({
|
|
2659
2721
|
tabIndex: 0,
|
|
2660
2722
|
ref: l,
|
|
2661
2723
|
id: "dialogTitle",
|
|
@@ -2667,23 +2729,23 @@ var mr = (e) => {
|
|
|
2667
2729
|
]
|
|
2668
2730
|
})
|
|
2669
2731
|
);
|
|
2670
|
-
},
|
|
2671
|
-
var t = e, { children: s } = t, r =
|
|
2732
|
+
}, br = (e) => {
|
|
2733
|
+
var t = e, { children: s } = t, r = A(t, ["children"]);
|
|
2672
2734
|
const { ref: i } = B();
|
|
2673
|
-
return /* @__PURE__ */ n.jsx($, E(
|
|
2735
|
+
return /* @__PURE__ */ n.jsx($, E(g({ onClick: () => {
|
|
2674
2736
|
var a;
|
|
2675
2737
|
return (a = i == null ? void 0 : i.current) == null ? void 0 : a.showModal();
|
|
2676
2738
|
} }, r), { children: s }));
|
|
2677
|
-
},
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
var ft = d.createContext(void 0),
|
|
2739
|
+
}, F = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ n.jsx(mr, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
|
|
2740
|
+
F.Trigger = br;
|
|
2741
|
+
F.Root = vr;
|
|
2742
|
+
F.Title = xr;
|
|
2743
|
+
F.Header = gr;
|
|
2744
|
+
F.Body = fr;
|
|
2745
|
+
F.Footer = Cr;
|
|
2746
|
+
F.Button = yr;
|
|
2747
|
+
F.Close = ht;
|
|
2748
|
+
var ft = d.createContext(void 0), wr = ({
|
|
2687
2749
|
id: e,
|
|
2688
2750
|
position: t,
|
|
2689
2751
|
isOpen: s,
|
|
@@ -2715,7 +2777,7 @@ var ft = d.createContext(void 0), xr = ({
|
|
|
2715
2777
|
if (e === void 0)
|
|
2716
2778
|
throw new Error("useMenu must be used within a MenuProvider");
|
|
2717
2779
|
return e;
|
|
2718
|
-
},
|
|
2780
|
+
}, jr = ({ as: e, children: t }) => {
|
|
2719
2781
|
const {
|
|
2720
2782
|
id: s,
|
|
2721
2783
|
position: r,
|
|
@@ -2738,10 +2800,11 @@ var ft = d.createContext(void 0), xr = ({
|
|
|
2738
2800
|
case "ArrowLeft":
|
|
2739
2801
|
return v.preventDefault(), l(o ? Math.max(0, o - 1) : 0);
|
|
2740
2802
|
case "ArrowDown":
|
|
2741
|
-
case "ArrowRight":
|
|
2803
|
+
case "ArrowRight": {
|
|
2742
2804
|
v.preventDefault();
|
|
2743
2805
|
const x = o !== void 0 ? o + 1 : 0;
|
|
2744
2806
|
return l(Math.min(y, x));
|
|
2807
|
+
}
|
|
2745
2808
|
case "Home":
|
|
2746
2809
|
return v.preventDefault(), l(0);
|
|
2747
2810
|
case "End":
|
|
@@ -2770,9 +2833,9 @@ var ft = d.createContext(void 0), xr = ({
|
|
|
2770
2833
|
}
|
|
2771
2834
|
)
|
|
2772
2835
|
);
|
|
2773
|
-
},
|
|
2774
|
-
var t = e, { children: s, className: r } = t, i =
|
|
2775
|
-
return /* @__PURE__ */ n.jsx("li", E(
|
|
2836
|
+
}, _r = (e) => {
|
|
2837
|
+
var t = e, { children: s, className: r } = t, i = A(t, ["children", "className"]);
|
|
2838
|
+
return /* @__PURE__ */ n.jsx("li", E(g({}, i), { className: R("menu__list-item", r), children: s }));
|
|
2776
2839
|
}, vt = ({ children: e, className: t }) => {
|
|
2777
2840
|
const { id: s, isOpen: r, setIsOpen: i, clearActiveItemIndex: a, setActiveItemIndex: o, triggerRef: l } = pt(), c = () => {
|
|
2778
2841
|
a(), i((u) => !u);
|
|
@@ -2795,17 +2858,17 @@ var ft = d.createContext(void 0), xr = ({
|
|
|
2795
2858
|
};
|
|
2796
2859
|
vt.displayName = "Trigger";
|
|
2797
2860
|
var L = (e) => {
|
|
2798
|
-
var t = e, { type: s, id: r, position: i = "right", children: a, className: o } = t, l =
|
|
2861
|
+
var t = e, { type: s, id: r, position: i = "right", children: a, className: o } = t, l = A(t, ["type", "id", "position", "children", "className"]);
|
|
2799
2862
|
const c = d.useRef(null), h = d.useRef(null), u = d.useRef(null), [f, v] = d.useState(!1), [p, y] = d.useState(), [x, m] = d.useState(p);
|
|
2800
2863
|
p !== x && p !== void 0 && (u.current.children[p].firstChild.focus(), m(p));
|
|
2801
|
-
const
|
|
2864
|
+
const C = () => {
|
|
2802
2865
|
y(void 0), m(void 0);
|
|
2803
2866
|
}, _ = (w) => {
|
|
2804
2867
|
var P;
|
|
2805
|
-
((P = c.current) == null ? void 0 : P.contains(w.relatedTarget)) || (
|
|
2868
|
+
((P = c.current) == null ? void 0 : P.contains(w.relatedTarget)) || (C(), v(!1));
|
|
2806
2869
|
};
|
|
2807
2870
|
return /* @__PURE__ */ n.jsx(
|
|
2808
|
-
|
|
2871
|
+
wr,
|
|
2809
2872
|
{
|
|
2810
2873
|
id: r,
|
|
2811
2874
|
position: i,
|
|
@@ -2813,12 +2876,12 @@ var L = (e) => {
|
|
|
2813
2876
|
setIsOpen: v,
|
|
2814
2877
|
activeItemIndex: p,
|
|
2815
2878
|
setActiveItemIndex: y,
|
|
2816
|
-
clearActiveItemIndex:
|
|
2879
|
+
clearActiveItemIndex: C,
|
|
2817
2880
|
triggerRef: h,
|
|
2818
2881
|
contentRef: u,
|
|
2819
2882
|
children: d.createElement(
|
|
2820
2883
|
s,
|
|
2821
|
-
E(
|
|
2884
|
+
E(g({}, l), {
|
|
2822
2885
|
id: r,
|
|
2823
2886
|
ref: c,
|
|
2824
2887
|
className: `menu ${o || ""}`,
|
|
@@ -2830,28 +2893,28 @@ var L = (e) => {
|
|
|
2830
2893
|
);
|
|
2831
2894
|
};
|
|
2832
2895
|
L.Trigger = vt;
|
|
2833
|
-
L.Content =
|
|
2834
|
-
L.Item =
|
|
2896
|
+
L.Content = jr;
|
|
2897
|
+
L.Item = _r;
|
|
2835
2898
|
d.createContext(void 0);
|
|
2836
|
-
var
|
|
2837
|
-
[...new Set(
|
|
2899
|
+
var Sr = (/* @__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(Sr.values())].map((e) => ({
|
|
2838
2901
|
label: `+${e}`,
|
|
2839
2902
|
value: e
|
|
2840
2903
|
}));
|
|
2841
2904
|
d.createContext(void 0);
|
|
2842
2905
|
d.createContext(void 0);
|
|
2843
2906
|
var le = /* @__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))(le || {});
|
|
2844
|
-
const
|
|
2907
|
+
const Er = "/icons/bouMenuIcons.svg", Pr = ({
|
|
2845
2908
|
bouIconId: e,
|
|
2846
2909
|
...t
|
|
2847
|
-
}) => /* @__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: `${Er}#${le[e]}` }) }), U = ({
|
|
2848
2911
|
className: e,
|
|
2849
2912
|
label: t,
|
|
2850
2913
|
mobileUrl: s,
|
|
2851
2914
|
desktopUrl: r,
|
|
2852
2915
|
icon: i
|
|
2853
2916
|
}) => {
|
|
2854
|
-
const a = () => typeof i == "string" && i in le ? /* @__PURE__ */ n.jsx(
|
|
2917
|
+
const a = () => typeof i == "string" && i in le ? /* @__PURE__ */ n.jsx(Pr, { bouIconId: le[i] }) : i;
|
|
2855
2918
|
return /* @__PURE__ */ n.jsxs(L.Item, { className: e, children: [
|
|
2856
2919
|
/* @__PURE__ */ n.jsxs("a", { href: s, referrerPolicy: "no-referrer-when-downgrade", children: [
|
|
2857
2920
|
a(),
|
|
@@ -2862,7 +2925,7 @@ const _r = "/icons/bouMenuIcons.svg", Sr = ({
|
|
|
2862
2925
|
t
|
|
2863
2926
|
] })
|
|
2864
2927
|
] });
|
|
2865
|
-
}, mt = d.createContext(void 0),
|
|
2928
|
+
}, mt = d.createContext(void 0), Rr = ({
|
|
2866
2929
|
position: e,
|
|
2867
2930
|
bouMenuItems: t,
|
|
2868
2931
|
authenticationStatus: s,
|
|
@@ -2873,13 +2936,13 @@ const _r = "/icons/bouMenuIcons.svg", Sr = ({
|
|
|
2873
2936
|
if (!e)
|
|
2874
2937
|
throw new Error("Authentication context can not be rendered outside of Authentication");
|
|
2875
2938
|
return e;
|
|
2876
|
-
}, yt = d.createContext(void 0),
|
|
2939
|
+
}, yt = d.createContext(void 0), Or = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ n.jsx(yt.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), Ct = () => {
|
|
2877
2940
|
const e = d.useContext(yt);
|
|
2878
2941
|
if (!e)
|
|
2879
2942
|
throw new Error("Api context can not be rendered outside of Api");
|
|
2880
2943
|
return e;
|
|
2881
2944
|
}, W = () => {
|
|
2882
|
-
const { apiUrl: e, redirectUrl: t } =
|
|
2945
|
+
const { apiUrl: e, redirectUrl: t } = Ct(), s = _t({ apiUrl: e, redirectUrl: t }), r = `${e}/logout?redirectUrl=${t}`, i = `${e}/user/profile`, a = `${e}/gdpr/tc/check`, o = `${e}/gdpr/tc`;
|
|
2883
2946
|
return {
|
|
2884
2947
|
loginUrl: s,
|
|
2885
2948
|
logoutUrl: r,
|
|
@@ -2887,8 +2950,8 @@ const _r = "/icons/bouMenuIcons.svg", Sr = ({
|
|
|
2887
2950
|
getTermsAndConditionsEndpoint: a,
|
|
2888
2951
|
postTermsAndConditionsEndpoint: o
|
|
2889
2952
|
};
|
|
2890
|
-
},
|
|
2891
|
-
|
|
2953
|
+
}, Ar = (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
|
+
U,
|
|
2892
2955
|
{
|
|
2893
2956
|
className: "bou-menu-item",
|
|
2894
2957
|
mobileUrl: r,
|
|
@@ -2897,8 +2960,8 @@ const _r = "/icons/bouMenuIcons.svg", Sr = ({
|
|
|
2897
2960
|
label: t
|
|
2898
2961
|
},
|
|
2899
2962
|
i
|
|
2900
|
-
)) }) : null,
|
|
2901
|
-
const { t: e } =
|
|
2963
|
+
)) }) : null, kr = () => {
|
|
2964
|
+
const { t: e } = H(), t = He(), { position: s, profile: r, bouMenuItems: i } = Pe(), { logoutUrl: a } = W(), o = (r == null ? void 0 : r.firstName) ?? "", l = (r == null ? void 0 : r.lastName) ?? "";
|
|
2902
2965
|
return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: s, children: [
|
|
2903
2966
|
/* @__PURE__ */ n.jsx(
|
|
2904
2967
|
L.Trigger,
|
|
@@ -2917,37 +2980,46 @@ const _r = "/icons/bouMenuIcons.svg", Sr = ({
|
|
|
2917
2980
|
}
|
|
2918
2981
|
),
|
|
2919
2982
|
/* @__PURE__ */ n.jsxs(L.Content, { as: "div", children: [
|
|
2920
|
-
|
|
2983
|
+
Ar(i),
|
|
2921
2984
|
/* @__PURE__ */ n.jsxs("ul", { children: [
|
|
2922
2985
|
/* @__PURE__ */ n.jsx(
|
|
2923
|
-
|
|
2986
|
+
U,
|
|
2924
2987
|
{
|
|
2925
2988
|
className: "manage-profile",
|
|
2926
2989
|
mobileUrl: `${t}/manage-profile`,
|
|
2927
2990
|
desktopUrl: `${t}/manage-profile/personal-data`,
|
|
2928
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
2991
|
+
icon: /* @__PURE__ */ n.jsx(Hs, {}),
|
|
2929
2992
|
label: e("manageProfile")
|
|
2930
2993
|
}
|
|
2931
2994
|
),
|
|
2932
2995
|
/* @__PURE__ */ n.jsx(
|
|
2933
|
-
|
|
2996
|
+
U,
|
|
2934
2997
|
{
|
|
2935
2998
|
className: "payment",
|
|
2936
2999
|
mobileUrl: `${t}/payment`,
|
|
2937
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3000
|
+
icon: /* @__PURE__ */ n.jsx(Is, {}),
|
|
2938
3001
|
label: e("payment")
|
|
2939
3002
|
}
|
|
2940
3003
|
),
|
|
2941
3004
|
/* @__PURE__ */ n.jsx(
|
|
2942
|
-
|
|
3005
|
+
U,
|
|
3006
|
+
{
|
|
3007
|
+
className: "gift-cards",
|
|
3008
|
+
mobileUrl: `${t}/gift-cards`,
|
|
3009
|
+
icon: /* @__PURE__ */ n.jsx(Js, {}),
|
|
3010
|
+
label: e("giftCards")
|
|
3011
|
+
}
|
|
3012
|
+
),
|
|
3013
|
+
/* @__PURE__ */ n.jsx(
|
|
3014
|
+
U,
|
|
2943
3015
|
{
|
|
2944
3016
|
mobileUrl: `${t}/identifiers`,
|
|
2945
|
-
icon: /* @__PURE__ */ n.jsx(
|
|
3017
|
+
icon: /* @__PURE__ */ n.jsx(er, {}),
|
|
2946
3018
|
label: e("qrCode")
|
|
2947
3019
|
}
|
|
2948
3020
|
),
|
|
2949
3021
|
/* @__PURE__ */ n.jsx(
|
|
2950
|
-
|
|
3022
|
+
U,
|
|
2951
3023
|
{
|
|
2952
3024
|
className: "manage-privacy",
|
|
2953
3025
|
mobileUrl: `${t}/manage-privacy`,
|
|
@@ -2956,12 +3028,12 @@ const _r = "/icons/bouMenuIcons.svg", Sr = ({
|
|
|
2956
3028
|
label: e("privacy")
|
|
2957
3029
|
}
|
|
2958
3030
|
),
|
|
2959
|
-
/* @__PURE__ */ n.jsx(
|
|
3031
|
+
/* @__PURE__ */ n.jsx(U, { mobileUrl: a, icon: /* @__PURE__ */ n.jsx(Ts, {}), label: e("logout") })
|
|
2960
3032
|
] })
|
|
2961
3033
|
] })
|
|
2962
3034
|
] });
|
|
2963
|
-
},
|
|
2964
|
-
const { t: e } =
|
|
3035
|
+
}, Fr = () => {
|
|
3036
|
+
const { t: e } = H();
|
|
2965
3037
|
return /* @__PURE__ */ n.jsxs("button", { className: R("button", "button--neutral", "button--authentication"), children: [
|
|
2966
3038
|
/* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx("i", { className: "spinner" }) }),
|
|
2967
3039
|
/* @__PURE__ */ n.jsxs("span", { className: "button__label", children: [
|
|
@@ -2969,8 +3041,8 @@ const _r = "/icons/bouMenuIcons.svg", Sr = ({
|
|
|
2969
3041
|
"..."
|
|
2970
3042
|
] })
|
|
2971
3043
|
] });
|
|
2972
|
-
},
|
|
2973
|
-
const { t } =
|
|
3044
|
+
}, Nr = ({ className: e }) => {
|
|
3045
|
+
const { t } = H(), { loginUrl: s } = W();
|
|
2974
3046
|
return /* @__PURE__ */ n.jsxs(
|
|
2975
3047
|
"a",
|
|
2976
3048
|
{
|
|
@@ -2990,8 +3062,8 @@ const _r = "/icons/bouMenuIcons.svg", Sr = ({
|
|
|
2990
3062
|
}
|
|
2991
3063
|
);
|
|
2992
3064
|
};
|
|
2993
|
-
const
|
|
2994
|
-
const { t: e } =
|
|
3065
|
+
const Mr = () => {
|
|
3066
|
+
const { t: e } = H(), { loginUrl: t } = W(), s = He(), { position: r } = Pe();
|
|
2995
3067
|
return /* @__PURE__ */ n.jsxs(
|
|
2996
3068
|
L,
|
|
2997
3069
|
{
|
|
@@ -3011,7 +3083,7 @@ const Nr = () => {
|
|
|
3011
3083
|
/* @__PURE__ */ n.jsx("span", { className: "button__label", children: e("login") })
|
|
3012
3084
|
] }) }),
|
|
3013
3085
|
/* @__PURE__ */ n.jsx(L.Item, { children: /* @__PURE__ */ n.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
|
|
3014
|
-
/* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(
|
|
3086
|
+
/* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Vs, {}) }),
|
|
3015
3087
|
/* @__PURE__ */ n.jsx("span", { className: "button__label", children: e("register") })
|
|
3016
3088
|
] }) })
|
|
3017
3089
|
] })
|
|
@@ -3020,12 +3092,12 @@ const Nr = () => {
|
|
|
3020
3092
|
);
|
|
3021
3093
|
};
|
|
3022
3094
|
var D = /* @__PURE__ */ ((e) => (e.Authenticated = "authenticated", e.NotAuthenticated = "notAuthenticated", e.Pending = "pending", e))(D || {});
|
|
3023
|
-
const
|
|
3095
|
+
const Lr = () => {
|
|
3024
3096
|
const { authenticationStatus: e } = Pe();
|
|
3025
3097
|
return e === D.NotAuthenticated ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3026
|
-
/* @__PURE__ */ n.jsx(
|
|
3027
|
-
/* @__PURE__ */ n.jsx(
|
|
3028
|
-
] }) : e === D.Pending ? /* @__PURE__ */ n.jsx(
|
|
3098
|
+
/* @__PURE__ */ n.jsx(Nr, {}),
|
|
3099
|
+
/* @__PURE__ */ n.jsx(Mr, {})
|
|
3100
|
+
] }) : e === D.Pending ? /* @__PURE__ */ n.jsx(Fr, {}) : /* @__PURE__ */ n.jsx(kr, {});
|
|
3029
3101
|
};
|
|
3030
3102
|
/*! js-cookie v3.0.5 | MIT */
|
|
3031
3103
|
function ee(e) {
|
|
@@ -3036,7 +3108,7 @@ function ee(e) {
|
|
|
3036
3108
|
}
|
|
3037
3109
|
return e;
|
|
3038
3110
|
}
|
|
3039
|
-
var
|
|
3111
|
+
var Dr = {
|
|
3040
3112
|
read: function(e) {
|
|
3041
3113
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
3042
3114
|
},
|
|
@@ -3047,7 +3119,7 @@ var kr = {
|
|
|
3047
3119
|
);
|
|
3048
3120
|
}
|
|
3049
3121
|
};
|
|
3050
|
-
function
|
|
3122
|
+
function ge(e, t) {
|
|
3051
3123
|
function s(i, a, o) {
|
|
3052
3124
|
if (!(typeof document > "u")) {
|
|
3053
3125
|
o = ee({}, t, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
@@ -3085,10 +3157,10 @@ function Ce(e, t) {
|
|
|
3085
3157
|
);
|
|
3086
3158
|
},
|
|
3087
3159
|
withAttributes: function(i) {
|
|
3088
|
-
return
|
|
3160
|
+
return ge(this.converter, ee({}, this.attributes, i));
|
|
3089
3161
|
},
|
|
3090
3162
|
withConverter: function(i) {
|
|
3091
|
-
return
|
|
3163
|
+
return ge(ee({}, this.converter, i), this.attributes);
|
|
3092
3164
|
}
|
|
3093
3165
|
},
|
|
3094
3166
|
{
|
|
@@ -3097,14 +3169,14 @@ function Ce(e, t) {
|
|
|
3097
3169
|
}
|
|
3098
3170
|
);
|
|
3099
3171
|
}
|
|
3100
|
-
var xe =
|
|
3172
|
+
var xe = ge(Dr, { path: "/" });
|
|
3101
3173
|
class be extends Error {
|
|
3102
3174
|
constructor(t) {
|
|
3103
3175
|
super(t), this.name = "UnauthorizedError";
|
|
3104
3176
|
}
|
|
3105
3177
|
}
|
|
3106
|
-
const
|
|
3107
|
-
const { i18n: e } =
|
|
3178
|
+
const Tr = () => {
|
|
3179
|
+
const { i18n: e } = H(), { profileEndpoint: t } = W();
|
|
3108
3180
|
return it({
|
|
3109
3181
|
queryKey: ["profile"],
|
|
3110
3182
|
queryFn: async () => {
|
|
@@ -3120,13 +3192,13 @@ const Lr = () => {
|
|
|
3120
3192
|
retry: (r, i) => i instanceof be ? !1 : r < 2,
|
|
3121
3193
|
refetchOnWindowFocus: !1
|
|
3122
3194
|
});
|
|
3123
|
-
},
|
|
3195
|
+
}, gt = () => {
|
|
3124
3196
|
var l, c;
|
|
3125
3197
|
const e = xe.get("profile"), t = !!e, [s, r] = d.useState(
|
|
3126
3198
|
t ? D.Authenticated : D.Pending
|
|
3127
3199
|
), [i, a] = d.useState(
|
|
3128
3200
|
t ? JSON.parse(e) : void 0
|
|
3129
|
-
), o =
|
|
3201
|
+
), o = Tr();
|
|
3130
3202
|
return d.useEffect(() => {
|
|
3131
3203
|
if (o.isError && o.error instanceof be && (xe.remove("profile"), r(D.NotAuthenticated)), o.isError && r(
|
|
3132
3204
|
t ? D.Authenticated : D.NotAuthenticated
|
|
@@ -3146,27 +3218,27 @@ const Lr = () => {
|
|
|
3146
3218
|
o.isError,
|
|
3147
3219
|
o.isSuccess
|
|
3148
3220
|
]), { authenticationStatus: s, profile: i };
|
|
3149
|
-
},
|
|
3150
|
-
const { authenticationStatus: s, profile: r } =
|
|
3221
|
+
}, Ur = ({ position: e, bouMenuItems: t }) => {
|
|
3222
|
+
const { authenticationStatus: s, profile: r } = gt();
|
|
3151
3223
|
return /* @__PURE__ */ n.jsx(
|
|
3152
|
-
|
|
3224
|
+
Rr,
|
|
3153
3225
|
{
|
|
3154
3226
|
bouMenuItems: t,
|
|
3155
3227
|
authenticationStatus: s,
|
|
3156
3228
|
position: e,
|
|
3157
3229
|
profile: r,
|
|
3158
|
-
children: /* @__PURE__ */ n.jsx(
|
|
3230
|
+
children: /* @__PURE__ */ n.jsx(Lr, {})
|
|
3159
3231
|
}
|
|
3160
3232
|
);
|
|
3161
3233
|
};
|
|
3162
|
-
var
|
|
3234
|
+
var Qr = Object.defineProperty, qr = Object.defineProperties, Hr = Object.getOwnPropertyDescriptors, ce = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty, bt = Object.prototype.propertyIsEnumerable, qe = (e, t, s) => t in e ? Qr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, K = (e, t) => {
|
|
3163
3235
|
for (var s in t || (t = {}))
|
|
3164
3236
|
xt.call(t, s) && qe(e, s, t[s]);
|
|
3165
3237
|
if (ce)
|
|
3166
3238
|
for (var s of ce(t))
|
|
3167
3239
|
bt.call(t, s) && qe(e, s, t[s]);
|
|
3168
3240
|
return e;
|
|
3169
|
-
}, Z = (e, t) =>
|
|
3241
|
+
}, Z = (e, t) => qr(e, Hr(t)), z = (e, t) => {
|
|
3170
3242
|
var s = {};
|
|
3171
3243
|
for (var r in e)
|
|
3172
3244
|
xt.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
|
|
@@ -3174,7 +3246,7 @@ var Tr = Object.defineProperty, Ur = Object.defineProperties, Qr = Object.getOwn
|
|
|
3174
3246
|
for (var r of ce(e))
|
|
3175
3247
|
t.indexOf(r) < 0 && bt.call(e, r) && (s[r] = e[r]);
|
|
3176
3248
|
return s;
|
|
3177
|
-
},
|
|
3249
|
+
}, Kr = d.forwardRef((e, t) => {
|
|
3178
3250
|
const s = e, { isAuthenticated: r, className: i } = s, a = z(s, ["isAuthenticated", "className"]);
|
|
3179
3251
|
return /* @__PURE__ */ n.jsx(
|
|
3180
3252
|
$,
|
|
@@ -3190,14 +3262,14 @@ var Tr = Object.defineProperty, Ur = Object.defineProperties, Qr = Object.getOwn
|
|
|
3190
3262
|
}, a)
|
|
3191
3263
|
);
|
|
3192
3264
|
});
|
|
3193
|
-
|
|
3194
|
-
var
|
|
3265
|
+
Kr.displayName = "AuthenticationButton";
|
|
3266
|
+
var Vr = (e) => {
|
|
3195
3267
|
var t = e, {
|
|
3196
3268
|
children: s
|
|
3197
3269
|
} = t, r = z(t, [
|
|
3198
3270
|
"children"
|
|
3199
3271
|
]);
|
|
3200
|
-
return /* @__PURE__ */ n.jsx(
|
|
3272
|
+
return /* @__PURE__ */ n.jsx(q.Label, Z(K({ className: "form--tc__label" }, r), { children: s }));
|
|
3201
3273
|
}, wt = d.forwardRef(
|
|
3202
3274
|
(e, t) => {
|
|
3203
3275
|
var s = e, { children: r } = s, i = z(s, ["children"]);
|
|
@@ -3205,14 +3277,14 @@ var Kr = (e) => {
|
|
|
3205
3277
|
}
|
|
3206
3278
|
);
|
|
3207
3279
|
wt.displayName = "TermsAndConditionsForm";
|
|
3208
|
-
var
|
|
3280
|
+
var Gr = (e) => {
|
|
3209
3281
|
var t = e, {
|
|
3210
3282
|
children: s
|
|
3211
3283
|
} = t, r = z(t, [
|
|
3212
3284
|
"children"
|
|
3213
3285
|
]);
|
|
3214
3286
|
return /* @__PURE__ */ n.jsx("p", Z(K({ className: "form--tc__description" }, r), { children: s }));
|
|
3215
|
-
},
|
|
3287
|
+
}, $r = (e) => {
|
|
3216
3288
|
var t = e, { children: s } = t, r = z(t, ["children"]);
|
|
3217
3289
|
return /* @__PURE__ */ n.jsx(
|
|
3218
3290
|
"a",
|
|
@@ -3226,15 +3298,15 @@ var Hr = (e) => {
|
|
|
3226
3298
|
children: s
|
|
3227
3299
|
})
|
|
3228
3300
|
);
|
|
3229
|
-
},
|
|
3230
|
-
(e, t) => /* @__PURE__ */ n.jsx(
|
|
3301
|
+
}, Wr = ({ children: e }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: e }), Zr = d.forwardRef(
|
|
3302
|
+
(e, t) => /* @__PURE__ */ n.jsx(F.Close, Z(K({ className: "hidden" }, e), { ref: t }))
|
|
3231
3303
|
);
|
|
3232
|
-
|
|
3233
|
-
var
|
|
3304
|
+
Zr.displayName = "TermsAndConditionsClose";
|
|
3305
|
+
var zr = (e) => {
|
|
3234
3306
|
var t = e, { children: s } = t, r = z(t, ["children"]);
|
|
3235
3307
|
return /* @__PURE__ */ n.jsx("span", Z(K({ className: "form--tc__error", role: "alert" }, r), { children: s }));
|
|
3236
3308
|
};
|
|
3237
|
-
const
|
|
3309
|
+
const Yr = () => {
|
|
3238
3310
|
const { postTermsAndConditionsEndpoint: e } = W(), t = new Je();
|
|
3239
3311
|
return ps({
|
|
3240
3312
|
mutationFn: async (r) => {
|
|
@@ -3252,8 +3324,8 @@ const Zr = () => {
|
|
|
3252
3324
|
await t.invalidateQueries({ queryKey: ["gdpr"] });
|
|
3253
3325
|
}
|
|
3254
3326
|
});
|
|
3255
|
-
},
|
|
3256
|
-
const { i18n: e } =
|
|
3327
|
+
}, Jr = () => {
|
|
3328
|
+
const { i18n: e } = H(), { getTermsAndConditionsEndpoint: t } = W(), { authenticationStatus: s } = gt(), r = xe.get("hasAcceptedLatestTermsAndConditions"), i = [], a = r === "true", o = s === D.Authenticated;
|
|
3257
3329
|
return it({
|
|
3258
3330
|
queryKey: ["gdpr"],
|
|
3259
3331
|
queryFn: async () => {
|
|
@@ -3269,50 +3341,50 @@ const Zr = () => {
|
|
|
3269
3341
|
enabled: o && !a,
|
|
3270
3342
|
initialData: i
|
|
3271
3343
|
});
|
|
3272
|
-
},
|
|
3273
|
-
const { t } =
|
|
3274
|
-
var
|
|
3275
|
-
(
|
|
3344
|
+
}, Xr = ({ redirectUrl: e }) => {
|
|
3345
|
+
const { t } = H(), { apiUrl: s } = Ct(), r = d.useRef(null), [i, a] = d.useState(0), [o, l] = d.useState({}), { mutate: c, isError: h } = Yr(), { AccessibleFormMessage: u, formRef: f } = St({ submitCount: i, errors: o }), { data: v } = Jr(), p = !!(v != null && v.length), y = t("termsAndConditions.error.required"), x = () => {
|
|
3346
|
+
var C;
|
|
3347
|
+
(C = r == null ? void 0 : r.current) == null || C.click(), document.body.style.removeProperty("overflow");
|
|
3276
3348
|
};
|
|
3277
3349
|
d.useEffect(() => {
|
|
3278
3350
|
p && document.body.style.setProperty("overflow", "hidden");
|
|
3279
3351
|
}, [p]), d.useEffect(() => {
|
|
3280
3352
|
h && l({ acceptedTC: y });
|
|
3281
3353
|
}, [y, h]);
|
|
3282
|
-
const m = (
|
|
3283
|
-
|
|
3284
|
-
const { acceptedTC: _ } =
|
|
3354
|
+
const m = (C) => {
|
|
3355
|
+
C.preventDefault(), a(i + 1);
|
|
3356
|
+
const { acceptedTC: _ } = C.target;
|
|
3285
3357
|
if (_ instanceof RadioNodeList) {
|
|
3286
3358
|
const w = Object.values(_);
|
|
3287
|
-
w.every((
|
|
3359
|
+
w.every((k) => k.checked) ? (l({}), c(w.map((k) => k.value)), x()) : l({ acceptedTC: y });
|
|
3288
3360
|
} else
|
|
3289
3361
|
_ != null && _.checked ? (l({}), c([_.value]), x()) : l({ acceptedTC: y });
|
|
3290
3362
|
};
|
|
3291
|
-
return p ? /* @__PURE__ */ n.jsxs(
|
|
3363
|
+
return p ? /* @__PURE__ */ n.jsxs(F, { defaultOpen: p, isModal: !0, children: [
|
|
3292
3364
|
u,
|
|
3293
|
-
/* @__PURE__ */ n.jsxs(
|
|
3294
|
-
/* @__PURE__ */ n.jsx(
|
|
3295
|
-
/* @__PURE__ */ n.jsx(
|
|
3296
|
-
/* @__PURE__ */ n.jsxs(
|
|
3365
|
+
/* @__PURE__ */ n.jsxs(F.Root, { children: [
|
|
3366
|
+
/* @__PURE__ */ n.jsx(F.Header, { children: /* @__PURE__ */ n.jsx(F.Title, { icon: /* @__PURE__ */ n.jsx(Ee, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(Wr, { children: t("termsAndConditions.title") }) }) }),
|
|
3367
|
+
/* @__PURE__ */ n.jsx(F.Body, { children: /* @__PURE__ */ n.jsxs(wt, { ref: f, id: "tc-form", onSubmit: m, children: [
|
|
3368
|
+
/* @__PURE__ */ n.jsxs(Gr, { children: [
|
|
3297
3369
|
t("termsAndConditions.description"),
|
|
3298
|
-
o.acceptedTC && /* @__PURE__ */ n.jsx(
|
|
3370
|
+
o.acceptedTC && /* @__PURE__ */ n.jsx(zr, { children: y })
|
|
3299
3371
|
] }),
|
|
3300
|
-
v.map(({ tcCode:
|
|
3301
|
-
|
|
3372
|
+
v.map(({ tcCode: C, title: _, URL: w }) => /* @__PURE__ */ n.jsx(
|
|
3373
|
+
q,
|
|
3302
3374
|
{
|
|
3303
|
-
id:
|
|
3304
|
-
value:
|
|
3375
|
+
id: C,
|
|
3376
|
+
value: C,
|
|
3305
3377
|
name: "acceptedTC",
|
|
3306
3378
|
variant: "primary",
|
|
3307
|
-
children: /* @__PURE__ */ n.jsxs(
|
|
3308
|
-
/* @__PURE__ */ n.jsx(
|
|
3309
|
-
/* @__PURE__ */ n.jsx(
|
|
3379
|
+
children: /* @__PURE__ */ n.jsxs(q.Content, { children: [
|
|
3380
|
+
/* @__PURE__ */ n.jsx(Vr, { children: _ }),
|
|
3381
|
+
/* @__PURE__ */ n.jsx($r, { href: w, children: t("termsAndConditions.action", { title: _ }) })
|
|
3310
3382
|
] })
|
|
3311
3383
|
},
|
|
3312
|
-
|
|
3384
|
+
C
|
|
3313
3385
|
))
|
|
3314
3386
|
] }) }),
|
|
3315
|
-
/* @__PURE__ */ n.jsxs(
|
|
3387
|
+
/* @__PURE__ */ n.jsxs(F.Footer, { children: [
|
|
3316
3388
|
/* @__PURE__ */ n.jsx(
|
|
3317
3389
|
"a",
|
|
3318
3390
|
{
|
|
@@ -3325,12 +3397,12 @@ const Zr = () => {
|
|
|
3325
3397
|
] })
|
|
3326
3398
|
] })
|
|
3327
3399
|
] }) : /* @__PURE__ */ n.jsx(n.Fragment, {});
|
|
3328
|
-
},
|
|
3329
|
-
|
|
3330
|
-
const
|
|
3331
|
-
/* @__PURE__ */ n.jsx(
|
|
3332
|
-
/* @__PURE__ */ n.jsx(
|
|
3400
|
+
}, Ir = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
|
|
3401
|
+
Ir.displayName = "TermsAndConditionsForm";
|
|
3402
|
+
const Br = new Je(), sn = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, bouMenuItems: i }) => /* @__PURE__ */ n.jsx(Et, { environment: e, children: /* @__PURE__ */ n.jsx(Or, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ n.jsxs(ts, { client: Br, children: [
|
|
3403
|
+
/* @__PURE__ */ n.jsx(Ur, { position: r, bouMenuItems: i }),
|
|
3404
|
+
/* @__PURE__ */ n.jsx(Xr, { redirectUrl: t })
|
|
3333
3405
|
] }) }) });
|
|
3334
3406
|
export {
|
|
3335
|
-
|
|
3407
|
+
sn as default
|
|
3336
3408
|
};
|