@wix/bookings 1.0.1772 → 1.0.1774
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_sdk-exports/context-categories/runtime.js +2 -2
- package/_sdk-exports/context-locations/runtime.js +2 -2
- package/_sdk-exports/context-service/runtime.js +3 -3
- package/_sdk-exports/context-service-addons/runtime.js +2 -2
- package/_sdk-exports/context-services/runtime.js +3 -3
- package/build/cjs/context-categories.js +1774 -632
- package/build/cjs/context-categories.js.map +1 -1
- package/build/cjs/context-locations.js +1812 -670
- package/build/cjs/context-locations.js.map +1 -1
- package/build/cjs/context-service-addons.js +1858 -716
- package/build/cjs/context-service-addons.js.map +1 -1
- package/build/cjs/context-service.js +4413 -3286
- package/build/cjs/context-service.js.map +1 -1
- package/build/cjs/context-services.js +2410 -1268
- package/build/cjs/context-services.js.map +1 -1
- package/build/es/context-categories.mjs +1774 -632
- package/build/es/context-categories.mjs.map +1 -1
- package/build/es/context-locations.mjs +1812 -670
- package/build/es/context-locations.mjs.map +1 -1
- package/build/es/context-service-addons.mjs +1858 -716
- package/build/es/context-service-addons.mjs.map +1 -1
- package/build/es/context-service.mjs +4413 -3286
- package/build/es/context-service.mjs.map +1 -1
- package/build/es/context-services.mjs +2411 -1269
- package/build/es/context-services.mjs.map +1 -1
- package/package.json +6 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// _sdk-exports/context-services/runtime.js
|
|
2
2
|
import { Component as e, Suspense as t, createContext as n, startTransition as r, useCallback as i, useContext as a, useDeferredValue as o, useEffect as s, useMemo as c, useRef as l, useState as u, useSyncExternalStore as d } from "react";
|
|
3
3
|
import { useGetService as f, useService as p } from "@wix/services-manager-react";
|
|
4
|
-
import { jsx as m, jsxs as
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
return () => ({ __type: `event-definition`, type:
|
|
4
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
5
|
+
var g = {};
|
|
6
|
+
function _(e5, t2 = false, n2 = (e6) => e6) {
|
|
7
|
+
return () => ({ __type: `event-definition`, type: e5, isDomainEvent: t2, transformations: n2 });
|
|
8
8
|
}
|
|
9
|
-
var
|
|
10
|
-
switch (
|
|
9
|
+
var v = (e5) => {
|
|
10
|
+
switch (e5) {
|
|
11
11
|
case `get`:
|
|
12
12
|
case `GET`:
|
|
13
13
|
return `GET`;
|
|
@@ -30,73 +30,73 @@ var _ = (e2) => {
|
|
|
30
30
|
case `OPTIONS`:
|
|
31
31
|
return `OPTIONS`;
|
|
32
32
|
default:
|
|
33
|
-
throw Error(`Unknown method: ${
|
|
33
|
+
throw Error(`Unknown method: ${e5}`);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
var
|
|
36
|
+
var y = (e5) => (t2) => async (n2) => {
|
|
37
37
|
let r2, i2 = (t3) => {
|
|
38
|
-
if (r2 =
|
|
38
|
+
if (r2 = e5(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
|
|
39
39
|
let { method: i3, url: a2, params: o2 } = r2;
|
|
40
|
-
return { ...r2, method:
|
|
40
|
+
return { ...r2, method: v(i3), url: a2, data: r2.data, params: o2 };
|
|
41
41
|
};
|
|
42
42
|
try {
|
|
43
|
-
let
|
|
43
|
+
let e6 = await t2.request(i2);
|
|
44
44
|
if (r2 === void 0) throw Error(`Request options were not created for this request, please reach out to support channels for assistance.`);
|
|
45
|
-
let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 =
|
|
45
|
+
let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 = e6.data;
|
|
46
46
|
return n3.forEach((t3) => {
|
|
47
|
-
t3 && (a2 = t3(
|
|
47
|
+
t3 && (a2 = t3(e6.data, e6.headers));
|
|
48
48
|
}), a2;
|
|
49
|
-
} catch (
|
|
50
|
-
throw typeof
|
|
49
|
+
} catch (e6) {
|
|
50
|
+
throw typeof e6 == `object` && e6 && `response` in e6 && typeof e6.response == `object` && e6.response !== null && `data` in e6.response ? e6.response.data : e6;
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
53
|
+
var b = (e5) => e5.__isAmbassador ? true : !!e5().__isAmbassador;
|
|
54
|
+
var x = `__metadata`;
|
|
55
|
+
var S = `edge.wixapis.com`;
|
|
56
|
+
var ee = class extends Error {
|
|
57
57
|
message;
|
|
58
58
|
response;
|
|
59
|
-
constructor(
|
|
60
|
-
super(
|
|
59
|
+
constructor(e5, t2) {
|
|
60
|
+
super(e5), this.message = e5, this.response = t2;
|
|
61
61
|
}
|
|
62
62
|
async details() {
|
|
63
|
-
let
|
|
64
|
-
return
|
|
63
|
+
let e5 = await this.response.json();
|
|
64
|
+
return C(this.response.status, e5?.message, e5?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e5 });
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
function
|
|
72
|
-
return
|
|
73
|
-
}
|
|
74
|
-
var
|
|
75
|
-
function
|
|
76
|
-
return { [
|
|
77
|
-
}
|
|
78
|
-
function
|
|
79
|
-
return Object.entries(
|
|
80
|
-
}
|
|
81
|
-
function
|
|
82
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
83
|
-
globalThis.__wix_context__ = void 0,
|
|
67
|
+
var C = (e5, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
|
|
68
|
+
var w = (e5) => e5?.method && [`post`, `put`, `patch`].includes(e5.method.toLocaleLowerCase()) && e5.body ? { "Content-Type": `application/json` } : {};
|
|
69
|
+
var T = (e5) => e5 && typeof e5 == `object` && !Array.isArray(e5);
|
|
70
|
+
var E = (e5) => e5.__type === `host`;
|
|
71
|
+
function D(e5, t2) {
|
|
72
|
+
return e5.create(t2);
|
|
73
|
+
}
|
|
74
|
+
var O = `x-wix-bi-gateway`;
|
|
75
|
+
function te(e5, t2, n2) {
|
|
76
|
+
return { [O]: ne({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e5.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e5.methodFqn, entity: e5.entityFqdn }) };
|
|
77
|
+
}
|
|
78
|
+
function ne(e5) {
|
|
79
|
+
return Object.entries(e5).filter(([e6, t2]) => !!t2).map(([e6, t2]) => `${e6}=${t2}`).join(`,`);
|
|
80
|
+
}
|
|
81
|
+
function re(e5) {
|
|
82
|
+
let t2 = globalThis.__wix_context__, n2 = { client: g.client, elevatedClient: g.elevatedClient }, r2;
|
|
83
|
+
globalThis.__wix_context__ = void 0, g.client = void 0, g.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
84
84
|
try {
|
|
85
|
-
return
|
|
85
|
+
return e5();
|
|
86
86
|
} finally {
|
|
87
|
-
globalThis.__wix_context__ = t2,
|
|
87
|
+
globalThis.__wix_context__ = t2, g.client = n2.client, g.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
var
|
|
91
|
-
function
|
|
92
|
-
return ue(
|
|
90
|
+
var ie = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
91
|
+
function ae(e5) {
|
|
92
|
+
return ue(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
|
|
93
93
|
}
|
|
94
94
|
var oe = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
95
95
|
var se = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
96
96
|
var ce = `$1\0$2`;
|
|
97
97
|
var le = /[^\p{L}\d]+/giu;
|
|
98
|
-
function ue(
|
|
99
|
-
let t2 =
|
|
98
|
+
function ue(e5) {
|
|
99
|
+
let t2 = e5.trim();
|
|
100
100
|
t2 = t2.replace(oe, ce).replace(se, ce), t2 = t2.replace(le, `\0`);
|
|
101
101
|
let n2 = 0, r2 = t2.length;
|
|
102
102
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
@@ -104,110 +104,110 @@ function ue(e2) {
|
|
|
104
104
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
105
105
|
return t2.slice(n2, r2).split(/\0/g);
|
|
106
106
|
}
|
|
107
|
-
var de = (
|
|
108
|
-
var fe = (
|
|
109
|
-
var pe = (
|
|
110
|
-
function me(
|
|
111
|
-
if (typeof
|
|
112
|
-
if (de(
|
|
113
|
-
if (fe(
|
|
114
|
-
if (pe(
|
|
115
|
-
let t3 =
|
|
116
|
-
return ge(
|
|
117
|
-
}
|
|
118
|
-
return ve(
|
|
119
|
-
}
|
|
120
|
-
var he = (
|
|
121
|
-
let r2 =
|
|
122
|
-
return ge(
|
|
123
|
-
};
|
|
124
|
-
var ge = (
|
|
125
|
-
var _e = (
|
|
126
|
-
let t2 =
|
|
127
|
-
return ge(
|
|
128
|
-
};
|
|
129
|
-
var ve = (
|
|
130
|
-
var ye = ({ spreadPathsToArguments:
|
|
131
|
-
let a2 = { ...
|
|
132
|
-
return r2?.filter((
|
|
133
|
-
let r3 = t2[
|
|
134
|
-
if (r3) return { ...
|
|
135
|
-
let s2 = o2?.sort((
|
|
107
|
+
var de = (e5) => `validationError` in (e5.response?.data?.details ?? {});
|
|
108
|
+
var fe = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
|
|
109
|
+
var pe = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
|
|
110
|
+
function me(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
111
|
+
if (typeof e5 != `object` || !e5) throw e5;
|
|
112
|
+
if (de(e5)) return he(e5, t2, n2);
|
|
113
|
+
if (fe(e5)) return _e(e5);
|
|
114
|
+
if (pe(e5)) {
|
|
115
|
+
let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ae(n3), data: {} }, requestId: e5.requestId };
|
|
116
|
+
return ge(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
117
|
+
}
|
|
118
|
+
return ve(e5);
|
|
119
|
+
}
|
|
120
|
+
var he = (e5, t2, n2) => {
|
|
121
|
+
let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ye(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
|
|
122
|
+
return ge(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
|
|
123
|
+
};
|
|
124
|
+
var ge = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
|
|
125
|
+
var _e = (e5) => {
|
|
126
|
+
let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? ae(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
|
|
127
|
+
return ge(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
|
|
128
|
+
};
|
|
129
|
+
var ve = (e5) => ge(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: ae(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
|
|
130
|
+
var ye = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
131
|
+
let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
|
|
132
|
+
return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
|
|
133
|
+
let r3 = t2[e6.field];
|
|
134
|
+
if (r3) return { ...e6, field: be(r3, i2) };
|
|
135
|
+
let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
|
|
136
136
|
if (s2) {
|
|
137
137
|
let t3 = a2[s2];
|
|
138
|
-
if (t3) return { ...
|
|
138
|
+
if (t3) return { ...e6, field: e6.field.replace(s2, be(t3, i2)) };
|
|
139
139
|
}
|
|
140
|
-
return n2 ? { ...
|
|
140
|
+
return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
|
|
141
141
|
});
|
|
142
142
|
};
|
|
143
|
-
var be = (
|
|
144
|
-
let n2 = xe(
|
|
145
|
-
return n2 == null ?
|
|
143
|
+
var be = (e5, t2) => {
|
|
144
|
+
let n2 = xe(e5);
|
|
145
|
+
return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
|
|
146
146
|
};
|
|
147
|
-
var xe = (
|
|
148
|
-
let t2 =
|
|
147
|
+
var xe = (e5) => {
|
|
148
|
+
let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
|
|
149
149
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
150
150
|
};
|
|
151
|
-
function Se(
|
|
152
|
-
return
|
|
153
|
-
let i3 =
|
|
151
|
+
function Se(e5, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
152
|
+
return re(() => e5({ request: async (e6) => {
|
|
153
|
+
let i3 = e6({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
|
|
154
154
|
a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
|
|
155
|
-
let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ?
|
|
155
|
+
let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? S : o3}${a3.url}`;
|
|
156
156
|
a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
|
|
157
157
|
try {
|
|
158
|
-
let
|
|
158
|
+
let e7 = te(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e7 } }, s3 = await n2(u3, o4);
|
|
159
159
|
if (s3.status !== 200) {
|
|
160
|
-
let
|
|
160
|
+
let e8 = null;
|
|
161
161
|
try {
|
|
162
|
-
|
|
162
|
+
e8 = await s3.json();
|
|
163
163
|
} catch {
|
|
164
164
|
}
|
|
165
|
-
let t3 = we(s3.status,
|
|
165
|
+
let t3 = we(s3.status, e8?.message ?? s3.statusText, e8?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e8 }), n3 = me(t3);
|
|
166
166
|
throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
|
|
167
167
|
}
|
|
168
168
|
let l3 = await s3.json();
|
|
169
169
|
return { data: a3.migrationOptions?.optInTransformResponse && a3.transformResponse ? Array.isArray(a3.transformResponse) ? a3.transformResponse[0](l3) : a3.transformResponse(l3) : l3, headers: s3.headers, status: s3.status, statusText: s3.statusText };
|
|
170
|
-
} catch (
|
|
171
|
-
throw
|
|
170
|
+
} catch (e7) {
|
|
171
|
+
throw e7.message?.includes(`fetch is not defined`) && console.error(`Node.js v18+ is required`), e7;
|
|
172
172
|
}
|
|
173
173
|
}, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
|
|
174
174
|
}
|
|
175
175
|
var Ce = class extends Error {
|
|
176
176
|
response;
|
|
177
177
|
requestId;
|
|
178
|
-
constructor(
|
|
179
|
-
super(), this.response =
|
|
178
|
+
constructor(e5) {
|
|
179
|
+
super(), this.response = e5.response, this.requestId = e5.requestId;
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
|
-
var we = (
|
|
182
|
+
var we = (e5, t2, n2, r2) => new Ce({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e5, data: r2 } }, ...n2 }, message: t2 }, status: e5 }, requestId: r2?.requestId });
|
|
183
183
|
var Te = `.`;
|
|
184
|
-
function Ee(
|
|
185
|
-
if (
|
|
186
|
-
let r2 = De(t2), i2 =
|
|
187
|
-
for (let
|
|
188
|
-
let t3 = r2[
|
|
189
|
-
if (
|
|
184
|
+
function Ee(e5, t2, n2) {
|
|
185
|
+
if (e5 == null) throw Error(`Cannot set value on null or undefined`);
|
|
186
|
+
let r2 = De(t2), i2 = e5;
|
|
187
|
+
for (let e6 = 0; e6 < r2.length; e6++) {
|
|
188
|
+
let t3 = r2[e6];
|
|
189
|
+
if (e6 === r2.length - 1) {
|
|
190
190
|
i2[t3] = n2;
|
|
191
191
|
break;
|
|
192
192
|
}
|
|
193
|
-
let a2 = r2[
|
|
193
|
+
let a2 = r2[e6 + 1];
|
|
194
194
|
(!(t3 in i2) || i2[t3] == null || typeof i2[t3] != `object` || i2[t3] === null) && (i2[t3] = typeof a2 == `number` ? [] : {}), i2 = i2[t3];
|
|
195
195
|
}
|
|
196
|
-
return
|
|
196
|
+
return e5;
|
|
197
197
|
}
|
|
198
|
-
function De(
|
|
199
|
-
return Array.isArray(
|
|
198
|
+
function De(e5) {
|
|
199
|
+
return Array.isArray(e5) ? e5 : e5.split(Te).map((e6) => Oe(e6) ? Number(e6) : e6);
|
|
200
200
|
}
|
|
201
|
-
function Oe(
|
|
202
|
-
return /^\d+$/.test(
|
|
201
|
+
function Oe(e5) {
|
|
202
|
+
return /^\d+$/.test(e5);
|
|
203
203
|
}
|
|
204
|
-
function ke(
|
|
204
|
+
function ke(e5) {
|
|
205
205
|
let t2 = {};
|
|
206
|
-
for (let [n2, r2] of Object.entries(
|
|
206
|
+
for (let [n2, r2] of Object.entries(e5)) Ae(n2) || Ee(t2, De(n2), r2);
|
|
207
207
|
return t2;
|
|
208
208
|
}
|
|
209
|
-
function Ae(
|
|
210
|
-
return
|
|
209
|
+
function Ae(e5) {
|
|
210
|
+
return e5 === `__proto__` || e5 === `constructor` || e5 === `prototype`;
|
|
211
211
|
}
|
|
212
212
|
var je = class {
|
|
213
213
|
BRACKET_PATTERN = /\[(\d+)\]/g;
|
|
@@ -222,376 +222,376 @@ var je = class {
|
|
|
222
222
|
ESCAPED_LEFT_BRACKET_PLACEHOLDER = `__LB__`;
|
|
223
223
|
modifiedFields;
|
|
224
224
|
cleanedModifiedFields;
|
|
225
|
-
constructor(
|
|
226
|
-
this.modifiedFields =
|
|
225
|
+
constructor(e5) {
|
|
226
|
+
this.modifiedFields = e5;
|
|
227
227
|
}
|
|
228
|
-
replaceEscapedCharacters(
|
|
229
|
-
return
|
|
228
|
+
replaceEscapedCharacters(e5) {
|
|
229
|
+
return e5.replace(this.ESCAPED_DOT_PATTERN, this.ESCAPED_DOT_PLACEHOLDER).replace(this.ESCAPED_LEFT_BRACKET_PATTERN, this.ESCAPED_LEFT_BRACKET_PLACEHOLDER).replace(this.ESCAPED_RIGHT_BRACKET_PATTERN, this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER);
|
|
230
230
|
}
|
|
231
|
-
restoreEscapedCharacters(
|
|
232
|
-
return
|
|
231
|
+
restoreEscapedCharacters(e5) {
|
|
232
|
+
return e5.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
|
|
233
233
|
}
|
|
234
234
|
unflatten() {
|
|
235
|
-
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([
|
|
235
|
+
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e5, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e5)), t2])), ke(this.cleanedModifiedFields);
|
|
236
236
|
}
|
|
237
|
-
flatten(
|
|
237
|
+
flatten(e5) {
|
|
238
238
|
let t2 = {};
|
|
239
239
|
for (let n2 of Object.keys(this.cleanedModifiedFields)) {
|
|
240
|
-
let r2 = this.splitPath(n2), i2 = this.navigatePath(
|
|
240
|
+
let r2 = this.splitPath(n2), i2 = this.navigatePath(e5, r2);
|
|
241
241
|
t2 = { ...t2, ...i2 };
|
|
242
242
|
}
|
|
243
|
-
return Object.fromEntries(Object.entries(t2).map(([
|
|
243
|
+
return Object.fromEntries(Object.entries(t2).map(([e6, t3]) => [this.restoreEscapedCharacters(e6), t3]));
|
|
244
244
|
}
|
|
245
|
-
splitPath(
|
|
246
|
-
let t2 = [], n2 = 0, r2 = Array.from(
|
|
247
|
-
for (let i2 of r2) i2.index > n2 && t2.push(
|
|
248
|
-
return n2 <
|
|
245
|
+
splitPath(e5) {
|
|
246
|
+
let t2 = [], n2 = 0, r2 = Array.from(e5.matchAll(this.SPLIT_PATTERN));
|
|
247
|
+
for (let i2 of r2) i2.index > n2 && t2.push(e5.substring(n2, i2.index)), i2[1] && t2.push(i2[1]), n2 = i2.index + i2[0].length;
|
|
248
|
+
return n2 < e5.length && t2.push(e5.substring(n2)), t2;
|
|
249
249
|
}
|
|
250
|
-
navigatePath(
|
|
251
|
-
let n2 =
|
|
250
|
+
navigatePath(e5, t2) {
|
|
251
|
+
let n2 = e5, r2 = [], i2 = (e6) => {
|
|
252
252
|
if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
|
|
253
|
-
r2.push(`[${
|
|
254
|
-
}, a2 = (
|
|
255
|
-
let i3 =
|
|
253
|
+
r2.push(`[${e6}]`), n2 = n2[parseInt(e6, 10)];
|
|
254
|
+
}, a2 = (e6, t3) => {
|
|
255
|
+
let i3 = e6 in ie ? ie[e6] : void 0;
|
|
256
256
|
if (i3 && i3 in t3) {
|
|
257
257
|
r2.push(i3), n2 = t3[i3];
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
260
|
-
let a3 = Fe(
|
|
260
|
+
let a3 = Fe(e6);
|
|
261
261
|
if (a3 && a3 in t3) {
|
|
262
262
|
r2.push(a3), n2 = t3[a3];
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
|
-
throw Error(`Cannot find key '${
|
|
266
|
-
}, o2 = (
|
|
267
|
-
r2.push(
|
|
265
|
+
throw Error(`Cannot find key '${e6}' or its transformations at path ${this.buildPathString(r2)}`);
|
|
266
|
+
}, o2 = (e6, t3) => {
|
|
267
|
+
r2.push(e6), n2 = t3[e6];
|
|
268
268
|
};
|
|
269
|
-
for (let
|
|
270
|
-
if (this.NUMERIC_PATTERN.test(
|
|
271
|
-
i2(
|
|
269
|
+
for (let e6 of t2) {
|
|
270
|
+
if (this.NUMERIC_PATTERN.test(e6)) {
|
|
271
|
+
i2(e6);
|
|
272
272
|
continue;
|
|
273
273
|
}
|
|
274
|
-
if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${
|
|
274
|
+
if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e6}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
|
|
275
275
|
let t3 = n2;
|
|
276
|
-
if (
|
|
277
|
-
o2(
|
|
276
|
+
if (e6 in n2) {
|
|
277
|
+
o2(e6, t3);
|
|
278
278
|
continue;
|
|
279
279
|
}
|
|
280
|
-
a2(
|
|
280
|
+
a2(e6, t3);
|
|
281
281
|
}
|
|
282
282
|
return { [this.buildPathString(r2)]: n2 };
|
|
283
283
|
}
|
|
284
|
-
buildPathString(
|
|
285
|
-
return
|
|
284
|
+
buildPathString(e5) {
|
|
285
|
+
return e5.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN, `[`);
|
|
286
286
|
}
|
|
287
|
-
bracketToDotNotation(
|
|
288
|
-
return
|
|
287
|
+
bracketToDotNotation(e5) {
|
|
288
|
+
return e5.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e5[r2 - 1] === `\\` ? t2 : `.` + n2);
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
|
-
function Me(
|
|
292
|
-
let n2 =
|
|
291
|
+
function Me(e5, t2) {
|
|
292
|
+
let n2 = e5?.modifiedFields;
|
|
293
293
|
if (!n2) return null;
|
|
294
294
|
let r2 = Ne(n2);
|
|
295
295
|
if (!r2) return null;
|
|
296
296
|
let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
|
|
297
|
-
|
|
298
|
-
let o2 = t2(
|
|
297
|
+
e5 = { ...e5, modifiedFields: i2 };
|
|
298
|
+
let o2 = t2(e5), s2 = o2?.modifiedFields;
|
|
299
299
|
if (!s2) return null;
|
|
300
300
|
let c2 = Pe(s2, a2);
|
|
301
301
|
return c2 === null ? null : (o2.modifiedFields = c2, o2);
|
|
302
302
|
}
|
|
303
|
-
function Ne(
|
|
304
|
-
if (typeof
|
|
305
|
-
let t2 = new je(
|
|
303
|
+
function Ne(e5) {
|
|
304
|
+
if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
|
|
305
|
+
let t2 = new je(e5);
|
|
306
306
|
return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
|
|
307
307
|
} catch {
|
|
308
308
|
return null;
|
|
309
309
|
}
|
|
310
310
|
return null;
|
|
311
311
|
}
|
|
312
|
-
function Pe(
|
|
313
|
-
if (typeof
|
|
314
|
-
return t2.flatten(
|
|
312
|
+
function Pe(e5, t2) {
|
|
313
|
+
if (typeof e5 == `object` && e5 && !Array.isArray(e5)) try {
|
|
314
|
+
return t2.flatten(e5);
|
|
315
315
|
} catch {
|
|
316
316
|
return null;
|
|
317
317
|
}
|
|
318
318
|
return null;
|
|
319
319
|
}
|
|
320
|
-
function Fe(
|
|
321
|
-
return
|
|
320
|
+
function Fe(e5) {
|
|
321
|
+
return e5.replace(/[-_\s]+(.)?/g, (e6, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e6) => e6.toLowerCase());
|
|
322
322
|
}
|
|
323
323
|
function Ie() {
|
|
324
|
-
return { emit(
|
|
325
|
-
for (let n2 = 0, r2 = this.events[
|
|
326
|
-
}, events: {}, on(
|
|
327
|
-
return (this.events[
|
|
328
|
-
this.events[
|
|
324
|
+
return { emit(e5, ...t2) {
|
|
325
|
+
for (let n2 = 0, r2 = this.events[e5] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
|
|
326
|
+
}, events: {}, on(e5, t2) {
|
|
327
|
+
return (this.events[e5] ||= []).push(t2), () => {
|
|
328
|
+
this.events[e5] = this.events[e5]?.filter((e6) => t2 !== e6);
|
|
329
329
|
};
|
|
330
330
|
} };
|
|
331
331
|
}
|
|
332
|
-
var Le = (
|
|
333
|
-
function Re(
|
|
332
|
+
var Le = (e5) => e5.__type === `event-definition`;
|
|
333
|
+
function Re(e5, t2, n2, r2) {
|
|
334
334
|
let i2;
|
|
335
|
-
if (
|
|
336
|
-
let { deletedEvent:
|
|
337
|
-
i2 =
|
|
335
|
+
if (e5.isDomainEvent) {
|
|
336
|
+
let { deletedEvent: e6, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
|
|
337
|
+
i2 = e6 ? e6?.deletedEntity ? { entity: e6?.deletedEntity, metadata: c2 } : { metadata: c2 } : t3 ? { data: t3.body, metadata: c2 } : o3 ? { entity: o3.currentEntity, metadata: c2, ...o3.modifiedFields ? { modifiedFields: o3.modifiedFields } : {} } : { entity: a3?.entity, metadata: c2 };
|
|
338
338
|
} else i2 = { data: n2, metadata: r2 };
|
|
339
|
-
let a2 =
|
|
339
|
+
let a2 = e5.transformations ?? ((e6) => e6), o2 = i2, s2 = i2;
|
|
340
340
|
if (s2.modifiedFields) {
|
|
341
|
-
let
|
|
342
|
-
if (typeof
|
|
341
|
+
let e6 = s2.modifiedFields;
|
|
342
|
+
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) {
|
|
343
343
|
o2 = structuredClone(i2);
|
|
344
|
-
let
|
|
345
|
-
if (
|
|
344
|
+
let e7 = Me(s2, a2);
|
|
345
|
+
if (e7) return t2(e7);
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
return t2(a2(o2));
|
|
349
349
|
}
|
|
350
|
-
function ze(
|
|
350
|
+
function ze(e5) {
|
|
351
351
|
let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
|
|
352
|
-
return { initModule(
|
|
352
|
+
return { initModule(e6) {
|
|
353
353
|
return (r2) => {
|
|
354
|
-
let i2 = t2.get(
|
|
355
|
-
i2.push({ eventDefinition:
|
|
354
|
+
let i2 = t2.get(e6.type) ?? [];
|
|
355
|
+
i2.push({ eventDefinition: e6, handler: r2 }), t2.set(e6.type, i2), n2.emit(`registered`, e6);
|
|
356
356
|
};
|
|
357
|
-
}, client: { ...n2, getRegisteredEvents: () => t2, async process(
|
|
358
|
-
let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(
|
|
359
|
-
if (c2.length > 0 && !c2.some(({ type:
|
|
357
|
+
}, client: { ...n2, getRegisteredEvents: () => t2, async process(e6, n3 = { expectedEvents: [] }) {
|
|
358
|
+
let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e6), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e7) => ({ type: e7 }))];
|
|
359
|
+
if (c2.length > 0 && !c2.some(({ type: e7 }) => e7 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e7) => e7.type).join(`, `)}`);
|
|
360
360
|
let l2 = t2.get(r2) ?? [];
|
|
361
|
-
return await Promise.all(l2.map(({ eventDefinition:
|
|
362
|
-
}, async processRequest(
|
|
363
|
-
let n3 = await
|
|
361
|
+
return await Promise.all(l2.map(({ eventDefinition: e7, handler: t3 }) => Re(e7, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
|
|
362
|
+
}, async processRequest(e6, t3) {
|
|
363
|
+
let n3 = await e6.text();
|
|
364
364
|
return this.process(n3, t3);
|
|
365
365
|
}, async parseJWT(t3) {
|
|
366
|
-
let n3 =
|
|
366
|
+
let n3 = e5();
|
|
367
367
|
if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
|
|
368
368
|
let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3);
|
|
369
369
|
if (!i2) throw Error(`JWT is not valid`);
|
|
370
370
|
if (typeof r2.data != `string`) throw Error(`Unexpected type of JWT data: expected string, got ${typeof r2.data}`);
|
|
371
371
|
let a2 = JSON.parse(r2.data), o2 = a2.eventType, s2 = a2.accountInfo, c2 = a2.instanceId, l2 = a2.identity ? JSON.parse(a2.identity) : void 0;
|
|
372
372
|
return { instanceId: c2, eventType: o2, payload: JSON.parse(a2.data), identity: l2, accountInfo: s2 };
|
|
373
|
-
}, async parseRequest(
|
|
374
|
-
let t3 = await
|
|
373
|
+
}, async parseRequest(e6) {
|
|
374
|
+
let t3 = await e6.text();
|
|
375
375
|
return this.parseJWT(t3);
|
|
376
|
-
}, async executeHandlers(
|
|
377
|
-
let n3 = Array.from(t2.keys()).map((
|
|
378
|
-
if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 ===
|
|
379
|
-
let r2 = t2.get(
|
|
380
|
-
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4,
|
|
381
|
-
}, apps: { AppInstalled:
|
|
382
|
-
}
|
|
383
|
-
var Be = (
|
|
384
|
-
function Ve(
|
|
376
|
+
}, async executeHandlers(e6) {
|
|
377
|
+
let n3 = Array.from(t2.keys()).map((e7) => ({ type: e7 }));
|
|
378
|
+
if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e6.eventType)) throw Error(`Unexpected event type: ${e6.eventType}. Expected one of: ${n3.map((e7) => e7.type).join(`, `)}`);
|
|
379
|
+
let r2 = t2.get(e6.eventType) ?? [];
|
|
380
|
+
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4, e6.payload, { instanceId: e6.instanceId, identity: e6.identity })));
|
|
381
|
+
}, apps: { AppInstalled: _(`AppInstalled`)(), AppRemoved: _(`AppRemoved`)() } } };
|
|
382
|
+
}
|
|
383
|
+
var Be = (e5) => e5.__type === `service-plugin-definition`;
|
|
384
|
+
function Ve(e5) {
|
|
385
385
|
let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
|
|
386
|
-
return { initModule(
|
|
386
|
+
return { initModule(e6) {
|
|
387
387
|
return (r2) => {
|
|
388
|
-
let i2 = t2.get(
|
|
389
|
-
i2.push({ servicePluginDefinition:
|
|
388
|
+
let i2 = t2.get(e6.componentType.toLowerCase()) ?? [];
|
|
389
|
+
i2.push({ servicePluginDefinition: e6, implementation: r2 }), t2.set(e6.componentType.toLowerCase(), i2), n2.emit(`registered`, e6);
|
|
390
390
|
};
|
|
391
391
|
}, client: { ...n2, getRegisteredServicePlugins: () => t2, async parseJWT(t3) {
|
|
392
|
-
let n3 =
|
|
392
|
+
let n3 = e5();
|
|
393
393
|
if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
|
|
394
394
|
let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3, true);
|
|
395
395
|
if (!i2) throw Error(`JWT is not valid`);
|
|
396
396
|
if (typeof r2.data != `object` || r2.data === null || !(`metadata` in r2.data) || typeof r2.data.metadata != `object` || r2.data.metadata === null || !(`appExtensionType` in r2.data.metadata) || typeof r2.data.metadata.appExtensionType != `string`) throw Error(`Unexpected JWT data: expected object with metadata.appExtensionType string`);
|
|
397
397
|
return r2.data;
|
|
398
|
-
}, async process(
|
|
399
|
-
let t3 = await this.parseJWT(
|
|
400
|
-
return this.executeHandler(t3,
|
|
401
|
-
}, async parseRequest(
|
|
402
|
-
let t3 = await
|
|
398
|
+
}, async process(e6) {
|
|
399
|
+
let t3 = await this.parseJWT(e6.body);
|
|
400
|
+
return this.executeHandler(t3, e6.url);
|
|
401
|
+
}, async parseRequest(e6) {
|
|
402
|
+
let t3 = await e6.text();
|
|
403
403
|
return this.parseJWT(t3);
|
|
404
|
-
}, async processRequest(
|
|
405
|
-
let t3 = await this.parseRequest(
|
|
406
|
-
return this.processParsedRequest(t3,
|
|
407
|
-
}, async processParsedRequest(
|
|
404
|
+
}, async processRequest(e6) {
|
|
405
|
+
let t3 = await this.parseRequest(e6);
|
|
406
|
+
return this.processParsedRequest(t3, e6.url);
|
|
407
|
+
}, async processParsedRequest(e6, t3) {
|
|
408
408
|
try {
|
|
409
|
-
let n3 = await this.executeHandler(
|
|
409
|
+
let n3 = await this.executeHandler(e6, t3);
|
|
410
410
|
return Response.json(n3);
|
|
411
|
-
} catch (
|
|
412
|
-
if (
|
|
413
|
-
throw
|
|
411
|
+
} catch (e7) {
|
|
412
|
+
if (e7.errorType === `SPI` && e7.applicationCode && e7.httpCode) return Response.json({ applicationError: { code: e7.applicationCode, data: e7.data } }, { status: e7.httpCode });
|
|
413
|
+
throw e7;
|
|
414
414
|
}
|
|
415
|
-
}, async executeHandler(
|
|
416
|
-
let r2 =
|
|
415
|
+
}, async executeHandler(e6, n3) {
|
|
416
|
+
let r2 = e6.metadata.appExtensionType.toLowerCase(), i2 = t2.get(r2) ?? [];
|
|
417
417
|
if (i2.length === 0) throw Error(`No service plugin implementations found for component type ${r2}`);
|
|
418
418
|
if (i2.length > 1) throw Error(`Multiple service plugin implementations found for component type ${r2}. This is currently not supported`);
|
|
419
|
-
let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((
|
|
419
|
+
let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((e7) => n3.endsWith(e7.primaryHttpMappingPath));
|
|
420
420
|
if (!s2) throw Error(`Unexpect request: request url did not match any method: ` + n3);
|
|
421
421
|
let c2 = a2[s2.name];
|
|
422
422
|
if (!c2) throw Error(`Got request for service plugin method ${s2.name} but no implementation was provided. Available methods: ${Object.keys(a2).join(`, `)}`);
|
|
423
|
-
return s2.transformations.toREST(await c2(s2.transformations.fromREST(
|
|
423
|
+
return s2.transformations.toREST(await c2(s2.transformations.fromREST(e6)));
|
|
424
424
|
} } };
|
|
425
425
|
}
|
|
426
426
|
var k = `X-Wix-Consistent`;
|
|
427
|
-
function He(
|
|
428
|
-
let t2 =
|
|
429
|
-
let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...
|
|
427
|
+
function He(e5) {
|
|
428
|
+
let t2 = e5.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e6) => Promise.resolve({ headers: {} }) }, r2 = e5.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e5.host), o2 = () => e5.fetch ?? fetch, s2 = async (n3, r3) => {
|
|
429
|
+
let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} }, l3 = e5.host?.getErrorHandler?.();
|
|
430
430
|
try {
|
|
431
431
|
if (typeof n3 == `string` || n3 instanceof URL) {
|
|
432
|
-
let
|
|
433
|
-
l3?.handleError(
|
|
434
|
-
let a3 = Ue(
|
|
435
|
-
return a3 && (t2[k] = a3),
|
|
432
|
+
let e6 = await i3(n3, { ...r3, headers: c3 });
|
|
433
|
+
l3?.handleError(e6, { requestOptions: { url: n3.toString(), method: r3?.method } });
|
|
434
|
+
let a3 = Ue(e6);
|
|
435
|
+
return a3 && (t2[k] = a3), e6;
|
|
436
436
|
}
|
|
437
437
|
{
|
|
438
|
-
for (let [
|
|
439
|
-
let
|
|
440
|
-
l3?.handleError(
|
|
441
|
-
let a3 = Ue(
|
|
442
|
-
return a3 && (t2[k] = a3),
|
|
438
|
+
for (let [e7, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e7, t3);
|
|
439
|
+
let e6 = await i3(n3, r3);
|
|
440
|
+
l3?.handleError(e6, { requestOptions: { url: n3.url, method: r3?.method } });
|
|
441
|
+
let a3 = Ue(e6);
|
|
442
|
+
return a3 && (t2[k] = a3), e6;
|
|
443
443
|
}
|
|
444
|
-
} catch (
|
|
445
|
-
throw l3?.handleError(
|
|
444
|
+
} catch (e6) {
|
|
445
|
+
throw l3?.handleError(e6, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e6;
|
|
446
446
|
}
|
|
447
447
|
}, { client: c2, initModule: l2 } = Ve(i2), { client: u2, initModule: d2 } = ze(i2), f2 = async (n3, r3) => {
|
|
448
|
-
let i3 = o2(), s3 = await a2(), c3 =
|
|
448
|
+
let i3 = o2(), s3 = await a2(), c3 = w(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e5.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} } }), u3 = Ue(l3);
|
|
449
449
|
return u3 && (t2[k] = u3), l3;
|
|
450
450
|
}, p2 = (t3, n3) => {
|
|
451
451
|
if (Le(t3)) return d2(t3);
|
|
452
452
|
if (Be(t3)) return l2(t3);
|
|
453
|
-
if (
|
|
453
|
+
if (E(t3) && e5.host) return D(t3, e5.host);
|
|
454
454
|
if (typeof t3 == `function`) {
|
|
455
455
|
if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
|
|
456
|
-
let r3 =
|
|
457
|
-
return Se(
|
|
458
|
-
let n4 = new URL(
|
|
456
|
+
let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e5.useCDN === void 0 ? i2().shouldUseCDN : e5.useCDN;
|
|
457
|
+
return Se(re(() => b(t3)) ? y(t3) : t3, n3 ?? {}, f2, e5.host?.getErrorHandler?.(), (e6, t4) => {
|
|
458
|
+
let n4 = new URL(e6, `https://${r3}`);
|
|
459
459
|
return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
|
|
460
|
-
}, i2().getActiveToken, async () => a2(), { HTTPHost: r3 },
|
|
460
|
+
}, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e5.host?.name, o3, e5.validateRequestSchema);
|
|
461
461
|
}
|
|
462
|
-
return
|
|
463
|
-
}, m2 = (
|
|
464
|
-
for (let n3 in
|
|
462
|
+
return T(t3) ? Object.fromEntries(Object.entries(t3).map(([e6, n4]) => [e6, p2(n4, t3[x])])) : t3;
|
|
463
|
+
}, m2 = (e6) => {
|
|
464
|
+
for (let n3 in e6) t2[n3] = e6[n3];
|
|
465
465
|
};
|
|
466
|
-
return { ...
|
|
466
|
+
return { ...e5.modules ? p2(e5.modules) : {}, get auth() {
|
|
467
467
|
let t3 = i2();
|
|
468
|
-
return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0,
|
|
469
|
-
}, setHeaders: m2, use: p2, enableContext(
|
|
470
|
-
|
|
468
|
+
return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e5.host), t3;
|
|
469
|
+
}, setHeaders: m2, use: p2, enableContext(e6, t3 = { elevated: false }) {
|
|
470
|
+
e6 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? g.elevatedClient = this : g.client = this;
|
|
471
471
|
}, fetch: (t3, n3) => {
|
|
472
|
-
let r3 =
|
|
472
|
+
let r3 = e5.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
|
|
473
473
|
return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
|
|
474
474
|
}, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
|
|
475
|
-
let i3 =
|
|
476
|
-
if (a3.status !== 200) throw new
|
|
475
|
+
let i3 = e5?.host?.apiBaseUrl ?? `www.wixapis.com`, a3 = await f2(`https://${i3}/graphql/${r3.apiVersion}`, { method: `POST`, headers: { "Content-Type": `application/json` }, body: JSON.stringify({ query: t3, variables: n3 }) });
|
|
476
|
+
if (a3.status !== 200) throw new ee(`GraphQL request failed with status ${a3.status}`, a3);
|
|
477
477
|
let { data: o3, errors: s3 } = await a3.json();
|
|
478
478
|
return { data: o3 ?? {}, errors: s3 };
|
|
479
479
|
}, webhooks: u2, servicePlugins: c2 };
|
|
480
480
|
}
|
|
481
|
-
function Ue(
|
|
482
|
-
return
|
|
481
|
+
function Ue(e5) {
|
|
482
|
+
return e5.headers?.get(`X-Wix-Consistent`) ?? e5.headers?.get(`x-wix-consistent`);
|
|
483
483
|
}
|
|
484
484
|
var We = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
|
|
485
485
|
var Ge = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
486
486
|
var Ke = `items`;
|
|
487
487
|
var qe = `pagingMetadata`;
|
|
488
488
|
var Je = We;
|
|
489
|
-
function Ye(
|
|
490
|
-
return
|
|
489
|
+
function Ye(e5, t2) {
|
|
490
|
+
return e5?.split(`.`).map((e6) => t2?.[e6] ?? e6).join(`.`);
|
|
491
491
|
}
|
|
492
|
-
function Xe(
|
|
493
|
-
return t2 ? Ye(
|
|
492
|
+
function Xe(e5, { transformSystemFields: t2 = true } = {}) {
|
|
493
|
+
return t2 ? Ye(e5, Je) : e5;
|
|
494
494
|
}
|
|
495
495
|
var Ze = `sort.fieldName`;
|
|
496
|
-
function Qe(
|
|
497
|
-
return (
|
|
496
|
+
function Qe(e5, t2, n2) {
|
|
497
|
+
return (e5 === Ze || e5.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Ye(t2, n2) : t2;
|
|
498
498
|
}
|
|
499
|
-
function $e(
|
|
500
|
-
let r2 = (
|
|
501
|
-
if (Array.isArray(
|
|
502
|
-
i2(
|
|
499
|
+
function $e(e5, t2, n2) {
|
|
500
|
+
let r2 = (e6) => n2.includes(e6), i2 = (e6, n3) => {
|
|
501
|
+
if (Array.isArray(e6)) e6.forEach((e7) => {
|
|
502
|
+
i2(e7, n3);
|
|
503
503
|
});
|
|
504
|
-
else if (typeof
|
|
505
|
-
let a2 =
|
|
506
|
-
Object.keys(a2).forEach((
|
|
507
|
-
let o2 = n3 === `` ?
|
|
504
|
+
else if (typeof e6 == `object` && e6) {
|
|
505
|
+
let a2 = e6;
|
|
506
|
+
Object.keys(a2).forEach((e7) => {
|
|
507
|
+
let o2 = n3 === `` ? e7 : `${n3}.${e7}`;
|
|
508
508
|
if (r2(o2)) return;
|
|
509
|
-
let s2 = et(
|
|
510
|
-
s2 !==
|
|
509
|
+
let s2 = et(e7, t2);
|
|
510
|
+
s2 !== e7 && !(s2 in a2) && (a2[s2] = a2[e7], delete a2[e7]), a2[s2] = Qe(o2, a2[s2], t2), i2(a2[s2], o2);
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
513
|
};
|
|
514
|
-
return i2(
|
|
514
|
+
return i2(e5, ``), e5;
|
|
515
515
|
}
|
|
516
|
-
function et(
|
|
516
|
+
function et(e5, t2) {
|
|
517
517
|
let n2;
|
|
518
|
-
return n2 =
|
|
518
|
+
return n2 = e5.includes(`.`) ? e5.split(`.`).map((e6) => t2[e6] ?? e6).join(`.`) : t2[e5] ?? e5, n2;
|
|
519
519
|
}
|
|
520
|
-
function A(
|
|
521
|
-
return $e(
|
|
520
|
+
function A(e5, t2 = []) {
|
|
521
|
+
return $e(e5, We, t2);
|
|
522
522
|
}
|
|
523
|
-
function j(
|
|
524
|
-
return $e(
|
|
523
|
+
function j(e5, t2 = []) {
|
|
524
|
+
return $e(e5, Ge, t2);
|
|
525
525
|
}
|
|
526
|
-
function M(
|
|
527
|
-
return
|
|
526
|
+
function M(e5) {
|
|
527
|
+
return e5 ? new Date(e5) : void 0;
|
|
528
528
|
}
|
|
529
529
|
var tt = /* @__PURE__ */ new WeakMap();
|
|
530
530
|
function nt() {
|
|
531
531
|
return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
|
|
532
532
|
}
|
|
533
|
-
function rt(
|
|
534
|
-
let n2 =
|
|
535
|
-
return n2 || (n2 = nt(),
|
|
533
|
+
function rt(e5, t2) {
|
|
534
|
+
let n2 = e5.get(t2);
|
|
535
|
+
return n2 || (n2 = nt(), e5.set(t2, n2)), n2;
|
|
536
536
|
}
|
|
537
|
-
function it(
|
|
538
|
-
return t2 === `*` ? (
|
|
537
|
+
function it(e5, t2) {
|
|
538
|
+
return t2 === `*` ? (e5.anyField ??= nt(), e5.anyField) : t2.endsWith(`{}`) ? (e5.mapFields ??= /* @__PURE__ */ new Map(), rt(e5.mapFields, t2.slice(0, -2))) : (e5.fields ??= /* @__PURE__ */ new Map(), rt(e5.fields, t2));
|
|
539
539
|
}
|
|
540
|
-
function at(
|
|
540
|
+
function at(e5) {
|
|
541
541
|
let t2 = nt();
|
|
542
|
-
for (let n2 of
|
|
543
|
-
let
|
|
544
|
-
|
|
542
|
+
for (let n2 of e5) {
|
|
543
|
+
let e6 = n2.path.split(`.`).reduce(it, t2);
|
|
544
|
+
e6.leaves ??= [], e6.leaves.push(n2);
|
|
545
545
|
}
|
|
546
546
|
return t2;
|
|
547
547
|
}
|
|
548
|
-
function ot(
|
|
549
|
-
let t2 = tt.get(
|
|
550
|
-
return t2 || (t2 = at(
|
|
548
|
+
function ot(e5) {
|
|
549
|
+
let t2 = tt.get(e5);
|
|
550
|
+
return t2 || (t2 = at(e5), tt.set(e5, t2)), t2;
|
|
551
551
|
}
|
|
552
|
-
function st(
|
|
553
|
-
return typeof
|
|
552
|
+
function st(e5) {
|
|
553
|
+
return typeof e5 == `object` && !!e5;
|
|
554
554
|
}
|
|
555
|
-
function ct(
|
|
556
|
-
return t2 ? Array.isArray(
|
|
555
|
+
function ct(e5, { isRepeated: t2, isMap: n2 }, r2) {
|
|
556
|
+
return t2 ? Array.isArray(e5) ? e5.map(r2) : e5 : n2 ? st(e5) ? Object.fromEntries(Object.entries(e5).map(([e6, t3]) => [e6, r2(t3)])) : e5 : r2(e5);
|
|
557
557
|
}
|
|
558
|
-
function lt(
|
|
559
|
-
st(
|
|
558
|
+
function lt(e5, t2, n2) {
|
|
559
|
+
st(e5) && ft(e5, t2, n2);
|
|
560
560
|
}
|
|
561
|
-
function ut(
|
|
561
|
+
function ut(e5, t2, n2) {
|
|
562
562
|
for (let [r2, i2] of t2) {
|
|
563
|
-
if (!(r2 in
|
|
564
|
-
if (i2.leaves) for (let t4 of i2.leaves)
|
|
565
|
-
let t3 =
|
|
566
|
-
Array.isArray(t3) ? t3.forEach((
|
|
563
|
+
if (!(r2 in e5)) continue;
|
|
564
|
+
if (i2.leaves) for (let t4 of i2.leaves) e5[r2] = ct(e5[r2], t4, n2);
|
|
565
|
+
let t3 = e5[r2];
|
|
566
|
+
Array.isArray(t3) ? t3.forEach((e6) => lt(e6, i2, n2)) : lt(t3, i2, n2);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
function dt(
|
|
569
|
+
function dt(e5, t2, n2) {
|
|
570
570
|
for (let [r2, i2] of t2) {
|
|
571
|
-
let t3 =
|
|
572
|
-
st(t3) && Object.values(t3).forEach((
|
|
571
|
+
let t3 = e5[r2];
|
|
572
|
+
st(t3) && Object.values(t3).forEach((e6) => lt(e6, i2, n2));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
function ft(
|
|
576
|
-
t2 && ut(
|
|
575
|
+
function ft(e5, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
|
|
576
|
+
t2 && ut(e5, t2, i2), n2 && dt(e5, n2, i2), r2 && Object.values(e5).forEach((e6) => lt(e6, r2, i2));
|
|
577
577
|
}
|
|
578
|
-
function N(
|
|
579
|
-
if (!st(
|
|
580
|
-
for (let { paths: n2, transformFn: r2 } of t2) ft(
|
|
581
|
-
return
|
|
578
|
+
function N(e5, t2) {
|
|
579
|
+
if (!st(e5)) return e5;
|
|
580
|
+
for (let { paths: n2, transformFn: r2 } of t2) ft(e5, ot(n2), r2);
|
|
581
|
+
return e5;
|
|
582
582
|
}
|
|
583
|
-
function pt(
|
|
584
|
-
return Object.fromEntries(Object.entries(
|
|
583
|
+
function pt(e5) {
|
|
584
|
+
return Object.fromEntries(Object.entries(e5).filter(([, e6]) => e6 !== void 0));
|
|
585
585
|
}
|
|
586
|
-
function mt(
|
|
587
|
-
return yt(
|
|
586
|
+
function mt(e5) {
|
|
587
|
+
return yt(e5).map((e6) => e6.toLocaleUpperCase()).join(`_`);
|
|
588
588
|
}
|
|
589
589
|
var ht = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
590
590
|
var gt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
591
591
|
var _t = `$1\0$2`;
|
|
592
592
|
var vt = /[^\p{L}\d]+/giu;
|
|
593
|
-
function yt(
|
|
594
|
-
let t2 =
|
|
593
|
+
function yt(e5) {
|
|
594
|
+
let t2 = e5.trim();
|
|
595
595
|
t2 = t2.replace(ht, _t).replace(gt, _t), t2 = t2.replace(vt, `\0`);
|
|
596
596
|
let n2 = 0, r2 = t2.length;
|
|
597
597
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
@@ -599,336 +599,1389 @@ function yt(e2) {
|
|
|
599
599
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
600
600
|
return t2.slice(n2, r2).split(/\0/g);
|
|
601
601
|
}
|
|
602
|
-
var bt = (
|
|
603
|
-
var xt = (
|
|
604
|
-
var St = (
|
|
605
|
-
function P(
|
|
606
|
-
if (typeof
|
|
607
|
-
if (bt(
|
|
608
|
-
if (xt(
|
|
609
|
-
if (St(
|
|
610
|
-
let t3 =
|
|
611
|
-
return wt(
|
|
612
|
-
}
|
|
613
|
-
return Et(
|
|
614
|
-
}
|
|
615
|
-
var Ct = (
|
|
616
|
-
let r2 =
|
|
617
|
-
return wt(
|
|
618
|
-
};
|
|
619
|
-
var wt = (
|
|
620
|
-
var Tt = (
|
|
621
|
-
let t2 =
|
|
622
|
-
return wt(
|
|
623
|
-
};
|
|
624
|
-
var Et = (
|
|
625
|
-
var Dt = ({ spreadPathsToArguments:
|
|
626
|
-
let a2 = { ...
|
|
627
|
-
return r2?.filter((
|
|
628
|
-
let r3 = t2[
|
|
629
|
-
if (r3) return { ...
|
|
630
|
-
let s2 = o2?.sort((
|
|
602
|
+
var bt = (e5) => `validationError` in (e5.response?.data?.details ?? {});
|
|
603
|
+
var xt = (e5) => `applicationError` in (e5.response?.data?.details ?? {});
|
|
604
|
+
var St = (e5) => (e5.response?.status ?? -1) >= 400 && (e5.response?.status ?? -1) < 500;
|
|
605
|
+
function P(e5, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
606
|
+
if (typeof e5 != `object` || !e5) throw e5;
|
|
607
|
+
if (bt(e5)) return Ct(e5, t2, n2);
|
|
608
|
+
if (xt(e5)) return Tt(e5);
|
|
609
|
+
if (St(e5)) {
|
|
610
|
+
let t3 = e5.response?.status, n3 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: mt(n3), data: {} }, requestId: e5.requestId };
|
|
611
|
+
return wt(e5, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
612
|
+
}
|
|
613
|
+
return Et(e5);
|
|
614
|
+
}
|
|
615
|
+
var Ct = (e5, t2, n2) => {
|
|
616
|
+
let r2 = e5.response?.data, i2 = e5.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Dt(t2, a2, n2)?.sort((e6, t3) => e6.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e6, description: t3 }) => `"${e6}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
|
|
617
|
+
return wt(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e5.response?.status, requestId: i2 } });
|
|
618
|
+
};
|
|
619
|
+
var wt = (e5, { message: t2, extraProperties: n2 }) => Object.assign(e5, { ...n2, message: t2 });
|
|
620
|
+
var Tt = (e5) => {
|
|
621
|
+
let t2 = e5.response?.status, n2 = e5.response?.statusText ?? `UNKNOWN`, r2 = e5.response?.data?.message ?? n2, i2 = e5.response?.data?.details?.applicationError?.description ?? n2, a2 = e5.response?.data?.details?.applicationError?.code ?? mt(n2), o2 = e5.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e5.requestId };
|
|
622
|
+
return wt(e5, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e5.requestId } });
|
|
623
|
+
};
|
|
624
|
+
var Et = (e5) => wt(e5, { message: e5.requestId ? `System error occurred, request-id: ${e5.requestId}` : `System error occurred: ${JSON.stringify(e5)}`, extraProperties: { requestId: e5.requestId, status: e5.response?.status, code: mt(e5.response?.statusText ?? `UNKNOWN`), ...!e5.response && { runtimeError: e5 } } });
|
|
625
|
+
var Dt = ({ spreadPathsToArguments: e5, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
626
|
+
let a2 = { ...e5, ...t2 }, o2 = Object.keys(a2);
|
|
627
|
+
return r2?.filter((e6) => !r2.some((t3) => t3.field.length > e6.field.length && t3.field.startsWith(e6.field) && o2.includes(t3.field))).map((e6) => {
|
|
628
|
+
let r3 = t2[e6.field];
|
|
629
|
+
if (r3) return { ...e6, field: Ot(r3, i2) };
|
|
630
|
+
let s2 = o2?.sort((e7, t3) => t3.length - e7.length)?.find((t3) => e6.field.startsWith(t3));
|
|
631
631
|
if (s2) {
|
|
632
632
|
let t3 = a2[s2];
|
|
633
|
-
if (t3) return { ...
|
|
633
|
+
if (t3) return { ...e6, field: e6.field.replace(s2, Ot(t3, i2)) };
|
|
634
634
|
}
|
|
635
|
-
return n2 ? { ...
|
|
635
|
+
return n2 ? { ...e6, field: `${i2[0]}.${e6.field}` } : e6;
|
|
636
636
|
});
|
|
637
637
|
};
|
|
638
|
-
var Ot = (
|
|
639
|
-
let n2 = kt(
|
|
640
|
-
return n2 == null ?
|
|
638
|
+
var Ot = (e5, t2) => {
|
|
639
|
+
let n2 = kt(e5);
|
|
640
|
+
return n2 == null ? e5 : e5.replace(`$[${n2}]`, t2[n2]);
|
|
641
641
|
};
|
|
642
|
-
var kt = (
|
|
643
|
-
let t2 =
|
|
642
|
+
var kt = (e5) => {
|
|
643
|
+
let t2 = e5.match(/\$\[(?<argIndex>\d+)\]/);
|
|
644
644
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
645
645
|
};
|
|
646
646
|
function At() {
|
|
647
|
-
let
|
|
648
|
-
if (
|
|
649
|
-
return jt(() =>
|
|
647
|
+
let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
648
|
+
if (e5) return { initWixModules(t3, n3) {
|
|
649
|
+
return jt(() => e5(t3, n3));
|
|
650
650
|
}, fetchWithAuth() {
|
|
651
651
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
652
652
|
}, graphql() {
|
|
653
653
|
throw Error(`graphql is not available in this context`);
|
|
654
654
|
} };
|
|
655
|
-
let t2 = typeof $wixContext < `u` ? $wixContext.client :
|
|
656
|
-
if (t2 || n2) return { initWixModules(
|
|
655
|
+
let t2 = typeof $wixContext < `u` ? $wixContext.client : g.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : g.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : g.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : g.elevatedClient;
|
|
656
|
+
if (t2 || n2) return { initWixModules(e6, r2) {
|
|
657
657
|
if (r2) {
|
|
658
658
|
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`);
|
|
659
|
-
return jt(() => n2.use(
|
|
659
|
+
return jt(() => n2.use(e6));
|
|
660
660
|
}
|
|
661
661
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
662
|
-
return jt(() => t2.use(
|
|
663
|
-
}, fetchWithAuth: (
|
|
662
|
+
return jt(() => t2.use(e6));
|
|
663
|
+
}, fetchWithAuth: (e6, n3) => {
|
|
664
664
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
665
|
-
return t2.fetchWithAuth(
|
|
665
|
+
return t2.fetchWithAuth(e6, n3);
|
|
666
666
|
}, getAuth() {
|
|
667
667
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
668
668
|
return t2.auth;
|
|
669
|
-
}, async graphql(
|
|
669
|
+
}, async graphql(e6, n3, r2) {
|
|
670
670
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
671
|
-
return t2.graphql(
|
|
671
|
+
return t2.graphql(e6, n3, r2);
|
|
672
672
|
} };
|
|
673
673
|
}
|
|
674
|
-
function jt(
|
|
675
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
676
|
-
globalThis.__wix_context__ = void 0,
|
|
674
|
+
function jt(e5) {
|
|
675
|
+
let t2 = globalThis.__wix_context__, n2 = { client: g.client, elevatedClient: g.elevatedClient }, r2;
|
|
676
|
+
globalThis.__wix_context__ = void 0, g.client = void 0, g.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
677
677
|
try {
|
|
678
|
-
return
|
|
678
|
+
return e5();
|
|
679
679
|
} finally {
|
|
680
|
-
globalThis.__wix_context__ = t2,
|
|
680
|
+
globalThis.__wix_context__ = t2, g.client = n2.client, g.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
function Mt(
|
|
683
|
+
function Mt(e5, t2) {
|
|
684
684
|
return (...n2) => {
|
|
685
685
|
let r2 = At();
|
|
686
|
-
return r2 ? r2.initWixModules(
|
|
686
|
+
return r2 ? r2.initWixModules(e5, t2).apply(void 0, n2) : e5.apply(void 0, n2);
|
|
687
687
|
};
|
|
688
688
|
}
|
|
689
|
-
function Nt(
|
|
689
|
+
function Nt(e5) {
|
|
690
690
|
let t2 = (...t3) => {
|
|
691
691
|
let n2 = At();
|
|
692
|
-
return n2 ? n2.initWixModules(
|
|
692
|
+
return n2 ? n2.initWixModules(e5).apply(void 0, t3) : () => ({ slug: e5.type });
|
|
693
693
|
};
|
|
694
|
-
return t2.__type =
|
|
694
|
+
return t2.__type = e5.__type, t2.type = e5.type, t2.isDomainEvent = e5.isDomainEvent, t2.transformations = e5.transformations, t2;
|
|
695
695
|
}
|
|
696
|
-
function Pt(
|
|
697
|
-
return Mt(
|
|
696
|
+
function Pt(e5, t2 = false) {
|
|
697
|
+
return Mt(e5, t2);
|
|
698
698
|
}
|
|
699
|
-
function Ft(
|
|
700
|
-
let n2 =
|
|
701
|
-
return t2 && r2 ? new URLSearchParams({ ".r":
|
|
702
|
-
r3 == null || Array.isArray(n3) && typeof r3 == `object` ||
|
|
703
|
-
}),
|
|
699
|
+
function Ft(e5, t2) {
|
|
700
|
+
let n2 = Lt(e5), r2 = Object.entries(n2).some(([e6, t3]) => e6.includes(`.`) || Array.isArray(t3) && t3.some((e7) => typeof e7 == `object`));
|
|
701
|
+
return t2 && r2 ? new URLSearchParams({ ".r": zt(JSON.stringify(e5)) }) : Object.entries(n2).reduce((e6, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
|
|
702
|
+
r3 == null || Array.isArray(n3) && typeof r3 == `object` || e6.append(t3, r3);
|
|
703
|
+
}), e6), new URLSearchParams());
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
let t2 =
|
|
707
|
-
return
|
|
705
|
+
function It(e5) {
|
|
706
|
+
let t2 = Qt(Xt(e5.host), e5.domainToMappings);
|
|
707
|
+
return cn(an(e5.protoPath, e5.data || {}), t2);
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Lt(e5, t2 = ``) {
|
|
710
710
|
let n2 = {};
|
|
711
|
-
return Object.entries(
|
|
712
|
-
let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 =
|
|
711
|
+
return Object.entries(e5).forEach(([e6, r2]) => {
|
|
712
|
+
let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Rt(t2, e6);
|
|
713
713
|
if (i2) {
|
|
714
|
-
let
|
|
715
|
-
Object.assign(n2,
|
|
714
|
+
let e7 = Lt(r2, a2);
|
|
715
|
+
Object.assign(n2, e7);
|
|
716
716
|
} else n2[a2] = r2;
|
|
717
717
|
}), n2;
|
|
718
718
|
}
|
|
719
|
-
function
|
|
720
|
-
return `${
|
|
721
|
-
}
|
|
722
|
-
var
|
|
723
|
-
let t2 = new TextEncoder().encode(
|
|
724
|
-
return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(
|
|
725
|
-
};
|
|
726
|
-
var
|
|
727
|
-
var
|
|
728
|
-
var
|
|
729
|
-
var
|
|
730
|
-
var
|
|
731
|
-
var
|
|
732
|
-
var
|
|
733
|
-
var
|
|
734
|
-
var
|
|
735
|
-
var
|
|
736
|
-
function
|
|
737
|
-
return
|
|
738
|
-
}
|
|
739
|
-
function
|
|
740
|
-
return
|
|
741
|
-
}
|
|
742
|
-
function
|
|
743
|
-
let n2 = t2[
|
|
719
|
+
function Rt(e5, t2) {
|
|
720
|
+
return `${e5}${e5 ? `.` : ``}${t2}`;
|
|
721
|
+
}
|
|
722
|
+
var zt = (e5) => {
|
|
723
|
+
let t2 = new TextEncoder().encode(e5);
|
|
724
|
+
return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e5, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
|
|
725
|
+
};
|
|
726
|
+
var Bt = [`wix.com`, `editorx.com`];
|
|
727
|
+
var Vt = `_`;
|
|
728
|
+
var Ht = `*.`;
|
|
729
|
+
var Ut = RegExp(`\\.(${Bt.join(`|`)})$`);
|
|
730
|
+
var Wt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
|
|
731
|
+
var Gt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
|
|
732
|
+
var Kt = `dev.wix-code.com`;
|
|
733
|
+
var qt = /{(.*)}/;
|
|
734
|
+
var Jt = RegExp(`\\.(${Wt.join(`|`)})$`);
|
|
735
|
+
var Yt = RegExp(`.*\\.${Kt}$`);
|
|
736
|
+
function Xt(e5) {
|
|
737
|
+
return Zt(e5).replace(Ut, `._base_domain_`).replace(Jt, `._api_base_domain_`).replace(Yt, `*.dev.wix-code.com`);
|
|
738
|
+
}
|
|
739
|
+
function Zt(e5) {
|
|
740
|
+
return Gt[e5] ?? e5;
|
|
741
|
+
}
|
|
742
|
+
function Qt(e5, t2) {
|
|
743
|
+
let n2 = t2[e5];
|
|
744
744
|
if (n2) return n2;
|
|
745
|
-
let r2 =
|
|
745
|
+
let r2 = $t(e5, t2) ?? en(e5, t2);
|
|
746
746
|
if (!r2) {
|
|
747
|
-
if (
|
|
748
|
-
let
|
|
749
|
-
if (
|
|
747
|
+
if (nn(e5)) {
|
|
748
|
+
let e6 = t2[rn];
|
|
749
|
+
if (e6) return e6;
|
|
750
750
|
}
|
|
751
|
-
let n3 = t2[
|
|
751
|
+
let n3 = t2[Vt];
|
|
752
752
|
if (n3) return n3;
|
|
753
753
|
}
|
|
754
754
|
return r2 ?? [];
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function $t(e5, t2) {
|
|
757
757
|
return Object.entries(t2).find(([t3]) => {
|
|
758
|
-
let [, ...n2] =
|
|
758
|
+
let [, ...n2] = e5.split(`.`);
|
|
759
759
|
return n2.join(`.`) === t3;
|
|
760
760
|
})?.[1];
|
|
761
761
|
}
|
|
762
|
-
function
|
|
763
|
-
let [n2] = Object.entries(t2).filter(([t3]) =>
|
|
762
|
+
function en(e5, t2) {
|
|
763
|
+
let [n2] = Object.entries(t2).filter(([t3]) => tn(e5, t3)).sort(([e6], [t3]) => t3.length - e6.length);
|
|
764
764
|
if (!n2) return;
|
|
765
765
|
let [, r2] = n2;
|
|
766
766
|
return r2;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
if (!t2.startsWith(
|
|
768
|
+
function tn(e5, t2) {
|
|
769
|
+
if (!t2.startsWith(Ht)) return false;
|
|
770
770
|
let n2 = t2.slice(1);
|
|
771
|
-
return
|
|
771
|
+
return e5.length > n2.length && e5.endsWith(n2);
|
|
772
772
|
}
|
|
773
|
-
function
|
|
774
|
-
return !!
|
|
773
|
+
function nn(e5) {
|
|
774
|
+
return !!e5.match(/\._base_domain_$/);
|
|
775
775
|
}
|
|
776
|
-
var
|
|
777
|
-
function
|
|
778
|
-
return
|
|
776
|
+
var rn = `www._base_domain_`;
|
|
777
|
+
function an(e5, t2) {
|
|
778
|
+
return e5.split(`/`).map((e6) => on(e6, t2)).join(`/`);
|
|
779
779
|
}
|
|
780
|
-
function
|
|
781
|
-
let n2 =
|
|
782
|
-
return r2 ?
|
|
780
|
+
function on(e5, t2) {
|
|
781
|
+
let n2 = e5.match(qt) || [], r2 = n2[1];
|
|
782
|
+
return r2 ? sn(t2, r2, e5, e5.replace(n2[0], ``)) : e5;
|
|
783
783
|
}
|
|
784
|
-
function
|
|
785
|
-
let i2 =
|
|
786
|
-
for (let
|
|
784
|
+
function sn(e5, t2, n2, r2) {
|
|
785
|
+
let i2 = e5;
|
|
786
|
+
for (let e6 of t2.split(`.`)) {
|
|
787
787
|
if (!i2) return n2;
|
|
788
|
-
i2 = i2[
|
|
788
|
+
i2 = i2[e6];
|
|
789
789
|
}
|
|
790
790
|
return `${i2}${r2}`;
|
|
791
791
|
}
|
|
792
|
-
function
|
|
793
|
-
let n2 = t2?.find((t3) =>
|
|
794
|
-
return n2 ? n2.srcPath +
|
|
792
|
+
function cn(e5, t2) {
|
|
793
|
+
let n2 = t2?.find((t3) => e5.startsWith(t3.destPath));
|
|
794
|
+
return n2 ? n2.srcPath + e5.slice(n2.destPath.length) : e5;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
return Nt(
|
|
796
|
+
function ln(e5) {
|
|
797
|
+
return Nt(e5);
|
|
798
798
|
}
|
|
799
|
-
function
|
|
800
|
-
return
|
|
799
|
+
function un(e5) {
|
|
800
|
+
return e5 === `NaN` ? NaN : e5 === `Infinity` ? 1 / 0 : e5 === `-Infinity` ? -1 / 0 : e5;
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
return
|
|
802
|
+
function dn(e5) {
|
|
803
|
+
return e5 && pt({ formatted: e5.formattedAddress, location: e5.geocode, addressLine1: e5.addressLine, addressLine2: e5.addressLine2, streetAddress: e5.streetAddress && { name: e5.streetAddress.name, number: e5.streetAddress.number, apt: e5.streetAddress.apt, formattedAddressLine: e5.streetAddress.formattedAddressLine }, hint: e5.hint, city: e5.city, subdivision: e5.subdivision, country: e5.country, postalCode: e5.postalCode, countryFullname: e5.countryFullname, subdivisionFullname: e5.subdivisionFullname });
|
|
804
804
|
}
|
|
805
|
-
var
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
805
|
+
var fn;
|
|
806
|
+
(function(e5) {
|
|
807
|
+
e5.QUERY_PARAM = `QUERY_PARAM`, e5.SUBDOMAIN = `SUBDOMAIN`, e5.SUBDIRECTORY = `SUBDIRECTORY`;
|
|
808
|
+
})(fn ||= {});
|
|
809
|
+
var pn = { cs: `\u010Ce\u0161tina`, da: `Dansk`, de: `Deutsch`, en: `English`, es: `Espa\xF1ol`, fr: `Fran\xE7ais`, hi: `\u0939\u093F\u0928\u094D\u0926\u0940`, id: `Bahasa Indonesia`, it: `Italiano`, ja: `\u65E5\u672C\u8A9E`, ko: `\uD55C\uAD6D\uC5B4`, nl: `Nederlands`, no: `Norsk`, pl: `Polski`, pt: `Portugu\xEAs`, ru: `\u0420\u0443\u0441\u0441\u043A\u0438\u0439`, sv: `Svenska`, th: `\u0E44\u0E17\u0E22`, tr: `T\xFCrk\xE7e`, uk: `\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430`, vi: `Ti\u1EBFng Vi\u1EC7t`, zh: `\u7E41\u9AD4\u4E2D\u6587`, sq: `Shqip`, am: `\u12A0\u121B\u122D\u129B`, ar: `\u0627\u0644\u0639\u0631\u0628\u064A\u0629`, hy: `\u0540\u0561\u0575\u0565\u0580\u0565\u0576`, az: `Az\u0259rbaycan dili`, eu: `Euskara`, be: `\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F`, bn: `\u09AC\u09BE\u0982\u09B2\u09BE`, bs: `Bosanski`, bg: `\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438`, ca: `Catal\xE0`, ny: `ChiChe\u0175a`, co: `Corsu`, hr: `Hrvatski`, et: `Eesti`, fj: `Vosa Vakaviti`, fi: `Suomi`, ga: `Gaeilge`, gl: `Galego`, ka: `\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8`, el: `\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC`, gu: `\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0`, ht: `Krey\xF2l Ayisyen`, ha: `Hausa`, he: `\u05E2\u05D1\u05E8\u05D9\u05EA`, hu: `Magyar`, is: `\xCDslenska`, ig: `Igbo`, kn: `\u0C95\u0CA8\u0CCD\u0CA8\u0CA1`, kk: `\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456`, km: `\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A`, ku: `Kurd\xEE`, ky: `\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430`, lb: `L\xEBtzebuergesch`, lo: `\u0EA5\u0EB2\u0EA7`, la: `Latina`, lv: `Latvie\u0161u`, lt: `Lietuvi\u0173`, mk: `\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438`, mg: `Malagasy`, ms: `Bahasa Melayu`, ml: `\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02`, mt: `Malti`, mn: `\u041C\u043E\u043D\u0433\u043E\u043B`, ne: `\u0928\u0947\u092A\u093E\u0932\u0940`, ps: `\u067E\u069A\u062A\u0648`, fa: `\u0641\u0627\u0631\u0633\u06CC`, ro: `Rom\xE2n\u0103`, sm: `Gagana Samoa`, sr: `\u0421\u0440\u043F\u0441\u043A\u0438`, sn: `Shona`, sd: `\u0633\u0646\u068C\u064A`, si: `\u0DC3\u0DD2\u0D82\u0DC4\u0DBD`, sk: `Sloven\u010Dina`, sl: `Sloven\u0161\u010Dina`, so: `Soomaaliga`, su: `Basa Sunda`, sw: `Kiswahili`, tl: `Filipino`, tg: `\u0422\u043E\u04B7\u0438\u043A\u04E3`, ta: `\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD`, te: `\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41`, tk: `T\xFCrkmen`, ur: `\u0627\u0631\u062F\u0648`, uz: `O'zbek`, cy: `Cymraeg`, xh: `isiXhosa`, yi: `\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9`, yo: `Yor\xF9b\xE1`, zu: `isiZulu`, kl: `Kalaallisut`, fo: `F\xF8royskt`, ln: `Ling\xE1la`, mi: `M\u0101ori`, mr: `\u092E\u0930\u093E\u0920\u0940`, my: `\u1019\u103C\u1014\u103A\u1019\u102C`, se: `S\xE1megiella`, ug: `\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5`, qu: `Runa Simi`, aa: `Afar`, ab: `\u0410\u04A7\u0441\u0443\u0430`, ae: `Avestan`, ak: `Akan`, an: `Aragon\xE9s`, as: `\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE`, av: `\u0410\u0432\u0430\u0440`, ay: `Aymar aru`, ba: `\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430`, bh: `\u092D\u094B\u091C\u092A\u0941\u0930\u0940`, bi: `Bislama`, bm: `Bamanankan`, bo: `\u0F56\u0F7C\u0F51\u0F0B\u0F66\u0F90\u0F51\u0F0B`, br: `Brezhoneg`, ce: `\u041D\u043E\u0445\u0447\u0438\u0439\u043D`, ch: `Chamoru`, cr: `\u14C0\u1426\u1403\u152D\u140D\u140F\u1423`, cu: `\u0426\u0440\u044C\u043A\u044A\u0432\u044C\u043D\u043E\u0441\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A`, cv: `\u0427\u04D1\u0432\u0430\u0448\u043B\u0430`, dv: `\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0784\u07A6\u0790\u07B0`, dz: `\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41`, ee: `E\u028Begbe`, eo: `Esperanto`, ff: `Fulah`, fy: `Frysk`, gd: `G\xE0idhlig`, gn: `Ava\xF1e'\u1EBD`, gv: `Gaelg`, ho: `Hiri Motu`, hz: `Otjiherero`, ia: `Interlingua`, ie: `Interlingue`, ii: `\uA188\uA320\uA259`, ik: `I\xF1upiaq`, io: `Ido`, iu: `\u1403\u14C4\u1483\u144E\u1450\u1466`, jv: `Basa Jawa`, ki: `Gikuyu`, kr: `Kanuri`, ks: `\u06A9\u0672\u0634\u064F\u0631`, kw: `Kernewek`, lg: `Luganda`, li: `Limburgs`, lu: `Tshiluba`, mh: `Kajin M\u0327aje\u013C`, na: `Dorerin Naoero`, nb: `Norsk Bokm\xE5l`, nd: `isiNdebele`, ng: `Oshiwambo`, nn: `Norsk Nynorsk`, nr: `isiNdebele (South)`, nv: `Din\xE9 Bizaad`, oc: `Occitan`, oj: `Anishinaabemowin`, om: `Afaan Oromoo`, or: `\u0B13\u0B21\u0B3C\u0B3F\u0B06`, os: `\u0418\u0440\u043E\u043D`, pa: `\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40`, pi: `\u{11005}\u{1102F}\u{11022}`, rm: `Rumantsch`, rn: `Ikirundi`, rw: `Kinyarwanda`, sa: `\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D`, sc: `Sardu`, sg: `S\xE4ng\xF6`, ss: `SiSwati`, st: `Sesotho`, ti: `\u1275\u130D\u122D\u129B`, tn: `Setswana`, to: `Faka Tonga`, ts: `Xitsonga`, tt: `\u0422\u0430\u0442\u0430\u0440\u0447\u0430`, tw: `Twi`, ty: `Reo Tahiti`, ve: `Tshiven\u1E13a`, vo: `Volap\xFCk`, wa: `Walon`, wo: `Wolof`, za: `Sa\u026F cue\u014B\u0185` };
|
|
810
|
+
var mn = (e5, t2) => {
|
|
811
|
+
e5.searchParams.set(`lang`, t2);
|
|
812
|
+
};
|
|
813
|
+
var hn = (e5, t2) => {
|
|
814
|
+
let n2 = e5.hostname.split(`.`);
|
|
815
|
+
n2[0] === `www` && (n2 = n2.slice(1)), n2 = [t2, ...n2], e5.hostname = n2.join(`.`);
|
|
816
|
+
};
|
|
817
|
+
var gn = (e5, t2) => {
|
|
818
|
+
e5.pathname = `/${t2}${e5.pathname}`;
|
|
819
|
+
};
|
|
820
|
+
var _n = (e5, t2) => {
|
|
821
|
+
if (!t2.languageCode || !t2?.resolutionMethod) return e5;
|
|
822
|
+
let n2 = new URL(e5);
|
|
823
|
+
return (t2?.resolutionMethod === `QUERY_PARAM` ? mn : t2?.resolutionMethod === `SUBDOMAIN` ? hn : gn)(n2, t2.languageCode), n2.href;
|
|
811
824
|
};
|
|
812
|
-
|
|
813
|
-
|
|
825
|
+
var vn = (e5, t2) => {
|
|
826
|
+
if (!e5?.length) return e5;
|
|
827
|
+
let n2;
|
|
828
|
+
try {
|
|
829
|
+
n2 = new URL(e5);
|
|
830
|
+
} catch {
|
|
831
|
+
return e5;
|
|
832
|
+
}
|
|
833
|
+
n2.searchParams.delete(`lang`);
|
|
834
|
+
let r2 = n2.pathname.split(`/`)[1]?.toLowerCase();
|
|
835
|
+
if (t2.includes(r2 ?? ``)) {
|
|
836
|
+
let e6 = n2.pathname.split(`/`);
|
|
837
|
+
e6.splice(1, 1), n2.pathname = e6.join(`/`);
|
|
838
|
+
}
|
|
839
|
+
let i2 = n2.hostname.split(`.`)[0]?.toLowerCase();
|
|
840
|
+
if (t2.includes(i2 ?? ``)) {
|
|
841
|
+
let e6 = n2.hostname.split(`.`);
|
|
842
|
+
e6.shift(), n2.hostname = e6.join(`.`);
|
|
843
|
+
}
|
|
844
|
+
return n2.href;
|
|
845
|
+
};
|
|
846
|
+
function yn() {
|
|
847
|
+
let e5 = bn();
|
|
848
|
+
return e5 ? xn(e5) : [];
|
|
849
|
+
}
|
|
850
|
+
function bn() {
|
|
851
|
+
let e5 = typeof globals < `u` ? globals?.$ns?.[`wix-window`]?.multilingual : void 0, t2 = typeof window < `u` ? window?.essentials?.multilingual : void 0;
|
|
852
|
+
return e5 ?? t2 ?? globalThis?.__wix_site_metadata__?.multilingual;
|
|
853
|
+
}
|
|
854
|
+
function xn(e5) {
|
|
855
|
+
try {
|
|
856
|
+
if (e5?.supportedLanguages?.length) {
|
|
857
|
+
let t2 = e5.supportedLanguages, n2 = t2.map((e6) => e6.languageCode).filter(Boolean), r2 = e5.cleanUrl ?? Tn(n2);
|
|
858
|
+
return t2.map((e6) => ({ id: e6.languageCode, displayName: Sn(e6), regionalFormat: [e6.locale?.languageCode, e6.locale?.country].filter(Boolean).join(`-`), url: Cn(e6, r2), primary: e6.isPrimary, resolutionMethod: e6.resolutionMethod }));
|
|
859
|
+
}
|
|
860
|
+
if (e5?.siteLanguages?.length) {
|
|
861
|
+
let t2 = e5.siteLanguages, n2 = Tn(t2.map((e6) => e6.languageCode).filter(Boolean));
|
|
862
|
+
return t2.map((e6) => ({ id: e6.languageCode, displayName: Sn(e6), regionalFormat: e6.locale, url: Cn(e6, n2), primary: e6.isPrimaryLanguage, resolutionMethod: e6.resolutionMethod ? wn(e6.resolutionMethod) : void 0 }));
|
|
863
|
+
}
|
|
864
|
+
} catch (e6) {
|
|
865
|
+
return console.warn(`[Multilingual Manager] listSupportedLanguages failed`, e6), [];
|
|
866
|
+
}
|
|
867
|
+
return console.warn(`[Multilingual Manager] listSupportedLanguages is not available`), [];
|
|
868
|
+
}
|
|
869
|
+
function Sn(e5) {
|
|
870
|
+
let t2 = pn[e5.languageCode];
|
|
871
|
+
if (t2) return t2;
|
|
872
|
+
let n2 = e5.name ?? e5.countryCode;
|
|
873
|
+
if (n2) return n2;
|
|
874
|
+
}
|
|
875
|
+
function Cn(e5, t2) {
|
|
876
|
+
if (e5.url || !t2 || !e5.resolutionMethod) return e5.url;
|
|
877
|
+
if (e5.languageCode) try {
|
|
878
|
+
return _n(t2, { languageCode: e5.languageCode, countryCode: e5.countryCode, resolutionMethod: wn(e5.resolutionMethod), locale: { languageCode: e5.languageCode, country: e5.countryCode } });
|
|
879
|
+
} catch (e6) {
|
|
880
|
+
console.warn(`[Multilingual Manager] buildUrlForLanguage failed`, e6);
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
function wn(e5) {
|
|
885
|
+
switch (e5) {
|
|
886
|
+
case `QUERY_PARAM`:
|
|
887
|
+
case `QueryParam`:
|
|
888
|
+
return fn.QUERY_PARAM;
|
|
889
|
+
case `SUBDOMAIN`:
|
|
890
|
+
case `Subdomain`:
|
|
891
|
+
return fn.SUBDOMAIN;
|
|
892
|
+
case `SUBDIRECTORY`:
|
|
893
|
+
case `Subdirectory`:
|
|
894
|
+
return fn.SUBDIRECTORY;
|
|
895
|
+
default:
|
|
896
|
+
return;
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
function Tn(e5) {
|
|
900
|
+
let t2 = typeof window < `u` && window.location?.href ? window.location.href : ``;
|
|
901
|
+
try {
|
|
902
|
+
return vn(t2, e5);
|
|
903
|
+
} catch (e6) {
|
|
904
|
+
return console.warn(`[Multilingual Manager] cleanCurrentUrl failed`, e6), t2;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
var En = `x-wix-linguist`;
|
|
908
|
+
var Dn = `00000000-0000-0000-0000-000000000000`;
|
|
909
|
+
var On = `false`;
|
|
910
|
+
var kn = () => {
|
|
911
|
+
let e5 = Mn(`language`), t2 = Mn(`locale`);
|
|
912
|
+
if (e5) return { [En]: [e5, t2 || e5, On, Dn].join(`|`) };
|
|
913
|
+
};
|
|
914
|
+
function An() {
|
|
915
|
+
let e5 = null, t2 = null;
|
|
814
916
|
return { promise: new Promise((n2, r2) => {
|
|
815
|
-
|
|
816
|
-
}), resolve:
|
|
817
|
-
}
|
|
818
|
-
var
|
|
819
|
-
var
|
|
820
|
-
var
|
|
821
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 =
|
|
822
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
823
|
-
return
|
|
917
|
+
e5 = n2, t2 = r2;
|
|
918
|
+
}), resolve: e5, reject: t2 };
|
|
919
|
+
}
|
|
920
|
+
var jn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
921
|
+
var Mn = (e5) => jn()?.[e5];
|
|
922
|
+
var Nn = ({ createHost: e5 }) => ({ __type: `host`, create: (e6) => ({}), host: (t2) => {
|
|
923
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e5(t2), o2 = Fn();
|
|
924
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: Mn(`language`), locale: Mn(`locale`), get passThroughHeaders() {
|
|
925
|
+
return kn();
|
|
824
926
|
} } };
|
|
825
|
-
}, auth: (
|
|
927
|
+
}, auth: (e6) => {
|
|
826
928
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
827
|
-
!
|
|
828
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
929
|
+
!e6 && Pn() && (e6 = t2?.getAccessTokenFunction?.());
|
|
930
|
+
let n2 = false, { resolve: r2, promise: i2 } = An();
|
|
829
931
|
return { getAuthHeaders: async () => {
|
|
830
|
-
if (!
|
|
831
|
-
return { headers: { Authorization: await
|
|
832
|
-
}, getAccessTokenInjector: () => (n2 = true, (
|
|
833
|
-
r2(
|
|
932
|
+
if (!e6 && n2 && (e6 = await i2), !e6) throw Error(`Failed to resolve auth token`);
|
|
933
|
+
return { headers: { Authorization: await e6() } };
|
|
934
|
+
}, getAccessTokenInjector: () => (n2 = true, (e7) => {
|
|
935
|
+
r2(e7);
|
|
834
936
|
}) };
|
|
835
937
|
} });
|
|
836
|
-
function
|
|
938
|
+
function Pn() {
|
|
837
939
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
838
940
|
}
|
|
839
|
-
function
|
|
840
|
-
let
|
|
841
|
-
if (!
|
|
842
|
-
let t2 = new URL(
|
|
941
|
+
function Fn() {
|
|
942
|
+
let e5 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
943
|
+
if (!e5) return;
|
|
944
|
+
let t2 = new URL(e5);
|
|
843
945
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
844
946
|
}
|
|
845
|
-
var
|
|
846
|
-
if (!
|
|
847
|
-
return
|
|
947
|
+
var In = ({ clientSdk: e5, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
948
|
+
if (!e5) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
|
|
949
|
+
return e5.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
848
950
|
}, getAccessToken: () => {
|
|
849
951
|
throw Error(`Not implemented`);
|
|
850
952
|
}, observeState: () => ({ disconnect: () => {
|
|
851
953
|
} }) });
|
|
852
|
-
var
|
|
853
|
-
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ??
|
|
954
|
+
var Ln = Nn({ createHost: function(e5) {
|
|
955
|
+
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e5?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e5 || {};
|
|
854
956
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
855
|
-
return { channel:
|
|
957
|
+
return { channel: In({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
856
958
|
} };
|
|
857
959
|
} });
|
|
858
|
-
var
|
|
859
|
-
let n2 =
|
|
960
|
+
var Rn = (e5, t2) => {
|
|
961
|
+
let n2 = Ln.host({ applicationId: e5, componentId: t2 }), r2 = Ln.auth();
|
|
860
962
|
return He({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
861
963
|
};
|
|
862
|
-
var
|
|
863
|
-
function
|
|
864
|
-
let
|
|
865
|
-
if (
|
|
866
|
-
return
|
|
964
|
+
var zn = (e5) => Rn(`13d21c63-b5ec-5912-8397-c3a5ddb27a97`, e5);
|
|
965
|
+
function Bn() {
|
|
966
|
+
let e5 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
967
|
+
if (e5) return { initWixModules(t3, n3) {
|
|
968
|
+
return Vn(() => e5(t3, n3));
|
|
867
969
|
}, fetchWithAuth() {
|
|
868
970
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
869
971
|
}, graphql() {
|
|
870
972
|
throw Error(`graphql is not available in this context`);
|
|
871
973
|
} };
|
|
872
|
-
let t2 = typeof $wixContext < `u` ? $wixContext.client :
|
|
873
|
-
if (t2 || n2) return { initWixModules(
|
|
974
|
+
let t2 = typeof $wixContext < `u` ? $wixContext.client : g.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : g.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : g.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : g.elevatedClient;
|
|
975
|
+
if (t2 || n2) return { initWixModules(e6, r2) {
|
|
874
976
|
if (r2) {
|
|
875
977
|
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`);
|
|
876
|
-
return
|
|
978
|
+
return Vn(() => n2.use(e6));
|
|
877
979
|
}
|
|
878
980
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
879
|
-
return
|
|
880
|
-
}, fetchWithAuth: (
|
|
981
|
+
return Vn(() => t2.use(e6));
|
|
982
|
+
}, fetchWithAuth: (e6, n3) => {
|
|
881
983
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
882
|
-
return t2.fetchWithAuth(
|
|
984
|
+
return t2.fetchWithAuth(e6, n3);
|
|
883
985
|
}, getAuth() {
|
|
884
986
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
885
987
|
return t2.auth;
|
|
886
|
-
}, async graphql(
|
|
988
|
+
}, async graphql(e6, n3, r2) {
|
|
887
989
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
888
|
-
return t2.graphql(
|
|
990
|
+
return t2.graphql(e6, n3, r2);
|
|
889
991
|
} };
|
|
890
992
|
}
|
|
891
|
-
function
|
|
892
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
893
|
-
globalThis.__wix_context__ = void 0,
|
|
993
|
+
function Vn(e5) {
|
|
994
|
+
let t2 = globalThis.__wix_context__, n2 = { client: g.client, elevatedClient: g.elevatedClient }, r2;
|
|
995
|
+
globalThis.__wix_context__ = void 0, g.client = void 0, g.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
894
996
|
try {
|
|
895
|
-
return
|
|
997
|
+
return e5();
|
|
896
998
|
} finally {
|
|
897
|
-
globalThis.__wix_context__ = t2,
|
|
999
|
+
globalThis.__wix_context__ = t2, g.client = n2.client, g.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
898
1000
|
}
|
|
899
1001
|
}
|
|
900
|
-
function
|
|
901
|
-
return { ...
|
|
902
|
-
let r2 =
|
|
1002
|
+
function Hn(e5, t2) {
|
|
1003
|
+
return { ...e5, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
1004
|
+
let r2 = Bn();
|
|
903
1005
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
904
|
-
return r2.initWixModules(
|
|
1006
|
+
return r2.initWixModules(e5)[t3].apply(void 0, n2);
|
|
905
1007
|
}])) };
|
|
906
1008
|
}
|
|
907
|
-
function
|
|
908
|
-
return
|
|
1009
|
+
function Un(e5) {
|
|
1010
|
+
return Hn({ __type: `host`, create: (t2) => Object.entries(e5).reduce((e6, [n2, r2]) => ({ ...e6, [n2]: r2(t2) }), {}) }, Object.keys(e5));
|
|
909
1011
|
}
|
|
910
|
-
var
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
}
|
|
1012
|
+
var F = (e5) => typeof e5 == `string`;
|
|
1013
|
+
var Wn = () => {
|
|
1014
|
+
let e5, t2, n2 = new Promise((n3, r2) => {
|
|
1015
|
+
e5 = n3, t2 = r2;
|
|
1016
|
+
});
|
|
1017
|
+
return n2.resolve = e5, n2.reject = t2, n2;
|
|
1018
|
+
};
|
|
1019
|
+
var Gn = (e5) => e5 == null ? `` : `` + e5;
|
|
1020
|
+
var Kn = (e5, t2, n2) => {
|
|
1021
|
+
e5.forEach((e6) => {
|
|
1022
|
+
t2[e6] && (n2[e6] = t2[e6]);
|
|
1023
|
+
});
|
|
1024
|
+
};
|
|
1025
|
+
var qn = /###/g;
|
|
1026
|
+
var Jn = (e5) => e5 && e5.indexOf(`###`) > -1 ? e5.replace(qn, `.`) : e5;
|
|
1027
|
+
var Yn = (e5) => !e5 || F(e5);
|
|
1028
|
+
var Xn = (e5, t2, n2) => {
|
|
1029
|
+
let r2 = F(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1030
|
+
for (; i2 < r2.length - 1; ) {
|
|
1031
|
+
if (Yn(e5)) return {};
|
|
1032
|
+
let t3 = Jn(r2[i2]);
|
|
1033
|
+
!e5[t3] && n2 && (e5[t3] = new n2()), e5 = Object.prototype.hasOwnProperty.call(e5, t3) ? e5[t3] : {}, ++i2;
|
|
1034
|
+
}
|
|
1035
|
+
return Yn(e5) ? {} : { obj: e5, k: Jn(r2[i2]) };
|
|
1036
|
+
};
|
|
1037
|
+
var Zn = (e5, t2, n2) => {
|
|
1038
|
+
let { obj: r2, k: i2 } = Xn(e5, t2, Object);
|
|
1039
|
+
if (r2 !== void 0 || t2.length === 1) {
|
|
1040
|
+
r2[i2] = n2;
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Xn(e5, o2, Object);
|
|
1044
|
+
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = Xn(e5, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1045
|
+
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1046
|
+
};
|
|
1047
|
+
var Qn = (e5, t2, n2, r2) => {
|
|
1048
|
+
let { obj: i2, k: a2 } = Xn(e5, t2, Object);
|
|
1049
|
+
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1050
|
+
};
|
|
1051
|
+
var $n = (e5, t2) => {
|
|
1052
|
+
let { obj: n2, k: r2 } = Xn(e5, t2);
|
|
1053
|
+
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1054
|
+
};
|
|
1055
|
+
var er = (e5, t2, n2) => {
|
|
1056
|
+
let r2 = $n(e5, n2);
|
|
1057
|
+
return r2 === void 0 ? $n(t2, n2) : r2;
|
|
1058
|
+
};
|
|
1059
|
+
var tr = (e5, t2, n2) => {
|
|
1060
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (r2 in e5 ? F(e5[r2]) || e5[r2] instanceof String || F(t2[r2]) || t2[r2] instanceof String ? n2 && (e5[r2] = t2[r2]) : tr(e5[r2], t2[r2], n2) : e5[r2] = t2[r2]);
|
|
1061
|
+
return e5;
|
|
1062
|
+
};
|
|
1063
|
+
var I = (e5) => e5.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1064
|
+
var nr = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1065
|
+
var rr = (e5) => F(e5) ? e5.replace(/[&<>"'\/]/g, (e6) => nr[e6]) : e5;
|
|
1066
|
+
var ir = class {
|
|
1067
|
+
constructor(e5) {
|
|
1068
|
+
this.capacity = e5, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1069
|
+
}
|
|
1070
|
+
getRegExp(e5) {
|
|
1071
|
+
let t2 = this.regExpMap.get(e5);
|
|
1072
|
+
if (t2 !== void 0) return t2;
|
|
1073
|
+
let n2 = new RegExp(e5);
|
|
1074
|
+
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e5, n2), this.regExpQueue.push(e5), n2;
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
var ar = [` `, `,`, `?`, `!`, `;`];
|
|
1078
|
+
var or = new ir(20);
|
|
1079
|
+
var sr = (e5, t2, n2) => {
|
|
1080
|
+
t2 ||= ``, n2 ||= ``;
|
|
1081
|
+
let r2 = ar.filter((e6) => t2.indexOf(e6) < 0 && n2.indexOf(e6) < 0);
|
|
1082
|
+
if (r2.length === 0) return true;
|
|
1083
|
+
let i2 = or.getRegExp(`(${r2.map((e6) => e6 === `?` ? `\\?` : e6).join(`|`)})`), a2 = !i2.test(e5);
|
|
1084
|
+
if (!a2) {
|
|
1085
|
+
let t3 = e5.indexOf(n2);
|
|
1086
|
+
t3 > 0 && !i2.test(e5.substring(0, t3)) && (a2 = true);
|
|
1087
|
+
}
|
|
1088
|
+
return a2;
|
|
1089
|
+
};
|
|
1090
|
+
var cr = (e5, t2, n2 = `.`) => {
|
|
1091
|
+
if (!e5) return;
|
|
1092
|
+
if (e5[t2]) return Object.prototype.hasOwnProperty.call(e5, t2) ? e5[t2] : void 0;
|
|
1093
|
+
let r2 = t2.split(n2), i2 = e5;
|
|
1094
|
+
for (let e6 = 0; e6 < r2.length; ) {
|
|
1095
|
+
if (!i2 || typeof i2 != `object`) return;
|
|
1096
|
+
let t3, a2 = ``;
|
|
1097
|
+
for (let o2 = e6; o2 < r2.length; ++o2) if (o2 !== e6 && (a2 += n2), a2 += r2[o2], t3 = i2[a2], t3 !== void 0) {
|
|
1098
|
+
if ([`string`, `number`, `boolean`].indexOf(typeof t3) > -1 && o2 < r2.length - 1) continue;
|
|
1099
|
+
e6 += o2 - e6 + 1;
|
|
1100
|
+
break;
|
|
1101
|
+
}
|
|
1102
|
+
i2 = t3;
|
|
1103
|
+
}
|
|
1104
|
+
return i2;
|
|
1105
|
+
};
|
|
1106
|
+
var lr = (e5) => e5?.replace(/_/g, `-`);
|
|
1107
|
+
var ur = { type: `logger`, log(e5) {
|
|
1108
|
+
this.output(`log`, e5);
|
|
1109
|
+
}, warn(e5) {
|
|
1110
|
+
this.output(`warn`, e5);
|
|
1111
|
+
}, error(e5) {
|
|
1112
|
+
this.output(`error`, e5);
|
|
1113
|
+
}, output(e5, t2) {
|
|
1114
|
+
console?.[e5]?.apply?.(console, t2);
|
|
1115
|
+
} };
|
|
1116
|
+
var L = new class e2 {
|
|
1117
|
+
constructor(e5, t2 = {}) {
|
|
1118
|
+
this.init(e5, t2);
|
|
1119
|
+
}
|
|
1120
|
+
init(e5, t2 = {}) {
|
|
1121
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e5 || ur, this.options = t2, this.debug = t2.debug;
|
|
1122
|
+
}
|
|
1123
|
+
log(...e5) {
|
|
1124
|
+
return this.forward(e5, `log`, ``, true);
|
|
1125
|
+
}
|
|
1126
|
+
warn(...e5) {
|
|
1127
|
+
return this.forward(e5, `warn`, ``, true);
|
|
1128
|
+
}
|
|
1129
|
+
error(...e5) {
|
|
1130
|
+
return this.forward(e5, `error`, ``);
|
|
1131
|
+
}
|
|
1132
|
+
deprecate(...e5) {
|
|
1133
|
+
return this.forward(e5, `warn`, `WARNING DEPRECATED: `, true);
|
|
1134
|
+
}
|
|
1135
|
+
forward(e5, t2, n2, r2) {
|
|
1136
|
+
return r2 && !this.debug ? null : (F(e5[0]) && (e5[0] = `${n2}${this.prefix} ${e5[0]}`), this.logger[t2](e5));
|
|
1137
|
+
}
|
|
1138
|
+
create(t2) {
|
|
1139
|
+
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
1140
|
+
}
|
|
1141
|
+
clone(t2) {
|
|
1142
|
+
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1143
|
+
}
|
|
1144
|
+
}();
|
|
1145
|
+
var dr = class {
|
|
1146
|
+
constructor() {
|
|
1147
|
+
this.observers = {};
|
|
1148
|
+
}
|
|
1149
|
+
on(e5, t2) {
|
|
1150
|
+
return e5.split(` `).forEach((e6) => {
|
|
1151
|
+
this.observers[e6] || (this.observers[e6] = /* @__PURE__ */ new Map());
|
|
1152
|
+
let n2 = this.observers[e6].get(t2) || 0;
|
|
1153
|
+
this.observers[e6].set(t2, n2 + 1);
|
|
1154
|
+
}), this;
|
|
1155
|
+
}
|
|
1156
|
+
off(e5, t2) {
|
|
1157
|
+
if (this.observers[e5]) {
|
|
1158
|
+
if (!t2) {
|
|
1159
|
+
delete this.observers[e5];
|
|
1160
|
+
return;
|
|
1161
|
+
}
|
|
1162
|
+
this.observers[e5].delete(t2);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
emit(e5, ...t2) {
|
|
1166
|
+
this.observers[e5] && Array.from(this.observers[e5].entries()).forEach(([e6, n2]) => {
|
|
1167
|
+
for (let r2 = 0; r2 < n2; r2++) e6(...t2);
|
|
1168
|
+
}), this.observers[`*`] && Array.from(this.observers[`*`].entries()).forEach(([n2, r2]) => {
|
|
1169
|
+
for (let i2 = 0; i2 < r2; i2++) n2.apply(n2, [e5, ...t2]);
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
};
|
|
1173
|
+
var fr = class extends dr {
|
|
1174
|
+
constructor(e5, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1175
|
+
super(), this.data = e5 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1176
|
+
}
|
|
1177
|
+
addNamespaces(e5) {
|
|
1178
|
+
this.options.ns.indexOf(e5) < 0 && this.options.ns.push(e5);
|
|
1179
|
+
}
|
|
1180
|
+
removeNamespaces(e5) {
|
|
1181
|
+
let t2 = this.options.ns.indexOf(e5);
|
|
1182
|
+
t2 > -1 && this.options.ns.splice(t2, 1);
|
|
1183
|
+
}
|
|
1184
|
+
getResource(e5, t2, n2, r2 = {}) {
|
|
1185
|
+
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
1186
|
+
e5.indexOf(`.`) > -1 ? o2 = e5.split(`.`) : (o2 = [e5, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : F(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
1187
|
+
let s2 = $n(this.data, o2);
|
|
1188
|
+
return !s2 && !t2 && !n2 && e5.indexOf(`.`) > -1 && (e5 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !F(n2) ? s2 : cr(this.data?.[e5]?.[t2], n2, i2);
|
|
1189
|
+
}
|
|
1190
|
+
addResource(e5, t2, n2, r2, i2 = { silent: false }) {
|
|
1191
|
+
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e5, t2];
|
|
1192
|
+
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Zn(this.data, o2, r2), i2.silent || this.emit(`added`, e5, t2, n2, r2);
|
|
1193
|
+
}
|
|
1194
|
+
addResources(e5, t2, n2, r2 = { silent: false }) {
|
|
1195
|
+
for (let r3 in n2) (F(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e5, t2, r3, n2[r3], { silent: true });
|
|
1196
|
+
r2.silent || this.emit(`added`, e5, t2, n2);
|
|
1197
|
+
}
|
|
1198
|
+
addResourceBundle(e5, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
1199
|
+
let o2 = [e5, t2];
|
|
1200
|
+
e5.indexOf(`.`) > -1 && (o2 = e5.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
1201
|
+
let s2 = $n(this.data, o2) || {};
|
|
1202
|
+
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? tr(s2, n2, i2) : s2 = { ...s2, ...n2 }, Zn(this.data, o2, s2), a2.silent || this.emit(`added`, e5, t2, n2);
|
|
1203
|
+
}
|
|
1204
|
+
removeResourceBundle(e5, t2) {
|
|
1205
|
+
this.hasResourceBundle(e5, t2) && delete this.data[e5][t2], this.removeNamespaces(t2), this.emit(`removed`, e5, t2);
|
|
1206
|
+
}
|
|
1207
|
+
hasResourceBundle(e5, t2) {
|
|
1208
|
+
return this.getResource(e5, t2) !== void 0;
|
|
1209
|
+
}
|
|
1210
|
+
getResourceBundle(e5, t2) {
|
|
1211
|
+
return t2 ||= this.options.defaultNS, this.getResource(e5, t2);
|
|
1212
|
+
}
|
|
1213
|
+
getDataByLanguage(e5) {
|
|
1214
|
+
return this.data[e5];
|
|
1215
|
+
}
|
|
1216
|
+
hasLanguageSomeTranslations(e5) {
|
|
1217
|
+
let t2 = this.getDataByLanguage(e5);
|
|
1218
|
+
return !!(t2 && Object.keys(t2) || []).find((e6) => t2[e6] && Object.keys(t2[e6]).length > 0);
|
|
1219
|
+
}
|
|
1220
|
+
toJSON() {
|
|
1221
|
+
return this.data;
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1224
|
+
var pr = { processors: {}, addPostProcessor(e5) {
|
|
1225
|
+
this.processors[e5.name] = e5;
|
|
1226
|
+
}, handle(e5, t2, n2, r2, i2) {
|
|
1227
|
+
return e5.forEach((e6) => {
|
|
1228
|
+
t2 = this.processors[e6]?.process(t2, n2, r2, i2) ?? t2;
|
|
1229
|
+
}), t2;
|
|
1230
|
+
} };
|
|
1231
|
+
var mr = Symbol(`i18next/PATH_KEY`);
|
|
1232
|
+
function hr() {
|
|
1233
|
+
let e5 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1234
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === mr ? e5 : (e5.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1235
|
+
}
|
|
1236
|
+
function R(e5, t2) {
|
|
1237
|
+
let { [mr]: n2 } = e5(hr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`;
|
|
1238
|
+
if (n2.length > 1 && i2) {
|
|
1239
|
+
let e6 = t2?.ns, a2 = Array.isArray(e6) ? e6 : null;
|
|
1240
|
+
if (a2 && a2.length > 1 && a2.slice(1).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1241
|
+
}
|
|
1242
|
+
return n2.join(r2);
|
|
1243
|
+
}
|
|
1244
|
+
var gr = {};
|
|
1245
|
+
var _r = (e5) => !F(e5) && typeof e5 != `boolean` && typeof e5 != `number`;
|
|
1246
|
+
var vr = class e3 extends dr {
|
|
1247
|
+
constructor(e5, t2 = {}) {
|
|
1248
|
+
super(), Kn([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e5, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = L.create(`translator`);
|
|
1249
|
+
}
|
|
1250
|
+
changeLanguage(e5) {
|
|
1251
|
+
e5 && (this.language = e5);
|
|
1252
|
+
}
|
|
1253
|
+
exists(e5, t2 = { interpolation: {} }) {
|
|
1254
|
+
let n2 = { ...t2 };
|
|
1255
|
+
if (e5 == null) return false;
|
|
1256
|
+
let r2 = this.resolve(e5, n2);
|
|
1257
|
+
if (r2?.res === void 0) return false;
|
|
1258
|
+
let i2 = _r(r2.res);
|
|
1259
|
+
return !(n2.returnObjects === false && i2);
|
|
1260
|
+
}
|
|
1261
|
+
extractFromKey(e5, t2) {
|
|
1262
|
+
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
1263
|
+
n2 === void 0 && (n2 = `:`);
|
|
1264
|
+
let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e5.indexOf(n2) > -1, o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !sr(e5, n2, r2);
|
|
1265
|
+
if (a2 && !o2) {
|
|
1266
|
+
let t3 = e5.match(this.interpolator.nestingRegexp);
|
|
1267
|
+
if (t3 && t3.length > 0) return { key: e5, namespaces: F(i2) ? [i2] : i2 };
|
|
1268
|
+
let a3 = e5.split(n2);
|
|
1269
|
+
(n2 !== r2 || n2 === r2 && this.options.ns.indexOf(a3[0]) > -1) && (i2 = a3.shift()), e5 = a3.join(r2);
|
|
1270
|
+
}
|
|
1271
|
+
return { key: e5, namespaces: F(i2) ? [i2] : i2 };
|
|
1272
|
+
}
|
|
1273
|
+
translate(t2, n2, r2) {
|
|
1274
|
+
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1275
|
+
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1276
|
+
typeof t2 == `function` && (t2 = R(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e5) => typeof e5 == `function` ? R(e5, { ...this.options, ...i2 }) : String(e5));
|
|
1277
|
+
let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
|
|
1278
|
+
u2 === void 0 && (u2 = `:`);
|
|
1279
|
+
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1280
|
+
if (d2?.toLowerCase() === `cimode`) return f2 ? a2 ? { res: `${l2}${u2}${s2}`, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : `${l2}${u2}${s2}` : a2 ? { res: s2, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : s2;
|
|
1281
|
+
let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !F(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, ee2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, C2 = b2 && !i2.ordinal && i2.count === 0, w2 = C2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${ee2}`] || i2.defaultValue, T2 = m2;
|
|
1282
|
+
y2 && !m2 && x2 && (T2 = w2);
|
|
1283
|
+
let E2 = _r(T2), D2 = Object.prototype.toString.apply(T2);
|
|
1284
|
+
if (y2 && T2 && E2 && _2.indexOf(D2) < 0 && !(F(v2) && Array.isArray(T2))) {
|
|
1285
|
+
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1286
|
+
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
1287
|
+
let e5 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
1288
|
+
return a2 ? (p2.res = e5, p2.usedParams = this.getUsedParamsDetails(i2), p2) : e5;
|
|
1289
|
+
}
|
|
1290
|
+
if (o2) {
|
|
1291
|
+
let e5 = Array.isArray(T2), t3 = e5 ? [] : {}, n3 = e5 ? g2 : h2;
|
|
1292
|
+
for (let e6 in T2) if (Object.prototype.hasOwnProperty.call(T2, e6)) {
|
|
1293
|
+
let r3 = `${n3}${o2}${e6}`;
|
|
1294
|
+
t3[e6] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: _r(w2) ? w2[e6] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e6] === r3 && (t3[e6] = T2[e6]);
|
|
1295
|
+
}
|
|
1296
|
+
m2 = t3;
|
|
1297
|
+
}
|
|
1298
|
+
} else if (y2 && F(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
1299
|
+
else {
|
|
1300
|
+
let e5 = false, n3 = false;
|
|
1301
|
+
!this.isValidLookup(m2) && x2 && (e5 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
1302
|
+
let a3 = (i2.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n3 ? void 0 : m2, c3 = x2 && w2 !== m2 && this.options.updateMissing;
|
|
1303
|
+
if (n3 || e5 || c3) {
|
|
1304
|
+
if (this.logger.log(c3 ? `updateKey` : `missingKey`, d2, l2, s2, c3 ? w2 : m2), o2) {
|
|
1305
|
+
let e7 = this.resolve(s2, { ...i2, keySeparator: false });
|
|
1306
|
+
e7 && e7.res && this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`);
|
|
1307
|
+
}
|
|
1308
|
+
let e6 = [], t3 = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i2.lng || this.language);
|
|
1309
|
+
if (this.options.saveMissingTo === `fallback` && t3 && t3[0]) for (let n5 = 0; n5 < t3.length; n5++) e6.push(t3[n5]);
|
|
1310
|
+
else this.options.saveMissingTo === `all` ? e6 = this.languageUtils.toResolveHierarchy(i2.lng || this.language) : e6.push(i2.lng || this.language);
|
|
1311
|
+
let n4 = (e7, t4, n5) => {
|
|
1312
|
+
let r3 = x2 && n5 !== m2 ? n5 : a3;
|
|
1313
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(e7, l2, t4, r3, c3, i2) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e7, l2, t4, r3, c3, i2), this.emit(`missingKey`, e7, l2, t4, m2);
|
|
1314
|
+
};
|
|
1315
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && b2 ? e6.forEach((e7) => {
|
|
1316
|
+
let t4 = this.pluralResolver.getSuffixes(e7, i2);
|
|
1317
|
+
C2 && i2[`defaultValue${this.options.pluralSeparator}zero`] && t4.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t4.push(`${this.options.pluralSeparator}zero`), t4.forEach((t5) => {
|
|
1318
|
+
n4([e7], s2 + t5, i2[`defaultValue${t5}`] || w2);
|
|
1319
|
+
});
|
|
1320
|
+
}) : n4(e6, s2, w2));
|
|
1321
|
+
}
|
|
1322
|
+
m2 = this.extendTranslation(m2, t2, i2, p2, r2), n3 && m2 === s2 && this.options.appendNamespaceToMissingKey && (m2 = `${l2}${u2}${s2}`), (n3 || e5) && this.options.parseMissingKeyHandler && (m2 = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l2}${u2}${s2}` : s2, e5 ? m2 : void 0, i2));
|
|
1323
|
+
}
|
|
1324
|
+
return a2 ? (p2.res = m2, p2.usedParams = this.getUsedParamsDetails(i2), p2) : m2;
|
|
1325
|
+
}
|
|
1326
|
+
extendTranslation(e5, t2, n2, r2, i2) {
|
|
1327
|
+
if (this.i18nFormat?.parse) e5 = this.i18nFormat.parse(e5, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
|
|
1328
|
+
else if (!n2.skipInterpolation) {
|
|
1329
|
+
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
1330
|
+
let a3 = F(e5) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
1331
|
+
if (a3) {
|
|
1332
|
+
let t3 = e5.match(this.interpolator.nestingRegexp);
|
|
1333
|
+
o3 = t3 && t3.length;
|
|
1334
|
+
}
|
|
1335
|
+
let s2 = n2.replace && !F(n2.replace) ? n2.replace : n2;
|
|
1336
|
+
if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e5 = this.interpolator.interpolate(e5, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
|
|
1337
|
+
let t3 = e5.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
1338
|
+
o3 < r3 && (n2.nest = false);
|
|
1339
|
+
}
|
|
1340
|
+
!n2.lng && r2 && r2.res && (n2.lng = this.language || r2.usedLng), n2.nest !== false && (e5 = this.interpolator.nest(e5, (...e6) => i2?.[0] === e6[0] && !n2.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e6[0]} in key: ${t2[0]}`), null) : this.translate(...e6, t2), n2)), n2.interpolation && this.interpolator.reset();
|
|
1341
|
+
}
|
|
1342
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = F(a2) ? [a2] : a2;
|
|
1343
|
+
return e5 != null && o2?.length && n2.applyPostProcessor !== false && (e5 = pr.handle(o2, e5, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e5;
|
|
1344
|
+
}
|
|
1345
|
+
resolve(e5, t2 = {}) {
|
|
1346
|
+
let n2, r2, i2, a2, o2;
|
|
1347
|
+
return F(e5) && (e5 = [e5]), Array.isArray(e5) && (e5 = e5.map((e6) => typeof e6 == `function` ? R(e6, { ...this.options, ...t2 }) : e6)), e5.forEach((e6) => {
|
|
1348
|
+
if (this.isValidLookup(n2)) return;
|
|
1349
|
+
let s2 = this.extractFromKey(e6, t2), c2 = s2.key;
|
|
1350
|
+
r2 = c2;
|
|
1351
|
+
let l2 = s2.namespaces;
|
|
1352
|
+
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
1353
|
+
let u2 = t2.count !== void 0 && !F(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (F(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
1354
|
+
l2.forEach((e7) => {
|
|
1355
|
+
this.isValidLookup(n2) || (o2 = e7, !gr[`${p2[0]}-${e7}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (gr[`${p2[0]}-${e7}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
|
|
1356
|
+
if (this.isValidLookup(n2)) return;
|
|
1357
|
+
a2 = r3;
|
|
1358
|
+
let o3 = [c2];
|
|
1359
|
+
if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o3, c2, r3, e7, t2);
|
|
1360
|
+
else {
|
|
1361
|
+
let e8;
|
|
1362
|
+
u2 && (e8 = this.pluralResolver.getSuffix(r3, t2.count, t2));
|
|
1363
|
+
let n3 = `${this.options.pluralSeparator}zero`, i3 = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
1364
|
+
if (u2 && (t2.ordinal && e8.indexOf(i3) === 0 && o3.push(c2 + e8.replace(i3, this.options.pluralSeparator)), o3.push(c2 + e8), d2 && o3.push(c2 + n3)), f2) {
|
|
1365
|
+
let r4 = `${c2}${this.options.contextSeparator || `_`}${t2.context}`;
|
|
1366
|
+
o3.push(r4), u2 && (t2.ordinal && e8.indexOf(i3) === 0 && o3.push(r4 + e8.replace(i3, this.options.pluralSeparator)), o3.push(r4 + e8), d2 && o3.push(r4 + n3));
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
let s3;
|
|
1370
|
+
for (; s3 = o3.pop(); ) this.isValidLookup(n2) || (i2 = s3, n2 = this.getResource(r3, e7, s3, t2));
|
|
1371
|
+
}));
|
|
1372
|
+
});
|
|
1373
|
+
}), { res: n2, usedKey: r2, exactUsedKey: i2, usedLng: a2, usedNS: o2 };
|
|
1374
|
+
}
|
|
1375
|
+
isValidLookup(e5) {
|
|
1376
|
+
return e5 !== void 0 && !(!this.options.returnNull && e5 === null) && !(!this.options.returnEmptyString && e5 === ``);
|
|
1377
|
+
}
|
|
1378
|
+
getResource(e5, t2, n2, r2 = {}) {
|
|
1379
|
+
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e5, t2, n2, r2) : this.resourceStore.getResource(e5, t2, n2, r2);
|
|
1380
|
+
}
|
|
1381
|
+
getUsedParamsDetails(e5 = {}) {
|
|
1382
|
+
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e5.replace && !F(e5.replace), r2 = n2 ? e5.replace : e5;
|
|
1383
|
+
if (n2 && e5.count !== void 0 && (r2.count = e5.count), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
1384
|
+
r2 = { ...r2 };
|
|
1385
|
+
for (let e6 of t2) delete r2[e6];
|
|
1386
|
+
}
|
|
1387
|
+
return r2;
|
|
1388
|
+
}
|
|
1389
|
+
static hasDefaultValue(e5) {
|
|
1390
|
+
for (let t2 in e5) if (Object.prototype.hasOwnProperty.call(e5, t2) && t2.substring(0, 12) === `defaultValue` && e5[t2] !== void 0) return true;
|
|
1391
|
+
return false;
|
|
1392
|
+
}
|
|
1393
|
+
};
|
|
1394
|
+
var yr = class {
|
|
1395
|
+
constructor(e5) {
|
|
1396
|
+
this.options = e5, this.supportedLngs = this.options.supportedLngs || false, this.logger = L.create(`languageUtils`);
|
|
1397
|
+
}
|
|
1398
|
+
getScriptPartFromCode(e5) {
|
|
1399
|
+
if (e5 = lr(e5), !e5 || e5.indexOf(`-`) < 0) return null;
|
|
1400
|
+
let t2 = e5.split(`-`);
|
|
1401
|
+
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1402
|
+
}
|
|
1403
|
+
getLanguagePartFromCode(e5) {
|
|
1404
|
+
if (e5 = lr(e5), !e5 || e5.indexOf(`-`) < 0) return e5;
|
|
1405
|
+
let t2 = e5.split(`-`);
|
|
1406
|
+
return this.formatLanguageCode(t2[0]);
|
|
1407
|
+
}
|
|
1408
|
+
formatLanguageCode(e5) {
|
|
1409
|
+
if (F(e5) && e5.indexOf(`-`) > -1) {
|
|
1410
|
+
let t2;
|
|
1411
|
+
try {
|
|
1412
|
+
t2 = Intl.getCanonicalLocales(e5)[0];
|
|
1413
|
+
} catch {
|
|
1414
|
+
}
|
|
1415
|
+
return t2 && this.options.lowerCaseLng && (t2 = t2.toLowerCase()), t2 || (this.options.lowerCaseLng ? e5.toLowerCase() : e5);
|
|
1416
|
+
}
|
|
1417
|
+
return this.options.cleanCode || this.options.lowerCaseLng ? e5.toLowerCase() : e5;
|
|
1418
|
+
}
|
|
1419
|
+
isSupportedCode(e5) {
|
|
1420
|
+
return (this.options.load === `languageOnly` || this.options.nonExplicitSupportedLngs) && (e5 = this.getLanguagePartFromCode(e5)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e5) > -1;
|
|
1421
|
+
}
|
|
1422
|
+
getBestMatchFromCodes(e5) {
|
|
1423
|
+
if (!e5) return null;
|
|
1424
|
+
let t2;
|
|
1425
|
+
return e5.forEach((e6) => {
|
|
1426
|
+
if (t2) return;
|
|
1427
|
+
let n2 = this.formatLanguageCode(e6);
|
|
1428
|
+
(!this.options.supportedLngs || this.isSupportedCode(n2)) && (t2 = n2);
|
|
1429
|
+
}), !t2 && this.options.supportedLngs && e5.forEach((e6) => {
|
|
1430
|
+
if (t2) return;
|
|
1431
|
+
let n2 = this.getScriptPartFromCode(e6);
|
|
1432
|
+
if (this.isSupportedCode(n2)) return t2 = n2;
|
|
1433
|
+
let r2 = this.getLanguagePartFromCode(e6);
|
|
1434
|
+
if (this.isSupportedCode(r2)) return t2 = r2;
|
|
1435
|
+
t2 = this.options.supportedLngs.find((e7) => {
|
|
1436
|
+
if (e7 === r2 || !(e7.indexOf(`-`) < 0 && r2.indexOf(`-`) < 0) && (e7.indexOf(`-`) > 0 && r2.indexOf(`-`) < 0 && e7.substring(0, e7.indexOf(`-`)) === r2 || e7.indexOf(r2) === 0 && r2.length > 1)) return e7;
|
|
1437
|
+
});
|
|
1438
|
+
}), t2 ||= this.getFallbackCodes(this.options.fallbackLng)[0], t2;
|
|
1439
|
+
}
|
|
1440
|
+
getFallbackCodes(e5, t2) {
|
|
1441
|
+
if (!e5) return [];
|
|
1442
|
+
if (typeof e5 == `function` && (e5 = e5(t2)), F(e5) && (e5 = [e5]), Array.isArray(e5)) return e5;
|
|
1443
|
+
if (!t2) return e5.default || [];
|
|
1444
|
+
let n2 = e5[t2];
|
|
1445
|
+
return n2 ||= e5[this.getScriptPartFromCode(t2)], n2 ||= e5[this.formatLanguageCode(t2)], n2 ||= e5[this.getLanguagePartFromCode(t2)], n2 ||= e5.default, n2 || [];
|
|
1446
|
+
}
|
|
1447
|
+
toResolveHierarchy(e5, t2) {
|
|
1448
|
+
let n2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e5), r2 = [], i2 = (e6) => {
|
|
1449
|
+
e6 && (this.isSupportedCode(e6) ? r2.push(e6) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e6}`));
|
|
1450
|
+
};
|
|
1451
|
+
return F(e5) && (e5.indexOf(`-`) > -1 || e5.indexOf(`_`) > -1) ? (this.options.load !== `languageOnly` && i2(this.formatLanguageCode(e5)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && i2(this.getScriptPartFromCode(e5)), this.options.load !== `currentOnly` && i2(this.getLanguagePartFromCode(e5))) : F(e5) && i2(this.formatLanguageCode(e5)), n2.forEach((e6) => {
|
|
1452
|
+
r2.indexOf(e6) < 0 && i2(this.formatLanguageCode(e6));
|
|
1453
|
+
}), r2;
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
var br = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1457
|
+
var xr = { select: (e5) => e5 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1458
|
+
var Sr = class {
|
|
1459
|
+
constructor(e5, t2 = {}) {
|
|
1460
|
+
this.languageUtils = e5, this.options = t2, this.logger = L.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1461
|
+
}
|
|
1462
|
+
clearCache() {
|
|
1463
|
+
this.pluralRulesCache = {};
|
|
1464
|
+
}
|
|
1465
|
+
getRule(e5, t2 = {}) {
|
|
1466
|
+
let n2 = lr(e5 === `dev` ? `en` : e5), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1467
|
+
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1468
|
+
let a2;
|
|
1469
|
+
try {
|
|
1470
|
+
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1471
|
+
} catch {
|
|
1472
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), xr;
|
|
1473
|
+
if (!e5.match(/-|_/)) return xr;
|
|
1474
|
+
let n3 = this.languageUtils.getLanguagePartFromCode(e5);
|
|
1475
|
+
a2 = this.getRule(n3, t2);
|
|
1476
|
+
}
|
|
1477
|
+
return this.pluralRulesCache[i2] = a2, a2;
|
|
1478
|
+
}
|
|
1479
|
+
needsPlural(e5, t2 = {}) {
|
|
1480
|
+
let n2 = this.getRule(e5, t2);
|
|
1481
|
+
return n2 ||= this.getRule(`dev`, t2), n2?.resolvedOptions().pluralCategories.length > 1;
|
|
1482
|
+
}
|
|
1483
|
+
getPluralFormsOfKey(e5, t2, n2 = {}) {
|
|
1484
|
+
return this.getSuffixes(e5, n2).map((e6) => `${t2}${e6}`);
|
|
1485
|
+
}
|
|
1486
|
+
getSuffixes(e5, t2 = {}) {
|
|
1487
|
+
let n2 = this.getRule(e5, t2);
|
|
1488
|
+
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e6, t3) => br[e6] - br[t3]).map((e6) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e6}`) : [];
|
|
1489
|
+
}
|
|
1490
|
+
getSuffix(e5, t2, n2 = {}) {
|
|
1491
|
+
let r2 = this.getRule(e5, n2);
|
|
1492
|
+
return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e5}`), this.getSuffix(`dev`, t2, n2));
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1495
|
+
var Cr = (e5, t2, n2, r2 = `.`, i2 = true) => {
|
|
1496
|
+
let a2 = er(e5, t2, n2);
|
|
1497
|
+
return !a2 && i2 && F(n2) && (a2 = cr(e5, n2, r2), a2 === void 0 && (a2 = cr(t2, n2, r2))), a2;
|
|
1498
|
+
};
|
|
1499
|
+
var wr = (e5) => e5.replace(/\$/g, `$$$$`);
|
|
1500
|
+
var Tr = class {
|
|
1501
|
+
constructor(e5 = {}) {
|
|
1502
|
+
this.logger = L.create(`interpolator`), this.options = e5, this.format = e5?.interpolation?.format || ((e6) => e6), this.init(e5);
|
|
1503
|
+
}
|
|
1504
|
+
init(e5 = {}) {
|
|
1505
|
+
e5.interpolation ||= { escapeValue: true };
|
|
1506
|
+
let { escape: t2, escapeValue: n2, useRawValueToEscape: r2, prefix: i2, prefixEscaped: a2, suffix: o2, suffixEscaped: s2, formatSeparator: c2, unescapeSuffix: l2, unescapePrefix: u2, nestingPrefix: d2, nestingPrefixEscaped: f2, nestingSuffix: p2, nestingSuffixEscaped: m2, nestingOptionsSeparator: h2, maxReplaces: g2, alwaysFormat: _2 } = e5.interpolation;
|
|
1507
|
+
this.escape = t2 === void 0 ? rr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? I(i2) : a2 || `{{`, this.suffix = o2 ? I(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 || `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 || ``, this.nestingPrefix = d2 ? I(d2) : f2 || I(`$t(`), this.nestingSuffix = p2 ? I(p2) : m2 || I(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1508
|
+
}
|
|
1509
|
+
reset() {
|
|
1510
|
+
this.options && this.init(this.options);
|
|
1511
|
+
}
|
|
1512
|
+
resetRegExp() {
|
|
1513
|
+
let e5 = (e6, t2) => e6?.source === t2 ? (e6.lastIndex = 0, e6) : new RegExp(t2, `g`);
|
|
1514
|
+
this.regexp = e5(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e5(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e5(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
|
|
1515
|
+
}
|
|
1516
|
+
interpolate(e5, t2, n2, r2) {
|
|
1517
|
+
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e6) => {
|
|
1518
|
+
if (e6.indexOf(this.formatSeparator) < 0) {
|
|
1519
|
+
let i4 = Cr(t2, s2, e6, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1520
|
+
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e6 }) : i4;
|
|
1521
|
+
}
|
|
1522
|
+
let i3 = e6.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1523
|
+
return this.format(Cr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1524
|
+
};
|
|
1525
|
+
this.resetRegExp();
|
|
1526
|
+
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
1527
|
+
return [{ regex: this.regexpUnescape, safeValue: (e6) => wr(e6) }, { regex: this.regexp, safeValue: (e6) => this.escapeValue ? wr(this.escape(e6)) : wr(e6) }].forEach((t3) => {
|
|
1528
|
+
for (o2 = 0; i2 = t3.regex.exec(e5); ) {
|
|
1529
|
+
let n3 = i2[1].trim();
|
|
1530
|
+
if (a2 = c2(n3), a2 === void 0) {
|
|
1531
|
+
if (typeof l2 == `function`) {
|
|
1532
|
+
let t4 = l2(e5, i2, r2);
|
|
1533
|
+
a2 = F(t4) ? t4 : ``;
|
|
1534
|
+
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
1535
|
+
else if (u2) {
|
|
1536
|
+
a2 = i2[0];
|
|
1537
|
+
continue;
|
|
1538
|
+
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e5}`), a2 = ``;
|
|
1539
|
+
} else !F(a2) && !this.useRawValueToEscape && (a2 = Gn(a2));
|
|
1540
|
+
let s3 = t3.safeValue(a2);
|
|
1541
|
+
if (e5 = e5.replace(i2[0], s3), u2 ? (t3.regex.lastIndex += a2.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1542
|
+
}
|
|
1543
|
+
}), e5;
|
|
1544
|
+
}
|
|
1545
|
+
nest(e5, t2, n2 = {}) {
|
|
1546
|
+
let r2, i2, a2, o2 = (e6, t3) => {
|
|
1547
|
+
let n3 = this.nestingOptionsSeparator;
|
|
1548
|
+
if (e6.indexOf(n3) < 0) return e6;
|
|
1549
|
+
let r3 = e6.split(RegExp(`${I(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
|
|
1550
|
+
e6 = r3[0], i3 = this.interpolate(i3, a2);
|
|
1551
|
+
let o3 = i3.match(/'/g), s2 = i3.match(/"/g);
|
|
1552
|
+
((o3?.length ?? 0) % 2 == 0 && !s2 || (s2?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
|
|
1553
|
+
try {
|
|
1554
|
+
a2 = JSON.parse(i3), t3 && (a2 = { ...t3, ...a2 });
|
|
1555
|
+
} catch (t4) {
|
|
1556
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${e6}`, t4), `${e6}${n3}${i3}`;
|
|
1557
|
+
}
|
|
1558
|
+
return a2.defaultValue && a2.defaultValue.indexOf(this.prefix) > -1 && delete a2.defaultValue, e6;
|
|
1559
|
+
};
|
|
1560
|
+
for (; r2 = this.nestingRegexp.exec(e5); ) {
|
|
1561
|
+
let s2 = [];
|
|
1562
|
+
a2 = { ...n2 }, a2 = a2.replace && !F(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1563
|
+
let c2 = /{.*}/.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1564
|
+
if (c2 !== -1 && (s2 = r2[1].slice(c2).split(this.formatSeparator).map((e6) => e6.trim()).filter(Boolean), r2[1] = r2[1].slice(0, c2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e5 && !F(i2)) return i2;
|
|
1565
|
+
F(i2) || (i2 = Gn(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e5}`), ``), s2.length && (i2 = s2.reduce((e6, t3) => this.format(e6, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), e5 = e5.replace(r2[0], i2), this.regexp.lastIndex = 0;
|
|
1566
|
+
}
|
|
1567
|
+
return e5;
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
var Er = (e5) => {
|
|
1571
|
+
let t2 = e5.toLowerCase().trim(), n2 = {};
|
|
1572
|
+
if (e5.indexOf(`(`) > -1) {
|
|
1573
|
+
let r2 = e5.split(`(`);
|
|
1574
|
+
t2 = r2[0].toLowerCase().trim();
|
|
1575
|
+
let i2 = r2[1].substring(0, r2[1].length - 1);
|
|
1576
|
+
t2 === `currency` && i2.indexOf(`:`) < 0 ? n2.currency ||= i2.trim() : t2 === `relativetime` && i2.indexOf(`:`) < 0 ? n2.range ||= i2.trim() : i2.split(`;`).forEach((e6) => {
|
|
1577
|
+
if (e6) {
|
|
1578
|
+
let [t3, ...r3] = e6.split(`:`), i3 = r3.join(`:`).trim().replace(/^'+|'+$/g, ``), a2 = t3.trim();
|
|
1579
|
+
n2[a2] || (n2[a2] = i3), i3 === `false` && (n2[a2] = false), i3 === `true` && (n2[a2] = true), isNaN(i3) || (n2[a2] = parseInt(i3, 10));
|
|
1580
|
+
}
|
|
1581
|
+
});
|
|
1582
|
+
}
|
|
1583
|
+
return { formatName: t2, formatOptions: n2 };
|
|
1584
|
+
};
|
|
1585
|
+
var Dr = (e5) => {
|
|
1586
|
+
let t2 = {};
|
|
1587
|
+
return (n2, r2, i2) => {
|
|
1588
|
+
let a2 = i2;
|
|
1589
|
+
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1590
|
+
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1591
|
+
return s2 || (s2 = e5(lr(r2), i2), t2[o2] = s2), s2(n2);
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
var Or = (e5) => (t2, n2, r2) => e5(lr(n2), r2)(t2);
|
|
1595
|
+
var kr = class {
|
|
1596
|
+
constructor(e5 = {}) {
|
|
1597
|
+
this.logger = L.create(`formatter`), this.options = e5, this.init(e5);
|
|
1598
|
+
}
|
|
1599
|
+
init(e5, t2 = { interpolation: {} }) {
|
|
1600
|
+
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1601
|
+
let n2 = t2.cacheInBuiltFormats ? Dr : Or;
|
|
1602
|
+
this.formats = { number: n2((e6, t3) => {
|
|
1603
|
+
let n3 = new Intl.NumberFormat(e6, { ...t3 });
|
|
1604
|
+
return (e7) => n3.format(e7);
|
|
1605
|
+
}), currency: n2((e6, t3) => {
|
|
1606
|
+
let n3 = new Intl.NumberFormat(e6, { ...t3, style: `currency` });
|
|
1607
|
+
return (e7) => n3.format(e7);
|
|
1608
|
+
}), datetime: n2((e6, t3) => {
|
|
1609
|
+
let n3 = new Intl.DateTimeFormat(e6, { ...t3 });
|
|
1610
|
+
return (e7) => n3.format(e7);
|
|
1611
|
+
}), relativetime: n2((e6, t3) => {
|
|
1612
|
+
let n3 = new Intl.RelativeTimeFormat(e6, { ...t3 });
|
|
1613
|
+
return (e7) => n3.format(e7, t3.range || `day`);
|
|
1614
|
+
}), list: n2((e6, t3) => {
|
|
1615
|
+
let n3 = new Intl.ListFormat(e6, { ...t3 });
|
|
1616
|
+
return (e7) => n3.format(e7);
|
|
1617
|
+
}) };
|
|
1618
|
+
}
|
|
1619
|
+
add(e5, t2) {
|
|
1620
|
+
this.formats[e5.toLowerCase().trim()] = t2;
|
|
1621
|
+
}
|
|
1622
|
+
addCached(e5, t2) {
|
|
1623
|
+
this.formats[e5.toLowerCase().trim()] = Dr(t2);
|
|
1624
|
+
}
|
|
1625
|
+
format(e5, t2, n2, r2 = {}) {
|
|
1626
|
+
let i2 = t2.split(this.formatSeparator);
|
|
1627
|
+
if (i2.length > 1 && i2[0].indexOf(`(`) > 1 && i2[0].indexOf(`)`) < 0 && i2.find((e6) => e6.indexOf(`)`) > -1)) {
|
|
1628
|
+
let e6 = i2.findIndex((e7) => e7.indexOf(`)`) > -1);
|
|
1629
|
+
i2[0] = [i2[0], ...i2.splice(1, e6)].join(this.formatSeparator);
|
|
1630
|
+
}
|
|
1631
|
+
return i2.reduce((e6, t3) => {
|
|
1632
|
+
let { formatName: i3, formatOptions: a2 } = Er(t3);
|
|
1633
|
+
if (this.formats[i3]) {
|
|
1634
|
+
let t4 = e6;
|
|
1635
|
+
try {
|
|
1636
|
+
let o2 = r2?.formatParams?.[r2.interpolationkey] || {}, s2 = o2.locale || o2.lng || r2.locale || r2.lng || n2;
|
|
1637
|
+
t4 = this.formats[i3](e6, s2, { ...a2, ...r2, ...o2 });
|
|
1638
|
+
} catch (e7) {
|
|
1639
|
+
this.logger.warn(e7);
|
|
1640
|
+
}
|
|
1641
|
+
return t4;
|
|
1642
|
+
}
|
|
1643
|
+
return this.logger.warn(`there was no format function for ${i3}`), e6;
|
|
1644
|
+
}, e5);
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1647
|
+
var Ar = (e5, t2) => {
|
|
1648
|
+
e5.pending[t2] !== void 0 && (delete e5.pending[t2], e5.pendingCount--);
|
|
1649
|
+
};
|
|
1650
|
+
var jr = class extends dr {
|
|
1651
|
+
constructor(e5, t2, n2, r2 = {}) {
|
|
1652
|
+
super(), this.backend = e5, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = L.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
|
|
1653
|
+
}
|
|
1654
|
+
queueLoad(e5, t2, n2, r2) {
|
|
1655
|
+
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
1656
|
+
return e5.forEach((e6) => {
|
|
1657
|
+
let r3 = true;
|
|
1658
|
+
t2.forEach((t3) => {
|
|
1659
|
+
let o3 = `${e6}|${t3}`;
|
|
1660
|
+
!n2.reload && this.store.hasResourceBundle(e6, t3) ? this.state[o3] = 2 : this.state[o3] < 0 || (this.state[o3] === 1 ? a2[o3] === void 0 && (a2[o3] = true) : (this.state[o3] = 1, r3 = false, a2[o3] === void 0 && (a2[o3] = true), i2[o3] === void 0 && (i2[o3] = true), s2[t3] === void 0 && (s2[t3] = true)));
|
|
1661
|
+
}), r3 || (o2[e6] = true);
|
|
1662
|
+
}), (Object.keys(i2).length || Object.keys(a2).length) && this.queue.push({ pending: a2, pendingCount: Object.keys(a2).length, loaded: {}, errors: [], callback: r2 }), { toLoad: Object.keys(i2), pending: Object.keys(a2), toLoadLanguages: Object.keys(o2), toLoadNamespaces: Object.keys(s2) };
|
|
1663
|
+
}
|
|
1664
|
+
loaded(e5, t2, n2) {
|
|
1665
|
+
let r2 = e5.split(`|`), i2 = r2[0], a2 = r2[1];
|
|
1666
|
+
t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e5] = t2 ? -1 : 2, t2 && n2 && (this.state[e5] = 0);
|
|
1667
|
+
let o2 = {};
|
|
1668
|
+
this.queue.forEach((n3) => {
|
|
1669
|
+
Qn(n3.loaded, [i2], a2), Ar(n3, e5), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e6) => {
|
|
1670
|
+
o2[e6] || (o2[e6] = {});
|
|
1671
|
+
let t3 = n3.loaded[e6];
|
|
1672
|
+
t3.length && t3.forEach((t4) => {
|
|
1673
|
+
o2[e6][t4] === void 0 && (o2[e6][t4] = true);
|
|
1674
|
+
});
|
|
1675
|
+
}), n3.done = true, n3.errors.length ? n3.callback(n3.errors) : n3.callback());
|
|
1676
|
+
}), this.emit(`loaded`, o2), this.queue = this.queue.filter((e6) => !e6.done);
|
|
1677
|
+
}
|
|
1678
|
+
read(e5, t2, n2, r2 = 0, i2 = this.retryTimeout, a2) {
|
|
1679
|
+
if (!e5.length) return a2(null, {});
|
|
1680
|
+
if (this.readingCalls >= this.maxParallelReads) {
|
|
1681
|
+
this.waitingReads.push({ lng: e5, ns: t2, fcName: n2, tried: r2, wait: i2, callback: a2 });
|
|
1682
|
+
return;
|
|
1683
|
+
}
|
|
1684
|
+
this.readingCalls++;
|
|
1685
|
+
let o2 = (o3, s3) => {
|
|
1686
|
+
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
1687
|
+
let e6 = this.waitingReads.shift();
|
|
1688
|
+
this.read(e6.lng, e6.ns, e6.fcName, e6.tried, e6.wait, e6.callback);
|
|
1689
|
+
}
|
|
1690
|
+
if (o3 && s3 && r2 < this.maxRetries) {
|
|
1691
|
+
setTimeout(() => {
|
|
1692
|
+
this.read.call(this, e5, t2, n2, r2 + 1, i2 * 2, a2);
|
|
1693
|
+
}, i2);
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
a2(o3, s3);
|
|
1697
|
+
}, s2 = this.backend[n2].bind(this.backend);
|
|
1698
|
+
if (s2.length === 2) {
|
|
1699
|
+
try {
|
|
1700
|
+
let n3 = s2(e5, t2);
|
|
1701
|
+
n3 && typeof n3.then == `function` ? n3.then((e6) => o2(null, e6)).catch(o2) : o2(null, n3);
|
|
1702
|
+
} catch (e6) {
|
|
1703
|
+
o2(e6);
|
|
1704
|
+
}
|
|
1705
|
+
return;
|
|
1706
|
+
}
|
|
1707
|
+
return s2(e5, t2, o2);
|
|
1708
|
+
}
|
|
1709
|
+
prepareLoading(e5, t2, n2 = {}, r2) {
|
|
1710
|
+
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
1711
|
+
F(e5) && (e5 = this.languageUtils.toResolveHierarchy(e5)), F(t2) && (t2 = [t2]);
|
|
1712
|
+
let i2 = this.queueLoad(e5, t2, n2, r2);
|
|
1713
|
+
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
1714
|
+
i2.toLoad.forEach((e6) => {
|
|
1715
|
+
this.loadOne(e6);
|
|
1716
|
+
});
|
|
1717
|
+
}
|
|
1718
|
+
load(e5, t2, n2) {
|
|
1719
|
+
this.prepareLoading(e5, t2, {}, n2);
|
|
1720
|
+
}
|
|
1721
|
+
reload(e5, t2, n2) {
|
|
1722
|
+
this.prepareLoading(e5, t2, { reload: true }, n2);
|
|
1723
|
+
}
|
|
1724
|
+
loadOne(e5, t2 = ``) {
|
|
1725
|
+
let n2 = e5.split(`|`), r2 = n2[0], i2 = n2[1];
|
|
1726
|
+
this.read(r2, i2, `read`, void 0, void 0, (n3, a2) => {
|
|
1727
|
+
n3 && this.logger.warn(`${t2}loading namespace ${i2} for language ${r2} failed`, n3), !n3 && a2 && this.logger.log(`${t2}loaded namespace ${i2} for language ${r2}`, a2), this.loaded(e5, n3, a2);
|
|
1728
|
+
});
|
|
1729
|
+
}
|
|
1730
|
+
saveMissing(e5, t2, n2, r2, i2, a2 = {}, o2 = () => {
|
|
1731
|
+
}) {
|
|
1732
|
+
if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t2)) {
|
|
1733
|
+
this.logger.warn(`did not save key "${n2}" as the namespace "${t2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);
|
|
1734
|
+
return;
|
|
1735
|
+
}
|
|
1736
|
+
if (n2 != null && n2 !== ``) {
|
|
1737
|
+
if (this.backend?.create) {
|
|
1738
|
+
let s2 = { ...a2, isUpdate: i2 }, c2 = this.backend.create.bind(this.backend);
|
|
1739
|
+
if (c2.length < 6) try {
|
|
1740
|
+
let i3;
|
|
1741
|
+
i3 = c2.length === 5 ? c2(e5, t2, n2, r2, s2) : c2(e5, t2, n2, r2), i3 && typeof i3.then == `function` ? i3.then((e6) => o2(null, e6)).catch(o2) : o2(null, i3);
|
|
1742
|
+
} catch (e6) {
|
|
1743
|
+
o2(e6);
|
|
1744
|
+
}
|
|
1745
|
+
else c2(e5, t2, n2, r2, o2, s2);
|
|
1746
|
+
}
|
|
1747
|
+
e5 && e5[0] && this.store.addResource(e5[0], t2, n2, r2);
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
};
|
|
1751
|
+
var Mr = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, simplifyPluralSuffix: true, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e5) => {
|
|
1752
|
+
let t2 = {};
|
|
1753
|
+
if (typeof e5[1] == `object` && (t2 = e5[1]), F(e5[1]) && (t2.defaultValue = e5[1]), F(e5[2]) && (t2.tDescription = e5[2]), typeof e5[2] == `object` || typeof e5[3] == `object`) {
|
|
1754
|
+
let n2 = e5[3] || e5[2];
|
|
1755
|
+
Object.keys(n2).forEach((e6) => {
|
|
1756
|
+
t2[e6] = n2[e6];
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
return t2;
|
|
1760
|
+
}, interpolation: { escapeValue: true, format: (e5) => e5, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1761
|
+
var Nr = (e5) => (F(e5.ns) && (e5.ns = [e5.ns]), F(e5.fallbackLng) && (e5.fallbackLng = [e5.fallbackLng]), F(e5.fallbackNS) && (e5.fallbackNS = [e5.fallbackNS]), e5.supportedLngs?.indexOf?.(`cimode`) < 0 && (e5.supportedLngs = e5.supportedLngs.concat([`cimode`])), typeof e5.initImmediate == `boolean` && (e5.initAsync = e5.initImmediate), e5);
|
|
1762
|
+
var Pr = () => {
|
|
915
1763
|
};
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
1764
|
+
var Fr = (e5) => {
|
|
1765
|
+
Object.getOwnPropertyNames(Object.getPrototypeOf(e5)).forEach((t2) => {
|
|
1766
|
+
typeof e5[t2] == `function` && (e5[t2] = e5[t2].bind(e5));
|
|
1767
|
+
});
|
|
1768
|
+
};
|
|
1769
|
+
var Ir = `__i18next_supportNoticeShown`;
|
|
1770
|
+
var Lr = () => !!(typeof globalThis < `u` && globalThis[Ir] || typeof process < `u` && {}.I18NEXT_NO_SUPPORT_NOTICE || typeof process < `u`);
|
|
1771
|
+
var Rr = () => {
|
|
1772
|
+
typeof globalThis < `u` && (globalThis[Ir] = true);
|
|
1773
|
+
};
|
|
1774
|
+
var zr = (e5) => !!(e5?.modules?.backend?.name?.indexOf(`Locize`) > 0 || e5?.modules?.backend?.constructor?.name?.indexOf(`Locize`) > 0 || e5?.options?.backend?.backends && e5.options.backend.backends.some((e6) => e6?.name?.indexOf(`Locize`) > 0 || e6?.constructor?.name?.indexOf(`Locize`) > 0) || e5?.options?.backend?.projectId || e5?.options?.backend?.backendOptions && e5.options.backend.backendOptions.some((e6) => e6?.projectId));
|
|
1775
|
+
var z = class e4 extends dr {
|
|
1776
|
+
constructor(e5 = {}, t2) {
|
|
1777
|
+
if (super(), this.options = Nr(e5), this.services = {}, this.logger = L, this.modules = { external: [] }, Fr(this), t2 && !this.isInitialized && !e5.isClone) {
|
|
1778
|
+
if (!this.options.initAsync) return this.init(e5, t2), this;
|
|
1779
|
+
setTimeout(() => {
|
|
1780
|
+
this.init(e5, t2);
|
|
1781
|
+
}, 0);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
init(e5 = {}, t2) {
|
|
1785
|
+
this.isInitializing = true, typeof e5 == `function` && (t2 = e5, e5 = {}), e5.defaultNS == null && e5.ns && (F(e5.ns) ? e5.defaultNS = e5.ns : e5.ns.indexOf(`translation`) < 0 && (e5.defaultNS = e5.ns[0]));
|
|
1786
|
+
let n2 = Mr();
|
|
1787
|
+
this.options = { ...n2, ...this.options, ...Nr(e5) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e5.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e5.keySeparator), e5.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e5.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler), this.options.showSupportNotice !== false && !zr(this) && !Lr() && (typeof console < `u` && console.info !== void 0 && console.info(`\u{1F310} i18next is made possible by our own product, Locize \u2014 consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \u{1F499}`), Rr());
|
|
1788
|
+
let r2 = (e6) => e6 ? typeof e6 == `function` ? new e6() : e6 : null;
|
|
1789
|
+
if (!this.options.isClone) {
|
|
1790
|
+
this.modules.logger ? L.init(r2(this.modules.logger), this.options) : L.init(null, this.options);
|
|
1791
|
+
let e6;
|
|
1792
|
+
e6 = this.modules.formatter ? this.modules.formatter : kr;
|
|
1793
|
+
let t3 = new yr(this.options);
|
|
1794
|
+
this.store = new fr(this.options.resources, this.options);
|
|
1795
|
+
let i3 = this.services;
|
|
1796
|
+
i3.logger = L, i3.resourceStore = this.store, i3.languageUtils = t3, i3.pluralResolver = new Sr(t3, { prepend: this.options.pluralSeparator, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), this.options.interpolation.format && this.options.interpolation.format !== n2.interpolation.format && this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`), e6 && (!this.options.interpolation.format || this.options.interpolation.format === n2.interpolation.format) && (i3.formatter = r2(e6), i3.formatter.init && i3.formatter.init(i3, this.options), this.options.interpolation.format = i3.formatter.format.bind(i3.formatter)), i3.interpolator = new Tr(this.options), i3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i3.backendConnector = new jr(r2(this.modules.backend), i3.resourceStore, i3, this.options), i3.backendConnector.on(`*`, (e7, ...t4) => {
|
|
1797
|
+
this.emit(e7, ...t4);
|
|
1798
|
+
}), this.modules.languageDetector && (i3.languageDetector = r2(this.modules.languageDetector), i3.languageDetector.init && i3.languageDetector.init(i3, this.options.detection, this.options)), this.modules.i18nFormat && (i3.i18nFormat = r2(this.modules.i18nFormat), i3.i18nFormat.init && i3.i18nFormat.init(this)), this.translator = new vr(this.services, this.options), this.translator.on(`*`, (e7, ...t4) => {
|
|
1799
|
+
this.emit(e7, ...t4);
|
|
1800
|
+
}), this.modules.external.forEach((e7) => {
|
|
1801
|
+
e7.init && e7.init(this);
|
|
1802
|
+
});
|
|
1803
|
+
}
|
|
1804
|
+
if (this.format = this.options.interpolation.format, t2 ||= Pr, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1805
|
+
let e6 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1806
|
+
e6.length > 0 && e6[0] !== `dev` && (this.options.lng = e6[0]);
|
|
1807
|
+
}
|
|
1808
|
+
!this.services.languageDetector && !this.options.lng && this.logger.warn(`init: no languageDetector is used and no lng is defined`), [`getResource`, `hasResourceBundle`, `getResourceBundle`, `getDataByLanguage`].forEach((e6) => {
|
|
1809
|
+
this[e6] = (...t3) => this.store[e6](...t3);
|
|
1810
|
+
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e6) => {
|
|
1811
|
+
this[e6] = (...t3) => (this.store[e6](...t3), this);
|
|
1812
|
+
});
|
|
1813
|
+
let i2 = Wn(), a2 = () => {
|
|
1814
|
+
let e6 = (e7, n3) => {
|
|
1815
|
+
this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e7, n3);
|
|
1816
|
+
};
|
|
1817
|
+
if (this.languages && !this.isInitialized) return e6(null, this.t.bind(this));
|
|
1818
|
+
this.changeLanguage(this.options.lng, e6);
|
|
1819
|
+
};
|
|
1820
|
+
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
1821
|
+
}
|
|
1822
|
+
loadResources(e5, t2 = Pr) {
|
|
1823
|
+
let n2 = t2, r2 = F(e5) ? e5 : this.language;
|
|
1824
|
+
if (typeof e5 == `function` && (n2 = e5), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1825
|
+
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
1826
|
+
let e6 = [], t3 = (t4) => {
|
|
1827
|
+
t4 && t4 !== `cimode` && this.services.languageUtils.toResolveHierarchy(t4).forEach((t5) => {
|
|
1828
|
+
t5 !== `cimode` && e6.indexOf(t5) < 0 && e6.push(t5);
|
|
1829
|
+
});
|
|
1830
|
+
};
|
|
1831
|
+
r2 ? t3(r2) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e7) => t3(e7)), this.options.preload?.forEach?.((e7) => t3(e7)), this.services.backendConnector.load(e6, this.options.ns, (e7) => {
|
|
1832
|
+
!e7 && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n2(e7);
|
|
1833
|
+
});
|
|
1834
|
+
} else n2(null);
|
|
1835
|
+
}
|
|
1836
|
+
reloadResources(e5, t2, n2) {
|
|
1837
|
+
let r2 = Wn();
|
|
1838
|
+
return typeof e5 == `function` && (n2 = e5, e5 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e5 ||= this.languages, t2 ||= this.options.ns, n2 ||= Pr, this.services.backendConnector.reload(e5, t2, (e6) => {
|
|
1839
|
+
r2.resolve(), n2(e6);
|
|
1840
|
+
}), r2;
|
|
1841
|
+
}
|
|
1842
|
+
use(e5) {
|
|
1843
|
+
if (!e5) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
1844
|
+
if (!e5.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
1845
|
+
return e5.type === `backend` && (this.modules.backend = e5), (e5.type === `logger` || e5.log && e5.warn && e5.error) && (this.modules.logger = e5), e5.type === `languageDetector` && (this.modules.languageDetector = e5), e5.type === `i18nFormat` && (this.modules.i18nFormat = e5), e5.type === `postProcessor` && pr.addPostProcessor(e5), e5.type === `formatter` && (this.modules.formatter = e5), e5.type === `3rdParty` && this.modules.external.push(e5), this;
|
|
1846
|
+
}
|
|
1847
|
+
setResolvedLanguage(e5) {
|
|
1848
|
+
if (e5 && this.languages && !([`cimode`, `dev`].indexOf(e5) > -1)) {
|
|
1849
|
+
for (let e6 = 0; e6 < this.languages.length; e6++) {
|
|
1850
|
+
let t2 = this.languages[e6];
|
|
1851
|
+
if (!([`cimode`, `dev`].indexOf(t2) > -1) && this.store.hasLanguageSomeTranslations(t2)) {
|
|
1852
|
+
this.resolvedLanguage = t2;
|
|
1853
|
+
break;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
!this.resolvedLanguage && this.languages.indexOf(e5) < 0 && this.store.hasLanguageSomeTranslations(e5) && (this.resolvedLanguage = e5, this.languages.unshift(e5));
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
changeLanguage(e5, t2) {
|
|
1860
|
+
this.isLanguageChangingTo = e5;
|
|
1861
|
+
let n2 = Wn();
|
|
1862
|
+
this.emit(`languageChanging`, e5);
|
|
1863
|
+
let r2 = (e6) => {
|
|
1864
|
+
this.language = e6, this.languages = this.services.languageUtils.toResolveHierarchy(e6), this.resolvedLanguage = void 0, this.setResolvedLanguage(e6);
|
|
1865
|
+
}, i2 = (i3, a3) => {
|
|
1866
|
+
a3 ? this.isLanguageChangingTo === e5 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e6) => this.t(...e6)), t2 && t2(i3, (...e6) => this.t(...e6));
|
|
1867
|
+
}, a2 = (t3) => {
|
|
1868
|
+
!e5 && !t3 && this.services.languageDetector && (t3 = []);
|
|
1869
|
+
let n3 = F(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(F(t3) ? [t3] : t3);
|
|
1870
|
+
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e6) => {
|
|
1871
|
+
i2(e6, a3);
|
|
1872
|
+
});
|
|
1873
|
+
};
|
|
1874
|
+
return !e5 && this.services.languageDetector && !this.services.languageDetector.async ? a2(this.services.languageDetector.detect()) : !e5 && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a2) : this.services.languageDetector.detect(a2) : a2(e5), n2;
|
|
1875
|
+
}
|
|
1876
|
+
getFixedT(e5, t2, n2) {
|
|
1877
|
+
let r2 = (e6, t3, ...i2) => {
|
|
1878
|
+
let a2;
|
|
1879
|
+
a2 = typeof t3 == `object` ? { ...t3 } : this.options.overloadTranslationOptionHandler([e6, t3].concat(i2)), a2.lng = a2.lng || r2.lng, a2.lngs = a2.lngs || r2.lngs, a2.ns = a2.ns || r2.ns, a2.keyPrefix !== `` && (a2.keyPrefix = a2.keyPrefix || n2 || r2.keyPrefix);
|
|
1880
|
+
let o2 = { ...this.options, ...a2 };
|
|
1881
|
+
typeof a2.keyPrefix == `function` && (a2.keyPrefix = R(a2.keyPrefix, o2));
|
|
1882
|
+
let s2 = this.options.keySeparator || `.`, c2;
|
|
1883
|
+
return a2.keyPrefix && Array.isArray(e6) ? c2 = e6.map((e7) => (typeof e7 == `function` && (e7 = R(e7, o2)), `${a2.keyPrefix}${s2}${e7}`)) : (typeof e6 == `function` && (e6 = R(e6, o2)), c2 = a2.keyPrefix ? `${a2.keyPrefix}${s2}${e6}` : e6), this.t(c2, a2);
|
|
1884
|
+
};
|
|
1885
|
+
return F(e5) ? r2.lng = e5 : r2.lngs = e5, r2.ns = t2, r2.keyPrefix = n2, r2;
|
|
1886
|
+
}
|
|
1887
|
+
t(...e5) {
|
|
1888
|
+
return this.translator?.translate(...e5);
|
|
1889
|
+
}
|
|
1890
|
+
exists(...e5) {
|
|
1891
|
+
return this.translator?.exists(...e5);
|
|
1892
|
+
}
|
|
1893
|
+
setDefaultNamespace(e5) {
|
|
1894
|
+
this.options.defaultNS = e5;
|
|
1895
|
+
}
|
|
1896
|
+
hasLoadedNamespace(e5, t2 = {}) {
|
|
1897
|
+
if (!this.isInitialized) return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`, this.languages), false;
|
|
1898
|
+
if (!this.languages || !this.languages.length) return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`, this.languages), false;
|
|
1899
|
+
let n2 = t2.lng || this.resolvedLanguage || this.languages[0], r2 = this.options ? this.options.fallbackLng : false, i2 = this.languages[this.languages.length - 1];
|
|
1900
|
+
if (n2.toLowerCase() === `cimode`) return true;
|
|
1901
|
+
let a2 = (e6, t3) => {
|
|
1902
|
+
let n3 = this.services.backendConnector.state[`${e6}|${t3}`];
|
|
1903
|
+
return n3 === -1 || n3 === 0 || n3 === 2;
|
|
1904
|
+
};
|
|
1905
|
+
if (t2.precheck) {
|
|
1906
|
+
let e6 = t2.precheck(this, a2);
|
|
1907
|
+
if (e6 !== void 0) return e6;
|
|
1908
|
+
}
|
|
1909
|
+
return !!(this.hasResourceBundle(n2, e5) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a2(n2, e5) && (!r2 || a2(i2, e5)));
|
|
1910
|
+
}
|
|
1911
|
+
loadNamespaces(e5, t2) {
|
|
1912
|
+
let n2 = Wn();
|
|
1913
|
+
return this.options.ns ? (F(e5) && (e5 = [e5]), e5.forEach((e6) => {
|
|
1914
|
+
this.options.ns.indexOf(e6) < 0 && this.options.ns.push(e6);
|
|
1915
|
+
}), this.loadResources((e6) => {
|
|
1916
|
+
n2.resolve(), t2 && t2(e6);
|
|
1917
|
+
}), n2) : (t2 && t2(), Promise.resolve());
|
|
1918
|
+
}
|
|
1919
|
+
loadLanguages(e5, t2) {
|
|
1920
|
+
let n2 = Wn();
|
|
1921
|
+
F(e5) && (e5 = [e5]);
|
|
1922
|
+
let r2 = this.options.preload || [], i2 = e5.filter((e6) => r2.indexOf(e6) < 0 && this.services.languageUtils.isSupportedCode(e6));
|
|
1923
|
+
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e6) => {
|
|
1924
|
+
n2.resolve(), t2 && t2(e6);
|
|
1925
|
+
}), n2) : (t2 && t2(), Promise.resolve());
|
|
1926
|
+
}
|
|
1927
|
+
dir(e5) {
|
|
1928
|
+
if (e5 ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e5) return `rtl`;
|
|
1929
|
+
try {
|
|
1930
|
+
let t3 = new Intl.Locale(e5);
|
|
1931
|
+
if (t3 && t3.getTextInfo) {
|
|
1932
|
+
let e6 = t3.getTextInfo();
|
|
1933
|
+
if (e6 && e6.direction) return e6.direction;
|
|
1934
|
+
}
|
|
1935
|
+
} catch {
|
|
1936
|
+
}
|
|
1937
|
+
let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new yr(Mr());
|
|
1938
|
+
return e5.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.indexOf(n2.getLanguagePartFromCode(e5)) > -1 || e5.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
1939
|
+
}
|
|
1940
|
+
static createInstance(t2 = {}, n2) {
|
|
1941
|
+
let r2 = new e4(t2, n2);
|
|
1942
|
+
return r2.createInstance = e4.createInstance, r2;
|
|
1943
|
+
}
|
|
1944
|
+
cloneInstance(t2 = {}, n2 = Pr) {
|
|
1945
|
+
let r2 = t2.forkResourceStore;
|
|
1946
|
+
r2 && delete t2.forkResourceStore;
|
|
1947
|
+
let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
|
|
1948
|
+
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e5) => {
|
|
1949
|
+
a2[e5] = this[e5];
|
|
1950
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new fr(Object.keys(this.store.data).reduce((e5, t3) => (e5[t3] = { ...this.store.data[t3] }, e5[t3] = Object.keys(e5[t3]).reduce((n3, r3) => (n3[r3] = { ...e5[t3][r3] }, n3), e5[t3]), e5), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
|
|
1951
|
+
let e5 = { ...Mr().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e5 };
|
|
1952
|
+
a2.services.interpolator = new Tr(n3);
|
|
1953
|
+
}
|
|
1954
|
+
return a2.translator = new vr(a2.services, i2), a2.translator.on(`*`, (e5, ...t3) => {
|
|
1955
|
+
a2.emit(e5, ...t3);
|
|
1956
|
+
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
1957
|
+
}
|
|
1958
|
+
toJSON() {
|
|
1959
|
+
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
1960
|
+
}
|
|
1961
|
+
}.createInstance();
|
|
1962
|
+
z.createInstance, z.dir, z.init, z.loadResources, z.reloadResources, z.use, z.changeLanguage, z.getFixedT, z.t, z.exists, z.setDefaultNamespace, z.hasLoadedNamespace, z.loadNamespaces, z.loadLanguages;
|
|
1963
|
+
var Br = function() {
|
|
1964
|
+
return Br = Object.assign || function(e5) {
|
|
1965
|
+
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) && (e5[i2] = t2[i2]);
|
|
1966
|
+
return e5;
|
|
1967
|
+
}, Br.apply(this, arguments);
|
|
1968
|
+
};
|
|
1969
|
+
function Vr(e5) {
|
|
1970
|
+
var t2 = typeof Symbol == `function` && Symbol.iterator, n2 = t2 && e5[t2], r2 = 0;
|
|
1971
|
+
if (n2) return n2.call(e5);
|
|
1972
|
+
if (e5 && typeof e5.length == `number`) return { next: function() {
|
|
1973
|
+
return e5 && r2 >= e5.length && (e5 = void 0), { value: e5 && e5[r2++], done: !e5 };
|
|
921
1974
|
} };
|
|
922
1975
|
throw TypeError(t2 ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
|
|
923
1976
|
}
|
|
924
|
-
function
|
|
925
|
-
var n2 = typeof Symbol == `function` &&
|
|
926
|
-
if (!n2) return
|
|
927
|
-
var r2 = n2.call(
|
|
1977
|
+
function B(e5, t2) {
|
|
1978
|
+
var n2 = typeof Symbol == `function` && e5[Symbol.iterator];
|
|
1979
|
+
if (!n2) return e5;
|
|
1980
|
+
var r2 = n2.call(e5), i2, a2 = [], o2;
|
|
928
1981
|
try {
|
|
929
1982
|
for (; (t2 === void 0 || t2-- > 0) && !(i2 = r2.next()).done; ) a2.push(i2.value);
|
|
930
|
-
} catch (
|
|
931
|
-
o2 = { error:
|
|
1983
|
+
} catch (e6) {
|
|
1984
|
+
o2 = { error: e6 };
|
|
932
1985
|
} finally {
|
|
933
1986
|
try {
|
|
934
1987
|
i2 && !i2.done && (n2 = r2.return) && n2.call(r2);
|
|
@@ -938,17 +1991,85 @@ function L(e2, t2) {
|
|
|
938
1991
|
}
|
|
939
1992
|
return a2;
|
|
940
1993
|
}
|
|
941
|
-
function
|
|
1994
|
+
function Hr(e5, t2, n2) {
|
|
942
1995
|
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]);
|
|
943
|
-
return
|
|
1996
|
+
return e5.concat(a2 || Array.prototype.slice.call(t2));
|
|
1997
|
+
}
|
|
1998
|
+
var Ur = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
1999
|
+
var Wr = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
2000
|
+
var Gr = (e5) => Wr[e5];
|
|
2001
|
+
var Kr = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e5) => e5.replace(Ur, Gr), transDefaultProps: void 0 };
|
|
2002
|
+
var qr = (e5 = {}) => {
|
|
2003
|
+
Kr = { ...Kr, ...e5 };
|
|
2004
|
+
};
|
|
2005
|
+
var Jr = { type: `3rdParty`, init(e5) {
|
|
2006
|
+
qr(e5.options.react);
|
|
2007
|
+
} };
|
|
2008
|
+
var Yr = /* @__PURE__ */ new Map();
|
|
2009
|
+
var Xr = 500;
|
|
2010
|
+
var Zr;
|
|
2011
|
+
function Qr() {
|
|
2012
|
+
if (Zr === void 0) try {
|
|
2013
|
+
Zr = new Intl.NumberFormat(`en-US`, { useGrouping: false, maximumFractionDigits: 0 }).format(`9007199254740993`) === `9007199254740993`;
|
|
2014
|
+
} catch {
|
|
2015
|
+
Zr = false;
|
|
2016
|
+
}
|
|
2017
|
+
return Zr;
|
|
2018
|
+
}
|
|
2019
|
+
var $r = 15;
|
|
2020
|
+
function ei(e5) {
|
|
2021
|
+
if (!(typeof e5 != `string` || Qr()) && e5.replace(/[^0-9]/g, ``).replace(/^0+/, ``).length > $r) throw Error(`Cannot format the amount '${e5}' exactly: this runtime's Intl implementation predates ES2023 string support and would lose precision. Use a runtime with ES2023 Intl support (for example Node 20+), or pass a value within 15 significant digits.`);
|
|
2022
|
+
}
|
|
2023
|
+
function ti(e5, t2, n2) {
|
|
2024
|
+
return `${e5}|${t2}|${Object.entries(n2).filter(([, e6]) => e6 !== void 0).sort(([e6], [t3]) => e6 < t3 ? -1 : 1).map(([e6, t3]) => `${e6}=${String(t3)}`).join(`&`)}`;
|
|
2025
|
+
}
|
|
2026
|
+
function ni(e5, t2, n2) {
|
|
2027
|
+
let r2 = ti(e5, t2, n2), i2 = Yr.get(r2);
|
|
2028
|
+
return i2 || (i2 = new Intl.NumberFormat(e5, { ...n2, style: `currency`, currency: t2 }), Yr.size >= Xr && Yr.clear(), Yr.set(r2, i2)), i2;
|
|
2029
|
+
}
|
|
2030
|
+
function ri(e5, { value: t2, currency: n2 }, r2 = {}) {
|
|
2031
|
+
return ei(t2), ni(e5, n2, r2).format(t2);
|
|
944
2032
|
}
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
2033
|
+
function ii(e5, { value: t2, currency: n2 }, r2 = {}) {
|
|
2034
|
+
return ei(t2), ni(e5, n2, r2).formatToParts(t2);
|
|
2035
|
+
}
|
|
2036
|
+
function ai(e5) {
|
|
2037
|
+
return yn().find((e6) => e6.primary)?.id ?? e5;
|
|
2038
|
+
}
|
|
2039
|
+
function oi(e5, t2) {
|
|
2040
|
+
let { locale: n2, ...r2 } = t2 ?? {}, i2 = n2 ?? e5.essentials?.locale;
|
|
2041
|
+
if (!i2) throw Error(`Host locale is not available on the current host. Make sure to use an updated version of the host initialization package.`);
|
|
2042
|
+
return { locale: i2, formatOptions: r2 };
|
|
2043
|
+
}
|
|
2044
|
+
var si = Un({ getLanguage: (e5) => () => {
|
|
2045
|
+
let t2 = e5.essentials?.language;
|
|
2046
|
+
if (!t2) throw Error(`Host language is not available on the current host. Make sure to use an updated version of the host initialization package.`);
|
|
2047
|
+
return t2;
|
|
2048
|
+
}, getLocale: (e5) => () => {
|
|
2049
|
+
let t2 = e5.essentials?.locale;
|
|
2050
|
+
if (!t2) throw Error(`Host locale is not available on the current host. Make sure to use an updated version of the host initialization package.`);
|
|
2051
|
+
return t2;
|
|
2052
|
+
}, formatCurrency: (e5) => (t2, n2) => {
|
|
2053
|
+
let { locale: r2, formatOptions: i2 } = oi(e5, n2);
|
|
2054
|
+
return ri(r2, t2, i2);
|
|
2055
|
+
}, formatCurrencyToParts: (e5) => (t2, n2) => {
|
|
2056
|
+
let { locale: r2, formatOptions: i2 } = oi(e5, n2);
|
|
2057
|
+
return ii(r2, t2, i2);
|
|
2058
|
+
}, getTranslationFunction: (e5) => () => {
|
|
2059
|
+
let t2 = e5.translations?.();
|
|
2060
|
+
if (!t2) throw Error(`Host translation resources are not available.`);
|
|
2061
|
+
let n2 = z.createInstance(), r2 = ai(e5.essentials?.language) || `en`, i2 = { lng: e5.essentials?.language || r2, fallbackLng: r2, resources: t2 };
|
|
2062
|
+
return n2.use(Jr).init(i2, (e6) => {
|
|
2063
|
+
if (e6) throw e6;
|
|
2064
|
+
}), n2.t.bind(n2);
|
|
2065
|
+
} });
|
|
2066
|
+
var ci = class {
|
|
2067
|
+
constructor(e5) {
|
|
2068
|
+
this.message = e5, this.captureException = () => {
|
|
948
2069
|
console.error(this.message);
|
|
949
2070
|
}, this.captureMessage = () => {
|
|
950
2071
|
console.error(this.message);
|
|
951
|
-
}, this.startSpan = (
|
|
2072
|
+
}, this.startSpan = (e6, t2) => (console.error(this.message), t2(void 0)), this.startSpanManual = () => (console.error(this.message), { end: () => {
|
|
952
2073
|
}, fail: () => {
|
|
953
2074
|
} }), this.endSpanManual = () => {
|
|
954
2075
|
console.error(this.message);
|
|
@@ -957,366 +2078,366 @@ var An = class {
|
|
|
957
2078
|
};
|
|
958
2079
|
}
|
|
959
2080
|
};
|
|
960
|
-
var
|
|
961
|
-
var
|
|
962
|
-
var
|
|
963
|
-
function
|
|
2081
|
+
var li = (e5) => new ci(e5);
|
|
2082
|
+
var ui = Un({ getMonitoringClient: (e5) => () => e5.getMonitoringClient ? e5.getMonitoringClient() : li(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
2083
|
+
var V = { 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` };
|
|
2084
|
+
function di(e5) {
|
|
964
2085
|
try {
|
|
965
|
-
let t2 =
|
|
966
|
-
return t2 && typeof t2[
|
|
2086
|
+
let t2 = ui.getMonitoringClient?.();
|
|
2087
|
+
return t2 && typeof t2[e5] == `function` ? t2 : null;
|
|
967
2088
|
} catch {
|
|
968
2089
|
return null;
|
|
969
2090
|
}
|
|
970
2091
|
}
|
|
971
|
-
function
|
|
972
|
-
let a2 =
|
|
2092
|
+
function H(e5, { feature: t2, action: n2, level: r2 = `error`, contexts: i2 }) {
|
|
2093
|
+
let a2 = di(`captureException`);
|
|
973
2094
|
if (!a2) return;
|
|
974
|
-
let o2 =
|
|
2095
|
+
let o2 = e5 instanceof Error ? e5 : Error(String(e5));
|
|
975
2096
|
a2.captureException(o2, { level: r2, tags: { feature: t2, action: n2 }, ...i2 ? { contexts: i2 } : {} });
|
|
976
2097
|
}
|
|
977
|
-
function
|
|
978
|
-
let i2 =
|
|
2098
|
+
function fi(e5, { feature: t2, tags: n2 }, r2) {
|
|
2099
|
+
let i2 = di(`startSpanManual`);
|
|
979
2100
|
if (!i2) return r2;
|
|
980
|
-
let a2 = i2.startSpanManual({ name:
|
|
981
|
-
return r2.then(() => a2.end(), (
|
|
2101
|
+
let a2 = i2.startSpanManual({ name: e5, tags: { feature: t2, ...n2 } });
|
|
2102
|
+
return r2.then(() => a2.end(), (e6) => a2.fail(e6)), r2;
|
|
982
2103
|
}
|
|
983
|
-
var
|
|
2104
|
+
var pi = class extends e {
|
|
984
2105
|
state = { hasError: false };
|
|
985
2106
|
static getDerivedStateFromError() {
|
|
986
2107
|
return { hasError: true };
|
|
987
2108
|
}
|
|
988
|
-
componentDidCatch(
|
|
989
|
-
|
|
2109
|
+
componentDidCatch(e5, t2) {
|
|
2110
|
+
H(e5, { feature: this.props.feature ?? `service`, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
|
|
990
2111
|
}
|
|
991
2112
|
render() {
|
|
992
2113
|
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
993
2114
|
}
|
|
994
2115
|
};
|
|
995
|
-
function
|
|
996
|
-
let t2 =
|
|
997
|
-
if (t2.__state || (t2.__state = { status: `pending` }, t2.then((
|
|
998
|
-
t2.__state = { status: `fulfilled`, value:
|
|
999
|
-
}, (
|
|
1000
|
-
t2.__state = { status: `rejected`, reason:
|
|
2116
|
+
function mi(e5) {
|
|
2117
|
+
let t2 = e5;
|
|
2118
|
+
if (t2.__state || (t2.__state = { status: `pending` }, t2.then((e6) => {
|
|
2119
|
+
t2.__state = { status: `fulfilled`, value: e6 };
|
|
2120
|
+
}, (e6) => {
|
|
2121
|
+
t2.__state = { status: `rejected`, reason: e6 };
|
|
1001
2122
|
})), t2.__state.status === `fulfilled`) return t2.__state.value;
|
|
1002
2123
|
throw t2.__state.status === `rejected` ? t2.__state.reason : t2;
|
|
1003
2124
|
}
|
|
1004
|
-
function
|
|
1005
|
-
let t2 = Promise.resolve(
|
|
1006
|
-
return t2.__state = { status: `fulfilled`, value:
|
|
2125
|
+
function hi(e5) {
|
|
2126
|
+
let t2 = Promise.resolve(e5);
|
|
2127
|
+
return t2.__state = { status: `fulfilled`, value: e5 }, t2;
|
|
1007
2128
|
}
|
|
1008
|
-
var
|
|
1009
|
-
function
|
|
1010
|
-
let r2 =
|
|
1011
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
2129
|
+
var gi = /* @__PURE__ */ new WeakMap();
|
|
2130
|
+
function _i(e5, t2, n2) {
|
|
2131
|
+
let r2 = gi.get(e5);
|
|
2132
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), gi.set(e5, r2));
|
|
1012
2133
|
let i2 = r2.get(t2);
|
|
1013
2134
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
1014
2135
|
let a2 = i2.get(n2);
|
|
1015
2136
|
if (!a2) {
|
|
1016
|
-
let r3 =
|
|
1017
|
-
a2 = r3.__state?.status === `fulfilled` ?
|
|
2137
|
+
let r3 = e5;
|
|
2138
|
+
a2 = r3.__state?.status === `fulfilled` ? hi(t2(r3.__state.value)) : r3.__state?.status === `rejected` ? hi(n2(r3.__state.reason)) : e5.then(t2, n2), i2.set(n2, a2);
|
|
1018
2139
|
}
|
|
1019
2140
|
return a2;
|
|
1020
2141
|
}
|
|
1021
|
-
function
|
|
1022
|
-
return
|
|
1023
|
-
}
|
|
1024
|
-
var
|
|
1025
|
-
var
|
|
1026
|
-
function
|
|
1027
|
-
let t2 =
|
|
1028
|
-
if (t2 === null) return
|
|
1029
|
-
let n2 = new URL(
|
|
1030
|
-
n2.searchParams.delete(
|
|
1031
|
-
for (let [
|
|
2142
|
+
function U(e5) {
|
|
2143
|
+
return e5;
|
|
2144
|
+
}
|
|
2145
|
+
var vi = U(`@wix/site-service-url`);
|
|
2146
|
+
var yi = `appSectionParams`;
|
|
2147
|
+
function bi(e5) {
|
|
2148
|
+
let t2 = e5.searchParams.get(yi);
|
|
2149
|
+
if (t2 === null) return e5;
|
|
2150
|
+
let n2 = new URL(e5);
|
|
2151
|
+
n2.searchParams.delete(yi);
|
|
2152
|
+
for (let [e6, r2] of Object.entries(xi(t2))) typeof r2 == `string` && !n2.searchParams.has(e6) && n2.searchParams.set(e6, r2);
|
|
1032
2153
|
return n2;
|
|
1033
2154
|
}
|
|
1034
|
-
function
|
|
2155
|
+
function xi(e5) {
|
|
1035
2156
|
try {
|
|
1036
|
-
let t2 = JSON.parse(
|
|
2157
|
+
let t2 = JSON.parse(e5);
|
|
1037
2158
|
return t2 && typeof t2 == `object` && !Array.isArray(t2) ? t2 : {};
|
|
1038
2159
|
} catch {
|
|
1039
2160
|
return {};
|
|
1040
2161
|
}
|
|
1041
2162
|
}
|
|
1042
|
-
var
|
|
1043
|
-
var
|
|
1044
|
-
let t2 = new URL(
|
|
2163
|
+
var Si = `bookings-uou:url-change`;
|
|
2164
|
+
var Ci = (e5) => {
|
|
2165
|
+
let t2 = new URL(e5);
|
|
1045
2166
|
return t2.searchParams.sort(), t2.href;
|
|
1046
2167
|
};
|
|
1047
|
-
function
|
|
2168
|
+
function wi(e5, { disableScrollToTop: t2, skipHistory: n2 } = {}) {
|
|
1048
2169
|
let r2 = globalThis.window;
|
|
1049
2170
|
if (!r2?.history) return;
|
|
1050
2171
|
let i2 = new URL(r2.location.href);
|
|
1051
|
-
if (
|
|
2172
|
+
if (Ci(i2) === Ci(e5)) return;
|
|
1052
2173
|
let a2 = { scrollY: r2.scrollY };
|
|
1053
|
-
if (n2) r2.history.replaceState(a2, ``,
|
|
2174
|
+
if (n2) r2.history.replaceState(a2, ``, e5.href);
|
|
1054
2175
|
else {
|
|
1055
2176
|
r2.history.replaceState(a2, ``, i2.href);
|
|
1056
2177
|
try {
|
|
1057
|
-
r2.history.pushState(t2 ? a2 : null, ``,
|
|
2178
|
+
r2.history.pushState(t2 ? a2 : null, ``, e5.href);
|
|
1058
2179
|
} catch {
|
|
1059
2180
|
return;
|
|
1060
2181
|
}
|
|
1061
2182
|
}
|
|
1062
|
-
r2.dispatchEvent(new Event(
|
|
2183
|
+
r2.dispatchEvent(new Event(Si));
|
|
1063
2184
|
}
|
|
1064
|
-
function
|
|
2185
|
+
function Ti(e5) {
|
|
1065
2186
|
let t2 = globalThis.window;
|
|
1066
|
-
return t2 ? (t2.addEventListener(
|
|
1067
|
-
t2.removeEventListener(
|
|
2187
|
+
return t2 ? (t2.addEventListener(Si, e5), t2.addEventListener(`popstate`, e5), () => {
|
|
2188
|
+
t2.removeEventListener(Si, e5), t2.removeEventListener(`popstate`, e5);
|
|
1068
2189
|
}) : () => {
|
|
1069
2190
|
};
|
|
1070
2191
|
}
|
|
1071
|
-
var
|
|
2192
|
+
var Ei = (e5) => {
|
|
1072
2193
|
try {
|
|
1073
|
-
return decodeURIComponent(
|
|
2194
|
+
return decodeURIComponent(e5);
|
|
1074
2195
|
} catch {
|
|
1075
|
-
return
|
|
2196
|
+
return e5;
|
|
1076
2197
|
}
|
|
1077
2198
|
};
|
|
1078
|
-
function
|
|
2199
|
+
function Di(e5, t2) {
|
|
1079
2200
|
let n2 = t2 ? new URL(t2).pathname : `/`;
|
|
1080
|
-
return `./${
|
|
1081
|
-
}
|
|
1082
|
-
function
|
|
1083
|
-
let
|
|
1084
|
-
return { pathname: r2.pathname, search: r2.search, searchParams: r2.searchParams, href: r2.href, getParsedUrl: () =>
|
|
1085
|
-
}
|
|
1086
|
-
var
|
|
1087
|
-
var
|
|
1088
|
-
var
|
|
1089
|
-
var
|
|
1090
|
-
var
|
|
1091
|
-
var
|
|
1092
|
-
var
|
|
1093
|
-
var
|
|
1094
|
-
return
|
|
2201
|
+
return `./${Ei(new URL(e5).pathname.replace(n2, ``).replace(/^\/|\/$/g, ``))}`;
|
|
2202
|
+
}
|
|
2203
|
+
function Oi() {
|
|
2204
|
+
let e5 = p(vi), t2 = i(() => e5.currentUrl, [e5]), n2 = d(Ti, t2, t2), r2 = c(() => bi(new URL(n2)), [n2]), a2 = e5.siteUrl.replace(/\/$/, ``);
|
|
2205
|
+
return { pathname: r2.pathname, search: r2.search, searchParams: r2.searchParams, href: r2.href, getParsedUrl: () => bi(new URL(e5.currentUrl)), getRelativeUrl: () => Di(e5.currentUrl, a2), getExternalBaseUrl: () => a2, pushUrl: wi };
|
|
2206
|
+
}
|
|
2207
|
+
var ki = U(`@wix/site-service-editor-context`);
|
|
2208
|
+
var Ai = U(`@wix/site-service-pages`);
|
|
2209
|
+
var ji = U(`@wix/site-service-router`);
|
|
2210
|
+
var Mi = U(`@wix/site-service-renderer-configuration`);
|
|
2211
|
+
var Ni = `13d21c63-b5ec-5912-8397-c3a5ddb27a97`;
|
|
2212
|
+
var Pi = `shopping_cart`;
|
|
2213
|
+
var Fi = `thank_you_page`;
|
|
2214
|
+
var W = function(e5) {
|
|
2215
|
+
return e5.BOOK_ONLINE = `bookingsBookOnline`, e5.SERVICE_PAGE = `bookingsServicePage`, e5.CALENDAR_PAGE = `bookingsCalendar`, e5.FORM_PAGE = `bookingsForm`, e5;
|
|
1095
2216
|
}({});
|
|
1096
|
-
var
|
|
1097
|
-
var
|
|
1098
|
-
var
|
|
1099
|
-
var
|
|
1100
|
-
(function(
|
|
1101
|
-
|
|
1102
|
-
})(
|
|
1103
|
-
var W;
|
|
1104
|
-
(function(e2) {
|
|
1105
|
-
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`;
|
|
1106
|
-
})(W ||= {});
|
|
1107
|
-
var sr = {};
|
|
1108
|
-
var cr = (sr[W.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, sr);
|
|
1109
|
-
var G = `{{main-mapping}}`;
|
|
1110
|
-
var lr = {};
|
|
1111
|
-
var ur;
|
|
1112
|
-
var dr = (lr[W.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (ur = {}, ur[W.BLOG_POST_EDIT] = { defaultMapping: `${G}/edit` }, ur[W.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${G}/preview/{{instance}}` }, ur) }, lr);
|
|
1113
|
-
var fr = {};
|
|
1114
|
-
var pr = (fr[W.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, fr);
|
|
1115
|
-
var mr = {};
|
|
2217
|
+
var Ii = `{{(.*?)}}`;
|
|
2218
|
+
var Li = `[{{}}]`;
|
|
2219
|
+
var Ri = `([^/]+)`;
|
|
2220
|
+
var G;
|
|
2221
|
+
(function(e5) {
|
|
2222
|
+
e5.product_page = `product_page`, e5.blog = `blog`, e5.post = `post`, e5.forum = `forum`, e5.group = `group`, e5.bookings = `Booking Service Page`, e5.challenges = `challenge_page`;
|
|
2223
|
+
})(G ||= {});
|
|
1116
2224
|
var K;
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
var
|
|
1121
|
-
var
|
|
1122
|
-
var
|
|
1123
|
-
var
|
|
1124
|
-
var
|
|
1125
|
-
var
|
|
1126
|
-
var
|
|
1127
|
-
var
|
|
1128
|
-
|
|
1129
|
-
|
|
2225
|
+
(function(e5) {
|
|
2226
|
+
e5.PRODUCT_PAGE = `wix.stores.sub_pages.product`, e5.BLOG_POST = `wix.blog.sub_pages.post`, e5.BLOG_POST_EDIT = `wix.blog.sub_pages.post.edit`, e5.BLOG_POST_PREVIEW = `wix.blog.sub_pages.post.preview`, e5.BLOG_CATEGORY = `wix.blog.sub_pages.category`, e5.FORUM_CATEGORY = `wix.forum.sub_pages.category`, e5.FORUM_CATEGORY_PAGINATION = `wix.forum.sub_pages.category.pagination`, e5.FORUM_CATEGORY_CREATE_POST = `wix.forum.sub_pages.category.create-post`, e5.FORUM_CATEGORY_CREATE_QUESTION = `wix.forum.sub_pages.category.create-question`, e5.FORUM_POST = `wix.forum.sub_pages.post`, e5.FORUM_POST_EDIT = `wix.forum.sub_pages.post.edit`, e5.FORUM_POST_PAGINATION = `wix.forum.sub_pages.post.pagination`, e5.FORUM_POST_DEEP_LINK_DATA = `wix.forum.sub_pages.post.deep-link-data`, e5.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA = `wix.forum.sub_pages.post.pagination-and-deep-link-data`, e5.GROUP = `wix.groups.sub_pages.group`, e5.GROUP_POST = `wix.groups.sub_pages.post`, e5.BOOKINGS_SERVICE = `wix.bookings.sub_pages.service_page`, e5.CHALLENGES_PAGE = `wix.online_programs.sub_pages.online_program`;
|
|
2227
|
+
})(K ||= {});
|
|
2228
|
+
var zi = {};
|
|
2229
|
+
var Bi = (zi[K.PRODUCT_PAGE] = { variables: [`slug`], required: [`slug`] }, zi);
|
|
2230
|
+
var q = `{{main-mapping}}`;
|
|
2231
|
+
var Vi = {};
|
|
2232
|
+
var Hi;
|
|
2233
|
+
var Ui = (Vi[K.BLOG_POST] = { variables: [`slug`], required: [`slug`], subMappings: (Hi = {}, Hi[K.BLOG_POST_EDIT] = { defaultMapping: `${q}/edit` }, Hi[K.BLOG_POST_PREVIEW] = { required: [`instance`], defaultMapping: `${q}/preview/{{instance}}` }, Hi) }, Vi);
|
|
2234
|
+
var Wi = {};
|
|
2235
|
+
var Gi = (Wi[K.BLOG_CATEGORY] = { variables: [`slug`], required: [`slug`], defaultPrefix: `categories` }, Wi);
|
|
2236
|
+
var Ki = {};
|
|
2237
|
+
var J;
|
|
2238
|
+
var qi;
|
|
2239
|
+
var Ji = (Ki[K.FORUM_POST] = { variables: [`categorySlug`, `postSlug`], required: [`categorySlug`, `postSlug`], subMappings: (J = {}, J[K.FORUM_POST_EDIT] = { defaultMapping: `${q}/edit` }, J[K.FORUM_POST_PAGINATION] = { required: [`page`], defaultMapping: `${q}/p-{{page}}` }, J[K.FORUM_POST_DEEP_LINK_DATA] = { required: [`deepLinkData`], defaultMapping: `${q}/dl-{{deepLinkData}}` }, J[K.FORUM_POST_PAGINATION_AND_DEEP_LINK_DATA] = { required: [`page`, `deepLinkData`], defaultMapping: `${q}/p-{{page}}/dl-{{deepLinkData}}` }, J) }, Ki[K.FORUM_CATEGORY] = { variables: [`slug`], required: [`slug`], subMappings: (qi = {}, qi[K.FORUM_CATEGORY_CREATE_POST] = { defaultMapping: `${q}/create-post` }, qi[K.FORUM_CATEGORY_CREATE_QUESTION] = { defaultMapping: `${q}/create-question` }, qi[K.FORUM_CATEGORY_PAGINATION] = { required: [`page`], defaultMapping: `${q}/p-{{page}}` }, qi) }, Ki);
|
|
2240
|
+
var Yi = {};
|
|
2241
|
+
var Xi = (Yi[K.GROUP] = { variables: [`groupId`, `tabName`], required: [`groupId`, `tabName`] }, Yi[K.GROUP_POST] = { variables: [`groupId`, `tabName`, `postId`], required: [`groupId`, `tabName`, `postId`] }, Yi);
|
|
2242
|
+
var Zi = {};
|
|
2243
|
+
var Qi = (Zi[K.BOOKINGS_SERVICE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `service-page` }, Zi);
|
|
2244
|
+
var $i = {};
|
|
2245
|
+
var ea = ($i[K.CHALLENGES_PAGE] = { variables: [`slug`], required: [`slug`], defaultPrefix: `challenge-page` }, $i);
|
|
2246
|
+
var Y = {};
|
|
2247
|
+
var ta = (Y[G.product_page] = Bi, Y[G.post] = Ui, Y[G.blog] = Gi, Y[G.forum] = Ji, Y[G.group] = Xi, Y[G.bookings] = Qi, Y[G.challenges] = ea, Y);
|
|
2248
|
+
var na = function(e5) {
|
|
2249
|
+
return Object.values(ra()).some(function(t2) {
|
|
2250
|
+
return !!t2?.subMappings?.[e5];
|
|
1130
2251
|
});
|
|
1131
2252
|
};
|
|
1132
|
-
var
|
|
1133
|
-
return Object.values(
|
|
1134
|
-
return
|
|
2253
|
+
var ra = function() {
|
|
2254
|
+
return Object.values(ta).reduce(function(e5, t2) {
|
|
2255
|
+
return Br(Br({}, e5), t2);
|
|
1135
2256
|
}, {}) || {};
|
|
1136
2257
|
};
|
|
1137
|
-
var
|
|
1138
|
-
var t2 =
|
|
1139
|
-
return !t2 &&
|
|
2258
|
+
var ia = function(e5) {
|
|
2259
|
+
var t2 = ra()[e5];
|
|
2260
|
+
return !t2 && na(e5) && console.warn(`You cannot get variables schema for subMappings key (${e5}).`), t2;
|
|
1140
2261
|
};
|
|
1141
|
-
var
|
|
1142
|
-
return Object.entries(
|
|
1143
|
-
var n2 =
|
|
1144
|
-
return Object.keys(n2).includes(
|
|
1145
|
-
}).map(function(
|
|
1146
|
-
return
|
|
2262
|
+
var aa = function(e5) {
|
|
2263
|
+
return Object.entries(ta).filter(function(t2) {
|
|
2264
|
+
var n2 = B(t2, 2)[1];
|
|
2265
|
+
return Object.keys(n2).includes(e5);
|
|
2266
|
+
}).map(function(e6) {
|
|
2267
|
+
return B(e6, 1)[0];
|
|
1147
2268
|
})[0];
|
|
1148
2269
|
};
|
|
1149
|
-
var
|
|
1150
|
-
return Object.entries(
|
|
1151
|
-
var n2 =
|
|
1152
|
-
return n2[0], !!n2[1]?.subMappings?.[
|
|
2270
|
+
var oa = function(e5) {
|
|
2271
|
+
return Object.entries(ra()).find(function(t2) {
|
|
2272
|
+
var n2 = B(t2, 2);
|
|
2273
|
+
return n2[0], !!n2[1]?.subMappings?.[e5];
|
|
1153
2274
|
});
|
|
1154
2275
|
};
|
|
1155
|
-
var
|
|
2276
|
+
var sa = function(e5) {
|
|
1156
2277
|
var t2 = [];
|
|
1157
|
-
if (
|
|
1158
|
-
var n2 =
|
|
2278
|
+
if (na(e5)) {
|
|
2279
|
+
var n2 = B(oa(e5), 2);
|
|
1159
2280
|
n2[0];
|
|
1160
2281
|
var r2 = n2[1];
|
|
1161
|
-
t2.push.apply(t2,
|
|
1162
|
-
} else t2.push.apply(t2,
|
|
2282
|
+
t2.push.apply(t2, Hr(Hr([], B(r2?.required || []), false), B(r2?.subMappings?.[e5]?.required || []), false));
|
|
2283
|
+
} else t2.push.apply(t2, Hr([], B(ia(e5)?.required || []), false));
|
|
1163
2284
|
return t2;
|
|
1164
2285
|
};
|
|
1165
|
-
var
|
|
2286
|
+
var ca = function(e5, t2) {
|
|
1166
2287
|
var n2;
|
|
1167
|
-
return t2 === void 0 && (t2 = ``), (n2 =
|
|
1168
|
-
return
|
|
2288
|
+
return t2 === void 0 && (t2 = ``), (n2 = e5?.main)?.find?.call(n2, function(e6) {
|
|
2289
|
+
return e6.key === t2;
|
|
1169
2290
|
});
|
|
1170
2291
|
};
|
|
1171
|
-
var
|
|
1172
|
-
return Error(`Url Mappings Error - [${
|
|
2292
|
+
var la = function(e5, t2) {
|
|
2293
|
+
return Error(`Url Mappings Error - [${e5}]: ${t2}`);
|
|
1173
2294
|
};
|
|
1174
|
-
var
|
|
1175
|
-
var
|
|
1176
|
-
var
|
|
1177
|
-
if (typeof
|
|
2295
|
+
var ua = Object.values(K);
|
|
2296
|
+
var da = la(`key`, `must be one of: ${ua.toString()}`);
|
|
2297
|
+
var fa = function(e5) {
|
|
2298
|
+
if (typeof e5 != `string` || !ua.includes(e5)) return da;
|
|
1178
2299
|
};
|
|
1179
|
-
var
|
|
1180
|
-
var
|
|
1181
|
-
if (typeof
|
|
1182
|
-
return typeof
|
|
1183
|
-
}) || Array.isArray(
|
|
2300
|
+
var pa = la(`itemData`, `must be on object with string as value, for example: { "slug": "shoes" }`);
|
|
2301
|
+
var ma = function(e5) {
|
|
2302
|
+
if (typeof e5 != `object` || !e5 || !Object.values(e5).every(function(e6) {
|
|
2303
|
+
return typeof e6 == `string`;
|
|
2304
|
+
}) || Array.isArray(e5)) return pa;
|
|
1184
2305
|
};
|
|
1185
|
-
var
|
|
1186
|
-
var
|
|
2306
|
+
var ha = la(`itemData`, `must have required variables, for example: { "slug": "shoes" }`);
|
|
2307
|
+
var ga = function(e5, t2) {
|
|
1187
2308
|
try {
|
|
1188
|
-
var n2 =
|
|
1189
|
-
if (!n2.every(function(
|
|
1190
|
-
return !!t2[
|
|
2309
|
+
var n2 = sa(e5);
|
|
2310
|
+
if (!n2.every(function(e6) {
|
|
2311
|
+
return !!t2[e6];
|
|
1191
2312
|
}) || !n2.length) throw Error();
|
|
1192
2313
|
} catch {
|
|
1193
|
-
return
|
|
2314
|
+
return ha;
|
|
1194
2315
|
}
|
|
1195
2316
|
};
|
|
1196
|
-
var
|
|
1197
|
-
var t2 =
|
|
1198
|
-
return [
|
|
2317
|
+
var _a = function(e5) {
|
|
2318
|
+
var t2 = e5.key, n2 = e5.itemData;
|
|
2319
|
+
return [fa(t2), ma(n2), ga(t2, n2)].find(Boolean);
|
|
1199
2320
|
};
|
|
1200
|
-
var
|
|
2321
|
+
var va = function(e5) {
|
|
1201
2322
|
return function(t2) {
|
|
1202
|
-
var n2 = new RegExp(
|
|
1203
|
-
return
|
|
2323
|
+
var n2 = new RegExp(Li, `g`), r2 = t2.replace(n2, ``);
|
|
2324
|
+
return e5?.[r2];
|
|
1204
2325
|
};
|
|
1205
2326
|
};
|
|
1206
|
-
var
|
|
1207
|
-
|
|
1208
|
-
var i2 =
|
|
2327
|
+
var ya = function(e5, t2, n2, r2) {
|
|
2328
|
+
e5 === void 0 && (e5 = { main: [] }), r2 === void 0 && (r2 = {});
|
|
2329
|
+
var i2 = _a({ key: t2, itemData: n2 });
|
|
1209
2330
|
if (i2) throw i2;
|
|
1210
|
-
var a2 = (
|
|
2331
|
+
var a2 = (ca(e5, t2) || {}).mapping, o2 = (r2 || {}).baseUrl;
|
|
1211
2332
|
if (o2 ??= ``, o2 = o2.endsWith(`/`) ? o2?.slice(0, -1) : o2, a2 && typeof a2 == `string`) {
|
|
1212
|
-
var s2 = new RegExp(
|
|
2333
|
+
var s2 = new RegExp(Ii, `g`), c2 = a2.replace(s2, va(n2));
|
|
1213
2334
|
return o2.concat(`/${c2}`);
|
|
1214
2335
|
}
|
|
1215
2336
|
};
|
|
1216
|
-
var
|
|
1217
|
-
var
|
|
1218
|
-
var t2 =
|
|
2337
|
+
var ba = /[.*+?^$()|]/g;
|
|
2338
|
+
var xa = function(e5) {
|
|
2339
|
+
var t2 = e5.replace(ba, `\\$&`).replace(new RegExp(Ii, `g`), Ri);
|
|
1219
2340
|
return RegExp(`^${t2}$`);
|
|
1220
2341
|
};
|
|
1221
|
-
var
|
|
1222
|
-
return
|
|
1223
|
-
return
|
|
2342
|
+
var Sa = function(e5, t2) {
|
|
2343
|
+
return e5 === void 0 && (e5 = []), e5.find(function(e6) {
|
|
2344
|
+
return xa(e6).test(t2);
|
|
1224
2345
|
});
|
|
1225
2346
|
};
|
|
1226
|
-
|
|
1227
|
-
var
|
|
2347
|
+
la(`url`, `Url must be a string`);
|
|
2348
|
+
var Ca = function(e5) {
|
|
1228
2349
|
return [` `, ` `, `
|
|
1229
2350
|
`].every(function(t2) {
|
|
1230
|
-
return !
|
|
2351
|
+
return !e5?.includes?.call(e5, t2);
|
|
1231
2352
|
});
|
|
1232
2353
|
};
|
|
1233
|
-
var
|
|
1234
|
-
return
|
|
2354
|
+
var wa = function(e5) {
|
|
2355
|
+
return e5?.length <= Ia.MAX_URL_MAPPING_LENGTH;
|
|
1235
2356
|
};
|
|
1236
|
-
var
|
|
1237
|
-
return
|
|
2357
|
+
var Ta = function(e5) {
|
|
2358
|
+
return e5?.split(`/`).every(Boolean);
|
|
1238
2359
|
};
|
|
1239
|
-
var
|
|
2360
|
+
var Ea = function(e5, t2) {
|
|
1240
2361
|
var n2 = t2.urlMappingKey;
|
|
1241
|
-
return
|
|
1242
|
-
return
|
|
2362
|
+
return sa(n2)?.every(function(t3) {
|
|
2363
|
+
return e5?.includes(`{{${t3}}}`);
|
|
1243
2364
|
});
|
|
1244
2365
|
};
|
|
1245
|
-
var
|
|
1246
|
-
return (
|
|
2366
|
+
var Da = function(e5) {
|
|
2367
|
+
return (e5.match(new RegExp(Ii, `g`))?.length || 0) <= 1;
|
|
1247
2368
|
};
|
|
1248
|
-
var
|
|
1249
|
-
return
|
|
2369
|
+
var Oa = function(e5) {
|
|
2370
|
+
return e5?.split(`/`).every(Da);
|
|
1250
2371
|
};
|
|
1251
|
-
var
|
|
1252
|
-
return [
|
|
2372
|
+
var ka = function(e5) {
|
|
2373
|
+
return [e5.publishedPrefix, e5.savedPrefix].filter(Boolean);
|
|
1253
2374
|
};
|
|
1254
|
-
var
|
|
2375
|
+
var Aa = function(e5, t2) {
|
|
1255
2376
|
return t2 === void 0 && (t2 = []), function(n2, r2) {
|
|
1256
2377
|
var i2 = n2.split(`/`), a2 = n2 === r2;
|
|
1257
2378
|
if (i2.length < 1 || a2) return true;
|
|
1258
|
-
var o2 =
|
|
1259
|
-
return t2.includes(s2) ? true :
|
|
1260
|
-
return
|
|
2379
|
+
var o2 = B(r2.split(`/`), 1)[0], s2 = B(i2, 1)[0];
|
|
2380
|
+
return t2.includes(s2) ? true : e5.every(function(e6) {
|
|
2381
|
+
return e6 === o2 || e6 !== s2;
|
|
1261
2382
|
});
|
|
1262
2383
|
};
|
|
1263
2384
|
};
|
|
1264
|
-
var
|
|
2385
|
+
var ja = function(e5, t2) {
|
|
1265
2386
|
var n2 = t2.pathPrefixes;
|
|
1266
|
-
return
|
|
1267
|
-
return
|
|
1268
|
-
}).filter(Boolean),
|
|
2387
|
+
return Aa(Object.values(n2).map(function(e6) {
|
|
2388
|
+
return e6.publishedPrefix;
|
|
2389
|
+
}).filter(Boolean), ka(t2.pathPrefix))(e5, t2.defaultMapping.defaultPublished);
|
|
1269
2390
|
};
|
|
1270
|
-
var
|
|
2391
|
+
var Ma = function(e5, t2) {
|
|
1271
2392
|
var n2 = t2.urlMappingKey, r2 = t2.urlMappings;
|
|
1272
|
-
return !
|
|
1273
|
-
return n2 !==
|
|
1274
|
-
}).map(function(
|
|
1275
|
-
return
|
|
1276
|
-
}),
|
|
1277
|
-
};
|
|
1278
|
-
var
|
|
1279
|
-
|
|
1280
|
-
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(
|
|
2393
|
+
return !Sa(r2.main?.filter(function(e6) {
|
|
2394
|
+
return n2 !== e6.key;
|
|
2395
|
+
}).map(function(e6) {
|
|
2396
|
+
return e6.mapping;
|
|
2397
|
+
}), e5);
|
|
2398
|
+
};
|
|
2399
|
+
var Na = function(e5) {
|
|
2400
|
+
e5 = e5.replace(new RegExp(Ii, `ig`), ``);
|
|
2401
|
+
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(e5), r2 = !e5.replace(t2, ``);
|
|
1281
2402
|
return n2 && r2;
|
|
1282
2403
|
};
|
|
1283
|
-
var
|
|
1284
|
-
var t2 =
|
|
2404
|
+
var Pa = function(e5) {
|
|
2405
|
+
var t2 = B(e5, 1)[0], n2 = e5.slice(-1);
|
|
1285
2406
|
return t2 !== `/` && n2 !== `/`;
|
|
1286
2407
|
};
|
|
1287
|
-
var
|
|
2408
|
+
var Fa = function(e5, t2) {
|
|
1288
2409
|
var n2 = t2.pathPrefixes;
|
|
1289
|
-
return
|
|
1290
|
-
return
|
|
1291
|
-
}).filter(Boolean),
|
|
1292
|
-
};
|
|
1293
|
-
var
|
|
1294
|
-
(function(
|
|
1295
|
-
|
|
1296
|
-
})(
|
|
1297
|
-
var
|
|
1298
|
-
function
|
|
1299
|
-
var t2 =
|
|
2410
|
+
return Aa(Object.values(n2).map(function(e6) {
|
|
2411
|
+
return e6.savedPrefix;
|
|
2412
|
+
}).filter(Boolean), ka(t2.pathPrefix))(e5, t2.defaultMapping.defaultSaved);
|
|
2413
|
+
};
|
|
2414
|
+
var X;
|
|
2415
|
+
(function(e5) {
|
|
2416
|
+
e5.MAX_LENGTH_ERROR = `MAX_LENGTH_ERROR`, e5.NO_SPACES_ERROR = `NO_SPACES_ERROR`, e5.NO_EMPTY_SEGMENT_ERROR = `NO_EMPTY_SEGMENT_ERROR`, e5.CONTAIN_MAIN_VARIABLE_ERROR = `CONTAIN_MAIN_VARIABLE_ERROR`, e5.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR = `ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR`, e5.ONLY_UNIQUE_PUBLISHED_URL_ERROR = `ONLY_UNIQUE_PUBLISHED_URL_ERROR`, e5.ONLY_UNIQUE_SAVED_URL_ERROR = `ONLY_UNIQUE_SAVED_URL_ERROR`, e5.ONLY_UNIQUE_MAPPING_ERROR = `ONLY_UNIQUE_MAPPING_ERROR`, e5.NO_INVALID_CHARACTERS_ERROR = `NO_INVALID_CHARACTERS_ERROR`, e5.NO_STARTING_OR_ENDING_SLASH_ERROR = `NO_STARTING_OR_ENDING_SLASH_ERROR`;
|
|
2417
|
+
})(X ||= {});
|
|
2418
|
+
var Ia = function() {
|
|
2419
|
+
function e5(e6) {
|
|
2420
|
+
var t2 = e6.urlMappingKey, n2 = e6.pathPrefixes, r2 = e6.urlMappings, i2 = this;
|
|
1300
2421
|
this.initValidators = function() {
|
|
1301
|
-
i2.validators = [[
|
|
1302
|
-
}, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping =
|
|
1303
|
-
}
|
|
1304
|
-
return
|
|
1305
|
-
var t2 =
|
|
1306
|
-
if (!t2) throw
|
|
1307
|
-
return this.pathPrefixes[t2] ||
|
|
1308
|
-
}, Object.defineProperty(
|
|
1309
|
-
var
|
|
1310
|
-
return { urlMappingKey:
|
|
1311
|
-
}, enumerable: false, configurable: true }),
|
|
2422
|
+
i2.validators = [[wa, X.MAX_LENGTH_ERROR], [Ca, X.NO_SPACES_ERROR], [Pa, X.NO_STARTING_OR_ENDING_SLASH_ERROR], [Ta, X.NO_EMPTY_SEGMENT_ERROR], [Na, X.NO_INVALID_CHARACTERS_ERROR], [Ea, X.CONTAIN_MAIN_VARIABLE_ERROR], [Oa, X.ONLY_ONE_VARIABLE_PER_SEGMENT_ERROR], [ja, X.ONLY_UNIQUE_PUBLISHED_URL_ERROR], [Fa, X.ONLY_UNIQUE_SAVED_URL_ERROR], [Ma, X.ONLY_UNIQUE_MAPPING_ERROR]];
|
|
2423
|
+
}, this.urlMappings = r2, this.pathPrefixes = n2, this.urlMappingKey = t2, this.pathPrefix = this.getPathPrefix(), this.defaultMapping = La(t2, this.pathPrefix), this.initValidators();
|
|
2424
|
+
}
|
|
2425
|
+
return e5.prototype.getPathPrefix = function() {
|
|
2426
|
+
var t2 = aa(this.urlMappingKey);
|
|
2427
|
+
if (!t2) throw na(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})`);
|
|
2428
|
+
return this.pathPrefixes[t2] || e5.FALLBACK_PATH_PREFIX;
|
|
2429
|
+
}, Object.defineProperty(e5.prototype, "validatorProps", { get: function() {
|
|
2430
|
+
var e6 = this;
|
|
2431
|
+
return { urlMappingKey: e6.urlMappingKey, urlMappings: e6.urlMappings, pathPrefix: e6.pathPrefix, pathPrefixes: e6.pathPrefixes, defaultMapping: e6.defaultMapping };
|
|
2432
|
+
}, enumerable: false, configurable: true }), e5.prototype.validate = function(e6) {
|
|
1312
2433
|
var t2, n2;
|
|
1313
2434
|
try {
|
|
1314
|
-
for (var r2 =
|
|
1315
|
-
var a2 =
|
|
2435
|
+
for (var r2 = Vr(this.validators), i2 = r2.next(); !i2.done; i2 = r2.next()) {
|
|
2436
|
+
var a2 = B(i2.value, 2), o2 = a2[0], s2 = a2[1], c2 = !!o2(e6, this.validatorProps);
|
|
1316
2437
|
if (!c2) return { isValid: c2, error: s2 };
|
|
1317
2438
|
}
|
|
1318
|
-
} catch (
|
|
1319
|
-
t2 = { error:
|
|
2439
|
+
} catch (e7) {
|
|
2440
|
+
t2 = { error: e7 };
|
|
1320
2441
|
} finally {
|
|
1321
2442
|
try {
|
|
1322
2443
|
i2 && !i2.done && (n2 = r2.return) && n2.call(r2);
|
|
@@ -1325,50 +2446,50 @@ var ri = function() {
|
|
|
1325
2446
|
}
|
|
1326
2447
|
}
|
|
1327
2448
|
return { isValid: true };
|
|
1328
|
-
},
|
|
2449
|
+
}, e5.errorArray = Object.values(X), e5.MAX_URL_MAPPING_LENGTH = 1e3, e5.FALLBACK_PATH_PREFIX = `unknown`, e5;
|
|
1329
2450
|
}();
|
|
1330
|
-
var
|
|
1331
|
-
var n2 =
|
|
1332
|
-
return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix =
|
|
1333
|
-
return `{{${
|
|
1334
|
-
})), false).filter(Boolean).join(`/`), defaultPublished:
|
|
1335
|
-
return `{{${
|
|
2451
|
+
var La = function(e5, t2) {
|
|
2452
|
+
var n2 = ra()[e5] || { required: [`slug`] }, r2 = n2.required, i2 = n2.defaultPrefix, a2 = {};
|
|
2453
|
+
return t2 && typeof t2 == `object` ? (a2.savedPrefix = t2.savedPrefix ?? ``, a2.publishedPrefix = t2.publishedPrefix ?? ``) : (a2.savedPrefix = Ia.FALLBACK_PATH_PREFIX, a2.publishedPrefix = Ia.FALLBACK_PATH_PREFIX), { defaultSaved: Hr([a2.savedPrefix, i2], B(r2?.map(function(e6) {
|
|
2454
|
+
return `{{${e6}}}`;
|
|
2455
|
+
})), false).filter(Boolean).join(`/`), defaultPublished: Hr([a2.publishedPrefix, i2], B(r2?.map(function(e6) {
|
|
2456
|
+
return `{{${e6}}}`;
|
|
1336
2457
|
})), false).filter(Boolean).join(`/`) };
|
|
1337
2458
|
};
|
|
1338
|
-
function
|
|
1339
|
-
return t2 ?
|
|
2459
|
+
function Ra(e5, t2) {
|
|
2460
|
+
return t2 ? ya(e5, K.BOOKINGS_SERVICE, { slug: t2 }, { baseUrl: `` }) : void 0;
|
|
1340
2461
|
}
|
|
1341
|
-
function
|
|
1342
|
-
if (!
|
|
2462
|
+
function za(e5) {
|
|
2463
|
+
if (!e5) return;
|
|
1343
2464
|
let t2 = ``;
|
|
1344
|
-
return (
|
|
2465
|
+
return (e5.filename || e5.altText) && (t2 = `/${encodeURIComponent(e5.filename || e5.altText)}`), e5.id ? `wix:image://v1/${e5.id}${t2}#originWidth=${e5.width}&originHeight=${e5.height}` : e5.url;
|
|
1345
2466
|
}
|
|
1346
|
-
function
|
|
1347
|
-
return Object.keys(
|
|
2467
|
+
function Ba(e5) {
|
|
2468
|
+
return Object.keys(e5).length === 1 && `$and` in e5 && Array.isArray(e5.$and);
|
|
1348
2469
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return Object.keys(
|
|
2470
|
+
function Va(e5) {
|
|
2471
|
+
return Object.keys(e5).length === 1 && `$or` in e5 && Array.isArray(e5.$or);
|
|
1351
2472
|
}
|
|
1352
|
-
function
|
|
1353
|
-
return Object.keys(
|
|
2473
|
+
function Ha(e5) {
|
|
2474
|
+
return Object.keys(e5).length === 1 && `$not` in e5 && typeof e5.$not == `object`;
|
|
1354
2475
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return
|
|
2476
|
+
function Z(e5, t2) {
|
|
2477
|
+
return e5 === void 0 || Object.keys(e5).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e5 : { $and: [...Ba(e5) ? e5.$and : [e5], ...Ba(t2) ? t2.$and : [t2]] };
|
|
1357
2478
|
}
|
|
1358
|
-
function
|
|
1359
|
-
return
|
|
2479
|
+
function Ua(e5, t2) {
|
|
2480
|
+
return e5 === void 0 || Object.keys(e5).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e5 : { $or: [...Va(e5) ? e5.$or : [e5], ...Va(t2) ? t2.$or : [t2]] };
|
|
1360
2481
|
}
|
|
1361
|
-
function
|
|
1362
|
-
if (
|
|
2482
|
+
function Wa(e5) {
|
|
2483
|
+
if (e5 !== void 0 && Object.keys(e5).length !== 0) return Ha(e5) ? e5.$not : { $not: e5 };
|
|
1363
2484
|
}
|
|
1364
|
-
var
|
|
2485
|
+
var Ga = class {
|
|
1365
2486
|
_items;
|
|
1366
2487
|
_fetchNextPage;
|
|
1367
2488
|
_fetchPrevPage;
|
|
1368
2489
|
_originQuery;
|
|
1369
2490
|
_limit;
|
|
1370
|
-
constructor({ items:
|
|
1371
|
-
this._items =
|
|
2491
|
+
constructor({ items: e5, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }) {
|
|
2492
|
+
this._items = e5, this._fetchNextPage = n2, this._fetchPrevPage = r2, this._originQuery = t2, this._limit = i2;
|
|
1372
2493
|
}
|
|
1373
2494
|
get items() {
|
|
1374
2495
|
return this._items;
|
|
@@ -1391,12 +2512,12 @@ var fi = class {
|
|
|
1391
2512
|
return await this._fetchPrevPage();
|
|
1392
2513
|
}
|
|
1393
2514
|
};
|
|
1394
|
-
var
|
|
2515
|
+
var Ka = class extends Ga {
|
|
1395
2516
|
_nextCursor;
|
|
1396
2517
|
_prevCursor;
|
|
1397
2518
|
cursors;
|
|
1398
|
-
constructor({ items:
|
|
1399
|
-
super({ items:
|
|
2519
|
+
constructor({ items: e5, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2, nextCursor: a2, prevCursor: o2 }) {
|
|
2520
|
+
super({ items: e5, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }), this._nextCursor = a2, this._prevCursor = o2, this.cursors = { next: a2, prev: o2 };
|
|
1400
2521
|
}
|
|
1401
2522
|
hasNext() {
|
|
1402
2523
|
return !!this._nextCursor;
|
|
@@ -1405,12 +2526,12 @@ var pi = class extends fi {
|
|
|
1405
2526
|
return !!this._prevCursor;
|
|
1406
2527
|
}
|
|
1407
2528
|
};
|
|
1408
|
-
var
|
|
2529
|
+
var qa = class extends Ga {
|
|
1409
2530
|
_totalCount;
|
|
1410
2531
|
_offset;
|
|
1411
2532
|
_tooManyToCount;
|
|
1412
|
-
constructor({ items:
|
|
1413
|
-
super({ items:
|
|
2533
|
+
constructor({ items: e5, fetchNextPage: t2, fetchPrevPage: n2, offset: r2, originQuery: i2, limit: a2, totalCount: o2, tooManyToCount: s2 }) {
|
|
2534
|
+
super({ items: e5, fetchNextPage: t2, fetchPrevPage: n2, originQuery: i2, limit: a2 }), this._totalCount = o2, this._offset = r2, this._tooManyToCount = s2;
|
|
1414
2535
|
}
|
|
1415
2536
|
get currentPage() {
|
|
1416
2537
|
return this._limit === 0 ? void 0 : Math.floor(this._offset / this._limit);
|
|
@@ -1428,736 +2549,757 @@ var mi = class extends fi {
|
|
|
1428
2549
|
return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
|
|
1429
2550
|
}
|
|
1430
2551
|
};
|
|
1431
|
-
function
|
|
2552
|
+
function Ja(e5) {
|
|
1432
2553
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
1433
2554
|
try {
|
|
1434
|
-
let r2 =
|
|
1435
|
-
if (
|
|
1436
|
-
let
|
|
1437
|
-
return new
|
|
2555
|
+
let r2 = e5.requestTransformer(e5.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e5.func(r2), { [Ke]: a2, [qe]: o2 } = e5.responseTransformer(i2);
|
|
2556
|
+
if (e5.pagingMethod === `OFFSET`) {
|
|
2557
|
+
let e6 = n2;
|
|
2558
|
+
return new qa({ items: a2 ?? [], fetchNextPage: () => t2({ ...e6, paging: { offset: e6.paging.offset + e6.paging.limit, limit: e6.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e6.paging.offset - e6.paging.limit, 0), limit: e6.paging.limit } }).find(), offset: e6.paging.offset, limit: e6.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
|
|
1438
2559
|
}
|
|
1439
2560
|
let s2 = n2.cursorPaging;
|
|
1440
|
-
return new
|
|
2561
|
+
return new Ka({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
|
|
1441
2562
|
} catch (t3) {
|
|
1442
|
-
throw
|
|
2563
|
+
throw e5.errorTransformer(t3);
|
|
1443
2564
|
}
|
|
1444
|
-
}, skipTo(
|
|
1445
|
-
return t2({ ...n2, cursorPaging: { cursor:
|
|
2565
|
+
}, skipTo(e6) {
|
|
2566
|
+
return t2({ ...n2, cursorPaging: { cursor: e6, limit: n2.cursorPaging.limit } });
|
|
1446
2567
|
}, eq(r2, i2) {
|
|
1447
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
1448
|
-
return t2({ ...n2, filter:
|
|
2568
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [Q(e5.transformationPaths, r2)]: a2 };
|
|
2569
|
+
return t2({ ...n2, filter: Z(n2.filter, o2) });
|
|
1449
2570
|
}, ne(r2, i2) {
|
|
1450
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
1451
|
-
return t2({ ...n2, filter:
|
|
2571
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [Q(e5.transformationPaths, r2)]: { $ne: a2 } };
|
|
2572
|
+
return t2({ ...n2, filter: Z(n2.filter, o2) });
|
|
1452
2573
|
}, ge(r2, i2) {
|
|
1453
|
-
let a2 = { [
|
|
1454
|
-
return t2({ ...n2, filter:
|
|
2574
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $gte: i2 } };
|
|
2575
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
1455
2576
|
}, gt(r2, i2) {
|
|
1456
|
-
let a2 = { [
|
|
1457
|
-
return t2({ ...n2, filter:
|
|
2577
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $gt: i2 } };
|
|
2578
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
1458
2579
|
}, le(r2, i2) {
|
|
1459
|
-
let a2 = { [
|
|
1460
|
-
return t2({ ...n2, filter:
|
|
2580
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $lte: i2 } };
|
|
2581
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
1461
2582
|
}, lt(r2, i2) {
|
|
1462
|
-
let a2 = { [
|
|
1463
|
-
return t2({ ...n2, filter:
|
|
1464
|
-
}, isNotEmpty(
|
|
1465
|
-
return this.ne(
|
|
1466
|
-
}, isEmpty(
|
|
1467
|
-
return this.eq(
|
|
2583
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $lt: i2 } };
|
|
2584
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
2585
|
+
}, isNotEmpty(e6) {
|
|
2586
|
+
return this.ne(e6, null);
|
|
2587
|
+
}, isEmpty(e6) {
|
|
2588
|
+
return this.eq(e6, null);
|
|
1468
2589
|
}, startsWith(r2, i2) {
|
|
1469
|
-
let a2 = { [
|
|
1470
|
-
return t2({ ...n2, filter:
|
|
2590
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
2591
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
1471
2592
|
}, endsWith(r2, i2) {
|
|
1472
|
-
let a2 = { [
|
|
1473
|
-
return t2({ ...n2, filter:
|
|
2593
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
2594
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
1474
2595
|
}, contains(r2, i2) {
|
|
1475
|
-
let a2 = { [
|
|
1476
|
-
return t2({ ...n2, filter:
|
|
2596
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $contains: i2 } };
|
|
2597
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
1477
2598
|
}, hasSome(r2, ...i2) {
|
|
1478
|
-
let a2 = { [
|
|
1479
|
-
return t2({ ...n2, filter:
|
|
2599
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
2600
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
1480
2601
|
}, hasAll(r2, ...i2) {
|
|
1481
|
-
let a2 = { [
|
|
1482
|
-
return t2({ ...n2, filter:
|
|
1483
|
-
}, between(
|
|
1484
|
-
return this.ge(
|
|
2602
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
2603
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
2604
|
+
}, between(e6, t3, n3) {
|
|
2605
|
+
return this.ge(e6, t3).lt(e6, n3);
|
|
1485
2606
|
}, in(r2, i2) {
|
|
1486
|
-
let a2 = { [
|
|
1487
|
-
return t2({ ...n2, filter:
|
|
2607
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $in: i2 } };
|
|
2608
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
1488
2609
|
}, exists(r2, i2 = true) {
|
|
1489
|
-
let a2 = { [
|
|
1490
|
-
return t2({ ...n2, filter:
|
|
1491
|
-
}, or(
|
|
1492
|
-
return t2({ ...n2, filter:
|
|
1493
|
-
}, and(
|
|
1494
|
-
return t2({ ...n2, filter:
|
|
1495
|
-
}, not(
|
|
1496
|
-
return t2({ ...n2, filter:
|
|
2610
|
+
let a2 = { [Q(e5.transformationPaths, r2)]: { $exists: i2 } };
|
|
2611
|
+
return t2({ ...n2, filter: Z(n2.filter, a2) });
|
|
2612
|
+
}, or(e6) {
|
|
2613
|
+
return t2({ ...n2, filter: Ua(n2.filter, e6.query.filter) });
|
|
2614
|
+
}, and(e6) {
|
|
2615
|
+
return t2({ ...n2, filter: Z(n2.filter, e6.query.filter) });
|
|
2616
|
+
}, not(e6) {
|
|
2617
|
+
return t2({ ...n2, filter: Wa(e6.query.filter) });
|
|
1497
2618
|
}, ascending(...r2) {
|
|
1498
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
2619
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Q(e5.transformationPaths, t3), order: `ASC` }))] });
|
|
1499
2620
|
}, descending(...r2) {
|
|
1500
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
1501
|
-
}, skip(
|
|
1502
|
-
return t2({ ...n2, paging: { offset:
|
|
2621
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: Q(e5.transformationPaths, t3), order: `DESC` }))] });
|
|
2622
|
+
}, skip(e6) {
|
|
2623
|
+
return t2({ ...n2, paging: { offset: e6, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
1503
2624
|
}, limit(r2) {
|
|
1504
|
-
if (
|
|
1505
|
-
let
|
|
1506
|
-
return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in
|
|
2625
|
+
if (e5.pagingMethod === `CURSOR`) {
|
|
2626
|
+
let e6 = n2;
|
|
2627
|
+
return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in e6.cursorPaging ? e6.cursorPaging.cursor : void 0 } });
|
|
1507
2628
|
}
|
|
1508
2629
|
let i2 = n2;
|
|
1509
2630
|
return t2({ ...n2, paging: { limit: r2, offset: `offset` in i2.paging ? i2.paging.offset : 0 } });
|
|
1510
2631
|
} });
|
|
1511
|
-
return t2({ filter: {}, ...
|
|
2632
|
+
return t2({ filter: {}, ...e5.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
1512
2633
|
}
|
|
1513
|
-
function
|
|
1514
|
-
let n2 = Object.entries(
|
|
1515
|
-
return n2 ? t2.replace(n2,
|
|
2634
|
+
function Q(e5, t2) {
|
|
2635
|
+
let n2 = Object.entries(e5).find(([e6]) => e6 === t2 || t2.startsWith(`${e6}.`))?.[0];
|
|
2636
|
+
return n2 ? t2.replace(n2, e5[n2]) : Ye(t2, { ...e5, ...Je });
|
|
1516
2637
|
}
|
|
1517
|
-
function
|
|
1518
|
-
let r2 = (r3, i3) =>
|
|
2638
|
+
function Ya(e5, t2, n2 = {}) {
|
|
2639
|
+
let r2 = (r3, i3) => Ya(e5, t2, { ...n2, [r3]: i3 }), i2 = () => Object.keys(n2).length === 0 ? {} : { [Xe(e5, t2)]: n2 };
|
|
1519
2640
|
return { get filter() {
|
|
1520
2641
|
return i2();
|
|
1521
|
-
}, eq: (
|
|
2642
|
+
}, eq: (e6) => r2(`$eq`, e6), ne: (e6) => r2(`$ne`, e6), gt: (e6) => r2(`$gt`, e6), gte: (e6) => r2(`$gte`, e6), lt: (e6) => r2(`$lt`, e6), lte: (e6) => r2(`$lte`, e6), startsWith: (e6) => r2(`$startsWith`, e6), endsWith: (e6) => r2(`$endsWith`, e6), contains: (e6) => r2(`$contains`, e6), in: (e6) => r2(`$in`, e6), nin: (e6) => r2(`$nin`, e6), hasSome: (e6) => r2(`$hasSome`, e6), hasAll: (e6) => r2(`$hasAll`, e6), exists: (e6 = true) => r2(`$exists`, e6), isEmpty: (e6 = true) => r2(`$isEmpty`, e6), isNotEmpty: () => r2(`$ne`, null) };
|
|
1522
2643
|
}
|
|
1523
|
-
function
|
|
1524
|
-
return Object.assign((t2) =>
|
|
2644
|
+
function Xa(e5) {
|
|
2645
|
+
return Object.assign((t2) => Ya(t2, e5), { and: (...e6) => ({ filter: { $and: e6.map((e7) => e7.filter) } }), or: (...e6) => ({ filter: { $or: e6.map((e7) => e7.filter) } }), not: (e6) => ({ filter: { $not: e6.filter } }) });
|
|
1525
2646
|
}
|
|
1526
|
-
function
|
|
1527
|
-
return (t2) => ({ asc: () => ({ sort: { fieldName: Xe(t2,
|
|
2647
|
+
function Za(e5) {
|
|
2648
|
+
return (t2) => ({ asc: () => ({ sort: { fieldName: Xe(t2, e5), order: `ASC` } }), desc: () => ({ sort: { fieldName: Xe(t2, e5), order: `DESC` } }) });
|
|
1528
2649
|
}
|
|
1529
|
-
function
|
|
2650
|
+
function Qa(e5) {
|
|
1530
2651
|
return () => {
|
|
1531
|
-
let t2 = {}, n2 = { withFilter(
|
|
1532
|
-
return t2 = { ...t2, filter:
|
|
2652
|
+
let t2 = {}, n2 = { withFilter(e6) {
|
|
2653
|
+
return t2 = { ...t2, filter: e6.filter }, n2;
|
|
1533
2654
|
}, withFields(...r2) {
|
|
1534
|
-
return t2 = { ...t2, fields: r2.map((t3) => Xe(t3,
|
|
1535
|
-
}, withSorting(...
|
|
1536
|
-
return t2 = { ...t2, sort:
|
|
1537
|
-
}, withPaging(
|
|
1538
|
-
return t2 = { ...t2, paging:
|
|
2655
|
+
return t2 = { ...t2, fields: r2.map((t3) => Xe(t3, e5)) }, n2;
|
|
2656
|
+
}, withSorting(...e6) {
|
|
2657
|
+
return t2 = { ...t2, sort: e6.map((e7) => e7.sort) }, n2;
|
|
2658
|
+
}, withPaging(e6) {
|
|
2659
|
+
return t2 = { ...t2, paging: e6 }, n2;
|
|
1539
2660
|
}, build() {
|
|
1540
2661
|
return t2;
|
|
1541
2662
|
} };
|
|
1542
2663
|
return n2;
|
|
1543
2664
|
};
|
|
1544
2665
|
}
|
|
1545
|
-
function
|
|
1546
|
-
return { QueryBuilder:
|
|
2666
|
+
function $a(e5) {
|
|
2667
|
+
return { QueryBuilder: Qa(e5), Filter: Xa(e5), Sort: Za(e5) };
|
|
1547
2668
|
}
|
|
1548
|
-
var
|
|
1549
|
-
var
|
|
1550
|
-
var
|
|
1551
|
-
var
|
|
1552
|
-
var
|
|
1553
|
-
var
|
|
1554
|
-
function
|
|
1555
|
-
return !
|
|
2669
|
+
var eo = `filter`;
|
|
2670
|
+
var to = `sort`;
|
|
2671
|
+
var no = `cursorPaging`;
|
|
2672
|
+
var ro = `paging`;
|
|
2673
|
+
var io = [eo, to, no];
|
|
2674
|
+
var ao = [eo, to, ro];
|
|
2675
|
+
function oo(e5, t2) {
|
|
2676
|
+
return !e5 || typeof e5 != `object` ? false : t2.some((t3) => e5.hasOwnProperty(t3));
|
|
1556
2677
|
}
|
|
1557
|
-
function
|
|
1558
|
-
return
|
|
2678
|
+
function so(e5) {
|
|
2679
|
+
return oo(e5, io);
|
|
1559
2680
|
}
|
|
1560
|
-
function
|
|
1561
|
-
return
|
|
2681
|
+
function co(e5) {
|
|
2682
|
+
return oo(e5, ao);
|
|
1562
2683
|
}
|
|
1563
|
-
function
|
|
1564
|
-
let { hasOptionsParameter: t2 } =
|
|
2684
|
+
function lo(e5) {
|
|
2685
|
+
let { hasOptionsParameter: t2 } = e5;
|
|
1565
2686
|
return function(...n2) {
|
|
1566
|
-
return t2 ?
|
|
2687
|
+
return t2 ? fo(n2, e5) : uo(n2, e5);
|
|
1567
2688
|
};
|
|
1568
2689
|
}
|
|
1569
|
-
function
|
|
1570
|
-
return
|
|
2690
|
+
function uo(e5, t2) {
|
|
2691
|
+
return e5.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e5[0]);
|
|
1571
2692
|
}
|
|
1572
|
-
function
|
|
1573
|
-
switch (
|
|
2693
|
+
function fo(e5, t2) {
|
|
2694
|
+
switch (e5.length) {
|
|
1574
2695
|
case 0:
|
|
1575
2696
|
return t2.builderQueryFunction();
|
|
1576
2697
|
case 1:
|
|
1577
|
-
return
|
|
2698
|
+
return so(e5[0]) || co(e5[0]) ? t2.typedQueryFunction(e5[0]) : t2.builderQueryFunction(e5[0]);
|
|
1578
2699
|
default:
|
|
1579
|
-
return t2.typedQueryFunction(
|
|
2700
|
+
return t2.typedQueryFunction(e5[0], e5[1]);
|
|
1580
2701
|
}
|
|
1581
2702
|
}
|
|
1582
|
-
function
|
|
1583
|
-
return
|
|
2703
|
+
function po(e5) {
|
|
2704
|
+
return It(Object.assign(e5, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], _: [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "*.dev.wix-code.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "editor._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }, { srcPath: `/_api/bookings/v1/service-options-and-variants`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/bookings/v1/serviceOptionsAndVariants`, destPath: `/v1/serviceOptionsAndVariants` }], "bo._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wixbo.ai": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "wix-bo.com": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/serviceOptionsAndVariants` }], "www._base_domain_": [{ srcPath: `/_api/v1/service-options-and-variants`, destPath: `/v1/service-options-and-variants` }] } }));
|
|
1584
2705
|
}
|
|
1585
|
-
var
|
|
1586
|
-
function
|
|
2706
|
+
var mo = `@wix/auto_sdk_bookings_service-options-and-variants`;
|
|
2707
|
+
function ho(e5) {
|
|
1587
2708
|
function t2({ host: t3 }) {
|
|
1588
|
-
return { entityFqdn: `wix.bookings.catalog.v1.service_options_and_variants`, method: `POST`, methodFqn: `wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.QueryServiceOptionsAndVariants`, packageName:
|
|
2709
|
+
return { entityFqdn: `wix.bookings.catalog.v1.service_options_and_variants`, method: `POST`, methodFqn: `wix.bookings.catalog.v1.ServiceOptionsAndVariantsService.QueryServiceOptionsAndVariants`, packageName: mo, migrationOptions: { optInTransformResponse: true }, url: po({ protoPath: `/v1/serviceOptionsAndVariants/query`, data: e5, host: t3 }), data: e5 };
|
|
1589
2710
|
}
|
|
1590
2711
|
return t2;
|
|
1591
2712
|
}
|
|
1592
|
-
function
|
|
1593
|
-
let { httpClient:
|
|
1594
|
-
return
|
|
1595
|
-
let r2 =
|
|
2713
|
+
function go() {
|
|
2714
|
+
let { httpClient: e5, sideEffects: t2 } = arguments[0];
|
|
2715
|
+
return Ja({ func: async (n2) => {
|
|
2716
|
+
let r2 = ho(n2);
|
|
1596
2717
|
t2?.onSiteCall?.();
|
|
1597
2718
|
try {
|
|
1598
|
-
let n3 = await
|
|
2719
|
+
let n3 = await e5.request(r2);
|
|
1599
2720
|
return t2?.onSuccess?.(n3), n3;
|
|
1600
|
-
} catch (
|
|
1601
|
-
throw t2?.onError?.(
|
|
2721
|
+
} catch (e6) {
|
|
2722
|
+
throw t2?.onError?.(e6), e6;
|
|
1602
2723
|
}
|
|
1603
|
-
}, requestTransformer: (
|
|
1604
|
-
let t3 = [
|
|
2724
|
+
}, requestTransformer: (e6) => {
|
|
2725
|
+
let t3 = [e6, {}];
|
|
1605
2726
|
return A({ ...t3?.[1], query: t3?.[0] });
|
|
1606
|
-
}, responseTransformer: ({ data:
|
|
1607
|
-
let t3 = j(N(
|
|
2727
|
+
}, responseTransformer: ({ data: e6 }) => {
|
|
2728
|
+
let t3 = j(N(e6, []));
|
|
1608
2729
|
return { items: t3?.serviceOptionsAndVariantsList, pagingMetadata: t3?.pagingMetadata };
|
|
1609
|
-
}, errorTransformer: (
|
|
1610
|
-
throw P(
|
|
2730
|
+
}, errorTransformer: (e6) => {
|
|
2731
|
+
throw P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
1611
2732
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
1612
2733
|
}
|
|
1613
|
-
async function
|
|
1614
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
2734
|
+
async function _o(e5) {
|
|
2735
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ho(A({ query: e5 }));
|
|
1615
2736
|
n2?.onSiteCall?.();
|
|
1616
2737
|
try {
|
|
1617
|
-
let
|
|
1618
|
-
return n2?.onSuccess?.(
|
|
1619
|
-
} catch (
|
|
1620
|
-
let t3 = P(
|
|
1621
|
-
throw n2?.onError?.(
|
|
2738
|
+
let e6 = await t2.request(r2);
|
|
2739
|
+
return n2?.onSuccess?.(e6), j(e6.data);
|
|
2740
|
+
} catch (e6) {
|
|
2741
|
+
let t3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
|
|
2742
|
+
throw n2?.onError?.(e6), t3;
|
|
1622
2743
|
}
|
|
1623
2744
|
}
|
|
1624
|
-
function
|
|
1625
|
-
return () =>
|
|
2745
|
+
function vo(e5) {
|
|
2746
|
+
return () => go({ httpClient: e5 });
|
|
1626
2747
|
}
|
|
1627
|
-
function
|
|
1628
|
-
return (t2) =>
|
|
2748
|
+
function yo(e5) {
|
|
2749
|
+
return (t2) => _o(t2, { httpClient: e5 });
|
|
1629
2750
|
}
|
|
1630
|
-
function
|
|
1631
|
-
let t2 =
|
|
1632
|
-
function n2(
|
|
2751
|
+
function bo(e5) {
|
|
2752
|
+
let t2 = lo({ builderQueryFunction: () => vo(e5)(), typedQueryFunction: (t3) => yo(e5)(t3), hasOptionsParameter: false });
|
|
2753
|
+
function n2(e6) {
|
|
1633
2754
|
return t2(...arguments);
|
|
1634
2755
|
}
|
|
1635
2756
|
return n2;
|
|
1636
2757
|
}
|
|
1637
|
-
var
|
|
1638
|
-
function
|
|
1639
|
-
if (
|
|
2758
|
+
var xo = Pt(bo);
|
|
2759
|
+
function So(e5) {
|
|
2760
|
+
if (e5) return e5.url;
|
|
1640
2761
|
}
|
|
1641
|
-
var
|
|
1642
|
-
var
|
|
1643
|
-
function
|
|
1644
|
-
return
|
|
2762
|
+
var Co = [{ path: `services.createdDate` }, { path: `services.updatedDate` }, { path: `services.media.items.image.urlExpirationDate` }, { path: `services.media.mainMedia.image.urlExpirationDate` }, { path: `services.media.coverMedia.image.urlExpirationDate` }, { path: `services.payment.subscription.recurringStartDate` }, { path: `services.bookingPolicy.createdDate` }, { path: `services.bookingPolicy.updatedDate` }, { path: `services.schedule.firstSessionStart` }, { path: `services.schedule.lastSessionEnd` }, { path: `services.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image.urlExpirationDate` }, { path: `services.supportedSlugs.createdDate` }, { path: `services.mainSlug.createdDate` }];
|
|
2763
|
+
var wo = [{ path: `services.locations.business.address.geocode.latitude` }, { path: `services.locations.business.address.geocode.longitude` }, { path: `services.locations.custom.address.geocode.latitude` }, { path: `services.locations.custom.address.geocode.longitude` }, { path: `services.locations.calculatedAddress.geocode.latitude` }, { path: `services.locations.calculatedAddress.geocode.longitude` }];
|
|
2764
|
+
function To(e5) {
|
|
2765
|
+
return It(Object.assign(e5, { domainToMappings: { "*.dev.wix-code.com": [{ srcPath: `/_api/services-2`, destPath: `` }, { srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "www.wixapis.com": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }, { srcPath: `/bookings/services/v2/bulk/services`, destPath: `/v2/bulk/services` }], "manage._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "editor._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "blocks._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], "create.editorx": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }, { srcPath: `/_api/bookings/v2/bulk/services`, destPath: `/v2/bulk/services` }], _: [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "www._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "bo._base_domain_": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "wixbo.ai": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "wix-bo.com": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "editor.wixapps.net": [{ srcPath: `/_api/bookings/v2/services`, destPath: `/v2/services` }], "api._api_base_domain_": [{ srcPath: `/services-2`, destPath: `` }] } }));
|
|
1645
2766
|
}
|
|
1646
|
-
var
|
|
1647
|
-
function
|
|
2767
|
+
var Eo = `@wix/auto_sdk_bookings_services`;
|
|
2768
|
+
function Do(e5) {
|
|
1648
2769
|
function t2({ host: t3 }) {
|
|
1649
|
-
return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryServices`, packageName:
|
|
2770
|
+
return { entityFqdn: `wix.bookings.services.v2.service`, method: `POST`, methodFqn: `wix.bookings.services.v2.ServicesService.QueryServices`, packageName: Eo, migrationOptions: { optInTransformResponse: true }, url: To({ protoPath: `/v2/services/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => N(e6, [{ transformFn: M, paths: Co }, { transformFn: un, paths: wo }]) };
|
|
1650
2771
|
}
|
|
1651
2772
|
return t2;
|
|
1652
2773
|
}
|
|
1653
|
-
var
|
|
1654
|
-
var
|
|
1655
|
-
var
|
|
1656
|
-
var
|
|
1657
|
-
var
|
|
1658
|
-
var
|
|
1659
|
-
function
|
|
2774
|
+
var Oo = [{ path: `services.media.items.image` }, { path: `services.media.mainMedia.image` }, { path: `services.media.coverMedia.image` }, { path: `services.staffMembers.mainMedia.image` }, { path: `services.staffMemberDetails.staffMembers.mainMedia.image` }];
|
|
2775
|
+
var ko = [{ path: `services.locations.calculatedAddress` }, { path: `services.locations.business.address` }, { path: `services.locations.custom.address` }];
|
|
2776
|
+
var Ao = [{ path: `services.urls.servicePage` }, { path: `services.urls.bookingPage` }, { path: `services.urls.calendarPage` }];
|
|
2777
|
+
var jo = ((e5) => (e5.APPOINTMENT = `APPOINTMENT`, e5.CLASS = `CLASS`, e5.COURSE = `COURSE`, e5))(jo || {});
|
|
2778
|
+
var Mo = ((e5) => (e5.FIXED = `FIXED`, e5.CUSTOM = `CUSTOM`, e5.VARIED = `VARIED`, e5.NO_FEE = `NO_FEE`, e5.SUBSCRIPTION = `SUBSCRIPTION`, e5))(Mo || {});
|
|
2779
|
+
var No = ((e5) => (e5.CUSTOM = `CUSTOM`, e5.BUSINESS = `BUSINESS`, e5.CUSTOMER = `CUSTOMER`, e5))(No || {});
|
|
2780
|
+
function Po(e5) {
|
|
1660
2781
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
1661
|
-
return
|
|
1662
|
-
let i2 =
|
|
2782
|
+
return Ja({ func: async (r2) => {
|
|
2783
|
+
let i2 = Do({ ...r2, ...e5 ?? {} });
|
|
1663
2784
|
n2?.onSiteCall?.();
|
|
1664
2785
|
try {
|
|
1665
|
-
let
|
|
1666
|
-
return n2?.onSuccess?.(
|
|
1667
|
-
} catch (
|
|
1668
|
-
throw n2?.onError?.(
|
|
2786
|
+
let e6 = await t2.request(i2);
|
|
2787
|
+
return n2?.onSuccess?.(e6), e6;
|
|
2788
|
+
} catch (e6) {
|
|
2789
|
+
throw n2?.onError?.(e6), e6;
|
|
1669
2790
|
}
|
|
1670
2791
|
}, requestTransformer: (t3) => {
|
|
1671
|
-
let n3 = [t3,
|
|
2792
|
+
let n3 = [t3, e5];
|
|
1672
2793
|
return A({ ...n3?.[1], query: n3?.[0] });
|
|
1673
|
-
}, responseTransformer: ({ data:
|
|
1674
|
-
let t3 = j(N(
|
|
2794
|
+
}, responseTransformer: ({ data: e6 }) => {
|
|
2795
|
+
let t3 = j(N(e6, [{ transformFn: za, paths: Oo }, { transformFn: dn, paths: ko }, { transformFn: So, paths: Ao }]));
|
|
1675
2796
|
return { items: t3?.services, pagingMetadata: t3?.pagingMetadata };
|
|
1676
|
-
}, errorTransformer: (
|
|
1677
|
-
throw P(
|
|
2797
|
+
}, errorTransformer: (e6) => {
|
|
2798
|
+
throw P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
1678
2799
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
1679
2800
|
}
|
|
1680
|
-
async function
|
|
1681
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
2801
|
+
async function Fo(e5, t2) {
|
|
2802
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Do(A({ query: e5, ...t2 }));
|
|
1682
2803
|
r2?.onSiteCall?.();
|
|
1683
2804
|
try {
|
|
1684
|
-
let
|
|
1685
|
-
return r2?.onSuccess?.(
|
|
1686
|
-
} catch (
|
|
1687
|
-
let t3 = P(
|
|
1688
|
-
throw r2?.onError?.(
|
|
2805
|
+
let e6 = await n2.request(i2);
|
|
2806
|
+
return r2?.onSuccess?.(e6), j(N(e6.data, [{ transformFn: za, paths: Oo }, { transformFn: dn, paths: ko }, { transformFn: So, paths: Ao }]));
|
|
2807
|
+
} catch (e6) {
|
|
2808
|
+
let t3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
2809
|
+
throw r2?.onError?.(e6), t3;
|
|
1689
2810
|
}
|
|
1690
2811
|
}
|
|
1691
|
-
function
|
|
1692
|
-
return (t2) =>
|
|
2812
|
+
function Io(e5) {
|
|
2813
|
+
return (t2) => Po(t2, { httpClient: e5 });
|
|
1693
2814
|
}
|
|
1694
|
-
function
|
|
1695
|
-
return (t2, n2) =>
|
|
2815
|
+
function Lo(e5) {
|
|
2816
|
+
return (t2, n2) => Fo(t2, n2, { httpClient: e5 });
|
|
1696
2817
|
}
|
|
1697
|
-
function
|
|
1698
|
-
let t2 =
|
|
1699
|
-
function n2(
|
|
2818
|
+
function Ro(e5) {
|
|
2819
|
+
let t2 = lo({ builderQueryFunction: (t3) => Io(e5)(t3), typedQueryFunction: (t3, n3) => Lo(e5)(t3, n3), hasOptionsParameter: true });
|
|
2820
|
+
function n2(e6, n3) {
|
|
1700
2821
|
return t2(...arguments);
|
|
1701
2822
|
}
|
|
1702
2823
|
return n2;
|
|
1703
2824
|
}
|
|
1704
|
-
var
|
|
1705
|
-
var
|
|
1706
|
-
var
|
|
1707
|
-
function
|
|
1708
|
-
return
|
|
2825
|
+
var zo = Pt(Ro);
|
|
2826
|
+
var Bo = [{ path: `bookingsSettings.createdDate` }, { path: `bookingsSettings.updatedDate` }];
|
|
2827
|
+
var Vo = [{ path: `bookingsSettings.siteProperties.address.coordinates.latitude` }, { path: `bookingsSettings.siteProperties.address.coordinates.longitude` }];
|
|
2828
|
+
function Ho(e5) {
|
|
2829
|
+
return It(Object.assign(e5, { 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: `` }] } }));
|
|
1709
2830
|
}
|
|
1710
|
-
var
|
|
1711
|
-
function
|
|
2831
|
+
var Uo = `@wix/auto_sdk_bookings_bookings-settings`;
|
|
2832
|
+
function Wo(e5) {
|
|
1712
2833
|
function t2({ host: t3 }) {
|
|
1713
|
-
return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName:
|
|
2834
|
+
return { entityFqdn: `wix.bookings.v2.bookings_settings`, method: `GET`, methodFqn: `wix.bookings.settings.v2.BookingsSettingsService.GetBookingsSettings`, packageName: Uo, migrationOptions: { optInTransformResponse: true }, url: Ho({ protoPath: `/v2/settings`, data: e5, host: t3 }), params: Ft(e5), transformResponse: (e6) => N(e6, [{ transformFn: M, paths: Bo }, { transformFn: un, paths: Vo }]), fallback: [{ method: `GET`, url: Ho({ protoPath: `/v2/settings`, data: e5, host: t3 }), params: Ft(e5) }] };
|
|
1714
2835
|
}
|
|
1715
2836
|
return t2;
|
|
1716
2837
|
}
|
|
1717
|
-
var
|
|
1718
|
-
async function
|
|
1719
|
-
let { httpClient:
|
|
2838
|
+
var Go = ((e5) => (e5.BUSINESS_TIME_ZONE = `BUSINESS_TIME_ZONE`, e5.CUSTOMER_TIME_ZONE = `CUSTOMER_TIME_ZONE`, e5))(Go || {});
|
|
2839
|
+
async function Ko() {
|
|
2840
|
+
let { httpClient: e5, sideEffects: t2 } = arguments[0], n2 = Wo(A({}));
|
|
1720
2841
|
t2?.onSiteCall?.();
|
|
1721
2842
|
try {
|
|
1722
|
-
let r2 = await
|
|
2843
|
+
let r2 = await e5.request(n2);
|
|
1723
2844
|
return t2?.onSuccess?.(r2), j(r2.data)?.bookingsSettings;
|
|
1724
|
-
} catch (
|
|
1725
|
-
let n3 = P(
|
|
1726
|
-
throw t2?.onError?.(
|
|
2845
|
+
} catch (e6) {
|
|
2846
|
+
let n3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
|
|
2847
|
+
throw t2?.onError?.(e6), n3;
|
|
1727
2848
|
}
|
|
1728
2849
|
}
|
|
1729
|
-
function
|
|
1730
|
-
return () =>
|
|
2850
|
+
function qo(e5) {
|
|
2851
|
+
return () => Ko({ httpClient: e5 });
|
|
1731
2852
|
}
|
|
1732
|
-
var
|
|
1733
|
-
var
|
|
1734
|
-
var
|
|
1735
|
-
var
|
|
1736
|
-
function
|
|
1737
|
-
return
|
|
2853
|
+
var Jo = Pt(qo);
|
|
2854
|
+
var Yo = (e5) => e5 === jo.APPOINTMENT;
|
|
2855
|
+
var Xo = (e5) => e5.payment?.rateType === Mo.VARIED;
|
|
2856
|
+
var Zo = [`STAFF_MEMBER_DETAILS`, `STAFF_WORKING_HOURS_LOCATIONS`, `DISCOUNT_INFO_DETAILS`];
|
|
2857
|
+
function Qo() {
|
|
2858
|
+
return zo({ conditionalFields: Zo }).eq(`appId`, Ni).eq(`hidden`, false);
|
|
1738
2859
|
}
|
|
1739
|
-
async function
|
|
2860
|
+
async function $o({ limit: e5, offset: t2, categoryId: n2, locationId: r2, serviceIds: i2, categoryIds: a2 }) {
|
|
1740
2861
|
if (n2 && a2?.length && !a2.includes(n2)) return { services: [], hasMore: false, totalPages: 1 };
|
|
1741
|
-
let o2 =
|
|
1742
|
-
i2?.length && (o2 = o2.in(`_id`, i2)), n2 ? o2 = o2.eq(`category.id`, n2) : a2?.length && (o2 = o2.in(`category.id`, a2)), r2 === `OTHER_LOCATIONS` ? o2 = o2.hasSome(`locations.type`, [
|
|
2862
|
+
let o2 = Qo().limit(e5).skip(t2);
|
|
2863
|
+
i2?.length && (o2 = o2.in(`_id`, i2)), n2 ? o2 = o2.eq(`category.id`, n2) : a2?.length && (o2 = o2.in(`category.id`, a2)), r2 === `OTHER_LOCATIONS` ? o2 = o2.hasSome(`locations.type`, [No.CUSTOM, No.CUSTOMER]) : r2 && (o2 = o2.eq(`locations.business.id`, r2));
|
|
1743
2864
|
let s2 = await o2.find();
|
|
1744
2865
|
return { services: s2.items ?? [], hasMore: s2.hasNext(), totalPages: s2.totalPages ?? 1 };
|
|
1745
2866
|
}
|
|
1746
|
-
var
|
|
1747
|
-
function
|
|
1748
|
-
let n2 =
|
|
2867
|
+
var es = { category: `category`, location: `location`, page: `page`, blob: `b`, resource: `resource`, referral: `referral`, timezone: `timezone`, bookingId: `bookingId`, token: `token`, rescheduleRedirectUrl: `rescheduleRedirectUrl` };
|
|
2868
|
+
function ts(e5, t2) {
|
|
2869
|
+
let n2 = e5(t2);
|
|
1749
2870
|
return n2 ? n2.replace(/\/$/, ``) || `/` : null;
|
|
1750
2871
|
}
|
|
1751
|
-
function
|
|
1752
|
-
let r2 =
|
|
2872
|
+
function ns(e5, t2, n2) {
|
|
2873
|
+
let r2 = e5(t2);
|
|
1753
2874
|
return !r2 || !n2 ? null : `${r2.replace(/\/$/, ``)}/${n2}`;
|
|
1754
2875
|
}
|
|
1755
|
-
function
|
|
1756
|
-
switch (
|
|
2876
|
+
function rs(e5, t2) {
|
|
2877
|
+
switch (e5) {
|
|
1757
2878
|
case `servicePage`:
|
|
1758
|
-
return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ??
|
|
2879
|
+
return (t2.slug ? t2.buildCustomServiceUrl(t2.slug) : void 0) ?? ns(t2.appSectionUrl, W.SERVICE_PAGE, t2.slug);
|
|
1759
2880
|
case `bookingCalendar`:
|
|
1760
|
-
return t2.isMultiService ?
|
|
2881
|
+
return t2.isMultiService ? ts(t2.appSectionUrl, W.CALENDAR_PAGE) : ns(t2.appSectionUrl, W.CALENDAR_PAGE, t2.slug);
|
|
1761
2882
|
case `bookingForm`:
|
|
1762
|
-
return t2.serviceId ?
|
|
2883
|
+
return t2.serviceId ? ns(t2.appSectionUrl, W.FORM_PAGE, t2.slug) : null;
|
|
1763
2884
|
default:
|
|
1764
2885
|
return null;
|
|
1765
2886
|
}
|
|
1766
2887
|
}
|
|
1767
|
-
var
|
|
1768
|
-
var
|
|
1769
|
-
var
|
|
1770
|
-
var
|
|
1771
|
-
var
|
|
1772
|
-
let { previewMode:
|
|
1773
|
-
let i2 =
|
|
2888
|
+
var is = (e5) => e5.target === `_blank`;
|
|
2889
|
+
var as = (e5, t2) => t2 === `/` ? e5 : new URL(`.${t2}`, `${e5}/`).href;
|
|
2890
|
+
var os = (e5, t2, n2) => n2 ? `.${t2}` : ss(e5, t2);
|
|
2891
|
+
var ss = (e5, t2) => e5 ? as(e5, t2) : t2;
|
|
2892
|
+
var cs = () => {
|
|
2893
|
+
let { previewMode: e5 } = p(ki), t2 = p(vi), n2 = t2.siteUrl.replace(/\/$/, ``), { navigateTo: r2 } = p(ji), a2 = p(Mi), o2 = f(), s2 = i(async (t3) => {
|
|
2894
|
+
let i2 = os(n2, t3, e5);
|
|
1774
2895
|
await r2({ href: i2 });
|
|
1775
|
-
}, [
|
|
1776
|
-
await r2(
|
|
1777
|
-
}, [r2]), l2 = i((
|
|
1778
|
-
let r3 = m2(
|
|
1779
|
-
return r3 && n2 ?
|
|
1780
|
-
}, [m2, n2]),
|
|
1781
|
-
let n3 = m2(
|
|
2896
|
+
}, [e5, n2, r2]), c2 = i(async (e6) => {
|
|
2897
|
+
await r2(is(e6) ? { href: e6.href, type: `ExternalLink`, target: `_blank` } : { href: e6.href });
|
|
2898
|
+
}, [r2]), l2 = i((e6) => ss(n2, e6), [n2]), u2 = i((e6) => t2.appSectionRelativeUrl(Ni, e6), [t2]), d2 = i((e6) => Ra(a2.urlMappings, e6), [a2]), m2 = i((e6, t3) => rs(e6, { ...t3, appSectionUrl: u2, buildCustomServiceUrl: d2 }), [u2, d2]), h2 = i((e6, t3) => {
|
|
2899
|
+
let r3 = m2(e6, t3);
|
|
2900
|
+
return r3 && n2 ? as(n2, r3) : null;
|
|
2901
|
+
}, [m2, n2]), g2 = i((e6, t3) => {
|
|
2902
|
+
let n3 = m2(e6, t3);
|
|
1782
2903
|
n3 && s2(n3);
|
|
1783
|
-
}, [m2, s2]),
|
|
1784
|
-
return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl:
|
|
1785
|
-
let t3 =
|
|
1786
|
-
return t3 ? `${t3}/${
|
|
1787
|
-
}, [
|
|
1788
|
-
};
|
|
1789
|
-
var
|
|
1790
|
-
function
|
|
2904
|
+
}, [m2, s2]), _2 = i(() => u2(W.FORM_PAGE) || void 0, [u2]), v2 = i((e6) => Object.values(o2(Ai).pages).some((t3) => t3.appPageId === e6 && (!t3.appDefinitionId || t3.appDefinitionId === `1380b703-ce81-ff05-f115-39571d94dfcd`)) && t2.appSectionRelativeUrl(`1380b703-ce81-ff05-f115-39571d94dfcd`, e6) || void 0, [t2, o2]);
|
|
2905
|
+
return { navigate: s2, navigateToHref: c2, resolvePath: m2, toHref: l2, resolveAbsoluteUrl: h2, navigateTo: g2, getBookingFormPath: _2, getCartPagePath: i(() => v2(Pi), [v2]), getThankYouPagePath: i((e6) => {
|
|
2906
|
+
let t3 = v2(Fi);
|
|
2907
|
+
return t3 ? `${t3}/${e6}?origin=bookings` : void 0;
|
|
2908
|
+
}, [v2]) };
|
|
2909
|
+
};
|
|
2910
|
+
var ls = U(`@wix/site-service-warmup-data`);
|
|
2911
|
+
function us() {
|
|
1791
2912
|
try {
|
|
1792
2913
|
return f();
|
|
1793
2914
|
} catch {
|
|
1794
2915
|
return null;
|
|
1795
2916
|
}
|
|
1796
2917
|
}
|
|
1797
|
-
function
|
|
2918
|
+
function ds(e5) {
|
|
1798
2919
|
try {
|
|
1799
|
-
return
|
|
2920
|
+
return e5 ? e5(ls) : null;
|
|
1800
2921
|
} catch {
|
|
1801
2922
|
return null;
|
|
1802
2923
|
}
|
|
1803
2924
|
}
|
|
1804
|
-
function
|
|
1805
|
-
let
|
|
1806
|
-
return { scope:
|
|
1807
|
-
if (t2 || !
|
|
2925
|
+
function fs() {
|
|
2926
|
+
let e5 = ds(us()), t2 = typeof window > `u`;
|
|
2927
|
+
return { scope: e5 ?? void 0, get: async (n2) => {
|
|
2928
|
+
if (t2 || !e5) return null;
|
|
1808
2929
|
try {
|
|
1809
|
-
return await
|
|
1810
|
-
} catch (
|
|
1811
|
-
return
|
|
2930
|
+
return await e5.get(n2);
|
|
2931
|
+
} catch (e6) {
|
|
2932
|
+
return H(e6, { feature: V.warmup, action: `read`, level: `warning`, contexts: { warmup: { key: n2 } } }), null;
|
|
1812
2933
|
}
|
|
1813
2934
|
}, set: (n2, r2) => {
|
|
1814
|
-
if (t2 &&
|
|
1815
|
-
|
|
2935
|
+
if (t2 && e5) try {
|
|
2936
|
+
e5.set(n2, r2);
|
|
1816
2937
|
} catch {
|
|
1817
2938
|
}
|
|
1818
2939
|
} };
|
|
1819
2940
|
}
|
|
1820
|
-
var
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
2941
|
+
var ps = U(`@wix/site-service-locale`);
|
|
2942
|
+
var ms = U;
|
|
2943
|
+
var hs = ms(`@wix/viewer-service-multilingual`);
|
|
2944
|
+
function gs() {
|
|
2945
|
+
try {
|
|
2946
|
+
return si.getLanguage() ?? `en`;
|
|
2947
|
+
} catch {
|
|
2948
|
+
return `en`;
|
|
2949
|
+
}
|
|
1824
2950
|
}
|
|
1825
|
-
function
|
|
1826
|
-
|
|
2951
|
+
function _s(e5) {
|
|
2952
|
+
try {
|
|
2953
|
+
return p(e5);
|
|
2954
|
+
} catch {
|
|
2955
|
+
return null;
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2958
|
+
function vs() {
|
|
2959
|
+
let e5 = _s(ps), t2 = _s(hs);
|
|
2960
|
+
return t2?.multilingualEnabled && t2.currentLocale?.languageCode || e5?.language || gs();
|
|
2961
|
+
}
|
|
2962
|
+
var ys = `bookings-uou`;
|
|
2963
|
+
function bs(e5, t2, n2, r2, i2, a2 = [], o2 = []) {
|
|
2964
|
+
let s2 = a2.length ? `:ids-${encodeURIComponent(JSON.stringify([...a2].sort()))}` : ``, c2 = o2.length ? `:cats-${encodeURIComponent(JSON.stringify([...o2].sort()))}` : ``;
|
|
2965
|
+
return `${ys}:${e5}:services:${t2 ?? `all`}:${n2 ?? `all`}:page-${r2}:limit-${i2}${s2}${c2}`;
|
|
1827
2966
|
}
|
|
1828
|
-
function
|
|
1829
|
-
return `${
|
|
2967
|
+
function xs(e5, t2, n2) {
|
|
2968
|
+
return `${ys}:${e5}:services-variants:ids-${encodeURIComponent(JSON.stringify([...t2].sort()))}:refresh-${n2}`;
|
|
1830
2969
|
}
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
var
|
|
1835
|
-
|
|
2970
|
+
function Ss() {
|
|
2971
|
+
return `${ys}:bookings-settings`;
|
|
2972
|
+
}
|
|
2973
|
+
var Cs = 5e3;
|
|
2974
|
+
var ws = 100;
|
|
2975
|
+
var Ts = `wix-warmup-data`;
|
|
2976
|
+
var Es = null;
|
|
2977
|
+
function Ds(e5) {
|
|
1836
2978
|
if (typeof document < `u`) try {
|
|
1837
|
-
let t2 = document.getElementById(
|
|
1838
|
-
return t2 ? (
|
|
2979
|
+
let t2 = document.getElementById(Ts)?.textContent;
|
|
2980
|
+
return t2 ? (Es?.text !== t2 && (Es = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Es.data[e5] ?? void 0) : void 0;
|
|
1839
2981
|
} catch {
|
|
1840
2982
|
return;
|
|
1841
2983
|
}
|
|
1842
2984
|
}
|
|
1843
|
-
var
|
|
1844
|
-
var
|
|
1845
|
-
var
|
|
1846
|
-
var
|
|
1847
|
-
function
|
|
1848
|
-
if (!
|
|
1849
|
-
let t2 =
|
|
1850
|
-
return t2 || (t2 =
|
|
2985
|
+
var Os = () => ({ promises: /* @__PURE__ */ new Map(), invalidatedWarmup: /* @__PURE__ */ new Set() });
|
|
2986
|
+
var ks = Os();
|
|
2987
|
+
var As = /* @__PURE__ */ new WeakMap();
|
|
2988
|
+
var js = /* @__PURE__ */ new WeakMap();
|
|
2989
|
+
function Ms(e5) {
|
|
2990
|
+
if (!e5) return ks;
|
|
2991
|
+
let t2 = As.get(e5);
|
|
2992
|
+
return t2 || (t2 = Os(), As.set(e5, t2)), t2;
|
|
1851
2993
|
}
|
|
1852
|
-
function
|
|
1853
|
-
if (
|
|
2994
|
+
function Ns({ key: e5, warmupData: t2, fetchData: n2, refresh: r2 = false }) {
|
|
2995
|
+
if (e5 === null) return n2();
|
|
1854
2996
|
if (typeof window > `u`) {
|
|
1855
|
-
let r3 = () => n2().then((n3) => (t2.set(
|
|
2997
|
+
let r3 = () => n2().then((n3) => (t2.set(e5, n3), n3)), { scope: i3 } = t2;
|
|
1856
2998
|
if (!i3) return r3();
|
|
1857
|
-
let a3 =
|
|
1858
|
-
a3 || (a3 = /* @__PURE__ */ new Map(),
|
|
1859
|
-
let o3 = a3.get(
|
|
2999
|
+
let a3 = js.get(i3);
|
|
3000
|
+
a3 || (a3 = /* @__PURE__ */ new Map(), js.set(i3, a3));
|
|
3001
|
+
let o3 = a3.get(e5);
|
|
1860
3002
|
if (o3) return o3;
|
|
1861
3003
|
let s3 = r3();
|
|
1862
|
-
return a3.set(
|
|
3004
|
+
return a3.set(e5, s3), s3.catch(() => a3.delete(e5)), s3;
|
|
1863
3005
|
}
|
|
1864
|
-
let i2 =
|
|
1865
|
-
for (let [
|
|
1866
|
-
let o2 = i2.promises.get(
|
|
3006
|
+
let i2 = Ms(t2.scope), a2 = Date.now();
|
|
3007
|
+
for (let [e6, t3] of i2.promises) t3.expiresAt <= a2 && i2.promises.delete(e6);
|
|
3008
|
+
let o2 = i2.promises.get(e5);
|
|
1867
3009
|
if (o2 && !r2) return o2.promise;
|
|
1868
|
-
r2 && i2.invalidatedWarmup.add(
|
|
1869
|
-
let s2 = !i2.invalidatedWarmup.has(
|
|
3010
|
+
r2 && i2.invalidatedWarmup.add(e5);
|
|
3011
|
+
let s2 = !i2.invalidatedWarmup.has(e5);
|
|
1870
3012
|
if (s2) {
|
|
1871
|
-
let t3 =
|
|
3013
|
+
let t3 = Ds(e5);
|
|
1872
3014
|
if (t3 !== void 0) {
|
|
1873
|
-
let n3 =
|
|
1874
|
-
return i2.promises.set(
|
|
3015
|
+
let n3 = hi(t3);
|
|
3016
|
+
return i2.promises.set(e5, { promise: n3, expiresAt: a2 + Cs }), n3;
|
|
1875
3017
|
}
|
|
1876
3018
|
}
|
|
1877
3019
|
let c2 = (async () => {
|
|
1878
3020
|
if (s2) {
|
|
1879
|
-
let n3 = await t2.get(
|
|
3021
|
+
let n3 = await t2.get(e5);
|
|
1880
3022
|
if (n3 != null) return n3;
|
|
1881
3023
|
}
|
|
1882
3024
|
return n2();
|
|
1883
3025
|
})();
|
|
1884
|
-
i2.promises.size >=
|
|
3026
|
+
i2.promises.size >= ws && i2.promises.delete(i2.promises.keys().next().value);
|
|
1885
3027
|
let l2 = { promise: c2, expiresAt: 1 / 0 };
|
|
1886
|
-
return i2.promises.set(
|
|
1887
|
-
l2.expiresAt = Date.now() +
|
|
3028
|
+
return i2.promises.set(e5, l2), c2.then(() => {
|
|
3029
|
+
l2.expiresAt = Date.now() + Cs;
|
|
1888
3030
|
}, () => {
|
|
1889
|
-
i2.promises.get(
|
|
3031
|
+
i2.promises.get(e5) === l2 && i2.promises.delete(e5);
|
|
1890
3032
|
}), c2;
|
|
1891
3033
|
}
|
|
1892
|
-
var
|
|
1893
|
-
async function
|
|
1894
|
-
if (
|
|
3034
|
+
var Ps = 100;
|
|
3035
|
+
async function Fs(e5) {
|
|
3036
|
+
if (e5.length === 0) return {};
|
|
1895
3037
|
let t2 = [];
|
|
1896
|
-
for (let n3 = 0; n3 <
|
|
1897
|
-
let n2 = await Promise.all(t2.map((
|
|
1898
|
-
for (let
|
|
3038
|
+
for (let n3 = 0; n3 < e5.length; n3 += Ps) t2.push(e5.slice(n3, n3 + Ps));
|
|
3039
|
+
let n2 = await Promise.all(t2.map((e6) => xo().in(`serviceId`, e6).limit(Ps).find())), r2 = {};
|
|
3040
|
+
for (let e6 of n2.flatMap((e7) => e7.items ?? [])) e6.serviceId && (r2[e6.serviceId] = e6);
|
|
1899
3041
|
return r2;
|
|
1900
3042
|
}
|
|
1901
|
-
var
|
|
1902
|
-
var
|
|
1903
|
-
let { SSR:
|
|
1904
|
-
return { isSSR: () =>
|
|
3043
|
+
var Is = U(`@wix/site-service-rendering-context`);
|
|
3044
|
+
var Ls = () => {
|
|
3045
|
+
let { SSR: e5 } = p(Is);
|
|
3046
|
+
return { isSSR: () => e5 };
|
|
1905
3047
|
};
|
|
1906
|
-
var
|
|
1907
|
-
function
|
|
1908
|
-
return { evid: 1222, src: 16, endpoint: ``, params:
|
|
1909
|
-
}
|
|
1910
|
-
function
|
|
1911
|
-
return { evid: 32, src: 16, endpoint: ``, params:
|
|
1912
|
-
}
|
|
1913
|
-
var
|
|
1914
|
-
var
|
|
1915
|
-
var
|
|
1916
|
-
var
|
|
1917
|
-
var
|
|
1918
|
-
let { reportBi: t2 } = p(
|
|
3048
|
+
var Rs = ms(`@wix/site-service-business-logger`);
|
|
3049
|
+
function zs(e5) {
|
|
3050
|
+
return { evid: 1222, src: 16, endpoint: ``, params: e5 };
|
|
3051
|
+
}
|
|
3052
|
+
function Bs(e5) {
|
|
3053
|
+
return { evid: 32, src: 16, endpoint: ``, params: e5 };
|
|
3054
|
+
}
|
|
3055
|
+
var Vs = { 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` };
|
|
3056
|
+
var Hs = W.BOOK_ONLINE;
|
|
3057
|
+
var Us = `new_bookings_server`;
|
|
3058
|
+
var Ws = `load more`;
|
|
3059
|
+
var Gs = (e5) => {
|
|
3060
|
+
let { reportBi: t2 } = p(Rs);
|
|
1919
3061
|
return i((n2) => {
|
|
1920
|
-
t2({ widget_name:
|
|
1921
|
-
}, [t2,
|
|
3062
|
+
t2({ widget_name: e5, bookingsPlatform: Us, is_over_editor: false, ...n2.params, src: n2.src, evid: n2.evid }, { endpoint: n2.endpoint });
|
|
3063
|
+
}, [t2, e5]);
|
|
1922
3064
|
};
|
|
1923
|
-
function
|
|
1924
|
-
return { evid: 540, src: 16, endpoint: `wixboost-ugc`, params:
|
|
3065
|
+
function Ks(e5) {
|
|
3066
|
+
return { evid: 540, src: 16, endpoint: `wixboost-ugc`, params: e5 };
|
|
1925
3067
|
}
|
|
1926
|
-
var
|
|
1927
|
-
function
|
|
1928
|
-
let
|
|
3068
|
+
var qs = U(`seo/seo-service`);
|
|
3069
|
+
function Js() {
|
|
3070
|
+
let e5 = f();
|
|
1929
3071
|
try {
|
|
1930
|
-
return
|
|
3072
|
+
return e5(qs);
|
|
1931
3073
|
} catch {
|
|
1932
3074
|
return null;
|
|
1933
3075
|
}
|
|
1934
3076
|
}
|
|
1935
|
-
function
|
|
1936
|
-
let
|
|
1937
|
-
return { resolved: !!
|
|
1938
|
-
if (!
|
|
1939
|
-
let n2 = (
|
|
3077
|
+
function Ys() {
|
|
3078
|
+
let e5 = Js();
|
|
3079
|
+
return { resolved: !!e5, send: (t2) => {
|
|
3080
|
+
if (!e5) return Promise.resolve(`unavailable`);
|
|
3081
|
+
let n2 = (e6) => H(e6, { feature: V.seo, action: `send-seo-entity`, level: `warning`, contexts: { seo: { itemType: t2.itemType } } });
|
|
1940
3082
|
try {
|
|
1941
|
-
return
|
|
1942
|
-
} catch (
|
|
1943
|
-
return n2(
|
|
3083
|
+
return e5.setSeoEntity(t2).then(() => `sent`).catch((e6) => (n2(e6), `failed`));
|
|
3084
|
+
} catch (e6) {
|
|
3085
|
+
return n2(e6), Promise.resolve(`failed`);
|
|
1944
3086
|
}
|
|
1945
3087
|
} };
|
|
1946
3088
|
}
|
|
1947
|
-
var
|
|
1948
|
-
var
|
|
1949
|
-
function
|
|
1950
|
-
return { itemType:
|
|
3089
|
+
var Xs = `SERVICES_COMPONENT`;
|
|
3090
|
+
var Zs = `PAGINATED_COMPONENT`;
|
|
3091
|
+
function Qs(e5, t2, n2) {
|
|
3092
|
+
return { itemType: Xs, itemData: { services: e5.map((e6) => ({ ...e6, urls: { servicePage: { url: t2(e6) ?? `` } } })), pagination: n2 } };
|
|
1951
3093
|
}
|
|
1952
|
-
function
|
|
1953
|
-
return { itemType:
|
|
3094
|
+
function $s(e5) {
|
|
3095
|
+
return { itemType: Zs, itemData: { pagination: e5 } };
|
|
1954
3096
|
}
|
|
1955
|
-
var
|
|
1956
|
-
function
|
|
1957
|
-
let { services: r2, totalPages: i2 } =
|
|
3097
|
+
var ec = /* @__PURE__ */ new WeakSet();
|
|
3098
|
+
function tc({ servicesPromise: e5, currentPage: t2, pageQueryParam: n2 }) {
|
|
3099
|
+
let { services: r2, totalPages: i2 } = mi(e5), { resolveAbsoluteUrl: a2 } = cs(), { send: o2 } = Ys();
|
|
1958
3100
|
return u(() => {
|
|
1959
|
-
if (
|
|
1960
|
-
|
|
3101
|
+
if (ec.has(e5)) return true;
|
|
3102
|
+
ec.add(e5);
|
|
1961
3103
|
let s2 = { currentPage: t2, totalPages: i2, queryParam: n2 };
|
|
1962
|
-
return o2(
|
|
3104
|
+
return o2(Qs(r2, (e6) => a2(`servicePage`, { slug: e6.mainSlug?.name ?? null, serviceId: e6._id ?? null }), s2)), i2 > 1 && o2($s(s2)), true;
|
|
1963
3105
|
}), null;
|
|
1964
3106
|
}
|
|
1965
|
-
function
|
|
1966
|
-
return
|
|
3107
|
+
function nc(e5) {
|
|
3108
|
+
return It(Object.assign(e5, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/events-3`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }, { srcPath: `/_api/calendar/v3/ro/events`, destPath: `/v3/events` }], "www.wixapis.com": [{ srcPath: `/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], _: [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "*.dev.wix-code.com": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "editor._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "blocks._base_domain_": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }], "create.editorx": [{ srcPath: `/_api/calendar/v3/events`, destPath: `/v3/events` }, { srcPath: `/_api/calendar/v3/bulk/events`, destPath: `/v3/bulk/events` }] } }));
|
|
1967
3109
|
}
|
|
1968
|
-
var
|
|
1969
|
-
function
|
|
3110
|
+
var rc = `@wix/auto_sdk_calendar_events`;
|
|
3111
|
+
function ic(e5) {
|
|
1970
3112
|
function t2({ host: t3 }) {
|
|
1971
|
-
return { entityFqdn: `wix.calendar.v3.event`, method: `POST`, methodFqn: `wix.calendar.events.v3.EventsService.QueryEvents`, packageName:
|
|
3113
|
+
return { entityFqdn: `wix.calendar.v3.event`, method: `POST`, methodFqn: `wix.calendar.events.v3.EventsService.QueryEvents`, packageName: rc, migrationOptions: { optInTransformResponse: true }, url: nc({ protoPath: `/v3/events/query`, data: e5, host: t3 }), data: e5, transformResponse: (e6) => N(e6, [{ transformFn: M, paths: [{ path: `events.createdDate` }, { path: `events.updatedDate` }, { path: `events.start.utcDate` }, { path: `events.end.utcDate` }, { path: `events.adjustedStart.utcDate` }, { path: `events.adjustedEnd.utcDate` }, { path: `events.recurrenceRule.until.utcDate` }, { path: `events.recurrenceRule.adjustedUntil.utcDate` }] }]) };
|
|
1972
3114
|
}
|
|
1973
3115
|
return t2;
|
|
1974
3116
|
}
|
|
1975
|
-
function
|
|
3117
|
+
function ac(e5) {
|
|
1976
3118
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
1977
|
-
return
|
|
1978
|
-
let i2 =
|
|
3119
|
+
return Ja({ func: async (r2) => {
|
|
3120
|
+
let i2 = ic({ ...r2, ...e5 ?? {} });
|
|
1979
3121
|
n2?.onSiteCall?.();
|
|
1980
3122
|
try {
|
|
1981
|
-
let
|
|
1982
|
-
return n2?.onSuccess?.(
|
|
1983
|
-
} catch (
|
|
1984
|
-
throw n2?.onError?.(
|
|
3123
|
+
let e6 = await t2.request(i2);
|
|
3124
|
+
return n2?.onSuccess?.(e6), e6;
|
|
3125
|
+
} catch (e6) {
|
|
3126
|
+
throw n2?.onError?.(e6), e6;
|
|
1985
3127
|
}
|
|
1986
3128
|
}, requestTransformer: (t3) => {
|
|
1987
|
-
let n3 = [t3,
|
|
3129
|
+
let n3 = [t3, e5];
|
|
1988
3130
|
return A({ ...n3?.[1], query: n3?.[0] });
|
|
1989
|
-
}, responseTransformer: ({ data:
|
|
1990
|
-
let t3 = j(N(
|
|
3131
|
+
}, responseTransformer: ({ data: e6 }) => {
|
|
3132
|
+
let t3 = j(N(e6, []));
|
|
1991
3133
|
return { items: t3?.events, pagingMetadata: t3?.pagingMetadata };
|
|
1992
|
-
}, errorTransformer: (
|
|
1993
|
-
throw P(
|
|
3134
|
+
}, errorTransformer: (e6) => {
|
|
3135
|
+
throw P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
1994
3136
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
1995
3137
|
}
|
|
1996
|
-
async function
|
|
1997
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3138
|
+
async function oc(e5, t2) {
|
|
3139
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = ic(A({ query: e5, ...t2 }));
|
|
1998
3140
|
r2?.onSiteCall?.();
|
|
1999
3141
|
try {
|
|
2000
|
-
let
|
|
2001
|
-
return r2?.onSuccess?.(
|
|
2002
|
-
} catch (
|
|
2003
|
-
let t3 = P(
|
|
2004
|
-
throw r2?.onError?.(
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
({
|
|
2008
|
-
function
|
|
2009
|
-
return (t2) =>
|
|
2010
|
-
}
|
|
2011
|
-
function
|
|
2012
|
-
return (t2, n2) =>
|
|
2013
|
-
}
|
|
2014
|
-
var
|
|
2015
|
-
var
|
|
2016
|
-
var
|
|
2017
|
-
var
|
|
2018
|
-
function
|
|
2019
|
-
let t2 =
|
|
2020
|
-
function n2(
|
|
3142
|
+
let e6 = await n2.request(i2);
|
|
3143
|
+
return r2?.onSuccess?.(e6), j(e6.data);
|
|
3144
|
+
} catch (e6) {
|
|
3145
|
+
let t3 = P(e6, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
3146
|
+
throw r2?.onError?.(e6), t3;
|
|
3147
|
+
}
|
|
3148
|
+
}
|
|
3149
|
+
({ ...$a() });
|
|
3150
|
+
function sc(e5) {
|
|
3151
|
+
return (t2) => ac(t2, { httpClient: e5 });
|
|
3152
|
+
}
|
|
3153
|
+
function cc(e5) {
|
|
3154
|
+
return (t2, n2) => oc(t2, n2, { httpClient: e5 });
|
|
3155
|
+
}
|
|
3156
|
+
var lc = _(`wix.calendar.v3.event_cancelled`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `data.event.createdDate` }, { path: `data.event.updatedDate` }, { path: `data.event.start.utcDate` }, { path: `data.event.end.utcDate` }, { path: `data.event.adjustedStart.utcDate` }, { path: `data.event.adjustedEnd.utcDate` }, { path: `data.event.recurrenceRule.until.utcDate` }, { path: `data.event.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
|
|
3157
|
+
var uc = _(`wix.calendar.v3.event_created`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
|
|
3158
|
+
var dc = _(`wix.calendar.v3.event_recurring_split`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `data.updatedRecurringEventEndingBeforeSplit.createdDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.updatedDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.start.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.end.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate` }, { path: `data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.createdDate` }, { path: `data.newRecurringEventStartingFromSplit.updatedDate` }, { path: `data.newRecurringEventStartingFromSplit.start.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.end.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedStart.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.adjustedEnd.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate` }, { path: `data.newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }] }])))();
|
|
3159
|
+
var fc = _(`wix.calendar.v3.event_updated`, true, (e5) => j(N(e5, [{ transformFn: M, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.start.utcDate` }, { path: `entity.end.utcDate` }, { path: `entity.adjustedStart.utcDate` }, { path: `entity.adjustedEnd.utcDate` }, { path: `entity.recurrenceRule.until.utcDate` }, { path: `entity.recurrenceRule.adjustedUntil.utcDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.start.utcDate` }, { path: `modifiedFields.end.utcDate` }, { path: `modifiedFields.adjustedStart.utcDate` }, { path: `modifiedFields.adjustedEnd.utcDate` }, { path: `modifiedFields.recurrenceRule.until.utcDate` }, { path: `modifiedFields.recurrenceRule.adjustedUntil.utcDate` }] }])))();
|
|
3160
|
+
function pc(e5) {
|
|
3161
|
+
let t2 = lo({ builderQueryFunction: (t3) => sc(e5)(t3), typedQueryFunction: (t3, n3) => cc(e5)(t3, n3), hasOptionsParameter: true });
|
|
3162
|
+
function n2(e6, n3) {
|
|
2021
3163
|
return t2(...arguments);
|
|
2022
3164
|
}
|
|
2023
3165
|
return n2;
|
|
2024
3166
|
}
|
|
2025
|
-
var
|
|
2026
|
-
|
|
2027
|
-
var
|
|
2028
|
-
let t2 = (
|
|
2029
|
-
return `${
|
|
3167
|
+
var mc = Pt(pc);
|
|
3168
|
+
ln(lc), ln(uc), ln(dc), ln(fc);
|
|
3169
|
+
var hc = (e5) => {
|
|
3170
|
+
let t2 = (e6) => e6 < 10 ? `0${e6}` : `${e6}`;
|
|
3171
|
+
return `${e5.getFullYear()}-${t2(e5.getMonth() + 1)}-${t2(e5.getDate())}`;
|
|
2030
3172
|
};
|
|
2031
|
-
var
|
|
2032
|
-
var
|
|
2033
|
-
async function
|
|
3173
|
+
var gc = (e5) => `${hc(e5)}T00:00:00`;
|
|
3174
|
+
var _c = 1e3;
|
|
3175
|
+
async function vc(e5, t2) {
|
|
2034
3176
|
let n2 = [], r2;
|
|
2035
3177
|
do {
|
|
2036
|
-
let i2 = await
|
|
3178
|
+
let i2 = await mc({ filter: e5, cursorPaging: { limit: _c, ...r2 ? { cursor: r2 } : {} } }, t2);
|
|
2037
3179
|
n2.push(...i2.events ?? []), r2 = i2.pagingMetadata?.hasNext ? i2.pagingMetadata.cursors?.next ?? void 0 : void 0;
|
|
2038
3180
|
} while (r2);
|
|
2039
3181
|
return n2;
|
|
2040
3182
|
}
|
|
2041
|
-
async function
|
|
2042
|
-
return
|
|
3183
|
+
async function yc(e5, t2) {
|
|
3184
|
+
return e5.length === 0 ? [] : vc({ appId: Ni, scheduleId: { $in: e5 } }, { recurrenceType: [`MASTER`, `NONE`], fromLocalDate: gc(/* @__PURE__ */ new Date()), ...t2 ? { timeZone: t2 } : {} });
|
|
2043
3185
|
}
|
|
2044
|
-
function
|
|
3186
|
+
function bc(e5) {
|
|
2045
3187
|
let t2 = {};
|
|
2046
|
-
for (let n2 of
|
|
3188
|
+
for (let n2 of e5) n2.scheduleId && (t2[n2.scheduleId] ??= []).push(n2);
|
|
2047
3189
|
return t2;
|
|
2048
3190
|
}
|
|
2049
|
-
var
|
|
2050
|
-
async function
|
|
3191
|
+
var xc = { displayTimeZonePolicy: { basedOn: Go.BUSINESS_TIME_ZONE, customerCanChange: false }, multiServiceAppointmentsEnabled: false };
|
|
3192
|
+
async function Sc() {
|
|
2051
3193
|
try {
|
|
2052
|
-
let
|
|
2053
|
-
return { displayTimeZonePolicy: { basedOn:
|
|
2054
|
-
} catch (
|
|
2055
|
-
return
|
|
3194
|
+
let e5 = await Jo();
|
|
3195
|
+
return { displayTimeZonePolicy: { basedOn: e5.displayTimeZone?.basedOn ?? Go.BUSINESS_TIME_ZONE, customerCanChange: e5.displayTimeZone?.customerCanChange ?? false }, multiServiceAppointmentsEnabled: e5.multiServiceAppointments?.enabled ?? false };
|
|
3196
|
+
} catch (e5) {
|
|
3197
|
+
return H(e5, { feature: V.bookingsSettings, action: `fetch-bookings-settings`, level: `warning` }), xc;
|
|
2056
3198
|
}
|
|
2057
3199
|
}
|
|
2058
3200
|
n(null);
|
|
2059
|
-
function
|
|
2060
|
-
return
|
|
3201
|
+
function Cc(e5) {
|
|
3202
|
+
return e5.basedOn === Go.CUSTOMER_TIME_ZONE ? Intl.DateTimeFormat().resolvedOptions().timeZone : void 0;
|
|
2061
3203
|
}
|
|
2062
|
-
function
|
|
2063
|
-
let o2 = { serviceItems: n2, bookingsSettings: null, hasMore: false, isLoading: r2, hasError: i2, categoryId:
|
|
3204
|
+
function wc({ categoryId: e5, locationId: t2, serviceItems: n2, isLoading: r2, hasError: i2, children: a2 }) {
|
|
3205
|
+
let o2 = { serviceItems: n2, bookingsSettings: null, hasMore: false, isLoading: r2, hasError: i2, categoryId: e5, locationId: t2, loadMore: async () => {
|
|
2064
3206
|
} };
|
|
2065
|
-
return m(
|
|
2066
|
-
}
|
|
2067
|
-
function
|
|
2068
|
-
return m(
|
|
2069
|
-
}
|
|
2070
|
-
function
|
|
2071
|
-
return m(
|
|
2072
|
-
}
|
|
2073
|
-
function
|
|
2074
|
-
let t2 =
|
|
2075
|
-
return [...new Set(t2.filter((
|
|
2076
|
-
}
|
|
2077
|
-
function $(
|
|
2078
|
-
return
|
|
2079
|
-
}
|
|
2080
|
-
var
|
|
2081
|
-
var
|
|
2082
|
-
var
|
|
2083
|
-
var
|
|
2084
|
-
var
|
|
2085
|
-
var
|
|
2086
|
-
function
|
|
2087
|
-
return Object.keys(t2).length === 0 ?
|
|
2088
|
-
}
|
|
2089
|
-
function
|
|
2090
|
-
let
|
|
2091
|
-
return Promise.all([
|
|
2092
|
-
}
|
|
2093
|
-
var
|
|
2094
|
-
function
|
|
2095
|
-
let t2 = Math.floor(Number(
|
|
2096
|
-
return !
|
|
2097
|
-
}
|
|
2098
|
-
var
|
|
2099
|
-
var
|
|
2100
|
-
function
|
|
2101
|
-
let
|
|
2102
|
-
if (!
|
|
2103
|
-
return
|
|
2104
|
-
}
|
|
2105
|
-
function
|
|
2106
|
-
return { firstPage:
|
|
2107
|
-
}
|
|
2108
|
-
function
|
|
2109
|
-
let { firstPagePromise: f2, safeLimit: p2, serviceIdsKey:
|
|
2110
|
-
|
|
2111
|
-
let { cursor:
|
|
2112
|
-
s(() => (
|
|
2113
|
-
|
|
2114
|
-
}), [
|
|
2115
|
-
let
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
}, [
|
|
2119
|
-
let
|
|
2120
|
-
return
|
|
2121
|
-
|
|
2122
|
-
|
|
3207
|
+
return m(Rc.Provider, { value: o2, children: a2 });
|
|
3208
|
+
}
|
|
3209
|
+
function Tc({ categoryId: e5, locationId: t2, children: n2 }) {
|
|
3210
|
+
return m(wc, { categoryId: e5, locationId: t2, serviceItems: [], isLoading: true, hasError: false, children: n2 });
|
|
3211
|
+
}
|
|
3212
|
+
function Ec({ categoryId: e5, locationId: t2, children: n2 }) {
|
|
3213
|
+
return m(wc, { categoryId: e5, locationId: t2, serviceItems: [], isLoading: false, hasError: true, children: n2 });
|
|
3214
|
+
}
|
|
3215
|
+
function Dc(e5) {
|
|
3216
|
+
let t2 = e5?.$in ?? (e5?.$eq == null ? [] : [e5.$eq]);
|
|
3217
|
+
return [...new Set(t2.filter((e6) => typeof e6 == `string` && e6 !== ``))].sort().join(`,`);
|
|
3218
|
+
}
|
|
3219
|
+
function $(e5) {
|
|
3220
|
+
return e5 ? e5.split(`,`) : null;
|
|
3221
|
+
}
|
|
3222
|
+
var Oc = 20;
|
|
3223
|
+
var kc = 100;
|
|
3224
|
+
var Ac = [];
|
|
3225
|
+
var jc = [];
|
|
3226
|
+
var Mc = {};
|
|
3227
|
+
var Nc = {};
|
|
3228
|
+
function Pc(e5, t2) {
|
|
3229
|
+
return Object.keys(t2).length === 0 ? e5 : { ...e5, ...t2 };
|
|
3230
|
+
}
|
|
3231
|
+
function Fc(e5, t2, n2, r2, i2) {
|
|
3232
|
+
let a2 = [...new Set(e5.filter((e6) => !Yo(e6.type)).map((e6) => e6.schedule?._id).filter((e6) => !!e6))], o2 = e5.filter(Xo).map((e6) => e6._id).filter((e6) => !!e6);
|
|
3233
|
+
return Promise.all([a2.length === 0 ? Mc : yc(a2, t2).then(bc).catch(() => Mc), o2.length === 0 ? Nc : Ns({ key: xs(r2, o2, n2), warmupData: i2, fetchData: () => Fs(o2) }).catch((e6) => (H(e6, { feature: V.services, action: `fetch-service-variants`, level: `warning` }), null))]);
|
|
3234
|
+
}
|
|
3235
|
+
var Ic = { services: [], hasMore: false, totalPages: 1, hasError: true };
|
|
3236
|
+
function Lc(e5) {
|
|
3237
|
+
let t2 = Math.floor(Number(e5));
|
|
3238
|
+
return !e5 || !Number.isSafeInteger(t2) || t2 < 1 ? 1 : t2;
|
|
3239
|
+
}
|
|
3240
|
+
var Rc = n(null);
|
|
3241
|
+
var zc = `useServicesContext must be used within ServicesContextProvider`;
|
|
3242
|
+
function Bc() {
|
|
3243
|
+
let e5 = a(Rc);
|
|
3244
|
+
if (!e5) throw Error(zc);
|
|
3245
|
+
return e5;
|
|
3246
|
+
}
|
|
3247
|
+
function Vc(e5, t2) {
|
|
3248
|
+
return { firstPage: e5, services: e5.services, hasMore: e5.hasMore, isLoadingMore: false, cursor: { offset: (t2.paginationIndex - 1) * t2.safeLimit + e5.services.length, hasMore: e5.hasMore, pending: null, dropped: false } };
|
|
3249
|
+
}
|
|
3250
|
+
function Hc({ query: e5, isQueryPending: t2, settingsPromise: n2, categoryId: a2, locationId: o2, children: d2 }) {
|
|
3251
|
+
let { firstPagePromise: f2, safeLimit: p2, serviceIdsKey: h2, categoryIdsKey: g2, refreshSignal: _2, language: v2 } = e5, y2 = mi(f2), b2 = mi(n2), [x2, S2] = u(() => Vc(y2, e5)), [ee2, C2] = u({}), [w2, T2] = u({});
|
|
3252
|
+
x2.firstPage !== y2 && (S2(Vc(y2, e5)), C2({}), T2({}));
|
|
3253
|
+
let { cursor: E2 } = x2;
|
|
3254
|
+
s(() => (E2.dropped = false, () => {
|
|
3255
|
+
E2.dropped = true;
|
|
3256
|
+
}), [E2]);
|
|
3257
|
+
let D2 = Cc(b2.displayTimeZonePolicy), O2 = Gs(Vs.SERVICES), { getParsedUrl: te2 } = Oi(), ne2 = l(null), re2 = fs(), ie2 = l(re2);
|
|
3258
|
+
ie2.current = re2, s(() => {
|
|
3259
|
+
ne2.current !== y2 && (ne2.current = y2, O2(Bs({ referralInfo: te2().searchParams.get(es.referral) ?? void 0 })), O2(Ks({ numOfServices: y2.services.length })));
|
|
3260
|
+
}, [O2, te2, y2]), s(() => {
|
|
3261
|
+
let e6 = false;
|
|
3262
|
+
return Fc(y2.services, D2, _2, v2, ie2.current).then(([t3, n3]) => {
|
|
3263
|
+
e6 || r(() => {
|
|
3264
|
+
C2((e7) => Pc(e7, t3)), n3 && T2((e7) => Pc(e7, n3));
|
|
2123
3265
|
});
|
|
2124
3266
|
}), () => {
|
|
2125
|
-
|
|
3267
|
+
e6 = true;
|
|
2126
3268
|
};
|
|
2127
|
-
}, [
|
|
3269
|
+
}, [y2.services, D2, _2, v2]);
|
|
2128
3270
|
let ae2 = i(async () => {
|
|
2129
|
-
if (
|
|
2130
|
-
if (!
|
|
2131
|
-
let t3 = (
|
|
2132
|
-
return t3((
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
3271
|
+
if (O2(zs({ pageName: Hs, buttonName: Ws })), E2.pending) return E2.pending;
|
|
3272
|
+
if (!E2.hasMore) return;
|
|
3273
|
+
let t3 = (e6) => S2((t4) => t4.cursor === E2 ? e6(t4) : t4);
|
|
3274
|
+
return t3((e6) => ({ ...e6, isLoadingMore: true })), E2.pending = $o({ limit: p2, offset: E2.offset, categoryId: e5.categoryId, locationId: e5.locationId, serviceIds: $(h2), categoryIds: $(g2) }).then((e6) => {
|
|
3275
|
+
E2.dropped || (E2.hasMore = e6.hasMore, E2.offset += e6.services.length, t3((t4) => ({ ...t4, services: [...t4.services, ...e6.services], hasMore: e6.hasMore })), Fc(e6.services, D2, _2, v2, ie2.current).then(([e7, t4]) => {
|
|
3276
|
+
E2.dropped || r(() => {
|
|
3277
|
+
C2((t5) => Pc(t5, e7)), t4 && T2((e8) => Pc(e8, t4));
|
|
2136
3278
|
});
|
|
2137
3279
|
}));
|
|
2138
3280
|
}).catch(() => {
|
|
2139
3281
|
}).finally(() => {
|
|
2140
|
-
|
|
2141
|
-
}),
|
|
2142
|
-
}, [
|
|
2143
|
-
let t3 =
|
|
2144
|
-
return { serviceId:
|
|
2145
|
-
}), [
|
|
2146
|
-
return m(
|
|
2147
|
-
}
|
|
2148
|
-
var
|
|
2149
|
-
var
|
|
2150
|
-
function
|
|
2151
|
-
let l2 = Math.min(n2 ??
|
|
2152
|
-
return m(
|
|
2153
|
-
}
|
|
2154
|
-
var
|
|
3282
|
+
E2.pending = null, t3((e6) => ({ ...e6, isLoadingMore: false }));
|
|
3283
|
+
}), E2.pending;
|
|
3284
|
+
}, [E2, p2, e5.categoryId, e5.locationId, h2, g2, O2, D2, _2, v2]), { resolvePath: oe2, toHref: se2 } = cs(), ce2 = c(() => x2.services.map((e6) => {
|
|
3285
|
+
let t3 = oe2(`servicePage`, { slug: e6.mainSlug?.name ?? null, serviceId: e6._id ?? null });
|
|
3286
|
+
return { serviceId: e6._id ?? null, refreshSignal: _2, service: e6, masterEvents: ee2[e6.schedule?._id ?? ``] ?? Ac, serviceOptionsAndVariants: w2[e6._id ?? ``] ?? null, bookingsSettings: b2, servicePageLink: t3 ? { href: se2(t3), target: `_self` } : null };
|
|
3287
|
+
}), [oe2, se2, x2.services, _2, ee2, w2, b2]), le2 = c(() => ({ serviceItems: t2 ? jc : ce2, bookingsSettings: b2, hasMore: !t2 && x2.hasMore, isLoading: t2 || x2.isLoadingMore, hasError: !t2 && y2.hasError, categoryId: a2, locationId: o2, loadMore: ae2 }), [t2, ce2, b2, x2.hasMore, x2.isLoadingMore, y2.hasError, a2, o2, ae2]);
|
|
3288
|
+
return m(Rc.Provider, { value: le2, children: d2 });
|
|
3289
|
+
}
|
|
3290
|
+
var Uc = (e5) => ({ ...e5, hasError: false });
|
|
3291
|
+
var Wc = () => ({ ...Ic });
|
|
3292
|
+
function Gc({ categoryData: e5, limit: n2 = Oc, servicesPicker: r2, categoriesPicker: i2, refreshSignal: a2 = 0, children: s2 }) {
|
|
3293
|
+
let l2 = Math.min(n2 ?? Oc, kc), { searchParams: d2 } = Oi(), f2 = e5?.categoryId, p2 = !!f2, g2 = f2 || d2.get(es.category), _2 = d2.get(es.location), v2 = p2 ? 1 : Lc(d2.get(es.page)), y2 = Dc(r2?.serviceId), b2 = Dc(i2?.categoryId), x2 = fs(), S2 = vs(), { isSSR: ee2 } = Ls(), [C2] = u(() => ee2()), w2 = c(() => ({ firstPagePromise: _i(Ns({ key: bs(S2, g2, _2, v2, l2, $(y2) ?? [], $(b2) ?? []), refresh: a2 !== 0, warmupData: x2, fetchData: () => fi(`services-context-load`, { feature: V.services }, $o({ limit: l2, offset: (v2 - 1) * l2, categoryId: g2, locationId: _2, serviceIds: $(y2), categoryIds: $(b2) })) }), Uc, Wc), safeLimit: l2, paginationIndex: v2, categoryId: g2, locationId: _2, serviceIdsKey: y2, categoryIdsKey: b2, refreshSignal: a2, language: S2 }), [l2, g2, _2, v2, a2, y2, b2, S2]), [T2] = u(() => Ns({ key: Ss(), warmupData: x2, fetchData: Sc })), E2 = o(w2);
|
|
3294
|
+
return m(pi, { fallback: m(Ec, { categoryId: g2, locationId: _2, children: s2 }), feature: V.services, children: h(t, { fallback: m(Tc, { categoryId: g2, locationId: _2, children: s2 }), children: [C2 && !p2 && m(tc, { servicesPromise: w2.firstPagePromise, currentPage: v2, pageQueryParam: es.page }), m(Hc, { query: E2, isQueryPending: E2 !== w2, settingsPromise: T2, categoryId: g2, locationId: _2, children: s2 })] }) });
|
|
3295
|
+
}
|
|
3296
|
+
var Kc = zn(`117fa14c-cf9c-47f5-b2cb-7797094612ce`);
|
|
2155
3297
|
export {
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
3298
|
+
zc as SERVICES_CONTEXT_MISSING_PROVIDER_ERROR,
|
|
3299
|
+
Gc as ServicesContextProvider,
|
|
3300
|
+
Gc as default,
|
|
3301
|
+
Kc as injectAccessTokenGetter,
|
|
3302
|
+
Rc as servicesContext,
|
|
3303
|
+
Bc as useServicesContext
|
|
2162
3304
|
};
|
|
2163
3305
|
//# sourceMappingURL=context-services.mjs.map
|