@wix/stores 1.0.977 → 1.0.979
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/build/cjs/context-category-by-id.js +219 -208
- package/build/cjs/context-category-by-id.js.map +1 -1
- package/build/cjs/context-category-by-slug.js +1203 -1192
- package/build/cjs/context-category-by-slug.js.map +1 -1
- package/build/cjs/context-category-info.js +259 -249
- package/build/cjs/context-category-info.js.map +1 -1
- package/build/cjs/context-category-list.js +1 -1
- package/build/cjs/context-category-list.js.map +1 -1
- package/build/cjs/context-product-by-id.js +40 -32
- package/build/cjs/context-product-by-id.js.map +1 -1
- package/build/cjs/context-product-by-slug.js +49 -41
- package/build/cjs/context-product-by-slug.js.map +1 -1
- package/build/cjs/context-product-item.js +1043 -1035
- package/build/cjs/context-product-item.js.map +1 -1
- package/build/cjs/context-product-list.js +1 -1
- package/build/cjs/context-product-list.js.map +1 -1
- package/build/cjs/context-product.js +1 -1
- package/build/cjs/context-product.js.map +1 -1
- package/build/cjs/context-promotion-item.js +1 -1
- package/build/cjs/context-promotion-item.js.map +1 -1
- package/build/es/context-category-by-id.mjs +219 -208
- package/build/es/context-category-by-id.mjs.map +1 -1
- package/build/es/context-category-by-slug.mjs +1203 -1192
- package/build/es/context-category-by-slug.mjs.map +1 -1
- package/build/es/context-category-info.mjs +263 -253
- package/build/es/context-category-info.mjs.map +1 -1
- package/build/es/context-category-list.mjs +1 -1
- package/build/es/context-category-list.mjs.map +1 -1
- package/build/es/context-product-by-id.mjs +40 -32
- package/build/es/context-product-by-id.mjs.map +1 -1
- package/build/es/context-product-by-slug.mjs +49 -41
- package/build/es/context-product-by-slug.mjs.map +1 -1
- package/build/es/context-product-item.mjs +1043 -1035
- package/build/es/context-product-item.mjs.map +1 -1
- package/build/es/context-product-list.mjs +1 -1
- package/build/es/context-product-list.mjs.map +1 -1
- package/build/es/context-product.mjs +1 -1
- package/build/es/context-product.mjs.map +1 -1
- package/build/es/context-promotion-item.mjs +1 -1
- package/build/es/context-promotion-item.mjs.map +1 -1
- package/{_sdk-exports → context-runtime}/context-category-by-id/runtime.js +2 -2
- package/context-runtime/context-category-by-slug/runtime.js +2 -0
- package/context-runtime/context-category-info/runtime.js +2 -0
- package/{_sdk-exports → context-runtime}/context-product-by-id/runtime.js +2 -2
- package/{_sdk-exports → context-runtime}/context-product-by-slug/runtime.js +2 -2
- package/context-runtime/context-product-item/runtime.js +2 -0
- package/package.json +4 -4
- package/_sdk-exports/context-category-by-slug/runtime.js +0 -2
- package/_sdk-exports/context-category-info/runtime.js +0 -2
- package/_sdk-exports/context-product-item/runtime.js +0 -2
- /package/{_sdk-exports → context-runtime}/context-category-by-id/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-category-by-slug/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-category-info/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-category-list/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-category-list/runtime.js +0 -0
- /package/{_sdk-exports → context-runtime}/context-product/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-product/runtime.js +0 -0
- /package/{_sdk-exports → context-runtime}/context-product-by-id/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-product-by-slug/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-product-item/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-product-list/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-product-list/runtime.js +0 -0
- /package/{_sdk-exports → context-runtime}/context-promotion-item/runtime.d.ts +0 -0
- /package/{_sdk-exports → context-runtime}/context-promotion-item/runtime.js +0 -0
|
@@ -20,22 +20,22 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// context-category-info.ts
|
|
21
21
|
var context_category_info_exports = {};
|
|
22
22
|
__export(context_category_info_exports, {
|
|
23
|
-
CategoryInfoContextProvider: () =>
|
|
24
|
-
default: () =>
|
|
25
|
-
injectAccessTokenGetter: () =>
|
|
26
|
-
useCategoryInfoContext: () =>
|
|
23
|
+
CategoryInfoContextProvider: () => ar,
|
|
24
|
+
default: () => ar,
|
|
25
|
+
injectAccessTokenGetter: () => or,
|
|
26
|
+
useCategoryInfoContext: () => nr
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(context_category_info_exports);
|
|
29
29
|
|
|
30
|
-
//
|
|
30
|
+
// context-runtime/context-category-info/runtime.js
|
|
31
31
|
var import_react = require("react");
|
|
32
32
|
var import_services_manager_react = require("@wix/services-manager-react");
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
35
|
-
function
|
|
34
|
+
var c = {};
|
|
35
|
+
function l(e2, t2 = false, n2 = (e3) => e3) {
|
|
36
36
|
return () => ({ __type: `event-definition`, type: e2, isDomainEvent: t2, transformations: n2 });
|
|
37
37
|
}
|
|
38
|
-
var
|
|
38
|
+
var u = (e2) => {
|
|
39
39
|
switch (e2) {
|
|
40
40
|
case `get`:
|
|
41
41
|
case `GET`:
|
|
@@ -66,7 +66,7 @@ var ee = (e2) => (t2) => async (n2) => {
|
|
|
66
66
|
let r2, i2 = (t3) => {
|
|
67
67
|
if (r2 = e2(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
|
|
68
68
|
let { method: i3, url: a2, params: o2 } = r2;
|
|
69
|
-
return { ...r2, method:
|
|
69
|
+
return { ...r2, method: u(i3), url: a2, data: r2.data, params: o2 };
|
|
70
70
|
};
|
|
71
71
|
try {
|
|
72
72
|
let e3 = await t2.request(i2);
|
|
@@ -90,43 +90,43 @@ var ie = class extends Error {
|
|
|
90
90
|
}
|
|
91
91
|
async details() {
|
|
92
92
|
let e2 = await this.response.json();
|
|
93
|
-
return
|
|
93
|
+
return d(this.response.status, e2?.message, e2?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e2 });
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
var
|
|
96
|
+
var d = (e2, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
|
|
97
97
|
var ae = (e2) => e2?.method && [`post`, `put`, `patch`].includes(e2.method.toLocaleLowerCase()) && e2.body ? { "Content-Type": `application/json` } : {};
|
|
98
98
|
var oe = (e2) => e2 && typeof e2 == `object` && !Array.isArray(e2);
|
|
99
99
|
var se = (e2) => e2.__type === `host`;
|
|
100
100
|
function ce(e2, t2) {
|
|
101
101
|
return e2.create(t2);
|
|
102
102
|
}
|
|
103
|
-
var
|
|
104
|
-
function
|
|
105
|
-
return { [
|
|
103
|
+
var f = `x-wix-bi-gateway`;
|
|
104
|
+
function p(e2, t2, n2) {
|
|
105
|
+
return { [f]: m({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e2.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e2.methodFqn, entity: e2.entityFqdn }) };
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function m(e2) {
|
|
108
108
|
return Object.entries(e2).filter(([e3, t2]) => !!t2).map(([e3, t2]) => `${e3}=${t2}`).join(`,`);
|
|
109
109
|
}
|
|
110
110
|
function h(e2) {
|
|
111
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
112
|
-
globalThis.__wix_context__ = void 0,
|
|
111
|
+
let t2 = globalThis.__wix_context__, n2 = { client: c.client, elevatedClient: c.elevatedClient }, r2;
|
|
112
|
+
globalThis.__wix_context__ = void 0, c.client = void 0, c.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
113
113
|
try {
|
|
114
114
|
return e2();
|
|
115
115
|
} finally {
|
|
116
|
-
globalThis.__wix_context__ = t2,
|
|
116
|
+
globalThis.__wix_context__ = t2, c.client = n2.client, c.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
var
|
|
120
|
-
function
|
|
119
|
+
var le = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
120
|
+
function g(e2) {
|
|
121
121
|
return pe(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
|
|
122
122
|
}
|
|
123
123
|
var ue = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
124
124
|
var de = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
125
|
-
var
|
|
125
|
+
var _ = `$1\0$2`;
|
|
126
126
|
var fe = /[^\p{L}\d]+/giu;
|
|
127
127
|
function pe(e2) {
|
|
128
128
|
let t2 = e2.trim();
|
|
129
|
-
t2 = t2.replace(ue,
|
|
129
|
+
t2 = t2.replace(ue, _).replace(de, _), t2 = t2.replace(fe, `\0`);
|
|
130
130
|
let n2 = 0, r2 = t2.length;
|
|
131
131
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
132
132
|
if (n2 === r2) return [];
|
|
@@ -141,35 +141,35 @@ function _e(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {},
|
|
|
141
141
|
if (me(e2)) return ve(e2, t2, n2);
|
|
142
142
|
if (he(e2)) return ye(e2);
|
|
143
143
|
if (ge(e2)) {
|
|
144
|
-
let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code:
|
|
145
|
-
return
|
|
144
|
+
let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: g(n3), data: {} }, requestId: e2.requestId };
|
|
145
|
+
return v(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
146
146
|
}
|
|
147
147
|
return be(e2);
|
|
148
148
|
}
|
|
149
149
|
var ve = (e2, t2, n2) => {
|
|
150
150
|
let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = xe(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
|
|
151
|
-
return
|
|
151
|
+
return v(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
|
|
152
152
|
};
|
|
153
|
-
var
|
|
153
|
+
var v = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
|
|
154
154
|
var ye = (e2) => {
|
|
155
|
-
let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ??
|
|
156
|
-
return
|
|
155
|
+
let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? g(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
|
|
156
|
+
return v(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
|
|
157
157
|
};
|
|
158
|
-
var be = (e2) =>
|
|
158
|
+
var be = (e2) => v(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: g(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
|
|
159
159
|
var xe = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
160
160
|
let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
|
|
161
161
|
return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
|
|
162
162
|
let r3 = t2[e3.field];
|
|
163
|
-
if (r3) return { ...e3, field:
|
|
163
|
+
if (r3) return { ...e3, field: y(r3, i2) };
|
|
164
164
|
let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
|
|
165
165
|
if (s2) {
|
|
166
166
|
let t3 = a2[s2];
|
|
167
|
-
if (t3) return { ...e3, field: e3.field.replace(s2,
|
|
167
|
+
if (t3) return { ...e3, field: e3.field.replace(s2, y(t3, i2)) };
|
|
168
168
|
}
|
|
169
169
|
return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
|
|
170
170
|
});
|
|
171
171
|
};
|
|
172
|
-
var
|
|
172
|
+
var y = (e2, t2) => {
|
|
173
173
|
let n2 = Se(e2);
|
|
174
174
|
return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
|
|
175
175
|
};
|
|
@@ -184,7 +184,7 @@ function Ce(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
|
184
184
|
let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? re : o3}${a3.url}`;
|
|
185
185
|
a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
|
|
186
186
|
try {
|
|
187
|
-
let e4 =
|
|
187
|
+
let e4 = p(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e4 } }, s3 = await n2(u3, o4);
|
|
188
188
|
if (s3.status !== 200) {
|
|
189
189
|
let e5 = null;
|
|
190
190
|
try {
|
|
@@ -212,7 +212,7 @@ var Te = (e2, t2, n2, r2) => new we({ response: { data: { details: { ...!n2?.val
|
|
|
212
212
|
var Ee = `.`;
|
|
213
213
|
function De(e2, t2, n2) {
|
|
214
214
|
if (e2 == null) throw Error(`Cannot set value on null or undefined`);
|
|
215
|
-
let r2 =
|
|
215
|
+
let r2 = Oe(t2), i2 = e2;
|
|
216
216
|
for (let e3 = 0; e3 < r2.length; e3++) {
|
|
217
217
|
let t3 = r2[e3];
|
|
218
218
|
if (e3 === r2.length - 1) {
|
|
@@ -224,21 +224,21 @@ function De(e2, t2, n2) {
|
|
|
224
224
|
}
|
|
225
225
|
return e2;
|
|
226
226
|
}
|
|
227
|
-
function x(e2) {
|
|
228
|
-
return Array.isArray(e2) ? e2 : e2.split(Ee).map((e3) => Oe(e3) ? Number(e3) : e3);
|
|
229
|
-
}
|
|
230
227
|
function Oe(e2) {
|
|
231
|
-
return
|
|
228
|
+
return Array.isArray(e2) ? e2 : e2.split(Ee).map((e3) => ke(e3) ? Number(e3) : e3);
|
|
232
229
|
}
|
|
233
230
|
function ke(e2) {
|
|
231
|
+
return /^\d+$/.test(e2);
|
|
232
|
+
}
|
|
233
|
+
function Ae(e2) {
|
|
234
234
|
let t2 = {};
|
|
235
|
-
for (let [n2, r2] of Object.entries(e2))
|
|
235
|
+
for (let [n2, r2] of Object.entries(e2)) je(n2) || De(t2, Oe(n2), r2);
|
|
236
236
|
return t2;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function je(e2) {
|
|
239
239
|
return e2 === `__proto__` || e2 === `constructor` || e2 === `prototype`;
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var Me = class {
|
|
242
242
|
BRACKET_PATTERN = /\[(\d+)\]/g;
|
|
243
243
|
NUMERIC_PATTERN = /^\d+$/;
|
|
244
244
|
ESCAPED_DOT_PATTERN = /\\\./g;
|
|
@@ -261,7 +261,7 @@ var je = class {
|
|
|
261
261
|
return e2.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
|
|
262
262
|
}
|
|
263
263
|
unflatten() {
|
|
264
|
-
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e2, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e2)), t2])),
|
|
264
|
+
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e2, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e2)), t2])), Ae(this.cleanedModifiedFields);
|
|
265
265
|
}
|
|
266
266
|
flatten(e2) {
|
|
267
267
|
let t2 = {};
|
|
@@ -281,12 +281,12 @@ var je = class {
|
|
|
281
281
|
if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
|
|
282
282
|
r2.push(`[${e3}]`), n2 = n2[parseInt(e3, 10)];
|
|
283
283
|
}, a2 = (e3, t3) => {
|
|
284
|
-
let i3 = e3 in
|
|
284
|
+
let i3 = e3 in le ? le[e3] : void 0;
|
|
285
285
|
if (i3 && i3 in t3) {
|
|
286
286
|
r2.push(i3), n2 = t3[i3];
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
|
-
let a3 =
|
|
289
|
+
let a3 = Ie(e3);
|
|
290
290
|
if (a3 && a3 in t3) {
|
|
291
291
|
r2.push(a3), n2 = t3[a3];
|
|
292
292
|
return;
|
|
@@ -317,28 +317,28 @@ var je = class {
|
|
|
317
317
|
return e2.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e2[r2 - 1] === `\\` ? t2 : `.` + n2);
|
|
318
318
|
}
|
|
319
319
|
};
|
|
320
|
-
function
|
|
320
|
+
function Ne(e2, t2) {
|
|
321
321
|
let n2 = e2?.modifiedFields;
|
|
322
322
|
if (!n2) return null;
|
|
323
|
-
let r2 =
|
|
323
|
+
let r2 = Pe(n2);
|
|
324
324
|
if (!r2) return null;
|
|
325
325
|
let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
|
|
326
326
|
e2 = { ...e2, modifiedFields: i2 };
|
|
327
327
|
let o2 = t2(e2), s2 = o2?.modifiedFields;
|
|
328
328
|
if (!s2) return null;
|
|
329
|
-
let c2 =
|
|
329
|
+
let c2 = Fe(s2, a2);
|
|
330
330
|
return c2 === null ? null : (o2.modifiedFields = c2, o2);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Pe(e2) {
|
|
333
333
|
if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
|
|
334
|
-
let t2 = new
|
|
334
|
+
let t2 = new Me(e2);
|
|
335
335
|
return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
|
|
336
336
|
} catch {
|
|
337
337
|
return null;
|
|
338
338
|
}
|
|
339
339
|
return null;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Fe(e2, t2) {
|
|
342
342
|
if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
|
|
343
343
|
return t2.flatten(e2);
|
|
344
344
|
} catch {
|
|
@@ -346,10 +346,10 @@ function Pe(e2, t2) {
|
|
|
346
346
|
}
|
|
347
347
|
return null;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Ie(e2) {
|
|
350
350
|
return e2.replace(/[-_\s]+(.)?/g, (e3, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e3) => e3.toLowerCase());
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function b() {
|
|
353
353
|
return { emit(e2, ...t2) {
|
|
354
354
|
for (let n2 = 0, r2 = this.events[e2] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
|
|
355
355
|
}, events: {}, on(e2, t2) {
|
|
@@ -358,8 +358,8 @@ function S() {
|
|
|
358
358
|
};
|
|
359
359
|
} };
|
|
360
360
|
}
|
|
361
|
-
var
|
|
362
|
-
function
|
|
361
|
+
var Le = (e2) => e2.__type === `event-definition`;
|
|
362
|
+
function x(e2, t2, n2, r2) {
|
|
363
363
|
let i2;
|
|
364
364
|
if (e2.isDomainEvent) {
|
|
365
365
|
let { deletedEvent: e3, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
|
|
@@ -370,14 +370,14 @@ function C(e2, t2, n2, r2) {
|
|
|
370
370
|
let e3 = s2.modifiedFields;
|
|
371
371
|
if (typeof e3 == `object` && e3 && !Array.isArray(e3)) {
|
|
372
372
|
o2 = structuredClone(i2);
|
|
373
|
-
let e4 =
|
|
373
|
+
let e4 = Ne(s2, a2);
|
|
374
374
|
if (e4) return t2(e4);
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
return t2(a2(o2));
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
379
|
+
function Re(e2) {
|
|
380
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = b();
|
|
381
381
|
return { initModule(e3) {
|
|
382
382
|
return (r2) => {
|
|
383
383
|
let i2 = t2.get(e3.type) ?? [];
|
|
@@ -387,7 +387,7 @@ function Le(e2) {
|
|
|
387
387
|
let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e3), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e4) => ({ type: e4 }))];
|
|
388
388
|
if (c2.length > 0 && !c2.some(({ type: e4 }) => e4 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e4) => e4.type).join(`, `)}`);
|
|
389
389
|
let l2 = t2.get(r2) ?? [];
|
|
390
|
-
return await Promise.all(l2.map(({ eventDefinition: e4, handler: t3 }) =>
|
|
390
|
+
return await Promise.all(l2.map(({ eventDefinition: e4, handler: t3 }) => x(e4, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
|
|
391
391
|
}, async processRequest(e3, t3) {
|
|
392
392
|
let n3 = await e3.text();
|
|
393
393
|
return this.process(n3, t3);
|
|
@@ -406,12 +406,12 @@ function Le(e2) {
|
|
|
406
406
|
let n3 = Array.from(t2.keys()).map((e4) => ({ type: e4 }));
|
|
407
407
|
if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e3.eventType)) throw Error(`Unexpected event type: ${e3.eventType}. Expected one of: ${n3.map((e4) => e4.type).join(`, `)}`);
|
|
408
408
|
let r2 = t2.get(e3.eventType) ?? [];
|
|
409
|
-
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) =>
|
|
410
|
-
}, apps: { AppInstalled:
|
|
409
|
+
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => x(t3, n4, e3.payload, { instanceId: e3.instanceId, identity: e3.identity })));
|
|
410
|
+
}, apps: { AppInstalled: l(`AppInstalled`)(), AppRemoved: l(`AppRemoved`)() } } };
|
|
411
411
|
}
|
|
412
|
-
var
|
|
413
|
-
function
|
|
414
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
412
|
+
var ze = (e2) => e2.__type === `service-plugin-definition`;
|
|
413
|
+
function Be(e2) {
|
|
414
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = b();
|
|
415
415
|
return { initModule(e3) {
|
|
416
416
|
return (r2) => {
|
|
417
417
|
let i2 = t2.get(e3.componentType.toLowerCase()) ?? [];
|
|
@@ -452,33 +452,33 @@ function ze(e2) {
|
|
|
452
452
|
return s2.transformations.toREST(await c2(s2.transformations.fromREST(e3)));
|
|
453
453
|
} } };
|
|
454
454
|
}
|
|
455
|
-
var
|
|
456
|
-
function
|
|
455
|
+
var S = `X-Wix-Consistent`;
|
|
456
|
+
function Ve(e2) {
|
|
457
457
|
let t2 = e2.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e3) => Promise.resolve({ headers: {} }) }, r2 = e2.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e2.host), o2 = () => e2.fetch ?? fetch, s2 = async (n3, r3) => {
|
|
458
|
-
let i3 = o2(), s3 = await a2(),
|
|
458
|
+
let i3 = o2(), s3 = await a2(), c2 = { ...r3?.headers ?? {}, ...s3.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [S]: t2[S] } : {} }, l3 = e2.host?.getErrorHandler?.();
|
|
459
459
|
try {
|
|
460
460
|
if (typeof n3 == `string` || n3 instanceof URL) {
|
|
461
|
-
let e3 = await i3(n3, { ...r3, headers:
|
|
462
|
-
|
|
463
|
-
let a3 =
|
|
464
|
-
return a3 && (t2[
|
|
461
|
+
let e3 = await i3(n3, { ...r3, headers: c2 });
|
|
462
|
+
l3?.handleError(e3, { requestOptions: { url: n3.toString(), method: r3?.method } });
|
|
463
|
+
let a3 = C(e3);
|
|
464
|
+
return a3 && (t2[S] = a3), e3;
|
|
465
465
|
}
|
|
466
466
|
{
|
|
467
|
-
for (let [e4, t3] of Object.entries(
|
|
467
|
+
for (let [e4, t3] of Object.entries(c2)) typeof t3 == `string` && n3.headers.set(e4, t3);
|
|
468
468
|
let e3 = await i3(n3, r3);
|
|
469
|
-
|
|
470
|
-
let a3 =
|
|
471
|
-
return a3 && (t2[
|
|
469
|
+
l3?.handleError(e3, { requestOptions: { url: n3.url, method: r3?.method } });
|
|
470
|
+
let a3 = C(e3);
|
|
471
|
+
return a3 && (t2[S] = a3), e3;
|
|
472
472
|
}
|
|
473
473
|
} catch (e3) {
|
|
474
|
-
throw
|
|
474
|
+
throw l3?.handleError(e3, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e3;
|
|
475
475
|
}
|
|
476
|
-
}, { client:
|
|
477
|
-
let i3 = o2(), s3 = await a2(),
|
|
478
|
-
return u3 && (t2[
|
|
476
|
+
}, { client: l2, initModule: u2 } = Be(i2), { client: re2, initModule: d2 } = Re(i2), f2 = async (n3, r3) => {
|
|
477
|
+
let i3 = o2(), s3 = await a2(), c2 = ae(r3), l3 = await i3(n3, { ...r3, headers: { ...c2, ...t2, ...s3?.headers, ...r3?.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [S]: t2[S] } : {} } }), u3 = C(l3);
|
|
478
|
+
return u3 && (t2[S] = u3), l3;
|
|
479
479
|
}, p2 = (t3, n3) => {
|
|
480
|
-
if (
|
|
481
|
-
if (
|
|
480
|
+
if (Le(t3)) return d2(t3);
|
|
481
|
+
if (ze(t3)) return u2(t3);
|
|
482
482
|
if (se(t3) && e2.host) return ce(t3, e2.host);
|
|
483
483
|
if (typeof t3 == `function`) {
|
|
484
484
|
if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
|
|
@@ -496,7 +496,7 @@ function Be(e2) {
|
|
|
496
496
|
let t3 = i2();
|
|
497
497
|
return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e2.host), t3;
|
|
498
498
|
}, setHeaders: m2, use: p2, enableContext(e3, t3 = { elevated: false }) {
|
|
499
|
-
e3 === `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 ?
|
|
499
|
+
e3 === `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 ? c.elevatedClient = this : c.client = this;
|
|
500
500
|
}, fetch: (t3, n3) => {
|
|
501
501
|
let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
|
|
502
502
|
return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
|
|
@@ -505,23 +505,23 @@ function Be(e2) {
|
|
|
505
505
|
if (a3.status !== 200) throw new ie(`GraphQL request failed with status ${a3.status}`, a3);
|
|
506
506
|
let { data: o3, errors: s3 } = await a3.json();
|
|
507
507
|
return { data: o3 ?? {}, errors: s3 };
|
|
508
|
-
}, webhooks:
|
|
508
|
+
}, webhooks: re2, servicePlugins: l2 };
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function C(e2) {
|
|
511
511
|
return e2.headers?.get(`X-Wix-Consistent`) ?? e2.headers?.get(`x-wix-consistent`);
|
|
512
512
|
}
|
|
513
|
-
var
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
function
|
|
513
|
+
var w = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
|
|
514
|
+
var He = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
515
|
+
var Ue = w;
|
|
516
|
+
function T(e2, t2) {
|
|
517
517
|
return e2?.split(`.`).map((e3) => t2?.[e3] ?? e3).join(`.`);
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
return t2 ?
|
|
519
|
+
function E(e2, { transformSystemFields: t2 = true } = {}) {
|
|
520
|
+
return t2 ? T(e2, Ue) : e2;
|
|
521
521
|
}
|
|
522
|
-
var
|
|
523
|
-
function
|
|
524
|
-
return (e2 ===
|
|
522
|
+
var D = `sort.fieldName`;
|
|
523
|
+
function We(e2, t2, n2) {
|
|
524
|
+
return (e2 === D || e2.endsWith(`.${D}`)) && typeof t2 == `string` ? T(t2, n2) : t2;
|
|
525
525
|
}
|
|
526
526
|
function O(e2, t2, n2) {
|
|
527
527
|
let r2 = (e3) => n2.includes(e3), i2 = (e3, n3) => {
|
|
@@ -533,22 +533,22 @@ function O(e2, t2, n2) {
|
|
|
533
533
|
Object.keys(a2).forEach((e4) => {
|
|
534
534
|
let o2 = n3 === `` ? e4 : `${n3}.${e4}`;
|
|
535
535
|
if (r2(o2)) return;
|
|
536
|
-
let s2 =
|
|
537
|
-
s2 !== e4 && !(s2 in a2) && (a2[s2] = a2[e4], delete a2[e4]), a2[s2] =
|
|
536
|
+
let s2 = Ge(e4, t2);
|
|
537
|
+
s2 !== e4 && !(s2 in a2) && (a2[s2] = a2[e4], delete a2[e4]), a2[s2] = We(o2, a2[s2], t2), i2(a2[s2], o2);
|
|
538
538
|
});
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
return i2(e2, ``), e2;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function Ge(e2, t2) {
|
|
544
544
|
let n2;
|
|
545
545
|
return n2 = e2.includes(`.`) ? e2.split(`.`).map((e3) => t2[e3] ?? e3).join(`.`) : t2[e2] ?? e2, n2;
|
|
546
546
|
}
|
|
547
|
-
function
|
|
548
|
-
return O(e2,
|
|
547
|
+
function Ke(e2, t2 = []) {
|
|
548
|
+
return O(e2, w, t2);
|
|
549
549
|
}
|
|
550
550
|
function k(e2, t2 = []) {
|
|
551
|
-
return O(e2,
|
|
551
|
+
return O(e2, He, t2);
|
|
552
552
|
}
|
|
553
553
|
function A(e2) {
|
|
554
554
|
return e2 ? new Date(e2) : void 0;
|
|
@@ -557,12 +557,12 @@ var j = /* @__PURE__ */ new WeakMap();
|
|
|
557
557
|
function M() {
|
|
558
558
|
return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function qe(e2, t2) {
|
|
561
561
|
let n2 = e2.get(t2);
|
|
562
562
|
return n2 || (n2 = M(), e2.set(t2, n2)), n2;
|
|
563
563
|
}
|
|
564
564
|
function Je(e2, t2) {
|
|
565
|
-
return t2 === `*` ? (e2.anyField ??= M(), e2.anyField) : t2.endsWith(`{}`) ? (e2.mapFields ??= /* @__PURE__ */ new Map(),
|
|
565
|
+
return t2 === `*` ? (e2.anyField ??= M(), e2.anyField) : t2.endsWith(`{}`) ? (e2.mapFields ??= /* @__PURE__ */ new Map(), qe(e2.mapFields, t2.slice(0, -2))) : (e2.fields ??= /* @__PURE__ */ new Map(), qe(e2.fields, t2));
|
|
566
566
|
}
|
|
567
567
|
function Ye(e2) {
|
|
568
568
|
let t2 = M();
|
|
@@ -576,47 +576,47 @@ function Xe(e2) {
|
|
|
576
576
|
let t2 = j.get(e2);
|
|
577
577
|
return t2 || (t2 = Ye(e2), j.set(e2, t2)), t2;
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function N(e2) {
|
|
580
580
|
return typeof e2 == `object` && !!e2;
|
|
581
581
|
}
|
|
582
582
|
function Ze(e2, { isRepeated: t2, isMap: n2 }, r2) {
|
|
583
|
-
return t2 ? Array.isArray(e2) ? e2.map(r2) : e2 : n2 ?
|
|
583
|
+
return t2 ? Array.isArray(e2) ? e2.map(r2) : e2 : n2 ? N(e2) ? Object.fromEntries(Object.entries(e2).map(([e3, t3]) => [e3, r2(t3)])) : e2 : r2(e2);
|
|
584
584
|
}
|
|
585
|
-
function
|
|
586
|
-
|
|
585
|
+
function P(e2, t2, n2) {
|
|
586
|
+
N(e2) && F(e2, t2, n2);
|
|
587
587
|
}
|
|
588
588
|
function Qe(e2, t2, n2) {
|
|
589
589
|
for (let [r2, i2] of t2) {
|
|
590
590
|
if (!(r2 in e2)) continue;
|
|
591
591
|
if (i2.leaves) for (let t4 of i2.leaves) e2[r2] = Ze(e2[r2], t4, n2);
|
|
592
592
|
let t3 = e2[r2];
|
|
593
|
-
Array.isArray(t3) ? t3.forEach((e3) =>
|
|
593
|
+
Array.isArray(t3) ? t3.forEach((e3) => P(e3, i2, n2)) : P(t3, i2, n2);
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
function $e(e2, t2, n2) {
|
|
597
597
|
for (let [r2, i2] of t2) {
|
|
598
598
|
let t3 = e2[r2];
|
|
599
|
-
|
|
599
|
+
N(t3) && Object.values(t3).forEach((e3) => P(e3, i2, n2));
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
t2 && Qe(e2, t2, i2), n2 && $e(e2, n2, i2), r2 && Object.values(e2).forEach((e3) =>
|
|
602
|
+
function F(e2, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
|
|
603
|
+
t2 && Qe(e2, t2, i2), n2 && $e(e2, n2, i2), r2 && Object.values(e2).forEach((e3) => P(e3, r2, i2));
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
if (!
|
|
607
|
-
for (let { paths: n2, transformFn: r2 } of t2)
|
|
605
|
+
function I(e2, t2) {
|
|
606
|
+
if (!N(e2)) return e2;
|
|
607
|
+
for (let { paths: n2, transformFn: r2 } of t2) F(e2, Xe(n2), r2);
|
|
608
608
|
return e2;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function L(e2) {
|
|
611
611
|
return rt(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
|
|
612
612
|
}
|
|
613
613
|
var et = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
614
614
|
var tt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
615
|
-
var
|
|
615
|
+
var R = `$1\0$2`;
|
|
616
616
|
var nt = /[^\p{L}\d]+/giu;
|
|
617
617
|
function rt(e2) {
|
|
618
618
|
let t2 = e2.trim();
|
|
619
|
-
t2 = t2.replace(et,
|
|
619
|
+
t2 = t2.replace(et, R).replace(tt, R), t2 = t2.replace(nt, `\0`);
|
|
620
620
|
let n2 = 0, r2 = t2.length;
|
|
621
621
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
622
622
|
if (n2 === r2) return [];
|
|
@@ -631,35 +631,35 @@ function st(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {},
|
|
|
631
631
|
if (it(e2)) return ct(e2, t2, n2);
|
|
632
632
|
if (at(e2)) return lt(e2);
|
|
633
633
|
if (ot(e2)) {
|
|
634
|
-
let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code:
|
|
635
|
-
return
|
|
634
|
+
let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: L(n3), data: {} }, requestId: e2.requestId };
|
|
635
|
+
return z(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
636
636
|
}
|
|
637
637
|
return ut(e2);
|
|
638
638
|
}
|
|
639
639
|
var ct = (e2, t2, n2) => {
|
|
640
640
|
let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = dt(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
|
|
641
|
-
return
|
|
641
|
+
return z(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
|
|
642
642
|
};
|
|
643
|
-
var
|
|
643
|
+
var z = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
|
|
644
644
|
var lt = (e2) => {
|
|
645
|
-
let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ??
|
|
646
|
-
return
|
|
645
|
+
let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? L(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
|
|
646
|
+
return z(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
|
|
647
647
|
};
|
|
648
|
-
var ut = (e2) =>
|
|
648
|
+
var ut = (e2) => z(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: L(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
|
|
649
649
|
var dt = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
650
650
|
let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
|
|
651
651
|
return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
|
|
652
652
|
let r3 = t2[e3.field];
|
|
653
|
-
if (r3) return { ...e3, field:
|
|
653
|
+
if (r3) return { ...e3, field: B(r3, i2) };
|
|
654
654
|
let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
|
|
655
655
|
if (s2) {
|
|
656
656
|
let t3 = a2[s2];
|
|
657
|
-
if (t3) return { ...e3, field: e3.field.replace(s2,
|
|
657
|
+
if (t3) return { ...e3, field: e3.field.replace(s2, B(t3, i2)) };
|
|
658
658
|
}
|
|
659
659
|
return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
|
|
660
660
|
});
|
|
661
661
|
};
|
|
662
|
-
var
|
|
662
|
+
var B = (e2, t2) => {
|
|
663
663
|
let n2 = ft(e2);
|
|
664
664
|
return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
|
|
665
665
|
};
|
|
@@ -667,23 +667,23 @@ var ft = (e2) => {
|
|
|
667
667
|
let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
|
|
668
668
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
669
669
|
};
|
|
670
|
-
function
|
|
670
|
+
function V() {
|
|
671
671
|
let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
672
672
|
if (e2) return { initWixModules(t3, n3) {
|
|
673
|
-
return
|
|
673
|
+
return H(() => e2(t3, n3));
|
|
674
674
|
}, fetchWithAuth() {
|
|
675
675
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
676
676
|
}, graphql() {
|
|
677
677
|
throw Error(`graphql is not available in this context`);
|
|
678
678
|
} };
|
|
679
|
-
let t2 = typeof $wixContext < `u` ? $wixContext.client :
|
|
679
|
+
let t2 = typeof $wixContext < `u` ? $wixContext.client : c.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : c.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : c.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : c.elevatedClient;
|
|
680
680
|
if (t2 || n2) return { initWixModules(e3, r2) {
|
|
681
681
|
if (r2) {
|
|
682
682
|
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`);
|
|
683
|
-
return
|
|
683
|
+
return H(() => n2.use(e3));
|
|
684
684
|
}
|
|
685
685
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
686
|
-
return
|
|
686
|
+
return H(() => t2.use(e3));
|
|
687
687
|
}, fetchWithAuth: (e3, n3) => {
|
|
688
688
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
689
689
|
return t2.fetchWithAuth(e3, n3);
|
|
@@ -695,24 +695,24 @@ function H() {
|
|
|
695
695
|
return t2.graphql(e3, n3, r2);
|
|
696
696
|
} };
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
700
|
-
globalThis.__wix_context__ = void 0,
|
|
698
|
+
function H(e2) {
|
|
699
|
+
let t2 = globalThis.__wix_context__, n2 = { client: c.client, elevatedClient: c.elevatedClient }, r2;
|
|
700
|
+
globalThis.__wix_context__ = void 0, c.client = void 0, c.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
701
701
|
try {
|
|
702
702
|
return e2();
|
|
703
703
|
} finally {
|
|
704
|
-
globalThis.__wix_context__ = t2,
|
|
704
|
+
globalThis.__wix_context__ = t2, c.client = n2.client, c.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
function pt(e2, t2) {
|
|
708
708
|
return (...n2) => {
|
|
709
|
-
let r2 =
|
|
709
|
+
let r2 = V();
|
|
710
710
|
return r2 ? r2.initWixModules(e2, t2).apply(void 0, n2) : e2.apply(void 0, n2);
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
713
|
function mt(e2) {
|
|
714
714
|
let t2 = (...t3) => {
|
|
715
|
-
let n2 =
|
|
715
|
+
let n2 = V();
|
|
716
716
|
return n2 ? n2.initWixModules(e2).apply(void 0, t3) : () => ({ slug: e2.type });
|
|
717
717
|
};
|
|
718
718
|
return t2.__type = e2.__type, t2.type = e2.type, t2.isDomainEvent = e2.isDomainEvent, t2.transformations = e2.transformations, t2;
|
|
@@ -721,7 +721,7 @@ function ht(e2, t2 = false) {
|
|
|
721
721
|
return pt(e2, t2);
|
|
722
722
|
}
|
|
723
723
|
function gt(e2, t2) {
|
|
724
|
-
let n2 =
|
|
724
|
+
let n2 = U(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
|
|
725
725
|
return t2 && r2 ? new URLSearchParams({ ".r": yt(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
|
|
726
726
|
r3 == null || Array.isArray(n3) && typeof r3 == `object` || e3.append(t3, r3);
|
|
727
727
|
}), e3), new URLSearchParams());
|
|
@@ -730,12 +730,12 @@ function _t(e2) {
|
|
|
730
730
|
let t2 = Mt(At(e2.host), e2.domainToMappings);
|
|
731
731
|
return Vt(Rt(e2.protoPath, e2.data || {}), t2);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function U(e2, t2 = ``) {
|
|
734
734
|
let n2 = {};
|
|
735
735
|
return Object.entries(e2).forEach(([e3, r2]) => {
|
|
736
736
|
let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = vt(t2, e3);
|
|
737
737
|
if (i2) {
|
|
738
|
-
let e4 =
|
|
738
|
+
let e4 = U(r2, a2);
|
|
739
739
|
Object.assign(n2, e4);
|
|
740
740
|
} else n2[a2] = r2;
|
|
741
741
|
}), n2;
|
|
@@ -817,17 +817,17 @@ function Vt(e2, t2) {
|
|
|
817
817
|
let n2 = t2?.find((t3) => e2.startsWith(t3.destPath));
|
|
818
818
|
return n2 ? n2.srcPath + e2.slice(n2.destPath.length) : e2;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function W(e2) {
|
|
821
821
|
return mt(e2);
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function G(e2) {
|
|
824
824
|
return e2 === `NaN` ? NaN : e2 === `Infinity` ? 1 / 0 : e2 === `-Infinity` ? -1 / 0 : e2;
|
|
825
825
|
}
|
|
826
826
|
var Ht = `x-wix-linguist`;
|
|
827
827
|
var Ut = `00000000-0000-0000-0000-000000000000`;
|
|
828
828
|
var Wt = `false`;
|
|
829
829
|
var Gt = () => {
|
|
830
|
-
let e2 =
|
|
830
|
+
let e2 = K(`language`), t2 = K(`locale`);
|
|
831
831
|
if (e2) return { [Ht]: [e2, t2 || e2, Wt, Ut].join(`|`) };
|
|
832
832
|
};
|
|
833
833
|
function Kt() {
|
|
@@ -837,10 +837,10 @@ function Kt() {
|
|
|
837
837
|
}), resolve: e2, reject: t2 };
|
|
838
838
|
}
|
|
839
839
|
var qt = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
840
|
-
var
|
|
840
|
+
var K = (e2) => qt()?.[e2];
|
|
841
841
|
var Jt = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
|
|
842
842
|
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = Xt();
|
|
843
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
843
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: K(`language`), locale: K(`locale`), get passThroughHeaders() {
|
|
844
844
|
return Gt();
|
|
845
845
|
} } };
|
|
846
846
|
}, auth: (e3) => {
|
|
@@ -870,15 +870,15 @@ var Zt = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace
|
|
|
870
870
|
throw Error(`Not implemented`);
|
|
871
871
|
}, observeState: () => ({ disconnect: () => {
|
|
872
872
|
} }) });
|
|
873
|
-
var
|
|
873
|
+
var q = Jt({ createHost: function(e2) {
|
|
874
874
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e2?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e2 || {};
|
|
875
875
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
876
876
|
return { channel: Zt({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
877
877
|
} };
|
|
878
878
|
} });
|
|
879
879
|
var Qt = (e2, t2) => {
|
|
880
|
-
let n2 =
|
|
881
|
-
return
|
|
880
|
+
let n2 = q.host({ applicationId: e2, componentId: t2 }), r2 = q.auth();
|
|
881
|
+
return Ve({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
882
882
|
};
|
|
883
883
|
var $t = (e2) => Qt(`215238eb-22a5-4c36-9e7b-e7c08025e04e`, e2);
|
|
884
884
|
function en(e2) {
|
|
@@ -889,11 +889,21 @@ function en(e2) {
|
|
|
889
889
|
e2.status = `rejected`, e2.reason = t2;
|
|
890
890
|
}), e2);
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function J(e2) {
|
|
893
893
|
return e2;
|
|
894
894
|
}
|
|
895
|
-
var tn =
|
|
896
|
-
|
|
895
|
+
var tn = J(`@wix/site-service-warmup-data`);
|
|
896
|
+
var nn = J(`@wix/site-service-locale`);
|
|
897
|
+
var rn = J(`@wix/viewer-service-multilingual`);
|
|
898
|
+
function an() {
|
|
899
|
+
let e2 = (0, import_services_manager_react.useGetService)(), t2 = (0, import_services_manager_react.useService)(nn), n2;
|
|
900
|
+
try {
|
|
901
|
+
n2 = e2(rn);
|
|
902
|
+
} catch {
|
|
903
|
+
}
|
|
904
|
+
return n2?.multilingualEnabled && n2.currentLocale?.languageCode || t2.language;
|
|
905
|
+
}
|
|
906
|
+
async function on(e2, t2, n2) {
|
|
897
907
|
let r2 = typeof window > `u`;
|
|
898
908
|
if (!r2 && e2) try {
|
|
899
909
|
let n3 = await e2.get(t2);
|
|
@@ -907,41 +917,41 @@ async function nn(e2, t2, n2) {
|
|
|
907
917
|
}
|
|
908
918
|
return i2;
|
|
909
919
|
}
|
|
910
|
-
function
|
|
911
|
-
let n2 = (0, import_services_manager_react.useGetService)(),
|
|
912
|
-
|
|
920
|
+
function sn(e2, t2) {
|
|
921
|
+
let n2 = (0, import_services_manager_react.useGetService)(), r2 = an();
|
|
922
|
+
return (0, import_react.useMemo)(() => {
|
|
923
|
+
let i2;
|
|
913
924
|
try {
|
|
914
|
-
|
|
925
|
+
i2 = n2(tn);
|
|
915
926
|
} catch {
|
|
916
|
-
|
|
927
|
+
i2 = null;
|
|
917
928
|
}
|
|
918
|
-
return
|
|
919
|
-
});
|
|
920
|
-
return r2;
|
|
929
|
+
return on(i2, `${e2}:${r2}`, t2);
|
|
930
|
+
}, [r2]);
|
|
921
931
|
}
|
|
922
|
-
function
|
|
932
|
+
function Y(e2) {
|
|
923
933
|
if (!e2) return;
|
|
924
934
|
let t2 = ``;
|
|
925
935
|
return (e2.filename || e2.altText) && (t2 = `/${encodeURIComponent(e2.filename || e2.altText)}`), e2.id ? `wix:image://v1/${e2.id}${t2}#originWidth=${e2.width}&originHeight=${e2.height}` : e2.url;
|
|
926
936
|
}
|
|
927
|
-
function
|
|
928
|
-
let r2 = (r3, i3) =>
|
|
937
|
+
function X(e2, t2, n2 = {}) {
|
|
938
|
+
let r2 = (r3, i3) => X(e2, t2, { ...n2, [r3]: i3 }), i2 = () => Object.keys(n2).length === 0 ? {} : { [E(e2, t2)]: n2 };
|
|
929
939
|
return { get filter() {
|
|
930
940
|
return i2();
|
|
931
941
|
}, eq: (e3) => r2(`$eq`, e3), ne: (e3) => r2(`$ne`, e3), gt: (e3) => r2(`$gt`, e3), gte: (e3) => r2(`$gte`, e3), lt: (e3) => r2(`$lt`, e3), lte: (e3) => r2(`$lte`, e3), startsWith: (e3) => r2(`$startsWith`, e3), endsWith: (e3) => r2(`$endsWith`, e3), contains: (e3) => r2(`$contains`, e3), in: (e3) => r2(`$in`, e3), nin: (e3) => r2(`$nin`, e3), hasSome: (e3) => r2(`$hasSome`, e3), hasAll: (e3) => r2(`$hasAll`, e3), exists: (e3 = true) => r2(`$exists`, e3), isEmpty: (e3 = true) => r2(`$isEmpty`, e3), isNotEmpty: () => r2(`$ne`, null) };
|
|
932
942
|
}
|
|
933
|
-
function
|
|
934
|
-
return Object.assign((t2) =>
|
|
943
|
+
function cn(e2) {
|
|
944
|
+
return Object.assign((t2) => X(t2, e2), { and: (...e3) => ({ filter: { $and: e3.map((e4) => e4.filter) } }), or: (...e3) => ({ filter: { $or: e3.map((e4) => e4.filter) } }), not: (e3) => ({ filter: { $not: e3.filter } }) });
|
|
935
945
|
}
|
|
936
|
-
function
|
|
937
|
-
return (t2) => ({ asc: () => ({ sort: { fieldName:
|
|
946
|
+
function ln(e2) {
|
|
947
|
+
return (t2) => ({ asc: () => ({ sort: { fieldName: E(t2, e2), order: `ASC` } }), desc: () => ({ sort: { fieldName: E(t2, e2), order: `DESC` } }) });
|
|
938
948
|
}
|
|
939
|
-
function
|
|
949
|
+
function un(e2) {
|
|
940
950
|
return () => {
|
|
941
951
|
let t2 = {}, n2 = { withFilter(e3) {
|
|
942
952
|
return t2 = { ...t2, filter: e3.filter }, n2;
|
|
943
953
|
}, withFields(...r2) {
|
|
944
|
-
return t2 = { ...t2, fields: r2.map((t3) =>
|
|
954
|
+
return t2 = { ...t2, fields: r2.map((t3) => E(t3, e2)) }, n2;
|
|
945
955
|
}, withSorting(...e3) {
|
|
946
956
|
return t2 = { ...t2, sort: e3.map((e4) => e4.sort) }, n2;
|
|
947
957
|
}, withPaging(e3) {
|
|
@@ -952,10 +962,10 @@ function cn(e2) {
|
|
|
952
962
|
return n2;
|
|
953
963
|
};
|
|
954
964
|
}
|
|
955
|
-
function
|
|
956
|
-
return { QueryBuilder:
|
|
965
|
+
function dn(e2) {
|
|
966
|
+
return { QueryBuilder: un(e2), Filter: cn(e2), Sort: ln(e2) };
|
|
957
967
|
}
|
|
958
|
-
function
|
|
968
|
+
function fn(e2) {
|
|
959
969
|
let t2 = {}, n2 = { get search() {
|
|
960
970
|
return t2;
|
|
961
971
|
}, expression(e3) {
|
|
@@ -963,19 +973,19 @@ function un(e2) {
|
|
|
963
973
|
}, mode(e3) {
|
|
964
974
|
return t2 = { ...t2, mode: e3 }, n2;
|
|
965
975
|
}, fields(r2) {
|
|
966
|
-
return t2 = { ...t2, fields: r2.map((t3) =>
|
|
976
|
+
return t2 = { ...t2, fields: r2.map((t3) => E(t3, e2)) }, n2;
|
|
967
977
|
}, fuzzy(e3 = true) {
|
|
968
978
|
return t2 = { ...t2, fuzzy: e3 }, n2;
|
|
969
979
|
} };
|
|
970
980
|
return n2;
|
|
971
981
|
}
|
|
972
|
-
function
|
|
982
|
+
function pn(e2) {
|
|
973
983
|
return (t2) => {
|
|
974
|
-
let n2 =
|
|
984
|
+
let n2 = fn(e2);
|
|
975
985
|
return t2 === void 0 ? n2 : n2.expression(t2);
|
|
976
986
|
};
|
|
977
987
|
}
|
|
978
|
-
function
|
|
988
|
+
function mn(e2) {
|
|
979
989
|
let t2 = { ...e2, type: `VALUE`, value: { ...e2.value } }, n2 = { get aggregation() {
|
|
980
990
|
return t2;
|
|
981
991
|
}, sortBy(e3, r2) {
|
|
@@ -991,7 +1001,7 @@ function fn(e2) {
|
|
|
991
1001
|
} };
|
|
992
1002
|
return n2;
|
|
993
1003
|
}
|
|
994
|
-
function
|
|
1004
|
+
function hn(e2) {
|
|
995
1005
|
let t2 = { ...e2, type: `RANGE`, range: { buckets: [] } }, n2 = { get aggregation() {
|
|
996
1006
|
return t2;
|
|
997
1007
|
}, withBuckets(...e3) {
|
|
@@ -999,7 +1009,7 @@ function pn(e2) {
|
|
|
999
1009
|
} };
|
|
1000
1010
|
return n2;
|
|
1001
1011
|
}
|
|
1002
|
-
function
|
|
1012
|
+
function gn(e2) {
|
|
1003
1013
|
let t2 = { ...e2, type: `DATE_HISTOGRAM`, dateHistogram: {} }, n2 = { get aggregation() {
|
|
1004
1014
|
return t2;
|
|
1005
1015
|
}, interval(e3) {
|
|
@@ -1007,7 +1017,7 @@ function mn(e2) {
|
|
|
1007
1017
|
} };
|
|
1008
1018
|
return n2;
|
|
1009
1019
|
}
|
|
1010
|
-
function
|
|
1020
|
+
function _n(e2) {
|
|
1011
1021
|
let t2 = { ...e2, type: `SCALAR`, scalar: {} }, n2 = { get aggregation() {
|
|
1012
1022
|
return t2;
|
|
1013
1023
|
}, type(e3) {
|
|
@@ -1015,7 +1025,7 @@ function hn(e2) {
|
|
|
1015
1025
|
} };
|
|
1016
1026
|
return n2;
|
|
1017
1027
|
}
|
|
1018
|
-
function
|
|
1028
|
+
function vn(e2) {
|
|
1019
1029
|
let t2 = { ...e2, type: `NESTED`, nested: { nestedAggregations: [] } }, n2 = { get aggregation() {
|
|
1020
1030
|
return t2;
|
|
1021
1031
|
}, addNestedAggregation(e3) {
|
|
@@ -1024,30 +1034,30 @@ function gn(e2) {
|
|
|
1024
1034
|
} };
|
|
1025
1035
|
return n2;
|
|
1026
1036
|
}
|
|
1027
|
-
function
|
|
1037
|
+
function yn(e2, t2) {
|
|
1028
1038
|
let n2 = { name: e2 }, r2 = { get aggregation() {
|
|
1029
1039
|
return n2;
|
|
1030
1040
|
}, ofType(e3) {
|
|
1031
1041
|
return n2 = { ...n2, type: e3 }, r2;
|
|
1032
1042
|
}, onField(e3) {
|
|
1033
|
-
return n2 = { ...n2, fieldPath:
|
|
1043
|
+
return n2 = { ...n2, fieldPath: E(e3, t2) }, r2;
|
|
1034
1044
|
}, asValueAggregation() {
|
|
1035
|
-
return
|
|
1045
|
+
return mn(n2);
|
|
1036
1046
|
}, asRangeAggregation() {
|
|
1037
|
-
return
|
|
1047
|
+
return hn(n2);
|
|
1038
1048
|
}, asDateHistogramAggregation() {
|
|
1039
|
-
return
|
|
1049
|
+
return gn(n2);
|
|
1040
1050
|
}, asScalarAggregation() {
|
|
1041
|
-
return
|
|
1051
|
+
return _n(n2);
|
|
1042
1052
|
}, asNestedAggregation() {
|
|
1043
|
-
return
|
|
1053
|
+
return vn(n2);
|
|
1044
1054
|
} };
|
|
1045
1055
|
return r2;
|
|
1046
1056
|
}
|
|
1047
|
-
function
|
|
1048
|
-
return (t2) =>
|
|
1057
|
+
function bn(e2) {
|
|
1058
|
+
return (t2) => yn(t2, e2);
|
|
1049
1059
|
}
|
|
1050
|
-
function
|
|
1060
|
+
function xn() {
|
|
1051
1061
|
return () => {
|
|
1052
1062
|
let e2 = {}, t2 = { withFilter(n2) {
|
|
1053
1063
|
return e2 = { ...e2, filter: n2.filter }, t2;
|
|
@@ -1067,96 +1077,96 @@ function yn() {
|
|
|
1067
1077
|
return t2;
|
|
1068
1078
|
};
|
|
1069
1079
|
}
|
|
1070
|
-
function
|
|
1071
|
-
return { SearchBuilder:
|
|
1080
|
+
function Sn(e2) {
|
|
1081
|
+
return { SearchBuilder: xn(), Filter: cn(e2), Sort: ln(e2), SearchParams: pn(e2), Aggregation: bn(e2) };
|
|
1072
1082
|
}
|
|
1073
|
-
function
|
|
1083
|
+
function Cn(e2) {
|
|
1074
1084
|
return _t(Object.assign(e2, { domainToMappings: { "*.dev.wix-code.com": [{ srcPath: `/_api/categories`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/categories/v1/bulk/categories`, destPath: `/v1/bulk/categories` }, { srcPath: `/categories/v1/categories`, destPath: `/v1/categories` }], "manage._base_domain_": [{ srcPath: `/_api/categories`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/categories-service`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/categories-service`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/categories-service`, destPath: `` }], _: [{ srcPath: `/categories/v1/bulk/categories`, destPath: `/v1/bulk/categories` }, { srcPath: `/categories/v1/categories`, destPath: `/v1/categories` }] } }));
|
|
1075
1085
|
}
|
|
1076
|
-
var
|
|
1077
|
-
function
|
|
1086
|
+
var wn = `@wix/auto_sdk_categories_categories`;
|
|
1087
|
+
function Tn(e2) {
|
|
1078
1088
|
function t2({ host: t3 }) {
|
|
1079
|
-
return { entityFqdn: `wix.categories.v1.category`, method: `GET`, methodFqn: `com.wix.categories.api.v1.CategoriesService.GetCategory`, packageName:
|
|
1089
|
+
return { entityFqdn: `wix.categories.v1.category`, method: `GET`, methodFqn: `com.wix.categories.api.v1.CategoriesService.GetCategory`, packageName: wn, migrationOptions: { optInTransformResponse: true }, url: Cn({ protoPath: `/v1/categories/{categoryId}`, data: e2, host: t3 }), params: gt(e2), transformResponse: (e3) => I(e3, [{ transformFn: A, paths: [{ path: `category.createdDate` }, { path: `category.updatedDate` }, { path: `category.image.urlExpirationDate` }, { path: `category.richContentDescription.metadata.createdTimestamp` }, { path: `category.richContentDescription.metadata.updatedTimestamp` }] }, { transformFn: G, paths: [{ path: `category.richContentDescription.nodes.buttonData.styles.background.gradient.centerX` }, { path: `category.richContentDescription.nodes.buttonData.styles.background.gradient.centerY` }, { path: `category.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `category.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `category.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `category.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `category.richContentDescription.nodes.galleryData.items.image.media.duration` }, { path: `category.richContentDescription.nodes.galleryData.items.video.media.duration` }, { path: `category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration` }, { path: `category.richContentDescription.nodes.galleryData.options.item.ratio` }, { path: `category.richContentDescription.nodes.imageData.image.duration` }, { path: `category.richContentDescription.nodes.imageData.crop.x` }, { path: `category.richContentDescription.nodes.imageData.crop.y` }, { path: `category.richContentDescription.nodes.imageData.crop.width` }, { path: `category.richContentDescription.nodes.imageData.crop.height` }, { path: `category.richContentDescription.nodes.mapData.mapSettings.lat` }, { path: `category.richContentDescription.nodes.mapData.mapSettings.lng` }, { path: `category.richContentDescription.nodes.pollData.poll.image.duration` }, { path: `category.richContentDescription.nodes.pollData.poll.options.image.duration` }, { path: `category.richContentDescription.nodes.pollData.design.poll.background.image.duration` }, { path: `category.richContentDescription.nodes.appEmbedData.image.duration` }, { path: `category.richContentDescription.nodes.videoData.video.duration` }, { path: `category.richContentDescription.nodes.videoData.thumbnail.duration` }, { path: `category.richContentDescription.nodes.audioData.audio.duration` }, { path: `category.richContentDescription.nodes.audioData.coverImage.duration` }, { path: `category.richContentDescription.nodes.layoutData.backgroundImage.media.duration` }, { path: `category.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `category.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `category.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `category.richContentDescription.nodes.layoutData.backdropImage.media.duration` }, { path: `category.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `category.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `category.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `category.richContentDescription.nodes.layoutData.background.gradient.centerX` }, { path: `category.richContentDescription.nodes.layoutData.background.gradient.centerY` }, { path: `category.richContentDescription.nodes.layoutData.background.gradient.stops.position` }, { path: `category.richContentDescription.nodes.layoutData.backdrop.gradient.centerX` }, { path: `category.richContentDescription.nodes.layoutData.backdrop.gradient.centerY` }, { path: `category.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `category.richContentDescription.nodes.shapeData.shape.duration` }, { path: `category.richContentDescription.nodes.cardData.background.gradient.centerX` }, { path: `category.richContentDescription.nodes.cardData.background.gradient.centerY` }, { path: `category.richContentDescription.nodes.cardData.background.gradient.stops.position` }, { path: `category.richContentDescription.nodes.cardData.backgroundImage.media.duration` }, { path: `category.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `category.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `category.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `category.richContentDescription.nodes.tocData.fontSize` }, { path: `category.richContentDescription.nodes.tocData.itemSpacing` }, { path: `category.richContentDescription.nodes.smartBlockCellData.shape.duration` }] }]) };
|
|
1080
1090
|
}
|
|
1081
1091
|
return t2;
|
|
1082
1092
|
}
|
|
1083
1093
|
var Z = ((e2) => (e2.BREADCRUMBS_INFO = `BREADCRUMBS_INFO`, e2.DESCRIPTION = `DESCRIPTION`, e2.RICH_CONTENT_DESCRIPTION = `RICH_CONTENT_DESCRIPTION`, e2))(Z || {});
|
|
1084
|
-
async function
|
|
1085
|
-
let { httpClient: r2, sideEffects: i2 } = arguments[3], a2 =
|
|
1094
|
+
async function En(e2, t2, n2) {
|
|
1095
|
+
let { httpClient: r2, sideEffects: i2 } = arguments[3], a2 = Tn(Ke({ categoryId: e2, treeReference: t2, fields: n2?.fields }, []));
|
|
1086
1096
|
i2?.onSiteCall?.();
|
|
1087
1097
|
try {
|
|
1088
1098
|
let e3 = await r2.request(a2);
|
|
1089
|
-
return i2?.onSuccess?.(e3), k(
|
|
1099
|
+
return i2?.onSuccess?.(e3), k(I(e3.data, [{ transformFn: Y, paths: [{ path: `category.image` }] }]), [`category.richContentDescription`])?.category;
|
|
1090
1100
|
} catch (e3) {
|
|
1091
1101
|
let t3 = st(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { categoryId: `$[0]`, treeReference: `$[1]`, fields: `$[2].fields` }, singleArgumentUnchanged: false }, [`categoryId`, `treeReference`, `options`]);
|
|
1092
1102
|
throw i2?.onError?.(e3), t3;
|
|
1093
1103
|
}
|
|
1094
1104
|
}
|
|
1095
|
-
({ ...
|
|
1096
|
-
function
|
|
1097
|
-
return (t2, n2, r2) =>
|
|
1098
|
-
}
|
|
1099
|
-
var
|
|
1100
|
-
var
|
|
1101
|
-
var
|
|
1102
|
-
var
|
|
1103
|
-
var
|
|
1104
|
-
var
|
|
1105
|
-
var
|
|
1106
|
-
var
|
|
1107
|
-
|
|
1108
|
-
function
|
|
1105
|
+
({ ...dn() }, { ...Sn() });
|
|
1106
|
+
function Dn(e2) {
|
|
1107
|
+
return (t2, n2, r2) => En(t2, n2, r2, { httpClient: e2 });
|
|
1108
|
+
}
|
|
1109
|
+
var On = l(`wix.categories.v1.category_category_moved`, true, (e2) => k(I(e2, [{ transformFn: A, paths: [{ path: `metadata.eventTime` }] }])))();
|
|
1110
|
+
var kn = l(`wix.categories.v1.category_created`, true, (e2) => k(I(e2, [{ transformFn: A, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.richContentDescription.metadata.createdTimestamp` }, { path: `entity.richContentDescription.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: Y, paths: [{ path: `entity.image` }] }, { transformFn: G, paths: [{ path: `entity.richContentDescription.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.richContentDescription.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.galleryData.items.image.media.duration` }, { path: `entity.richContentDescription.nodes.galleryData.items.video.media.duration` }, { path: `entity.richContentDescription.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.richContentDescription.nodes.galleryData.options.item.ratio` }, { path: `entity.richContentDescription.nodes.imageData.image.duration` }, { path: `entity.richContentDescription.nodes.imageData.crop.x` }, { path: `entity.richContentDescription.nodes.imageData.crop.y` }, { path: `entity.richContentDescription.nodes.imageData.crop.width` }, { path: `entity.richContentDescription.nodes.imageData.crop.height` }, { path: `entity.richContentDescription.nodes.mapData.mapSettings.lat` }, { path: `entity.richContentDescription.nodes.mapData.mapSettings.lng` }, { path: `entity.richContentDescription.nodes.pollData.poll.image.duration` }, { path: `entity.richContentDescription.nodes.pollData.poll.options.image.duration` }, { path: `entity.richContentDescription.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.richContentDescription.nodes.appEmbedData.image.duration` }, { path: `entity.richContentDescription.nodes.videoData.video.duration` }, { path: `entity.richContentDescription.nodes.videoData.thumbnail.duration` }, { path: `entity.richContentDescription.nodes.audioData.audio.duration` }, { path: `entity.richContentDescription.nodes.audioData.coverImage.duration` }, { path: `entity.richContentDescription.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.layoutData.background.gradient.centerX` }, { path: `entity.richContentDescription.nodes.layoutData.background.gradient.centerY` }, { path: `entity.richContentDescription.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.richContentDescription.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.shapeData.shape.duration` }, { path: `entity.richContentDescription.nodes.cardData.background.gradient.centerX` }, { path: `entity.richContentDescription.nodes.cardData.background.gradient.centerY` }, { path: `entity.richContentDescription.nodes.cardData.background.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.tocData.fontSize` }, { path: `entity.richContentDescription.nodes.tocData.itemSpacing` }, { path: `entity.richContentDescription.nodes.smartBlockCellData.shape.duration` }] }])))();
|
|
1111
|
+
var An = l(`wix.categories.v1.category_deleted`, true, (e2) => k(I(e2, [{ transformFn: A, paths: [{ path: `undefined.createdDate` }, { path: `undefined.updatedDate` }, { path: `undefined.richContentDescription.metadata.createdTimestamp` }, { path: `undefined.richContentDescription.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: Y, paths: [{ path: `undefined.image` }] }, { transformFn: G, paths: [{ path: `undefined.richContentDescription.nodes.buttonData.styles.background.gradient.centerX` }, { path: `undefined.richContentDescription.nodes.buttonData.styles.background.gradient.centerY` }, { path: `undefined.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `undefined.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `undefined.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `undefined.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `undefined.richContentDescription.nodes.galleryData.items.image.media.duration` }, { path: `undefined.richContentDescription.nodes.galleryData.items.video.media.duration` }, { path: `undefined.richContentDescription.nodes.galleryData.items.video.thumbnail.duration` }, { path: `undefined.richContentDescription.nodes.galleryData.options.item.ratio` }, { path: `undefined.richContentDescription.nodes.imageData.image.duration` }, { path: `undefined.richContentDescription.nodes.imageData.crop.x` }, { path: `undefined.richContentDescription.nodes.imageData.crop.y` }, { path: `undefined.richContentDescription.nodes.imageData.crop.width` }, { path: `undefined.richContentDescription.nodes.imageData.crop.height` }, { path: `undefined.richContentDescription.nodes.mapData.mapSettings.lat` }, { path: `undefined.richContentDescription.nodes.mapData.mapSettings.lng` }, { path: `undefined.richContentDescription.nodes.pollData.poll.image.duration` }, { path: `undefined.richContentDescription.nodes.pollData.poll.options.image.duration` }, { path: `undefined.richContentDescription.nodes.pollData.design.poll.background.image.duration` }, { path: `undefined.richContentDescription.nodes.appEmbedData.image.duration` }, { path: `undefined.richContentDescription.nodes.videoData.video.duration` }, { path: `undefined.richContentDescription.nodes.videoData.thumbnail.duration` }, { path: `undefined.richContentDescription.nodes.audioData.audio.duration` }, { path: `undefined.richContentDescription.nodes.audioData.coverImage.duration` }, { path: `undefined.richContentDescription.nodes.layoutData.backgroundImage.media.duration` }, { path: `undefined.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `undefined.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `undefined.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `undefined.richContentDescription.nodes.layoutData.backdropImage.media.duration` }, { path: `undefined.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `undefined.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `undefined.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `undefined.richContentDescription.nodes.layoutData.background.gradient.centerX` }, { path: `undefined.richContentDescription.nodes.layoutData.background.gradient.centerY` }, { path: `undefined.richContentDescription.nodes.layoutData.background.gradient.stops.position` }, { path: `undefined.richContentDescription.nodes.layoutData.backdrop.gradient.centerX` }, { path: `undefined.richContentDescription.nodes.layoutData.backdrop.gradient.centerY` }, { path: `undefined.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `undefined.richContentDescription.nodes.shapeData.shape.duration` }, { path: `undefined.richContentDescription.nodes.cardData.background.gradient.centerX` }, { path: `undefined.richContentDescription.nodes.cardData.background.gradient.centerY` }, { path: `undefined.richContentDescription.nodes.cardData.background.gradient.stops.position` }, { path: `undefined.richContentDescription.nodes.cardData.backgroundImage.media.duration` }, { path: `undefined.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `undefined.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `undefined.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `undefined.richContentDescription.nodes.tocData.fontSize` }, { path: `undefined.richContentDescription.nodes.tocData.itemSpacing` }, { path: `undefined.richContentDescription.nodes.smartBlockCellData.shape.duration` }] }])))();
|
|
1112
|
+
var jn = l(`wix.categories.v1.category_item_added_to_category`, true, (e2) => k(I(e2, [{ transformFn: A, paths: [{ path: `metadata.eventTime` }] }])))();
|
|
1113
|
+
var Mn = l(`wix.categories.v1.category_item_removed_from_category`, true, (e2) => k(I(e2, [{ transformFn: A, paths: [{ path: `metadata.eventTime` }] }])))();
|
|
1114
|
+
var Nn = l(`wix.categories.v1.category_items_arranged_in_category`, true, (e2) => k(I(e2, [{ transformFn: A, paths: [{ path: `metadata.eventTime` }] }])))();
|
|
1115
|
+
var Pn = l(`wix.categories.v1.category_updated`, true, (e2) => k(I(e2, [{ transformFn: A, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.richContentDescription.metadata.createdTimestamp` }, { path: `entity.richContentDescription.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.richContentDescription.metadata.createdTimestamp` }, { path: `modifiedFields.richContentDescription.metadata.updatedTimestamp` }] }, { transformFn: Y, paths: [{ path: `entity.image` }, { path: `modifiedFields.image` }] }, { transformFn: G, paths: [{ path: `entity.richContentDescription.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.richContentDescription.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.galleryData.items.image.media.duration` }, { path: `entity.richContentDescription.nodes.galleryData.items.video.media.duration` }, { path: `entity.richContentDescription.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.richContentDescription.nodes.galleryData.options.item.ratio` }, { path: `entity.richContentDescription.nodes.imageData.image.duration` }, { path: `entity.richContentDescription.nodes.imageData.crop.x` }, { path: `entity.richContentDescription.nodes.imageData.crop.y` }, { path: `entity.richContentDescription.nodes.imageData.crop.width` }, { path: `entity.richContentDescription.nodes.imageData.crop.height` }, { path: `entity.richContentDescription.nodes.mapData.mapSettings.lat` }, { path: `entity.richContentDescription.nodes.mapData.mapSettings.lng` }, { path: `entity.richContentDescription.nodes.pollData.poll.image.duration` }, { path: `entity.richContentDescription.nodes.pollData.poll.options.image.duration` }, { path: `entity.richContentDescription.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.richContentDescription.nodes.appEmbedData.image.duration` }, { path: `entity.richContentDescription.nodes.videoData.video.duration` }, { path: `entity.richContentDescription.nodes.videoData.thumbnail.duration` }, { path: `entity.richContentDescription.nodes.audioData.audio.duration` }, { path: `entity.richContentDescription.nodes.audioData.coverImage.duration` }, { path: `entity.richContentDescription.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.layoutData.background.gradient.centerX` }, { path: `entity.richContentDescription.nodes.layoutData.background.gradient.centerY` }, { path: `entity.richContentDescription.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.richContentDescription.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.shapeData.shape.duration` }, { path: `entity.richContentDescription.nodes.cardData.background.gradient.centerX` }, { path: `entity.richContentDescription.nodes.cardData.background.gradient.centerY` }, { path: `entity.richContentDescription.nodes.cardData.background.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.richContentDescription.nodes.tocData.fontSize` }, { path: `entity.richContentDescription.nodes.tocData.itemSpacing` }, { path: `entity.richContentDescription.nodes.smartBlockCellData.shape.duration` }, { path: `modifiedFields.richContentDescription.nodes.buttonData.styles.background.gradient.centerX` }, { path: `modifiedFields.richContentDescription.nodes.buttonData.styles.background.gradient.centerY` }, { path: `modifiedFields.richContentDescription.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `modifiedFields.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `modifiedFields.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `modifiedFields.richContentDescription.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `modifiedFields.richContentDescription.nodes.galleryData.items.image.media.duration` }, { path: `modifiedFields.richContentDescription.nodes.galleryData.items.video.media.duration` }, { path: `modifiedFields.richContentDescription.nodes.galleryData.items.video.thumbnail.duration` }, { path: `modifiedFields.richContentDescription.nodes.galleryData.options.item.ratio` }, { path: `modifiedFields.richContentDescription.nodes.imageData.image.duration` }, { path: `modifiedFields.richContentDescription.nodes.imageData.crop.x` }, { path: `modifiedFields.richContentDescription.nodes.imageData.crop.y` }, { path: `modifiedFields.richContentDescription.nodes.imageData.crop.width` }, { path: `modifiedFields.richContentDescription.nodes.imageData.crop.height` }, { path: `modifiedFields.richContentDescription.nodes.mapData.mapSettings.lat` }, { path: `modifiedFields.richContentDescription.nodes.mapData.mapSettings.lng` }, { path: `modifiedFields.richContentDescription.nodes.pollData.poll.image.duration` }, { path: `modifiedFields.richContentDescription.nodes.pollData.poll.options.image.duration` }, { path: `modifiedFields.richContentDescription.nodes.pollData.design.poll.background.image.duration` }, { path: `modifiedFields.richContentDescription.nodes.appEmbedData.image.duration` }, { path: `modifiedFields.richContentDescription.nodes.videoData.video.duration` }, { path: `modifiedFields.richContentDescription.nodes.videoData.thumbnail.duration` }, { path: `modifiedFields.richContentDescription.nodes.audioData.audio.duration` }, { path: `modifiedFields.richContentDescription.nodes.audioData.coverImage.duration` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backgroundImage.media.duration` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backdropImage.media.duration` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.background.gradient.centerX` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.background.gradient.centerY` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.background.gradient.stops.position` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backdrop.gradient.centerX` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backdrop.gradient.centerY` }, { path: `modifiedFields.richContentDescription.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `modifiedFields.richContentDescription.nodes.shapeData.shape.duration` }, { path: `modifiedFields.richContentDescription.nodes.cardData.background.gradient.centerX` }, { path: `modifiedFields.richContentDescription.nodes.cardData.background.gradient.centerY` }, { path: `modifiedFields.richContentDescription.nodes.cardData.background.gradient.stops.position` }, { path: `modifiedFields.richContentDescription.nodes.cardData.backgroundImage.media.duration` }, { path: `modifiedFields.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.richContentDescription.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.richContentDescription.nodes.tocData.fontSize` }, { path: `modifiedFields.richContentDescription.nodes.tocData.itemSpacing` }, { path: `modifiedFields.richContentDescription.nodes.smartBlockCellData.shape.duration` }] }])))();
|
|
1116
|
+
var Fn = ht(Dn);
|
|
1117
|
+
W(On), W(kn), W(An), W(jn), W(Mn), W(Nn), W(Pn);
|
|
1118
|
+
function In(e2) {
|
|
1109
1119
|
if (!e2) return null;
|
|
1110
1120
|
let t2 = e2.match(/image:\/\/v1\/([^/#]+)/);
|
|
1111
1121
|
return t2?.[1] ? t2[1] : e2.match(/\/media\/([^/]+)/)?.[1] ?? null;
|
|
1112
1122
|
}
|
|
1113
|
-
function
|
|
1123
|
+
function Ln(e2) {
|
|
1114
1124
|
if (!e2) return null;
|
|
1115
1125
|
let t2 = e2.match(/#originWidth=(\d+)&originHeight=(\d+)/);
|
|
1116
1126
|
return t2 ? { width: parseInt(t2[1], 10), height: parseInt(t2[2], 10) } : null;
|
|
1117
1127
|
}
|
|
1118
|
-
var
|
|
1119
|
-
var
|
|
1120
|
-
var
|
|
1128
|
+
var Rn = (e2) => `/category/${e2}`;
|
|
1129
|
+
var zn = (e2) => ({ ...e2, nodes: e2.nodes ?? [] });
|
|
1130
|
+
var Bn = (e2) => {
|
|
1121
1131
|
if (!e2) return;
|
|
1122
|
-
let t2 =
|
|
1123
|
-
return { uri:
|
|
1132
|
+
let t2 = Ln(e2);
|
|
1133
|
+
return { uri: In(e2) ?? void 0, url: e2, width: t2?.width, height: t2?.height };
|
|
1124
1134
|
};
|
|
1125
|
-
var
|
|
1135
|
+
var Vn = (e2) => e2.filter((e3) => e3.categoryId).map((e3) => {
|
|
1126
1136
|
let t2 = e3.categorySlug ?? ``;
|
|
1127
|
-
return { id: e3.categoryId ?? ``, name: e3.categoryName ?? ``, slug: t2, href:
|
|
1137
|
+
return { id: e3.categoryId ?? ``, name: e3.categoryName ?? ``, slug: t2, href: Rn(t2) };
|
|
1128
1138
|
});
|
|
1129
|
-
var
|
|
1130
|
-
var
|
|
1139
|
+
var Hn = (e2) => ({ type: e2.type, props: e2.props ?? void 0, meta: e2.meta ?? void 0, children: e2.children, custom: e2.custom, disabled: e2.disabled });
|
|
1140
|
+
var Un = (e2) => {
|
|
1131
1141
|
if (e2) return { preventAutoRedirect: e2.preventAutoRedirect, keywords: e2.keywords?.map((e3) => ({ term: e3.term, isMain: e3.isMain, origin: e3.origin ?? void 0 })) };
|
|
1132
1142
|
};
|
|
1133
|
-
var
|
|
1134
|
-
if (e2) return { tags: e2.tags?.map(
|
|
1143
|
+
var Wn = (e2) => {
|
|
1144
|
+
if (e2) return { tags: e2.tags?.map(Hn), settings: Un(e2.settings) };
|
|
1135
1145
|
};
|
|
1136
|
-
function
|
|
1137
|
-
return { id: e2._id ?? ``, name: e2.name ?? ``, slug: e2.slug ?? ``, description: e2.description ?? void 0, itemCounter: e2.itemCounter, parentCategoryId: e2.parentCategory?._id ?? void 0, seoData:
|
|
1146
|
+
function Gn(e2) {
|
|
1147
|
+
return { id: e2._id ?? ``, name: e2.name ?? ``, slug: e2.slug ?? ``, description: e2.description ?? void 0, itemCounter: e2.itemCounter, parentCategoryId: e2.parentCategory?._id ?? void 0, seoData: Wn(e2.seoData), richContentDescription: e2.richContentDescription ? zn(e2.richContentDescription) : void 0, image: Bn(e2.image), breadcrumbs: Vn(e2.breadcrumbsInfo?.breadcrumbs ?? []) };
|
|
1138
1148
|
}
|
|
1139
|
-
var
|
|
1140
|
-
var
|
|
1141
|
-
var
|
|
1149
|
+
var Kn = { appNamespace: `@wix/stores`, treeKey: null };
|
|
1150
|
+
var qn = [Z.BREADCRUMBS_INFO, Z.DESCRIPTION, Z.RICH_CONTENT_DESCRIPTION];
|
|
1151
|
+
var Jn = (e2, t2) => {
|
|
1142
1152
|
if (!e2?._id || e2.visible === false) throw Error(t2);
|
|
1143
|
-
return
|
|
1153
|
+
return Gn(e2);
|
|
1144
1154
|
};
|
|
1145
|
-
async function
|
|
1146
|
-
return
|
|
1155
|
+
async function Yn(e2) {
|
|
1156
|
+
return Jn(await Fn(e2, Kn, { fields: qn }), `Category not found for id: ${e2}`);
|
|
1147
1157
|
}
|
|
1148
|
-
var
|
|
1149
|
-
function
|
|
1150
|
-
return
|
|
1158
|
+
var Xn = `wixstores-storefront-builder:category-info-context-data`;
|
|
1159
|
+
function Zn(e2) {
|
|
1160
|
+
return sn(`${Xn}:${e2}`, () => Yn(e2));
|
|
1151
1161
|
}
|
|
1152
|
-
var
|
|
1162
|
+
var Qn = J(`@wix/site-service-url`);
|
|
1153
1163
|
var Q = `215238eb-22a5-4c36-9e7b-e7c08025e04e`;
|
|
1154
1164
|
`${Q}`, `${Q}`;
|
|
1155
|
-
var
|
|
1165
|
+
var $n = function(e2) {
|
|
1156
1166
|
return e2.SIDE_CART = `ecom_side_cart`, e2.CART = `shopping_cart`, e2.CHECKOUT = `checkout`, e2.PRODUCT_PAGE = `product-page-builder`, e2.CATEGORY_PAGE = `category-page-builder`, e2;
|
|
1157
1167
|
}({});
|
|
1158
|
-
var
|
|
1159
|
-
let e2 = (0, import_services_manager_react.useService)(
|
|
1168
|
+
var er = () => {
|
|
1169
|
+
let e2 = (0, import_services_manager_react.useService)(Qn), t2 = (0, import_react.useCallback)((t3, n2) => {
|
|
1160
1170
|
let r2 = e2.appSectionRelativeUrl(Q, t3, true);
|
|
1161
1171
|
if (r2) return `./${r2.replace(/^\//, ``).replace(/\/$/, ``)}/${encodeURIComponent(n2)}`;
|
|
1162
1172
|
}, [e2]);
|
|
@@ -1165,33 +1175,33 @@ var Qn = () => {
|
|
|
1165
1175
|
if (i2) return new URL(i2, `${e2.siteUrl.replace(/\/$/, ``)}/`).href;
|
|
1166
1176
|
}, [t2, e2]) };
|
|
1167
1177
|
};
|
|
1168
|
-
function
|
|
1169
|
-
let { getPageAbsoluteUrl: t2 } =
|
|
1178
|
+
function tr(e2) {
|
|
1179
|
+
let { getPageAbsoluteUrl: t2 } = er(), n2 = (0, import_react.useMemo)(() => {
|
|
1170
1180
|
if (!e2.slug) return;
|
|
1171
|
-
let n3 = t2(
|
|
1181
|
+
let n3 = t2($n.CATEGORY_PAGE, e2.slug);
|
|
1172
1182
|
return n3 ? { href: n3 } : void 0;
|
|
1173
1183
|
}, [e2.slug, t2]);
|
|
1174
1184
|
return (0, import_react.useMemo)(() => ({ id: e2.id, name: e2.name, slug: e2.slug, link: n2, description: e2.description, richContentDescription: e2.richContentDescription, image: e2.image, breadcrumbs: e2.breadcrumbs }), [e2, n2]);
|
|
1175
1185
|
}
|
|
1176
1186
|
var $ = (0, import_react.createContext)(null);
|
|
1177
1187
|
$.displayName = `CategoryInfoContext`;
|
|
1178
|
-
function
|
|
1188
|
+
function nr() {
|
|
1179
1189
|
let e2 = (0, import_react.useContext)($);
|
|
1180
1190
|
if (!e2) throw Error(`useCategoryInfoContext must be used within a category info context provider`);
|
|
1181
1191
|
return e2;
|
|
1182
1192
|
}
|
|
1183
|
-
function
|
|
1184
|
-
let n2 =
|
|
1193
|
+
function rr({ categoryPromise: e2, children: t2 }) {
|
|
1194
|
+
let n2 = tr(en(e2));
|
|
1185
1195
|
return (0, import_jsx_runtime.jsx)($.Provider, { value: n2, children: t2 });
|
|
1186
1196
|
}
|
|
1187
|
-
function
|
|
1188
|
-
let r2 =
|
|
1189
|
-
return (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: null, children: (0, import_jsx_runtime.jsx)(
|
|
1197
|
+
function ir({ categoryId: t2, children: n2 }) {
|
|
1198
|
+
let r2 = Zn(t2);
|
|
1199
|
+
return (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: null, children: (0, import_jsx_runtime.jsx)(rr, { categoryPromise: r2, children: n2 }) });
|
|
1190
1200
|
}
|
|
1191
|
-
function
|
|
1192
|
-
return t2 === void 0 ? n2 ? (0, import_jsx_runtime.jsx)(
|
|
1201
|
+
function ar({ children: e2, value: t2, categoryId: n2 }) {
|
|
1202
|
+
return t2 === void 0 ? n2 ? (0, import_jsx_runtime.jsx)(ir, { categoryId: n2, children: e2 }, n2) : null : (0, import_jsx_runtime.jsx)($.Provider, { value: t2, children: e2 });
|
|
1193
1203
|
}
|
|
1194
|
-
var
|
|
1204
|
+
var or = $t(`0d8869b2-7691-4ee2-9d0b-90d72f34edd0`);
|
|
1195
1205
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1196
1206
|
0 && (module.exports = {
|
|
1197
1207
|
CategoryInfoContextProvider,
|