@myxtra/authentication-green 1.15.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,22 @@
1
- var bt = (e, t, s) => {
1
+ var gt = (e, t, s) => {
2
2
  if (!t.has(e))
3
3
  throw TypeError("Cannot " + s);
4
4
  };
5
- var n = (e, t, s) => (bt(e, t, "read from private field"), s ? s.call(e) : t.get(e)), p = (e, t, s) => {
5
+ var n = (e, t, s) => (gt(e, t, "read from private field"), s ? s.call(e) : t.get(e)), p = (e, t, s) => {
6
6
  if (t.has(e))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  t instanceof WeakSet ? t.add(e) : t.set(e, s);
9
- }, h = (e, t, s, r) => (bt(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s);
10
- var lt = (e, t, s, r) => ({
9
+ }, h = (e, t, s, r) => (gt(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s);
10
+ var at = (e, t, s, r) => ({
11
11
  set _(a) {
12
12
  h(e, t, a, s);
13
13
  },
14
14
  get _() {
15
15
  return n(e, t, r);
16
16
  }
17
- }), x = (e, t, s) => (bt(e, t, "access private method"), s);
18
- import { r as d, j as i, u as Zs, a as zs, b as Ee, c as ps, P as qt, d as Ys, E as Js } from "./index-1d6c1a3a.mjs";
19
- var Ge = class {
17
+ }), x = (e, t, s) => (gt(e, t, "access private method"), s);
18
+ import { r as d, j as i, u as $s, a as Ks, b as _e, P as Ht, c as cs, d as Gs, E as Vs } from "./index-ae7de489.mjs";
19
+ var Ke = class {
20
20
  constructor() {
21
21
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
22
22
  }
@@ -32,19 +32,19 @@ var Ge = class {
32
32
  }
33
33
  onUnsubscribe() {
34
34
  }
35
- }, Ke = typeof window > "u" || "Deno" in window;
36
- function z() {
35
+ }, $e = typeof window > "u" || "Deno" in window;
36
+ function Z() {
37
37
  }
38
- function Xs(e, t) {
38
+ function qs(e, t) {
39
39
  return typeof e == "function" ? e(t) : e;
40
40
  }
41
- function jt(e) {
41
+ function xt(e) {
42
42
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
43
43
  }
44
- function ms(e, t) {
44
+ function us(e, t) {
45
45
  return Math.max(e + (t || 0) - Date.now(), 0);
46
46
  }
47
- function Vt(e, t) {
47
+ function $t(e, t) {
48
48
  const {
49
49
  type: s = "all",
50
50
  exact: r,
@@ -55,59 +55,59 @@ function Vt(e, t) {
55
55
  } = e;
56
56
  if (l) {
57
57
  if (r) {
58
- if (t.queryHash !== Qt(l, t.options))
58
+ if (t.queryHash !== Ft(l, t.options))
59
59
  return !1;
60
- } else if (!Ze(t.queryKey, l))
60
+ } else if (!Ve(t.queryKey, l))
61
61
  return !1;
62
62
  }
63
63
  if (s !== "all") {
64
- const f = t.isActive();
65
- if (s === "active" && !f || s === "inactive" && f)
64
+ const m = t.isActive();
65
+ if (s === "active" && !m || s === "inactive" && m)
66
66
  return !1;
67
67
  }
68
68
  return !(typeof c == "boolean" && t.isStale() !== c || typeof a < "u" && a !== t.state.fetchStatus || o && !o(t));
69
69
  }
70
- function Wt(e, t) {
70
+ function Kt(e, t) {
71
71
  const { exact: s, status: r, predicate: a, mutationKey: o } = e;
72
72
  if (o) {
73
73
  if (!t.options.mutationKey)
74
74
  return !1;
75
75
  if (s) {
76
- if (We(t.options.mutationKey) !== We(o))
76
+ if (we(t.options.mutationKey) !== we(o))
77
77
  return !1;
78
- } else if (!Ze(t.options.mutationKey, o))
78
+ } else if (!Ve(t.options.mutationKey, o))
79
79
  return !1;
80
80
  }
81
81
  return !(r && t.state.status !== r || a && !a(t));
82
82
  }
83
- function Qt(e, t) {
84
- return ((t == null ? void 0 : t.queryKeyHashFn) || We)(e);
83
+ function Ft(e, t) {
84
+ return ((t == null ? void 0 : t.queryKeyHashFn) || we)(e);
85
85
  }
86
- function We(e) {
86
+ function we(e) {
87
87
  return JSON.stringify(
88
88
  e,
89
- (t, s) => _t(s) ? Object.keys(s).sort().reduce((r, a) => (r[a] = s[a], r), {}) : s
89
+ (t, s) => bt(s) ? Object.keys(s).sort().reduce((r, a) => (r[a] = s[a], r), {}) : s
90
90
  );
91
91
  }
92
- function Ze(e, t) {
93
- return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ze(e[s], t[s])) : !1;
92
+ function Ve(e, t) {
93
+ return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Ve(e[s], t[s])) : !1;
94
94
  }
95
- function vs(e, t) {
95
+ function ds(e, t) {
96
96
  if (e === t)
97
97
  return e;
98
- const s = Zt(e) && Zt(t);
99
- if (s || _t(e) && _t(t)) {
100
- const r = s ? e.length : Object.keys(e).length, a = s ? t : Object.keys(t), o = a.length, l = s ? [] : {};
101
- let c = 0;
102
- for (let f = 0; f < o; f++) {
103
- const g = s ? f : a[f];
104
- l[g] = vs(e[g], t[g]), l[g] === e[g] && c++;
98
+ const s = Gt(e) && Gt(t);
99
+ if (s || bt(e) && bt(t)) {
100
+ const r = s ? e : Object.keys(e), a = r.length, o = s ? t : Object.keys(t), l = o.length, c = s ? [] : {};
101
+ let m = 0;
102
+ for (let C = 0; C < l; C++) {
103
+ const u = s ? C : o[C];
104
+ !s && e[u] === void 0 && t[u] === void 0 && r.includes(u) ? (c[u] = void 0, m++) : (c[u] = ds(e[u], t[u]), c[u] === e[u] && e[u] !== void 0 && m++);
105
105
  }
106
- return r === o && c === r ? e : l;
106
+ return a === l && m === a ? e : c;
107
107
  }
108
108
  return t;
109
109
  }
110
- function ht(e, t) {
110
+ function ct(e, t) {
111
111
  if (e && !t || t && !e)
112
112
  return !1;
113
113
  for (const s in e)
@@ -115,48 +115,45 @@ function ht(e, t) {
115
115
  return !1;
116
116
  return !0;
117
117
  }
118
- function Zt(e) {
118
+ function Gt(e) {
119
119
  return Array.isArray(e) && e.length === Object.keys(e).length;
120
120
  }
121
- function _t(e) {
122
- if (!zt(e))
121
+ function bt(e) {
122
+ if (!Vt(e))
123
123
  return !1;
124
124
  const t = e.constructor;
125
125
  if (typeof t > "u")
126
126
  return !0;
127
127
  const s = t.prototype;
128
- return !(!zt(s) || !s.hasOwnProperty("isPrototypeOf"));
128
+ return !(!Vt(s) || !s.hasOwnProperty("isPrototypeOf"));
129
129
  }
130
- function zt(e) {
130
+ function Vt(e) {
131
131
  return Object.prototype.toString.call(e) === "[object Object]";
132
132
  }
133
- function gs(e) {
133
+ function Ws(e) {
134
134
  return new Promise((t) => {
135
135
  setTimeout(t, e);
136
136
  });
137
137
  }
138
- function Yt(e) {
139
- gs(0).then(e);
138
+ function wt(e, t, s) {
139
+ return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? ds(e, t) : t;
140
140
  }
141
- function Et(e, t, s) {
142
- return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? vs(e, t) : t;
143
- }
144
- function Is(e, t, s = 0) {
141
+ function Zs(e, t, s = 0) {
145
142
  const r = [...e, t];
146
143
  return s && r.length > s ? r.slice(1) : r;
147
144
  }
148
- function Bs(e, t, s = 0) {
145
+ function Ys(e, t, s = 0) {
149
146
  const r = [t, ...e];
150
147
  return s && r.length > s ? r.slice(0, -1) : r;
151
148
  }
152
- var me, ae, Ae, is, er = (is = class extends Ge {
149
+ var pe, ne, Ee, Bt, zs = (Bt = class extends Ke {
153
150
  constructor() {
154
151
  super();
155
- p(this, me, void 0);
156
- p(this, ae, void 0);
157
- p(this, Ae, void 0);
158
- h(this, Ae, (t) => {
159
- if (!Ke && window.addEventListener) {
152
+ p(this, pe, void 0);
153
+ p(this, ne, void 0);
154
+ p(this, Ee, void 0);
155
+ h(this, Ee, (t) => {
156
+ if (!$e && window.addEventListener) {
160
157
  const s = () => t();
161
158
  return window.addEventListener("visibilitychange", s, !1), () => {
162
159
  window.removeEventListener("visibilitychange", s);
@@ -165,20 +162,20 @@ var me, ae, Ae, is, er = (is = class extends Ge {
165
162
  });
166
163
  }
167
164
  onSubscribe() {
168
- n(this, ae) || this.setEventListener(n(this, Ae));
165
+ n(this, ne) || this.setEventListener(n(this, Ee));
169
166
  }
170
167
  onUnsubscribe() {
171
168
  var t;
172
- this.hasListeners() || ((t = n(this, ae)) == null || t.call(this), h(this, ae, void 0));
169
+ this.hasListeners() || ((t = n(this, ne)) == null || t.call(this), h(this, ne, void 0));
173
170
  }
174
171
  setEventListener(t) {
175
172
  var s;
176
- h(this, Ae, t), (s = n(this, ae)) == null || s.call(this), h(this, ae, t((r) => {
173
+ h(this, Ee, t), (s = n(this, ne)) == null || s.call(this), h(this, ne, t((r) => {
177
174
  typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
178
175
  }));
179
176
  }
180
177
  setFocused(t) {
181
- n(this, me) !== t && (h(this, me, t), this.onFocus());
178
+ n(this, pe) !== t && (h(this, pe, t), this.onFocus());
182
179
  }
183
180
  onFocus() {
184
181
  this.listeners.forEach((t) => {
@@ -187,16 +184,16 @@ var me, ae, Ae, is, er = (is = class extends Ge {
187
184
  }
188
185
  isFocused() {
189
186
  var t;
190
- return typeof n(this, me) == "boolean" ? n(this, me) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
187
+ return typeof n(this, pe) == "boolean" ? n(this, pe) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
191
188
  }
192
- }, me = new WeakMap(), ae = new WeakMap(), Ae = new WeakMap(), is), ft = new er(), Se, oe, ke, ns, tr = (ns = class extends Ge {
189
+ }, pe = new WeakMap(), ne = new WeakMap(), Ee = new WeakMap(), Bt), ut = new zs(), Se, ae, Ae, es, Js = (es = class extends Ke {
193
190
  constructor() {
194
191
  super();
195
192
  p(this, Se, !0);
196
- p(this, oe, void 0);
197
- p(this, ke, void 0);
198
- h(this, ke, (t) => {
199
- if (!Ke && window.addEventListener) {
193
+ p(this, ae, void 0);
194
+ p(this, Ae, void 0);
195
+ h(this, Ae, (t) => {
196
+ if (!$e && window.addEventListener) {
200
197
  const s = () => t(!0), r = () => t(!1);
201
198
  return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
202
199
  window.removeEventListener("online", s), window.removeEventListener("offline", r);
@@ -205,15 +202,15 @@ var me, ae, Ae, is, er = (is = class extends Ge {
205
202
  });
206
203
  }
207
204
  onSubscribe() {
208
- n(this, oe) || this.setEventListener(n(this, ke));
205
+ n(this, ae) || this.setEventListener(n(this, Ae));
209
206
  }
210
207
  onUnsubscribe() {
211
208
  var t;
212
- this.hasListeners() || ((t = n(this, oe)) == null || t.call(this), h(this, oe, void 0));
209
+ this.hasListeners() || ((t = n(this, ae)) == null || t.call(this), h(this, ae, void 0));
213
210
  }
214
211
  setEventListener(t) {
215
212
  var s;
216
- h(this, ke, t), (s = n(this, oe)) == null || s.call(this), h(this, oe, t(this.setOnline.bind(this)));
213
+ h(this, Ae, t), (s = n(this, ae)) == null || s.call(this), h(this, ae, t(this.setOnline.bind(this)));
217
214
  }
218
215
  setOnline(t) {
219
216
  n(this, Se) !== t && (h(this, Se, t), this.listeners.forEach((r) => {
@@ -223,171 +220,174 @@ var me, ae, Ae, is, er = (is = class extends Ge {
223
220
  isOnline() {
224
221
  return n(this, Se);
225
222
  }
226
- }, Se = new WeakMap(), oe = new WeakMap(), ke = new WeakMap(), ns), pt = new tr();
227
- function sr(e) {
223
+ }, Se = new WeakMap(), ae = new WeakMap(), Ae = new WeakMap(), es), dt = new Js();
224
+ function Xs(e) {
228
225
  return Math.min(1e3 * 2 ** e, 3e4);
229
226
  }
230
- function xt(e) {
231
- return (e ?? "online") === "online" ? pt.isOnline() : !0;
227
+ function vt(e) {
228
+ return (e ?? "online") === "online" ? dt.isOnline() : !0;
232
229
  }
233
- var ys = class {
230
+ var hs = class {
234
231
  constructor(e) {
235
232
  this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
236
233
  }
237
234
  };
238
- function wt(e) {
239
- return e instanceof ys;
235
+ function Ct(e) {
236
+ return e instanceof hs;
240
237
  }
241
- function Cs(e) {
238
+ function fs(e) {
242
239
  let t = !1, s = 0, r = !1, a, o, l;
243
- const c = new Promise((m, y) => {
244
- o = m, l = y;
245
- }), f = (m) => {
246
- var y;
247
- r || (v(new ys(m)), (y = e.abort) == null || y.call(e));
248
- }, g = () => {
240
+ const c = new Promise((y, g) => {
241
+ o = y, l = g;
242
+ }), m = (y) => {
243
+ var g;
244
+ r || (f(new hs(y)), (g = e.abort) == null || g.call(e));
245
+ }, C = () => {
249
246
  t = !0;
250
247
  }, u = () => {
251
248
  t = !1;
252
- }, C = () => !ft.isFocused() || e.networkMode !== "always" && !pt.isOnline(), w = (m) => {
253
- var y;
254
- r || (r = !0, (y = e.onSuccess) == null || y.call(e, m), a == null || a(), o(m));
255
- }, v = (m) => {
256
- var y;
257
- r || (r = !0, (y = e.onError) == null || y.call(e, m), a == null || a(), l(m));
258
- }, b = () => new Promise((m) => {
259
- var y;
249
+ }, b = () => !ut.isFocused() || e.networkMode !== "always" && !dt.isOnline(), v = (y) => {
250
+ var g;
251
+ r || (r = !0, (g = e.onSuccess) == null || g.call(e, y), a == null || a(), o(y));
252
+ }, f = (y) => {
253
+ var g;
254
+ r || (r = !0, (g = e.onError) == null || g.call(e, y), a == null || a(), l(y));
255
+ }, w = () => new Promise((y) => {
256
+ var g;
260
257
  a = (S) => {
261
- const E = r || !C();
262
- return E && m(S), E;
263
- }, (y = e.onPause) == null || y.call(e);
258
+ const _ = r || !b();
259
+ return _ && y(S), _;
260
+ }, (g = e.onPause) == null || g.call(e);
264
261
  }).then(() => {
265
- var m;
266
- a = void 0, r || (m = e.onContinue) == null || m.call(e);
267
- }), _ = () => {
262
+ var y;
263
+ a = void 0, r || (y = e.onContinue) == null || y.call(e);
264
+ }), E = () => {
268
265
  if (r)
269
266
  return;
270
- let m;
267
+ let y;
271
268
  try {
272
- m = e.fn();
273
- } catch (y) {
274
- m = Promise.reject(y);
269
+ y = e.fn();
270
+ } catch (g) {
271
+ y = Promise.reject(g);
275
272
  }
276
- Promise.resolve(m).then(w).catch((y) => {
277
- var K;
273
+ Promise.resolve(y).then(v).catch((g) => {
274
+ var $;
278
275
  if (r)
279
276
  return;
280
- const S = e.retry ?? (Ke ? 0 : 3), E = e.retryDelay ?? sr, k = typeof E == "function" ? E(s, y) : E, U = S === !0 || typeof S == "number" && s < S || typeof S == "function" && S(s, y);
281
- if (t || !U) {
282
- v(y);
277
+ const S = e.retry ?? ($e ? 0 : 3), _ = e.retryDelay ?? Xs, k = typeof _ == "function" ? _(s, g) : _, L = S === !0 || typeof S == "number" && s < S || typeof S == "function" && S(s, g);
278
+ if (t || !L) {
279
+ f(g);
283
280
  return;
284
281
  }
285
- s++, (K = e.onFail) == null || K.call(e, s, y), gs(k).then(() => {
286
- if (C())
287
- return b();
282
+ s++, ($ = e.onFail) == null || $.call(e, s, g), Ws(k).then(() => {
283
+ if (b())
284
+ return w();
288
285
  }).then(() => {
289
- t ? v(y) : _();
286
+ t ? f(g) : E();
290
287
  });
291
288
  });
292
289
  };
293
- return xt(e.networkMode) ? _() : b().then(_), {
290
+ return vt(e.networkMode) ? E() : w().then(E), {
294
291
  promise: c,
295
- cancel: f,
292
+ cancel: m,
296
293
  continue: () => (a == null ? void 0 : a()) ? c : Promise.resolve(),
297
- cancelRetry: g,
294
+ cancelRetry: C,
298
295
  continueRetry: u
299
296
  };
300
297
  }
301
- function rr() {
302
- let e = [], t = 0, s = (u) => {
303
- u();
304
- }, r = (u) => {
305
- u();
306
- };
307
- const a = (u) => {
308
- let C;
298
+ function Is() {
299
+ let e = [], t = 0, s = (v) => {
300
+ v();
301
+ }, r = (v) => {
302
+ v();
303
+ }, a = (v) => setTimeout(v, 0);
304
+ const o = (v) => {
305
+ a = v;
306
+ }, l = (v) => {
307
+ let f;
309
308
  t++;
310
309
  try {
311
- C = u();
310
+ f = v();
312
311
  } finally {
313
- t--, t || c();
312
+ t--, t || C();
314
313
  }
315
- return C;
316
- }, o = (u) => {
317
- t ? e.push(u) : Yt(() => {
318
- s(u);
314
+ return f;
315
+ }, c = (v) => {
316
+ t ? e.push(v) : a(() => {
317
+ s(v);
319
318
  });
320
- }, l = (u) => (...C) => {
321
- o(() => {
322
- u(...C);
319
+ }, m = (v) => (...f) => {
320
+ c(() => {
321
+ v(...f);
323
322
  });
324
- }, c = () => {
325
- const u = e;
326
- e = [], u.length && Yt(() => {
323
+ }, C = () => {
324
+ const v = e;
325
+ e = [], v.length && a(() => {
327
326
  r(() => {
328
- u.forEach((C) => {
329
- s(C);
327
+ v.forEach((f) => {
328
+ s(f);
330
329
  });
331
330
  });
332
331
  });
333
332
  };
334
333
  return {
335
- batch: a,
336
- batchCalls: l,
337
- schedule: o,
338
- setNotifyFunction: (u) => {
339
- s = u;
334
+ batch: l,
335
+ batchCalls: m,
336
+ schedule: c,
337
+ setNotifyFunction: (v) => {
338
+ s = v;
340
339
  },
341
- setBatchNotifyFunction: (u) => {
342
- r = u;
343
- }
340
+ setBatchNotifyFunction: (v) => {
341
+ r = v;
342
+ },
343
+ setScheduler: o
344
344
  };
345
345
  }
346
- var F = rr(), ve, as, xs = (as = class {
346
+ var R = Is(), me, ts, ps = (ts = class {
347
347
  constructor() {
348
- p(this, ve, void 0);
348
+ p(this, me, void 0);
349
349
  }
350
350
  destroy() {
351
351
  this.clearGcTimeout();
352
352
  }
353
353
  scheduleGc() {
354
- this.clearGcTimeout(), jt(this.gcTime) && h(this, ve, setTimeout(() => {
354
+ this.clearGcTimeout(), xt(this.gcTime) && h(this, me, setTimeout(() => {
355
355
  this.optionalRemove();
356
356
  }, this.gcTime));
357
357
  }
358
358
  updateGcTime(e) {
359
359
  this.gcTime = Math.max(
360
360
  this.gcTime || 0,
361
- e ?? (Ke ? 1 / 0 : 5 * 60 * 1e3)
361
+ e ?? ($e ? 1 / 0 : 5 * 60 * 1e3)
362
362
  );
363
363
  }
364
364
  clearGcTimeout() {
365
- n(this, ve) && (clearTimeout(n(this, ve)), h(this, ve, void 0));
365
+ n(this, me) && (clearTimeout(n(this, me)), h(this, me, void 0));
366
366
  }
367
- }, ve = new WeakMap(), as), Pe, Ne, q, le, V, R, ze, ge, Me, ut, X, re, os, ir = (os = class extends xs {
367
+ }, me = new WeakMap(), ts), Pe, Ne, V, oe, q, D, qe, ve, ke, ot, z, te, ss, Bs = (ss = class extends ps {
368
368
  constructor(t) {
369
369
  super();
370
- p(this, Me);
371
- p(this, X);
370
+ p(this, ke);
371
+ p(this, z);
372
372
  p(this, Pe, void 0);
373
373
  p(this, Ne, void 0);
374
- p(this, q, void 0);
375
- p(this, le, void 0);
376
374
  p(this, V, void 0);
377
- p(this, R, void 0);
378
- p(this, ze, void 0);
379
- p(this, ge, void 0);
380
- h(this, ge, !1), h(this, ze, t.defaultOptions), x(this, Me, ut).call(this, t.options), h(this, R, []), h(this, q, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, h(this, Pe, t.state || nr(this.options)), this.state = n(this, Pe), this.scheduleGc();
375
+ p(this, oe, void 0);
376
+ p(this, q, void 0);
377
+ p(this, D, void 0);
378
+ p(this, qe, void 0);
379
+ p(this, ve, void 0);
380
+ h(this, ve, !1), h(this, qe, t.defaultOptions), x(this, ke, ot).call(this, t.options), h(this, D, []), h(this, V, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, h(this, Pe, t.state || er(this.options)), this.state = n(this, Pe), this.scheduleGc();
381
381
  }
382
382
  get meta() {
383
383
  return this.options.meta;
384
384
  }
385
385
  optionalRemove() {
386
- !n(this, R).length && this.state.fetchStatus === "idle" && n(this, q).remove(this);
386
+ !n(this, D).length && this.state.fetchStatus === "idle" && n(this, V).remove(this);
387
387
  }
388
388
  setData(t, s) {
389
- const r = Et(this.state.data, t, this.options);
390
- return x(this, X, re).call(this, {
389
+ const r = wt(this.state.data, t, this.options);
390
+ return x(this, z, te).call(this, {
391
391
  data: r,
392
392
  type: "success",
393
393
  dataUpdatedAt: s == null ? void 0 : s.updatedAt,
@@ -395,12 +395,12 @@ var F = rr(), ve, as, xs = (as = class {
395
395
  }), r;
396
396
  }
397
397
  setState(t, s) {
398
- x(this, X, re).call(this, { type: "setState", state: t, setStateOptions: s });
398
+ x(this, z, te).call(this, { type: "setState", state: t, setStateOptions: s });
399
399
  }
400
400
  cancel(t) {
401
401
  var r;
402
- const s = n(this, le);
403
- return (r = n(this, V)) == null || r.cancel(t), s ? s.then(z).catch(z) : Promise.resolve();
402
+ const s = n(this, oe);
403
+ return (r = n(this, q)) == null || r.cancel(t), s ? s.then(Z).catch(Z) : Promise.resolve();
404
404
  }
405
405
  destroy() {
406
406
  super.destroy(), this.cancel({ silent: !0 });
@@ -409,7 +409,7 @@ var F = rr(), ve, as, xs = (as = class {
409
409
  this.destroy(), this.setState(n(this, Pe));
410
410
  }
411
411
  isActive() {
412
- return n(this, R).some(
412
+ return n(this, D).some(
413
413
  (t) => t.options.enabled !== !1
414
414
  );
415
415
  }
@@ -417,56 +417,56 @@ var F = rr(), ve, as, xs = (as = class {
417
417
  return this.getObserversCount() > 0 && !this.isActive();
418
418
  }
419
419
  isStale() {
420
- return this.state.isInvalidated || !this.state.dataUpdatedAt || n(this, R).some((t) => t.getCurrentResult().isStale);
420
+ return this.state.isInvalidated || !this.state.dataUpdatedAt || n(this, D).some((t) => t.getCurrentResult().isStale);
421
421
  }
422
422
  isStaleByTime(t = 0) {
423
- return this.state.isInvalidated || !this.state.dataUpdatedAt || !ms(this.state.dataUpdatedAt, t);
423
+ return this.state.isInvalidated || !this.state.dataUpdatedAt || !us(this.state.dataUpdatedAt, t);
424
424
  }
425
425
  onFocus() {
426
426
  var s;
427
- const t = n(this, R).find((r) => r.shouldFetchOnWindowFocus());
428
- t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, V)) == null || s.continue();
427
+ const t = n(this, D).find((r) => r.shouldFetchOnWindowFocus());
428
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, q)) == null || s.continue();
429
429
  }
430
430
  onOnline() {
431
431
  var s;
432
- const t = n(this, R).find((r) => r.shouldFetchOnReconnect());
433
- t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, V)) == null || s.continue();
432
+ const t = n(this, D).find((r) => r.shouldFetchOnReconnect());
433
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = n(this, q)) == null || s.continue();
434
434
  }
435
435
  addObserver(t) {
436
- n(this, R).includes(t) || (n(this, R).push(t), this.clearGcTimeout(), n(this, q).notify({ type: "observerAdded", query: this, observer: t }));
436
+ n(this, D).includes(t) || (n(this, D).push(t), this.clearGcTimeout(), n(this, V).notify({ type: "observerAdded", query: this, observer: t }));
437
437
  }
438
438
  removeObserver(t) {
439
- n(this, R).includes(t) && (h(this, R, n(this, R).filter((s) => s !== t)), n(this, R).length || (n(this, V) && (n(this, ge) ? n(this, V).cancel({ revert: !0 }) : n(this, V).cancelRetry()), this.scheduleGc()), n(this, q).notify({ type: "observerRemoved", query: this, observer: t }));
439
+ n(this, D).includes(t) && (h(this, D, n(this, D).filter((s) => s !== t)), n(this, D).length || (n(this, q) && (n(this, ve) ? n(this, q).cancel({ revert: !0 }) : n(this, q).cancelRetry()), this.scheduleGc()), n(this, V).notify({ type: "observerRemoved", query: this, observer: t }));
440
440
  }
441
441
  getObserversCount() {
442
- return n(this, R).length;
442
+ return n(this, D).length;
443
443
  }
444
444
  invalidate() {
445
- this.state.isInvalidated || x(this, X, re).call(this, { type: "invalidate" });
445
+ this.state.isInvalidated || x(this, z, te).call(this, { type: "invalidate" });
446
446
  }
447
447
  fetch(t, s) {
448
- var g, u, C, w;
448
+ var C, u, b, v;
449
449
  if (this.state.fetchStatus !== "idle") {
450
450
  if (this.state.dataUpdatedAt && (s != null && s.cancelRefetch))
451
451
  this.cancel({ silent: !0 });
452
- else if (n(this, le))
453
- return (g = n(this, V)) == null || g.continueRetry(), n(this, le);
452
+ else if (n(this, oe))
453
+ return (C = n(this, q)) == null || C.continueRetry(), n(this, oe);
454
454
  }
455
- if (t && x(this, Me, ut).call(this, t), !this.options.queryFn) {
456
- const v = n(this, R).find((b) => b.options.queryFn);
457
- v && x(this, Me, ut).call(this, v.options);
455
+ if (t && x(this, ke, ot).call(this, t), !this.options.queryFn) {
456
+ const f = n(this, D).find((w) => w.options.queryFn);
457
+ f && x(this, ke, ot).call(this, f.options);
458
458
  }
459
459
  const r = new AbortController(), a = {
460
460
  queryKey: this.queryKey,
461
461
  meta: this.meta
462
- }, o = (v) => {
463
- Object.defineProperty(v, "signal", {
462
+ }, o = (f) => {
463
+ Object.defineProperty(f, "signal", {
464
464
  enumerable: !0,
465
- get: () => (h(this, ge, !0), r.signal)
465
+ get: () => (h(this, ve, !0), r.signal)
466
466
  });
467
467
  };
468
468
  o(a);
469
- const l = () => this.options.queryFn ? (h(this, ge, !1), this.options.persister ? this.options.persister(
469
+ const l = () => this.options.queryFn ? (h(this, ve, !1), this.options.persister ? this.options.persister(
470
470
  this.options.queryFn,
471
471
  a,
472
472
  this
@@ -484,57 +484,57 @@ var F = rr(), ve, as, xs = (as = class {
484
484
  o(c), (u = this.options.behavior) == null || u.onFetch(
485
485
  c,
486
486
  this
487
- ), h(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((C = c.fetchOptions) == null ? void 0 : C.meta)) && x(this, X, re).call(this, { type: "fetch", meta: (w = c.fetchOptions) == null ? void 0 : w.meta });
488
- const f = (v) => {
489
- var b, _, m, y;
490
- wt(v) && v.silent || x(this, X, re).call(this, {
487
+ ), h(this, Ne, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((b = c.fetchOptions) == null ? void 0 : b.meta)) && x(this, z, te).call(this, { type: "fetch", meta: (v = c.fetchOptions) == null ? void 0 : v.meta });
488
+ const m = (f) => {
489
+ var w, E, y, g;
490
+ Ct(f) && f.silent || x(this, z, te).call(this, {
491
491
  type: "error",
492
- error: v
493
- }), wt(v) || ((_ = (b = n(this, q).config).onError) == null || _.call(
494
- b,
495
- v,
492
+ error: f
493
+ }), Ct(f) || ((E = (w = n(this, V).config).onError) == null || E.call(
494
+ w,
495
+ f,
496
496
  this
497
- ), (y = (m = n(this, q).config).onSettled) == null || y.call(
498
- m,
497
+ ), (g = (y = n(this, V).config).onSettled) == null || g.call(
498
+ y,
499
499
  this.state.data,
500
- v,
500
+ f,
501
501
  this
502
502
  )), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
503
503
  };
504
- return h(this, V, Cs({
504
+ return h(this, q, fs({
505
505
  fn: c.fetchFn,
506
506
  abort: r.abort.bind(r),
507
- onSuccess: (v) => {
508
- var b, _, m, y;
509
- if (typeof v > "u") {
510
- f(new Error(`${this.queryHash} data is undefined`));
507
+ onSuccess: (f) => {
508
+ var w, E, y, g;
509
+ if (typeof f > "u") {
510
+ m(new Error(`${this.queryHash} data is undefined`));
511
511
  return;
512
512
  }
513
- this.setData(v), (_ = (b = n(this, q).config).onSuccess) == null || _.call(b, v, this), (y = (m = n(this, q).config).onSettled) == null || y.call(
514
- m,
515
- v,
513
+ this.setData(f), (E = (w = n(this, V).config).onSuccess) == null || E.call(w, f, this), (g = (y = n(this, V).config).onSettled) == null || g.call(
514
+ y,
515
+ f,
516
516
  this.state.error,
517
517
  this
518
518
  ), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
519
519
  },
520
- onError: f,
521
- onFail: (v, b) => {
522
- x(this, X, re).call(this, { type: "failed", failureCount: v, error: b });
520
+ onError: m,
521
+ onFail: (f, w) => {
522
+ x(this, z, te).call(this, { type: "failed", failureCount: f, error: w });
523
523
  },
524
524
  onPause: () => {
525
- x(this, X, re).call(this, { type: "pause" });
525
+ x(this, z, te).call(this, { type: "pause" });
526
526
  },
527
527
  onContinue: () => {
528
- x(this, X, re).call(this, { type: "continue" });
528
+ x(this, z, te).call(this, { type: "continue" });
529
529
  },
530
530
  retry: c.options.retry,
531
531
  retryDelay: c.options.retryDelay,
532
532
  networkMode: c.options.networkMode
533
- })), h(this, le, n(this, V).promise), n(this, le);
533
+ })), h(this, oe, n(this, q).promise), n(this, oe);
534
534
  }
535
- }, Pe = new WeakMap(), Ne = new WeakMap(), q = new WeakMap(), le = new WeakMap(), V = new WeakMap(), R = new WeakMap(), ze = new WeakMap(), ge = new WeakMap(), Me = new WeakSet(), ut = function(t) {
536
- this.options = { ...n(this, ze), ...t }, this.updateGcTime(this.options.gcTime);
537
- }, X = new WeakSet(), re = function(t) {
535
+ }, Pe = new WeakMap(), Ne = new WeakMap(), V = new WeakMap(), oe = new WeakMap(), q = new WeakMap(), D = new WeakMap(), qe = new WeakMap(), ve = new WeakMap(), ke = new WeakSet(), ot = function(t) {
536
+ this.options = { ...n(this, qe), ...t }, this.updateGcTime(this.options.gcTime);
537
+ }, z = new WeakSet(), te = function(t) {
538
538
  const s = (r) => {
539
539
  switch (t.type) {
540
540
  case "failed":
@@ -559,7 +559,7 @@ var F = rr(), ve, as, xs = (as = class {
559
559
  fetchFailureCount: 0,
560
560
  fetchFailureReason: null,
561
561
  fetchMeta: t.meta ?? null,
562
- fetchStatus: xt(this.options.networkMode) ? "fetching" : "paused",
562
+ fetchStatus: vt(this.options.networkMode) ? "fetching" : "paused",
563
563
  ...!r.dataUpdatedAt && {
564
564
  error: null,
565
565
  status: "pending"
@@ -582,7 +582,7 @@ var F = rr(), ve, as, xs = (as = class {
582
582
  };
583
583
  case "error":
584
584
  const a = t.error;
585
- return wt(a) && a.revert && n(this, Ne) ? { ...n(this, Ne), fetchStatus: "idle" } : {
585
+ return Ct(a) && a.revert && n(this, Ne) ? { ...n(this, Ne), fetchStatus: "idle" } : {
586
586
  ...r,
587
587
  error: a,
588
588
  errorUpdateCount: r.errorUpdateCount + 1,
@@ -604,13 +604,13 @@ var F = rr(), ve, as, xs = (as = class {
604
604
  };
605
605
  }
606
606
  };
607
- this.state = s(this.state), F.batch(() => {
608
- n(this, R).forEach((r) => {
607
+ this.state = s(this.state), R.batch(() => {
608
+ n(this, D).forEach((r) => {
609
609
  r.onQueryUpdate();
610
- }), n(this, q).notify({ query: this, type: "updated", action: t });
610
+ }), n(this, V).notify({ query: this, type: "updated", action: t });
611
611
  });
612
- }, os);
613
- function nr(e) {
612
+ }, ss);
613
+ function er(e) {
614
614
  const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = typeof t < "u", r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
615
615
  return {
616
616
  data: t,
@@ -627,16 +627,16 @@ function nr(e) {
627
627
  fetchStatus: "idle"
628
628
  };
629
629
  }
630
- var I, ls, ar = (ls = class extends Ge {
630
+ var J, rs, tr = (rs = class extends Ke {
631
631
  constructor(t = {}) {
632
632
  super();
633
- p(this, I, void 0);
634
- this.config = t, h(this, I, /* @__PURE__ */ new Map());
633
+ p(this, J, void 0);
634
+ this.config = t, h(this, J, /* @__PURE__ */ new Map());
635
635
  }
636
636
  build(t, s, r) {
637
- const a = s.queryKey, o = s.queryHash ?? Qt(a, s);
637
+ const a = s.queryKey, o = s.queryHash ?? Ft(a, s);
638
638
  let l = this.get(o);
639
- return l || (l = new ir({
639
+ return l || (l = new Bs({
640
640
  cache: this,
641
641
  queryKey: a,
642
642
  queryHash: o,
@@ -646,91 +646,91 @@ var I, ls, ar = (ls = class extends Ge {
646
646
  }), this.add(l)), l;
647
647
  }
648
648
  add(t) {
649
- n(this, I).has(t.queryHash) || (n(this, I).set(t.queryHash, t), this.notify({
649
+ n(this, J).has(t.queryHash) || (n(this, J).set(t.queryHash, t), this.notify({
650
650
  type: "added",
651
651
  query: t
652
652
  }));
653
653
  }
654
654
  remove(t) {
655
- const s = n(this, I).get(t.queryHash);
656
- s && (t.destroy(), s === t && n(this, I).delete(t.queryHash), this.notify({ type: "removed", query: t }));
655
+ const s = n(this, J).get(t.queryHash);
656
+ s && (t.destroy(), s === t && n(this, J).delete(t.queryHash), this.notify({ type: "removed", query: t }));
657
657
  }
658
658
  clear() {
659
- F.batch(() => {
659
+ R.batch(() => {
660
660
  this.getAll().forEach((t) => {
661
661
  this.remove(t);
662
662
  });
663
663
  });
664
664
  }
665
665
  get(t) {
666
- return n(this, I).get(t);
666
+ return n(this, J).get(t);
667
667
  }
668
668
  getAll() {
669
- return [...n(this, I).values()];
669
+ return [...n(this, J).values()];
670
670
  }
671
671
  find(t) {
672
672
  const s = { exact: !0, ...t };
673
673
  return this.getAll().find(
674
- (r) => Vt(s, r)
674
+ (r) => $t(s, r)
675
675
  );
676
676
  }
677
677
  findAll(t = {}) {
678
678
  const s = this.getAll();
679
- return Object.keys(t).length > 0 ? s.filter((r) => Vt(t, r)) : s;
679
+ return Object.keys(t).length > 0 ? s.filter((r) => $t(t, r)) : s;
680
680
  }
681
681
  notify(t) {
682
- F.batch(() => {
682
+ R.batch(() => {
683
683
  this.listeners.forEach((s) => {
684
684
  s(t);
685
685
  });
686
686
  });
687
687
  }
688
688
  onFocus() {
689
- F.batch(() => {
689
+ R.batch(() => {
690
690
  this.getAll().forEach((t) => {
691
691
  t.onFocus();
692
692
  });
693
693
  });
694
694
  }
695
695
  onOnline() {
696
- F.batch(() => {
696
+ R.batch(() => {
697
697
  this.getAll().forEach((t) => {
698
698
  t.onOnline();
699
699
  });
700
700
  });
701
701
  }
702
- }, I = new WeakMap(), ls), B, Ye, G, Oe, ee, ne, cs, or = (cs = class extends xs {
702
+ }, J = new WeakMap(), rs), X, We, K, Oe, I, ie, is, sr = (is = class extends ps {
703
703
  constructor(t) {
704
704
  super();
705
- p(this, ee);
706
- p(this, B, void 0);
707
- p(this, Ye, void 0);
708
- p(this, G, void 0);
705
+ p(this, I);
706
+ p(this, X, void 0);
707
+ p(this, We, void 0);
708
+ p(this, K, void 0);
709
709
  p(this, Oe, void 0);
710
- this.mutationId = t.mutationId, h(this, Ye, t.defaultOptions), h(this, G, t.mutationCache), h(this, B, []), this.state = t.state || bs(), this.setOptions(t.options), this.scheduleGc();
710
+ this.mutationId = t.mutationId, h(this, We, t.defaultOptions), h(this, K, t.mutationCache), h(this, X, []), this.state = t.state || ms(), this.setOptions(t.options), this.scheduleGc();
711
711
  }
712
712
  setOptions(t) {
713
- this.options = { ...n(this, Ye), ...t }, this.updateGcTime(this.options.gcTime);
713
+ this.options = { ...n(this, We), ...t }, this.updateGcTime(this.options.gcTime);
714
714
  }
715
715
  get meta() {
716
716
  return this.options.meta;
717
717
  }
718
718
  addObserver(t) {
719
- n(this, B).includes(t) || (n(this, B).push(t), this.clearGcTimeout(), n(this, G).notify({
719
+ n(this, X).includes(t) || (n(this, X).push(t), this.clearGcTimeout(), n(this, K).notify({
720
720
  type: "observerAdded",
721
721
  mutation: this,
722
722
  observer: t
723
723
  }));
724
724
  }
725
725
  removeObserver(t) {
726
- h(this, B, n(this, B).filter((s) => s !== t)), this.scheduleGc(), n(this, G).notify({
726
+ h(this, X, n(this, X).filter((s) => s !== t)), this.scheduleGc(), n(this, K).notify({
727
727
  type: "observerRemoved",
728
728
  mutation: this,
729
729
  observer: t
730
730
  });
731
731
  }
732
732
  optionalRemove() {
733
- n(this, B).length || (this.state.status === "pending" ? this.scheduleGc() : n(this, G).remove(this));
733
+ n(this, X).length || (this.state.status === "pending" ? this.scheduleGc() : n(this, K).remove(this));
734
734
  }
735
735
  continue() {
736
736
  var t;
@@ -738,17 +738,17 @@ var I, ls, ar = (ls = class extends Ge {
738
738
  this.execute(this.state.variables);
739
739
  }
740
740
  async execute(t) {
741
- var a, o, l, c, f, g, u, C, w, v, b, _, m, y, S, E, k, U, K, D;
742
- const s = () => (h(this, Oe, Cs({
741
+ var a, o, l, c, m, C, u, b, v, f, w, E, y, g, S, _, k, L, $, T;
742
+ const s = () => (h(this, Oe, fs({
743
743
  fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
744
- onFail: (M, se) => {
745
- x(this, ee, ne).call(this, { type: "failed", failureCount: M, error: se });
744
+ onFail: (O, ee) => {
745
+ x(this, I, ie).call(this, { type: "failed", failureCount: O, error: ee });
746
746
  },
747
747
  onPause: () => {
748
- x(this, ee, ne).call(this, { type: "pause" });
748
+ x(this, I, ie).call(this, { type: "pause" });
749
749
  },
750
750
  onContinue: () => {
751
- x(this, ee, ne).call(this, { type: "continue" });
751
+ x(this, I, ie).call(this, { type: "continue" });
752
752
  },
753
753
  retry: this.options.retry ?? 0,
754
754
  retryDelay: this.options.retryDelay,
@@ -756,66 +756,66 @@ var I, ls, ar = (ls = class extends Ge {
756
756
  })), n(this, Oe).promise), r = this.state.status === "pending";
757
757
  try {
758
758
  if (!r) {
759
- x(this, ee, ne).call(this, { type: "pending", variables: t }), await ((o = (a = n(this, G).config).onMutate) == null ? void 0 : o.call(
759
+ x(this, I, ie).call(this, { type: "pending", variables: t }), await ((o = (a = n(this, K).config).onMutate) == null ? void 0 : o.call(
760
760
  a,
761
761
  t,
762
762
  this
763
763
  ));
764
- const se = await ((c = (l = this.options).onMutate) == null ? void 0 : c.call(l, t));
765
- se !== this.state.context && x(this, ee, ne).call(this, {
764
+ const ee = await ((c = (l = this.options).onMutate) == null ? void 0 : c.call(l, t));
765
+ ee !== this.state.context && x(this, I, ie).call(this, {
766
766
  type: "pending",
767
- context: se,
767
+ context: ee,
768
768
  variables: t
769
769
  });
770
770
  }
771
- const M = await s();
772
- return await ((g = (f = n(this, G).config).onSuccess) == null ? void 0 : g.call(
773
- f,
774
- M,
771
+ const O = await s();
772
+ return await ((C = (m = n(this, K).config).onSuccess) == null ? void 0 : C.call(
773
+ m,
774
+ O,
775
775
  t,
776
776
  this.state.context,
777
777
  this
778
- )), await ((C = (u = this.options).onSuccess) == null ? void 0 : C.call(u, M, t, this.state.context)), await ((v = (w = n(this, G).config).onSettled) == null ? void 0 : v.call(
779
- w,
780
- M,
778
+ )), await ((b = (u = this.options).onSuccess) == null ? void 0 : b.call(u, O, t, this.state.context)), await ((f = (v = n(this, K).config).onSettled) == null ? void 0 : f.call(
779
+ v,
780
+ O,
781
781
  null,
782
782
  this.state.variables,
783
783
  this.state.context,
784
784
  this
785
- )), await ((_ = (b = this.options).onSettled) == null ? void 0 : _.call(b, M, null, t, this.state.context)), x(this, ee, ne).call(this, { type: "success", data: M }), M;
786
- } catch (M) {
785
+ )), await ((E = (w = this.options).onSettled) == null ? void 0 : E.call(w, O, null, t, this.state.context)), x(this, I, ie).call(this, { type: "success", data: O }), O;
786
+ } catch (O) {
787
787
  try {
788
- throw await ((y = (m = n(this, G).config).onError) == null ? void 0 : y.call(
789
- m,
790
- M,
788
+ throw await ((g = (y = n(this, K).config).onError) == null ? void 0 : g.call(
789
+ y,
790
+ O,
791
791
  t,
792
792
  this.state.context,
793
793
  this
794
- )), await ((E = (S = this.options).onError) == null ? void 0 : E.call(
794
+ )), await ((_ = (S = this.options).onError) == null ? void 0 : _.call(
795
795
  S,
796
- M,
796
+ O,
797
797
  t,
798
798
  this.state.context
799
- )), await ((U = (k = n(this, G).config).onSettled) == null ? void 0 : U.call(
799
+ )), await ((L = (k = n(this, K).config).onSettled) == null ? void 0 : L.call(
800
800
  k,
801
801
  void 0,
802
- M,
802
+ O,
803
803
  this.state.variables,
804
804
  this.state.context,
805
805
  this
806
- )), await ((D = (K = this.options).onSettled) == null ? void 0 : D.call(
807
- K,
806
+ )), await ((T = ($ = this.options).onSettled) == null ? void 0 : T.call(
807
+ $,
808
808
  void 0,
809
- M,
809
+ O,
810
810
  t,
811
811
  this.state.context
812
- )), M;
812
+ )), O;
813
813
  } finally {
814
- x(this, ee, ne).call(this, { type: "error", error: M });
814
+ x(this, I, ie).call(this, { type: "error", error: O });
815
815
  }
816
816
  }
817
817
  }
818
- }, B = new WeakMap(), Ye = new WeakMap(), G = new WeakMap(), Oe = new WeakMap(), ee = new WeakSet(), ne = function(t) {
818
+ }, X = new WeakMap(), We = new WeakMap(), K = new WeakMap(), Oe = new WeakMap(), I = new WeakSet(), ie = function(t) {
819
819
  const s = (r) => {
820
820
  switch (t.type) {
821
821
  case "failed":
@@ -842,7 +842,7 @@ var I, ls, ar = (ls = class extends Ge {
842
842
  failureCount: 0,
843
843
  failureReason: null,
844
844
  error: null,
845
- isPaused: !xt(this.options.networkMode),
845
+ isPaused: !vt(this.options.networkMode),
846
846
  status: "pending",
847
847
  variables: t.variables,
848
848
  submittedAt: Date.now()
@@ -869,17 +869,17 @@ var I, ls, ar = (ls = class extends Ge {
869
869
  };
870
870
  }
871
871
  };
872
- this.state = s(this.state), F.batch(() => {
873
- n(this, B).forEach((r) => {
872
+ this.state = s(this.state), R.batch(() => {
873
+ n(this, X).forEach((r) => {
874
874
  r.onMutationUpdate(t);
875
- }), n(this, G).notify({
875
+ }), n(this, K).notify({
876
876
  mutation: this,
877
877
  type: "updated",
878
878
  action: t
879
879
  });
880
880
  });
881
- }, cs);
882
- function bs() {
881
+ }, is);
882
+ function ms() {
883
883
  return {
884
884
  context: void 0,
885
885
  data: void 0,
@@ -892,18 +892,18 @@ function bs() {
892
892
  submittedAt: 0
893
893
  };
894
894
  }
895
- var W, Je, ye, us, lr = (us = class extends Ge {
895
+ var W, Ze, ye, ns, rr = (ns = class extends Ke {
896
896
  constructor(t = {}) {
897
897
  super();
898
898
  p(this, W, void 0);
899
- p(this, Je, void 0);
899
+ p(this, Ze, void 0);
900
900
  p(this, ye, void 0);
901
- this.config = t, h(this, W, []), h(this, Je, 0);
901
+ this.config = t, h(this, W, []), h(this, Ze, 0);
902
902
  }
903
903
  build(t, s, r) {
904
- const a = new or({
904
+ const a = new sr({
905
905
  mutationCache: this,
906
- mutationId: ++lt(this, Je)._,
906
+ mutationId: ++at(this, Ze)._,
907
907
  options: t.defaultMutationOptions(s),
908
908
  state: r
909
909
  });
@@ -916,7 +916,7 @@ var W, Je, ye, us, lr = (us = class extends Ge {
916
916
  h(this, W, n(this, W).filter((s) => s !== t)), this.notify({ type: "removed", mutation: t });
917
917
  }
918
918
  clear() {
919
- F.batch(() => {
919
+ R.batch(() => {
920
920
  n(this, W).forEach((t) => {
921
921
  this.remove(t);
922
922
  });
@@ -928,16 +928,16 @@ var W, Je, ye, us, lr = (us = class extends Ge {
928
928
  find(t) {
929
929
  const s = { exact: !0, ...t };
930
930
  return n(this, W).find(
931
- (r) => Wt(s, r)
931
+ (r) => Kt(s, r)
932
932
  );
933
933
  }
934
934
  findAll(t = {}) {
935
935
  return n(this, W).filter(
936
- (s) => Wt(t, s)
936
+ (s) => Kt(t, s)
937
937
  );
938
938
  }
939
939
  notify(t) {
940
- F.batch(() => {
940
+ R.batch(() => {
941
941
  this.listeners.forEach((s) => {
942
942
  s(t);
943
943
  });
@@ -946,9 +946,9 @@ var W, Je, ye, us, lr = (us = class extends Ge {
946
946
  resumePausedMutations() {
947
947
  return h(this, ye, (n(this, ye) ?? Promise.resolve()).then(() => {
948
948
  const t = n(this, W).filter((s) => s.state.isPaused);
949
- return F.batch(
949
+ return R.batch(
950
950
  () => t.reduce(
951
- (s, r) => s.then(() => r.continue().catch(z)),
951
+ (s, r) => s.then(() => r.continue().catch(Z)),
952
952
  Promise.resolve()
953
953
  )
954
954
  );
@@ -956,62 +956,62 @@ var W, Je, ye, us, lr = (us = class extends Ge {
956
956
  h(this, ye, void 0);
957
957
  })), n(this, ye);
958
958
  }
959
- }, W = new WeakMap(), Je = new WeakMap(), ye = new WeakMap(), us);
960
- function cr(e) {
959
+ }, W = new WeakMap(), Ze = new WeakMap(), ye = new WeakMap(), ns);
960
+ function ir(e) {
961
961
  return {
962
962
  onFetch: (t, s) => {
963
963
  const r = async () => {
964
- var b, _, m, y, S;
965
- const a = t.options, o = (m = (_ = (b = t.fetchOptions) == null ? void 0 : b.meta) == null ? void 0 : _.fetchMore) == null ? void 0 : m.direction, l = ((y = t.state.data) == null ? void 0 : y.pages) || [], c = ((S = t.state.data) == null ? void 0 : S.pageParams) || [], f = { pages: [], pageParams: [] };
966
- let g = !1;
967
- const u = (E) => {
968
- Object.defineProperty(E, "signal", {
964
+ var w, E, y, g, S;
965
+ const a = t.options, o = (y = (E = (w = t.fetchOptions) == null ? void 0 : w.meta) == null ? void 0 : E.fetchMore) == null ? void 0 : y.direction, l = ((g = t.state.data) == null ? void 0 : g.pages) || [], c = ((S = t.state.data) == null ? void 0 : S.pageParams) || [], m = { pages: [], pageParams: [] };
966
+ let C = !1;
967
+ const u = (_) => {
968
+ Object.defineProperty(_, "signal", {
969
969
  enumerable: !0,
970
- get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
971
- g = !0;
970
+ get: () => (t.signal.aborted ? C = !0 : t.signal.addEventListener("abort", () => {
971
+ C = !0;
972
972
  }), t.signal)
973
973
  });
974
- }, C = t.options.queryFn || (() => Promise.reject(
974
+ }, b = t.options.queryFn || (() => Promise.reject(
975
975
  new Error(`Missing queryFn: '${t.options.queryHash}'`)
976
- )), w = async (E, k, U) => {
977
- if (g)
976
+ )), v = async (_, k, L) => {
977
+ if (C)
978
978
  return Promise.reject();
979
- if (k == null && E.pages.length)
980
- return Promise.resolve(E);
981
- const K = {
979
+ if (k == null && _.pages.length)
980
+ return Promise.resolve(_);
981
+ const $ = {
982
982
  queryKey: t.queryKey,
983
983
  pageParam: k,
984
- direction: U ? "backward" : "forward",
984
+ direction: L ? "backward" : "forward",
985
985
  meta: t.options.meta
986
986
  };
987
- u(K);
988
- const D = await C(
989
- K
990
- ), { maxPages: M } = t.options, se = U ? Bs : Is;
987
+ u($);
988
+ const T = await b(
989
+ $
990
+ ), { maxPages: O } = t.options, ee = L ? Ys : Zs;
991
991
  return {
992
- pages: se(E.pages, D, M),
993
- pageParams: se(E.pageParams, k, M)
992
+ pages: ee(_.pages, T, O),
993
+ pageParams: ee(_.pageParams, k, O)
994
994
  };
995
995
  };
996
- let v;
996
+ let f;
997
997
  if (o && l.length) {
998
- const E = o === "backward", k = E ? ur : Jt, U = {
998
+ const _ = o === "backward", k = _ ? nr : qt, L = {
999
999
  pages: l,
1000
1000
  pageParams: c
1001
- }, K = k(a, U);
1002
- v = await w(U, K, E);
1001
+ }, $ = k(a, L);
1002
+ f = await v(L, $, _);
1003
1003
  } else {
1004
- v = await w(
1005
- f,
1004
+ f = await v(
1005
+ m,
1006
1006
  c[0] ?? a.initialPageParam
1007
1007
  );
1008
- const E = e ?? l.length;
1009
- for (let k = 1; k < E; k++) {
1010
- const U = Jt(a, v);
1011
- v = await w(v, U);
1008
+ const _ = e ?? l.length;
1009
+ for (let k = 1; k < _; k++) {
1010
+ const L = qt(a, f);
1011
+ f = await v(f, L);
1012
1012
  }
1013
1013
  }
1014
- return v;
1014
+ return f;
1015
1015
  };
1016
1016
  t.options.persister ? t.fetchFn = () => {
1017
1017
  var a, o;
@@ -1029,7 +1029,7 @@ function cr(e) {
1029
1029
  }
1030
1030
  };
1031
1031
  }
1032
- function Jt(e, { pages: t, pageParams: s }) {
1032
+ function qt(e, { pages: t, pageParams: s }) {
1033
1033
  const r = t.length - 1;
1034
1034
  return e.getNextPageParam(
1035
1035
  t[r],
@@ -1038,7 +1038,7 @@ function Jt(e, { pages: t, pageParams: s }) {
1038
1038
  s
1039
1039
  );
1040
1040
  }
1041
- function ur(e, { pages: t, pageParams: s }) {
1041
+ function nr(e, { pages: t, pageParams: s }) {
1042
1042
  var r;
1043
1043
  return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
1044
1044
  e,
@@ -1048,38 +1048,38 @@ function ur(e, { pages: t, pageParams: s }) {
1048
1048
  s
1049
1049
  );
1050
1050
  }
1051
- var L, ce, ue, Le, Fe, de, Re, De, ds, ws = (ds = class {
1051
+ var F, le, ce, Me, Le, ue, Fe, Re, as, vs = (as = class {
1052
1052
  constructor(e = {}) {
1053
- p(this, L, void 0);
1053
+ p(this, F, void 0);
1054
+ p(this, le, void 0);
1054
1055
  p(this, ce, void 0);
1055
- p(this, ue, void 0);
1056
+ p(this, Me, void 0);
1056
1057
  p(this, Le, void 0);
1058
+ p(this, ue, void 0);
1057
1059
  p(this, Fe, void 0);
1058
- p(this, de, void 0);
1059
1060
  p(this, Re, void 0);
1060
- p(this, De, void 0);
1061
- h(this, L, e.queryCache || new ar()), h(this, ce, e.mutationCache || new lr()), h(this, ue, e.defaultOptions || {}), h(this, Le, /* @__PURE__ */ new Map()), h(this, Fe, /* @__PURE__ */ new Map()), h(this, de, 0);
1061
+ h(this, F, e.queryCache || new tr()), h(this, le, e.mutationCache || new rr()), h(this, ce, e.defaultOptions || {}), h(this, Me, /* @__PURE__ */ new Map()), h(this, Le, /* @__PURE__ */ new Map()), h(this, ue, 0);
1062
1062
  }
1063
1063
  mount() {
1064
- lt(this, de)._++, n(this, de) === 1 && (h(this, Re, ft.subscribe(() => {
1065
- ft.isFocused() && (this.resumePausedMutations(), n(this, L).onFocus());
1066
- })), h(this, De, pt.subscribe(() => {
1067
- pt.isOnline() && (this.resumePausedMutations(), n(this, L).onOnline());
1064
+ at(this, ue)._++, n(this, ue) === 1 && (h(this, Fe, ut.subscribe(() => {
1065
+ ut.isFocused() && (this.resumePausedMutations(), n(this, F).onFocus());
1066
+ })), h(this, Re, dt.subscribe(() => {
1067
+ dt.isOnline() && (this.resumePausedMutations(), n(this, F).onOnline());
1068
1068
  })));
1069
1069
  }
1070
1070
  unmount() {
1071
1071
  var e, t;
1072
- lt(this, de)._--, n(this, de) === 0 && ((e = n(this, Re)) == null || e.call(this), h(this, Re, void 0), (t = n(this, De)) == null || t.call(this), h(this, De, void 0));
1072
+ at(this, ue)._--, n(this, ue) === 0 && ((e = n(this, Fe)) == null || e.call(this), h(this, Fe, void 0), (t = n(this, Re)) == null || t.call(this), h(this, Re, void 0));
1073
1073
  }
1074
1074
  isFetching(e) {
1075
- return n(this, L).findAll({ ...e, fetchStatus: "fetching" }).length;
1075
+ return n(this, F).findAll({ ...e, fetchStatus: "fetching" }).length;
1076
1076
  }
1077
1077
  isMutating(e) {
1078
- return n(this, ce).findAll({ ...e, status: "pending" }).length;
1078
+ return n(this, le).findAll({ ...e, status: "pending" }).length;
1079
1079
  }
1080
1080
  getQueryData(e) {
1081
1081
  var t;
1082
- return (t = n(this, L).find({ queryKey: e })) == null ? void 0 : t.state.data;
1082
+ return (t = n(this, F).find({ queryKey: e })) == null ? void 0 : t.state.data;
1083
1083
  }
1084
1084
  ensureQueryData(e) {
1085
1085
  const t = this.getQueryData(e.queryKey);
@@ -1092,14 +1092,14 @@ var L, ce, ue, Le, Fe, de, Re, De, ds, ws = (ds = class {
1092
1092
  });
1093
1093
  }
1094
1094
  setQueryData(e, t, s) {
1095
- const r = n(this, L).find({ queryKey: e }), a = r == null ? void 0 : r.state.data, o = Xs(t, a);
1095
+ const r = n(this, F).find({ queryKey: e }), a = r == null ? void 0 : r.state.data, o = qs(t, a);
1096
1096
  if (typeof o > "u")
1097
1097
  return;
1098
1098
  const l = this.defaultQueryOptions({ queryKey: e });
1099
- return n(this, L).build(this, l).setData(o, { ...s, manual: !0 });
1099
+ return n(this, F).build(this, l).setData(o, { ...s, manual: !0 });
1100
1100
  }
1101
1101
  setQueriesData(e, t, s) {
1102
- return F.batch(
1102
+ return R.batch(
1103
1103
  () => this.getQueryCache().findAll(e).map(({ queryKey: r }) => [
1104
1104
  r,
1105
1105
  this.setQueryData(r, t, s)
@@ -1108,34 +1108,34 @@ var L, ce, ue, Le, Fe, de, Re, De, ds, ws = (ds = class {
1108
1108
  }
1109
1109
  getQueryState(e) {
1110
1110
  var t;
1111
- return (t = n(this, L).find({ queryKey: e })) == null ? void 0 : t.state;
1111
+ return (t = n(this, F).find({ queryKey: e })) == null ? void 0 : t.state;
1112
1112
  }
1113
1113
  removeQueries(e) {
1114
- const t = n(this, L);
1115
- F.batch(() => {
1114
+ const t = n(this, F);
1115
+ R.batch(() => {
1116
1116
  t.findAll(e).forEach((s) => {
1117
1117
  t.remove(s);
1118
1118
  });
1119
1119
  });
1120
1120
  }
1121
1121
  resetQueries(e, t) {
1122
- const s = n(this, L), r = {
1122
+ const s = n(this, F), r = {
1123
1123
  type: "active",
1124
1124
  ...e
1125
1125
  };
1126
- return F.batch(() => (s.findAll(e).forEach((a) => {
1126
+ return R.batch(() => (s.findAll(e).forEach((a) => {
1127
1127
  a.reset();
1128
1128
  }), this.refetchQueries(r, t)));
1129
1129
  }
1130
1130
  cancelQueries(e = {}, t = {}) {
1131
- const s = { revert: !0, ...t }, r = F.batch(
1132
- () => n(this, L).findAll(e).map((a) => a.cancel(s))
1131
+ const s = { revert: !0, ...t }, r = R.batch(
1132
+ () => n(this, F).findAll(e).map((a) => a.cancel(s))
1133
1133
  );
1134
- return Promise.all(r).then(z).catch(z);
1134
+ return Promise.all(r).then(Z).catch(Z);
1135
1135
  }
1136
1136
  invalidateQueries(e = {}, t = {}) {
1137
- return F.batch(() => {
1138
- if (n(this, L).findAll(e).forEach((r) => {
1137
+ return R.batch(() => {
1138
+ if (n(this, F).findAll(e).forEach((r) => {
1139
1139
  r.invalidate();
1140
1140
  }), e.refetchType === "none")
1141
1141
  return Promise.resolve();
@@ -1150,176 +1150,176 @@ var L, ce, ue, Le, Fe, de, Re, De, ds, ws = (ds = class {
1150
1150
  const s = {
1151
1151
  ...t,
1152
1152
  cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
1153
- }, r = F.batch(
1154
- () => n(this, L).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
1153
+ }, r = R.batch(
1154
+ () => n(this, F).findAll(e).filter((a) => !a.isDisabled()).map((a) => {
1155
1155
  let o = a.fetch(void 0, s);
1156
- return s.throwOnError || (o = o.catch(z)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
1156
+ return s.throwOnError || (o = o.catch(Z)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
1157
1157
  })
1158
1158
  );
1159
- return Promise.all(r).then(z);
1159
+ return Promise.all(r).then(Z);
1160
1160
  }
1161
1161
  fetchQuery(e) {
1162
1162
  const t = this.defaultQueryOptions(e);
1163
1163
  typeof t.retry > "u" && (t.retry = !1);
1164
- const s = n(this, L).build(this, t);
1164
+ const s = n(this, F).build(this, t);
1165
1165
  return s.isStaleByTime(t.staleTime) ? s.fetch(t) : Promise.resolve(s.state.data);
1166
1166
  }
1167
1167
  prefetchQuery(e) {
1168
- return this.fetchQuery(e).then(z).catch(z);
1168
+ return this.fetchQuery(e).then(Z).catch(Z);
1169
1169
  }
1170
1170
  fetchInfiniteQuery(e) {
1171
- return e.behavior = cr(e.pages), this.fetchQuery(e);
1171
+ return e.behavior = ir(e.pages), this.fetchQuery(e);
1172
1172
  }
1173
1173
  prefetchInfiniteQuery(e) {
1174
- return this.fetchInfiniteQuery(e).then(z).catch(z);
1174
+ return this.fetchInfiniteQuery(e).then(Z).catch(Z);
1175
1175
  }
1176
1176
  resumePausedMutations() {
1177
- return n(this, ce).resumePausedMutations();
1177
+ return n(this, le).resumePausedMutations();
1178
1178
  }
1179
1179
  getQueryCache() {
1180
- return n(this, L);
1180
+ return n(this, F);
1181
1181
  }
1182
1182
  getMutationCache() {
1183
- return n(this, ce);
1183
+ return n(this, le);
1184
1184
  }
1185
1185
  getDefaultOptions() {
1186
- return n(this, ue);
1186
+ return n(this, ce);
1187
1187
  }
1188
1188
  setDefaultOptions(e) {
1189
- h(this, ue, e);
1189
+ h(this, ce, e);
1190
1190
  }
1191
1191
  setQueryDefaults(e, t) {
1192
- n(this, Le).set(We(e), {
1192
+ n(this, Me).set(we(e), {
1193
1193
  queryKey: e,
1194
1194
  defaultOptions: t
1195
1195
  });
1196
1196
  }
1197
1197
  getQueryDefaults(e) {
1198
- const t = [...n(this, Le).values()];
1198
+ const t = [...n(this, Me).values()];
1199
1199
  let s = {};
1200
1200
  return t.forEach((r) => {
1201
- Ze(e, r.queryKey) && (s = { ...s, ...r.defaultOptions });
1201
+ Ve(e, r.queryKey) && (s = { ...s, ...r.defaultOptions });
1202
1202
  }), s;
1203
1203
  }
1204
1204
  setMutationDefaults(e, t) {
1205
- n(this, Fe).set(We(e), {
1205
+ n(this, Le).set(we(e), {
1206
1206
  mutationKey: e,
1207
1207
  defaultOptions: t
1208
1208
  });
1209
1209
  }
1210
1210
  getMutationDefaults(e) {
1211
- const t = [...n(this, Fe).values()];
1211
+ const t = [...n(this, Le).values()];
1212
1212
  let s = {};
1213
1213
  return t.forEach((r) => {
1214
- Ze(e, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
1214
+ Ve(e, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
1215
1215
  }), s;
1216
1216
  }
1217
1217
  defaultQueryOptions(e) {
1218
1218
  if (e != null && e._defaulted)
1219
1219
  return e;
1220
1220
  const t = {
1221
- ...n(this, ue).queries,
1221
+ ...n(this, ce).queries,
1222
1222
  ...(e == null ? void 0 : e.queryKey) && this.getQueryDefaults(e.queryKey),
1223
1223
  ...e,
1224
1224
  _defaulted: !0
1225
1225
  };
1226
- return t.queryHash || (t.queryHash = Qt(
1226
+ return t.queryHash || (t.queryHash = Ft(
1227
1227
  t.queryKey,
1228
1228
  t
1229
1229
  )), typeof t.refetchOnReconnect > "u" && (t.refetchOnReconnect = t.networkMode !== "always"), typeof t.throwOnError > "u" && (t.throwOnError = !!t.suspense), typeof t.networkMode > "u" && t.persister && (t.networkMode = "offlineFirst"), t;
1230
1230
  }
1231
1231
  defaultMutationOptions(e) {
1232
1232
  return e != null && e._defaulted ? e : {
1233
- ...n(this, ue).mutations,
1233
+ ...n(this, ce).mutations,
1234
1234
  ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
1235
1235
  ...e,
1236
1236
  _defaulted: !0
1237
1237
  };
1238
1238
  }
1239
1239
  clear() {
1240
- n(this, L).clear(), n(this, ce).clear();
1240
+ n(this, F).clear(), n(this, le).clear();
1241
1241
  }
1242
- }, L = new WeakMap(), ce = new WeakMap(), ue = new WeakMap(), Le = new WeakMap(), Fe = new WeakMap(), de = new WeakMap(), Re = new WeakMap(), De = new WeakMap(), ds), H, P, Te, T, Ce, Ue, te, Xe, Qe, He, xe, be, he, we, je, Ve, Ie, At, Be, St, et, kt, tt, Pt, st, Nt, rt, Mt, it, Ot, Ct, js, hs, dr = (hs = class extends Ge {
1242
+ }, F = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), Me = new WeakMap(), Le = new WeakMap(), ue = new WeakMap(), Fe = new WeakMap(), Re = new WeakMap(), as), Q, N, Ye, U, ge, De, B, ze, Te, Ue, Ce, xe, de, Qe, be, Ge, Je, jt, Xe, _t, Ie, Et, Be, St, et, At, tt, Pt, st, Nt, mt, ys, os, ar = (os = class extends Ke {
1243
1243
  constructor(t, s) {
1244
1244
  super();
1245
- p(this, je);
1245
+ p(this, be);
1246
+ p(this, Je);
1247
+ p(this, Xe);
1246
1248
  p(this, Ie);
1247
1249
  p(this, Be);
1248
1250
  p(this, et);
1249
1251
  p(this, tt);
1250
1252
  p(this, st);
1251
- p(this, rt);
1252
- p(this, it);
1253
- p(this, Ct);
1254
- p(this, H, void 0);
1255
- p(this, P, void 0);
1253
+ p(this, mt);
1254
+ p(this, Q, void 0);
1255
+ p(this, N, void 0);
1256
+ p(this, Ye, void 0);
1257
+ p(this, U, void 0);
1258
+ p(this, ge, void 0);
1259
+ p(this, De, void 0);
1260
+ p(this, B, void 0);
1261
+ p(this, ze, void 0);
1256
1262
  p(this, Te, void 0);
1257
- p(this, T, void 0);
1258
- p(this, Ce, void 0);
1259
- p(this, Ue, void 0);
1260
- p(this, te, void 0);
1261
- p(this, Xe, void 0);
1262
- p(this, Qe, void 0);
1263
1263
  // This property keeps track of the last query with defined data.
1264
1264
  // It will be used to pass the previous data and query to the placeholder function between renders.
1265
- p(this, He, void 0);
1265
+ p(this, Ue, void 0);
1266
+ p(this, Ce, void 0);
1266
1267
  p(this, xe, void 0);
1267
- p(this, be, void 0);
1268
- p(this, he, void 0);
1269
- p(this, we, void 0);
1270
- h(this, P, void 0), h(this, Te, void 0), h(this, T, void 0), h(this, we, /* @__PURE__ */ new Set()), h(this, H, t), this.options = s, h(this, te, null), this.bindMethods(), this.setOptions(s);
1268
+ p(this, de, void 0);
1269
+ p(this, Qe, /* @__PURE__ */ new Set());
1270
+ this.options = s, h(this, Q, t), h(this, B, null), this.bindMethods(), this.setOptions(s);
1271
1271
  }
1272
1272
  bindMethods() {
1273
1273
  this.refetch = this.refetch.bind(this);
1274
1274
  }
1275
1275
  onSubscribe() {
1276
- this.listeners.size === 1 && (n(this, P).addObserver(this), Xt(n(this, P), this.options) ? x(this, je, Ve).call(this) : this.updateResult(), x(this, tt, Pt).call(this));
1276
+ this.listeners.size === 1 && (n(this, N).addObserver(this), Wt(n(this, N), this.options) ? x(this, be, Ge).call(this) : this.updateResult(), x(this, Be, St).call(this));
1277
1277
  }
1278
1278
  onUnsubscribe() {
1279
1279
  this.hasListeners() || this.destroy();
1280
1280
  }
1281
1281
  shouldFetchOnReconnect() {
1282
- return Lt(
1283
- n(this, P),
1282
+ return kt(
1283
+ n(this, N),
1284
1284
  this.options,
1285
1285
  this.options.refetchOnReconnect
1286
1286
  );
1287
1287
  }
1288
1288
  shouldFetchOnWindowFocus() {
1289
- return Lt(
1290
- n(this, P),
1289
+ return kt(
1290
+ n(this, N),
1291
1291
  this.options,
1292
1292
  this.options.refetchOnWindowFocus
1293
1293
  );
1294
1294
  }
1295
1295
  destroy() {
1296
- this.listeners = /* @__PURE__ */ new Set(), x(this, st, Nt).call(this), x(this, rt, Mt).call(this), n(this, P).removeObserver(this);
1296
+ this.listeners = /* @__PURE__ */ new Set(), x(this, et, At).call(this), x(this, tt, Pt).call(this), n(this, N).removeObserver(this);
1297
1297
  }
1298
1298
  setOptions(t, s) {
1299
- const r = this.options, a = n(this, P);
1300
- if (this.options = n(this, H).defaultQueryOptions(t), ht(r, this.options) || n(this, H).getQueryCache().notify({
1299
+ const r = this.options, a = n(this, N);
1300
+ if (this.options = n(this, Q).defaultQueryOptions(t), ct(r, this.options) || n(this, Q).getQueryCache().notify({
1301
1301
  type: "observerOptionsUpdated",
1302
- query: n(this, P),
1302
+ query: n(this, N),
1303
1303
  observer: this
1304
1304
  }), typeof this.options.enabled < "u" && typeof this.options.enabled != "boolean")
1305
1305
  throw new Error("Expected enabled to be a boolean");
1306
- this.options.queryKey || (this.options.queryKey = r.queryKey), x(this, it, Ot).call(this);
1306
+ this.options.queryKey || (this.options.queryKey = r.queryKey), x(this, st, Nt).call(this);
1307
1307
  const o = this.hasListeners();
1308
- o && It(
1309
- n(this, P),
1308
+ o && Zt(
1309
+ n(this, N),
1310
1310
  a,
1311
1311
  this.options,
1312
1312
  r
1313
- ) && x(this, je, Ve).call(this), this.updateResult(s), o && (n(this, P) !== a || this.options.enabled !== r.enabled || this.options.staleTime !== r.staleTime) && x(this, Ie, At).call(this);
1314
- const l = x(this, Be, St).call(this);
1315
- o && (n(this, P) !== a || this.options.enabled !== r.enabled || l !== n(this, he)) && x(this, et, kt).call(this, l);
1313
+ ) && x(this, be, Ge).call(this), this.updateResult(s), o && (n(this, N) !== a || this.options.enabled !== r.enabled || this.options.staleTime !== r.staleTime) && x(this, Je, jt).call(this);
1314
+ const l = x(this, Xe, _t).call(this);
1315
+ o && (n(this, N) !== a || this.options.enabled !== r.enabled || l !== n(this, de)) && x(this, Ie, Et).call(this, l);
1316
1316
  }
1317
1317
  getOptimisticResult(t) {
1318
- const s = n(this, H).getQueryCache().build(n(this, H), t), r = this.createResult(s, t);
1319
- return fr(this, r) && (h(this, T, r), h(this, Ue, this.options), h(this, Ce, n(this, P).state)), r;
1318
+ const s = n(this, Q).getQueryCache().build(n(this, Q), t), r = this.createResult(s, t);
1319
+ return lr(this, r) && (h(this, U, r), h(this, De, this.options), h(this, ge, n(this, N).state)), r;
1320
1320
  }
1321
1321
  getCurrentResult() {
1322
- return n(this, T);
1322
+ return n(this, U);
1323
1323
  }
1324
1324
  trackResult(t) {
1325
1325
  const s = {};
@@ -1327,12 +1327,12 @@ var L, ce, ue, Le, Fe, de, Re, De, ds, ws = (ds = class {
1327
1327
  Object.defineProperty(s, r, {
1328
1328
  configurable: !1,
1329
1329
  enumerable: !0,
1330
- get: () => (n(this, we).add(r), t[r])
1330
+ get: () => (n(this, Qe).add(r), t[r])
1331
1331
  });
1332
1332
  }), s;
1333
1333
  }
1334
1334
  getCurrentQuery() {
1335
- return n(this, P);
1335
+ return n(this, N);
1336
1336
  }
1337
1337
  refetch({ ...t } = {}) {
1338
1338
  return this.fetch({
@@ -1340,183 +1340,183 @@ var L, ce, ue, Le, Fe, de, Re, De, ds, ws = (ds = class {
1340
1340
  });
1341
1341
  }
1342
1342
  fetchOptimistic(t) {
1343
- const s = n(this, H).defaultQueryOptions(t), r = n(this, H).getQueryCache().build(n(this, H), s);
1343
+ const s = n(this, Q).defaultQueryOptions(t), r = n(this, Q).getQueryCache().build(n(this, Q), s);
1344
1344
  return r.isFetchingOptimistic = !0, r.fetch().then(() => this.createResult(r, s));
1345
1345
  }
1346
1346
  fetch(t) {
1347
- return x(this, je, Ve).call(this, {
1347
+ return x(this, be, Ge).call(this, {
1348
1348
  ...t,
1349
1349
  cancelRefetch: t.cancelRefetch ?? !0
1350
- }).then(() => (this.updateResult(), n(this, T)));
1350
+ }).then(() => (this.updateResult(), n(this, U)));
1351
1351
  }
1352
1352
  createResult(t, s) {
1353
- var K;
1354
- const r = n(this, P), a = this.options, o = n(this, T), l = n(this, Ce), c = n(this, Ue), g = t !== r ? t.state : n(this, Te), { state: u } = t;
1355
- let { error: C, errorUpdatedAt: w, fetchStatus: v, status: b } = u, _ = !1, m;
1353
+ var $;
1354
+ const r = n(this, N), a = this.options, o = n(this, U), l = n(this, ge), c = n(this, De), C = t !== r ? t.state : n(this, Ye), { state: u } = t;
1355
+ let { error: b, errorUpdatedAt: v, fetchStatus: f, status: w } = u, E = !1, y;
1356
1356
  if (s._optimisticResults) {
1357
- const D = this.hasListeners(), M = !D && Xt(t, s), se = D && It(t, r, s, a);
1358
- (M || se) && (v = xt(t.options.networkMode) ? "fetching" : "paused", u.dataUpdatedAt || (b = "pending")), s._optimisticResults === "isRestoring" && (v = "idle");
1357
+ const T = this.hasListeners(), O = !T && Wt(t, s), ee = T && Zt(t, r, s, a);
1358
+ (O || ee) && (f = vt(t.options.networkMode) ? "fetching" : "paused", u.dataUpdatedAt || (w = "pending")), s._optimisticResults === "isRestoring" && (f = "idle");
1359
1359
  }
1360
1360
  if (s.select && typeof u.data < "u")
1361
- if (o && u.data === (l == null ? void 0 : l.data) && s.select === n(this, Xe))
1362
- m = n(this, Qe);
1361
+ if (o && u.data === (l == null ? void 0 : l.data) && s.select === n(this, ze))
1362
+ y = n(this, Te);
1363
1363
  else
1364
1364
  try {
1365
- h(this, Xe, s.select), m = s.select(u.data), m = Et(o == null ? void 0 : o.data, m, s), h(this, Qe, m), h(this, te, null);
1366
- } catch (D) {
1367
- h(this, te, D);
1365
+ h(this, ze, s.select), y = s.select(u.data), y = wt(o == null ? void 0 : o.data, y, s), h(this, Te, y), h(this, B, null);
1366
+ } catch (T) {
1367
+ h(this, B, T);
1368
1368
  }
1369
1369
  else
1370
- m = u.data;
1371
- if (typeof s.placeholderData < "u" && typeof m > "u" && b === "pending") {
1372
- let D;
1370
+ y = u.data;
1371
+ if (typeof s.placeholderData < "u" && typeof y > "u" && w === "pending") {
1372
+ let T;
1373
1373
  if (o != null && o.isPlaceholderData && s.placeholderData === (c == null ? void 0 : c.placeholderData))
1374
- D = o.data;
1375
- else if (D = typeof s.placeholderData == "function" ? s.placeholderData(
1376
- (K = n(this, He)) == null ? void 0 : K.state.data,
1377
- n(this, He)
1378
- ) : s.placeholderData, s.select && typeof D < "u")
1374
+ T = o.data;
1375
+ else if (T = typeof s.placeholderData == "function" ? s.placeholderData(
1376
+ ($ = n(this, Ue)) == null ? void 0 : $.state.data,
1377
+ n(this, Ue)
1378
+ ) : s.placeholderData, s.select && typeof T < "u")
1379
1379
  try {
1380
- D = s.select(D), h(this, te, null);
1381
- } catch (M) {
1382
- h(this, te, M);
1380
+ T = s.select(T), h(this, B, null);
1381
+ } catch (O) {
1382
+ h(this, B, O);
1383
1383
  }
1384
- typeof D < "u" && (b = "success", m = Et(
1384
+ typeof T < "u" && (w = "success", y = wt(
1385
1385
  o == null ? void 0 : o.data,
1386
- D,
1386
+ T,
1387
1387
  s
1388
- ), _ = !0);
1388
+ ), E = !0);
1389
1389
  }
1390
- n(this, te) && (C = n(this, te), m = n(this, Qe), w = Date.now(), b = "error");
1391
- const y = v === "fetching", S = b === "pending", E = b === "error", k = S && y;
1390
+ n(this, B) && (b = n(this, B), y = n(this, Te), v = Date.now(), w = "error");
1391
+ const g = f === "fetching", S = w === "pending", _ = w === "error", k = S && g;
1392
1392
  return {
1393
- status: b,
1394
- fetchStatus: v,
1393
+ status: w,
1394
+ fetchStatus: f,
1395
1395
  isPending: S,
1396
- isSuccess: b === "success",
1397
- isError: E,
1396
+ isSuccess: w === "success",
1397
+ isError: _,
1398
1398
  isInitialLoading: k,
1399
1399
  isLoading: k,
1400
- data: m,
1400
+ data: y,
1401
1401
  dataUpdatedAt: u.dataUpdatedAt,
1402
- error: C,
1403
- errorUpdatedAt: w,
1402
+ error: b,
1403
+ errorUpdatedAt: v,
1404
1404
  failureCount: u.fetchFailureCount,
1405
1405
  failureReason: u.fetchFailureReason,
1406
1406
  errorUpdateCount: u.errorUpdateCount,
1407
1407
  isFetched: u.dataUpdateCount > 0 || u.errorUpdateCount > 0,
1408
- isFetchedAfterMount: u.dataUpdateCount > g.dataUpdateCount || u.errorUpdateCount > g.errorUpdateCount,
1409
- isFetching: y,
1410
- isRefetching: y && !S,
1411
- isLoadingError: E && u.dataUpdatedAt === 0,
1412
- isPaused: v === "paused",
1413
- isPlaceholderData: _,
1414
- isRefetchError: E && u.dataUpdatedAt !== 0,
1415
- isStale: Ht(t, s),
1408
+ isFetchedAfterMount: u.dataUpdateCount > C.dataUpdateCount || u.errorUpdateCount > C.errorUpdateCount,
1409
+ isFetching: g,
1410
+ isRefetching: g && !S,
1411
+ isLoadingError: _ && u.dataUpdatedAt === 0,
1412
+ isPaused: f === "paused",
1413
+ isPlaceholderData: E,
1414
+ isRefetchError: _ && u.dataUpdatedAt !== 0,
1415
+ isStale: Rt(t, s),
1416
1416
  refetch: this.refetch
1417
1417
  };
1418
1418
  }
1419
1419
  updateResult(t) {
1420
- const s = n(this, T), r = this.createResult(n(this, P), this.options);
1421
- if (h(this, Ce, n(this, P).state), h(this, Ue, this.options), n(this, Ce).data !== void 0 && h(this, He, n(this, P)), ht(r, s))
1420
+ const s = n(this, U), r = this.createResult(n(this, N), this.options);
1421
+ if (h(this, ge, n(this, N).state), h(this, De, this.options), n(this, ge).data !== void 0 && h(this, Ue, n(this, N)), ct(r, s))
1422
1422
  return;
1423
- h(this, T, r);
1423
+ h(this, U, r);
1424
1424
  const a = {}, o = () => {
1425
1425
  if (!s)
1426
1426
  return !0;
1427
1427
  const { notifyOnChangeProps: l } = this.options, c = typeof l == "function" ? l() : l;
1428
- if (c === "all" || !c && !n(this, we).size)
1428
+ if (c === "all" || !c && !n(this, Qe).size)
1429
1429
  return !0;
1430
- const f = new Set(
1431
- c ?? n(this, we)
1430
+ const m = new Set(
1431
+ c ?? n(this, Qe)
1432
1432
  );
1433
- return this.options.throwOnError && f.add("error"), Object.keys(n(this, T)).some((g) => {
1434
- const u = g;
1435
- return n(this, T)[u] !== s[u] && f.has(u);
1433
+ return this.options.throwOnError && m.add("error"), Object.keys(n(this, U)).some((C) => {
1434
+ const u = C;
1435
+ return n(this, U)[u] !== s[u] && m.has(u);
1436
1436
  });
1437
1437
  };
1438
- (t == null ? void 0 : t.listeners) !== !1 && o() && (a.listeners = !0), x(this, Ct, js).call(this, { ...a, ...t });
1438
+ (t == null ? void 0 : t.listeners) !== !1 && o() && (a.listeners = !0), x(this, mt, ys).call(this, { ...a, ...t });
1439
1439
  }
1440
1440
  onQueryUpdate() {
1441
- this.updateResult(), this.hasListeners() && x(this, tt, Pt).call(this);
1441
+ this.updateResult(), this.hasListeners() && x(this, Be, St).call(this);
1442
1442
  }
1443
- }, H = new WeakMap(), P = new WeakMap(), Te = new WeakMap(), T = new WeakMap(), Ce = new WeakMap(), Ue = new WeakMap(), te = new WeakMap(), Xe = new WeakMap(), Qe = new WeakMap(), He = new WeakMap(), xe = new WeakMap(), be = new WeakMap(), he = new WeakMap(), we = new WeakMap(), je = new WeakSet(), Ve = function(t) {
1444
- x(this, it, Ot).call(this);
1445
- let s = n(this, P).fetch(
1443
+ }, Q = new WeakMap(), N = new WeakMap(), Ye = new WeakMap(), U = new WeakMap(), ge = new WeakMap(), De = new WeakMap(), B = new WeakMap(), ze = new WeakMap(), Te = new WeakMap(), Ue = new WeakMap(), Ce = new WeakMap(), xe = new WeakMap(), de = new WeakMap(), Qe = new WeakMap(), be = new WeakSet(), Ge = function(t) {
1444
+ x(this, st, Nt).call(this);
1445
+ let s = n(this, N).fetch(
1446
1446
  this.options,
1447
1447
  t
1448
1448
  );
1449
- return t != null && t.throwOnError || (s = s.catch(z)), s;
1450
- }, Ie = new WeakSet(), At = function() {
1451
- if (x(this, st, Nt).call(this), Ke || n(this, T).isStale || !jt(this.options.staleTime))
1449
+ return t != null && t.throwOnError || (s = s.catch(Z)), s;
1450
+ }, Je = new WeakSet(), jt = function() {
1451
+ if (x(this, et, At).call(this), $e || n(this, U).isStale || !xt(this.options.staleTime))
1452
1452
  return;
1453
- const s = ms(
1454
- n(this, T).dataUpdatedAt,
1453
+ const s = us(
1454
+ n(this, U).dataUpdatedAt,
1455
1455
  this.options.staleTime
1456
1456
  ) + 1;
1457
- h(this, xe, setTimeout(() => {
1458
- n(this, T).isStale || this.updateResult();
1457
+ h(this, Ce, setTimeout(() => {
1458
+ n(this, U).isStale || this.updateResult();
1459
1459
  }, s));
1460
+ }, Xe = new WeakSet(), _t = function() {
1461
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, N)) : this.options.refetchInterval) ?? !1;
1462
+ }, Ie = new WeakSet(), Et = function(t) {
1463
+ x(this, tt, Pt).call(this), h(this, de, t), !($e || this.options.enabled === !1 || !xt(n(this, de)) || n(this, de) === 0) && h(this, xe, setInterval(() => {
1464
+ (this.options.refetchIntervalInBackground || ut.isFocused()) && x(this, be, Ge).call(this);
1465
+ }, n(this, de)));
1460
1466
  }, Be = new WeakSet(), St = function() {
1461
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, P)) : this.options.refetchInterval) ?? !1;
1462
- }, et = new WeakSet(), kt = function(t) {
1463
- x(this, rt, Mt).call(this), h(this, he, t), !(Ke || this.options.enabled === !1 || !jt(n(this, he)) || n(this, he) === 0) && h(this, be, setInterval(() => {
1464
- (this.options.refetchIntervalInBackground || ft.isFocused()) && x(this, je, Ve).call(this);
1465
- }, n(this, he)));
1467
+ x(this, Je, jt).call(this), x(this, Ie, Et).call(this, x(this, Xe, _t).call(this));
1468
+ }, et = new WeakSet(), At = function() {
1469
+ n(this, Ce) && (clearTimeout(n(this, Ce)), h(this, Ce, void 0));
1466
1470
  }, tt = new WeakSet(), Pt = function() {
1467
- x(this, Ie, At).call(this), x(this, et, kt).call(this, x(this, Be, St).call(this));
1471
+ n(this, xe) && (clearInterval(n(this, xe)), h(this, xe, void 0));
1468
1472
  }, st = new WeakSet(), Nt = function() {
1469
- n(this, xe) && (clearTimeout(n(this, xe)), h(this, xe, void 0));
1470
- }, rt = new WeakSet(), Mt = function() {
1471
- n(this, be) && (clearInterval(n(this, be)), h(this, be, void 0));
1472
- }, it = new WeakSet(), Ot = function() {
1473
- const t = n(this, H).getQueryCache().build(n(this, H), this.options);
1474
- if (t === n(this, P))
1473
+ const t = n(this, Q).getQueryCache().build(n(this, Q), this.options);
1474
+ if (t === n(this, N))
1475
1475
  return;
1476
- const s = n(this, P);
1477
- h(this, P, t), h(this, Te, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
1478
- }, Ct = new WeakSet(), js = function(t) {
1479
- F.batch(() => {
1476
+ const s = n(this, N);
1477
+ h(this, N, t), h(this, Ye, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
1478
+ }, mt = new WeakSet(), ys = function(t) {
1479
+ R.batch(() => {
1480
1480
  t.listeners && this.listeners.forEach((s) => {
1481
- s(n(this, T));
1482
- }), n(this, H).getQueryCache().notify({
1483
- query: n(this, P),
1481
+ s(n(this, U));
1482
+ }), n(this, Q).getQueryCache().notify({
1483
+ query: n(this, N),
1484
1484
  type: "observerResultsUpdated"
1485
1485
  });
1486
1486
  });
1487
- }, hs);
1488
- function hr(e, t) {
1487
+ }, os);
1488
+ function or(e, t) {
1489
1489
  return t.enabled !== !1 && !e.state.dataUpdatedAt && !(e.state.status === "error" && t.retryOnMount === !1);
1490
1490
  }
1491
- function Xt(e, t) {
1492
- return hr(e, t) || e.state.dataUpdatedAt > 0 && Lt(e, t, t.refetchOnMount);
1491
+ function Wt(e, t) {
1492
+ return or(e, t) || e.state.dataUpdatedAt > 0 && kt(e, t, t.refetchOnMount);
1493
1493
  }
1494
- function Lt(e, t, s) {
1494
+ function kt(e, t, s) {
1495
1495
  if (t.enabled !== !1) {
1496
1496
  const r = typeof s == "function" ? s(e) : s;
1497
- return r === "always" || r !== !1 && Ht(e, t);
1497
+ return r === "always" || r !== !1 && Rt(e, t);
1498
1498
  }
1499
1499
  return !1;
1500
1500
  }
1501
- function It(e, t, s, r) {
1502
- return s.enabled !== !1 && (e !== t || r.enabled === !1) && (!s.suspense || e.state.status !== "error") && Ht(e, s);
1501
+ function Zt(e, t, s, r) {
1502
+ return s.enabled !== !1 && (e !== t || r.enabled === !1) && (!s.suspense || e.state.status !== "error") && Rt(e, s);
1503
1503
  }
1504
- function Ht(e, t) {
1504
+ function Rt(e, t) {
1505
1505
  return e.isStaleByTime(t.staleTime);
1506
1506
  }
1507
- function fr(e, t) {
1508
- return !ht(e.getCurrentResult(), t);
1507
+ function lr(e, t) {
1508
+ return !ct(e.getCurrentResult(), t);
1509
1509
  }
1510
- var fe, Q, Z, ie, $e, dt, nt, Ft, fs, pr = (fs = class extends Ge {
1510
+ var he, se, G, re, He, lt, rt, Ot, ls, cr = (ls = class extends Ke {
1511
1511
  constructor(t, s) {
1512
1512
  super();
1513
- p(this, $e);
1514
- p(this, nt);
1515
- p(this, fe, void 0);
1516
- p(this, Q, void 0);
1517
- p(this, Z, void 0);
1518
- p(this, ie, void 0);
1519
- h(this, Q, void 0), h(this, fe, t), this.setOptions(s), this.bindMethods(), x(this, $e, dt).call(this);
1513
+ p(this, He);
1514
+ p(this, rt);
1515
+ p(this, he, void 0);
1516
+ p(this, se, void 0);
1517
+ p(this, G, void 0);
1518
+ p(this, re, void 0);
1519
+ h(this, se, void 0), h(this, he, t), this.setOptions(s), this.bindMethods(), x(this, He, lt).call(this);
1520
1520
  }
1521
1521
  bindMethods() {
1522
1522
  this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
@@ -1524,33 +1524,34 @@ var fe, Q, Z, ie, $e, dt, nt, Ft, fs, pr = (fs = class extends Ge {
1524
1524
  setOptions(t) {
1525
1525
  var r;
1526
1526
  const s = this.options;
1527
- this.options = n(this, fe).defaultMutationOptions(t), ht(s, this.options) || n(this, fe).getMutationCache().notify({
1527
+ this.options = n(this, he).defaultMutationOptions(t), ct(s, this.options) || n(this, he).getMutationCache().notify({
1528
1528
  type: "observerOptionsUpdated",
1529
- mutation: n(this, Z),
1529
+ mutation: n(this, G),
1530
1530
  observer: this
1531
- }), (r = n(this, Z)) == null || r.setOptions(this.options);
1531
+ }), (r = n(this, G)) == null || r.setOptions(this.options), s != null && s.mutationKey && this.options.mutationKey && we(s.mutationKey) !== we(this.options.mutationKey) && this.reset();
1532
1532
  }
1533
1533
  onUnsubscribe() {
1534
1534
  var t;
1535
- this.hasListeners() || (t = n(this, Z)) == null || t.removeObserver(this);
1535
+ this.hasListeners() || (t = n(this, G)) == null || t.removeObserver(this);
1536
1536
  }
1537
1537
  onMutationUpdate(t) {
1538
- x(this, $e, dt).call(this), x(this, nt, Ft).call(this, t);
1538
+ x(this, He, lt).call(this), x(this, rt, Ot).call(this, t);
1539
1539
  }
1540
1540
  getCurrentResult() {
1541
- return n(this, Q);
1541
+ return n(this, se);
1542
1542
  }
1543
1543
  reset() {
1544
- h(this, Z, void 0), x(this, $e, dt).call(this), x(this, nt, Ft).call(this);
1544
+ var t;
1545
+ (t = n(this, G)) == null || t.removeObserver(this), h(this, G, void 0), x(this, He, lt).call(this), x(this, rt, Ot).call(this);
1545
1546
  }
1546
1547
  mutate(t, s) {
1547
1548
  var r;
1548
- return h(this, ie, s), (r = n(this, Z)) == null || r.removeObserver(this), h(this, Z, n(this, fe).getMutationCache().build(n(this, fe), this.options)), n(this, Z).addObserver(this), n(this, Z).execute(t);
1549
+ return h(this, re, s), (r = n(this, G)) == null || r.removeObserver(this), h(this, G, n(this, he).getMutationCache().build(n(this, he), this.options)), n(this, G).addObserver(this), n(this, G).execute(t);
1549
1550
  }
1550
- }, fe = new WeakMap(), Q = new WeakMap(), Z = new WeakMap(), ie = new WeakMap(), $e = new WeakSet(), dt = function() {
1551
+ }, he = new WeakMap(), se = new WeakMap(), G = new WeakMap(), re = new WeakMap(), He = new WeakSet(), lt = function() {
1551
1552
  var s;
1552
- const t = ((s = n(this, Z)) == null ? void 0 : s.state) ?? bs();
1553
- h(this, Q, {
1553
+ const t = ((s = n(this, G)) == null ? void 0 : s.state) ?? ms();
1554
+ h(this, se, {
1554
1555
  ...t,
1555
1556
  isPending: t.status === "pending",
1556
1557
  isSuccess: t.status === "success",
@@ -1559,52 +1560,40 @@ var fe, Q, Z, ie, $e, dt, nt, Ft, fs, pr = (fs = class extends Ge {
1559
1560
  mutate: this.mutate,
1560
1561
  reset: this.reset
1561
1562
  });
1562
- }, nt = new WeakSet(), Ft = function(t) {
1563
- F.batch(() => {
1564
- var s, r, a, o, l, c, f, g;
1565
- n(this, ie) && this.hasListeners() && ((t == null ? void 0 : t.type) === "success" ? ((r = (s = n(this, ie)).onSuccess) == null || r.call(
1566
- s,
1567
- t.data,
1568
- n(this, Q).variables,
1569
- n(this, Q).context
1570
- ), (o = (a = n(this, ie)).onSettled) == null || o.call(
1571
- a,
1572
- t.data,
1573
- null,
1574
- n(this, Q).variables,
1575
- n(this, Q).context
1576
- )) : (t == null ? void 0 : t.type) === "error" && ((c = (l = n(this, ie)).onError) == null || c.call(
1577
- l,
1578
- t.error,
1579
- n(this, Q).variables,
1580
- n(this, Q).context
1581
- ), (g = (f = n(this, ie)).onSettled) == null || g.call(
1582
- f,
1583
- void 0,
1584
- t.error,
1585
- n(this, Q).variables,
1586
- n(this, Q).context
1587
- ))), this.listeners.forEach((u) => {
1588
- u(n(this, Q));
1563
+ }, rt = new WeakSet(), Ot = function(t) {
1564
+ R.batch(() => {
1565
+ var s, r, a, o, l, c, m, C;
1566
+ if (n(this, re) && this.hasListeners()) {
1567
+ const u = n(this, se).variables, b = n(this, se).context;
1568
+ (t == null ? void 0 : t.type) === "success" ? ((r = (s = n(this, re)).onSuccess) == null || r.call(s, t.data, u, b), (o = (a = n(this, re)).onSettled) == null || o.call(a, t.data, null, u, b)) : (t == null ? void 0 : t.type) === "error" && ((c = (l = n(this, re)).onError) == null || c.call(l, t.error, u, b), (C = (m = n(this, re)).onSettled) == null || C.call(
1569
+ m,
1570
+ void 0,
1571
+ t.error,
1572
+ u,
1573
+ b
1574
+ ));
1575
+ }
1576
+ this.listeners.forEach((u) => {
1577
+ u(n(this, se));
1589
1578
  });
1590
1579
  });
1591
- }, fs), _s = d.createContext(
1580
+ }, ls), gs = d.createContext(
1592
1581
  void 0
1593
- ), Es = (e) => {
1594
- const t = d.useContext(_s);
1582
+ ), Dt = (e) => {
1583
+ const t = d.useContext(gs);
1595
1584
  if (e)
1596
1585
  return e;
1597
1586
  if (!t)
1598
1587
  throw new Error("No QueryClient set, use QueryClientProvider to set one");
1599
1588
  return t;
1600
- }, mr = ({
1589
+ }, ur = ({
1601
1590
  client: e,
1602
1591
  children: t
1603
1592
  }) => (d.useEffect(() => (e.mount(), () => {
1604
1593
  e.unmount();
1605
- }), [e]), /* @__PURE__ */ d.createElement(_s.Provider, { value: e }, t)), As = d.createContext(!1), vr = () => d.useContext(As);
1606
- As.Provider;
1607
- function gr() {
1594
+ }), [e]), /* @__PURE__ */ d.createElement(gs.Provider, { value: e }, t)), Cs = d.createContext(!1), dr = () => d.useContext(Cs);
1595
+ Cs.Provider;
1596
+ function hr() {
1608
1597
  let e = !1;
1609
1598
  return {
1610
1599
  clearReset: () => {
@@ -1616,40 +1605,40 @@ function gr() {
1616
1605
  isReset: () => e
1617
1606
  };
1618
1607
  }
1619
- var yr = d.createContext(gr()), Cr = () => d.useContext(yr);
1620
- function Ss(e, t) {
1608
+ var fr = d.createContext(hr()), pr = () => d.useContext(fr);
1609
+ function xs(e, t) {
1621
1610
  return typeof e == "function" ? e(...t) : !!e;
1622
1611
  }
1623
- var xr = (e, t) => {
1612
+ var mr = (e, t) => {
1624
1613
  (e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
1625
- }, br = (e) => {
1614
+ }, vr = (e) => {
1626
1615
  d.useEffect(() => {
1627
1616
  e.clearReset();
1628
1617
  }, [e]);
1629
- }, wr = ({
1618
+ }, yr = ({
1630
1619
  result: e,
1631
1620
  errorResetBoundary: t,
1632
1621
  throwOnError: s,
1633
1622
  query: r
1634
- }) => e.isError && !t.isReset() && !e.isFetching && Ss(s, [e.error, r]), jr = (e) => {
1623
+ }) => e.isError && !t.isReset() && !e.isFetching && r && xs(s, [e.error, r]), gr = (e) => {
1635
1624
  e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3);
1636
- }, _r = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, Er = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1625
+ }, Cr = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, xr = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1637
1626
  s.clearReset();
1638
1627
  });
1639
- function Ar(e, t, s) {
1640
- const r = Es(s), a = vr(), o = Cr(), l = r.defaultQueryOptions(e);
1641
- l._optimisticResults = a ? "isRestoring" : "optimistic", jr(l), xr(l, o), br(o);
1628
+ function br(e, t, s) {
1629
+ const r = Dt(s), a = dr(), o = pr(), l = r.defaultQueryOptions(e);
1630
+ l._optimisticResults = a ? "isRestoring" : "optimistic", gr(l), mr(l, o), vr(o);
1642
1631
  const [c] = d.useState(
1643
1632
  () => new t(
1644
1633
  r,
1645
1634
  l
1646
1635
  )
1647
- ), f = c.getOptimisticResult(l);
1636
+ ), m = c.getOptimisticResult(l);
1648
1637
  if (d.useSyncExternalStore(
1649
1638
  d.useCallback(
1650
- (g) => {
1639
+ (C) => {
1651
1640
  const u = a ? () => {
1652
- } : c.subscribe(F.batchCalls(g));
1641
+ } : c.subscribe(R.batchCalls(C));
1653
1642
  return c.updateResult(), u;
1654
1643
  },
1655
1644
  [c, a]
@@ -1658,23 +1647,23 @@ function Ar(e, t, s) {
1658
1647
  () => c.getCurrentResult()
1659
1648
  ), d.useEffect(() => {
1660
1649
  c.setOptions(l, { listeners: !1 });
1661
- }, [l, c]), _r(l, f))
1662
- throw c.setOptions(l, { listeners: !1 }), Er(l, c, o);
1663
- if (wr({
1664
- result: f,
1650
+ }, [l, c]), Cr(l, m))
1651
+ throw xr(l, c, o);
1652
+ if (yr({
1653
+ result: m,
1665
1654
  errorResetBoundary: o,
1666
1655
  throwOnError: l.throwOnError,
1667
- query: c.getCurrentQuery()
1656
+ query: r.getQueryCache().get(l.queryHash)
1668
1657
  }))
1669
- throw f.error;
1670
- return l.notifyOnChangeProps ? f : c.trackResult(f);
1658
+ throw m.error;
1659
+ return l.notifyOnChangeProps ? m : c.trackResult(m);
1671
1660
  }
1672
- function ks(e, t) {
1673
- return Ar(e, dr, t);
1661
+ function bs(e, t) {
1662
+ return br(e, ar, t);
1674
1663
  }
1675
- function Sr(e, t) {
1676
- const s = Es(t), [r] = d.useState(
1677
- () => new pr(
1664
+ function wr(e, t) {
1665
+ const s = Dt(t), [r] = d.useState(
1666
+ () => new cr(
1678
1667
  s,
1679
1668
  e
1680
1669
  )
@@ -1684,100 +1673,101 @@ function Sr(e, t) {
1684
1673
  }, [r, e]);
1685
1674
  const a = d.useSyncExternalStore(
1686
1675
  d.useCallback(
1687
- (l) => r.subscribe(F.batchCalls(l)),
1676
+ (l) => r.subscribe(R.batchCalls(l)),
1688
1677
  [r]
1689
1678
  ),
1690
1679
  () => r.getCurrentResult(),
1691
1680
  () => r.getCurrentResult()
1692
1681
  ), o = d.useCallback(
1693
1682
  (l, c) => {
1694
- r.mutate(l, c).catch(kr);
1683
+ r.mutate(l, c).catch(jr);
1695
1684
  },
1696
1685
  [r]
1697
1686
  );
1698
- if (a.error && Ss(r.options.throwOnError, [a.error]))
1687
+ if (a.error && xs(r.options.throwOnError, [a.error]))
1699
1688
  throw a.error;
1700
1689
  return { ...a, mutate: o, mutateAsync: a.mutate };
1701
1690
  }
1702
- function kr() {
1691
+ function jr() {
1703
1692
  }
1704
- function Ps(e) {
1693
+ function ws(e) {
1705
1694
  var t, s, r = "";
1706
1695
  if (typeof e == "string" || typeof e == "number")
1707
1696
  r += e;
1708
1697
  else if (typeof e == "object")
1709
- if (Array.isArray(e))
1710
- for (t = 0; t < e.length; t++)
1711
- e[t] && (s = Ps(e[t])) && (r && (r += " "), r += s);
1712
- else
1713
- for (t in e)
1714
- e[t] && (r && (r += " "), r += t);
1698
+ if (Array.isArray(e)) {
1699
+ var a = e.length;
1700
+ for (t = 0; t < a; t++)
1701
+ e[t] && (s = ws(e[t])) && (r && (r += " "), r += s);
1702
+ } else
1703
+ for (s in e)
1704
+ e[s] && (r && (r += " "), r += s);
1715
1705
  return r;
1716
1706
  }
1717
- function N() {
1718
- for (var e, t, s = 0, r = ""; s < arguments.length; )
1719
- (e = arguments[s++]) && (t = Ps(e)) && (r && (r += " "), r += t);
1707
+ function P() {
1708
+ for (var e, t, s = 0, r = "", a = arguments.length; s < a; s++)
1709
+ (e = arguments[s]) && (t = ws(e)) && (r && (r += " "), r += t);
1720
1710
  return r;
1721
1711
  }
1722
- var Pr = Object.defineProperty, Nr = Object.defineProperties, Mr = Object.getOwnPropertyDescriptors, mt = Object.getOwnPropertySymbols, Ns = Object.prototype.hasOwnProperty, Ms = Object.prototype.propertyIsEnumerable, Bt = (e, t, s) => t in e ? Pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, j = (e, t) => {
1712
+ var _r = Object.defineProperty, Er = Object.defineProperties, Sr = Object.getOwnPropertyDescriptors, ht = Object.getOwnPropertySymbols, js = Object.prototype.hasOwnProperty, _s = Object.prototype.propertyIsEnumerable, Yt = (e, t, s) => t in e ? _r(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, j = (e, t) => {
1723
1713
  for (var s in t || (t = {}))
1724
- Ns.call(t, s) && Bt(e, s, t[s]);
1725
- if (mt)
1726
- for (var s of mt(t))
1727
- Ms.call(t, s) && Bt(e, s, t[s]);
1714
+ js.call(t, s) && Yt(e, s, t[s]);
1715
+ if (ht)
1716
+ for (var s of ht(t))
1717
+ _s.call(t, s) && Yt(e, s, t[s]);
1728
1718
  return e;
1729
- }, A = (e, t) => Nr(e, Mr(t)), O = (e, t) => {
1719
+ }, A = (e, t) => Er(e, Sr(t)), M = (e, t) => {
1730
1720
  var s = {};
1731
1721
  for (var r in e)
1732
- Ns.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
1733
- if (e != null && mt)
1734
- for (var r of mt(e))
1735
- t.indexOf(r) < 0 && Ms.call(e, r) && (s[r] = e[r]);
1722
+ js.call(e, r) && t.indexOf(r) < 0 && (s[r] = e[r]);
1723
+ if (e != null && ht)
1724
+ for (var r of ht(e))
1725
+ t.indexOf(r) < 0 && _s.call(e, r) && (s[r] = e[r]);
1736
1726
  return s;
1737
1727
  };
1738
- function vt() {
1739
- return vt = Object.assign ? Object.assign.bind() : function(e) {
1728
+ function ft() {
1729
+ return ft = Object.assign ? Object.assign.bind() : function(e) {
1740
1730
  for (var t = 1; t < arguments.length; t++) {
1741
1731
  var s = arguments[t];
1742
1732
  for (var r in s)
1743
1733
  Object.prototype.hasOwnProperty.call(s, r) && (e[r] = s[r]);
1744
1734
  }
1745
1735
  return e;
1746
- }, vt.apply(this, arguments);
1736
+ }, ft.apply(this, arguments);
1747
1737
  }
1748
- function Or(e, t) {
1738
+ function Ar(e, t) {
1749
1739
  typeof e == "function" ? e(t) : e != null && (e.current = t);
1750
1740
  }
1751
- function Lr(...e) {
1741
+ function Pr(...e) {
1752
1742
  return (t) => e.forEach(
1753
- (s) => Or(s, t)
1743
+ (s) => Ar(s, t)
1754
1744
  );
1755
1745
  }
1756
- var Fr = /* @__PURE__ */ d.forwardRef((e, t) => {
1757
- const s = e, { children: r } = s, a = O(s, ["children"]), o = d.Children.toArray(r), l = o.find(Dr);
1746
+ var Nr = /* @__PURE__ */ d.forwardRef((e, t) => {
1747
+ const s = e, { children: r } = s, a = M(s, ["children"]), o = d.Children.toArray(r), l = o.find(Or);
1758
1748
  if (l) {
1759
- const c = l.props.children, f = o.map((g) => g === l ? d.Children.count(c) > 1 ? d.Children.only(null) : /* @__PURE__ */ d.isValidElement(c) ? c.props.children : null : g);
1760
- return /* @__PURE__ */ d.createElement(Rt, vt({}, a, {
1749
+ const c = l.props.children, m = o.map((C) => C === l ? d.Children.count(c) > 1 ? d.Children.only(null) : /* @__PURE__ */ d.isValidElement(c) ? c.props.children : null : C);
1750
+ return /* @__PURE__ */ d.createElement(Mt, ft({}, a, {
1761
1751
  ref: t
1762
- }), /* @__PURE__ */ d.isValidElement(c) ? /* @__PURE__ */ d.cloneElement(c, void 0, f) : null);
1752
+ }), /* @__PURE__ */ d.isValidElement(c) ? /* @__PURE__ */ d.cloneElement(c, void 0, m) : null);
1763
1753
  }
1764
- return /* @__PURE__ */ d.createElement(Rt, vt({}, a, {
1754
+ return /* @__PURE__ */ d.createElement(Mt, ft({}, a, {
1765
1755
  ref: t
1766
1756
  }), r);
1767
1757
  });
1768
- Fr.displayName = "Slot";
1769
- var Rt = /* @__PURE__ */ d.forwardRef((e, t) => {
1770
- const s = e, { children: r } = s, a = O(s, ["children"]);
1771
- return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, A(j({}, Tr(a, r.props)), {
1772
- ref: t ? Lr(t, r.ref) : r.ref
1758
+ Nr.displayName = "Slot";
1759
+ var Mt = /* @__PURE__ */ d.forwardRef((e, t) => {
1760
+ const s = e, { children: r } = s, a = M(s, ["children"]);
1761
+ return /* @__PURE__ */ d.isValidElement(r) ? /* @__PURE__ */ d.cloneElement(r, A(j({}, Mr(a, r.props)), {
1762
+ ref: t ? Pr(t, r.ref) : r.ref
1773
1763
  })) : d.Children.count(r) > 1 ? d.Children.only(null) : null;
1774
1764
  });
1775
- Rt.displayName = "SlotClone";
1776
- var Rr = ({ children: e }) => /* @__PURE__ */ d.createElement(d.Fragment, null, e);
1777
- function Dr(e) {
1778
- return /* @__PURE__ */ d.isValidElement(e) && e.type === Rr;
1765
+ Mt.displayName = "SlotClone";
1766
+ var kr = ({ children: e }) => /* @__PURE__ */ d.createElement(d.Fragment, null, e);
1767
+ function Or(e) {
1768
+ return /* @__PURE__ */ d.isValidElement(e) && e.type === kr;
1779
1769
  }
1780
- function Tr(e, t) {
1770
+ function Mr(e, t) {
1781
1771
  const s = j({}, t);
1782
1772
  for (const r in t) {
1783
1773
  const a = e[r], o = t[r];
@@ -1790,7 +1780,7 @@ function Tr(e, t) {
1790
1780
  }
1791
1781
  return j(j({}, e), s);
1792
1782
  }
1793
- var Ur = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1783
+ var Lr = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1794
1784
  const r = `${e.charAt(0)}${t.charAt(0)}`;
1795
1785
  return /* @__PURE__ */ i.jsx(
1796
1786
  "span",
@@ -1801,7 +1791,7 @@ var Ur = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1801
1791
  children: /* @__PURE__ */ i.jsx("span", { className: "avatar__initials", children: r })
1802
1792
  }
1803
1793
  );
1804
- }, at = d.forwardRef(
1794
+ }, it = d.forwardRef(
1805
1795
  (e, t) => {
1806
1796
  var s = e, {
1807
1797
  iconLeft: r,
@@ -1809,9 +1799,9 @@ var Ur = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1809
1799
  isPending: o = !1,
1810
1800
  isFilled: l = !1,
1811
1801
  variant: c,
1812
- className: f,
1813
- children: g
1814
- } = s, u = O(s, [
1802
+ className: m,
1803
+ children: C
1804
+ } = s, u = M(s, [
1815
1805
  "iconLeft",
1816
1806
  "iconRight",
1817
1807
  "isPending",
@@ -1820,41 +1810,41 @@ var Ur = ({ firstName: e, lastName: t, variant: s = "small" }) => {
1820
1810
  "className",
1821
1811
  "children"
1822
1812
  ]);
1823
- const C = !!r || !!a;
1813
+ const b = !!r || !!a;
1824
1814
  return /* @__PURE__ */ i.jsxs(
1825
1815
  "button",
1826
1816
  A(j({
1827
1817
  ref: t
1828
1818
  }, u), {
1829
- className: N(
1819
+ className: P(
1830
1820
  "button",
1831
1821
  c && `button--${c}`,
1832
1822
  c && l && `button--${c}--filled`,
1833
- C && "button--with-icon",
1823
+ b && "button--with-icon",
1834
1824
  o && "button--pending",
1835
- f
1825
+ m
1836
1826
  ),
1837
1827
  children: [
1838
1828
  r && /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: r }),
1839
- !!g && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: g }),
1829
+ !!C && /* @__PURE__ */ i.jsx("span", { className: "button__label", children: C }),
1840
1830
  a && /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: a })
1841
1831
  ]
1842
1832
  })
1843
1833
  );
1844
1834
  }
1845
1835
  );
1846
- at.displayName = "Button";
1836
+ it.displayName = "Button";
1847
1837
  d.createContext(void 0);
1848
- var Qr = d.forwardRef(
1838
+ var Fr = d.forwardRef(
1849
1839
  (e, t) => {
1850
- var s = e, { prefix: r, suffix: a, className: o } = s, l = O(s, ["prefix", "suffix", "className"]);
1840
+ var s = e, { prefix: r, suffix: a, className: o } = s, l = M(s, ["prefix", "suffix", "className"]);
1851
1841
  return /* @__PURE__ */ i.jsxs("div", { className: "input__wrapper", children: [
1852
1842
  r && /* @__PURE__ */ i.jsx("span", { className: "input__prefix", children: r }),
1853
1843
  /* @__PURE__ */ i.jsx(
1854
1844
  "input",
1855
1845
  j({
1856
1846
  ref: t,
1857
- className: N(
1847
+ className: P(
1858
1848
  "input",
1859
1849
  r && "input--with-prefix",
1860
1850
  a && "input--with-suffix",
@@ -1866,12 +1856,12 @@ var Qr = d.forwardRef(
1866
1856
  ] });
1867
1857
  }
1868
1858
  );
1869
- Qr.displayName = "TextField";
1859
+ Fr.displayName = "TextField";
1870
1860
  d.createContext(void 0);
1871
- var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), $r = (e) => {
1872
- var t = e, { children: s, className: r } = t, a = O(t, ["children", "className"]);
1873
- return /* @__PURE__ */ i.jsx("div", A(j({ className: N("card__body", r) }, a), { children: s }));
1874
- }, Kr = (e) => /* @__PURE__ */ i.jsx(
1861
+ var Rr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__header__action", children: e }), Dr = (e) => {
1862
+ var t = e, { children: s, className: r } = t, a = M(t, ["children", "className"]);
1863
+ return /* @__PURE__ */ i.jsx("div", A(j({ className: P("card__body", r) }, a), { children: s }));
1864
+ }, Tr = (e) => /* @__PURE__ */ i.jsx(
1875
1865
  "svg",
1876
1866
  A(j({
1877
1867
  width: "24",
@@ -1891,7 +1881,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1891
1881
  }
1892
1882
  )
1893
1883
  })
1894
- ), $t = Kr, Gr = (e) => /* @__PURE__ */ i.jsx(
1884
+ ), Tt = Tr, Ur = (e) => /* @__PURE__ */ i.jsx(
1895
1885
  "svg",
1896
1886
  A(j({
1897
1887
  width: "24",
@@ -1911,7 +1901,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1911
1901
  }
1912
1902
  )
1913
1903
  })
1914
- ), qr = Gr, Vr = (e) => /* @__PURE__ */ i.jsx(
1904
+ ), Qr = Ur, Hr = (e) => /* @__PURE__ */ i.jsx(
1915
1905
  "svg",
1916
1906
  A(j({
1917
1907
  width: "24",
@@ -1930,7 +1920,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1930
1920
  }
1931
1921
  )
1932
1922
  })
1933
- ), Wr = Vr, Zr = (e) => /* @__PURE__ */ i.jsx(
1923
+ ), $r = Hr, Kr = (e) => /* @__PURE__ */ i.jsx(
1934
1924
  "svg",
1935
1925
  A(j({
1936
1926
  width: "24",
@@ -1949,7 +1939,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1949
1939
  }
1950
1940
  )
1951
1941
  })
1952
- ), zr = Zr, Yr = (e) => /* @__PURE__ */ i.jsx(
1942
+ ), Gr = Kr, Vr = (e) => /* @__PURE__ */ i.jsx(
1953
1943
  "svg",
1954
1944
  A(j({
1955
1945
  width: "24",
@@ -1968,7 +1958,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
1968
1958
  }
1969
1959
  )
1970
1960
  })
1971
- ), Jr = Yr, Xr = (e) => /* @__PURE__ */ i.jsxs(
1961
+ ), qr = Vr, Wr = (e) => /* @__PURE__ */ i.jsxs(
1972
1962
  "svg",
1973
1963
  A(j({
1974
1964
  width: "24",
@@ -2005,7 +1995,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2005
1995
  /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_19_444", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2006
1996
  ]
2007
1997
  })
2008
- ), Ir = Xr, Br = (e) => /* @__PURE__ */ i.jsxs(
1998
+ ), Zr = Wr, Yr = (e) => /* @__PURE__ */ i.jsxs(
2009
1999
  "svg",
2010
2000
  A(j({
2011
2001
  width: "24",
@@ -2037,7 +2027,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2037
2027
  )
2038
2028
  ]
2039
2029
  })
2040
- ), ei = Br, ti = (e) => /* @__PURE__ */ i.jsxs(
2030
+ ), zr = Yr, Jr = (e) => /* @__PURE__ */ i.jsxs(
2041
2031
  "svg",
2042
2032
  A(j({
2043
2033
  width: "24",
@@ -2089,31 +2079,36 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2089
2079
  )
2090
2080
  ]
2091
2081
  })
2092
- ), si = ti, ri = (e) => /* @__PURE__ */ i.jsxs(
2093
- "svg",
2094
- A(j({
2095
- width: "20",
2096
- height: "21",
2097
- fill: "none",
2098
- viewBox: "0 0 20 21",
2099
- xmlns: "http://www.w3.org/2000/svg"
2100
- }, e), {
2101
- children: [
2102
- /* @__PURE__ */ i.jsx("circle", { cx: "10", cy: "10.0996", r: "7.5", stroke: "#00ab9e", strokeWidth: "1.25" }),
2103
- /* @__PURE__ */ i.jsx(
2104
- "circle",
2105
- {
2106
- cx: "10",
2107
- cy: "10.0996",
2108
- r: "7.5",
2109
- stroke: "white",
2110
- strokeDasharray: "15 30",
2111
- strokeWidth: "1.25"
2112
- }
2113
- )
2114
- ]
2115
- })
2116
- ), ii = ri, ni = (e) => /* @__PURE__ */ i.jsxs(
2082
+ ), Xr = Jr, Ir = (e) => {
2083
+ var t = e, { className: s } = t, r = M(t, ["className"]);
2084
+ return /* @__PURE__ */ i.jsxs(
2085
+ "svg",
2086
+ A(j({
2087
+ width: "20",
2088
+ height: "20",
2089
+ viewBox: "0 0 20 20",
2090
+ fill: "none",
2091
+ xmlns: "http://www.w3.org/2000/svg",
2092
+ className: P("spinner", s)
2093
+ }, r), {
2094
+ children: [
2095
+ /* @__PURE__ */ i.jsx("circle", { cx: "10", cy: "10", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "1.5" }),
2096
+ /* @__PURE__ */ i.jsx(
2097
+ "circle",
2098
+ {
2099
+ cx: "10",
2100
+ cy: "10",
2101
+ r: "9",
2102
+ stroke: "currentColor",
2103
+ strokeWidth: "1.5",
2104
+ strokeLinecap: "round",
2105
+ strokeDasharray: "42.42 14.14"
2106
+ }
2107
+ )
2108
+ ]
2109
+ })
2110
+ );
2111
+ }, Br = Ir, ei = (e) => /* @__PURE__ */ i.jsxs(
2117
2112
  "svg",
2118
2113
  A(j({
2119
2114
  width: "24",
@@ -2147,7 +2142,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2147
2142
  /* @__PURE__ */ i.jsx("defs", { children: /* @__PURE__ */ i.jsx("clipPath", { id: "clip0_762_2934", children: /* @__PURE__ */ i.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2148
2143
  ]
2149
2144
  })
2150
- ), ai = ni, oi = (e) => {
2145
+ ), ti = ei, si = (e) => {
2151
2146
  const t = (s) => `${s}${e.suffix ? `_${e.suffix}` : ""}`;
2152
2147
  return /* @__PURE__ */ i.jsxs(
2153
2148
  "svg",
@@ -2318,7 +2313,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2318
2313
  ]
2319
2314
  })
2320
2315
  );
2321
- }, Kt = oi, li = (e) => /* @__PURE__ */ i.jsxs(
2316
+ }, Ut = si, ri = (e) => /* @__PURE__ */ i.jsxs(
2322
2317
  "svg",
2323
2318
  A(j({
2324
2319
  fill: "none",
@@ -2380,7 +2375,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2380
2375
  )
2381
2376
  ]
2382
2377
  })
2383
- ), ci = li, ui = (e) => /* @__PURE__ */ i.jsx(
2378
+ ), ii = ri, ni = (e) => /* @__PURE__ */ i.jsx(
2384
2379
  "svg",
2385
2380
  A(j({
2386
2381
  fill: "none",
@@ -2400,7 +2395,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2400
2395
  }
2401
2396
  )
2402
2397
  })
2403
- ), di = ui, hi = (e) => /* @__PURE__ */ i.jsxs(
2398
+ ), ai = ni, oi = (e) => /* @__PURE__ */ i.jsxs(
2404
2399
  "svg",
2405
2400
  A(j({
2406
2401
  width: "24",
@@ -2427,7 +2422,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2427
2422
  /* @__PURE__ */ i.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
2428
2423
  ]
2429
2424
  })
2430
- ), fi = hi, pi = (e) => {
2425
+ ), li = oi, ci = (e) => {
2431
2426
  var t = e, {
2432
2427
  variant: s,
2433
2428
  icon: r,
@@ -2435,7 +2430,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2435
2430
  title: o,
2436
2431
  description: l,
2437
2432
  className: c
2438
- } = t, f = O(t, [
2433
+ } = t, m = M(t, [
2439
2434
  "variant",
2440
2435
  "icon",
2441
2436
  "isStandalone",
@@ -2445,15 +2440,15 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2445
2440
  ]);
2446
2441
  return /* @__PURE__ */ i.jsx(
2447
2442
  "div",
2448
- A(j({}, f), {
2449
- className: N(
2443
+ A(j({}, m), {
2444
+ className: P(
2450
2445
  "card__empty-state",
2451
2446
  s === "error" && "card__empty-state--error",
2452
2447
  a && "card__empty-state--standalone",
2453
2448
  c
2454
2449
  ),
2455
2450
  children: /* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__wrapper", children: [
2456
- /* @__PURE__ */ i.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ i.jsx(ai, {}) : r }),
2451
+ /* @__PURE__ */ i.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ i.jsx(ti, {}) : r }),
2457
2452
  /* @__PURE__ */ i.jsxs("div", { className: "card__empty-state__content", children: [
2458
2453
  /* @__PURE__ */ i.jsx("p", { className: "card__empty-state__title", children: o }),
2459
2454
  /* @__PURE__ */ i.jsx("p", { className: "card__empty-state__description", children: l })
@@ -2461,13 +2456,13 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2461
2456
  ] })
2462
2457
  })
2463
2458
  );
2464
- }, mi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__footer", children: e }), vi = (e) => {
2459
+ }, ui = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__footer", children: e }), di = (e) => {
2465
2460
  var t = e, {
2466
2461
  variant: s = "default",
2467
2462
  sticky: r,
2468
2463
  className: a,
2469
2464
  children: o
2470
- } = t, l = O(t, [
2465
+ } = t, l = M(t, [
2471
2466
  "variant",
2472
2467
  "sticky",
2473
2468
  "className",
@@ -2476,7 +2471,7 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2476
2471
  return /* @__PURE__ */ i.jsx(
2477
2472
  "div",
2478
2473
  A(j({}, l), {
2479
- className: N(
2474
+ className: P(
2480
2475
  "card__header",
2481
2476
  s && `card__header--${s}`,
2482
2477
  r && "card__header--sticky",
@@ -2485,55 +2480,55 @@ var Hr = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__h
2485
2480
  children: o
2486
2481
  })
2487
2482
  );
2488
- }, gi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), yi = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: N("card__body__item", t), children: e }), Ci = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), xi = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
2483
+ }, hi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__image", children: e }), fi = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: P("card__body__item", t), children: e }), pi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "card__body__subtitle", children: e }), mi = ({ icon: e, children: t }) => /* @__PURE__ */ i.jsxs("div", { className: "card__header__title", children: [
2489
2484
  e && /* @__PURE__ */ i.jsx("span", { className: "card__header__title__icon", children: e }),
2490
2485
  t
2491
- ] }), Os = d.forwardRef(
2486
+ ] }), Es = d.forwardRef(
2492
2487
  (e, t) => {
2493
- var s = e, { type: r, children: a, className: o, variant: l = "default", disabled: c = !1 } = s, f = O(s, ["type", "children", "className", "variant", "disabled"]);
2488
+ var s = e, { type: r, children: a, className: o, variant: l = "default", disabled: c = !1 } = s, m = M(s, ["type", "children", "className", "variant", "disabled"]);
2494
2489
  return d.createElement(
2495
2490
  r,
2496
2491
  j({
2497
- className: N(
2492
+ className: P(
2498
2493
  "card",
2499
2494
  c && "card--disabled",
2500
2495
  l && `card--${l}`,
2501
2496
  o
2502
2497
  ),
2503
2498
  ref: t
2504
- }, f),
2499
+ }, m),
2505
2500
  a
2506
2501
  );
2507
2502
  }
2508
2503
  );
2509
- Os.displayName = "Card";
2510
- Object.assign(Os, {
2511
- Header: vi,
2512
- Action: Hr,
2513
- Title: xi,
2514
- Subtitle: Ci,
2515
- Body: $r,
2516
- Image: gi,
2517
- Item: yi,
2518
- Footer: mi,
2519
- EmptyState: pi
2504
+ Es.displayName = "Card";
2505
+ Object.assign(Es, {
2506
+ Header: di,
2507
+ Action: Rr,
2508
+ Title: mi,
2509
+ Subtitle: pi,
2510
+ Body: Dr,
2511
+ Image: hi,
2512
+ Item: fi,
2513
+ Footer: ui,
2514
+ EmptyState: ci
2520
2515
  });
2521
- var bi = (e) => {
2522
- var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2523
- return /* @__PURE__ */ i.jsx("div", A(j({ className: N("checkbox__content", s) }, a), { children: r }));
2524
- }, wi = (e) => {
2525
- var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2526
- return /* @__PURE__ */ i.jsx("span", A(j({ className: N("checkbox__hint", s) }, a), { children: r }));
2527
- }, Ls = d.createContext(void 0), ji = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(Ls.Provider, { value: { id: e, name: t }, children: s }), _i = () => {
2528
- const e = d.useContext(Ls);
2516
+ var vi = (e) => {
2517
+ var t = e, { className: s, children: r } = t, a = M(t, ["className", "children"]);
2518
+ return /* @__PURE__ */ i.jsx("div", A(j({ className: P("checkbox__content", s) }, a), { children: r }));
2519
+ }, yi = (e) => {
2520
+ var t = e, { className: s, children: r } = t, a = M(t, ["className", "children"]);
2521
+ return /* @__PURE__ */ i.jsx("span", A(j({ className: P("checkbox__hint", s) }, a), { children: r }));
2522
+ }, Ss = d.createContext(void 0), gi = ({ id: e, name: t, children: s }) => /* @__PURE__ */ i.jsx(Ss.Provider, { value: { id: e, name: t }, children: s }), Ci = () => {
2523
+ const e = d.useContext(Ss);
2529
2524
  if (!e)
2530
2525
  throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
2531
2526
  return e;
2532
- }, Ei = (e) => {
2533
- var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2534
- const { id: o } = _i();
2535
- return /* @__PURE__ */ i.jsx("label", A(j({ htmlFor: o, className: N("checkbox__label", s) }, a), { children: r }));
2536
- }, _e = (e) => {
2527
+ }, xi = (e) => {
2528
+ var t = e, { className: s, children: r } = t, a = M(t, ["className", "children"]);
2529
+ const { id: o } = Ci();
2530
+ return /* @__PURE__ */ i.jsx("label", A(j({ htmlFor: o, className: P("checkbox__label", s) }, a), { children: r }));
2531
+ }, je = (e) => {
2537
2532
  var t = e, {
2538
2533
  id: s,
2539
2534
  name: r,
@@ -2541,9 +2536,9 @@ var bi = (e) => {
2541
2536
  variant: o = "neutral",
2542
2537
  hasError: l = !1,
2543
2538
  single: c,
2544
- className: f,
2545
- children: g
2546
- } = t, u = O(t, [
2539
+ className: m,
2540
+ children: C
2541
+ } = t, u = M(t, [
2547
2542
  "id",
2548
2543
  "name",
2549
2544
  "isPending",
@@ -2553,13 +2548,13 @@ var bi = (e) => {
2553
2548
  "className",
2554
2549
  "children"
2555
2550
  ]);
2556
- const C = d.useRef(null);
2551
+ const b = d.useRef(null);
2557
2552
  return d.useEffect(() => {
2558
- C.current && (a ? C.current.indeterminate = !0 : C.current.indeterminate = !1);
2553
+ b.current && (a ? b.current.indeterminate = !0 : b.current.indeterminate = !1);
2559
2554
  }, [a]), /* @__PURE__ */ i.jsxs(
2560
2555
  "div",
2561
2556
  {
2562
- className: N("checkbox", o && `checkbox--${o}`, l && "checkbox--error"),
2557
+ className: P("checkbox", o && `checkbox--${o}`, l && "checkbox--error"),
2563
2558
  children: [
2564
2559
  /* @__PURE__ */ i.jsx(
2565
2560
  "input",
@@ -2567,102 +2562,102 @@ var bi = (e) => {
2567
2562
  id: s,
2568
2563
  name: r,
2569
2564
  type: "checkbox",
2570
- ref: C,
2571
- className: N("checkbox__input", f),
2565
+ ref: b,
2566
+ className: P("checkbox__input", m),
2572
2567
  value: c ? "true" : ""
2573
2568
  }, u)
2574
2569
  ),
2575
- a ? /* @__PURE__ */ i.jsx(ii, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(qr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2576
- /* @__PURE__ */ i.jsx(ji, { id: s, name: r, children: g })
2570
+ a ? /* @__PURE__ */ i.jsx(Br, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ i.jsx(Qr, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2571
+ /* @__PURE__ */ i.jsx(gi, { id: s, name: r, children: C })
2577
2572
  ]
2578
2573
  }
2579
2574
  );
2580
2575
  };
2581
- _e.Content = bi;
2582
- _e.Label = Ei;
2583
- _e.Hint = wi;
2584
- _e.Error = Error;
2585
- var Ai = (e) => {
2586
- var t = e, { type: s = "div", className: r, children: a } = t, o = O(t, ["type", "className", "children"]);
2587
- return d.createElement(s, j({ className: N("dialog__body", r) }, o), a);
2588
- }, Dt = () => document.body.style.removeProperty("overflow"), es = (e) => e.preventDefault(), Si = '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])', ki = (e) => {
2589
- var t = e, { className: s, children: r, shouldAnimate: a = !0 } = t, o = O(t, ["className", "children", "shouldAnimate"]);
2590
- const { ref: l, defaultOpen: c, isModal: f, onClose: g } = ot();
2576
+ je.Content = vi;
2577
+ je.Label = xi;
2578
+ je.Hint = yi;
2579
+ je.Error = Error;
2580
+ var bi = (e) => {
2581
+ var t = e, { type: s = "div", className: r, children: a } = t, o = M(t, ["type", "className", "children"]);
2582
+ return d.createElement(s, j({ className: P("dialog__body", r) }, o), a);
2583
+ }, Lt = () => document.body.style.removeProperty("overflow"), zt = (e) => e.preventDefault(), wi = '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])', ji = (e) => {
2584
+ var t = e, { className: s, children: r, shouldAnimate: a = !0 } = t, o = M(t, ["className", "children", "shouldAnimate"]);
2585
+ const { ref: l, defaultOpen: c, isModal: m, onClose: C } = nt();
2591
2586
  return d.useEffect(() => {
2592
2587
  const u = l == null ? void 0 : l.current;
2593
2588
  if (u != null && u.open) {
2594
- const C = u.querySelectorAll(Si), w = C[0], v = C[C.length - 1], b = (_) => {
2595
- if (!(_.key === "Tab"))
2589
+ const b = u.querySelectorAll(wi), v = b[0], f = b[b.length - 1], w = (E) => {
2590
+ if (!(E.key === "Tab"))
2596
2591
  return;
2597
- _.shiftKey ? document.activeElement === w && (v.focus(), _.preventDefault()) : document.activeElement === v && (w.focus(), _.preventDefault());
2592
+ E.shiftKey ? document.activeElement === v && (f.focus(), E.preventDefault()) : document.activeElement === f && (v.focus(), E.preventDefault());
2598
2593
  };
2599
- return document.body.style.overflow = "hidden", u.addEventListener("keydown", b), window.addEventListener("popstate", () => Dt()), () => {
2600
- u.removeEventListener("keydown", b), window.removeEventListener("popstate", () => Dt());
2594
+ return document.body.style.overflow = "hidden", u.addEventListener("keydown", w), window.addEventListener("popstate", () => Lt()), () => {
2595
+ u.removeEventListener("keydown", w), window.removeEventListener("popstate", () => Lt());
2601
2596
  };
2602
2597
  }
2603
2598
  }, [l]), d.useEffect(() => {
2604
2599
  const u = l == null ? void 0 : l.current;
2605
2600
  if (!u)
2606
2601
  return;
2607
- if (c && (u.removeAttribute("open"), u.showModal(), u.focus()), f)
2608
- return u.addEventListener("cancel", es), () => u.removeEventListener("cancel", es);
2609
- const C = ({ clientX: w, clientY: v }) => {
2610
- const { top: b, right: _, bottom: m, left: y } = u.getBoundingClientRect(), S = 0 < v && 0 < w, E = b < v && v < m, k = y < w && w < _;
2611
- S && !(E && k) && g();
2602
+ if (c && (u.removeAttribute("open"), u.showModal(), u.focus()), m)
2603
+ return u.addEventListener("cancel", zt), () => u.removeEventListener("cancel", zt);
2604
+ const b = ({ clientX: v, clientY: f }) => {
2605
+ const { top: w, right: E, bottom: y, left: g } = u.getBoundingClientRect(), S = 0 < f && 0 < v, _ = w < f && f < y, k = g < v && v < E;
2606
+ S && !(_ && k) && C();
2612
2607
  };
2613
- return u.addEventListener("cancel", g), u.addEventListener("mousedown", C), () => {
2614
- u.removeEventListener("cancel", g), u.removeEventListener("mousedown", C);
2608
+ return u.addEventListener("cancel", C), u.addEventListener("mousedown", b), () => {
2609
+ u.removeEventListener("cancel", C), u.removeEventListener("mousedown", b);
2615
2610
  };
2616
- }, [l, f, g, c]), /* @__PURE__ */ i.jsx(
2611
+ }, [l, m, C, c]), /* @__PURE__ */ i.jsx(
2617
2612
  "dialog",
2618
2613
  A(j({
2619
2614
  ref: l,
2620
2615
  open: c,
2621
- "aria-modal": !!f,
2616
+ "aria-modal": !!m,
2622
2617
  "aria-labelledby": "dialogTitle",
2623
- className: N("dialog", a && "dialog--animated", s)
2618
+ className: P("dialog", a && "dialog--animated", s)
2624
2619
  }, o), {
2625
2620
  children: r
2626
2621
  })
2627
2622
  );
2628
- }, Fs = d.createContext(void 0), Pi = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
2623
+ }, As = d.createContext(void 0), _i = ({ defaultOpen: e, onClose: t, isModal: s, children: r }) => {
2629
2624
  const a = d.useRef(null), o = d.useRef(t), l = d.useCallback(() => {
2630
2625
  var c;
2631
- Dt(), (c = a.current) == null || c.close(), o.current && (o == null || o.current());
2626
+ Lt(), (c = a.current) == null || c.close(), o.current && (o == null || o.current());
2632
2627
  }, [a]);
2633
- return /* @__PURE__ */ i.jsx(Fs.Provider, { value: { ref: a, defaultOpen: e, isModal: s, onClose: l }, children: r });
2634
- }, ot = () => {
2635
- const e = d.useContext(Fs);
2628
+ return /* @__PURE__ */ i.jsx(As.Provider, { value: { ref: a, defaultOpen: e, isModal: s, onClose: l }, children: r });
2629
+ }, nt = () => {
2630
+ const e = d.useContext(As);
2636
2631
  if (!e)
2637
2632
  throw new Error("Dialog compound components can not be rendered outside of Dialog");
2638
2633
  return e;
2639
- }, Ni = (e) => {
2640
- var t = e, { children: s } = t, r = O(t, ["children"]);
2641
- const { onClose: a } = ot();
2642
- return /* @__PURE__ */ i.jsx(at, A(j({ onClick: a }, r), { children: s }));
2643
- }, Rs = d.forwardRef((e, t) => {
2644
- var s = e, { className: r } = s, a = O(s, ["className"]);
2645
- const { onClose: o } = ot();
2634
+ }, Ei = (e) => {
2635
+ var t = e, { children: s } = t, r = M(t, ["children"]);
2636
+ const { onClose: a } = nt();
2637
+ return /* @__PURE__ */ i.jsx(it, A(j({ onClick: a }, r), { children: s }));
2638
+ }, Ps = d.forwardRef((e, t) => {
2639
+ var s = e, { className: r } = s, a = M(s, ["className"]);
2640
+ const { onClose: o } = nt();
2646
2641
  return /* @__PURE__ */ i.jsx(
2647
- at,
2642
+ it,
2648
2643
  j({
2649
2644
  type: "submit",
2650
2645
  ref: t,
2651
2646
  formMethod: "dialog",
2652
2647
  onClick: o,
2653
- iconLeft: /* @__PURE__ */ i.jsx(Wr, {}),
2648
+ iconLeft: /* @__PURE__ */ i.jsx($r, {}),
2654
2649
  variant: "icon--secondary",
2655
- className: N("dialog__close button--icon", r)
2650
+ className: P("dialog__close button--icon", r)
2656
2651
  }, a)
2657
2652
  );
2658
2653
  });
2659
- Rs.displayName = "Close";
2660
- var Mi = (e) => {
2661
- var t = e, { className: s, children: r } = t, a = O(t, ["className", "children"]);
2662
- return /* @__PURE__ */ i.jsx("div", A(j({ className: N("dialog__footer", s) }, a), { children: r }));
2663
- }, Oi = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), Li = (e) => {
2664
- var t = e, { icon: s, children: r, className: a } = t, o = O(t, ["icon", "children", "className"]);
2665
- const { ref: l } = ot(), c = d.useRef(null);
2654
+ Ps.displayName = "Close";
2655
+ var Si = (e) => {
2656
+ var t = e, { className: s, children: r } = t, a = M(t, ["className", "children"]);
2657
+ return /* @__PURE__ */ i.jsx("div", A(j({ className: P("dialog__footer", s) }, a), { children: r }));
2658
+ }, Ai = ({ children: e }) => /* @__PURE__ */ i.jsx("div", { className: "dialog__header", children: e }), Pi = (e) => {
2659
+ var t = e, { icon: s, children: r, className: a } = t, o = M(t, ["icon", "children", "className"]);
2660
+ const { ref: l } = nt(), c = d.useRef(null);
2666
2661
  return d.useEffect(() => {
2667
2662
  l != null && l.current && l.current.focus();
2668
2663
  }, [l]), /* @__PURE__ */ i.jsxs(
@@ -2671,7 +2666,7 @@ var Mi = (e) => {
2671
2666
  tabIndex: 0,
2672
2667
  ref: c,
2673
2668
  id: "dialogTitle",
2674
- className: N("dialog__header__title", a)
2669
+ className: P("dialog__header__title", a)
2675
2670
  }, o), {
2676
2671
  children: [
2677
2672
  s && /* @__PURE__ */ i.jsx("span", { className: "dialog__header__icon", children: s }),
@@ -2679,23 +2674,23 @@ var Mi = (e) => {
2679
2674
  ]
2680
2675
  })
2681
2676
  );
2682
- }, Fi = (e) => {
2683
- var t = e, { children: s } = t, r = O(t, ["children"]);
2684
- const { ref: a } = ot();
2685
- return /* @__PURE__ */ i.jsx(at, A(j({ onClick: () => {
2677
+ }, Ni = (e) => {
2678
+ var t = e, { children: s } = t, r = M(t, ["children"]);
2679
+ const { ref: a } = nt();
2680
+ return /* @__PURE__ */ i.jsx(it, A(j({ onClick: () => {
2686
2681
  var o;
2687
2682
  return (o = a == null ? void 0 : a.current) == null ? void 0 : o.showModal();
2688
2683
  } }, r), { children: s }));
2689
- }, $ = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(Pi, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
2690
- $.Trigger = Fi;
2691
- $.Root = ki;
2692
- $.Title = Li;
2693
- $.Header = Oi;
2694
- $.Body = Ai;
2695
- $.Footer = Mi;
2696
- $.Button = Ni;
2697
- $.Close = Rs;
2698
- var Ds = d.createContext(void 0), Ri = ({
2684
+ }, H = ({ defaultOpen: e, isModal: t, children: s, onClose: r }) => /* @__PURE__ */ i.jsx(_i, { defaultOpen: !!e, isModal: t, onClose: r, children: s });
2685
+ H.Trigger = Ni;
2686
+ H.Root = ji;
2687
+ H.Title = Pi;
2688
+ H.Header = Ai;
2689
+ H.Body = bi;
2690
+ H.Footer = Si;
2691
+ H.Button = Ei;
2692
+ H.Close = Ps;
2693
+ var Ns = d.createContext(void 0), ki = ({
2699
2694
  id: e,
2700
2695
  position: t,
2701
2696
  isOpen: s,
@@ -2704,10 +2699,10 @@ var Ds = d.createContext(void 0), Ri = ({
2704
2699
  setActiveItemIndex: o,
2705
2700
  clearActiveItemIndex: l,
2706
2701
  triggerRef: c,
2707
- contentRef: f,
2708
- children: g
2702
+ contentRef: m,
2703
+ children: C
2709
2704
  }) => /* @__PURE__ */ i.jsx(
2710
- Ds.Provider,
2705
+ Ns.Provider,
2711
2706
  {
2712
2707
  value: {
2713
2708
  id: e,
@@ -2718,16 +2713,16 @@ var Ds = d.createContext(void 0), Ri = ({
2718
2713
  setActiveItemIndex: o,
2719
2714
  clearActiveItemIndex: l,
2720
2715
  triggerRef: c,
2721
- contentRef: f
2716
+ contentRef: m
2722
2717
  },
2723
- children: g
2718
+ children: C
2724
2719
  }
2725
- ), Ts = () => {
2726
- const e = d.useContext(Ds);
2720
+ ), ks = () => {
2721
+ const e = d.useContext(Ns);
2727
2722
  if (e === void 0)
2728
2723
  throw new Error("useMenu must be used within a MenuProvider");
2729
2724
  return e;
2730
- }, Di = ({ as: e, children: t }) => {
2725
+ }, Oi = ({ as: e, children: t }) => {
2731
2726
  const {
2732
2727
  id: s,
2733
2728
  position: r,
@@ -2735,40 +2730,40 @@ var Ds = d.createContext(void 0), Ri = ({
2735
2730
  setIsOpen: o,
2736
2731
  activeItemIndex: l,
2737
2732
  setActiveItemIndex: c,
2738
- clearActiveItemIndex: f,
2739
- triggerRef: g,
2733
+ clearActiveItemIndex: m,
2734
+ triggerRef: C,
2740
2735
  contentRef: u
2741
- } = Ts(), C = (w) => {
2742
- var v;
2736
+ } = ks(), b = (v) => {
2737
+ var f;
2743
2738
  if (!a)
2744
2739
  return;
2745
- if (w.key === "Escape")
2746
- return f(), o(!1), (v = g.current) == null ? void 0 : v.focus();
2747
- const b = w.shiftKey, _ = Qs(u.current).length - 1;
2748
- switch (w.key) {
2740
+ if (v.key === "Escape")
2741
+ return m(), o(!1), (f = C.current) == null ? void 0 : f.focus();
2742
+ const w = v.shiftKey, E = Ms(u.current).length - 1;
2743
+ switch (v.key) {
2749
2744
  case "Tab": {
2750
- if (b && l !== 0)
2751
- return w.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2752
- if (!b && l !== _) {
2753
- w.preventDefault();
2754
- const m = l !== void 0 ? l + 1 : 0;
2755
- return c(Math.min(_, m));
2745
+ if (w && l !== 0)
2746
+ return v.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2747
+ if (!w && l !== E) {
2748
+ v.preventDefault();
2749
+ const y = l !== void 0 ? l + 1 : 0;
2750
+ return c(Math.min(E, y));
2756
2751
  }
2757
2752
  break;
2758
2753
  }
2759
2754
  case "ArrowUp":
2760
2755
  case "ArrowLeft":
2761
- return w.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2756
+ return v.preventDefault(), c(l ? Math.max(0, l - 1) : 0);
2762
2757
  case "ArrowDown":
2763
2758
  case "ArrowRight": {
2764
- w.preventDefault();
2765
- const m = l !== void 0 ? l + 1 : 0;
2766
- return c(Math.min(_, m));
2759
+ v.preventDefault();
2760
+ const y = l !== void 0 ? l + 1 : 0;
2761
+ return c(Math.min(E, y));
2767
2762
  }
2768
2763
  case "Home":
2769
- return w.preventDefault(), c(0);
2764
+ return v.preventDefault(), c(0);
2770
2765
  case "End":
2771
- return w.preventDefault(), c(_);
2766
+ return v.preventDefault(), c(E);
2772
2767
  }
2773
2768
  };
2774
2769
  return e ? d.createElement(
@@ -2776,8 +2771,8 @@ var Ds = d.createContext(void 0), Ri = ({
2776
2771
  {
2777
2772
  id: `${s}-content`,
2778
2773
  ref: u,
2779
- className: N("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2780
- onKeyDown: C
2774
+ className: P("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2775
+ onKeyDown: b
2781
2776
  },
2782
2777
  t
2783
2778
  ) : (
@@ -2787,19 +2782,19 @@ var Ds = d.createContext(void 0), Ri = ({
2787
2782
  {
2788
2783
  id: `${s}-content`,
2789
2784
  ref: u,
2790
- className: N("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2791
- onKeyDown: C,
2785
+ className: P("menu__list", `menu__list--${r}`, a && "menu__list--active"),
2786
+ onKeyDown: b,
2792
2787
  children: t
2793
2788
  }
2794
2789
  )
2795
2790
  );
2796
- }, Ti = (e) => {
2797
- var t = e, { children: s, className: r } = t, a = O(t, ["children", "className"]);
2798
- return /* @__PURE__ */ i.jsx("li", A(j({}, a), { className: N("menu__list-item", r), children: s }));
2799
- }, Us = ({ children: e, className: t }) => {
2800
- const { id: s, isOpen: r, setIsOpen: a, clearActiveItemIndex: o, setActiveItemIndex: l, triggerRef: c } = Ts(), f = () => {
2791
+ }, Mi = (e) => {
2792
+ var t = e, { children: s, className: r } = t, a = M(t, ["children", "className"]);
2793
+ return /* @__PURE__ */ i.jsx("li", A(j({}, a), { className: P("menu__list-item", r), children: s }));
2794
+ }, Os = ({ children: e, className: t }) => {
2795
+ const { id: s, isOpen: r, setIsOpen: a, clearActiveItemIndex: o, setActiveItemIndex: l, triggerRef: c } = ks(), m = () => {
2801
2796
  o(), a((u) => !u), r || l(0);
2802
- }, g = (u) => {
2797
+ }, C = (u) => {
2803
2798
  if (r) {
2804
2799
  if (u.key === "Escape")
2805
2800
  return o(), a(!1);
@@ -2809,41 +2804,41 @@ var Ds = d.createContext(void 0), Ri = ({
2809
2804
  return d.cloneElement(e, {
2810
2805
  id: `${s}-trigger`,
2811
2806
  ref: c,
2812
- className: N("menu__trigger", t),
2813
- onClick: f,
2814
- onKeyDown: g,
2807
+ className: P("menu__trigger", t),
2808
+ onClick: m,
2809
+ onKeyDown: C,
2815
2810
  "aria-expanded": r,
2816
2811
  "aria-controls": `${s}-content`
2817
2812
  });
2818
2813
  };
2819
- Us.displayName = "Trigger";
2820
- var Qs = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], J = (e) => {
2821
- var t = e, { type: s, id: r, position: a = "right", children: o, className: l } = t, c = O(t, ["type", "id", "position", "children", "className"]);
2822
- const f = d.useRef(null), g = d.useRef(null), u = d.useRef(null), [C, w] = d.useState(!1), [v, b] = d.useState(), [_, m] = d.useState(v);
2823
- v !== _ && v !== void 0 && u.current && (Qs(u.current)[v].firstChild.focus(), m(v));
2824
- const y = () => {
2825
- b(void 0), m(void 0);
2826
- }, S = (E) => {
2814
+ Os.displayName = "Trigger";
2815
+ var Ms = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsByTagName("ul")).reduce((s, r) => [...s, ...Array.from(r.getElementsByTagName("li"))], []) : [], Y = (e) => {
2816
+ var t = e, { type: s, id: r, position: a = "right", children: o, className: l } = t, c = M(t, ["type", "id", "position", "children", "className"]);
2817
+ const m = d.useRef(null), C = d.useRef(null), u = d.useRef(null), [b, v] = d.useState(!1), [f, w] = d.useState(), [E, y] = d.useState(f);
2818
+ f !== E && f !== void 0 && u.current && (Ms(u.current)[f].firstChild.focus(), y(f));
2819
+ const g = () => {
2820
+ w(void 0), y(void 0);
2821
+ }, S = (_) => {
2827
2822
  var k;
2828
- ((k = f.current) == null ? void 0 : k.contains(E.relatedTarget)) || (y(), w(!1));
2823
+ ((k = m.current) == null ? void 0 : k.contains(_.relatedTarget)) || (g(), v(!1));
2829
2824
  };
2830
2825
  return /* @__PURE__ */ i.jsx(
2831
- Ri,
2826
+ ki,
2832
2827
  {
2833
2828
  id: r,
2834
2829
  position: a,
2835
- isOpen: C,
2836
- setIsOpen: w,
2837
- activeItemIndex: v,
2838
- setActiveItemIndex: b,
2839
- clearActiveItemIndex: y,
2840
- triggerRef: g,
2830
+ isOpen: b,
2831
+ setIsOpen: v,
2832
+ activeItemIndex: f,
2833
+ setActiveItemIndex: w,
2834
+ clearActiveItemIndex: g,
2835
+ triggerRef: C,
2841
2836
  contentRef: u,
2842
2837
  children: d.createElement(
2843
2838
  s,
2844
2839
  A(j({}, c), {
2845
2840
  id: r,
2846
- ref: f,
2841
+ ref: m,
2847
2842
  className: `menu ${l || ""}`,
2848
2843
  onBlur: S
2849
2844
  }),
@@ -2852,30 +2847,30 @@ var Qs = (e) => e ? e.tagName === "UL" ? e.children : Array.from(e.getElementsBy
2852
2847
  }
2853
2848
  );
2854
2849
  };
2855
- J.Trigger = Us;
2856
- J.Content = Di;
2857
- J.Item = Ti;
2850
+ Y.Trigger = Os;
2851
+ Y.Content = Oi;
2852
+ Y.Item = Mi;
2858
2853
  d.createContext(void 0);
2859
- var Ui = (/* @__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");
2860
- [...new Set(Ui.values())].map((e) => ({
2854
+ var Li = (/* @__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");
2855
+ [...new Set(Li.values())].map((e) => ({
2861
2856
  label: `+${e}`,
2862
2857
  value: e
2863
2858
  }));
2864
2859
  d.createContext(void 0);
2865
2860
  d.createContext(void 0);
2866
- var gt = /* @__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))(gt || {});
2867
- const Qi = "/icons/bouMenuIcons.svg", Hi = ({
2861
+ var pt = /* @__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))(pt || {});
2862
+ const Fi = "/icons/bouMenuIcons.svg", Ri = ({
2868
2863
  bouIconId: e,
2869
2864
  ...t
2870
- }) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i.jsx("use", { href: `${Qi}#${gt[e]}` }) }), pe = ({
2865
+ }) => /* @__PURE__ */ i.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i.jsx("use", { href: `${Fi}#${pt[e]}` }) }), fe = ({
2871
2866
  className: e,
2872
2867
  label: t,
2873
2868
  mobileUrl: s,
2874
2869
  desktopUrl: r,
2875
2870
  icon: a
2876
2871
  }) => {
2877
- const o = Zs(), l = () => typeof a == "string" && a in gt ? /* @__PURE__ */ i.jsx(Hi, { bouIconId: gt[a] }) : a;
2878
- return /* @__PURE__ */ i.jsxs(J.Item, { className: e, children: [
2872
+ const o = $s(), l = () => typeof a == "string" && a in pt ? /* @__PURE__ */ i.jsx(Ri, { bouIconId: pt[a] }) : a;
2873
+ return /* @__PURE__ */ i.jsxs(Y.Item, { className: e, children: [
2879
2874
  (!o || o && !r) && /* @__PURE__ */ i.jsxs("a", { href: s, referrerPolicy: "no-referrer-when-downgrade", children: [
2880
2875
  l(),
2881
2876
  t
@@ -2885,41 +2880,108 @@ const Qi = "/icons/bouMenuIcons.svg", Hi = ({
2885
2880
  t
2886
2881
  ] })
2887
2882
  ] });
2888
- }, Hs = d.createContext(void 0), $i = ({
2889
- position: e,
2890
- bouMenuItems: t,
2891
- authenticationStatus: s,
2892
- profile: r,
2893
- children: a
2894
- }) => /* @__PURE__ */ i.jsx(Hs.Provider, { value: { position: e, bouMenuItems: t, authenticationStatus: s, profile: r }, children: a }), Gt = () => {
2895
- const e = d.useContext(Hs);
2883
+ }, Ls = d.createContext(void 0), Di = ({ position: e, bouMenuItems: t, children: s }) => /* @__PURE__ */ i.jsx(Ls.Provider, { value: { position: e, bouMenuItems: t }, children: s }), Fs = () => {
2884
+ const e = d.useContext(Ls);
2896
2885
  if (!e)
2897
2886
  throw new Error("Authentication context can not be rendered outside of Authentication");
2898
2887
  return e;
2899
- }, $s = d.createContext(void 0), Ki = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ i.jsx($s.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), Ks = () => {
2900
- const e = d.useContext($s);
2888
+ }, Rs = d.createContext(void 0), Ti = ({ apiUrl: e, redirectUrl: t, children: s }) => /* @__PURE__ */ i.jsx(Rs.Provider, { value: { apiUrl: e, redirectUrl: t }, children: s }), Qt = () => {
2889
+ const e = d.useContext(Rs);
2901
2890
  if (!e)
2902
2891
  throw new Error("Api context can not be rendered outside of Api");
2903
2892
  return e;
2904
- }, Gs = ({ apiUrl: e, redirectUrl: t, trackingInfo: s }) => {
2893
+ }, Ds = ({ apiUrl: e, redirectUrl: t, trackingInfo: s }) => {
2905
2894
  const r = new URLSearchParams({ redirectUrl: t });
2906
2895
  s && r.append("trackingInfo", s);
2907
2896
  const a = `${e}/login?${r.toString()}`, o = `${e}/logout?${r.toString()}`;
2908
2897
  return { loginUrl: a, logoutUrl: o };
2909
- }, qs = () => {
2910
- const { apiUrl: e, redirectUrl: t } = Ks(), s = zs();
2911
- return Gs({ apiUrl: e, redirectUrl: t, trackingInfo: s });
2912
- }, qe = () => {
2913
- const { apiUrl: e } = Ks(), { loginUrl: t, logoutUrl: s } = qs(), r = `${e}/user/profile`, a = `${e}/gdpr/tc/check`, o = `${e}/gdpr/tc`;
2898
+ }, yt = () => {
2899
+ const { apiUrl: e, redirectUrl: t } = Qt(), s = Ks();
2900
+ return Ds({ apiUrl: e, redirectUrl: t, trackingInfo: s });
2901
+ }, Ui = () => {
2902
+ const { apiUrl: e } = Qt();
2903
+ return `${`${e}/xtra`}/authentication/v1/user/profile`;
2904
+ }, Jt = (e) => e ? `+${e.countryCode} ${e.number}` : "", Xt = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), It = ({ apiUrl: e, redirectUrl: t }) => {
2905
+ const { loginUrl: s } = Ds({ apiUrl: e, redirectUrl: t });
2906
+ window.location.replace(s);
2907
+ }, Qi = (e) => {
2908
+ if (!e)
2909
+ return { user: { state: () => "NotAuthenticated" }, tryToLogon: It };
2910
+ const t = new Date(e.dateOfBirth), s = Xt(Ht.Mobile, e.phone), r = Xt(Ht.Fixed, e.phone), a = Jt(s) ?? Jt(r) ?? "";
2914
2911
  return {
2915
- loginUrl: t,
2916
- logoutUrl: s,
2917
- profileEndpoint: r,
2918
- getTermsAndConditionsEndpoint: a,
2919
- postTermsAndConditionsEndpoint: o
2912
+ user: {
2913
+ firstName: () => e.firstName,
2914
+ lastName: () => e.lastName,
2915
+ dob: () => t.getDate(),
2916
+ mob: () => t.getMonth() + 1,
2917
+ yob: () => t.getFullYear(),
2918
+ gender: () => e.genderCode,
2919
+ phone: () => a,
2920
+ streetName: () => {
2921
+ var o;
2922
+ return (o = e.address) == null ? void 0 : o.streetName;
2923
+ },
2924
+ houseNr: () => {
2925
+ var o;
2926
+ return (o = e.address) == null ? void 0 : o.houseNumber;
2927
+ },
2928
+ box: () => {
2929
+ var o;
2930
+ return (o = e.address) == null ? void 0 : o.letterBoxName;
2931
+ },
2932
+ zip: () => {
2933
+ var o;
2934
+ return (o = e.address) == null ? void 0 : o.postalCode;
2935
+ },
2936
+ city: () => {
2937
+ var o;
2938
+ return (o = e.address) == null ? void 0 : o.locationName;
2939
+ },
2940
+ country: () => {
2941
+ var o;
2942
+ return (o = e.address) == null ? void 0 : o.countryCode;
2943
+ },
2944
+ email: () => e.email,
2945
+ cbh: () => e.customerIdentifier,
2946
+ state: () => "Authenticated"
2947
+ },
2948
+ tryToLogon: It
2920
2949
  };
2921
- }, Gi = (e) => e != null && e.length ? /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: e == null ? void 0 : e.map(({ label: t, icon: s, url: r }, a) => /* @__PURE__ */ i.jsx(
2922
- pe,
2950
+ }, Ts = ["profile"], Us = () => {
2951
+ const { i18n: e } = _e(), t = Ui(), s = sessionStorage.getItem("profile"), r = !!s;
2952
+ return bs({
2953
+ queryKey: Ts,
2954
+ queryFn: async () => {
2955
+ const o = await fetch(t, {
2956
+ credentials: "include",
2957
+ mode: "cors",
2958
+ headers: { "Accept-Language": e.language }
2959
+ });
2960
+ if (!o.ok) {
2961
+ if (o.status === 401)
2962
+ return sessionStorage.removeItem("profile"), { authenticationStatus: "NotAuthenticated" };
2963
+ if (r)
2964
+ return { authenticationStatus: "Authenticated", profile: JSON.parse(s) };
2965
+ throw new Error("Failed to retrieve profile");
2966
+ }
2967
+ const l = await o.json(), { firstName: c, lastName: m } = l;
2968
+ return sessionStorage.setItem("profile", JSON.stringify({ firstName: c, lastName: m })), window.postMessage(
2969
+ { source: "xtra-authentication", isAuthenticated: !0 },
2970
+ new URL(window.location.href).origin
2971
+ ), window.XTRA = { ...window.XTRA, ...Qi(l) }, {
2972
+ authenticationStatus: "Authenticated",
2973
+ profile: { firstName: l.firstName, lastName: l.lastName }
2974
+ };
2975
+ },
2976
+ initialData: r ? {
2977
+ authenticationStatus: "Authenticated",
2978
+ profile: JSON.parse(s)
2979
+ } : void 0,
2980
+ placeholderData: { authenticationStatus: "Pending" },
2981
+ refetchOnWindowFocus: !1
2982
+ });
2983
+ }, Hi = (e) => e != null && e.length ? /* @__PURE__ */ i.jsx("ul", { className: "bou-menu__list", children: e == null ? void 0 : e.map(({ label: t, icon: s, url: r }, a) => /* @__PURE__ */ i.jsx(
2984
+ fe,
2923
2985
  {
2924
2986
  className: "bou-menu-item",
2925
2987
  mobileUrl: r,
@@ -2927,94 +2989,94 @@ const Qi = "/icons/bouMenuIcons.svg", Hi = ({
2927
2989
  label: t
2928
2990
  },
2929
2991
  a
2930
- )) }) : null, qi = () => {
2931
- const { t: e } = Ee(), t = ps(), { position: s, profile: r, bouMenuItems: a } = Gt(), { logoutUrl: o } = qe(), l = (r == null ? void 0 : r.firstName) ?? "", c = (r == null ? void 0 : r.lastName) ?? "";
2932
- return /* @__PURE__ */ i.jsxs(J, { type: "nav", id: "xtra-menu", position: s, children: [
2992
+ )) }) : null, $i = () => {
2993
+ const { t: e } = _e(), t = cs(), { position: s, bouMenuItems: r } = Fs(), { logoutUrl: a } = yt(), l = Dt().getQueryData(Ts), c = (l == null ? void 0 : l.profile.firstName) ?? "", m = (l == null ? void 0 : l.profile.lastName) ?? "";
2994
+ return /* @__PURE__ */ i.jsxs(Y, { type: "nav", id: "xtra-menu", position: s, children: [
2933
2995
  /* @__PURE__ */ i.jsx(
2934
- J.Trigger,
2996
+ Y.Trigger,
2935
2997
  {
2936
- className: N(
2998
+ className: P(
2937
2999
  "button",
2938
3000
  "button--neutral",
2939
3001
  "button--authentication",
2940
3002
  "button--authentication--authenticated"
2941
3003
  ),
2942
3004
  children: /* @__PURE__ */ i.jsxs("button", { children: [
2943
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Ur, { variant: "small", firstName: l, lastName: c }) }),
2944
- /* @__PURE__ */ i.jsx("span", { className: "button__label", children: l }),
2945
- /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx($t, {}) })
3005
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Lr, { variant: "small", firstName: c, lastName: m }) }),
3006
+ /* @__PURE__ */ i.jsx("span", { className: "button__label", children: c }),
3007
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Tt, {}) })
2946
3008
  ] })
2947
3009
  }
2948
3010
  ),
2949
- /* @__PURE__ */ i.jsxs(J.Content, { as: "div", children: [
2950
- Gi(a),
3011
+ /* @__PURE__ */ i.jsxs(Y.Content, { as: "div", children: [
3012
+ Hi(r),
2951
3013
  /* @__PURE__ */ i.jsxs("ul", { children: [
2952
3014
  /* @__PURE__ */ i.jsx(
2953
- pe,
3015
+ fe,
2954
3016
  {
2955
3017
  className: "manage-profile",
2956
3018
  mobileUrl: `${t}/manage-profile`,
2957
3019
  desktopUrl: `${t}/manage-profile/personal-data`,
2958
- icon: /* @__PURE__ */ i.jsx(ei, {}),
3020
+ icon: /* @__PURE__ */ i.jsx(zr, {}),
2959
3021
  label: e("manageProfile")
2960
3022
  }
2961
3023
  ),
2962
3024
  /* @__PURE__ */ i.jsx(
2963
- pe,
3025
+ fe,
2964
3026
  {
2965
3027
  className: "payment",
2966
3028
  mobileUrl: `${t}/payment`,
2967
- icon: /* @__PURE__ */ i.jsx(di, {}),
3029
+ icon: /* @__PURE__ */ i.jsx(ai, {}),
2968
3030
  label: e("payment")
2969
3031
  }
2970
3032
  ),
2971
3033
  /* @__PURE__ */ i.jsx(
2972
- pe,
3034
+ fe,
2973
3035
  {
2974
3036
  className: "gift-cards",
2975
3037
  mobileUrl: `${t}/gift-cards`,
2976
- icon: /* @__PURE__ */ i.jsx(ci, {}),
3038
+ icon: /* @__PURE__ */ i.jsx(ii, {}),
2977
3039
  label: e("giftCards")
2978
3040
  }
2979
3041
  ),
2980
3042
  /* @__PURE__ */ i.jsx(
2981
- pe,
3043
+ fe,
2982
3044
  {
2983
3045
  mobileUrl: `${t}/identifiers`,
2984
- icon: /* @__PURE__ */ i.jsx(fi, {}),
3046
+ icon: /* @__PURE__ */ i.jsx(li, {}),
2985
3047
  label: e("qrCode")
2986
3048
  }
2987
3049
  ),
2988
3050
  /* @__PURE__ */ i.jsx(
2989
- pe,
3051
+ fe,
2990
3052
  {
2991
3053
  className: "manage-privacy",
2992
3054
  mobileUrl: `${t}/manage-privacy`,
2993
3055
  desktopUrl: `${t}/manage-privacy/permissions`,
2994
- icon: /* @__PURE__ */ i.jsx(Ir, {}),
3056
+ icon: /* @__PURE__ */ i.jsx(Zr, {}),
2995
3057
  label: e("privacy")
2996
3058
  }
2997
3059
  ),
2998
- /* @__PURE__ */ i.jsx(pe, { mobileUrl: o, icon: /* @__PURE__ */ i.jsx(Jr, {}), label: e("logout") })
3060
+ /* @__PURE__ */ i.jsx(fe, { mobileUrl: a, icon: /* @__PURE__ */ i.jsx(qr, {}), label: e("logout") })
2999
3061
  ] })
3000
3062
  ] })
3001
3063
  ] });
3002
- }, Vi = () => {
3003
- const { t: e } = Ee();
3004
- return /* @__PURE__ */ i.jsxs("button", { className: N("button", "button--neutral", "button--authentication"), children: [
3064
+ }, Ki = () => {
3065
+ const { t: e } = _e();
3066
+ return /* @__PURE__ */ i.jsxs("button", { className: P("button", "button--neutral", "button--authentication"), children: [
3005
3067
  /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx("i", { className: "spinner" }) }),
3006
3068
  /* @__PURE__ */ i.jsxs("span", { className: "button__label", children: [
3007
3069
  e("loading"),
3008
3070
  "..."
3009
3071
  ] })
3010
3072
  ] });
3011
- }, Wi = ({ className: e }) => {
3012
- const { t } = Ee(), { loginUrl: s } = qe();
3073
+ }, Gi = ({ className: e }) => {
3074
+ const { t } = _e(), { loginUrl: s } = yt();
3013
3075
  return /* @__PURE__ */ i.jsxs(
3014
3076
  "a",
3015
3077
  {
3016
3078
  href: s,
3017
- className: N(
3079
+ className: P(
3018
3080
  "button",
3019
3081
  "button--neutral",
3020
3082
  "button--authentication",
@@ -3022,17 +3084,17 @@ const Qi = "/icons/bouMenuIcons.svg", Hi = ({
3022
3084
  e
3023
3085
  ),
3024
3086
  children: [
3025
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Kt, { width: 24, height: 24, suffix: "desktop" }) }),
3087
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Ut, { width: 24, height: 24, suffix: "desktop" }) }),
3026
3088
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: t("login") }),
3027
- /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx($t, {}) })
3089
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Tt, {}) })
3028
3090
  ]
3029
3091
  }
3030
3092
  );
3031
3093
  };
3032
- const Zi = () => {
3033
- const { t: e } = Ee(), { loginUrl: t } = qe(), s = ps(), { position: r } = Gt();
3094
+ const Vi = () => {
3095
+ const { t: e } = _e(), { loginUrl: t } = yt(), s = cs(), { position: r } = Fs();
3034
3096
  return /* @__PURE__ */ i.jsxs(
3035
- J,
3097
+ Y,
3036
3098
  {
3037
3099
  type: "nav",
3038
3100
  id: "xtra-menu",
@@ -3040,211 +3102,41 @@ const Zi = () => {
3040
3102
  className: "menu--unauthenticated",
3041
3103
  "aria-label": e("xtraMenuAriaLabel"),
3042
3104
  children: [
3043
- /* @__PURE__ */ i.jsx(J.Trigger, { className: N("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
3044
- /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Kt, { width: 24, height: 24, suffix: "mobile" }) }),
3045
- /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx($t, {}) })
3105
+ /* @__PURE__ */ i.jsx(Y.Trigger, { className: P("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ i.jsxs("button", { children: [
3106
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Ut, { width: 24, height: 24, suffix: "mobile" }) }),
3107
+ /* @__PURE__ */ i.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ i.jsx(Tt, {}) })
3046
3108
  ] }) }),
3047
- /* @__PURE__ */ i.jsxs(J.Content, { children: [
3048
- /* @__PURE__ */ i.jsx(J.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: t, className: "button button--with-icon", children: [
3049
- /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(zr, {}) }),
3109
+ /* @__PURE__ */ i.jsxs(Y.Content, { children: [
3110
+ /* @__PURE__ */ i.jsx(Y.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: t, className: "button button--with-icon", children: [
3111
+ /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Gr, {}) }),
3050
3112
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("login") })
3051
3113
  ] }) }),
3052
- /* @__PURE__ */ i.jsx(J.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
3053
- /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(si, {}) }),
3114
+ /* @__PURE__ */ i.jsx(Y.Item, { children: /* @__PURE__ */ i.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
3115
+ /* @__PURE__ */ i.jsx("span", { className: "button__icon", children: /* @__PURE__ */ i.jsx(Xr, {}) }),
3054
3116
  /* @__PURE__ */ i.jsx("span", { className: "button__label", children: e("register") })
3055
3117
  ] }) })
3056
3118
  ] })
3057
3119
  ]
3058
3120
  }
3059
3121
  );
3060
- };
3061
- var Y = /* @__PURE__ */ ((e) => (e.Authenticated = "authenticated", e.NotAuthenticated = "notAuthenticated", e.Pending = "pending", e))(Y || {});
3062
- const zi = () => {
3063
- const { authenticationStatus: e } = Gt();
3064
- return e === Y.NotAuthenticated ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3065
- /* @__PURE__ */ i.jsx(Wi, {}),
3066
- /* @__PURE__ */ i.jsx(Zi, {})
3067
- ] }) : e === Y.Pending ? /* @__PURE__ */ i.jsx(Vi, {}) : /* @__PURE__ */ i.jsx(qi, {});
3068
- };
3069
- /*! js-cookie v3.0.5 | MIT */
3070
- function ct(e) {
3071
- for (var t = 1; t < arguments.length; t++) {
3072
- var s = arguments[t];
3073
- for (var r in s)
3074
- e[r] = s[r];
3075
- }
3076
- return e;
3077
- }
3078
- var Yi = {
3079
- read: function(e) {
3080
- return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
3081
- },
3082
- write: function(e) {
3083
- return encodeURIComponent(e).replace(
3084
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
3085
- decodeURIComponent
3086
- );
3087
- }
3088
- };
3089
- function Tt(e, t) {
3090
- function s(a, o, l) {
3091
- if (!(typeof document > "u")) {
3092
- l = ct({}, t, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), a = encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3093
- var c = "";
3094
- for (var f in l)
3095
- l[f] && (c += "; " + f, l[f] !== !0 && (c += "=" + l[f].split(";")[0]));
3096
- return document.cookie = a + "=" + e.write(o, a) + c;
3097
- }
3098
- }
3099
- function r(a) {
3100
- if (!(typeof document > "u" || arguments.length && !a)) {
3101
- for (var o = document.cookie ? document.cookie.split("; ") : [], l = {}, c = 0; c < o.length; c++) {
3102
- var f = o[c].split("="), g = f.slice(1).join("=");
3103
- try {
3104
- var u = decodeURIComponent(f[0]);
3105
- if (l[u] = e.read(g, u), a === u)
3106
- break;
3107
- } catch {
3108
- }
3109
- }
3110
- return a ? l[a] : l;
3111
- }
3112
- }
3113
- return Object.create(
3114
- {
3115
- set: s,
3116
- get: r,
3117
- remove: function(a, o) {
3118
- s(
3119
- a,
3120
- "",
3121
- ct({}, o, {
3122
- expires: -1
3123
- })
3124
- );
3125
- },
3126
- withAttributes: function(a) {
3127
- return Tt(this.converter, ct({}, this.attributes, a));
3128
- },
3129
- withConverter: function(a) {
3130
- return Tt(ct({}, this.converter, a), this.attributes);
3131
- }
3132
- },
3133
- {
3134
- attributes: { value: Object.freeze(t) },
3135
- converter: { value: Object.freeze(e) }
3136
- }
3137
- );
3138
- }
3139
- var Ut = Tt(Yi, { path: "/" });
3140
- class yt extends Error {
3141
- constructor(t) {
3142
- super(t), this.name = "UnauthorizedError";
3143
- }
3144
- }
3145
- const Ji = () => {
3146
- const { i18n: e } = Ee(), { profileEndpoint: t } = qe();
3147
- return ks({
3148
- queryKey: ["profile"],
3149
- queryFn: async () => {
3150
- const r = await fetch(t, {
3151
- credentials: "include",
3152
- mode: "cors",
3153
- headers: { "Accept-Language": e.language }
3154
- });
3155
- if (!r.ok)
3156
- throw r.status === 401 ? new yt(`${r.status} - ${r.statusText}`) : new Error("Network response was not ok");
3157
- return await r.json();
3158
- },
3159
- retry: (r, a) => a instanceof yt ? !1 : r < 2,
3160
- refetchOnWindowFocus: !1
3161
- });
3162
- }, ts = (e) => e ? `+${e.countryCode} ${e.number}` : "", ss = (e, t) => t == null ? void 0 : t.find((s) => s.type === e), rs = ({ apiUrl: e, redirectUrl: t }) => {
3163
- const { loginUrl: s } = Gs({ apiUrl: e, redirectUrl: t });
3164
- window.location.replace(s);
3165
- }, Xi = (e) => {
3166
- if (!e)
3167
- return { user: { state: () => Y.NotAuthenticated }, tryToLogon: rs };
3168
- const t = new Date(e.dateOfBirth), s = ss(qt.Mobile, e.phone), r = ss(qt.Fixed, e.phone), a = ts(s) ?? ts(r) ?? "";
3169
- return {
3170
- user: {
3171
- firstName: () => e.firstName,
3172
- lastName: () => e.lastName,
3173
- dob: () => t.getDate(),
3174
- mob: () => t.getMonth() + 1,
3175
- yob: () => t.getFullYear(),
3176
- gender: () => e.genderCode,
3177
- phone: () => a,
3178
- streetName: () => {
3179
- var o;
3180
- return (o = e.address) == null ? void 0 : o.streetName;
3181
- },
3182
- houseNr: () => {
3183
- var o;
3184
- return (o = e.address) == null ? void 0 : o.houseNumber;
3185
- },
3186
- box: () => {
3187
- var o;
3188
- return (o = e.address) == null ? void 0 : o.letterBoxName;
3189
- },
3190
- zip: () => {
3191
- var o;
3192
- return (o = e.address) == null ? void 0 : o.postalCode;
3193
- },
3194
- city: () => {
3195
- var o;
3196
- return (o = e.address) == null ? void 0 : o.locationName;
3197
- },
3198
- country: () => {
3199
- var o;
3200
- return (o = e.address) == null ? void 0 : o.countryCode;
3201
- },
3202
- email: () => e.email,
3203
- cbh: () => e.customerIdentifier,
3204
- state: () => Y.Authenticated
3205
- },
3206
- tryToLogon: rs
3207
- };
3208
- }, Vs = () => {
3209
- const e = Ji(), t = Ut.get("profile"), s = !!t, [r, a] = d.useState(
3210
- s ? Y.Authenticated : Y.Pending
3211
- ), [o, l] = d.useState(
3212
- s ? JSON.parse(t) : void 0
3213
- );
3214
- return d.useEffect(() => {
3215
- e.isError && e.error instanceof yt && (Ut.remove("profile"), a(Y.NotAuthenticated)), e.isError && !(e.error instanceof yt) && a(
3216
- s ? Y.Authenticated : Y.NotAuthenticated
3217
- ), e.isSuccess && (a(Y.Authenticated), l(e.data), window.postMessage(
3218
- { source: "xtra-authentication", isAuthenticated: !0 },
3219
- new URL(window.location.href).origin
3220
- )), window.XTRA = Xi(e.data);
3221
- }, [
3222
- s,
3223
- e.data,
3224
- e.error,
3225
- e.isError,
3226
- e.isSuccess
3227
- ]), { authenticationStatus: r, profile: o };
3228
- }, Ii = ({ position: e, bouMenuItems: t }) => {
3229
- const { authenticationStatus: s, profile: r } = Vs();
3230
- return /* @__PURE__ */ i.jsx(
3231
- $i,
3232
- {
3233
- bouMenuItems: t,
3234
- authenticationStatus: s,
3235
- position: e,
3236
- profile: r,
3237
- children: /* @__PURE__ */ i.jsx(zi, {})
3238
- }
3239
- );
3240
- }, Bi = () => {
3241
- const { postTermsAndConditionsEndpoint: e } = qe(), t = new ws();
3242
- return Sr({
3122
+ }, qi = () => {
3123
+ var t, s;
3124
+ const e = Us();
3125
+ return ((t = e.data) == null ? void 0 : t.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ i.jsx($i, {}) : ((s = e.data) == null ? void 0 : s.authenticationStatus) === "NotAuthenticated" || e.isError ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3126
+ /* @__PURE__ */ i.jsx(Gi, {}),
3127
+ /* @__PURE__ */ i.jsx(Vi, {})
3128
+ ] }) : /* @__PURE__ */ i.jsx(Ki, {});
3129
+ }, Qs = () => {
3130
+ const { apiUrl: e } = Qt();
3131
+ return `${`${e}/xtra`}/authentication/v1/gdpr`;
3132
+ }, Wi = () => {
3133
+ const e = Qs(), t = new vs();
3134
+ return wr({
3243
3135
  mutationFn: async (r) => {
3244
- const a = await fetch(e, {
3245
- method: "post",
3136
+ const a = await fetch(`${e}/tc`, {
3246
3137
  body: JSON.stringify({ acceptedTC: r }),
3247
3138
  credentials: "include",
3139
+ method: "POST",
3248
3140
  mode: "cors"
3249
3141
  });
3250
3142
  if (!a.ok)
@@ -3255,88 +3147,89 @@ const Ji = () => {
3255
3147
  await t.invalidateQueries({ queryKey: ["gdpr"] });
3256
3148
  }
3257
3149
  });
3258
- }, en = () => {
3259
- const { i18n: e } = Ee(), { getTermsAndConditionsEndpoint: t } = qe(), { authenticationStatus: s } = Vs(), r = Ut.get("hasAcceptedLatestTermsAndConditions"), a = [], o = r === "true", l = s === Y.Authenticated;
3260
- return ks({
3150
+ }, Zi = () => {
3151
+ var o;
3152
+ const { i18n: e } = _e(), t = Qs(), r = ((o = Us().data) == null ? void 0 : o.authenticationStatus) === "Authenticated";
3153
+ return bs({
3261
3154
  queryKey: ["gdpr"],
3262
3155
  queryFn: async () => {
3263
- const f = await fetch(t, {
3156
+ const l = await fetch(`${t}/tc/check`, {
3264
3157
  credentials: "include",
3265
3158
  mode: "cors",
3266
3159
  headers: { "Accept-Language": e.language }
3267
3160
  });
3268
- if (!f.ok)
3161
+ if (!l.ok)
3269
3162
  throw new Error("Network response was not ok");
3270
- return await f.json();
3163
+ return l.status === 204 ? [] : await l.json();
3271
3164
  },
3272
- enabled: l && !o,
3273
- initialData: a
3165
+ enabled: r
3274
3166
  });
3275
- }, tn = () => {
3276
- const { t: e } = Ee(), { logoutUrl: t } = qs(), s = d.useRef(null), [r, a] = d.useState(0), [o, l] = d.useState({}), { mutate: c, isError: f } = Bi(), { AccessibleFormMessage: g, formRef: u } = Ys({ submitCount: r, errors: o }), { data: C } = en(), w = !!(C != null && C.length), v = e("termsAndConditions.error.required"), b = () => {
3277
- var m;
3278
- (m = s == null ? void 0 : s.current) == null || m.click(), document.body.style.removeProperty("overflow");
3167
+ }, Yi = () => {
3168
+ var y;
3169
+ const { t: e } = _e(), { logoutUrl: t } = yt(), s = d.useRef(null), [r, a] = d.useState(0), [o, l] = d.useState({}), { mutate: c, isError: m } = Wi(), { AccessibleFormMessage: C, formRef: u } = Gs({ submitCount: r, errors: o }), b = Zi(), v = !!((y = b.data) != null && y.length), f = e("termsAndConditions.error.required"), w = () => {
3170
+ var g;
3171
+ (g = s == null ? void 0 : s.current) == null || g.click(), document.body.style.removeProperty("overflow");
3279
3172
  };
3280
3173
  d.useEffect(() => {
3281
- w && document.body.style.setProperty("overflow", "hidden");
3282
- }, [w]), d.useEffect(() => {
3283
- f && l({ acceptedTC: v });
3284
- }, [v, f]);
3285
- const _ = (m) => {
3286
- m.preventDefault(), a(r + 1);
3287
- const { acceptedTC: y } = m.target;
3288
- if (y instanceof RadioNodeList) {
3289
- const S = Object.values(y);
3290
- S.every((k) => k.checked) ? (l({}), c(S.map((k) => k.value)), b()) : l({ acceptedTC: v });
3174
+ v && document.body.style.setProperty("overflow", "hidden");
3175
+ }, [v]), d.useEffect(() => {
3176
+ m && l({ acceptedTC: f });
3177
+ }, [f, m]);
3178
+ const E = (g) => {
3179
+ g.preventDefault(), a(r + 1);
3180
+ const { acceptedTC: S } = g.target;
3181
+ if (S instanceof RadioNodeList) {
3182
+ const _ = Object.values(S);
3183
+ _.every((L) => L.checked) ? (l({}), c(_.map((L) => L.value)), w()) : l({ acceptedTC: f });
3291
3184
  } else
3292
- y != null && y.checked ? (l({}), c([y.value]), b()) : l({ acceptedTC: v });
3185
+ S != null && S.checked ? (l({}), c([S.value]), w()) : l({ acceptedTC: f });
3293
3186
  };
3294
- return w ? /* @__PURE__ */ i.jsxs($, { defaultOpen: w, isModal: !0, children: [
3295
- g,
3296
- /* @__PURE__ */ i.jsxs($.Root, { children: [
3297
- /* @__PURE__ */ i.jsx($.Header, { children: /* @__PURE__ */ i.jsx($.Title, { icon: /* @__PURE__ */ i.jsx(Kt, { role: "presentation" }), children: /* @__PURE__ */ i.jsx(an, { children: e("termsAndConditions.title") }) }) }),
3298
- /* @__PURE__ */ i.jsx($.Body, { children: /* @__PURE__ */ i.jsxs(Ws, { ref: u, id: "tc-form", onSubmit: _, children: [
3299
- /* @__PURE__ */ i.jsxs(rn, { children: [
3187
+ return v ? /* @__PURE__ */ i.jsxs(H, { defaultOpen: v, isModal: !0, children: [
3188
+ C,
3189
+ /* @__PURE__ */ i.jsxs(H.Root, { children: [
3190
+ /* @__PURE__ */ i.jsx(H.Header, { children: /* @__PURE__ */ i.jsx(H.Title, { icon: /* @__PURE__ */ i.jsx(Ut, { role: "presentation" }), children: /* @__PURE__ */ i.jsx(Ii, { children: e("termsAndConditions.title") }) }) }),
3191
+ /* @__PURE__ */ i.jsx(H.Body, { children: /* @__PURE__ */ i.jsxs(Hs, { ref: u, id: "tc-form", onSubmit: E, children: [
3192
+ /* @__PURE__ */ i.jsxs(Ji, { children: [
3300
3193
  e("termsAndConditions.description"),
3301
- o.acceptedTC && /* @__PURE__ */ i.jsx(on, { children: v })
3194
+ o.acceptedTC && /* @__PURE__ */ i.jsx(Bi, { children: f })
3302
3195
  ] }),
3303
- C.map(({ tcCode: m, title: y, URL: S }) => /* @__PURE__ */ i.jsx(
3304
- _e,
3196
+ b.data.map(({ tcCode: g, title: S, URL: _ }) => /* @__PURE__ */ i.jsx(
3197
+ je,
3305
3198
  {
3306
- id: m,
3307
- value: m,
3199
+ id: g,
3200
+ value: g,
3308
3201
  name: "acceptedTC",
3309
3202
  variant: "primary",
3310
- children: /* @__PURE__ */ i.jsxs(_e.Content, { children: [
3311
- /* @__PURE__ */ i.jsx(sn, { children: y }),
3312
- /* @__PURE__ */ i.jsx(nn, { href: S, children: e("termsAndConditions.action", { title: y }) })
3203
+ children: /* @__PURE__ */ i.jsxs(je.Content, { children: [
3204
+ /* @__PURE__ */ i.jsx(zi, { children: S }),
3205
+ /* @__PURE__ */ i.jsx(Xi, { href: _, children: e("termsAndConditions.action", { title: S }) })
3313
3206
  ] })
3314
3207
  },
3315
- m
3208
+ g
3316
3209
  ))
3317
3210
  ] }) }),
3318
- /* @__PURE__ */ i.jsxs($.Footer, { children: [
3211
+ /* @__PURE__ */ i.jsxs(H.Footer, { children: [
3319
3212
  /* @__PURE__ */ i.jsx(
3320
3213
  "a",
3321
3214
  {
3322
- className: N("button", "button--secondary", "button--terms-and-conditions"),
3215
+ className: P("button", "button--secondary", "button--terms-and-conditions"),
3323
3216
  href: t,
3324
3217
  children: e("logout")
3325
3218
  }
3326
3219
  ),
3327
- /* @__PURE__ */ i.jsx(at, { form: "tc-form", type: "submit", variant: "primary", children: e("confirm") })
3220
+ /* @__PURE__ */ i.jsx(it, { form: "tc-form", type: "submit", variant: "primary", children: e("confirm") })
3328
3221
  ] })
3329
3222
  ] })
3330
3223
  ] }) : /* @__PURE__ */ i.jsx(i.Fragment, {});
3331
- }, sn = ({
3224
+ }, zi = ({
3332
3225
  children: e,
3333
3226
  ...t
3334
- }) => /* @__PURE__ */ i.jsx(_e.Label, { className: "form--tc__label", ...t, children: e }), Ws = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
3335
- Ws.displayName = "TermsAndConditionsForm";
3336
- const rn = ({
3227
+ }) => /* @__PURE__ */ i.jsx(je.Label, { className: "form--tc__label", ...t, children: e }), Hs = d.forwardRef(({ children: e, ...t }, s) => /* @__PURE__ */ i.jsx("form", { className: "form--tc", ref: s, ...t, children: e }));
3228
+ Hs.displayName = "TermsAndConditionsForm";
3229
+ const Ji = ({
3337
3230
  children: e,
3338
3231
  ...t
3339
- }) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...t, children: e }), nn = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx(
3232
+ }) => /* @__PURE__ */ i.jsx("p", { className: "form--tc__description", ...t, children: e }), Xi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx(
3340
3233
  "a",
3341
3234
  {
3342
3235
  className: "form--tc__link",
@@ -3347,10 +3240,10 @@ const rn = ({
3347
3240
  ...t,
3348
3241
  children: e
3349
3242
  }
3350
- ), an = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), on = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), ln = new ws(), dn = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, bouMenuItems: a }) => /* @__PURE__ */ i.jsx(Js, { environment: e, children: /* @__PURE__ */ i.jsx(Ki, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(mr, { client: ln, children: [
3351
- /* @__PURE__ */ i.jsx(Ii, { position: r, bouMenuItems: a }),
3352
- /* @__PURE__ */ i.jsx(tn, {})
3243
+ ), Ii = ({ children: e }) => /* @__PURE__ */ i.jsx("h1", { className: "form--tc__title", children: e }), Bi = ({ children: e, ...t }) => /* @__PURE__ */ i.jsx("span", { className: "form--tc__error", role: "alert", ...t, children: e }), en = new vs(), rn = ({ environment: e, redirectUrl: t, apiUrl: s, position: r, bouMenuItems: a }) => /* @__PURE__ */ i.jsx(Vs, { environment: e, children: /* @__PURE__ */ i.jsx(Ti, { apiUrl: s, redirectUrl: t, children: /* @__PURE__ */ i.jsxs(ur, { client: en, children: [
3244
+ /* @__PURE__ */ i.jsx(Di, { position: r, bouMenuItems: a, children: /* @__PURE__ */ i.jsx(qi, {}) }),
3245
+ /* @__PURE__ */ i.jsx(Yi, {})
3353
3246
  ] }) }) });
3354
3247
  export {
3355
- dn as default
3248
+ rn as default
3356
3249
  };