@myxtra/authentication-green 1.1.1 → 1.2.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.
@@ -1,5 +1,5 @@
1
- import { r as c, j as n, g as wt, u as z, a as Qe, b as _t, E as Rt } from "./index-b97019f1.mjs";
2
- class B {
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
  }
@@ -19,7 +19,7 @@ class B {
19
19
  onUnsubscribe() {
20
20
  }
21
21
  }
22
- const Y = typeof window > "u" || "Deno" in window;
22
+ const z = typeof window > "u" || "Deno" in window;
23
23
  function k() {
24
24
  }
25
25
  function Et(t, e) {
@@ -31,7 +31,7 @@ function de(t) {
31
31
  function qe(t, e) {
32
32
  return Math.max(t + (e || 0) - Date.now(), 0);
33
33
  }
34
- function W(t, e, s) {
34
+ function Y(t, e, s) {
35
35
  return J(t) ? typeof e == "function" ? {
36
36
  ...s,
37
37
  queryKey: t,
@@ -73,7 +73,7 @@ function Ee(t, e) {
73
73
  } = t;
74
74
  if (J(a)) {
75
75
  if (r) {
76
- if (e.queryHash !== be(a, e.options))
76
+ if (e.queryHash !== ge(a, e.options))
77
77
  return !1;
78
78
  } else if (!se(e.queryKey, a))
79
79
  return !1;
@@ -103,7 +103,7 @@ function Oe(t, e) {
103
103
  }
104
104
  return !(typeof r == "boolean" && e.state.status === "loading" !== r || i && !i(e));
105
105
  }
106
- function be(t, e) {
106
+ function ge(t, e) {
107
107
  return ((e == null ? void 0 : e.queryKeyHashFn) || T)(t);
108
108
  }
109
109
  function T(t) {
@@ -171,10 +171,10 @@ 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 B {
174
+ class Pt extends H {
175
175
  constructor() {
176
176
  super(), this.setup = (e) => {
177
- if (!Y && window.addEventListener) {
177
+ if (!z && window.addEventListener) {
178
178
  const s = () => e();
179
179
  return window.addEventListener("visibilitychange", s, !1), window.addEventListener("focus", s, !1), () => {
180
180
  window.removeEventListener("visibilitychange", s), window.removeEventListener("focus", s);
@@ -198,7 +198,7 @@ class Pt extends B {
198
198
  });
199
199
  }
200
200
  setFocused(e) {
201
- this.focused = e, e && this.onFocus();
201
+ this.focused !== e && (this.focused = e, this.onFocus());
202
202
  }
203
203
  onFocus() {
204
204
  this.listeners.forEach(({
@@ -212,10 +212,10 @@ class Pt extends B {
212
212
  }
213
213
  }
214
214
  const re = new Pt(), Ne = ["online", "offline"];
215
- class At extends B {
215
+ class At extends H {
216
216
  constructor() {
217
217
  super(), this.setup = (e) => {
218
- if (!Y && window.addEventListener) {
218
+ if (!z && window.addEventListener) {
219
219
  const s = () => e();
220
220
  return Ne.forEach((r) => {
221
221
  window.addEventListener(r, s, !1);
@@ -243,7 +243,7 @@ class At extends B {
243
243
  });
244
244
  }
245
245
  setOnline(e) {
246
- this.online = e, e && this.onOnline();
246
+ this.online !== e && (this.online = e, this.onOnline());
247
247
  }
248
248
  onOnline() {
249
249
  this.listeners.forEach(({
@@ -263,98 +263,98 @@ function Nt(t) {
263
263
  function ue(t) {
264
264
  return (t ?? "online") === "online" ? ne.isOnline() : !0;
265
265
  }
266
- class Ge {
266
+ class Ve {
267
267
  constructor(e) {
268
268
  this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
269
269
  }
270
270
  }
271
271
  function te(t) {
272
- return t instanceof Ge;
272
+ return t instanceof Ve;
273
273
  }
274
- function Ve(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 Ge(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
- }, d = () => {
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
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) : g();
317
+ e ? f(C) : g();
318
318
  });
319
319
  });
320
320
  };
321
- return ue(t.networkMode) ? g() : C().then(g), {
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(),
325
325
  cancelRetry: h,
326
- continueRetry: d
326
+ continueRetry: c
327
327
  };
328
328
  }
329
- const ge = console;
329
+ const be = console;
330
330
  function Mt() {
331
- let t = [], e = 0, s = (d) => {
332
- d();
333
- }, r = (d) => {
334
- d();
331
+ let t = [], e = 0, s = (c) => {
332
+ c();
333
+ }, r = (c) => {
334
+ c();
335
335
  };
336
- const i = (d) => {
336
+ const i = (c) => {
337
337
  let p;
338
338
  e++;
339
339
  try {
340
- p = d();
340
+ p = c();
341
341
  } finally {
342
342
  e--, e || u();
343
343
  }
344
344
  return p;
345
- }, o = (d) => {
346
- e ? t.push(d) : Ae(() => {
347
- s(d);
345
+ }, o = (c) => {
346
+ e ? t.push(c) : Ae(() => {
347
+ s(c);
348
348
  });
349
- }, a = (d) => (...p) => {
349
+ }, a = (c) => (...p) => {
350
350
  o(() => {
351
- d(...p);
351
+ c(...p);
352
352
  });
353
353
  }, u = () => {
354
- const d = t;
355
- t = [], d.length && Ae(() => {
354
+ const c = t;
355
+ t = [], c.length && Ae(() => {
356
356
  r(() => {
357
- d.forEach((p) => {
357
+ c.forEach((p) => {
358
358
  s(p);
359
359
  });
360
360
  });
@@ -364,16 +364,16 @@ function Mt() {
364
364
  batch: i,
365
365
  batchCalls: a,
366
366
  schedule: o,
367
- setNotifyFunction: (d) => {
368
- s = d;
367
+ setNotifyFunction: (c) => {
368
+ s = c;
369
369
  },
370
- setBatchNotifyFunction: (d) => {
371
- r = d;
370
+ setBatchNotifyFunction: (c) => {
371
+ r = c;
372
372
  }
373
373
  };
374
374
  }
375
375
  const P = Mt();
376
- class $e {
376
+ class Ge {
377
377
  destroy() {
378
378
  this.clearGcTimeout();
379
379
  }
@@ -383,15 +383,15 @@ class $e {
383
383
  }, this.cacheTime));
384
384
  }
385
385
  updateCacheTime(e) {
386
- this.cacheTime = Math.max(this.cacheTime || 0, e ?? (Y ? 1 / 0 : 5 * 60 * 1e3));
386
+ this.cacheTime = Math.max(this.cacheTime || 0, e ?? (z ? 1 / 0 : 5 * 60 * 1e3));
387
387
  }
388
388
  clearGcTimeout() {
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
- super(), this.abortSignalConsumed = !1, this.defaultOptions = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.cache = e.cache, this.logger = e.logger || ge, this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.initialState = e.state || kt(this.options), this.state = this.initialState, this.scheduleGc();
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
  }
396
396
  get meta() {
397
397
  return this.options.meta;
@@ -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);
@@ -515,47 +515,47 @@ class Ft extends $e {
515
515
  });
516
516
  };
517
517
  l(u);
518
- const h = () => this.options.queryFn ? (this.abortSignalConsumed = !1, this.options.queryFn(u)) : Promise.reject("Missing queryFn for queryKey '" + this.options.queryHash + "'"), d = {
518
+ const h = () => this.options.queryFn ? (this.abortSignalConsumed = !1, this.options.queryFn(u)) : Promise.reject("Missing queryFn for queryKey '" + this.options.queryHash + "'"), c = {
519
519
  fetchOptions: s,
520
520
  options: this.options,
521
521
  queryKey: this.queryKey,
522
522
  state: this.state,
523
523
  fetchFn: h
524
524
  };
525
- if (l(d), (r = this.options.behavior) == null || r.onFetch(d), this.revertState = this.state, this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((i = d.fetchOptions) == null ? void 0 : i.meta)) {
525
+ if (l(c), (r = this.options.behavior) == null || r.onFetch(c), this.revertState = this.state, this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((i = c.fetchOptions) == null ? void 0 : i.meta)) {
526
526
  var p;
527
527
  this.dispatch({
528
528
  type: "fetch",
529
- meta: (p = d.fetchOptions) == null ? void 0 : p.meta
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, g, v, y;
538
- (C = (g = this.cache.config).onError) == null || C.call(g, 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 = Ve({
543
- fn: d.fetchFn,
542
+ return this.retryer = $e({
543
+ fn: c.fetchFn,
544
544
  abort: a == null ? void 0 : a.abort.bind(a),
545
545
  onSuccess: (f) => {
546
- var C, g, 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 = (g = this.cache.config).onSuccess) == null || C.call(g, 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: () => {
@@ -568,9 +568,9 @@ class Ft extends $e {
568
568
  type: "continue"
569
569
  });
570
570
  },
571
- retry: d.options.retry,
572
- retryDelay: d.options.retryDelay,
573
- networkMode: d.options.networkMode
571
+ retry: c.options.retry,
572
+ retryDelay: c.options.retryDelay,
573
+ networkMode: c.options.networkMode
574
574
  }), this.promise = this.retryer.promise, this.promise;
575
575
  }
576
576
  dispatch(e) {
@@ -674,13 +674,13 @@ function kt(t) {
674
674
  fetchStatus: "idle"
675
675
  };
676
676
  }
677
- class Lt extends B {
677
+ class Lt extends H {
678
678
  constructor(e) {
679
679
  super(), this.config = e || {}, this.queries = [], this.queriesMap = {};
680
680
  }
681
681
  build(e, s, r) {
682
682
  var i;
683
- const o = s.queryKey, a = (i = s.queryHash) != null ? i : be(o, s);
683
+ const o = s.queryKey, a = (i = s.queryHash) != null ? i : ge(o, s);
684
684
  let u = this.get(a);
685
685
  return u || (u = new Ft({
686
686
  cache: this,
@@ -750,9 +750,9 @@ class Lt extends B {
750
750
  });
751
751
  }
752
752
  }
753
- class Dt extends $e {
753
+ class Dt extends Ge {
754
754
  constructor(e) {
755
- super(), this.defaultOptions = e.defaultOptions, this.mutationId = e.mutationId, this.mutationCache = e.mutationCache, this.logger = e.logger || ge, this.observers = [], this.state = e.state || Ze(), this.setOptions(e.options), this.scheduleGc();
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
  }
757
757
  setOptions(e) {
758
758
  this.options = {
@@ -793,7 +793,7 @@ class Dt extends $e {
793
793
  async execute() {
794
794
  const e = () => {
795
795
  var w;
796
- return this.retryer = Ve({
796
+ return this.retryer = $e({
797
797
  fn: () => this.options.mutationFn ? this.options.mutationFn(this.state.variables) : Promise.reject("No mutationFn found"),
798
798
  onFail: (b, F) => {
799
799
  this.dispatch({
@@ -818,14 +818,14 @@ class Dt extends $e {
818
818
  }), this.retryer.promise;
819
819
  }, s = this.state.status === "loading";
820
820
  try {
821
- var r, i, o, a, u, l, h, d;
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 b = await ((f = (C = this.options).onMutate) == null ? void 0 : f.call(C, this.state.variables));
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
829
  b !== this.state.context && this.dispatch({
830
830
  type: "loading",
831
831
  context: b,
@@ -833,14 +833,14 @@ class Dt extends $e {
833
833
  });
834
834
  }
835
835
  const w = await e();
836
- return await ((r = (i = this.mutationCache.config).onSuccess) == null ? void 0 : r.call(i, w, this.state.variables, this.state.context, this)), await ((o = (a = this.options).onSuccess) == null ? void 0 : o.call(a, w, this.state.variables, this.state.context)), await ((u = (l = this.mutationCache.config).onSettled) == null ? void 0 : u.call(l, w, null, this.state.variables, this.state.context, this)), await ((h = (d = this.options).onSettled) == null ? void 0 : h.call(d, w, null, this.state.variables, this.state.context)), this.dispatch({
836
+ return await ((r = (i = this.mutationCache.config).onSuccess) == null ? void 0 : r.call(i, w, this.state.variables, this.state.context, this)), await ((o = (a = this.options).onSuccess) == null ? void 0 : o.call(a, w, this.state.variables, this.state.context)), await ((u = (l = this.mutationCache.config).onSettled) == null ? void 0 : u.call(l, w, null, this.state.variables, this.state.context, this)), await ((h = (c = this.options).onSettled) == null ? void 0 : h.call(c, w, null, this.state.variables, this.state.context)), this.dispatch({
837
837
  type: "success",
838
838
  data: w
839
839
  }), w;
840
840
  } catch (w) {
841
841
  try {
842
- var g, v, y, _, j, O, N, R;
843
- throw await ((g = (v = this.mutationCache.config).onError) == null ? void 0 : g.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 B {
933
+ class It extends H {
934
934
  constructor(e) {
935
935
  super(), this.config = e || {}, this.mutations = [], this.mutationId = 0;
936
936
  }
@@ -997,9 +997,9 @@ 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, d = (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, g = !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: () => {
@@ -1015,45 +1015,45 @@ function Tt() {
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, b, F) => (C = F ? [w, ...C] : [...C, w], F ? [b, ...R] : [...R, b]), j = (R, w, b, F) => {
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
1019
  if (g)
1020
1020
  return Promise.reject("Cancelled");
1021
1021
  if (typeof b > "u" && !w && R.length)
1022
1022
  return Promise.resolve(R);
1023
- const $ = {
1023
+ const W = {
1024
1024
  queryKey: t.queryKey,
1025
1025
  pageParam: b,
1026
1026
  meta: t.options.meta
1027
1027
  };
1028
- v($);
1029
- const le = y($);
1028
+ m(W);
1029
+ const le = C(W);
1030
1030
  return Promise.resolve(le).then((jt) => _(R, b, jt, F));
1031
1031
  };
1032
- let O;
1033
- if (!m.length)
1034
- O = j([]);
1035
- else if (d) {
1036
- const R = typeof h < "u", w = R ? h : Me(t.options, m);
1037
- O = j(m, R, w);
1032
+ let S;
1033
+ if (!v.length)
1034
+ S = j([]);
1035
+ else if (c) {
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 b = 1; b < m.length; b++)
1046
- O = O.then((F) => {
1047
- if (u && m[b] ? u(m[b], b, m) : !0) {
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
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[b], m[b]));
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
  }
@@ -1067,7 +1067,7 @@ function Ut(t, e) {
1067
1067
  }
1068
1068
  class We {
1069
1069
  constructor(e = {}) {
1070
- this.queryCache = e.queryCache || new Lt(), this.mutationCache = e.mutationCache || new It(), this.logger = e.logger || ge, this.defaultOptions = e.defaultOptions || {}, this.queryDefaults = [], this.mutationDefaults = [], this.mountCount = 0;
1070
+ this.queryCache = e.queryCache || new Lt(), this.mutationCache = e.mutationCache || new It(), this.logger = e.logger || be, this.defaultOptions = e.defaultOptions || {}, this.queryDefaults = [], this.mutationDefaults = [], this.mountCount = 0;
1071
1071
  }
1072
1072
  mount() {
1073
1073
  this.mountCount++, this.mountCount === 1 && (this.unsubscribeFocus = re.subscribe(() => {
@@ -1095,7 +1095,7 @@ class We {
1095
1095
  return (r = this.queryCache.find(e, s)) == null ? void 0 : r.state.data;
1096
1096
  }
1097
1097
  ensureQueryData(e, s, r) {
1098
- const i = W(e, s, r), o = this.getQueryData(i.queryKey);
1098
+ const i = Y(e, s, r), o = this.getQueryData(i.queryKey);
1099
1099
  return o ? Promise.resolve(o) : this.fetchQuery(i);
1100
1100
  }
1101
1101
  getQueriesData(e) {
@@ -1111,7 +1111,7 @@ class We {
1111
1111
  const i = this.queryCache.find(e), o = i == null ? void 0 : i.state.data, a = Et(s, o);
1112
1112
  if (typeof a > "u")
1113
1113
  return;
1114
- const u = W(e), l = this.defaultQueryOptions(u);
1114
+ const u = Y(e), l = this.defaultQueryOptions(u);
1115
1115
  return this.queryCache.build(this, l).setData(a, {
1116
1116
  ...r,
1117
1117
  manual: !0
@@ -1179,7 +1179,7 @@ class We {
1179
1179
  return o != null && o.throwOnError || (u = u.catch(k)), u;
1180
1180
  }
1181
1181
  fetchQuery(e, s, r) {
1182
- const i = W(e, s, r), o = this.defaultQueryOptions(i);
1182
+ const i = Y(e, s, r), o = this.defaultQueryOptions(i);
1183
1183
  typeof o.retry > "u" && (o.retry = !1);
1184
1184
  const a = this.queryCache.build(this, o);
1185
1185
  return a.isStaleByTime(o.staleTime) ? a.fetch(o) : Promise.resolve(a.state.data);
@@ -1188,7 +1188,7 @@ class We {
1188
1188
  return this.fetchQuery(e, s, r).then(k).catch(k);
1189
1189
  }
1190
1190
  fetchInfiniteQuery(e, s, r) {
1191
- const i = W(e, s, r);
1191
+ const i = Y(e, s, r);
1192
1192
  return i.behavior = Tt(), this.fetchQuery(i);
1193
1193
  }
1194
1194
  prefetchInfiniteQuery(e, s, r) {
@@ -1247,7 +1247,7 @@ class We {
1247
1247
  ...e,
1248
1248
  _defaulted: !0
1249
1249
  };
1250
- return !s.queryHash && s.queryKey && (s.queryHash = be(s.queryKey, s)), typeof s.refetchOnReconnect > "u" && (s.refetchOnReconnect = s.networkMode !== "always"), typeof s.useErrorBoundary > "u" && (s.useErrorBoundary = !!s.suspense), s;
1250
+ return !s.queryHash && s.queryKey && (s.queryHash = ge(s.queryKey, s)), typeof s.refetchOnReconnect > "u" && (s.refetchOnReconnect = s.networkMode !== "always"), typeof s.useErrorBoundary > "u" && (s.useErrorBoundary = !!s.suspense), s;
1251
1251
  }
1252
1252
  defaultMutationOptions(e) {
1253
1253
  return e != null && e._defaulted ? e : {
@@ -1261,7 +1261,7 @@ class We {
1261
1261
  this.queryCache.clear(), this.mutationCache.clear();
1262
1262
  }
1263
1263
  }
1264
- class Qt extends B {
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
  }
@@ -1298,8 +1298,8 @@ class Qt extends B {
1298
1298
  o && (this.currentQuery !== i || this.options.enabled !== r.enabled || a !== this.currentRefetchInterval) && this.updateRefetchInterval(a);
1299
1299
  }
1300
1300
  getOptimisticResult(e) {
1301
- const s = this.client.getQueryCache().build(this.client, e);
1302
- return this.createResult(s, e);
1301
+ const s = this.client.getQueryCache().build(this.client, e), r = this.createResult(s, e);
1302
+ return Bt(this, r, e) && (this.currentResult = r, this.currentResultOptions = this.options, this.currentResultState = this.currentQuery.state), r;
1303
1303
  }
1304
1304
  getCurrentResult() {
1305
1305
  return this.currentResult;
@@ -1348,7 +1348,7 @@ class Qt extends B {
1348
1348
  return e != null && e.throwOnError || (s = s.catch(k)), s;
1349
1349
  }
1350
1350
  updateStaleTimeout() {
1351
- if (this.clearStaleTimeout(), Y || this.currentResult.isStale || !de(this.options.staleTime))
1351
+ if (this.clearStaleTimeout(), z || this.currentResult.isStale || !de(this.options.staleTime))
1352
1352
  return;
1353
1353
  const s = qe(this.currentResult.dataUpdatedAt, this.options.staleTime) + 1;
1354
1354
  this.staleTimeoutId = setTimeout(() => {
@@ -1360,7 +1360,7 @@ class Qt extends B {
1360
1360
  return typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (e = this.options.refetchInterval) != null ? e : !1;
1361
1361
  }
1362
1362
  updateRefetchInterval(e) {
1363
- this.clearRefetchInterval(), this.currentRefetchInterval = e, !(Y || this.options.enabled === !1 || !de(this.currentRefetchInterval) || this.currentRefetchInterval === 0) && (this.refetchIntervalId = setInterval(() => {
1363
+ this.clearRefetchInterval(), this.currentRefetchInterval = e, !(z || this.options.enabled === !1 || !de(this.currentRefetchInterval) || this.currentRefetchInterval === 0) && (this.refetchIntervalId = setInterval(() => {
1364
1364
  (this.options.refetchIntervalInBackground || re.isFocused()) && this.executeFetch();
1365
1365
  }, this.currentRefetchInterval));
1366
1366
  }
@@ -1374,22 +1374,22 @@ class Qt extends B {
1374
1374
  this.refetchIntervalId && (clearInterval(this.refetchIntervalId), this.refetchIntervalId = void 0);
1375
1375
  }
1376
1376
  createResult(e, s) {
1377
- const r = this.currentQuery, i = this.options, o = this.currentResult, a = this.currentResultState, u = this.currentResultOptions, l = e !== r, h = l ? e.state : this.currentQueryInitialState, d = l ? this.currentResult : this.previousQueryResult, {
1377
+ const r = this.currentQuery, i = this.options, o = this.currentResult, a = this.currentResultState, u = this.currentResultOptions, l = e !== r, h = l ? e.state : this.currentQueryInitialState, c = l ? this.currentResult : this.previousQueryResult, {
1378
1378
  state: p
1379
1379
  } = e;
1380
1380
  let {
1381
- dataUpdatedAt: m,
1381
+ dataUpdatedAt: v,
1382
1382
  error: f,
1383
- errorUpdatedAt: C,
1383
+ errorUpdatedAt: y,
1384
1384
  fetchStatus: g,
1385
- status: v
1386
- } = p, y = !1, _ = !1, j;
1385
+ status: m
1386
+ } = p, C = !1, _ = !1, j;
1387
1387
  if (s._optimisticResults) {
1388
- const b = this.hasListeners(), F = !b && Fe(e, s), $ = b && ke(e, r, s, i);
1389
- (F || $) && (g = ue(e.options.networkMode) ? "fetching" : "paused", m || (v = "loading")), s._optimisticResults === "isRestoring" && (g = "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 && d != null && d.isSuccess && v !== "error")
1392
- j = d.data, m = d.dataUpdatedAt, v = d.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;
@@ -1401,7 +1401,7 @@ class Qt extends B {
1401
1401
  }
1402
1402
  else
1403
1403
  j = p.data;
1404
- if (typeof s.placeholderData < "u" && typeof j > "u" && v === "loading") {
1404
+ if (typeof s.placeholderData < "u" && typeof j > "u" && m === "loading") {
1405
1405
  let b;
1406
1406
  if (o != null && o.isPlaceholderData && s.placeholderData === (u == null ? void 0 : u.placeholderData))
1407
1407
  b = o.data;
@@ -1411,32 +1411,32 @@ class Qt extends B {
1411
1411
  } catch (F) {
1412
1412
  this.selectError = F;
1413
1413
  }
1414
- typeof b < "u" && (v = "success", j = pe(o == null ? void 0 : o.data, b, 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 = g === "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,
1419
+ status: m,
1420
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
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,
@@ -1455,13 +1455,13 @@ class Qt extends B {
1455
1455
  return !0;
1456
1456
  const {
1457
1457
  notifyOnChangeProps: a
1458
- } = this.options;
1459
- if (a === "all" || !a && !this.trackedProps.size)
1458
+ } = this.options, u = typeof a == "function" ? a() : a;
1459
+ if (u === "all" || !u && !this.trackedProps.size)
1460
1460
  return !0;
1461
- const u = new Set(a ?? this.trackedProps);
1462
- return this.options.useErrorBoundary && u.add("error"), Object.keys(this.currentResult).some((l) => {
1463
- const h = l;
1464
- return this.currentResult[h] !== s[h] && u.has(h);
1461
+ const l = new Set(u ?? this.trackedProps);
1462
+ return this.options.useErrorBoundary && l.add("error"), Object.keys(this.currentResult).some((h) => {
1463
+ const c = h;
1464
+ return this.currentResult[c] !== s[c] && l.has(c);
1465
1465
  });
1466
1466
  };
1467
1467
  (e == null ? void 0 : e.listeners) !== !1 && o() && (i.listeners = !0), this.notify({
@@ -1490,9 +1490,9 @@ class Qt extends B {
1490
1490
  (a = (u = this.options).onError) == null || a.call(u, this.currentResult.error), (l = (h = this.options).onSettled) == null || l.call(h, void 0, this.currentResult.error);
1491
1491
  }
1492
1492
  e.listeners && this.listeners.forEach(({
1493
- listener: d
1493
+ listener: c
1494
1494
  }) => {
1495
- d(this.currentResult);
1495
+ c(this.currentResult);
1496
1496
  }), e.cache && this.client.getQueryCache().notify({
1497
1497
  query: this.currentQuery,
1498
1498
  type: "observerResultsUpdated"
@@ -1519,7 +1519,10 @@ function ke(t, e, s, r) {
1519
1519
  function je(t, e) {
1520
1520
  return t.isStaleByTime(e.staleTime);
1521
1521
  }
1522
- class Bt extends B {
1522
+ function Bt(t, e, s) {
1523
+ return s.keepPreviousData ? !1 : s.placeholderData !== void 0 ? e.isPlaceholderData : t.getCurrentResult() !== e;
1524
+ }
1525
+ class Kt extends H {
1523
1526
  constructor(e, s) {
1524
1527
  super(), this.client = e, this.setOptions(s), this.bindMethods(), this.updateResult();
1525
1528
  }
@@ -1586,9 +1589,9 @@ class Bt extends B {
1586
1589
  }
1587
1590
  }
1588
1591
  e.listeners && this.listeners.forEach(({
1589
- listener: d
1592
+ listener: c
1590
1593
  }) => {
1591
- d(this.currentResult);
1594
+ c(this.currentResult);
1592
1595
  });
1593
1596
  });
1594
1597
  }
@@ -1603,67 +1606,67 @@ var Ye = { exports: {} }, ze = {};
1603
1606
  * This source code is licensed under the MIT license found in the
1604
1607
  * LICENSE file in the root directory of this source tree.
1605
1608
  */
1606
- var q = c;
1607
- function Kt(t, e) {
1609
+ var K = d;
1610
+ function Ht(t, e) {
1608
1611
  return t === e && (t !== 0 || 1 / t === 1 / e) || t !== t && e !== e;
1609
1612
  }
1610
- var Ht = typeof Object.is == "function" ? Object.is : Kt, Gt = q.useState, Vt = q.useEffect, $t = q.useLayoutEffect, Zt = q.useDebugValue;
1611
- function Wt(t, e) {
1612
- var s = e(), r = Gt({ inst: { value: s, getSnapshot: e } }), i = r[0].inst, o = r[1];
1613
- return $t(function() {
1613
+ var Vt = typeof Object.is == "function" ? Object.is : Ht, $t = K.useState, Gt = K.useEffect, Zt = K.useLayoutEffect, Wt = K.useDebugValue;
1614
+ function Yt(t, e) {
1615
+ var s = e(), r = $t({ inst: { value: s, getSnapshot: e } }), i = r[0].inst, o = r[1];
1616
+ return Zt(function() {
1614
1617
  i.value = s, i.getSnapshot = e, ce(i) && o({ inst: i });
1615
- }, [t, s, e]), Vt(function() {
1618
+ }, [t, s, e]), Gt(function() {
1616
1619
  return ce(i) && o({ inst: i }), t(function() {
1617
1620
  ce(i) && o({ inst: i });
1618
1621
  });
1619
- }, [t]), Zt(s), s;
1622
+ }, [t]), Wt(s), s;
1620
1623
  }
1621
1624
  function ce(t) {
1622
1625
  var e = t.getSnapshot;
1623
1626
  t = t.value;
1624
1627
  try {
1625
1628
  var s = e();
1626
- return !Ht(t, s);
1629
+ return !Vt(t, s);
1627
1630
  } catch {
1628
1631
  return !0;
1629
1632
  }
1630
1633
  }
1631
- function Yt(t, e) {
1634
+ function zt(t, e) {
1632
1635
  return e();
1633
1636
  }
1634
- var zt = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? Yt : Wt;
1635
- ze.useSyncExternalStore = q.useSyncExternalStore !== void 0 ? q.useSyncExternalStore : zt;
1637
+ var Jt = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? zt : Yt;
1638
+ ze.useSyncExternalStore = K.useSyncExternalStore !== void 0 ? K.useSyncExternalStore : Jt;
1636
1639
  Ye.exports = ze;
1637
- var Jt = Ye.exports;
1638
- const Je = Jt.useSyncExternalStore, Le = /* @__PURE__ */ c.createContext(void 0), Xe = /* @__PURE__ */ c.createContext(!1);
1640
+ var Xt = Ye.exports;
1641
+ const Je = Xt.useSyncExternalStore, Le = /* @__PURE__ */ d.createContext(void 0), Xe = /* @__PURE__ */ d.createContext(!1);
1639
1642
  function et(t, e) {
1640
1643
  return t || (e && typeof window < "u" ? (window.ReactQueryClientContext || (window.ReactQueryClientContext = Le), window.ReactQueryClientContext) : Le);
1641
1644
  }
1642
1645
  const tt = ({
1643
1646
  context: t
1644
1647
  } = {}) => {
1645
- const e = c.useContext(et(t, c.useContext(Xe)));
1648
+ const e = d.useContext(et(t, d.useContext(Xe)));
1646
1649
  if (!e)
1647
1650
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1648
1651
  return e;
1649
- }, Xt = ({
1652
+ }, es = ({
1650
1653
  client: t,
1651
1654
  children: e,
1652
1655
  context: s,
1653
1656
  contextSharing: r = !1
1654
1657
  }) => {
1655
- c.useEffect(() => (t.mount(), () => {
1658
+ d.useEffect(() => (t.mount(), () => {
1656
1659
  t.unmount();
1657
1660
  }), [t]);
1658
1661
  const i = et(s, r);
1659
- return /* @__PURE__ */ c.createElement(Xe.Provider, {
1662
+ return /* @__PURE__ */ d.createElement(Xe.Provider, {
1660
1663
  value: !s && r
1661
- }, /* @__PURE__ */ c.createElement(i.Provider, {
1664
+ }, /* @__PURE__ */ d.createElement(i.Provider, {
1662
1665
  value: t
1663
1666
  }, e));
1664
- }, st = /* @__PURE__ */ c.createContext(!1), es = () => c.useContext(st);
1667
+ }, st = /* @__PURE__ */ d.createContext(!1), ts = () => d.useContext(st);
1665
1668
  st.Provider;
1666
- function ts() {
1669
+ function ss() {
1667
1670
  let t = !1;
1668
1671
  return {
1669
1672
  clearReset: () => {
@@ -1675,47 +1678,47 @@ function ts() {
1675
1678
  isReset: () => t
1676
1679
  };
1677
1680
  }
1678
- const ss = /* @__PURE__ */ c.createContext(ts()), rs = () => c.useContext(ss);
1681
+ const rs = /* @__PURE__ */ d.createContext(ss()), ns = () => d.useContext(rs);
1679
1682
  function rt(t, e) {
1680
1683
  return typeof t == "function" ? t(...e) : !!t;
1681
1684
  }
1682
- const ns = (t, e) => {
1685
+ const is = (t, e) => {
1683
1686
  (t.suspense || t.useErrorBoundary) && (e.isReset() || (t.retryOnMount = !1));
1684
- }, is = (t) => {
1685
- c.useEffect(() => {
1687
+ }, os = (t) => {
1688
+ d.useEffect(() => {
1686
1689
  t.clearReset();
1687
1690
  }, [t]);
1688
- }, os = ({
1691
+ }, as = ({
1689
1692
  result: t,
1690
1693
  errorResetBoundary: e,
1691
1694
  useErrorBoundary: s,
1692
1695
  query: r
1693
- }) => t.isError && !e.isReset() && !t.isFetching && rt(s, [t.error, r]), as = (t) => {
1696
+ }) => t.isError && !e.isReset() && !t.isFetching && rt(s, [t.error, r]), us = (t) => {
1694
1697
  t.suspense && typeof t.staleTime != "number" && (t.staleTime = 1e3);
1695
- }, us = (t, e) => t.isLoading && t.isFetching && !e, ls = (t, e, s) => (t == null ? void 0 : t.suspense) && us(e, s), cs = (t, e, s) => e.fetchOptimistic(t).then(({
1698
+ }, ls = (t, e) => t.isLoading && t.isFetching && !e, cs = (t, e, s) => (t == null ? void 0 : t.suspense) && ls(e, s), ds = (t, e, s) => e.fetchOptimistic(t).then(({
1696
1699
  data: r
1697
1700
  }) => {
1698
1701
  t.onSuccess == null || t.onSuccess(r), t.onSettled == null || t.onSettled(r, null);
1699
1702
  }).catch((r) => {
1700
1703
  s.clearReset(), t.onError == null || t.onError(r), t.onSettled == null || t.onSettled(void 0, r);
1701
1704
  });
1702
- function ds(t, e) {
1705
+ function hs(t, e) {
1703
1706
  const s = tt({
1704
1707
  context: t.context
1705
- }), r = es(), i = rs(), o = s.defaultQueryOptions(t);
1706
- o._optimisticResults = r ? "isRestoring" : "optimistic", o.onError && (o.onError = P.batchCalls(o.onError)), o.onSuccess && (o.onSuccess = P.batchCalls(o.onSuccess)), o.onSettled && (o.onSettled = P.batchCalls(o.onSettled)), as(o), ns(o, i), is(i);
1707
- const [a] = c.useState(() => new e(s, o)), u = a.getOptimisticResult(o);
1708
- if (Je(c.useCallback((l) => {
1708
+ }), r = ts(), i = ns(), o = s.defaultQueryOptions(t);
1709
+ o._optimisticResults = r ? "isRestoring" : "optimistic", o.onError && (o.onError = P.batchCalls(o.onError)), o.onSuccess && (o.onSuccess = P.batchCalls(o.onSuccess)), o.onSettled && (o.onSettled = P.batchCalls(o.onSettled)), us(o), is(o, i), os(i);
1710
+ const [a] = d.useState(() => new e(s, o)), u = a.getOptimisticResult(o);
1711
+ if (Je(d.useCallback((l) => {
1709
1712
  const h = r ? () => {
1710
1713
  } : a.subscribe(P.batchCalls(l));
1711
1714
  return a.updateResult(), h;
1712
- }, [a, r]), () => a.getCurrentResult(), () => a.getCurrentResult()), c.useEffect(() => {
1715
+ }, [a, r]), () => a.getCurrentResult(), () => a.getCurrentResult()), d.useEffect(() => {
1713
1716
  a.setOptions(o, {
1714
1717
  listeners: !1
1715
1718
  });
1716
- }, [o, a]), ls(o, u, r))
1717
- throw cs(o, a, i);
1718
- if (os({
1719
+ }, [o, a]), cs(o, u, r))
1720
+ throw ds(o, a, i);
1721
+ if (as({
1719
1722
  result: u,
1720
1723
  errorResetBoundary: i,
1721
1724
  useErrorBoundary: o.useErrorBoundary,
@@ -1725,18 +1728,18 @@ function ds(t, e) {
1725
1728
  return o.notifyOnChangeProps ? u : a.trackResult(u);
1726
1729
  }
1727
1730
  function nt(t, e, s) {
1728
- const r = W(t, e, s);
1729
- return ds(r, Qt);
1731
+ const r = Y(t, e, s);
1732
+ return hs(r, Qt);
1730
1733
  }
1731
- function hs(t, e, s) {
1734
+ function fs(t, e, s) {
1732
1735
  const r = Ot(t, e, s), i = tt({
1733
1736
  context: r.context
1734
- }), [o] = c.useState(() => new Bt(i, r));
1735
- c.useEffect(() => {
1737
+ }), [o] = d.useState(() => new Kt(i, r));
1738
+ d.useEffect(() => {
1736
1739
  o.setOptions(r);
1737
1740
  }, [o, r]);
1738
- const a = Je(c.useCallback((l) => o.subscribe(P.batchCalls(l)), [o]), () => o.getCurrentResult(), () => o.getCurrentResult()), u = c.useCallback((l, h) => {
1739
- o.mutate(l, h).catch(fs);
1741
+ const a = Je(d.useCallback((l) => o.subscribe(P.batchCalls(l)), [o]), () => o.getCurrentResult(), () => o.getCurrentResult()), u = d.useCallback((l, h) => {
1742
+ o.mutate(l, h).catch(ps);
1740
1743
  }, [o]);
1741
1744
  if (a.error && rt(o.options.useErrorBoundary, [a.error]))
1742
1745
  throw a.error;
@@ -1746,7 +1749,7 @@ function hs(t, e, s) {
1746
1749
  mutateAsync: a.mutate
1747
1750
  };
1748
1751
  }
1749
- function fs() {
1752
+ function ps() {
1750
1753
  }
1751
1754
  function it(t) {
1752
1755
  var e, s, r = "";
@@ -1761,19 +1764,19 @@ function it(t) {
1761
1764
  t[e] && (r && (r += " "), r += e);
1762
1765
  return r;
1763
1766
  }
1764
- function S() {
1767
+ function O() {
1765
1768
  for (var t, e, s = 0, r = ""; s < arguments.length; )
1766
1769
  (t = arguments[s++]) && (e = it(t)) && (r && (r += " "), r += e);
1767
1770
  return r;
1768
1771
  }
1769
- var ps = Object.defineProperty, vs = Object.defineProperties, ms = Object.getOwnPropertyDescriptors, ie = Object.getOwnPropertySymbols, ot = Object.prototype.hasOwnProperty, at = Object.prototype.propertyIsEnumerable, De = (t, e, s) => e in t ? ps(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, x = (t, e) => {
1772
+ var vs = Object.defineProperty, ms = Object.defineProperties, ys = Object.getOwnPropertyDescriptors, ie = Object.getOwnPropertySymbols, ot = Object.prototype.hasOwnProperty, at = Object.prototype.propertyIsEnumerable, De = (t, e, s) => e in t ? vs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, x = (t, e) => {
1770
1773
  for (var s in e || (e = {}))
1771
1774
  ot.call(e, s) && De(t, s, e[s]);
1772
1775
  if (ie)
1773
1776
  for (var s of ie(e))
1774
1777
  at.call(e, s) && De(t, s, e[s]);
1775
1778
  return t;
1776
- }, E = (t, e) => vs(t, ms(e)), A = (t, e) => {
1779
+ }, E = (t, e) => ms(t, ys(e)), A = (t, e) => {
1777
1780
  var s = {};
1778
1781
  for (var r in t)
1779
1782
  ot.call(t, r) && e.indexOf(r) < 0 && (s[r] = t[r]);
@@ -1792,39 +1795,39 @@ function oe() {
1792
1795
  return t;
1793
1796
  }, oe.apply(this, arguments);
1794
1797
  }
1795
- function ys(t, e) {
1798
+ function Cs(t, e) {
1796
1799
  typeof t == "function" ? t(e) : t != null && (t.current = e);
1797
1800
  }
1798
- function Cs(...t) {
1801
+ function xs(...t) {
1799
1802
  return (e) => t.forEach(
1800
- (s) => ys(s, e)
1803
+ (s) => Cs(s, e)
1801
1804
  );
1802
1805
  }
1803
- var xs = /* @__PURE__ */ c.forwardRef((t, e) => {
1804
- const s = t, { children: r } = s, i = A(s, ["children"]), o = c.Children.toArray(r), a = o.find(gs);
1806
+ var gs = /* @__PURE__ */ d.forwardRef((t, e) => {
1807
+ const s = t, { children: r } = s, i = A(s, ["children"]), o = d.Children.toArray(r), a = o.find(js);
1805
1808
  if (a) {
1806
- const u = a.props.children, l = o.map((h) => h === a ? c.Children.count(u) > 1 ? c.Children.only(null) : /* @__PURE__ */ c.isValidElement(u) ? u.props.children : null : h);
1807
- return /* @__PURE__ */ c.createElement(me, oe({}, i, {
1809
+ const u = a.props.children, l = o.map((h) => h === a ? d.Children.count(u) > 1 ? d.Children.only(null) : /* @__PURE__ */ d.isValidElement(u) ? u.props.children : null : h);
1810
+ return /* @__PURE__ */ d.createElement(me, oe({}, i, {
1808
1811
  ref: e
1809
- }), /* @__PURE__ */ c.isValidElement(u) ? /* @__PURE__ */ c.cloneElement(u, void 0, l) : null);
1812
+ }), /* @__PURE__ */ d.isValidElement(u) ? /* @__PURE__ */ d.cloneElement(u, void 0, l) : null);
1810
1813
  }
1811
- return /* @__PURE__ */ c.createElement(me, oe({}, i, {
1814
+ return /* @__PURE__ */ d.createElement(me, oe({}, i, {
1812
1815
  ref: e
1813
1816
  }), r);
1814
1817
  });
1815
- xs.displayName = "Slot";
1816
- var me = /* @__PURE__ */ c.forwardRef((t, e) => {
1818
+ gs.displayName = "Slot";
1819
+ var me = /* @__PURE__ */ d.forwardRef((t, e) => {
1817
1820
  const s = t, { children: r } = s, i = A(s, ["children"]);
1818
- return /* @__PURE__ */ c.isValidElement(r) ? /* @__PURE__ */ c.cloneElement(r, E(x({}, js(i, r.props)), {
1819
- ref: e ? Cs(e, r.ref) : r.ref
1820
- })) : c.Children.count(r) > 1 ? c.Children.only(null) : null;
1821
+ return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, E(x({}, ws(i, r.props)), {
1822
+ ref: e ? xs(e, r.ref) : r.ref
1823
+ })) : d.Children.count(r) > 1 ? d.Children.only(null) : null;
1821
1824
  });
1822
1825
  me.displayName = "SlotClone";
1823
- var bs = ({ children: t }) => /* @__PURE__ */ c.createElement(c.Fragment, null, t);
1824
- function gs(t) {
1825
- return /* @__PURE__ */ c.isValidElement(t) && t.type === bs;
1826
+ var bs = ({ children: t }) => /* @__PURE__ */ d.createElement(d.Fragment, null, t);
1827
+ function js(t) {
1828
+ return /* @__PURE__ */ d.isValidElement(t) && t.type === bs;
1826
1829
  }
1827
- function js(t, e) {
1830
+ function ws(t, e) {
1828
1831
  const s = x({}, e);
1829
1832
  for (const r in e) {
1830
1833
  const i = t[r], o = e[r];
@@ -1837,7 +1840,7 @@ function js(t, e) {
1837
1840
  }
1838
1841
  return x(x({}, t), s);
1839
1842
  }
1840
- var ws = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1843
+ var _s = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1841
1844
  const r = `${t.charAt(0)}${e.charAt(0)}`;
1842
1845
  return /* @__PURE__ */ n.jsx(
1843
1846
  "span",
@@ -1848,7 +1851,7 @@ var ws = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1848
1851
  children: /* @__PURE__ */ n.jsx("span", { className: "avatar__initials", children: r })
1849
1852
  }
1850
1853
  );
1851
- }, K = c.forwardRef(
1854
+ }, V = d.forwardRef(
1852
1855
  (t, e) => {
1853
1856
  var s = t, {
1854
1857
  iconLeft: r,
@@ -1858,7 +1861,7 @@ var ws = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1858
1861
  variant: u,
1859
1862
  className: l,
1860
1863
  children: h
1861
- } = s, d = A(s, [
1864
+ } = s, c = A(s, [
1862
1865
  "iconLeft",
1863
1866
  "iconRight",
1864
1867
  "isPending",
@@ -1872,8 +1875,8 @@ var ws = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1872
1875
  "button",
1873
1876
  E(x({
1874
1877
  ref: e
1875
- }, d), {
1876
- className: S(
1878
+ }, c), {
1879
+ className: O(
1877
1880
  "button",
1878
1881
  u && `button--${u}`,
1879
1882
  u && a && `button--${u}--filled`,
@@ -1890,9 +1893,9 @@ var ws = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1890
1893
  );
1891
1894
  }
1892
1895
  );
1893
- K.displayName = "Button";
1894
- c.createContext(void 0);
1895
- var _s = c.forwardRef(
1896
+ V.displayName = "Button";
1897
+ d.createContext(void 0);
1898
+ var Rs = d.forwardRef(
1896
1899
  (t, e) => {
1897
1900
  var s = t, { prefix: r, suffix: i, className: o } = s, a = A(s, ["prefix", "suffix", "className"]);
1898
1901
  return /* @__PURE__ */ n.jsxs("div", { className: "input__wrapper", children: [
@@ -1901,7 +1904,7 @@ var _s = c.forwardRef(
1901
1904
  "input",
1902
1905
  x({
1903
1906
  ref: e,
1904
- className: S(
1907
+ className: O(
1905
1908
  "input",
1906
1909
  r && "input--with-prefix",
1907
1910
  i && "input--with-suffix",
@@ -1913,9 +1916,9 @@ var _s = c.forwardRef(
1913
1916
  ] });
1914
1917
  }
1915
1918
  );
1916
- _s.displayName = "TextField";
1917
- c.createContext(void 0);
1918
- var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__header__action", children: t }), Es = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__body", children: t }), Os = (t) => /* @__PURE__ */ n.jsx(
1919
+ Rs.displayName = "TextField";
1920
+ d.createContext(void 0);
1921
+ var Es = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__header__action", children: t }), Os = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__body", children: t }), Ss = (t) => /* @__PURE__ */ n.jsx(
1919
1922
  "svg",
1920
1923
  E(x({
1921
1924
  width: "24",
@@ -1935,7 +1938,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
1935
1938
  }
1936
1939
  )
1937
1940
  })
1938
- ), we = Os, Ss = (t) => /* @__PURE__ */ n.jsx(
1941
+ ), we = Ss, Ps = (t) => /* @__PURE__ */ n.jsx(
1939
1942
  "svg",
1940
1943
  E(x({
1941
1944
  width: "24",
@@ -1954,7 +1957,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
1954
1957
  }
1955
1958
  )
1956
1959
  })
1957
- ), Ps = Ss, As = (t) => /* @__PURE__ */ n.jsx(
1960
+ ), As = Ps, Ns = (t) => /* @__PURE__ */ n.jsx(
1958
1961
  "svg",
1959
1962
  E(x({
1960
1963
  width: "24",
@@ -1973,7 +1976,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
1973
1976
  }
1974
1977
  )
1975
1978
  })
1976
- ), Ns = As, Ms = (t) => /* @__PURE__ */ n.jsxs(
1979
+ ), Ms = Ns, Fs = (t) => /* @__PURE__ */ n.jsxs(
1977
1980
  "svg",
1978
1981
  E(x({
1979
1982
  width: "24",
@@ -2025,7 +2028,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2025
2028
  )
2026
2029
  ]
2027
2030
  })
2028
- ), Fs = Ms, ks = (t) => /* @__PURE__ */ n.jsx(
2031
+ ), ks = Fs, Ls = (t) => /* @__PURE__ */ n.jsx(
2029
2032
  "svg",
2030
2033
  E(x({
2031
2034
  width: "24",
@@ -2044,7 +2047,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2044
2047
  }
2045
2048
  )
2046
2049
  })
2047
- ), Ls = ks, Ds = (t) => /* @__PURE__ */ n.jsxs(
2050
+ ), Ds = Ls, Is = (t) => /* @__PURE__ */ n.jsxs(
2048
2051
  "svg",
2049
2052
  E(x({
2050
2053
  width: "24",
@@ -2076,7 +2079,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2076
2079
  )
2077
2080
  ]
2078
2081
  })
2079
- ), Is = Ds, Ts = (t) => /* @__PURE__ */ n.jsx(
2082
+ ), Ts = Is, Us = (t) => /* @__PURE__ */ n.jsx(
2080
2083
  "svg",
2081
2084
  E(x({
2082
2085
  width: "24",
@@ -2096,7 +2099,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2096
2099
  }
2097
2100
  )
2098
2101
  })
2099
- ), Us = Ts, Qs = (t) => /* @__PURE__ */ n.jsxs(
2102
+ ), Qs = Us, qs = (t) => /* @__PURE__ */ n.jsxs(
2100
2103
  "svg",
2101
2104
  E(x({
2102
2105
  width: "24",
@@ -2133,7 +2136,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2133
2136
  /* @__PURE__ */ n.jsx("defs", { children: /* @__PURE__ */ n.jsx("clipPath", { id: "clip0_19_444", children: /* @__PURE__ */ n.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2134
2137
  ]
2135
2138
  })
2136
- ), qs = Qs, Bs = (t) => /* @__PURE__ */ n.jsxs(
2139
+ ), Bs = qs, Ks = (t) => /* @__PURE__ */ n.jsxs(
2137
2140
  "svg",
2138
2141
  E(x({
2139
2142
  width: "24",
@@ -2167,7 +2170,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2167
2170
  /* @__PURE__ */ n.jsx("defs", { children: /* @__PURE__ */ n.jsx("clipPath", { id: "clip0_762_2934", children: /* @__PURE__ */ n.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2168
2171
  ]
2169
2172
  })
2170
- ), Ks = Bs, Hs = (t) => /* @__PURE__ */ n.jsxs(
2173
+ ), Hs = Ks, Vs = (t) => /* @__PURE__ */ n.jsxs(
2171
2174
  "svg",
2172
2175
  E(x({
2173
2176
  width: "20",
@@ -2191,7 +2194,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2191
2194
  )
2192
2195
  ]
2193
2196
  })
2194
- ), Gs = Hs, Vs = (t) => {
2197
+ ), $s = Vs, Gs = (t) => {
2195
2198
  const e = (s) => `${s}${t.suffix ? `_${t.suffix}` : ""}`;
2196
2199
  return /* @__PURE__ */ n.jsxs(
2197
2200
  "svg",
@@ -2362,7 +2365,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2362
2365
  ]
2363
2366
  })
2364
2367
  );
2365
- }, _e = Vs, $s = (t) => /* @__PURE__ */ n.jsx(
2368
+ }, _e = Gs, Zs = (t) => /* @__PURE__ */ n.jsx(
2366
2369
  "svg",
2367
2370
  E(x({
2368
2371
  fill: "none",
@@ -2382,7 +2385,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2382
2385
  }
2383
2386
  )
2384
2387
  })
2385
- ), Zs = $s, Ws = (t) => /* @__PURE__ */ n.jsxs(
2388
+ ), Ws = Zs, Ys = (t) => /* @__PURE__ */ n.jsxs(
2386
2389
  "svg",
2387
2390
  E(x({
2388
2391
  width: "24",
@@ -2409,7 +2412,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2409
2412
  /* @__PURE__ */ n.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
2410
2413
  ]
2411
2414
  })
2412
- ), Ys = Ws, zs = (t) => {
2415
+ ), zs = Ys, Js = (t) => {
2413
2416
  var e = t, {
2414
2417
  variant: s,
2415
2418
  icon: r,
@@ -2428,14 +2431,14 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2428
2431
  return /* @__PURE__ */ n.jsx(
2429
2432
  "div",
2430
2433
  E(x({}, l), {
2431
- className: S(
2434
+ className: O(
2432
2435
  "card__empty-state",
2433
2436
  s === "error" && "card__empty-state--error",
2434
2437
  i && "card__empty-state--standalone",
2435
2438
  u
2436
2439
  ),
2437
2440
  children: /* @__PURE__ */ n.jsxs("div", { className: "card__empty-state__wrapper", children: [
2438
- /* @__PURE__ */ n.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ n.jsx(Ks, {}) : r }),
2441
+ /* @__PURE__ */ n.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ n.jsx(Hs, {}) : r }),
2439
2442
  /* @__PURE__ */ n.jsxs("div", { className: "card__empty-state__content", children: [
2440
2443
  /* @__PURE__ */ n.jsx("p", { className: "card__empty-state__title", children: o }),
2441
2444
  /* @__PURE__ */ n.jsx("p", { className: "card__empty-state__description", children: a })
@@ -2443,7 +2446,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2443
2446
  ] })
2444
2447
  })
2445
2448
  );
2446
- }, Js = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__footer", children: t }), Xs = (t) => {
2449
+ }, Xs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__footer", children: t }), er = (t) => {
2447
2450
  var e = t, {
2448
2451
  variant: s = "default",
2449
2452
  sticky: r,
@@ -2458,7 +2461,7 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2458
2461
  return /* @__PURE__ */ n.jsx(
2459
2462
  "div",
2460
2463
  E(x({}, a), {
2461
- className: S(
2464
+ className: O(
2462
2465
  "card__header",
2463
2466
  s && `card__header--${s}`,
2464
2467
  r && "card__header--sticky",
@@ -2467,16 +2470,16 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2467
2470
  children: o
2468
2471
  })
2469
2472
  );
2470
- }, er = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: t }), tr = ({ children: t, className: e }) => /* @__PURE__ */ n.jsx("div", { className: S("card__body__item", e), children: t }), sr = ({ 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: [
2471
2474
  t && /* @__PURE__ */ n.jsx("span", { className: "card__header__title__icon", children: t }),
2472
2475
  e
2473
- ] }), ut = c.forwardRef(
2476
+ ] }), ut = d.forwardRef(
2474
2477
  (t, e) => {
2475
2478
  var s = t, { type: r, children: i, className: o, variant: a = "default", disabled: u = !1 } = s, l = A(s, ["type", "children", "className", "variant", "disabled"]);
2476
- return c.createElement(
2479
+ return d.createElement(
2477
2480
  r,
2478
2481
  x({
2479
- className: S(
2482
+ className: O(
2480
2483
  "card",
2481
2484
  u && "card--disabled",
2482
2485
  a && `card--${a}`,
@@ -2490,33 +2493,33 @@ var Rs = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2490
2493
  );
2491
2494
  ut.displayName = "Card";
2492
2495
  Object.assign(ut, {
2493
- Header: Xs,
2494
- Action: Rs,
2495
- Title: sr,
2496
- Body: Es,
2497
- Image: er,
2498
- Item: tr,
2499
- Footer: Js,
2500
- EmptyState: zs
2496
+ Header: er,
2497
+ Action: Es,
2498
+ Title: rr,
2499
+ Body: Os,
2500
+ Image: tr,
2501
+ Item: sr,
2502
+ Footer: Xs,
2503
+ EmptyState: Js
2501
2504
  });
2502
- var rr = (t) => {
2503
- var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2504
- return /* @__PURE__ */ n.jsx("div", E(x({ className: S("checkbox__content", s) }, i), { children: r }));
2505
- }, nr = (t) => {
2505
+ var nr = (t) => {
2506
2506
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2507
- return /* @__PURE__ */ n.jsx("span", E(x({ className: S("checkbox__error", 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__hint", s) }, i), { children: r }));
2511
- }, lt = c.createContext(void 0), or = ({ id: t, name: e, children: s }) => /* @__PURE__ */ n.jsx(lt.Provider, { value: { id: t, name: e }, children: s }), ar = () => {
2512
- const t = c.useContext(lt);
2510
+ return /* @__PURE__ */ n.jsx("span", E(x({ className: O("checkbox__error", s) }, i), { children: r }));
2511
+ }, or = (t) => {
2512
+ var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2513
+ return /* @__PURE__ */ n.jsx("span", E(x({ className: O("checkbox__hint", s) }, i), { children: r }));
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
+ const t = d.useContext(lt);
2513
2516
  if (!t)
2514
2517
  throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
2515
2518
  return t;
2516
- }, ur = (t) => {
2519
+ }, lr = (t) => {
2517
2520
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2518
- const { id: o } = ar();
2519
- return /* @__PURE__ */ n.jsx("label", E(x({ htmlFor: o, className: S("checkbox__label", s) }, i), { children: r }));
2521
+ const { id: o } = ur();
2522
+ return /* @__PURE__ */ n.jsx("label", E(x({ htmlFor: o, className: O("checkbox__label", s) }, i), { children: r }));
2520
2523
  }, U = (t) => {
2521
2524
  var e = t, {
2522
2525
  id: s,
@@ -2535,13 +2538,13 @@ var rr = (t) => {
2535
2538
  "className",
2536
2539
  "children"
2537
2540
  ]);
2538
- const d = c.useRef(null);
2539
- return c.useEffect(() => {
2540
- d.current && (i ? d.current.indeterminate = !0 : d.current.indeterminate = !1);
2541
+ const c = d.useRef(null);
2542
+ return d.useEffect(() => {
2543
+ c.current && (i ? c.current.indeterminate = !0 : c.current.indeterminate = !1);
2541
2544
  }, [i]), /* @__PURE__ */ n.jsxs(
2542
2545
  "div",
2543
2546
  {
2544
- className: S("checkbox", o && `checkbox--${o}`, a && "checkbox--error"),
2547
+ className: O("checkbox", o && `checkbox--${o}`, a && "checkbox--error"),
2545
2548
  children: [
2546
2549
  /* @__PURE__ */ n.jsx(
2547
2550
  "input",
@@ -2549,50 +2552,50 @@ var rr = (t) => {
2549
2552
  id: s,
2550
2553
  name: r,
2551
2554
  type: "checkbox",
2552
- ref: d,
2553
- className: S("checkbox__input", u)
2555
+ ref: c,
2556
+ className: O("checkbox__input", u)
2554
2557
  }, h)
2555
2558
  ),
2556
- i ? /* @__PURE__ */ n.jsx(Gs, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(Us, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2557
- /* @__PURE__ */ n.jsx(or, { id: s, name: r, children: l })
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
+ /* @__PURE__ */ n.jsx(ar, { id: s, name: r, children: l })
2558
2561
  ]
2559
2562
  }
2560
2563
  );
2561
2564
  };
2562
- U.Content = rr;
2563
- U.Label = ur;
2564
- U.Hint = ir;
2565
- U.Error = nr;
2566
- var lr = (t) => {
2565
+ U.Content = nr;
2566
+ U.Label = lr;
2567
+ U.Hint = or;
2568
+ U.Error = ir;
2569
+ var cr = (t) => {
2567
2570
  var e = t, { type: s = "div", className: r, children: i } = e, o = A(e, ["type", "className", "children"]);
2568
- return c.createElement(s, x({ className: S("dialog__body", r) }, o), i);
2569
- }, ye = () => document.body.style.removeProperty("overflow"), Ie = (t) => t.preventDefault(), cr = 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])', dr = (t) => {
2571
+ return d.createElement(s, x({ className: O("dialog__body", r) }, o), i);
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) => {
2570
2573
  var e = t, { className: s, children: r, shouldAnimate: i = !0 } = e, o = A(e, ["className", "children", "shouldAnimate"]);
2571
2574
  const { ref: a, defaultOpen: u, isModal: l, onClose: h } = X();
2572
- return c.useEffect(() => {
2573
- const d = a == null ? void 0 : a.current;
2574
- if (d != null && d.open) {
2575
- const p = d.querySelectorAll(cr), m = p[0], f = p[p.length - 1], C = (g) => {
2575
+ return d.useEffect(() => {
2576
+ const c = a == null ? void 0 : a.current;
2577
+ if (c != null && c.open) {
2578
+ const p = c.querySelectorAll(dr), v = p[0], f = p[p.length - 1], y = (g) => {
2576
2579
  if (!(g.key === "Tab"))
2577
2580
  return;
2578
- g.shiftKey ? document.activeElement === m && (f.focus(), g.preventDefault()) : document.activeElement === f && (m.focus(), g.preventDefault());
2581
+ g.shiftKey ? document.activeElement === v && (f.focus(), g.preventDefault()) : document.activeElement === f && (v.focus(), g.preventDefault());
2579
2582
  };
2580
- return document.body.style.overflow = "hidden", d.addEventListener("keydown", C), window.addEventListener("popstate", () => ye()), () => {
2581
- d.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());
2582
2585
  };
2583
2586
  }
2584
- }, [a]), c.useEffect(() => {
2585
- const d = a == null ? void 0 : a.current;
2586
- if (!d)
2587
+ }, [a]), d.useEffect(() => {
2588
+ const c = a == null ? void 0 : a.current;
2589
+ if (!c)
2587
2590
  return;
2588
- if (u && (d.removeAttribute("open"), d.showModal(), d.focus()), l)
2589
- return d.addEventListener("cancel", Ie), () => d.removeEventListener("cancel", Ie);
2590
- const p = ({ clientX: m, clientY: f }) => {
2591
- const { top: C, right: g, bottom: v, left: y } = d.getBoundingClientRect(), _ = 0 < f && 0 < m, j = C < f && f < v, O = y < m && m < g;
2592
- _ && !(j && O) && h();
2591
+ if (u && (c.removeAttribute("open"), c.showModal(), c.focus()), l)
2592
+ return c.addEventListener("cancel", Ie), () => c.removeEventListener("cancel", Ie);
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();
2593
2596
  };
2594
- return d.addEventListener("cancel", h), d.addEventListener("mousedown", p), () => {
2595
- d.removeEventListener("cancel", h), d.removeEventListener("mousedown", p);
2597
+ return c.addEventListener("cancel", h), c.addEventListener("mousedown", p), () => {
2598
+ c.removeEventListener("cancel", h), c.removeEventListener("mousedown", p);
2596
2599
  };
2597
2600
  }, [a, l, h, u]), /* @__PURE__ */ n.jsx(
2598
2601
  "dialog",
@@ -2601,57 +2604,57 @@ var lr = (t) => {
2601
2604
  tabIndex: -1,
2602
2605
  open: u,
2603
2606
  "aria-modal": !!l,
2604
- className: S("dialog", i && "dialog--animated", s)
2607
+ className: O("dialog", i && "dialog--animated", s)
2605
2608
  }, o), {
2606
2609
  children: r
2607
2610
  })
2608
2611
  );
2609
- }, ct = c.createContext(void 0), hr = ({ defaultOpen: t, onClose: e, isModal: s, children: r }) => {
2610
- const i = c.useRef(null), o = c.useRef(e), a = c.useCallback(() => {
2612
+ }, ct = d.createContext(void 0), fr = ({ defaultOpen: t, onClose: e, isModal: s, children: r }) => {
2613
+ const i = d.useRef(null), o = d.useRef(e), a = d.useCallback(() => {
2611
2614
  var u;
2612
2615
  ye(), (u = i.current) == null || u.close(), o.current && (o == null || o.current());
2613
2616
  }, [i]);
2614
2617
  return /* @__PURE__ */ n.jsx(ct.Provider, { value: { ref: i, defaultOpen: t, isModal: s, onClose: a }, children: r });
2615
2618
  }, X = () => {
2616
- const t = c.useContext(ct);
2619
+ const t = d.useContext(ct);
2617
2620
  if (!t)
2618
2621
  throw new Error("Dialog compound components can not be rendered outside of Dialog");
2619
2622
  return t;
2620
- }, fr = (t) => {
2623
+ }, pr = (t) => {
2621
2624
  var e = t, { children: s } = e, r = A(e, ["children"]);
2622
2625
  const { onClose: i } = X();
2623
- return /* @__PURE__ */ n.jsx(K, E(x({ onClick: i }, r), { children: s }));
2624
- }, dt = c.forwardRef((t, e) => {
2626
+ return /* @__PURE__ */ n.jsx(V, E(x({ onClick: i }, r), { children: s }));
2627
+ }, dt = d.forwardRef((t, e) => {
2625
2628
  var s = t, { className: r } = s, i = A(s, ["className"]);
2626
2629
  const { onClose: o } = X();
2627
2630
  return /* @__PURE__ */ n.jsx(
2628
- K,
2631
+ V,
2629
2632
  x({
2630
2633
  type: "submit",
2631
2634
  ref: e,
2632
2635
  formMethod: "dialog",
2633
2636
  onClick: o,
2634
- iconLeft: /* @__PURE__ */ n.jsx(Ps, {}),
2637
+ iconLeft: /* @__PURE__ */ n.jsx(As, {}),
2635
2638
  variant: "icon--secondary",
2636
- className: S("dialog__close button--icon", r)
2639
+ className: O("dialog__close button--icon", r)
2637
2640
  }, i)
2638
2641
  );
2639
2642
  });
2640
2643
  dt.displayName = "Close";
2641
- var pr = (t) => {
2644
+ var vr = (t) => {
2642
2645
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2643
- return /* @__PURE__ */ n.jsx("div", E(x({ className: S("dialog__footer", s) }, i), { children: r }));
2644
- }, vr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: t }), mr = (t) => {
2646
+ return /* @__PURE__ */ n.jsx("div", E(x({ className: O("dialog__footer", s) }, i), { children: r }));
2647
+ }, mr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: t }), yr = (t) => {
2645
2648
  var e = t, { icon: s, children: r, className: i } = e, o = A(e, ["icon", "children", "className"]);
2646
- const { ref: a } = X(), u = c.useRef(null);
2647
- return c.useEffect(() => {
2649
+ const { ref: a } = X(), u = d.useRef(null);
2650
+ return d.useEffect(() => {
2648
2651
  a != null && a.current && a.current.focus();
2649
2652
  }, [a]), /* @__PURE__ */ n.jsxs(
2650
2653
  "div",
2651
2654
  E(x({
2652
2655
  tabIndex: 0,
2653
2656
  ref: u,
2654
- className: S("dialog__header__title", i)
2657
+ className: O("dialog__header__title", i)
2655
2658
  }, o), {
2656
2659
  children: [
2657
2660
  s && /* @__PURE__ */ n.jsx("span", { className: "dialog__header__icon", children: s }),
@@ -2659,23 +2662,23 @@ var pr = (t) => {
2659
2662
  ]
2660
2663
  })
2661
2664
  );
2662
- }, yr = (t) => {
2665
+ }, Cr = (t) => {
2663
2666
  var e = t, { children: s } = e, r = A(e, ["children"]);
2664
2667
  const { ref: i } = X();
2665
- return /* @__PURE__ */ n.jsx(K, E(x({ onClick: () => {
2668
+ return /* @__PURE__ */ n.jsx(V, E(x({ onClick: () => {
2666
2669
  var o;
2667
2670
  return (o = i == null ? void 0 : i.current) == null ? void 0 : o.showModal();
2668
2671
  } }, r), { children: s }));
2669
- }, M = ({ defaultOpen: t, isModal: e, children: s, onClose: r }) => /* @__PURE__ */ n.jsx(hr, { defaultOpen: !!t, isModal: e, onClose: r, children: s });
2670
- M.Trigger = yr;
2671
- M.Root = dr;
2672
- M.Title = mr;
2673
- M.Header = vr;
2674
- M.Body = lr;
2675
- M.Footer = pr;
2676
- M.Button = fr;
2672
+ }, M = ({ defaultOpen: t, isModal: e, children: s, onClose: r }) => /* @__PURE__ */ n.jsx(fr, { defaultOpen: !!t, isModal: e, onClose: r, children: s });
2673
+ M.Trigger = Cr;
2674
+ M.Root = hr;
2675
+ M.Title = yr;
2676
+ M.Header = mr;
2677
+ M.Body = cr;
2678
+ M.Footer = vr;
2679
+ M.Button = pr;
2677
2680
  M.Close = dt;
2678
- var ht = c.createContext(void 0), Cr = ({
2681
+ var ht = d.createContext(void 0), xr = ({
2679
2682
  id: t,
2680
2683
  position: e,
2681
2684
  isOpen: s,
@@ -2703,73 +2706,82 @@ var ht = c.createContext(void 0), Cr = ({
2703
2706
  children: h
2704
2707
  }
2705
2708
  ), ft = () => {
2706
- const t = c.useContext(ht);
2709
+ const t = d.useContext(ht);
2707
2710
  if (t === void 0)
2708
2711
  throw new Error("useMenu must be used within a MenuProvider");
2709
2712
  return t;
2710
- }, xr = ({ children: t }) => {
2713
+ }, gr = ({ as: t, children: e }) => {
2711
2714
  const {
2712
- id: e,
2713
- position: s,
2714
- isOpen: r,
2715
- setIsOpen: i,
2716
- activeItemIndex: o,
2717
- setActiveItemIndex: a,
2718
- clearActiveItemIndex: u,
2719
- triggerRef: l,
2720
- contentRef: h
2721
- } = ft(), d = (p) => {
2722
- var m;
2723
- 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)
2724
2727
  return;
2725
- if (p.key === "Escape")
2726
- return u(), i(!1), (m = l.current) == null ? void 0 : m.focus();
2727
- const f = h.current.childElementCount - 1;
2728
- 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) {
2729
2732
  case "ArrowUp":
2730
2733
  case "ArrowLeft":
2731
- return p.preventDefault(), a(o ? Math.max(0, o - 1) : 0);
2734
+ return v.preventDefault(), u(a ? Math.max(0, a - 1) : 0);
2732
2735
  case "ArrowDown":
2733
2736
  case "ArrowRight":
2734
- p.preventDefault();
2735
- const C = o !== void 0 ? o + 1 : 0;
2736
- 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));
2737
2740
  case "Home":
2738
- return p.preventDefault(), a(0);
2741
+ return v.preventDefault(), u(0);
2739
2742
  case "End":
2740
- return p.preventDefault(), a(f);
2743
+ return v.preventDefault(), u(y);
2741
2744
  }
2742
2745
  };
2743
- 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
+ ) : (
2744
2756
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
2745
2757
  /* @__PURE__ */ n.jsx(
2746
2758
  "ul",
2747
2759
  {
2748
- id: `${e}-content`,
2749
- ref: h,
2750
- className: S("menu__list", `menu__list--${s}`, r && "menu__list--active"),
2751
- onKeyDown: d,
2752
- 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
2753
2765
  }
2754
2766
  )
2755
2767
  );
2756
2768
  }, br = (t) => {
2757
2769
  var e = t, { children: s, className: r } = e, i = A(e, ["children", "className"]);
2758
- 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 }));
2759
2771
  }, pt = ({ children: t, className: e }) => {
2760
2772
  const { id: s, isOpen: r, setIsOpen: i, clearActiveItemIndex: o, setActiveItemIndex: a, triggerRef: u } = ft(), l = () => {
2761
- o(), i((d) => !d);
2762
- }, h = (d) => {
2773
+ o(), i((c) => !c);
2774
+ }, h = (c) => {
2763
2775
  if (r) {
2764
- if (d.key === "Escape")
2776
+ if (c.key === "Escape")
2765
2777
  return o(), i(!1);
2766
- d.key === "ArrowDown" && (d.preventDefault(), a(0));
2778
+ c.key === "ArrowDown" && (c.preventDefault(), a(0));
2767
2779
  }
2768
2780
  };
2769
- return c.cloneElement(t, {
2781
+ return d.cloneElement(t, {
2770
2782
  id: `${s}-trigger`,
2771
2783
  ref: u,
2772
- className: S("menu__trigger", e),
2784
+ className: O("menu__trigger", e),
2773
2785
  onClick: l,
2774
2786
  onKeyDown: h,
2775
2787
  "aria-expanded": r,
@@ -2779,27 +2791,27 @@ var ht = c.createContext(void 0), Cr = ({
2779
2791
  pt.displayName = "Trigger";
2780
2792
  var L = (t) => {
2781
2793
  var e = t, { type: s, id: r, position: i = "right", children: o, className: a } = e, u = A(e, ["type", "id", "position", "children", "className"]);
2782
- const l = c.useRef(null), h = c.useRef(null), d = c.useRef(null), [p, m] = c.useState(!1), [f, C] = c.useState(), [g, v] = c.useState(f);
2783
- f !== g && f !== void 0 && (d.current.children[f].firstChild.focus(), v(f));
2784
- const y = () => {
2785
- 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);
2786
2798
  }, _ = (j) => {
2787
- var O;
2788
- ((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));
2789
2801
  };
2790
2802
  return /* @__PURE__ */ n.jsx(
2791
- Cr,
2803
+ xr,
2792
2804
  {
2793
2805
  id: r,
2794
2806
  position: i,
2795
2807
  isOpen: p,
2796
- setIsOpen: m,
2808
+ setIsOpen: v,
2797
2809
  activeItemIndex: f,
2798
- setActiveItemIndex: C,
2799
- clearActiveItemIndex: y,
2810
+ setActiveItemIndex: y,
2811
+ clearActiveItemIndex: C,
2800
2812
  triggerRef: h,
2801
- contentRef: d,
2802
- children: c.createElement(
2813
+ contentRef: c,
2814
+ children: d.createElement(
2803
2815
  s,
2804
2816
  E(x({}, u), {
2805
2817
  id: r,
@@ -2813,17 +2825,17 @@ var L = (t) => {
2813
2825
  );
2814
2826
  };
2815
2827
  L.Trigger = pt;
2816
- L.Content = xr;
2828
+ L.Content = gr;
2817
2829
  L.Item = br;
2818
- c.createContext(void 0);
2819
- var gr = (/* @__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");
2820
- [...new Set(gr.values())].map((t) => ({
2830
+ d.createContext(void 0);
2831
+ var jr = (/* @__PURE__ */ new Map()).set("BE", "32").set("FR", "33").set("NL", "31").set("LU", "352").set("DE", "49").set("CA", "1").set("PR", "1").set("TC", "1").set("US", "1").set("BS", "1242").set("BB", "1246").set("AI", "1264").set("AG", "1268").set("KY", "1345").set("BM", "1441").set("GD", "1473").set("MS", "1664").set("GU", "1671").set("LC", "1758").set("DM", "1767").set("VC", "1784").set("DO", "1809").set("TT", "1868").set("KN", "1869").set("JM", "1876").set("EG", "20").set("SS", "211").set("MA", "212").set("DZ", "213").set("TN", "216").set("LY", "218").set("GM", "220").set("SN", "221").set("MR", "222").set("ML", "223").set("GN", "224").set("CI", "225").set("BF", "226").set("NE", "227").set("TG", "228").set("BJ", "229").set("MU", "230").set("LR", "231").set("SL", "232").set("GH", "233").set("NG", "234").set("TD", "235").set("CF", "236").set("CM", "237").set("CV", "238").set("ST", "239").set("GQ", "240").set("GA", "241").set("CG", "242").set("CD", "243").set("AO", "244").set("GW", "245").set("SC", "248").set("SD", "249").set("RW", "250").set("ET", "251").set("SO", "252").set("DJ", "253").set("KE", "254").set("TZ", "255").set("UG", "256").set("BI", "257").set("MZ", "258").set("ZM", "260").set("MG", "261").set("RE", "262").set("ZW", "263").set("NA", "264").set("MW", "265").set("LS", "266").set("BW", "267").set("SZ", "268").set("KM", "269").set("ZA", "27").set("VG", "284").set("ER", "291").set("AW", "297").set("FO", "298").set("GL", "299").set("GR", "30").set("ES", "34").set("GI", "350").set("PT", "351").set("IE", "353").set("IS", "354").set("AL", "355").set("MT", "356").set("CY", "357").set("FI", "358").set("BG", "359").set("HU", "36").set("LT", "370").set("LV", "371").set("EE", "372").set("MD", "373").set("AM", "374").set("BY", "375").set("AD", "376").set("MC", "377").set("SM", "378").set("UA", "380").set("RS", "381").set("ME", "382").set("HR", "385").set("SI", "386").set("BA", "387").set("MK", "389").set("IT", "39").set("RO", "40").set("CH", "41").set("CZ", "420").set("SK", "421").set("LI", "423").set("AT", "43").set("GB", "44").set("DK", "45").set("SE", "46").set("NO", "47").set("PL", "48").set("FK", "500").set("BZ", "501").set("GT", "502").set("SV", "503").set("HN", "504").set("NI", "505").set("CR", "506").set("PA", "507").set("PM", "508").set("HT", "509").set("PE", "51").set("MX", "52").set("CU", "53").set("AR", "54").set("BR", "55").set("CL", "56").set("CO", "57").set("VE", "58").set("GP", "590").set("BO", "591").set("GY", "592").set("EC", "593").set("FG", "594").set("PY", "595").set("MQ", "596").set("SR", "597").set("UY", "598").set("CW", "599").set("AN", "599").set("MY", "60").set("AU", "61").set("ID", "62").set("PH", "63").set("NZ", "64").set("SG", "65").set("TH", "66").set("TP", "670").set("BN", "673").set("PG", "675").set("TO", "676").set("SB", "677").set("VU", "678").set("FJ", "679").set("PW", "680").set("CK", "682").set("NU", "683").set("AS", "684").set("WS", "685").set("KI", "686").set("NC", "687").set("TV", "688").set("PF", "689").set("FM", "691").set("KZ", "7").set("RU", "7").set("JP", "81").set("KR", "82").set("VN", "84").set("KP", "850").set("HK", "852").set("MO", "853").set("KH", "855").set("LA", "856").set("CN", "86").set("BD", "880").set("TW", "886").set("TR", "90").set("IN", "91").set("PK", "92").set("AF", "93").set("LK", "94").set("MM", "95").set("MV", "960").set("LB", "961").set("JO", "962").set("SY", "963").set("IQ", "964").set("KW", "965").set("SA", "966").set("YE", "967").set("OM", "968").set("PS", "970").set("AE", "971").set("IL", "972").set("BH", "973").set("QA", "974").set("BT", "975").set("MN", "976").set("NP", "977").set("IR", "98").set("TK", "992").set("TM", "993").set("AZ", "994").set("GE", "995").set("KG", "996").set("UZ", "998");
2832
+ [...new Set(jr.values())].map((t) => ({
2821
2833
  label: `+${t}`,
2822
2834
  value: t
2823
2835
  }));
2824
- c.createContext(void 0);
2825
- c.createContext(void 0);
2826
- const Z = ({
2836
+ d.createContext(void 0);
2837
+ d.createContext(void 0);
2838
+ const B = ({
2827
2839
  className: t,
2828
2840
  label: e,
2829
2841
  mobileUrl: s,
@@ -2838,17 +2850,23 @@ const Z = ({
2838
2850
  i,
2839
2851
  e
2840
2852
  ] })
2841
- ] }), vt = c.createContext(void 0), jr = ({ position: t, authenticationStatus: e, profile: s, children: r }) => /* @__PURE__ */ n.jsx(vt.Provider, { value: { position: t, authenticationStatus: e, profile: s }, children: r }), Re = () => {
2842
- const t = c.useContext(vt);
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 = () => {
2860
+ const t = d.useContext(vt);
2843
2861
  if (!t)
2844
2862
  throw new Error("Authentication context can not be rendered outside of Authentication");
2845
2863
  return t;
2846
- }, mt = c.createContext(void 0), wr = ({ apiUrl: t, redirectUrl: e, children: s }) => /* @__PURE__ */ n.jsx(mt.Provider, { value: { apiUrl: t, redirectUrl: e }, children: s }), yt = () => {
2847
- const t = c.useContext(mt);
2864
+ }, mt = d.createContext(void 0), _r = ({ apiUrl: t, redirectUrl: e, children: s }) => /* @__PURE__ */ n.jsx(mt.Provider, { value: { apiUrl: t, redirectUrl: e }, children: s }), yt = () => {
2865
+ const t = d.useContext(mt);
2848
2866
  if (!t)
2849
2867
  throw new Error("Api context can not be rendered outside of Api");
2850
2868
  return t;
2851
- }, H = () => {
2869
+ }, $ = () => {
2852
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`;
2853
2871
  return {
2854
2872
  loginUrl: s,
@@ -2857,83 +2875,96 @@ const Z = ({
2857
2875
  getTermsAndConditionsEndpoint: o,
2858
2876
  postTermsAndConditionsEndpoint: a
2859
2877
  };
2860
- }, _r = () => {
2861
- const { t } = z(), e = Qe(), { position: s, profile: r } = Re(), { logoutUrl: i } = H(), 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) ?? "";
2862
2890
  return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: s, children: [
2863
2891
  /* @__PURE__ */ n.jsx(
2864
2892
  L.Trigger,
2865
2893
  {
2866
- className: S(
2894
+ className: O(
2867
2895
  "button",
2868
2896
  "button--neutral",
2869
2897
  "button--authentication",
2870
2898
  "button--authentication--authenticated"
2871
2899
  ),
2872
2900
  children: /* @__PURE__ */ n.jsxs("button", { children: [
2873
- /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(ws, { variant: "small", firstName: o, lastName: a }) }),
2874
- /* @__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 }),
2875
2903
  /* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(we, {}) })
2876
2904
  ] })
2877
2905
  }
2878
2906
  ),
2879
- /* @__PURE__ */ n.jsxs(L.Content, { children: [
2880
- /* @__PURE__ */ n.jsx(
2881
- Z,
2882
- {
2883
- className: "manage-profile",
2884
- mobileUrl: `${e}/manage-profile`,
2885
- desktopUrl: `${e}/manage-profile/personal-data`,
2886
- icon: /* @__PURE__ */ n.jsx(Is, {}),
2887
- label: t("manageProfile")
2888
- }
2889
- ),
2890
- /* @__PURE__ */ n.jsx(
2891
- Z,
2892
- {
2893
- className: "payment",
2894
- mobileUrl: `${e}/payment`,
2895
- desktopUrl: `${e}/payment/pay-with-xtra`,
2896
- icon: /* @__PURE__ */ n.jsx(Zs, {}),
2897
- label: t("payment")
2898
- }
2899
- ),
2900
- /* @__PURE__ */ n.jsx(
2901
- Z,
2902
- {
2903
- mobileUrl: `${e}/identifiers`,
2904
- icon: /* @__PURE__ */ n.jsx(Ys, {}),
2905
- label: t("qrCode")
2906
- }
2907
- ),
2908
- /* @__PURE__ */ n.jsx(
2909
- Z,
2910
- {
2911
- className: "manage-privacy",
2912
- mobileUrl: `${e}/manage-privacy`,
2913
- desktopUrl: `${e}/manage-privacy/permissions`,
2914
- icon: /* @__PURE__ */ n.jsx(qs, {}),
2915
- label: t("privacy")
2916
- }
2917
- ),
2918
- /* @__PURE__ */ n.jsx(Z, { mobileUrl: i, icon: /* @__PURE__ */ n.jsx(Ls, {}), 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
+ ] })
2919
2950
  ] })
2920
2951
  ] });
2921
- }, Rr = () => {
2922
- const { t } = z();
2923
- return /* @__PURE__ */ n.jsxs("button", { className: S("button", "button--neutral", "button--authentication"), children: [
2952
+ }, Or = () => {
2953
+ const { t } = Q();
2954
+ return /* @__PURE__ */ n.jsxs("button", { className: O("button", "button--neutral", "button--authentication"), children: [
2924
2955
  /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx("i", { className: "spinner" }) }),
2925
2956
  /* @__PURE__ */ n.jsxs("span", { className: "button__label", children: [
2926
2957
  t("loading"),
2927
2958
  "..."
2928
2959
  ] })
2929
2960
  ] });
2930
- }, Er = ({ className: t }) => {
2931
- const { t: e } = z(), { loginUrl: s } = H();
2961
+ }, Sr = ({ className: t }) => {
2962
+ const { t: e } = Q(), { loginUrl: s } = $();
2932
2963
  return /* @__PURE__ */ n.jsxs(
2933
2964
  "a",
2934
2965
  {
2935
2966
  href: s,
2936
- className: S(
2967
+ className: O(
2937
2968
  "button",
2938
2969
  "button--neutral",
2939
2970
  "button--authentication",
@@ -2948,32 +2979,32 @@ const Z = ({
2948
2979
  }
2949
2980
  );
2950
2981
  };
2951
- const Or = () => {
2952
- const { t } = z(), { loginUrl: e } = H(), s = Qe(), { position: r } = Re();
2982
+ const Pr = () => {
2983
+ const { t } = Q(), { loginUrl: e } = $(), s = Qe(), { position: r } = Re();
2953
2984
  return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: r, className: "menu--unauthenticated", children: [
2954
- /* @__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: [
2955
2986
  /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(_e, { width: 24, height: 24, suffix: "mobile" }) }),
2956
2987
  /* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(we, {}) })
2957
2988
  ] }) }),
2958
2989
  /* @__PURE__ */ n.jsxs(L.Content, { children: [
2959
2990
  /* @__PURE__ */ n.jsx(L.Item, { children: /* @__PURE__ */ n.jsxs("a", { href: e, className: "button button--with-icon", children: [
2960
- /* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Ns, {}) }),
2991
+ /* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Ms, {}) }),
2961
2992
  /* @__PURE__ */ n.jsx("span", { className: "button__label", children: t("login") })
2962
2993
  ] }) }),
2963
2994
  /* @__PURE__ */ n.jsx(L.Item, { children: /* @__PURE__ */ n.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
2964
- /* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Fs, {}) }),
2995
+ /* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(ks, {}) }),
2965
2996
  /* @__PURE__ */ n.jsx("span", { className: "button__label", children: t("register") })
2966
2997
  ] }) })
2967
2998
  ] })
2968
2999
  ] });
2969
3000
  };
2970
3001
  var D = /* @__PURE__ */ ((t) => (t.Authenticated = "authenticated", t.NotAuthenticated = "notAuthenticated", t.Pending = "pending", t))(D || {});
2971
- const Sr = () => {
3002
+ const Ar = () => {
2972
3003
  const { authenticationStatus: t } = Re();
2973
3004
  return t === D.NotAuthenticated ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2974
- /* @__PURE__ */ n.jsx(Er, {}),
2975
- /* @__PURE__ */ n.jsx(Or, {})
2976
- ] }) : t === D.Pending ? /* @__PURE__ */ n.jsx(Rr, {}) : /* @__PURE__ */ n.jsx(_r, {});
3005
+ /* @__PURE__ */ n.jsx(Sr, {}),
3006
+ /* @__PURE__ */ n.jsx(Pr, {})
3007
+ ] }) : t === D.Pending ? /* @__PURE__ */ n.jsx(Or, {}) : /* @__PURE__ */ n.jsx(Er, {});
2977
3008
  };
2978
3009
  /*! js-cookie v3.0.5 | MIT */
2979
3010
  function ee(t) {
@@ -2984,7 +3015,7 @@ function ee(t) {
2984
3015
  }
2985
3016
  return t;
2986
3017
  }
2987
- var Pr = {
3018
+ var Nr = {
2988
3019
  read: function(t) {
2989
3020
  return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
2990
3021
  },
@@ -3010,8 +3041,8 @@ function Ce(t, e) {
3010
3041
  for (var o = document.cookie ? document.cookie.split("; ") : [], a = {}, u = 0; u < o.length; u++) {
3011
3042
  var l = o[u].split("="), h = l.slice(1).join("=");
3012
3043
  try {
3013
- var d = decodeURIComponent(l[0]);
3014
- if (a[d] = t.read(h, d), i === d)
3044
+ var c = decodeURIComponent(l[0]);
3045
+ if (a[c] = t.read(h, c), i === c)
3015
3046
  break;
3016
3047
  } catch {
3017
3048
  }
@@ -3045,38 +3076,39 @@ function Ce(t, e) {
3045
3076
  }
3046
3077
  );
3047
3078
  }
3048
- var xe = Ce(Pr, { path: "/" });
3079
+ var xe = Ce(Nr, { path: "/" });
3049
3080
  class Te extends Error {
3050
3081
  constructor(e) {
3051
3082
  super(e), this.name = "UnauthorizedError";
3052
3083
  }
3053
3084
  }
3054
- const Ar = () => {
3055
- const { profileEndpoint: t } = H();
3085
+ const Mr = () => {
3086
+ const { i18n: t } = Q(), { profileEndpoint: e } = $();
3056
3087
  return nt({
3057
3088
  // @ts-expect-error queryKey is the right type
3058
3089
  queryKey: ["profile"],
3059
3090
  queryFn: async () => {
3060
- const s = await fetch(t, {
3091
+ const r = await fetch(e, {
3061
3092
  credentials: "include",
3062
- mode: "cors"
3093
+ mode: "cors",
3094
+ headers: { "Accept-Language": t.language }
3063
3095
  });
3064
- if (!s.ok)
3065
- throw s.status === 401 ? new Te(`${s.status} - ${s.statusText}`) : new Error("Network response was not ok");
3066
- return await s.json();
3096
+ if (!r.ok)
3097
+ throw r.status === 401 ? new Te(`${r.status} - ${r.statusText}`) : new Error("Network response was not ok");
3098
+ return await r.json();
3067
3099
  },
3068
- retry: (s, r) => r instanceof Te ? !1 : 3,
3100
+ retry: (r, i) => i instanceof Te ? !1 : 3,
3069
3101
  refetchOnWindowFocus: !1
3070
3102
  });
3071
3103
  }, Ct = () => {
3072
3104
  var u, l;
3073
- const t = xe.get("profile"), e = !!t, [s, r] = c.useState(
3105
+ const t = xe.get("profile"), e = !!t, [s, r] = d.useState(
3074
3106
  e ? D.Authenticated : D.Pending
3075
- ), [i, o] = c.useState(
3107
+ ), [i, o] = d.useState(
3076
3108
  e ? JSON.parse(t) : void 0
3077
- ), a = Ar();
3078
- return c.useEffect(() => {
3079
- if (a.isLoading && r(D.Pending), a.isError && e && (xe.remove("profile"), r(D.NotAuthenticated)), a.isError && !e && r(D.NotAuthenticated), a.isSuccess) {
3109
+ ), a = Mr();
3110
+ return d.useEffect(() => {
3111
+ if (a.isError && e && (xe.remove("profile"), r(D.NotAuthenticated)), a.isError && !e && r(D.NotAuthenticated), a.isSuccess) {
3080
3112
  r(D.Authenticated);
3081
3113
  const h = {
3082
3114
  firstName: a.data.firstName,
@@ -3094,33 +3126,42 @@ const Ar = () => {
3094
3126
  a.isLoading,
3095
3127
  a.isSuccess
3096
3128
  ]), { authenticationStatus: s, profile: i };
3097
- }, Nr = ({ position: t }) => {
3098
- const { authenticationStatus: e, profile: s } = Ct();
3099
- return /* @__PURE__ */ n.jsx(jr, { authenticationStatus: e, position: t, profile: s, children: /* @__PURE__ */ n.jsx(Sr, {}) });
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
+ );
3100
3141
  };
3101
- var Mr = Object.defineProperty, Fr = Object.defineProperties, kr = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty, bt = Object.prototype.propertyIsEnumerable, Ue = (t, e, s) => e in t ? Mr(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) => {
3102
3143
  for (var s in e || (e = {}))
3103
3144
  xt.call(e, s) && Ue(t, s, e[s]);
3104
3145
  if (ae)
3105
3146
  for (var s of ae(e))
3106
- bt.call(e, s) && Ue(t, s, e[s]);
3147
+ gt.call(e, s) && Ue(t, s, e[s]);
3107
3148
  return t;
3108
- }, G = (t, e) => Fr(t, kr(e)), V = (t, e) => {
3149
+ }, G = (t, e) => Lr(t, Dr(e)), Z = (t, e) => {
3109
3150
  var s = {};
3110
3151
  for (var r in t)
3111
3152
  xt.call(t, r) && e.indexOf(r) < 0 && (s[r] = t[r]);
3112
3153
  if (t != null && ae)
3113
3154
  for (var r of ae(t))
3114
- e.indexOf(r) < 0 && bt.call(t, r) && (s[r] = t[r]);
3155
+ e.indexOf(r) < 0 && gt.call(t, r) && (s[r] = t[r]);
3115
3156
  return s;
3116
- }, Lr = c.forwardRef((t, e) => {
3117
- const s = t, { isAuthenticated: r, className: i } = s, o = V(s, ["isAuthenticated", "className"]);
3157
+ }, Ir = d.forwardRef((t, e) => {
3158
+ const s = t, { isAuthenticated: r, className: i } = s, o = Z(s, ["isAuthenticated", "className"]);
3118
3159
  return /* @__PURE__ */ n.jsx(
3119
- K,
3120
- Q({
3160
+ V,
3161
+ q({
3121
3162
  type: "button",
3122
3163
  ref: e,
3123
- className: S(
3164
+ className: O(
3124
3165
  "button--neutral",
3125
3166
  "button--authentication",
3126
3167
  r && "button--authentication--authenticated",
@@ -3129,33 +3170,33 @@ var Mr = Object.defineProperty, Fr = Object.defineProperties, kr = Object.getOwn
3129
3170
  }, o)
3130
3171
  );
3131
3172
  });
3132
- Lr.displayName = "AuthenticationButton";
3133
- var Dr = (t) => {
3173
+ Ir.displayName = "AuthenticationButton";
3174
+ var Tr = (t) => {
3134
3175
  var e = t, {
3135
3176
  children: s
3136
- } = e, r = V(e, [
3177
+ } = e, r = Z(e, [
3137
3178
  "children"
3138
3179
  ]);
3139
- return /* @__PURE__ */ n.jsx(U.Label, G(Q({ className: "form--tc__label" }, r), { children: s }));
3140
- }, gt = c.forwardRef(
3180
+ return /* @__PURE__ */ n.jsx(U.Label, G(q({ className: "form--tc__label" }, r), { children: s }));
3181
+ }, bt = d.forwardRef(
3141
3182
  (t, e) => {
3142
- var s = t, { children: r } = s, i = V(s, ["children"]);
3143
- return /* @__PURE__ */ n.jsx("form", G(Q({ className: "form--tc", ref: e }, i), { children: r }));
3183
+ var s = t, { children: r } = s, i = Z(s, ["children"]);
3184
+ return /* @__PURE__ */ n.jsx("form", G(q({ className: "form--tc", ref: e }, i), { children: r }));
3144
3185
  }
3145
3186
  );
3146
- gt.displayName = "TermsAndConditionsForm";
3147
- var Ir = (t) => {
3187
+ bt.displayName = "TermsAndConditionsForm";
3188
+ var Ur = (t) => {
3148
3189
  var e = t, {
3149
3190
  children: s
3150
- } = e, r = V(e, [
3191
+ } = e, r = Z(e, [
3151
3192
  "children"
3152
3193
  ]);
3153
- return /* @__PURE__ */ n.jsx("p", G(Q({ className: "form--tc__description" }, r), { children: s }));
3154
- }, Tr = (t) => {
3155
- var e = t, { children: s } = e, r = V(e, ["children"]);
3194
+ return /* @__PURE__ */ n.jsx("p", G(q({ className: "form--tc__description" }, r), { children: s }));
3195
+ }, Qr = (t) => {
3196
+ var e = t, { children: s } = e, r = Z(e, ["children"]);
3156
3197
  return /* @__PURE__ */ n.jsx(
3157
3198
  "a",
3158
- G(Q({
3199
+ G(q({
3159
3200
  className: "form--tc__link",
3160
3201
  target: "_blank",
3161
3202
  rel: "noreferrer",
@@ -3165,17 +3206,17 @@ var Ir = (t) => {
3165
3206
  children: s
3166
3207
  })
3167
3208
  );
3168
- }, Ur = ({ children: t }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: t }), Qr = c.forwardRef(
3169
- (t, e) => /* @__PURE__ */ n.jsx(M.Close, G(Q({ className: "hidden" }, t), { ref: e }))
3209
+ }, qr = ({ children: t }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: t }), Br = d.forwardRef(
3210
+ (t, e) => /* @__PURE__ */ n.jsx(M.Close, G(q({ className: "hidden" }, t), { ref: e }))
3170
3211
  );
3171
- Qr.displayName = "TermsAndConditionsClose";
3172
- var qr = (t) => {
3173
- var e = t, { children: s } = e, r = V(e, ["children"]);
3174
- return /* @__PURE__ */ n.jsx("span", G(Q({ className: "form--tc__error", role: "alert" }, r), { children: s }));
3212
+ Br.displayName = "TermsAndConditionsClose";
3213
+ var Kr = (t) => {
3214
+ var e = t, { children: s } = e, r = Z(e, ["children"]);
3215
+ return /* @__PURE__ */ n.jsx("span", G(q({ className: "form--tc__error", role: "alert" }, r), { children: s }));
3175
3216
  };
3176
- const Br = () => {
3177
- const { postTermsAndConditionsEndpoint: t } = H(), e = new We();
3178
- return hs({
3217
+ const Hr = () => {
3218
+ const { postTermsAndConditionsEndpoint: t } = $(), e = new We();
3219
+ return fs({
3179
3220
  mutationFn: async (r) => {
3180
3221
  const i = await fetch(t, {
3181
3222
  method: "post",
@@ -3191,84 +3232,85 @@ const Br = () => {
3191
3232
  await e.invalidateQueries({ queryKey: ["gdpr"] });
3192
3233
  }
3193
3234
  });
3194
- }, Kr = () => {
3195
- const { getTermsAndConditionsEndpoint: t } = H(), { authenticationStatus: e } = Ct(), s = xe.get("hasAcceptedLatestTermsAndConditions"), r = [], i = s === "true", o = e === 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;
3196
3237
  return nt({
3197
3238
  queryKey: ["gdpr"],
3198
3239
  queryFn: async () => {
3199
- const u = await fetch(t, {
3240
+ const l = await fetch(e, {
3200
3241
  credentials: "include",
3201
- mode: "cors"
3242
+ mode: "cors",
3243
+ headers: { "Accept-Language": t.language }
3202
3244
  });
3203
- if (!u.ok)
3245
+ if (!l.ok)
3204
3246
  throw new Error("Network response was not ok");
3205
- return await u.json();
3247
+ return await l.json();
3206
3248
  },
3207
- enabled: o && !i,
3208
- initialData: r
3249
+ enabled: a && !o,
3250
+ initialData: i
3209
3251
  });
3210
- }, Hr = ({ redirectUrl: t }) => {
3211
- const { t: e } = z(), { apiUrl: s } = yt(), r = c.useRef(null), [i, o] = c.useState(0), [a, u] = c.useState({}), { mutate: l, isError: h } = Br(), { AccessibleFormMessage: d, formRef: p } = _t({ submitCount: i, errors: a }), { data: m } = Kr(), f = !!(m != null && m.length), C = e("termsAndConditions.error.required"), g = () => {
3212
- var y;
3213
- (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");
3214
3256
  };
3215
- c.useEffect(() => {
3257
+ d.useEffect(() => {
3216
3258
  f && document.body.style.setProperty("overflow", "hidden");
3217
- }, [f]), c.useEffect(() => {
3218
- h && u({ acceptedTC: C });
3219
- }, [C, h]);
3220
- const v = (y) => {
3221
- y.preventDefault(), o(i + 1);
3222
- const { acceptedTC: _ } = y.target;
3259
+ }, [f]), d.useEffect(() => {
3260
+ h && u({ acceptedTC: y });
3261
+ }, [y, h]);
3262
+ const m = (C) => {
3263
+ C.preventDefault(), o(i + 1);
3264
+ const { acceptedTC: _ } = C.target;
3223
3265
  if (_ instanceof RadioNodeList) {
3224
3266
  const j = Object.values(_);
3225
- j.every((N) => N.checked) ? (u({}), l(j.map((N) => N.value)), g()) : u({ acceptedTC: C });
3267
+ j.every((N) => N.checked) ? (u({}), l(j.map((N) => N.value)), g()) : u({ acceptedTC: y });
3226
3268
  } else
3227
- _ != null && _.checked ? (u({}), l([_.value]), g()) : u({ acceptedTC: C });
3269
+ _ != null && _.checked ? (u({}), l([_.value]), g()) : u({ acceptedTC: y });
3228
3270
  };
3229
3271
  return f ? /* @__PURE__ */ n.jsxs(M, { defaultOpen: f, isModal: !0, children: [
3230
- d,
3272
+ c,
3231
3273
  /* @__PURE__ */ n.jsxs(M.Root, { children: [
3232
- /* @__PURE__ */ n.jsx(M.Header, { children: /* @__PURE__ */ n.jsx(M.Title, { icon: /* @__PURE__ */ n.jsx(_e, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(Ur, { children: e("termsAndConditions.title") }) }) }),
3233
- /* @__PURE__ */ n.jsx(M.Body, { children: /* @__PURE__ */ n.jsxs(gt, { ref: p, id: "tc-form", onSubmit: v, children: [
3234
- /* @__PURE__ */ n.jsxs(Ir, { 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: [
3235
3277
  e("termsAndConditions.description"),
3236
- a.acceptedTC && /* @__PURE__ */ n.jsx(qr, { children: C })
3278
+ a.acceptedTC && /* @__PURE__ */ n.jsx(Kr, { children: y })
3237
3279
  ] }),
3238
- m.map(({ tcCode: y, title: _, URL: j }) => /* @__PURE__ */ n.jsx(
3280
+ v.map(({ tcCode: C, title: _, URL: j }) => /* @__PURE__ */ n.jsx(
3239
3281
  U,
3240
3282
  {
3241
- id: y,
3242
- value: y,
3283
+ id: C,
3284
+ value: C,
3243
3285
  name: "acceptedTC",
3244
3286
  variant: "primary",
3245
3287
  children: /* @__PURE__ */ n.jsxs(U.Content, { children: [
3246
- /* @__PURE__ */ n.jsx(Dr, { children: _ }),
3247
- /* @__PURE__ */ n.jsx(Tr, { 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: _ }) })
3248
3290
  ] })
3249
3291
  },
3250
- y
3292
+ C
3251
3293
  ))
3252
3294
  ] }) }),
3253
3295
  /* @__PURE__ */ n.jsxs(M.Footer, { children: [
3254
3296
  /* @__PURE__ */ n.jsx(
3255
3297
  "a",
3256
3298
  {
3257
- className: S("button", "button--secondary", "button--terms-and-conditions"),
3299
+ className: O("button", "button--secondary", "button--terms-and-conditions"),
3258
3300
  href: `${s}/logout?redirectUrl=${t}`,
3259
3301
  children: e("logout")
3260
3302
  }
3261
3303
  ),
3262
- /* @__PURE__ */ n.jsx(K, { 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") })
3263
3305
  ] })
3264
3306
  ] })
3265
3307
  ] }) : /* @__PURE__ */ n.jsx(n.Fragment, {});
3266
- }, Gr = c.forwardRef(({ children: t, ...e }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...e, children: t }));
3308
+ }, Gr = d.forwardRef(({ children: t, ...e }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...e, children: t }));
3267
3309
  Gr.displayName = "TermsAndConditionsForm";
3268
- const Vr = new We(), Wr = ({ environment: t, redirectUrl: e, apiUrl: s, position: r }) => /* @__PURE__ */ n.jsx(Rt, { environment: t, children: /* @__PURE__ */ n.jsx(wr, { apiUrl: s, redirectUrl: e, children: /* @__PURE__ */ n.jsxs(Xt, { client: Vr, children: [
3269
- /* @__PURE__ */ n.jsx(Nr, { position: r }),
3270
- /* @__PURE__ */ n.jsx(Hr, { 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 })
3271
3313
  ] }) }) });
3272
3314
  export {
3273
- Wr as default
3315
+ zr as default
3274
3316
  };