@teamnovu/kit-shopware-composables 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,16 +1,18 @@
1
1
  import { inject as Y, unref as i, computed as c, reactive as Z, watch as H, toRef as W } from "vue";
2
2
  import { until as J } from "@vueuse/core";
3
- import { queryOptions as M, useQuery as O, useQueryClient as S, useMutation as f } from "@tanstack/vue-query";
3
+ import { queryOptions as Q, useQuery as M, useQueryClient as S, useMutation as f } from "@tanstack/vue-query";
4
4
  import "@teamnovu/kit-shopware-api-client";
5
5
  const _ = Symbol("shopwareClient");
6
- function g() {
6
+ function m() {
7
7
  const e = Y(_);
8
8
  if (!e)
9
9
  throw new Error("Shopware client not provided!");
10
10
  return e;
11
11
  }
12
- const F = {
12
+ const R = {
13
13
  all: () => ["context"]
14
+ }, ee = {
15
+ all: () => ["language"]
14
16
  }, B = {
15
17
  all: () => ["category"],
16
18
  lists: () => [...B.all(), "list"],
@@ -41,20 +43,20 @@ const F = {
41
43
  body: t
42
44
  }
43
45
  ]
44
- }, x = {
46
+ }, L = {
45
47
  all: () => ["product"],
46
- lists: () => [...x.all(), "list"],
48
+ lists: () => [...L.all(), "list"],
47
49
  list: (e, s) => [
48
- ...x.all(),
50
+ ...L.all(),
49
51
  "list",
50
52
  {
51
53
  url: e,
52
54
  body: s
53
55
  }
54
56
  ],
55
- details: () => [...x.all(), "detail"],
57
+ details: () => [...L.all(), "detail"],
56
58
  detail: (e, s) => [
57
- ...x.all(),
59
+ ...L.all(),
58
60
  "detail",
59
61
  {
60
62
  url: e,
@@ -62,15 +64,15 @@ const F = {
62
64
  }
63
65
  ],
64
66
  search: (e) => [
65
- ...x.all(),
67
+ ...L.all(),
66
68
  "search",
67
69
  {
68
70
  body: e
69
71
  }
70
72
  ]
71
- }, L = {
73
+ }, x = {
72
74
  get: () => ["cart"]
73
- }, R = {
75
+ }, F = {
74
76
  all: () => ["customer"],
75
77
  detail: (e) => ["customer", { body: e }]
76
78
  }, w = {
@@ -147,7 +149,7 @@ const F = {
147
149
  }
148
150
  ]
149
151
  };
150
- function m(e) {
152
+ function g(e) {
151
153
  const s = i(e);
152
154
  return Object.fromEntries(
153
155
  Object.entries(s ?? {}).map(
@@ -155,90 +157,90 @@ function m(e) {
155
157
  )
156
158
  );
157
159
  }
158
- const ee = "listAddress post /account/list-address";
159
- function te(e) {
160
- const s = g(), t = w.list(c(() => {
160
+ const te = "listAddress post /account/list-address";
161
+ function ne(e) {
162
+ const s = m(), t = w.list(c(() => {
161
163
  var n;
162
- return (n = m(e)) == null ? void 0 : n.body;
164
+ return (n = g(e)) == null ? void 0 : n.body;
163
165
  }));
164
- return M({
166
+ return Q({
165
167
  queryKey: t,
166
- queryFn: ({ signal: n }) => s.query(ee, {
167
- ...m(e),
168
+ queryFn: ({ signal: n }) => s.query(te, {
169
+ ...g(e),
168
170
  signal: n
169
171
  })
170
172
  });
171
173
  }
172
- function ne(e) {
173
- return O(te(e));
174
+ function se(e) {
175
+ return M(ne(e));
174
176
  }
175
177
  const V = (e) => {
176
178
  const s = e.replace(/\/?$/, "");
177
179
  return s.startsWith("/") ? s.slice(1) : s;
178
- }, lt = (e) => `/${V(e)}`;
179
- function dt(e, s, t) {
180
+ }, pt = (e) => `/${V(e)}`;
181
+ function gt(e, s, t) {
180
182
  const n = S();
181
183
  return {
182
184
  onMutate: async (a) => {
183
185
  await n.cancelQueries({ queryKey: e });
184
186
  const r = n.getQueryData(e);
185
- if (n.setQueryData(e, (o) => s(a, o)), t) {
186
- const o = i(t), u = i(o.onMutate);
187
- u == null || u(a);
187
+ if (n.setQueryData(e, (u) => s(a, u)), t) {
188
+ const u = i(t), o = i(u.onMutate);
189
+ o == null || o(a);
188
190
  }
189
191
  return { previousValue: r };
190
192
  },
191
- onError: (a, r, o) => {
192
- if (o && n.setQueryData(e, o.previousValue), t) {
193
- const u = i(t), h = i(u.onError);
194
- h == null || h(a, r, o);
193
+ onError: (a, r, u) => {
194
+ if (u && n.setQueryData(e, u.previousValue), t) {
195
+ const o = i(t), h = i(o.onError);
196
+ h == null || h(a, r, u);
195
197
  }
196
198
  },
197
199
  onSettled: (...a) => {
198
200
  if (n.invalidateQueries({ queryKey: e }), t) {
199
- const r = i(t), o = i(r.onSettled);
200
- o == null || o(...a);
201
+ const r = i(t), u = i(r.onSettled);
202
+ u == null || u(...a);
201
203
  }
202
204
  }
203
205
  };
204
206
  }
205
- const se = (e) => {
207
+ const re = (e) => {
206
208
  var t, n, a, r;
207
- const s = (n = (t = i(e)) == null ? void 0 : t.transactions) == null ? void 0 : n.find((o) => {
208
- var u;
209
- return (u = o.paymentMethod) == null ? void 0 : u.active;
209
+ const s = (n = (t = i(e)) == null ? void 0 : t.transactions) == null ? void 0 : n.find((u) => {
210
+ var o;
211
+ return (o = u.paymentMethod) == null ? void 0 : o.active;
210
212
  });
211
213
  return ((a = s == null ? void 0 : s.paymentMethod) == null ? void 0 : a.asynchronous) && ((r = s == null ? void 0 : s.paymentMethod) == null ? void 0 : r.afterOrderEnabled);
212
- }, re = "readContext get /context";
213
- function ae(e) {
214
- const s = g();
215
- return M({
216
- queryKey: F.all(),
217
- queryFn: ({ signal: t }) => s.query(re, {
218
- ...m(e),
214
+ }, ae = "readContext get /context";
215
+ function ue(e) {
216
+ const s = m();
217
+ return Q({
218
+ queryKey: R.all(),
219
+ queryFn: ({ signal: t }) => s.query(ae, {
220
+ ...g(e),
219
221
  signal: t
220
222
  })
221
223
  });
222
224
  }
223
225
  function k(e) {
224
- return O(ae(e));
226
+ return M(ue(e));
225
227
  }
226
228
  const oe = "updateContext patch /context";
227
229
  function $(e) {
228
- const s = g(), t = S();
230
+ const s = m(), t = S();
229
231
  return f({
230
232
  ...e,
231
- mutationFn: async (n) => (t.cancelQueries({ queryKey: F.all() }), s.query(oe, {
233
+ mutationFn: async (n) => (t.cancelQueries({ queryKey: R.all() }), s.query(oe, {
232
234
  body: n
233
235
  })),
234
236
  onSuccess: async (n, a, r) => {
235
- var o, u;
236
- await t.invalidateQueries({ queryKey: F.all() }), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
237
+ var u, o;
238
+ await t.invalidateQueries({ queryKey: R.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
237
239
  }
238
240
  });
239
241
  }
240
- function yt() {
241
- const e = $(), s = k(), t = ne(), n = c(() => s.isFetching.value || e.isPending.value), a = async (d) => {
242
+ function mt() {
243
+ const e = $(), s = k(), t = se(), n = c(() => s.isFetching.value || e.isPending.value), a = async (d) => {
242
244
  await e.mutateAsync({
243
245
  billingAddressId: d.id
244
246
  }), await J(n).toBe(!1);
@@ -246,26 +248,26 @@ function yt() {
246
248
  await e.mutateAsync({
247
249
  shippingAddressId: d.id
248
250
  }), await J(n).toBe(!1);
249
- }, o = c(() => {
251
+ }, u = c(() => {
250
252
  var d, P;
251
253
  return (P = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : P.activeBillingAddress;
252
- }), u = c(() => {
254
+ }), o = c(() => {
253
255
  var d, P;
254
256
  return (P = (d = s.data.value) == null ? void 0 : d.customer) == null ? void 0 : P.activeShippingAddress;
255
257
  }), h = c(() => {
256
258
  var d;
257
259
  return ((d = t.data.value) == null ? void 0 : d.elements.filter(
258
260
  (P) => {
259
- var Q;
260
- return P.id !== ((Q = o.value) == null ? void 0 : Q.id);
261
+ var O;
262
+ return P.id !== ((O = u.value) == null ? void 0 : O.id);
261
263
  }
262
264
  )) ?? [];
263
265
  }), C = c(() => {
264
266
  var d;
265
267
  return ((d = t.data.value) == null ? void 0 : d.elements.filter(
266
268
  (P) => {
267
- var Q;
268
- return P.id !== ((Q = u.value) == null ? void 0 : Q.id);
269
+ var O;
270
+ return P.id !== ((O = o.value) == null ? void 0 : O.id);
269
271
  }
270
272
  )) ?? [];
271
273
  });
@@ -276,30 +278,30 @@ function yt() {
276
278
  setBillingAddress: a,
277
279
  setShippingAddress: r,
278
280
  isSaving: n,
279
- activeBillingAddress: o,
280
- activeShippingAddress: u,
281
+ activeBillingAddress: u,
282
+ activeShippingAddress: o,
281
283
  inactiveBillingAddresses: h,
282
284
  inactiveShippingAddresses: C
283
285
  };
284
286
  }
285
- const ue = "readOrder post /order";
286
- function ie(e) {
287
- const s = g(), t = U.detail(e);
288
- return M({
287
+ const ie = "readOrder post /order";
288
+ function ce(e) {
289
+ const s = m(), t = U.detail(e);
290
+ return Q({
289
291
  queryKey: t,
290
292
  queryFn: async ({ signal: n }) => {
291
- const a = m(e);
292
- return s.query(ue, {
293
+ const a = g(e);
294
+ return s.query(ie, {
293
295
  ...a,
294
296
  signal: n
295
297
  });
296
298
  }
297
299
  });
298
300
  }
299
- function ce(e) {
300
- return O(ie(e));
301
+ function le(e) {
302
+ return M(ce(e));
301
303
  }
302
- function pt(e, s) {
304
+ function ht(e, s) {
303
305
  const t = c(() => {
304
306
  const l = i(e);
305
307
  if (l)
@@ -316,16 +318,16 @@ function pt(e, s) {
316
318
  checkPromotion: !0
317
319
  }
318
320
  };
319
- }), n = ce(t.value), a = c(() => {
321
+ }), n = le(t.value), a = c(() => {
320
322
  var l, p, q, I;
321
323
  return (I = (q = (p = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : p.orders) == null ? void 0 : q.elements) == null ? void 0 : I[0];
322
324
  }), r = c(() => {
323
325
  var l, p;
324
326
  return ((p = (l = n.data) == null ? void 0 : l.value) == null ? void 0 : p.paymentChangeable) || {};
325
- }), o = c(() => {
327
+ }), u = c(() => {
326
328
  var l, p, q;
327
329
  return (q = (p = (l = a.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : p.translated) == null ? void 0 : q.name;
328
- }), u = c(() => {
330
+ }), o = c(() => {
329
331
  var l, p;
330
332
  return (p = (l = a.value) == null ? void 0 : l.stateMachineState) == null ? void 0 : p.technicalName;
331
333
  }), h = c(() => {
@@ -344,7 +346,7 @@ function pt(e, s) {
344
346
  firstName: (I = (q = a.value) == null ? void 0 : q.orderCustomer) == null ? void 0 : I.firstName,
345
347
  lastName: (G = (z = a.value) == null ? void 0 : z.orderCustomer) == null ? void 0 : G.lastName
346
348
  };
347
- }), Q = c(() => {
349
+ }), O = c(() => {
348
350
  var l, p;
349
351
  return (p = (l = a.value) == null ? void 0 : l.addresses) == null ? void 0 : p.find(
350
352
  ({ id: q }) => {
@@ -374,13 +376,13 @@ function pt(e, s) {
374
376
  });
375
377
  return {
376
378
  order: a,
377
- status: o,
378
- statusTechnicalName: u,
379
+ status: u,
380
+ statusTechnicalName: o,
379
381
  total: h,
380
382
  subtotal: C,
381
383
  shippingCosts: d,
382
384
  shippingAddress: y,
383
- billingAddress: Q,
385
+ billingAddress: O,
384
386
  personalDetails: P,
385
387
  shippingMethod: A,
386
388
  paymentMethod: v,
@@ -388,12 +390,12 @@ function pt(e, s) {
388
390
  orderQuery: n
389
391
  };
390
392
  }
391
- function mt(e) {
393
+ function ft(e) {
392
394
  const s = c(() => {
393
- var r, o;
394
- return (o = (r = i(e)) == null ? void 0 : r.transactions) == null ? void 0 : o.find((u) => {
395
+ var r, u;
396
+ return (u = (r = i(e)) == null ? void 0 : r.transactions) == null ? void 0 : u.find((o) => {
395
397
  var h;
396
- return ((h = u.paymentMethod) == null ? void 0 : h.active) === !0;
398
+ return ((h = o.paymentMethod) == null ? void 0 : h.active) === !0;
397
399
  });
398
400
  }), t = c(() => {
399
401
  var r;
@@ -403,412 +405,426 @@ function mt(e) {
403
405
  return (r = s.value) == null ? void 0 : r.stateMachineState;
404
406
  });
405
407
  return {
406
- isAsynchronous: c(() => se(e)),
408
+ isAsynchronous: c(() => re(e)),
407
409
  activeTransaction: s,
408
410
  state: n,
409
411
  paymentMethod: t
410
412
  };
411
413
  }
412
- const le = "createCustomerAddress post /account/address";
413
- function gt(e) {
414
- const s = g(), t = S();
414
+ const de = "createCustomerAddress post /account/address";
415
+ function vt(e) {
416
+ const s = m(), t = S();
415
417
  return f({
416
418
  ...e,
417
- mutationFn: async (n) => s.query(le, m(n)),
419
+ mutationFn: async (n) => s.query(de, g(n)),
418
420
  onSuccess: async (n, a, r) => {
419
- var o, u;
420
- await t.invalidateQueries({ queryKey: w.lists() }), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
421
+ var u, o;
422
+ await t.invalidateQueries({ queryKey: w.lists() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
421
423
  }
422
424
  });
423
425
  }
424
- const de = "deleteCustomerAddress delete /account/address/{addressId}";
425
- function ht(e) {
426
- const s = g(), t = S();
426
+ const ye = "deleteCustomerAddress delete /account/address/{addressId}";
427
+ function qt(e) {
428
+ const s = m(), t = S();
427
429
  return f({
428
430
  ...e,
429
- mutationFn: async (n) => s.query(de, m(n)),
431
+ mutationFn: async (n) => s.query(ye, g(n)),
430
432
  onSuccess: async (n, a, r) => {
431
- var o, u;
432
- await t.invalidateQueries({ queryKey: w.lists() }), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
433
+ var u, o;
434
+ await t.invalidateQueries({ queryKey: w.lists() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
433
435
  }
434
436
  });
435
437
  }
436
- const ye = "updateCustomerAddress patch /account/address/{addressId}";
437
- function ft(e) {
438
- const s = g(), t = S();
438
+ const pe = "updateCustomerAddress patch /account/address/{addressId}";
439
+ function Ct(e) {
440
+ const s = m(), t = S();
439
441
  return f({
440
442
  ...e,
441
- mutationFn: async (n) => s.query(ye, m(n)),
443
+ mutationFn: async (n) => s.query(pe, g(n)),
442
444
  onSuccess: async (n, a, r) => {
443
- var u, h;
444
- const { addressId: o } = m(a).params;
445
- t.setQueryData(w.detail(o), n), await Promise.all([
445
+ var o, h;
446
+ const { addressId: u } = g(a).params;
447
+ t.setQueryData(w.detail(u), n), await Promise.all([
446
448
  t.invalidateQueries({ queryKey: w.lists() }),
447
449
  t.invalidateQueries({
448
- queryKey: w.detail(m(a).params.addressId),
449
- predicate: (C) => C.queryKey.at(-1) !== o
450
+ queryKey: w.detail(g(a).params.addressId),
451
+ predicate: (C) => C.queryKey.at(-1) !== u
450
452
  })
451
- ]), await ((h = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : h(n, a, r));
453
+ ]), await ((h = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : h(n, a, r));
452
454
  }
453
455
  });
454
456
  }
455
- const pe = "addLineItem post /checkout/cart/line-item";
456
- function vt(e) {
457
- const s = g(), t = S();
457
+ const ge = "addLineItem post /checkout/cart/line-item";
458
+ function St(e) {
459
+ const s = m(), t = S();
458
460
  return f({
459
461
  ...e,
460
- mutationFn: async (n) => s.query(pe, {
462
+ mutationFn: async (n) => s.query(ge, {
461
463
  body: n
462
464
  }),
463
465
  onSuccess: async (n, a, r) => {
464
- var o, u;
465
- t.setQueryData(L.get(), n), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
466
+ var u, o;
467
+ t.setQueryData(x.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
466
468
  }
467
469
  });
468
470
  }
469
471
  const me = "readCart get /checkout/cart";
470
- function ge(e) {
471
- const s = g(), t = L.get();
472
- return M({
472
+ function he(e) {
473
+ const s = m(), t = x.get();
474
+ return Q({
473
475
  queryKey: t,
474
476
  queryFn: async ({ signal: n }) => s.query(me, {
475
- ...m(e),
477
+ ...g(e),
476
478
  signal: n
477
479
  })
478
480
  });
479
481
  }
480
- function qt() {
481
- return O(ge());
482
+ function Pt() {
483
+ return M(he());
482
484
  }
483
- const he = "removeLineItem post /checkout/cart/line-item/delete";
484
- function Ct(e) {
485
- const s = g(), t = S();
485
+ const fe = "removeLineItem post /checkout/cart/line-item/delete";
486
+ function Qt(e) {
487
+ const s = m(), t = S();
486
488
  return f({
487
489
  ...e,
488
- mutationFn: async (n) => s.query(he, {
490
+ mutationFn: async (n) => s.query(fe, {
489
491
  body: n
490
492
  }),
491
493
  onSuccess: async (n, a, r) => {
492
- var o, u;
493
- t.setQueryData(L.get(), n), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
494
+ var u, o;
495
+ t.setQueryData(x.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
494
496
  }
495
497
  });
496
498
  }
497
- const fe = "updateLineItem patch /checkout/cart/line-item";
498
- function St(e) {
499
- const s = g(), t = S();
499
+ const ve = "updateLineItem patch /checkout/cart/line-item";
500
+ function Mt(e) {
501
+ const s = m(), t = S();
500
502
  return f({
501
503
  ...e,
502
- mutationFn: async (n) => s.query(fe, {
504
+ mutationFn: async (n) => s.query(ve, {
503
505
  body: n
504
506
  }),
505
507
  onSuccess: async (n, a, r) => {
506
- var o, u;
507
- t.setQueryData(L.get(), n), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
508
+ var u, o;
509
+ t.setQueryData(x.get(), n), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
508
510
  }
509
511
  });
510
512
  }
511
- const ve = "createOrder post /checkout/order";
512
- function Pt(e) {
513
- const s = g(), t = S();
513
+ const qe = "createOrder post /checkout/order";
514
+ function Ot(e) {
515
+ const s = m(), t = S();
514
516
  return f({
515
517
  ...e,
516
- mutationFn: async (n) => s.query(ve, m(n)),
518
+ mutationFn: async (n) => s.query(qe, g(n)),
517
519
  onSuccess: async (n, a, r) => {
518
- var o, u;
520
+ var u, o;
519
521
  await Promise.all([
520
522
  // Clear cart after successful order creation
521
- t.invalidateQueries({ queryKey: L.get() }),
523
+ t.invalidateQueries({ queryKey: x.get() }),
522
524
  // Invalidate order list to refetch data
523
525
  t.invalidateQueries({ queryKey: U.lists() })
524
- ]), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
526
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
525
527
  }
526
528
  });
527
529
  }
528
- const qe = "readCountry post /country", Ce = function(s) {
529
- const t = g(), n = T.list(s);
530
- return M({
530
+ const Ce = "readLanguages post /language";
531
+ function Se(e) {
532
+ const s = m();
533
+ return Q({
534
+ queryKey: ee.all(),
535
+ queryFn: ({ signal: t }) => s.query(Ce, {
536
+ ...g(e),
537
+ signal: t
538
+ })
539
+ });
540
+ }
541
+ function At(e) {
542
+ return M(Se(e));
543
+ }
544
+ const Pe = "readCountry post /country", Qe = function(s) {
545
+ const t = m(), n = T.list(s);
546
+ return Q({
531
547
  queryKey: n,
532
548
  queryFn: async ({ signal: a }) => {
533
- const r = m(s);
534
- return t.query(qe, {
549
+ const r = g(s);
550
+ return t.query(Pe, {
535
551
  ...r,
536
552
  signal: a
537
553
  });
538
554
  }
539
555
  });
540
556
  };
541
- function Qt(e) {
542
- return O(Ce(e));
557
+ function Kt(e) {
558
+ return M(Qe(e));
543
559
  }
544
- const Se = "changeEmail post /account/change-email";
545
- function Mt(e) {
546
- const s = g(), t = S();
560
+ const Me = "changeEmail post /account/change-email";
561
+ function wt(e) {
562
+ const s = m(), t = S();
547
563
  return f({
548
564
  ...e,
549
- mutationFn: async (n) => s.query(Se, m(n)),
565
+ mutationFn: async (n) => s.query(Me, g(n)),
550
566
  onSuccess: async (n, a, r) => {
551
- var o, u;
552
- await t.invalidateQueries({ queryKey: R.all() }), await t.invalidateQueries({ queryKey: F.all() }), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
567
+ var u, o;
568
+ await t.invalidateQueries({ queryKey: F.all() }), await t.invalidateQueries({ queryKey: R.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
553
569
  }
554
570
  });
555
571
  }
556
- const Pe = "changeProfile post /account/change-profile";
557
- function Ot(e) {
558
- const s = g(), t = S();
572
+ const Oe = "changeProfile post /account/change-profile";
573
+ function Rt(e) {
574
+ const s = m(), t = S();
559
575
  return f({
560
576
  ...e,
561
- mutationFn: async (n) => s.query(Pe, m(n)),
577
+ mutationFn: async (n) => s.query(Oe, g(n)),
562
578
  onSuccess: async (n, a, r) => {
563
- var o, u;
579
+ var u, o;
564
580
  await Promise.all([
565
- t.invalidateQueries({ queryKey: R.all() }),
566
- t.invalidateQueries({ queryKey: F.all() })
567
- ]), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
581
+ t.invalidateQueries({ queryKey: F.all() }),
582
+ t.invalidateQueries({ queryKey: R.all() })
583
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
568
584
  }
569
585
  });
570
586
  }
571
- const Qe = "loginCustomer post /account/login";
572
- function At(e) {
573
- const s = g(), t = S();
587
+ const Ae = "loginCustomer post /account/login";
588
+ function Ft(e) {
589
+ const s = m(), t = S();
574
590
  return f({
575
591
  ...e,
576
592
  mutationFn: async (n) => {
577
- const a = await s.queryRaw(Qe, {
593
+ const a = await s.queryRaw(Ae, {
578
594
  body: n
579
595
  }), r = a.headers.get("sw-context-token");
580
596
  return r && (s.contextToken = r), a.json();
581
597
  },
582
598
  onSuccess: async (n, a, r) => {
583
- var o, u;
599
+ var u, o;
584
600
  await Promise.all([
585
- t.removeQueries({ queryKey: F.all() }),
586
- t.invalidateQueries({ queryKey: L.get() }),
587
- t.invalidateQueries({ queryKey: R.all() })
588
- ]), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
601
+ t.removeQueries({ queryKey: R.all() }),
602
+ t.invalidateQueries({ queryKey: x.get() }),
603
+ t.invalidateQueries({ queryKey: F.all() })
604
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
589
605
  }
590
606
  });
591
607
  }
592
- const Me = "logoutCustomer post /account/logout";
593
- function Kt(e) {
594
- const s = g(), t = S();
608
+ const Ke = "logoutCustomer post /account/logout";
609
+ function It(e) {
610
+ const s = m(), t = S();
595
611
  return f({
596
612
  ...e,
597
- mutationFn: async (n) => s.query(Me, m(n)),
613
+ mutationFn: async (n) => s.query(Ke, g(n)),
598
614
  onSuccess: async (n, a, r) => {
599
- var o, u;
615
+ var u, o;
600
616
  await Promise.all([
601
- t.removeQueries({ queryKey: F.all() }),
602
- t.invalidateQueries({ queryKey: L.get() }),
603
- t.invalidateQueries({ queryKey: R.all() })
604
- ]), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
617
+ t.removeQueries({ queryKey: R.all() }),
618
+ t.invalidateQueries({ queryKey: x.get() }),
619
+ t.invalidateQueries({ queryKey: F.all() })
620
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
605
621
  }
606
622
  });
607
623
  }
608
- const Oe = "readCustomer post /account/customer";
609
- function Ae(e) {
610
- const s = g(), t = R.detail(c(() => m(e).body ?? {}));
611
- return M({
624
+ const we = "readCustomer post /account/customer";
625
+ function Re(e) {
626
+ const s = m(), t = F.detail(c(() => g(e).body ?? {}));
627
+ return Q({
612
628
  queryKey: t,
613
- queryFn: async () => s.query(Oe, m(e))
629
+ queryFn: async () => s.query(we, g(e))
614
630
  });
615
631
  }
616
- function Ke(e) {
617
- return O(Ae(e));
632
+ function Fe(e) {
633
+ return M(Re(e));
618
634
  }
619
- const we = "register post /account/register";
620
- function wt(e) {
621
- const s = g(), t = S();
635
+ const Ie = "register post /account/register";
636
+ function Lt(e) {
637
+ const s = m(), t = S();
622
638
  return f({
623
639
  ...e,
624
- mutationFn: async (n) => s.query(we, m(n)),
640
+ mutationFn: async (n) => s.query(Ie, g(n)),
625
641
  onSuccess: async (n, a, r) => {
626
- var o, u;
627
- await t.invalidateQueries({ queryKey: R.all() }), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
642
+ var u, o;
643
+ await t.invalidateQueries({ queryKey: F.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
628
644
  }
629
645
  });
630
646
  }
631
- const Fe = "defaultBillingAddress patch /account/address/default-billing/{addressId}";
632
- function Ft(e) {
633
- const s = g(), t = S();
647
+ const Le = "defaultBillingAddress patch /account/address/default-billing/{addressId}";
648
+ function xt(e) {
649
+ const s = m(), t = S();
634
650
  return f({
635
651
  ...e,
636
- mutationFn: async (n) => s.query(Fe, m(n)),
652
+ mutationFn: async (n) => s.query(Le, g(n)),
637
653
  onSuccess: async (n, a, r) => {
638
- var o, u;
654
+ var u, o;
639
655
  await Promise.all([
640
- t.invalidateQueries({ queryKey: R.all() }),
641
- t.invalidateQueries({ queryKey: F.all() })
642
- ]), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
656
+ t.invalidateQueries({ queryKey: F.all() }),
657
+ t.invalidateQueries({ queryKey: R.all() })
658
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
643
659
  }
644
660
  });
645
661
  }
646
- const Re = "defaultShippingAddress patch /account/address/default-shipping/{addressId}";
647
- function Rt(e) {
648
- const s = g(), t = S();
662
+ const xe = "defaultShippingAddress patch /account/address/default-shipping/{addressId}";
663
+ function Ut(e) {
664
+ const s = m(), t = S();
649
665
  return f({
650
666
  ...e,
651
- mutationFn: async (n) => s.query(Re, m(n)),
667
+ mutationFn: async (n) => s.query(xe, g(n)),
652
668
  onSuccess: async (n, a, r) => {
653
- var o, u;
669
+ var u, o;
654
670
  await Promise.all([
655
- t.invalidateQueries({ queryKey: R.all() }),
656
- t.invalidateQueries({ queryKey: F.all() })
657
- ]), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
671
+ t.invalidateQueries({ queryKey: F.all() }),
672
+ t.invalidateQueries({ queryKey: R.all() })
673
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
658
674
  }
659
675
  });
660
676
  }
661
- const Ie = "deleteCustomer delete /account/customer";
662
- function It(e) {
663
- const s = g(), t = S();
677
+ const Ue = "deleteCustomer delete /account/customer";
678
+ function bt(e) {
679
+ const s = m(), t = S();
664
680
  return f({
665
681
  ...e,
666
- mutationFn: async (n) => s.query(Ie, m(n)),
682
+ mutationFn: async (n) => s.query(Ue, g(n)),
667
683
  onSuccess: async (n, a, r) => {
668
- var o, u;
684
+ var u, o;
669
685
  await Promise.all([
670
- t.resetQueries({ queryKey: R.all() }),
671
686
  t.resetQueries({ queryKey: F.all() }),
672
- t.resetQueries({ queryKey: L.get() })
673
- ]), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
687
+ t.resetQueries({ queryKey: R.all() }),
688
+ t.resetQueries({ queryKey: x.get() })
689
+ ]), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
674
690
  }
675
691
  });
676
692
  }
677
- const xe = "registerConfirm post /account/register-confirm";
678
- function xt(e) {
679
- const s = g();
693
+ const be = "registerConfirm post /account/register-confirm";
694
+ function kt(e) {
695
+ const s = m();
680
696
  return f({
681
697
  ...e,
682
698
  mutationFn: async (t) => {
683
- const n = await s.queryRaw(xe, {
699
+ const n = await s.queryRaw(be, {
684
700
  body: t
685
701
  }), a = n.headers.get("sw-context-token");
686
702
  return a && (s.contextToken = a), n.json();
687
703
  },
688
704
  onSuccess: async (t, n, a) => {
689
- var r, o;
690
- await ((o = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : o(t, n, a));
705
+ var r, u;
706
+ await ((u = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : u(t, n, a));
691
707
  }
692
708
  });
693
709
  }
694
- const Le = "sendRecoveryMail post /account/recovery-password";
695
- function Lt(e) {
696
- const s = g();
710
+ const ke = "sendRecoveryMail post /account/recovery-password";
711
+ function Bt(e) {
712
+ const s = m();
697
713
  return f({
698
714
  ...e,
699
- mutationFn: async (t) => s.query(Le, m(t)),
715
+ mutationFn: async (t) => s.query(ke, g(t)),
700
716
  onSuccess: async (t, n, a) => {
701
- var r, o;
702
- await ((o = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : o(t, n, a));
717
+ var r, u;
718
+ await ((u = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : u(t, n, a));
703
719
  }
704
720
  });
705
721
  }
706
- const Ue = "changePassword post /account/change-password";
707
- function Ut(e) {
708
- const s = g();
722
+ const Be = "changePassword post /account/change-password";
723
+ function Nt(e) {
724
+ const s = m();
709
725
  return f({
710
726
  ...e,
711
- mutationFn: async (t) => s.query(Ue, m(t)),
727
+ mutationFn: async (t) => s.query(Be, g(t)),
712
728
  onSuccess: async (t, n, a) => {
713
- var r, o;
714
- await ((o = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : o(t, n, a));
729
+ var r, u;
730
+ await ((u = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : u(t, n, a));
715
731
  }
716
732
  });
717
733
  }
718
- const be = "recoveryPassword post /account/recovery-password-confirm";
719
- function bt(e) {
720
- const s = g();
734
+ const Ne = "recoveryPassword post /account/recovery-password-confirm";
735
+ function Dt(e) {
736
+ const s = m();
721
737
  return f({
722
738
  ...e,
723
- mutationFn: async (t) => s.query(be, m(t)),
739
+ mutationFn: async (t) => s.query(Ne, g(t)),
724
740
  onSuccess: async (t, n, a) => {
725
- var r, o;
726
- await ((o = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : o(t, n, a));
741
+ var r, u;
742
+ await ((u = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : u(t, n, a));
727
743
  }
728
744
  });
729
745
  }
730
- const ke = "readNavigation post /navigation/{activeId}/{rootId}", Be = function(s, t, n) {
731
- const a = g(), r = b.detail(s, t, n);
732
- return M({
746
+ const De = "readNavigation post /navigation/{activeId}/{rootId}", Ee = function(s, t, n) {
747
+ const a = m(), r = b.detail(s, t, n);
748
+ return Q({
733
749
  queryKey: r,
734
- queryFn: async ({ signal: o }) => {
735
- const u = i(s), h = i(t), C = m(n);
736
- return a.query(ke, {
750
+ queryFn: async ({ signal: u }) => {
751
+ const o = i(s), h = i(t), C = g(n);
752
+ return a.query(De, {
737
753
  ...C,
738
754
  params: {
739
- activeId: u,
755
+ activeId: o,
740
756
  rootId: h
741
757
  },
742
- signal: o
758
+ signal: u
743
759
  });
744
760
  }
745
761
  });
746
762
  };
747
- function kt(e, s, t) {
748
- return O(Be(e, s, t));
763
+ function Et(e, s, t) {
764
+ return M(Ee(e, s, t));
749
765
  }
750
- const Ne = "readPaymentMethod post /payment-method";
751
- function De(e) {
752
- const s = g(), t = D.list(c(() => {
766
+ const je = "readPaymentMethod post /payment-method";
767
+ function Te(e) {
768
+ const s = m(), t = D.list(c(() => {
753
769
  var n;
754
- return (n = m(e)) == null ? void 0 : n.body;
770
+ return (n = g(e)) == null ? void 0 : n.body;
755
771
  }));
756
- return M({
772
+ return Q({
757
773
  queryKey: t,
758
- queryFn: ({ signal: n }) => s.query(Ne, {
759
- ...m(e),
774
+ queryFn: ({ signal: n }) => s.query(je, {
775
+ ...g(e),
760
776
  signal: n
761
777
  })
762
778
  });
763
779
  }
764
- function Ee(e) {
765
- return O(De(e));
780
+ function Ve(e) {
781
+ return M(Te(e));
766
782
  }
767
- const je = "handlePaymentMethod post /handle-payment";
768
- function Bt(e) {
769
- const s = g();
783
+ const $e = "handlePaymentMethod post /handle-payment";
784
+ function jt(e) {
785
+ const s = m();
770
786
  return f({
771
787
  ...e,
772
- mutationFn: async (t) => s.query(je, m(t)),
788
+ mutationFn: async (t) => s.query($e, g(t)),
773
789
  onSuccess: async (t, n, a) => {
774
- var r, o;
775
- await ((o = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : o(t, n, a));
790
+ var r, u;
791
+ await ((u = i((r = i(e)) == null ? void 0 : r.onSuccess)) == null ? void 0 : u(t, n, a));
776
792
  }
777
793
  });
778
794
  }
779
- const Te = "orderSetPayment post /order/payment";
780
- function Nt(e) {
781
- const s = g(), t = S();
795
+ const ze = "orderSetPayment post /order/payment";
796
+ function Tt(e) {
797
+ const s = m(), t = S();
782
798
  return f({
783
799
  ...e,
784
- mutationFn: async (n) => s.query(Te, m(n)),
800
+ mutationFn: async (n) => s.query(ze, g(n)),
785
801
  onSuccess: async (n, a, r) => {
786
- var o, u;
787
- await t.invalidateQueries({ queryKey: U.all() }), await ((u = i((o = i(e)) == null ? void 0 : o.onSuccess)) == null ? void 0 : u(n, a, r));
802
+ var u, o;
803
+ await t.invalidateQueries({ queryKey: U.all() }), await ((o = i((u = i(e)) == null ? void 0 : u.onSuccess)) == null ? void 0 : o(n, a, r));
788
804
  }
789
805
  });
790
806
  }
791
- const Ve = "readCategoryList post /category", $e = function(s) {
792
- const t = g(), n = B.list(s);
793
- return M({
807
+ const Ge = "readCategoryList post /category", He = function(s) {
808
+ const t = m(), n = B.list(s);
809
+ return Q({
794
810
  queryKey: n,
795
- queryFn: async ({ signal: a }) => t.query(Ve, {
796
- ...m(s),
811
+ queryFn: async ({ signal: a }) => t.query(Ge, {
812
+ ...g(s),
797
813
  signal: a
798
814
  })
799
815
  });
800
816
  };
801
- function Dt(e) {
802
- return O($e(e));
817
+ function Vt(e) {
818
+ return M(He(e));
803
819
  }
804
- const ze = "readCompactProductListing post /novu/headless/product-listing/{seoUrl}";
805
- function Ge(e, s) {
806
- const t = g(), n = x.list(e, s);
807
- return M({
820
+ const We = "readCompactProductListing post /novu/headless/product-listing/{seoUrl}";
821
+ function Je(e, s) {
822
+ const t = m(), n = L.list(e, s);
823
+ return Q({
808
824
  queryKey: n,
809
825
  queryFn: async ({ signal: a }) => {
810
- const r = m(s);
811
- return t.query(ze, {
826
+ const r = g(s);
827
+ return t.query(We, {
812
828
  ...r,
813
829
  params: {
814
830
  ...r.params,
@@ -819,17 +835,17 @@ function Ge(e, s) {
819
835
  }
820
836
  });
821
837
  }
822
- function Et(e, s) {
823
- return O(Ge(e, s));
838
+ function $t(e, s) {
839
+ return M(Je(e, s));
824
840
  }
825
- const He = "readCustomProductDetail post /novu/headless/product/{seoUrl}";
826
- function We(e, s) {
827
- const t = g(), n = x.detail(e, s);
828
- return M({
841
+ const Xe = "readCustomProductDetail post /novu/headless/product/{seoUrl}";
842
+ function Ye(e, s) {
843
+ const t = m(), n = L.detail(e, s);
844
+ return Q({
829
845
  queryKey: n,
830
846
  queryFn: async ({ signal: a }) => {
831
- const r = m(s);
832
- return t.query(He, {
847
+ const r = g(s);
848
+ return t.query(Xe, {
833
849
  ...r,
834
850
  params: {
835
851
  ...r.params,
@@ -840,88 +856,88 @@ function We(e, s) {
840
856
  }
841
857
  });
842
858
  }
843
- function jt(e, s) {
844
- return O(We(e, s));
859
+ function zt(e, s) {
860
+ return M(Ye(e, s));
845
861
  }
846
- const Je = "searchPage post /search";
847
- function Xe(e) {
848
- const s = g(), t = x.search(e);
849
- return M({
862
+ const Ze = "searchPage post /search";
863
+ function _e(e) {
864
+ const s = m(), t = L.search(e);
865
+ return Q({
850
866
  queryKey: t,
851
867
  queryFn: async ({ signal: n }) => {
852
- const a = m(e);
853
- return s.query(Je, {
868
+ const a = g(e);
869
+ return s.query(Ze, {
854
870
  ...a,
855
871
  signal: n
856
872
  });
857
873
  }
858
874
  });
859
875
  }
860
- function Tt(e) {
861
- return O(Xe(e));
876
+ function Gt(e) {
877
+ return M(_e(e));
862
878
  }
863
- const Ye = "readSalutation post /salutation", Ze = function(s) {
864
- const t = g(), n = j.list(s);
865
- return M({
879
+ const et = "readSalutation post /salutation", tt = function(s) {
880
+ const t = m(), n = j.list(s);
881
+ return Q({
866
882
  queryKey: n,
867
883
  queryFn: async ({ signal: a }) => {
868
- const r = m(s);
869
- return t.query(Ye, {
884
+ const r = g(s);
885
+ return t.query(et, {
870
886
  ...r,
871
887
  signal: a
872
888
  });
873
889
  }
874
890
  });
875
891
  };
876
- function Vt(e) {
877
- return O(Ze(e));
892
+ function Ht(e) {
893
+ return M(tt(e));
878
894
  }
879
- const _e = "readSeoUrl post /seo-url", et = function(s) {
880
- const t = g(), n = E.list(s);
881
- return M({
895
+ const nt = "readSeoUrl post /seo-url", st = function(s) {
896
+ const t = m(), n = E.list(s);
897
+ return Q({
882
898
  queryKey: n,
883
899
  queryFn: async ({ signal: a }) => {
884
- const r = m(s);
885
- return t.query(_e, {
900
+ const r = g(s);
901
+ return t.query(nt, {
886
902
  ...r,
887
903
  signal: a
888
904
  });
889
905
  }
890
906
  });
891
907
  };
892
- function $t(e) {
893
- return O(et(e));
908
+ function Wt(e) {
909
+ return M(st(e));
894
910
  }
895
- const tt = "readShippingMethod post /shipping-method";
896
- function nt(e) {
897
- const s = g(), t = N.list(c(() => {
911
+ const rt = "readShippingMethod post /shipping-method";
912
+ function at(e) {
913
+ const s = m(), t = N.list(c(() => {
898
914
  var n;
899
- return (n = m(e)) == null ? void 0 : n.body;
915
+ return (n = g(e)) == null ? void 0 : n.body;
900
916
  }));
901
- return M({
917
+ return Q({
902
918
  queryKey: t,
903
- queryFn: ({ signal: n }) => s.query(tt, {
904
- ...m(e),
919
+ queryFn: ({ signal: n }) => s.query(rt, {
920
+ ...g(e),
905
921
  signal: n
906
922
  })
907
923
  });
908
924
  }
909
- function st(e) {
910
- return O(nt(e));
925
+ function ut(e) {
926
+ return M(at(e));
911
927
  }
912
- function zt() {
913
- const e = k(), s = $(), t = Ee({
928
+ function Jt() {
929
+ const e = k(), s = $(), t = Ve({
914
930
  query: {
915
931
  onlyAvailable: !0
916
932
  }
917
- }), n = c(() => s.isPending.value), a = async (u) => s.mutateAsync({
918
- paymentMethodId: u
933
+ }), n = c(() => s.isPending.value), a = async (o) => s.mutateAsync({
934
+ paymentMethodId: o
919
935
  }), r = c(() => {
920
- var u, h;
921
- return (h = (u = e.data) == null ? void 0 : u.value) == null ? void 0 : h.paymentMethod;
922
- }), o = c(() => {
923
- var u, h, C;
924
- return ((C = (h = (u = t.data) == null ? void 0 : u.value) == null ? void 0 : h.elements) == null ? void 0 : C.sort((d, P) => (d.position ?? 0) - (P.position ?? 0))) ?? [];
936
+ var o, h;
937
+ return (h = (o = e.data) == null ? void 0 : o.value) == null ? void 0 : h.paymentMethod;
938
+ }), u = c(() => {
939
+ var o, h, C;
940
+ return ((C = (h = (o = t.data) == null ? void 0 : o.value) == null ? void 0 : h.elements) == null ? void 0 : C.sort((d, P) => (d.position ?? 0) - (P.position ?? 0))) ?? [];
925
941
  });
926
942
  return {
927
943
  contextUpdateMutation: s,
@@ -930,22 +946,22 @@ function zt() {
930
946
  activePaymentMethod: r,
931
947
  setPaymentMethod: a,
932
948
  isSaving: n,
933
- paymentMethods: o
949
+ paymentMethods: u
934
950
  };
935
951
  }
936
- function Gt() {
937
- const e = k(), s = $(), t = st({
952
+ function Xt() {
953
+ const e = k(), s = $(), t = ut({
938
954
  query: {
939
955
  onlyAvailable: !0
940
956
  }
941
- }), n = c(() => s.isPending.value), a = async (u) => s.mutateAsync({
942
- shippingMethodId: u
957
+ }), n = c(() => s.isPending.value), a = async (o) => s.mutateAsync({
958
+ shippingMethodId: o
943
959
  }), r = c(() => {
944
- var u, h;
945
- return (h = (u = e.data) == null ? void 0 : u.value) == null ? void 0 : h.shippingMethod;
946
- }), o = c(() => {
947
- var u, h;
948
- return ((h = (u = t.data) == null ? void 0 : u.value) == null ? void 0 : h.elements.sort((C, d) => (C.position ?? 0) - (d.position ?? 0))) ?? [];
960
+ var o, h;
961
+ return (h = (o = e.data) == null ? void 0 : o.value) == null ? void 0 : h.shippingMethod;
962
+ }), u = c(() => {
963
+ var o, h;
964
+ return ((h = (o = t.data) == null ? void 0 : o.value) == null ? void 0 : h.elements.sort((C, d) => (C.position ?? 0) - (d.position ?? 0))) ?? [];
949
965
  });
950
966
  return {
951
967
  contextUpdateMutation: s,
@@ -954,10 +970,10 @@ function Gt() {
954
970
  activeShippingMethod: r,
955
971
  setShippingMethod: a,
956
972
  isSaving: n,
957
- shippingMethods: o
973
+ shippingMethods: u
958
974
  };
959
975
  }
960
- const rt = (e, s) => {
976
+ const ot = (e, s) => {
961
977
  var n;
962
978
  const t = (n = e == null ? void 0 : e.extensions) == null ? void 0 : n.novuSeoUrls;
963
979
  if (Array.isArray(s)) {
@@ -965,50 +981,50 @@ const rt = (e, s) => {
965
981
  return a ? (t == null ? void 0 : t[a]) ?? "" : "";
966
982
  }
967
983
  return (t == null ? void 0 : t[s]) ?? "";
968
- }, Ht = () => {
984
+ }, Yt = () => {
969
985
  const e = k(), s = c(() => {
970
986
  var t, n, a;
971
987
  return ((a = (n = (t = e.data) == null ? void 0 : t.value) == null ? void 0 : n.context) == null ? void 0 : a.languageIdChain) ?? [];
972
988
  });
973
989
  return (t, n) => {
974
990
  const a = [n, ...s.value];
975
- return rt(i(t), i(a));
991
+ return ot(i(t), i(a));
976
992
  };
977
993
  };
978
- function Wt(e) {
994
+ function Zt(e) {
979
995
  const { total: s, limit: t, page: n, totalCountMode: a } = e ?? {}, r = Z({
980
996
  page: n ?? 1,
981
997
  total: s ?? 0,
982
998
  limit: t,
983
999
  totalCountMode: a
984
- }), o = c(() => r.limit === void 0 ? 1 : Math.max(1, Math.ceil(r.total / r.limit))), u = c({
1000
+ }), u = c(() => r.limit === void 0 ? 1 : Math.max(1, Math.ceil(r.total / r.limit))), o = c({
985
1001
  get() {
986
1002
  return r.page;
987
1003
  },
988
- set(Q) {
989
- r.page = Math.max(1, Math.min(i(o), Q));
1004
+ set(O) {
1005
+ r.page = Math.max(1, Math.min(i(u), O));
990
1006
  }
991
1007
  });
992
1008
  H(
993
- [() => i(o), () => r],
994
- ([Q, y]) => {
995
- r.page = Math.min(Q, r.page), r.total = y.total ?? 0, r.limit = y.limit;
1009
+ [() => i(u), () => r],
1010
+ ([O, y]) => {
1011
+ r.page = Math.min(O, r.page), r.total = y.total ?? 0, r.limit = y.limit;
996
1012
  }
997
1013
  );
998
- const h = c(() => r.page === i(o)), C = c(() => r.page === 1), d = c(() => ({
1014
+ const h = c(() => r.page === i(u)), C = c(() => r.page === 1), d = c(() => ({
999
1015
  p: r.page,
1000
1016
  limit: r.limit,
1001
1017
  "total-count-mode": r.totalCountMode ?? "none"
1002
- })), P = (Q) => {
1003
- H(() => i(Q), (y) => {
1018
+ })), P = (O) => {
1019
+ H(() => i(O), (y) => {
1004
1020
  y && (r.total = (y == null ? void 0 : y.total) ?? 0, r.limit = (y == null ? void 0 : y.limit) ?? 0);
1005
1021
  });
1006
1022
  };
1007
1023
  return {
1008
- page: i(u),
1024
+ page: i(o),
1009
1025
  total: W(r, "total"),
1010
1026
  limit: W(r, "limit"),
1011
- pageCount: o,
1027
+ pageCount: u,
1012
1028
  isLastPage: h,
1013
1029
  isFirstPage: C,
1014
1030
  usePaginationSync: P,
@@ -1027,7 +1043,7 @@ function X(e) {
1027
1043
  unitPrice: n
1028
1044
  }));
1029
1045
  }
1030
- function Jt(e) {
1046
+ function _t(e) {
1031
1047
  const s = c(() => {
1032
1048
  var y;
1033
1049
  return (y = e.value) == null ? void 0 : y.calculatedCheapestPrice;
@@ -1047,45 +1063,45 @@ function Jt(e) {
1047
1063
  var y, v, A, K, l, p;
1048
1064
  return !!((y = e.value) != null && y.parentId) && ((A = (v = e.value) == null ? void 0 : v.calculatedCheapestPrice) == null ? void 0 : A.hasRange) && ((K = t == null ? void 0 : t.value) == null ? void 0 : K.unitPrice) !== ((l = s == null ? void 0 : s.value) == null ? void 0 : l.unitPrice) && ((p = s == null ? void 0 : s.value) == null ? void 0 : p.unitPrice);
1049
1065
  }
1050
- ), o = c(
1066
+ ), u = c(
1051
1067
  () => {
1052
1068
  var y, v;
1053
1069
  return a.value && X(e.value).length > 1 ? (v = (y = e.value) == null ? void 0 : y.calculatedPrices) == null ? void 0 : v.reduce((A, K) => K.unitPrice < A.unitPrice ? K : A) : t.value;
1054
1070
  }
1055
- ), u = c(
1071
+ ), o = c(
1056
1072
  () => {
1057
1073
  var y;
1058
- return (y = o.value) == null ? void 0 : y.unitPrice;
1074
+ return (y = u.value) == null ? void 0 : y.unitPrice;
1059
1075
  }
1060
1076
  ), h = c(
1061
1077
  () => {
1062
1078
  var y;
1063
- return (y = o.value) == null ? void 0 : y.totalPrice;
1079
+ return (y = u.value) == null ? void 0 : y.totalPrice;
1064
1080
  }
1065
1081
  ), C = c(
1066
- () => o.value
1082
+ () => u.value
1067
1083
  ), d = c(() => {
1068
1084
  var y, v;
1069
- return !!((v = (y = o.value) == null ? void 0 : y.listPrice) != null && v.percentage);
1085
+ return !!((v = (y = u.value) == null ? void 0 : y.listPrice) != null && v.percentage);
1070
1086
  }), P = c(
1071
1087
  () => {
1072
1088
  var y, v, A;
1073
1089
  return (A = (v = (y = e.value) == null ? void 0 : y.calculatedPrice) == null ? void 0 : v.regulationPrice) == null ? void 0 : A.price;
1074
1090
  }
1075
- ), Q = c(() => X(e.value));
1091
+ ), O = c(() => X(e.value));
1076
1092
  return {
1077
1093
  price: C,
1078
1094
  totalPrice: h,
1079
- unitPrice: u,
1095
+ unitPrice: o,
1080
1096
  displayFromVariants: r,
1081
1097
  displayFrom: a,
1082
- tierPrices: Q,
1098
+ tierPrices: O,
1083
1099
  referencePrice: n,
1084
1100
  isListPrice: d,
1085
1101
  regulationPrice: P
1086
1102
  };
1087
1103
  }
1088
- function at(e, s) {
1104
+ function it(e, s) {
1089
1105
  var n;
1090
1106
  const t = (n = e.extensions) == null ? void 0 : n.variants;
1091
1107
  return s.length === 0 ? (t == null ? void 0 : t.find((a) => {
@@ -1093,20 +1109,20 @@ function at(e, s) {
1093
1109
  return ((r = a.optionIds) == null ? void 0 : r.length) === 0;
1094
1110
  })) ?? (t == null ? void 0 : t[0]) : t == null ? void 0 : t.find((a) => {
1095
1111
  var r;
1096
- return (r = a.optionIds) == null ? void 0 : r.every((o) => s.includes(o));
1112
+ return (r = a.optionIds) == null ? void 0 : r.every((u) => s.includes(u));
1097
1113
  });
1098
1114
  }
1099
- function Xt(e, s) {
1100
- return c(() => at(i(e), i(s)));
1115
+ function en(e, s) {
1116
+ return c(() => it(i(e), i(s)));
1101
1117
  }
1102
- function Yt(e) {
1118
+ function tn(e) {
1103
1119
  return c(() => {
1104
- var s, t, n, a, r, o;
1105
- return !!((t = (s = i(e)) == null ? void 0 : s.customer) != null && t.id) && !!((a = (n = i(e)) == null ? void 0 : n.customer) != null && a.active) && !((o = (r = i(e)) == null ? void 0 : r.customer) != null && o.guest);
1120
+ var s, t, n, a, r, u;
1121
+ return !!((t = (s = i(e)) == null ? void 0 : s.customer) != null && t.id) && !!((a = (n = i(e)) == null ? void 0 : n.customer) != null && a.active) && !((u = (r = i(e)) == null ? void 0 : r.customer) != null && u.guest);
1106
1122
  });
1107
1123
  }
1108
- function Zt(e) {
1109
- const s = Ke(e ? { body: e } : void 0), t = c(() => {
1124
+ function nn(e) {
1125
+ const s = Fe(e ? { body: e } : void 0), t = c(() => {
1110
1126
  var d;
1111
1127
  return (d = s.data) == null ? void 0 : d.value;
1112
1128
  }), n = c(
@@ -1122,12 +1138,12 @@ function Zt(e) {
1122
1138
  ), r = c(() => {
1123
1139
  var d;
1124
1140
  return !!((d = t.value) != null && d.guest);
1125
- }), o = c(
1141
+ }), u = c(
1126
1142
  () => {
1127
1143
  var d;
1128
1144
  return ((d = t.value) == null ? void 0 : d.defaultBillingAddressId) || null;
1129
1145
  }
1130
- ), u = c(
1146
+ ), o = c(
1131
1147
  () => {
1132
1148
  var d;
1133
1149
  return ((d = t.value) == null ? void 0 : d.defaultShippingAddressId) || null;
@@ -1149,8 +1165,8 @@ function Zt(e) {
1149
1165
  isLoggedIn: n,
1150
1166
  isCustomerSession: a,
1151
1167
  isGuestSession: r,
1152
- defaultBillingAddressId: o,
1153
- defaultShippingAddressId: u,
1168
+ defaultBillingAddressId: u,
1169
+ defaultShippingAddressId: o,
1154
1170
  userDefaultBillingAddress: h,
1155
1171
  userDefaultShippingAddress: C,
1156
1172
  // Expose queries and mutations directly
@@ -1158,90 +1174,93 @@ function Zt(e) {
1158
1174
  };
1159
1175
  }
1160
1176
  export {
1161
- lt as absolutizeSeoUrl,
1177
+ pt as absolutizeSeoUrl,
1162
1178
  w as addressKeys,
1163
- L as cartKeys,
1179
+ x as cartKeys,
1164
1180
  B as categoryKeys,
1165
- F as contextKeys,
1181
+ R as contextKeys,
1166
1182
  T as countryKeys,
1167
- R as customerKeys,
1168
- at as getProductVariantForOptions,
1169
- se as isAsynchronousOrder,
1183
+ F as customerKeys,
1184
+ it as getProductVariantForOptions,
1185
+ re as isAsynchronousOrder,
1186
+ ee as languageKey,
1170
1187
  b as navigationKeys,
1171
1188
  U as orderKeys,
1172
1189
  D as paymentKeys,
1173
- x as productKeys,
1174
- Ne as readPaymentMethodOperation,
1175
- tt as readShippingMethodOperation,
1190
+ L as productKeys,
1191
+ je as readPaymentMethodOperation,
1192
+ rt as readShippingMethodOperation,
1176
1193
  V as relativizeSeoUrl,
1177
1194
  j as salutationKeys,
1178
1195
  E as seoUrlKeys,
1179
1196
  N as shippingKeys,
1180
1197
  _ as shopwareClientKey,
1181
- m as unrefOptions,
1182
- vt as useAddLineItemMutation,
1183
- Mt as useChangeEmailMutation,
1184
- Ut as useChangePasswordMutation,
1185
- Ot as useChangeProfileMutation,
1186
- yt as useCheckoutAddresses,
1187
- gt as useCreateCustomerAddressMutation,
1188
- Pt as useCreateOrderMutation,
1189
- Ft as useDefaultBillingAddressMutation,
1190
- Rt as useDefaultShippingAddressMutation,
1191
- ht as useDeleteCustomerAddressMutation,
1192
- It as useDeleteCustomerMutation,
1193
- Bt as useHandlePaymentMutation,
1194
- Yt as useIsLoggedIn,
1195
- ne as useListAddressQuery,
1196
- te as useListAddressQueryOptions,
1197
- At as useLoginCustomerMutation,
1198
- Kt as useLogoutCustomerMutation,
1199
- dt as useOptimistic,
1200
- pt as useOrderDetails,
1201
- mt as useOrderPayment,
1202
- Nt as useOrderSetPaymentMutation,
1203
- Wt as usePagination,
1204
- zt as usePaymentMethods,
1205
- Jt as useProductPrice,
1206
- Xt as useProductVariantForOptions,
1207
- qt as useReadCartQuery,
1208
- ge as useReadCartQueryOptions,
1209
- Dt as useReadCategoryListQuery,
1210
- $e as useReadCategoryListQueryOptions,
1211
- Et as useReadCompactProductListingQuery,
1212
- Ge as useReadCompactProductListingQueryOptions,
1198
+ g as unrefOptions,
1199
+ St as useAddLineItemMutation,
1200
+ wt as useChangeEmailMutation,
1201
+ Nt as useChangePasswordMutation,
1202
+ Rt as useChangeProfileMutation,
1203
+ mt as useCheckoutAddresses,
1204
+ vt as useCreateCustomerAddressMutation,
1205
+ Ot as useCreateOrderMutation,
1206
+ xt as useDefaultBillingAddressMutation,
1207
+ Ut as useDefaultShippingAddressMutation,
1208
+ qt as useDeleteCustomerAddressMutation,
1209
+ bt as useDeleteCustomerMutation,
1210
+ jt as useHandlePaymentMutation,
1211
+ tn as useIsLoggedIn,
1212
+ se as useListAddressQuery,
1213
+ ne as useListAddressQueryOptions,
1214
+ Ft as useLoginCustomerMutation,
1215
+ It as useLogoutCustomerMutation,
1216
+ gt as useOptimistic,
1217
+ ht as useOrderDetails,
1218
+ ft as useOrderPayment,
1219
+ Tt as useOrderSetPaymentMutation,
1220
+ Zt as usePagination,
1221
+ Jt as usePaymentMethods,
1222
+ _t as useProductPrice,
1223
+ en as useProductVariantForOptions,
1224
+ Pt as useReadCartQuery,
1225
+ he as useReadCartQueryOptions,
1226
+ Vt as useReadCategoryListQuery,
1227
+ He as useReadCategoryListQueryOptions,
1228
+ $t as useReadCompactProductListingQuery,
1229
+ Je as useReadCompactProductListingQueryOptions,
1213
1230
  k as useReadContextQuery,
1214
- ae as useReadContextQueryOptions,
1215
- Qt as useReadCountryQuery,
1216
- Ce as useReadCountryQueryOptions,
1217
- We as useReadCustomProductDetailOptions,
1218
- jt as useReadCustomProductDetailQuery,
1219
- Ke as useReadCustomerQuery,
1220
- Ae as useReadCustomerQueryOptions,
1221
- kt as useReadNavigationQuery,
1222
- Be as useReadNavigationQueryOptions,
1223
- ce as useReadOrderQuery,
1224
- ie as useReadOrderQueryOptions,
1225
- Ee as useReadPaymentMethodQuery,
1226
- De as useReadPaymentMethodQueryOptions,
1227
- Vt as useReadSalutationQuery,
1228
- Ze as useReadSalutationQueryOptions,
1229
- $t as useReadSeoUrlQuery,
1230
- et as useReadSeoUrlQueryOptions,
1231
- st as useReadShippingMethodQuery,
1232
- nt as useReadShippingMethodQueryOptions,
1233
- bt as useRecoveryPasswordMutation,
1234
- xt as useRegisterConfirmMutation,
1235
- wt as useRegisterCustomerMutation,
1236
- Ct as useRemoveLineItemMutation,
1237
- Tt as useSearchPageQuery,
1238
- Xe as useSearchPageQueryOptions,
1239
- Lt as useSendRecoveryMailMutation,
1240
- Ht as useSeoUrl,
1241
- Gt as useShippingMethods,
1242
- g as useShopwareQueryClient,
1231
+ ue as useReadContextQueryOptions,
1232
+ Kt as useReadCountryQuery,
1233
+ Qe as useReadCountryQueryOptions,
1234
+ Ye as useReadCustomProductDetailOptions,
1235
+ zt as useReadCustomProductDetailQuery,
1236
+ Fe as useReadCustomerQuery,
1237
+ Re as useReadCustomerQueryOptions,
1238
+ At as useReadLanguageQuery,
1239
+ Se as useReadLanguageQueryOptions,
1240
+ Et as useReadNavigationQuery,
1241
+ Ee as useReadNavigationQueryOptions,
1242
+ le as useReadOrderQuery,
1243
+ ce as useReadOrderQueryOptions,
1244
+ Ve as useReadPaymentMethodQuery,
1245
+ Te as useReadPaymentMethodQueryOptions,
1246
+ Ht as useReadSalutationQuery,
1247
+ tt as useReadSalutationQueryOptions,
1248
+ Wt as useReadSeoUrlQuery,
1249
+ st as useReadSeoUrlQueryOptions,
1250
+ ut as useReadShippingMethodQuery,
1251
+ at as useReadShippingMethodQueryOptions,
1252
+ Dt as useRecoveryPasswordMutation,
1253
+ kt as useRegisterConfirmMutation,
1254
+ Lt as useRegisterCustomerMutation,
1255
+ Qt as useRemoveLineItemMutation,
1256
+ Gt as useSearchPageQuery,
1257
+ _e as useSearchPageQueryOptions,
1258
+ Bt as useSendRecoveryMailMutation,
1259
+ Yt as useSeoUrl,
1260
+ Xt as useShippingMethods,
1261
+ m as useShopwareQueryClient,
1243
1262
  $ as useUpdateContextMutation,
1244
- ft as useUpdateCustomerAddressMutation,
1245
- St as useUpdateLineItemMutation,
1246
- Zt as useUser
1263
+ Ct as useUpdateCustomerAddressMutation,
1264
+ Mt as useUpdateLineItemMutation,
1265
+ nn as useUser
1247
1266
  };