@myxtra/authentication-green 1.1.2 → 1.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { r as d, j as n, g as wt, u as Q, a as Qe, b as _t, E as Rt } from "./index-3594faaf.mjs";
2
- class K {
1
+ import { r as d, j as n, g as wt, u as Q, a as Qe, b as _t, E as Rt } from "./index-919d6dee.mjs";
2
+ class H {
3
3
  constructor() {
4
4
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
5
5
  }
@@ -171,7 +171,7 @@ function St() {
171
171
  function pe(t, e, s) {
172
172
  return s.isDataEqual != null && s.isDataEqual(t, e) ? t : typeof s.structuralSharing == "function" ? s.structuralSharing(t, e) : s.structuralSharing !== !1 ? Ke(t, e) : e;
173
173
  }
174
- class Pt extends K {
174
+ class Pt extends H {
175
175
  constructor() {
176
176
  super(), this.setup = (e) => {
177
177
  if (!z && window.addEventListener) {
@@ -212,7 +212,7 @@ class Pt extends K {
212
212
  }
213
213
  }
214
214
  const re = new Pt(), Ne = ["online", "offline"];
215
- class At extends K {
215
+ class At extends H {
216
216
  constructor() {
217
217
  super(), this.setup = (e) => {
218
218
  if (!z && window.addEventListener) {
@@ -271,54 +271,54 @@ class Ve {
271
271
  function te(t) {
272
272
  return t instanceof Ve;
273
273
  }
274
- function Ge(t) {
274
+ function $e(t) {
275
275
  let e = !1, s = 0, r = !1, i, o, a;
276
- const u = new Promise((v, y) => {
277
- o = v, a = y;
278
- }), l = (v) => {
279
- r || (f(new Ve(v)), t.abort == null || t.abort());
276
+ const u = new Promise((m, C) => {
277
+ o = m, a = C;
278
+ }), l = (m) => {
279
+ r || (f(new Ve(m)), t.abort == null || t.abort());
280
280
  }, h = () => {
281
281
  e = !0;
282
282
  }, c = () => {
283
283
  e = !1;
284
- }, p = () => !re.isFocused() || t.networkMode !== "always" && !ne.isOnline(), m = (v) => {
285
- r || (r = !0, t.onSuccess == null || t.onSuccess(v), i == null || i(), o(v));
286
- }, f = (v) => {
287
- r || (r = !0, t.onError == null || t.onError(v), i == null || i(), a(v));
288
- }, C = () => new Promise((v) => {
289
- i = (y) => {
284
+ }, p = () => !re.isFocused() || t.networkMode !== "always" && !ne.isOnline(), v = (m) => {
285
+ r || (r = !0, t.onSuccess == null || t.onSuccess(m), i == null || i(), o(m));
286
+ }, f = (m) => {
287
+ r || (r = !0, t.onError == null || t.onError(m), i == null || i(), a(m));
288
+ }, y = () => new Promise((m) => {
289
+ i = (C) => {
290
290
  const _ = r || !p();
291
- return _ && v(y), _;
291
+ return _ && m(C), _;
292
292
  }, t.onPause == null || t.onPause();
293
293
  }).then(() => {
294
294
  i = void 0, r || t.onContinue == null || t.onContinue();
295
- }), b = () => {
295
+ }), g = () => {
296
296
  if (r)
297
297
  return;
298
- let v;
298
+ let m;
299
299
  try {
300
- v = t.fn();
301
- } catch (y) {
302
- v = Promise.reject(y);
300
+ m = t.fn();
301
+ } catch (C) {
302
+ m = Promise.reject(C);
303
303
  }
304
- Promise.resolve(v).then(m).catch((y) => {
304
+ Promise.resolve(m).then(v).catch((C) => {
305
305
  var _, j;
306
306
  if (r)
307
307
  return;
308
- const O = (_ = t.retry) != null ? _ : 3, N = (j = t.retryDelay) != null ? j : Nt, R = typeof N == "function" ? N(s, y) : N, w = O === !0 || typeof O == "number" && s < O || typeof O == "function" && O(s, y);
308
+ const S = (_ = t.retry) != null ? _ : 3, N = (j = t.retryDelay) != null ? j : Nt, R = typeof N == "function" ? N(s, C) : N, w = S === !0 || typeof S == "number" && s < S || typeof S == "function" && S(s, C);
309
309
  if (e || !w) {
310
- f(y);
310
+ f(C);
311
311
  return;
312
312
  }
313
- s++, t.onFail == null || t.onFail(s, y), He(R).then(() => {
313
+ s++, t.onFail == null || t.onFail(s, C), He(R).then(() => {
314
314
  if (p())
315
- return C();
315
+ return y();
316
316
  }).then(() => {
317
- e ? f(y) : b();
317
+ e ? f(C) : g();
318
318
  });
319
319
  });
320
320
  };
321
- return ue(t.networkMode) ? b() : C().then(b), {
321
+ return ue(t.networkMode) ? g() : y().then(g), {
322
322
  promise: u,
323
323
  cancel: l,
324
324
  continue: () => (i == null ? void 0 : i()) ? u : Promise.resolve(),
@@ -373,7 +373,7 @@ function Mt() {
373
373
  };
374
374
  }
375
375
  const P = Mt();
376
- class $e {
376
+ class Ge {
377
377
  destroy() {
378
378
  this.clearGcTimeout();
379
379
  }
@@ -389,7 +389,7 @@ class $e {
389
389
  this.gcTimeout && (clearTimeout(this.gcTimeout), this.gcTimeout = void 0);
390
390
  }
391
391
  }
392
- class Ft extends $e {
392
+ class Ft extends Ge {
393
393
  constructor(e) {
394
394
  super(), this.abortSignalConsumed = !1, this.defaultOptions = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.cache = e.cache, this.logger = e.logger || be, this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.initialState = e.state || kt(this.options), this.state = this.initialState, this.scheduleGc();
395
395
  }
@@ -497,7 +497,7 @@ class Ft extends $e {
497
497
  }
498
498
  }
499
499
  if (e && this.setOptions(e), !this.options.queryFn) {
500
- const f = this.observers.find((C) => C.options.queryFn);
500
+ const f = this.observers.find((y) => y.options.queryFn);
501
501
  f && this.setOptions(f.options);
502
502
  }
503
503
  Array.isArray(this.options.queryKey);
@@ -529,33 +529,33 @@ class Ft extends $e {
529
529
  meta: (p = c.fetchOptions) == null ? void 0 : p.meta
530
530
  });
531
531
  }
532
- const m = (f) => {
532
+ const v = (f) => {
533
533
  if (te(f) && f.silent || this.dispatch({
534
534
  type: "error",
535
535
  error: f
536
536
  }), !te(f)) {
537
- var C, b, v, y;
538
- (C = (b = this.cache.config).onError) == null || C.call(b, f, this), (v = (y = this.cache.config).onSettled) == null || v.call(y, this.state.data, f, this);
537
+ var y, g, m, C;
538
+ (y = (g = this.cache.config).onError) == null || y.call(g, f, this), (m = (C = this.cache.config).onSettled) == null || m.call(C, this.state.data, f, this);
539
539
  }
540
540
  this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
541
541
  };
542
- return this.retryer = Ge({
542
+ return this.retryer = $e({
543
543
  fn: c.fetchFn,
544
544
  abort: a == null ? void 0 : a.abort.bind(a),
545
545
  onSuccess: (f) => {
546
- var C, b, v, y;
546
+ var y, g, m, C;
547
547
  if (typeof f > "u") {
548
- m(new Error(this.queryHash + " data is undefined"));
548
+ v(new Error(this.queryHash + " data is undefined"));
549
549
  return;
550
550
  }
551
- this.setData(f), (C = (b = this.cache.config).onSuccess) == null || C.call(b, f, this), (v = (y = this.cache.config).onSettled) == null || v.call(y, f, this.state.error, this), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
551
+ this.setData(f), (y = (g = this.cache.config).onSuccess) == null || y.call(g, f, this), (m = (C = this.cache.config).onSettled) == null || m.call(C, f, this.state.error, this), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
552
552
  },
553
- onError: m,
554
- onFail: (f, C) => {
553
+ onError: v,
554
+ onFail: (f, y) => {
555
555
  this.dispatch({
556
556
  type: "failed",
557
557
  failureCount: f,
558
- error: C
558
+ error: y
559
559
  });
560
560
  },
561
561
  onPause: () => {
@@ -674,7 +674,7 @@ function kt(t) {
674
674
  fetchStatus: "idle"
675
675
  };
676
676
  }
677
- class Lt extends K {
677
+ class Lt extends H {
678
678
  constructor(e) {
679
679
  super(), this.config = e || {}, this.queries = [], this.queriesMap = {};
680
680
  }
@@ -750,7 +750,7 @@ class Lt extends K {
750
750
  });
751
751
  }
752
752
  }
753
- class Dt extends $e {
753
+ class Dt extends Ge {
754
754
  constructor(e) {
755
755
  super(), this.defaultOptions = e.defaultOptions, this.mutationId = e.mutationId, this.mutationCache = e.mutationCache, this.logger = e.logger || be, this.observers = [], this.state = e.state || Ze(), this.setOptions(e.options), this.scheduleGc();
756
756
  }
@@ -793,12 +793,12 @@ class Dt extends $e {
793
793
  async execute() {
794
794
  const e = () => {
795
795
  var w;
796
- return this.retryer = Ge({
796
+ return this.retryer = $e({
797
797
  fn: () => this.options.mutationFn ? this.options.mutationFn(this.state.variables) : Promise.reject("No mutationFn found"),
798
- onFail: (g, F) => {
798
+ onFail: (b, F) => {
799
799
  this.dispatch({
800
800
  type: "failed",
801
- failureCount: g,
801
+ failureCount: b,
802
802
  error: F
803
803
  });
804
804
  },
@@ -820,15 +820,15 @@ class Dt extends $e {
820
820
  try {
821
821
  var r, i, o, a, u, l, h, c;
822
822
  if (!s) {
823
- var p, m, f, C;
823
+ var p, v, f, y;
824
824
  this.dispatch({
825
825
  type: "loading",
826
826
  variables: this.options.variables
827
- }), await ((p = (m = this.mutationCache.config).onMutate) == null ? void 0 : p.call(m, this.state.variables, this));
828
- const g = await ((f = (C = this.options).onMutate) == null ? void 0 : f.call(C, this.state.variables));
829
- g !== this.state.context && this.dispatch({
827
+ }), await ((p = (v = this.mutationCache.config).onMutate) == null ? void 0 : p.call(v, this.state.variables, this));
828
+ const b = await ((f = (y = this.options).onMutate) == null ? void 0 : f.call(y, this.state.variables));
829
+ b !== this.state.context && this.dispatch({
830
830
  type: "loading",
831
- context: g,
831
+ context: b,
832
832
  variables: this.state.variables
833
833
  });
834
834
  }
@@ -839,8 +839,8 @@ class Dt extends $e {
839
839
  }), w;
840
840
  } catch (w) {
841
841
  try {
842
- var b, v, y, _, j, O, N, R;
843
- throw await ((b = (v = this.mutationCache.config).onError) == null ? void 0 : b.call(v, w, this.state.variables, this.state.context, this)), await ((y = (_ = this.options).onError) == null ? void 0 : y.call(_, w, this.state.variables, this.state.context)), await ((j = (O = this.mutationCache.config).onSettled) == null ? void 0 : j.call(O, void 0, w, this.state.variables, this.state.context, this)), await ((N = (R = this.options).onSettled) == null ? void 0 : N.call(R, void 0, w, this.state.variables, this.state.context)), w;
842
+ var g, m, C, _, j, S, N, R;
843
+ throw await ((g = (m = this.mutationCache.config).onError) == null ? void 0 : g.call(m, w, this.state.variables, this.state.context, this)), await ((C = (_ = this.options).onError) == null ? void 0 : C.call(_, w, this.state.variables, this.state.context)), await ((j = (S = this.mutationCache.config).onSettled) == null ? void 0 : j.call(S, void 0, w, this.state.variables, this.state.context, this)), await ((N = (R = this.options).onSettled) == null ? void 0 : N.call(R, void 0, w, this.state.variables, this.state.context)), w;
844
844
  } finally {
845
845
  this.dispatch({
846
846
  type: "error",
@@ -930,7 +930,7 @@ function Ze() {
930
930
  variables: void 0
931
931
  };
932
932
  }
933
- class It extends K {
933
+ class It extends H {
934
934
  constructor(e) {
935
935
  super(), this.config = e || {}, this.mutations = [], this.mutationId = 0;
936
936
  }
@@ -997,63 +997,63 @@ function Tt() {
997
997
  onFetch: (t) => {
998
998
  t.fetchFn = () => {
999
999
  var e, s, r, i, o, a;
1000
- const u = (e = t.fetchOptions) == null || (s = e.meta) == null ? void 0 : s.refetchPage, l = (r = t.fetchOptions) == null || (i = r.meta) == null ? void 0 : i.fetchMore, h = l == null ? void 0 : l.pageParam, c = (l == null ? void 0 : l.direction) === "forward", p = (l == null ? void 0 : l.direction) === "backward", m = ((o = t.state.data) == null ? void 0 : o.pages) || [], f = ((a = t.state.data) == null ? void 0 : a.pageParams) || [];
1001
- let C = f, b = !1;
1002
- const v = (R) => {
1000
+ const u = (e = t.fetchOptions) == null || (s = e.meta) == null ? void 0 : s.refetchPage, l = (r = t.fetchOptions) == null || (i = r.meta) == null ? void 0 : i.fetchMore, h = l == null ? void 0 : l.pageParam, c = (l == null ? void 0 : l.direction) === "forward", p = (l == null ? void 0 : l.direction) === "backward", v = ((o = t.state.data) == null ? void 0 : o.pages) || [], f = ((a = t.state.data) == null ? void 0 : a.pageParams) || [];
1001
+ let y = f, g = !1;
1002
+ const m = (R) => {
1003
1003
  Object.defineProperty(R, "signal", {
1004
1004
  enumerable: !0,
1005
1005
  get: () => {
1006
1006
  var w;
1007
1007
  if ((w = t.signal) != null && w.aborted)
1008
- b = !0;
1008
+ g = !0;
1009
1009
  else {
1010
- var g;
1011
- (g = t.signal) == null || g.addEventListener("abort", () => {
1012
- b = !0;
1010
+ var b;
1011
+ (b = t.signal) == null || b.addEventListener("abort", () => {
1012
+ g = !0;
1013
1013
  });
1014
1014
  }
1015
1015
  return t.signal;
1016
1016
  }
1017
1017
  });
1018
- }, y = t.options.queryFn || (() => Promise.reject("Missing queryFn for queryKey '" + t.options.queryHash + "'")), _ = (R, w, g, F) => (C = F ? [w, ...C] : [...C, w], F ? [g, ...R] : [...R, g]), j = (R, w, g, F) => {
1019
- if (b)
1018
+ }, C = t.options.queryFn || (() => Promise.reject("Missing queryFn for queryKey '" + t.options.queryHash + "'")), _ = (R, w, b, F) => (y = F ? [w, ...y] : [...y, w], F ? [b, ...R] : [...R, b]), j = (R, w, b, F) => {
1019
+ if (g)
1020
1020
  return Promise.reject("Cancelled");
1021
- if (typeof g > "u" && !w && R.length)
1021
+ if (typeof b > "u" && !w && R.length)
1022
1022
  return Promise.resolve(R);
1023
- const Z = {
1023
+ const W = {
1024
1024
  queryKey: t.queryKey,
1025
- pageParam: g,
1025
+ pageParam: b,
1026
1026
  meta: t.options.meta
1027
1027
  };
1028
- v(Z);
1029
- const le = y(Z);
1030
- return Promise.resolve(le).then((jt) => _(R, g, jt, F));
1028
+ m(W);
1029
+ const le = C(W);
1030
+ return Promise.resolve(le).then((jt) => _(R, b, jt, F));
1031
1031
  };
1032
- let O;
1033
- if (!m.length)
1034
- O = j([]);
1032
+ let S;
1033
+ if (!v.length)
1034
+ S = j([]);
1035
1035
  else if (c) {
1036
- const R = typeof h < "u", w = R ? h : Me(t.options, m);
1037
- O = j(m, R, w);
1036
+ const R = typeof h < "u", w = R ? h : Me(t.options, v);
1037
+ S = j(v, R, w);
1038
1038
  } else if (p) {
1039
- const R = typeof h < "u", w = R ? h : Ut(t.options, m);
1040
- O = j(m, R, w, !0);
1039
+ const R = typeof h < "u", w = R ? h : Ut(t.options, v);
1040
+ S = j(v, R, w, !0);
1041
1041
  } else {
1042
- C = [];
1042
+ y = [];
1043
1043
  const R = typeof t.options.getNextPageParam > "u";
1044
- O = (u && m[0] ? u(m[0], 0, m) : !0) ? j([], R, f[0]) : Promise.resolve(_([], f[0], m[0]));
1045
- for (let g = 1; g < m.length; g++)
1046
- O = O.then((F) => {
1047
- if (u && m[g] ? u(m[g], g, m) : !0) {
1048
- const le = R ? f[g] : Me(t.options, F);
1044
+ S = (u && v[0] ? u(v[0], 0, v) : !0) ? j([], R, f[0]) : Promise.resolve(_([], f[0], v[0]));
1045
+ for (let b = 1; b < v.length; b++)
1046
+ S = S.then((F) => {
1047
+ if (u && v[b] ? u(v[b], b, v) : !0) {
1048
+ const le = R ? f[b] : Me(t.options, F);
1049
1049
  return j(F, R, le);
1050
1050
  }
1051
- return Promise.resolve(_(F, f[g], m[g]));
1051
+ return Promise.resolve(_(F, f[b], v[b]));
1052
1052
  });
1053
1053
  }
1054
- return O.then((R) => ({
1054
+ return S.then((R) => ({
1055
1055
  pages: R,
1056
- pageParams: C
1056
+ pageParams: y
1057
1057
  }));
1058
1058
  };
1059
1059
  }
@@ -1261,7 +1261,7 @@ class We {
1261
1261
  this.queryCache.clear(), this.mutationCache.clear();
1262
1262
  }
1263
1263
  }
1264
- class Qt extends K {
1264
+ class Qt extends H {
1265
1265
  constructor(e, s) {
1266
1266
  super(), this.client = e, this.options = s, this.trackedProps = /* @__PURE__ */ new Set(), this.selectError = null, this.bindMethods(), this.setOptions(s);
1267
1267
  }
@@ -1378,65 +1378,65 @@ class Qt extends K {
1378
1378
  state: p
1379
1379
  } = e;
1380
1380
  let {
1381
- dataUpdatedAt: m,
1381
+ dataUpdatedAt: v,
1382
1382
  error: f,
1383
- errorUpdatedAt: C,
1384
- fetchStatus: b,
1385
- status: v
1386
- } = p, y = !1, _ = !1, j;
1383
+ errorUpdatedAt: y,
1384
+ fetchStatus: g,
1385
+ status: m
1386
+ } = p, C = !1, _ = !1, j;
1387
1387
  if (s._optimisticResults) {
1388
- const g = this.hasListeners(), F = !g && Fe(e, s), Z = g && ke(e, r, s, i);
1389
- (F || Z) && (b = ue(e.options.networkMode) ? "fetching" : "paused", m || (v = "loading")), s._optimisticResults === "isRestoring" && (b = "idle");
1388
+ const b = this.hasListeners(), F = !b && Fe(e, s), W = b && ke(e, r, s, i);
1389
+ (F || W) && (g = ue(e.options.networkMode) ? "fetching" : "paused", v || (m = "loading")), s._optimisticResults === "isRestoring" && (g = "idle");
1390
1390
  }
1391
- if (s.keepPreviousData && !p.dataUpdatedAt && c != null && c.isSuccess && v !== "error")
1392
- j = c.data, m = c.dataUpdatedAt, v = c.status, y = !0;
1391
+ if (s.keepPreviousData && !p.dataUpdatedAt && c != null && c.isSuccess && m !== "error")
1392
+ j = c.data, v = c.dataUpdatedAt, m = c.status, C = !0;
1393
1393
  else if (s.select && typeof p.data < "u")
1394
1394
  if (o && p.data === (a == null ? void 0 : a.data) && s.select === this.selectFn)
1395
1395
  j = this.selectResult;
1396
1396
  else
1397
1397
  try {
1398
1398
  this.selectFn = s.select, j = s.select(p.data), j = pe(o == null ? void 0 : o.data, j, s), this.selectResult = j, this.selectError = null;
1399
- } catch (g) {
1400
- this.selectError = g;
1399
+ } catch (b) {
1400
+ this.selectError = b;
1401
1401
  }
1402
1402
  else
1403
1403
  j = p.data;
1404
- if (typeof s.placeholderData < "u" && typeof j > "u" && v === "loading") {
1405
- let g;
1404
+ if (typeof s.placeholderData < "u" && typeof j > "u" && m === "loading") {
1405
+ let b;
1406
1406
  if (o != null && o.isPlaceholderData && s.placeholderData === (u == null ? void 0 : u.placeholderData))
1407
- g = o.data;
1408
- else if (g = typeof s.placeholderData == "function" ? s.placeholderData() : s.placeholderData, s.select && typeof g < "u")
1407
+ b = o.data;
1408
+ else if (b = typeof s.placeholderData == "function" ? s.placeholderData() : s.placeholderData, s.select && typeof b < "u")
1409
1409
  try {
1410
- g = s.select(g), this.selectError = null;
1410
+ b = s.select(b), this.selectError = null;
1411
1411
  } catch (F) {
1412
1412
  this.selectError = F;
1413
1413
  }
1414
- typeof g < "u" && (v = "success", j = pe(o == null ? void 0 : o.data, g, s), _ = !0);
1414
+ typeof b < "u" && (m = "success", j = pe(o == null ? void 0 : o.data, b, s), _ = !0);
1415
1415
  }
1416
- this.selectError && (f = this.selectError, j = this.selectResult, C = Date.now(), v = "error");
1417
- const O = b === "fetching", N = v === "loading", R = v === "error";
1416
+ this.selectError && (f = this.selectError, j = this.selectResult, y = Date.now(), m = "error");
1417
+ const S = g === "fetching", N = m === "loading", R = m === "error";
1418
1418
  return {
1419
- status: v,
1420
- fetchStatus: b,
1419
+ status: m,
1420
+ fetchStatus: g,
1421
1421
  isLoading: N,
1422
- isSuccess: v === "success",
1422
+ isSuccess: m === "success",
1423
1423
  isError: R,
1424
- isInitialLoading: N && O,
1424
+ isInitialLoading: N && S,
1425
1425
  data: j,
1426
- dataUpdatedAt: m,
1426
+ dataUpdatedAt: v,
1427
1427
  error: f,
1428
- errorUpdatedAt: C,
1428
+ errorUpdatedAt: y,
1429
1429
  failureCount: p.fetchFailureCount,
1430
1430
  failureReason: p.fetchFailureReason,
1431
1431
  errorUpdateCount: p.errorUpdateCount,
1432
1432
  isFetched: p.dataUpdateCount > 0 || p.errorUpdateCount > 0,
1433
1433
  isFetchedAfterMount: p.dataUpdateCount > h.dataUpdateCount || p.errorUpdateCount > h.errorUpdateCount,
1434
- isFetching: O,
1435
- isRefetching: O && !N,
1434
+ isFetching: S,
1435
+ isRefetching: S && !N,
1436
1436
  isLoadingError: R && p.dataUpdatedAt === 0,
1437
- isPaused: b === "paused",
1437
+ isPaused: g === "paused",
1438
1438
  isPlaceholderData: _,
1439
- isPreviousData: y,
1439
+ isPreviousData: C,
1440
1440
  isRefetchError: R && p.dataUpdatedAt !== 0,
1441
1441
  isStale: je(e, s),
1442
1442
  refetch: this.refetch,
@@ -1522,7 +1522,7 @@ function je(t, e) {
1522
1522
  function Bt(t, e, s) {
1523
1523
  return s.keepPreviousData ? !1 : s.placeholderData !== void 0 ? e.isPlaceholderData : t.getCurrentResult() !== e;
1524
1524
  }
1525
- class Kt extends K {
1525
+ class Kt extends H {
1526
1526
  constructor(e, s) {
1527
1527
  super(), this.client = e, this.setOptions(s), this.bindMethods(), this.updateResult();
1528
1528
  }
@@ -1606,16 +1606,16 @@ var Ye = { exports: {} }, ze = {};
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 B = d;
1609
+ var K = d;
1610
1610
  function Ht(t, e) {
1611
1611
  return t === e && (t !== 0 || 1 / t === 1 / e) || t !== t && e !== e;
1612
1612
  }
1613
- var Vt = typeof Object.is == "function" ? Object.is : Ht, Gt = B.useState, $t = B.useEffect, Zt = B.useLayoutEffect, Wt = B.useDebugValue;
1613
+ var Vt = typeof Object.is == "function" ? Object.is : Ht, $t = K.useState, Gt = K.useEffect, Zt = K.useLayoutEffect, Wt = K.useDebugValue;
1614
1614
  function Yt(t, e) {
1615
- var s = e(), r = Gt({ inst: { value: s, getSnapshot: e } }), i = r[0].inst, o = r[1];
1615
+ var s = e(), r = $t({ inst: { value: s, getSnapshot: e } }), i = r[0].inst, o = r[1];
1616
1616
  return Zt(function() {
1617
1617
  i.value = s, i.getSnapshot = e, ce(i) && o({ inst: i });
1618
- }, [t, s, e]), $t(function() {
1618
+ }, [t, s, e]), Gt(function() {
1619
1619
  return ce(i) && o({ inst: i }), t(function() {
1620
1620
  ce(i) && o({ inst: i });
1621
1621
  });
@@ -1635,7 +1635,7 @@ function zt(t, e) {
1635
1635
  return e();
1636
1636
  }
1637
1637
  var Jt = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? zt : Yt;
1638
- ze.useSyncExternalStore = B.useSyncExternalStore !== void 0 ? B.useSyncExternalStore : Jt;
1638
+ ze.useSyncExternalStore = K.useSyncExternalStore !== void 0 ? K.useSyncExternalStore : Jt;
1639
1639
  Ye.exports = ze;
1640
1640
  var Xt = Ye.exports;
1641
1641
  const Je = Xt.useSyncExternalStore, Le = /* @__PURE__ */ d.createContext(void 0), Xe = /* @__PURE__ */ d.createContext(!1);
@@ -1764,7 +1764,7 @@ function it(t) {
1764
1764
  t[e] && (r && (r += " "), r += e);
1765
1765
  return r;
1766
1766
  }
1767
- function S() {
1767
+ function O() {
1768
1768
  for (var t, e, s = 0, r = ""; s < arguments.length; )
1769
1769
  (t = arguments[s++]) && (e = it(t)) && (r && (r += " "), r += e);
1770
1770
  return r;
@@ -1851,7 +1851,7 @@ var _s = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1851
1851
  children: /* @__PURE__ */ n.jsx("span", { className: "avatar__initials", children: r })
1852
1852
  }
1853
1853
  );
1854
- }, H = d.forwardRef(
1854
+ }, V = d.forwardRef(
1855
1855
  (t, e) => {
1856
1856
  var s = t, {
1857
1857
  iconLeft: r,
@@ -1876,7 +1876,7 @@ var _s = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1876
1876
  E(x({
1877
1877
  ref: e
1878
1878
  }, c), {
1879
- className: S(
1879
+ className: O(
1880
1880
  "button",
1881
1881
  u && `button--${u}`,
1882
1882
  u && a && `button--${u}--filled`,
@@ -1893,7 +1893,7 @@ var _s = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1893
1893
  );
1894
1894
  }
1895
1895
  );
1896
- H.displayName = "Button";
1896
+ V.displayName = "Button";
1897
1897
  d.createContext(void 0);
1898
1898
  var Rs = d.forwardRef(
1899
1899
  (t, e) => {
@@ -1904,7 +1904,7 @@ var Rs = d.forwardRef(
1904
1904
  "input",
1905
1905
  x({
1906
1906
  ref: e,
1907
- className: S(
1907
+ className: O(
1908
1908
  "input",
1909
1909
  r && "input--with-prefix",
1910
1910
  i && "input--with-suffix",
@@ -2194,7 +2194,7 @@ var Es = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2194
2194
  )
2195
2195
  ]
2196
2196
  })
2197
- ), Gs = Vs, $s = (t) => {
2197
+ ), $s = Vs, Gs = (t) => {
2198
2198
  const e = (s) => `${s}${t.suffix ? `_${t.suffix}` : ""}`;
2199
2199
  return /* @__PURE__ */ n.jsxs(
2200
2200
  "svg",
@@ -2365,7 +2365,7 @@ var Es = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2365
2365
  ]
2366
2366
  })
2367
2367
  );
2368
- }, _e = $s, Zs = (t) => /* @__PURE__ */ n.jsx(
2368
+ }, _e = Gs, Zs = (t) => /* @__PURE__ */ n.jsx(
2369
2369
  "svg",
2370
2370
  E(x({
2371
2371
  fill: "none",
@@ -2431,7 +2431,7 @@ var Es = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2431
2431
  return /* @__PURE__ */ n.jsx(
2432
2432
  "div",
2433
2433
  E(x({}, l), {
2434
- className: S(
2434
+ className: O(
2435
2435
  "card__empty-state",
2436
2436
  s === "error" && "card__empty-state--error",
2437
2437
  i && "card__empty-state--standalone",
@@ -2461,7 +2461,7 @@ var Es = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2461
2461
  return /* @__PURE__ */ n.jsx(
2462
2462
  "div",
2463
2463
  E(x({}, a), {
2464
- className: S(
2464
+ className: O(
2465
2465
  "card__header",
2466
2466
  s && `card__header--${s}`,
2467
2467
  r && "card__header--sticky",
@@ -2470,7 +2470,7 @@ var Es = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2470
2470
  children: o
2471
2471
  })
2472
2472
  );
2473
- }, tr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: t }), sr = ({ children: t, className: e }) => /* @__PURE__ */ n.jsx("div", { className: S("card__body__item", e), children: t }), rr = ({ icon: t, children: e }) => /* @__PURE__ */ n.jsxs("div", { className: "card__header__title", children: [
2473
+ }, tr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: t }), sr = ({ children: t, className: e }) => /* @__PURE__ */ n.jsx("div", { className: O("card__body__item", e), children: t }), rr = ({ icon: t, children: e }) => /* @__PURE__ */ n.jsxs("div", { className: "card__header__title", children: [
2474
2474
  t && /* @__PURE__ */ n.jsx("span", { className: "card__header__title__icon", children: t }),
2475
2475
  e
2476
2476
  ] }), ut = d.forwardRef(
@@ -2479,7 +2479,7 @@ var Es = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2479
2479
  return d.createElement(
2480
2480
  r,
2481
2481
  x({
2482
- className: S(
2482
+ className: O(
2483
2483
  "card",
2484
2484
  u && "card--disabled",
2485
2485
  a && `card--${a}`,
@@ -2504,13 +2504,13 @@ Object.assign(ut, {
2504
2504
  });
2505
2505
  var nr = (t) => {
2506
2506
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2507
- return /* @__PURE__ */ n.jsx("div", E(x({ className: S("checkbox__content", s) }, i), { children: r }));
2507
+ return /* @__PURE__ */ n.jsx("div", E(x({ className: O("checkbox__content", s) }, i), { children: r }));
2508
2508
  }, ir = (t) => {
2509
2509
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2510
- return /* @__PURE__ */ n.jsx("span", E(x({ className: S("checkbox__error", s) }, i), { children: r }));
2510
+ return /* @__PURE__ */ n.jsx("span", E(x({ className: O("checkbox__error", s) }, i), { children: r }));
2511
2511
  }, or = (t) => {
2512
2512
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2513
- return /* @__PURE__ */ n.jsx("span", E(x({ className: S("checkbox__hint", s) }, i), { children: r }));
2513
+ return /* @__PURE__ */ n.jsx("span", E(x({ className: O("checkbox__hint", s) }, i), { children: r }));
2514
2514
  }, lt = d.createContext(void 0), ar = ({ id: t, name: e, children: s }) => /* @__PURE__ */ n.jsx(lt.Provider, { value: { id: t, name: e }, children: s }), ur = () => {
2515
2515
  const t = d.useContext(lt);
2516
2516
  if (!t)
@@ -2519,7 +2519,7 @@ var nr = (t) => {
2519
2519
  }, lr = (t) => {
2520
2520
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2521
2521
  const { id: o } = ur();
2522
- return /* @__PURE__ */ n.jsx("label", E(x({ htmlFor: o, className: S("checkbox__label", s) }, i), { children: r }));
2522
+ return /* @__PURE__ */ n.jsx("label", E(x({ htmlFor: o, className: O("checkbox__label", s) }, i), { children: r }));
2523
2523
  }, U = (t) => {
2524
2524
  var e = t, {
2525
2525
  id: s,
@@ -2544,7 +2544,7 @@ var nr = (t) => {
2544
2544
  }, [i]), /* @__PURE__ */ n.jsxs(
2545
2545
  "div",
2546
2546
  {
2547
- className: S("checkbox", o && `checkbox--${o}`, a && "checkbox--error"),
2547
+ className: O("checkbox", o && `checkbox--${o}`, a && "checkbox--error"),
2548
2548
  children: [
2549
2549
  /* @__PURE__ */ n.jsx(
2550
2550
  "input",
@@ -2553,10 +2553,10 @@ var nr = (t) => {
2553
2553
  name: r,
2554
2554
  type: "checkbox",
2555
2555
  ref: c,
2556
- className: S("checkbox__input", u)
2556
+ className: O("checkbox__input", u)
2557
2557
  }, h)
2558
2558
  ),
2559
- i ? /* @__PURE__ */ n.jsx(Gs, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(Qs, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2559
+ i ? /* @__PURE__ */ n.jsx($s, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(Qs, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2560
2560
  /* @__PURE__ */ n.jsx(ar, { id: s, name: r, children: l })
2561
2561
  ]
2562
2562
  }
@@ -2568,20 +2568,20 @@ U.Hint = or;
2568
2568
  U.Error = ir;
2569
2569
  var cr = (t) => {
2570
2570
  var e = t, { type: s = "div", className: r, children: i } = e, o = A(e, ["type", "className", "children"]);
2571
- return d.createElement(s, x({ className: S("dialog__body", r) }, o), i);
2571
+ return d.createElement(s, x({ className: O("dialog__body", r) }, o), i);
2572
2572
  }, ye = () => document.body.style.removeProperty("overflow"), Ie = (t) => t.preventDefault(), dr = '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])', hr = (t) => {
2573
2573
  var e = t, { className: s, children: r, shouldAnimate: i = !0 } = e, o = A(e, ["className", "children", "shouldAnimate"]);
2574
2574
  const { ref: a, defaultOpen: u, isModal: l, onClose: h } = X();
2575
2575
  return d.useEffect(() => {
2576
2576
  const c = a == null ? void 0 : a.current;
2577
2577
  if (c != null && c.open) {
2578
- const p = c.querySelectorAll(dr), m = p[0], f = p[p.length - 1], C = (b) => {
2579
- if (!(b.key === "Tab"))
2578
+ const p = c.querySelectorAll(dr), v = p[0], f = p[p.length - 1], y = (g) => {
2579
+ if (!(g.key === "Tab"))
2580
2580
  return;
2581
- b.shiftKey ? document.activeElement === m && (f.focus(), b.preventDefault()) : document.activeElement === f && (m.focus(), b.preventDefault());
2581
+ g.shiftKey ? document.activeElement === v && (f.focus(), g.preventDefault()) : document.activeElement === f && (v.focus(), g.preventDefault());
2582
2582
  };
2583
- return document.body.style.overflow = "hidden", c.addEventListener("keydown", C), window.addEventListener("popstate", () => ye()), () => {
2584
- c.removeEventListener("keydown", C), window.removeEventListener("popstate", () => ye());
2583
+ return document.body.style.overflow = "hidden", c.addEventListener("keydown", y), window.addEventListener("popstate", () => ye()), () => {
2584
+ c.removeEventListener("keydown", y), window.removeEventListener("popstate", () => ye());
2585
2585
  };
2586
2586
  }
2587
2587
  }, [a]), d.useEffect(() => {
@@ -2590,9 +2590,9 @@ var cr = (t) => {
2590
2590
  return;
2591
2591
  if (u && (c.removeAttribute("open"), c.showModal(), c.focus()), l)
2592
2592
  return c.addEventListener("cancel", Ie), () => c.removeEventListener("cancel", Ie);
2593
- const p = ({ clientX: m, clientY: f }) => {
2594
- const { top: C, right: b, bottom: v, left: y } = c.getBoundingClientRect(), _ = 0 < f && 0 < m, j = C < f && f < v, O = y < m && m < b;
2595
- _ && !(j && O) && h();
2593
+ const p = ({ clientX: v, clientY: f }) => {
2594
+ const { top: y, right: g, bottom: m, left: C } = c.getBoundingClientRect(), _ = 0 < f && 0 < v, j = y < f && f < m, S = C < v && v < g;
2595
+ _ && !(j && S) && h();
2596
2596
  };
2597
2597
  return c.addEventListener("cancel", h), c.addEventListener("mousedown", p), () => {
2598
2598
  c.removeEventListener("cancel", h), c.removeEventListener("mousedown", p);
@@ -2604,7 +2604,7 @@ var cr = (t) => {
2604
2604
  tabIndex: -1,
2605
2605
  open: u,
2606
2606
  "aria-modal": !!l,
2607
- className: S("dialog", i && "dialog--animated", s)
2607
+ className: O("dialog", i && "dialog--animated", s)
2608
2608
  }, o), {
2609
2609
  children: r
2610
2610
  })
@@ -2623,12 +2623,12 @@ var cr = (t) => {
2623
2623
  }, pr = (t) => {
2624
2624
  var e = t, { children: s } = e, r = A(e, ["children"]);
2625
2625
  const { onClose: i } = X();
2626
- return /* @__PURE__ */ n.jsx(H, E(x({ onClick: i }, r), { children: s }));
2626
+ return /* @__PURE__ */ n.jsx(V, E(x({ onClick: i }, r), { children: s }));
2627
2627
  }, dt = d.forwardRef((t, e) => {
2628
2628
  var s = t, { className: r } = s, i = A(s, ["className"]);
2629
2629
  const { onClose: o } = X();
2630
2630
  return /* @__PURE__ */ n.jsx(
2631
- H,
2631
+ V,
2632
2632
  x({
2633
2633
  type: "submit",
2634
2634
  ref: e,
@@ -2636,14 +2636,14 @@ var cr = (t) => {
2636
2636
  onClick: o,
2637
2637
  iconLeft: /* @__PURE__ */ n.jsx(As, {}),
2638
2638
  variant: "icon--secondary",
2639
- className: S("dialog__close button--icon", r)
2639
+ className: O("dialog__close button--icon", r)
2640
2640
  }, i)
2641
2641
  );
2642
2642
  });
2643
2643
  dt.displayName = "Close";
2644
2644
  var vr = (t) => {
2645
2645
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2646
- return /* @__PURE__ */ n.jsx("div", E(x({ className: S("dialog__footer", s) }, i), { children: r }));
2646
+ return /* @__PURE__ */ n.jsx("div", E(x({ className: O("dialog__footer", s) }, i), { children: r }));
2647
2647
  }, mr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: t }), yr = (t) => {
2648
2648
  var e = t, { icon: s, children: r, className: i } = e, o = A(e, ["icon", "children", "className"]);
2649
2649
  const { ref: a } = X(), u = d.useRef(null);
@@ -2654,7 +2654,7 @@ var vr = (t) => {
2654
2654
  E(x({
2655
2655
  tabIndex: 0,
2656
2656
  ref: u,
2657
- className: S("dialog__header__title", i)
2657
+ className: O("dialog__header__title", i)
2658
2658
  }, o), {
2659
2659
  children: [
2660
2660
  s && /* @__PURE__ */ n.jsx("span", { className: "dialog__header__icon", children: s }),
@@ -2665,7 +2665,7 @@ var vr = (t) => {
2665
2665
  }, Cr = (t) => {
2666
2666
  var e = t, { children: s } = e, r = A(e, ["children"]);
2667
2667
  const { ref: i } = X();
2668
- return /* @__PURE__ */ n.jsx(H, E(x({ onClick: () => {
2668
+ return /* @__PURE__ */ n.jsx(V, E(x({ onClick: () => {
2669
2669
  var o;
2670
2670
  return (o = i == null ? void 0 : i.current) == null ? void 0 : o.showModal();
2671
2671
  } }, r), { children: s }));
@@ -2710,55 +2710,64 @@ var ht = d.createContext(void 0), xr = ({
2710
2710
  if (t === void 0)
2711
2711
  throw new Error("useMenu must be used within a MenuProvider");
2712
2712
  return t;
2713
- }, gr = ({ children: t }) => {
2713
+ }, gr = ({ as: t, children: e }) => {
2714
2714
  const {
2715
- id: e,
2716
- position: s,
2717
- isOpen: r,
2718
- setIsOpen: i,
2719
- activeItemIndex: o,
2720
- setActiveItemIndex: a,
2721
- clearActiveItemIndex: u,
2722
- triggerRef: l,
2723
- contentRef: h
2724
- } = ft(), c = (p) => {
2725
- var m;
2726
- if (!r)
2715
+ id: s,
2716
+ position: r,
2717
+ isOpen: i,
2718
+ setIsOpen: o,
2719
+ activeItemIndex: a,
2720
+ setActiveItemIndex: u,
2721
+ clearActiveItemIndex: l,
2722
+ triggerRef: h,
2723
+ contentRef: c
2724
+ } = ft(), p = (v) => {
2725
+ var f;
2726
+ if (!i)
2727
2727
  return;
2728
- if (p.key === "Escape")
2729
- return u(), i(!1), (m = l.current) == null ? void 0 : m.focus();
2730
- const f = h.current.childElementCount - 1;
2731
- switch (p.key) {
2728
+ if (v.key === "Escape")
2729
+ return l(), o(!1), (f = h.current) == null ? void 0 : f.focus();
2730
+ const y = c.current.childElementCount - 1;
2731
+ switch (v.key) {
2732
2732
  case "ArrowUp":
2733
2733
  case "ArrowLeft":
2734
- return p.preventDefault(), a(o ? Math.max(0, o - 1) : 0);
2734
+ return v.preventDefault(), u(a ? Math.max(0, a - 1) : 0);
2735
2735
  case "ArrowDown":
2736
2736
  case "ArrowRight":
2737
- p.preventDefault();
2738
- const C = o !== void 0 ? o + 1 : 0;
2739
- return a(Math.min(f, C));
2737
+ v.preventDefault();
2738
+ const g = a !== void 0 ? a + 1 : 0;
2739
+ return u(Math.min(y, g));
2740
2740
  case "Home":
2741
- return p.preventDefault(), a(0);
2741
+ return v.preventDefault(), u(0);
2742
2742
  case "End":
2743
- return p.preventDefault(), a(f);
2743
+ return v.preventDefault(), u(y);
2744
2744
  }
2745
2745
  };
2746
- return (
2746
+ return t ? d.createElement(
2747
+ t,
2748
+ {
2749
+ id: `${s}-content`,
2750
+ ref: c,
2751
+ className: O("menu__list", `menu__list--${r}`, i && "menu__list--active"),
2752
+ onKeyDown: p
2753
+ },
2754
+ e
2755
+ ) : (
2747
2756
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
2748
2757
  /* @__PURE__ */ n.jsx(
2749
2758
  "ul",
2750
2759
  {
2751
- id: `${e}-content`,
2752
- ref: h,
2753
- className: S("menu__list", `menu__list--${s}`, r && "menu__list--active"),
2754
- onKeyDown: c,
2755
- children: t
2760
+ id: `${s}-content`,
2761
+ ref: c,
2762
+ className: O("menu__list", `menu__list--${r}`, i && "menu__list--active"),
2763
+ onKeyDown: p,
2764
+ children: e
2756
2765
  }
2757
2766
  )
2758
2767
  );
2759
2768
  }, br = (t) => {
2760
2769
  var e = t, { children: s, className: r } = e, i = A(e, ["children", "className"]);
2761
- return /* @__PURE__ */ n.jsx("li", E(x({}, i), { className: S("menu__list-item", r), children: s }));
2770
+ return /* @__PURE__ */ n.jsx("li", E(x({}, i), { className: O("menu__list-item", r), children: s }));
2762
2771
  }, pt = ({ children: t, className: e }) => {
2763
2772
  const { id: s, isOpen: r, setIsOpen: i, clearActiveItemIndex: o, setActiveItemIndex: a, triggerRef: u } = ft(), l = () => {
2764
2773
  o(), i((c) => !c);
@@ -2772,7 +2781,7 @@ var ht = d.createContext(void 0), xr = ({
2772
2781
  return d.cloneElement(t, {
2773
2782
  id: `${s}-trigger`,
2774
2783
  ref: u,
2775
- className: S("menu__trigger", e),
2784
+ className: O("menu__trigger", e),
2776
2785
  onClick: l,
2777
2786
  onKeyDown: h,
2778
2787
  "aria-expanded": r,
@@ -2782,13 +2791,13 @@ var ht = d.createContext(void 0), xr = ({
2782
2791
  pt.displayName = "Trigger";
2783
2792
  var L = (t) => {
2784
2793
  var e = t, { type: s, id: r, position: i = "right", children: o, className: a } = e, u = A(e, ["type", "id", "position", "children", "className"]);
2785
- const l = d.useRef(null), h = d.useRef(null), c = d.useRef(null), [p, m] = d.useState(!1), [f, C] = d.useState(), [b, v] = d.useState(f);
2786
- f !== b && f !== void 0 && (c.current.children[f].firstChild.focus(), v(f));
2787
- const y = () => {
2788
- C(void 0), v(void 0);
2794
+ const l = d.useRef(null), h = d.useRef(null), c = d.useRef(null), [p, v] = d.useState(!1), [f, y] = d.useState(), [g, m] = d.useState(f);
2795
+ f !== g && f !== void 0 && (c.current.children[f].firstChild.focus(), m(f));
2796
+ const C = () => {
2797
+ y(void 0), m(void 0);
2789
2798
  }, _ = (j) => {
2790
- var O;
2791
- ((O = l.current) == null ? void 0 : O.contains(j.relatedTarget)) || (y(), m(!1));
2799
+ var S;
2800
+ ((S = l.current) == null ? void 0 : S.contains(j.relatedTarget)) || (C(), v(!1));
2792
2801
  };
2793
2802
  return /* @__PURE__ */ n.jsx(
2794
2803
  xr,
@@ -2796,10 +2805,10 @@ var L = (t) => {
2796
2805
  id: r,
2797
2806
  position: i,
2798
2807
  isOpen: p,
2799
- setIsOpen: m,
2808
+ setIsOpen: v,
2800
2809
  activeItemIndex: f,
2801
- setActiveItemIndex: C,
2802
- clearActiveItemIndex: y,
2810
+ setActiveItemIndex: y,
2811
+ clearActiveItemIndex: C,
2803
2812
  triggerRef: h,
2804
2813
  contentRef: c,
2805
2814
  children: d.createElement(
@@ -2826,7 +2835,7 @@ var jr = (/* @__PURE__ */ new Map()).set("BE", "32").set("FR", "33").set("NL", "
2826
2835
  }));
2827
2836
  d.createContext(void 0);
2828
2837
  d.createContext(void 0);
2829
- const W = ({
2838
+ const B = ({
2830
2839
  className: t,
2831
2840
  label: e,
2832
2841
  mobileUrl: s,
@@ -2841,7 +2850,13 @@ const W = ({
2841
2850
  i,
2842
2851
  e
2843
2852
  ] })
2844
- ] }), vt = d.createContext(void 0), wr = ({ position: t, authenticationStatus: e, profile: s, children: r }) => /* @__PURE__ */ n.jsx(vt.Provider, { value: { position: t, authenticationStatus: e, profile: s }, children: r }), Re = () => {
2853
+ ] }), vt = d.createContext(void 0), wr = ({
2854
+ position: t,
2855
+ bouMenuItems: e,
2856
+ authenticationStatus: s,
2857
+ profile: r,
2858
+ children: i
2859
+ }) => /* @__PURE__ */ n.jsx(vt.Provider, { value: { position: t, bouMenuItems: e, authenticationStatus: s, profile: r }, children: i }), Re = () => {
2845
2860
  const t = d.useContext(vt);
2846
2861
  if (!t)
2847
2862
  throw new Error("Authentication context can not be rendered outside of Authentication");
@@ -2851,7 +2866,7 @@ const W = ({
2851
2866
  if (!t)
2852
2867
  throw new Error("Api context can not be rendered outside of Api");
2853
2868
  return t;
2854
- }, V = () => {
2869
+ }, $ = () => {
2855
2870
  const { apiUrl: t, redirectUrl: e } = yt(), s = wt({ apiUrl: t, redirectUrl: e }), r = `${t}/logout?redirectUrl=${e}`, i = `${t}/user/profile`, o = `${t}/gdpr/tc/check`, a = `${t}/gdpr/tc`;
2856
2871
  return {
2857
2872
  loginUrl: s,
@@ -2860,83 +2875,96 @@ const W = ({
2860
2875
  getTermsAndConditionsEndpoint: o,
2861
2876
  postTermsAndConditionsEndpoint: a
2862
2877
  };
2863
- }, Rr = () => {
2864
- const { t } = Q(), e = Qe(), { position: s, profile: r } = Re(), { logoutUrl: i } = V(), o = (r == null ? void 0 : r.firstName) ?? "", a = (r == null ? void 0 : r.lastName) ?? "";
2878
+ }, Rr = (t) => t ? /* @__PURE__ */ n.jsx("ul", { className: "bou-menu__list", children: t == null ? void 0 : t.map(({ label: e, icon: s, url: r }, i) => /* @__PURE__ */ n.jsx(
2879
+ B,
2880
+ {
2881
+ className: "bou-menu-item",
2882
+ mobileUrl: r,
2883
+ desktopUrl: r,
2884
+ icon: s,
2885
+ label: e
2886
+ },
2887
+ i
2888
+ )) }) : null, Er = () => {
2889
+ const { t } = Q(), e = Qe(), { position: s, profile: r, bouMenuItems: i } = Re(), { logoutUrl: o } = $(), a = (r == null ? void 0 : r.firstName) ?? "", u = (r == null ? void 0 : r.lastName) ?? "";
2865
2890
  return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: s, children: [
2866
2891
  /* @__PURE__ */ n.jsx(
2867
2892
  L.Trigger,
2868
2893
  {
2869
- className: S(
2894
+ className: O(
2870
2895
  "button",
2871
2896
  "button--neutral",
2872
2897
  "button--authentication",
2873
2898
  "button--authentication--authenticated"
2874
2899
  ),
2875
2900
  children: /* @__PURE__ */ n.jsxs("button", { children: [
2876
- /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(_s, { variant: "small", firstName: o, lastName: a }) }),
2877
- /* @__PURE__ */ n.jsx("span", { className: "button__label", children: o }),
2901
+ /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(_s, { variant: "small", firstName: a, lastName: u }) }),
2902
+ /* @__PURE__ */ n.jsx("span", { className: "button__label", children: a }),
2878
2903
  /* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(we, {}) })
2879
2904
  ] })
2880
2905
  }
2881
2906
  ),
2882
- /* @__PURE__ */ n.jsxs(L.Content, { children: [
2883
- /* @__PURE__ */ n.jsx(
2884
- W,
2885
- {
2886
- className: "manage-profile",
2887
- mobileUrl: `${e}/manage-profile`,
2888
- desktopUrl: `${e}/manage-profile/personal-data`,
2889
- icon: /* @__PURE__ */ n.jsx(Ts, {}),
2890
- label: t("manageProfile")
2891
- }
2892
- ),
2893
- /* @__PURE__ */ n.jsx(
2894
- W,
2895
- {
2896
- className: "payment",
2897
- mobileUrl: `${e}/payment`,
2898
- desktopUrl: `${e}/payment/pay-with-xtra`,
2899
- icon: /* @__PURE__ */ n.jsx(Ws, {}),
2900
- label: t("payment")
2901
- }
2902
- ),
2903
- /* @__PURE__ */ n.jsx(
2904
- W,
2905
- {
2906
- mobileUrl: `${e}/identifiers`,
2907
- icon: /* @__PURE__ */ n.jsx(zs, {}),
2908
- label: t("qrCode")
2909
- }
2910
- ),
2911
- /* @__PURE__ */ n.jsx(
2912
- W,
2913
- {
2914
- className: "manage-privacy",
2915
- mobileUrl: `${e}/manage-privacy`,
2916
- desktopUrl: `${e}/manage-privacy/permissions`,
2917
- icon: /* @__PURE__ */ n.jsx(Bs, {}),
2918
- label: t("privacy")
2919
- }
2920
- ),
2921
- /* @__PURE__ */ n.jsx(W, { mobileUrl: i, icon: /* @__PURE__ */ n.jsx(Ds, {}), label: t("logout") })
2907
+ /* @__PURE__ */ n.jsxs(L.Content, { as: "div", children: [
2908
+ Rr(i),
2909
+ /* @__PURE__ */ n.jsxs("ul", { children: [
2910
+ /* @__PURE__ */ n.jsx(
2911
+ B,
2912
+ {
2913
+ className: "manage-profile",
2914
+ mobileUrl: `${e}/manage-profile`,
2915
+ desktopUrl: `${e}/manage-profile/personal-data`,
2916
+ icon: /* @__PURE__ */ n.jsx(Ts, {}),
2917
+ label: t("manageProfile")
2918
+ }
2919
+ ),
2920
+ /* @__PURE__ */ n.jsx(
2921
+ B,
2922
+ {
2923
+ className: "payment",
2924
+ mobileUrl: `${e}/payment`,
2925
+ desktopUrl: `${e}/payment/pay-with-xtra`,
2926
+ icon: /* @__PURE__ */ n.jsx(Ws, {}),
2927
+ label: t("payment")
2928
+ }
2929
+ ),
2930
+ /* @__PURE__ */ n.jsx(
2931
+ B,
2932
+ {
2933
+ mobileUrl: `${e}/identifiers`,
2934
+ icon: /* @__PURE__ */ n.jsx(zs, {}),
2935
+ label: t("qrCode")
2936
+ }
2937
+ ),
2938
+ /* @__PURE__ */ n.jsx(
2939
+ B,
2940
+ {
2941
+ className: "manage-privacy",
2942
+ mobileUrl: `${e}/manage-privacy`,
2943
+ desktopUrl: `${e}/manage-privacy/permissions`,
2944
+ icon: /* @__PURE__ */ n.jsx(Bs, {}),
2945
+ label: t("privacy")
2946
+ }
2947
+ ),
2948
+ /* @__PURE__ */ n.jsx(B, { mobileUrl: o, icon: /* @__PURE__ */ n.jsx(Ds, {}), label: t("logout") })
2949
+ ] })
2922
2950
  ] })
2923
2951
  ] });
2924
- }, Er = () => {
2952
+ }, Or = () => {
2925
2953
  const { t } = Q();
2926
- return /* @__PURE__ */ n.jsxs("button", { className: S("button", "button--neutral", "button--authentication"), children: [
2954
+ return /* @__PURE__ */ n.jsxs("button", { className: O("button", "button--neutral", "button--authentication"), children: [
2927
2955
  /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx("i", { className: "spinner" }) }),
2928
2956
  /* @__PURE__ */ n.jsxs("span", { className: "button__label", children: [
2929
2957
  t("loading"),
2930
2958
  "..."
2931
2959
  ] })
2932
2960
  ] });
2933
- }, Or = ({ className: t }) => {
2934
- const { t: e } = Q(), { loginUrl: s } = V();
2961
+ }, Sr = ({ className: t }) => {
2962
+ const { t: e } = Q(), { loginUrl: s } = $();
2935
2963
  return /* @__PURE__ */ n.jsxs(
2936
2964
  "a",
2937
2965
  {
2938
2966
  href: s,
2939
- className: S(
2967
+ className: O(
2940
2968
  "button",
2941
2969
  "button--neutral",
2942
2970
  "button--authentication",
@@ -2951,10 +2979,10 @@ const W = ({
2951
2979
  }
2952
2980
  );
2953
2981
  };
2954
- const Sr = () => {
2955
- const { t } = Q(), { loginUrl: e } = V(), s = Qe(), { position: r } = Re();
2982
+ const Pr = () => {
2983
+ const { t } = Q(), { loginUrl: e } = $(), s = Qe(), { position: r } = Re();
2956
2984
  return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: r, className: "menu--unauthenticated", children: [
2957
- /* @__PURE__ */ n.jsx(L.Trigger, { className: S("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ n.jsxs("button", { children: [
2985
+ /* @__PURE__ */ n.jsx(L.Trigger, { className: O("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ n.jsxs("button", { children: [
2958
2986
  /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(_e, { width: 24, height: 24, suffix: "mobile" }) }),
2959
2987
  /* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(we, {}) })
2960
2988
  ] }) }),
@@ -2971,12 +2999,12 @@ const Sr = () => {
2971
2999
  ] });
2972
3000
  };
2973
3001
  var D = /* @__PURE__ */ ((t) => (t.Authenticated = "authenticated", t.NotAuthenticated = "notAuthenticated", t.Pending = "pending", t))(D || {});
2974
- const Pr = () => {
3002
+ const Ar = () => {
2975
3003
  const { authenticationStatus: t } = Re();
2976
3004
  return t === D.NotAuthenticated ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2977
- /* @__PURE__ */ n.jsx(Or, {}),
2978
- /* @__PURE__ */ n.jsx(Sr, {})
2979
- ] }) : t === D.Pending ? /* @__PURE__ */ n.jsx(Er, {}) : /* @__PURE__ */ n.jsx(Rr, {});
3005
+ /* @__PURE__ */ n.jsx(Sr, {}),
3006
+ /* @__PURE__ */ n.jsx(Pr, {})
3007
+ ] }) : t === D.Pending ? /* @__PURE__ */ n.jsx(Or, {}) : /* @__PURE__ */ n.jsx(Er, {});
2980
3008
  };
2981
3009
  /*! js-cookie v3.0.5 | MIT */
2982
3010
  function ee(t) {
@@ -2987,7 +3015,7 @@ function ee(t) {
2987
3015
  }
2988
3016
  return t;
2989
3017
  }
2990
- var Ar = {
3018
+ var Nr = {
2991
3019
  read: function(t) {
2992
3020
  return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
2993
3021
  },
@@ -3048,14 +3076,14 @@ function Ce(t, e) {
3048
3076
  }
3049
3077
  );
3050
3078
  }
3051
- var xe = Ce(Ar, { path: "/" });
3079
+ var xe = Ce(Nr, { path: "/" });
3052
3080
  class Te extends Error {
3053
3081
  constructor(e) {
3054
3082
  super(e), this.name = "UnauthorizedError";
3055
3083
  }
3056
3084
  }
3057
- const Nr = () => {
3058
- const { i18n: t } = Q(), { profileEndpoint: e } = V();
3085
+ const Mr = () => {
3086
+ const { i18n: t } = Q(), { profileEndpoint: e } = $();
3059
3087
  return nt({
3060
3088
  // @ts-expect-error queryKey is the right type
3061
3089
  queryKey: ["profile"],
@@ -3078,7 +3106,7 @@ const Nr = () => {
3078
3106
  e ? D.Authenticated : D.Pending
3079
3107
  ), [i, o] = d.useState(
3080
3108
  e ? JSON.parse(t) : void 0
3081
- ), a = Nr();
3109
+ ), a = Mr();
3082
3110
  return d.useEffect(() => {
3083
3111
  if (a.isError && e && (xe.remove("profile"), r(D.NotAuthenticated)), a.isError && !e && r(D.NotAuthenticated), a.isSuccess) {
3084
3112
  r(D.Authenticated);
@@ -3098,18 +3126,27 @@ const Nr = () => {
3098
3126
  a.isLoading,
3099
3127
  a.isSuccess
3100
3128
  ]), { authenticationStatus: s, profile: i };
3101
- }, Mr = ({ position: t }) => {
3102
- const { authenticationStatus: e, profile: s } = Ct();
3103
- return /* @__PURE__ */ n.jsx(wr, { authenticationStatus: e, position: t, profile: s, children: /* @__PURE__ */ n.jsx(Pr, {}) });
3129
+ }, Fr = ({ position: t, bouMenuItems: e }) => {
3130
+ const { authenticationStatus: s, profile: r } = Ct();
3131
+ return /* @__PURE__ */ n.jsx(
3132
+ wr,
3133
+ {
3134
+ bouMenuItems: e,
3135
+ authenticationStatus: s,
3136
+ position: t,
3137
+ profile: r,
3138
+ children: /* @__PURE__ */ n.jsx(Ar, {})
3139
+ }
3140
+ );
3104
3141
  };
3105
- var Fr = Object.defineProperty, kr = Object.defineProperties, Lr = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable, Ue = (t, e, s) => e in t ? Fr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, q = (t, e) => {
3142
+ var kr = Object.defineProperty, Lr = Object.defineProperties, Dr = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable, Ue = (t, e, s) => e in t ? kr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, q = (t, e) => {
3106
3143
  for (var s in e || (e = {}))
3107
3144
  xt.call(e, s) && Ue(t, s, e[s]);
3108
3145
  if (ae)
3109
3146
  for (var s of ae(e))
3110
3147
  gt.call(e, s) && Ue(t, s, e[s]);
3111
3148
  return t;
3112
- }, G = (t, e) => kr(t, Lr(e)), $ = (t, e) => {
3149
+ }, G = (t, e) => Lr(t, Dr(e)), Z = (t, e) => {
3113
3150
  var s = {};
3114
3151
  for (var r in t)
3115
3152
  xt.call(t, r) && e.indexOf(r) < 0 && (s[r] = t[r]);
@@ -3117,14 +3154,14 @@ var Fr = Object.defineProperty, kr = Object.defineProperties, Lr = Object.getOwn
3117
3154
  for (var r of ae(t))
3118
3155
  e.indexOf(r) < 0 && gt.call(t, r) && (s[r] = t[r]);
3119
3156
  return s;
3120
- }, Dr = d.forwardRef((t, e) => {
3121
- const s = t, { isAuthenticated: r, className: i } = s, o = $(s, ["isAuthenticated", "className"]);
3157
+ }, Ir = d.forwardRef((t, e) => {
3158
+ const s = t, { isAuthenticated: r, className: i } = s, o = Z(s, ["isAuthenticated", "className"]);
3122
3159
  return /* @__PURE__ */ n.jsx(
3123
- H,
3160
+ V,
3124
3161
  q({
3125
3162
  type: "button",
3126
3163
  ref: e,
3127
- className: S(
3164
+ className: O(
3128
3165
  "button--neutral",
3129
3166
  "button--authentication",
3130
3167
  r && "button--authentication--authenticated",
@@ -3133,30 +3170,30 @@ var Fr = Object.defineProperty, kr = Object.defineProperties, Lr = Object.getOwn
3133
3170
  }, o)
3134
3171
  );
3135
3172
  });
3136
- Dr.displayName = "AuthenticationButton";
3137
- var Ir = (t) => {
3173
+ Ir.displayName = "AuthenticationButton";
3174
+ var Tr = (t) => {
3138
3175
  var e = t, {
3139
3176
  children: s
3140
- } = e, r = $(e, [
3177
+ } = e, r = Z(e, [
3141
3178
  "children"
3142
3179
  ]);
3143
3180
  return /* @__PURE__ */ n.jsx(U.Label, G(q({ className: "form--tc__label" }, r), { children: s }));
3144
3181
  }, bt = d.forwardRef(
3145
3182
  (t, e) => {
3146
- var s = t, { children: r } = s, i = $(s, ["children"]);
3183
+ var s = t, { children: r } = s, i = Z(s, ["children"]);
3147
3184
  return /* @__PURE__ */ n.jsx("form", G(q({ className: "form--tc", ref: e }, i), { children: r }));
3148
3185
  }
3149
3186
  );
3150
3187
  bt.displayName = "TermsAndConditionsForm";
3151
- var Tr = (t) => {
3188
+ var Ur = (t) => {
3152
3189
  var e = t, {
3153
3190
  children: s
3154
- } = e, r = $(e, [
3191
+ } = e, r = Z(e, [
3155
3192
  "children"
3156
3193
  ]);
3157
3194
  return /* @__PURE__ */ n.jsx("p", G(q({ className: "form--tc__description" }, r), { children: s }));
3158
- }, Ur = (t) => {
3159
- var e = t, { children: s } = e, r = $(e, ["children"]);
3195
+ }, Qr = (t) => {
3196
+ var e = t, { children: s } = e, r = Z(e, ["children"]);
3160
3197
  return /* @__PURE__ */ n.jsx(
3161
3198
  "a",
3162
3199
  G(q({
@@ -3169,16 +3206,16 @@ var Tr = (t) => {
3169
3206
  children: s
3170
3207
  })
3171
3208
  );
3172
- }, Qr = ({ children: t }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: t }), qr = d.forwardRef(
3209
+ }, qr = ({ children: t }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: t }), Br = d.forwardRef(
3173
3210
  (t, e) => /* @__PURE__ */ n.jsx(M.Close, G(q({ className: "hidden" }, t), { ref: e }))
3174
3211
  );
3175
- qr.displayName = "TermsAndConditionsClose";
3176
- var Br = (t) => {
3177
- var e = t, { children: s } = e, r = $(e, ["children"]);
3212
+ Br.displayName = "TermsAndConditionsClose";
3213
+ var Kr = (t) => {
3214
+ var e = t, { children: s } = e, r = Z(e, ["children"]);
3178
3215
  return /* @__PURE__ */ n.jsx("span", G(q({ className: "form--tc__error", role: "alert" }, r), { children: s }));
3179
3216
  };
3180
- const Kr = () => {
3181
- const { postTermsAndConditionsEndpoint: t } = V(), e = new We();
3217
+ const Hr = () => {
3218
+ const { postTermsAndConditionsEndpoint: t } = $(), e = new We();
3182
3219
  return fs({
3183
3220
  mutationFn: async (r) => {
3184
3221
  const i = await fetch(t, {
@@ -3195,8 +3232,8 @@ const Kr = () => {
3195
3232
  await e.invalidateQueries({ queryKey: ["gdpr"] });
3196
3233
  }
3197
3234
  });
3198
- }, Hr = () => {
3199
- const { i18n: t } = Q(), { getTermsAndConditionsEndpoint: e } = V(), { authenticationStatus: s } = Ct(), r = xe.get("hasAcceptedLatestTermsAndConditions"), i = [], o = r === "true", a = s === D.Authenticated;
3235
+ }, Vr = () => {
3236
+ const { i18n: t } = Q(), { getTermsAndConditionsEndpoint: e } = $(), { authenticationStatus: s } = Ct(), r = xe.get("hasAcceptedLatestTermsAndConditions"), i = [], o = r === "true", a = s === D.Authenticated;
3200
3237
  return nt({
3201
3238
  queryKey: ["gdpr"],
3202
3239
  queryFn: async () => {
@@ -3212,68 +3249,68 @@ const Kr = () => {
3212
3249
  enabled: a && !o,
3213
3250
  initialData: i
3214
3251
  });
3215
- }, Vr = ({ redirectUrl: t }) => {
3216
- const { t: e } = Q(), { apiUrl: s } = yt(), r = d.useRef(null), [i, o] = d.useState(0), [a, u] = d.useState({}), { mutate: l, isError: h } = Kr(), { AccessibleFormMessage: c, formRef: p } = _t({ submitCount: i, errors: a }), { data: m } = Hr(), f = !!(m != null && m.length), C = e("termsAndConditions.error.required"), b = () => {
3217
- var y;
3218
- (y = r == null ? void 0 : r.current) == null || y.click(), document.body.style.removeProperty("overflow");
3252
+ }, $r = ({ redirectUrl: t }) => {
3253
+ const { t: e } = Q(), { apiUrl: s } = yt(), r = d.useRef(null), [i, o] = d.useState(0), [a, u] = d.useState({}), { mutate: l, isError: h } = Hr(), { AccessibleFormMessage: c, formRef: p } = _t({ submitCount: i, errors: a }), { data: v } = Vr(), f = !!(v != null && v.length), y = e("termsAndConditions.error.required"), g = () => {
3254
+ var C;
3255
+ (C = r == null ? void 0 : r.current) == null || C.click(), document.body.style.removeProperty("overflow");
3219
3256
  };
3220
3257
  d.useEffect(() => {
3221
3258
  f && document.body.style.setProperty("overflow", "hidden");
3222
3259
  }, [f]), d.useEffect(() => {
3223
- h && u({ acceptedTC: C });
3224
- }, [C, h]);
3225
- const v = (y) => {
3226
- y.preventDefault(), o(i + 1);
3227
- const { acceptedTC: _ } = y.target;
3260
+ h && u({ acceptedTC: y });
3261
+ }, [y, h]);
3262
+ const m = (C) => {
3263
+ C.preventDefault(), o(i + 1);
3264
+ const { acceptedTC: _ } = C.target;
3228
3265
  if (_ instanceof RadioNodeList) {
3229
3266
  const j = Object.values(_);
3230
- j.every((N) => N.checked) ? (u({}), l(j.map((N) => N.value)), b()) : u({ acceptedTC: C });
3267
+ j.every((N) => N.checked) ? (u({}), l(j.map((N) => N.value)), g()) : u({ acceptedTC: y });
3231
3268
  } else
3232
- _ != null && _.checked ? (u({}), l([_.value]), b()) : u({ acceptedTC: C });
3269
+ _ != null && _.checked ? (u({}), l([_.value]), g()) : u({ acceptedTC: y });
3233
3270
  };
3234
3271
  return f ? /* @__PURE__ */ n.jsxs(M, { defaultOpen: f, isModal: !0, children: [
3235
3272
  c,
3236
3273
  /* @__PURE__ */ n.jsxs(M.Root, { children: [
3237
- /* @__PURE__ */ n.jsx(M.Header, { children: /* @__PURE__ */ n.jsx(M.Title, { icon: /* @__PURE__ */ n.jsx(_e, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(Qr, { children: e("termsAndConditions.title") }) }) }),
3238
- /* @__PURE__ */ n.jsx(M.Body, { children: /* @__PURE__ */ n.jsxs(bt, { ref: p, id: "tc-form", onSubmit: v, children: [
3239
- /* @__PURE__ */ n.jsxs(Tr, { children: [
3274
+ /* @__PURE__ */ n.jsx(M.Header, { children: /* @__PURE__ */ n.jsx(M.Title, { icon: /* @__PURE__ */ n.jsx(_e, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(qr, { children: e("termsAndConditions.title") }) }) }),
3275
+ /* @__PURE__ */ n.jsx(M.Body, { children: /* @__PURE__ */ n.jsxs(bt, { ref: p, id: "tc-form", onSubmit: m, children: [
3276
+ /* @__PURE__ */ n.jsxs(Ur, { children: [
3240
3277
  e("termsAndConditions.description"),
3241
- a.acceptedTC && /* @__PURE__ */ n.jsx(Br, { children: C })
3278
+ a.acceptedTC && /* @__PURE__ */ n.jsx(Kr, { children: y })
3242
3279
  ] }),
3243
- m.map(({ tcCode: y, title: _, URL: j }) => /* @__PURE__ */ n.jsx(
3280
+ v.map(({ tcCode: C, title: _, URL: j }) => /* @__PURE__ */ n.jsx(
3244
3281
  U,
3245
3282
  {
3246
- id: y,
3247
- value: y,
3283
+ id: C,
3284
+ value: C,
3248
3285
  name: "acceptedTC",
3249
3286
  variant: "primary",
3250
3287
  children: /* @__PURE__ */ n.jsxs(U.Content, { children: [
3251
- /* @__PURE__ */ n.jsx(Ir, { children: _ }),
3252
- /* @__PURE__ */ n.jsx(Ur, { href: j, children: e("termsAndConditions.action", { title: _ }) })
3288
+ /* @__PURE__ */ n.jsx(Tr, { children: _ }),
3289
+ /* @__PURE__ */ n.jsx(Qr, { href: j, children: e("termsAndConditions.action", { title: _ }) })
3253
3290
  ] })
3254
3291
  },
3255
- y
3292
+ C
3256
3293
  ))
3257
3294
  ] }) }),
3258
3295
  /* @__PURE__ */ n.jsxs(M.Footer, { children: [
3259
3296
  /* @__PURE__ */ n.jsx(
3260
3297
  "a",
3261
3298
  {
3262
- className: S("button", "button--secondary", "button--terms-and-conditions"),
3299
+ className: O("button", "button--secondary", "button--terms-and-conditions"),
3263
3300
  href: `${s}/logout?redirectUrl=${t}`,
3264
3301
  children: e("logout")
3265
3302
  }
3266
3303
  ),
3267
- /* @__PURE__ */ n.jsx(H, { form: "tc-form", type: "submit", variant: "primary", children: e("confirm") })
3304
+ /* @__PURE__ */ n.jsx(V, { form: "tc-form", type: "submit", variant: "primary", children: e("confirm") })
3268
3305
  ] })
3269
3306
  ] })
3270
3307
  ] }) : /* @__PURE__ */ n.jsx(n.Fragment, {});
3271
3308
  }, Gr = d.forwardRef(({ children: t, ...e }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...e, children: t }));
3272
3309
  Gr.displayName = "TermsAndConditionsForm";
3273
- const $r = new We(), Yr = ({ environment: t, redirectUrl: e, apiUrl: s, position: r }) => /* @__PURE__ */ n.jsx(Rt, { environment: t, children: /* @__PURE__ */ n.jsx(_r, { apiUrl: s, redirectUrl: e, children: /* @__PURE__ */ n.jsxs(es, { client: $r, children: [
3274
- /* @__PURE__ */ n.jsx(Mr, { position: r }),
3275
- /* @__PURE__ */ n.jsx(Vr, { redirectUrl: e })
3310
+ const Zr = new We(), zr = ({ environment: t, redirectUrl: e, apiUrl: s, position: r, bouMenuItems: i }) => /* @__PURE__ */ n.jsx(Rt, { environment: t, children: /* @__PURE__ */ n.jsx(_r, { apiUrl: s, redirectUrl: e, children: /* @__PURE__ */ n.jsxs(es, { client: Zr, children: [
3311
+ /* @__PURE__ */ n.jsx(Fr, { position: r, bouMenuItems: i }),
3312
+ /* @__PURE__ */ n.jsx($r, { redirectUrl: e })
3276
3313
  ] }) }) });
3277
3314
  export {
3278
- Yr as default
3315
+ zr as default
3279
3316
  };