@myxtra/authentication-green 2.14.0-alpha.0 → 2.16.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.
@@ -2,7 +2,7 @@ var Et = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
4
  var rt = (e, t, s) => t.has(e) || Et("Cannot " + s);
5
- var n = (e, t, s) => (rt(e, t, "read from private field"), s ? s.call(e) : t.get(e)), y = (e, t, s) => t.has(e) ? Et("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), p = (e, t, s, r) => (rt(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), b = (e, t, s) => (rt(e, t, "access private method"), s);
5
+ var n = (e, t, s) => (rt(e, t, "read from private field"), s ? s.call(e) : t.get(e)), y = (e, t, s) => t.has(e) ? Et("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), p = (e, t, s, r) => (rt(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), w = (e, t, s) => (rt(e, t, "access private method"), s);
6
6
  var ze = (e, t, s, r) => ({
7
7
  set _(a) {
8
8
  p(e, t, a, s);
@@ -11,7 +11,7 @@ var ze = (e, t, s, r) => ({
11
11
  return n(e, t, r);
12
12
  }
13
13
  });
14
- import { r as f, j as i, u as Fs, a as Ds, b as je, P as Pt, c as Xt, d as Ts, e as Us, E as Qs, C as Hs } from "./index-C5l8bSNv.js";
14
+ import { r as d, j as i, u as Ds, a as Ts, b as je, P as Pt, c as It, d as Us, e as Qs, E as Hs, C as Ks } from "./index-BtxpGhGV.js";
15
15
  var He = class {
16
16
  constructor() {
17
17
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
@@ -31,13 +31,13 @@ var He = class {
31
31
  }, Qe = typeof window > "u" || "Deno" in globalThis;
32
32
  function $() {
33
33
  }
34
- function Ks(e, t) {
34
+ function Gs(e, t) {
35
35
  return typeof e == "function" ? e(t) : e;
36
36
  }
37
37
  function nt(e) {
38
38
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
39
39
  }
40
- function It(e, t) {
40
+ function Bt(e, t) {
41
41
  return Math.max(e + (t || 0) - Date.now(), 0);
42
42
  }
43
43
  function Se(e, t) {
@@ -46,7 +46,7 @@ function Se(e, t) {
46
46
  function z(e, t) {
47
47
  return typeof e == "function" ? e(t) : e;
48
48
  }
49
- function kt(e, t) {
49
+ function At(e, t) {
50
50
  const {
51
51
  type: s = "all",
52
52
  exact: r,
@@ -63,13 +63,13 @@ function kt(e, t) {
63
63
  return !1;
64
64
  }
65
65
  if (s !== "all") {
66
- const v = t.isActive();
67
- if (s === "active" && !v || s === "inactive" && v)
66
+ const f = t.isActive();
67
+ if (s === "active" && !f || s === "inactive" && f)
68
68
  return !1;
69
69
  }
70
70
  return !(typeof c == "boolean" && t.isStale() !== c || a && a !== t.state.fetchStatus || l && !l(t));
71
71
  }
72
- function At(e, t) {
72
+ function kt(e, t) {
73
73
  const { exact: s, status: r, predicate: a, mutationKey: l } = e;
74
74
  if (l) {
75
75
  if (!t.options.mutationKey)
@@ -94,18 +94,18 @@ function be(e) {
94
94
  function Ge(e, t) {
95
95
  return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ge(e[s], t[s])) : !1;
96
96
  }
97
- function Bt(e, t) {
97
+ function es(e, t) {
98
98
  if (e === t)
99
99
  return e;
100
100
  const s = Nt(e) && Nt(t);
101
101
  if (s || at(e) && at(t)) {
102
102
  const r = s ? e : Object.keys(e), a = r.length, l = s ? t : Object.keys(t), o = l.length, c = s ? [] : {};
103
- let v = 0;
104
- for (let g = 0; g < o; g++) {
105
- const h = s ? g : l[g];
106
- (!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (c[h] = void 0, v++) : (c[h] = Bt(e[h], t[h]), c[h] === e[h] && e[h] !== void 0 && v++);
103
+ let f = 0;
104
+ for (let m = 0; m < o; m++) {
105
+ const h = s ? m : l[m];
106
+ (!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (c[h] = void 0, f++) : (c[h] = es(e[h], t[h]), c[h] === e[h] && e[h] !== void 0 && f++);
107
107
  }
108
- return a === o && v === a ? e : c;
108
+ return a === o && f === a ? e : c;
109
109
  }
110
110
  return t;
111
111
  }
@@ -132,27 +132,27 @@ function at(e) {
132
132
  function Mt(e) {
133
133
  return Object.prototype.toString.call(e) === "[object Object]";
134
134
  }
135
- function Gs(e) {
135
+ function qs(e) {
136
136
  return new Promise((t) => {
137
137
  setTimeout(t, e);
138
138
  });
139
139
  }
140
140
  function ot(e, t, s) {
141
- return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Bt(e, t) : t;
141
+ return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? es(e, t) : t;
142
142
  }
143
- function qs(e, t, s = 0) {
143
+ function Ws(e, t, s = 0) {
144
144
  const r = [...e, t];
145
145
  return s && r.length > s ? r.slice(1) : r;
146
146
  }
147
- function Ws(e, t, s = 0) {
147
+ function Vs(e, t, s = 0) {
148
148
  const r = [t, ...e];
149
149
  return s && r.length > s ? r.slice(0, -1) : r;
150
150
  }
151
- var es = Symbol();
152
- function ts(e, t) {
153
- return !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === es ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
151
+ var ts = Symbol();
152
+ function ss(e, t) {
153
+ return !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === ts ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
154
154
  }
155
- var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
155
+ var pe, ae, Ee, Gt, $s = (Gt = class extends He {
156
156
  constructor() {
157
157
  super();
158
158
  y(this, pe);
@@ -193,13 +193,13 @@ var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
193
193
  var t;
194
194
  return typeof n(this, pe) == "boolean" ? n(this, pe) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
195
195
  }
196
- }, pe = new WeakMap(), ae = new WeakMap(), Ee = new WeakMap(), Kt), bt = new Vs(), Pe, oe, ke, Gt, $s = (Gt = class extends He {
196
+ }, pe = new WeakMap(), ae = new WeakMap(), Ee = new WeakMap(), Gt), bt = new $s(), Pe, oe, Ae, qt, Zs = (qt = class extends He {
197
197
  constructor() {
198
198
  super();
199
199
  y(this, Pe, !0);
200
200
  y(this, oe);
201
- y(this, ke);
202
- p(this, ke, (t) => {
201
+ y(this, Ae);
202
+ p(this, Ae, (t) => {
203
203
  if (!Qe && window.addEventListener) {
204
204
  const s = () => t(!0), r = () => t(!1);
205
205
  return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
@@ -209,7 +209,7 @@ var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
209
209
  });
210
210
  }
211
211
  onSubscribe() {
212
- n(this, oe) || this.setEventListener(n(this, ke));
212
+ n(this, oe) || this.setEventListener(n(this, Ae));
213
213
  }
214
214
  onUnsubscribe() {
215
215
  var t;
@@ -217,7 +217,7 @@ var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
217
217
  }
218
218
  setEventListener(t) {
219
219
  var s;
220
- p(this, ke, t), (s = n(this, oe)) == null || s.call(this), p(this, oe, t(this.setOnline.bind(this)));
220
+ p(this, Ae, t), (s = n(this, oe)) == null || s.call(this), p(this, oe, t(this.setOnline.bind(this)));
221
221
  }
222
222
  setOnline(t) {
223
223
  n(this, Pe) !== t && (p(this, Pe, t), this.listeners.forEach((r) => {
@@ -227,129 +227,140 @@ var pe, ae, Ee, Kt, Vs = (Kt = class extends He {
227
227
  isOnline() {
228
228
  return n(this, Pe);
229
229
  }
230
- }, Pe = new WeakMap(), oe = new WeakMap(), ke = new WeakMap(), Gt), Be = new $s();
231
- function Zs(e) {
230
+ }, Pe = new WeakMap(), oe = new WeakMap(), Ae = new WeakMap(), qt), Be = new Zs();
231
+ function Ys(e) {
232
232
  return Math.min(1e3 * 2 ** e, 3e4);
233
233
  }
234
- function ss(e) {
234
+ function rs(e) {
235
235
  return (e ?? "online") === "online" ? Be.isOnline() : !0;
236
236
  }
237
- var rs = class extends Error {
237
+ var is = class extends Error {
238
238
  constructor(e) {
239
239
  super("CancelledError"), this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
240
240
  }
241
241
  };
242
242
  function it(e) {
243
- return e instanceof rs;
243
+ return e instanceof is;
244
244
  }
245
- function is(e) {
245
+ function ns(e) {
246
246
  let t = !1, s = 0, r = !1, a, l, o;
247
- const c = new Promise((C, w) => {
248
- l = C, o = w;
249
- }), v = (C) => {
250
- var w;
251
- r || (S(new rs(C)), (w = e.abort) == null || w.call(e));
252
- }, g = () => {
247
+ const c = new Promise((C, j) => {
248
+ l = C, o = j;
249
+ }), f = (C) => {
250
+ var j;
251
+ r || (S(new is(C)), (j = e.abort) == null || j.call(e));
252
+ }, m = () => {
253
253
  t = !0;
254
254
  }, h = () => {
255
255
  t = !1;
256
- }, u = () => bt.isFocused() && (e.networkMode === "always" || Be.isOnline()) && e.canRun(), d = () => ss(e.networkMode) && e.canRun(), m = (C) => {
257
- var w;
258
- r || (r = !0, (w = e.onSuccess) == null || w.call(e, C), a == null || a(), l(C));
256
+ }, u = () => bt.isFocused() && (e.networkMode === "always" || Be.isOnline()) && e.canRun(), v = () => rs(e.networkMode) && e.canRun(), g = (C) => {
257
+ var j;
258
+ r || (r = !0, (j = e.onSuccess) == null || j.call(e, C), a == null || a(), l(C));
259
259
  }, S = (C) => {
260
- var w;
261
- r || (r = !0, (w = e.onError) == null || w.call(e, C), a == null || a(), o(C));
262
- }, P = () => new Promise((C) => {
263
- var w;
264
- a = (j) => {
265
- (r || u()) && C(j);
266
- }, (w = e.onPause) == null || w.call(e);
260
+ var j;
261
+ r || (r = !0, (j = e.onError) == null || j.call(e, C), a == null || a(), o(C));
262
+ }, _ = () => new Promise((C) => {
263
+ var j;
264
+ a = (b) => {
265
+ (r || u()) && C(b);
266
+ }, (j = e.onPause) == null || j.call(e);
267
267
  }).then(() => {
268
268
  var C;
269
269
  a = void 0, r || (C = e.onContinue) == null || C.call(e);
270
- }), A = () => {
270
+ }), P = () => {
271
271
  if (r)
272
272
  return;
273
273
  let C;
274
- const w = s === 0 ? e.initialPromise : void 0;
274
+ const j = s === 0 ? e.initialPromise : void 0;
275
275
  try {
276
- C = w ?? e.fn();
277
- } catch (j) {
278
- C = Promise.reject(j);
276
+ C = j ?? e.fn();
277
+ } catch (b) {
278
+ C = Promise.reject(b);
279
279
  }
280
- Promise.resolve(C).then(m).catch((j) => {
281
- var E;
280
+ Promise.resolve(C).then(g).catch((b) => {
281
+ var A;
282
282
  if (r)
283
283
  return;
284
- const M = e.retry ?? (Qe ? 0 : 3), R = e.retryDelay ?? Zs, J = typeof R == "function" ? R(s, j) : R, te = M === !0 || typeof M == "number" && s < M || typeof M == "function" && M(s, j);
284
+ const M = e.retry ?? (Qe ? 0 : 3), F = e.retryDelay ?? Ys, J = typeof F == "function" ? F(s, b) : F, te = M === !0 || typeof M == "number" && s < M || typeof M == "function" && M(s, b);
285
285
  if (t || !te) {
286
- S(j);
286
+ S(b);
287
287
  return;
288
288
  }
289
- s++, (E = e.onFail) == null || E.call(e, s, j), Gs(J).then(() => u() ? void 0 : P()).then(() => {
290
- t ? S(j) : A();
289
+ s++, (A = e.onFail) == null || A.call(e, s, b), qs(J).then(() => u() ? void 0 : _()).then(() => {
290
+ t ? S(b) : P();
291
291
  });
292
292
  });
293
293
  };
294
294
  return {
295
295
  promise: c,
296
- cancel: v,
296
+ cancel: f,
297
297
  continue: () => (a == null || a(), c),
298
- cancelRetry: g,
298
+ cancelRetry: m,
299
299
  continueRetry: h,
300
- canStart: d,
301
- start: () => (d() ? A() : P().then(A), c)
300
+ canStart: v,
301
+ start: () => (v() ? P() : _().then(P), c)
302
302
  };
303
303
  }
304
- function Ys() {
305
- let e = [], t = 0, s = (d) => {
306
- d();
307
- }, r = (d) => {
308
- d();
309
- }, a = (d) => setTimeout(d, 0);
310
- const l = (d) => {
311
- a = d;
312
- }, o = (d) => {
313
- let m;
314
- t++;
315
- try {
316
- m = d();
317
- } finally {
318
- t--, t || g();
319
- }
320
- return m;
321
- }, c = (d) => {
322
- t ? e.push(d) : a(() => {
323
- s(d);
304
+ function zs() {
305
+ let e = [], t = 0, s = (c) => {
306
+ c();
307
+ }, r = (c) => {
308
+ c();
309
+ }, a = (c) => setTimeout(c, 0);
310
+ const l = (c) => {
311
+ t ? e.push(c) : a(() => {
312
+ s(c);
324
313
  });
325
- }, v = (d) => (...m) => {
326
- c(() => {
327
- d(...m);
328
- });
329
- }, g = () => {
330
- const d = e;
331
- e = [], d.length && a(() => {
314
+ }, o = () => {
315
+ const c = e;
316
+ e = [], c.length && a(() => {
332
317
  r(() => {
333
- d.forEach((m) => {
334
- s(m);
318
+ c.forEach((f) => {
319
+ s(f);
335
320
  });
336
321
  });
337
322
  });
338
323
  };
339
324
  return {
340
- batch: o,
341
- batchCalls: v,
342
- schedule: c,
343
- setNotifyFunction: (d) => {
344
- s = d;
325
+ batch: (c) => {
326
+ let f;
327
+ t++;
328
+ try {
329
+ f = c();
330
+ } finally {
331
+ t--, t || o();
332
+ }
333
+ return f;
334
+ },
335
+ /**
336
+ * All calls to the wrapped function will be batched.
337
+ */
338
+ batchCalls: (c) => (...f) => {
339
+ l(() => {
340
+ c(...f);
341
+ });
342
+ },
343
+ schedule: l,
344
+ /**
345
+ * Use this method to set a custom notify function.
346
+ * This can be used to for example wrap notifications with `React.act` while running tests.
347
+ */
348
+ setNotifyFunction: (c) => {
349
+ s = c;
345
350
  },
346
- setBatchNotifyFunction: (d) => {
347
- r = d;
351
+ /**
352
+ * Use this method to set a custom function to batch notifications together into a single tick.
353
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
354
+ */
355
+ setBatchNotifyFunction: (c) => {
356
+ r = c;
348
357
  },
349
- setScheduler: l
358
+ setScheduler: (c) => {
359
+ a = c;
360
+ }
350
361
  };
351
362
  }
352
- var D = Ys(), me, qt, ns = (qt = class {
363
+ var D = zs(), me, Wt, as = (Wt = class {
353
364
  constructor() {
354
365
  y(this, me);
355
366
  }
@@ -370,17 +381,17 @@ var D = Ys(), me, qt, ns = (qt = class {
370
381
  clearGcTimeout() {
371
382
  n(this, me) && (clearTimeout(n(this, me)), p(this, me, void 0));
372
383
  }
373
- }, me = new WeakMap(), qt), Ae, Ne, V, T, qe, ve, Y, se, Wt, zs = (Wt = class extends ns {
384
+ }, me = new WeakMap(), Wt), ke, Ne, V, T, qe, ve, Y, se, Vt, Js = (Vt = class extends as {
374
385
  constructor(t) {
375
386
  super();
376
387
  y(this, Y);
377
- y(this, Ae);
388
+ y(this, ke);
378
389
  y(this, Ne);
379
390
  y(this, V);
380
391
  y(this, T);
381
392
  y(this, qe);
382
393
  y(this, ve);
383
- p(this, ve, !1), p(this, qe, t.defaultOptions), this.setOptions(t.options), this.observers = [], p(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, p(this, Ae, Js(this.options)), this.state = t.state ?? n(this, Ae), this.scheduleGc();
394
+ p(this, ve, !1), p(this, qe, t.defaultOptions), this.setOptions(t.options), this.observers = [], p(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, p(this, ke, Xs(this.options)), this.state = t.state ?? n(this, ke), this.scheduleGc();
384
395
  }
385
396
  get meta() {
386
397
  return this.options.meta;
@@ -397,7 +408,7 @@ var D = Ys(), me, qt, ns = (qt = class {
397
408
  }
398
409
  setData(t, s) {
399
410
  const r = ot(this.state.data, t, this.options);
400
- return b(this, Y, se).call(this, {
411
+ return w(this, Y, se).call(this, {
401
412
  data: r,
402
413
  type: "success",
403
414
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -405,7 +416,7 @@ var D = Ys(), me, qt, ns = (qt = class {
405
416
  }), r;
406
417
  }
407
418
  setState(t, s) {
408
- b(this, Y, se).call(this, { type: "setState", state: t, setStateOptions: s });
419
+ w(this, Y, se).call(this, { type: "setState", state: t, setStateOptions: s });
409
420
  }
410
421
  cancel(t) {
411
422
  var r, a;
@@ -416,7 +427,7 @@ var D = Ys(), me, qt, ns = (qt = class {
416
427
  super.destroy(), this.cancel({ silent: !0 });
417
428
  }
418
429
  reset() {
419
- this.destroy(), this.setState(n(this, Ae));
430
+ this.destroy(), this.setState(n(this, ke));
420
431
  }
421
432
  isActive() {
422
433
  return this.observers.some(
@@ -432,7 +443,7 @@ var D = Ys(), me, qt, ns = (qt = class {
432
443
  ) : this.state.data === void 0;
433
444
  }
434
445
  isStaleByTime(t = 0) {
435
- return this.state.isInvalidated || this.state.data === void 0 || !It(this.state.dataUpdatedAt, t);
446
+ return this.state.isInvalidated || this.state.data === void 0 || !Bt(this.state.dataUpdatedAt, t);
436
447
  }
437
448
  onFocus() {
438
449
  var s;
@@ -454,10 +465,10 @@ var D = Ys(), me, qt, ns = (qt = class {
454
465
  return this.observers.length;
455
466
  }
456
467
  invalidate() {
457
- this.state.isInvalidated || b(this, Y, se).call(this, { type: "invalidate" });
468
+ this.state.isInvalidated || w(this, Y, se).call(this, { type: "invalidate" });
458
469
  }
459
470
  fetch(t, s) {
460
- var v, g, h;
471
+ var f, m, h;
461
472
  if (this.state.fetchStatus !== "idle") {
462
473
  if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
463
474
  this.cancel({ silent: !0 });
@@ -465,7 +476,7 @@ var D = Ys(), me, qt, ns = (qt = class {
465
476
  return n(this, T).continueRetry(), n(this, T).promise;
466
477
  }
467
478
  if (t && this.setOptions(t), !this.options.queryFn) {
468
- const u = this.observers.find((d) => d.options.queryFn);
479
+ const u = this.observers.find((v) => v.options.queryFn);
469
480
  u && this.setOptions(u.options);
470
481
  }
471
482
  const r = new AbortController(), a = (u) => {
@@ -474,15 +485,15 @@ var D = Ys(), me, qt, ns = (qt = class {
474
485
  get: () => (p(this, ve, !0), r.signal)
475
486
  });
476
487
  }, l = () => {
477
- const u = ts(this.options, s), d = {
488
+ const u = ss(this.options, s), v = {
478
489
  queryKey: this.queryKey,
479
490
  meta: this.meta
480
491
  };
481
- return a(d), p(this, ve, !1), this.options.persister ? this.options.persister(
492
+ return a(v), p(this, ve, !1), this.options.persister ? this.options.persister(
482
493
  u,
483
- d,
494
+ v,
484
495
  this
485
- ) : u(d);
496
+ ) : u(v);
486
497
  }, o = {
487
498
  fetchOptions: s,
488
499
  options: this.options,
@@ -490,37 +501,43 @@ var D = Ys(), me, qt, ns = (qt = class {
490
501
  state: this.state,
491
502
  fetchFn: l
492
503
  };
493
- a(o), (v = this.options.behavior) == null || v.onFetch(
504
+ a(o), (f = this.options.behavior) == null || f.onFetch(
494
505
  o,
495
506
  this
496
- ), p(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((g = o.fetchOptions) == null ? void 0 : g.meta)) && b(this, Y, se).call(this, { type: "fetch", meta: (h = o.fetchOptions) == null ? void 0 : h.meta });
507
+ ), p(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((m = o.fetchOptions) == null ? void 0 : m.meta)) && w(this, Y, se).call(this, { type: "fetch", meta: (h = o.fetchOptions) == null ? void 0 : h.meta });
497
508
  const c = (u) => {
498
- var d, m, S, P;
499
- it(u) && u.silent || b(this, Y, se).call(this, {
509
+ var v, g, S, _;
510
+ it(u) && u.silent || w(this, Y, se).call(this, {
500
511
  type: "error",
501
512
  error: u
502
- }), it(u) || ((m = (d = n(this, V).config).onError) == null || m.call(
503
- d,
513
+ }), it(u) || ((g = (v = n(this, V).config).onError) == null || g.call(
514
+ v,
504
515
  u,
505
516
  this
506
- ), (P = (S = n(this, V).config).onSettled) == null || P.call(
517
+ ), (_ = (S = n(this, V).config).onSettled) == null || _.call(
507
518
  S,
508
519
  this.state.data,
509
520
  u,
510
521
  this
511
522
  )), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
512
523
  };
513
- return p(this, T, is({
524
+ return p(this, T, ns({
514
525
  initialPromise: s == null ? void 0 : s.initialPromise,
515
526
  fn: o.fetchFn,
516
527
  abort: r.abort.bind(r),
517
528
  onSuccess: (u) => {
518
- var d, m, S, P;
529
+ var v, g, S, _;
519
530
  if (u === void 0) {
520
531
  c(new Error(`${this.queryHash} data is undefined`));
521
532
  return;
522
533
  }
523
- this.setData(u), (m = (d = n(this, V).config).onSuccess) == null || m.call(d, u, this), (P = (S = n(this, V).config).onSettled) == null || P.call(
534
+ try {
535
+ this.setData(u);
536
+ } catch (P) {
537
+ c(P);
538
+ return;
539
+ }
540
+ (g = (v = n(this, V).config).onSuccess) == null || g.call(v, u, this), (_ = (S = n(this, V).config).onSettled) == null || _.call(
524
541
  S,
525
542
  u,
526
543
  this.state.error,
@@ -528,14 +545,14 @@ var D = Ys(), me, qt, ns = (qt = class {
528
545
  ), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
529
546
  },
530
547
  onError: c,
531
- onFail: (u, d) => {
532
- b(this, Y, se).call(this, { type: "failed", failureCount: u, error: d });
548
+ onFail: (u, v) => {
549
+ w(this, Y, se).call(this, { type: "failed", failureCount: u, error: v });
533
550
  },
534
551
  onPause: () => {
535
- b(this, Y, se).call(this, { type: "pause" });
552
+ w(this, Y, se).call(this, { type: "pause" });
536
553
  },
537
554
  onContinue: () => {
538
- b(this, Y, se).call(this, { type: "continue" });
555
+ w(this, Y, se).call(this, { type: "continue" });
539
556
  },
540
557
  retry: o.options.retry,
541
558
  retryDelay: o.options.retryDelay,
@@ -543,7 +560,7 @@ var D = Ys(), me, qt, ns = (qt = class {
543
560
  canRun: () => !0
544
561
  })), n(this, T).start();
545
562
  }
546
- }, Ae = new WeakMap(), Ne = new WeakMap(), V = new WeakMap(), T = new WeakMap(), qe = new WeakMap(), ve = new WeakMap(), Y = new WeakSet(), se = function(t) {
563
+ }, ke = new WeakMap(), Ne = new WeakMap(), V = new WeakMap(), T = new WeakMap(), qe = new WeakMap(), ve = new WeakMap(), Y = new WeakSet(), se = function(t) {
547
564
  const s = (r) => {
548
565
  switch (t.type) {
549
566
  case "failed":
@@ -565,7 +582,7 @@ var D = Ys(), me, qt, ns = (qt = class {
565
582
  case "fetch":
566
583
  return {
567
584
  ...r,
568
- ...as(r.data, this.options),
585
+ ...os(r.data, this.options),
569
586
  fetchMeta: t.meta ?? null
570
587
  };
571
588
  case "success":
@@ -612,19 +629,19 @@ var D = Ys(), me, qt, ns = (qt = class {
612
629
  r.onQueryUpdate();
613
630
  }), n(this, V).notify({ query: this, type: "updated", action: t });
614
631
  });
615
- }, Wt);
616
- function as(e, t) {
632
+ }, Vt);
633
+ function os(e, t) {
617
634
  return {
618
635
  fetchFailureCount: 0,
619
636
  fetchFailureReason: null,
620
- fetchStatus: ss(t.networkMode) ? "fetching" : "paused",
637
+ fetchStatus: rs(t.networkMode) ? "fetching" : "paused",
621
638
  ...e === void 0 && {
622
639
  error: null,
623
640
  status: "pending"
624
641
  }
625
642
  };
626
643
  }
627
- function Js(e) {
644
+ function Xs(e) {
628
645
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
629
646
  return {
630
647
  data: t,
@@ -641,7 +658,7 @@ function Js(e) {
641
658
  fetchStatus: "idle"
642
659
  };
643
660
  }
644
- var X, Vt, Xs = (Vt = class extends He {
661
+ var X, $t, Is = ($t = class extends He {
645
662
  constructor(t = {}) {
646
663
  super();
647
664
  y(this, X);
@@ -650,7 +667,7 @@ var X, Vt, Xs = (Vt = class extends He {
650
667
  build(t, s, r) {
651
668
  const a = s.queryKey, l = s.queryHash ?? xt(a, s);
652
669
  let o = this.get(l);
653
- return o || (o = new zs({
670
+ return o || (o = new Js({
654
671
  cache: this,
655
672
  queryKey: a,
656
673
  queryHash: l,
@@ -685,12 +702,12 @@ var X, Vt, Xs = (Vt = class extends He {
685
702
  find(t) {
686
703
  const s = { exact: !0, ...t };
687
704
  return this.getAll().find(
688
- (r) => kt(s, r)
705
+ (r) => At(s, r)
689
706
  );
690
707
  }
691
708
  findAll(t = {}) {
692
709
  const s = this.getAll();
693
- return Object.keys(t).length > 0 ? s.filter((r) => kt(t, r)) : s;
710
+ return Object.keys(t).length > 0 ? s.filter((r) => At(t, r)) : s;
694
711
  }
695
712
  notify(t) {
696
713
  D.batch(() => {
@@ -713,14 +730,14 @@ var X, Vt, Xs = (Vt = class extends He {
713
730
  });
714
731
  });
715
732
  }
716
- }, X = new WeakMap(), Vt), I, U, ge, B, ne, $t, Is = ($t = class extends ns {
733
+ }, X = new WeakMap(), $t), I, U, ge, B, ne, Zt, Bs = (Zt = class extends as {
717
734
  constructor(t) {
718
735
  super();
719
736
  y(this, B);
720
737
  y(this, I);
721
738
  y(this, U);
722
739
  y(this, ge);
723
- this.mutationId = t.mutationId, p(this, U, t.mutationCache), p(this, I, []), this.state = t.state || os(), this.setOptions(t.options), this.scheduleGc();
740
+ this.mutationId = t.mutationId, p(this, U, t.mutationCache), p(this, I, []), this.state = t.state || ls(), this.setOptions(t.options), this.scheduleGc();
724
741
  }
725
742
  setOptions(t) {
726
743
  this.options = t, this.updateGcTime(this.options.gcTime);
@@ -751,17 +768,17 @@ var X, Vt, Xs = (Vt = class extends He {
751
768
  this.execute(this.state.variables);
752
769
  }
753
770
  async execute(t) {
754
- var a, l, o, c, v, g, h, u, d, m, S, P, A, C, w, j, M, R, J, te;
755
- p(this, ge, is({
771
+ var a, l, o, c, f, m, h, u, v, g, S, _, P, C, j, b, M, F, J, te;
772
+ p(this, ge, ns({
756
773
  fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
757
- onFail: (E, Z) => {
758
- b(this, B, ne).call(this, { type: "failed", failureCount: E, error: Z });
774
+ onFail: (A, Z) => {
775
+ w(this, B, ne).call(this, { type: "failed", failureCount: A, error: Z });
759
776
  },
760
777
  onPause: () => {
761
- b(this, B, ne).call(this, { type: "pause" });
778
+ w(this, B, ne).call(this, { type: "pause" });
762
779
  },
763
780
  onContinue: () => {
764
- b(this, B, ne).call(this, { type: "continue" });
781
+ w(this, B, ne).call(this, { type: "continue" });
765
782
  },
766
783
  retry: this.options.retry ?? 0,
767
784
  retryDelay: this.options.retryDelay,
@@ -771,63 +788,63 @@ var X, Vt, Xs = (Vt = class extends He {
771
788
  const s = this.state.status === "pending", r = !n(this, ge).canStart();
772
789
  try {
773
790
  if (!s) {
774
- b(this, B, ne).call(this, { type: "pending", variables: t, isPaused: r }), await ((l = (a = n(this, U).config).onMutate) == null ? void 0 : l.call(
791
+ w(this, B, ne).call(this, { type: "pending", variables: t, isPaused: r }), await ((l = (a = n(this, U).config).onMutate) == null ? void 0 : l.call(
775
792
  a,
776
793
  t,
777
794
  this
778
795
  ));
779
796
  const Z = await ((c = (o = this.options).onMutate) == null ? void 0 : c.call(o, t));
780
- Z !== this.state.context && b(this, B, ne).call(this, {
797
+ Z !== this.state.context && w(this, B, ne).call(this, {
781
798
  type: "pending",
782
799
  context: Z,
783
800
  variables: t,
784
801
  isPaused: r
785
802
  });
786
803
  }
787
- const E = await n(this, ge).start();
788
- return await ((g = (v = n(this, U).config).onSuccess) == null ? void 0 : g.call(
789
- v,
790
- E,
804
+ const A = await n(this, ge).start();
805
+ return await ((m = (f = n(this, U).config).onSuccess) == null ? void 0 : m.call(
806
+ f,
807
+ A,
791
808
  t,
792
809
  this.state.context,
793
810
  this
794
- )), await ((u = (h = this.options).onSuccess) == null ? void 0 : u.call(h, E, t, this.state.context)), await ((m = (d = n(this, U).config).onSettled) == null ? void 0 : m.call(
795
- d,
796
- E,
811
+ )), await ((u = (h = this.options).onSuccess) == null ? void 0 : u.call(h, A, t, this.state.context)), await ((g = (v = n(this, U).config).onSettled) == null ? void 0 : g.call(
812
+ v,
813
+ A,
797
814
  null,
798
815
  this.state.variables,
799
816
  this.state.context,
800
817
  this
801
- )), await ((P = (S = this.options).onSettled) == null ? void 0 : P.call(S, E, null, t, this.state.context)), b(this, B, ne).call(this, { type: "success", data: E }), E;
802
- } catch (E) {
818
+ )), await ((_ = (S = this.options).onSettled) == null ? void 0 : _.call(S, A, null, t, this.state.context)), w(this, B, ne).call(this, { type: "success", data: A }), A;
819
+ } catch (A) {
803
820
  try {
804
- throw await ((C = (A = n(this, U).config).onError) == null ? void 0 : C.call(
821
+ throw await ((C = (P = n(this, U).config).onError) == null ? void 0 : C.call(
822
+ P,
805
823
  A,
806
- E,
807
824
  t,
808
825
  this.state.context,
809
826
  this
810
- )), await ((j = (w = this.options).onError) == null ? void 0 : j.call(
811
- w,
812
- E,
827
+ )), await ((b = (j = this.options).onError) == null ? void 0 : b.call(
828
+ j,
829
+ A,
813
830
  t,
814
831
  this.state.context
815
- )), await ((R = (M = n(this, U).config).onSettled) == null ? void 0 : R.call(
832
+ )), await ((F = (M = n(this, U).config).onSettled) == null ? void 0 : F.call(
816
833
  M,
817
834
  void 0,
818
- E,
835
+ A,
819
836
  this.state.variables,
820
837
  this.state.context,
821
838
  this
822
839
  )), await ((te = (J = this.options).onSettled) == null ? void 0 : te.call(
823
840
  J,
824
841
  void 0,
825
- E,
842
+ A,
826
843
  t,
827
844
  this.state.context
828
- )), E;
845
+ )), A;
829
846
  } finally {
830
- b(this, B, ne).call(this, { type: "error", error: E });
847
+ w(this, B, ne).call(this, { type: "error", error: A });
831
848
  }
832
849
  } finally {
833
850
  n(this, U).runNext(this);
@@ -896,8 +913,8 @@ var X, Vt, Xs = (Vt = class extends He {
896
913
  action: t
897
914
  });
898
915
  });
899
- }, $t);
900
- function os() {
916
+ }, Zt);
917
+ function ls() {
901
918
  return {
902
919
  context: void 0,
903
920
  data: void 0,
@@ -910,7 +927,7 @@ function os() {
910
927
  submittedAt: 0
911
928
  };
912
929
  }
913
- var q, We, Zt, Bs = (Zt = class extends He {
930
+ var q, We, Yt, er = (Yt = class extends He {
914
931
  constructor(t = {}) {
915
932
  super();
916
933
  y(this, q);
@@ -918,7 +935,7 @@ var q, We, Zt, Bs = (Zt = class extends He {
918
935
  this.config = t, p(this, q, /* @__PURE__ */ new Map()), p(this, We, Date.now());
919
936
  }
920
937
  build(t, s, r) {
921
- const a = new Is({
938
+ const a = new Bs({
922
939
  mutationCache: this,
923
940
  mutationId: ++ze(this, We)._,
924
941
  options: t.defaultMutationOptions(s),
@@ -962,11 +979,11 @@ var q, We, Zt, Bs = (Zt = class extends He {
962
979
  find(t) {
963
980
  const s = { exact: !0, ...t };
964
981
  return this.getAll().find(
965
- (r) => At(s, r)
982
+ (r) => kt(s, r)
966
983
  );
967
984
  }
968
985
  findAll(t = {}) {
969
- return this.getAll().filter((s) => At(t, s));
986
+ return this.getAll().filter((s) => kt(t, s));
970
987
  }
971
988
  notify(t) {
972
989
  D.batch(() => {
@@ -983,72 +1000,68 @@ var q, We, Zt, Bs = (Zt = class extends He {
983
1000
  )
984
1001
  );
985
1002
  }
986
- }, q = new WeakMap(), We = new WeakMap(), Zt);
1003
+ }, q = new WeakMap(), We = new WeakMap(), Yt);
987
1004
  function Je(e) {
988
1005
  var t;
989
1006
  return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
990
1007
  }
991
- function er(e) {
1008
+ function Ot(e) {
992
1009
  return {
993
1010
  onFetch: (t, s) => {
994
- const r = async () => {
995
- var S, P, A, C, w;
996
- const a = t.options, l = (A = (P = (S = t.fetchOptions) == null ? void 0 : S.meta) == null ? void 0 : P.fetchMore) == null ? void 0 : A.direction, o = ((C = t.state.data) == null ? void 0 : C.pages) || [], c = ((w = t.state.data) == null ? void 0 : w.pageParams) || [], v = { pages: [], pageParams: [] };
997
- let g = !1;
998
- const h = (j) => {
999
- Object.defineProperty(j, "signal", {
1011
+ var h, u, v, g, S;
1012
+ const r = t.options, a = (v = (u = (h = t.fetchOptions) == null ? void 0 : h.meta) == null ? void 0 : u.fetchMore) == null ? void 0 : v.direction, l = ((g = t.state.data) == null ? void 0 : g.pages) || [], o = ((S = t.state.data) == null ? void 0 : S.pageParams) || [];
1013
+ let c = { pages: [], pageParams: [] }, f = 0;
1014
+ const m = async () => {
1015
+ let _ = !1;
1016
+ const P = (b) => {
1017
+ Object.defineProperty(b, "signal", {
1000
1018
  enumerable: !0,
1001
- get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
1002
- g = !0;
1019
+ get: () => (t.signal.aborted ? _ = !0 : t.signal.addEventListener("abort", () => {
1020
+ _ = !0;
1003
1021
  }), t.signal)
1004
1022
  });
1005
- }, u = ts(t.options, t.fetchOptions), d = async (j, M, R) => {
1006
- if (g)
1023
+ }, C = ss(t.options, t.fetchOptions), j = async (b, M, F) => {
1024
+ if (_)
1007
1025
  return Promise.reject();
1008
- if (M == null && j.pages.length)
1009
- return Promise.resolve(j);
1026
+ if (M == null && b.pages.length)
1027
+ return Promise.resolve(b);
1010
1028
  const J = {
1011
1029
  queryKey: t.queryKey,
1012
1030
  pageParam: M,
1013
- direction: R ? "backward" : "forward",
1031
+ direction: F ? "backward" : "forward",
1014
1032
  meta: t.options.meta
1015
1033
  };
1016
- h(J);
1017
- const te = await u(
1034
+ P(J);
1035
+ const te = await C(
1018
1036
  J
1019
- ), { maxPages: E } = t.options, Z = R ? Ws : qs;
1037
+ ), { maxPages: A } = t.options, Z = F ? Vs : Ws;
1020
1038
  return {
1021
- pages: Z(j.pages, te, E),
1022
- pageParams: Z(j.pageParams, M, E)
1039
+ pages: Z(b.pages, te, A),
1040
+ pageParams: Z(b.pageParams, M, A)
1023
1041
  };
1024
1042
  };
1025
- let m;
1026
- if (l && o.length) {
1027
- const j = l === "backward", M = j ? tr : Ot, R = {
1028
- pages: o,
1029
- pageParams: c
1030
- }, J = M(a, R);
1031
- m = await d(R, J, j);
1043
+ if (a && l.length) {
1044
+ const b = a === "backward", M = b ? tr : Rt, F = {
1045
+ pages: l,
1046
+ pageParams: o
1047
+ }, J = M(r, F);
1048
+ c = await j(F, J, b);
1032
1049
  } else {
1033
- m = await d(
1034
- v,
1035
- c[0] ?? a.initialPageParam
1036
- );
1037
- const j = e ?? o.length;
1038
- for (let M = 1; M < j; M++) {
1039
- const R = Ot(a, m);
1040
- if (R == null)
1050
+ const b = e ?? l.length;
1051
+ do {
1052
+ const M = f === 0 ? o[0] ?? r.initialPageParam : Rt(r, c);
1053
+ if (f > 0 && M == null)
1041
1054
  break;
1042
- m = await d(m, R);
1043
- }
1055
+ c = await j(c, M), f++;
1056
+ } while (f < b);
1044
1057
  }
1045
- return m;
1058
+ return c;
1046
1059
  };
1047
1060
  t.options.persister ? t.fetchFn = () => {
1048
- var a, l;
1049
- return (l = (a = t.options).persister) == null ? void 0 : l.call(
1050
- a,
1051
- r,
1061
+ var _, P;
1062
+ return (P = (_ = t.options).persister) == null ? void 0 : P.call(
1063
+ _,
1064
+ m,
1052
1065
  {
1053
1066
  queryKey: t.queryKey,
1054
1067
  meta: t.options.meta,
@@ -1056,11 +1069,11 @@ function er(e) {
1056
1069
  },
1057
1070
  s
1058
1071
  );
1059
- } : t.fetchFn = r;
1072
+ } : t.fetchFn = m;
1060
1073
  }
1061
1074
  };
1062
1075
  }
1063
- function Ot(e, { pages: t, pageParams: s }) {
1076
+ function Rt(e, { pages: t, pageParams: s }) {
1064
1077
  const r = t.length - 1;
1065
1078
  return t.length > 0 ? e.getNextPageParam(
1066
1079
  t[r],
@@ -1073,9 +1086,9 @@ function tr(e, { pages: t, pageParams: s }) {
1073
1086
  var r;
1074
1087
  return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, s[0], s) : void 0;
1075
1088
  }
1076
- var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1089
+ var R, le, ce, Me, Oe, ue, Re, Le, zt, cs = (zt = class {
1077
1090
  constructor(e = {}) {
1078
- y(this, L);
1091
+ y(this, R);
1079
1092
  y(this, le);
1080
1093
  y(this, ce);
1081
1094
  y(this, Me);
@@ -1083,13 +1096,13 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1083
1096
  y(this, ue);
1084
1097
  y(this, Re);
1085
1098
  y(this, Le);
1086
- p(this, L, e.queryCache || new Xs()), p(this, le, e.mutationCache || new Bs()), p(this, ce, e.defaultOptions || {}), p(this, Me, /* @__PURE__ */ new Map()), p(this, Oe, /* @__PURE__ */ new Map()), p(this, ue, 0);
1099
+ p(this, R, e.queryCache || new Is()), p(this, le, e.mutationCache || new er()), p(this, ce, e.defaultOptions || {}), p(this, Me, /* @__PURE__ */ new Map()), p(this, Oe, /* @__PURE__ */ new Map()), p(this, ue, 0);
1087
1100
  }
1088
1101
  mount() {
1089
1102
  ze(this, ue)._++, n(this, ue) === 1 && (p(this, Re, bt.subscribe(async (e) => {
1090
- e && (await this.resumePausedMutations(), n(this, L).onFocus());
1103
+ e && (await this.resumePausedMutations(), n(this, R).onFocus());
1091
1104
  })), p(this, Le, Be.subscribe(async (e) => {
1092
- e && (await this.resumePausedMutations(), n(this, L).onOnline());
1105
+ e && (await this.resumePausedMutations(), n(this, R).onOnline());
1093
1106
  })));
1094
1107
  }
1095
1108
  unmount() {
@@ -1097,7 +1110,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1097
1110
  ze(this, ue)._--, n(this, ue) === 0 && ((e = n(this, Re)) == null || e.call(this), p(this, Re, void 0), (t = n(this, Le)) == null || t.call(this), p(this, Le, void 0));
1098
1111
  }
1099
1112
  isFetching(e) {
1100
- return n(this, L).findAll({ ...e, fetchStatus: "fetching" }).length;
1113
+ return n(this, R).findAll({ ...e, fetchStatus: "fetching" }).length;
1101
1114
  }
1102
1115
  isMutating(e) {
1103
1116
  return n(this, le).findAll({ ...e, status: "pending" }).length;
@@ -1105,33 +1118,33 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1105
1118
  getQueryData(e) {
1106
1119
  var s;
1107
1120
  const t = this.defaultQueryOptions({ queryKey: e });
1108
- return (s = n(this, L).get(t.queryHash)) == null ? void 0 : s.state.data;
1121
+ return (s = n(this, R).get(t.queryHash)) == null ? void 0 : s.state.data;
1109
1122
  }
1110
1123
  ensureQueryData(e) {
1111
1124
  const t = this.getQueryData(e.queryKey);
1112
1125
  if (t === void 0)
1113
1126
  return this.fetchQuery(e);
1114
1127
  {
1115
- const s = this.defaultQueryOptions(e), r = n(this, L).build(this, s);
1128
+ const s = this.defaultQueryOptions(e), r = n(this, R).build(this, s);
1116
1129
  return e.revalidateIfStale && r.isStaleByTime(Se(s.staleTime, r)) && this.prefetchQuery(s), Promise.resolve(t);
1117
1130
  }
1118
1131
  }
1119
1132
  getQueriesData(e) {
1120
- return n(this, L).findAll(e).map(({ queryKey: t, state: s }) => {
1133
+ return n(this, R).findAll(e).map(({ queryKey: t, state: s }) => {
1121
1134
  const r = s.data;
1122
1135
  return [t, r];
1123
1136
  });
1124
1137
  }
1125
1138
  setQueryData(e, t, s) {
1126
- const r = this.defaultQueryOptions({ queryKey: e }), a = n(this, L).get(
1139
+ const r = this.defaultQueryOptions({ queryKey: e }), a = n(this, R).get(
1127
1140
  r.queryHash
1128
- ), l = a == null ? void 0 : a.state.data, o = Ks(t, l);
1141
+ ), l = a == null ? void 0 : a.state.data, o = Gs(t, l);
1129
1142
  if (o !== void 0)
1130
- return n(this, L).build(this, r).setData(o, { ...s, manual: !0 });
1143
+ return n(this, R).build(this, r).setData(o, { ...s, manual: !0 });
1131
1144
  }
1132
1145
  setQueriesData(e, t, s) {
1133
1146
  return D.batch(
1134
- () => n(this, L).findAll(e).map(({ queryKey: r }) => [
1147
+ () => n(this, R).findAll(e).map(({ queryKey: r }) => [
1135
1148
  r,
1136
1149
  this.setQueryData(r, t, s)
1137
1150
  ])
@@ -1140,10 +1153,10 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1140
1153
  getQueryState(e) {
1141
1154
  var s;
1142
1155
  const t = this.defaultQueryOptions({ queryKey: e });
1143
- return (s = n(this, L).get(t.queryHash)) == null ? void 0 : s.state;
1156
+ return (s = n(this, R).get(t.queryHash)) == null ? void 0 : s.state;
1144
1157
  }
1145
1158
  removeQueries(e) {
1146
- const t = n(this, L);
1159
+ const t = n(this, R);
1147
1160
  D.batch(() => {
1148
1161
  t.findAll(e).forEach((s) => {
1149
1162
  t.remove(s);
@@ -1151,7 +1164,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1151
1164
  });
1152
1165
  }
1153
1166
  resetQueries(e, t) {
1154
- const s = n(this, L), r = {
1167
+ const s = n(this, R), r = {
1155
1168
  type: "active",
1156
1169
  ...e
1157
1170
  };
@@ -1161,13 +1174,13 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1161
1174
  }
1162
1175
  cancelQueries(e = {}, t = {}) {
1163
1176
  const s = { revert: !0, ...t }, r = D.batch(
1164
- () => n(this, L).findAll(e).map((a) => a.cancel(s))
1177
+ () => n(this, R).findAll(e).map((a) => a.cancel(s))
1165
1178
  );
1166
1179
  return Promise.all(r).then($).catch($);
1167
1180
  }
1168
1181
  invalidateQueries(e = {}, t = {}) {
1169
1182
  return D.batch(() => {
1170
- if (n(this, L).findAll(e).forEach((r) => {
1183
+ if (n(this, R).findAll(e).forEach((r) => {
1171
1184
  r.invalidate();
1172
1185
  }), e.refetchType === "none")
1173
1186
  return Promise.resolve();
@@ -1183,7 +1196,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1183
1196
  ...t,
1184
1197
  cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
1185
1198
  }, r = D.batch(
1186
- () => n(this, L).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
1199
+ () => n(this, R).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
1187
1200
  let l = a.fetch(void 0, s);
1188
1201
  return s.throwOnError || (l = l.catch($)), a.state.fetchStatus === "paused" ? Promise.resolve() : l;
1189
1202
  })
@@ -1193,7 +1206,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1193
1206
  fetchQuery(e) {
1194
1207
  const t = this.defaultQueryOptions(e);
1195
1208
  t.retry === void 0 && (t.retry = !1);
1196
- const s = n(this, L).build(this, t);
1209
+ const s = n(this, R).build(this, t);
1197
1210
  return s.isStaleByTime(
1198
1211
  Se(t.staleTime, s)
1199
1212
  ) ? s.fetch(t) : Promise.resolve(s.state.data);
@@ -1202,16 +1215,19 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1202
1215
  return this.fetchQuery(e).then($).catch($);
1203
1216
  }
1204
1217
  fetchInfiniteQuery(e) {
1205
- return e.behavior = er(e.pages), this.fetchQuery(e);
1218
+ return e.behavior = Ot(e.pages), this.fetchQuery(e);
1206
1219
  }
1207
1220
  prefetchInfiniteQuery(e) {
1208
1221
  return this.fetchInfiniteQuery(e).then($).catch($);
1209
1222
  }
1223
+ ensureInfiniteQueryData(e) {
1224
+ return e.behavior = Ot(e.pages), this.ensureQueryData(e);
1225
+ }
1210
1226
  resumePausedMutations() {
1211
1227
  return Be.isOnline() ? n(this, le).resumePausedMutations() : Promise.resolve();
1212
1228
  }
1213
1229
  getQueryCache() {
1214
- return n(this, L);
1230
+ return n(this, R);
1215
1231
  }
1216
1232
  getMutationCache() {
1217
1233
  return n(this, le);
@@ -1260,7 +1276,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1260
1276
  return t.queryHash || (t.queryHash = xt(
1261
1277
  t.queryKey,
1262
1278
  t
1263
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === es && (t.enabled = !1), t;
1279
+ )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === ts && (t.enabled = !1), t;
1264
1280
  }
1265
1281
  defaultMutationOptions(e) {
1266
1282
  return e != null && e._defaulted ? e : {
@@ -1271,14 +1287,14 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1271
1287
  };
1272
1288
  }
1273
1289
  clear() {
1274
- n(this, L).clear(), n(this, le).clear();
1290
+ n(this, R).clear(), n(this, le).clear();
1275
1291
  }
1276
- }, L = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), Me = new WeakMap(), Oe = new WeakMap(), ue = new WeakMap(), Re = new WeakMap(), Le = new WeakMap(), Yt), H, _, Ve, Q, ye, Fe, ee, $e, De, Te, Ce, xe, he, Ue, N, Ke, lt, ct, ut, ht, dt, ft, pt, cs, zt, sr = (zt = class extends He {
1292
+ }, R = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), Me = new WeakMap(), Oe = new WeakMap(), ue = new WeakMap(), Re = new WeakMap(), Le = new WeakMap(), zt), H, E, Ve, Q, ye, Fe, ee, $e, De, Te, Ce, xe, he, Ue, N, Ke, lt, ct, ut, ht, dt, ft, pt, us, Jt, sr = (Jt = class extends He {
1277
1293
  constructor(t, s) {
1278
1294
  super();
1279
1295
  y(this, N);
1280
1296
  y(this, H);
1281
- y(this, _);
1297
+ y(this, E);
1282
1298
  y(this, Ve);
1283
1299
  y(this, Q);
1284
1300
  y(this, ye);
@@ -1299,52 +1315,52 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1299
1315
  this.refetch = this.refetch.bind(this);
1300
1316
  }
1301
1317
  onSubscribe() {
1302
- this.listeners.size === 1 && (n(this, _).addObserver(this), Rt(n(this, _), this.options) ? b(this, N, Ke).call(this) : this.updateResult(), b(this, N, ht).call(this));
1318
+ this.listeners.size === 1 && (n(this, E).addObserver(this), Lt(n(this, E), this.options) ? w(this, N, Ke).call(this) : this.updateResult(), w(this, N, ht).call(this));
1303
1319
  }
1304
1320
  onUnsubscribe() {
1305
1321
  this.hasListeners() || this.destroy();
1306
1322
  }
1307
1323
  shouldFetchOnReconnect() {
1308
1324
  return mt(
1309
- n(this, _),
1325
+ n(this, E),
1310
1326
  this.options,
1311
1327
  this.options.refetchOnReconnect
1312
1328
  );
1313
1329
  }
1314
1330
  shouldFetchOnWindowFocus() {
1315
1331
  return mt(
1316
- n(this, _),
1332
+ n(this, E),
1317
1333
  this.options,
1318
1334
  this.options.refetchOnWindowFocus
1319
1335
  );
1320
1336
  }
1321
1337
  destroy() {
1322
- this.listeners = /* @__PURE__ */ new Set(), b(this, N, dt).call(this), b(this, N, ft).call(this), n(this, _).removeObserver(this);
1338
+ this.listeners = /* @__PURE__ */ new Set(), w(this, N, dt).call(this), w(this, N, ft).call(this), n(this, E).removeObserver(this);
1323
1339
  }
1324
1340
  setOptions(t, s) {
1325
- const r = this.options, a = n(this, _);
1326
- if (this.options = n(this, H).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof z(this.options.enabled, n(this, _)) != "boolean")
1341
+ const r = this.options, a = n(this, E);
1342
+ if (this.options = n(this, H).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof z(this.options.enabled, n(this, E)) != "boolean")
1327
1343
  throw new Error(
1328
1344
  "Expected enabled to be a boolean or a callback that returns a boolean"
1329
1345
  );
1330
- b(this, N, pt).call(this), n(this, _).setOptions(this.options), r._defaulted && !Ie(this.options, r) && n(this, H).getQueryCache().notify({
1346
+ w(this, N, pt).call(this), n(this, E).setOptions(this.options), r._defaulted && !Ie(this.options, r) && n(this, H).getQueryCache().notify({
1331
1347
  type: "observerOptionsUpdated",
1332
- query: n(this, _),
1348
+ query: n(this, E),
1333
1349
  observer: this
1334
1350
  });
1335
1351
  const l = this.hasListeners();
1336
- l && Lt(
1337
- n(this, _),
1352
+ l && Ft(
1353
+ n(this, E),
1338
1354
  a,
1339
1355
  this.options,
1340
1356
  r
1341
- ) && b(this, N, Ke).call(this), this.updateResult(s), l && (n(this, _) !== a || z(this.options.enabled, n(this, _)) !== z(r.enabled, n(this, _)) || Se(this.options.staleTime, n(this, _)) !== Se(r.staleTime, n(this, _))) && b(this, N, lt).call(this);
1342
- const o = b(this, N, ct).call(this);
1343
- l && (n(this, _) !== a || z(this.options.enabled, n(this, _)) !== z(r.enabled, n(this, _)) || o !== n(this, he)) && b(this, N, ut).call(this, o);
1357
+ ) && w(this, N, Ke).call(this), this.updateResult(s), l && (n(this, E) !== a || z(this.options.enabled, n(this, E)) !== z(r.enabled, n(this, E)) || Se(this.options.staleTime, n(this, E)) !== Se(r.staleTime, n(this, E))) && w(this, N, lt).call(this);
1358
+ const o = w(this, N, ct).call(this);
1359
+ l && (n(this, E) !== a || z(this.options.enabled, n(this, E)) !== z(r.enabled, n(this, E)) || o !== n(this, he)) && w(this, N, ut).call(this, o);
1344
1360
  }
1345
1361
  getOptimisticResult(t) {
1346
1362
  const s = n(this, H).getQueryCache().build(n(this, H), t), r = this.createResult(s, t);
1347
- return ir(this, r) && (p(this, Q, r), p(this, Fe, this.options), p(this, ye, n(this, _).state)), r;
1363
+ return ir(this, r) && (p(this, Q, r), p(this, Fe, this.options), p(this, ye, n(this, E).state)), r;
1348
1364
  }
1349
1365
  getCurrentResult() {
1350
1366
  return n(this, Q);
@@ -1363,7 +1379,7 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1363
1379
  n(this, Ue).add(t);
1364
1380
  }
1365
1381
  getCurrentQuery() {
1366
- return n(this, _);
1382
+ return n(this, E);
1367
1383
  }
1368
1384
  refetch({ ...t } = {}) {
1369
1385
  return this.fetch({
@@ -1375,85 +1391,85 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1375
1391
  return r.isFetchingOptimistic = !0, r.fetch().then(() => this.createResult(r, s));
1376
1392
  }
1377
1393
  fetch(t) {
1378
- return b(this, N, Ke).call(this, {
1394
+ return w(this, N, Ke).call(this, {
1379
1395
  ...t,
1380
1396
  cancelRefetch: t.cancelRefetch ?? !0
1381
1397
  }).then(() => (this.updateResult(), n(this, Q)));
1382
1398
  }
1383
1399
  createResult(t, s) {
1384
1400
  var te;
1385
- const r = n(this, _), a = this.options, l = n(this, Q), o = n(this, ye), c = n(this, Fe), g = t !== r ? t.state : n(this, Ve), { state: h } = t;
1386
- let u = { ...h }, d = !1, m;
1401
+ const r = n(this, E), a = this.options, l = n(this, Q), o = n(this, ye), c = n(this, Fe), m = t !== r ? t.state : n(this, Ve), { state: h } = t;
1402
+ let u = { ...h }, v = !1, g;
1387
1403
  if (s._optimisticResults) {
1388
- const E = this.hasListeners(), Z = !E && Rt(t, s), Ls = E && Lt(t, r, s, a);
1389
- (Z || Ls) && (u = {
1404
+ const A = this.hasListeners(), Z = !A && Lt(t, s), Fs = A && Ft(t, r, s, a);
1405
+ (Z || Fs) && (u = {
1390
1406
  ...u,
1391
- ...as(h.data, t.options)
1407
+ ...os(h.data, t.options)
1392
1408
  }), s._optimisticResults === "isRestoring" && (u.fetchStatus = "idle");
1393
1409
  }
1394
- let { error: S, errorUpdatedAt: P, status: A } = u;
1410
+ let { error: S, errorUpdatedAt: _, status: P } = u;
1395
1411
  if (s.select && u.data !== void 0)
1396
1412
  if (l && u.data === (o == null ? void 0 : o.data) && s.select === n(this, $e))
1397
- m = n(this, De);
1413
+ g = n(this, De);
1398
1414
  else
1399
1415
  try {
1400
- p(this, $e, s.select), m = s.select(u.data), m = ot(l == null ? void 0 : l.data, m, s), p(this, De, m), p(this, ee, null);
1401
- } catch (E) {
1402
- p(this, ee, E);
1416
+ p(this, $e, s.select), g = s.select(u.data), g = ot(l == null ? void 0 : l.data, g, s), p(this, De, g), p(this, ee, null);
1417
+ } catch (A) {
1418
+ p(this, ee, A);
1403
1419
  }
1404
1420
  else
1405
- m = u.data;
1406
- if (s.placeholderData !== void 0 && m === void 0 && A === "pending") {
1407
- let E;
1421
+ g = u.data;
1422
+ if (s.placeholderData !== void 0 && g === void 0 && P === "pending") {
1423
+ let A;
1408
1424
  if (l != null && l.isPlaceholderData && s.placeholderData === (c == null ? void 0 : c.placeholderData))
1409
- E = l.data;
1410
- else if (E = typeof s.placeholderData == "function" ? s.placeholderData(
1425
+ A = l.data;
1426
+ else if (A = typeof s.placeholderData == "function" ? s.placeholderData(
1411
1427
  (te = n(this, Te)) == null ? void 0 : te.state.data,
1412
1428
  n(this, Te)
1413
- ) : s.placeholderData, s.select && E !== void 0)
1429
+ ) : s.placeholderData, s.select && A !== void 0)
1414
1430
  try {
1415
- E = s.select(E), p(this, ee, null);
1431
+ A = s.select(A), p(this, ee, null);
1416
1432
  } catch (Z) {
1417
1433
  p(this, ee, Z);
1418
1434
  }
1419
- E !== void 0 && (A = "success", m = ot(
1435
+ A !== void 0 && (P = "success", g = ot(
1420
1436
  l == null ? void 0 : l.data,
1421
- E,
1437
+ A,
1422
1438
  s
1423
- ), d = !0);
1439
+ ), v = !0);
1424
1440
  }
1425
- n(this, ee) && (S = n(this, ee), m = n(this, De), P = Date.now(), A = "error");
1426
- const C = u.fetchStatus === "fetching", w = A === "pending", j = A === "error", M = w && C, R = m !== void 0;
1441
+ n(this, ee) && (S = n(this, ee), g = n(this, De), _ = Date.now(), P = "error");
1442
+ const C = u.fetchStatus === "fetching", j = P === "pending", b = P === "error", M = j && C, F = g !== void 0;
1427
1443
  return {
1428
- status: A,
1444
+ status: P,
1429
1445
  fetchStatus: u.fetchStatus,
1430
- isPending: w,
1431
- isSuccess: A === "success",
1432
- isError: j,
1446
+ isPending: j,
1447
+ isSuccess: P === "success",
1448
+ isError: b,
1433
1449
  isInitialLoading: M,
1434
1450
  isLoading: M,
1435
- data: m,
1451
+ data: g,
1436
1452
  dataUpdatedAt: u.dataUpdatedAt,
1437
1453
  error: S,
1438
- errorUpdatedAt: P,
1454
+ errorUpdatedAt: _,
1439
1455
  failureCount: u.fetchFailureCount,
1440
1456
  failureReason: u.fetchFailureReason,
1441
1457
  errorUpdateCount: u.errorUpdateCount,
1442
1458
  isFetched: u.dataUpdateCount > 0 || u.errorUpdateCount > 0,
1443
- isFetchedAfterMount: u.dataUpdateCount > g.dataUpdateCount || u.errorUpdateCount > g.errorUpdateCount,
1459
+ isFetchedAfterMount: u.dataUpdateCount > m.dataUpdateCount || u.errorUpdateCount > m.errorUpdateCount,
1444
1460
  isFetching: C,
1445
- isRefetching: C && !w,
1446
- isLoadingError: j && !R,
1461
+ isRefetching: C && !j,
1462
+ isLoadingError: b && !F,
1447
1463
  isPaused: u.fetchStatus === "paused",
1448
- isPlaceholderData: d,
1449
- isRefetchError: j && R,
1464
+ isPlaceholderData: v,
1465
+ isRefetchError: b && F,
1450
1466
  isStale: wt(t, s),
1451
1467
  refetch: this.refetch
1452
1468
  };
1453
1469
  }
1454
1470
  updateResult(t) {
1455
- const s = n(this, Q), r = this.createResult(n(this, _), this.options);
1456
- if (p(this, ye, n(this, _).state), p(this, Fe, this.options), n(this, ye).data !== void 0 && p(this, Te, n(this, _)), Ie(r, s))
1471
+ const s = n(this, Q), r = this.createResult(n(this, E), this.options);
1472
+ if (p(this, ye, n(this, E).state), p(this, Fe, this.options), n(this, ye).data !== void 0 && p(this, Te, n(this, E)), Ie(r, s))
1457
1473
  return;
1458
1474
  p(this, Q, r);
1459
1475
  const a = {}, l = () => {
@@ -1462,70 +1478,70 @@ var L, le, ce, Me, Oe, ue, Re, Le, Yt, ls = (Yt = class {
1462
1478
  const { notifyOnChangeProps: o } = this.options, c = typeof o == "function" ? o() : o;
1463
1479
  if (c === "all" || !c && !n(this, Ue).size)
1464
1480
  return !0;
1465
- const v = new Set(
1481
+ const f = new Set(
1466
1482
  c ?? n(this, Ue)
1467
1483
  );
1468
- return this.options.throwOnError && v.add("error"), Object.keys(n(this, Q)).some((g) => {
1469
- const h = g;
1470
- return n(this, Q)[h] !== s[h] && v.has(h);
1484
+ return this.options.throwOnError && f.add("error"), Object.keys(n(this, Q)).some((m) => {
1485
+ const h = m;
1486
+ return n(this, Q)[h] !== s[h] && f.has(h);
1471
1487
  });
1472
1488
  };
1473
- (t == null ? void 0 : t.listeners) !== !1 && l() && (a.listeners = !0), b(this, N, cs).call(this, { ...a, ...t });
1489
+ (t == null ? void 0 : t.listeners) !== !1 && l() && (a.listeners = !0), w(this, N, us).call(this, { ...a, ...t });
1474
1490
  }
1475
1491
  onQueryUpdate() {
1476
- this.updateResult(), this.hasListeners() && b(this, N, ht).call(this);
1492
+ this.updateResult(), this.hasListeners() && w(this, N, ht).call(this);
1477
1493
  }
1478
- }, H = new WeakMap(), _ = new WeakMap(), Ve = new WeakMap(), Q = new WeakMap(), ye = new WeakMap(), Fe = new WeakMap(), ee = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), xe = new WeakMap(), he = new WeakMap(), Ue = new WeakMap(), N = new WeakSet(), Ke = function(t) {
1479
- b(this, N, pt).call(this);
1480
- let s = n(this, _).fetch(
1494
+ }, H = new WeakMap(), E = new WeakMap(), Ve = new WeakMap(), Q = new WeakMap(), ye = new WeakMap(), Fe = new WeakMap(), ee = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), xe = new WeakMap(), he = new WeakMap(), Ue = new WeakMap(), N = new WeakSet(), Ke = function(t) {
1495
+ w(this, N, pt).call(this);
1496
+ let s = n(this, E).fetch(
1481
1497
  this.options,
1482
1498
  t
1483
1499
  );
1484
1500
  return t != null && t.throwOnError || (s = s.catch($)), s;
1485
1501
  }, lt = function() {
1486
- b(this, N, dt).call(this);
1502
+ w(this, N, dt).call(this);
1487
1503
  const t = Se(
1488
1504
  this.options.staleTime,
1489
- n(this, _)
1505
+ n(this, E)
1490
1506
  );
1491
1507
  if (Qe || n(this, Q).isStale || !nt(t))
1492
1508
  return;
1493
- const r = It(n(this, Q).dataUpdatedAt, t) + 1;
1509
+ const r = Bt(n(this, Q).dataUpdatedAt, t) + 1;
1494
1510
  p(this, Ce, setTimeout(() => {
1495
1511
  n(this, Q).isStale || this.updateResult();
1496
1512
  }, r));
1497
1513
  }, ct = function() {
1498
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, _)) : this.options.refetchInterval) ?? !1;
1514
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, E)) : this.options.refetchInterval) ?? !1;
1499
1515
  }, ut = function(t) {
1500
- b(this, N, ft).call(this), p(this, he, t), !(Qe || z(this.options.enabled, n(this, _)) === !1 || !nt(n(this, he)) || n(this, he) === 0) && p(this, xe, setInterval(() => {
1501
- (this.options.refetchIntervalInBackground || bt.isFocused()) && b(this, N, Ke).call(this);
1516
+ w(this, N, ft).call(this), p(this, he, t), !(Qe || z(this.options.enabled, n(this, E)) === !1 || !nt(n(this, he)) || n(this, he) === 0) && p(this, xe, setInterval(() => {
1517
+ (this.options.refetchIntervalInBackground || bt.isFocused()) && w(this, N, Ke).call(this);
1502
1518
  }, n(this, he)));
1503
1519
  }, ht = function() {
1504
- b(this, N, lt).call(this), b(this, N, ut).call(this, b(this, N, ct).call(this));
1520
+ w(this, N, lt).call(this), w(this, N, ut).call(this, w(this, N, ct).call(this));
1505
1521
  }, dt = function() {
1506
1522
  n(this, Ce) && (clearTimeout(n(this, Ce)), p(this, Ce, void 0));
1507
1523
  }, ft = function() {
1508
1524
  n(this, xe) && (clearInterval(n(this, xe)), p(this, xe, void 0));
1509
1525
  }, pt = function() {
1510
1526
  const t = n(this, H).getQueryCache().build(n(this, H), this.options);
1511
- if (t === n(this, _))
1527
+ if (t === n(this, E))
1512
1528
  return;
1513
- const s = n(this, _);
1514
- p(this, _, t), p(this, Ve, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
1515
- }, cs = function(t) {
1529
+ const s = n(this, E);
1530
+ p(this, E, t), p(this, Ve, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
1531
+ }, us = function(t) {
1516
1532
  D.batch(() => {
1517
1533
  t.listeners && this.listeners.forEach((s) => {
1518
1534
  s(n(this, Q));
1519
1535
  }), n(this, H).getQueryCache().notify({
1520
- query: n(this, _),
1536
+ query: n(this, E),
1521
1537
  type: "observerResultsUpdated"
1522
1538
  });
1523
1539
  });
1524
- }, zt);
1540
+ }, Jt);
1525
1541
  function rr(e, t) {
1526
1542
  return z(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
1527
1543
  }
1528
- function Rt(e, t) {
1544
+ function Lt(e, t) {
1529
1545
  return rr(e, t) || e.state.data !== void 0 && mt(e, t, t.refetchOnMount);
1530
1546
  }
1531
1547
  function mt(e, t, s) {
@@ -1535,7 +1551,7 @@ function mt(e, t, s) {
1535
1551
  }
1536
1552
  return !1;
1537
1553
  }
1538
- function Lt(e, t, s, r) {
1554
+ function Ft(e, t, s, r) {
1539
1555
  return (e !== t || z(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && wt(e, s);
1540
1556
  }
1541
1557
  function wt(e, t) {
@@ -1544,7 +1560,7 @@ function wt(e, t) {
1544
1560
  function ir(e, t) {
1545
1561
  return !Ie(e.getCurrentResult(), t);
1546
1562
  }
1547
- var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1563
+ var de, fe, K, re, ie, Xe, vt, Xt, nr = (Xt = class extends He {
1548
1564
  constructor(t, s) {
1549
1565
  super();
1550
1566
  y(this, ie);
@@ -1552,7 +1568,7 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1552
1568
  y(this, fe);
1553
1569
  y(this, K);
1554
1570
  y(this, re);
1555
- p(this, de, t), this.setOptions(s), this.bindMethods(), b(this, ie, Xe).call(this);
1571
+ p(this, de, t), this.setOptions(s), this.bindMethods(), w(this, ie, Xe).call(this);
1556
1572
  }
1557
1573
  bindMethods() {
1558
1574
  this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
@@ -1571,14 +1587,14 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1571
1587
  this.hasListeners() || (t = n(this, K)) == null || t.removeObserver(this);
1572
1588
  }
1573
1589
  onMutationUpdate(t) {
1574
- b(this, ie, Xe).call(this), b(this, ie, vt).call(this, t);
1590
+ w(this, ie, Xe).call(this), w(this, ie, vt).call(this, t);
1575
1591
  }
1576
1592
  getCurrentResult() {
1577
1593
  return n(this, fe);
1578
1594
  }
1579
1595
  reset() {
1580
1596
  var t;
1581
- (t = n(this, K)) == null || t.removeObserver(this), p(this, K, void 0), b(this, ie, Xe).call(this), b(this, ie, vt).call(this);
1597
+ (t = n(this, K)) == null || t.removeObserver(this), p(this, K, void 0), w(this, ie, Xe).call(this), w(this, ie, vt).call(this);
1582
1598
  }
1583
1599
  mutate(t, s) {
1584
1600
  var r;
@@ -1586,7 +1602,7 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1586
1602
  }
1587
1603
  }, de = new WeakMap(), fe = new WeakMap(), K = new WeakMap(), re = new WeakMap(), ie = new WeakSet(), Xe = function() {
1588
1604
  var s;
1589
- const t = ((s = n(this, K)) == null ? void 0 : s.state) ?? os();
1605
+ const t = ((s = n(this, K)) == null ? void 0 : s.state) ?? ls();
1590
1606
  p(this, fe, {
1591
1607
  ...t,
1592
1608
  isPending: t.status === "pending",
@@ -1598,11 +1614,11 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1598
1614
  });
1599
1615
  }, vt = function(t) {
1600
1616
  D.batch(() => {
1601
- var s, r, a, l, o, c, v, g;
1617
+ var s, r, a, l, o, c, f, m;
1602
1618
  if (n(this, re) && this.hasListeners()) {
1603
1619
  const h = n(this, fe).variables, u = n(this, fe).context;
1604
- (t == null ? void 0 : t.type) === "success" ? ((r = (s = n(this, re)).onSuccess) == null || r.call(s, t.data, h, u), (l = (a = n(this, re)).onSettled) == null || l.call(a, t.data, null, h, u)) : (t == null ? void 0 : t.type) === "error" && ((c = (o = n(this, re)).onError) == null || c.call(o, t.error, h, u), (g = (v = n(this, re)).onSettled) == null || g.call(
1605
- v,
1620
+ (t == null ? void 0 : t.type) === "success" ? ((r = (s = n(this, re)).onSuccess) == null || r.call(s, t.data, h, u), (l = (a = n(this, re)).onSettled) == null || l.call(a, t.data, null, h, u)) : (t == null ? void 0 : t.type) === "error" && ((c = (o = n(this, re)).onError) == null || c.call(o, t.error, h, u), (m = (f = n(this, re)).onSettled) == null || m.call(
1621
+ f,
1606
1622
  void 0,
1607
1623
  t.error,
1608
1624
  h,
@@ -1613,20 +1629,20 @@ var de, fe, K, re, ie, Xe, vt, Jt, nr = (Jt = class extends He {
1613
1629
  h(n(this, fe));
1614
1630
  });
1615
1631
  });
1616
- }, Jt), us = f.createContext(
1632
+ }, Xt), hs = d.createContext(
1617
1633
  void 0
1618
1634
  ), jt = (e) => {
1619
- const t = f.useContext(us);
1635
+ const t = d.useContext(hs);
1620
1636
  if (!t)
1621
1637
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1622
1638
  return t;
1623
1639
  }, ar = ({
1624
1640
  client: e,
1625
1641
  children: t
1626
- }) => (f.useEffect(() => (e.mount(), () => {
1642
+ }) => (d.useEffect(() => (e.mount(), () => {
1627
1643
  e.unmount();
1628
- }), [e]), /* @__PURE__ */ i.jsx(us.Provider, { value: e, children: t })), hs = f.createContext(!1), or = () => f.useContext(hs);
1629
- hs.Provider;
1644
+ }), [e]), /* @__PURE__ */ i.jsx(hs.Provider, { value: e, children: t })), ds = d.createContext(!1), or = () => d.useContext(ds);
1645
+ ds.Provider;
1630
1646
  function lr() {
1631
1647
  let e = !1;
1632
1648
  return {
@@ -1639,8 +1655,8 @@ function lr() {
1639
1655
  isReset: () => e
1640
1656
  };
1641
1657
  }
1642
- var cr = f.createContext(lr()), ur = () => f.useContext(cr);
1643
- function ds(e, t) {
1658
+ var cr = d.createContext(lr()), ur = () => d.useContext(cr);
1659
+ function fs(e, t) {
1644
1660
  return typeof e == "function" ? e(...t) : !!e;
1645
1661
  }
1646
1662
  function hr() {
@@ -1648,7 +1664,7 @@ function hr() {
1648
1664
  var dr = (e, t) => {
1649
1665
  (e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
1650
1666
  }, fr = (e) => {
1651
- f.useEffect(() => {
1667
+ d.useEffect(() => {
1652
1668
  e.clearReset();
1653
1669
  }, [e]);
1654
1670
  }, pr = ({
@@ -1656,109 +1672,109 @@ var dr = (e, t) => {
1656
1672
  errorResetBoundary: t,
1657
1673
  throwOnError: s,
1658
1674
  query: r
1659
- }) => e.isError && !t.isReset() && !e.isFetching && r && ds(s, [e.error, r]), mr = (e) => {
1675
+ }) => e.isError && !t.isReset() && !e.isFetching && r && fs(s, [e.error, r]), mr = (e) => {
1660
1676
  e.suspense && (typeof e.staleTime != "number" && (e.staleTime = 1e3), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, 1e3)));
1661
1677
  }, vr = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, gr = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1662
1678
  s.clearReset();
1663
1679
  });
1664
1680
  function yr(e, t, s) {
1665
- var g, h, u, d;
1681
+ var m, h, u, v;
1666
1682
  const r = jt(), a = or(), l = ur(), o = r.defaultQueryOptions(e);
1667
- (h = (g = r.getDefaultOptions().queries) == null ? void 0 : g._experimental_beforeQuery) == null || h.call(
1668
- g,
1683
+ (h = (m = r.getDefaultOptions().queries) == null ? void 0 : m._experimental_beforeQuery) == null || h.call(
1684
+ m,
1669
1685
  o
1670
1686
  ), o._optimisticResults = a ? "isRestoring" : "optimistic", mr(o), dr(o, l), fr(l);
1671
- const [c] = f.useState(
1687
+ const [c] = d.useState(
1672
1688
  () => new t(
1673
1689
  r,
1674
1690
  o
1675
1691
  )
1676
- ), v = c.getOptimisticResult(o);
1677
- if (f.useSyncExternalStore(
1678
- f.useCallback(
1679
- (m) => {
1692
+ ), f = c.getOptimisticResult(o);
1693
+ if (d.useSyncExternalStore(
1694
+ d.useCallback(
1695
+ (g) => {
1680
1696
  const S = a ? () => {
1681
- } : c.subscribe(D.batchCalls(m));
1697
+ } : c.subscribe(D.batchCalls(g));
1682
1698
  return c.updateResult(), S;
1683
1699
  },
1684
1700
  [c, a]
1685
1701
  ),
1686
1702
  () => c.getCurrentResult(),
1687
1703
  () => c.getCurrentResult()
1688
- ), f.useEffect(() => {
1704
+ ), d.useEffect(() => {
1689
1705
  c.setOptions(o, { listeners: !1 });
1690
- }, [o, c]), vr(o, v))
1706
+ }, [o, c]), vr(o, f))
1691
1707
  throw gr(o, c, l);
1692
1708
  if (pr({
1693
- result: v,
1709
+ result: f,
1694
1710
  errorResetBoundary: l,
1695
1711
  throwOnError: o.throwOnError,
1696
1712
  query: r.getQueryCache().get(o.queryHash)
1697
1713
  }))
1698
- throw v.error;
1699
- return (d = (u = r.getDefaultOptions().queries) == null ? void 0 : u._experimental_afterQuery) == null || d.call(
1714
+ throw f.error;
1715
+ return (v = (u = r.getDefaultOptions().queries) == null ? void 0 : u._experimental_afterQuery) == null || v.call(
1700
1716
  u,
1701
1717
  o,
1702
- v
1703
- ), o.notifyOnChangeProps ? v : c.trackResult(v);
1718
+ f
1719
+ ), o.notifyOnChangeProps ? f : c.trackResult(f);
1704
1720
  }
1705
- function fs(e, t) {
1721
+ function ps(e, t) {
1706
1722
  return yr(e, sr);
1707
1723
  }
1708
1724
  function Cr(e, t) {
1709
- const s = jt(), [r] = f.useState(
1725
+ const s = jt(), [r] = d.useState(
1710
1726
  () => new nr(
1711
1727
  s,
1712
1728
  e
1713
1729
  )
1714
1730
  );
1715
- f.useEffect(() => {
1731
+ d.useEffect(() => {
1716
1732
  r.setOptions(e);
1717
1733
  }, [r, e]);
1718
- const a = f.useSyncExternalStore(
1719
- f.useCallback(
1734
+ const a = d.useSyncExternalStore(
1735
+ d.useCallback(
1720
1736
  (o) => r.subscribe(D.batchCalls(o)),
1721
1737
  [r]
1722
1738
  ),
1723
1739
  () => r.getCurrentResult(),
1724
1740
  () => r.getCurrentResult()
1725
- ), l = f.useCallback(
1741
+ ), l = d.useCallback(
1726
1742
  (o, c) => {
1727
1743
  r.mutate(o, c).catch(hr);
1728
1744
  },
1729
1745
  [r]
1730
1746
  );
1731
- if (a.error && ds(r.options.throwOnError, [a.error]))
1747
+ if (a.error && fs(r.options.throwOnError, [a.error]))
1732
1748
  throw a.error;
1733
1749
  return { ...a, mutate: l, mutateAsync: a.mutate };
1734
1750
  }
1735
- function ps(e) {
1751
+ function ms(e) {
1736
1752
  var t, s, r = "";
1737
1753
  if (typeof e == "string" || typeof e == "number") r += e;
1738
1754
  else if (typeof e == "object") if (Array.isArray(e)) {
1739
1755
  var a = e.length;
1740
- for (t = 0; t < a; t++) e[t] && (s = ps(e[t])) && (r && (r += " "), r += s);
1756
+ for (t = 0; t < a; t++) e[t] && (s = ms(e[t])) && (r && (r += " "), r += s);
1741
1757
  } else for (s in e) e[s] && (r && (r += " "), r += s);
1742
1758
  return r;
1743
1759
  }
1744
1760
  function O() {
1745
- for (var e, t, s = 0, r = "", a = arguments.length; s < a; s++) (e = arguments[s]) && (t = ps(e)) && (r && (r += " "), r += t);
1761
+ for (var e, t, s = 0, r = "", a = arguments.length; s < a; s++) (e = arguments[s]) && (t = ms(e)) && (r && (r += " "), r += t);
1746
1762
  return r;
1747
1763
  }
1748
- var xr = Object.defineProperty, br = Object.defineProperties, wr = Object.getOwnPropertyDescriptors, et = Object.getOwnPropertySymbols, ms = Object.prototype.hasOwnProperty, vs = Object.prototype.propertyIsEnumerable, Ft = (e, t, s) => t in e ? xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, x = (e, t) => {
1764
+ var xr = Object.defineProperty, br = Object.defineProperties, wr = Object.getOwnPropertyDescriptors, et = Object.getOwnPropertySymbols, vs = Object.prototype.hasOwnProperty, gs = Object.prototype.propertyIsEnumerable, Dt = (e, t, s) => t in e ? xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, x = (e, t) => {
1749
1765
  for (var s in t || (t = {}))
1750
- ms.call(t, s) && Ft(e, s, t[s]);
1766
+ vs.call(t, s) && Dt(e, s, t[s]);
1751
1767
  if (et)
1752
1768
  for (var s of et(t))
1753
- vs.call(t, s) && Ft(e, s, t[s]);
1769
+ gs.call(t, s) && Dt(e, s, t[s]);
1754
1770
  return e;
1755
- }, k = (e, t) => br(e, wr(t)), F = (e, t) => {
1771
+ }, k = (e, t) => br(e, wr(t)), L = (e, t) => {
1756
1772
  var s = {};
1757
1773
  for (var r in e)
1758
- ms.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
1774
+ vs.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
1759
1775
  if (e != null && et)
1760
1776
  for (var r of et(e))
1761
- t.indexOf(r) < 0 && vs.call(e, r) && (s[r] = e[r]);
1777
+ t.indexOf(r) < 0 && gs.call(e, r) && (s[r] = e[r]);
1762
1778
  return s;
1763
1779
  };
1764
1780
  function jr(e, t) {
@@ -1767,32 +1783,32 @@ function jr(e, t) {
1767
1783
  function _r(...e) {
1768
1784
  return (t) => e.forEach((s) => jr(s, t));
1769
1785
  }
1770
- var Sr = f.forwardRef((e, t) => {
1771
- const s = e, { children: r } = s, a = F(s, ["children"]), l = f.Children.toArray(r), o = l.find(Pr);
1786
+ var Sr = d.forwardRef((e, t) => {
1787
+ const s = e, { children: r } = s, a = L(s, ["children"]), l = d.Children.toArray(r), o = l.find(Pr);
1772
1788
  if (o) {
1773
- const c = o.props.children, v = l.map((g) => g === o ? f.Children.count(c) > 1 ? f.Children.only(null) : f.isValidElement(c) ? c.props.children : null : g);
1774
- return /* @__PURE__ */ i.jsx(gt, k(x({}, a), { ref: t, children: f.isValidElement(c) ? f.cloneElement(c, void 0, v) : null }));
1789
+ const c = o.props.children, f = l.map((m) => m === o ? d.Children.count(c) > 1 ? d.Children.only(null) : d.isValidElement(c) ? c.props.children : null : m);
1790
+ return /* @__PURE__ */ i.jsx(gt, k(x({}, a), { ref: t, children: d.isValidElement(c) ? d.cloneElement(c, void 0, f) : null }));
1775
1791
  }
1776
1792
  return /* @__PURE__ */ i.jsx(gt, k(x({}, a), { ref: t, children: r }));
1777
1793
  });
1778
1794
  Sr.displayName = "Slot";
1779
- var gt = f.forwardRef((e, t) => {
1780
- const s = e, { children: r } = s, a = F(s, ["children"]);
1781
- if (f.isValidElement(r)) {
1782
- const l = Ar(r);
1783
- return f.cloneElement(r, k(x({}, kr(a, r.props)), {
1795
+ var gt = d.forwardRef((e, t) => {
1796
+ const s = e, { children: r } = s, a = L(s, ["children"]);
1797
+ if (d.isValidElement(r)) {
1798
+ const l = kr(r);
1799
+ return d.cloneElement(r, k(x({}, Ar(a, r.props)), {
1784
1800
  // @ts-ignore
1785
1801
  ref: t ? _r(t, l) : l
1786
1802
  }));
1787
1803
  }
1788
- return f.Children.count(r) > 1 ? f.Children.only(null) : null;
1804
+ return d.Children.count(r) > 1 ? d.Children.only(null) : null;
1789
1805
  });
1790
1806
  gt.displayName = "SlotClone";
1791
1807
  var Er = ({ children: e }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e });
1792
1808
  function Pr(e) {
1793
- return f.isValidElement(e) && e.type === Er;
1809
+ return d.isValidElement(e) && e.type === Er;
1794
1810
  }
1795
- function kr(e, t) {
1811
+ function Ar(e, t) {
1796
1812
  const s = x({}, t);
1797
1813
  for (const r in t) {
1798
1814
  const a = e[r], l = t[r];
@@ -1802,7 +1818,7 @@ function kr(e, t) {
1802
1818
  }
1803
1819
  return x(x({}, e), s);
1804
1820
  }
1805
- function Ar(e) {
1821
+ function kr(e) {
1806
1822
  var t, s;
1807
1823
  let r = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = r && "isReactWarning" in r && r.isReactWarning;
1808
1824
  return a ? e.ref : (r = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, a = r && "isReactWarning" in r && r.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
@@ -1818,7 +1834,7 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1818
1834
  children: /* @__PURE__ */ i.jsx("span", { className: "avatar__initials", children: r })
1819
1835
  }
1820
1836
  );
1821
- }, Ze = f.forwardRef(
1837
+ }, Ze = d.forwardRef(
1822
1838
  (e, t) => {
1823
1839
  var s = e, {
1824
1840
  iconLeft: r,
@@ -1826,9 +1842,9 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1826
1842
  isPending: l = !1,
1827
1843
  isFilled: o = !1,
1828
1844
  variant: c,
1829
- className: v,
1830
- children: g
1831
- } = s, h = F(s, [
1845
+ className: f,
1846
+ children: m
1847
+ } = s, h = L(s, [
1832
1848
  "iconLeft",
1833
1849
  "iconRight",
1834
1850
  "isPending",
@@ -1849,11 +1865,11 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1849
1865
  c && o && `button--${c}--filled`,
1850
1866
  u && "button--with-icon",
1851
1867
  l && "button--pending",
1852
- v
1868
+ f
1853
1869
  ),
1854
1870
  children: [
1855
1871
  r && /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: r }),
1856
- !!g && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: g }),
1872
+ !!m && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: m }),
1857
1873
  a && /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: a })
1858
1874
  ]
1859
1875
  })
@@ -1861,10 +1877,10 @@ var Nr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1861
1877
  }
1862
1878
  );
1863
1879
  Ze.displayName = "Button";
1864
- f.createContext(void 0);
1865
- var Mr = f.forwardRef(
1880
+ d.createContext(void 0);
1881
+ var Mr = d.forwardRef(
1866
1882
  (e, t) => {
1867
- var s = e, { prefix: r, suffix: a, className: l } = s, o = F(s, ["prefix", "suffix", "className"]);
1883
+ var s = e, { prefix: r, suffix: a, className: l } = s, o = L(s, ["prefix", "suffix", "className"]);
1868
1884
  return /* @__PURE__ */ i.jsxs("div", { className: "input__wrapper", children: [
1869
1885
  r && /* @__PURE__ */ i.jsx("span", { className: "input__prefix", children: r }),
1870
1886
  /* @__PURE__ */ i.jsx(
@@ -1884,9 +1900,9 @@ var Mr = f.forwardRef(
1884
1900
  }
1885
1901
  );
1886
1902
  Mr.displayName = "TextField";
1887
- f.createContext(void 0);
1903
+ d.createContext(void 0);
1888
1904
  var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), Rr = (e) => {
1889
- var t = e, { children: s, className: r } = t, a = F(t, ["children", "className"]);
1905
+ var t = e, { children: s, className: r } = t, a = L(t, ["children", "className"]);
1890
1906
  return /* @__PURE__ */ i.jsx("div", k(x({ className: O("card__body", r) }, a), { children: s }));
1891
1907
  }, Lr = (e) => /* @__PURE__ */ i.jsx(
1892
1908
  "svg",
@@ -2107,7 +2123,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2107
2123
  ]
2108
2124
  })
2109
2125
  ), Yr = Zr, zr = (e) => {
2110
- var t = e, { className: s } = t, r = F(t, ["className"]);
2126
+ var t = e, { className: s } = t, r = L(t, ["className"]);
2111
2127
  return /* @__PURE__ */ i.jsxs(
2112
2128
  "svg",
2113
2129
  k(x({
@@ -2340,7 +2356,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2340
2356
  ]
2341
2357
  })
2342
2358
  );
2343
- }, gs = Br, ei = (e) => /* @__PURE__ */ i.jsxs(
2359
+ }, ys = Br, ei = (e) => /* @__PURE__ */ i.jsxs(
2344
2360
  "svg",
2345
2361
  k(x({
2346
2362
  fill: "none",
@@ -2457,7 +2473,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2457
2473
  title: l,
2458
2474
  description: o,
2459
2475
  className: c
2460
- } = t, v = F(t, [
2476
+ } = t, f = L(t, [
2461
2477
  "variant",
2462
2478
  "icon",
2463
2479
  "isStandalone",
@@ -2467,7 +2483,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2467
2483
  ]);
2468
2484
  return /* @__PURE__ */ i.jsx(
2469
2485
  "div",
2470
- k(x({}, v), {
2486
+ k(x({}, f), {
2471
2487
  className: O(
2472
2488
  "card__empty-state",
2473
2489
  s === "error" && "card__empty-state--error",
@@ -2489,7 +2505,7 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2489
2505
  sticky: r,
2490
2506
  className: a,
2491
2507
  children: l
2492
- } = t, o = F(t, [
2508
+ } = t, o = L(t, [
2493
2509
  "variant",
2494
2510
  "sticky",
2495
2511
  "className",
@@ -2510,10 +2526,10 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2510
2526
  }, ci = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), ui = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: O("card__body__item", t), children: e }), hi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), di = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
2511
2527
  e && /* @__PURE__ */ i.jsx("span", { className: "card__header__title__icon", children: e }),
2512
2528
  t
2513
- ] }), ys = f.forwardRef(
2529
+ ] }), Cs = d.forwardRef(
2514
2530
  (e, t) => {
2515
- var s = e, { type: r, children: a, className: l, variant: o = "default", disabled: c = !1 } = s, v = F(s, ["type", "children", "className", "variant", "disabled"]);
2516
- return f.createElement(
2531
+ var s = e, { type: r, children: a, className: l, variant: o = "default", disabled: c = !1 } = s, f = L(s, ["type", "children", "className", "variant", "disabled"]);
2532
+ return d.createElement(
2517
2533
  r,
2518
2534
  x({
2519
2535
  className: O(
@@ -2523,13 +2539,13 @@ var Or = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2523
2539
  l
2524
2540
  ),
2525
2541
  ref: t
2526
- }, v),
2542
+ }, f),
2527
2543
  a
2528
2544
  );
2529
2545
  }
2530
2546
  );
2531
- ys.displayName = "Card";
2532
- Object.assign(ys, {
2547
+ Cs.displayName = "Card";
2548
+ Object.assign(Cs, {
2533
2549
  Header: li,
2534
2550
  Action: Or,
2535
2551
  Title: di,
@@ -2541,18 +2557,18 @@ Object.assign(ys, {
2541
2557
  EmptyState: ai
2542
2558
  });
2543
2559
  var fi = (e) => {
2544
- var t = e, { className: s, children: r } = t, a = F(t, ["className", "children"]);
2560
+ var t = e, { className: s, children: r } = t, a = L(t, ["className", "children"]);
2545
2561
  return /* @__PURE__ */ i.jsx("div", k(x({ className: O("checkbox__content", s) }, a), { children: r }));
2546
2562
  }, pi = (e) => {
2547
- var t = e, { className: s, children: r } = t, a = F(t, ["className", "children"]);
2563
+ var t = e, { className: s, children: r } = t, a = L(t, ["className", "children"]);
2548
2564
  return /* @__PURE__ */ i.jsx("span", k(x({ className: O("checkbox__hint", s) }, a), { children: r }));
2549
- }, Cs = f.createContext(void 0), mi = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(Cs.Provider, { value: { id: e, name: t }, children: s }), vi = () => {
2550
- const e = f.useContext(Cs);
2565
+ }, xs = d.createContext(void 0), mi = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(xs.Provider, { value: { id: e, name: t }, children: s }), vi = () => {
2566
+ const e = d.useContext(xs);
2551
2567
  if (!e)
2552
2568
  throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
2553
2569
  return e;
2554
2570
  }, gi = (e) => {
2555
- var t = e, { className: s, children: r } = t, a = F(t, ["className", "children"]);
2571
+ var t = e, { className: s, children: r } = t, a = L(t, ["className", "children"]);
2556
2572
  const { id: l } = vi();
2557
2573
  return /* @__PURE__ */ i.jsx("label", k(x({ htmlFor: l, className: O("checkbox__label", s) }, a), { children: r }));
2558
2574
  }, we = (e) => {
@@ -2563,9 +2579,9 @@ var fi = (e) => {
2563
2579
  variant: l = "neutral",
2564
2580
  hasError: o = !1,
2565
2581
  single: c,
2566
- className: v,
2567
- children: g
2568
- } = t, h = F(t, [
2582
+ className: f,
2583
+ children: m
2584
+ } = t, h = L(t, [
2569
2585
  "id",
2570
2586
  "name",
2571
2587
  "isPending",
@@ -2575,8 +2591,8 @@ var fi = (e) => {
2575
2591
  "className",
2576
2592
  "children"
2577
2593
  ]);
2578
- const u = f.useRef(null);
2579
- return f.useEffect(() => {
2594
+ const u = d.useRef(null);
2595
+ return d.useEffect(() => {
2580
2596
  u.current && (a ? u.current.indeterminate = !0 : u.current.indeterminate = !1);
2581
2597
  }, [a]), /* @__PURE__ */ i.jsxs(
2582
2598
  "div",
@@ -2590,12 +2606,12 @@ var fi = (e) => {
2590
2606
  name: r,
2591
2607
  type: "checkbox",
2592
2608
  ref: u,
2593
- className: O("checkbox__input", v),
2609
+ className: O("checkbox__input", f),
2594
2610
  value: c ? "true" : ""
2595
2611
  }, h)
2596
2612
  ),
2597
2613
  a ? /* @__PURE__ */ i.jsx(Jr, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(Dr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2598
- /* @__PURE__ */ i.jsx(mi, { id: s, name: r, children: g })
2614
+ /* @__PURE__ */ i.jsx(mi, { id: s, name: r, children: m })
2599
2615
  ]
2600
2616
  }
2601
2617
  );
@@ -2605,65 +2621,65 @@ we.Label = gi;
2605
2621
  we.Hint = pi;
2606
2622
  we.Error = Error;
2607
2623
  var yi = (e) => {
2608
- var t = e, { type: s = "div", className: r, children: a } = t, l = F(t, ["type", "className", "children"]);
2609
- return f.createElement(s, x({ className: O("dialog__body", r) }, l), a);
2610
- }, yt = () => document.body.style.removeProperty("overflow"), Dt = (e) => e.preventDefault(), Ci = '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])', xi = (e) => {
2611
- var t = e, { className: s, children: r, shouldAnimate: a = !0 } = t, l = F(t, ["className", "children", "shouldAnimate"]);
2612
- const { ref: o, defaultOpen: c, isModal: v, onClose: g } = Ye();
2613
- return f.useEffect(() => {
2624
+ var t = e, { type: s = "div", className: r, children: a } = t, l = L(t, ["type", "className", "children"]);
2625
+ return d.createElement(s, x({ className: O("dialog__body", r) }, l), a);
2626
+ }, yt = () => document.body.style.removeProperty("overflow"), Tt = (e) => e.preventDefault(), Ci = '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])', xi = (e) => {
2627
+ var t = e, { className: s, children: r, shouldAnimate: a = !0 } = t, l = L(t, ["className", "children", "shouldAnimate"]);
2628
+ const { ref: o, defaultOpen: c, isModal: f, onClose: m } = Ye();
2629
+ return d.useEffect(() => {
2614
2630
  const h = o == null ? void 0 : o.current;
2615
2631
  if (h != null && h.open) {
2616
- const u = h.querySelectorAll(Ci), d = u[0], m = u[u.length - 1], S = (P) => {
2617
- if (!(P.key === "Tab"))
2632
+ const u = h.querySelectorAll(Ci), v = u[0], g = u[u.length - 1], S = (_) => {
2633
+ if (!(_.key === "Tab"))
2618
2634
  return;
2619
- P.shiftKey ? document.activeElement === d && (m.focus(), P.preventDefault()) : document.activeElement === m && (d.focus(), P.preventDefault());
2635
+ _.shiftKey ? document.activeElement === v && (g.focus(), _.preventDefault()) : document.activeElement === g && (v.focus(), _.preventDefault());
2620
2636
  };
2621
2637
  return document.body.style.overflow = "hidden", h.addEventListener("keydown", S), window.addEventListener("popstate", () => yt()), () => {
2622
2638
  h.removeEventListener("keydown", S), window.removeEventListener("popstate", () => yt());
2623
2639
  };
2624
2640
  }
2625
- }, [o]), f.useEffect(() => {
2641
+ }, [o]), d.useEffect(() => {
2626
2642
  const h = o == null ? void 0 : o.current;
2627
2643
  if (!h)
2628
2644
  return;
2629
- if (c && (h.removeAttribute("open"), h.showModal(), h.focus()), v)
2630
- return h.addEventListener("cancel", Dt), () => h.removeEventListener("cancel", Dt);
2631
- const u = ({ clientX: d, clientY: m }) => {
2632
- const { top: S, right: P, bottom: A, left: C } = h.getBoundingClientRect(), w = 0 < m && 0 < d, j = S < m && m < A, M = C < d && d < P;
2633
- w && !(j && M) && g();
2645
+ if (c && (h.removeAttribute("open"), h.showModal(), h.focus()), f)
2646
+ return h.addEventListener("cancel", Tt), () => h.removeEventListener("cancel", Tt);
2647
+ const u = ({ clientX: v, clientY: g }) => {
2648
+ const { top: S, right: _, bottom: P, left: C } = h.getBoundingClientRect(), j = 0 < g && 0 < v, b = S < g && g < P, M = C < v && v < _;
2649
+ j && !(b && M) && m();
2634
2650
  };
2635
- return h.addEventListener("cancel", g), h.addEventListener("mousedown", u), () => {
2636
- h.removeEventListener("cancel", g), h.removeEventListener("mousedown", u);
2651
+ return h.addEventListener("cancel", m), h.addEventListener("mousedown", u), () => {
2652
+ h.removeEventListener("cancel", m), h.removeEventListener("mousedown", u);
2637
2653
  };
2638
- }, [o, v, g, c]), /* @__PURE__ */ i.jsx(
2654
+ }, [o, f, m, c]), /* @__PURE__ */ i.jsx(
2639
2655
  "dialog",
2640
2656
  k(x({
2641
2657
  ref: o,
2642
2658
  open: c,
2643
- "aria-modal": !!v,
2659
+ "aria-modal": !!f,
2644
2660
  "aria-labelledby": "dialogTitle",
2645
2661
  className: O("dialog", a && "dialog--animated", s)
2646
2662
  }, l), {
2647
2663
  children: r
2648
2664
  })
2649
2665
  );
2650
- }, xs = f.createContext(void 0), bi = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
2651
- const a = f.useRef(null), l = f.useRef(t), o = f.useCallback(() => {
2666
+ }, bs = d.createContext(void 0), bi = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
2667
+ const a = d.useRef(null), l = d.useRef(t), o = d.useCallback(() => {
2652
2668
  var c;
2653
2669
  yt(), (c = a.current) == null || c.close(), l.current && (l == null || l.current());
2654
2670
  }, [a]);
2655
- return /* @__PURE__ */ i.jsx(xs.Provider, { value: { ref: a, defaultOpen: e, isModal: s, onClose: o }, children: r });
2671
+ return /* @__PURE__ */ i.jsx(bs.Provider, { value: { ref: a, defaultOpen: e, isModal: s, onClose: o }, children: r });
2656
2672
  }, Ye = () => {
2657
- const e = f.useContext(xs);
2673
+ const e = d.useContext(bs);
2658
2674
  if (!e)
2659
2675
  throw new Error("Dialog compound components can not be rendered outside of Dialog");
2660
2676
  return e;
2661
2677
  }, wi = (e) => {
2662
- var t = e, { children: s } = t, r = F(t, ["children"]);
2678
+ var t = e, { children: s } = t, r = L(t, ["children"]);
2663
2679
  const { onClose: a } = Ye();
2664
2680
  return /* @__PURE__ */ i.jsx(Ze, k(x({ onClick: a }, r), { children: s }));
2665
- }, bs = f.forwardRef((e, t) => {
2666
- var s = e, { className: r } = s, a = F(s, ["className"]);
2681
+ }, ws = d.forwardRef((e, t) => {
2682
+ var s = e, { className: r } = s, a = L(s, ["className"]);
2667
2683
  const { onClose: l } = Ye();
2668
2684
  return /* @__PURE__ */ i.jsx(
2669
2685
  Ze,
@@ -2678,14 +2694,14 @@ var yi = (e) => {
2678
2694
  }, a)
2679
2695
  );
2680
2696
  });
2681
- bs.displayName = "Close";
2697
+ ws.displayName = "Close";
2682
2698
  var ji = (e) => {
2683
- var t = e, { className: s, children: r } = t, a = F(t, ["className", "children"]);
2699
+ var t = e, { className: s, children: r } = t, a = L(t, ["className", "children"]);
2684
2700
  return /* @__PURE__ */ i.jsx("div", k(x({ className: O("dialog__footer", s) }, a), { children: r }));
2685
2701
  }, _i = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), Si = (e) => {
2686
- var t = e, { icon: s, children: r, className: a } = t, l = F(t, ["icon", "children", "className"]);
2687
- const { ref: o } = Ye(), c = f.useRef(null);
2688
- return f.useEffect(() => {
2702
+ var t = e, { icon: s, children: r, className: a } = t, l = L(t, ["icon", "children", "className"]);
2703
+ const { ref: o } = Ye(), c = d.useRef(null);
2704
+ return d.useEffect(() => {
2689
2705
  o != null && o.current && o.current.focus();
2690
2706
  }, [o]), /* @__PURE__ */ i.jsxs(
2691
2707
  "div",
@@ -2702,7 +2718,7 @@ var ji = (e) => {
2702
2718
  })
2703
2719
  );
2704
2720
  }, Ei = (e) => {
2705
- var t = e, { children: s } = t, r = F(t, ["children"]);
2721
+ var t = e, { children: s } = t, r = L(t, ["children"]);
2706
2722
  const { ref: a } = Ye();
2707
2723
  return /* @__PURE__ */ i.jsx(Ze, k(x({ onClick: () => {
2708
2724
  var l;
@@ -2716,8 +2732,8 @@ G.Header = _i;
2716
2732
  G.Body = yi;
2717
2733
  G.Footer = ji;
2718
2734
  G.Button = wi;
2719
- G.Close = bs;
2720
- var ws = f.createContext(void 0), Pi = ({
2735
+ G.Close = ws;
2736
+ var js = d.createContext(void 0), Pi = ({
2721
2737
  id: e,
2722
2738
  position: t,
2723
2739
  isOpen: s,
@@ -2726,10 +2742,10 @@ var ws = f.createContext(void 0), Pi = ({
2726
2742
  setActiveItemIndex: l,
2727
2743
  clearActiveItemIndex: o,
2728
2744
  triggerRef: c,
2729
- contentRef: v,
2730
- children: g
2745
+ contentRef: f,
2746
+ children: m
2731
2747
  }) => /* @__PURE__ */ i.jsx(
2732
- ws.Provider,
2748
+ js.Provider,
2733
2749
  {
2734
2750
  value: {
2735
2751
  id: e,
@@ -2740,16 +2756,16 @@ var ws = f.createContext(void 0), Pi = ({
2740
2756
  setActiveItemIndex: l,
2741
2757
  clearActiveItemIndex: o,
2742
2758
  triggerRef: c,
2743
- contentRef: v
2759
+ contentRef: f
2744
2760
  },
2745
- children: g
2761
+ children: m
2746
2762
  }
2747
- ), js = () => {
2748
- const e = f.useContext(ws);
2763
+ ), _s = () => {
2764
+ const e = d.useContext(js);
2749
2765
  if (e === void 0)
2750
2766
  throw new Error("useMenu must be used within a MenuProvider");
2751
2767
  return e;
2752
- }, ki = ({ as: e, children: t }) => {
2768
+ }, Ai = ({ as: e, children: t }) => {
2753
2769
  const {
2754
2770
  id: s,
2755
2771
  position: r,
@@ -2757,43 +2773,43 @@ var ws = f.createContext(void 0), Pi = ({
2757
2773
  setIsOpen: l,
2758
2774
  activeItemIndex: o,
2759
2775
  setActiveItemIndex: c,
2760
- clearActiveItemIndex: v,
2761
- triggerRef: g,
2776
+ clearActiveItemIndex: f,
2777
+ triggerRef: m,
2762
2778
  contentRef: h
2763
- } = js(), u = (d) => {
2764
- var m;
2779
+ } = _s(), u = (v) => {
2780
+ var g;
2765
2781
  if (!a)
2766
2782
  return;
2767
- if (d.key === "Escape")
2768
- return v(), l(!1), (m = g.current) == null ? void 0 : m.focus();
2769
- const S = d.shiftKey, P = Ss(h.current).length - 1;
2770
- switch (d.key) {
2783
+ if (v.key === "Escape")
2784
+ return f(), l(!1), (g = m.current) == null ? void 0 : g.focus();
2785
+ const S = v.shiftKey, _ = Es(h.current).length - 1;
2786
+ switch (v.key) {
2771
2787
  case "Tab": {
2772
2788
  if (S && o !== 0)
2773
- return d.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
2774
- if (!S && o !== P) {
2775
- d.preventDefault();
2776
- const A = o !== void 0 ? o + 1 : 0;
2777
- return c(Math.min(P, A));
2789
+ return v.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
2790
+ if (!S && o !== _) {
2791
+ v.preventDefault();
2792
+ const P = o !== void 0 ? o + 1 : 0;
2793
+ return c(Math.min(_, P));
2778
2794
  }
2779
2795
  break;
2780
2796
  }
2781
2797
  case "ArrowUp":
2782
2798
  case "ArrowLeft":
2783
- return d.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
2799
+ return v.preventDefault(), c(o ? Math.max(0, o - 1) : 0);
2784
2800
  case "ArrowDown":
2785
2801
  case "ArrowRight": {
2786
- d.preventDefault();
2787
- const A = o !== void 0 ? o + 1 : 0;
2788
- return c(Math.min(P, A));
2802
+ v.preventDefault();
2803
+ const P = o !== void 0 ? o + 1 : 0;
2804
+ return c(Math.min(_, P));
2789
2805
  }
2790
2806
  case "Home":
2791
- return d.preventDefault(), c(0);
2807
+ return v.preventDefault(), c(0);
2792
2808
  case "End":
2793
- return d.preventDefault(), c(P);
2809
+ return v.preventDefault(), c(_);
2794
2810
  }
2795
2811
  };
2796
- return e ? f.createElement(
2812
+ return e ? d.createElement(
2797
2813
  e,
2798
2814
  {
2799
2815
  id: `${s}-content`,
@@ -2815,39 +2831,39 @@ var ws = f.createContext(void 0), Pi = ({
2815
2831
  }
2816
2832
  )
2817
2833
  );
2818
- }, Ai = (e) => {
2819
- var t = e, { children: s, className: r } = t, a = F(t, ["children", "className"]);
2834
+ }, ki = (e) => {
2835
+ var t = e, { children: s, className: r } = t, a = L(t, ["children", "className"]);
2820
2836
  return /* @__PURE__ */ i.jsx("li", k(x({}, a), { className: O("menu__list-item", r), children: s }));
2821
- }, _s = ({ children: e, className: t }) => {
2822
- const { id: s, isOpen: r, setIsOpen: a, clearActiveItemIndex: l, setActiveItemIndex: o, triggerRef: c } = js(), v = () => {
2837
+ }, Ss = ({ children: e, className: t }) => {
2838
+ const { id: s, isOpen: r, setIsOpen: a, clearActiveItemIndex: l, setActiveItemIndex: o, triggerRef: c } = _s(), f = () => {
2823
2839
  l(), a((h) => !h), r || o(0);
2824
- }, g = (h) => {
2840
+ }, m = (h) => {
2825
2841
  if (r) {
2826
2842
  if (h.key === "Escape")
2827
2843
  return l(), a(!1);
2828
2844
  h.key === "ArrowDown" && (h.preventDefault(), o(0));
2829
2845
  }
2830
2846
  };
2831
- return f.cloneElement(e, {
2847
+ return d.cloneElement(e, {
2832
2848
  id: `${s}-trigger`,
2833
2849
  ref: c,
2834
2850
  className: O("menu__trigger", t),
2835
- onClick: v,
2836
- onKeyDown: g,
2851
+ onClick: f,
2852
+ onKeyDown: m,
2837
2853
  "aria-expanded": r,
2838
2854
  "aria-controls": `${s}-content`
2839
2855
  });
2840
2856
  };
2841
- _s.displayName = "Trigger";
2842
- var Ss = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], W = (e) => {
2843
- var t = e, { type: s, id: r, position: a = "bottom-end", children: l, className: o } = t, c = F(t, ["type", "id", "position", "children", "className"]);
2844
- const v = f.useRef(null), g = f.useRef(null), h = f.useRef(null), [u, d] = f.useState(!1), [m, S] = f.useState(), [P, A] = f.useState(m);
2845
- m !== P && m !== void 0 && h.current && (Ss(h.current)[m].firstChild.focus(), A(m));
2857
+ Ss.displayName = "Trigger";
2858
+ var Es = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], W = (e) => {
2859
+ var t = e, { type: s, id: r, position: a = "bottom-end", children: l, className: o } = t, c = L(t, ["type", "id", "position", "children", "className"]);
2860
+ const f = d.useRef(null), m = d.useRef(null), h = d.useRef(null), [u, v] = d.useState(!1), [g, S] = d.useState(), [_, P] = d.useState(g);
2861
+ g !== _ && g !== void 0 && h.current && (Es(h.current)[g].firstChild.focus(), P(g));
2846
2862
  const C = () => {
2847
- S(void 0), A(void 0);
2848
- }, w = (j) => {
2863
+ S(void 0), P(void 0);
2864
+ }, j = (b) => {
2849
2865
  var M;
2850
- ((M = v.current) == null ? void 0 : M.contains(j.relatedTarget)) || (C(), d(!1));
2866
+ ((M = f.current) == null ? void 0 : M.contains(b.relatedTarget)) || (C(), v(!1));
2851
2867
  };
2852
2868
  return /* @__PURE__ */ i.jsx(
2853
2869
  Pi,
@@ -2855,36 +2871,36 @@ var Ss = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsBy
2855
2871
  id: r,
2856
2872
  position: a,
2857
2873
  isOpen: u,
2858
- setIsOpen: d,
2859
- activeItemIndex: m,
2874
+ setIsOpen: v,
2875
+ activeItemIndex: g,
2860
2876
  setActiveItemIndex: S,
2861
2877
  clearActiveItemIndex: C,
2862
- triggerRef: g,
2878
+ triggerRef: m,
2863
2879
  contentRef: h,
2864
- children: f.createElement(
2880
+ children: d.createElement(
2865
2881
  s,
2866
2882
  k(x({}, c), {
2867
2883
  id: r,
2868
- ref: v,
2884
+ ref: f,
2869
2885
  className: `menu ${o || ""}`,
2870
- onBlur: w
2886
+ onBlur: j
2871
2887
  }),
2872
2888
  l
2873
2889
  )
2874
2890
  }
2875
2891
  );
2876
2892
  };
2877
- W.Trigger = _s;
2878
- W.Content = ki;
2879
- W.Item = Ai;
2880
- f.createContext(void 0);
2893
+ W.Trigger = Ss;
2894
+ W.Content = Ai;
2895
+ W.Item = ki;
2896
+ d.createContext(void 0);
2881
2897
  var Ni = (/* @__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");
2882
2898
  [...new Set(Ni.values())].map((e) => ({
2883
2899
  label: `+${e}`,
2884
2900
  value: e
2885
2901
  }));
2886
- f.createContext(void 0);
2887
- f.createContext(void 0);
2902
+ d.createContext(void 0);
2903
+ d.createContext(void 0);
2888
2904
  var tt = /* @__PURE__ */ ((e) => (e[e.categoriesVegetables = 0] = "categoriesVegetables", e[e.categoriesMeat = 1] = "categoriesMeat", e[e.categoriesFish = 2] = "categoriesFish", e[e.categoriesDairy = 3] = "categoriesDairy", e[e.categoriesBreakfast = 4] = "categoriesBreakfast", e[e.categoriesSnacks = 5] = "categoriesSnacks", e[e.categoriesCandy = 6] = "categoriesCandy", e[e.categoriesNonFood = 7] = "categoriesNonFood", e[e.categoriesDryFood = 8] = "categoriesDryFood", e[e.categoriesTins = 9] = "categoriesTins", e[e.categoriesGrid = 10] = "categoriesGrid", e[e.categoriesSoda = 11] = "categoriesSoda", e[e.categoriesBakery = 12] = "categoriesBakery", e[e.categoriesWine = 13] = "categoriesWine", e[e.categoriesBaby = 14] = "categoriesBaby", e[e.categoriesDiet = 15] = "categoriesDiet", e[e.categoriesHygiene = 16] = "categoriesHygiene", e[e.categoriesCleaning = 17] = "categoriesCleaning", e[e.categoriesPets = 18] = "categoriesPets", e[e.categoriesFreezer = 19] = "categoriesFreezer", e[e.categoriesBbq = 20] = "categoriesBbq", e[e.categoriesMealbox = 21] = "categoriesMealbox", e[e.categoriesBrik = 22] = "categoriesBrik", e[e.categoriesGranen = 23] = "categoriesGranen", e[e.categoriesConserve = 24] = "categoriesConserve", e[e.categoriesHome = 25] = "categoriesHome", e[e.categoriesEaster = 26] = "categoriesEaster", e[e.categoriesOnlinePromo = 27] = "categoriesOnlinePromo", e[e.categoriesSportFood = 28] = "categoriesSportFood", e[e.categoriesClothing = 29] = "categoriesClothing", e[e.categoriesEnergy = 30] = "categoriesEnergy", e[e.categoriesDeskAndTravel = 31] = "categoriesDeskAndTravel", e[e.categoriesCigarette = 32] = "categoriesCigarette", e[e.categoriesFood = 33] = "categoriesFood", e[e.categoriesChild = 34] = "categoriesChild", e[e.categoriesPuzzle = 35] = "categoriesPuzzle", e[e.categoriesToys = 36] = "categoriesToys", e[e.categoriesCar = 37] = "categoriesCar", e[e.categoriesPlaceholder = 38] = "categoriesPlaceholder", e[e.categoriesFuel = 39] = "categoriesFuel", e[e.categoriesCarAndBike = 40] = "categoriesCarAndBike", e[e.categoriesToyAndHobby = 41] = "categoriesToyAndHobby", e[e.categoriesMultimedia = 42] = "categoriesMultimedia", e[e.categoriesParty = 43] = "categoriesParty", e[e.toolsPay = 44] = "toolsPay", e[e.toolsReceipt = 45] = "toolsReceipt", e[e.toolsFuel = 46] = "toolsFuel", e[e.toolsStoreLocator = 47] = "toolsStoreLocator", e[e.toolsStats = 48] = "toolsStats", e[e.toolsShowXtraOld = 49] = "toolsShowXtraOld", e[e.toolsShowXtraNew = 50] = "toolsShowXtraNew", e[e.toolsScan2 = 51] = "toolsScan2", e[e.toolsRecipes2 = 52] = "toolsRecipes2", e[e.toolsWarranty = 53] = "toolsWarranty", e[e.toolsCoupons = 54] = "toolsCoupons", e[e.toolsFavoriteInactive = 55] = "toolsFavoriteInactive", e[e.toolsFavoriteActive = 56] = "toolsFavoriteActive", e[e.toolsAssortment = 57] = "toolsAssortment", e[e.toolsPromo = 58] = "toolsPromo", e[e.fuelCng = 59] = "fuelCng", e[e.fuelE5 = 60] = "fuelE5", e[e.fuelAdblue = 61] = "fuelAdblue", e[e.fuelB7 = 62] = "fuelB7", e[e.fuelH2 = 63] = "fuelH2", e[e.fuelE10 = 64] = "fuelE10", e[e.fuelFreeTireInflation = 65] = "fuelFreeTireInflation", e[e.functionalClose = 66] = "functionalClose", e[e.functionalBack = 67] = "functionalBack", e[e.functionalSearch = 68] = "functionalSearch", e[e.functionalEdit = 69] = "functionalEdit", e[e.functionalShare = 70] = "functionalShare", e[e.functionalLocation = 71] = "functionalLocation", e[e.functionalTrash = 72] = "functionalTrash", e[e.functionalCamera = 73] = "functionalCamera", e[e.functionalPhone = 74] = "functionalPhone", e[e.functionalPushNotifications = 75] = "functionalPushNotifications", e[e.functionalMail = 76] = "functionalMail", e[e.functionalGift = 77] = "functionalGift", e[e.functionalPresent = 78] = "functionalPresent", e[e.functionalLoading = 79] = "functionalLoading", e[e.functionalChevronRight = 80] = "functionalChevronRight", e[e.functionalCheck = 81] = "functionalCheck", e[e.functionalChevronDown = 82] = "functionalChevronDown", e[e.functionalChevronUp = 83] = "functionalChevronUp", e[e.functionalPlus = 84] = "functionalPlus", e[e.functionalReset = 85] = "functionalReset", e[e.functionalDownload = 86] = "functionalDownload", e[e.functionalExport = 87] = "functionalExport", e[e.functionalCustomerService = 88] = "functionalCustomerService", e[e.functionalTruck = 89] = "functionalTruck", e[e.functionalBox = 90] = "functionalBox", e[e.functionalEllipsis = 91] = "functionalEllipsis", e[e.functionalLocationHome = 92] = "functionalLocationHome", e[e.functionalLocationPickup = 93] = "functionalLocationPickup", e[e.functionalAccount = 94] = "functionalAccount", e[e.functionalPrivacy = 95] = "functionalPrivacy", e[e.functionalSettings = 96] = "functionalSettings", e[e.functionalUserInfo = 97] = "functionalUserInfo", e[e.functionalPinOutlines = 98] = "functionalPinOutlines", e[e.functionalCalendar = 99] = "functionalCalendar", e[e.functionalMinus = 100] = "functionalMinus", e[e.functionalLifestyle = 101] = "functionalLifestyle", e[e.functionalSms = 102] = "functionalSms", e[e.functionalSwitch = 103] = "functionalSwitch", e[e.functionalSorting = 104] = "functionalSorting", e[e.functionalWarningCircle = 105] = "functionalWarningCircle", e[e.functionalQuestionCircle = 106] = "functionalQuestionCircle", e[e.functionalErrorCircle = 107] = "functionalErrorCircle", e[e.functionalSuccessCircle = 108] = "functionalSuccessCircle", e[e.functionalMessage = 109] = "functionalMessage", e[e.functionalExternalLink = 110] = "functionalExternalLink", e[e.functionalAddToList = 111] = "functionalAddToList", e[e.functionalShoppingcart = 112] = "functionalShoppingcart", e[e.functionalFilter = 113] = "functionalFilter", e[e.functionalLocate = 114] = "functionalLocate", e[e.functionalBarcode = 115] = "functionalBarcode", e[e.functionalClock = 116] = "functionalClock", e[e.functionalHistory = 117] = "functionalHistory", e[e.functionalShops = 118] = "functionalShops", e[e.functionalAddUser = 119] = "functionalAddUser", e[e.functionalOther = 120] = "functionalOther", e[e.functionalInAppNotifications = 121] = "functionalInAppNotifications", e[e.functionalExit = 122] = "functionalExit", e[e.functionalShared = 123] = "functionalShared", e[e.functionalThumbsup = 124] = "functionalThumbsup", e[e.functionalDiscount = 125] = "functionalDiscount", e[e.functionalPercentage = 126] = "functionalPercentage", e[e.functionalList = 127] = "functionalList", e[e.functionalMapLocation = 128] = "functionalMapLocation", e[e.functionalNoConnection = 129] = "functionalNoConnection", e[e.functionalSwap = 130] = "functionalSwap", e[e.functionalPiece = 131] = "functionalPiece", e[e.functionalWeight = 132] = "functionalWeight", e[e.functionalPack = 133] = "functionalPack", e[e.functionalCommunications = 134] = "functionalCommunications", e[e.functionalDeliveryAddresses = 135] = "functionalDeliveryAddresses", e[e["functional18+"] = 136] = "functional18+", e[e.functionalReadtime = 137] = "functionalReadtime", e[e.functionalCopy = 138] = "functionalCopy", e[e.functionalMessageField = 139] = "functionalMessageField", e[e.functionalNext = 140] = "functionalNext", e[e.functionalSave = 141] = "functionalSave", e[e.functionalLogin = 142] = "functionalLogin", e[e.functionalLogout = 143] = "functionalLogout", e[e.functionalWebsite = 144] = "functionalWebsite", e[e.functionalMenu = 145] = "functionalMenu", e[e.functionalRegister = 146] = "functionalRegister", e[e.functionalNews = 147] = "functionalNews", e[e.functionalTimer = 148] = "functionalTimer", e[e.functionalEyeShow = 149] = "functionalEyeShow", e[e.functionalMobilePay = 150] = "functionalMobilePay", e[e.functionalConnectionCable = 151] = "functionalConnectionCable", e[e.functionalDryCleaning = 152] = "functionalDryCleaning", e[e.functionalKiosk = 153] = "functionalKiosk", e[e.functionalConnectedDevice = 154] = "functionalConnectedDevice", e[e.functionalCookies = 155] = "functionalCookies", e[e.functionalViewFile = 156] = "functionalViewFile", e[e.functionalLastAdded = 157] = "functionalLastAdded", e[e.functionalFirstAdded = 158] = "functionalFirstAdded", e[e.functionalStoreLayout = 159] = "functionalStoreLayout", e[e.functionalBlock = 160] = "functionalBlock", e[e.functionalChecklist = 161] = "functionalChecklist", e[e.functionalCartCheckout = 162] = "functionalCartCheckout", e[e.functionalCartEdit = 163] = "functionalCartEdit", e[e.functionalEyeHidden = 164] = "functionalEyeHidden", e[e.functionalWarningCircleFilled = 165] = "functionalWarningCircleFilled", e[e.functionalErrorCircleFilled = 166] = "functionalErrorCircleFilled", e[e.functionalSuccessCircleFilled = 167] = "functionalSuccessCircleFilled", e[e.functionalPlusCircle = 168] = "functionalPlusCircle", e[e.functionalSpinner = 169] = "functionalSpinner", e[e.functionalEcoEarth = 170] = "functionalEcoEarth", e[e.functionalAlphaBeta = 171] = "functionalAlphaBeta", e[e.functionalEuro = 172] = "functionalEuro", e[e.functionalNumber = 173] = "functionalNumber", e[e.functionalIdea = 174] = "functionalIdea", e[e.functionalMultifactorAuthenticator = 175] = "functionalMultifactorAuthenticator", e[e.functionalPassword = 176] = "functionalPassword", e[e.functionalDiscountCode = 177] = "functionalDiscountCode", e))(tt || {});
2889
2905
  const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2890
2906
  bouIconId: e,
@@ -2898,7 +2914,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2898
2914
  /* @__PURE__ */ i.jsx(Ct, { icon: r }),
2899
2915
  e
2900
2916
  ] }) }), _e = (e) => {
2901
- const t = Fs(), { className: s, label: r, mobileUrl: a, desktopUrl: l, icon: o } = e;
2917
+ const t = Ds(), { className: s, label: r, mobileUrl: a, desktopUrl: l, icon: o } = e;
2902
2918
  return /* @__PURE__ */ i.jsxs(W.Item, { className: s, children: [
2903
2919
  (!t || t && !l) && /* @__PURE__ */ i.jsxs("a", { href: a, referrerPolicy: "no-referrer-when-downgrade", children: [
2904
2920
  /* @__PURE__ */ i.jsx(Ct, { icon: o }),
@@ -2909,35 +2925,35 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2909
2925
  r
2910
2926
  ] })
2911
2927
  ] });
2912
- }, Es = f.createContext(void 0), Li = ({ position: e, bouMenuItems: t, children: s }) => /* @__PURE__ */ i.jsx(Es.Provider, { value: { position: e, bouMenuItems: t }, children: s }), Ps = () => {
2913
- const e = f.useContext(Es);
2928
+ }, Ps = d.createContext(void 0), Li = ({ position: e, bouMenuItems: t, country: s, children: r }) => /* @__PURE__ */ i.jsx(Ps.Provider, { value: { position: e, bouMenuItems: t, country: s }, children: r }), As = () => {
2929
+ const e = d.useContext(Ps);
2914
2930
  if (!e)
2915
2931
  throw new Error("Authentication context can not be rendered outside of Authentication");
2916
2932
  return e;
2917
- }, ks = f.createContext(void 0), Fi = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ i.jsx(ks.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), St = () => {
2918
- const e = f.useContext(ks);
2933
+ }, ks = d.createContext(void 0), Fi = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ i.jsx(ks.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), St = () => {
2934
+ const e = d.useContext(ks);
2919
2935
  if (!e)
2920
2936
  throw new Error("Api context can not be rendered outside of Api");
2921
2937
  return e;
2922
- }, As = ({ apiUrl: e, redirectUrl: t, trackingInfo: s }) => {
2938
+ }, Ns = ({ apiUrl: e, redirectUrl: t, trackingInfo: s }) => {
2923
2939
  const r = new URLSearchParams({ redirectUrl: t });
2924
2940
  s && r.append("trackingInfo", s);
2925
2941
  const a = `${e}/login?${r.toString()}`, l = `${e}/logout?${r.toString()}`;
2926
2942
  return { loginUrl: a, logoutUrl: l };
2927
2943
  }, st = () => {
2928
- const { apiUrl: e, redirectUrl: t } = St(), s = Ds();
2929
- return As({ apiUrl: e, redirectUrl: t, trackingInfo: s });
2944
+ const { apiUrl: e, redirectUrl: t } = St(), s = Ts();
2945
+ return Ns({ apiUrl: e, redirectUrl: t, trackingInfo: s });
2930
2946
  }, Di = () => {
2931
2947
  const { apiUrl: e } = St();
2932
2948
  return `${`${e}/xtra`}/authentication/v1/user/profile`;
2933
- }, Tt = (e) => e ? `+${e.countryCode} ${e.number}` : "", Ut = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), Qt = ({ apiUrl: e, redirectUrl: t }) => {
2934
- const { loginUrl: s } = As({ apiUrl: e, redirectUrl: t });
2949
+ }, Ut = (e) => e ? `+${e.countryCode} ${e.number}` : "", Qt = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), Ht = ({ apiUrl: e, redirectUrl: t }) => {
2950
+ const { loginUrl: s } = Ns({ apiUrl: e, redirectUrl: t });
2935
2951
  window.location.replace(s);
2936
- }, Ht = (e) => {
2952
+ }, Kt = (e) => {
2937
2953
  var l;
2938
2954
  if (!e)
2939
- return { user: { state: () => "NotAuthenticated" }, tryToLogon: Qt };
2940
- const t = new Date(e.dateOfBirth), s = Ut(Pt.Mobile, e.phone), r = Ut(Pt.Fixed, e.phone), a = Tt(s) ?? Tt(r) ?? "";
2955
+ return { user: { state: () => "NotAuthenticated" }, tryToLogon: Ht };
2956
+ const t = new Date(e.dateOfBirth), s = Qt(Pt.Mobile, e.phone), r = Qt(Pt.Fixed, e.phone), a = Ut(s) ?? Ut(r) ?? "";
2941
2957
  return {
2942
2958
  user: {
2943
2959
  ...(l = window.XTRA) == null ? void 0 : l.user,
@@ -2976,12 +2992,12 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2976
2992
  cbh: () => e.customerIdentifier,
2977
2993
  state: () => "Authenticated"
2978
2994
  },
2979
- tryToLogon: Qt
2995
+ tryToLogon: Ht
2980
2996
  };
2981
- }, Ns = ["profile"], Ms = () => {
2997
+ }, Ms = ["profile"], Os = () => {
2982
2998
  const { i18n: e } = je(), t = Di(), s = sessionStorage.getItem("profile"), r = !!s;
2983
- return fs({
2984
- queryKey: Ns,
2999
+ return ps({
3000
+ queryKey: Ms,
2985
3001
  queryFn: async () => {
2986
3002
  const l = await fetch(t, {
2987
3003
  credentials: "include",
@@ -2990,7 +3006,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2990
3006
  });
2991
3007
  if (!l.ok) {
2992
3008
  if (l.status === 401)
2993
- return window.XTRA = { ...window.XTRA, ...Ht() }, window.postMessage(
3009
+ return window.XTRA = { ...window.XTRA, ...Kt() }, window.postMessage(
2994
3010
  { source: "xtra-authentication", isAuthenticated: !1 },
2995
3011
  new URL(window.location.href).origin
2996
3012
  ), sessionStorage.removeItem("profile"), { authenticationStatus: "NotAuthenticated" };
@@ -2998,11 +3014,11 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
2998
3014
  return { authenticationStatus: "Authenticated", profile: JSON.parse(s) };
2999
3015
  throw new Error("Failed to retrieve profile");
3000
3016
  }
3001
- const o = await l.json(), { firstName: c, lastName: v } = o;
3002
- return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName: v })), window.postMessage(
3017
+ const o = await l.json(), { firstName: c, lastName: f } = o;
3018
+ return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName: f })), window.postMessage(
3003
3019
  { source: "xtra-authentication", isAuthenticated: !0 },
3004
3020
  new URL(window.location.href).origin
3005
- ), window.XTRA = { ...window.XTRA, ...Ht(o) }, {
3021
+ ), window.XTRA = { ...window.XTRA, ...Kt(o) }, {
3006
3022
  authenticationStatus: "Authenticated",
3007
3023
  profile: { firstName: o.firstName, lastName: o.lastName }
3008
3024
  };
@@ -3015,10 +3031,10 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3015
3031
  refetchOnWindowFocus: !1
3016
3032
  });
3017
3033
  }, Ti = () => {
3018
- const { t: e } = je(), t = Xt(), { position: s, bouMenuItems: r } = Ps(), { logoutUrl: a } = st(), o = jt().getQueryData(Ns), c = (o == null ? void 0 : o.profile.firstName) ?? "", v = (o == null ? void 0 : o.profile.lastName) ?? "", g = () => {
3019
- sessionStorage.removeItem("profile"), window.location.href = a;
3034
+ const { t: e } = je(), { position: t, bouMenuItems: s, country: r } = As(), a = It({ country: r }), { logoutUrl: l } = st(), c = jt().getQueryData(Ms), f = (c == null ? void 0 : c.profile.firstName) ?? "", m = (c == null ? void 0 : c.profile.lastName) ?? "", h = () => {
3035
+ sessionStorage.removeItem("profile"), window.location.href = l;
3020
3036
  };
3021
- return /* @__PURE__ */ i.jsxs(W, { type: "nav", id: "xtra-menu", position: s, children: [
3037
+ return /* @__PURE__ */ i.jsxs(W, { type: "nav", id: "xtra-menu", position: t, children: [
3022
3038
  /* @__PURE__ */ i.jsx(
3023
3039
  W.Trigger,
3024
3040
  {
@@ -3029,39 +3045,39 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3029
3045
  "button--authentication--authenticated"
3030
3046
  ),
3031
3047
  children: /* @__PURE__ */ i.jsxs("button", { children: [
3032
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Nr, { variant: "small", firstName: c, lastName: v }) }),
3033
- /* @__PURE__ */ i.jsx("span", { className: "button__label", children: c }),
3048
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Nr, { variant: "small", firstName: f, lastName: m }) }),
3049
+ /* @__PURE__ */ i.jsx("span", { className: "button__label", children: f }),
3034
3050
  /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(_t, {}) })
3035
3051
  ] })
3036
3052
  }
3037
3053
  ),
3038
3054
  /* @__PURE__ */ i.jsxs(W.Content, { as: "div", children: [
3039
- !!r && r.length > 0 && /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: r.map(({ label: h, icon: u, url: d }, m) => /* @__PURE__ */ i.jsx(
3055
+ !!s && s.length > 0 && /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: s.map(({ label: u, icon: v, url: g }, S) => /* @__PURE__ */ i.jsx(
3040
3056
  _e,
3041
3057
  {
3042
3058
  className: "bou-menu-item",
3043
- mobileUrl: d,
3044
- icon: u,
3045
- label: h
3059
+ mobileUrl: g,
3060
+ icon: v,
3061
+ label: u
3046
3062
  },
3047
- m
3063
+ S
3048
3064
  )) }),
3049
3065
  /* @__PURE__ */ i.jsxs("ul", { children: [
3050
3066
  /* @__PURE__ */ i.jsx(
3051
3067
  _e,
3052
3068
  {
3053
3069
  className: "manage-profile",
3054
- mobileUrl: `${t}/manage-profile`,
3055
- desktopUrl: `${t}/manage-profile/personal-data`,
3070
+ mobileUrl: `${a}/manage-profile`,
3071
+ desktopUrl: `${a}/manage-profile/personal-data`,
3056
3072
  icon: /* @__PURE__ */ i.jsx($r, {}),
3057
3073
  label: e("manageProfile")
3058
3074
  }
3059
3075
  ),
3060
- /* @__PURE__ */ i.jsx(
3076
+ r === "BE" && /* @__PURE__ */ i.jsx(
3061
3077
  _e,
3062
3078
  {
3063
3079
  className: "payment",
3064
- mobileUrl: `${t}/payment`,
3080
+ mobileUrl: `${a}/payment`,
3065
3081
  icon: /* @__PURE__ */ i.jsx(ri, {}),
3066
3082
  label: e("payment")
3067
3083
  }
@@ -3070,7 +3086,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3070
3086
  _e,
3071
3087
  {
3072
3088
  className: "gift-cards",
3073
- mobileUrl: `${t}/gift-cards`,
3089
+ mobileUrl: `${a}/gift-cards`,
3074
3090
  icon: /* @__PURE__ */ i.jsx(ti, {}),
3075
3091
  label: e("giftCards")
3076
3092
  }
@@ -3078,7 +3094,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3078
3094
  /* @__PURE__ */ i.jsx(
3079
3095
  _e,
3080
3096
  {
3081
- mobileUrl: `${t}/identifiers`,
3097
+ mobileUrl: `${a}/identifiers`,
3082
3098
  icon: /* @__PURE__ */ i.jsx(ni, {}),
3083
3099
  label: e("qrCode")
3084
3100
  }
@@ -3087,13 +3103,13 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3087
3103
  _e,
3088
3104
  {
3089
3105
  className: "manage-privacy",
3090
- mobileUrl: `${t}/manage-privacy`,
3091
- desktopUrl: `${t}/manage-privacy/permissions`,
3106
+ mobileUrl: `${a}/manage-privacy`,
3107
+ desktopUrl: `${a}/manage-privacy/permissions`,
3092
3108
  icon: /* @__PURE__ */ i.jsx(Wr, {}),
3093
3109
  label: e("privacy")
3094
3110
  }
3095
3111
  ),
3096
- /* @__PURE__ */ i.jsx(Ri, { onClick: g, icon: /* @__PURE__ */ i.jsx(Gr, {}), label: e("logout") })
3112
+ /* @__PURE__ */ i.jsx(Ri, { onClick: h, icon: /* @__PURE__ */ i.jsx(Gr, {}), label: e("logout") })
3097
3113
  ] })
3098
3114
  ] })
3099
3115
  ] });
@@ -3120,14 +3136,14 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3120
3136
  e
3121
3137
  ),
3122
3138
  children: [
3123
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(gs, { width: 24, height: 24, suffix: "desktop" }) }),
3139
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(ys, { width: 24, height: 24, suffix: "desktop" }) }),
3124
3140
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: t("login") }),
3125
3141
  /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(_t, {}) })
3126
3142
  ]
3127
3143
  }
3128
3144
  );
3129
3145
  }, Hi = () => {
3130
- const { t: e } = je(), { loginUrl: t } = st(), s = Xt(), { position: r } = Ps();
3146
+ const { t: e } = je(), { loginUrl: t } = st(), s = It(), { position: r } = As();
3131
3147
  return /* @__PURE__ */ i.jsxs(
3132
3148
  W,
3133
3149
  {
@@ -3138,7 +3154,7 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3138
3154
  "aria-label": e("xtraMenuAriaLabel"),
3139
3155
  children: [
3140
3156
  /* @__PURE__ */ i.jsx(W.Trigger, { className: O("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
3141
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(gs, { width: 24, height: 24, suffix: "mobile" }) }),
3157
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(ys, { width: 24, height: 24, suffix: "mobile" }) }),
3142
3158
  /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(_t, {}) })
3143
3159
  ] }) }),
3144
3160
  /* @__PURE__ */ i.jsxs(W.Content, { children: [
@@ -3156,16 +3172,16 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3156
3172
  );
3157
3173
  }, Ki = () => {
3158
3174
  var t, s;
3159
- const e = Ms();
3175
+ const e = Os();
3160
3176
  return ((t = e.data) == null ? void 0 : t.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ i.jsx(Ti, {}) : ((s = e.data) == null ? void 0 : s.authenticationStatus) === "NotAuthenticated" || e.isError ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3161
3177
  /* @__PURE__ */ i.jsx(Qi, {}),
3162
3178
  /* @__PURE__ */ i.jsx(Hi, {})
3163
3179
  ] }) : /* @__PURE__ */ i.jsx(Ui, {});
3164
- }, Os = () => {
3180
+ }, Rs = () => {
3165
3181
  const { apiUrl: e } = St();
3166
3182
  return `${`${e}/xtra`}/authentication/v1/gdpr`;
3167
3183
  }, Gi = () => {
3168
- const e = Os(), t = new ls();
3184
+ const e = Rs(), t = new cs();
3169
3185
  return Cr({
3170
3186
  mutationFn: async (r) => {
3171
3187
  const a = await fetch(`${e}/tc`, {
@@ -3185,8 +3201,8 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3185
3201
  });
3186
3202
  }, qi = () => {
3187
3203
  var l;
3188
- const { i18n: e } = je(), t = Os(), r = ((l = Ms().data) == null ? void 0 : l.authenticationStatus) === "Authenticated";
3189
- return fs({
3204
+ const { i18n: e } = je(), t = Rs(), r = ((l = Os().data) == null ? void 0 : l.authenticationStatus) === "Authenticated";
3205
+ return ps({
3190
3206
  queryKey: ["gdpr"],
3191
3207
  queryFn: async () => {
3192
3208
  const o = await fetch(`${t}/tc/check`, {
@@ -3201,37 +3217,39 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3201
3217
  enabled: r
3202
3218
  });
3203
3219
  }, Wi = () => {
3204
- var A;
3205
- const { t: e } = je();
3206
- Ts({ element: "xtra-authentication" });
3207
- const { logoutUrl: t } = st(), s = f.useRef(null), [r, a] = f.useState(0), [l, o] = f.useState({}), { mutate: c, isError: v } = Gi(), { AccessibleFormMessage: g, formRef: h } = Us({ submitCount: r, errors: l }), u = qi(), d = !!((A = u.data) != null && A.length), m = e("termsAndConditions.error.required"), S = () => {
3208
- var C;
3209
- (C = s == null ? void 0 : s.current) == null || C.click(), document.body.style.removeProperty("overflow");
3220
+ var P;
3221
+ const { t: e } = je(), { logoutUrl: t } = st(), [s, r] = d.useState(0), [a, l] = d.useState({}), { AccessibleFormMessage: o, formRef: c } = Us({ submitCount: s, errors: a }), { mutate: f, isError: m } = Gi(), h = qi(), [u, v] = d.useState(!1);
3222
+ Qs({ element: "xtra-authentication" });
3223
+ const g = e("termsAndConditions.error.required"), S = () => {
3224
+ v(!1), document.body.style.removeProperty("overflow");
3210
3225
  };
3211
- f.useEffect(() => {
3212
- d && document.body.style.setProperty("overflow", "hidden");
3213
- }, [d]), f.useEffect(() => {
3214
- v && o({ acceptedTC: m });
3215
- }, [m, v]);
3216
- const P = (C) => {
3217
- C.preventDefault(), a(r + 1);
3218
- const { acceptedTC: w } = C.target;
3219
- if (w instanceof RadioNodeList) {
3220
- const j = Object.values(w);
3221
- j.every((R) => R.checked) ? (o({}), c(j.map((R) => R.value)), S()) : o({ acceptedTC: m });
3226
+ d.useEffect(() => {
3227
+ var C;
3228
+ (C = h.data) != null && C.length && v(!0);
3229
+ }, [(P = h.data) == null ? void 0 : P.length]), d.useEffect(() => {
3230
+ u && document.body.style.setProperty("overflow", "hidden");
3231
+ }, [u]), d.useEffect(() => {
3232
+ m && l({ acceptedTC: g });
3233
+ }, [g, m]);
3234
+ const _ = (C) => {
3235
+ C.preventDefault(), r((b) => b + 1);
3236
+ const { acceptedTC: j } = C.target;
3237
+ if (j instanceof RadioNodeList) {
3238
+ const b = Object.values(j);
3239
+ b.every((F) => F.checked) ? (l({}), f(b.map((F) => F.value)), S()) : l({ acceptedTC: g });
3222
3240
  } else
3223
- w != null && w.checked ? (o({}), c([w.value]), S()) : o({ acceptedTC: m });
3241
+ j != null && j.checked ? (l({}), f([j.value]), S()) : l({ acceptedTC: g });
3224
3242
  };
3225
- return d ? /* @__PURE__ */ i.jsxs(G, { defaultOpen: d, isModal: !0, children: [
3226
- g,
3243
+ return u ? /* @__PURE__ */ i.jsxs(G, { defaultOpen: u, isModal: !0, children: [
3244
+ o,
3227
3245
  /* @__PURE__ */ i.jsxs(G.Root, { children: [
3228
3246
  /* @__PURE__ */ i.jsx(G.Header, { children: /* @__PURE__ */ i.jsx(G.Title, { icon: /* @__PURE__ */ i.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ i.jsx(Yi, { children: e("termsAndConditions.title") }) }) }),
3229
- /* @__PURE__ */ i.jsx(G.Body, { children: /* @__PURE__ */ i.jsxs(Rs, { ref: h, id: "tc-form", onSubmit: P, children: [
3247
+ /* @__PURE__ */ i.jsx(G.Body, { children: /* @__PURE__ */ i.jsxs(Ls, { ref: c, id: "tc-form", onSubmit: _, children: [
3230
3248
  /* @__PURE__ */ i.jsxs($i, { children: [
3231
3249
  e("termsAndConditions.description"),
3232
- l.acceptedTC && /* @__PURE__ */ i.jsx(zi, { children: m })
3250
+ a.acceptedTC && /* @__PURE__ */ i.jsx(zi, { children: g })
3233
3251
  ] }),
3234
- u.data.map(({ tcCode: C, title: w, URL: j }) => /* @__PURE__ */ i.jsx(
3252
+ h.data.map(({ tcCode: C, title: j, URL: b }) => /* @__PURE__ */ i.jsx(
3235
3253
  we,
3236
3254
  {
3237
3255
  id: C,
@@ -3239,8 +3257,8 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3239
3257
  name: "acceptedTC",
3240
3258
  variant: "primary",
3241
3259
  children: /* @__PURE__ */ i.jsxs(we.Content, { children: [
3242
- /* @__PURE__ */ i.jsx(Vi, { children: w }),
3243
- /* @__PURE__ */ i.jsx(Zi, { href: j, children: e("termsAndConditions.action", { title: w }) })
3260
+ /* @__PURE__ */ i.jsx(Vi, { children: j }),
3261
+ /* @__PURE__ */ i.jsx(Zi, { href: b, children: e("termsAndConditions.action", { title: j }) })
3244
3262
  ] })
3245
3263
  },
3246
3264
  C
@@ -3258,12 +3276,12 @@ const Mi = "/icons/bouMenuIcons.svg", Oi = ({
3258
3276
  /* @__PURE__ */ i.jsx(Ze, { form: "tc-form", type: "submit", variant: "primary", children: e("confirm") })
3259
3277
  ] })
3260
3278
  ] })
3261
- ] }) : /* @__PURE__ */ i.jsx(i.Fragment, {});
3279
+ ] }) : null;
3262
3280
  }, Vi = ({
3263
3281
  children: e,
3264
3282
  ...t
3265
- }) => /* @__PURE__ */ i.jsx(we.Label, { className: "form--tc__label", ...t, children: e }), Rs = f.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
3266
- Rs.displayName = "TermsAndConditionsForm";
3283
+ }) => /* @__PURE__ */ i.jsx(we.Label, { className: "form--tc__label", ...t, children: e }), Ls = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
3284
+ Ls.displayName = "TermsAndConditionsForm";
3267
3285
  const $i = ({
3268
3286
  children: e,
3269
3287
  ...t
@@ -3278,8 +3296,24 @@ const $i = ({
3278
3296
  ...t,
3279
3297
  children: e
3280
3298
  }
3281
- ), Yi = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), zi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), Ji = new ls(), Bi = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, commerceId: a, bouMenuItems: l }) => /* @__PURE__ */ i.jsx(Qs, { environment: e, children: /* @__PURE__ */ i.jsx(Hs, { commerceId: a, children: /* @__PURE__ */ i.jsx(Fi, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(ar, { client: Ji, children: [
3282
- /* @__PURE__ */ i.jsx(Li, { position: r, bouMenuItems: l, children: /* @__PURE__ */ i.jsx(Ki, {}) }),
3299
+ ), Yi = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), zi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), Ji = new cs(), Bi = ({
3300
+ environment: e,
3301
+ redirectUrl: t,
3302
+ apiUrl: s,
3303
+ position: r,
3304
+ commerceId: a,
3305
+ bouMenuItems: l,
3306
+ country: o
3307
+ }) => /* @__PURE__ */ i.jsx(Hs, { environment: e, children: /* @__PURE__ */ i.jsx(Ks, { commerceId: a, children: /* @__PURE__ */ i.jsx(Fi, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(ar, { client: Ji, children: [
3308
+ /* @__PURE__ */ i.jsx(
3309
+ Li,
3310
+ {
3311
+ position: r,
3312
+ bouMenuItems: l,
3313
+ country: o,
3314
+ children: /* @__PURE__ */ i.jsx(Ki, {})
3315
+ }
3316
+ ),
3283
3317
  /* @__PURE__ */ i.jsx(Wi, {})
3284
3318
  ] }) }) }) });
3285
3319
  export {