@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// context-runtime/context-category-by-id/runtime.js
|
|
2
2
|
import * as e from "react";
|
|
3
3
|
import { Suspense as t, useCallback as n, useMemo as r, useRef as i, useState as a, useSyncExternalStore as o } from "react";
|
|
4
4
|
import { jsx as s } from "react/jsx-runtime";
|
|
@@ -3366,74 +3366,85 @@ function Ws(e2) {
|
|
|
3366
3366
|
let t2 = Object.entries(e2.customizationIdToChoiceIds ?? {}).filter(([, e3]) => e3.length > 0).map(([e3, t3]) => Us(e3, t3)).toSorted().join(`;`), n2 = [];
|
|
3367
3367
|
return e2.priceMin !== void 0 && n2.push(`min:${e2.priceMin}`), e2.priceMax !== void 0 && n2.push(`max:${e2.priceMax}`), t2 && n2.push(t2), n2.join(`&`);
|
|
3368
3368
|
}
|
|
3369
|
-
|
|
3370
|
-
|
|
3369
|
+
var Gs = oi(`@wix/site-service-locale`);
|
|
3370
|
+
var Ks = oi(`@wix/viewer-service-multilingual`);
|
|
3371
|
+
function qs() {
|
|
3372
|
+
let e2 = u(), t2 = d(Gs), n2;
|
|
3373
|
+
try {
|
|
3374
|
+
n2 = e2(Ks);
|
|
3375
|
+
} catch {
|
|
3376
|
+
}
|
|
3377
|
+
return n2?.multilingualEnabled && n2.currentLocale?.languageCode || t2.language;
|
|
3378
|
+
}
|
|
3379
|
+
function Js(e2, t2, a2, o2, s2, c2) {
|
|
3380
|
+
let l2 = qs(), u2 = Ws(a2), d2 = `${u2}:${o2}:${s2}`, f2 = u2 === c2.filterSelectionKey && o2 === c2.sortType && s2 === c2.productsPerPage ? { pages: [c2.page], pageParams: [void 0] } : void 0, p2 = i(new Map(Object.entries(c2.productGroupByGroupId))), { data: m2, isFetching: h2, isError: ee2, hasNextPage: g2, fetchNextPage: _2 } = ai({ queryKey: [`category-products`, l2, e2, u2, o2, s2], queryFn: async ({ pageParam: n2 }) => {
|
|
3371
3381
|
let r2 = await Ns({ categoryId: e2, filters: t2, filterSelection: a2, sortType: o2, productsPerPage: s2, cursor: n2 });
|
|
3372
|
-
return (await Hs(r2.products,
|
|
3373
|
-
}, initialPageParam: void 0, getNextPageParam: (e3) => e3.hasNext ? e3.nextCursor : void 0, initialData:
|
|
3374
|
-
await
|
|
3375
|
-
}, [
|
|
3376
|
-
return { products: r(() => (
|
|
3382
|
+
return (await Hs(r2.products, p2.current)).forEach((e3, t3) => p2.current.set(t3, e3)), r2;
|
|
3383
|
+
}, initialPageParam: void 0, getNextPageParam: (e3) => e3.hasNext ? e3.nextCursor : void 0, initialData: f2, staleTime: 1 / 0, placeholderData: $n, retry: false }), te2 = n(async () => {
|
|
3384
|
+
await _2({ cancelRefetch: false });
|
|
3385
|
+
}, [_2]);
|
|
3386
|
+
return { products: r(() => (m2?.pages ?? []).flatMap((e3) => e3.products), [m2]), productGroupByGroupId: p2.current, productListKey: d2, productCount: m2?.pages[0]?.productCount ?? 0, isLoadingProducts: h2, hasProductsError: ee2, hasMoreProducts: g2, loadMoreProducts: te2 };
|
|
3377
3387
|
}
|
|
3378
|
-
function
|
|
3388
|
+
function Ys(e2, t2) {
|
|
3379
3389
|
let n2 = new Set(e2.map((e3) => e3.id));
|
|
3380
3390
|
return [...new Set(t2.values())].filter((e3) => !n2.has(e3));
|
|
3381
3391
|
}
|
|
3382
|
-
function
|
|
3392
|
+
function Xs(e2, t2, n2) {
|
|
3383
3393
|
let r2 = new Map([...e2, ...t2].map((e3) => [e3.id, e3])), i2 = /* @__PURE__ */ new Map();
|
|
3384
3394
|
return n2.forEach((e3, t3) => {
|
|
3385
3395
|
let n3 = r2.get(e3);
|
|
3386
3396
|
n3 && i2.set(t3, n3);
|
|
3387
3397
|
}), i2;
|
|
3388
3398
|
}
|
|
3389
|
-
function
|
|
3390
|
-
|
|
3399
|
+
function Zs(e2) {
|
|
3400
|
+
let t2 = qs();
|
|
3401
|
+
return ri({ queries: e2.map((e3) => ({ queryKey: [`sibling-product`, t2, e3], queryFn: () => js(e3), staleTime: 1 / 0, retry: false })) }).flatMap(({ data: e3 }) => e3 ? [e3] : []);
|
|
3391
3402
|
}
|
|
3392
|
-
function
|
|
3393
|
-
return
|
|
3403
|
+
function Qs(e2, t2) {
|
|
3404
|
+
return Xs(e2, Zs(r(() => Ys(e2, t2), [e2, t2])), t2);
|
|
3394
3405
|
}
|
|
3395
|
-
function
|
|
3406
|
+
function $s({ products: e2, productListKey: t2 }) {
|
|
3396
3407
|
let [i2, o2] = a(() => /* @__PURE__ */ new Map()), [s2, c2] = a(t2);
|
|
3397
3408
|
s2 !== t2 && (c2(t2), o2(/* @__PURE__ */ new Map()));
|
|
3398
|
-
let l2 =
|
|
3409
|
+
let l2 = Qs(e2, i2);
|
|
3399
3410
|
return { displayedProducts: r(() => e2.map((e3, t3) => l2.get(t3) ?? e3), [e2, l2]), selectProductGroupMember: n((t3, n2) => {
|
|
3400
3411
|
let r2 = e2[t3];
|
|
3401
|
-
r2 && o2((e3) =>
|
|
3412
|
+
r2 && o2((e3) => ec(e3, t3, n2, r2.id));
|
|
3402
3413
|
}, [e2]) };
|
|
3403
3414
|
}
|
|
3404
|
-
function
|
|
3415
|
+
function ec(e2, t2, n2, r2) {
|
|
3405
3416
|
let i2 = new Map(e2);
|
|
3406
3417
|
return n2 === r2 ? i2.delete(t2) : i2.set(t2, n2), i2;
|
|
3407
3418
|
}
|
|
3408
|
-
function
|
|
3419
|
+
function tc({ products: e2, productGroupByGroupId: t2, defaultLocationId: n2, selectProductGroupMember: a2 }) {
|
|
3409
3420
|
let o2 = i([]);
|
|
3410
3421
|
return r(() => {
|
|
3411
3422
|
if (t2.size === 0) return e2.map((e3) => ({ product: e3, defaultLocationId: n2 }));
|
|
3412
|
-
let r2 =
|
|
3423
|
+
let r2 = nc({ displayedProducts: e2, previousProductItems: o2.current, productGroupByGroupId: t2, defaultLocationId: n2, selectProductGroupMember: a2 });
|
|
3413
3424
|
return o2.current = r2, r2;
|
|
3414
3425
|
}, [e2, t2, n2, a2]);
|
|
3415
3426
|
}
|
|
3416
|
-
function
|
|
3427
|
+
function nc({ displayedProducts: e2, previousProductItems: t2, productGroupByGroupId: n2, defaultLocationId: r2, selectProductGroupMember: i2 }) {
|
|
3417
3428
|
return e2.map((e3, a2) => {
|
|
3418
3429
|
let o2 = t2[a2];
|
|
3419
|
-
return o2?.product === e3 ? o2 :
|
|
3430
|
+
return o2?.product === e3 ? o2 : rc({ product: e3, productItemIndex: a2, productGroupByGroupId: n2, defaultLocationId: r2, selectProductGroupMember: i2 });
|
|
3420
3431
|
});
|
|
3421
3432
|
}
|
|
3422
|
-
function
|
|
3423
|
-
let a2 =
|
|
3433
|
+
function rc({ product: e2, productItemIndex: t2, productGroupByGroupId: n2, defaultLocationId: r2, selectProductGroupMember: i2 }) {
|
|
3434
|
+
let a2 = ic({ productGroup: e2.productGroupId ? n2.get(e2.productGroupId) : void 0, productItemIndex: t2, selectProductGroupMember: i2 });
|
|
3424
3435
|
return { product: e2, defaultLocationId: r2, ...a2 && { productGroupData: a2 } };
|
|
3425
3436
|
}
|
|
3426
|
-
function
|
|
3437
|
+
function ic({ productGroup: e2, productItemIndex: t2, selectProductGroupMember: n2 }) {
|
|
3427
3438
|
if (e2) return { productGroup: e2, selectProductGroupMember: (r2) => {
|
|
3428
3439
|
e2.members.some((e3) => e3.productId === r2) && n2(t2, r2);
|
|
3429
3440
|
} };
|
|
3430
3441
|
}
|
|
3431
|
-
function
|
|
3432
|
-
let { category: n2, filters: i2, currency: a2, promotions: o2, initialProductList: s2, defaultLocationId: c2 } = e2, l2 = No(i2), u2 = Ho(), { products: d2, productGroupByGroupId: f2, productListKey: p2, ...m2 } =
|
|
3433
|
-
return { filters: i2, currency: a2, productItems:
|
|
3442
|
+
function ac(e2, t2) {
|
|
3443
|
+
let { category: n2, filters: i2, currency: a2, promotions: o2, initialProductList: s2, defaultLocationId: c2 } = e2, l2 = No(i2), u2 = Ho(), { products: d2, productGroupByGroupId: f2, productListKey: p2, ...m2 } = Js(n2.id, i2, l2.filterSelection, u2.selectedSortType, t2, s2), h2 = $s({ products: d2, productListKey: p2 });
|
|
3444
|
+
return { filters: i2, currency: a2, productItems: tc({ products: f2.size > 0 ? h2.displayedProducts : d2, productGroupByGroupId: f2, defaultLocationId: c2, selectProductGroupMember: h2.selectProductGroupMember }), promotionItems: r(() => o2.map((e3) => ({ promotion: e3 })), [o2]), ...l2, ...u2, ...m2 };
|
|
3434
3445
|
}
|
|
3435
|
-
var
|
|
3436
|
-
async function
|
|
3446
|
+
var oc = oi(`@wix/site-service-warmup-data`);
|
|
3447
|
+
async function sc(e2, t2, n2) {
|
|
3437
3448
|
let r2 = typeof window > `u`;
|
|
3438
3449
|
if (!r2 && e2) try {
|
|
3439
3450
|
let n3 = await e2.get(t2);
|
|
@@ -3447,34 +3458,34 @@ async function ic(e2, t2, n2) {
|
|
|
3447
3458
|
}
|
|
3448
3459
|
return i2;
|
|
3449
3460
|
}
|
|
3450
|
-
function
|
|
3451
|
-
let n2 = u(),
|
|
3452
|
-
|
|
3461
|
+
function cc(e2, t2) {
|
|
3462
|
+
let n2 = u(), i2 = qs();
|
|
3463
|
+
return r(() => {
|
|
3464
|
+
let r2;
|
|
3453
3465
|
try {
|
|
3454
|
-
|
|
3466
|
+
r2 = n2(oc);
|
|
3455
3467
|
} catch {
|
|
3456
|
-
|
|
3468
|
+
r2 = null;
|
|
3457
3469
|
}
|
|
3458
|
-
return
|
|
3459
|
-
});
|
|
3460
|
-
return r2;
|
|
3470
|
+
return sc(r2, `${e2}:${i2}`, t2);
|
|
3471
|
+
}, [i2]);
|
|
3461
3472
|
}
|
|
3462
|
-
async function
|
|
3473
|
+
async function lc() {
|
|
3463
3474
|
return (await co().eq(`defaultLocation`, true).find()).items?.[0]?._id ?? void 0;
|
|
3464
3475
|
}
|
|
3465
|
-
function
|
|
3476
|
+
function uc(e2) {
|
|
3466
3477
|
return k(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` }] } }));
|
|
3467
3478
|
}
|
|
3468
|
-
var
|
|
3469
|
-
function
|
|
3479
|
+
var dc = `@wix/auto_sdk_categories_categories`;
|
|
3480
|
+
function fc(e2) {
|
|
3470
3481
|
function t2({ host: t3 }) {
|
|
3471
|
-
return { entityFqdn: `wix.categories.v1.category`, method: `GET`, methodFqn: `com.wix.categories.api.v1.CategoriesService.GetCategory`, packageName:
|
|
3482
|
+
return { entityFqdn: `wix.categories.v1.category`, method: `GET`, methodFqn: `com.wix.categories.api.v1.CategoriesService.GetCategory`, packageName: dc, migrationOptions: { optInTransformResponse: true }, url: uc({ protoPath: `/v1/categories/{categoryId}`, data: e2, host: t3 }), params: O(e2), transformResponse: (e3) => T(e3, [{ transformFn: w, paths: [{ path: `category.createdDate` }, { path: `category.updatedDate` }, { path: `category.image.urlExpirationDate` }, { path: `category.richContentDescription.metadata.createdTimestamp` }, { path: `category.richContentDescription.metadata.updatedTimestamp` }] }, { transformFn: j, 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` }] }]) };
|
|
3472
3483
|
}
|
|
3473
3484
|
return t2;
|
|
3474
3485
|
}
|
|
3475
|
-
var
|
|
3476
|
-
async function
|
|
3477
|
-
let { httpClient: r2, sideEffects: i2 } = arguments[3], a2 =
|
|
3486
|
+
var pc = ((e2) => (e2.BREADCRUMBS_INFO = `BREADCRUMBS_INFO`, e2.DESCRIPTION = `DESCRIPTION`, e2.RICH_CONTENT_DESCRIPTION = `RICH_CONTENT_DESCRIPTION`, e2))(pc || {});
|
|
3487
|
+
async function mc(e2, t2, n2) {
|
|
3488
|
+
let { httpClient: r2, sideEffects: i2 } = arguments[3], a2 = fc(S({ categoryId: e2, treeReference: t2, fields: n2?.fields }, []));
|
|
3478
3489
|
i2?.onSiteCall?.();
|
|
3479
3490
|
try {
|
|
3480
3491
|
let e3 = await r2.request(a2);
|
|
@@ -3485,70 +3496,70 @@ async function dc(e2, t2, n2) {
|
|
|
3485
3496
|
}
|
|
3486
3497
|
}
|
|
3487
3498
|
({ ...B() }, { ...ya() });
|
|
3488
|
-
function
|
|
3489
|
-
return (t2, n2, r2) =>
|
|
3490
|
-
}
|
|
3491
|
-
var
|
|
3492
|
-
var
|
|
3493
|
-
var
|
|
3494
|
-
var
|
|
3495
|
-
var
|
|
3496
|
-
var
|
|
3497
|
-
var
|
|
3498
|
-
var
|
|
3499
|
-
A(
|
|
3500
|
-
function
|
|
3499
|
+
function hc(e2) {
|
|
3500
|
+
return (t2, n2, r2) => mc(t2, n2, r2, { httpClient: e2 });
|
|
3501
|
+
}
|
|
3502
|
+
var gc = y(`wix.categories.v1.category_category_moved`, true, (e2) => C(T(e2, [{ transformFn: w, paths: [{ path: `metadata.eventTime` }] }])))();
|
|
3503
|
+
var _c = y(`wix.categories.v1.category_created`, true, (e2) => C(T(e2, [{ transformFn: w, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.richContentDescription.metadata.createdTimestamp` }, { path: `entity.richContentDescription.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: V, paths: [{ path: `entity.image` }] }, { transformFn: j, 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` }] }])))();
|
|
3504
|
+
var vc = y(`wix.categories.v1.category_deleted`, true, (e2) => C(T(e2, [{ transformFn: w, paths: [{ path: `undefined.createdDate` }, { path: `undefined.updatedDate` }, { path: `undefined.richContentDescription.metadata.createdTimestamp` }, { path: `undefined.richContentDescription.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: V, paths: [{ path: `undefined.image` }] }, { transformFn: j, 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` }] }])))();
|
|
3505
|
+
var yc = y(`wix.categories.v1.category_item_added_to_category`, true, (e2) => C(T(e2, [{ transformFn: w, paths: [{ path: `metadata.eventTime` }] }])))();
|
|
3506
|
+
var bc = y(`wix.categories.v1.category_item_removed_from_category`, true, (e2) => C(T(e2, [{ transformFn: w, paths: [{ path: `metadata.eventTime` }] }])))();
|
|
3507
|
+
var xc = y(`wix.categories.v1.category_items_arranged_in_category`, true, (e2) => C(T(e2, [{ transformFn: w, paths: [{ path: `metadata.eventTime` }] }])))();
|
|
3508
|
+
var Sc = y(`wix.categories.v1.category_updated`, true, (e2) => C(T(e2, [{ transformFn: w, 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: V, paths: [{ path: `entity.image` }, { path: `modifiedFields.image` }] }, { transformFn: j, 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` }] }])))();
|
|
3509
|
+
var Cc = D(hc);
|
|
3510
|
+
A(gc), A(_c), A(vc), A(yc), A(bc), A(xc), A(Sc);
|
|
3511
|
+
function wc(e2) {
|
|
3501
3512
|
if (!e2) return null;
|
|
3502
3513
|
let t2 = e2.match(/image:\/\/v1\/([^/#]+)/);
|
|
3503
3514
|
return t2?.[1] ? t2[1] : e2.match(/\/media\/([^/]+)/)?.[1] ?? null;
|
|
3504
3515
|
}
|
|
3505
|
-
function
|
|
3516
|
+
function Tc(e2) {
|
|
3506
3517
|
return `https://static.wixstatic.com/media/${e2}`;
|
|
3507
3518
|
}
|
|
3508
|
-
function
|
|
3519
|
+
function Ec(e2) {
|
|
3509
3520
|
if (!e2) return null;
|
|
3510
3521
|
let t2 = e2.match(/#originWidth=(\d+)&originHeight=(\d+)/);
|
|
3511
3522
|
return t2 ? { width: parseInt(t2[1], 10), height: parseInt(t2[2], 10) } : null;
|
|
3512
3523
|
}
|
|
3513
|
-
var
|
|
3514
|
-
var
|
|
3515
|
-
var
|
|
3524
|
+
var Dc = (e2) => `/category/${e2}`;
|
|
3525
|
+
var Oc = (e2) => ({ ...e2, nodes: e2.nodes ?? [] });
|
|
3526
|
+
var kc = (e2) => {
|
|
3516
3527
|
if (!e2) return;
|
|
3517
|
-
let t2 =
|
|
3518
|
-
return { uri:
|
|
3528
|
+
let t2 = Ec(e2);
|
|
3529
|
+
return { uri: wc(e2) ?? void 0, url: e2, width: t2?.width, height: t2?.height };
|
|
3519
3530
|
};
|
|
3520
|
-
var
|
|
3531
|
+
var Ac = (e2) => e2.filter((e3) => e3.categoryId).map((e3) => {
|
|
3521
3532
|
let t2 = e3.categorySlug ?? ``;
|
|
3522
|
-
return { id: e3.categoryId ?? ``, name: e3.categoryName ?? ``, slug: t2, href:
|
|
3533
|
+
return { id: e3.categoryId ?? ``, name: e3.categoryName ?? ``, slug: t2, href: Dc(t2) };
|
|
3523
3534
|
});
|
|
3524
|
-
var
|
|
3525
|
-
var
|
|
3535
|
+
var jc = (e2) => ({ type: e2.type, props: e2.props ?? void 0, meta: e2.meta ?? void 0, children: e2.children, custom: e2.custom, disabled: e2.disabled });
|
|
3536
|
+
var Mc = (e2) => {
|
|
3526
3537
|
if (e2) return { preventAutoRedirect: e2.preventAutoRedirect, keywords: e2.keywords?.map((e3) => ({ term: e3.term, isMain: e3.isMain, origin: e3.origin ?? void 0 })) };
|
|
3527
3538
|
};
|
|
3528
|
-
var
|
|
3529
|
-
if (e2) return { tags: e2.tags?.map(
|
|
3539
|
+
var Nc = (e2) => {
|
|
3540
|
+
if (e2) return { tags: e2.tags?.map(jc), settings: Mc(e2.settings) };
|
|
3530
3541
|
};
|
|
3531
|
-
function
|
|
3532
|
-
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:
|
|
3542
|
+
function Pc(e2) {
|
|
3543
|
+
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: Nc(e2.seoData), richContentDescription: e2.richContentDescription ? Oc(e2.richContentDescription) : void 0, image: kc(e2.image), breadcrumbs: Ac(e2.breadcrumbsInfo?.breadcrumbs ?? []) };
|
|
3533
3544
|
}
|
|
3534
|
-
var
|
|
3535
|
-
var
|
|
3536
|
-
var
|
|
3545
|
+
var Fc = { appNamespace: `@wix/stores`, treeKey: null };
|
|
3546
|
+
var Ic = [pc.BREADCRUMBS_INFO, pc.DESCRIPTION, pc.RICH_CONTENT_DESCRIPTION];
|
|
3547
|
+
var Lc = (e2, t2) => {
|
|
3537
3548
|
if (!e2?._id || e2.visible === false) throw Error(t2);
|
|
3538
|
-
return
|
|
3549
|
+
return Pc(e2);
|
|
3539
3550
|
};
|
|
3540
|
-
async function
|
|
3541
|
-
return
|
|
3551
|
+
async function Rc(e2) {
|
|
3552
|
+
return Lc(await Cc(e2, Fc, { fields: Ic }), `Category not found for id: ${e2}`);
|
|
3542
3553
|
}
|
|
3543
|
-
var
|
|
3554
|
+
var zc = (e2, t2, n2) => {
|
|
3544
3555
|
let r2 = [];
|
|
3545
3556
|
for (let i2 of e2.keys()) if (!t2.has(i2)) {
|
|
3546
3557
|
let e3 = n2.find((e4) => e4._id === i2);
|
|
3547
|
-
e3 && r2.push(
|
|
3558
|
+
e3 && r2.push(Yc(e3, 0));
|
|
3548
3559
|
}
|
|
3549
3560
|
return r2;
|
|
3550
3561
|
};
|
|
3551
|
-
var
|
|
3562
|
+
var Bc = (e2) => {
|
|
3552
3563
|
let t2 = /* @__PURE__ */ new Map();
|
|
3553
3564
|
for (let { _id: n2, primaryChoiceIds: r2 } of e2) if (n2) for (let e3 of r2 ?? []) {
|
|
3554
3565
|
let r3 = t2.get(e3) ?? [];
|
|
@@ -3556,8 +3567,8 @@ var Lc = (e2) => {
|
|
|
3556
3567
|
}
|
|
3557
3568
|
return t2;
|
|
3558
3569
|
};
|
|
3559
|
-
var
|
|
3560
|
-
let r2 =
|
|
3570
|
+
var Vc = (e2, t2, n2) => {
|
|
3571
|
+
let r2 = zc(t2, new Set(e2.map((e3) => e3.id)), n2), i2 = [...e2, ...r2], a2 = new Map(i2.map((e3) => [e3.id, e3])), o2 = new Set([...t2.values()].flat());
|
|
3561
3572
|
return i2.flatMap((e3) => {
|
|
3562
3573
|
if (o2.has(e3.id)) return [];
|
|
3563
3574
|
let n3 = t2.get(e3.id);
|
|
@@ -3568,77 +3579,77 @@ var Rc = (e2, t2, n2) => {
|
|
|
3568
3579
|
return [{ ...e3, count: e3.count + i3, linkedChoiceIds: r3 }];
|
|
3569
3580
|
});
|
|
3570
3581
|
};
|
|
3571
|
-
function
|
|
3572
|
-
return
|
|
3582
|
+
function Hc(e2, t2) {
|
|
3583
|
+
return Vc(e2, Bc(t2), t2);
|
|
3573
3584
|
}
|
|
3574
|
-
var
|
|
3585
|
+
var Uc = (e2) => {
|
|
3575
3586
|
let t2 = e2.trim();
|
|
3576
3587
|
if (t2 === ``) return null;
|
|
3577
3588
|
let n2 = Number(t2);
|
|
3578
3589
|
return Number.isFinite(n2) ? n2 : null;
|
|
3579
3590
|
};
|
|
3580
|
-
var
|
|
3591
|
+
var Wc = (e2, t2) => {
|
|
3581
3592
|
let n2 = t2.choicesSettings?.choices ?? [], r2 = new Map(n2.map((e3, t3) => [e3._id ?? ``, t3])), i2 = (e3) => r2.get(e3.id) ?? 2 ** 53 - 1;
|
|
3582
3593
|
return e2.toSorted((e3, t3) => i2(e3) - i2(t3));
|
|
3583
3594
|
};
|
|
3584
|
-
var
|
|
3585
|
-
var
|
|
3586
|
-
var
|
|
3587
|
-
let r2 =
|
|
3595
|
+
var Gc = (e2, t2, n2) => t2 === U.TEXT_CHOICES ? qc(e2, (e3) => e3.name) : n2 ? Kc(e2, (e3) => e3.count) : [...e2];
|
|
3596
|
+
var Kc = (e2, t2) => e2.toSorted((e3, n2) => t2(n2) - t2(e3));
|
|
3597
|
+
var qc = (e2, t2) => e2.toSorted((e3, n2) => {
|
|
3598
|
+
let r2 = Uc(t2(e3)), i2 = Uc(t2(n2));
|
|
3588
3599
|
return r2 !== null && i2 !== null ? r2 - i2 : r2 === null ? i2 === null ? t2(e3).toLowerCase().localeCompare(t2(n2).toLowerCase()) : 1 : -1;
|
|
3589
3600
|
});
|
|
3590
|
-
function
|
|
3601
|
+
function Jc(e2, t2, n2) {
|
|
3591
3602
|
switch (t2.choicesSettings?.sortOrder) {
|
|
3592
3603
|
case Qi.BY_NAME:
|
|
3593
|
-
return
|
|
3604
|
+
return qc(e2, (e3) => e3.name);
|
|
3594
3605
|
case Qi.BY_PRODUCT_COUNT:
|
|
3595
|
-
return
|
|
3606
|
+
return Kc(e2, (e3) => e3.count);
|
|
3596
3607
|
case Qi.MANUAL:
|
|
3597
|
-
return
|
|
3608
|
+
return Wc(e2, t2);
|
|
3598
3609
|
case Qi.DEFAULT:
|
|
3599
3610
|
default:
|
|
3600
|
-
return
|
|
3611
|
+
return Gc(e2, t2.customizationRenderType, n2);
|
|
3601
3612
|
}
|
|
3602
3613
|
}
|
|
3603
|
-
var
|
|
3604
|
-
function
|
|
3614
|
+
var Yc = (e2, t2) => ({ id: e2._id ?? ``, name: e2.name ?? ``, type: e2.choiceType, values: e2.colorCode === void 0 ? [] : [e2.colorCode], count: t2, linkedChoiceIds: [], displayImage: e2.displayImage });
|
|
3615
|
+
function Xc(e2, t2) {
|
|
3605
3616
|
let n2 = e2.choicesSettings?.choices ?? [], r2 = new Map(n2.map((e3) => [e3._id, e3])), i2 = [...t2].flatMap(([e3, t3]) => {
|
|
3606
3617
|
let n3 = r2.get(e3);
|
|
3607
|
-
return n3 ? [
|
|
3618
|
+
return n3 ? [Yc(n3, t3)] : [];
|
|
3608
3619
|
}), a2 = n2.some((e3) => (e3.primaryChoiceIds?.length ?? 0) > 0);
|
|
3609
|
-
return
|
|
3620
|
+
return Jc(a2 ? Hc(i2, n2) : i2, e2, a2);
|
|
3610
3621
|
}
|
|
3611
|
-
var
|
|
3612
|
-
let t2 =
|
|
3622
|
+
var Zc = (e2) => {
|
|
3623
|
+
let t2 = wc(e2);
|
|
3613
3624
|
if (!t2) return;
|
|
3614
|
-
let n2 =
|
|
3615
|
-
return { id: t2, url:
|
|
3625
|
+
let n2 = Ec(e2);
|
|
3626
|
+
return { id: t2, url: Tc(t2), ...n2 ? { width: n2.width, height: n2.height } : {} };
|
|
3616
3627
|
};
|
|
3617
|
-
var
|
|
3618
|
-
let t2 = e2.displayImage === void 0 ? void 0 :
|
|
3619
|
-
return { ...
|
|
3628
|
+
var Qc = (e2) => {
|
|
3629
|
+
let t2 = e2.displayImage === void 0 ? void 0 : Zc(e2.displayImage);
|
|
3630
|
+
return { ...el(e2), ...e2.values[0] === void 0 ? {} : { colorHexCode: e2.values[0] }, ...t2 ? { displayImage: t2 } : {} };
|
|
3620
3631
|
};
|
|
3621
|
-
var
|
|
3622
|
-
var
|
|
3623
|
-
var
|
|
3624
|
-
var
|
|
3632
|
+
var $c = (e2) => ({ type: J.SWATCH_CHOICES, id: e2.id, customizationType: e2.type, name: e2.name, values: e2.choices.map(Qc) });
|
|
3633
|
+
var el = (e2) => ({ id: e2.id, name: e2.name, ...e2.linkedChoiceIds.length > 0 ? { childIds: e2.linkedChoiceIds } : {} });
|
|
3634
|
+
var tl = (e2) => ({ type: J.TEXT_CHOICES, id: e2.id, customizationType: e2.type, name: e2.name, values: e2.choices.map(el) });
|
|
3635
|
+
var nl = (e2, t2, n2, r2) => {
|
|
3625
3636
|
let i2 = new Map(t2.map((e3) => [e3._id, e3]));
|
|
3626
3637
|
return n2.flatMap((t3) => {
|
|
3627
3638
|
let n3 = i2.get(t3);
|
|
3628
|
-
return n3 ? [{ id: t3, name: n3.name ?? ``, renderType: n3.customizationRenderType, type: e2, choices:
|
|
3639
|
+
return n3 ? [{ id: t3, name: n3.name ?? ``, renderType: n3.customizationRenderType, type: e2, choices: Xc(n3, r2) }] : [];
|
|
3629
3640
|
});
|
|
3630
3641
|
};
|
|
3631
|
-
var
|
|
3632
|
-
var
|
|
3633
|
-
function
|
|
3642
|
+
var rl = (e2) => qc(e2.filter((e3) => e3.renderType === U.SWATCH_CHOICES).map($c), (e3) => e3.name);
|
|
3643
|
+
var il = (e2) => qc(e2.filter((e3) => e3.renderType === U.TEXT_CHOICES).map(tl), (e3) => e3.name);
|
|
3644
|
+
function al(e2, t2, n2, r2) {
|
|
3634
3645
|
if (n2.length === 0) return [];
|
|
3635
|
-
let i2 =
|
|
3636
|
-
return [...
|
|
3646
|
+
let i2 = nl(e2, t2, n2, r2);
|
|
3647
|
+
return [...rl(i2), ...il(i2)];
|
|
3637
3648
|
}
|
|
3638
|
-
function
|
|
3649
|
+
function ol(e2, t2) {
|
|
3639
3650
|
if (!(e2 === void 0 || t2 === void 0 || e2 >= t2)) return { type: J.PRICE, name: bo.PRICE, minPrice: e2, maxPrice: t2 };
|
|
3640
3651
|
}
|
|
3641
|
-
var
|
|
3652
|
+
var sl = _((e2, t2) => {
|
|
3642
3653
|
function n2(e3, t3, n3) {
|
|
3643
3654
|
var r2 = -1, i2 = e3.length;
|
|
3644
3655
|
t3 < 0 && (t3 = -t3 > i2 ? 0 : i2 + t3), n3 = n3 > i2 ? i2 : n3, n3 < 0 && (n3 += i2), i2 = t3 > n3 ? 0 : n3 - t3 >>> 0, t3 >>>= 0;
|
|
@@ -3647,24 +3658,24 @@ var il = _((e2, t2) => {
|
|
|
3647
3658
|
}
|
|
3648
3659
|
t2.exports = n2;
|
|
3649
3660
|
});
|
|
3650
|
-
var
|
|
3661
|
+
var cl = _((e2, t2) => {
|
|
3651
3662
|
function n2(e3, t3) {
|
|
3652
3663
|
return e3 === t3 || e3 !== e3 && t3 !== t3;
|
|
3653
3664
|
}
|
|
3654
3665
|
t2.exports = n2;
|
|
3655
3666
|
});
|
|
3656
|
-
var
|
|
3667
|
+
var ll = _((e2, t2) => {
|
|
3657
3668
|
t2.exports = typeof window == `object` && window && window.Object === Object && window;
|
|
3658
3669
|
});
|
|
3659
|
-
var
|
|
3660
|
-
var n2 =
|
|
3670
|
+
var ul = _((e2, t2) => {
|
|
3671
|
+
var n2 = ll(), r2 = typeof self == `object` && self && self.Object === Object && self;
|
|
3661
3672
|
t2.exports = n2 || r2 || Function(`return this`)();
|
|
3662
3673
|
});
|
|
3663
|
-
var
|
|
3664
|
-
t2.exports =
|
|
3674
|
+
var dl = _((e2, t2) => {
|
|
3675
|
+
t2.exports = ul().Symbol;
|
|
3665
3676
|
});
|
|
3666
|
-
var
|
|
3667
|
-
var n2 =
|
|
3677
|
+
var fl = _((e2, t2) => {
|
|
3678
|
+
var n2 = dl(), r2 = Object.prototype, i2 = r2.hasOwnProperty, a2 = r2.toString, o2 = n2 ? n2.toStringTag : void 0;
|
|
3668
3679
|
function s2(e3) {
|
|
3669
3680
|
var t3 = i2.call(e3, o2), n3 = e3[o2];
|
|
3670
3681
|
try {
|
|
@@ -3677,29 +3688,29 @@ var ll = _((e2, t2) => {
|
|
|
3677
3688
|
}
|
|
3678
3689
|
t2.exports = s2;
|
|
3679
3690
|
});
|
|
3680
|
-
var
|
|
3691
|
+
var pl = _((e2, t2) => {
|
|
3681
3692
|
var n2 = Object.prototype.toString;
|
|
3682
3693
|
function r2(e3) {
|
|
3683
3694
|
return n2.call(e3);
|
|
3684
3695
|
}
|
|
3685
3696
|
t2.exports = r2;
|
|
3686
3697
|
});
|
|
3687
|
-
var
|
|
3688
|
-
var n2 =
|
|
3698
|
+
var ml = _((e2, t2) => {
|
|
3699
|
+
var n2 = dl(), r2 = fl(), i2 = pl(), a2 = `[object Null]`, o2 = `[object Undefined]`, s2 = n2 ? n2.toStringTag : void 0;
|
|
3689
3700
|
function c2(e3) {
|
|
3690
3701
|
return e3 == null ? e3 === void 0 ? o2 : a2 : s2 && s2 in Object(e3) ? r2(e3) : i2(e3);
|
|
3691
3702
|
}
|
|
3692
3703
|
t2.exports = c2;
|
|
3693
3704
|
});
|
|
3694
|
-
var
|
|
3705
|
+
var hl = _((e2, t2) => {
|
|
3695
3706
|
function n2(e3) {
|
|
3696
3707
|
var t3 = typeof e3;
|
|
3697
3708
|
return e3 != null && (t3 == `object` || t3 == `function`);
|
|
3698
3709
|
}
|
|
3699
3710
|
t2.exports = n2;
|
|
3700
3711
|
});
|
|
3701
|
-
var
|
|
3702
|
-
var n2 =
|
|
3712
|
+
var gl = _((e2, t2) => {
|
|
3713
|
+
var n2 = ml(), r2 = hl(), i2 = `[object AsyncFunction]`, a2 = `[object Function]`, o2 = `[object GeneratorFunction]`, s2 = `[object Proxy]`;
|
|
3703
3714
|
function c2(e3) {
|
|
3704
3715
|
if (!r2(e3)) return false;
|
|
3705
3716
|
var t3 = n2(e3);
|
|
@@ -3707,20 +3718,20 @@ var pl = _((e2, t2) => {
|
|
|
3707
3718
|
}
|
|
3708
3719
|
t2.exports = c2;
|
|
3709
3720
|
});
|
|
3710
|
-
var
|
|
3721
|
+
var _l = _((e2, t2) => {
|
|
3711
3722
|
function n2(e3) {
|
|
3712
3723
|
return typeof e3 == `number` && e3 > -1 && e3 % 1 == 0 && e3 <= 9007199254740991;
|
|
3713
3724
|
}
|
|
3714
3725
|
t2.exports = n2;
|
|
3715
3726
|
});
|
|
3716
|
-
var
|
|
3717
|
-
var n2 =
|
|
3727
|
+
var vl = _((e2, t2) => {
|
|
3728
|
+
var n2 = gl(), r2 = _l();
|
|
3718
3729
|
function i2(e3) {
|
|
3719
3730
|
return e3 != null && r2(e3.length) && !n2(e3);
|
|
3720
3731
|
}
|
|
3721
3732
|
t2.exports = i2;
|
|
3722
3733
|
});
|
|
3723
|
-
var
|
|
3734
|
+
var yl = _((e2, t2) => {
|
|
3724
3735
|
var n2 = /^(?:0|[1-9]\d*)$/;
|
|
3725
3736
|
function r2(e3, t3) {
|
|
3726
3737
|
var r3 = typeof e3;
|
|
@@ -3728,8 +3739,8 @@ var gl = _((e2, t2) => {
|
|
|
3728
3739
|
}
|
|
3729
3740
|
t2.exports = r2;
|
|
3730
3741
|
});
|
|
3731
|
-
var
|
|
3732
|
-
var n2 =
|
|
3742
|
+
var bl = _((e2, t2) => {
|
|
3743
|
+
var n2 = cl(), r2 = vl(), i2 = yl(), a2 = hl();
|
|
3733
3744
|
function o2(e3, t3, o3) {
|
|
3734
3745
|
if (!a2(o3)) return false;
|
|
3735
3746
|
var s2 = typeof t3;
|
|
@@ -3737,7 +3748,7 @@ var _l = _((e2, t2) => {
|
|
|
3737
3748
|
}
|
|
3738
3749
|
t2.exports = o2;
|
|
3739
3750
|
});
|
|
3740
|
-
var
|
|
3751
|
+
var xl = _((e2, t2) => {
|
|
3741
3752
|
var n2 = /\s/;
|
|
3742
3753
|
function r2(e3) {
|
|
3743
3754
|
for (var t3 = e3.length; t3-- && n2.test(e3.charAt(t3)); ) ;
|
|
@@ -3745,28 +3756,28 @@ var vl = _((e2, t2) => {
|
|
|
3745
3756
|
}
|
|
3746
3757
|
t2.exports = r2;
|
|
3747
3758
|
});
|
|
3748
|
-
var
|
|
3749
|
-
var n2 =
|
|
3759
|
+
var Sl = _((e2, t2) => {
|
|
3760
|
+
var n2 = xl(), r2 = /^\s+/;
|
|
3750
3761
|
function i2(e3) {
|
|
3751
3762
|
return e3 && e3.slice(0, n2(e3) + 1).replace(r2, ``);
|
|
3752
3763
|
}
|
|
3753
3764
|
t2.exports = i2;
|
|
3754
3765
|
});
|
|
3755
|
-
var
|
|
3766
|
+
var Cl = _((e2, t2) => {
|
|
3756
3767
|
function n2(e3) {
|
|
3757
3768
|
return typeof e3 == `object` && !!e3;
|
|
3758
3769
|
}
|
|
3759
3770
|
t2.exports = n2;
|
|
3760
3771
|
});
|
|
3761
|
-
var
|
|
3762
|
-
var n2 =
|
|
3772
|
+
var wl = _((e2, t2) => {
|
|
3773
|
+
var n2 = ml(), r2 = Cl(), i2 = `[object Symbol]`;
|
|
3763
3774
|
function a2(e3) {
|
|
3764
3775
|
return typeof e3 == `symbol` || r2(e3) && n2(e3) == i2;
|
|
3765
3776
|
}
|
|
3766
3777
|
t2.exports = a2;
|
|
3767
3778
|
});
|
|
3768
|
-
var
|
|
3769
|
-
var n2 =
|
|
3779
|
+
var Tl = _((e2, t2) => {
|
|
3780
|
+
var n2 = Sl(), r2 = hl(), i2 = wl(), a2 = NaN, o2 = /^[-+]0x[0-9a-f]+$/i, s2 = /^0b[01]+$/i, c2 = /^0o[0-7]+$/i, l2 = parseInt;
|
|
3770
3781
|
function u2(e3) {
|
|
3771
3782
|
if (typeof e3 == `number`) return e3;
|
|
3772
3783
|
if (i2(e3)) return a2;
|
|
@@ -3781,23 +3792,23 @@ var Sl = _((e2, t2) => {
|
|
|
3781
3792
|
}
|
|
3782
3793
|
t2.exports = u2;
|
|
3783
3794
|
});
|
|
3784
|
-
var
|
|
3785
|
-
var n2 =
|
|
3795
|
+
var El = _((e2, t2) => {
|
|
3796
|
+
var n2 = Tl(), r2 = 1 / 0, i2 = 17976931348623157e292;
|
|
3786
3797
|
function a2(e3) {
|
|
3787
3798
|
return e3 ? (e3 = n2(e3), e3 === r2 || e3 === -r2 ? (e3 < 0 ? -1 : 1) * i2 : e3 === e3 ? e3 : 0) : e3 === 0 ? e3 : 0;
|
|
3788
3799
|
}
|
|
3789
3800
|
t2.exports = a2;
|
|
3790
3801
|
});
|
|
3791
|
-
var
|
|
3792
|
-
var n2 =
|
|
3802
|
+
var Dl = _((e2, t2) => {
|
|
3803
|
+
var n2 = El();
|
|
3793
3804
|
function r2(e3) {
|
|
3794
3805
|
var t3 = n2(e3), r3 = t3 % 1;
|
|
3795
3806
|
return t3 === t3 ? r3 ? t3 - r3 : t3 : 0;
|
|
3796
3807
|
}
|
|
3797
3808
|
t2.exports = r2;
|
|
3798
3809
|
});
|
|
3799
|
-
var
|
|
3800
|
-
var n2 =
|
|
3810
|
+
var Ol = ne(_((e2, t2) => {
|
|
3811
|
+
var n2 = sl(), r2 = bl(), i2 = Dl(), a2 = Math.ceil, o2 = Math.max;
|
|
3801
3812
|
function s2(e3, t3, s3) {
|
|
3802
3813
|
t3 = (s3 ? r2(e3, t3, s3) : t3 === void 0) ? 1 : o2(i2(t3), 0);
|
|
3803
3814
|
var c2 = e3 == null ? 0 : e3.length;
|
|
@@ -3807,91 +3818,91 @@ var Tl = ne(_((e2, t2) => {
|
|
|
3807
3818
|
}
|
|
3808
3819
|
t2.exports = s2;
|
|
3809
3820
|
})(), 1);
|
|
3810
|
-
var
|
|
3811
|
-
var
|
|
3812
|
-
async function
|
|
3813
|
-
let t2 = (0,
|
|
3814
|
-
return (await Promise.all(t2.map(
|
|
3815
|
-
}
|
|
3816
|
-
var
|
|
3817
|
-
var
|
|
3818
|
-
var
|
|
3819
|
-
function
|
|
3821
|
+
var kl = [$i.CHOICE_DISPLAY_IMAGE];
|
|
3822
|
+
var Al = `customizationRenderType`;
|
|
3823
|
+
async function jl(e2) {
|
|
3824
|
+
let t2 = (0, Ol.default)(e2, 100);
|
|
3825
|
+
return (await Promise.all(t2.map(Ml))).flat();
|
|
3826
|
+
}
|
|
3827
|
+
var Ml = async (e2) => (await ca({ fields: kl }).hasSome(`_id`, e2).ne(Al, U.FREE_TEXT).limit(100).find()).items;
|
|
3828
|
+
var Nl = (e2, t2, n2) => ({ name: e2, type: Oa.SCALAR, fieldPath: t2, scalar: { type: n2 } });
|
|
3829
|
+
var Pl = (e2, t2, n2) => ({ name: e2, type: Oa.VALUE, fieldPath: t2, value: { limit: n2, sortType: Ta.COUNT, sortDirection: Ea.DESC } });
|
|
3830
|
+
function Fl(e2) {
|
|
3820
3831
|
let t2 = [];
|
|
3821
|
-
return e2.includes(Z.PRICE) && t2.push(
|
|
3832
|
+
return e2.includes(Z.PRICE) && t2.push(Nl(Q.minPrice, $.minPrice, Da.MIN), Nl(Q.maxPrice, $.maxPrice, Da.MAX)), e2.includes(Z.OPTIONS) && t2.push(Pl(Q.options, $.option, Cs.options), Pl(Q.optionsWithChoice, $.optionChoice, Cs.choices)), e2.includes(Z.MODIFIERS) && t2.push(Pl(Q.modifiers, $.modifier, Cs.modifiers), Pl(Q.modifiersWithChoice, $.modifierChoice, Cs.choices)), t2;
|
|
3822
3833
|
}
|
|
3823
|
-
var
|
|
3834
|
+
var Il = (e2) => {
|
|
3824
3835
|
let t2 = e2?.values?.results ?? [], n2 = /* @__PURE__ */ new Map();
|
|
3825
3836
|
for (let e3 of t2) e3.value !== void 0 && e3.count !== void 0 && n2.set(e3.value, e3.count);
|
|
3826
3837
|
return n2;
|
|
3827
3838
|
};
|
|
3828
|
-
var
|
|
3829
|
-
var
|
|
3839
|
+
var Ll = (e2) => (e2?.values?.results ?? []).flatMap((e3) => e3.value === void 0 ? [] : [e3.value]);
|
|
3840
|
+
var Rl = (e2) => {
|
|
3830
3841
|
let t2 = /* @__PURE__ */ new Map();
|
|
3831
3842
|
for (let n2 of e2) n2.name !== void 0 && t2.set(n2.name, n2);
|
|
3832
3843
|
return t2;
|
|
3833
3844
|
};
|
|
3834
|
-
async function
|
|
3835
|
-
let n2 = await Va({ filter: { [Ss]: { $matchItems: [{ id: e2 }] } }, cursorPaging: { limit: 1 }, aggregations:
|
|
3836
|
-
return { minPrice: r2.get(Q.minPrice)?.scalar?.value, maxPrice: r2.get(Q.maxPrice)?.scalar?.value, optionIds:
|
|
3845
|
+
async function zl(e2, t2) {
|
|
3846
|
+
let n2 = await Va({ filter: { [Ss]: { $matchItems: [{ id: e2 }] } }, cursorPaging: { limit: 1 }, aggregations: Fl(t2) }, { fields: [q.CURRENCY] }), r2 = Rl(n2.aggregationData?.results ?? []);
|
|
3847
|
+
return { minPrice: r2.get(Q.minPrice)?.scalar?.value, maxPrice: r2.get(Q.maxPrice)?.scalar?.value, optionIds: Ll(r2.get(Q.options)), optionChoiceIdToCount: Il(r2.get(Q.optionsWithChoice)), modifierIds: Ll(r2.get(Q.modifiers)), modifierChoiceIdToCount: Il(r2.get(Q.modifiersWithChoice)), currency: n2.products?.[0]?.currency ?? void 0 };
|
|
3837
3848
|
}
|
|
3838
|
-
var
|
|
3839
|
-
async function
|
|
3840
|
-
let n2 = await
|
|
3841
|
-
return { filters: [
|
|
3849
|
+
var Bl = [Z.PRICE, Z.OPTIONS, Z.MODIFIERS];
|
|
3850
|
+
async function Vl(e2, t2 = Bl) {
|
|
3851
|
+
let n2 = await zl(e2, t2), r2 = await jl([...n2.optionIds, ...n2.modifierIds]);
|
|
3852
|
+
return { filters: [ol(n2.minPrice, n2.maxPrice), ...al(Zi.PRODUCT_OPTION, r2, n2.optionIds, n2.optionChoiceIdToCount), ...al(Zi.MODIFIER, r2, n2.modifierIds, n2.modifierChoiceIdToCount)].filter((e3) => e3 !== void 0), currency: n2.currency };
|
|
3842
3853
|
}
|
|
3843
|
-
var
|
|
3844
|
-
let t2 =
|
|
3854
|
+
var Hl = (e2) => {
|
|
3855
|
+
let t2 = wc(e2 ?? void 0);
|
|
3845
3856
|
if (!t2) return;
|
|
3846
|
-
let n2 =
|
|
3847
|
-
return { id: t2, url:
|
|
3857
|
+
let n2 = Ec(e2);
|
|
3858
|
+
return { id: t2, url: Tc(t2), ...n2 ? { width: n2.width, height: n2.height } : {} };
|
|
3848
3859
|
};
|
|
3849
|
-
var
|
|
3850
|
-
if (e2?._id && t2 !== void 0) return { id: e2._id, name: e2.name, destinationUrl: e2.destinationUrl ? { href: e2.destinationUrl } : void 0, image:
|
|
3860
|
+
var Ul = ({ promotion: e2, position: t2 }) => {
|
|
3861
|
+
if (e2?._id && t2 !== void 0) return { id: e2._id, name: e2.name, destinationUrl: e2.destinationUrl ? { href: e2.destinationUrl } : void 0, image: Hl(e2.media?.image), altText: e2.media?.altText ?? void 0, position: t2 };
|
|
3851
3862
|
};
|
|
3852
|
-
async function
|
|
3853
|
-
return ((await yo(e2)).promotions ?? []).map(
|
|
3863
|
+
async function Wl(e2) {
|
|
3864
|
+
return ((await yo(e2)).promotions ?? []).map(Ul).filter((e3) => e3 !== void 0);
|
|
3854
3865
|
}
|
|
3855
|
-
var
|
|
3866
|
+
var Gl = async (e2, t2, n2, r2) => {
|
|
3856
3867
|
let i2 = [...new URLSearchParams(n2).keys()].length > 0 ? (await t2).filters : [], a2 = Eo(n2, i2), o2 = Bo(n2), s2 = await Ns({ categoryId: e2, filters: i2, filterSelection: a2, sortType: o2, productsPerPage: r2 }), c2 = await Hs(s2.products, /* @__PURE__ */ new Map());
|
|
3857
3868
|
return { page: s2, productGroupByGroupId: Object.fromEntries(c2), filterSelectionKey: Ws(a2), sortType: o2, productsPerPage: r2 };
|
|
3858
3869
|
};
|
|
3859
|
-
async function
|
|
3860
|
-
let r2 =
|
|
3870
|
+
async function Kl(e2, t2, n2) {
|
|
3871
|
+
let r2 = Vl(e2), [i2, a2, o2] = await Promise.all([Gl(e2, r2, t2, n2), r2, Wl(e2)]), { filters: s2, currency: c2 } = a2;
|
|
3861
3872
|
return { filters: s2, currency: c2, promotions: o2, initialProductList: i2 };
|
|
3862
3873
|
}
|
|
3863
|
-
var
|
|
3864
|
-
async function
|
|
3865
|
-
let [r2, i2, a2] = await Promise.all([
|
|
3874
|
+
var ql = `wixstores-storefront-builder:category-by-id-context-data`;
|
|
3875
|
+
async function Jl(e2, t2, n2) {
|
|
3876
|
+
let [r2, i2, a2] = await Promise.all([Rc(e2), lc(), Kl(e2, t2, n2)]);
|
|
3866
3877
|
return { category: r2, defaultLocationId: i2, ...a2 };
|
|
3867
3878
|
}
|
|
3868
|
-
function
|
|
3879
|
+
function Yl(e2, t2) {
|
|
3869
3880
|
let { search: n2 } = _i();
|
|
3870
|
-
return
|
|
3881
|
+
return cc(`${ql}:${e2}:${t2}:${n2}`, () => Jl(e2, n2, t2));
|
|
3871
3882
|
}
|
|
3872
|
-
function
|
|
3883
|
+
function Xl() {
|
|
3873
3884
|
throw Error(`useCategoryByIdContext must not be used directly`);
|
|
3874
3885
|
}
|
|
3875
|
-
function
|
|
3886
|
+
function Zl({ categoryValue: e2, productListValue: t2, children: n2 }) {
|
|
3876
3887
|
return s(l, { value: e2, children: s(c, { value: t2, children: n2 }) });
|
|
3877
3888
|
}
|
|
3878
|
-
var
|
|
3879
|
-
let r2 = pi(t2), i2 = fi(r2), a2 =
|
|
3880
|
-
return s(
|
|
3889
|
+
var Ql = ({ children: e2, dataPromise: t2, productsPerPage: n2 }) => {
|
|
3890
|
+
let r2 = pi(t2), i2 = fi(r2), a2 = ac(r2, n2);
|
|
3891
|
+
return s(Zl, { categoryValue: i2, productListValue: a2, children: e2 });
|
|
3881
3892
|
};
|
|
3882
|
-
var
|
|
3883
|
-
let [i2] = a(() => new Vr()), o2 =
|
|
3884
|
-
return s(Wr, { client: i2, children: s(t, { fallback: null, children: s(
|
|
3893
|
+
var $l = ({ children: e2, categoryId: n2, productsPerPage: r2 }) => {
|
|
3894
|
+
let [i2] = a(() => new Vr()), o2 = Yl(n2, r2);
|
|
3895
|
+
return s(Wr, { client: i2, children: s(t, { fallback: null, children: s(Ql, { dataPromise: o2, productsPerPage: r2, children: e2 }) }) });
|
|
3885
3896
|
};
|
|
3886
|
-
function
|
|
3887
|
-
return t2 ? s(
|
|
3897
|
+
function eu({ children: e2, categoryId: t2, productsPerPage: n2 = 20 }) {
|
|
3898
|
+
return t2 ? s($l, { categoryId: t2, productsPerPage: n2, children: e2 }, t2) : null;
|
|
3888
3899
|
}
|
|
3889
|
-
var
|
|
3900
|
+
var tu = Mn(`733f4f74-23d2-4b03-a0b1-1efdd5e3825b`);
|
|
3890
3901
|
export {
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3902
|
+
eu as CategoryByIdContextProvider,
|
|
3903
|
+
Zl as CategoryByIdContextValues,
|
|
3904
|
+
eu as default,
|
|
3905
|
+
tu as injectAccessTokenGetter,
|
|
3906
|
+
Xl as useCategoryByIdContext
|
|
3896
3907
|
};
|
|
3897
3908
|
//# sourceMappingURL=context-category-by-id.mjs.map
|