@wix/bookings 1.0.1750 → 1.0.1751

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.
Files changed (105) hide show
  1. package/_sdk-exports/context-booking-checkout/runtime.js +2 -0
  2. package/_sdk-exports/context-categories/runtime.js +1 -0
  3. package/_sdk-exports/context-locations/runtime.js +1 -0
  4. package/_sdk-exports/{context-service-context → context-service}/runtime.d.ts +1 -1
  5. package/_sdk-exports/{context-service-context → context-service}/runtime.js +2 -2
  6. package/_sdk-exports/context-service-addons/runtime.js +1 -0
  7. package/_sdk-exports/context-services/runtime.js +2 -0
  8. package/_sdk-exports/context-time-slots/runtime.js +2 -0
  9. package/build/cjs/{context-booking-checkout-context.js → context-booking-checkout.js} +909 -925
  10. package/build/cjs/context-booking-checkout.js.map +1 -0
  11. package/build/cjs/{context-categories-context.js → context-categories.js} +287 -293
  12. package/build/cjs/context-categories.js.map +1 -0
  13. package/build/cjs/{context-locations-context.js → context-locations.js} +362 -368
  14. package/build/cjs/context-locations.js.map +1 -0
  15. package/build/cjs/{context-service-addons-context.js → context-service-addons.js} +424 -430
  16. package/build/cjs/context-service-addons.js.map +1 -0
  17. package/build/cjs/{context-service-context.d.ts → context-service.d.ts} +1 -1
  18. package/build/cjs/{context-service-context.js → context-service.js} +964 -977
  19. package/build/cjs/context-service.js.map +1 -0
  20. package/build/cjs/{context-services-context.js → context-services.js} +600 -611
  21. package/build/cjs/context-services.js.map +1 -0
  22. package/build/cjs/{context-time-slots-context.js → context-time-slots.js} +1187 -1195
  23. package/build/cjs/context-time-slots.js.map +1 -0
  24. package/build/es/{context-booking-checkout-context.mjs → context-booking-checkout.mjs} +906 -922
  25. package/build/es/context-booking-checkout.mjs.map +1 -0
  26. package/build/es/{context-categories-context.mjs → context-categories.mjs} +283 -289
  27. package/build/es/context-categories.mjs.map +1 -0
  28. package/build/es/{context-locations-context.mjs → context-locations.mjs} +358 -364
  29. package/build/es/context-locations.mjs.map +1 -0
  30. package/build/es/{context-service-addons-context.mjs → context-service-addons.mjs} +417 -423
  31. package/build/es/context-service-addons.mjs.map +1 -0
  32. package/build/{internal/cjs/context-service-context.d.ts → es/context-service.d.mts} +1 -1
  33. package/build/es/{context-service-context.mjs → context-service.mjs} +960 -973
  34. package/build/es/context-service.mjs.map +1 -0
  35. package/build/es/{context-services-context.mjs → context-services.mjs} +596 -607
  36. package/build/es/context-services.mjs.map +1 -0
  37. package/build/es/{context-time-slots-context.mjs → context-time-slots.mjs} +1181 -1189
  38. package/build/es/context-time-slots.mjs.map +1 -0
  39. package/build/internal/{es/context-service-context.d.mts → cjs/context-service.d.ts} +1 -1
  40. package/build/{es/context-service-context.d.mts → internal/es/context-service.d.mts} +1 -1
  41. package/context/booking-checkout/package.json +3 -0
  42. package/context/categories/package.json +3 -0
  43. package/context/locations/package.json +3 -0
  44. package/context/service/package.json +3 -0
  45. package/context/service-addons/package.json +3 -0
  46. package/context/services/package.json +3 -0
  47. package/context/time-slots/package.json +3 -0
  48. package/package.json +37 -37
  49. package/_sdk-exports/context-booking-checkout-context/runtime.js +0 -2
  50. package/_sdk-exports/context-categories-context/runtime.js +0 -1
  51. package/_sdk-exports/context-locations-context/runtime.js +0 -1
  52. package/_sdk-exports/context-service-addons-context/runtime.js +0 -1
  53. package/_sdk-exports/context-services-context/runtime.js +0 -2
  54. package/_sdk-exports/context-time-slots-context/runtime.js +0 -2
  55. package/build/cjs/context-booking-checkout-context.js.map +0 -1
  56. package/build/cjs/context-categories-context.js.map +0 -1
  57. package/build/cjs/context-locations-context.js.map +0 -1
  58. package/build/cjs/context-service-addons-context.js.map +0 -1
  59. package/build/cjs/context-service-context.js.map +0 -1
  60. package/build/cjs/context-services-context.js.map +0 -1
  61. package/build/cjs/context-time-slots-context.js.map +0 -1
  62. package/build/es/context-booking-checkout-context.mjs.map +0 -1
  63. package/build/es/context-categories-context.mjs.map +0 -1
  64. package/build/es/context-locations-context.mjs.map +0 -1
  65. package/build/es/context-service-addons-context.mjs.map +0 -1
  66. package/build/es/context-service-context.mjs.map +0 -1
  67. package/build/es/context-services-context.mjs.map +0 -1
  68. package/build/es/context-time-slots-context.mjs.map +0 -1
  69. package/context/booking-checkout-context/package.json +0 -3
  70. package/context/categories-context/package.json +0 -3
  71. package/context/locations-context/package.json +0 -3
  72. package/context/service-addons-context/package.json +0 -3
  73. package/context/service-context/package.json +0 -3
  74. package/context/services-context/package.json +0 -3
  75. package/context/time-slots-context/package.json +0 -3
  76. /package/_sdk-exports/{context-booking-checkout-context → context-booking-checkout}/runtime.d.ts +0 -0
  77. /package/_sdk-exports/{context-categories-context → context-categories}/runtime.d.ts +0 -0
  78. /package/_sdk-exports/{context-locations-context → context-locations}/runtime.d.ts +0 -0
  79. /package/_sdk-exports/{context-service-addons-context → context-service-addons}/runtime.d.ts +0 -0
  80. /package/_sdk-exports/{context-services-context → context-services}/runtime.d.ts +0 -0
  81. /package/_sdk-exports/{context-time-slots-context → context-time-slots}/runtime.d.ts +0 -0
  82. /package/build/cjs/{context-booking-checkout-context.d.ts → context-booking-checkout.d.ts} +0 -0
  83. /package/build/cjs/{context-categories-context.d.ts → context-categories.d.ts} +0 -0
  84. /package/build/cjs/{context-locations-context.d.ts → context-locations.d.ts} +0 -0
  85. /package/build/cjs/{context-service-addons-context.d.ts → context-service-addons.d.ts} +0 -0
  86. /package/build/cjs/{context-services-context.d.ts → context-services.d.ts} +0 -0
  87. /package/build/cjs/{context-time-slots-context.d.ts → context-time-slots.d.ts} +0 -0
  88. /package/build/es/{context-booking-checkout-context.d.mts → context-booking-checkout.d.mts} +0 -0
  89. /package/build/es/{context-categories-context.d.mts → context-categories.d.mts} +0 -0
  90. /package/build/es/{context-locations-context.d.mts → context-locations.d.mts} +0 -0
  91. /package/build/es/{context-service-addons-context.d.mts → context-service-addons.d.mts} +0 -0
  92. /package/build/es/{context-services-context.d.mts → context-services.d.mts} +0 -0
  93. /package/build/es/{context-time-slots-context.d.mts → context-time-slots.d.mts} +0 -0
  94. /package/build/internal/cjs/{context-booking-checkout-context.d.ts → context-booking-checkout.d.ts} +0 -0
  95. /package/build/internal/cjs/{context-categories-context.d.ts → context-categories.d.ts} +0 -0
  96. /package/build/internal/cjs/{context-locations-context.d.ts → context-locations.d.ts} +0 -0
  97. /package/build/internal/cjs/{context-service-addons-context.d.ts → context-service-addons.d.ts} +0 -0
  98. /package/build/internal/cjs/{context-services-context.d.ts → context-services.d.ts} +0 -0
  99. /package/build/internal/cjs/{context-time-slots-context.d.ts → context-time-slots.d.ts} +0 -0
  100. /package/build/internal/es/{context-booking-checkout-context.d.mts → context-booking-checkout.d.mts} +0 -0
  101. /package/build/internal/es/{context-categories-context.d.mts → context-categories.d.mts} +0 -0
  102. /package/build/internal/es/{context-locations-context.d.mts → context-locations.d.mts} +0 -0
  103. /package/build/internal/es/{context-service-addons-context.d.mts → context-service-addons.d.mts} +0 -0
  104. /package/build/internal/es/{context-services-context.d.mts → context-services.d.mts} +0 -0
  105. /package/build/internal/es/{context-time-slots-context.d.mts → context-time-slots.d.mts} +0 -0
@@ -17,20 +17,20 @@ var __copyProps = (to2, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // context-time-slots-context.ts
21
- var context_time_slots_context_exports = {};
22
- __export(context_time_slots_context_exports, {
23
- TimeSlotsContextProvider: () => El,
24
- default: () => El,
25
- injectAccessTokenGetter: () => Al,
26
- timeSlotsContext: () => xl,
27
- useTimeSlotsContext: () => Sl
20
+ // context-time-slots.ts
21
+ var context_time_slots_exports = {};
22
+ __export(context_time_slots_exports, {
23
+ TimeSlotsContextProvider: () => Cl,
24
+ default: () => Cl,
25
+ injectAccessTokenGetter: () => Dl,
26
+ timeSlotsContext: () => vl,
27
+ useTimeSlotsContext: () => yl
28
28
  });
29
- module.exports = __toCommonJS(context_time_slots_context_exports);
29
+ module.exports = __toCommonJS(context_time_slots_exports);
30
30
 
31
- // _sdk-exports/context-time-slots-context/runtime.js
31
+ // _sdk-exports/context-time-slots/runtime.js
32
32
  var import_react = require("react");
33
- var import_service_context = require("@wix/bookings/context/service-context");
33
+ var import_service = require("@wix/bookings/context/service");
34
34
  var import_services_manager_react = require("@wix/services-manager-react");
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var m = {};
@@ -104,12 +104,12 @@ function ee(e2, t2) {
104
104
  }
105
105
  var E = `x-wix-bi-gateway`;
106
106
  function D(e2, t2, n2) {
107
- return { [E]: te({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e2.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e2.methodFqn, entity: e2.entityFqdn }) };
107
+ return { [E]: O({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e2.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e2.methodFqn, entity: e2.entityFqdn }) };
108
108
  }
109
- function te(e2) {
109
+ function O(e2) {
110
110
  return Object.entries(e2).filter(([e3, t2]) => !!t2).map(([e3, t2]) => `${e3}=${t2}`).join(`,`);
111
111
  }
112
- function ne(e2) {
112
+ function te(e2) {
113
113
  let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
114
114
  globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
115
115
  try {
@@ -118,69 +118,69 @@ function ne(e2) {
118
118
  globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
119
119
  }
120
120
  }
121
- var O = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
122
- function k(e2) {
123
- return j(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
121
+ var k = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
122
+ function A(e2) {
123
+ return M(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
124
124
  }
125
- var re = /([\p{Ll}\d])(\p{Lu})/gu;
126
- var ie = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
127
- var A = `$1\0$2`;
128
- var ae = /[^\p{L}\d]+/giu;
129
- function j(e2) {
125
+ var ne = /([\p{Ll}\d])(\p{Lu})/gu;
126
+ var re = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
127
+ var j = `$1\0$2`;
128
+ var ie = /[^\p{L}\d]+/giu;
129
+ function M(e2) {
130
130
  let t2 = e2.trim();
131
- t2 = t2.replace(re, A).replace(ie, A), t2 = t2.replace(ae, `\0`);
131
+ t2 = t2.replace(ne, j).replace(re, j), t2 = t2.replace(ie, `\0`);
132
132
  let n2 = 0, r2 = t2.length;
133
133
  for (; t2.charAt(n2) === `\0`; ) n2++;
134
134
  if (n2 === r2) return [];
135
135
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
136
136
  return t2.slice(n2, r2).split(/\0/g);
137
137
  }
138
- var oe = (e2) => `validationError` in (e2.response?.data?.details ?? {});
139
- var M = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
140
- var se = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
141
- function N(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
138
+ var ae = (e2) => `validationError` in (e2.response?.data?.details ?? {});
139
+ var N = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
140
+ var oe = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
141
+ function P(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
142
142
  if (typeof e2 != `object` || !e2) throw e2;
143
- if (oe(e2)) return ce(e2, t2, n2);
144
- if (M(e2)) return ue(e2);
145
- if (se(e2)) {
146
- let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: k(n3), data: {} }, requestId: e2.requestId };
147
- return le(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
143
+ if (ae(e2)) return se(e2, t2, n2);
144
+ if (N(e2)) return le(e2);
145
+ if (oe(e2)) {
146
+ let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: A(n3), data: {} }, requestId: e2.requestId };
147
+ return ce(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
148
148
  }
149
- return de(e2);
149
+ return ue(e2);
150
150
  }
151
- var ce = (e2, t2, n2) => {
152
- let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = fe(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
153
- return le(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
151
+ var se = (e2, t2, n2) => {
152
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = de(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
153
+ return ce(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
154
154
  };
155
- var le = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
156
- var ue = (e2) => {
157
- let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? k(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
158
- return le(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
155
+ var ce = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
156
+ var le = (e2) => {
157
+ let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? A(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
158
+ return ce(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
159
159
  };
160
- var de = (e2) => le(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: k(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
161
- var fe = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
160
+ var ue = (e2) => ce(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: A(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
161
+ var de = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
162
162
  let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
163
163
  return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
164
164
  let r3 = t2[e3.field];
165
- if (r3) return { ...e3, field: pe(r3, i2) };
165
+ if (r3) return { ...e3, field: fe(r3, i2) };
166
166
  let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
167
167
  if (s2) {
168
168
  let t3 = a2[s2];
169
- if (t3) return { ...e3, field: e3.field.replace(s2, pe(t3, i2)) };
169
+ if (t3) return { ...e3, field: e3.field.replace(s2, fe(t3, i2)) };
170
170
  }
171
171
  return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
172
172
  });
173
173
  };
174
- var pe = (e2, t2) => {
175
- let n2 = P(e2);
174
+ var fe = (e2, t2) => {
175
+ let n2 = F(e2);
176
176
  return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
177
177
  };
178
- var P = (e2) => {
178
+ var F = (e2) => {
179
179
  let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
180
180
  return t2 && t2.groups && Number(t2.groups.argIndex);
181
181
  };
182
- function me(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
183
- return ne(() => e2({ request: async (e3) => {
182
+ function pe(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
183
+ return te(() => e2({ request: async (e3) => {
184
184
  let i3 = e3({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
185
185
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
186
186
  let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? b : o3}${a3.url}`;
@@ -193,7 +193,7 @@ function me(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
193
193
  e5 = await s3.json();
194
194
  } catch {
195
195
  }
196
- let t3 = ge(s3.status, e5?.message ?? s3.statusText, e5?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e5 }), n3 = N(t3);
196
+ let t3 = he(s3.status, e5?.message ?? s3.statusText, e5?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e5 }), n3 = P(t3);
197
197
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
198
198
  }
199
199
  let l3 = await s3.json();
@@ -203,18 +203,18 @@ function me(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
203
203
  }
204
204
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
205
205
  }
206
- var he = class extends Error {
206
+ var me = class extends Error {
207
207
  response;
208
208
  requestId;
209
209
  constructor(e2) {
210
210
  super(), this.response = e2.response, this.requestId = e2.requestId;
211
211
  }
212
212
  };
213
- var ge = (e2, t2, n2, r2) => new he({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2 }, status: e2 }, requestId: r2?.requestId });
214
- var F = `.`;
215
- function _e(e2, t2, n2) {
213
+ var he = (e2, t2, n2, r2) => new me({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2 }, status: e2 }, requestId: r2?.requestId });
214
+ var I = `.`;
215
+ function ge(e2, t2, n2) {
216
216
  if (e2 == null) throw Error(`Cannot set value on null or undefined`);
217
- let r2 = ve(t2), i2 = e2;
217
+ let r2 = _e(t2), i2 = e2;
218
218
  for (let e3 = 0; e3 < r2.length; e3++) {
219
219
  let t3 = r2[e3];
220
220
  if (e3 === r2.length - 1) {
@@ -226,21 +226,21 @@ function _e(e2, t2, n2) {
226
226
  }
227
227
  return e2;
228
228
  }
229
- function ve(e2) {
230
- return Array.isArray(e2) ? e2 : e2.split(F).map((e3) => ye(e3) ? Number(e3) : e3);
229
+ function _e(e2) {
230
+ return Array.isArray(e2) ? e2 : e2.split(I).map((e3) => ve(e3) ? Number(e3) : e3);
231
231
  }
232
- function ye(e2) {
232
+ function ve(e2) {
233
233
  return /^\d+$/.test(e2);
234
234
  }
235
- function be(e2) {
235
+ function ye(e2) {
236
236
  let t2 = {};
237
- for (let [n2, r2] of Object.entries(e2)) xe(n2) || _e(t2, ve(n2), r2);
237
+ for (let [n2, r2] of Object.entries(e2)) be(n2) || ge(t2, _e(n2), r2);
238
238
  return t2;
239
239
  }
240
- function xe(e2) {
240
+ function be(e2) {
241
241
  return e2 === `__proto__` || e2 === `constructor` || e2 === `prototype`;
242
242
  }
243
- var Se = class {
243
+ var xe = class {
244
244
  BRACKET_PATTERN = /\[(\d+)\]/g;
245
245
  NUMERIC_PATTERN = /^\d+$/;
246
246
  ESCAPED_DOT_PATTERN = /\\\./g;
@@ -263,7 +263,7 @@ var Se = class {
263
263
  return e2.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
264
264
  }
265
265
  unflatten() {
266
- return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e2, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e2)), t2])), be(this.cleanedModifiedFields);
266
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e2, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e2)), t2])), ye(this.cleanedModifiedFields);
267
267
  }
268
268
  flatten(e2) {
269
269
  let t2 = {};
@@ -283,12 +283,12 @@ var Se = class {
283
283
  if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
284
284
  r2.push(`[${e3}]`), n2 = n2[parseInt(e3, 10)];
285
285
  }, a2 = (e3, t3) => {
286
- let i3 = e3 in O ? O[e3] : void 0;
286
+ let i3 = e3 in k ? k[e3] : void 0;
287
287
  if (i3 && i3 in t3) {
288
288
  r2.push(i3), n2 = t3[i3];
289
289
  return;
290
290
  }
291
- let a3 = Ee(e3);
291
+ let a3 = Te(e3);
292
292
  if (a3 && a3 in t3) {
293
293
  r2.push(a3), n2 = t3[a3];
294
294
  return;
@@ -319,28 +319,28 @@ var Se = class {
319
319
  return e2.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e2[r2 - 1] === `\\` ? t2 : `.` + n2);
320
320
  }
321
321
  };
322
- function Ce(e2, t2) {
322
+ function Se(e2, t2) {
323
323
  let n2 = e2?.modifiedFields;
324
324
  if (!n2) return null;
325
- let r2 = we(n2);
325
+ let r2 = Ce(n2);
326
326
  if (!r2) return null;
327
327
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
328
328
  e2 = { ...e2, modifiedFields: i2 };
329
329
  let o2 = t2(e2), s2 = o2?.modifiedFields;
330
330
  if (!s2) return null;
331
- let c2 = Te(s2, a2);
331
+ let c2 = we(s2, a2);
332
332
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
333
333
  }
334
- function we(e2) {
334
+ function Ce(e2) {
335
335
  if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
336
- let t2 = new Se(e2);
336
+ let t2 = new xe(e2);
337
337
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
338
338
  } catch {
339
339
  return null;
340
340
  }
341
341
  return null;
342
342
  }
343
- function Te(e2, t2) {
343
+ function we(e2, t2) {
344
344
  if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
345
345
  return t2.flatten(e2);
346
346
  } catch {
@@ -348,10 +348,10 @@ function Te(e2, t2) {
348
348
  }
349
349
  return null;
350
350
  }
351
- function Ee(e2) {
351
+ function Te(e2) {
352
352
  return e2.replace(/[-_\s]+(.)?/g, (e3, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e3) => e3.toLowerCase());
353
353
  }
354
- function De() {
354
+ function Ee() {
355
355
  return { emit(e2, ...t2) {
356
356
  for (let n2 = 0, r2 = this.events[e2] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
357
357
  }, events: {}, on(e2, t2) {
@@ -360,8 +360,8 @@ function De() {
360
360
  };
361
361
  } };
362
362
  }
363
- var Oe = (e2) => e2.__type === `event-definition`;
364
- function ke(e2, t2, n2, r2) {
363
+ var De = (e2) => e2.__type === `event-definition`;
364
+ function Oe(e2, t2, n2, r2) {
365
365
  let i2;
366
366
  if (e2.isDomainEvent) {
367
367
  let { deletedEvent: e3, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
@@ -372,14 +372,14 @@ function ke(e2, t2, n2, r2) {
372
372
  let e3 = s2.modifiedFields;
373
373
  if (typeof e3 == `object` && e3 && !Array.isArray(e3)) {
374
374
  o2 = structuredClone(i2);
375
- let e4 = Ce(s2, a2);
375
+ let e4 = Se(s2, a2);
376
376
  if (e4) return t2(e4);
377
377
  }
378
378
  }
379
379
  return t2(a2(o2));
380
380
  }
381
- function Ae(e2) {
382
- let t2 = /* @__PURE__ */ new Map(), n2 = De();
381
+ function ke(e2) {
382
+ let t2 = /* @__PURE__ */ new Map(), n2 = Ee();
383
383
  return { initModule(e3) {
384
384
  return (r2) => {
385
385
  let i2 = t2.get(e3.type) ?? [];
@@ -389,7 +389,7 @@ function Ae(e2) {
389
389
  let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e3), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e4) => ({ type: e4 }))];
390
390
  if (c2.length > 0 && !c2.some(({ type: e4 }) => e4 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e4) => e4.type).join(`, `)}`);
391
391
  let l2 = t2.get(r2) ?? [];
392
- return await Promise.all(l2.map(({ eventDefinition: e4, handler: t3 }) => ke(e4, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
392
+ return await Promise.all(l2.map(({ eventDefinition: e4, handler: t3 }) => Oe(e4, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
393
393
  }, async processRequest(e3, t3) {
394
394
  let n3 = await e3.text();
395
395
  return this.process(n3, t3);
@@ -408,12 +408,12 @@ function Ae(e2) {
408
408
  let n3 = Array.from(t2.keys()).map((e4) => ({ type: e4 }));
409
409
  if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e3.eventType)) throw Error(`Unexpected event type: ${e3.eventType}. Expected one of: ${n3.map((e4) => e4.type).join(`, `)}`);
410
410
  let r2 = t2.get(e3.eventType) ?? [];
411
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => ke(t3, n4, e3.payload, { instanceId: e3.instanceId, identity: e3.identity })));
411
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Oe(t3, n4, e3.payload, { instanceId: e3.instanceId, identity: e3.identity })));
412
412
  }, apps: { AppInstalled: h(`AppInstalled`)(), AppRemoved: h(`AppRemoved`)() } } };
413
413
  }
414
- var je = (e2) => e2.__type === `service-plugin-definition`;
415
- function Me(e2) {
416
- let t2 = /* @__PURE__ */ new Map(), n2 = De();
414
+ var Ae = (e2) => e2.__type === `service-plugin-definition`;
415
+ function je(e2) {
416
+ let t2 = /* @__PURE__ */ new Map(), n2 = Ee();
417
417
  return { initModule(e3) {
418
418
  return (r2) => {
419
419
  let i2 = t2.get(e3.componentType.toLowerCase()) ?? [];
@@ -454,38 +454,38 @@ function Me(e2) {
454
454
  return s2.transformations.toREST(await c2(s2.transformations.fromREST(e3)));
455
455
  } } };
456
456
  }
457
- var Ne = `X-Wix-Consistent`;
458
- function Pe(e2) {
457
+ var Me = `X-Wix-Consistent`;
458
+ function Ne(e2) {
459
459
  let t2 = e2.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e3) => Promise.resolve({ headers: {} }) }, r2 = e2.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e2.host), o2 = () => e2.fetch ?? fetch, s2 = async (n3, r3) => {
460
- let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [Ne]: t2[Ne] } : {} }, l3 = e2.host?.getErrorHandler?.();
460
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [Me]: t2[Me] } : {} }, l3 = e2.host?.getErrorHandler?.();
461
461
  try {
462
462
  if (typeof n3 == `string` || n3 instanceof URL) {
463
463
  let e3 = await i3(n3, { ...r3, headers: c3 });
464
464
  l3?.handleError(e3, { requestOptions: { url: n3.toString(), method: r3?.method } });
465
- let a3 = Fe(e3);
466
- return a3 && (t2[Ne] = a3), e3;
465
+ let a3 = Pe(e3);
466
+ return a3 && (t2[Me] = a3), e3;
467
467
  }
468
468
  {
469
469
  for (let [e4, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e4, t3);
470
470
  let e3 = await i3(n3, r3);
471
471
  l3?.handleError(e3, { requestOptions: { url: n3.url, method: r3?.method } });
472
- let a3 = Fe(e3);
473
- return a3 && (t2[Ne] = a3), e3;
472
+ let a3 = Pe(e3);
473
+ return a3 && (t2[Me] = a3), e3;
474
474
  }
475
475
  } catch (e3) {
476
476
  throw l3?.handleError(e3, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e3;
477
477
  }
478
- }, { client: c2, initModule: l2 } = Me(i2), { client: u2, initModule: d2 } = Ae(i2), f2 = async (n3, r3) => {
479
- let i3 = o2(), s3 = await a2(), c3 = C(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [Ne]: t2[Ne] } : {} } }), u3 = Fe(l3);
480
- return u3 && (t2[Ne] = u3), l3;
478
+ }, { client: c2, initModule: l2 } = je(i2), { client: u2, initModule: d2 } = ke(i2), f2 = async (n3, r3) => {
479
+ let i3 = o2(), s3 = await a2(), c3 = C(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [Me]: t2[Me] } : {} } }), u3 = Pe(l3);
480
+ return u3 && (t2[Me] = u3), l3;
481
481
  }, p2 = (t3, n3) => {
482
- if (Oe(t3)) return d2(t3);
483
- if (je(t3)) return l2(t3);
482
+ if (De(t3)) return d2(t3);
483
+ if (Ae(t3)) return l2(t3);
484
484
  if (T(t3) && e2.host) return ee(t3, e2.host);
485
485
  if (typeof t3 == `function`) {
486
486
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
487
487
  let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e2.useCDN === void 0 ? i2().shouldUseCDN : e2.useCDN;
488
- return me(ne(() => v(t3)) ? _(t3) : t3, n3 ?? {}, f2, e2.host?.getErrorHandler?.(), (e3, t4) => {
488
+ return pe(te(() => v(t3)) ? _(t3) : t3, n3 ?? {}, f2, e2.host?.getErrorHandler?.(), (e3, t4) => {
489
489
  let n4 = new URL(e3, `https://${r3}`);
490
490
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
491
491
  }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e2.host?.name, o3, e2.validateRequestSchema);
@@ -509,19 +509,19 @@ function Pe(e2) {
509
509
  return { data: o3 ?? {}, errors: s3 };
510
510
  }, webhooks: u2, servicePlugins: c2 };
511
511
  }
512
- function Fe(e2) {
512
+ function Pe(e2) {
513
513
  return e2.headers?.get(`X-Wix-Consistent`) ?? e2.headers?.get(`x-wix-consistent`);
514
514
  }
515
- var Ie = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
516
- var Le = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
517
- function Re(e2, t2) {
515
+ var Fe = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
516
+ var Ie = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
517
+ function Le(e2, t2) {
518
518
  return e2?.split(`.`).map((e3) => t2?.[e3] ?? e3).join(`.`);
519
519
  }
520
- var ze = `sort.fieldName`;
521
- function Be(e2, t2, n2) {
522
- return (e2 === ze || e2.endsWith(`.${ze}`)) && typeof t2 == `string` ? Re(t2, n2) : t2;
520
+ var Re = `sort.fieldName`;
521
+ function ze(e2, t2, n2) {
522
+ return (e2 === Re || e2.endsWith(`.${Re}`)) && typeof t2 == `string` ? Le(t2, n2) : t2;
523
523
  }
524
- function Ve(e2, t2, n2) {
524
+ function Be(e2, t2, n2) {
525
525
  let r2 = (e3) => n2.includes(e3), i2 = (e3, n3) => {
526
526
  if (Array.isArray(e3)) e3.forEach((e4) => {
527
527
  i2(e4, n3);
@@ -531,147 +531,147 @@ function Ve(e2, t2, n2) {
531
531
  Object.keys(a2).forEach((e4) => {
532
532
  let o2 = n3 === `` ? e4 : `${n3}.${e4}`;
533
533
  if (r2(o2)) return;
534
- let s2 = I(e4, t2);
535
- s2 !== e4 && !(s2 in a2) && (a2[s2] = a2[e4], delete a2[e4]), a2[s2] = Be(o2, a2[s2], t2), i2(a2[s2], o2);
534
+ let s2 = L(e4, t2);
535
+ s2 !== e4 && !(s2 in a2) && (a2[s2] = a2[e4], delete a2[e4]), a2[s2] = ze(o2, a2[s2], t2), i2(a2[s2], o2);
536
536
  });
537
537
  }
538
538
  };
539
539
  return i2(e2, ``), e2;
540
540
  }
541
- function I(e2, t2) {
541
+ function L(e2, t2) {
542
542
  let n2;
543
543
  return n2 = e2.includes(`.`) ? e2.split(`.`).map((e3) => t2[e3] ?? e3).join(`.`) : t2[e2] ?? e2, n2;
544
544
  }
545
- function He(e2, t2 = []) {
546
- return Ve(e2, Ie, t2);
545
+ function Ve(e2, t2 = []) {
546
+ return Be(e2, Fe, t2);
547
547
  }
548
- function L(e2, t2 = []) {
549
- return Ve(e2, Le, t2);
548
+ function R(e2, t2 = []) {
549
+ return Be(e2, Ie, t2);
550
550
  }
551
- function Ue(e2) {
551
+ function He(e2) {
552
552
  return e2?.toISOString();
553
553
  }
554
- function We(e2) {
554
+ function Ue(e2) {
555
555
  return e2 ? new Date(e2) : void 0;
556
556
  }
557
- var Ge = /* @__PURE__ */ new WeakMap();
558
- function Ke() {
557
+ var We = /* @__PURE__ */ new WeakMap();
558
+ function Ge() {
559
559
  return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
560
560
  }
561
- function qe(e2, t2) {
561
+ function Ke(e2, t2) {
562
562
  let n2 = e2.get(t2);
563
- return n2 || (n2 = Ke(), e2.set(t2, n2)), n2;
563
+ return n2 || (n2 = Ge(), e2.set(t2, n2)), n2;
564
564
  }
565
- function Je(e2, t2) {
566
- return t2 === `*` ? (e2.anyField ??= Ke(), e2.anyField) : t2.endsWith(`{}`) ? (e2.mapFields ??= /* @__PURE__ */ new Map(), qe(e2.mapFields, t2.slice(0, -2))) : (e2.fields ??= /* @__PURE__ */ new Map(), qe(e2.fields, t2));
565
+ function qe(e2, t2) {
566
+ return t2 === `*` ? (e2.anyField ??= Ge(), e2.anyField) : t2.endsWith(`{}`) ? (e2.mapFields ??= /* @__PURE__ */ new Map(), Ke(e2.mapFields, t2.slice(0, -2))) : (e2.fields ??= /* @__PURE__ */ new Map(), Ke(e2.fields, t2));
567
567
  }
568
- function Ye(e2) {
569
- let t2 = Ke();
568
+ function Je(e2) {
569
+ let t2 = Ge();
570
570
  for (let n2 of e2) {
571
- let e3 = n2.path.split(`.`).reduce(Je, t2);
571
+ let e3 = n2.path.split(`.`).reduce(qe, t2);
572
572
  e3.leaves ??= [], e3.leaves.push(n2);
573
573
  }
574
574
  return t2;
575
575
  }
576
- function R(e2) {
577
- let t2 = Ge.get(e2);
578
- return t2 || (t2 = Ye(e2), Ge.set(e2, t2)), t2;
576
+ function z(e2) {
577
+ let t2 = We.get(e2);
578
+ return t2 || (t2 = Je(e2), We.set(e2, t2)), t2;
579
579
  }
580
- function Xe(e2) {
580
+ function Ye(e2) {
581
581
  return typeof e2 == `object` && !!e2;
582
582
  }
583
- function Ze(e2, { isRepeated: t2, isMap: n2 }, r2) {
584
- return t2 ? Array.isArray(e2) ? e2.map(r2) : e2 : n2 ? Xe(e2) ? Object.fromEntries(Object.entries(e2).map(([e3, t3]) => [e3, r2(t3)])) : e2 : r2(e2);
583
+ function Xe(e2, { isRepeated: t2, isMap: n2 }, r2) {
584
+ return t2 ? Array.isArray(e2) ? e2.map(r2) : e2 : n2 ? Ye(e2) ? Object.fromEntries(Object.entries(e2).map(([e3, t3]) => [e3, r2(t3)])) : e2 : r2(e2);
585
585
  }
586
- function Qe(e2, t2, n2) {
587
- Xe(e2) && tt(e2, t2, n2);
586
+ function Ze(e2, t2, n2) {
587
+ Ye(e2) && et(e2, t2, n2);
588
588
  }
589
- function $e(e2, t2, n2) {
589
+ function Qe(e2, t2, n2) {
590
590
  for (let [r2, i2] of t2) {
591
591
  if (!(r2 in e2)) continue;
592
- if (i2.leaves) for (let t4 of i2.leaves) e2[r2] = Ze(e2[r2], t4, n2);
592
+ if (i2.leaves) for (let t4 of i2.leaves) e2[r2] = Xe(e2[r2], t4, n2);
593
593
  let t3 = e2[r2];
594
- Array.isArray(t3) ? t3.forEach((e3) => Qe(e3, i2, n2)) : Qe(t3, i2, n2);
594
+ Array.isArray(t3) ? t3.forEach((e3) => Ze(e3, i2, n2)) : Ze(t3, i2, n2);
595
595
  }
596
596
  }
597
- function et(e2, t2, n2) {
597
+ function $e(e2, t2, n2) {
598
598
  for (let [r2, i2] of t2) {
599
599
  let t3 = e2[r2];
600
- Xe(t3) && Object.values(t3).forEach((e3) => Qe(e3, i2, n2));
600
+ Ye(t3) && Object.values(t3).forEach((e3) => Ze(e3, i2, n2));
601
601
  }
602
602
  }
603
- function tt(e2, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
604
- t2 && $e(e2, t2, i2), n2 && et(e2, n2, i2), r2 && Object.values(e2).forEach((e3) => Qe(e3, r2, i2));
603
+ function et(e2, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
604
+ t2 && Qe(e2, t2, i2), n2 && $e(e2, n2, i2), r2 && Object.values(e2).forEach((e3) => Ze(e3, r2, i2));
605
605
  }
606
- function nt(e2, t2) {
607
- if (!Xe(e2)) return e2;
608
- for (let { paths: n2, transformFn: r2 } of t2) tt(e2, R(n2), r2);
606
+ function tt(e2, t2) {
607
+ if (!Ye(e2)) return e2;
608
+ for (let { paths: n2, transformFn: r2 } of t2) et(e2, z(n2), r2);
609
609
  return e2;
610
610
  }
611
- function rt(e2) {
612
- return ct(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
611
+ function nt(e2) {
612
+ return st(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
613
613
  }
614
- var it = /([\p{Ll}\d])(\p{Lu})/gu;
615
- var at = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
616
- var ot = `$1\0$2`;
617
- var st = /[^\p{L}\d]+/giu;
618
- function ct(e2) {
614
+ var rt = /([\p{Ll}\d])(\p{Lu})/gu;
615
+ var it = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
616
+ var at = `$1\0$2`;
617
+ var ot = /[^\p{L}\d]+/giu;
618
+ function st(e2) {
619
619
  let t2 = e2.trim();
620
- t2 = t2.replace(it, ot).replace(at, ot), t2 = t2.replace(st, `\0`);
620
+ t2 = t2.replace(rt, at).replace(it, at), t2 = t2.replace(ot, `\0`);
621
621
  let n2 = 0, r2 = t2.length;
622
622
  for (; t2.charAt(n2) === `\0`; ) n2++;
623
623
  if (n2 === r2) return [];
624
624
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
625
625
  return t2.slice(n2, r2).split(/\0/g);
626
626
  }
627
- var lt = (e2) => `validationError` in (e2.response?.data?.details ?? {});
628
- var ut = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
629
- var dt = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
630
- function ft(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
627
+ var ct = (e2) => `validationError` in (e2.response?.data?.details ?? {});
628
+ var lt = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
629
+ var ut = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
630
+ function dt(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
631
631
  if (typeof e2 != `object` || !e2) throw e2;
632
- if (lt(e2)) return pt(e2, t2, n2);
633
- if (ut(e2)) return ht(e2);
634
- if (dt(e2)) {
635
- let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: rt(n3), data: {} }, requestId: e2.requestId };
636
- return mt(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
632
+ if (ct(e2)) return ft(e2, t2, n2);
633
+ if (lt(e2)) return mt(e2);
634
+ if (ut(e2)) {
635
+ let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: nt(n3), data: {} }, requestId: e2.requestId };
636
+ return pt(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
637
637
  }
638
- return z(e2);
638
+ return B(e2);
639
639
  }
640
- var pt = (e2, t2, n2) => {
641
- let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = gt(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
642
- return mt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
640
+ var ft = (e2, t2, n2) => {
641
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ht(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
642
+ return pt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
643
643
  };
644
- var mt = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
645
- var ht = (e2) => {
646
- let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? rt(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
647
- return mt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
644
+ var pt = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
645
+ var mt = (e2) => {
646
+ let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? nt(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
647
+ return pt(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
648
648
  };
649
- var z = (e2) => mt(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: rt(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
650
- var gt = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
649
+ var B = (e2) => pt(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: nt(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
650
+ var ht = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
651
651
  let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
652
652
  return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
653
653
  let r3 = t2[e3.field];
654
- if (r3) return { ...e3, field: _t(r3, i2) };
654
+ if (r3) return { ...e3, field: gt(r3, i2) };
655
655
  let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
656
656
  if (s2) {
657
657
  let t3 = a2[s2];
658
- if (t3) return { ...e3, field: e3.field.replace(s2, _t(t3, i2)) };
658
+ if (t3) return { ...e3, field: e3.field.replace(s2, gt(t3, i2)) };
659
659
  }
660
660
  return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
661
661
  });
662
662
  };
663
- var _t = (e2, t2) => {
664
- let n2 = vt(e2);
663
+ var gt = (e2, t2) => {
664
+ let n2 = _t(e2);
665
665
  return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
666
666
  };
667
- var vt = (e2) => {
667
+ var _t = (e2) => {
668
668
  let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
669
669
  return t2 && t2.groups && Number(t2.groups.argIndex);
670
670
  };
671
- function yt() {
671
+ function vt() {
672
672
  let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
673
673
  if (e2) return { initWixModules(t3, n3) {
674
- return bt(() => e2(t3, n3));
674
+ return yt(() => e2(t3, n3));
675
675
  }, fetchWithAuth() {
676
676
  throw Error(`fetchWithAuth is not available in this context`);
677
677
  }, graphql() {
@@ -681,10 +681,10 @@ function yt() {
681
681
  if (t2 || n2) return { initWixModules(e3, r2) {
682
682
  if (r2) {
683
683
  if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
684
- return bt(() => n2.use(e3));
684
+ return yt(() => n2.use(e3));
685
685
  }
686
686
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
687
- return bt(() => t2.use(e3));
687
+ return yt(() => t2.use(e3));
688
688
  }, fetchWithAuth: (e3, n3) => {
689
689
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
690
690
  return t2.fetchWithAuth(e3, n3);
@@ -696,7 +696,7 @@ function yt() {
696
696
  return t2.graphql(e3, n3, r2);
697
697
  } };
698
698
  }
699
- function bt(e2) {
699
+ function yt(e2) {
700
700
  let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
701
701
  globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
702
702
  try {
@@ -705,101 +705,101 @@ function bt(e2) {
705
705
  globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
706
706
  }
707
707
  }
708
- function xt(e2, t2) {
708
+ function bt(e2, t2) {
709
709
  return (...n2) => {
710
- let r2 = yt();
710
+ let r2 = vt();
711
711
  return r2 ? r2.initWixModules(e2, t2).apply(void 0, n2) : e2.apply(void 0, n2);
712
712
  };
713
713
  }
714
- function B(e2, t2 = false) {
715
- return xt(e2, t2);
714
+ function V(e2, t2 = false) {
715
+ return bt(e2, t2);
716
716
  }
717
- function St(e2, t2) {
718
- let n2 = wt(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
719
- return t2 && r2 ? new URLSearchParams({ ".r": Et(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
717
+ function xt(e2, t2) {
718
+ let n2 = Ct(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
719
+ return t2 && r2 ? new URLSearchParams({ ".r": Tt(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
720
720
  r3 == null || Array.isArray(n3) && typeof r3 == `object` || e3.append(t3, r3);
721
721
  }), e3), new URLSearchParams());
722
722
  }
723
- function Ct(e2) {
724
- let t2 = V(Lt(e2.host), e2.domainToMappings);
725
- return qt(Wt(e2.protoPath, e2.data || {}), t2);
723
+ function St(e2) {
724
+ let t2 = H(It(e2.host), e2.domainToMappings);
725
+ return Kt(Ut(e2.protoPath, e2.data || {}), t2);
726
726
  }
727
- function wt(e2, t2 = ``) {
727
+ function Ct(e2, t2 = ``) {
728
728
  let n2 = {};
729
729
  return Object.entries(e2).forEach(([e3, r2]) => {
730
- let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Tt(t2, e3);
730
+ let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = wt(t2, e3);
731
731
  if (i2) {
732
- let e4 = wt(r2, a2);
732
+ let e4 = Ct(r2, a2);
733
733
  Object.assign(n2, e4);
734
734
  } else n2[a2] = r2;
735
735
  }), n2;
736
736
  }
737
- function Tt(e2, t2) {
737
+ function wt(e2, t2) {
738
738
  return `${e2}${e2 ? `.` : ``}${t2}`;
739
739
  }
740
- var Et = (e2) => {
740
+ var Tt = (e2) => {
741
741
  let t2 = new TextEncoder().encode(e2);
742
742
  return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e2, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
743
743
  };
744
- var Dt = [`wix.com`, `editorx.com`];
745
- var Ot = `_`;
746
- var kt = `*.`;
747
- var At = RegExp(`\\.(${Dt.join(`|`)})$`);
748
- var jt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
749
- var Mt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
750
- var Nt = `dev.wix-code.com`;
751
- var Pt = /{(.*)}/;
752
- var Ft = RegExp(`\\.(${jt.join(`|`)})$`);
753
- var It = RegExp(`.*\\.${Nt}$`);
754
- function Lt(e2) {
755
- return Rt(e2).replace(At, `._base_domain_`).replace(Ft, `._api_base_domain_`).replace(It, `*.dev.wix-code.com`);
744
+ var Et = [`wix.com`, `editorx.com`];
745
+ var Dt = `_`;
746
+ var Ot = `*.`;
747
+ var kt = RegExp(`\\.(${Et.join(`|`)})$`);
748
+ var At = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
749
+ var jt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
750
+ var Mt = `dev.wix-code.com`;
751
+ var Nt = /{(.*)}/;
752
+ var Pt = RegExp(`\\.(${At.join(`|`)})$`);
753
+ var Ft = RegExp(`.*\\.${Mt}$`);
754
+ function It(e2) {
755
+ return Lt(e2).replace(kt, `._base_domain_`).replace(Pt, `._api_base_domain_`).replace(Ft, `*.dev.wix-code.com`);
756
756
  }
757
- function Rt(e2) {
758
- return Mt[e2] ?? e2;
757
+ function Lt(e2) {
758
+ return jt[e2] ?? e2;
759
759
  }
760
- function V(e2, t2) {
760
+ function H(e2, t2) {
761
761
  let n2 = t2[e2];
762
762
  if (n2) return n2;
763
- let r2 = zt(e2, t2) ?? Bt(e2, t2);
763
+ let r2 = Rt(e2, t2) ?? zt(e2, t2);
764
764
  if (!r2) {
765
- if (Ht(e2)) {
766
- let e3 = t2[Ut];
765
+ if (Vt(e2)) {
766
+ let e3 = t2[Ht];
767
767
  if (e3) return e3;
768
768
  }
769
- let n3 = t2[Ot];
769
+ let n3 = t2[Dt];
770
770
  if (n3) return n3;
771
771
  }
772
772
  return r2 ?? [];
773
773
  }
774
- function zt(e2, t2) {
774
+ function Rt(e2, t2) {
775
775
  return Object.entries(t2).find(([t3]) => {
776
776
  let [, ...n2] = e2.split(`.`);
777
777
  return n2.join(`.`) === t3;
778
778
  })?.[1];
779
779
  }
780
- function Bt(e2, t2) {
781
- let [n2] = Object.entries(t2).filter(([t3]) => Vt(e2, t3)).sort(([e3], [t3]) => t3.length - e3.length);
780
+ function zt(e2, t2) {
781
+ let [n2] = Object.entries(t2).filter(([t3]) => Bt(e2, t3)).sort(([e3], [t3]) => t3.length - e3.length);
782
782
  if (!n2) return;
783
783
  let [, r2] = n2;
784
784
  return r2;
785
785
  }
786
- function Vt(e2, t2) {
787
- if (!t2.startsWith(kt)) return false;
786
+ function Bt(e2, t2) {
787
+ if (!t2.startsWith(Ot)) return false;
788
788
  let n2 = t2.slice(1);
789
789
  return e2.length > n2.length && e2.endsWith(n2);
790
790
  }
791
- function Ht(e2) {
791
+ function Vt(e2) {
792
792
  return !!e2.match(/\._base_domain_$/);
793
793
  }
794
- var Ut = `www._base_domain_`;
795
- function Wt(e2, t2) {
796
- return e2.split(`/`).map((e3) => Gt(e3, t2)).join(`/`);
794
+ var Ht = `www._base_domain_`;
795
+ function Ut(e2, t2) {
796
+ return e2.split(`/`).map((e3) => Wt(e3, t2)).join(`/`);
797
797
  }
798
- function Gt(e2, t2) {
799
- let n2 = e2.match(Pt) || [], r2 = n2[1];
800
- return r2 ? Kt(t2, r2, e2, e2.replace(n2[0], ``)) : e2;
798
+ function Wt(e2, t2) {
799
+ let n2 = e2.match(Nt) || [], r2 = n2[1];
800
+ return r2 ? Gt(t2, r2, e2, e2.replace(n2[0], ``)) : e2;
801
801
  }
802
- function Kt(e2, t2, n2, r2) {
802
+ function Gt(e2, t2, n2, r2) {
803
803
  let i2 = e2;
804
804
  for (let e3 of t2.split(`.`)) {
805
805
  if (!i2) return n2;
@@ -807,36 +807,36 @@ function Kt(e2, t2, n2, r2) {
807
807
  }
808
808
  return `${i2}${r2}`;
809
809
  }
810
- function qt(e2, t2) {
810
+ function Kt(e2, t2) {
811
811
  let n2 = t2?.find((t3) => e2.startsWith(t3.destPath));
812
812
  return n2 ? n2.srcPath + e2.slice(n2.destPath.length) : e2;
813
813
  }
814
- function Jt(e2) {
814
+ function qt(e2) {
815
815
  return e2 === `NaN` ? NaN : e2 === `Infinity` ? 1 / 0 : e2 === `-Infinity` ? -1 / 0 : e2;
816
816
  }
817
- var Yt = `x-wix-linguist`;
818
- var Xt = `00000000-0000-0000-0000-000000000000`;
819
- var Zt = `false`;
820
- var H = () => {
821
- let e2 = $t(`language`), t2 = $t(`locale`);
822
- if (e2) return { [Yt]: [e2, t2 || e2, Zt, Xt].join(`|`) };
817
+ var Jt = `x-wix-linguist`;
818
+ var Yt = `00000000-0000-0000-0000-000000000000`;
819
+ var Xt = `false`;
820
+ var U = () => {
821
+ let e2 = Qt(`language`), t2 = Qt(`locale`);
822
+ if (e2) return { [Jt]: [e2, t2 || e2, Xt, Yt].join(`|`) };
823
823
  };
824
- function Qt() {
824
+ function Zt() {
825
825
  let e2 = null, t2 = null;
826
826
  return { promise: new Promise((n2, r2) => {
827
827
  e2 = n2, t2 = r2;
828
828
  }), resolve: e2, reject: t2 };
829
829
  }
830
- var $t = (e2) => typeof window < `u` ? window.commonConfig?.[e2] : void 0;
831
- var en = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
832
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = nn();
833
- return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: $t(`language`), locale: $t(`locale`), get passThroughHeaders() {
834
- return H();
830
+ var Qt = (e2) => typeof window < `u` ? window.commonConfig?.[e2] : void 0;
831
+ var $t = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
832
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = tn();
833
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: Qt(`language`), locale: Qt(`locale`), get passThroughHeaders() {
834
+ return U();
835
835
  } } };
836
836
  }, auth: (e3) => {
837
837
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
838
- !e3 && tn() && (e3 = t2?.getAccessTokenFunction?.());
839
- let n2 = false, { resolve: r2, promise: i2 } = Qt();
838
+ !e3 && en() && (e3 = t2?.getAccessTokenFunction?.());
839
+ let n2 = false, { resolve: r2, promise: i2 } = Zt();
840
840
  return { getAuthHeaders: async () => {
841
841
  if (!e3 && n2 && (e3 = await i2), !e3) throw Error(`Failed to resolve auth token`);
842
842
  return { headers: { Authorization: await e3() } };
@@ -844,486 +844,476 @@ var en = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host:
844
844
  r2(e4);
845
845
  }) };
846
846
  } });
847
- function tn() {
847
+ function en() {
848
848
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
849
849
  }
850
- function nn() {
850
+ function tn() {
851
851
  let e2 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
852
852
  if (!e2) return;
853
853
  let t2 = new URL(e2);
854
854
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
855
855
  }
856
- var rn = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
856
+ var nn = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
857
857
  if (!e2) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
858
858
  return e2.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
859
859
  }, getAccessToken: () => {
860
860
  throw Error(`Not implemented`);
861
861
  }, observeState: () => ({ disconnect: () => {
862
862
  } }) });
863
- var an = en({ createHost: function(e2) {
863
+ var rn = $t({ createHost: function(e2) {
864
864
  let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e2?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e2 || {};
865
865
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
866
- return { channel: rn({ clientSdk: t2, applicationId: n2 }), close: () => {
866
+ return { channel: nn({ clientSdk: t2, applicationId: n2 }), close: () => {
867
867
  } };
868
868
  } });
869
- var on = ((e2, t2) => {
870
- let n2 = an.host({ applicationId: e2, componentId: t2 }), r2 = an.auth();
871
- return Pe({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
869
+ var an = ((e2, t2) => {
870
+ let n2 = rn.host({ applicationId: e2, componentId: t2 }), r2 = rn.auth();
871
+ return Ne({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
872
872
  })(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`);
873
- var sn = [`ANY_FEMALE`, `ANY_MALE`];
874
- var cn = `3.7.8`;
875
- var ln = cn;
876
- var un = typeof Buffer == `function`;
877
- var dn = typeof TextDecoder == `function` ? new TextDecoder() : void 0;
878
- var fn = typeof TextEncoder == `function` ? new TextEncoder() : void 0;
879
- var pn = Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`);
880
- var mn = ((e2) => {
873
+ var on = [`ANY_FEMALE`, `ANY_MALE`];
874
+ var sn = `3.7.8`;
875
+ var cn = sn;
876
+ var ln = typeof Buffer == `function`;
877
+ var un = typeof TextDecoder == `function` ? new TextDecoder() : void 0;
878
+ var dn = typeof TextEncoder == `function` ? new TextEncoder() : void 0;
879
+ var fn = Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`);
880
+ var pn = ((e2) => {
881
881
  let t2 = {};
882
882
  return e2.forEach((e3, n2) => t2[e3] = n2), t2;
883
- })(pn);
884
- var hn = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
885
- var U = String.fromCharCode.bind(String);
886
- var gn = typeof Uint8Array.from == `function` ? Uint8Array.from.bind(Uint8Array) : (e2) => new Uint8Array(Array.prototype.slice.call(e2, 0));
887
- var _n = (e2) => e2.replace(/=/g, ``).replace(/[+\/]/g, (e3) => e3 == `+` ? `-` : `_`);
888
- var vn = (e2) => e2.replace(/[^A-Za-z0-9\+\/]/g, ``);
889
- var yn = (e2) => {
883
+ })(fn);
884
+ var mn = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
885
+ var W = String.fromCharCode.bind(String);
886
+ var hn = typeof Uint8Array.from == `function` ? Uint8Array.from.bind(Uint8Array) : (e2) => new Uint8Array(Array.prototype.slice.call(e2, 0));
887
+ var gn = (e2) => e2.replace(/=/g, ``).replace(/[+\/]/g, (e3) => e3 == `+` ? `-` : `_`);
888
+ var _n = (e2) => e2.replace(/[^A-Za-z0-9\+\/]/g, ``);
889
+ var vn = (e2) => {
890
890
  let t2, n2, r2, i2, a2 = ``, o2 = e2.length % 3;
891
891
  for (let o3 = 0; o3 < e2.length; ) {
892
892
  if ((n2 = e2.charCodeAt(o3++)) > 255 || (r2 = e2.charCodeAt(o3++)) > 255 || (i2 = e2.charCodeAt(o3++)) > 255) throw TypeError(`invalid character found`);
893
- t2 = n2 << 16 | r2 << 8 | i2, a2 += pn[t2 >> 18 & 63] + pn[t2 >> 12 & 63] + pn[t2 >> 6 & 63] + pn[t2 & 63];
893
+ t2 = n2 << 16 | r2 << 8 | i2, a2 += fn[t2 >> 18 & 63] + fn[t2 >> 12 & 63] + fn[t2 >> 6 & 63] + fn[t2 & 63];
894
894
  }
895
895
  return o2 ? a2.slice(0, o2 - 3) + `===`.substring(o2) : a2;
896
896
  };
897
- var bn = typeof btoa == `function` ? (e2) => btoa(e2) : un ? (e2) => Buffer.from(e2, `binary`).toString(`base64`) : yn;
898
- var xn = un ? (e2) => Buffer.from(e2).toString(`base64`) : (e2) => {
897
+ var yn = typeof btoa == `function` ? (e2) => btoa(e2) : ln ? (e2) => Buffer.from(e2, `binary`).toString(`base64`) : vn;
898
+ var bn = ln ? (e2) => Buffer.from(e2).toString(`base64`) : (e2) => {
899
899
  let t2 = 4096, n2 = [];
900
- for (let r2 = 0, i2 = e2.length; r2 < i2; r2 += t2) n2.push(U.apply(null, e2.subarray(r2, r2 + t2)));
901
- return bn(n2.join(``));
900
+ for (let r2 = 0, i2 = e2.length; r2 < i2; r2 += t2) n2.push(W.apply(null, e2.subarray(r2, r2 + t2)));
901
+ return yn(n2.join(``));
902
902
  };
903
- var Sn = (e2, t2 = false) => t2 ? _n(xn(e2)) : xn(e2);
904
- var Cn = (e2) => {
903
+ var xn = (e2, t2 = false) => t2 ? gn(bn(e2)) : bn(e2);
904
+ var Sn = (e2) => {
905
905
  if (e2.length < 2) {
906
906
  var t2 = e2.charCodeAt(0);
907
- return t2 < 128 ? e2 : t2 < 2048 ? U(192 | t2 >>> 6) + U(128 | t2 & 63) : U(224 | t2 >>> 12 & 15) + U(128 | t2 >>> 6 & 63) + U(128 | t2 & 63);
907
+ return t2 < 128 ? e2 : t2 < 2048 ? W(192 | t2 >>> 6) + W(128 | t2 & 63) : W(224 | t2 >>> 12 & 15) + W(128 | t2 >>> 6 & 63) + W(128 | t2 & 63);
908
908
  }
909
909
  var t2 = 65536 + (e2.charCodeAt(0) - 55296) * 1024 + (e2.charCodeAt(1) - 56320);
910
- return U(240 | t2 >>> 18 & 7) + U(128 | t2 >>> 12 & 63) + U(128 | t2 >>> 6 & 63) + U(128 | t2 & 63);
911
- };
912
- var wn = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
913
- var W = (e2) => e2.replace(wn, Cn);
914
- var Tn = un ? (e2) => Buffer.from(e2, `utf8`).toString(`base64`) : fn ? (e2) => xn(fn.encode(e2)) : (e2) => bn(W(e2));
915
- var En = (e2, t2 = false) => t2 ? _n(Tn(e2)) : Tn(e2);
916
- var Dn = (e2) => En(e2, true);
917
- var On = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
918
- var kn = (e2) => {
910
+ return W(240 | t2 >>> 18 & 7) + W(128 | t2 >>> 12 & 63) + W(128 | t2 >>> 6 & 63) + W(128 | t2 & 63);
911
+ };
912
+ var Cn = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
913
+ var G = (e2) => e2.replace(Cn, Sn);
914
+ var wn = ln ? (e2) => Buffer.from(e2, `utf8`).toString(`base64`) : dn ? (e2) => bn(dn.encode(e2)) : (e2) => yn(G(e2));
915
+ var Tn = (e2, t2 = false) => t2 ? gn(wn(e2)) : wn(e2);
916
+ var En = (e2) => Tn(e2, true);
917
+ var Dn = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
918
+ var On = (e2) => {
919
919
  switch (e2.length) {
920
920
  case 4:
921
921
  var t2 = ((7 & e2.charCodeAt(0)) << 18 | (63 & e2.charCodeAt(1)) << 12 | (63 & e2.charCodeAt(2)) << 6 | 63 & e2.charCodeAt(3)) - 65536;
922
- return U((t2 >>> 10) + 55296) + U((t2 & 1023) + 56320);
922
+ return W((t2 >>> 10) + 55296) + W((t2 & 1023) + 56320);
923
923
  case 3:
924
- return U((15 & e2.charCodeAt(0)) << 12 | (63 & e2.charCodeAt(1)) << 6 | 63 & e2.charCodeAt(2));
924
+ return W((15 & e2.charCodeAt(0)) << 12 | (63 & e2.charCodeAt(1)) << 6 | 63 & e2.charCodeAt(2));
925
925
  default:
926
- return U((31 & e2.charCodeAt(0)) << 6 | 63 & e2.charCodeAt(1));
926
+ return W((31 & e2.charCodeAt(0)) << 6 | 63 & e2.charCodeAt(1));
927
927
  }
928
928
  };
929
- var An = (e2) => e2.replace(On, kn);
930
- var jn = (e2) => {
931
- if (e2 = e2.replace(/\s+/g, ``), !hn.test(e2)) throw TypeError(`malformed base64.`);
929
+ var kn = (e2) => e2.replace(Dn, On);
930
+ var An = (e2) => {
931
+ if (e2 = e2.replace(/\s+/g, ``), !mn.test(e2)) throw TypeError(`malformed base64.`);
932
932
  e2 += `==`.slice(2 - (e2.length & 3));
933
933
  let t2, n2, r2, i2 = [];
934
- for (let a2 = 0; a2 < e2.length; ) t2 = mn[e2.charAt(a2++)] << 18 | mn[e2.charAt(a2++)] << 12 | (n2 = mn[e2.charAt(a2++)]) << 6 | (r2 = mn[e2.charAt(a2++)]), n2 === 64 ? i2.push(U(t2 >> 16 & 255)) : r2 === 64 ? i2.push(U(t2 >> 16 & 255, t2 >> 8 & 255)) : i2.push(U(t2 >> 16 & 255, t2 >> 8 & 255, t2 & 255));
934
+ for (let a2 = 0; a2 < e2.length; ) t2 = pn[e2.charAt(a2++)] << 18 | pn[e2.charAt(a2++)] << 12 | (n2 = pn[e2.charAt(a2++)]) << 6 | (r2 = pn[e2.charAt(a2++)]), n2 === 64 ? i2.push(W(t2 >> 16 & 255)) : r2 === 64 ? i2.push(W(t2 >> 16 & 255, t2 >> 8 & 255)) : i2.push(W(t2 >> 16 & 255, t2 >> 8 & 255, t2 & 255));
935
935
  return i2.join(``);
936
936
  };
937
- var Mn = typeof atob == `function` ? (e2) => atob(vn(e2)) : un ? (e2) => Buffer.from(e2, `base64`).toString(`binary`) : jn;
938
- var Nn = un ? (e2) => gn(Buffer.from(e2, `base64`)) : (e2) => gn(Mn(e2).split(``).map((e3) => e3.charCodeAt(0)));
939
- var Pn = (e2) => Nn(In(e2));
940
- var Fn = un ? (e2) => Buffer.from(e2, `base64`).toString(`utf8`) : dn ? (e2) => dn.decode(Nn(e2)) : (e2) => An(Mn(e2));
941
- var In = (e2) => vn(e2.replace(/[-_]/g, (e3) => e3 == `-` ? `+` : `/`));
942
- var Ln = (e2) => Fn(In(e2));
943
- var Rn = (e2) => {
937
+ var jn = typeof atob == `function` ? (e2) => atob(_n(e2)) : ln ? (e2) => Buffer.from(e2, `base64`).toString(`binary`) : An;
938
+ var Mn = ln ? (e2) => hn(Buffer.from(e2, `base64`)) : (e2) => hn(jn(e2).split(``).map((e3) => e3.charCodeAt(0)));
939
+ var Nn = (e2) => Mn(Fn(e2));
940
+ var Pn = ln ? (e2) => Buffer.from(e2, `base64`).toString(`utf8`) : un ? (e2) => un.decode(Mn(e2)) : (e2) => kn(jn(e2));
941
+ var Fn = (e2) => _n(e2.replace(/[-_]/g, (e3) => e3 == `-` ? `+` : `/`));
942
+ var In = (e2) => Pn(Fn(e2));
943
+ var Ln = (e2) => {
944
944
  if (typeof e2 != `string`) return false;
945
945
  let t2 = e2.replace(/\s+/g, ``).replace(/={0,2}$/, ``);
946
946
  return !/[^\s0-9a-zA-Z\+/]/.test(t2) || !/[^\s0-9a-zA-Z\-_]/.test(t2);
947
947
  };
948
- var zn = (e2) => ({ value: e2, enumerable: false, writable: true, configurable: true });
949
- var Bn = function() {
950
- let e2 = (e3, t2) => Object.defineProperty(String.prototype, e3, zn(t2));
948
+ var Rn = (e2) => ({ value: e2, enumerable: false, writable: true, configurable: true });
949
+ var zn = function() {
950
+ let e2 = (e3, t2) => Object.defineProperty(String.prototype, e3, Rn(t2));
951
951
  e2(`fromBase64`, function() {
952
- return Ln(this);
952
+ return In(this);
953
953
  }), e2(`toBase64`, function(e3) {
954
- return En(this, e3);
954
+ return Tn(this, e3);
955
955
  }), e2(`toBase64URI`, function() {
956
- return En(this, true);
956
+ return Tn(this, true);
957
957
  }), e2(`toBase64URL`, function() {
958
- return En(this, true);
958
+ return Tn(this, true);
959
959
  }), e2(`toUint8Array`, function() {
960
- return Pn(this);
960
+ return Nn(this);
961
961
  });
962
962
  };
963
- var Vn = function() {
964
- let e2 = (e3, t2) => Object.defineProperty(Uint8Array.prototype, e3, zn(t2));
963
+ var Bn = function() {
964
+ let e2 = (e3, t2) => Object.defineProperty(Uint8Array.prototype, e3, Rn(t2));
965
965
  e2(`toBase64`, function(e3) {
966
- return Sn(this, e3);
966
+ return xn(this, e3);
967
967
  }), e2(`toBase64URI`, function() {
968
- return Sn(this, true);
968
+ return xn(this, true);
969
969
  }), e2(`toBase64URL`, function() {
970
- return Sn(this, true);
970
+ return xn(this, true);
971
971
  });
972
972
  };
973
- var Hn = { version: cn, VERSION: ln, atob: Mn, atobPolyfill: jn, btoa: bn, btoaPolyfill: yn, fromBase64: Ln, toBase64: En, encode: En, encodeURI: Dn, encodeURL: Dn, utob: W, btou: An, decode: Ln, isValid: Rn, fromUint8Array: Sn, toUint8Array: Pn, extendString: Bn, extendUint8Array: Vn, extendBuiltins: () => {
974
- Bn(), Vn();
973
+ var Vn = { version: sn, VERSION: cn, atob: jn, atobPolyfill: An, btoa: yn, btoaPolyfill: vn, fromBase64: In, toBase64: Tn, encode: Tn, encodeURI: En, encodeURL: En, utob: G, btou: kn, decode: In, isValid: Ln, fromUint8Array: xn, toUint8Array: Nn, extendString: zn, extendUint8Array: Bn, extendBuiltins: () => {
974
+ zn(), Bn();
975
975
  } };
976
- var G = Uint8Array;
977
- var Un = Uint16Array;
978
- var Wn = Int32Array;
979
- var Gn = new G([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]);
980
- var Kn = new G([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]);
981
- var qn = new G([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
982
- var Jn = function(e2, t2) {
983
- for (var n2 = new Un(31), r2 = 0; r2 < 31; ++r2) n2[r2] = t2 += 1 << e2[r2 - 1];
984
- for (var i2 = new Wn(n2[30]), r2 = 1; r2 < 30; ++r2) for (var a2 = n2[r2]; a2 < n2[r2 + 1]; ++a2) i2[a2] = a2 - n2[r2] << 5 | r2;
976
+ var K = Uint8Array;
977
+ var Hn = Uint16Array;
978
+ var Un = Int32Array;
979
+ var Wn = new K([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]);
980
+ var Gn = new K([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]);
981
+ var Kn = new K([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
982
+ var qn = function(e2, t2) {
983
+ for (var n2 = new Hn(31), r2 = 0; r2 < 31; ++r2) n2[r2] = t2 += 1 << e2[r2 - 1];
984
+ for (var i2 = new Un(n2[30]), r2 = 1; r2 < 30; ++r2) for (var a2 = n2[r2]; a2 < n2[r2 + 1]; ++a2) i2[a2] = a2 - n2[r2] << 5 | r2;
985
985
  return { b: n2, r: i2 };
986
986
  };
987
- var Yn = Jn(Gn, 2);
988
- var Xn = Yn.b;
989
- var Zn = Yn.r;
990
- Xn[28] = 258, Zn[258] = 28;
991
- var Qn = Jn(Kn, 0);
992
- var $n = Qn.b;
993
- Qn.r;
994
- for (er = new Un(32768), K = 0; K < 32768; ++K) {
995
- tr = (K & 43690) >> 1 | (K & 21845) << 1;
996
- tr = (tr & 52428) >> 2 | (tr & 13107) << 2, tr = (tr & 61680) >> 4 | (tr & 3855) << 4, er[K] = ((tr & 65280) >> 8 | (tr & 255) << 8) >> 1;
987
+ var Jn = qn(Wn, 2);
988
+ var Yn = Jn.b;
989
+ var Xn = Jn.r;
990
+ Yn[28] = 258, Xn[258] = 28;
991
+ var Zn = qn(Gn, 0);
992
+ var Qn = Zn.b;
993
+ Zn.r;
994
+ for ($n = new Hn(32768), q = 0; q < 32768; ++q) {
995
+ er = (q & 43690) >> 1 | (q & 21845) << 1;
996
+ er = (er & 52428) >> 2 | (er & 13107) << 2, er = (er & 61680) >> 4 | (er & 3855) << 4, $n[q] = ((er & 65280) >> 8 | (er & 255) << 8) >> 1;
997
997
  }
998
- var tr;
999
998
  var er;
1000
- var K;
1001
- for (nr = function(e2, t2, n2) {
1002
- for (var r2 = e2.length, i2 = 0, a2 = new Un(t2); i2 < r2; ++i2) e2[i2] && ++a2[e2[i2] - 1];
1003
- var o2 = new Un(t2);
999
+ var $n;
1000
+ var q;
1001
+ for (tr = function(e2, t2, n2) {
1002
+ for (var r2 = e2.length, i2 = 0, a2 = new Hn(t2); i2 < r2; ++i2) e2[i2] && ++a2[e2[i2] - 1];
1003
+ var o2 = new Hn(t2);
1004
1004
  for (i2 = 1; i2 < t2; ++i2) o2[i2] = o2[i2 - 1] + a2[i2 - 1] << 1;
1005
1005
  var s2;
1006
1006
  if (n2) {
1007
- s2 = new Un(1 << t2);
1007
+ s2 = new Hn(1 << t2);
1008
1008
  var c2 = 15 - t2;
1009
- for (i2 = 0; i2 < r2; ++i2) if (e2[i2]) for (var l2 = i2 << 4 | e2[i2], u2 = t2 - e2[i2], d2 = o2[e2[i2] - 1]++ << u2, f2 = d2 | (1 << u2) - 1; d2 <= f2; ++d2) s2[er[d2] >> c2] = l2;
1010
- } else for (s2 = new Un(r2), i2 = 0; i2 < r2; ++i2) e2[i2] && (s2[i2] = er[o2[e2[i2] - 1]++] >> 15 - e2[i2]);
1009
+ for (i2 = 0; i2 < r2; ++i2) if (e2[i2]) for (var l2 = i2 << 4 | e2[i2], u2 = t2 - e2[i2], d2 = o2[e2[i2] - 1]++ << u2, f2 = d2 | (1 << u2) - 1; d2 <= f2; ++d2) s2[$n[d2] >> c2] = l2;
1010
+ } else for (s2 = new Hn(r2), i2 = 0; i2 < r2; ++i2) e2[i2] && (s2[i2] = $n[o2[e2[i2] - 1]++] >> 15 - e2[i2]);
1011
1011
  return s2;
1012
- }, rr = new G(288), K = 0; K < 144; ++K) rr[K] = 8;
1012
+ }, nr = new K(288), q = 0; q < 144; ++q) nr[q] = 8;
1013
+ var tr;
1013
1014
  var nr;
1015
+ var q;
1016
+ for (q = 144; q < 256; ++q) nr[q] = 9;
1017
+ var q;
1018
+ for (q = 256; q < 280; ++q) nr[q] = 7;
1019
+ var q;
1020
+ for (q = 280; q < 288; ++q) nr[q] = 8;
1021
+ var q;
1022
+ for (rr = new K(32), q = 0; q < 32; ++q) rr[q] = 5;
1014
1023
  var rr;
1015
- var K;
1016
- for (K = 144; K < 256; ++K) rr[K] = 9;
1017
- var K;
1018
- for (K = 256; K < 280; ++K) rr[K] = 7;
1019
- var K;
1020
- for (K = 280; K < 288; ++K) rr[K] = 8;
1021
- var K;
1022
- for (ir = new G(32), K = 0; K < 32; ++K) ir[K] = 5;
1023
- var ir;
1024
- var K;
1025
- var ar = nr(rr, 9, 1);
1026
- var or = nr(ir, 5, 1);
1027
- var sr = function(e2) {
1024
+ var q;
1025
+ var ir = tr(nr, 9, 1);
1026
+ var ar = tr(rr, 5, 1);
1027
+ var or = function(e2) {
1028
1028
  for (var t2 = e2[0], n2 = 1; n2 < e2.length; ++n2) e2[n2] > t2 && (t2 = e2[n2]);
1029
1029
  return t2;
1030
1030
  };
1031
- var q = function(e2, t2, n2) {
1031
+ var J = function(e2, t2, n2) {
1032
1032
  var r2 = t2 / 8 | 0;
1033
1033
  return (e2[r2] | e2[r2 + 1] << 8) >> (t2 & 7) & n2;
1034
1034
  };
1035
- var cr = function(e2, t2) {
1035
+ var sr = function(e2, t2) {
1036
1036
  var n2 = t2 / 8 | 0;
1037
1037
  return (e2[n2] | e2[n2 + 1] << 8 | e2[n2 + 2] << 16) >> (t2 & 7);
1038
1038
  };
1039
- var lr = function(e2) {
1039
+ var cr = function(e2) {
1040
1040
  return (e2 + 7) / 8 | 0;
1041
1041
  };
1042
- var ur = function(e2, t2, n2) {
1043
- return (t2 == null || t2 < 0) && (t2 = 0), (n2 == null || n2 > e2.length) && (n2 = e2.length), new G(e2.subarray(t2, n2));
1042
+ var lr = function(e2, t2, n2) {
1043
+ return (t2 == null || t2 < 0) && (t2 = 0), (n2 == null || n2 > e2.length) && (n2 = e2.length), new K(e2.subarray(t2, n2));
1044
1044
  };
1045
- var dr = [`unexpected EOF`, `invalid block type`, `invalid length/literal`, `invalid distance`, `stream finished`, `no stream handler`, , `no callback`, `invalid UTF-8 data`, `extra field too long`, `date not in range 1980-2099`, `filename too long`, `stream finishing`, `invalid zip data`];
1046
- var J = function(e2, t2, n2) {
1047
- var r2 = Error(t2 || dr[e2]);
1048
- if (r2.code = e2, Error.captureStackTrace && Error.captureStackTrace(r2, J), !n2) throw r2;
1045
+ var ur = [`unexpected EOF`, `invalid block type`, `invalid length/literal`, `invalid distance`, `stream finished`, `no stream handler`, , `no callback`, `invalid UTF-8 data`, `extra field too long`, `date not in range 1980-2099`, `filename too long`, `stream finishing`, `invalid zip data`];
1046
+ var Y = function(e2, t2, n2) {
1047
+ var r2 = Error(t2 || ur[e2]);
1048
+ if (r2.code = e2, Error.captureStackTrace && Error.captureStackTrace(r2, Y), !n2) throw r2;
1049
1049
  return r2;
1050
1050
  };
1051
- var fr = function(e2, t2, n2, r2) {
1051
+ var dr = function(e2, t2, n2, r2) {
1052
1052
  var i2 = e2.length, a2 = r2 ? r2.length : 0;
1053
- if (!i2 || t2.f && !t2.l) return n2 || new G(0);
1053
+ if (!i2 || t2.f && !t2.l) return n2 || new K(0);
1054
1054
  var o2 = !n2, s2 = o2 || t2.i != 2, c2 = t2.i;
1055
- o2 && (n2 = new G(i2 * 3));
1055
+ o2 && (n2 = new K(i2 * 3));
1056
1056
  var l2 = function(e3) {
1057
1057
  var t3 = n2.length;
1058
1058
  if (e3 > t3) {
1059
- var r3 = new G(Math.max(t3 * 2, e3));
1059
+ var r3 = new K(Math.max(t3 * 2, e3));
1060
1060
  r3.set(n2), n2 = r3;
1061
1061
  }
1062
1062
  }, u2 = t2.f || 0, d2 = t2.p || 0, f2 = t2.b || 0, p2 = t2.l, m2 = t2.d, h2 = t2.m, g2 = t2.n, _2 = i2 * 8;
1063
1063
  do {
1064
1064
  if (!p2) {
1065
- u2 = q(e2, d2, 1);
1066
- var v2 = q(e2, d2 + 1, 3);
1065
+ u2 = J(e2, d2, 1);
1066
+ var v2 = J(e2, d2 + 1, 3);
1067
1067
  if (d2 += 3, !v2) {
1068
- var y2 = lr(d2) + 4, b2 = e2[y2 - 4] | e2[y2 - 3] << 8, x2 = y2 + b2;
1068
+ var y2 = cr(d2) + 4, b2 = e2[y2 - 4] | e2[y2 - 3] << 8, x2 = y2 + b2;
1069
1069
  if (x2 > i2) {
1070
- c2 && J(0);
1070
+ c2 && Y(0);
1071
1071
  break;
1072
1072
  }
1073
1073
  s2 && l2(f2 + b2), n2.set(e2.subarray(y2, x2), f2), t2.b = f2 += b2, t2.p = d2 = x2 * 8, t2.f = u2;
1074
1074
  continue;
1075
1075
  }
1076
- if (v2 == 1) p2 = ar, m2 = or, h2 = 9, g2 = 5;
1076
+ if (v2 == 1) p2 = ir, m2 = ar, h2 = 9, g2 = 5;
1077
1077
  else if (v2 == 2) {
1078
- var S2 = q(e2, d2, 31) + 257, C2 = q(e2, d2 + 10, 15) + 4, w2 = S2 + q(e2, d2 + 5, 31) + 1;
1078
+ var S2 = J(e2, d2, 31) + 257, C2 = J(e2, d2 + 10, 15) + 4, w2 = S2 + J(e2, d2 + 5, 31) + 1;
1079
1079
  d2 += 14;
1080
- for (var T2 = new G(w2), ee2 = new G(19), E2 = 0; E2 < C2; ++E2) ee2[qn[E2]] = q(e2, d2 + E2 * 3, 7);
1080
+ for (var T2 = new K(w2), ee2 = new K(19), E2 = 0; E2 < C2; ++E2) ee2[Kn[E2]] = J(e2, d2 + E2 * 3, 7);
1081
1081
  d2 += C2 * 3;
1082
- for (var D2 = sr(ee2), te2 = (1 << D2) - 1, ne2 = nr(ee2, D2, 1), E2 = 0; E2 < w2; ) {
1083
- var O2 = ne2[q(e2, d2, te2)];
1084
- d2 += O2 & 15;
1085
- var y2 = O2 >> 4;
1082
+ for (var D2 = or(ee2), O2 = (1 << D2) - 1, te2 = tr(ee2, D2, 1), E2 = 0; E2 < w2; ) {
1083
+ var k2 = te2[J(e2, d2, O2)];
1084
+ d2 += k2 & 15;
1085
+ var y2 = k2 >> 4;
1086
1086
  if (y2 < 16) T2[E2++] = y2;
1087
1087
  else {
1088
- var k2 = 0, re2 = 0;
1089
- for (y2 == 16 ? (re2 = 3 + q(e2, d2, 3), d2 += 2, k2 = T2[E2 - 1]) : y2 == 17 ? (re2 = 3 + q(e2, d2, 7), d2 += 3) : y2 == 18 && (re2 = 11 + q(e2, d2, 127), d2 += 7); re2--; ) T2[E2++] = k2;
1088
+ var A2 = 0, ne2 = 0;
1089
+ for (y2 == 16 ? (ne2 = 3 + J(e2, d2, 3), d2 += 2, A2 = T2[E2 - 1]) : y2 == 17 ? (ne2 = 3 + J(e2, d2, 7), d2 += 3) : y2 == 18 && (ne2 = 11 + J(e2, d2, 127), d2 += 7); ne2--; ) T2[E2++] = A2;
1090
1090
  }
1091
1091
  }
1092
- var ie2 = T2.subarray(0, S2), A2 = T2.subarray(S2);
1093
- h2 = sr(ie2), g2 = sr(A2), p2 = nr(ie2, h2, 1), m2 = nr(A2, g2, 1);
1094
- } else J(1);
1092
+ var re2 = T2.subarray(0, S2), j2 = T2.subarray(S2);
1093
+ h2 = or(re2), g2 = or(j2), p2 = tr(re2, h2, 1), m2 = tr(j2, g2, 1);
1094
+ } else Y(1);
1095
1095
  if (d2 > _2) {
1096
- c2 && J(0);
1096
+ c2 && Y(0);
1097
1097
  break;
1098
1098
  }
1099
1099
  }
1100
1100
  s2 && l2(f2 + 131072);
1101
- for (var ae2 = (1 << h2) - 1, j2 = (1 << g2) - 1, oe2 = d2; ; oe2 = d2) {
1102
- var k2 = p2[cr(e2, d2) & ae2], M2 = k2 >> 4;
1103
- if (d2 += k2 & 15, d2 > _2) {
1104
- c2 && J(0);
1101
+ for (var ie2 = (1 << h2) - 1, M2 = (1 << g2) - 1, ae2 = d2; ; ae2 = d2) {
1102
+ var A2 = p2[sr(e2, d2) & ie2], N2 = A2 >> 4;
1103
+ if (d2 += A2 & 15, d2 > _2) {
1104
+ c2 && Y(0);
1105
1105
  break;
1106
1106
  }
1107
- if (k2 || J(2), M2 < 256) n2[f2++] = M2;
1108
- else if (M2 == 256) {
1109
- oe2 = d2, p2 = null;
1107
+ if (A2 || Y(2), N2 < 256) n2[f2++] = N2;
1108
+ else if (N2 == 256) {
1109
+ ae2 = d2, p2 = null;
1110
1110
  break;
1111
1111
  } else {
1112
- var se2 = M2 - 254;
1113
- if (M2 > 264) {
1114
- var E2 = M2 - 257, N2 = Gn[E2];
1115
- se2 = q(e2, d2, (1 << N2) - 1) + Xn[E2], d2 += N2;
1112
+ var oe2 = N2 - 254;
1113
+ if (N2 > 264) {
1114
+ var E2 = N2 - 257, P2 = Wn[E2];
1115
+ oe2 = J(e2, d2, (1 << P2) - 1) + Yn[E2], d2 += P2;
1116
1116
  }
1117
- var ce2 = m2[cr(e2, d2) & j2], le2 = ce2 >> 4;
1118
- ce2 || J(3), d2 += ce2 & 15;
1119
- var A2 = $n[le2];
1120
- if (le2 > 3) {
1121
- var N2 = Kn[le2];
1122
- A2 += cr(e2, d2) & (1 << N2) - 1, d2 += N2;
1117
+ var se2 = m2[sr(e2, d2) & M2], ce2 = se2 >> 4;
1118
+ se2 || Y(3), d2 += se2 & 15;
1119
+ var j2 = Qn[ce2];
1120
+ if (ce2 > 3) {
1121
+ var P2 = Gn[ce2];
1122
+ j2 += sr(e2, d2) & (1 << P2) - 1, d2 += P2;
1123
1123
  }
1124
1124
  if (d2 > _2) {
1125
- c2 && J(0);
1125
+ c2 && Y(0);
1126
1126
  break;
1127
1127
  }
1128
1128
  s2 && l2(f2 + 131072);
1129
- var ue2 = f2 + se2;
1130
- if (f2 < A2) {
1131
- var de2 = a2 - A2, fe2 = Math.min(A2, ue2);
1132
- for (de2 + f2 < 0 && J(3); f2 < fe2; ++f2) n2[f2] = r2[de2 + f2];
1129
+ var le2 = f2 + oe2;
1130
+ if (f2 < j2) {
1131
+ var ue2 = a2 - j2, de2 = Math.min(j2, le2);
1132
+ for (ue2 + f2 < 0 && Y(3); f2 < de2; ++f2) n2[f2] = r2[ue2 + f2];
1133
1133
  }
1134
- for (; f2 < ue2; ++f2) n2[f2] = n2[f2 - A2];
1134
+ for (; f2 < le2; ++f2) n2[f2] = n2[f2 - j2];
1135
1135
  }
1136
1136
  }
1137
- t2.l = p2, t2.p = oe2, t2.b = f2, t2.f = u2, p2 && (u2 = 1, t2.m = h2, t2.d = m2, t2.n = g2);
1137
+ t2.l = p2, t2.p = ae2, t2.b = f2, t2.f = u2, p2 && (u2 = 1, t2.m = h2, t2.d = m2, t2.n = g2);
1138
1138
  } while (!u2);
1139
- return f2 != n2.length && o2 ? ur(n2, 0, f2) : n2.subarray(0, f2);
1139
+ return f2 != n2.length && o2 ? lr(n2, 0, f2) : n2.subarray(0, f2);
1140
1140
  };
1141
- var pr = new G(0);
1142
- var mr = function(e2) {
1143
- (e2[0] != 31 || e2[1] != 139 || e2[2] != 8) && J(6, `invalid gzip data`);
1141
+ var fr = new K(0);
1142
+ var pr = function(e2) {
1143
+ (e2[0] != 31 || e2[1] != 139 || e2[2] != 8) && Y(6, `invalid gzip data`);
1144
1144
  var t2 = e2[3], n2 = 10;
1145
1145
  t2 & 4 && (n2 += (e2[10] | e2[11] << 8) + 2);
1146
1146
  for (var r2 = (t2 >> 3 & 1) + (t2 >> 4 & 1); r2 > 0; r2 -= !e2[n2++]) ;
1147
1147
  return n2 + (t2 & 2);
1148
1148
  };
1149
- var hr = function(e2) {
1149
+ var mr = function(e2) {
1150
1150
  var t2 = e2.length;
1151
1151
  return (e2[t2 - 4] | e2[t2 - 3] << 8 | e2[t2 - 2] << 16 | e2[t2 - 1] << 24) >>> 0;
1152
1152
  };
1153
- function gr(e2, t2) {
1154
- var n2 = mr(e2);
1155
- return n2 + 8 > e2.length && J(6, `invalid gzip data`), fr(e2.subarray(n2, -8), { i: 2 }, t2 && t2.out || new G(hr(e2)), t2 && t2.dictionary);
1153
+ function hr(e2, t2) {
1154
+ var n2 = pr(e2);
1155
+ return n2 + 8 > e2.length && Y(6, `invalid gzip data`), dr(e2.subarray(n2, -8), { i: 2 }, t2 && t2.out || new K(mr(e2)), t2 && t2.dictionary);
1156
1156
  }
1157
- var _r = typeof TextDecoder < `u` && new TextDecoder();
1157
+ var gr = typeof TextDecoder < `u` && new TextDecoder();
1158
1158
  try {
1159
- _r.decode(pr, { stream: true });
1159
+ gr.decode(fr, { stream: true });
1160
1160
  } catch {
1161
1161
  }
1162
- var vr = /* @__PURE__ */ new Set([`APPOINTMENT`, `CLASS`, `COURSE`]);
1163
- var yr = new Set(sn);
1164
- function Y(e2) {
1162
+ var _r = /* @__PURE__ */ new Set([`APPOINTMENT`, `CLASS`, `COURSE`]);
1163
+ var vr = new Set(on);
1164
+ function X(e2) {
1165
1165
  return typeof e2 == `string` ? e2 : void 0;
1166
1166
  }
1167
- function br(e2) {
1167
+ function yr(e2) {
1168
1168
  return typeof e2 == `number` && Number.isFinite(e2) ? e2 : void 0;
1169
1169
  }
1170
- function xr(e2) {
1170
+ function br(e2) {
1171
1171
  return typeof e2 == `boolean` ? e2 : void 0;
1172
1172
  }
1173
- function Sr(e2) {
1173
+ function xr(e2) {
1174
1174
  if (Array.isArray(e2)) return e2.filter((e3) => typeof e3 == `string`);
1175
1175
  }
1176
- function Cr(e2) {
1176
+ function Sr(e2) {
1177
1177
  return typeof e2 == `object` && !!e2;
1178
1178
  }
1179
- function wr(e2) {
1180
- if (!Cr(e2)) return null;
1181
- let t2 = Y(e2.t);
1179
+ function Cr(e2) {
1180
+ if (!Sr(e2)) return null;
1181
+ let t2 = X(e2.t);
1182
1182
  if (t2 === void 0) return null;
1183
- let n2 = { type: t2, ids: Sr(e2.d) ?? [] }, r2 = xr(e2.n);
1183
+ let n2 = { type: t2, ids: xr(e2.d) ?? [] }, r2 = br(e2.n);
1184
1184
  return r2 !== void 0 && (n2.anyResource = r2), n2;
1185
1185
  }
1186
- function Tr(e2) {
1187
- if (!Cr(e2)) return null;
1188
- let t2 = br(e2.p), n2 = Sr(e2.h);
1186
+ function wr(e2) {
1187
+ if (!Sr(e2)) return null;
1188
+ let t2 = yr(e2.p), n2 = xr(e2.h);
1189
1189
  if (t2 === void 0 && n2 === void 0) return null;
1190
1190
  let r2 = {};
1191
1191
  return t2 !== void 0 && (r2.numberOfParticipants = t2), n2 !== void 0 && (r2.choices = n2), r2;
1192
1192
  }
1193
- function Er(e2) {
1194
- if (!Cr(e2)) return null;
1195
- let t2 = Y(e2.i), n2 = br(e2.q);
1193
+ function Tr(e2) {
1194
+ if (!Sr(e2)) return null;
1195
+ let t2 = X(e2.i), n2 = yr(e2.q);
1196
1196
  return t2 === void 0 || n2 === void 0 ? null : { id: t2, quantity: n2 };
1197
1197
  }
1198
- function Dr(e2, t2) {
1198
+ function Er(e2, t2) {
1199
1199
  if (!Array.isArray(e2)) return;
1200
1200
  let n2 = e2.map(t2).filter((e3) => e3 !== null);
1201
1201
  return n2.length ? n2 : void 0;
1202
1202
  }
1203
- function Or(e2) {
1204
- if (!Cr(e2)) return null;
1205
- let t2 = Y(e2.i);
1203
+ function Dr(e2) {
1204
+ if (!Sr(e2)) return null;
1205
+ let t2 = X(e2.i);
1206
1206
  if (t2 === void 0) return null;
1207
- let n2 = { serviceId: t2 }, r2 = Y(e2.g);
1207
+ let n2 = { serviceId: t2 }, r2 = X(e2.g);
1208
1208
  r2 !== void 0 && (n2.slug = r2);
1209
1209
  let i2 = function(e3) {
1210
- let t3 = Y(e3);
1211
- if (t3 !== void 0 && vr.has(t3)) return t3;
1210
+ let t3 = X(e3);
1211
+ if (t3 !== void 0 && _r.has(t3)) return t3;
1212
1212
  }(e2.y);
1213
1213
  i2 !== void 0 && (n2.serviceType = i2);
1214
- let a2 = Y(e2.t0);
1214
+ let a2 = X(e2.t0);
1215
1215
  a2 !== void 0 && (n2.slotStart = a2);
1216
- let o2 = Y(e2.t1);
1216
+ let o2 = X(e2.t1);
1217
1217
  o2 !== void 0 && (n2.slotEnd = o2);
1218
- let s2 = Y(e2.e);
1218
+ let s2 = X(e2.e);
1219
1219
  s2 !== void 0 && (n2.eventId = s2);
1220
- let c2 = Y(e2.c);
1220
+ let c2 = X(e2.c);
1221
1221
  c2 !== void 0 && (n2.scheduleId = c2);
1222
- let l2 = Y(e2.k);
1222
+ let l2 = X(e2.k);
1223
1223
  l2 !== void 0 && (n2.sessionId = l2);
1224
- let u2 = Y(e2.l);
1224
+ let u2 = X(e2.l);
1225
1225
  u2 !== void 0 && (n2.locationId = u2);
1226
- let d2 = Y(e2.lt);
1226
+ let d2 = X(e2.lt);
1227
1227
  d2 !== `BUSINESS` && d2 !== `CUSTOM` && d2 !== `CUSTOMER` || (n2.locationType = d2);
1228
- let f2 = Dr(e2.r, wr);
1228
+ let f2 = Er(e2.r, Cr);
1229
1229
  f2 && (n2.resources = f2);
1230
- let p2 = Dr(e2.x, Tr);
1230
+ let p2 = Er(e2.x, wr);
1231
1231
  p2 && (n2.selectedVariants = p2);
1232
- let m2 = Dr(e2.a, Er);
1232
+ let m2 = Er(e2.a, Tr);
1233
1233
  m2 && (n2.addOns = m2);
1234
- let h2 = Y(e2.dc);
1234
+ let h2 = X(e2.dc);
1235
1235
  h2 && (n2.durationChoiceId = h2);
1236
- let g2 = br(e2.dm);
1236
+ let g2 = yr(e2.dm);
1237
1237
  g2 !== void 0 && Number.isInteger(g2) && g2 > 0 && (n2.durationInMinutes = g2);
1238
- let _2 = Y(e2.rg);
1239
- return _2 !== void 0 && yr.has(_2) && (n2.requestedGender = _2), n2;
1238
+ let _2 = X(e2.rg);
1239
+ return _2 !== void 0 && vr.has(_2) && (n2.requestedGender = _2), n2;
1240
1240
  }
1241
- function kr(e2) {
1242
- if (!Cr(e2)) return null;
1243
- let t2 = Y(e2.m);
1241
+ function Or(e2) {
1242
+ if (!Sr(e2)) return null;
1243
+ let t2 = X(e2.m);
1244
1244
  if (t2 !== `single` && t2 !== `multi` || !Array.isArray(e2.s)) return null;
1245
- let n2 = { mode: t2, services: e2.s.map(Or).filter((e3) => e3 !== null) }, r2 = Y(e2.z);
1246
- return r2 !== void 0 && (n2.timezone = r2), true === xr(e2.cp) && (n2.wantsPromoCode = true), n2;
1245
+ let n2 = { mode: t2, services: e2.s.map(Dr).filter((e3) => e3 !== null) }, r2 = X(e2.z);
1246
+ return r2 !== void 0 && (n2.timezone = r2), true === br(e2.cp) && (n2.wantsPromoCode = true), n2;
1247
1247
  }
1248
1248
  new TextEncoder();
1249
- var Ar = new TextDecoder();
1250
- function jr(e2) {
1249
+ var kr = new TextDecoder();
1250
+ function Ar(e2) {
1251
1251
  if (!e2 || e2.length < 2) return null;
1252
1252
  try {
1253
- let t2 = e2[0], n2 = Hn.toUint8Array(e2.slice(1)), r2;
1253
+ let t2 = e2[0], n2 = Vn.toUint8Array(e2.slice(1)), r2;
1254
1254
  if (t2 === `1`) r2 = n2;
1255
1255
  else {
1256
1256
  if (t2 !== `2`) return null;
1257
- r2 = gr(n2);
1257
+ r2 = hr(n2);
1258
1258
  }
1259
- return kr(JSON.parse(Ar.decode(r2)));
1259
+ return Or(JSON.parse(kr.decode(r2)));
1260
1260
  } catch {
1261
1261
  return null;
1262
1262
  }
1263
1263
  }
1264
- function Mr(e2) {
1265
- return e2;
1266
- }
1267
- var Nr = Mr(`@wix/site-service-pages`);
1268
- function Pr(e2) {
1269
- return e2;
1270
- }
1271
- var Fr = Pr;
1272
- var Ir = Fr(`@wix/viewer-service-environment`);
1273
- var Lr = Fr(`@wix/viewer-service-router`);
1274
- function Rr(e2) {
1275
- return e2;
1276
- }
1277
- var zr = Rr(`@wix/site-service-url`);
1278
- function Br(e2) {
1264
+ function jr(e2) {
1279
1265
  return e2;
1280
1266
  }
1281
- var Vr = Br(`@wix/site-service-renderer-configuration`);
1282
- var Hr = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
1283
- var Ur = `shopping_cart`;
1284
- var Wr = `thank_you_page`;
1285
- var Gr = `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155`;
1286
- var Kr = function(e2) {
1267
+ var Mr = jr(`@wix/site-service-editor-context`);
1268
+ var Nr = jr(`@wix/site-service-pages`);
1269
+ var Pr = jr(`@wix/site-service-router`);
1270
+ var Fr = jr(`@wix/site-service-url`);
1271
+ var Ir = jr(`@wix/site-service-renderer-configuration`);
1272
+ var Lr = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
1273
+ var Rr = `shopping_cart`;
1274
+ var zr = `thank_you_page`;
1275
+ var Br = `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155`;
1276
+ var Vr = function(e2) {
1287
1277
  return e2.BOOK_ONLINE = `bookingsBookOnline`, e2.SERVICE_PAGE = `bookingsServicePage`, e2.CALENDAR_PAGE = `bookingsCalendar`, e2.FORM_PAGE = `bookingsForm`, e2;
1288
1278
  }({});
1289
- var qr = `{{(.*?)}}`;
1290
- var Jr = `[{{}}]`;
1291
- var Yr = `([^/]+)`;
1292
- var Xr;
1279
+ var Hr = `{{(.*?)}}`;
1280
+ var Ur = `[{{}}]`;
1281
+ var Wr = `([^/]+)`;
1282
+ var Gr;
1293
1283
  (function(e2) {
1294
1284
  e2.product_page = `product_page`, e2.blog = `blog`, e2.post = `post`, e2.forum = `forum`, e2.group = `group`, e2.bookings = `Booking Service Page`, e2.challenges = `challenge_page`;
1295
- })(Xr ||= {});
1296
- var X;
1285
+ })(Gr ||= {});
1286
+ var Z;
1297
1287
  (function(e2) {
1298
1288
  e2.PRODUCT_PAGE = `wix.stores.sub_pages.product`, e2.BLOG_POST = `wix.blog.sub_pages.post`, e2.BLOG_POST_EDIT = `wix.blog.sub_pages.post.edit`, e2.BLOG_POST_PREVIEW = `wix.blog.sub_pages.post.preview`, e2.BLOG_CATEGORY = `wix.blog.sub_pages.category`, e2.FORUM_CATEGORY = `wix.forum.sub_pages.category`, e2.FORUM_CATEGORY_PAGINATION = `wix.forum.sub_pages.category.pagination`, e2.FORUM_CATEGORY_CREATE_POST = `wix.forum.sub_pages.category.create-post`, e2.FORUM_CATEGORY_CREATE_QUESTION = `wix.forum.sub_pages.category.create-question`, e2.FORUM_POST = `wix.forum.sub_pages.post`, e2.FORUM_POST_EDIT = `wix.forum.sub_pages.post.edit`, e2.FORUM_POST_PAGINATION = `wix.forum.sub_pages.post.pagination`, e2.FORUM_POST_DEEP_LINK_DATA = `wix.forum.sub_pages.post.deep-link-data`, e2.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA = `wix.forum.sub_pages.post.pagination-and-deep-link-data`, e2.GROUP = `wix.groups.sub_pages.group`, e2.GROUP_POST = `wix.groups.sub_pages.post`, e2.BOOKINGS_SERVICE = `wix.bookings.sub_pages.service_page`, e2.CHALLENGES_PAGE = `wix.online_programs.sub_pages.online_program`;
1299
- })(X ||= {});
1300
- var Zr = {};
1301
- var Qr = (Zr[X.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, Zr);
1302
- var $r = `{{main-mapping}}`;
1289
+ })(Z ||= {});
1290
+ var Kr = {};
1291
+ var qr = (Kr[Z.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, Kr);
1292
+ var Jr = `{{main-mapping}}`;
1293
+ var Yr = {};
1294
+ var Xr;
1295
+ var Zr = (Yr[Z.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (Xr = {}, Xr[Z.BLOG_POST_EDIT] = { defaultMapping: `${Jr}/edit` }, Xr[Z.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${Jr}/preview/{{instance}}` }, Xr) }, Yr);
1296
+ var Qr = {};
1297
+ var $r = (Qr[Z.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, Qr);
1303
1298
  var ei = {};
1304
1299
  var ti;
1305
- var ni = (ei[X.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (ti = {}, ti[X.BLOG_POST_EDIT] = { defaultMapping: `${$r}/edit` }, ti[X.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${$r}/preview/{{instance}}` }, ti) }, ei);
1306
- var ri = {};
1307
- var ii = (ri[X.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, ri);
1308
- var ai = {};
1309
- var oi;
1310
- var si;
1311
- var ci = (ai[X.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (oi = {}, oi[X.FORUM_POST_EDIT] = { defaultMapping: `${$r}/edit` }, oi[X.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${$r}/p-{{page}}` }, oi[X.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${$r}/dl-{{deepLinkData}}` }, oi[X.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${$r}/p-{{page}}/dl-{{deepLinkData}}` }, oi) }, ai[X.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (si = {}, si[X.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${$r}/create-post` }, si[X.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${$r}/create-question` }, si[X.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${$r}/p-{{page}}` }, si) }, ai);
1312
- var li = {};
1313
- var ui = (li[X.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, li[X.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, li);
1314
- var di = {};
1315
- var fi = (di[X.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, di);
1316
- var pi = {};
1317
- var mi = (pi[X.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, pi);
1318
- var hi = {};
1319
- var gi = (hi[Xr.product_page] = Qr, hi[Xr.post] = ni, hi[Xr.blog] = ii, hi[Xr.forum] = ci, hi[Xr.group] = ui, hi[Xr.bookings] = fi, hi[Xr.challenges] = mi, hi);
1320
- var _i = function() {
1321
- return _i = Object.assign || function(e2) {
1300
+ var ni;
1301
+ var ri = (ei[Z.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (ti = {}, ti[Z.FORUM_POST_EDIT] = { defaultMapping: `${Jr}/edit` }, ti[Z.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${Jr}/p-{{page}}` }, ti[Z.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${Jr}/dl-{{deepLinkData}}` }, ti[Z.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${Jr}/p-{{page}}/dl-{{deepLinkData}}` }, ti) }, ei[Z.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (ni = {}, ni[Z.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${Jr}/create-post` }, ni[Z.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${Jr}/create-question` }, ni[Z.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${Jr}/p-{{page}}` }, ni) }, ei);
1302
+ var ii = {};
1303
+ var ai = (ii[Z.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, ii[Z.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, ii);
1304
+ var oi = {};
1305
+ var si = (oi[Z.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, oi);
1306
+ var ci = {};
1307
+ var li = (ci[Z.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, ci);
1308
+ var ui = {};
1309
+ var di = (ui[Gr.product_page] = qr, ui[Gr.post] = Zr, ui[Gr.blog] = $r, ui[Gr.forum] = ri, ui[Gr.group] = ai, ui[Gr.bookings] = si, ui[Gr.challenges] = li, ui);
1310
+ var fi = function() {
1311
+ return fi = Object.assign || function(e2) {
1322
1312
  for (var t2, n2 = 1, r2 = arguments.length; n2 < r2; n2++) for (var i2 in t2 = arguments[n2], t2) Object.prototype.hasOwnProperty.call(t2, i2) && (e2[i2] = t2[i2]);
1323
1313
  return e2;
1324
- }, _i.apply(this, arguments);
1314
+ }, fi.apply(this, arguments);
1325
1315
  };
1326
- function vi(e2) {
1316
+ function pi(e2) {
1327
1317
  var t2 = typeof Symbol == `function` && Symbol.iterator, n2 = t2 && e2[t2], r2 = 0;
1328
1318
  if (n2) return n2.call(e2);
1329
1319
  if (e2 && typeof e2.length == `number`) return { next: function() {
@@ -1331,7 +1321,7 @@ function vi(e2) {
1331
1321
  } };
1332
1322
  throw TypeError(t2 ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
1333
1323
  }
1334
- function Z(e2, t2) {
1324
+ function Q(e2, t2) {
1335
1325
  var n2 = typeof Symbol == `function` && e2[Symbol.iterator];
1336
1326
  if (!n2) return e2;
1337
1327
  var r2 = n2.call(e2), i2, a2 = [], o2;
@@ -1348,190 +1338,190 @@ function Z(e2, t2) {
1348
1338
  }
1349
1339
  return a2;
1350
1340
  }
1351
- function yi(e2, t2, n2) {
1341
+ function mi(e2, t2, n2) {
1352
1342
  if (n2 || arguments.length === 2) for (var r2 = 0, i2 = t2.length, a2; r2 < i2; r2++) (a2 || !(r2 in t2)) && (a2 ||= Array.prototype.slice.call(t2, 0, r2), a2[r2] = t2[r2]);
1353
1343
  return e2.concat(a2 || Array.prototype.slice.call(t2));
1354
1344
  }
1355
- var bi = function(e2) {
1356
- return Object.values(xi()).some(function(t2) {
1345
+ var hi = function(e2) {
1346
+ return Object.values(gi()).some(function(t2) {
1357
1347
  return !!t2?.subMappings?.[e2];
1358
1348
  });
1359
1349
  };
1360
- var xi = function() {
1361
- return Object.values(gi).reduce(function(e2, t2) {
1362
- return _i(_i({}, e2), t2);
1350
+ var gi = function() {
1351
+ return Object.values(di).reduce(function(e2, t2) {
1352
+ return fi(fi({}, e2), t2);
1363
1353
  }, {}) || {};
1364
1354
  };
1365
- var Si = function(e2) {
1366
- var t2 = xi()[e2];
1367
- return !t2 && bi(e2) && console.warn(`You cannot get variables schema for subMappings key (${e2}).`), t2;
1355
+ var _i = function(e2) {
1356
+ var t2 = gi()[e2];
1357
+ return !t2 && hi(e2) && console.warn(`You cannot get variables schema for subMappings key (${e2}).`), t2;
1368
1358
  };
1369
- var Ci = function(e2) {
1370
- return Object.entries(gi).filter(function(t2) {
1371
- var n2 = Z(t2, 2)[1];
1359
+ var vi = function(e2) {
1360
+ return Object.entries(di).filter(function(t2) {
1361
+ var n2 = Q(t2, 2)[1];
1372
1362
  return Object.keys(n2).includes(e2);
1373
1363
  }).map(function(e3) {
1374
- return Z(e3, 1)[0];
1364
+ return Q(e3, 1)[0];
1375
1365
  })[0];
1376
1366
  };
1377
- var wi = function(e2) {
1378
- return Object.entries(xi()).find(function(t2) {
1379
- var n2 = Z(t2, 2);
1367
+ var yi = function(e2) {
1368
+ return Object.entries(gi()).find(function(t2) {
1369
+ var n2 = Q(t2, 2);
1380
1370
  return n2[0], !!n2[1]?.subMappings?.[e2];
1381
1371
  });
1382
1372
  };
1383
- var Ti = function(e2) {
1373
+ var bi = function(e2) {
1384
1374
  var t2 = [];
1385
- if (bi(e2)) {
1386
- var n2 = Z(wi(e2), 2);
1375
+ if (hi(e2)) {
1376
+ var n2 = Q(yi(e2), 2);
1387
1377
  n2[0];
1388
1378
  var r2 = n2[1];
1389
- t2.push.apply(t2, yi(yi([], Z(r2?.required || []), false), Z(r2?.subMappings?.[e2]?.required || []), false));
1390
- } else t2.push.apply(t2, yi([], Z(Si(e2)?.required || []), false));
1379
+ t2.push.apply(t2, mi(mi([], Q(r2?.required || []), false), Q(r2?.subMappings?.[e2]?.required || []), false));
1380
+ } else t2.push.apply(t2, mi([], Q(_i(e2)?.required || []), false));
1391
1381
  return t2;
1392
1382
  };
1393
- var Ei = function(e2, t2) {
1383
+ var xi = function(e2, t2) {
1394
1384
  var n2;
1395
1385
  return t2 === void 0 && (t2 = ``), (n2 = e2?.main)?.find?.call(n2, function(e3) {
1396
1386
  return e3.key === t2;
1397
1387
  });
1398
1388
  };
1399
- var Di = function(e2, t2) {
1389
+ var Si = function(e2, t2) {
1400
1390
  return Error(`Url Mappings Error - [${e2}]: ${t2}`);
1401
1391
  };
1402
- var Oi = Object.values(X);
1403
- var ki = Di(`key`, `must be one of: ${Oi.toString()}`);
1404
- var Ai = function(e2) {
1405
- if (typeof e2 != `string` || !Oi.includes(e2)) return ki;
1392
+ var Ci = Object.values(Z);
1393
+ var wi = Si(`key`, `must be one of: ${Ci.toString()}`);
1394
+ var Ti = function(e2) {
1395
+ if (typeof e2 != `string` || !Ci.includes(e2)) return wi;
1406
1396
  };
1407
- var ji = Di(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
1408
- var Mi = function(e2) {
1397
+ var Ei = Si(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
1398
+ var Di = function(e2) {
1409
1399
  if (typeof e2 != `object` || !e2 || !Object.values(e2).every(function(e3) {
1410
1400
  return typeof e3 == `string`;
1411
- }) || Array.isArray(e2)) return ji;
1401
+ }) || Array.isArray(e2)) return Ei;
1412
1402
  };
1413
- var Ni = Di(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
1414
- var Pi = function(e2, t2) {
1403
+ var Oi = Si(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
1404
+ var ki = function(e2, t2) {
1415
1405
  try {
1416
- var n2 = Ti(e2);
1406
+ var n2 = bi(e2);
1417
1407
  if (!n2.every(function(e3) {
1418
1408
  return !!t2[e3];
1419
1409
  }) || !n2.length) throw Error();
1420
1410
  } catch {
1421
- return Ni;
1411
+ return Oi;
1422
1412
  }
1423
1413
  };
1424
- var Fi = function(e2) {
1414
+ var Ai = function(e2) {
1425
1415
  var t2 = e2.key, n2 = e2.itemData;
1426
- return [Ai(t2), Mi(n2), Pi(t2, n2)].find(Boolean);
1416
+ return [Ti(t2), Di(n2), ki(t2, n2)].find(Boolean);
1427
1417
  };
1428
- var Ii = function(e2) {
1418
+ var ji = function(e2) {
1429
1419
  return function(t2) {
1430
- var n2 = new RegExp(Jr, `g`), r2 = t2.replace(n2, ``);
1420
+ var n2 = new RegExp(Ur, `g`), r2 = t2.replace(n2, ``);
1431
1421
  return e2?.[r2];
1432
1422
  };
1433
1423
  };
1434
- var Li = function(e2, t2, n2, r2) {
1424
+ var Mi = function(e2, t2, n2, r2) {
1435
1425
  e2 === void 0 && (e2 = { main: [] }), r2 === void 0 && (r2 = {});
1436
- var i2 = Fi({ key: t2, itemData: n2 });
1426
+ var i2 = Ai({ key: t2, itemData: n2 });
1437
1427
  if (i2) throw i2;
1438
- var a2 = (Ei(e2, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
1428
+ var a2 = (xi(e2, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
1439
1429
  if (o2 ??= ``, o2 = o2.endsWith(`/`) ? o2?.slice(0, -1) : o2, a2 && typeof a2 == `string`) {
1440
- var s2 = new RegExp(qr, `g`), c2 = a2.replace(s2, Ii(n2));
1430
+ var s2 = new RegExp(Hr, `g`), c2 = a2.replace(s2, ji(n2));
1441
1431
  return o2.concat(`/${c2}`);
1442
1432
  }
1443
1433
  };
1444
- var Ri = /[.*+?^$()|]/g;
1445
- var zi = function(e2) {
1446
- var t2 = e2.replace(Ri, `\\$&`).replace(new RegExp(qr, `g`), Yr);
1434
+ var Ni = /[.*+?^$()|]/g;
1435
+ var Pi = function(e2) {
1436
+ var t2 = e2.replace(Ni, `\\$&`).replace(new RegExp(Hr, `g`), Wr);
1447
1437
  return RegExp(`^${t2}$`);
1448
1438
  };
1449
- var Bi = function(e2, t2) {
1439
+ var Fi = function(e2, t2) {
1450
1440
  return e2 === void 0 && (e2 = []), e2.find(function(e3) {
1451
- return zi(e3).test(t2);
1441
+ return Pi(e3).test(t2);
1452
1442
  });
1453
1443
  };
1454
- Di(`url`, `Url must be a string`);
1455
- var Vi = function(e2) {
1444
+ Si(`url`, `Url must be a string`);
1445
+ var Ii = function(e2) {
1456
1446
  return [` `, ` `, `
1457
1447
  `].every(function(t2) {
1458
1448
  return !e2?.includes?.call(e2, t2);
1459
1449
  });
1460
1450
  };
1461
- var Hi = function(e2) {
1462
- return e2?.length <= ea.MAX_URL_MAPPING_LENGTH;
1451
+ var Li = function(e2) {
1452
+ return e2?.length <= Yi.MAX_URL_MAPPING_LENGTH;
1463
1453
  };
1464
- var Ui = function(e2) {
1454
+ var Ri = function(e2) {
1465
1455
  return e2?.split(`/`).every(Boolean);
1466
1456
  };
1467
- var Wi = function(e2, t2) {
1457
+ var zi = function(e2, t2) {
1468
1458
  var n2 = t2.urlMappingKey;
1469
- return Ti(n2)?.every(function(t3) {
1459
+ return bi(n2)?.every(function(t3) {
1470
1460
  return e2?.includes(`{{${t3}}}`);
1471
1461
  });
1472
1462
  };
1473
- var Gi = function(e2) {
1474
- return (e2.match(new RegExp(qr, `g`))?.length || 0) <= 1;
1463
+ var Bi = function(e2) {
1464
+ return (e2.match(new RegExp(Hr, `g`))?.length || 0) <= 1;
1475
1465
  };
1476
- var Ki = function(e2) {
1477
- return e2?.split(`/`).every(Gi);
1466
+ var Vi = function(e2) {
1467
+ return e2?.split(`/`).every(Bi);
1478
1468
  };
1479
- var qi = function(e2) {
1469
+ var Hi = function(e2) {
1480
1470
  return [e2.publishedPrefix, e2.savedPrefix].filter(Boolean);
1481
1471
  };
1482
- var Ji = function(e2, t2) {
1472
+ var Ui = function(e2, t2) {
1483
1473
  return t2 === void 0 && (t2 = []), function(n2, r2) {
1484
1474
  var i2 = n2.split(`/`), a2 = n2 === r2;
1485
1475
  if (i2.length < 1 || a2) return true;
1486
- var o2 = Z(r2.split(`/`), 1)[0], s2 = Z(i2, 1)[0];
1476
+ var o2 = Q(r2.split(`/`), 1)[0], s2 = Q(i2, 1)[0];
1487
1477
  return t2.includes(s2) ? true : e2.every(function(e3) {
1488
1478
  return e3 === o2 || e3 !== s2;
1489
1479
  });
1490
1480
  };
1491
1481
  };
1492
- var Yi = function(e2, t2) {
1482
+ var Wi = function(e2, t2) {
1493
1483
  var n2 = t2.pathPrefixes;
1494
- return Ji(Object.values(n2).map(function(e3) {
1484
+ return Ui(Object.values(n2).map(function(e3) {
1495
1485
  return e3.publishedPrefix;
1496
- }).filter(Boolean), qi(t2.pathPrefix))(e2, t2.defaultMapping.defaultPublished);
1486
+ }).filter(Boolean), Hi(t2.pathPrefix))(e2, t2.defaultMapping.defaultPublished);
1497
1487
  };
1498
- var Xi = function(e2, t2) {
1488
+ var Gi = function(e2, t2) {
1499
1489
  var n2 = t2.urlMappingKey, r2 = t2.urlMappings;
1500
- return !Bi(r2.main?.filter(function(e3) {
1490
+ return !Fi(r2.main?.filter(function(e3) {
1501
1491
  return n2 !== e3.key;
1502
1492
  }).map(function(e3) {
1503
1493
  return e3.mapping;
1504
1494
  }), e2);
1505
1495
  };
1506
- var Zi = function(e2) {
1507
- e2 = e2.replace(new RegExp(qr, `ig`), ``);
1496
+ var Ki = function(e2) {
1497
+ e2 = e2.replace(new RegExp(Hr, `ig`), ``);
1508
1498
  var t2 = new RegExp(/[^\]_.~!*'();:@&=+$,<>\\#^%?`"]/, `g`), n2 = !/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c[\ude32-\ude3a]|[\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g.test(e2), r2 = !e2.replace(t2, ``);
1509
1499
  return n2 && r2;
1510
1500
  };
1511
- var Qi = function(e2) {
1512
- var t2 = Z(e2, 1)[0], n2 = e2.slice(-1);
1501
+ var qi = function(e2) {
1502
+ var t2 = Q(e2, 1)[0], n2 = e2.slice(-1);
1513
1503
  return t2 !== `/` && n2 !== `/`;
1514
1504
  };
1515
- var $i = function(e2, t2) {
1505
+ var Ji = function(e2, t2) {
1516
1506
  var n2 = t2.pathPrefixes;
1517
- return Ji(Object.values(n2).map(function(e3) {
1507
+ return Ui(Object.values(n2).map(function(e3) {
1518
1508
  return e3.savedPrefix;
1519
- }).filter(Boolean), qi(t2.pathPrefix))(e2, t2.defaultMapping.defaultSaved);
1509
+ }).filter(Boolean), Hi(t2.pathPrefix))(e2, t2.defaultMapping.defaultSaved);
1520
1510
  };
1521
- var Q;
1511
+ var $;
1522
1512
  (function(e2) {
1523
1513
  e2.MAX_LENGTH_ERROR = `MAX_LENGTH_ERROR`, e2.NO_SPACES_ERROR = `NO_SPACES_ERROR`, e2.NO_EMPTY_SEGMENT_ERROR = `NO_EMPTY_SEGMENT_ERROR`, e2.CONTAIN_MAIN_VARIABLE_ERROR = `CONTAIN_MAIN_VARIABLE_ERROR`, e2.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR = `ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR`, e2.ONLY_UNIQUE_PUBLISHED_URL_ERROR = `ONLY_UNIQUE_PUBLISHED_URL_ERROR`, e2.ONLY_UNIQUE_SAVED_URL_ERROR = `ONLY_UNIQUE_SAVED_URL_ERROR`, e2.ONLY_UNIQUE_MAPPING_ERROR = `ONLY_UNIQUE_MAPPING_ERROR`, e2.NO_INVALID_CHARACTERS_ERROR = `NO_INVALID_CHARACTERS_ERROR`, e2.NO_STARTING_OR_ENDING_SLASH_ERROR = `NO_STARTING_OR_ENDING_SLASH_ERROR`;
1524
- })(Q ||= {});
1525
- var ea = function() {
1514
+ })($ ||= {});
1515
+ var Yi = function() {
1526
1516
  function e2(e3) {
1527
1517
  var t2 = e3.urlMappingKey, n2 = e3.pathPrefixes, r2 = e3.urlMappings, i2 = this;
1528
1518
  this.initValidators = function() {
1529
- i2.validators = [[Hi, Q.MAX_LENGTH_ERROR], [Vi, Q.NO_SPACES_ERROR], [Qi, Q.NO_STARTING_OR_ENDING_SLASH_ERROR], [Ui, Q.NO_EMPTY_SEGMENT_ERROR], [Zi, Q.NO_INVALID_CHARACTERS_ERROR], [Wi, Q.CONTAIN_MAIN_VARIABLE_ERROR], [Ki, Q.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [Yi, Q.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [$i, Q.ONLY_UNIQUE_SAVED_URL_ERROR], [Xi, Q.ONLY_UNIQUE_MAPPING_ERROR]];
1530
- }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = ta(t2, this.pathPrefix), this.initValidators();
1519
+ i2.validators = [[Li, $.MAX_LENGTH_ERROR], [Ii, $.NO_SPACES_ERROR], [qi, $.NO_STARTING_OR_ENDING_SLASH_ERROR], [Ri, $.NO_EMPTY_SEGMENT_ERROR], [Ki, $.NO_INVALID_CHARACTERS_ERROR], [zi, $.CONTAIN_MAIN_VARIABLE_ERROR], [Vi, $.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [Wi, $.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [Ji, $.ONLY_UNIQUE_SAVED_URL_ERROR], [Gi, $.ONLY_UNIQUE_MAPPING_ERROR]];
1520
+ }, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = Xi(t2, this.pathPrefix), this.initValidators();
1531
1521
  }
1532
1522
  return e2.prototype.getPathPrefix = function() {
1533
- var t2 = Ci(this.urlMappingKey);
1534
- if (!t2) throw bi(this.urlMappingKey) ? Error(`Url Mapper Validator Error: Validator does not support sub mapping, please use the main url mapping key`) : Error(`Url Mapper Validator Error: Url mapping key is not supported (${this.urlMappingKey})`);
1523
+ var t2 = vi(this.urlMappingKey);
1524
+ if (!t2) throw hi(this.urlMappingKey) ? Error(`Url Mapper Validator Error: Validator does not support sub mapping, please use the main url mapping key`) : Error(`Url Mapper Validator Error: Url mapping key is not supported (${this.urlMappingKey})`);
1535
1525
  return this.pathPrefixes[t2] || e2.FALLBACK_PATH_PREFIX;
1536
1526
  }, Object.defineProperty(e2.prototype, "validatorProps", { get: function() {
1537
1527
  var e3 = this;
@@ -1539,8 +1529,8 @@ var ea = function() {
1539
1529
  }, enumerable: false, configurable: true }), e2.prototype.validate = function(e3) {
1540
1530
  var t2, n2;
1541
1531
  try {
1542
- for (var r2 = vi(this.validators), i2 = r2.next(); !i2.done; i2 = r2.next()) {
1543
- var a2 = Z(i2.value, 2), o2 = a2[0], s2 = a2[1], c2 = !!o2(e3, this.validatorProps);
1532
+ for (var r2 = pi(this.validators), i2 = r2.next(); !i2.done; i2 = r2.next()) {
1533
+ var a2 = Q(i2.value, 2), o2 = a2[0], s2 = a2[1], c2 = !!o2(e3, this.validatorProps);
1544
1534
  if (!c2) return { isValid: c2, error: s2 };
1545
1535
  }
1546
1536
  } catch (e4) {
@@ -1553,250 +1543,251 @@ var ea = function() {
1553
1543
  }
1554
1544
  }
1555
1545
  return { isValid: true };
1556
- }, e2.errorArray = Object.values(Q), e2.MAX_URL_MAPPING_LENGTH = 1e3, e2.FALLBACK_PATH_PREFIX = `unknown`, e2;
1546
+ }, e2.errorArray = Object.values($), e2.MAX_URL_MAPPING_LENGTH = 1e3, e2.FALLBACK_PATH_PREFIX = `unknown`, e2;
1557
1547
  }();
1558
- var ta = function(e2, t2) {
1559
- var n2 = xi()[e2] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
1560
- return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = ea.FALLBACK_PATH_PREFIX, a2.publishedPrefix = ea.FALLBACK_PATH_PREFIX), { defaultSaved: yi([a2.savedPrefix, i2], Z(r2?.map(function(e3) {
1548
+ var Xi = function(e2, t2) {
1549
+ var n2 = gi()[e2] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
1550
+ return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = Yi.FALLBACK_PATH_PREFIX, a2.publishedPrefix = Yi.FALLBACK_PATH_PREFIX), { defaultSaved: mi([a2.savedPrefix, i2], Q(r2?.map(function(e3) {
1561
1551
  return `{{${e3}}}`;
1562
- })), false).filter(Boolean).join(`/`), defaultPublished: yi([a2.publishedPrefix, i2], Z(r2?.map(function(e3) {
1552
+ })), false).filter(Boolean).join(`/`), defaultPublished: mi([a2.publishedPrefix, i2], Q(r2?.map(function(e3) {
1563
1553
  return `{{${e3}}}`;
1564
1554
  })), false).filter(Boolean).join(`/`) };
1565
1555
  };
1566
- function na(e2, t2) {
1567
- return t2 ? Li(e2, X.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
1556
+ function Zi(e2, t2) {
1557
+ return t2 ? Mi(e2, Z.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
1568
1558
  }
1569
- var ra = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1570
- var ia = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }];
1571
- function aa(e2) {
1572
- return Ct(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1559
+ var Qi = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1560
+ var $i = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }];
1561
+ function ea(e2) {
1562
+ return St(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1573
1563
  }
1574
- var oa = `@wix/auto_sdk_bookings_availability-time-slots`;
1575
- function sa(e2) {
1564
+ var ta = `@wix/auto_sdk_bookings_availability-time-slots`;
1565
+ function na(e2) {
1576
1566
  function t2({ host: t3 }) {
1577
- let n2 = nt(e2, [{ transformFn: Ue, paths: ra }]);
1578
- return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.AvailabilityTimeSlots.ListAvailabilityTimeSlots`, packageName: oa, migrationOptions: { optInTransformResponse: true }, url: aa({ protoPath: `/v2/time-slots`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => nt(e3, [{ transformFn: We, paths: ia }]) };
1567
+ let n2 = tt(e2, [{ transformFn: He, paths: Qi }]);
1568
+ return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.AvailabilityTimeSlots.ListAvailabilityTimeSlots`, packageName: ta, migrationOptions: { optInTransformResponse: true }, url: ea({ protoPath: `/v2/time-slots`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: $i }]) };
1579
1569
  }
1580
1570
  return t2;
1581
1571
  }
1582
- async function ca(e2) {
1583
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = sa(He({ serviceId: e2?.serviceId, fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, locations: e2?.locations, includeResourceTypeIds: e2?.includeResourceTypeIds, bookable: e2?.bookable, bookingPolicyViolations: e2?.bookingPolicyViolations, timeSlotsPerDay: e2?.timeSlotsPerDay, cursorPaging: e2?.cursorPaging, customerChoices: e2?.customerChoices, resourceTypes: e2?.resourceTypes }));
1572
+ async function ra(e2) {
1573
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = na(Ve({ serviceId: e2?.serviceId, fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, locations: e2?.locations, includeResourceTypeIds: e2?.includeResourceTypeIds, bookable: e2?.bookable, bookingPolicyViolations: e2?.bookingPolicyViolations, timeSlotsPerDay: e2?.timeSlotsPerDay, cursorPaging: e2?.cursorPaging, customerChoices: e2?.customerChoices, resourceTypes: e2?.resourceTypes }));
1584
1574
  n2?.onSiteCall?.();
1585
1575
  try {
1586
1576
  let e3 = await t2.request(r2);
1587
- return n2?.onSuccess?.(e3), L(e3.data);
1577
+ return n2?.onSuccess?.(e3), R(e3.data);
1588
1578
  } catch (e3) {
1589
- let t3 = ft(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { serviceId: `$[0].serviceId`, fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, locations: `$[0].locations`, includeResourceTypeIds: `$[0].includeResourceTypeIds`, bookable: `$[0].bookable`, bookingPolicyViolations: `$[0].bookingPolicyViolations`, timeSlotsPerDay: `$[0].timeSlotsPerDay`, cursorPaging: `$[0].cursorPaging`, customerChoices: `$[0].customerChoices`, resourceTypes: `$[0].resourceTypes` }, singleArgumentUnchanged: false }, [`options`]);
1579
+ let t3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { serviceId: `$[0].serviceId`, fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, locations: `$[0].locations`, includeResourceTypeIds: `$[0].includeResourceTypeIds`, bookable: `$[0].bookable`, bookingPolicyViolations: `$[0].bookingPolicyViolations`, timeSlotsPerDay: `$[0].timeSlotsPerDay`, cursorPaging: `$[0].cursorPaging`, customerChoices: `$[0].customerChoices`, resourceTypes: `$[0].resourceTypes` }, singleArgumentUnchanged: false }, [`options`]);
1590
1580
  throw n2?.onError?.(e3), t3;
1591
1581
  }
1592
1582
  }
1593
- function la(e2) {
1594
- return (t2) => ca(t2, { httpClient: e2 });
1583
+ function ia(e2) {
1584
+ return (t2) => ra(t2, { httpClient: e2 });
1595
1585
  }
1596
- var ua = B(la);
1597
- var da = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1598
- var fa = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }, { path: `schedulesInfo.firstSessionStart` }, { path: `schedulesInfo.lastSessionEnd` }, { path: `schedulesInfo.enrollmentViolations.earliestBookingDate` }];
1599
- function pa(e2) {
1600
- return Ct(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1586
+ var aa = V(ia);
1587
+ var oa = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1588
+ var sa = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }, { path: `schedulesInfo.firstSessionStart` }, { path: `schedulesInfo.lastSessionEnd` }, { path: `schedulesInfo.enrollmentViolations.earliestBookingDate` }];
1589
+ function ca(e2) {
1590
+ return St(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1601
1591
  }
1602
- var ma = `@wix/auto_sdk_bookings_event-time-slots`;
1603
- function ha(e2) {
1592
+ var la = `@wix/auto_sdk_bookings_event-time-slots`;
1593
+ function ua(e2) {
1604
1594
  function t2({ host: t3 }) {
1605
- let n2 = nt(e2, [{ transformFn: Ue, paths: da }]);
1606
- return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.EventTimeSlots.ListEventTimeSlots`, packageName: ma, migrationOptions: { optInTransformResponse: true }, url: pa({ protoPath: `/v2/time-slots/event`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => nt(e3, [{ transformFn: We, paths: fa }]) };
1595
+ let n2 = tt(e2, [{ transformFn: He, paths: oa }]);
1596
+ return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.EventTimeSlots.ListEventTimeSlots`, packageName: la, migrationOptions: { optInTransformResponse: true }, url: ca({ protoPath: `/v2/time-slots/event`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: sa }]) };
1607
1597
  }
1608
1598
  return t2;
1609
1599
  }
1610
- async function ga(e2) {
1611
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ha(He({ fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, serviceIds: e2?.serviceIds, includeNonBookable: e2?.includeNonBookable, minBookableCapacity: e2?.minBookableCapacity, eventFilter: e2?.eventFilter, maxSlotsPerDay: e2?.maxSlotsPerDay, cursorPaging: e2?.cursorPaging, bookingPolicyViolations: e2?.bookingPolicyViolations }));
1600
+ async function da(e2) {
1601
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ua(Ve({ fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, serviceIds: e2?.serviceIds, includeNonBookable: e2?.includeNonBookable, minBookableCapacity: e2?.minBookableCapacity, eventFilter: e2?.eventFilter, maxSlotsPerDay: e2?.maxSlotsPerDay, cursorPaging: e2?.cursorPaging, bookingPolicyViolations: e2?.bookingPolicyViolations }));
1612
1602
  n2?.onSiteCall?.();
1613
1603
  try {
1614
1604
  let e3 = await t2.request(r2);
1615
- return n2?.onSuccess?.(e3), L(e3.data);
1605
+ return n2?.onSuccess?.(e3), R(e3.data);
1616
1606
  } catch (e3) {
1617
- let t3 = ft(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, serviceIds: `$[0].serviceIds`, includeNonBookable: `$[0].includeNonBookable`, minBookableCapacity: `$[0].minBookableCapacity`, eventFilter: `$[0].eventFilter`, maxSlotsPerDay: `$[0].maxSlotsPerDay`, cursorPaging: `$[0].cursorPaging`, bookingPolicyViolations: `$[0].bookingPolicyViolations` }, singleArgumentUnchanged: false }, [`options`]);
1607
+ let t3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, serviceIds: `$[0].serviceIds`, includeNonBookable: `$[0].includeNonBookable`, minBookableCapacity: `$[0].minBookableCapacity`, eventFilter: `$[0].eventFilter`, maxSlotsPerDay: `$[0].maxSlotsPerDay`, cursorPaging: `$[0].cursorPaging`, bookingPolicyViolations: `$[0].bookingPolicyViolations` }, singleArgumentUnchanged: false }, [`options`]);
1618
1608
  throw n2?.onError?.(e3), t3;
1619
1609
  }
1620
1610
  }
1621
- function _a(e2) {
1622
- return (t2) => ga(t2, { httpClient: e2 });
1611
+ function fa(e2) {
1612
+ return (t2) => da(t2, { httpClient: e2 });
1623
1613
  }
1624
- var va = B(_a);
1625
- var ya = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1626
- var ba = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }];
1627
- function xa(e2) {
1628
- return Ct(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1614
+ var pa = V(fa);
1615
+ var ma = [{ path: `bookingPolicyViolations.earliestBookingDate` }];
1616
+ var ha = [{ path: `timeSlots.bookingPolicyViolations.earliestBookingDate` }];
1617
+ function ga(e2) {
1618
+ return St(Object.assign(e2, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "*.dev.wix-code.com": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], "manage._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }], "www._base_domain_": [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }], _: [{ srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "blocks._base_domain_": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "create.editorx": [{ srcPath: `/_api/service-availability/v2/multi-service-time-slots`, destPath: `/v2/multi-service-time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots`, destPath: `/v2/time-slots` }, { srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }], "editor.wixapps.net": [{ srcPath: `/_api/service-availability/v2/time-slots/event`, destPath: `/v2/time-slots/event` }] } }));
1629
1619
  }
1630
- var Sa = `@wix/auto_sdk_bookings_multi-service-availability-time-slots`;
1631
- function Ca(e2) {
1620
+ var _a = `@wix/auto_sdk_bookings_multi-service-availability-time-slots`;
1621
+ function va(e2) {
1632
1622
  function t2({ host: t3 }) {
1633
- let n2 = nt(e2, [{ transformFn: Ue, paths: ya }]);
1634
- return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.MultiServiceAvailabilityTimeSlots.ListMultiServiceAvailabilityTimeSlots`, packageName: Sa, migrationOptions: { optInTransformResponse: true }, url: xa({ protoPath: `/v2/multi-service-time-slots`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => nt(e3, [{ transformFn: We, paths: ba }]) };
1623
+ let n2 = tt(e2, [{ transformFn: He, paths: ma }]);
1624
+ return { entityFqdn: `wix.bookings.availability.v2.time_slot`, method: `POST`, methodFqn: `com.wixpress.bookings.availability.v2.MultiServiceAvailabilityTimeSlots.ListMultiServiceAvailabilityTimeSlots`, packageName: _a, migrationOptions: { optInTransformResponse: true }, url: ga({ protoPath: `/v2/multi-service-time-slots`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: ha }]) };
1635
1625
  }
1636
1626
  return t2;
1637
1627
  }
1638
- async function wa(e2) {
1639
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ca(He({ services: e2?.services, fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, location: e2?.location, bookable: e2?.bookable, bookingPolicyViolations: e2?.bookingPolicyViolations, timeSlotsPerDay: e2?.timeSlotsPerDay, cursorPaging: e2?.cursorPaging }));
1628
+ async function ya(e2) {
1629
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = va(Ve({ services: e2?.services, fromLocalDate: e2?.fromLocalDate, toLocalDate: e2?.toLocalDate, timeZone: e2?.timeZone, location: e2?.location, bookable: e2?.bookable, bookingPolicyViolations: e2?.bookingPolicyViolations, timeSlotsPerDay: e2?.timeSlotsPerDay, cursorPaging: e2?.cursorPaging }));
1640
1630
  n2?.onSiteCall?.();
1641
1631
  try {
1642
1632
  let e3 = await t2.request(r2);
1643
- return n2?.onSuccess?.(e3), L(e3.data);
1633
+ return n2?.onSuccess?.(e3), R(e3.data);
1644
1634
  } catch (e3) {
1645
- let t3 = ft(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { services: `$[0].services`, fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, location: `$[0].location`, bookable: `$[0].bookable`, bookingPolicyViolations: `$[0].bookingPolicyViolations`, timeSlotsPerDay: `$[0].timeSlotsPerDay`, cursorPaging: `$[0].cursorPaging` }, singleArgumentUnchanged: false }, [`options`]);
1635
+ let t3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { services: `$[0].services`, fromLocalDate: `$[0].fromLocalDate`, toLocalDate: `$[0].toLocalDate`, timeZone: `$[0].timeZone`, location: `$[0].location`, bookable: `$[0].bookable`, bookingPolicyViolations: `$[0].bookingPolicyViolations`, timeSlotsPerDay: `$[0].timeSlotsPerDay`, cursorPaging: `$[0].cursorPaging` }, singleArgumentUnchanged: false }, [`options`]);
1646
1636
  throw n2?.onError?.(e3), t3;
1647
1637
  }
1648
1638
  }
1649
- function Ta(e2) {
1650
- return (t2) => wa(t2, { httpClient: e2 });
1639
+ function ba(e2) {
1640
+ return (t2) => ya(t2, { httpClient: e2 });
1651
1641
  }
1652
- var Ea = B(Ta);
1653
- var Da = ((e2) => (e2.UNKNOWN = `UNKNOWN`, e2.CUSTOM = `CUSTOM`, e2.STAFF_MEMBER = `STAFF_MEMBER`, e2.DURATION = `DURATION`, e2.DATE_TIME = `DATE_TIME`, e2.NUMBER_OF_PARTICIPANTS = `NUMBER_OF_PARTICIPANTS`, e2.LOCATION = `LOCATION`, e2.DURATION_RANGE = `DURATION_RANGE`, e2))(Da || {});
1654
- var Oa = ((e2) => (e2.APPOINTMENT = `APPOINTMENT`, e2.CLASS = `CLASS`, e2.COURSE = `COURSE`, e2))(Oa || {});
1655
- var ka = ((e2) => (e2.CUSTOM = `CUSTOM`, e2.BUSINESS = `BUSINESS`, e2.CUSTOMER = `CUSTOMER`, e2))(ka || {});
1656
- var Aa = [{ path: `timeSlotsConfiguration.createdDate` }, { path: `timeSlotsConfiguration.updatedDate` }];
1657
- function ja(e2) {
1658
- return Ct(Object.assign(e2, { domainToMappings: { _: [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/time-slots-config`, destPath: `` }] } }));
1642
+ var xa = V(ba);
1643
+ var Sa = ((e2) => (e2.UNKNOWN = `UNKNOWN`, e2.CUSTOM = `CUSTOM`, e2.STAFF_MEMBER = `STAFF_MEMBER`, e2.DURATION = `DURATION`, e2.DATE_TIME = `DATE_TIME`, e2.NUMBER_OF_PARTICIPANTS = `NUMBER_OF_PARTICIPANTS`, e2.LOCATION = `LOCATION`, e2.DURATION_RANGE = `DURATION_RANGE`, e2))(Sa || {});
1644
+ var Ca = ((e2) => (e2.APPOINTMENT = `APPOINTMENT`, e2.CLASS = `CLASS`, e2.COURSE = `COURSE`, e2))(Ca || {});
1645
+ var wa = ((e2) => (e2.CUSTOM = `CUSTOM`, e2.BUSINESS = `BUSINESS`, e2.CUSTOMER = `CUSTOMER`, e2))(wa || {});
1646
+ var Ta = [{ path: `timeSlotsConfiguration.createdDate` }, { path: `timeSlotsConfiguration.updatedDate` }];
1647
+ function Ea(e2) {
1648
+ return St(Object.assign(e2, { domainToMappings: { _: [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/time-slots-config`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/time-slots-config`, destPath: `` }] } }));
1659
1649
  }
1660
- var Ma = `@wix/auto_sdk_bookings_time-slots-configuration`;
1661
- function Na(e2) {
1650
+ var Da = `@wix/auto_sdk_bookings_time-slots-configuration`;
1651
+ function Oa(e2) {
1662
1652
  function t2({ host: t3 }) {
1663
- return { entityFqdn: `wix.bookings.timeslots_configuration.v1.time_slots_configuration`, method: `GET`, methodFqn: `wix.bookings.timeslots.configuration.v1.TimeSlotsConfigurationService.GetTimeSlotsConfigurationByAppId`, packageName: Ma, migrationOptions: { optInTransformResponse: true }, url: ja({ protoPath: `/v1/time-slots-configurations/app/{appId}`, data: e2, host: t3 }), params: St(e2), transformResponse: (e3) => nt(e3, [{ transformFn: We, paths: Aa }]) };
1653
+ return { entityFqdn: `wix.bookings.timeslots_configuration.v1.time_slots_configuration`, method: `GET`, methodFqn: `wix.bookings.timeslots.configuration.v1.TimeSlotsConfigurationService.GetTimeSlotsConfigurationByAppId`, packageName: Da, migrationOptions: { optInTransformResponse: true }, url: Ea({ protoPath: `/v1/time-slots-configurations/app/{appId}`, data: e2, host: t3 }), params: xt(e2), transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: Ta }]) };
1664
1654
  }
1665
1655
  return t2;
1666
1656
  }
1667
- async function Pa(e2) {
1668
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Na(He({ appId: e2 }));
1657
+ async function ka(e2) {
1658
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Oa(Ve({ appId: e2 }));
1669
1659
  n2?.onSiteCall?.();
1670
1660
  try {
1671
1661
  let e3 = await t2.request(r2);
1672
- return n2?.onSuccess?.(e3), L(e3.data);
1662
+ return n2?.onSuccess?.(e3), R(e3.data);
1673
1663
  } catch (e3) {
1674
- let t3 = ft(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { appId: `$[0]` }, singleArgumentUnchanged: false }, [`appId`]);
1664
+ let t3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { appId: `$[0]` }, singleArgumentUnchanged: false }, [`appId`]);
1675
1665
  throw n2?.onError?.(e3), t3;
1676
1666
  }
1677
1667
  }
1678
- function Fa(e2) {
1679
- return (t2) => Pa(t2, { httpClient: e2 });
1668
+ function Aa(e2) {
1669
+ return (t2) => ka(t2, { httpClient: e2 });
1680
1670
  }
1681
- var Ia = B(Fa);
1682
- var La = [{ path: `bookingsSettings.createdDate` }, { path: `bookingsSettings.updatedDate` }];
1683
- var Ra = [{ path: `bookingsSettings.siteProperties.address.coordinates.latitude` }, { path: `bookingsSettings.siteProperties.address.coordinates.longitude` }];
1684
- function za(e2) {
1685
- return Ct(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "dev._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], _: [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/bookings-settings`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }] } }));
1671
+ var ja = V(Aa);
1672
+ var Ma = [{ path: `bookingsSettings.createdDate` }, { path: `bookingsSettings.updatedDate` }];
1673
+ var Na = [{ path: `bookingsSettings.siteProperties.address.coordinates.latitude` }, { path: `bookingsSettings.siteProperties.address.coordinates.longitude` }];
1674
+ function Pa(e2) {
1675
+ return St(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "dev._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], _: [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/bookings-settings`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings-settings`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/bookings-settings`, destPath: `` }] } }));
1686
1676
  }
1687
- var Ba = `@wix/auto_sdk_bookings_bookings-settings`;
1688
- function Va(e2) {
1677
+ var Fa = `@wix/auto_sdk_bookings_bookings-settings`;
1678
+ function Ia(e2) {
1689
1679
  function t2({ host: t3 }) {
1690
- return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName: Ba, migrationOptions: { optInTransformResponse: true }, url: za({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: St(e2), transformResponse: (e3) => nt(e3, [{ transformFn: We, paths: La }, { transformFn: Jt, paths: Ra }]), fallback: [{ method: `GET`, url: za({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: St(e2) }] };
1680
+ return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName: Fa, migrationOptions: { optInTransformResponse: true }, url: Pa({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: xt(e2), transformResponse: (e3) => tt(e3, [{ transformFn: Ue, paths: Ma }, { transformFn: qt, paths: Na }]), fallback: [{ method: `GET`, url: Pa({ protoPath: `/v2/settings`, data: e2, host: t3 }), params: xt(e2) }] };
1691
1681
  }
1692
1682
  return t2;
1693
1683
  }
1694
- var Ha = ((e2) => (e2.BUSINESS_TIME_ZONE = `BUSINESS_TIME_ZONE`, e2.CUSTOMER_TIME_ZONE = `CUSTOMER_TIME_ZONE`, e2))(Ha || {});
1695
- async function Ua() {
1696
- let { httpClient: e2, sideEffects: t2 } = arguments[0], n2 = Va(He({}));
1684
+ var La = ((e2) => (e2.BUSINESS_TIME_ZONE = `BUSINESS_TIME_ZONE`, e2.CUSTOMER_TIME_ZONE = `CUSTOMER_TIME_ZONE`, e2))(La || {});
1685
+ async function Ra() {
1686
+ let { httpClient: e2, sideEffects: t2 } = arguments[0], n2 = Ia(Ve({}));
1697
1687
  t2?.onSiteCall?.();
1698
1688
  try {
1699
1689
  let r2 = await e2.request(n2);
1700
- return t2?.onSuccess?.(r2), L(r2.data)?.bookingsSettings;
1690
+ return t2?.onSuccess?.(r2), R(r2.data)?.bookingsSettings;
1701
1691
  } catch (e3) {
1702
- let n3 = ft(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
1692
+ let n3 = dt(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
1703
1693
  throw t2?.onError?.(e3), n3;
1704
1694
  }
1705
1695
  }
1706
- function Wa(e2) {
1707
- return () => Ua({ httpClient: e2 });
1696
+ function za(e2) {
1697
+ return () => Ra({ httpClient: e2 });
1708
1698
  }
1709
- var Ga = B(Wa);
1710
- function Ka(e2) {
1699
+ var Ba = V(za);
1700
+ function Va(e2) {
1711
1701
  return e2.business?._id ?? null;
1712
1702
  }
1713
- function qa(e2) {
1703
+ function Ha(e2) {
1714
1704
  return e2.business?.name ?? null;
1715
1705
  }
1716
- function Ja(e2) {
1717
- return (e2?.locations ?? []).filter((e3) => e3.type === ka.BUSINESS).map((e3) => ({ id: Ka(e3) ?? ``, label: qa(e3) ?? `` })).filter((e3) => e3.id !== ``).sort((e3, t2) => e3.label.localeCompare(t2.label));
1706
+ function Ua(e2) {
1707
+ return (e2?.locations ?? []).filter((e3) => e3.type === wa.BUSINESS).map((e3) => ({ id: Va(e3) ?? ``, label: Ha(e3) ?? `` })).filter((e3) => e3.id !== ``).sort((e3, t2) => e3.label.localeCompare(t2.label));
1718
1708
  }
1719
- var Ya = (e2) => e2 === Oa.APPOINTMENT;
1720
- var Xa = (e2) => e2 === Oa.CLASS;
1721
- var Za = (e2) => e2 === Oa.COURSE;
1722
- var Qa = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1723
- function $a(e2) {
1709
+ var Wa = (e2) => e2 === Ca.APPOINTMENT;
1710
+ var Ga = (e2) => e2 === Ca.CLASS;
1711
+ var Ka = (e2) => e2 === Ca.COURSE;
1712
+ var qa = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
1713
+ function Ja(e2) {
1724
1714
  if (!e2) return null;
1725
- let t2 = ao(e2).map((e3) => e3.id), n2 = { ...e2.durationChoiceId ? { durationChoiceId: e2.durationChoiceId } : {}, ...e2.durationInMinutes ? { durationInMinutes: e2.durationInMinutes } : {}, ...t2.length ? { addOnIds: t2 } : {}, ...e2.requestedGender ? { requestedGender: { gender: e2.requestedGender } } : {} };
1715
+ let t2 = eo(e2).map((e3) => e3.id), n2 = { ...e2.durationChoiceId ? { durationChoiceId: e2.durationChoiceId } : {}, ...e2.durationInMinutes ? { durationInMinutes: e2.durationInMinutes } : {}, ...t2.length ? { addOnIds: t2 } : {}, ...e2.requestedGender ? { requestedGender: { gender: e2.requestedGender } } : {} };
1726
1716
  return Object.keys(n2).length ? n2 : null;
1727
1717
  }
1728
- function eo(e2) {
1718
+ function Ya(e2) {
1729
1719
  return (e2?.services.length ?? 0) > 1;
1730
1720
  }
1731
- var to = (e2) => ({ valid: false, reason: e2 });
1732
- function no(e2) {
1721
+ var Xa = (e2) => ({ valid: false, reason: e2 });
1722
+ function Za(e2) {
1733
1723
  let t2 = e2?.services ?? [];
1734
- if (!eo(e2) || t2.some((e3) => !e3.serviceId)) return to(`too-few-services`);
1735
- if (t2.some((e3) => e3.serviceType && e3.serviceType !== `APPOINTMENT`)) return to(`not-appointment`);
1724
+ if (!Ya(e2) || t2.some((e3) => !e3.serviceId)) return Xa(`too-few-services`);
1725
+ if (t2.some((e3) => e3.serviceType && e3.serviceType !== `APPOINTMENT`)) return Xa(`not-appointment`);
1736
1726
  let n2 = t2[0].locationType ?? `BUSINESS`, r2 = t2[0].locationId ?? null;
1737
- if (t2.some((e3) => (e3.locationType ?? `BUSINESS`) !== n2 || (e3.locationId ?? null) !== r2)) return to(`location-mixed`);
1738
- if (r2 && n2 !== `BUSINESS`) return to(`location-id-not-business`);
1739
- let i2 = t2.map((e3) => ({ serviceId: e3.serviceId, staff: io(e3), customerChoices: $a(e3) }));
1727
+ if (t2.some((e3) => (e3.locationType ?? `BUSINESS`) !== n2 || (e3.locationId ?? null) !== r2)) return Xa(`location-mixed`);
1728
+ if (r2 && n2 !== `BUSINESS`) return Xa(`location-id-not-business`);
1729
+ let i2 = t2.map((e3) => ({ serviceId: e3.serviceId, staff: $a(e3), customerChoices: Ja(e3) }));
1740
1730
  return { valid: true, locationId: r2, locationType: n2, services: i2, requestKey: JSON.stringify([n2, r2, i2]) };
1741
1731
  }
1742
- var ro = `staff`;
1743
- function io(e2) {
1744
- let t2 = e2.resources?.find((e3) => e3.type === ro);
1732
+ var Qa = `staff`;
1733
+ function $a(e2) {
1734
+ let t2 = e2.resources?.find((e3) => e3.type === Qa);
1745
1735
  if (!t2) return null;
1746
1736
  let n2 = t2.ids[0];
1747
1737
  return n2 ? { anyResource: false, staffMemberId: n2 } : t2.anyResource ? { anyResource: true } : null;
1748
1738
  }
1749
- function ao(e2) {
1739
+ function eo(e2) {
1750
1740
  return e2.addOns ?? [];
1751
1741
  }
1752
- function oo(e2, t2) {
1742
+ function to(e2, t2) {
1753
1743
  let n2 = e2(t2);
1754
1744
  return n2 ? n2.replace(/\/$/, ``) || `/` : null;
1755
1745
  }
1756
- function so(e2, t2, n2) {
1746
+ function no(e2, t2, n2) {
1757
1747
  let r2 = e2(t2);
1758
1748
  return !r2 || !n2 ? null : `${r2.replace(/\/$/, ``)}/${n2}`;
1759
1749
  }
1760
- function co(e2, t2) {
1750
+ function ro(e2, t2) {
1761
1751
  switch (e2) {
1762
1752
  case `servicePage`:
1763
- return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? so(t2.appSectionUrl, Kr.SERVICE_PAGE, t2.slug);
1753
+ return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? no(t2.appSectionUrl, Vr.SERVICE_PAGE, t2.slug);
1764
1754
  case `bookingCalendar`:
1765
- return t2.isMultiService ? oo(t2.appSectionUrl, Kr.CALENDAR_PAGE) : so(t2.appSectionUrl, Kr.CALENDAR_PAGE, t2.slug);
1755
+ return t2.isMultiService ? to(t2.appSectionUrl, Vr.CALENDAR_PAGE) : no(t2.appSectionUrl, Vr.CALENDAR_PAGE, t2.slug);
1766
1756
  case `bookingForm`:
1767
- return t2.serviceId ? so(t2.appSectionUrl, Kr.FORM_PAGE, t2.slug) : null;
1757
+ return t2.serviceId ? no(t2.appSectionUrl, Vr.FORM_PAGE, t2.slug) : null;
1768
1758
  default:
1769
1759
  return null;
1770
1760
  }
1771
1761
  }
1772
- var lo = (e2, t2) => t2 === `/` ? e2 : new URL(`.${t2}`, `${e2}/`).href;
1773
- var uo = (e2, t2, n2) => n2 ? `.${t2}` : fo(e2, t2);
1774
- var fo = (e2, t2) => e2 ? lo(e2, t2) : t2;
1775
- var po = () => {
1776
- let e2 = (0, import_services_manager_react.useService)(Ir), t2 = (0, import_services_manager_react.useService)(zr), n2 = t2.siteUrl.replace(/\/$/, ``), i2 = (0, import_services_manager_react.useService)(Lr), a2 = (0, import_services_manager_react.useService)(Vr), o2 = (0, import_services_manager_react.useGetService)(), s2 = (0, import_react.useCallback)(async (t3) => {
1777
- let r2 = uo(n2, t3, e2.getPreviewMode());
1778
- await i2.navigateTo({ href: r2 });
1779
- }, [e2, n2, i2]), c2 = (0, import_react.useCallback)(async ({ href: e3, target: t3 }) => {
1780
- await i2.navigateTo({ href: e3, target: t3 });
1781
- }, [i2]), l2 = (0, import_react.useCallback)((e3) => fo(n2, e3), [n2]), u2 = (0, import_react.useCallback)((e3) => t2.appSectionRelativeUrl(Hr, e3), [t2]), p2 = (0, import_react.useCallback)((e3) => na(a2.urlMappings, e3), [a2]), m2 = (0, import_react.useCallback)((e3, t3) => co(e3, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: p2 }), [u2, p2]), h2 = (0, import_react.useCallback)((e3, t3) => {
1762
+ var io = (e2) => e2.target === `_blank`;
1763
+ var ao = (e2, t2) => t2 === `/` ? e2 : new URL(`.${t2}`, `${e2}/`).href;
1764
+ var oo = (e2, t2, n2) => n2 ? `.${t2}` : so(e2, t2);
1765
+ var so = (e2, t2) => e2 ? ao(e2, t2) : t2;
1766
+ var co = () => {
1767
+ let { previewMode: e2 } = (0, import_services_manager_react.useService)(Mr), t2 = (0, import_services_manager_react.useService)(Fr), n2 = t2.siteUrl.replace(/\/$/, ``), { navigateTo: i2 } = (0, import_services_manager_react.useService)(Pr), a2 = (0, import_services_manager_react.useService)(Ir), o2 = (0, import_services_manager_react.useGetService)(), s2 = (0, import_react.useCallback)(async (t3) => {
1768
+ let r2 = oo(n2, t3, e2);
1769
+ await i2({ href: r2 });
1770
+ }, [e2, n2, i2]), c2 = (0, import_react.useCallback)(async (e3) => {
1771
+ await i2(io(e3) ? { href: e3.href, type: `ExternalLink`, target: `_blank` } : { href: e3.href });
1772
+ }, [i2]), l2 = (0, import_react.useCallback)((e3) => so(n2, e3), [n2]), u2 = (0, import_react.useCallback)((e3) => t2.appSectionRelativeUrl(Lr, e3), [t2]), p2 = (0, import_react.useCallback)((e3) => Zi(a2.urlMappings, e3), [a2]), m2 = (0, import_react.useCallback)((e3, t3) => ro(e3, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: p2 }), [u2, p2]), h2 = (0, import_react.useCallback)((e3, t3) => {
1782
1773
  let r2 = m2(e3, t3);
1783
- return r2 && n2 ? lo(n2, r2) : null;
1774
+ return r2 && n2 ? ao(n2, r2) : null;
1784
1775
  }, [m2, n2]), g2 = (0, import_react.useCallback)((e3, t3) => {
1785
1776
  let n3 = m2(e3, t3);
1786
1777
  n3 && s2(n3);
1787
- }, [m2, s2]), _2 = (0, import_react.useCallback)(() => u2(Kr.FORM_PAGE) || void 0, [u2]), v2 = (0, import_react.useCallback)((e3) => Object.values(o2(Nr).pages).some((t3) => t3.appPageId === e3 && (!t3.appDefinitionId || t3.appDefinitionId === `1380b703-ce81-ff05-f115-39571d94dfcd`)) && t2.appSectionRelativeUrl(`1380b703-ce81-ff05-f115-39571d94dfcd`, e3) || void 0, [t2, o2]);
1788
- return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: h2, navigateTo: g2, getBookingFormPath: _2, getCartPagePath: (0, import_react.useCallback)(() => v2(Ur), [v2]), getThankYouPagePath: (0, import_react.useCallback)((e3) => {
1789
- let t3 = v2(Wr);
1778
+ }, [m2, s2]), _2 = (0, import_react.useCallback)(() => u2(Vr.FORM_PAGE) || void 0, [u2]), v2 = (0, import_react.useCallback)((e3) => Object.values(o2(Nr).pages).some((t3) => t3.appPageId === e3 && (!t3.appDefinitionId || t3.appDefinitionId === `1380b703-ce81-ff05-f115-39571d94dfcd`)) && t2.appSectionRelativeUrl(`1380b703-ce81-ff05-f115-39571d94dfcd`, e3) || void 0, [t2, o2]);
1779
+ return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: h2, navigateTo: g2, getBookingFormPath: _2, getCartPagePath: (0, import_react.useCallback)(() => v2(Rr), [v2]), getThankYouPagePath: (0, import_react.useCallback)((e3) => {
1780
+ let t3 = v2(zr);
1790
1781
  return t3 ? `${t3}/${e3}?origin=bookings` : void 0;
1791
1782
  }, [v2]) };
1792
1783
  };
1793
- function mo(e2) {
1784
+ function lo(e2) {
1794
1785
  return e2?.details?.applicationError?.code;
1795
1786
  }
1796
- function ho() {
1787
+ function uo() {
1797
1788
  let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
1798
1789
  if (e2) return { initWixModules(t3, n3) {
1799
- return go(() => e2(t3, n3));
1790
+ return fo(() => e2(t3, n3));
1800
1791
  }, fetchWithAuth() {
1801
1792
  throw Error(`fetchWithAuth is not available in this context`);
1802
1793
  }, graphql() {
@@ -1806,10 +1797,10 @@ function ho() {
1806
1797
  if (t2 || n2) return { initWixModules(e3, r2) {
1807
1798
  if (r2) {
1808
1799
  if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
1809
- return go(() => n2.use(e3));
1800
+ return fo(() => n2.use(e3));
1810
1801
  }
1811
1802
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1812
- return go(() => t2.use(e3));
1803
+ return fo(() => t2.use(e3));
1813
1804
  }, fetchWithAuth: (e3, n3) => {
1814
1805
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1815
1806
  return t2.fetchWithAuth(e3, n3);
@@ -1821,7 +1812,7 @@ function ho() {
1821
1812
  return t2.graphql(e3, n3, r2);
1822
1813
  } };
1823
1814
  }
1824
- function go(e2) {
1815
+ function fo(e2) {
1825
1816
  let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
1826
1817
  globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
1827
1818
  try {
@@ -1830,17 +1821,17 @@ function go(e2) {
1830
1821
  globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
1831
1822
  }
1832
1823
  }
1833
- function _o(e2, t2) {
1824
+ function po(e2, t2) {
1834
1825
  return { ...e2, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
1835
- let r2 = ho();
1826
+ let r2 = uo();
1836
1827
  if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
1837
1828
  return r2.initWixModules(e2)[t3].apply(void 0, n2);
1838
1829
  }])) };
1839
1830
  }
1840
- function vo(e2) {
1841
- return _o({ __type: `host`, create: (t2) => Object.entries(e2).reduce((e3, [n2, r2]) => ({ ...e3, [n2]: r2(t2) }), {}) }, Object.keys(e2));
1831
+ function mo(e2) {
1832
+ return po({ __type: `host`, create: (t2) => Object.entries(e2).reduce((e3, [n2, r2]) => ({ ...e3, [n2]: r2(t2) }), {}) }, Object.keys(e2));
1842
1833
  }
1843
- var yo = class {
1834
+ var ho = class {
1844
1835
  constructor(e2) {
1845
1836
  this.message = e2, this.captureException = () => {
1846
1837
  console.error(this.message);
@@ -1855,106 +1846,110 @@ var yo = class {
1855
1846
  };
1856
1847
  }
1857
1848
  };
1858
- var bo = (e2) => new yo(e2);
1859
- var xo = vo({ getMonitoringClient: (e2) => () => e2.getMonitoringClient ? e2.getMonitoringClient() : bo(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
1860
- var So = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule` };
1861
- function Co(e2) {
1849
+ var go = (e2) => new ho(e2);
1850
+ var _o = mo({ getMonitoringClient: (e2) => () => e2.getMonitoringClient ? e2.getMonitoringClient() : go(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
1851
+ var vo = { service: `service`, services: `services`, categories: `categories`, locations: `locations`, sessions: `sessions`, timeSlots: `time-slots`, serviceAddOns: `service-addons`, bookingsSettings: `bookings-settings`, serviceCta: `service-cta`, preferences: `preferences`, bookingSummary: `booking-summary`, bookingCheckout: `booking-checkout`, formValues: `form-values`, paymentOptions: `payment-options`, seo: `seo`, warmup: `warmup`, reschedule: `reschedule` };
1852
+ function yo(e2) {
1862
1853
  try {
1863
- let t2 = xo.getMonitoringClient?.();
1854
+ let t2 = _o.getMonitoringClient?.();
1864
1855
  return t2 && typeof t2[e2] == `function` ? t2 : null;
1865
1856
  } catch {
1866
1857
  return null;
1867
1858
  }
1868
1859
  }
1869
- function wo(e2, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
1870
- let a2 = Co(`captureException`);
1860
+ function bo(e2, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
1861
+ let a2 = yo(`captureException`);
1871
1862
  if (!a2) return;
1872
1863
  let o2 = e2 instanceof Error ? e2 : Error(String(e2));
1873
1864
  a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
1874
1865
  }
1875
- var To = (e2) => {
1866
+ var xo = (e2) => {
1876
1867
  let t2 = (e3) => e3 < 10 ? `0${e3}` : `${e3}`;
1877
1868
  return `${e2.getFullYear()}-${t2(e2.getMonth() + 1)}-${t2(e2.getDate())}`;
1878
1869
  };
1879
- var $ = (e2) => /* @__PURE__ */ new Date(`${e2}T00:00:00`);
1880
- var Eo = (e2, t2) => new Intl.DateTimeFormat(`en-CA`, { year: `numeric`, month: `2-digit`, day: `2-digit`, ...t2 ? { timeZone: t2 } : {} }).format(e2);
1881
- var Do = (e2) => `${To(e2)}T00:00:00`;
1882
- var Oo = (e2) => `${To(e2)}T23:59:59`;
1883
- function ko(e2, t2) {
1884
- return `${Eo(e2, t2)}T${new Intl.DateTimeFormat(`en-GB`, { timeZone: t2, hourCycle: `h23`, hour: `2-digit`, minute: `2-digit`, second: `2-digit` }).format(e2)}`;
1885
- }
1886
- var Ao = /^\d{4}-\d{2}-\d{2}$/;
1887
- var jo = 864e5;
1888
- function Mo(e2) {
1889
- if (typeof e2 != `string` || !Ao.test(e2)) return false;
1890
- let t2 = $(e2);
1891
- return !Number.isNaN(t2.getTime()) && To(t2) === e2;
1892
- }
1893
- function No(e2) {
1870
+ var So = (e2) => /* @__PURE__ */ new Date(`${e2}T00:00:00`);
1871
+ var Co = (e2, t2) => new Intl.DateTimeFormat(`en-CA`, { year: `numeric`, month: `2-digit`, day: `2-digit`, ...t2 ? { timeZone: t2 } : {} }).format(e2);
1872
+ var wo = (e2) => `${xo(e2)}T00:00:00`;
1873
+ var To = (e2) => `${xo(e2)}T23:59:59`;
1874
+ function Eo(e2, t2) {
1875
+ return `${Co(e2, t2)}T${new Intl.DateTimeFormat(`en-GB`, { timeZone: t2, hourCycle: `h23`, hour: `2-digit`, minute: `2-digit`, second: `2-digit` }).format(e2)}`;
1876
+ }
1877
+ function Do(e2, t2) {
1878
+ let n2 = Eo(new Date(Date.now()), t2);
1879
+ return n2.slice(0, 10) === e2 ? n2 : `${e2}T00:00:00`;
1880
+ }
1881
+ var Oo = /^\d{4}-\d{2}-\d{2}$/;
1882
+ var ko = 864e5;
1883
+ function Ao(e2) {
1884
+ if (typeof e2 != `string` || !Oo.test(e2)) return false;
1885
+ let t2 = So(e2);
1886
+ return !Number.isNaN(t2.getTime()) && xo(t2) === e2;
1887
+ }
1888
+ function jo(e2) {
1894
1889
  if (!e2 || typeof e2 != `object`) return false;
1895
1890
  let { startDate: t2, endDate: n2 } = e2;
1896
- return Mo(t2) && Mo(n2) && t2 <= n2;
1891
+ return Ao(t2) && Ao(n2) && t2 <= n2;
1897
1892
  }
1898
- function Po(e2, t2) {
1899
- let n2 = $(e2);
1900
- return n2.setDate(n2.getDate() + t2), To(n2);
1893
+ function Mo(e2, t2) {
1894
+ let n2 = So(e2);
1895
+ return n2.setDate(n2.getDate() + t2), xo(n2);
1901
1896
  }
1902
- function Fo({ startDate: e2, endDate: t2 }) {
1903
- let n2 = $(t2).getTime() - $(e2).getTime();
1904
- return Math.round(n2 / jo) + 1;
1897
+ function No({ startDate: e2, endDate: t2 }) {
1898
+ let n2 = So(t2).getTime() - So(e2).getTime();
1899
+ return Math.round(n2 / ko) + 1;
1905
1900
  }
1906
- function Io(e2) {
1907
- let t2 = $(e2), n2 = new Date(t2.getFullYear(), t2.getMonth(), 1), r2 = new Date(t2.getFullYear(), t2.getMonth() + 1, 0);
1908
- return { startDate: To(n2), endDate: To(r2) };
1901
+ function Po(e2) {
1902
+ let t2 = So(e2), n2 = new Date(t2.getFullYear(), t2.getMonth(), 1), r2 = new Date(t2.getFullYear(), t2.getMonth() + 1, 0);
1903
+ return { startDate: xo(n2), endDate: xo(r2) };
1909
1904
  }
1910
- function Lo(e2) {
1911
- let t2 = Io(e2.startDate);
1905
+ function Fo(e2) {
1906
+ let t2 = Po(e2.startDate);
1912
1907
  return t2.startDate === e2.startDate && t2.endDate === e2.endDate;
1913
1908
  }
1914
- function Ro(e2, t2) {
1915
- if (Lo(e2)) {
1916
- let n3 = $(e2.startDate);
1917
- return Io(To(new Date(n3.getFullYear(), n3.getMonth() + t2, 1)));
1909
+ function Io(e2, t2) {
1910
+ if (Fo(e2)) {
1911
+ let n3 = So(e2.startDate);
1912
+ return Po(xo(new Date(n3.getFullYear(), n3.getMonth() + t2, 1)));
1918
1913
  }
1919
- let n2 = t2 * Fo(e2);
1920
- return { startDate: Po(e2.startDate, n2), endDate: Po(e2.endDate, n2) };
1914
+ let n2 = t2 * No(e2);
1915
+ return { startDate: Mo(e2.startDate, n2), endDate: Mo(e2.endDate, n2) };
1921
1916
  }
1922
- function zo(e2, t2) {
1917
+ function Lo(e2, t2) {
1923
1918
  return e2 >= t2.startDate && e2 <= t2.endDate;
1924
1919
  }
1925
- function Bo(e2) {
1926
- let t2 = $(e2), n2 = new Date(t2.getFullYear(), t2.getMonth() + 2, 0).getDate(), r2 = Math.min(t2.getDate(), n2);
1927
- return To(new Date(t2.getFullYear(), t2.getMonth() + 1, r2));
1920
+ function Ro(e2) {
1921
+ let t2 = So(e2), n2 = new Date(t2.getFullYear(), t2.getMonth() + 2, 0).getDate(), r2 = Math.min(t2.getDate(), n2);
1922
+ return xo(new Date(t2.getFullYear(), t2.getMonth() + 1, r2));
1928
1923
  }
1929
- function Vo(e2) {
1924
+ function zo(e2) {
1930
1925
  let t2 = [], n2 = e2.startDate;
1931
1926
  for (; n2 <= e2.endDate; ) {
1932
- let r2 = Po(Bo(n2), -1), i2 = r2 < e2.endDate ? r2 : e2.endDate;
1933
- t2.push({ startDate: n2, endDate: i2 }), n2 = Po(i2, 1);
1927
+ let r2 = Mo(Ro(n2), -1), i2 = r2 < e2.endDate ? r2 : e2.endDate;
1928
+ t2.push({ startDate: n2, endDate: i2 }), n2 = Mo(i2, 1);
1934
1929
  }
1935
1930
  return t2;
1936
1931
  }
1937
- function Ho({ allowGenderSelection: e2, staffSelectionStrategy: t2 }) {
1932
+ function Bo({ allowGenderSelection: e2, staffSelectionStrategy: t2 }) {
1938
1933
  return e2 && t2 !== `CUSTOMER_CANNOT_CHOOSE`;
1939
1934
  }
1940
- async function Uo() {
1941
- let e2 = await Ia(Hr);
1935
+ async function Vo() {
1936
+ let e2 = await ja(Lr);
1942
1937
  return { businessTimeZone: e2.timeSlotsConfiguration?.displayTimeZone?.timeZone || null, staffSelectionStrategy: e2.timeSlotsConfiguration?.staffSelection?.strategy ?? null, allowGenderSelection: e2.timeSlotsConfiguration?.staffSelection?.allowGenderSelection ?? false };
1943
1938
  }
1944
- function Wo(e2) {
1939
+ function Ho(e2) {
1945
1940
  let t2 = e2.location?._id || (e2.location?.locationType ? `${e2.location.locationType}:${e2.location.formattedAddress ?? ``}` : ``);
1946
1941
  return `${e2.localStartDate ?? ``}|${e2.localEndDate ?? ``}|${t2}`;
1947
1942
  }
1948
- function Go(e2) {
1943
+ function Uo(e2) {
1949
1944
  return e2.availableResources?.[0]?.resources?.[0]?._id ?? null;
1950
1945
  }
1951
- function Ko(e2) {
1952
- return `${Wo(e2)}|${Go(e2) ?? ``}`;
1946
+ function Wo(e2) {
1947
+ return `${Ho(e2)}|${Uo(e2) ?? ``}`;
1953
1948
  }
1954
- function qo(e2) {
1949
+ function Go(e2) {
1955
1950
  let t2 = /* @__PURE__ */ new Map();
1956
1951
  for (let n2 of e2) {
1957
- let e3 = Wo(n2), r2 = t2.get(e3);
1952
+ let e3 = Ho(n2), r2 = t2.get(e3);
1958
1953
  r2 ? r2.push(n2) : t2.set(e3, [n2]);
1959
1954
  }
1960
1955
  return [...t2.values()].map((e3) => {
@@ -1963,94 +1958,94 @@ function qo(e2) {
1963
1958
  return { ...n2[0], availableResources: n2.flatMap((e4) => e4.availableResources ?? []) };
1964
1959
  });
1965
1960
  }
1966
- function Jo(e2) {
1961
+ function Ko(e2) {
1967
1962
  return e2 ? { locations: [{ _id: e2, locationType: `BUSINESS` }] } : {};
1968
1963
  }
1969
- function Yo(e2) {
1970
- return e2 ? { resourceTypes: [{ resourceTypeId: Gr, resourceIds: [e2] }] } : {};
1964
+ function qo(e2) {
1965
+ return e2 ? { resourceTypes: [{ resourceTypeId: Br, resourceIds: [e2] }] } : {};
1971
1966
  }
1972
- function Xo(e2) {
1967
+ function Jo(e2) {
1973
1968
  let { requestedGender: t2, ...n2 } = e2;
1974
1969
  return Object.keys(n2).length ? n2 : void 0;
1975
1970
  }
1976
- function Zo(e2, t2) {
1971
+ function Yo(e2, t2) {
1977
1972
  if (!e2) return {};
1978
- let n2 = t2 ? Xo(e2) : e2;
1973
+ let n2 = t2 ? Jo(e2) : e2;
1979
1974
  return n2 ? { customerChoices: n2 } : {};
1980
1975
  }
1981
- var Qo = `REQUESTED_GENDER_NOT_ALLOWED`;
1982
- function $o(e2) {
1983
- return mo(e2) === Qo;
1976
+ var Xo = `REQUESTED_GENDER_NOT_ALLOWED`;
1977
+ function Zo(e2) {
1978
+ return lo(e2) === Xo;
1984
1979
  }
1985
- var es = false;
1986
- var ts = /* @__PURE__ */ new Set();
1987
- function ns() {
1988
- return es;
1980
+ var Qo = false;
1981
+ var $o = /* @__PURE__ */ new Set();
1982
+ function es() {
1983
+ return Qo;
1989
1984
  }
1990
- function rs(e2) {
1991
- return ts.add(e2), () => ts.delete(e2);
1985
+ function ts(e2) {
1986
+ return $o.add(e2), () => $o.delete(e2);
1992
1987
  }
1993
- function is() {
1994
- es || (es = true, ts.forEach((e2) => e2()));
1988
+ function ns() {
1989
+ Qo || (Qo = true, $o.forEach((e2) => e2()));
1995
1990
  }
1996
- async function as(e2) {
1991
+ async function rs(e2) {
1997
1992
  let { customerChoices: t2, ...n2 } = e2, r2 = (e3) => {
1998
- let t3 = Xo(e3);
1999
- return ua({ ...n2, ...t3 ? { customerChoices: t3 } : {} });
1993
+ let t3 = Jo(e3);
1994
+ return aa({ ...n2, ...t3 ? { customerChoices: t3 } : {} });
2000
1995
  };
2001
- if (es && t2?.requestedGender) return r2(t2);
1996
+ if (Qo && t2?.requestedGender) return r2(t2);
2002
1997
  try {
2003
- return await ua(e2);
1998
+ return await aa(e2);
2004
1999
  } catch (e3) {
2005
- if (!t2?.requestedGender || !$o(e3)) throw e3;
2006
- return wo(e3, { feature: So.timeSlots, action: `requested-gender-rejected`, level: `warning` }), is(), r2(t2);
2000
+ if (!t2?.requestedGender || !Zo(e3)) throw e3;
2001
+ return bo(e3, { feature: vo.timeSlots, action: `requested-gender-rejected`, level: `warning` }), ns(), r2(t2);
2007
2002
  }
2008
2003
  }
2009
- function os(e2, t2, n2) {
2004
+ function is(e2, t2, n2) {
2010
2005
  return { ...e2 ? { "location.id": e2 } : {}, ...t2 ? { "resources.id": { $hasSome: [t2] } } : {}, ...n2 ? { remainingCapacity: { $gte: n2 } } : {} };
2011
2006
  }
2012
- async function ss(e2) {
2013
- let t2 = await va(e2);
2007
+ async function as(e2) {
2008
+ let t2 = await pa(e2);
2014
2009
  return { timeSlots: t2.timeSlots ?? [], timeZone: t2.timeZone ?? null, nextCursor: t2.pagingMetadata?.cursors?.next || null };
2015
2010
  }
2016
- function cs({ serviceId: e2, serviceType: t2, fromLocalDate: n2, toLocalDate: r2, timeZone: i2, locationId: a2, staffId: o2, onlyAvailableSlots: s2 = false, customerChoices: c2, minRemainingCapacity: l2, timeSlotsPerDay: u2, limit: d2, cursor: f2 }) {
2017
- return Ya(t2) ? ls({ serviceId: e2, fromLocalDate: n2, toLocalDate: r2, timeZone: i2, locationId: a2, staffId: o2, onlyAvailableSlots: s2, customerChoices: c2, timeSlotsPerDay: u2, limit: d2, cursor: f2 }) : ss({ serviceIds: [e2], fromLocalDate: n2, ...r2 ? { toLocalDate: r2 } : {}, ...i2 ? { timeZone: i2 } : {}, includeNonBookable: !s2, eventFilter: { type: t2, ...os(a2, o2, l2) }, cursorPaging: { limit: d2, ...f2 ? { cursor: f2 } : {} } });
2011
+ function os({ serviceId: e2, serviceType: t2, fromLocalDate: n2, toLocalDate: r2, timeZone: i2, locationId: a2, staffId: o2, onlyAvailableSlots: s2 = false, customerChoices: c2, minRemainingCapacity: l2, timeSlotsPerDay: u2, limit: d2, cursor: f2 }) {
2012
+ return Wa(t2) ? ss({ serviceId: e2, fromLocalDate: n2, toLocalDate: r2, timeZone: i2, locationId: a2, staffId: o2, onlyAvailableSlots: s2, customerChoices: c2, timeSlotsPerDay: u2, limit: d2, cursor: f2 }) : as({ serviceIds: [e2], fromLocalDate: n2, ...r2 ? { toLocalDate: r2 } : {}, ...i2 ? { timeZone: i2 } : {}, includeNonBookable: !s2, eventFilter: { type: t2, ...is(a2, o2, l2) }, cursorPaging: { limit: d2, ...f2 ? { cursor: f2 } : {} } });
2018
2013
  }
2019
- async function ls({ serviceId: e2, fromLocalDate: t2, toLocalDate: n2, timeZone: r2, locationId: i2, staffId: a2, onlyAvailableSlots: o2, customerChoices: s2, timeSlotsPerDay: c2, limit: l2, cursor: u2 }) {
2020
- let d2 = await as({ serviceId: e2, fromLocalDate: t2, ...n2 ? { toLocalDate: n2 } : {}, ...r2 ? { timeZone: r2 } : {}, ...o2 ? { bookable: true } : {}, ...Jo(i2), ...Yo(a2), ...Zo(s2, a2), includeResourceTypeIds: [Gr], ...c2 == null ? {} : { timeSlotsPerDay: c2 }, cursorPaging: { limit: l2, ...u2 ? { cursor: u2 } : {} } });
2014
+ async function ss({ serviceId: e2, fromLocalDate: t2, toLocalDate: n2, timeZone: r2, locationId: i2, staffId: a2, onlyAvailableSlots: o2, customerChoices: s2, timeSlotsPerDay: c2, limit: l2, cursor: u2 }) {
2015
+ let d2 = await rs({ serviceId: e2, fromLocalDate: t2, ...n2 ? { toLocalDate: n2 } : {}, ...r2 ? { timeZone: r2 } : {}, ...o2 ? { bookable: true } : {}, ...Ko(i2), ...qo(a2), ...Yo(s2, a2), includeResourceTypeIds: [Br], ...c2 == null ? {} : { timeSlotsPerDay: c2 }, cursorPaging: { limit: l2, ...u2 ? { cursor: u2 } : {} } });
2021
2016
  return { timeSlots: d2.timeSlots ?? [], timeZone: d2.timeZone ?? null, nextCursor: d2.cursorPagingMetadata?.cursors?.next || null };
2022
2017
  }
2023
- var us = 6;
2024
- var ds = 864e5;
2025
- function fs(e2) {
2026
- let t2 = e2 ? $(e2) : new Date(Date.now()), n2 = new Date(t2.getFullYear(), t2.getMonth() + us + 1, 1), r2 = new Date(n2.getTime() - ds);
2027
- return { fromLocalDate: Do(t2), toLocalDate: Oo(r2) };
2018
+ var cs = 6;
2019
+ var ls = 864e5;
2020
+ function us(e2) {
2021
+ let t2 = e2 ? So(e2) : new Date(Date.now()), n2 = new Date(t2.getFullYear(), t2.getMonth() + cs + 1, 1), r2 = new Date(n2.getTime() - ls);
2022
+ return { fromLocalDate: wo(t2), toLocalDate: To(r2) };
2028
2023
  }
2029
- async function ps({ serviceId: e2, serviceType: t2, timeZone: n2, limit: r2, onlyAvailableSlots: i2 = true, fromDate: a2, locationId: o2, staffId: s2, customerChoices: c2, minRemainingCapacity: l2 }) {
2030
- let { fromLocalDate: u2, toLocalDate: d2 } = fs(a2);
2031
- if (Xa(t2) || Za(t2)) {
2032
- let a3 = { ...Za(t2) ? { type: `COURSE` } : {}, ...os(o2, s2, l2) }, c3 = await ss({ serviceIds: [e2], fromLocalDate: u2, toLocalDate: d2, ...n2 ? { timeZone: n2 } : {}, includeNonBookable: !i2, ...Object.keys(a3).length ? { eventFilter: a3 } : {}, ...r2 == null ? {} : { cursorPaging: { limit: r2 } } });
2024
+ async function ds({ serviceId: e2, serviceType: t2, timeZone: n2, limit: r2, onlyAvailableSlots: i2 = true, fromDate: a2, locationId: o2, staffId: s2, customerChoices: c2, minRemainingCapacity: l2 }) {
2025
+ let { fromLocalDate: u2, toLocalDate: d2 } = us(a2);
2026
+ if (Ga(t2) || Ka(t2)) {
2027
+ let a3 = { ...Ka(t2) ? { type: `COURSE` } : {}, ...is(o2, s2, l2) }, c3 = await as({ serviceIds: [e2], fromLocalDate: u2, toLocalDate: d2, ...n2 ? { timeZone: n2 } : {}, includeNonBookable: !i2, ...Object.keys(a3).length ? { eventFilter: a3 } : {}, ...r2 == null ? {} : { cursorPaging: { limit: r2 } } });
2033
2028
  return { timeSlots: c3.timeSlots, timeZone: c3.timeZone };
2034
2029
  }
2035
- let f2 = await as({ serviceId: e2, fromLocalDate: u2, toLocalDate: d2, ...n2 ? { timeZone: n2 } : {}, ...i2 ? { bookable: true } : {}, ...Jo(o2), ...Yo(s2), ...Zo(c2, s2), includeResourceTypeIds: [Gr], ...r2 == null ? {} : { cursorPaging: { limit: r2 } } });
2030
+ let f2 = await rs({ serviceId: e2, fromLocalDate: u2, toLocalDate: d2, ...n2 ? { timeZone: n2 } : {}, ...i2 ? { bookable: true } : {}, ...Ko(o2), ...qo(s2), ...Yo(c2, s2), includeResourceTypeIds: [Br], ...r2 == null ? {} : { cursorPaging: { limit: r2 } } });
2036
2031
  return { timeSlots: f2.timeSlots ?? [], timeZone: f2.timeZone ?? null };
2037
2032
  }
2038
- var ms = 1e3;
2039
- async function hs({ serviceId: e2, serviceType: t2, date: n2, timeZone: r2, onlyAvailableSlots: i2, locationId: a2, staffId: o2, customerChoices: s2, minRemainingCapacity: c2, fromLocalDate: l2, toLocalDate: u2 }) {
2040
- let d2 = `${n2}T00:00:00`, f2 = `${n2}T23:59:59`, p2 = Za(t2) ? `COURSE` : Xa(t2) ? `CLASS` : `APPOINTMENT`, m2 = [], h2 = null, g2;
2033
+ var fs = 1e3;
2034
+ async function ps({ serviceId: e2, serviceType: t2, date: n2, timeZone: r2, onlyAvailableSlots: i2, locationId: a2, staffId: o2, customerChoices: s2, minRemainingCapacity: c2, fromLocalDate: l2, toLocalDate: u2 }) {
2035
+ let d2 = `${n2}T00:00:00`, f2 = `${n2}T23:59:59`, p2 = Ka(t2) ? `COURSE` : Ga(t2) ? `CLASS` : `APPOINTMENT`, m2 = [], h2 = null, g2;
2041
2036
  do {
2042
- let t3 = await cs({ serviceId: e2, serviceType: p2, fromLocalDate: l2 && l2 > d2 ? l2 : d2, toLocalDate: u2 && u2 < f2 ? u2 : f2, timeZone: r2, locationId: a2, staffId: o2, onlyAvailableSlots: i2, customerChoices: s2, minRemainingCapacity: c2, limit: ms, cursor: g2 });
2037
+ let t3 = await os({ serviceId: e2, serviceType: p2, fromLocalDate: l2 && l2 > d2 ? l2 : d2, toLocalDate: u2 && u2 < f2 ? u2 : f2, timeZone: r2, locationId: a2, staffId: o2, onlyAvailableSlots: i2, customerChoices: s2, minRemainingCapacity: c2, limit: fs, cursor: g2 });
2043
2038
  m2.push(...t3.timeSlots), h2 = t3.timeZone ?? h2, g2 = t3.nextCursor ?? void 0;
2044
2039
  } while (g2);
2045
2040
  return { timeSlots: m2, timeZone: h2 };
2046
2041
  }
2047
- function gs(e2) {
2042
+ function ms(e2) {
2048
2043
  return { slotStart: e2.localStartDate, slotEnd: e2.localEndDate, eventId: e2.eventInfo?.eventId, scheduleId: e2.scheduleId ?? void 0, locationId: e2.location?._id ?? void 0, locationType: e2.location?.locationType ?? void 0 };
2049
2044
  }
2050
- function _s(e2) {
2051
- return e2?.options?.values?.[0]?.type === Da.STAFF_MEMBER;
2045
+ function hs(e2) {
2046
+ return e2?.options?.values?.[0]?.type === Sa.STAFF_MEMBER;
2052
2047
  }
2053
- function vs(e2) {
2048
+ function gs(e2) {
2054
2049
  let t2 = e2;
2055
2050
  if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e3) => {
2056
2051
  t2.__state = { status: `fulfilled`, value: e3 };
@@ -2059,36 +2054,33 @@ function vs(e2) {
2059
2054
  })), t2.__state.status === `fulfilled`) return t2.__state.value;
2060
2055
  throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
2061
2056
  }
2062
- function ys(e2) {
2057
+ function _s(e2) {
2063
2058
  let t2 = Promise.resolve(e2);
2064
2059
  return t2.__state = { status: `fulfilled`, value: e2 }, t2;
2065
2060
  }
2066
- function bs(e2) {
2067
- return e2;
2068
- }
2069
- var xs = bs(`@wix/site-service-warmup-data`);
2070
- function Ss() {
2061
+ var vs = jr(`@wix/site-service-warmup-data`);
2062
+ function ys() {
2071
2063
  try {
2072
2064
  return (0, import_services_manager_react.useGetService)();
2073
2065
  } catch {
2074
2066
  return null;
2075
2067
  }
2076
2068
  }
2077
- function Cs(e2) {
2069
+ function bs(e2) {
2078
2070
  try {
2079
- return e2 ? e2(xs) : null;
2071
+ return e2 ? e2(vs) : null;
2080
2072
  } catch {
2081
2073
  return null;
2082
2074
  }
2083
2075
  }
2084
- function ws() {
2085
- let e2 = Cs(Ss()), t2 = typeof window > `u`;
2076
+ function xs() {
2077
+ let e2 = bs(ys()), t2 = typeof window > `u`;
2086
2078
  return { scope: e2 ?? void 0, get: async (n2) => {
2087
2079
  if (t2 || !e2) return null;
2088
2080
  try {
2089
2081
  return await e2.get(n2);
2090
2082
  } catch (e3) {
2091
- return wo(e3, { feature: So.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2083
+ return bo(e3, { feature: vo.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
2092
2084
  }
2093
2085
  }, set: (n2, r2) => {
2094
2086
  if (t2 && e2) try {
@@ -2097,57 +2089,57 @@ function ws() {
2097
2089
  }
2098
2090
  } };
2099
2091
  }
2100
- var Ts = `bookings-uou`;
2101
- function Es() {
2102
- return `${Ts}:bookings-settings`;
2092
+ var Ss = `bookings-uou`;
2093
+ function Cs() {
2094
+ return `${Ss}:bookings-settings`;
2103
2095
  }
2104
- function Ds() {
2105
- return `${Ts}:time-slots-configuration`;
2096
+ function ws() {
2097
+ return `${Ss}:time-slots-configuration`;
2106
2098
  }
2107
- var Os = 5e3;
2108
- var ks = 100;
2109
- var As = `wix-warmup-data`;
2110
- var js = null;
2111
- function Ms(e2) {
2099
+ var Ts = 5e3;
2100
+ var Es = 100;
2101
+ var Ds = `wix-warmup-data`;
2102
+ var Os = null;
2103
+ function ks(e2) {
2112
2104
  if (typeof document < `u`) try {
2113
- let t2 = document.getElementById(As)?.textContent;
2114
- return t2 ? (js?.text !== t2 && (js = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), js.data[e2] ?? void 0) : void 0;
2105
+ let t2 = document.getElementById(Ds)?.textContent;
2106
+ return t2 ? (Os?.text !== t2 && (Os = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Os.data[e2] ?? void 0) : void 0;
2115
2107
  } catch {
2116
2108
  return;
2117
2109
  }
2118
2110
  }
2119
- var Ns = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2120
- var Ps = Ns();
2121
- var Fs = /* @__PURE__ */ new WeakMap();
2122
- var Is = /* @__PURE__ */ new WeakMap();
2123
- function Ls(e2) {
2124
- if (!e2) return Ps;
2125
- let t2 = Fs.get(e2);
2126
- return t2 || (t2 = Ns(), Fs.set(e2, t2)), t2;
2111
+ var As = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
2112
+ var js = As();
2113
+ var Ms = /* @__PURE__ */ new WeakMap();
2114
+ var Ns = /* @__PURE__ */ new WeakMap();
2115
+ function Ps(e2) {
2116
+ if (!e2) return js;
2117
+ let t2 = Ms.get(e2);
2118
+ return t2 || (t2 = As(), Ms.set(e2, t2)), t2;
2127
2119
  }
2128
- function Rs({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2120
+ function Fs({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2129
2121
  if (e2 === null) return n2();
2130
2122
  if (typeof window > `u`) {
2131
2123
  let r3 = () => n2().then((n3) => (t2.set(e2, n3), n3)), { scope: i3 } = t2;
2132
2124
  if (!i3) return r3();
2133
- let a3 = Is.get(i3);
2134
- a3 || (a3 = /* @__PURE__ */ new Map(), Is.set(i3, a3));
2125
+ let a3 = Ns.get(i3);
2126
+ a3 || (a3 = /* @__PURE__ */ new Map(), Ns.set(i3, a3));
2135
2127
  let o3 = a3.get(e2);
2136
2128
  if (o3) return o3;
2137
2129
  let s3 = r3();
2138
2130
  return a3.set(e2, s3), s3.catch(() => a3.delete(e2)), s3;
2139
2131
  }
2140
- let i2 = Ls(t2.scope), a2 = Date.now();
2132
+ let i2 = Ps(t2.scope), a2 = Date.now();
2141
2133
  for (let [e3, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e3);
2142
2134
  let o2 = i2.promises.get(e2);
2143
2135
  if (o2 && !r2) return o2.promise;
2144
2136
  r2 && i2.invalidatedWarmup.add(e2);
2145
2137
  let s2 = !i2.invalidatedWarmup.has(e2);
2146
2138
  if (s2) {
2147
- let t3 = Ms(e2);
2139
+ let t3 = ks(e2);
2148
2140
  if (t3 !== void 0) {
2149
- let n3 = ys(t3);
2150
- return i2.promises.set(e2, { promise: n3, expiresAt: a2 + Os }), n3;
2141
+ let n3 = _s(t3);
2142
+ return i2.promises.set(e2, { promise: n3, expiresAt: a2 + Ts }), n3;
2151
2143
  }
2152
2144
  }
2153
2145
  let c2 = (async () => {
@@ -2157,69 +2149,69 @@ function Rs({ key: e2, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
2157
2149
  }
2158
2150
  return n2();
2159
2151
  })();
2160
- i2.promises.size >= ks && i2.promises.delete(i2.promises.keys().next().value);
2152
+ i2.promises.size >= Es && i2.promises.delete(i2.promises.keys().next().value);
2161
2153
  let l2 = { promise: c2, expiresAt: 1 / 0 };
2162
2154
  return i2.promises.set(e2, l2), c2.then(() => {
2163
- l2.expiresAt = Date.now() + Os;
2155
+ l2.expiresAt = Date.now() + Ts;
2164
2156
  }, () => {
2165
2157
  i2.promises.get(e2) === l2 && i2.promises.delete(e2);
2166
2158
  }), c2;
2167
2159
  }
2168
- var zs = { displayTimeZonePolicy: { basedOn: Ha.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
2169
- async function Bs() {
2160
+ var Is = { displayTimeZonePolicy: { basedOn: La.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
2161
+ async function Ls() {
2170
2162
  try {
2171
- let e2 = await Ga();
2172
- return { displayTimeZonePolicy: { basedOn: e2.displayTimeZone?.basedOn ?? Ha.BUSINESS_TIME_ZONE, customerCanChange: e2.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e2.multiServiceAppointments?.enabled ?? false };
2163
+ let e2 = await Ba();
2164
+ return { displayTimeZonePolicy: { basedOn: e2.displayTimeZone?.basedOn ?? La.BUSINESS_TIME_ZONE, customerCanChange: e2.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e2.multiServiceAppointments?.enabled ?? false };
2173
2165
  } catch (e2) {
2174
- return wo(e2, { feature: So.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), zs;
2166
+ return bo(e2, { feature: vo.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), Is;
2175
2167
  }
2176
2168
  }
2177
- var Vs = { isLoading: true };
2178
- var Hs = (0, import_react.createContext)(null);
2179
- var Us = `useBookingsSettingsContext must be used within BookingsSettingsProvider`;
2180
- function Ws() {
2181
- let e2 = (0, import_react.useContext)(Hs);
2182
- if (!e2) throw Error(Us);
2169
+ var Rs = { isLoading: true };
2170
+ var zs = (0, import_react.createContext)(null);
2171
+ var Bs = `useBookingsSettingsContext must be used within BookingsSettingsProvider`;
2172
+ function Vs() {
2173
+ let e2 = (0, import_react.useContext)(zs);
2174
+ if (!e2) throw Error(Bs);
2183
2175
  return e2;
2184
2176
  }
2185
- function Gs(e2) {
2186
- return e2.basedOn === Ha.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
2177
+ function Hs(e2) {
2178
+ return e2.basedOn === La.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
2187
2179
  }
2188
- function Ks() {
2189
- let e2 = Ws();
2190
- return e2.isLoading ? void 0 : Gs(e2.displayTimeZonePolicy);
2180
+ function Us() {
2181
+ let e2 = Vs();
2182
+ return e2.isLoading ? void 0 : Hs(e2.displayTimeZonePolicy);
2191
2183
  }
2192
- function qs({ settingsPromise: e2, children: t2 }) {
2193
- let n2 = vs(e2), r2 = (0, import_react.useMemo)(() => ({ isLoading: false, ...n2 }), [n2]);
2194
- return (0, import_jsx_runtime.jsx)(Hs.Provider, { value: r2, children: t2 });
2184
+ function Ws({ settingsPromise: e2, children: t2 }) {
2185
+ let n2 = gs(e2), r2 = (0, import_react.useMemo)(() => ({ isLoading: false, ...n2 }), [n2]);
2186
+ return (0, import_jsx_runtime.jsx)(zs.Provider, { value: r2, children: t2 });
2195
2187
  }
2196
- function Js({ bookingsSettings: e2, children: n2 }) {
2197
- let r2 = ws(), [i2] = (0, import_react.useState)(() => e2 ? null : Rs({ key: Es(), warmupData: r2, fetchData: Bs }));
2198
- return e2 ? (0, import_jsx_runtime.jsx)(Hs.Provider, { value: { isLoading: false, ...e2 }, children: n2 }) : (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Hs.Provider, { value: Vs, children: n2 }), children: (0, import_jsx_runtime.jsx)(qs, { settingsPromise: i2, children: n2 }) });
2188
+ function Gs({ bookingsSettings: e2, children: n2 }) {
2189
+ let r2 = xs(), [i2] = (0, import_react.useState)(() => e2 ? null : Fs({ key: Cs(), warmupData: r2, fetchData: Ls }));
2190
+ return e2 ? (0, import_jsx_runtime.jsx)(zs.Provider, { value: { isLoading: false, ...e2 }, children: n2 }) : (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(zs.Provider, { value: Rs, children: n2 }), children: (0, import_jsx_runtime.jsx)(Ws, { settingsPromise: i2, children: n2 }) });
2199
2191
  }
2200
- var Ys = 1e3;
2201
- var Xs = class extends import_react.Component {
2192
+ var Ks = 1e3;
2193
+ var qs = class extends import_react.Component {
2202
2194
  state = { hasError: false };
2203
2195
  static getDerivedStateFromError() {
2204
2196
  return { hasError: true };
2205
2197
  }
2206
2198
  componentDidCatch(e2, t2) {
2207
- wo(e2, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2199
+ bo(e2, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
2208
2200
  }
2209
2201
  render() {
2210
2202
  return this.state.hasError ? this.props.fallback : this.props.children;
2211
2203
  }
2212
2204
  };
2213
- var Zs = `appSectionParams`;
2214
- function Qs(e2) {
2215
- let t2 = e2.searchParams.get(Zs);
2205
+ var Js = `appSectionParams`;
2206
+ function Ys(e2) {
2207
+ let t2 = e2.searchParams.get(Js);
2216
2208
  if (t2 === null) return e2;
2217
2209
  let n2 = new URL(e2);
2218
- n2.searchParams.delete(Zs);
2219
- for (let [e3, r2] of Object.entries($s(t2))) typeof r2 == `string` && !n2.searchParams.has(e3) && n2.searchParams.set(e3, r2);
2210
+ n2.searchParams.delete(Js);
2211
+ for (let [e3, r2] of Object.entries(Xs(t2))) typeof r2 == `string` && !n2.searchParams.has(e3) && n2.searchParams.set(e3, r2);
2220
2212
  return n2;
2221
2213
  }
2222
- function $s(e2) {
2214
+ function Xs(e2) {
2223
2215
  try {
2224
2216
  let t2 = JSON.parse(e2);
2225
2217
  return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
@@ -2227,16 +2219,16 @@ function $s(e2) {
2227
2219
  return {};
2228
2220
  }
2229
2221
  }
2230
- var ec = `bookings-uou:url-change`;
2231
- var tc = (e2) => {
2222
+ var Zs = `bookings-uou:url-change`;
2223
+ var Qs = (e2) => {
2232
2224
  let t2 = new URL(e2);
2233
2225
  return t2.searchParams.sort(), t2.href;
2234
2226
  };
2235
- function nc(e2, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2227
+ function $s(e2, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2236
2228
  let r2 = globalThis.window;
2237
2229
  if (!r2?.history) return;
2238
2230
  let i2 = new URL(r2.location.href);
2239
- if (tc(i2) === tc(e2)) return;
2231
+ if (Qs(i2) === Qs(e2)) return;
2240
2232
  let a2 = { scrollY: r2.scrollY };
2241
2233
  if (n2) r2.history.replaceState(a2, ``, e2.href);
2242
2234
  else {
@@ -2247,87 +2239,87 @@ function nc(e2, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
2247
2239
  return;
2248
2240
  }
2249
2241
  }
2250
- r2.dispatchEvent(new Event(ec));
2242
+ r2.dispatchEvent(new Event(Zs));
2251
2243
  }
2252
- function rc(e2) {
2244
+ function ec(e2) {
2253
2245
  let t2 = globalThis.window;
2254
- return t2 ? (t2.addEventListener(ec, e2), t2.addEventListener(`popstate`, e2), () => {
2255
- t2.removeEventListener(ec, e2), t2.removeEventListener(`popstate`, e2);
2246
+ return t2 ? (t2.addEventListener(Zs, e2), t2.addEventListener(`popstate`, e2), () => {
2247
+ t2.removeEventListener(Zs, e2), t2.removeEventListener(`popstate`, e2);
2256
2248
  }) : () => {
2257
2249
  };
2258
2250
  }
2259
- var ic = (e2) => {
2251
+ var tc = (e2) => {
2260
2252
  try {
2261
2253
  return decodeURIComponent(e2);
2262
2254
  } catch {
2263
2255
  return e2;
2264
2256
  }
2265
2257
  };
2266
- function ac(e2, t2) {
2258
+ function nc(e2, t2) {
2267
2259
  let n2 = t2 ? new URL(t2).pathname : `/`;
2268
- return `./${ic(new URL(e2).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2260
+ return `./${tc(new URL(e2).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
2269
2261
  }
2270
- function oc() {
2271
- let e2 = (0, import_services_manager_react.useService)(zr), t2 = (0, import_react.useCallback)(() => e2.currentUrl, [e2]), n2 = (0, import_react.useSyncExternalStore)(rc, t2, t2), i2 = (0, import_react.useMemo)(() => Qs(new URL(n2)), [n2]), a2 = e2.siteUrl.replace(/\/$/, ``);
2272
- return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Qs(new URL(e2.currentUrl)), getRelativeUrl: () => ac(e2.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: nc };
2262
+ function rc() {
2263
+ let e2 = (0, import_services_manager_react.useService)(Fr), t2 = (0, import_react.useCallback)(() => e2.currentUrl, [e2]), n2 = (0, import_react.useSyncExternalStore)(ec, t2, t2), i2 = (0, import_react.useMemo)(() => Ys(new URL(n2)), [n2]), a2 = e2.siteUrl.replace(/\/$/, ``);
2264
+ return { pathname: i2.pathname, search: i2.search, searchParams: i2.searchParams, href: i2.href, getParsedUrl: () => Ys(new URL(e2.currentUrl)), getRelativeUrl: () => nc(e2.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: $s };
2273
2265
  }
2274
- var sc = Fr(`@wix/viewer-service-business-logger`);
2275
- function cc(e2) {
2266
+ var ic = jr(`@wix/site-service-business-logger`);
2267
+ function ac(e2) {
2276
2268
  return { evid: 32, src: 16, endpoint: ``, params: e2 };
2277
2269
  }
2278
- function lc(e2) {
2270
+ function oc(e2) {
2279
2271
  return { evid: 33, src: 16, endpoint: ``, params: e2 };
2280
2272
  }
2281
- function uc(e2) {
2273
+ function sc(e2) {
2282
2274
  return { evid: 34, src: 16, endpoint: ``, params: e2 };
2283
2275
  }
2284
- var dc = { SERVICES: `services_context`, SERVICE: `service_context`, TIME_SLOTS: `time_slots_context`, BOOKING_CHECKOUT: `booking_checkout_context`, CATEGORIES: `categories_context`, LOCATIONS: `locations_context`, SERVICE_ADD_ONS: `service_addons_context`, PREFERENCES: `preferences_context` };
2285
- Kr.BOOK_ONLINE;
2286
- var fc = `new_bookings_server`;
2287
- var pc = { TIMEZONE_PICKER: `timezone_picker`, TIME_PICKER: `time_picker`, BOOKING_DETAILS: `booking_details`, RESCHEDULE_DIALOG: `reschedule_dialog` };
2288
- var mc = { DROPDOWN: `dropdown`, TIME_SLOT: `time_slot`, EXPAND: `expand`, COLLAPSE: `collapse` };
2289
- var hc = (e2) => {
2290
- let t2 = (0, import_services_manager_react.useService)(sc);
2276
+ var cc = { SERVICES: `services_context`, SERVICE: `service_context`, TIME_SLOTS: `time_slots_context`, BOOKING_CHECKOUT: `booking_checkout_context`, CATEGORIES: `categories_context`, LOCATIONS: `locations_context`, SERVICE_ADD_ONS: `service_addons_context`, PREFERENCES: `preferences_context` };
2277
+ Vr.BOOK_ONLINE;
2278
+ var lc = `new_bookings_server`;
2279
+ var uc = { TIMEZONE_PICKER: `timezone_picker`, TIME_PICKER: `time_picker`, BOOKING_DETAILS: `booking_details`, RESCHEDULE_DIALOG: `reschedule_dialog` };
2280
+ var dc = { DROPDOWN: `dropdown`, TIME_SLOT: `time_slot`, EXPAND: `expand`, COLLAPSE: `collapse` };
2281
+ var fc = (e2) => {
2282
+ let { reportBi: t2 } = (0, import_services_manager_react.useService)(ic);
2291
2283
  return (0, import_react.useCallback)((n2) => {
2292
- t2.reportBi({ widget_name: e2, bookingsPlatform: fc, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2284
+ t2({ widget_name: e2, bookingsPlatform: lc, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
2293
2285
  }, [t2, e2]);
2294
2286
  };
2295
- var gc = (e2, t2 = true) => {
2296
- let n2 = hc(e2), { getParsedUrl: r2 } = oc(), i2 = (0, import_react.useRef)(false);
2287
+ var pc = (e2, t2 = true) => {
2288
+ let n2 = fc(e2), { getParsedUrl: r2 } = rc(), i2 = (0, import_react.useRef)(false);
2297
2289
  (0, import_react.useEffect)(() => {
2298
- t2 && !i2.current && (i2.current = true, n2(cc({ referralInfo: r2().searchParams.get(Qa.referral) ?? void 0 })));
2290
+ t2 && !i2.current && (i2.current = true, n2(ac({ referralInfo: r2().searchParams.get(qa.referral) ?? void 0 })));
2299
2291
  }, [t2, n2, r2]);
2300
2292
  };
2301
- function _c(e2) {
2293
+ function mc(e2) {
2302
2294
  return { evid: 596, src: 16, endpoint: `wixboost-ugc`, params: e2 };
2303
2295
  }
2304
- function vc(e2, t2) {
2296
+ function hc(e2, t2) {
2305
2297
  let n2 = new Intl.DateTimeFormat(`en-US`, { timeZone: t2, hourCycle: `h23`, year: `numeric`, month: `2-digit`, day: `2-digit`, hour: `2-digit`, minute: `2-digit`, second: `2-digit` }).formatToParts(new Date(e2)), r2 = {};
2306
2298
  for (let e3 of n2) e3.type !== `literal` && (r2[e3.type] = Number(e3.value));
2307
2299
  return Date.UTC(r2.year, r2.month - 1, r2.day, r2.hour, r2.minute, r2.second) - e2;
2308
2300
  }
2309
- function yc(e2, t2) {
2301
+ function gc(e2, t2) {
2310
2302
  let n2 = e2.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?/);
2311
2303
  if (!n2) return null;
2312
2304
  let [, r2, i2, a2, o2, s2, c2] = n2, l2 = Date.UTC(Number(r2), Number(i2) - 1, Number(a2), Number(o2), Number(s2), c2 ? Number(c2) : 0);
2313
2305
  if (Number.isNaN(l2)) return null;
2314
2306
  try {
2315
- let e3 = l2 - vc(l2, t2);
2316
- return new Date(l2 - vc(e3, t2));
2307
+ let e3 = l2 - hc(l2, t2);
2308
+ return new Date(l2 - hc(e3, t2));
2317
2309
  } catch {
2318
2310
  return null;
2319
2311
  }
2320
2312
  }
2321
- function bc({ start: e2, end: t2, timeZone: n2, ...r2 }) {
2322
- let i2 = (e3) => e3 && n2 ? yc(e3, n2)?.getTime() : void 0;
2323
- return uc({ bookingsServiceId: r2.serviceId, serviceType: r2.serviceType, startTime: i2(e2), endTime: i2(t2), isEligibleForFlowCompletion: r2.isEligibleForFlowCompletion });
2313
+ function _c({ start: e2, end: t2, timeZone: n2, ...r2 }) {
2314
+ let i2 = (e3) => e3 && n2 ? gc(e3, n2)?.getTime() : void 0;
2315
+ return sc({ bookingsServiceId: r2.serviceId, serviceType: r2.serviceType, startTime: i2(e2), endTime: i2(t2), isEligibleForFlowCompletion: r2.isEligibleForFlowCompletion });
2324
2316
  }
2325
- function xc({ nextAvailableSlotsCount: e2, isLoading: t2, hasError: n2, children: r2 }) {
2317
+ function vc({ nextAvailableSlotsCount: e2, isLoading: t2, hasError: n2, children: r2 }) {
2326
2318
  let i2 = n2 ? `loadFailed` : null, a2 = { selectedDate: null, daysAvailabilityRange: null, daysAvailability: [], daysAvailabilityLoading: false, daysAvailabilityHasError: false, timeSlotsLoading: t2, timeSlotsErrorCode: i2, selectDate: async () => {
2327
2319
  }, setDaysAvailabilityRange: async () => {
2328
2320
  }, nextDaysAvailabilityRange: async () => {
2329
2321
  }, previousDaysAvailabilityRange: async () => {
2330
- }, goToNextAvailableDate: async () => `cancelled`, canChangeTimeZone: false, isMultiService: false, hasValidSchedulingInput: false, availabilityRequestKey: null, needsServiceChoice: false, isRescheduling: (0, import_service_context.useServiceContext)(true)?.reschedule != null, rescheduleValidUntil: null, staffFilterOptions: [], locationFilterOptions: [], selectedStaffFilter: null, requestedGender: null, genderSelectionAllowed: false, selectedLocationFilter: null, setStaffFilter: () => {
2322
+ }, goToNextAvailableDate: async () => `cancelled`, canChangeTimeZone: false, isMultiService: false, hasValidSchedulingInput: false, availabilityRequestKey: null, needsServiceChoice: false, isRescheduling: (0, import_service.useServiceContext)(true)?.reschedule != null, rescheduleValidUntil: null, staffFilterOptions: [], locationFilterOptions: [], selectedStaffFilter: null, requestedGender: null, genderSelectionAllowed: false, selectedLocationFilter: null, setStaffFilter: () => {
2331
2323
  }, setLocationFilter: () => {
2332
2324
  }, isComplete: false, isSelectionValidated: false, timeSlots: [], isLoading: t2, hasError: n2, errorCode: i2, businessTimeZone: null, setTimeZone: () => {
2333
2325
  }, currentTimeSlotsPage: 1, hasNextTimeSlotsPage: false, hasPreviousTimeSlotsPage: false, nextTimeSlotsPage: async () => {
@@ -2338,119 +2330,119 @@ function xc({ nextAvailableSlotsCount: e2, isLoading: t2, hasError: n2, children
2338
2330
  }, navigateToBookingForm: () => {
2339
2331
  }, timeSlotLimitPerDay: null, expandedDates: /* @__PURE__ */ new Set(), daysWithMore: /* @__PURE__ */ new Set(), loadingDate: null, loadAllTimeSlotsForDay: async () => {
2340
2332
  } };
2341
- return (0, import_jsx_runtime.jsx)(xl.Provider, { value: a2, children: r2 });
2333
+ return (0, import_jsx_runtime.jsx)(vl.Provider, { value: a2, children: r2 });
2342
2334
  }
2343
- function Sc({ nextAvailableSlotsCount: e2, children: t2 }) {
2344
- return (0, import_jsx_runtime.jsx)(xc, { nextAvailableSlotsCount: e2, isLoading: true, hasError: false, children: t2 });
2335
+ function yc({ nextAvailableSlotsCount: e2, children: t2 }) {
2336
+ return (0, import_jsx_runtime.jsx)(vc, { nextAvailableSlotsCount: e2, isLoading: true, hasError: false, children: t2 });
2345
2337
  }
2346
- function Cc({ nextAvailableSlotsCount: e2, children: t2 }) {
2347
- return (0, import_jsx_runtime.jsx)(xc, { nextAvailableSlotsCount: e2, isLoading: false, hasError: true, children: t2 });
2338
+ function bc({ nextAvailableSlotsCount: e2, children: t2 }) {
2339
+ return (0, import_jsx_runtime.jsx)(vc, { nextAvailableSlotsCount: e2, isLoading: false, hasError: true, children: t2 });
2348
2340
  }
2349
- var wc = 1e3;
2350
- function Tc(e2, t2) {
2341
+ var xc = 1e3;
2342
+ function Sc(e2, t2) {
2351
2343
  let n2 = /* @__PURE__ */ new Map();
2352
2344
  for (let e3 of t2) {
2353
2345
  let t3 = e3.localStartDate?.slice(0, 10);
2354
2346
  t3 && (e3.bookable ? n2.set(t3, `available`) : n2.has(t3) || n2.set(t3, `unavailable`));
2355
2347
  }
2356
- let r2 = [], i2 = Fo(e2);
2348
+ let r2 = [], i2 = No(e2);
2357
2349
  for (let t3 = 0; t3 < i2; t3 += 1) {
2358
- let i3 = Po(e2.startDate, t3);
2350
+ let i3 = Mo(e2.startDate, t3);
2359
2351
  r2.push({ date: i3, availability: n2.get(i3) ?? `none` });
2360
2352
  }
2361
2353
  return r2;
2362
2354
  }
2363
- function Ec(e2) {
2364
- return { fromLocalDate: Do($(e2.startDate)), toLocalDate: Oo($(e2.endDate)) };
2355
+ function Cc(e2, t2) {
2356
+ return { fromLocalDate: Do(e2.startDate, t2), toLocalDate: To(So(e2.endDate)) };
2365
2357
  }
2366
- async function Dc(e2, t2, n2, r2, i2, a2) {
2367
- return (await as({ serviceId: e2, ...Ec(n2), timeZone: t2, ...Jo(r2), ...Yo(i2), ...Zo(a2, i2), timeSlotsPerDay: 1, cursorPaging: { limit: Math.min(Fo(n2), wc) } })).timeSlots ?? [];
2358
+ async function wc(e2, t2, n2, r2, i2, a2) {
2359
+ return (await rs({ serviceId: e2, ...Cc(n2, t2), timeZone: t2, ...Ko(r2), ...qo(i2), ...Yo(a2, i2), timeSlotsPerDay: 1, cursorPaging: { limit: Math.min(No(n2), xc) } })).timeSlots ?? [];
2368
2360
  }
2369
- async function Oc(e2, t2, n2, r2, i2, a2) {
2370
- return (await ss({ serviceIds: [e2], ...Ec(n2), timeZone: t2, includeNonBookable: true, eventFilter: { type: `CLASS`, ...os(r2, i2, a2) }, maxSlotsPerDay: 1, cursorPaging: { limit: Math.min(Fo(n2), wc) } })).timeSlots;
2361
+ async function Tc(e2, t2, n2, r2, i2, a2) {
2362
+ return (await as({ serviceIds: [e2], ...Cc(n2, t2), timeZone: t2, includeNonBookable: true, eventFilter: { type: `CLASS`, ...is(r2, i2, a2) }, maxSlotsPerDay: 1, cursorPaging: { limit: Math.min(No(n2), xc) } })).timeSlots;
2371
2363
  }
2372
- async function kc({ serviceId: e2, serviceType: t2, range: n2, fromDate: r2, timeZone: i2, locationId: a2, staffId: o2, customerChoices: s2, minRemainingCapacity: c2 }) {
2373
- if (Za(t2) || n2.endDate < r2) return Tc(n2, []);
2374
- let l2 = { startDate: n2.startDate < r2 ? r2 : n2.startDate, endDate: n2.endDate }, u2 = Xa(t2) ? Vo(l2) : [l2];
2375
- return Tc(n2, (await Promise.all(u2.map((n3) => Xa(t2) ? Oc(e2, i2, n3, a2, o2, c2) : Dc(e2, i2, n3, a2, o2, s2)))).flat());
2364
+ async function Ec({ serviceId: e2, serviceType: t2, range: n2, fromDate: r2, timeZone: i2, locationId: a2, staffId: o2, customerChoices: s2, minRemainingCapacity: c2 }) {
2365
+ if (Ka(t2) || n2.endDate < r2) return Sc(n2, []);
2366
+ let l2 = { startDate: n2.startDate < r2 ? r2 : n2.startDate, endDate: n2.endDate }, u2 = Ga(t2) ? zo(l2) : [l2];
2367
+ return Sc(n2, (await Promise.all(u2.map((n3) => Ga(t2) ? Tc(e2, i2, n3, a2, o2, c2) : wc(e2, i2, n3, a2, o2, s2)))).flat());
2376
2368
  }
2377
- function Ac({ serviceId: e2, staff: t2, customerChoices: n2 }) {
2369
+ function Dc({ serviceId: e2, staff: t2, customerChoices: n2 }) {
2378
2370
  let r2 = t2 && !t2.anyResource ? t2.staffMemberId : void 0;
2379
- return { serviceId: e2, ...Zo(n2, r2), ...t2?.anyResource ? {} : { includeResourceTypeIds: [Gr] }, ...r2 ? { resourceTypes: [{ resourceTypeId: Gr, resourceIds: [r2] }] } : {} };
2371
+ return { serviceId: e2, ...Yo(n2, r2), ...t2?.anyResource ? {} : { includeResourceTypeIds: [Br] }, ...r2 ? { resourceTypes: [{ resourceTypeId: Br, resourceIds: [r2] }] } : {} };
2380
2372
  }
2381
- function jc({ services: e2, locationId: t2, locationType: n2, timeZone: r2 }) {
2382
- return { services: e2.map(Ac), timeZone: r2, location: { ...t2 ? { _id: t2 } : {}, locationType: n2 } };
2373
+ function Oc({ services: e2, locationId: t2, locationType: n2, timeZone: r2 }) {
2374
+ return { services: e2.map(Dc), timeZone: r2, location: { ...t2 ? { _id: t2 } : {}, locationType: n2 } };
2383
2375
  }
2384
- function Mc(e2) {
2385
- let { customerChoices: t2, ...n2 } = e2, r2 = t2 ? Xo(t2) : void 0;
2376
+ function kc(e2) {
2377
+ let { customerChoices: t2, ...n2 } = e2, r2 = t2 ? Jo(t2) : void 0;
2386
2378
  return r2 ? { ...n2, customerChoices: r2 } : n2;
2387
2379
  }
2388
- async function Nc(e2) {
2389
- let t2 = e2.services ?? [], n2 = () => Ea({ ...e2, services: t2.map(Mc) }), r2 = t2.some((e3) => e3.customerChoices?.requestedGender);
2390
- if (r2 && ns()) return n2();
2380
+ async function Ac(e2) {
2381
+ let t2 = e2.services ?? [], n2 = () => xa({ ...e2, services: t2.map(kc) }), r2 = t2.some((e3) => e3.customerChoices?.requestedGender);
2382
+ if (r2 && es()) return n2();
2391
2383
  try {
2392
- return await Ea(e2);
2384
+ return await xa(e2);
2393
2385
  } catch (e3) {
2394
- if (!r2 || !$o(e3)) throw e3;
2395
- return wo(e3, { feature: So.timeSlots, action: `requested-gender-rejected`, level: `warning` }), is(), n2();
2386
+ if (!r2 || !Zo(e3)) throw e3;
2387
+ return bo(e3, { feature: vo.timeSlots, action: `requested-gender-rejected`, level: `warning` }), ns(), n2();
2396
2388
  }
2397
2389
  }
2398
- var Pc = 1e3;
2399
- async function Fc({ range: e2, fromDate: t2, ...n2 }) {
2400
- if (e2.endDate < t2) return Tc(e2, []);
2390
+ var jc = 1e3;
2391
+ async function Mc({ range: e2, fromDate: t2, ...n2 }) {
2392
+ if (e2.endDate < t2) return Sc(e2, []);
2401
2393
  let r2 = { startDate: e2.startDate < t2 ? t2 : e2.startDate, endDate: e2.endDate };
2402
- return Tc(e2, (await Nc({ ...jc(n2), fromLocalDate: Do($(r2.startDate)), toLocalDate: Oo($(r2.endDate)), timeSlotsPerDay: 1, cursorPaging: { limit: Math.min(Fo(r2), Pc) } })).timeSlots ?? []);
2394
+ return Sc(e2, (await Ac({ ...Oc(n2), fromLocalDate: Do(r2.startDate, n2.timeZone), toLocalDate: To(So(r2.endDate)), timeSlotsPerDay: 1, cursorPaging: { limit: Math.min(No(r2), jc) } })).timeSlots ?? []);
2403
2395
  }
2404
- async function Ic({ date: e2, onlyAvailableSlots: t2, fromLocalDate: n2, ...r2 }) {
2396
+ async function Nc({ date: e2, onlyAvailableSlots: t2, fromLocalDate: n2, ...r2 }) {
2405
2397
  let i2 = `${e2}T00:00:00`, a2 = [], o2 = null, s2;
2406
2398
  do {
2407
- let c2 = await Nc({ ...jc(r2), fromLocalDate: n2 && n2 > i2 ? n2 : i2, toLocalDate: `${e2}T23:59:59`, ...t2 ? { bookable: true } : {}, cursorPaging: { limit: Pc, ...s2 ? { cursor: s2 } : {} } });
2399
+ let c2 = await Ac({ ...Oc(r2), fromLocalDate: n2 && n2 > i2 ? n2 : i2, toLocalDate: `${e2}T23:59:59`, ...t2 ? { bookable: true } : {}, cursorPaging: { limit: jc, ...s2 ? { cursor: s2 } : {} } });
2408
2400
  a2.push(...c2.timeSlots ?? []), o2 = c2.timeZone ?? o2, s2 = c2.cursorPagingMetadata?.cursors?.next || void 0;
2409
2401
  } while (s2);
2410
2402
  return { timeSlots: a2, timeZone: o2 };
2411
2403
  }
2412
- async function Lc({ fromDate: e2, ...t2 }) {
2413
- let n2 = await Nc({ ...jc(t2), ...fs(e2), bookable: true, cursorPaging: { limit: 1 } });
2404
+ async function Pc({ fromDate: e2, ...t2 }) {
2405
+ let n2 = await Ac({ ...Oc(t2), ...us(e2), bookable: true, cursorPaging: { limit: 1 } });
2414
2406
  return { timeSlots: n2.timeSlots ?? [], timeZone: n2.timeZone ?? null };
2415
2407
  }
2416
- var Rc = [];
2417
- function zc({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest: i2, timeZone: l2, today: u2, locationId: d2, staffId: f2, loadInitially: p2, customerChoices: m2, minRemainingCapacity: h2, onlyAvailableSlots: g2 }) {
2418
- let [_2, v2] = (0, import_react.useState)(null), [y2, b2] = (0, import_react.useState)(p2), [x2, S2] = (0, import_react.useState)(Rc), [C2, w2] = (0, import_react.useState)(false), [T2, ee2] = (0, import_react.useState)(false), E2 = (0, import_react.useRef)(0);
2408
+ var Fc = [];
2409
+ function Ic({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest: i2, timeZone: l2, today: u2, locationId: d2, staffId: f2, loadInitially: p2, customerChoices: m2, minRemainingCapacity: h2, onlyAvailableSlots: g2 }) {
2410
+ let [_2, v2] = (0, import_react.useState)(null), [y2, b2] = (0, import_react.useState)(p2), [x2, S2] = (0, import_react.useState)(Fc), [C2, w2] = (0, import_react.useState)(false), [T2, ee2] = (0, import_react.useState)(false), E2 = (0, import_react.useRef)(0);
2419
2411
  (0, import_react.useEffect)(() => {
2420
- _2 === null && u2 && v2(Io(u2));
2412
+ _2 === null && u2 && v2(Po(u2));
2421
2413
  }, [_2, u2]), (0, import_react.useEffect)(() => {
2422
- if (!y2 || !e2 || !(t2 || i2) || !l2 || !u2 || !_2 || !i2 && Za(n2)) return;
2414
+ if (!y2 || !e2 || !(t2 || i2) || !l2 || !u2 || !_2 || !i2 && Ka(n2)) return;
2423
2415
  let r2 = ++E2.current;
2424
- return w2(true), (i2 ? Fc({ ...i2, range: _2, fromDate: u2, timeZone: l2 }) : kc({ serviceId: t2, serviceType: n2, range: _2, fromDate: u2, timeZone: l2, locationId: d2 ?? void 0, staffId: f2 ?? void 0, customerChoices: m2, minRemainingCapacity: h2 })).then((e3) => {
2416
+ return w2(true), (i2 ? Mc({ ...i2, range: _2, fromDate: u2, timeZone: l2 }) : Ec({ serviceId: t2, serviceType: n2, range: _2, fromDate: u2, timeZone: l2, locationId: d2 ?? void 0, staffId: f2 ?? void 0, customerChoices: m2, minRemainingCapacity: h2 })).then((e3) => {
2425
2417
  r2 === E2.current && (S2(e3), ee2(false), w2(false));
2426
2418
  }).catch((e3) => {
2427
- r2 === E2.current && (wo(e3, { feature: So.timeSlots, action: `fetch-days-availability`, level: `warning` }), ee2(true), w2(false));
2419
+ r2 === E2.current && (bo(e3, { feature: vo.timeSlots, action: `fetch-days-availability`, level: `warning` }), ee2(true), w2(false));
2428
2420
  }), () => {
2429
2421
  r2 === E2.current && (E2.current += 1);
2430
2422
  };
2431
2423
  }, [y2, e2, t2, n2, i2, l2, u2, _2, d2, f2, m2, h2]);
2432
2424
  let D2 = (0, import_react.useCallback)(async (e3) => {
2433
- No(e3) && (v2(e3), b2(true));
2425
+ jo(e3) && (v2(e3), b2(true));
2426
+ }, []), O2 = (0, import_react.useCallback)(async () => {
2427
+ v2((e3) => e3 && Io(e3, 1)), b2(true);
2434
2428
  }, []), te2 = (0, import_react.useCallback)(async () => {
2435
- v2((e3) => e3 && Ro(e3, 1)), b2(true);
2436
- }, []), ne2 = (0, import_react.useCallback)(async () => {
2437
- v2((e3) => e3 && Ro(e3, -1)), b2(true);
2429
+ v2((e3) => e3 && Io(e3, -1)), b2(true);
2438
2430
  }, []);
2439
- return { range: _2, daysAvailability: (0, import_react.useMemo)(() => g2 ? x2.map((e3) => e3.availability === `unavailable` ? { ...e3, availability: `none` } : e3) : x2, [x2, g2]), isLoading: C2, hasError: T2, setRange: D2, nextRange: te2, previousRange: ne2 };
2431
+ return { range: _2, daysAvailability: (0, import_react.useMemo)(() => g2 ? x2.map((e3) => e3.availability === `unavailable` ? { ...e3, availability: `none` } : e3) : x2, [x2, g2]), isLoading: C2, hasError: T2, setRange: D2, nextRange: O2, previousRange: te2 };
2440
2432
  }
2441
- function Bc({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest: i2, timeZone: o2, today: l2, locationId: u2, staffId: d2, customerChoices: f2, minRemainingCapacity: p2, onlyAvailableSlots: m2, serviceLoading: h2 }) {
2442
- let [g2, _2] = (0, import_react.useState)(null), [v2, y2] = (0, import_react.useState)(0), [b2, x2] = (0, import_react.useState)(null), [S2, C2] = (0, import_react.useState)(null), [w2, T2] = (0, import_react.useState)(null), [ee2, E2] = (0, import_react.useState)(false), D2 = (0, import_react.useRef)(0), te2 = (0, import_react.useRef)(0), ne2 = (0, import_react.useRef)(0), O2 = (0, import_react.useCallback)(() => {
2443
- te2.current += 1, E2(false);
2433
+ function Lc({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest: i2, timeZone: o2, today: l2, locationId: u2, staffId: d2, customerChoices: f2, minRemainingCapacity: p2, onlyAvailableSlots: m2, serviceLoading: h2 }) {
2434
+ let [g2, _2] = (0, import_react.useState)(null), [v2, y2] = (0, import_react.useState)(0), [b2, x2] = (0, import_react.useState)(null), [S2, C2] = (0, import_react.useState)(null), [w2, T2] = (0, import_react.useState)(null), [ee2, E2] = (0, import_react.useState)(false), D2 = (0, import_react.useRef)(0), O2 = (0, import_react.useRef)(0), te2 = (0, import_react.useRef)(0), k2 = (0, import_react.useCallback)(() => {
2435
+ O2.current += 1, E2(false);
2444
2436
  }, []);
2445
2437
  (0, import_react.useEffect)(() => {
2446
- O2();
2447
- }, [e2, t2, n2, i2, o2, u2, d2, f2, p2, O2]);
2448
- let k2 = e2 && !h2 && !t2 && !i2;
2438
+ k2();
2439
+ }, [e2, t2, n2, i2, o2, u2, d2, f2, p2, k2]);
2440
+ let A2 = e2 && !h2 && !t2 && !i2;
2449
2441
  (0, import_react.useEffect)(() => {
2450
- k2 && (C2(null), T2(null));
2451
- }, [k2]), (0, import_react.useEffect)(() => {
2442
+ A2 && (C2(null), T2(null));
2443
+ }, [A2]), (0, import_react.useEffect)(() => {
2452
2444
  if (!g2) return;
2453
- if (k2) {
2445
+ if (A2) {
2454
2446
  _2(null);
2455
2447
  return;
2456
2448
  }
@@ -2459,99 +2451,99 @@ function Bc({ enabled: e2, serviceId: t2, serviceType: n2, multiServiceRequest:
2459
2451
  _2(null);
2460
2452
  return;
2461
2453
  }
2462
- if (!i2 && Za(n2)) {
2454
+ if (!i2 && Ka(n2)) {
2463
2455
  _2(null);
2464
2456
  return;
2465
2457
  }
2466
- let r2 = ko(new Date(Date.now()), o2), a2 = ++D2.current;
2458
+ let r2 = Eo(new Date(Date.now()), o2), a2 = ++D2.current;
2467
2459
  x2(null), C2(null), T2(null);
2468
2460
  let s2 = r2.slice(0, 10) === g2.date ? r2 : void 0;
2469
- return (i2 ? Ic({ ...i2, date: g2.date, timeZone: o2, onlyAvailableSlots: m2, fromLocalDate: s2 }) : hs({ serviceId: t2, serviceType: n2, date: g2.date, timeZone: o2, onlyAvailableSlots: m2, locationId: u2 ?? void 0, staffId: d2 ?? void 0, customerChoices: f2, minRemainingCapacity: p2, fromLocalDate: s2 })).then((e3) => {
2461
+ return (i2 ? Nc({ ...i2, date: g2.date, timeZone: o2, onlyAvailableSlots: m2, fromLocalDate: s2 }) : ps({ serviceId: t2, serviceType: n2, date: g2.date, timeZone: o2, onlyAvailableSlots: m2, locationId: u2 ?? void 0, staffId: d2 ?? void 0, customerChoices: f2, minRemainingCapacity: p2, fromLocalDate: s2 })).then((e3) => {
2470
2462
  a2 === D2.current && x2({ timeSlots: e3.timeSlots, timeZone: e3.timeZone ?? o2 });
2471
2463
  }).catch((e3) => {
2472
- a2 === D2.current && (wo(e3, { feature: So.timeSlots, action: `fetch-day-time-slots`, level: `warning` }), C2(`timeSlotsLoadFailed`));
2464
+ a2 === D2.current && (bo(e3, { feature: vo.timeSlots, action: `fetch-day-time-slots`, level: `warning` }), C2(`timeSlotsLoadFailed`));
2473
2465
  }), () => {
2474
2466
  a2 === D2.current && (D2.current += 1);
2475
2467
  };
2476
2468
  }, [g2, v2, e2, t2, h2, n2, i2, o2, l2, u2, d2, f2, p2, m2]);
2477
- let re2 = (0, import_react.useCallback)(async (e3) => {
2478
- !i2 && Za(n2) || !Mo(e3) || l2 && e3 < l2 || (O2(), y2((e4) => e4 + 1), _2({ kind: `day`, date: e3 }));
2479
- }, [n2, i2, l2, O2]), ie2 = g2?.date ?? null, A2 = (0, import_react.useCallback)(async () => {
2469
+ let ne2 = (0, import_react.useCallback)(async (e3) => {
2470
+ !i2 && Ka(n2) || !Ao(e3) || l2 && e3 < l2 || (k2(), y2((e4) => e4 + 1), _2({ kind: `day`, date: e3 }));
2471
+ }, [n2, i2, l2, k2]), re2 = g2?.date ?? null, j2 = (0, import_react.useCallback)(async () => {
2480
2472
  let r2 = !!(t2 || i2);
2481
- if (!i2 && Za(n2) || !e2 || !r2 || !o2) return { outcome: `none` };
2482
- let a2 = D2.current, s2 = ++te2.current, c2 = ++ne2.current, m3 = () => a2 === D2.current && s2 === te2.current;
2473
+ if (!i2 && Ka(n2) || !e2 || !r2 || !o2) return { outcome: `none` };
2474
+ let a2 = D2.current, s2 = ++O2.current, c2 = ++te2.current, m3 = () => a2 === D2.current && s2 === O2.current;
2483
2475
  E2(true), T2(null);
2484
2476
  try {
2485
- let e3 = ie2 ?? l2 ?? void 0, r3 = i2 ? await Lc({ ...i2, timeZone: o2, fromDate: e3 }) : await ps({ serviceId: t2, serviceType: n2, timeZone: o2, limit: 1, onlyAvailableSlots: true, fromDate: e3, locationId: u2 ?? void 0, staffId: d2 ?? void 0, customerChoices: f2, minRemainingCapacity: p2 });
2477
+ let e3 = re2 ?? l2 ?? void 0, r3 = i2 ? await Pc({ ...i2, timeZone: o2, fromDate: e3 }) : await ds({ serviceId: t2, serviceType: n2, timeZone: o2, limit: 1, onlyAvailableSlots: true, fromDate: e3, locationId: u2 ?? void 0, staffId: d2 ?? void 0, customerChoices: f2, minRemainingCapacity: p2 });
2486
2478
  if (!m3()) return { outcome: `cancelled` };
2487
2479
  let a3 = r3.timeSlots[0]?.localStartDate?.slice(0, 10) ?? null;
2488
2480
  return a3 ? { outcome: `found`, date: a3 } : { outcome: `none` };
2489
2481
  } catch (e3) {
2490
- return m3() ? (wo(e3, { feature: So.timeSlots, action: `find-next-available-date`, level: `warning` }), T2(`timeSlotsLoadFailed`), { outcome: `error` }) : { outcome: `cancelled` };
2482
+ return m3() ? (bo(e3, { feature: vo.timeSlots, action: `find-next-available-date`, level: `warning` }), T2(`timeSlotsLoadFailed`), { outcome: `error` }) : { outcome: `cancelled` };
2491
2483
  } finally {
2492
- c2 === ne2.current && E2(false);
2484
+ c2 === te2.current && E2(false);
2493
2485
  }
2494
- }, [e2, t2, n2, i2, o2, l2, u2, d2, f2, p2, ie2]), ae2 = w2 ?? S2;
2495
- return { query: g2, selectedDate: ie2, timeSlots: b2?.timeSlots ?? null, timeZone: b2?.timeZone ?? null, isLoading: ee2 || g2 !== null && b2 === null && S2 === null, error: ae2, selectDate: re2, findNextAvailableDate: A2 };
2486
+ }, [e2, t2, n2, i2, o2, l2, u2, d2, f2, p2, re2]), ie2 = w2 ?? S2;
2487
+ return { query: g2, selectedDate: re2, timeSlots: b2?.timeSlots ?? null, timeZone: b2?.timeZone ?? null, isLoading: ee2 || g2 !== null && b2 === null && S2 === null, error: ie2, selectDate: ne2, findNextAvailableDate: j2 };
2496
2488
  }
2497
- function Vc(e2, t2) {
2489
+ function Rc(e2, t2) {
2498
2490
  return t2 === void 0 ? false : !e2 || new Date(e2).getTime() <= t2;
2499
2491
  }
2500
- function Hc({ serviceId: e2, serviceType: t2, lastSessionEnd: n2, timeZone: r2, now: i2, onlyAvailableSlots: a2, locationId: o2, staffId: s2, timeSlotLimitPerDay: c2, customerChoices: l2, minRemainingCapacity: u2 }) {
2501
- let d2 = { serviceId: e2, onlyAvailableSlots: a2, locationId: o2 ?? void 0, staffId: s2 ?? void 0, timeZone: r2, fromLocalDate: ko(new Date(i2), r2) };
2502
- return Xa(t2) ? { ...d2, serviceType: `CLASS`, minRemainingCapacity: u2 } : Za(t2) ? !n2 || Vc(n2, i2) ? void 0 : { ...d2, serviceType: `COURSE`, toLocalDate: ko(new Date(n2), r2) } : { ...d2, serviceType: `APPOINTMENT`, toLocalDate: fs().toLocalDate, timeSlotsPerDay: c2 + 1, customerChoices: l2 };
2492
+ function zc({ serviceId: e2, serviceType: t2, lastSessionEnd: n2, timeZone: r2, now: i2, onlyAvailableSlots: a2, locationId: o2, staffId: s2, timeSlotLimitPerDay: c2, customerChoices: l2, minRemainingCapacity: u2 }) {
2493
+ let d2 = { serviceId: e2, onlyAvailableSlots: a2, locationId: o2 ?? void 0, staffId: s2 ?? void 0, timeZone: r2, fromLocalDate: Eo(new Date(i2), r2) };
2494
+ return Ga(t2) ? { ...d2, serviceType: `CLASS`, minRemainingCapacity: u2 } : Ka(t2) ? !n2 || Rc(n2, i2) ? void 0 : { ...d2, serviceType: `COURSE`, toLocalDate: Eo(new Date(n2), r2) } : { ...d2, serviceType: `APPOINTMENT`, toLocalDate: us().toLocalDate, timeSlotsPerDay: c2 + 1, customerChoices: l2 };
2503
2495
  }
2504
- function Uc({ isAppointment: e2, staffOnSlotCount: t2, hasStaffFilter: n2, hasRequestedGender: r2, hasStaffPricedVariants: i2, staffSelectionStrategy: a2 }) {
2496
+ function Bc({ isAppointment: e2, staffOnSlotCount: t2, hasStaffFilter: n2, hasRequestedGender: r2, hasStaffPricedVariants: i2, staffSelectionStrategy: a2 }) {
2505
2497
  return e2 && t2 > 1 && !n2 && !i2 && (a2 !== `CUSTOMER_MUST_CHOOSE` || r2);
2506
2498
  }
2507
- function Wc(e2, t2) {
2499
+ function Vc(e2, t2) {
2508
2500
  return e2.length ? e2.length === 1 ? { anyResource: false, staffMemberId: e2[0] } : t2 ? { anyResource: true } : null : null;
2509
2501
  }
2510
- function Gc(e2, t2, n2) {
2502
+ function Hc(e2, t2, n2) {
2511
2503
  return t2 && !t2.anyResource && e2.includes(t2.staffMemberId) ? { isComplete: true, resourceId: t2.staffMemberId } : t2?.anyResource && n2 ? { isComplete: true, resourceId: void 0 } : e2.length <= 1 ? { isComplete: true, resourceId: e2[0] } : { isComplete: n2, resourceId: void 0 };
2512
2504
  }
2513
- var Kc = { staff: null, requestedGender: null, locationId: null };
2514
- function qc({ entry: e2, appointmentLike: t2, staffChoiceHidden: n2, staffPriced: r2, staffSelectionStrategy: i2, genderAllowed: a2, staffMemberIds: o2, locationIds: s2 }) {
2515
- if (!e2) return Kc;
2516
- let c2 = e2.locationId && s2.includes(e2.locationId) ? e2.locationId : null, l2 = t2 && !n2 ? io(e2) : null;
2517
- if (!l2) return { ...Kc, locationId: c2 };
2518
- if (!l2.anyResource) return o2.includes(l2.staffMemberId) ? { staff: l2, requestedGender: null, locationId: c2 } : { ...Kc, locationId: c2 };
2505
+ var Uc = { staff: null, requestedGender: null, locationId: null };
2506
+ function Wc({ entry: e2, appointmentLike: t2, staffChoiceHidden: n2, staffPriced: r2, staffSelectionStrategy: i2, genderAllowed: a2, staffMemberIds: o2, locationIds: s2 }) {
2507
+ if (!e2) return Uc;
2508
+ let c2 = e2.locationId && s2.includes(e2.locationId) ? e2.locationId : null, l2 = t2 && !n2 ? $a(e2) : null;
2509
+ if (!l2) return { ...Uc, locationId: c2 };
2510
+ if (!l2.anyResource) return o2.includes(l2.staffMemberId) ? { staff: l2, requestedGender: null, locationId: c2 } : { ...Uc, locationId: c2 };
2519
2511
  let u2 = a2 ? e2.requestedGender ?? null : null;
2520
- return o2.length > 1 && !r2 && (i2 !== `CUSTOMER_MUST_CHOOSE` || u2 !== null) ? { staff: l2, requestedGender: u2, locationId: c2 } : { ...Kc, locationId: c2 };
2512
+ return o2.length > 1 && !r2 && (i2 !== `CUSTOMER_MUST_CHOOSE` || u2 !== null) ? { staff: l2, requestedGender: u2, locationId: c2 } : { ...Uc, locationId: c2 };
2521
2513
  }
2522
- var Jc = [];
2523
- function Yc({ sessions: e2, dayQuery: t2, daySlots: n2, staffFilter: r2, appointmentLike: i2, limitPerDay: a2, expandedDates: o2 }) {
2524
- let s2 = il(al(e2, r2)), c2 = n2 ? al(i2 ? qo(n2) : n2, r2) : Jc;
2525
- return { rows: t2 ? c2 : ol(s2, a2, o2), slotIdOf: t2 ? Wo : Ko, daysWithMore: rl(s2, a2, o2) };
2514
+ var Gc = [];
2515
+ function Kc({ sessions: e2, dayQuery: t2, daySlots: n2, staffFilter: r2, appointmentLike: i2, limitPerDay: a2, expandedDates: o2 }) {
2516
+ let s2 = tl(nl(e2, r2)), c2 = n2 ? nl(i2 ? Go(n2) : n2, r2) : Gc;
2517
+ return { rows: t2 ? c2 : rl(s2, a2, o2), slotIdOf: t2 ? Ho : Wo, daysWithMore: el(s2, a2, o2) };
2526
2518
  }
2527
- function Xc({ rows: e2, slotIdOf: t2 }, n2) {
2528
- return [...e2.filter((e3) => t2(e3) === n2)].sort((e3, t3) => nl(t3) - nl(e3))[0] ?? null;
2519
+ function qc({ rows: e2, slotIdOf: t2 }, n2) {
2520
+ return [...e2.filter((e3) => t2(e3) === n2)].sort((e3, t3) => $c(t3) - $c(e3))[0] ?? null;
2529
2521
  }
2530
- function Zc(e2, t2, n2, r2) {
2531
- return { slotId: n2(e2), slotStartTime: e2.localStartDate ?? null, slotEndTime: e2.localEndDate ?? null, bookable: e2.bookable ?? false, totalCapacity: e2.totalCapacity ?? null, remainingCapacity: e2.remainingCapacity ?? null, bookableCapacity: e2.bookableCapacity ?? null, eventId: e2.eventInfo?.eventId ?? null, eventTitle: e2.eventInfo?.eventTitle ?? null, waitlistCapacity: e2.eventInfo?.waitingList?.remainingCapacity ?? null, locationId: e2.location?._id ?? null, locationName: e2.location?.name || e2.location?.formattedAddress || null, durationMinutes: tl(e2, t2), isAllDay: e2.allDay ?? false, staff: r2 ? [] : Qc(e2) };
2522
+ function Jc(e2, t2, n2, r2) {
2523
+ return { slotId: n2(e2), slotStartTime: e2.localStartDate ?? null, slotEndTime: e2.localEndDate ?? null, bookable: e2.bookable ?? false, totalCapacity: e2.totalCapacity ?? null, remainingCapacity: e2.remainingCapacity ?? null, bookableCapacity: e2.bookableCapacity ?? null, eventId: e2.eventInfo?.eventId ?? null, eventTitle: e2.eventInfo?.eventTitle ?? null, waitlistCapacity: e2.eventInfo?.waitingList?.remainingCapacity ?? null, locationId: e2.location?._id ?? null, locationName: e2.location?.name || e2.location?.formattedAddress || null, durationMinutes: Qc(e2, t2), isAllDay: e2.allDay ?? false, staff: r2 ? [] : Yc(e2) };
2532
2524
  }
2533
- function Qc(e2) {
2525
+ function Yc(e2) {
2534
2526
  let t2 = /* @__PURE__ */ new Map();
2535
2527
  for (let n2 of e2.availableResources ?? []) if (n2.resourceTypeId === `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155`) for (let e3 of n2.resources ?? []) e3._id && !t2.has(e3._id) && t2.set(e3._id, e3.name ?? ``);
2536
2528
  return [...t2].map(([e3, t3]) => ({ staffMemberId: e3, name: t3 }));
2537
2529
  }
2538
- function $c(e2) {
2539
- let t2 = Qc(e2);
2530
+ function Xc(e2) {
2531
+ let t2 = Yc(e2);
2540
2532
  if (t2.length) return t2.length === 1 ? t2[0].staffMemberId : null;
2541
2533
  }
2542
- function el(e2) {
2543
- return Qc(e2).map((e3) => e3.staffMemberId);
2534
+ function Zc(e2) {
2535
+ return Yc(e2).map((e3) => e3.staffMemberId);
2544
2536
  }
2545
- function tl(e2, t2) {
2537
+ function Qc(e2, t2) {
2546
2538
  if (!e2.localStartDate || !e2.localEndDate) return null;
2547
- let n2 = e2.allDay ? `UTC` : t2 ?? `UTC`, r2 = yc(e2.localStartDate, n2), i2 = yc(e2.localEndDate, n2);
2539
+ let n2 = e2.allDay ? `UTC` : t2 ?? `UTC`, r2 = gc(e2.localStartDate, n2), i2 = gc(e2.localEndDate, n2);
2548
2540
  return !r2 || !i2 || i2 < r2 ? null : Math.round((i2.getTime() - r2.getTime()) / 6e4);
2549
2541
  }
2550
- function nl(e2) {
2542
+ function $c(e2) {
2551
2543
  let t2 = e2.bookableCapacity ?? e2.remainingCapacity;
2552
2544
  return (e2.eventInfo?.waitingList?.remainingCapacity ?? 0) > 0 && (t2 ?? 0) <= 0 ? 1 : e2.bookable ? 2 : 0;
2553
2545
  }
2554
- function rl(e2, t2, n2) {
2546
+ function el(e2, t2, n2) {
2555
2547
  let r2 = /* @__PURE__ */ new Map();
2556
2548
  for (let t3 of e2) {
2557
2549
  let e3 = (t3.localStartDate ?? ``).slice(0, 10);
@@ -2559,16 +2551,16 @@ function rl(e2, t2, n2) {
2559
2551
  }
2560
2552
  return new Set([...r2].filter(([e3, r3]) => r3 > t2 && !n2.has(e3)).map(([e3]) => e3));
2561
2553
  }
2562
- function il(e2) {
2554
+ function tl(e2) {
2563
2555
  return e2.flatMap((e3) => {
2564
- let t2 = e3.availableResources?.find((e4) => e4.resourceTypeId === Gr), n2 = t2?.resources ?? [];
2556
+ let t2 = e3.availableResources?.find((e4) => e4.resourceTypeId === Br), n2 = t2?.resources ?? [];
2565
2557
  return n2.length <= 1 ? [e3] : n2.map((n3) => ({ ...e3, availableResources: [{ ...t2, resources: [n3] }] }));
2566
2558
  });
2567
2559
  }
2568
- function al(e2, t2) {
2560
+ function nl(e2, t2) {
2569
2561
  return t2 ? e2.map((e3) => ({ ...e3, availableResources: e3.availableResources?.map((e4) => e4.resourceTypeId === `1cd44cf8-756f-41c3-bd90-3e2ffcaf1155` ? { ...e4, resources: e4.resources?.filter((e5) => e5._id === t2) } : e4) })) : e2;
2570
2562
  }
2571
- function ol(e2, t2, n2) {
2563
+ function rl(e2, t2, n2) {
2572
2564
  let r2 = /* @__PURE__ */ new Map();
2573
2565
  return e2.filter((e3) => {
2574
2566
  let i2 = (e3.localStartDate ?? ``).slice(0, 10);
@@ -2577,24 +2569,24 @@ function ol(e2, t2, n2) {
2577
2569
  return r2.set(i2, a2 + 1), a2 < t2;
2578
2570
  });
2579
2571
  }
2580
- async function sl() {
2572
+ async function il() {
2581
2573
  try {
2582
- return await Uo();
2574
+ return await Vo();
2583
2575
  } catch (e2) {
2584
- return wo(e2, { feature: So.timeSlots, action: `fetch-business-time-zone`, level: `warning` }), { businessTimeZone: null, staffSelectionStrategy: void 0, allowGenderSelection: false };
2576
+ return bo(e2, { feature: vo.timeSlots, action: `fetch-business-time-zone`, level: `warning` }), { businessTimeZone: null, staffSelectionStrategy: void 0, allowGenderSelection: false };
2585
2577
  }
2586
2578
  }
2587
- function cl(e2) {
2588
- return Rs({ key: Ds(), warmupData: e2, fetchData: sl });
2579
+ function al(e2) {
2580
+ return Fs({ key: ws(), warmupData: e2, fetchData: il });
2589
2581
  }
2590
- function ll(e2) {
2582
+ function ol(e2) {
2591
2583
  return (e2.localStartDate ?? ``).slice(0, 10);
2592
2584
  }
2593
- var ul = [];
2594
- function dl(e2, t2) {
2595
- let { serviceId: n2 = ``, serviceType: r2 = `CLASS`, fromLocalDate: i2 = ``, toLocalDate: o2, timeZone: l2, locationId: u2, staffId: d2, onlyAvailableSlots: f2 = false, customerChoices: p2, minRemainingCapacity: m2, timeSlotsPerDay: h2 } = t2 ?? {}, [g2, _2] = (0, import_react.useState)([]), [v2, y2] = (0, import_react.useState)([]), [b2, x2] = (0, import_react.useState)(1), [S2, C2] = (0, import_react.useState)(!!n2), [w2, T2] = (0, import_react.useState)(null), [ee2, E2] = (0, import_react.useState)(null), [D2, te2] = (0, import_react.useState)(/* @__PURE__ */ new Set()), [ne2, O2] = (0, import_react.useState)(null), k2 = (0, import_react.useRef)(null), re2 = (0, import_react.useRef)(null);
2585
+ var sl = [];
2586
+ function cl(e2, t2) {
2587
+ let { serviceId: n2 = ``, serviceType: r2 = `CLASS`, fromLocalDate: i2 = ``, toLocalDate: o2, timeZone: l2, locationId: u2, staffId: d2, onlyAvailableSlots: f2 = false, customerChoices: p2, minRemainingCapacity: m2, timeSlotsPerDay: h2 } = t2 ?? {}, [g2, _2] = (0, import_react.useState)([]), [v2, y2] = (0, import_react.useState)([]), [b2, x2] = (0, import_react.useState)(1), [S2, C2] = (0, import_react.useState)(!!n2), [w2, T2] = (0, import_react.useState)(null), [ee2, E2] = (0, import_react.useState)(null), [D2, O2] = (0, import_react.useState)(/* @__PURE__ */ new Set()), [te2, k2] = (0, import_react.useState)(null), A2 = (0, import_react.useRef)(null), ne2 = (0, import_react.useRef)(null);
2596
2588
  (0, import_react.useEffect)(() => {
2597
- if (_2([]), y2([]), x2(1), E2(null), T2(null), te2(/* @__PURE__ */ new Set()), O2(null), C2(!!n2), !n2) return;
2589
+ if (_2([]), y2([]), x2(1), E2(null), T2(null), O2(/* @__PURE__ */ new Set()), k2(null), C2(!!n2), !n2) return;
2598
2590
  let t3 = false, a2 = false, s2 = [], c2 = [];
2599
2591
  async function g3(g4) {
2600
2592
  if (t3 || a2) return;
@@ -2609,7 +2601,7 @@ function dl(e2, t2) {
2609
2601
  let a3 = [], b3 = null, S3 = v4 ?? void 0, C3 = /* @__PURE__ */ new Set();
2610
2602
  do {
2611
2603
  S3 && C3.add(S3);
2612
- let s3 = await cs({ serviceId: n2, serviceType: r2, fromLocalDate: i2, toLocalDate: o2, timeZone: l2, locationId: u2, staffId: d2, onlyAvailableSlots: f2, customerChoices: p2, minRemainingCapacity: m2, timeSlotsPerDay: h2, limit: e2, cursor: S3 });
2604
+ let s3 = await os({ serviceId: n2, serviceType: r2, fromLocalDate: i2, toLocalDate: o2, timeZone: l2, locationId: u2, staffId: d2, onlyAvailableSlots: f2, customerChoices: p2, minRemainingCapacity: m2, timeSlotsPerDay: h2, limit: e2, cursor: S3 });
2613
2605
  if (t3) return;
2614
2606
  if (a3.push(...s3.timeSlots), b3 = s3.nextCursor, b3 && C3.has(b3)) throw Error(`The session API repeated a page cursor`);
2615
2607
  S3 = b3 ?? void 0, E2(s3.timeZone ?? l2 ?? null);
@@ -2617,7 +2609,7 @@ function dl(e2, t2) {
2617
2609
  s2 = [...s2, a3], c2 = [...c2, b3], _2(s2), y2(c2), (g4 === 1 || a3.length > 0) && x2(g4);
2618
2610
  } catch (e3) {
2619
2611
  if (t3) return;
2620
- wo(e3, { feature: So.sessions, action: `fetch-page` }), T2(e3 instanceof Error ? e3.message : `Failed to load sessions`);
2612
+ bo(e3, { feature: vo.sessions, action: `fetch-page` }), T2(e3 instanceof Error ? e3.message : `Failed to load sessions`);
2621
2613
  } finally {
2622
2614
  a2 = false, t3 || C2(false);
2623
2615
  }
@@ -2626,192 +2618,192 @@ function dl(e2, t2) {
2626
2618
  async function v3(e3) {
2627
2619
  if (!(t3 || a2)) {
2628
2620
  if (h2 == null) {
2629
- te2((t4) => /* @__PURE__ */ new Set([...t4, e3]));
2621
+ O2((t4) => /* @__PURE__ */ new Set([...t4, e3]));
2630
2622
  return;
2631
2623
  }
2632
- a2 = true, O2(e3), T2(null);
2624
+ a2 = true, k2(e3), T2(null);
2633
2625
  try {
2634
- let a3 = await hs({ serviceId: n2, serviceType: r2, date: e3, timeZone: l2, onlyAvailableSlots: f2, locationId: u2, staffId: d2, customerChoices: p2, minRemainingCapacity: m2, fromLocalDate: i2, toLocalDate: o2 });
2626
+ let a3 = await ps({ serviceId: n2, serviceType: r2, date: e3, timeZone: l2, onlyAvailableSlots: f2, locationId: u2, staffId: d2, customerChoices: p2, minRemainingCapacity: m2, fromLocalDate: i2, toLocalDate: o2 });
2635
2627
  if (t3) return;
2636
- let c3 = a3.timeSlots.filter((t4) => ll(t4) === e3), h3 = Math.max(0, s2.findIndex((t4) => t4.some((t5) => ll(t5) === e3)));
2628
+ let c3 = a3.timeSlots.filter((t4) => ol(t4) === e3), h3 = Math.max(0, s2.findIndex((t4) => t4.some((t5) => ol(t5) === e3)));
2637
2629
  s2 = s2.map((t4, n3) => {
2638
- let r3 = t4.filter((t5) => ll(t5) !== e3);
2630
+ let r3 = t4.filter((t5) => ol(t5) !== e3);
2639
2631
  return n3 === h3 ? [...r3, ...c3] : r3;
2640
- }), _2(s2), te2((t4) => /* @__PURE__ */ new Set([...t4, e3]));
2632
+ }), _2(s2), O2((t4) => /* @__PURE__ */ new Set([...t4, e3]));
2641
2633
  } catch (e4) {
2642
2634
  if (t3) return;
2643
- wo(e4, { feature: So.sessions, action: `fetch-day` }), T2(e4 instanceof Error ? e4.message : `Failed to load sessions`);
2635
+ bo(e4, { feature: vo.sessions, action: `fetch-day` }), T2(e4 instanceof Error ? e4.message : `Failed to load sessions`);
2644
2636
  } finally {
2645
- a2 = false, t3 || O2(null);
2637
+ a2 = false, t3 || k2(null);
2646
2638
  }
2647
2639
  }
2648
2640
  }
2649
- return k2.current = g3, re2.current = v3, g3(1), () => {
2650
- t3 = true, k2.current = null, re2.current = null;
2641
+ return A2.current = g3, ne2.current = v3, g3(1), () => {
2642
+ t3 = true, A2.current = null, ne2.current = null;
2651
2643
  };
2652
2644
  }, [n2, r2, i2, o2, l2, u2, d2, f2, p2, m2, h2, e2]);
2653
- let ie2 = [...g2[b2 - 1] ?? ul].sort((e3, t3) => (e3.localStartDate ?? ``).localeCompare(t3.localStartDate ?? ``)), A2 = g2[b2], ae2 = A2 ? A2.length > 0 : v2[b2 - 1] != null, j2 = b2 > 1;
2654
- async function oe2() {
2655
- ae2 && !S2 && await k2.current?.(b2 + 1);
2645
+ let re2 = [...g2[b2 - 1] ?? sl].sort((e3, t3) => (e3.localStartDate ?? ``).localeCompare(t3.localStartDate ?? ``)), j2 = g2[b2], ie2 = j2 ? j2.length > 0 : v2[b2 - 1] != null, M2 = b2 > 1;
2646
+ async function ae2() {
2647
+ ie2 && !S2 && await A2.current?.(b2 + 1);
2656
2648
  }
2657
- function M2() {
2658
- j2 && !S2 && k2.current?.(b2 - 1);
2649
+ function N2() {
2650
+ M2 && !S2 && A2.current?.(b2 - 1);
2659
2651
  }
2660
- async function se2(e3) {
2661
- S2 || ne2 !== null || D2.has(e3) || await re2.current?.(e3);
2652
+ async function oe2(e3) {
2653
+ S2 || te2 !== null || D2.has(e3) || await ne2.current?.(e3);
2662
2654
  }
2663
- return { isLoadingPage: S2, firstPageSettled: g2.length > 0 || w2 !== null, error: w2, timeZone: ee2, sessions: ie2, pageSize: e2, currentPage: b2, hasNextPage: ae2, hasPreviousPage: j2, nextPage: oe2, previousPage: M2, expandedDates: D2, loadingDate: ne2, loadAllSessionsForDay: se2 };
2655
+ return { isLoadingPage: S2, firstPageSettled: g2.length > 0 || w2 !== null, error: w2, timeZone: ee2, sessions: re2, pageSize: e2, currentPage: b2, hasNextPage: ie2, hasPreviousPage: M2, nextPage: ae2, previousPage: N2, expandedDates: D2, loadingDate: te2, loadAllSessionsForDay: oe2 };
2664
2656
  }
2665
- var fl = (e2) => e2?.onlineBooking?.enabled === true;
2666
- function pl(e2) {
2657
+ var ll = (e2) => e2?.onlineBooking?.enabled === true;
2658
+ function ul(e2) {
2667
2659
  return !!e2?._id;
2668
2660
  }
2669
- function ml(e2, t2) {
2661
+ function dl(e2, t2) {
2670
2662
  return e2 ? e2.anyResource ? t2 ?? `` : e2.staffMemberId : null;
2671
2663
  }
2672
- var hl = [];
2673
- var gl = [];
2674
- var _l = sn.map((e2) => ({ id: e2, gender: e2 }));
2675
- var vl = { isSelectionValidated: false };
2676
- var yl = () => {
2664
+ var fl = [];
2665
+ var pl = [];
2666
+ var ml = on.map((e2) => ({ id: e2, gender: e2 }));
2667
+ var hl = { isSelectionValidated: false };
2668
+ var gl = () => {
2677
2669
  };
2678
- var bl = async () => {
2670
+ var _l = async () => {
2679
2671
  };
2680
- var xl = (0, import_react.createContext)(null);
2681
- function Sl() {
2682
- let e2 = (0, import_react.useContext)(xl);
2672
+ var vl = (0, import_react.createContext)(null);
2673
+ function yl() {
2674
+ let e2 = (0, import_react.useContext)(vl);
2683
2675
  if (!e2) throw Error(`useTimeSlotsContext must be used within TimeSlotsContextProvider`);
2684
2676
  return e2;
2685
2677
  }
2686
- function Cl(e2, t2, n2) {
2678
+ function bl(e2, t2, n2) {
2687
2679
  e2 ? t2() : n2();
2688
2680
  }
2689
- var wl = { loginRequired: `rescheduleLoginRequired`, notFound: `rescheduleNotFound`, accessDenied: `rescheduleAccessDenied`, failed: `rescheduleNotFound`, wrongService: `rescheduleNotFound`, notReschedulable: `rescheduleNotReschedulable` };
2690
- function Tl(e2 = 3) {
2691
- return Math.min(Math.max(e2, 1), Ys);
2681
+ var xl = { loginRequired: `rescheduleLoginRequired`, notFound: `rescheduleNotFound`, accessDenied: `rescheduleAccessDenied`, failed: `rescheduleNotFound`, wrongService: `rescheduleNotFound`, notReschedulable: `rescheduleNotReschedulable` };
2682
+ function Sl(e2 = 3) {
2683
+ return Math.min(Math.max(e2, 1), Ks);
2692
2684
  }
2693
- function El(e2) {
2694
- let { isLoading: n2, bookingsSettingsLoading: r2 } = (0, import_service_context.useServiceContext)();
2695
- gc(dc.TIME_SLOTS, !n2 && !r2);
2696
- let i2 = ws(), [a2] = (0, import_react.useState)(() => cl(i2));
2697
- return (0, import_jsx_runtime.jsx)(Js, { children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Sc, { nextAvailableSlotsCount: Tl(e2.nextAvailableSlotsCount), children: e2.children }), children: (0, import_jsx_runtime.jsx)(Ol, { ...e2, configurationPromise: a2 }) }) });
2685
+ function Cl(e2) {
2686
+ let { isLoading: n2, bookingsSettingsLoading: r2 } = (0, import_service.useServiceContext)();
2687
+ pc(cc.TIME_SLOTS, !n2 && !r2);
2688
+ let i2 = xs(), [a2] = (0, import_react.useState)(() => al(i2));
2689
+ return (0, import_jsx_runtime.jsx)(Gs, { children: (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(yc, { nextAvailableSlotsCount: Sl(e2.nextAvailableSlotsCount), children: e2.children }), children: (0, import_jsx_runtime.jsx)(Tl, { ...e2, configurationPromise: a2 }) }) });
2698
2690
  }
2699
- function Dl(e2) {
2691
+ function wl(e2) {
2700
2692
  let [t2, n2] = (0, import_react.useState)({ serviceId: e2, key: 0 });
2701
2693
  return e2 !== t2.serviceId && n2({ serviceId: e2, key: t2.serviceId ? t2.key + 1 : t2.key }), t2.key;
2702
2694
  }
2703
- function Ol({ onlyAvailableSlots: e2 = true, nextAvailableSlotsCount: t2 = 3, loadDaysAvailabilityInitially: n2 = false, timeSlotLimitPerDay: r2 = 100, configurationPromise: i2, children: o2 }) {
2704
- let s2 = Ws().isLoading, { searchParams: d2 } = oc(), { reschedule: f2 } = (0, import_service_context.useServiceContext)(), [m2] = (0, import_react.useState)(() => ({ locationId: d2.get(Qa.location), staffId: d2.get(Qa.resource), timeZone: (f2 ? void 0 : jr(d2.get(Qa.blob))?.timezone) ?? d2.get(Qa.timezone) })), [h2, g2] = (0, import_react.useState)(m2.timeZone), _2 = Tl(t2), [v2, y2] = (0, import_react.useState)(false);
2695
+ function Tl({ onlyAvailableSlots: e2 = true, nextAvailableSlotsCount: t2 = 3, loadDaysAvailabilityInitially: n2 = false, timeSlotLimitPerDay: r2 = 100, configurationPromise: i2, children: o2 }) {
2696
+ let s2 = Vs().isLoading, { searchParams: d2 } = rc(), { reschedule: f2 } = (0, import_service.useServiceContext)(), [m2] = (0, import_react.useState)(() => ({ locationId: d2.get(qa.location), staffId: d2.get(qa.resource), timeZone: (f2 ? void 0 : Ar(d2.get(qa.blob))?.timezone) ?? d2.get(qa.timezone) })), [h2, g2] = (0, import_react.useState)(m2.timeZone), _2 = Sl(t2), [v2, y2] = (0, import_react.useState)(false);
2705
2697
  (0, import_react.useEffect)(() => y2(true), []);
2706
- let b2 = v2 && !s2, x2 = vs(i2), S2 = (0, import_react.useSyncExternalStore)(rs, ns, () => false), { serviceId: C2 } = (0, import_service_context.useServiceContext)(), w2 = Dl(C2), T2 = Number.isFinite(r2) ? Math.max(1, Math.floor(r2)) : 100;
2707
- return (0, import_jsx_runtime.jsx)(Xs, { fallback: (0, import_jsx_runtime.jsx)(Cc, { nextAvailableSlotsCount: _2, children: o2 }), feature: So.timeSlots, children: (0, import_jsx_runtime.jsx)(kl, { onlyAvailableSlots: e2, selectedTimeZone: h2, setSelectedTimeZone: g2, enabled: b2, nextAvailableSlotsCount: _2, loadDaysAvailabilityInitially: n2, timeSlotLimitPerDay: T2, landingLocationId: m2.locationId, landingStaffId: m2.staffId, businessTimeZone: x2.businessTimeZone, staffSelectionStrategy: x2.staffSelectionStrategy, allowGenderSelection: x2.allowGenderSelection, requestedGenderRejected: S2, children: o2 }) }, w2);
2708
- }
2709
- function kl({ onlyAvailableSlots: e2, selectedTimeZone: t2, setSelectedTimeZone: n2, enabled: i2, nextAvailableSlotsCount: l2, loadDaysAvailabilityInitially: d2, timeSlotLimitPerDay: f2, landingLocationId: m2, landingStaffId: h2, businessTimeZone: g2, staffSelectionStrategy: _2, allowGenderSelection: v2, requestedGenderRejected: y2, children: b2 }) {
2710
- let { service: x2, serviceId: S2, serviceType: C2, setSlot: w2, clearSlot: T2, setMultiServiceSlot: ee2, clearMultiServiceSlot: E2, draftRevision: D2, navigateToMultiServiceForm: te2, selection: ne2, selectStaffMember: O2, clearSelection: k2, clearStaffMember: re2, withSelectionParam: ie2, staffMembers: A2, serviceOptionsAndVariants: ae2, isLoading: j2, hasError: oe2, multiServiceAppointmentServices: M2 = gl, reschedule: se2 } = (0, import_service_context.useServiceContext)(), N2 = se2 != null, ce2 = N2 && se2.status !== `ready`, le2 = N2 && se2.status === `loading`, ue2 = N2 ? wl[se2.status] : void 0, de2 = ce2 ? null : se2?.booking ?? null, fe2 = de2 ? se2.validUntil : null, pe2 = pl(x2) && !fl(x2), P2 = pe2 || ce2 ? null : S2, me2 = oc(), he2 = N2 ? null : me2.searchParams.get(Qa.blob), ge2 = (0, import_react.useMemo)(() => no(jr(he2)), [he2]), F2 = !S2 && !j2 && !oe2 && (ge2.valid || ge2.reason !== `too-few-services`), _e2 = F2 && ge2.valid && M2.some((e3) => !fl(e3) && ge2.services.some((t3) => t3.serviceId === e3._id)), ve2 = pe2 || _e2, ye2 = F2 && ge2.valid && !_e2 ? ge2.requestKey : null, be2 = (0, import_react.useMemo)(() => ye2 && ge2.valid ? { services: ge2.services, locationId: ge2.locationId, locationType: ge2.locationType } : null, [ye2]), xe2 = !!P2 || be2 !== null, Se2 = P2 || ye2, Ce2 = i2 && !j2 && !oe2 && !xe2 && !le2, we2 = Ks(), Te2 = Ws(), { navigate: Ee2, resolvePath: De2 } = po(), [Oe2, ke2] = (0, import_react.useState)(null), [Ae2, je2] = (0, import_react.useState)(false), Me2 = (0, import_react.useRef)([]), Ne2 = (0, import_react.useRef)(false), Pe2 = (0, import_react.useCallback)(() => (je2(true), Ne2.current ? Promise.resolve() : new Promise((e3) => {
2711
- Me2.current.push(e3);
2712
- })), []), Fe2 = i2 ? Intl.DateTimeFormat().resolvedOptions().timeZone : null, Ie2 = Ja(x2), Le2 = (0, import_react.useRef)(null), Re2 = io(ne2), ze2 = (0, import_react.useRef)(Re2);
2713
- ze2.current = Re2;
2714
- let Be2 = Re2 && !Re2.anyResource ? Re2.staffMemberId : null, Ve2 = ne2.requestedGender ?? null, I2 = !Xa(C2) && !Za(C2), He2 = I2 && !F2 && _s(ae2), L2 = F2 || I2 && _2 === `CUSTOMER_CANNOT_CHOOSE`, Ue2 = _2 !== void 0, We2 = Ho({ allowGenderSelection: v2, staffSelectionStrategy: _2 ?? null }) && I2 && !F2 && !He2, Ge2 = We2 && !y2, Ke2 = (0, import_react.useMemo)(() => P2 ? jr(he2)?.services.find((e3) => e3.serviceId === P2) ?? null : null, [he2, P2]), qe2 = (A2 ?? []).map((e3) => e3.staffMemberId).join(`,`), Je2 = Ie2.map((e3) => e3.id).join(`,`), Ye2 = (0, import_react.useMemo)(() => qc({ entry: Ke2, appointmentLike: I2, staffChoiceHidden: L2, staffPriced: He2, staffSelectionStrategy: _2, genderAllowed: Ge2, staffMemberIds: qe2.split(`,`), locationIds: Je2.split(`,`) }), [Ke2, I2, L2, He2, _2, Ge2, qe2, Je2]), R2 = Ye2.staff, Xe2 = Ye2.locationId, Ze2 = L2 || R2 !== null, [Qe2, $e2] = (0, import_react.useState)(null), [et2, tt2] = (0, import_react.useState)(m2 !== null || N2), nt2 = (e3) => !!e3 && Ie2.some((t3) => t3.id === e3), rt2 = de2?.locationId ?? null, it2 = Qe2 ?? (et2 ? nt2(rt2) ? rt2 : m2 : null), at2 = Xe2 ?? (nt2(it2) ? it2 : null), ot2 = (0, import_react.useMemo)(() => Xe2 ? [] : Ie2.map((e3) => ({ id: e3.id, name: e3.label })), [x2, Xe2]), st2 = (0, import_react.useMemo)(() => Ze2 ? [] : (A2 ?? []).filter((e3) => e3.name).map((e3) => ({ id: e3.staffMemberId, name: e3.name ?? ``, gender: null })), [A2, Ze2]), ct2 = I2 && !Ue2 ? hl : st2, lt2 = Ge2 && ct2.length > 1, ut2 = (0, import_react.useMemo)(() => lt2 ? [..._l, ...ct2] : ct2, [lt2, ct2]), [dt2, ft2] = (0, import_react.useState)(null), [pt2, mt2] = (0, import_react.useState)(h2 !== null), ht2 = dt2 ?? (pt2 ? h2 : null), z2 = R2 ? R2.anyResource ? null : R2.staffMemberId : ht2 !== null && st2.some((e3) => e3.id === ht2) ? ht2 : null, gt2 = Re2?.anyResource ? Ve2 : null, [_t2, vt2] = (0, import_react.useState)(gt2), [yt2, bt2] = (0, import_react.useState)(gt2);
2715
- !y2 && Re2?.anyResource && Ve2 !== yt2 && (bt2(Ve2), vt2(Ve2));
2716
- let xt2 = R2 ? Ye2.requestedGender : We2 && ct2.length > 1 && z2 === null ? _t2 : null, B2 = y2 ? null : xt2, St2 = (0, import_react.useCallback)((e3) => {
2717
- ze2.current = e3, e3 ? e3.anyResource ? k2(B2 ?? void 0) : O2(e3.staffMemberId) : re2();
2718
- }, [re2, k2, O2, B2]), Ct2 = (0, import_react.useCallback)((e3) => St2(e3 ? { anyResource: false, staffMemberId: e3 } : { anyResource: true }), [St2]), wt2 = (de2?.addOnIds ?? []).filter((e3) => x2?.addOnGroups?.some((t3) => t3.addOnIds?.includes(e3))), Tt2 = de2 && Xa(C2) ? de2.participants : null, Et2 = I2 ? $a(ne2) : null, { addOnIds: Dt2, ...Ot2 } = Et2 ?? {}, kt2 = I2 && de2 ? wt2.length ? { ...Ot2, addOnIds: wt2 } : Ot2 : Et2, At2 = kt2 ? Xo(kt2) : void 0, jt2 = JSON.stringify(xt2 ? { ...At2, requestedGender: { gender: xt2 } } : At2 ?? null), Mt2 = (0, import_react.useMemo)(() => JSON.parse(jt2), [jt2]), Nt2 = R2?.anyResource === true, Pt2 = (0, import_react.useCallback)((e3) => Nt2 || _2 !== void 0 && Uc({ isAppointment: I2, staffOnSlotCount: e3, hasStaffFilter: z2 !== null, hasRequestedGender: B2 !== null, hasStaffPricedVariants: He2, staffSelectionStrategy: _2 }), [Nt2, I2, _2, z2, B2, He2]), Ft2 = (0, import_react.useCallback)((e3) => R2 ?? (L2 ? null : e3), [R2, L2]), It2 = (0, import_react.useCallback)((e3) => {
2719
- let t3 = e3 === null ? null : ut2.find((t4) => t4.id === e3);
2720
- t3 !== void 0 && (mt2(false), ft2(t3 && !t3.gender ? t3.id : null), vt2(t3?.gender ?? null));
2721
- }, [ut2]), Lt2 = (0, import_react.useCallback)((e3) => {
2722
- (e3 === null || Ie2.some((t3) => t3.id === e3)) && (tt2(false), $e2(e3));
2723
- }, [x2]), Rt2 = !!(i2 && !Te2.isLoading && Te2.displayTimeZonePolicy.customerCanChange && g2 && Fe2 && g2 !== Fe2), V2 = i2 ? Rt2 && t2 && (t2 === g2 || t2 === Fe2) ? t2 : we2 ?? g2 ?? Fe2 : null, zt2 = (0, import_react.useCallback)((e3) => {
2724
- Rt2 && (e3 === g2 || e3 === Fe2) && n2(e3);
2725
- }, [Rt2, g2, Fe2, n2]), Bt2 = (0, import_react.useMemo)(() => i2 && !j2 && xe2 ? Date.now() : void 0, [i2, j2, P2, be2, V2]), Vt2 = Bt2 !== void 0 && V2 ? Eo(new Date(Bt2), V2) : null, { range: Ht2, daysAvailability: Ut2, isLoading: Wt2, hasError: Gt2, setRange: Kt2, nextRange: qt2, previousRange: Jt2 } = zc({ enabled: i2, serviceId: P2, serviceType: C2, multiServiceRequest: be2, timeZone: V2, today: Vt2, locationId: at2, staffId: z2, customerChoices: Mt2, minRemainingCapacity: Tt2, loadInitially: d2, onlyAvailableSlots: e2 }), Yt2 = fe2?.slice(0, 10) ?? null, Xt2 = (0, import_react.useMemo)(() => Yt2 ? Ut2.map((e3) => e3.date > Yt2 ? { ...e3, availability: `none` } : e3) : Ut2, [Ut2, Yt2]), Zt2 = fe2 && V2 ? ko(new Date(fe2), V2) : null, { query: H2, selectedDate: Qt2, timeSlots: $t2, isLoading: en2, error: tn2, selectDate: nn2, findNextAvailableDate: rn2 } = Bc({ enabled: i2, serviceId: P2, serviceType: C2, multiServiceRequest: be2, timeZone: V2, today: Vt2, locationId: at2, staffId: z2, customerChoices: Mt2, minRemainingCapacity: Tt2, onlyAvailableSlots: e2, serviceLoading: j2 }), an2 = (0, import_react.useRef)(true), on2 = (0, import_react.useRef)(null);
2698
+ let b2 = v2 && !s2, x2 = gs(i2), S2 = (0, import_react.useSyncExternalStore)(ts, es, () => false), { serviceId: C2 } = (0, import_service.useServiceContext)(), w2 = wl(C2), T2 = Number.isFinite(r2) ? Math.max(1, Math.floor(r2)) : 100;
2699
+ return (0, import_jsx_runtime.jsx)(qs, { fallback: (0, import_jsx_runtime.jsx)(bc, { nextAvailableSlotsCount: _2, children: o2 }), feature: vo.timeSlots, children: (0, import_jsx_runtime.jsx)(El, { onlyAvailableSlots: e2, selectedTimeZone: h2, setSelectedTimeZone: g2, enabled: b2, nextAvailableSlotsCount: _2, loadDaysAvailabilityInitially: n2, timeSlotLimitPerDay: T2, landingLocationId: m2.locationId, landingStaffId: m2.staffId, businessTimeZone: x2.businessTimeZone, staffSelectionStrategy: x2.staffSelectionStrategy, allowGenderSelection: x2.allowGenderSelection, requestedGenderRejected: S2, children: o2 }) }, w2);
2700
+ }
2701
+ function El({ onlyAvailableSlots: e2, selectedTimeZone: t2, setSelectedTimeZone: n2, enabled: i2, nextAvailableSlotsCount: l2, loadDaysAvailabilityInitially: d2, timeSlotLimitPerDay: f2, landingLocationId: m2, landingStaffId: h2, businessTimeZone: g2, staffSelectionStrategy: _2, allowGenderSelection: v2, requestedGenderRejected: y2, children: b2 }) {
2702
+ let { service: x2, serviceId: S2, serviceType: C2, setSlot: w2, clearSlot: T2, setMultiServiceSlot: ee2, clearMultiServiceSlot: E2, draftRevision: D2, navigateToMultiServiceForm: O2, selection: te2, selectStaffMember: k2, clearSelection: A2, clearStaffMember: ne2, withSelectionParam: re2, staffMembers: j2, serviceOptionsAndVariants: ie2, isLoading: M2, hasError: ae2, multiServiceAppointmentServices: N2 = pl, reschedule: oe2 } = (0, import_service.useServiceContext)(), P2 = oe2 != null, se2 = P2 && oe2.status !== `ready`, ce2 = P2 && oe2.status === `loading`, le2 = P2 ? xl[oe2.status] : void 0, ue2 = se2 ? null : oe2?.booking ?? null, de2 = ue2 ? oe2.validUntil : null, fe2 = ul(x2) && !ll(x2), F2 = fe2 || se2 ? null : S2, pe2 = rc(), me2 = P2 ? null : pe2.searchParams.get(qa.blob), he2 = (0, import_react.useMemo)(() => Za(Ar(me2)), [me2]), I2 = !S2 && !M2 && !ae2 && (he2.valid || he2.reason !== `too-few-services`), ge2 = I2 && he2.valid && N2.some((e3) => !ll(e3) && he2.services.some((t3) => t3.serviceId === e3._id)), _e2 = fe2 || ge2, ve2 = I2 && he2.valid && !ge2 ? he2.requestKey : null, ye2 = (0, import_react.useMemo)(() => ve2 && he2.valid ? { services: he2.services, locationId: he2.locationId, locationType: he2.locationType } : null, [ve2]), be2 = !!F2 || ye2 !== null, xe2 = F2 || ve2, Se2 = i2 && !M2 && !ae2 && !be2 && !ce2, Ce2 = Us(), we2 = Vs(), { navigate: Te2, resolvePath: Ee2 } = co(), [De2, Oe2] = (0, import_react.useState)(null), [ke2, Ae2] = (0, import_react.useState)(false), je2 = (0, import_react.useRef)([]), Me2 = (0, import_react.useRef)(false), Ne2 = (0, import_react.useCallback)(() => (Ae2(true), Me2.current ? Promise.resolve() : new Promise((e3) => {
2703
+ je2.current.push(e3);
2704
+ })), []), Pe2 = i2 ? Intl.DateTimeFormat().resolvedOptions().timeZone : null, Fe2 = Ua(x2), Ie2 = (0, import_react.useRef)(null), Le2 = $a(te2), Re2 = (0, import_react.useRef)(Le2);
2705
+ Re2.current = Le2;
2706
+ let ze2 = Le2 && !Le2.anyResource ? Le2.staffMemberId : null, Be2 = te2.requestedGender ?? null, L2 = !Ga(C2) && !Ka(C2), Ve2 = L2 && !I2 && hs(ie2), R2 = I2 || L2 && _2 === `CUSTOMER_CANNOT_CHOOSE`, He2 = _2 !== void 0, Ue2 = Bo({ allowGenderSelection: v2, staffSelectionStrategy: _2 ?? null }) && L2 && !I2 && !Ve2, We2 = Ue2 && !y2, Ge2 = (0, import_react.useMemo)(() => F2 ? Ar(me2)?.services.find((e3) => e3.serviceId === F2) ?? null : null, [me2, F2]), Ke2 = (j2 ?? []).map((e3) => e3.staffMemberId).join(`,`), qe2 = Fe2.map((e3) => e3.id).join(`,`), Je2 = (0, import_react.useMemo)(() => Wc({ entry: Ge2, appointmentLike: L2, staffChoiceHidden: R2, staffPriced: Ve2, staffSelectionStrategy: _2, genderAllowed: We2, staffMemberIds: Ke2.split(`,`), locationIds: qe2.split(`,`) }), [Ge2, L2, R2, Ve2, _2, We2, Ke2, qe2]), z2 = Je2.staff, Ye2 = Je2.locationId, Xe2 = R2 || z2 !== null, [Ze2, Qe2] = (0, import_react.useState)(null), [$e2, et2] = (0, import_react.useState)(m2 !== null || P2), tt2 = (e3) => !!e3 && Fe2.some((t3) => t3.id === e3), nt2 = ue2?.locationId ?? null, rt2 = Ze2 ?? ($e2 ? tt2(nt2) ? nt2 : m2 : null), it2 = Ye2 ?? (tt2(rt2) ? rt2 : null), at2 = (0, import_react.useMemo)(() => Ye2 ? [] : Fe2.map((e3) => ({ id: e3.id, name: e3.label })), [x2, Ye2]), ot2 = (0, import_react.useMemo)(() => Xe2 ? [] : (j2 ?? []).filter((e3) => e3.name).map((e3) => ({ id: e3.staffMemberId, name: e3.name ?? ``, gender: null })), [j2, Xe2]), st2 = L2 && !He2 ? fl : ot2, ct2 = We2 && st2.length > 1, lt2 = (0, import_react.useMemo)(() => ct2 ? [...ml, ...st2] : st2, [ct2, st2]), [ut2, dt2] = (0, import_react.useState)(null), [ft2, pt2] = (0, import_react.useState)(h2 !== null), mt2 = ut2 ?? (ft2 ? h2 : null), B2 = z2 ? z2.anyResource ? null : z2.staffMemberId : mt2 !== null && ot2.some((e3) => e3.id === mt2) ? mt2 : null, ht2 = Le2?.anyResource ? Be2 : null, [gt2, _t2] = (0, import_react.useState)(ht2), [vt2, yt2] = (0, import_react.useState)(ht2);
2707
+ !y2 && Le2?.anyResource && Be2 !== vt2 && (yt2(Be2), _t2(Be2));
2708
+ let bt2 = z2 ? Je2.requestedGender : Ue2 && st2.length > 1 && B2 === null ? gt2 : null, V2 = y2 ? null : bt2, xt2 = (0, import_react.useCallback)((e3) => {
2709
+ Re2.current = e3, e3 ? e3.anyResource ? A2(V2 ?? void 0) : k2(e3.staffMemberId) : ne2();
2710
+ }, [ne2, A2, k2, V2]), St2 = (0, import_react.useCallback)((e3) => xt2(e3 ? { anyResource: false, staffMemberId: e3 } : { anyResource: true }), [xt2]), Ct2 = (ue2?.addOnIds ?? []).filter((e3) => x2?.addOnGroups?.some((t3) => t3.addOnIds?.includes(e3))), wt2 = ue2 && Ga(C2) ? ue2.participants : null, Tt2 = L2 ? Ja(te2) : null, { addOnIds: Et2, ...Dt2 } = Tt2 ?? {}, Ot2 = L2 && ue2 ? Ct2.length ? { ...Dt2, addOnIds: Ct2 } : Dt2 : Tt2, kt2 = Ot2 ? Jo(Ot2) : void 0, At2 = JSON.stringify(bt2 ? { ...kt2, requestedGender: { gender: bt2 } } : kt2 ?? null), jt2 = (0, import_react.useMemo)(() => JSON.parse(At2), [At2]), Mt2 = z2?.anyResource === true, Nt2 = (0, import_react.useCallback)((e3) => Mt2 || _2 !== void 0 && Bc({ isAppointment: L2, staffOnSlotCount: e3, hasStaffFilter: B2 !== null, hasRequestedGender: V2 !== null, hasStaffPricedVariants: Ve2, staffSelectionStrategy: _2 }), [Mt2, L2, _2, B2, V2, Ve2]), Pt2 = (0, import_react.useCallback)((e3) => z2 ?? (R2 ? null : e3), [z2, R2]), Ft2 = (0, import_react.useCallback)((e3) => {
2711
+ let t3 = e3 === null ? null : lt2.find((t4) => t4.id === e3);
2712
+ t3 !== void 0 && (pt2(false), dt2(t3 && !t3.gender ? t3.id : null), _t2(t3?.gender ?? null));
2713
+ }, [lt2]), It2 = (0, import_react.useCallback)((e3) => {
2714
+ (e3 === null || Fe2.some((t3) => t3.id === e3)) && (et2(false), Qe2(e3));
2715
+ }, [x2]), Lt2 = !!(i2 && !we2.isLoading && we2.displayTimeZonePolicy.customerCanChange && g2 && Pe2 && g2 !== Pe2), H2 = i2 ? Lt2 && t2 && (t2 === g2 || t2 === Pe2) ? t2 : Ce2 ?? g2 ?? Pe2 : null, Rt2 = (0, import_react.useCallback)((e3) => {
2716
+ Lt2 && (e3 === g2 || e3 === Pe2) && n2(e3);
2717
+ }, [Lt2, g2, Pe2, n2]), zt2 = (0, import_react.useMemo)(() => i2 && !M2 && be2 ? Date.now() : void 0, [i2, M2, F2, ye2, H2]), Bt2 = zt2 !== void 0 && H2 ? Co(new Date(zt2), H2) : null, { range: Vt2, daysAvailability: Ht2, isLoading: Ut2, hasError: Wt2, setRange: Gt2, nextRange: Kt2, previousRange: qt2 } = Ic({ enabled: i2, serviceId: F2, serviceType: C2, multiServiceRequest: ye2, timeZone: H2, today: Bt2, locationId: it2, staffId: B2, customerChoices: jt2, minRemainingCapacity: wt2, loadInitially: d2, onlyAvailableSlots: e2 }), Jt2 = de2?.slice(0, 10) ?? null, Yt2 = (0, import_react.useMemo)(() => Jt2 ? Ht2.map((e3) => e3.date > Jt2 ? { ...e3, availability: `none` } : e3) : Ht2, [Ht2, Jt2]), Xt2 = de2 && H2 ? Eo(new Date(de2), H2) : null, { query: U2, selectedDate: Zt2, timeSlots: Qt2, isLoading: $t2, error: en2, selectDate: tn2, findNextAvailableDate: nn2 } = Lc({ enabled: i2, serviceId: F2, serviceType: C2, multiServiceRequest: ye2, timeZone: H2, today: Bt2, locationId: it2, staffId: B2, customerChoices: jt2, minRemainingCapacity: wt2, onlyAvailableSlots: e2, serviceLoading: M2 }), rn2 = (0, import_react.useRef)(true), an2 = (0, import_react.useRef)(null);
2726
2718
  (0, import_react.useEffect)(() => {
2727
- if (an2.current) {
2728
- an2.current = false;
2719
+ if (rn2.current) {
2720
+ rn2.current = false;
2729
2721
  return;
2730
2722
  }
2731
- ke2(null), Le2.current && Cl(P2, T2, E2), Le2.current = null, on2.current = null;
2732
- }, [H2, be2, V2, at2, z2, Mt2, Tt2, e2, l2, f2, D2]);
2733
- let sn2 = (0, import_react.useCallback)(async () => {
2734
- let e3 = await rn2();
2735
- return e3.outcome === `found` ? Yt2 && e3.date > Yt2 ? `none` : (await Promise.all([nn2(e3.date), Ht2 && zo(e3.date, Ht2) ? Promise.resolve() : Kt2(Io(e3.date))]), `found`) : e3.outcome;
2736
- }, [rn2, Yt2, nn2, Ht2, Kt2]), cn2 = !!(i2 && !j2 && xe2 && V2 && Vt2), ln2 = i2 && !j2 && !xe2, [un2, dn2] = (0, import_react.useState)(false), [fn2, pn2] = (0, import_react.useState)(0), mn2 = (0, import_react.useRef)(false), hn2 = (0, import_react.useRef)([]), U2 = (0, import_react.useRef)(0), gn2 = (0, import_react.useCallback)(() => {
2737
- dn2(false);
2738
- let e3 = hn2.current;
2739
- return hn2.current = [], e3;
2740
- }, []), _n2 = (0, import_react.useCallback)(() => {
2741
- U2.current += 1, gn2().forEach((e3) => e3(`cancelled`));
2742
- }, [gn2]), vn2 = (0, import_react.useCallback)((e3) => (_n2(), nn2(e3)), [_n2, nn2]), yn2 = (0, import_react.useCallback)((e3) => {
2743
- let t3 = U2.current;
2744
- mn2.current = true, sn2().then((n3) => {
2745
- mn2.current = false, n3 === `cancelled` && t3 === U2.current ? (hn2.current.unshift(...e3), dn2(true)) : e3.forEach((e4) => e4(n3)), pn2((e4) => e4 + 1);
2723
+ Oe2(null), Ie2.current && bl(F2, T2, E2), Ie2.current = null, an2.current = null;
2724
+ }, [U2, ye2, H2, it2, B2, jt2, wt2, e2, l2, f2, D2]);
2725
+ let on2 = (0, import_react.useCallback)(async () => {
2726
+ let e3 = await nn2();
2727
+ return e3.outcome === `found` ? Jt2 && e3.date > Jt2 ? `none` : (await Promise.all([tn2(e3.date), Vt2 && Lo(e3.date, Vt2) ? Promise.resolve() : Gt2(Po(e3.date))]), `found`) : e3.outcome;
2728
+ }, [nn2, Jt2, tn2, Vt2, Gt2]), sn2 = !!(i2 && !M2 && be2 && H2 && Bt2), cn2 = i2 && !M2 && !be2, [ln2, un2] = (0, import_react.useState)(false), [dn2, fn2] = (0, import_react.useState)(0), pn2 = (0, import_react.useRef)(false), mn2 = (0, import_react.useRef)([]), W2 = (0, import_react.useRef)(0), hn2 = (0, import_react.useCallback)(() => {
2729
+ un2(false);
2730
+ let e3 = mn2.current;
2731
+ return mn2.current = [], e3;
2732
+ }, []), gn2 = (0, import_react.useCallback)(() => {
2733
+ W2.current += 1, hn2().forEach((e3) => e3(`cancelled`));
2734
+ }, [hn2]), _n2 = (0, import_react.useCallback)((e3) => (gn2(), tn2(e3)), [gn2, tn2]), vn2 = (0, import_react.useCallback)((e3) => {
2735
+ let t3 = W2.current;
2736
+ pn2.current = true, on2().then((n3) => {
2737
+ pn2.current = false, n3 === `cancelled` && t3 === W2.current ? (mn2.current.unshift(...e3), un2(true)) : e3.forEach((e4) => e4(n3)), fn2((e4) => e4 + 1);
2746
2738
  });
2747
- }, [sn2]), bn2 = (0, import_react.useCallback)(() => ln2 ? Promise.resolve(`none`) : new Promise((e3) => {
2748
- if (cn2 && !mn2.current) {
2749
- yn2([...gn2(), e3]);
2739
+ }, [on2]), yn2 = (0, import_react.useCallback)(() => cn2 ? Promise.resolve(`none`) : new Promise((e3) => {
2740
+ if (sn2 && !pn2.current) {
2741
+ vn2([...hn2(), e3]);
2750
2742
  return;
2751
2743
  }
2752
- hn2.current.push(e3), dn2(true);
2753
- }), [ln2, cn2, yn2, gn2]);
2744
+ mn2.current.push(e3), un2(true);
2745
+ }), [cn2, sn2, vn2, hn2]);
2754
2746
  (0, import_react.useEffect)(() => {
2755
- if (un2 && !mn2.current) {
2756
- if (ln2) {
2757
- gn2().forEach((e3) => e3(`none`));
2747
+ if (ln2 && !pn2.current) {
2748
+ if (cn2) {
2749
+ hn2().forEach((e3) => e3(`none`));
2758
2750
  return;
2759
2751
  }
2760
- cn2 && yn2(gn2());
2752
+ sn2 && vn2(hn2());
2761
2753
  }
2762
- }, [un2, fn2, cn2, ln2, yn2, gn2]);
2763
- let xn2 = x2?.schedule?.lastSessionEnd, Sn2 = I2 || Xa(C2) || Za(C2) && !Vc(xn2, Bt2), Cn2 = !!(Ae2 && i2 && !j2 && P2 && V2 && Bt2 !== void 0), wn2 = Cn2 && P2 && V2 && Bt2 !== void 0 ? Hc({ serviceId: P2, serviceType: C2, lastSessionEnd: xn2, timeZone: V2, now: Bt2, onlyAvailableSlots: e2, locationId: at2, staffId: z2, timeSlotLimitPerDay: f2, customerChoices: Mt2, minRemainingCapacity: Tt2 }) : void 0, W2 = dl(l2, wn2), Tn2 = Ae2 && P2 && Sn2 && !(Ae2 && P2 && Sn2 && (!i2 || j2)) && !V2, En2 = ve2 ? `onlineBookingOff` : ue2 ?? (W2.error === null ? Tn2 ? `timeZoneMissing` : null : `upcomingSlotsLoadFailed`), Dn2 = H2 !== null, On2 = (0, import_react.useMemo)(() => Yc({ sessions: W2.sessions, dayQuery: Dn2, daySlots: $t2, staffFilter: z2, appointmentLike: I2, limitPerDay: f2, expandedDates: W2.expandedDates }), [W2.sessions, Dn2, $t2, z2, I2, f2, W2.expandedDates]), { slotIdOf: kn2 } = On2, An2 = Ae2 && (wn2 ? W2.firstPageSettled : Cn2 || i2 && !j2 && !P2 || Tn2);
2764
- Ne2.current = An2, (0, import_react.useEffect)(() => {
2765
- if (!An2) return;
2766
- let e3 = Me2.current;
2767
- Me2.current = [], e3.forEach((e4) => e4());
2768
- }, [An2]);
2769
- let jn2 = Ae2 && !An2 || W2.isLoadingPage, Mn2 = En2 !== null, Nn2 = H2 ? en2 : jn2 || en2 || !i2 || xe2 && !V2 || un2 || le2, Pn2 = H2 ? tn2 : tn2 ?? En2, Fn2 = H2 ? tn2 !== null : Mn2 || tn2 !== null, In2 = hc(dc.TIME_SLOTS), Ln2 = (0, import_react.useRef)(false), Rn2 = (0, import_react.useCallback)((e3, t3) => {
2754
+ }, [ln2, dn2, sn2, cn2, vn2, hn2]);
2755
+ let bn2 = x2?.schedule?.lastSessionEnd, xn2 = L2 || Ga(C2) || Ka(C2) && !Rc(bn2, zt2), Sn2 = !!(ke2 && i2 && !M2 && F2 && H2 && zt2 !== void 0), Cn2 = Sn2 && F2 && H2 && zt2 !== void 0 ? zc({ serviceId: F2, serviceType: C2, lastSessionEnd: bn2, timeZone: H2, now: zt2, onlyAvailableSlots: e2, locationId: it2, staffId: B2, timeSlotLimitPerDay: f2, customerChoices: jt2, minRemainingCapacity: wt2 }) : void 0, G2 = cl(l2, Cn2), wn2 = ke2 && F2 && xn2 && !(ke2 && F2 && xn2 && (!i2 || M2)) && !H2, Tn2 = _e2 ? `onlineBookingOff` : le2 ?? (G2.error === null ? wn2 ? `timeZoneMissing` : null : `upcomingSlotsLoadFailed`), En2 = U2 !== null, Dn2 = (0, import_react.useMemo)(() => Kc({ sessions: G2.sessions, dayQuery: En2, daySlots: Qt2, staffFilter: B2, appointmentLike: L2, limitPerDay: f2, expandedDates: G2.expandedDates }), [G2.sessions, En2, Qt2, B2, L2, f2, G2.expandedDates]), { slotIdOf: On2 } = Dn2, kn2 = ke2 && (Cn2 ? G2.firstPageSettled : Sn2 || i2 && !M2 && !F2 || wn2);
2756
+ Me2.current = kn2, (0, import_react.useEffect)(() => {
2757
+ if (!kn2) return;
2758
+ let e3 = je2.current;
2759
+ je2.current = [], e3.forEach((e4) => e4());
2760
+ }, [kn2]);
2761
+ let An2 = ke2 && !kn2 || G2.isLoadingPage, jn2 = Tn2 !== null, Mn2 = U2 ? $t2 : An2 || $t2 || !i2 || be2 && !H2 || ln2 || ce2, Nn2 = U2 ? en2 : en2 ?? Tn2, Pn2 = U2 ? en2 !== null : jn2 || en2 !== null, Fn2 = fc(cc.TIME_SLOTS), In2 = (0, import_react.useRef)(false), Ln2 = (0, import_react.useCallback)((e3, t3) => {
2770
2762
  if (!t3.bookable) {
2771
- on2.current = null;
2763
+ an2.current = null;
2772
2764
  return;
2773
2765
  }
2774
- if (e3 === on2.current) return;
2775
- on2.current = e3;
2776
- let n3 = P2 ?? t3.serviceId ?? t3.nestedTimeSlots?.[0]?.serviceId ?? void 0, r2 = C2 ?? M2.find((e4) => e4._id === n3)?.type ?? void 0;
2777
- !Ln2.current && !N2 && In2(lc({ bookingsServiceId: n3, serviceType: r2, isEligibleForFlowCompletion: true })), Ln2.current = true, In2(_c({ component: pc.TIME_PICKER, element: mc.TIME_SLOT, properties: JSON.stringify({ selectedTime: t3.localStartDate }) }));
2778
- }, [In2, P2, C2, M2, N2]), zn2 = (0, import_react.useCallback)((e3) => {
2766
+ if (e3 === an2.current) return;
2767
+ an2.current = e3;
2768
+ let n3 = F2 ?? t3.serviceId ?? t3.nestedTimeSlots?.[0]?.serviceId ?? void 0, r2 = C2 ?? N2.find((e4) => e4._id === n3)?.type ?? void 0;
2769
+ !In2.current && !P2 && Fn2(oc({ bookingsServiceId: n3, serviceType: r2, isEligibleForFlowCompletion: true })), In2.current = true, Fn2(mc({ component: uc.TIME_PICKER, element: dc.TIME_SLOT, properties: JSON.stringify({ selectedTime: t3.localStartDate }) }));
2770
+ }, [Fn2, F2, C2, N2, P2]), Rn2 = (0, import_react.useCallback)((e3) => {
2779
2771
  if (e3 === null) {
2780
- let e4 = Le2.current !== null;
2781
- Le2.current = null, on2.current = null, ke2(null), e4 && Cl(P2, T2, E2);
2772
+ let e4 = Ie2.current !== null;
2773
+ Ie2.current = null, an2.current = null, Oe2(null), e4 && bl(F2, T2, E2);
2782
2774
  return;
2783
2775
  }
2784
- let t3 = Xc(On2, e3);
2776
+ let t3 = qc(Dn2, e3);
2785
2777
  if (!t3) return;
2786
- if (F2) {
2787
- if (!ee2(t3.nestedTimeSlots ?? [], V2 ?? void 0)) return;
2788
- Le2.current = t3, ke2(t3), Rn2(e3, t3);
2778
+ if (I2) {
2779
+ if (!ee2(t3.nestedTimeSlots ?? [], H2 ?? void 0)) return;
2780
+ Ie2.current = t3, Oe2(t3), Ln2(e3, t3);
2789
2781
  return;
2790
2782
  }
2791
- Le2.current = t3, ke2(t3), Rn2(e3, t3);
2792
- let n3 = el(t3);
2793
- if (w2(gs(t3), { staffId: I2 ? void 0 : $c(t3), timezone: V2 ?? void 0, bookable: t3.bookable, staffChoiceRequired: I2 && Ue2 && !L2 && n3.length > 1 && !Pt2(n3.length), rescheduleStaffId: I2 && (_2 !== `CUSTOMER_MAY_CHOOSE` || !Pt2(n3.length)) ? n3[0] : void 0 }), !I2) return;
2794
- let r2 = ze2.current, i3;
2795
- i3 = R2 || (z2 && n3.includes(z2) ? { anyResource: false, staffMemberId: z2 } : B2 !== null && Pt2(n3.length) ? { anyResource: true } : Wc(n3, Ue2 && Pt2(n3.length))), ml(i3, B2) !== ml(r2, Ve2) && St2(i3);
2796
- }, [F2, P2, T2, E2, ee2, w2, On2, Rn2, V2, I2, Ue2, _2, Pt2, R2, z2, B2, Ve2, St2]), Bn2 = (0, import_react.useCallback)(() => {
2797
- let e3 = Le2.current;
2798
- if (!e3 || N2) return;
2799
- if (F2) {
2800
- te2(In2);
2783
+ Ie2.current = t3, Oe2(t3), Ln2(e3, t3);
2784
+ let n3 = Zc(t3);
2785
+ if (w2(ms(t3), { staffId: L2 ? void 0 : Xc(t3), timezone: H2 ?? void 0, bookable: t3.bookable, staffChoiceRequired: L2 && He2 && !R2 && n3.length > 1 && !Nt2(n3.length), rescheduleStaffId: L2 && (_2 !== `CUSTOMER_MAY_CHOOSE` || !Nt2(n3.length)) ? n3[0] : void 0 }), !L2) return;
2786
+ let r2 = Re2.current, i3;
2787
+ i3 = z2 || (B2 && n3.includes(B2) ? { anyResource: false, staffMemberId: B2 } : V2 !== null && Nt2(n3.length) ? { anyResource: true } : Vc(n3, He2 && Nt2(n3.length))), dl(i3, V2) !== dl(r2, Be2) && xt2(i3);
2788
+ }, [I2, F2, T2, E2, ee2, w2, Dn2, Ln2, H2, L2, He2, _2, Nt2, z2, B2, V2, Be2, xt2]), zn2 = (0, import_react.useCallback)(() => {
2789
+ let e3 = Ie2.current;
2790
+ if (!e3 || P2) return;
2791
+ if (I2) {
2792
+ O2(Fn2);
2801
2793
  return;
2802
2794
  }
2803
- if (!P2) return;
2795
+ if (!F2) return;
2804
2796
  let t3;
2805
- if (I2) {
2806
- let n4 = el(e3), r2 = Gc(n4, Ft2(ze2.current), Pt2(n4.length));
2797
+ if (L2) {
2798
+ let n4 = Zc(e3), r2 = Hc(n4, Pt2(Re2.current), Nt2(n4.length));
2807
2799
  t3 = (r2.isComplete ? r2.resourceId : n4[0]) ?? (n4.length ? null : void 0);
2808
2800
  }
2809
- let n3 = De2(`bookingForm`, { slug: x2?.mainSlug?.name ?? null, serviceId: P2 });
2810
- e3.bookable && In2(bc({ serviceId: P2, serviceType: C2 ?? void 0, start: e3.localStartDate, end: e3.localEndDate, timeZone: V2 ?? void 0, isEligibleForFlowCompletion: !!n3 })), n3 && Ee2(ie2(n3, { handoff: true, staffId: t3 }));
2811
- }, [In2, F2, te2, V2, P2, C2, x2, I2, Ft2, Pt2, Ee2, De2, ie2, N2]), Vn2 = Oe2 ? el(Oe2) : null, Hn2 = Vn2 ? F2 || !I2 || Gc(Vn2, Ft2(Re2), Pt2(Vn2.length)).isComplete : false, G2 = Vn2 ? Pt2(Vn2.length) : false, Un2 = (0, import_react.useMemo)(() => !Oe2 || Ze2 ? [] : Qc(Oe2).map((e3) => ({ staffMemberId: e3.staffMemberId, name: e3.name || null, image: null, isSelected: e3.staffMemberId === Be2 })), [Oe2, Ze2, Be2]), Wn2 = (0, import_react.useMemo)(() => ({ ...vl, isMultiService: F2, hasValidSchedulingInput: xe2, availabilityRequestKey: Se2, needsServiceChoice: Ce2, isRescheduling: N2, rescheduleValidUntil: Zt2, businessTimeZone: g2, canChangeTimeZone: Rt2, setTimeZone: zt2, locationFilterOptions: ot2, selectedLocationFilter: at2, setLocationFilter: Lt2, staffFilterOptions: ut2, selectedStaffFilter: z2, setStaffFilter: It2, requestedGender: B2, genderSelectionAllowed: Ge2, currentTimeSlotsPage: H2 ? 1 : W2.currentPage, hasNextTimeSlotsPage: !H2 && W2.hasNextPage, hasPreviousTimeSlotsPage: !H2 && W2.hasPreviousPage, nextTimeSlotsPage: H2 ? bl : W2.nextPage, loadUpcomingTimeSlots: Pe2, upcomingTimeSlotsRequested: Ae2, previousTimeSlotsPage: H2 ? yl : W2.previousPage, timeSlots: On2.rows.map((e3) => Zc(e3, V2, kn2, L2)), isLoading: Nn2, hasError: Fn2, errorCode: Pn2, selectedDate: Qt2, daysAvailabilityRange: Ht2, daysAvailability: Xt2, daysAvailabilityLoading: Wt2, daysAvailabilityHasError: Gt2, timeSlotsLoading: Nn2, timeSlotsErrorCode: Pn2, selectDate: vn2, setDaysAvailabilityRange: Kt2, nextDaysAvailabilityRange: qt2, previousDaysAvailabilityRange: Jt2, goToNextAvailableDate: bn2, nextAvailableSlotsCount: l2, timeZone: V2, staffFromSlots: Un2, selectedResourceId: Be2, setSelectedResource: Ct2, canAutoAssignStaff: G2, isComplete: Hn2, selectedTimeSlot: Oe2 ? Zc(Oe2, V2, kn2, L2) : null, selectTimeSlot: zn2, navigateToBookingForm: Bn2, timeSlotLimitPerDay: f2, expandedDates: W2.expandedDates, daysWithMore: On2.daysWithMore, loadingDate: W2.loadingDate, loadAllTimeSlotsForDay: W2.loadAllSessionsForDay }), [F2, xe2, Se2, Ce2, N2, Zt2, g2, V2, Rt2, zt2, W2, Pe2, Ae2, ot2, at2, Lt2, ut2, z2, It2, B2, Ge2, H2, Nn2, Pn2, Fn2, On2, Qt2, Ht2, Xt2, Wt2, Gt2, vn2, Kt2, qt2, Jt2, bn2, l2, Un2, Be2, Ct2, G2, Hn2, Oe2, zn2, Bn2, f2, kn2, L2]);
2812
- return (0, import_jsx_runtime.jsx)(xl.Provider, { value: Wn2, children: b2 });
2801
+ let n3 = Ee2(`bookingForm`, { slug: x2?.mainSlug?.name ?? null, serviceId: F2 });
2802
+ e3.bookable && Fn2(_c({ serviceId: F2, serviceType: C2 ?? void 0, start: e3.localStartDate, end: e3.localEndDate, timeZone: H2 ?? void 0, isEligibleForFlowCompletion: !!n3 })), n3 && Te2(re2(n3, { handoff: true, staffId: t3 }));
2803
+ }, [Fn2, I2, O2, H2, F2, C2, x2, L2, Pt2, Nt2, Te2, Ee2, re2, P2]), Bn2 = De2 ? Zc(De2) : null, Vn2 = Bn2 ? I2 || !L2 || Hc(Bn2, Pt2(Le2), Nt2(Bn2.length)).isComplete : false, K2 = Bn2 ? Nt2(Bn2.length) : false, Hn2 = (0, import_react.useMemo)(() => !De2 || Xe2 ? [] : Yc(De2).map((e3) => ({ staffMemberId: e3.staffMemberId, name: e3.name || null, image: null, isSelected: e3.staffMemberId === ze2 })), [De2, Xe2, ze2]), Un2 = (0, import_react.useMemo)(() => ({ ...hl, isMultiService: I2, hasValidSchedulingInput: be2, availabilityRequestKey: xe2, needsServiceChoice: Se2, isRescheduling: P2, rescheduleValidUntil: Xt2, businessTimeZone: g2, canChangeTimeZone: Lt2, setTimeZone: Rt2, locationFilterOptions: at2, selectedLocationFilter: it2, setLocationFilter: It2, staffFilterOptions: lt2, selectedStaffFilter: B2, setStaffFilter: Ft2, requestedGender: V2, genderSelectionAllowed: We2, currentTimeSlotsPage: U2 ? 1 : G2.currentPage, hasNextTimeSlotsPage: !U2 && G2.hasNextPage, hasPreviousTimeSlotsPage: !U2 && G2.hasPreviousPage, nextTimeSlotsPage: U2 ? _l : G2.nextPage, loadUpcomingTimeSlots: Ne2, upcomingTimeSlotsRequested: ke2, previousTimeSlotsPage: U2 ? gl : G2.previousPage, timeSlots: Dn2.rows.map((e3) => Jc(e3, H2, On2, R2)), isLoading: Mn2, hasError: Pn2, errorCode: Nn2, selectedDate: Zt2, daysAvailabilityRange: Vt2, daysAvailability: Yt2, daysAvailabilityLoading: Ut2, daysAvailabilityHasError: Wt2, timeSlotsLoading: Mn2, timeSlotsErrorCode: Nn2, selectDate: _n2, setDaysAvailabilityRange: Gt2, nextDaysAvailabilityRange: Kt2, previousDaysAvailabilityRange: qt2, goToNextAvailableDate: yn2, nextAvailableSlotsCount: l2, timeZone: H2, staffFromSlots: Hn2, selectedResourceId: ze2, setSelectedResource: St2, canAutoAssignStaff: K2, isComplete: Vn2, selectedTimeSlot: De2 ? Jc(De2, H2, On2, R2) : null, selectTimeSlot: Rn2, navigateToBookingForm: zn2, timeSlotLimitPerDay: f2, expandedDates: G2.expandedDates, daysWithMore: Dn2.daysWithMore, loadingDate: G2.loadingDate, loadAllTimeSlotsForDay: G2.loadAllSessionsForDay }), [I2, be2, xe2, Se2, P2, Xt2, g2, H2, Lt2, Rt2, G2, Ne2, ke2, at2, it2, It2, lt2, B2, Ft2, V2, We2, U2, Mn2, Nn2, Pn2, Dn2, Zt2, Vt2, Yt2, Ut2, Wt2, _n2, Gt2, Kt2, qt2, yn2, l2, Hn2, ze2, St2, K2, Vn2, De2, Rn2, zn2, f2, On2, R2]);
2804
+ return (0, import_jsx_runtime.jsx)(vl.Provider, { value: Un2, children: b2 });
2813
2805
  }
2814
- var Al = on;
2806
+ var Dl = an;
2815
2807
  // Annotate the CommonJS export names for ESM import in node:
2816
2808
  0 && (module.exports = {
2817
2809
  TimeSlotsContextProvider,
@@ -2819,4 +2811,4 @@ var Al = on;
2819
2811
  timeSlotsContext,
2820
2812
  useTimeSlotsContext
2821
2813
  });
2822
- //# sourceMappingURL=context-time-slots-context.js.map
2814
+ //# sourceMappingURL=context-time-slots.js.map