@depict-ai/ui 4.10.32 → 4.10.34
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/ES10/index.cjs +1201 -20
- package/ES10/index.d.ts +112 -13
- package/ES10/index.js +1201 -22
- package/latest/index.cjs +1090 -18
- package/latest/index.d.ts +112 -13
- package/latest/index.js +1090 -20
- package/locales/index.d.ts +1 -2
- package/package.json +5 -4
- package/server/ES10/index.cjs +1201 -20
- package/server/ES10/index.d.ts +112 -13
- package/server/ES10/index.js +1201 -22
- package/server/latest/index.cjs +1090 -18
- package/server/latest/index.d.ts +112 -13
- package/server/latest/index.js +1090 -20
package/ES10/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { add_to_version_info as $8tj43$add_to_version_info, javascript_media_query as $8tj43$javascript_media_query, standard_price_format as $8tj43$standard_price_format, catchify as $8tj43$catchify1, observer as $8tj43$observer, slider_fractional_factory as $8tj43$slider_fractional_factory, report as $8tj43$report1, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, dwarn as $8tj43$dwarn, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, useExpandingContainer as $8tj43$useExpandingContainer, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, is_debug as $8tj43$is_debug, findMostFrequentItem as $8tj43$findMostFrequentItem, is_available_in as $8tj43$is_available_in, fetch_retry as $8tj43$fetch_retry, base_url as $8tj43$base_url, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, use_href_accessor as $8tj43$use_href_accessor1, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, snakeCasifyObject as $8tj43$snakeCasifyObject, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
1
|
+
import { add_to_version_info as $8tj43$add_to_version_info, javascript_media_query as $8tj43$javascript_media_query, standard_price_format as $8tj43$standard_price_format, catchify as $8tj43$catchify1, observer as $8tj43$observer, slider_fractional_factory as $8tj43$slider_fractional_factory, report as $8tj43$report1, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, dwarn as $8tj43$dwarn, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, useExpandingContainer as $8tj43$useExpandingContainer, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, is_debug as $8tj43$is_debug, findMostFrequentItem as $8tj43$findMostFrequentItem, is_available_in as $8tj43$is_available_in, fetch_retry as $8tj43$fetch_retry, base_url as $8tj43$base_url, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, use_href_accessor as $8tj43$use_href_accessor1, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, snakeCasifyObject as $8tj43$snakeCasifyObject, set_event_api as $8tj43$set_event_api, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { template as $8tj43$template, createComponent as $8tj43$createComponent, getNextElement as $8tj43$getNextElement, getNextMarker as $8tj43$getNextMarker, insert as $8tj43$insert, isServer as $8tj43$isServer, use as $8tj43$use, effect as $8tj43$effect, setAttribute as $8tj43$setAttribute, memo as $8tj43$memo, mergeProps as $8tj43$mergeProps1, addEventListener as $8tj43$addEventListener, runHydrationEvents as $8tj43$runHydrationEvents, delegateEvents as $8tj43$delegateEvents, spread as $8tj43$spread, classList as $8tj43$classList, className as $8tj43$className, style as $8tj43$style, Dynamic as $8tj43$Dynamic, setProperty as $8tj43$setProperty } from "solid-js/web";
|
|
3
3
|
import { createContext as $8tj43$createContext, createSignal as $8tj43$createSignal, getOwner as $8tj43$getOwner, createResource as $8tj43$createResource, untrack as $8tj43$untrack, createRoot as $8tj43$createRoot, createEffect as $8tj43$createEffect, runWithOwner as $8tj43$runWithOwner, onCleanup as $8tj43$onCleanup, createMemo as $8tj43$createMemo, Show as $8tj43$Show, createComputed as $8tj43$createComputed, createRenderEffect as $8tj43$createRenderEffect, mergeProps as $8tj43$mergeProps, useContext as $8tj43$useContext, createReaction as $8tj43$createReaction, on as $8tj43$on, Suspense as $8tj43$Suspense, ErrorBoundary as $8tj43$ErrorBoundary, Index as $8tj43$Index, For as $8tj43$For, createUniqueId as $8tj43$createUniqueId, mapArray as $8tj43$mapArray, batch as $8tj43$batch, Switch as $8tj43$Switch, Match as $8tj43$Match, splitProps as $8tj43$splitProps, createComponent as $8tj43$createComponent1, createSelector as $8tj43$createSelector, children as $8tj43$children } from "solid-js";
|
|
4
4
|
import { catchify as $8tj43$catchify, report as $8tj43$report, use_href_accessor as $8tj43$use_href_accessor, observer as $8tj43$observer1, dlog as $8tj43$dlog1, ListenableSet as $8tj43$ListenableSet, queueMacroTask as $8tj43$queueMacroTask1 } from "@depict-ai/utilishared/ES10";
|
|
5
5
|
import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from "solid-js/store";
|
|
6
6
|
import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
8
7
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
8
|
+
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
9
9
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.34";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $8tj43$createSignal(false);
|
|
16
16
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -13954,12 +13954,845 @@ function $e18ab2868df26f40$export$f091cbac892643a4(obj) {
|
|
|
13954
13954
|
return Object.fromEntries(mapped_stuff); // FUCK TYPESCRIPT, WHY CAN'T YOU DO THIS CORRECTLY???
|
|
13955
13955
|
}
|
|
13956
13956
|
|
|
13957
|
+
/** One try and at most two retries: a 503 burst from V4 shouldn't be multiplied by fetch_retry's default of 10. */
|
|
13958
|
+
const $a881711b2a93404e$var$NATIVE_MAX_TRIES = 3;
|
|
13959
|
+
function $a881711b2a93404e$export$b6dad15503f66988(merchant, path) {
|
|
13960
|
+
return "".concat((0, $8tj43$base_url), "/v4/").concat(encodeURIComponent(merchant)).concat(path);
|
|
13961
|
+
}
|
|
13962
|
+
async function $a881711b2a93404e$export$88d793e3827f3436(url) {
|
|
13963
|
+
return (await $a881711b2a93404e$export$f035610fd74c541a(url)).body_;
|
|
13964
|
+
}
|
|
13965
|
+
async function $a881711b2a93404e$export$f035610fd74c541a(url) {
|
|
13966
|
+
var _error, _error2, _error3;
|
|
13967
|
+
const response = await $8tj43$fetch_retry(url, {
|
|
13968
|
+
method: "GET"
|
|
13969
|
+
}, $a881711b2a93404e$var$NATIVE_MAX_TRIES);
|
|
13970
|
+
if (!response) {
|
|
13971
|
+
$8tj43$dwarn("[NativeDepictAPI] no response from", url);
|
|
13972
|
+
return {};
|
|
13973
|
+
}
|
|
13974
|
+
if (response.status === 200)
|
|
13975
|
+
// A 200 that isn't JSON (a proxy's HTML page, a cut-off body) is a failed read like any other, so callers fall
|
|
13976
|
+
// back instead of rejecting: get_recommendation_types then forgets the read rather than keeping it in flight.
|
|
13977
|
+
try {
|
|
13978
|
+
return {
|
|
13979
|
+
body_: await response.json()
|
|
13980
|
+
};
|
|
13981
|
+
} catch (e) {
|
|
13982
|
+
$8tj43$dwarn("[NativeDepictAPI] 200 without a JSON body from", url, e);
|
|
13983
|
+
return {};
|
|
13984
|
+
}
|
|
13985
|
+
let error;
|
|
13986
|
+
try {
|
|
13987
|
+
error = (await response.json()).error;
|
|
13988
|
+
} catch {
|
|
13989
|
+
// not V4's error body
|
|
13990
|
+
}
|
|
13991
|
+
$8tj43$dwarn("[NativeDepictAPI]", response.status, (_error = error) === null || _error === void 0 ? void 0 : _error.code, (_error2 = error) === null || _error2 === void 0 ? void 0 : _error2.message, (_error3 = error) === null || _error3 === void 0 ? void 0 : _error3.request_id, url);
|
|
13992
|
+
if (response.status >= 500) {
|
|
13993
|
+
var _error$code, _error4, _error5, _error$request_id, _error6;
|
|
13994
|
+
$8tj43$report1([new Error("V4 ".concat(response.status, " ").concat((_error$code = (_error4 = error) === null || _error4 === void 0 ? void 0 : _error4.code) !== null && _error$code !== void 0 ? _error$code : "")), "Native V4 request failed"], "warning", {
|
|
13995
|
+
url: url,
|
|
13996
|
+
status: response.status,
|
|
13997
|
+
code: (_error5 = error) === null || _error5 === void 0 ? void 0 : _error5.code,
|
|
13998
|
+
request_id: (_error$request_id = (_error6 = error) === null || _error6 === void 0 ? void 0 : _error6.request_id) !== null && _error$request_id !== void 0 ? _error$request_id : response.headers.get("x-depict-request-id")
|
|
13999
|
+
});
|
|
14000
|
+
}
|
|
14001
|
+
return {
|
|
14002
|
+
error_: error
|
|
14003
|
+
};
|
|
14004
|
+
}
|
|
14005
|
+
const $a1878713ea20ea2c$export$8e79752841e7cdb4 = 900000;
|
|
14006
|
+
const $a1878713ea20ea2c$var$storage_key = merchant => "depict_v4_recommendation_types_".concat(merchant);
|
|
14007
|
+
/** One read per merchant and CONTEXT_TTL_MS in this page; a failed read is forgotten so the next caller tries again. */
|
|
14008
|
+
const $a1878713ea20ea2c$var$in_flight = new Map();
|
|
14009
|
+
function $a1878713ea20ea2c$var$from_storage(merchant, now) {
|
|
14010
|
+
try {
|
|
14011
|
+
var _localStorage$getItem;
|
|
14012
|
+
const stored = JSON.parse((_localStorage$getItem = localStorage.getItem($a1878713ea20ea2c$var$storage_key(merchant))) !== null && _localStorage$getItem !== void 0 ? _localStorage$getItem : "null");
|
|
14013
|
+
if (!stored || !Array.isArray(stored.types) || !(now - stored.fetched_at < $a1878713ea20ea2c$export$8e79752841e7cdb4)) return undefined;
|
|
14014
|
+
return $a1878713ea20ea2c$var$to_map(stored.types);
|
|
14015
|
+
} catch {
|
|
14016
|
+
return undefined;
|
|
14017
|
+
}
|
|
14018
|
+
}
|
|
14019
|
+
function $a1878713ea20ea2c$var$to_storage(merchant, types, now) {
|
|
14020
|
+
try {
|
|
14021
|
+
localStorage.setItem($a1878713ea20ea2c$var$storage_key(merchant), JSON.stringify({
|
|
14022
|
+
fetched_at: now,
|
|
14023
|
+
types: types
|
|
14024
|
+
}));
|
|
14025
|
+
} catch {
|
|
14026
|
+
// localStorage unavailable or full: read /context again on the next page.
|
|
14027
|
+
}
|
|
14028
|
+
}
|
|
14029
|
+
const $a1878713ea20ea2c$var$to_map = types => new Map(types.map(_ref => {
|
|
14030
|
+
let {
|
|
14031
|
+
type: type,
|
|
14032
|
+
inputs: inputs
|
|
14033
|
+
} = _ref;
|
|
14034
|
+
return [type, inputs];
|
|
14035
|
+
}));
|
|
14036
|
+
function $a1878713ea20ea2c$export$869eb14d6f85ac51(merchant) {
|
|
14037
|
+
let now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now();
|
|
14038
|
+
const pending = $a1878713ea20ea2c$var$in_flight.get(merchant);
|
|
14039
|
+
if (pending && now - pending.started_at < $a1878713ea20ea2c$export$8e79752841e7cdb4) return pending.read;
|
|
14040
|
+
const stored = $a1878713ea20ea2c$var$from_storage(merchant, now);
|
|
14041
|
+
if (stored) return Promise.resolve(stored);
|
|
14042
|
+
const read = $a881711b2a93404e$export$88d793e3827f3436($a881711b2a93404e$export$b6dad15503f66988(merchant, "/context")).then(context => {
|
|
14043
|
+
var _context$recommendati;
|
|
14044
|
+
if (!context) {
|
|
14045
|
+
var _in_flight$get;
|
|
14046
|
+
if (((_in_flight$get = $a1878713ea20ea2c$var$in_flight.get(merchant)) === null || _in_flight$get === void 0 ? void 0 : _in_flight$get.read) === read) $a1878713ea20ea2c$var$in_flight.delete(merchant);
|
|
14047
|
+
return undefined;
|
|
14048
|
+
}
|
|
14049
|
+
const types = (_context$recommendati = context.recommendation_types) !== null && _context$recommendati !== void 0 ? _context$recommendati : [];
|
|
14050
|
+
$a1878713ea20ea2c$var$to_storage(merchant, types, now);
|
|
14051
|
+
return $a1878713ea20ea2c$var$to_map(types);
|
|
14052
|
+
});
|
|
14053
|
+
$a1878713ea20ea2c$var$in_flight.set(merchant, {
|
|
14054
|
+
started_at: now,
|
|
14055
|
+
read: read
|
|
14056
|
+
});
|
|
14057
|
+
return read;
|
|
14058
|
+
}
|
|
14059
|
+
function $a1878713ea20ea2c$export$6cde5c31239dec47() {
|
|
14060
|
+
$a1878713ea20ea2c$var$in_flight.clear();
|
|
14061
|
+
}
|
|
14062
|
+
|
|
14063
|
+
/**
|
|
14064
|
+
* The shopper's recently viewed products, kept in the browser for the native V4 API's history-based recommendations.
|
|
14065
|
+
*
|
|
14066
|
+
* v3 kept this history on the server, per session. V4 content requests carry no session, so a surface that reads
|
|
14067
|
+
* history gets it in the request (`recent_views`), and the SDK keeps the list. It holds product ids and view times
|
|
14068
|
+
* only (no session, user or page data), bounded in size and age, in localStorage per merchant; when localStorage
|
|
14069
|
+
* can't be used (private mode, blocked, full) it lives in memory for the page load.
|
|
14070
|
+
*
|
|
14071
|
+
* A view is recorded when a native product-anchored recommendation request resolves its anchor, as v3's facade records
|
|
14072
|
+
* a resolved anchor as a view; the product being viewed is in the list from the next request on.
|
|
14073
|
+
*/ /** recs-wasm reads the newest 20 views (V4 `recent_views` docs), so more would never be read. */
|
|
14074
|
+
const $67005db9d7b669bc$export$3d684435158adda6 = 20;
|
|
14075
|
+
const $67005db9d7b669bc$export$5eb0a366a50fa99e = 2592000000;
|
|
14076
|
+
/** V4's longest product id (`ProductRef`); a longer one is never a product it knows. */
|
|
14077
|
+
const $67005db9d7b669bc$var$MAX_ID_LENGTH = 500;
|
|
14078
|
+
const $67005db9d7b669bc$var$storage_key = merchant => "depict_v4_recent_views_".concat(merchant);
|
|
14079
|
+
/** The list per merchant as last written, which reads use when localStorage can't hold it. */
|
|
14080
|
+
const $67005db9d7b669bc$var$in_memory = new Map();
|
|
14081
|
+
/** Merchants whose last write to localStorage failed, so localStorage holds an older list than memory. */
|
|
14082
|
+
const $67005db9d7b669bc$var$unstored = new Set();
|
|
14083
|
+
/** `views` as a valid list: well-formed entries, newest first, one per id, not older than the age bound or too many. */
|
|
14084
|
+
function $67005db9d7b669bc$var$bounded(views, now) {
|
|
14085
|
+
if (!Array.isArray(views)) return [];
|
|
14086
|
+
const seen = new Set();
|
|
14087
|
+
const kept = [];
|
|
14088
|
+
for (const item of views) {
|
|
14089
|
+
if (!item || typeof item !== "object") continue;
|
|
14090
|
+
const {
|
|
14091
|
+
id: id,
|
|
14092
|
+
at: at
|
|
14093
|
+
} = item;
|
|
14094
|
+
if (typeof id !== "string" || !id || id.length > $67005db9d7b669bc$var$MAX_ID_LENGTH || typeof at !== "string") continue;
|
|
14095
|
+
const time = Date.parse(at);
|
|
14096
|
+
if (Number.isNaN(time) || now - time > $67005db9d7b669bc$export$5eb0a366a50fa99e) continue;
|
|
14097
|
+
kept.push({
|
|
14098
|
+
view: {
|
|
14099
|
+
id: id,
|
|
14100
|
+
at: new Date(time).toISOString()
|
|
14101
|
+
},
|
|
14102
|
+
time: time
|
|
14103
|
+
});
|
|
14104
|
+
}
|
|
14105
|
+
kept.sort((a, b) => b.time - a.time);
|
|
14106
|
+
const newest = [];
|
|
14107
|
+
for (const {
|
|
14108
|
+
view: view
|
|
14109
|
+
} of kept) {
|
|
14110
|
+
if (seen.has(view.id)) continue;
|
|
14111
|
+
seen.add(view.id);
|
|
14112
|
+
newest.push(view);
|
|
14113
|
+
if (newest.length === $67005db9d7b669bc$export$3d684435158adda6) break;
|
|
14114
|
+
}
|
|
14115
|
+
return newest;
|
|
14116
|
+
}
|
|
14117
|
+
function $67005db9d7b669bc$var$read_stored(merchant) {
|
|
14118
|
+
if ($67005db9d7b669bc$var$unstored.has(merchant)) return $67005db9d7b669bc$var$in_memory.get(merchant);
|
|
14119
|
+
try {
|
|
14120
|
+
const stored = localStorage.getItem($67005db9d7b669bc$var$storage_key(merchant));
|
|
14121
|
+
return stored === null ? [] : JSON.parse(stored);
|
|
14122
|
+
} catch {
|
|
14123
|
+
var _in_memory$get;
|
|
14124
|
+
return (_in_memory$get = $67005db9d7b669bc$var$in_memory.get(merchant)) !== null && _in_memory$get !== void 0 ? _in_memory$get : [];
|
|
14125
|
+
}
|
|
14126
|
+
}
|
|
14127
|
+
function $67005db9d7b669bc$export$2d7138f47b625a04(merchant) {
|
|
14128
|
+
let now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now();
|
|
14129
|
+
return $67005db9d7b669bc$var$bounded($67005db9d7b669bc$var$read_stored(merchant), now);
|
|
14130
|
+
}
|
|
14131
|
+
function $67005db9d7b669bc$export$6379943de8f8af08(merchant, product_id) {
|
|
14132
|
+
let now = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Date.now();
|
|
14133
|
+
const views = $67005db9d7b669bc$var$bounded([{
|
|
14134
|
+
id: product_id,
|
|
14135
|
+
at: new Date(now).toISOString()
|
|
14136
|
+
}, ...$67005db9d7b669bc$export$2d7138f47b625a04(merchant, now)], now);
|
|
14137
|
+
$67005db9d7b669bc$var$in_memory.set(merchant, views);
|
|
14138
|
+
try {
|
|
14139
|
+
localStorage.setItem($67005db9d7b669bc$var$storage_key(merchant), JSON.stringify(views));
|
|
14140
|
+
$67005db9d7b669bc$var$unstored.delete(merchant);
|
|
14141
|
+
} catch {
|
|
14142
|
+
// localStorage unavailable or full: the in-memory list serves this page load.
|
|
14143
|
+
$67005db9d7b669bc$var$unstored.add(merchant);
|
|
14144
|
+
}
|
|
14145
|
+
}
|
|
14146
|
+
|
|
14147
|
+
/** V4's largest `limit`, and the most ids `cart` and `exclude` take. */
|
|
14148
|
+
const $a9dd796a4aeb6bd4$export$f112abad09998fa8 = 100;
|
|
14149
|
+
const $a9dd796a4aeb6bd4$var$MAX_IDS = 100;
|
|
14150
|
+
/** The most products V4's `recent_views` takes. */
|
|
14151
|
+
const $a9dd796a4aeb6bd4$var$MAX_VIEWS = 50;
|
|
14152
|
+
/** What a v3 recommendations call names, as fetchDepictRecommendations takes it. */
|
|
14153
|
+
const $a9dd796a4aeb6bd4$var$distinct = ids => [...new Set(ids.filter(id => typeof id === "string" && id.length > 0))];
|
|
14154
|
+
function $a9dd796a4aeb6bd4$export$17493dc1a89b34e6(call, inputs, recent_views) {
|
|
14155
|
+
var _call$productIds;
|
|
14156
|
+
const reads = input => inputs ? inputs.includes(input) : input === "anchor";
|
|
14157
|
+
const product_ids = $a9dd796a4aeb6bd4$var$distinct((_call$productIds = call.productIds) !== null && _call$productIds !== void 0 ? _call$productIds : []);
|
|
14158
|
+
const request = {
|
|
14159
|
+
market: call.market,
|
|
14160
|
+
...(call.locale ? {
|
|
14161
|
+
locale: call.locale
|
|
14162
|
+
} : {}),
|
|
14163
|
+
type: call.type
|
|
14164
|
+
};
|
|
14165
|
+
if (reads("anchor")) {
|
|
14166
|
+
if (call.categoryId) request.anchor = {
|
|
14167
|
+
type: "category",
|
|
14168
|
+
id: call.categoryId
|
|
14169
|
+
};else if (call.productId) request.anchor = {
|
|
14170
|
+
type: "product",
|
|
14171
|
+
id: call.productId
|
|
14172
|
+
};else if (product_ids.length) {
|
|
14173
|
+
const [first, ...rest] = product_ids;
|
|
14174
|
+
request.anchor = {
|
|
14175
|
+
type: "product",
|
|
14176
|
+
id: first
|
|
14177
|
+
};
|
|
14178
|
+
if (rest.length) request.exclude = rest.slice(0, $a9dd796a4aeb6bd4$var$MAX_IDS);
|
|
14179
|
+
}
|
|
14180
|
+
}
|
|
14181
|
+
if (reads("cart") && product_ids.length) request.cart = product_ids.slice(0, $a9dd796a4aeb6bd4$var$MAX_IDS);
|
|
14182
|
+
if (reads("recent_views") && recent_views.length) request.recent_views = recent_views.slice(0, $a9dd796a4aeb6bd4$var$MAX_VIEWS);
|
|
14183
|
+
if (call.limit) request.limit = Math.min(Math.max(1, Math.floor(call.limit)), $a9dd796a4aeb6bd4$export$f112abad09998fa8);
|
|
14184
|
+
request.include = ["attributes"];
|
|
14185
|
+
const anchor_only = (inputs === null || inputs === void 0 ? void 0 : inputs.length) === 1 && inputs[0] === "anchor";
|
|
14186
|
+
if (anchor_only && !request.anchor) return undefined;
|
|
14187
|
+
return request;
|
|
14188
|
+
}
|
|
14189
|
+
/** `encodeURIComponent`, as V4's own encoder writes a value (`+` would mean a space). */
|
|
14190
|
+
const $a9dd796a4aeb6bd4$var$encode = value => encodeURIComponent(value);
|
|
14191
|
+
function $a9dd796a4aeb6bd4$export$fc756666ac777d0(request) {
|
|
14192
|
+
var _request$recent_views;
|
|
14193
|
+
const pairs = [];
|
|
14194
|
+
const add = (key, value) => value !== undefined && pairs.push("".concat(key, "=").concat(value));
|
|
14195
|
+
const list = values => values === null || values === void 0 ? void 0 : values.map($a9dd796a4aeb6bd4$var$encode).join(",");
|
|
14196
|
+
add("market", $a9dd796a4aeb6bd4$var$encode(request.market));
|
|
14197
|
+
add("locale", request.locale === undefined ? undefined : $a9dd796a4aeb6bd4$var$encode(request.locale));
|
|
14198
|
+
add("type", $a9dd796a4aeb6bd4$var$encode(request.type));
|
|
14199
|
+
add("anchor", request.anchor && "".concat($a9dd796a4aeb6bd4$var$encode(request.anchor.type), ":").concat($a9dd796a4aeb6bd4$var$encode(request.anchor.id)));
|
|
14200
|
+
add("cart", list(request.cart));
|
|
14201
|
+
add("recent_views", (_request$recent_views = request.recent_views) === null || _request$recent_views === void 0 ? void 0 : _request$recent_views.map(view => "".concat($a9dd796a4aeb6bd4$var$encode(view.id), "@").concat($a9dd796a4aeb6bd4$var$encode(view.at))).join(","));
|
|
14202
|
+
add("query", request.query === undefined ? undefined : $a9dd796a4aeb6bd4$var$encode(request.query));
|
|
14203
|
+
add("exclude", list(request.exclude));
|
|
14204
|
+
add("limit", request.limit === undefined ? undefined : String(request.limit));
|
|
14205
|
+
add("include", list(request.include));
|
|
14206
|
+
return pairs.join("&");
|
|
14207
|
+
}
|
|
14208
|
+
const $a9dd796a4aeb6bd4$export$89962366050887f7 = product => {
|
|
14209
|
+
var _product$variants$pro, _product$variants$pro2;
|
|
14210
|
+
return (_product$variants$pro = (_product$variants$pro2 = product.variants[product.selected]) === null || _product$variants$pro2 === void 0 ? void 0 : _product$variants$pro2.product_id) !== null && _product$variants$pro !== void 0 ? _product$variants$pro : product.group_id;
|
|
14211
|
+
};
|
|
14212
|
+
function $a9dd796a4aeb6bd4$export$afe6aeae61a7aa58(hits, scope, type) {
|
|
14213
|
+
const anchors = hits.slice(0, type === "search" ? 10 : 1);
|
|
14214
|
+
return anchors.map((anchor, at) => {
|
|
14215
|
+
const exclude = hits.filter((_, index) => index !== at).map($a9dd796a4aeb6bd4$export$89962366050887f7);
|
|
14216
|
+
return {
|
|
14217
|
+
market: scope.market,
|
|
14218
|
+
...(scope.locale ? {
|
|
14219
|
+
locale: scope.locale
|
|
14220
|
+
} : {}),
|
|
14221
|
+
type: type,
|
|
14222
|
+
anchor: {
|
|
14223
|
+
type: "product",
|
|
14224
|
+
id: $a9dd796a4aeb6bd4$export$89962366050887f7(anchor)
|
|
14225
|
+
},
|
|
14226
|
+
...(exclude.length ? {
|
|
14227
|
+
exclude: exclude.slice(0, $a9dd796a4aeb6bd4$var$MAX_IDS)
|
|
14228
|
+
} : {}),
|
|
14229
|
+
include: ["attributes"]
|
|
14230
|
+
};
|
|
14231
|
+
});
|
|
14232
|
+
}
|
|
14233
|
+
function $a9dd796a4aeb6bd4$export$9af50be6508dcd00(lists, limit) {
|
|
14234
|
+
const merged = [];
|
|
14235
|
+
const taken = new Set();
|
|
14236
|
+
const depth = Math.max(0, ...lists.map(list => list.length));
|
|
14237
|
+
for (let index = 0; index < depth; index++) for (const list of lists) {
|
|
14238
|
+
const product = list[index];
|
|
14239
|
+
if (product === undefined || taken.has(product.group_id)) continue;
|
|
14240
|
+
taken.add(product.group_id);
|
|
14241
|
+
merged.push(product);
|
|
14242
|
+
if (merged.length >= limit) return merged;
|
|
14243
|
+
}
|
|
14244
|
+
return merged;
|
|
14245
|
+
}
|
|
14246
|
+
|
|
14247
|
+
/** Which v3 result id a card's `tracking_id` goes in; the d1 id it carries says the same (`d1.s.…`, `d1.l.…`). */ /** A bare 3/4/6/8-digit hex, as fi stores a computed `color_hex`; v3 serves it with its `#`. */
|
|
14248
|
+
const $d05d7bcd4b59b266$var$BARE_HEX = /^(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
14249
|
+
function $d05d7bcd4b59b266$export$7abfb7bc025aaea8(product, tracking_key) {
|
|
14250
|
+
var _product$attributes;
|
|
14251
|
+
const product_attributes = (_product$attributes = product.attributes) !== null && _product$attributes !== void 0 ? _product$attributes : {};
|
|
14252
|
+
return {
|
|
14253
|
+
variant_index: product.selected,
|
|
14254
|
+
variant_displays: product.variants.map(variant => {
|
|
14255
|
+
var _variant$price, _variant$color, _ref, _variant$attributes$m, _variant$attributes, _variant$title, _price$compare_at, _variant$slug;
|
|
14256
|
+
// A variant carries its own main image only when it differs from the card's; it has no gallery of its own.
|
|
14257
|
+
const image_urls = variant.image ? [variant.image] : [...product.images];
|
|
14258
|
+
const price = (_variant$price = variant.price) !== null && _variant$price !== void 0 ? _variant$price : product.price;
|
|
14259
|
+
const color = (_variant$color = variant.color) !== null && _variant$color !== void 0 ? _variant$color : product.color;
|
|
14260
|
+
const display = {
|
|
14261
|
+
...product_attributes,
|
|
14262
|
+
// The merchant's variant attributes under their own keys (`add_to_cart_id`, `item_group_id`, …); the card
|
|
14263
|
+
// fields below win over a same-named attribute, as on v3.
|
|
14264
|
+
...variant.attributes,
|
|
14265
|
+
product_id: variant.product_id,
|
|
14266
|
+
main_product_id: (_ref = (_variant$attributes$m = (_variant$attributes = variant.attributes) === null || _variant$attributes === void 0 ? void 0 : _variant$attributes.main_product_id) !== null && _variant$attributes$m !== void 0 ? _variant$attributes$m : variant.group_id) !== null && _ref !== void 0 ? _ref : product.group_id,
|
|
14267
|
+
title: (_variant$title = variant.title) !== null && _variant$title !== void 0 ? _variant$title : product.title,
|
|
14268
|
+
image_urls: image_urls,
|
|
14269
|
+
sale_price: price.amount,
|
|
14270
|
+
original_price: (_price$compare_at = price.compare_at) !== null && _price$compare_at !== void 0 ? _price$compare_at : price.amount,
|
|
14271
|
+
...(price.lowest !== undefined ? {
|
|
14272
|
+
lowest_price: price.lowest
|
|
14273
|
+
} : {}),
|
|
14274
|
+
in_stock: variant.in_stock,
|
|
14275
|
+
...(color ? {
|
|
14276
|
+
color_name: color.name
|
|
14277
|
+
} : {}),
|
|
14278
|
+
uri: (_variant$slug = variant.slug) !== null && _variant$slug !== void 0 ? _variant$slug : product.slug
|
|
14279
|
+
};
|
|
14280
|
+
const hex = display.color_hex;
|
|
14281
|
+
if (typeof hex === "string" && $d05d7bcd4b59b266$var$BARE_HEX.test(hex)) display.color_hex = "#".concat(hex);
|
|
14282
|
+
return display;
|
|
14283
|
+
}),
|
|
14284
|
+
[tracking_key]: product.tracking_id
|
|
14285
|
+
};
|
|
14286
|
+
}
|
|
14287
|
+
function $fdcc2c233c7ae6b6$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
14288
|
+
$fdcc2c233c7ae6b6$var$_checkPrivateRedeclaration(obj, privateMap);
|
|
14289
|
+
privateMap.set(obj, value);
|
|
14290
|
+
}
|
|
14291
|
+
function $fdcc2c233c7ae6b6$var$_checkPrivateRedeclaration(obj, privateCollection) {
|
|
14292
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
14293
|
+
}
|
|
14294
|
+
class $fdcc2c233c7ae6b6$export$f5ea4d073ddb4bdb extends Error {}
|
|
14295
|
+
/** v3's names for V4's built-in fields, both ways. */
|
|
14296
|
+
const $fdcc2c233c7ae6b6$var$V3_FIELD = {
|
|
14297
|
+
price: "sale_price"
|
|
14298
|
+
};
|
|
14299
|
+
const $fdcc2c233c7ae6b6$var$V4_FIELD = {
|
|
14300
|
+
sale_price: "price"
|
|
14301
|
+
};
|
|
14302
|
+
const $fdcc2c233c7ae6b6$var$V3_SORT = {
|
|
14303
|
+
relevance: "_relevance",
|
|
14304
|
+
price: "sale_price",
|
|
14305
|
+
newest: "product_timestamp"
|
|
14306
|
+
};
|
|
14307
|
+
const $fdcc2c233c7ae6b6$var$V4_SORT = Object.fromEntries(Object.entries($fdcc2c233c7ae6b6$var$V3_SORT).map(_ref => {
|
|
14308
|
+
let [v4, v3] = _ref;
|
|
14309
|
+
return [v3, v4];
|
|
14310
|
+
}));
|
|
14311
|
+
/** V4's public filter field syntax (`FilterField` in the contract). */
|
|
14312
|
+
const $fdcc2c233c7ae6b6$var$PUBLIC_FIELD = /^[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)*$/;
|
|
14313
|
+
/**
|
|
14314
|
+
* Fields that are never a lowercased group title: v3's toggles carry no group title, and `sale_price` is v3's own
|
|
14315
|
+
* name for V4's price. A reserved V4 field (`price`, `brand`, `category`) is not among them: iciw's category tree is
|
|
14316
|
+
* titled "Category", so `category` from a link may name `product_scollection_category_hierarchy`.
|
|
14317
|
+
*/
|
|
14318
|
+
const $fdcc2c233c7ae6b6$var$NEVER_A_TITLE = new Set(["in_stock", "on_sale", "sale_price"]);
|
|
14319
|
+
/** fi's enriched colour fields: their values are names, never a `<name>;#<hex>` composite. */
|
|
14320
|
+
const $fdcc2c233c7ae6b6$var$FI_COLOUR_FIELDS = new Set(["colors", "color_details"]);
|
|
14321
|
+
/** The colour template's field, which indexes the composite itself. */
|
|
14322
|
+
const $fdcc2c233c7ae6b6$var$V3_TEMPLATE_COLOUR = "color_with_hex_list";
|
|
14323
|
+
/** Legacy's colour pill composite suffix (`Green;#9ea386`). */
|
|
14324
|
+
const $fdcc2c233c7ae6b6$var$HEX_SUFFIX = /;#[0-9a-fA-F]{3,8}\s*$/;
|
|
14325
|
+
const $fdcc2c233c7ae6b6$var$NUMERIC = /^-?\d+(\.\d+)?$/;
|
|
14326
|
+
/** realtime's separator between the levels of a hierarchical facet value (`Shop # Woman`). */
|
|
14327
|
+
const $fdcc2c233c7ae6b6$var$HIERARCHY_SEPARATOR = " # ";
|
|
14328
|
+
/** The features realtime's category tree is built on. */
|
|
14329
|
+
const $fdcc2c233c7ae6b6$var$CATEGORY_TREE_FIELDS = new Set(["product_category_hierarchy", "product_scollection_category_hierarchy"]);
|
|
14330
|
+
/** V4's public name for the discount template's field (realtime `v4/worker/src/search/fields.ts`). */
|
|
14331
|
+
const $fdcc2c233c7ae6b6$var$DISCOUNT_FIELD = "discount";
|
|
14332
|
+
/** The fields of V4's toggle facets (the `on_sale` and `in_stock` templates). */
|
|
14333
|
+
const $fdcc2c233c7ae6b6$var$V3_TOGGLES = new Set(["on_sale", "in_stock"]);
|
|
14334
|
+
var $fdcc2c233c7ae6b6$var$_by_key = /*#__PURE__*/new WeakMap();
|
|
14335
|
+
class $fdcc2c233c7ae6b6$export$8d488bcc71d07ffb {
|
|
14336
|
+
constructor() {
|
|
14337
|
+
$fdcc2c233c7ae6b6$var$_classPrivateFieldInitSpec(this, $fdcc2c233c7ae6b6$var$_by_key, {
|
|
14338
|
+
writable: true,
|
|
14339
|
+
value: new Map()
|
|
14340
|
+
});
|
|
14341
|
+
}
|
|
14342
|
+
/** Adds the facets of one browse response. */
|
|
14343
|
+
learn_(facets) {
|
|
14344
|
+
for (const facet of facets !== null && facets !== void 0 ? facets : []) {
|
|
14345
|
+
const info = {
|
|
14346
|
+
field_: facet.field,
|
|
14347
|
+
checkbox_: facet.type === "checkbox" && !$fdcc2c233c7ae6b6$var$is_toggle(facet),
|
|
14348
|
+
colour_: $fdcc2c233c7ae6b6$var$FI_COLOUR_FIELDS.has(facet.field) || facet.type === "swatch" && facet.field !== $fdcc2c233c7ae6b6$var$V3_TEMPLATE_COLOUR
|
|
14349
|
+
};
|
|
14350
|
+
$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $fdcc2c233c7ae6b6$var$_by_key).set(facet.field, info);
|
|
14351
|
+
const v3_field = $fdcc2c233c7ae6b6$var$V3_FIELD[facet.field];
|
|
14352
|
+
if (v3_field) $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $fdcc2c233c7ae6b6$var$_by_key).set(v3_field, info);
|
|
14353
|
+
if (facet.title) $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $fdcc2c233c7ae6b6$var$_by_key).set(facet.title.toLowerCase(), info);
|
|
14354
|
+
}
|
|
14355
|
+
}
|
|
14356
|
+
/** The field a v3 filter field names, when a served facet has it as its field or its title. */
|
|
14357
|
+
get_(field) {
|
|
14358
|
+
const bare = field.replace(/#$/, "");
|
|
14359
|
+
const direct = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $fdcc2c233c7ae6b6$var$_by_key).get(bare);
|
|
14360
|
+
if (direct) return direct;
|
|
14361
|
+
let wanted;
|
|
14362
|
+
try {
|
|
14363
|
+
wanted = decodeURIComponent(bare).toLowerCase();
|
|
14364
|
+
} catch {
|
|
14365
|
+
wanted = bare.toLowerCase();
|
|
14366
|
+
}
|
|
14367
|
+
return $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $fdcc2c233c7ae6b6$var$_by_key).get(wanted);
|
|
14368
|
+
}
|
|
14369
|
+
}
|
|
14370
|
+
function $fdcc2c233c7ae6b6$export$3b6ba2422a5e0aa0(field, index) {
|
|
14371
|
+
return !!index.get_(field) || $fdcc2c233c7ae6b6$var$NEVER_A_TITLE.has(field.replace(/#$/, ""));
|
|
14372
|
+
}
|
|
14373
|
+
function $fdcc2c233c7ae6b6$var$is_empty(data) {
|
|
14374
|
+
return data === undefined || data === null || data === "" || Array.isArray(data) && !data.length;
|
|
14375
|
+
}
|
|
14376
|
+
function $fdcc2c233c7ae6b6$var$literal(value, field) {
|
|
14377
|
+
const text = String(value);
|
|
14378
|
+
if (text.includes("`")) throw new $fdcc2c233c7ae6b6$export$f5ea4d073ddb4bdb("filters: a value of ".concat(field, " contains a backtick"));
|
|
14379
|
+
// A boolean-looking string is written bare, as realtime's filter writer does for every field.
|
|
14380
|
+
if (/^(true|True|false|False)$/.test(text)) return text.toLowerCase();
|
|
14381
|
+
if (field === "price" && $fdcc2c233c7ae6b6$var$NUMERIC.test(text)) return text;
|
|
14382
|
+
return typeof value === "string" ? "`".concat(text, "`") : text;
|
|
14383
|
+
}
|
|
14384
|
+
function $fdcc2c233c7ae6b6$var$lax_number(value) {
|
|
14385
|
+
if (typeof value === "number") return value;
|
|
14386
|
+
if (typeof value !== "string" || value.trim() === "") return undefined;
|
|
14387
|
+
const number = Number(value);
|
|
14388
|
+
return Number.isFinite(number) ? number : undefined;
|
|
14389
|
+
}
|
|
14390
|
+
function $fdcc2c233c7ae6b6$export$c17bb5d2ead3e8f3(filter, index) {
|
|
14391
|
+
var _ref2, _info$field_;
|
|
14392
|
+
if ($fdcc2c233c7ae6b6$var$is_empty(filter.data)) return undefined;
|
|
14393
|
+
const info = index.get_(filter.field);
|
|
14394
|
+
const bare = filter.field.replace(/#$/, "");
|
|
14395
|
+
const field = (_ref2 = (_info$field_ = info === null || info === void 0 ? void 0 : info.field_) !== null && _info$field_ !== void 0 ? _info$field_ : $fdcc2c233c7ae6b6$var$V4_FIELD[bare]) !== null && _ref2 !== void 0 ? _ref2 : bare;
|
|
14396
|
+
if (!$fdcc2c233c7ae6b6$var$PUBLIC_FIELD.test(field)) throw new $fdcc2c233c7ae6b6$export$f5ea4d073ddb4bdb("Invalid filter field `".concat(filter.field, "`"));
|
|
14397
|
+
const clause = text => ({
|
|
14398
|
+
field_: field,
|
|
14399
|
+
clause_: text
|
|
14400
|
+
});
|
|
14401
|
+
const colour = $fdcc2c233c7ae6b6$var$FI_COLOUR_FIELDS.has(field) || !!(info !== null && info !== void 0 && info.colour_);
|
|
14402
|
+
const data = filter.data;
|
|
14403
|
+
const values = (Array.isArray(data) ? data : [data]).map(value => !Array.isArray(value) ? colour && typeof value === "string" ? value.replace($fdcc2c233c7ae6b6$var$HEX_SUFFIX, "").trim() || value : value : field === "category" ? value[value.length - 1] : value.map(String).join($fdcc2c233c7ae6b6$var$HIERARCHY_SEPARATOR));
|
|
14404
|
+
const list = () => "[".concat(values.map(value => $fdcc2c233c7ae6b6$var$literal(value, field)).join(","), "]");
|
|
14405
|
+
// V4's discount filter (the discount template's "X% or more" radio) is a threshold, so `in` or `eq` on it means
|
|
14406
|
+
// "this discount or more", as on the facade since realtime#2181: a link with no operator decodes as `in`, and a
|
|
14407
|
+
// shop may send `in ["0.2"]` itself. Several values take the largest, as `geq` does.
|
|
14408
|
+
const op = (filter.op === "in" || filter.op === "eq") && field === $fdcc2c233c7ae6b6$var$DISCOUNT_FIELD ? "geq" : filter.op;
|
|
14409
|
+
// A configured checkbox keeps in/nin; every other op on it becomes in.
|
|
14410
|
+
if (op !== "in" && op !== "nin" && info !== null && info !== void 0 && info.checkbox_) return clause("".concat(field, ":=").concat(list()));
|
|
14411
|
+
const one = () => {
|
|
14412
|
+
if (values.length !== 1) throw new $fdcc2c233c7ae6b6$export$f5ea4d073ddb4bdb("filters: ".concat(op, " takes one value"));
|
|
14413
|
+
return $fdcc2c233c7ae6b6$var$literal(values[0], field);
|
|
14414
|
+
};
|
|
14415
|
+
// A comparison takes a number, also one sent as a string; of several numbers `geq` takes the largest.
|
|
14416
|
+
const bound = () => {
|
|
14417
|
+
const numbers = values.map(value => typeof value === "number" || typeof value === "string" && $fdcc2c233c7ae6b6$var$NUMERIC.test(value) ? Number(value) : undefined);
|
|
14418
|
+
if (numbers.length === 0 || numbers.some(number => number === undefined)) return one();
|
|
14419
|
+
if (numbers.length > 1 && op !== "geq") return one();
|
|
14420
|
+
return String(Math.max(...numbers));
|
|
14421
|
+
};
|
|
14422
|
+
switch (op) {
|
|
14423
|
+
case "eq":
|
|
14424
|
+
return clause("".concat(field, ":=").concat(one()));
|
|
14425
|
+
case "neq":
|
|
14426
|
+
return clause("".concat(field, ":!=").concat(one()));
|
|
14427
|
+
case "in":
|
|
14428
|
+
return clause("".concat(field, ":=").concat(list()));
|
|
14429
|
+
case "nin":
|
|
14430
|
+
return clause("".concat(field, ":!=").concat(list()));
|
|
14431
|
+
case "leq":
|
|
14432
|
+
return clause("".concat(field, ":<=").concat(bound()));
|
|
14433
|
+
case "geq":
|
|
14434
|
+
return clause("".concat(field, ":>=").concat(bound()));
|
|
14435
|
+
case "inrange":
|
|
14436
|
+
{
|
|
14437
|
+
const [min, max] = values.map($fdcc2c233c7ae6b6$var$lax_number);
|
|
14438
|
+
if (min === undefined || max === undefined || values.length !== 2) throw new $fdcc2c233c7ae6b6$export$f5ea4d073ddb4bdb("filters: inrange takes [min, max]");
|
|
14439
|
+
return clause("".concat(field, ":[").concat(min, "..").concat(max, "]"));
|
|
14440
|
+
}
|
|
14441
|
+
default:
|
|
14442
|
+
throw new $fdcc2c233c7ae6b6$export$f5ea4d073ddb4bdb("filters: unknown op ".concat(op));
|
|
14443
|
+
}
|
|
14444
|
+
}
|
|
14445
|
+
function $fdcc2c233c7ae6b6$export$407f30f25da13cc7(filters, index) {
|
|
14446
|
+
const clauses = filters.flatMap(filter => {
|
|
14447
|
+
var _v3_filter_to_clause$, _v3_filter_to_clause;
|
|
14448
|
+
return (_v3_filter_to_clause$ = (_v3_filter_to_clause = $fdcc2c233c7ae6b6$export$c17bb5d2ead3e8f3(filter, index)) === null || _v3_filter_to_clause === void 0 ? void 0 : _v3_filter_to_clause.clause_) !== null && _v3_filter_to_clause$ !== void 0 ? _v3_filter_to_clause$ : [];
|
|
14449
|
+
});
|
|
14450
|
+
return clauses.length ? clauses.join(" && ") : undefined;
|
|
14451
|
+
}
|
|
14452
|
+
function $fdcc2c233c7ae6b6$export$c38de645260a41ed(error, clauses) {
|
|
14453
|
+
var _match, _error$message;
|
|
14454
|
+
if (!error || !clauses.length) return [];
|
|
14455
|
+
const named = (_match = ((_error$message = error.message) !== null && _error$message !== void 0 ? _error$message : "").match(/"([A-Za-z0-9_.-]+)/)) === null || _match === void 0 ? void 0 : _match[1];
|
|
14456
|
+
if (error.code === "unknown_filter_field") {
|
|
14457
|
+
if (error.allowed) {
|
|
14458
|
+
const allowed = new Set(error.allowed);
|
|
14459
|
+
return clauses.filter(clause => !allowed.has(clause.field_));
|
|
14460
|
+
}
|
|
14461
|
+
return clauses.filter(clause => clause.field_ === named);
|
|
14462
|
+
}
|
|
14463
|
+
if (error.code === "invalid_filter") {
|
|
14464
|
+
const on_field = clauses.filter(clause => clause.field_ === named);
|
|
14465
|
+
return on_field.length ? on_field : [...clauses];
|
|
14466
|
+
}
|
|
14467
|
+
return [];
|
|
14468
|
+
}
|
|
14469
|
+
function $fdcc2c233c7ae6b6$export$78eb8e636d89ff30(sort) {
|
|
14470
|
+
var _V4_SORT$sort$field;
|
|
14471
|
+
if (!sort || sort.field === "_relevance") return undefined;
|
|
14472
|
+
return {
|
|
14473
|
+
field: (_V4_SORT$sort$field = $fdcc2c233c7ae6b6$var$V4_SORT[sort.field]) !== null && _V4_SORT$sort$field !== void 0 ? _V4_SORT$sort$field : sort.field,
|
|
14474
|
+
order: sort.order
|
|
14475
|
+
};
|
|
14476
|
+
}
|
|
14477
|
+
function $fdcc2c233c7ae6b6$export$cd08b64be5110ce2(sorts) {
|
|
14478
|
+
return sorts.map(sort => {
|
|
14479
|
+
var _V3_SORT$sort$field;
|
|
14480
|
+
return {
|
|
14481
|
+
field: (_V3_SORT$sort$field = $fdcc2c233c7ae6b6$var$V3_SORT[sort.field]) !== null && _V3_SORT$sort$field !== void 0 ? _V3_SORT$sort$field : sort.field,
|
|
14482
|
+
order: sort.order,
|
|
14483
|
+
meta: {
|
|
14484
|
+
title: sort.title,
|
|
14485
|
+
values: [sort.order],
|
|
14486
|
+
names: [sort.title]
|
|
14487
|
+
}
|
|
14488
|
+
};
|
|
14489
|
+
});
|
|
14490
|
+
}
|
|
14491
|
+
const $fdcc2c233c7ae6b6$var$V3_VALUES_TYPE = {
|
|
14492
|
+
checkbox: "checkbox",
|
|
14493
|
+
radio: "radio",
|
|
14494
|
+
swatch: "checkbox-color",
|
|
14495
|
+
hierarchy: "checkbox-hierarchical",
|
|
14496
|
+
grid: "checkbox-grid"
|
|
14497
|
+
};
|
|
14498
|
+
/** A toggle is a template facet's one `true` value. */
|
|
14499
|
+
function $fdcc2c233c7ae6b6$var$is_toggle(facet) {
|
|
14500
|
+
return $fdcc2c233c7ae6b6$var$V3_TOGGLES.has(facet.field) && facet.type === "checkbox" && facet.values.length === 1 && facet.values[0].value === "true";
|
|
14501
|
+
}
|
|
14502
|
+
function $fdcc2c233c7ae6b6$var$category_path(value) {
|
|
14503
|
+
return value.split("#").map(level => level.trim()).filter(Boolean);
|
|
14504
|
+
}
|
|
14505
|
+
function $fdcc2c233c7ae6b6$export$da9af372695714ef(facets, currency) {
|
|
14506
|
+
return facets.filter(facet => facet.type === "range" || facet.values.length > 0).map(facet => {
|
|
14507
|
+
var _V3_FIELD$facet$field, _V3_VALUES_TYPE$facet;
|
|
14508
|
+
const field = (_V3_FIELD$facet$field = $fdcc2c233c7ae6b6$var$V3_FIELD[facet.field]) !== null && _V3_FIELD$facet$field !== void 0 ? _V3_FIELD$facet$field : facet.field;
|
|
14509
|
+
if (facet.type === "range") return {
|
|
14510
|
+
field: field,
|
|
14511
|
+
op: "inrange",
|
|
14512
|
+
data: [facet.min, facet.max],
|
|
14513
|
+
meta: {
|
|
14514
|
+
group_title: facet.title,
|
|
14515
|
+
type: "range",
|
|
14516
|
+
min: facet.min,
|
|
14517
|
+
max: facet.max,
|
|
14518
|
+
...(facet.field === "price" && currency ? {
|
|
14519
|
+
currency: currency
|
|
14520
|
+
} : {})
|
|
14521
|
+
},
|
|
14522
|
+
id: "".concat(field, "1")
|
|
14523
|
+
};
|
|
14524
|
+
const hierarchy = facet.type === "hierarchy";
|
|
14525
|
+
const path = value => $fdcc2c233c7ae6b6$var$CATEGORY_TREE_FIELDS.has(facet.field) ? $fdcc2c233c7ae6b6$var$category_path(value) : value.split($fdcc2c233c7ae6b6$var$HIERARCHY_SEPARATOR);
|
|
14526
|
+
if ($fdcc2c233c7ae6b6$var$is_toggle(facet)) return {
|
|
14527
|
+
field: field,
|
|
14528
|
+
op: "eq",
|
|
14529
|
+
meta: {
|
|
14530
|
+
type: "checkbox",
|
|
14531
|
+
values: facet.values.map(value => value.value),
|
|
14532
|
+
counts: facet.values.map(value => value.count),
|
|
14533
|
+
names: facet.values.map(value => value.label)
|
|
14534
|
+
},
|
|
14535
|
+
id: "".concat(field, "1")
|
|
14536
|
+
};
|
|
14537
|
+
// Two spellings of one category path are one row in the tree.
|
|
14538
|
+
const seen = new Set();
|
|
14539
|
+
const values = $fdcc2c233c7ae6b6$var$CATEGORY_TREE_FIELDS.has(facet.field) ? facet.values.filter(_ref3 => {
|
|
14540
|
+
let {
|
|
14541
|
+
value: value
|
|
14542
|
+
} = _ref3;
|
|
14543
|
+
const levels = path(value);
|
|
14544
|
+
const key = JSON.stringify(levels);
|
|
14545
|
+
if (levels.length === 0 || seen.has(key)) return false;
|
|
14546
|
+
seen.add(key);
|
|
14547
|
+
return true;
|
|
14548
|
+
}) : facet.values;
|
|
14549
|
+
return {
|
|
14550
|
+
field: field,
|
|
14551
|
+
op: facet.field === "discount" ? "geq" : "in",
|
|
14552
|
+
meta: {
|
|
14553
|
+
group_title: facet.title,
|
|
14554
|
+
type: (_V3_VALUES_TYPE$facet = $fdcc2c233c7ae6b6$var$V3_VALUES_TYPE[facet.type]) !== null && _V3_VALUES_TYPE$facet !== void 0 ? _V3_VALUES_TYPE$facet : "checkbox",
|
|
14555
|
+
values: values.map(value => hierarchy ? path(value.value) : value.value),
|
|
14556
|
+
counts: values.map(value => value.count),
|
|
14557
|
+
names: values.map(value => hierarchy ? path(value.value).slice(-1)[0] : value.label),
|
|
14558
|
+
// The colour template sends swatches only with one to paint; a colour filter always sends them.
|
|
14559
|
+
...(facet.type === "swatch" && (facet.field !== $fdcc2c233c7ae6b6$var$V3_TEMPLATE_COLOUR || facet.values.some(value => value.swatch)) ? {
|
|
14560
|
+
swatches: facet.values.map(value => {
|
|
14561
|
+
var _value$swatch;
|
|
14562
|
+
return (_value$swatch = value.swatch) !== null && _value$swatch !== void 0 ? _value$swatch : null;
|
|
14563
|
+
})
|
|
14564
|
+
} : {})
|
|
14565
|
+
},
|
|
14566
|
+
id: "".concat(field, "1")
|
|
14567
|
+
};
|
|
14568
|
+
});
|
|
14569
|
+
}
|
|
14570
|
+
function $fdcc2c233c7ae6b6$export$b84a41a5163c4fce(content) {
|
|
14571
|
+
return content.map(hit => {
|
|
14572
|
+
var _hit$highlights;
|
|
14573
|
+
return {
|
|
14574
|
+
type: "content_link",
|
|
14575
|
+
title: hit.title,
|
|
14576
|
+
...(hit.description !== undefined ? {
|
|
14577
|
+
description: hit.description
|
|
14578
|
+
} : {}),
|
|
14579
|
+
...(hit.image_url !== undefined ? {
|
|
14580
|
+
image_url: hit.image_url
|
|
14581
|
+
} : {}),
|
|
14582
|
+
page_url: hit.url,
|
|
14583
|
+
highlights: (_hit$highlights = hit.highlights) !== null && _hit$highlights !== void 0 ? _hit$highlights : []
|
|
14584
|
+
};
|
|
14585
|
+
});
|
|
14586
|
+
}
|
|
14587
|
+
function $efe3f499b0d72444$export$efb7dd882d411dd4(response, door, offset) {
|
|
14588
|
+
var _response$total, _response$sorts, _response$facets, _response$content;
|
|
14589
|
+
const tracking_key = door === "search" ? "search_result_id" : "product_listing_result_id";
|
|
14590
|
+
return {
|
|
14591
|
+
n_hits: (_response$total = response.total) !== null && _response$total !== void 0 ? _response$total : offset + response.products.length,
|
|
14592
|
+
sorts: $fdcc2c233c7ae6b6$export$cd08b64be5110ce2((_response$sorts = response.sorts) !== null && _response$sorts !== void 0 ? _response$sorts : []),
|
|
14593
|
+
filters: $fdcc2c233c7ae6b6$export$da9af372695714ef((_response$facets = response.facets) !== null && _response$facets !== void 0 ? _response$facets : [], response.currency),
|
|
14594
|
+
...(door === "search" ? {
|
|
14595
|
+
search_request_id: response.request_id,
|
|
14596
|
+
content_search_links: $fdcc2c233c7ae6b6$export$b84a41a5163c4fce((_response$content = response.content) !== null && _response$content !== void 0 ? _response$content : []),
|
|
14597
|
+
is_fallback: null
|
|
14598
|
+
} : {
|
|
14599
|
+
product_listing_request_id: response.request_id
|
|
14600
|
+
}),
|
|
14601
|
+
...(response.cursor !== undefined ? {
|
|
14602
|
+
cursor: response.cursor
|
|
14603
|
+
} : {}),
|
|
14604
|
+
displays: response.products.map(product => $d05d7bcd4b59b266$export$7abfb7bc025aaea8(product, tracking_key))
|
|
14605
|
+
};
|
|
14606
|
+
}
|
|
14607
|
+
function $efe3f499b0d72444$var$listing_ref_to_v3(ref, listing_type, show) {
|
|
14608
|
+
return {
|
|
14609
|
+
listing_id: ref.id,
|
|
14610
|
+
...(ref.external_id !== undefined ? {
|
|
14611
|
+
external_id: ref.external_id
|
|
14612
|
+
} : {}),
|
|
14613
|
+
listing_type: listing_type,
|
|
14614
|
+
...show,
|
|
14615
|
+
image_urls: [],
|
|
14616
|
+
title: ref.title,
|
|
14617
|
+
...(ref.slug !== undefined ? {
|
|
14618
|
+
slug: ref.slug
|
|
14619
|
+
} : {})
|
|
14620
|
+
};
|
|
14621
|
+
}
|
|
14622
|
+
function $efe3f499b0d72444$export$996f2b1e66d9b5af(listing) {
|
|
14623
|
+
const listing_type = listing.type;
|
|
14624
|
+
const quick_links_are_siblings = listing.quick_links.some(link => link.id === listing.id);
|
|
14625
|
+
const quick_links = listing.quick_links.map(link => $efe3f499b0d72444$var$listing_ref_to_v3(link, listing_type, {
|
|
14626
|
+
show_in_breadcrumbs: true,
|
|
14627
|
+
show_in_quicklinks: true
|
|
14628
|
+
}));
|
|
14629
|
+
return {
|
|
14630
|
+
listing_id: listing.id,
|
|
14631
|
+
...(listing.external_id !== undefined ? {
|
|
14632
|
+
external_id: listing.external_id
|
|
14633
|
+
} : {}),
|
|
14634
|
+
listing_type: listing_type,
|
|
14635
|
+
show_in_breadcrumbs: listing.show_in_breadcrumbs,
|
|
14636
|
+
show_in_quicklinks: true,
|
|
14637
|
+
image_urls: listing.images,
|
|
14638
|
+
title: listing.title,
|
|
14639
|
+
...(listing.slug !== undefined ? {
|
|
14640
|
+
slug: listing.slug
|
|
14641
|
+
} : {}),
|
|
14642
|
+
ancestors: listing.breadcrumbs.map(ref => $efe3f499b0d72444$var$listing_ref_to_v3(ref, "category", {
|
|
14643
|
+
show_in_breadcrumbs: true,
|
|
14644
|
+
show_in_quicklinks: true
|
|
14645
|
+
})),
|
|
14646
|
+
siblings: quick_links_are_siblings ? quick_links : [],
|
|
14647
|
+
children: quick_links_are_siblings ? [] : quick_links,
|
|
14648
|
+
content_blocks: listing.content_blocks
|
|
14649
|
+
};
|
|
14650
|
+
}
|
|
14651
|
+
function $efe3f499b0d72444$export$76d96892da63b395(tree) {
|
|
14652
|
+
const by_id = new Map();
|
|
14653
|
+
const walk = (nodes, chain) => {
|
|
14654
|
+
for (const node of nodes) {
|
|
14655
|
+
if (!by_id.has(node.id)) by_id.set(node.id, chain);
|
|
14656
|
+
walk(node.children, [...chain, $efe3f499b0d72444$var$listing_ref_to_v3(node, node.type, {
|
|
14657
|
+
show_in_breadcrumbs: true,
|
|
14658
|
+
show_in_quicklinks: true
|
|
14659
|
+
})]);
|
|
14660
|
+
}
|
|
14661
|
+
};
|
|
14662
|
+
walk(tree, []);
|
|
14663
|
+
return listing_id => by_id.get(listing_id);
|
|
14664
|
+
}
|
|
14665
|
+
function $efe3f499b0d72444$export$2860125b419015f8(response, ancestors_of) {
|
|
14666
|
+
return {
|
|
14667
|
+
suggestions_request_id: response.request_id,
|
|
14668
|
+
suggestions: response.suggestions.map(suggestion => {
|
|
14669
|
+
if (suggestion.type === "query") return {
|
|
14670
|
+
type: "query",
|
|
14671
|
+
query: suggestion.query,
|
|
14672
|
+
suggestions_result_id: ""
|
|
14673
|
+
};
|
|
14674
|
+
const from_tree = ancestors_of === null || ancestors_of === void 0 ? void 0 : ancestors_of(suggestion.listing.id);
|
|
14675
|
+
const ancestors = from_tree && $efe3f499b0d72444$var$same_titles(from_tree, suggestion.path) ? from_tree : [];
|
|
14676
|
+
return {
|
|
14677
|
+
type: "listing",
|
|
14678
|
+
listing_id: suggestion.listing.id,
|
|
14679
|
+
...(suggestion.listing.external_id !== undefined ? {
|
|
14680
|
+
external_id: suggestion.listing.external_id
|
|
14681
|
+
} : {}),
|
|
14682
|
+
listing_type: suggestion.listing.type,
|
|
14683
|
+
show_in_breadcrumbs: true,
|
|
14684
|
+
show_in_quicklinks: true,
|
|
14685
|
+
image_urls: suggestion.listing.images,
|
|
14686
|
+
title: suggestion.listing.title,
|
|
14687
|
+
...(suggestion.listing.slug !== undefined ? {
|
|
14688
|
+
slug: suggestion.listing.slug
|
|
14689
|
+
} : {}),
|
|
14690
|
+
suggestions_result_id: "",
|
|
14691
|
+
ancestors: ancestors
|
|
14692
|
+
};
|
|
14693
|
+
})
|
|
14694
|
+
};
|
|
14695
|
+
}
|
|
14696
|
+
const $efe3f499b0d72444$var$same_titles = (ancestors, path) => ancestors.length === path.length && ancestors.every((ancestor, index) => ancestor.title === path[index]);
|
|
14697
|
+
/** `encodeURIComponent`, as V4's own encoder writes a value (`+` would mean a space). */
|
|
14698
|
+
const $efe3f499b0d72444$var$encode = value => encodeURIComponent(value);
|
|
14699
|
+
function $efe3f499b0d72444$export$7659319cdb555579(request) {
|
|
14700
|
+
var _request$include;
|
|
14701
|
+
const pairs = ["market=".concat($efe3f499b0d72444$var$encode(request.market))];
|
|
14702
|
+
const add = (key, value) => value !== undefined && pairs.push("".concat(key, "=").concat(value));
|
|
14703
|
+
add("locale", request.locale === undefined ? undefined : $efe3f499b0d72444$var$encode(request.locale));
|
|
14704
|
+
add("query", request.query === undefined ? undefined : $efe3f499b0d72444$var$encode(request.query));
|
|
14705
|
+
if (request.listing && "id" in request.listing) add("listing", $efe3f499b0d72444$var$encode(request.listing.id));else if (request.listing) add("listing_external_id", $efe3f499b0d72444$var$encode(request.listing.external_id));
|
|
14706
|
+
add("filter_by", request.filter_by === undefined ? undefined : $efe3f499b0d72444$var$encode(request.filter_by));
|
|
14707
|
+
if (request.sort) add("sort", "".concat($efe3f499b0d72444$var$encode(request.sort.field), ".").concat(request.sort.order));
|
|
14708
|
+
add("include", (_request$include = request.include) === null || _request$include === void 0 ? void 0 : _request$include.join(","));
|
|
14709
|
+
add("cursor", request.cursor);
|
|
14710
|
+
add("limit", request.limit === undefined ? undefined : String(request.limit));
|
|
14711
|
+
return pairs.join("&");
|
|
14712
|
+
}
|
|
14713
|
+
function $efe3f499b0d72444$export$fec3e4b5adfcea2c(params) {
|
|
14714
|
+
return params.filter(pair => pair[1] !== undefined).map(_ref => {
|
|
14715
|
+
let [key, value] = _ref;
|
|
14716
|
+
return "".concat(key, "=").concat($efe3f499b0d72444$var$encode(value));
|
|
14717
|
+
}).join("&");
|
|
14718
|
+
}
|
|
14719
|
+
function $efe3f499b0d72444$export$eb90c08da400512d(locale) {
|
|
14720
|
+
return locale ? locale.replace(/_/g, "-") : undefined;
|
|
14721
|
+
}
|
|
14722
|
+
|
|
14723
|
+
/** realtime's related search page: the hits related recommendations anchor on and never repeat. */
|
|
14724
|
+
const $5255d5015f3bff20$var$RELATED_SEARCH_PAGE = 100;
|
|
14725
|
+
const $5255d5015f3bff20$var$get_recommendations = (merchant, request) => $a881711b2a93404e$export$88d793e3827f3436($a881711b2a93404e$export$b6dad15503f66988(merchant, "/recommendations") + "?" + $a9dd796a4aeb6bd4$export$fc756666ac777d0(request));
|
|
14726
|
+
const $5255d5015f3bff20$var$to_displays = products => products.map(product => $d05d7bcd4b59b266$export$7abfb7bc025aaea8(product, "recommendation_id"));
|
|
14727
|
+
async function $5255d5015f3bff20$export$656ee5c46d5d1eda(call) {
|
|
14728
|
+
var _response$used_inputs;
|
|
14729
|
+
const {
|
|
14730
|
+
merchant: merchant
|
|
14731
|
+
} = call;
|
|
14732
|
+
const types = await $a1878713ea20ea2c$export$869eb14d6f85ac51(merchant);
|
|
14733
|
+
const inputs = types === null || types === void 0 ? void 0 : types.get(call.type);
|
|
14734
|
+
if (types && !inputs) {
|
|
14735
|
+
$8tj43$dwarn("[NativeDepictAPI] V4 serves ".concat(merchant, ' no recommendation type "').concat(call.type, '"; known:'), [...types.keys()]);
|
|
14736
|
+
return [];
|
|
14737
|
+
}
|
|
14738
|
+
const request = $a9dd796a4aeb6bd4$export$17493dc1a89b34e6({
|
|
14739
|
+
...call,
|
|
14740
|
+
locale: $efe3f499b0d72444$export$eb90c08da400512d(call.locale)
|
|
14741
|
+
}, inputs, inputs !== null && inputs !== void 0 && inputs.includes("recent_views") ? $67005db9d7b669bc$export$2d7138f47b625a04(merchant) : []);
|
|
14742
|
+
if (!request) return [];
|
|
14743
|
+
const response = await $5255d5015f3bff20$var$get_recommendations(merchant, request);
|
|
14744
|
+
if (!response) return [];
|
|
14745
|
+
const anchor = (_response$used_inputs = response.used_inputs) === null || _response$used_inputs === void 0 ? void 0 : _response$used_inputs.anchor;
|
|
14746
|
+
if (call.productId && (anchor === null || anchor === void 0 ? void 0 : anchor.type) === "product") $67005db9d7b669bc$export$6379943de8f8af08(merchant, anchor.id);
|
|
14747
|
+
return $5255d5015f3bff20$var$to_displays(response.products);
|
|
14748
|
+
}
|
|
14749
|
+
async function $5255d5015f3bff20$export$bd5f8a7d3e47a43d(call) {
|
|
14750
|
+
var _types$get, _types$get2, _call$query;
|
|
14751
|
+
const {
|
|
14752
|
+
merchant: merchant,
|
|
14753
|
+
market: market
|
|
14754
|
+
} = call;
|
|
14755
|
+
const types = await $a1878713ea20ea2c$export$869eb14d6f85ac51(merchant);
|
|
14756
|
+
if (!types) return undefined;
|
|
14757
|
+
const type = (_types$get = types.get("search")) !== null && _types$get !== void 0 && _types$get.includes("anchor") ? "search" : (_types$get2 = types.get("similar")) !== null && _types$get2 !== void 0 && _types$get2.includes("anchor") ? "similar" : undefined;
|
|
14758
|
+
if (!type) {
|
|
14759
|
+
$8tj43$dwarn("[NativeDepictAPI] V4 serves ".concat(merchant, " no search or similar recommendations for related products"));
|
|
14760
|
+
return [];
|
|
14761
|
+
}
|
|
14762
|
+
const locale = $efe3f499b0d72444$export$eb90c08da400512d(call.locale);
|
|
14763
|
+
const query = ((_call$query = call.query) === null || _call$query === void 0 ? void 0 : _call$query.trim()) || undefined;
|
|
14764
|
+
const searched = await $a881711b2a93404e$export$88d793e3827f3436($a881711b2a93404e$export$b6dad15503f66988(merchant, "/browse") + "?" + $efe3f499b0d72444$export$7659319cdb555579({
|
|
14765
|
+
market: market,
|
|
14766
|
+
...(locale ? {
|
|
14767
|
+
locale: locale
|
|
14768
|
+
} : {}),
|
|
14769
|
+
...(query ? {
|
|
14770
|
+
query: query
|
|
14771
|
+
} : {}),
|
|
14772
|
+
limit: $5255d5015f3bff20$var$RELATED_SEARCH_PAGE
|
|
14773
|
+
}));
|
|
14774
|
+
if (!searched) return undefined;
|
|
14775
|
+
const asked = $a9dd796a4aeb6bd4$export$afe6aeae61a7aa58(searched.products, {
|
|
14776
|
+
market: market,
|
|
14777
|
+
...(locale ? {
|
|
14778
|
+
locale: locale
|
|
14779
|
+
} : {})
|
|
14780
|
+
}, type);
|
|
14781
|
+
if (!asked.length) return [];
|
|
14782
|
+
const answers = await Promise.all(asked.map(request => $5255d5015f3bff20$var$get_recommendations(merchant, request)));
|
|
14783
|
+
const lists = answers.filter(answer => !!answer).map(answer => answer.products);
|
|
14784
|
+
if (!lists.length) return undefined;
|
|
14785
|
+
const products = lists.length > 1 ? $a9dd796a4aeb6bd4$export$9af50be6508dcd00(lists, Math.max(...lists.map(list => list.length))) : lists[0];
|
|
14786
|
+
return $5255d5015f3bff20$var$to_displays(products);
|
|
14787
|
+
}
|
|
13957
14788
|
async function $50aebf5b445518eb$export$58e808b1db15d3bc(options) {
|
|
14789
|
+
if (options.api === "v4") return await $50aebf5b445518eb$var$fetch_native(options);
|
|
13958
14790
|
const headers = options.headers;
|
|
13959
14791
|
const product_id = options.productId || options.product_id; // Second fallback here is just because there was very little missing to make this work with snake_case input and in case someone puts in snake case'd stuff already (preview browser did) we can easily not break it
|
|
13960
14792
|
const cleaned_up_options = $8tj43$snakeCasifyObject(options);
|
|
13961
14793
|
delete cleaned_up_options.headers;
|
|
13962
14794
|
delete cleaned_up_options.product_id;
|
|
14795
|
+
delete cleaned_up_options.api;
|
|
13963
14796
|
cleaned_up_options.session_id || (cleaned_up_options.session_id = $8tj43$get_session_id());
|
|
13964
14797
|
if (product_id && !cleaned_up_options.product_ids) cleaned_up_options.product_ids = [product_id];
|
|
13965
14798
|
const options_to_send = cleaned_up_options;
|
|
@@ -13982,6 +14815,33 @@ async function $50aebf5b445518eb$export$58e808b1db15d3bc(options) {
|
|
|
13982
14815
|
return ((_decoded = decoded) === null || _decoded === void 0 ? void 0 : _decoded.displays) || [];
|
|
13983
14816
|
});
|
|
13984
14817
|
}
|
|
14818
|
+
async function $50aebf5b445518eb$var$fetch_native(options) {
|
|
14819
|
+
const {
|
|
14820
|
+
merchant: merchant,
|
|
14821
|
+
market: market,
|
|
14822
|
+
locale: locale,
|
|
14823
|
+
type: type,
|
|
14824
|
+
headers: headers,
|
|
14825
|
+
categoryId: categoryId,
|
|
14826
|
+
productIds: productIds
|
|
14827
|
+
} = options;
|
|
14828
|
+
if (headers) $8tj43$dwarn("fetchDepictRecommendations: headers aren't sent to the native V4 API", headers);
|
|
14829
|
+
try {
|
|
14830
|
+
return await $5255d5015f3bff20$export$656ee5c46d5d1eda({
|
|
14831
|
+
merchant: merchant,
|
|
14832
|
+
market: market,
|
|
14833
|
+
locale: locale,
|
|
14834
|
+
type: type,
|
|
14835
|
+
categoryId: categoryId,
|
|
14836
|
+
productId: options.productId || options.product_id,
|
|
14837
|
+
productIds: productIds,
|
|
14838
|
+
limit: options.limit
|
|
14839
|
+
});
|
|
14840
|
+
} catch (e) {
|
|
14841
|
+
$8tj43$dlog("fetch_native_recommendations threw", e);
|
|
14842
|
+
return [];
|
|
14843
|
+
}
|
|
14844
|
+
}
|
|
13985
14845
|
var $702d7656a373973e$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class="sort-and-filter-buttons fake"aria-hidden=true style=position:absolute;z-index:-1;pointer-events:none;opacity:0><div class=outer><div class=inner><!$><!/><!$><!/><!$><!/>`);
|
|
13986
14846
|
const $702d7656a373973e$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
13987
14847
|
const actual_function = _ref => {
|
|
@@ -14290,6 +15150,11 @@ function $284849364a6ef73a$var$_classPrivateMethodGet(receiver, privateSet, fn)
|
|
|
14290
15150
|
}
|
|
14291
15151
|
const $284849364a6ef73a$var$v3_base_url = (0, $8tj43$base_url) + "/v3/";
|
|
14292
15152
|
const $284849364a6ef73a$var$search_base_url = $284849364a6ef73a$var$v3_base_url + "search/";
|
|
15153
|
+
/**
|
|
15154
|
+
* One read DepictAPI makes, as the transport sees it. `request_` is the v3 request as DepictAPI would send it (with
|
|
15155
|
+
* session_id and metadata added), `body_` its JSON. A transport answers with the v3-shaped JSON response, or undefined
|
|
15156
|
+
* when the request failed (DepictAPI then serves its fallback response).
|
|
15157
|
+
*/
|
|
14293
15158
|
var $284849364a6ef73a$var$_supports_finalization_registry = /*#__PURE__*/new WeakMap();
|
|
14294
15159
|
var $284849364a6ef73a$var$_cache_objs = /*#__PURE__*/new WeakMap();
|
|
14295
15160
|
var $284849364a6ef73a$var$_get_cache_obj_for_endpoint = /*#__PURE__*/new WeakSet();
|
|
@@ -14304,7 +15169,29 @@ class $284849364a6ef73a$export$e015ed2f2950f2e3 {
|
|
|
14304
15169
|
* Runs the displayTransformer for the suggest endpoints results
|
|
14305
15170
|
*/ /**
|
|
14306
15171
|
* rest = everything except query suggestions
|
|
14307
|
-
*/
|
|
15172
|
+
*/ /**
|
|
15173
|
+
* The network step of every read: sends `call` to the v3 API and returns the decoded JSON, or undefined when the
|
|
15174
|
+
* request failed. NativeDepictAPI overrides this to read the native V4 API instead and map its answers to v3 shapes,
|
|
15175
|
+
* so caching, display transformers and fallbacks stay the same for both.
|
|
15176
|
+
*/ // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15177
|
+
async request_raw_(call) {
|
|
15178
|
+
const {
|
|
15179
|
+
endpoint_: endpoint_,
|
|
15180
|
+
method_: method_,
|
|
15181
|
+
request_: request_,
|
|
15182
|
+
body_: body_
|
|
15183
|
+
} = call;
|
|
15184
|
+
const is_post = method_ === "POST";
|
|
15185
|
+
const url_to_request = is_post ? endpoint_ : $8tj43$make_url_with_query_params(endpoint_, request_);
|
|
15186
|
+
const api_response = await $8tj43$fetch_retry($8tj43$add_version_query_params(url_to_request), {
|
|
15187
|
+
method: method_,
|
|
15188
|
+
...(is_post ? {
|
|
15189
|
+
body: body_
|
|
15190
|
+
} : {})
|
|
15191
|
+
});
|
|
15192
|
+
if (!api_response || call.kind_ !== "suggest" && api_response.status !== 200) return undefined;
|
|
15193
|
+
return await api_response.json();
|
|
15194
|
+
}
|
|
14308
15195
|
constructor(options) {
|
|
14309
15196
|
$284849364a6ef73a$var$_classPrivateMethodInitSpec(this, $284849364a6ef73a$var$_cached_request);
|
|
14310
15197
|
$284849364a6ef73a$var$_classPrivateMethodInitSpec(this, $284849364a6ef73a$var$_run_display_transformers_for_rest);
|
|
@@ -14354,11 +15241,13 @@ class $284849364a6ef73a$export$e015ed2f2950f2e3 {
|
|
|
14354
15241
|
const request = metaData ? Object.assign(with_ids, {
|
|
14355
15242
|
metadata: JSON.stringify(metaData)
|
|
14356
15243
|
}) : with_ids;
|
|
14357
|
-
const url = $8tj43$make_url_with_query_params($284849364a6ef73a$var$search_base_url + "suggestions", request);
|
|
14358
|
-
const results = await $8tj43$fetch_retry($8tj43$add_version_query_params(url));
|
|
14359
15244
|
attempt_to_return_api_response: {
|
|
14360
|
-
|
|
14361
|
-
|
|
15245
|
+
const decoded_json = await this.request_raw_({
|
|
15246
|
+
kind_: "suggest",
|
|
15247
|
+
endpoint_: $284849364a6ef73a$var$search_base_url + "suggestions",
|
|
15248
|
+
method_: "GET",
|
|
15249
|
+
request_: request
|
|
15250
|
+
});
|
|
14362
15251
|
if (!Array.isArray(decoded_json === null || decoded_json === void 0 ? void 0 : decoded_json.suggestions)) break attempt_to_return_api_response;
|
|
14363
15252
|
try {
|
|
14364
15253
|
return await $284849364a6ef73a$var$_classPrivateMethodGet(this, $284849364a6ef73a$var$_run_url_creator_for_suggest, $284849364a6ef73a$var$_run_url_creator_for_suggest2).call(this, input_req.merchant, input_req.market, input_req.locale, decoded_json);
|
|
@@ -14375,6 +15264,7 @@ class $284849364a6ef73a$export$e015ed2f2950f2e3 {
|
|
|
14375
15264
|
async query(input_req) {
|
|
14376
15265
|
return await $284849364a6ef73a$var$_classPrivateMethodGet(this, $284849364a6ef73a$var$_cached_request, $284849364a6ef73a$var$_cached_request2).call(this, {
|
|
14377
15266
|
endpoint_: $284849364a6ef73a$var$search_base_url + "results",
|
|
15267
|
+
kind_: "search",
|
|
14378
15268
|
input_req_: input_req,
|
|
14379
15269
|
fallback_response_: () => ({
|
|
14380
15270
|
"n_hits": 0,
|
|
@@ -14395,6 +15285,9 @@ class $284849364a6ef73a$export$e015ed2f2950f2e3 {
|
|
|
14395
15285
|
return await $284849364a6ef73a$var$_classPrivateMethodGet(this, $284849364a6ef73a$var$_cached_request, $284849364a6ef73a$var$_cached_request2).call(this, {
|
|
14396
15286
|
endpoint_: $284849364a6ef73a$var$v3_base_url + "listings/" + (id_type_ === $397620a4d7958ed1$export$5aae649db1b959fc ? "external_id/" : "") + encodeURIComponent(id_to_query_for_),
|
|
14397
15287
|
input_req_: input_req,
|
|
15288
|
+
kind_: "listing",
|
|
15289
|
+
id_to_query_for_: id_to_query_for_,
|
|
15290
|
+
id_type_: id_type_,
|
|
14398
15291
|
fallback_response_: () => ({
|
|
14399
15292
|
listing_id: "",
|
|
14400
15293
|
listing_type: "category",
|
|
@@ -14422,6 +15315,9 @@ class $284849364a6ef73a$export$e015ed2f2950f2e3 {
|
|
|
14422
15315
|
endpoint_: $284849364a6ef73a$var$v3_base_url + "listings/" + (id_type_ === $397620a4d7958ed1$export$5aae649db1b959fc ? "external_id/" : "") + encodeURIComponent(id_to_query_for_) + "/products",
|
|
14423
15316
|
input_req_: input_req_,
|
|
14424
15317
|
currentListingForTransformer_: currentListingForTransformer_,
|
|
15318
|
+
kind_: "listing_products",
|
|
15319
|
+
id_to_query_for_: id_to_query_for_,
|
|
15320
|
+
id_type_: id_type_,
|
|
14425
15321
|
fallback_response_: () => ({
|
|
14426
15322
|
"n_hits": 0,
|
|
14427
15323
|
"displays": [],
|
|
@@ -14435,6 +15331,7 @@ class $284849364a6ef73a$export$e015ed2f2950f2e3 {
|
|
|
14435
15331
|
async get_recommended(input_req) {
|
|
14436
15332
|
return await $284849364a6ef73a$var$_classPrivateMethodGet(this, $284849364a6ef73a$var$_cached_request, $284849364a6ef73a$var$_cached_request2).call(this, {
|
|
14437
15333
|
endpoint_: $284849364a6ef73a$var$search_base_url + "related",
|
|
15334
|
+
kind_: "related",
|
|
14438
15335
|
input_req_: input_req,
|
|
14439
15336
|
fallback_response_: () => ({
|
|
14440
15337
|
displays: []
|
|
@@ -14549,7 +15446,10 @@ async function $284849364a6ef73a$var$_cached_request2(_ref4) {
|
|
|
14549
15446
|
input_req_: input_req_,
|
|
14550
15447
|
fallback_response_: fallback_response_,
|
|
14551
15448
|
method_ = "POST",
|
|
14552
|
-
currentListingForTransformer_: currentListingForTransformer_
|
|
15449
|
+
currentListingForTransformer_: currentListingForTransformer_,
|
|
15450
|
+
kind_: kind_,
|
|
15451
|
+
id_to_query_for_: id_to_query_for_,
|
|
15452
|
+
id_type_: id_type_
|
|
14553
15453
|
} = _ref4;
|
|
14554
15454
|
const cache_obj = $284849364a6ef73a$var$_classPrivateMethodGet(this, $284849364a6ef73a$var$_get_cache_obj_for_endpoint, $284849364a6ef73a$var$_get_cache_obj_for_endpoint2).call(this, endpoint_);
|
|
14555
15455
|
const with_ids = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_add_ids_to_request).call(this, input_req_);
|
|
@@ -14566,19 +15466,19 @@ async function $284849364a6ef73a$var$_cached_request2(_ref4) {
|
|
|
14566
15466
|
let resolve_in_progress;
|
|
14567
15467
|
cache_obj.in_progress_[body] = new Promise(r => resolve_in_progress = r);
|
|
14568
15468
|
try {
|
|
14569
|
-
const is_post = method_ === "POST";
|
|
14570
|
-
const url_to_request = is_post ? endpoint_ : $8tj43$make_url_with_query_params(endpoint_, sorted_request);
|
|
14571
|
-
const api_response = await $8tj43$fetch_retry($8tj43$add_version_query_params(url_to_request), {
|
|
14572
|
-
method: method_,
|
|
14573
|
-
...(is_post ? {
|
|
14574
|
-
body: body
|
|
14575
|
-
} : {})
|
|
14576
|
-
});
|
|
14577
15469
|
return_successfully: {
|
|
14578
|
-
if (!api_response || api_response.status !== 200) break return_successfully;
|
|
14579
15470
|
let result;
|
|
14580
15471
|
try {
|
|
14581
|
-
const unmodified_result = await
|
|
15472
|
+
const unmodified_result = await this.request_raw_({
|
|
15473
|
+
kind_: kind_,
|
|
15474
|
+
endpoint_: endpoint_,
|
|
15475
|
+
method_: method_,
|
|
15476
|
+
request_: sorted_request,
|
|
15477
|
+
body_: body,
|
|
15478
|
+
id_to_query_for_: id_to_query_for_,
|
|
15479
|
+
id_type_: id_type_
|
|
15480
|
+
});
|
|
15481
|
+
if (unmodified_result === undefined) break return_successfully;
|
|
14582
15482
|
result = await $284849364a6ef73a$var$_classPrivateMethodGet(this, $284849364a6ef73a$var$_run_display_transformers_for_rest, $284849364a6ef73a$var$_run_display_transformers_for_rest2).call(this, input_req_.merchant, input_req_.market, input_req_.locale, unmodified_result, currentListingForTransformer_);
|
|
14583
15483
|
} catch (e) {
|
|
14584
15484
|
$8tj43$dwarn("displayTransformer or json decoding failed", e);
|
|
@@ -14606,6 +15506,283 @@ async function $284849364a6ef73a$var$_cached_request2(_ref4) {
|
|
|
14606
15506
|
delete cache_obj.in_progress_[body];
|
|
14607
15507
|
}
|
|
14608
15508
|
}
|
|
15509
|
+
function $bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
15510
|
+
$bd9b4aebfb84ca47$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
15511
|
+
privateSet.add(obj);
|
|
15512
|
+
}
|
|
15513
|
+
function $bd9b4aebfb84ca47$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
15514
|
+
$bd9b4aebfb84ca47$var$_checkPrivateRedeclaration(obj, privateMap);
|
|
15515
|
+
privateMap.set(obj, value);
|
|
15516
|
+
}
|
|
15517
|
+
function $bd9b4aebfb84ca47$var$_checkPrivateRedeclaration(obj, privateCollection) {
|
|
15518
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
15519
|
+
}
|
|
15520
|
+
function $bd9b4aebfb84ca47$var$_classPrivateMethodGet(receiver, privateSet, fn) {
|
|
15521
|
+
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
|
|
15522
|
+
return fn;
|
|
15523
|
+
}
|
|
15524
|
+
/** V4 browse's largest page; a bigger v3 page is V4's pages chained by their cursors, as the facade does. */
|
|
15525
|
+
const $bd9b4aebfb84ca47$var$BROWSE_MAX_LIMIT = 100;
|
|
15526
|
+
/** V4 browse's page size without a limit, and v3's. */
|
|
15527
|
+
const $bd9b4aebfb84ca47$var$DEFAULT_LIMIT = 24;
|
|
15528
|
+
/** A query with no letter or digit browses the catalogue instead of returning an empty grid, as on v3. */
|
|
15529
|
+
const $bd9b4aebfb84ca47$var$HAS_LETTER_OR_DIGIT = /[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10107}-\u{10133}\u{10140}-\u{10178}\u{1018A}\u{1018B}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{103A0}-\u{103C3}\u{103C8}-\u{103CF}\u{103D1}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{10570}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10858}-\u{10876}\u{10879}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A60}-\u{10A7E}\u{10A80}-\u{10A9F}\u{10AC0}-\u{10AC7}\u{10AC9}-\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11003}-\u{11037}\u{11052}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11083}-\u{110AF}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{11136}-\u{1113F}\u{11144}\u{11147}\u{11150}-\u{11172}\u{11176}\u{11183}-\u{111B2}\u{111C1}-\u{111C4}\u{111D0}-\u{111DA}\u{111DC}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122B}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A8}\u{112B0}-\u{112DE}\u{112F0}-\u{112F9}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}\u{11350}\u{1135D}-\u{11361}\u{11400}-\u{11434}\u{11447}-\u{1144A}\u{11450}-\u{11459}\u{1145F}-\u{11461}\u{11480}-\u{114AF}\u{114C4}\u{114C5}\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115AE}\u{115D8}-\u{115DB}\u{11600}-\u{1162F}\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116B8}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11730}-\u{1173B}\u{11740}-\u{11746}\u{11800}-\u{1182B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{1192F}\u{1193F}\u{11941}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D0}\u{119E1}\u{119E3}\u{11A00}\u{11A0B}-\u{11A32}\u{11A3A}\u{11A50}\u{11A5C}-\u{11A89}\u{11A9D}\u{11AB0}-\u{11AF8}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2E}\u{11C40}\u{11C50}-\u{11C6C}\u{11C72}-\u{11C8F}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D89}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11F02}\u{11F04}-\u{11F10}\u{11F12}-\u{11F33}\u{11F50}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{12000}-\u{12399}\u{12400}-\u{1246E}\u{12480}-\u{12543}\u{12F90}-\u{12FF0}\u{13000}-\u{1342F}\u{13441}-\u{13446}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A70}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16B00}-\u{16B2F}\u{16B40}-\u{16B43}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E96}\u{16F00}-\u{16F4A}\u{16F50}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1EC71}-\u{1ECAB}\u{1ECAD}-\u{1ECAF}\u{1ECB1}-\u{1ECB4}\u{1ED01}-\u{1ED2D}\u{1ED2F}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10C}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}]/u;
|
|
15530
|
+
/** Which API an SDK reads: `v3` (the default) or the native V4 API (`https://api.depict.ai/v4/{merchant}/…`). */
|
|
15531
|
+
var $bd9b4aebfb84ca47$var$_facet_indices = /*#__PURE__*/new WeakMap();
|
|
15532
|
+
var $bd9b4aebfb84ca47$var$_learned = /*#__PURE__*/new WeakMap();
|
|
15533
|
+
var $bd9b4aebfb84ca47$var$_cursor_offsets = /*#__PURE__*/new WeakMap();
|
|
15534
|
+
var $bd9b4aebfb84ca47$var$_ancestor_lookups = /*#__PURE__*/new WeakMap();
|
|
15535
|
+
var $bd9b4aebfb84ca47$var$_rejected = /*#__PURE__*/new WeakMap();
|
|
15536
|
+
var $bd9b4aebfb84ca47$var$_merchant_url = /*#__PURE__*/new WeakSet();
|
|
15537
|
+
var $bd9b4aebfb84ca47$var$_get_json = /*#__PURE__*/new WeakSet();
|
|
15538
|
+
var $bd9b4aebfb84ca47$var$_get_answer = /*#__PURE__*/new WeakSet();
|
|
15539
|
+
var $bd9b4aebfb84ca47$var$_facet_index = /*#__PURE__*/new WeakSet();
|
|
15540
|
+
var $bd9b4aebfb84ca47$var$_browse_page = /*#__PURE__*/new WeakSet();
|
|
15541
|
+
var $bd9b4aebfb84ca47$var$_browse_answer = /*#__PURE__*/new WeakSet();
|
|
15542
|
+
var $bd9b4aebfb84ca47$var$_rejected_clauses = /*#__PURE__*/new WeakSet();
|
|
15543
|
+
var $bd9b4aebfb84ca47$var$_browse = /*#__PURE__*/new WeakSet();
|
|
15544
|
+
var $bd9b4aebfb84ca47$var$_listing = /*#__PURE__*/new WeakSet();
|
|
15545
|
+
var $bd9b4aebfb84ca47$var$_suggest = /*#__PURE__*/new WeakSet();
|
|
15546
|
+
var $bd9b4aebfb84ca47$var$_ancestors = /*#__PURE__*/new WeakSet();
|
|
15547
|
+
class $bd9b4aebfb84ca47$export$721afe49a594bed extends (0, $284849364a6ef73a$export$e015ed2f2950f2e3) {
|
|
15548
|
+
/** Facets served so far, per merchant, market and locale, to resolve v3 filter fields (group titles) to V4 fields. */ /** Browses whose facets were read only to resolve filter fields, so each is read at most once. */ /** How many products came before each cursor V4 handed out, for the lower-bound count when `total` is absent. */ /** Each listing's ancestors from the listing tree, per merchant, market and locale, read once a page load. */ /** Filter clauses V4 refused (`unknown_filter_field`, `invalid_filter`), per merchant, market and locale. */constructor(options) {
|
|
15549
|
+
super(options);
|
|
15550
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_ancestors);
|
|
15551
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_suggest);
|
|
15552
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_listing);
|
|
15553
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_browse);
|
|
15554
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_rejected_clauses);
|
|
15555
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_browse_answer);
|
|
15556
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_browse_page);
|
|
15557
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_facet_index);
|
|
15558
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_get_answer);
|
|
15559
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_get_json);
|
|
15560
|
+
$bd9b4aebfb84ca47$var$_classPrivateMethodInitSpec(this, $bd9b4aebfb84ca47$var$_merchant_url);
|
|
15561
|
+
$bd9b4aebfb84ca47$var$_classPrivateFieldInitSpec(this, $bd9b4aebfb84ca47$var$_facet_indices, {
|
|
15562
|
+
writable: true,
|
|
15563
|
+
value: new Map()
|
|
15564
|
+
});
|
|
15565
|
+
$bd9b4aebfb84ca47$var$_classPrivateFieldInitSpec(this, $bd9b4aebfb84ca47$var$_learned, {
|
|
15566
|
+
writable: true,
|
|
15567
|
+
value: new Set()
|
|
15568
|
+
});
|
|
15569
|
+
$bd9b4aebfb84ca47$var$_classPrivateFieldInitSpec(this, $bd9b4aebfb84ca47$var$_cursor_offsets, {
|
|
15570
|
+
writable: true,
|
|
15571
|
+
value: new Map()
|
|
15572
|
+
});
|
|
15573
|
+
$bd9b4aebfb84ca47$var$_classPrivateFieldInitSpec(this, $bd9b4aebfb84ca47$var$_ancestor_lookups, {
|
|
15574
|
+
writable: true,
|
|
15575
|
+
value: new Map()
|
|
15576
|
+
});
|
|
15577
|
+
$bd9b4aebfb84ca47$var$_classPrivateFieldInitSpec(this, $bd9b4aebfb84ca47$var$_rejected, {
|
|
15578
|
+
writable: true,
|
|
15579
|
+
value: new Map()
|
|
15580
|
+
});
|
|
15581
|
+
$8tj43$set_event_api("v4");
|
|
15582
|
+
}
|
|
15583
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15584
|
+
async request_raw_(call) {
|
|
15585
|
+
switch (call.kind_) {
|
|
15586
|
+
case "search":
|
|
15587
|
+
return await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_browse, $bd9b4aebfb84ca47$var$_browse2).call(this, "search", call.request_);
|
|
15588
|
+
case "listing_products":
|
|
15589
|
+
return await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_browse, $bd9b4aebfb84ca47$var$_browse2).call(this, "listing", call.request_, {
|
|
15590
|
+
[call.id_type_ === $397620a4d7958ed1$export$5aae649db1b959fc ? "external_id" : "id"]: call.id_to_query_for_
|
|
15591
|
+
});
|
|
15592
|
+
case "listing":
|
|
15593
|
+
return await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_listing, $bd9b4aebfb84ca47$var$_listing2).call(this, call);
|
|
15594
|
+
case "suggest":
|
|
15595
|
+
return await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_suggest, $bd9b4aebfb84ca47$var$_suggest2).call(this, call.request_);
|
|
15596
|
+
case "related":
|
|
15597
|
+
{
|
|
15598
|
+
const {
|
|
15599
|
+
merchant: merchant,
|
|
15600
|
+
market: market,
|
|
15601
|
+
locale: locale,
|
|
15602
|
+
query: query
|
|
15603
|
+
} = call.request_;
|
|
15604
|
+
const displays = await $5255d5015f3bff20$export$bd5f8a7d3e47a43d({
|
|
15605
|
+
merchant: merchant,
|
|
15606
|
+
market: market,
|
|
15607
|
+
locale: locale,
|
|
15608
|
+
query: query
|
|
15609
|
+
});
|
|
15610
|
+
return displays && {
|
|
15611
|
+
displays: displays
|
|
15612
|
+
};
|
|
15613
|
+
}
|
|
15614
|
+
}
|
|
15615
|
+
}
|
|
15616
|
+
}
|
|
15617
|
+
/** The v3 search or listing-products request DepictAPI hands its transport. */
|
|
15618
|
+
function $bd9b4aebfb84ca47$var$_merchant_url2(merchant, path) {
|
|
15619
|
+
return $a881711b2a93404e$export$b6dad15503f66988(merchant, path);
|
|
15620
|
+
}
|
|
15621
|
+
async function $bd9b4aebfb84ca47$var$_get_json2(url) {
|
|
15622
|
+
return (await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_get_answer, $bd9b4aebfb84ca47$var$_get_answer2).call(this, url)).body_;
|
|
15623
|
+
}
|
|
15624
|
+
async function $bd9b4aebfb84ca47$var$_get_answer2(url) {
|
|
15625
|
+
return await $a881711b2a93404e$export$f035610fd74c541a(url);
|
|
15626
|
+
}
|
|
15627
|
+
function $bd9b4aebfb84ca47$var$_facet_index2(merchant, market, locale) {
|
|
15628
|
+
const key = JSON.stringify([merchant, market, locale]);
|
|
15629
|
+
let index = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_facet_indices).get(key);
|
|
15630
|
+
if (!index) $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_facet_indices).set(key, index = new (0, $fdcc2c233c7ae6b6$export$8d488bcc71d07ffb)());
|
|
15631
|
+
return index;
|
|
15632
|
+
}
|
|
15633
|
+
async function $bd9b4aebfb84ca47$var$_browse_page2(merchant, request) {
|
|
15634
|
+
return (await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_browse_answer, $bd9b4aebfb84ca47$var$_browse_answer2).call(this, merchant, request)).body_;
|
|
15635
|
+
}
|
|
15636
|
+
async function $bd9b4aebfb84ca47$var$_browse_answer2(merchant, request) {
|
|
15637
|
+
return await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_get_answer, $bd9b4aebfb84ca47$var$_get_answer2).call(this, $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_merchant_url, $bd9b4aebfb84ca47$var$_merchant_url2).call(this, merchant, "/browse") + "?" + $efe3f499b0d72444$export$7659319cdb555579(request));
|
|
15638
|
+
}
|
|
15639
|
+
function $bd9b4aebfb84ca47$var$_rejected_clauses2(merchant, market, locale) {
|
|
15640
|
+
const key = JSON.stringify([merchant, market, locale]);
|
|
15641
|
+
let rejected = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_rejected).get(key);
|
|
15642
|
+
if (!rejected) $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_rejected).set(key, rejected = new Set());
|
|
15643
|
+
return rejected;
|
|
15644
|
+
}
|
|
15645
|
+
async function $bd9b4aebfb84ca47$var$_browse2(door, v3_request, listing) {
|
|
15646
|
+
var _v3_request$filters, _v3_request$limit;
|
|
15647
|
+
const {
|
|
15648
|
+
merchant: merchant,
|
|
15649
|
+
market: market
|
|
15650
|
+
} = v3_request;
|
|
15651
|
+
const locale = $efe3f499b0d72444$export$eb90c08da400512d(v3_request.locale);
|
|
15652
|
+
const query = door === "search" && v3_request.query && $bd9b4aebfb84ca47$var$HAS_LETTER_OR_DIGIT.test(v3_request.query) ? v3_request.query : undefined;
|
|
15653
|
+
const base = {
|
|
15654
|
+
market: market,
|
|
15655
|
+
...(locale ? {
|
|
15656
|
+
locale: locale
|
|
15657
|
+
} : {}),
|
|
15658
|
+
...(query ? {
|
|
15659
|
+
query: query
|
|
15660
|
+
} : {}),
|
|
15661
|
+
...(listing ? {
|
|
15662
|
+
listing: listing
|
|
15663
|
+
} : {})
|
|
15664
|
+
};
|
|
15665
|
+
const index = $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_facet_index, $bd9b4aebfb84ca47$var$_facet_index2).call(this, merchant, market, locale);
|
|
15666
|
+
const filters = (_v3_request$filters = v3_request.filters) !== null && _v3_request$filters !== void 0 ? _v3_request$filters : [];
|
|
15667
|
+
// depict-ui sends a filter's lowercased group title as its field. A page opened from a link with filters in it
|
|
15668
|
+
// comes before any facets, so read this browse's facets once to learn which field each title names.
|
|
15669
|
+
const learn_key = JSON.stringify([merchant, base]);
|
|
15670
|
+
if (filters.some(filter => filter.data != null && !$fdcc2c233c7ae6b6$export$3b6ba2422a5e0aa0(filter.field, index)) && !$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_learned).has(learn_key)) {
|
|
15671
|
+
var _await$_classPrivateM;
|
|
15672
|
+
$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_learned).add(learn_key);
|
|
15673
|
+
index.learn_((_await$_classPrivateM = await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_browse_page, $bd9b4aebfb84ca47$var$_browse_page2).call(this, merchant, {
|
|
15674
|
+
...base,
|
|
15675
|
+
include: ["facets"],
|
|
15676
|
+
limit: 1
|
|
15677
|
+
})) === null || _await$_classPrivateM === void 0 ? void 0 : _await$_classPrivateM.facets);
|
|
15678
|
+
}
|
|
15679
|
+
// A filter V4 can't take must not cost the shopper the page: a link can outlive its filter (one removed from the
|
|
15680
|
+
// store, a hand-written value). One the adapter can't write is left out here; one V4 rejects is left out and the
|
|
15681
|
+
// page asked again, and remembered for this page load so later pages don't ask with it.
|
|
15682
|
+
const rejected = $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_rejected_clauses, $bd9b4aebfb84ca47$var$_rejected_clauses2).call(this, merchant, market, locale);
|
|
15683
|
+
let clauses = [];
|
|
15684
|
+
for (const filter of filters) try {
|
|
15685
|
+
const clause = $fdcc2c233c7ae6b6$export$c17bb5d2ead3e8f3(filter, index);
|
|
15686
|
+
if (clause) clauses.push(clause);
|
|
15687
|
+
} catch (e) {
|
|
15688
|
+
if (!(e instanceof (0, $fdcc2c233c7ae6b6$export$f5ea4d073ddb4bdb))) throw e;
|
|
15689
|
+
$8tj43$dwarn("[NativeDepictAPI] leaving out a filter V4 can't take:", e.message, filter);
|
|
15690
|
+
}
|
|
15691
|
+
clauses = clauses.filter(clause => !rejected.has(clause.clause_));
|
|
15692
|
+
const sort = $fdcc2c233c7ae6b6$export$78eb8e636d89ff30(v3_request.sort);
|
|
15693
|
+
const include = door === "search" ? ["facets", "sorts", "content", "attributes"] : ["facets", "sorts", "attributes"];
|
|
15694
|
+
const want = (_v3_request$limit = v3_request.limit) !== null && _v3_request$limit !== void 0 ? _v3_request$limit : $bd9b4aebfb84ca47$var$DEFAULT_LIMIT;
|
|
15695
|
+
const offset = v3_request.cursor && $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_cursor_offsets).get(v3_request.cursor) || 0;
|
|
15696
|
+
const request_with = sent => ({
|
|
15697
|
+
...base,
|
|
15698
|
+
...(sent.length ? {
|
|
15699
|
+
filter_by: sent.map(clause => clause.clause_).join(" && ")
|
|
15700
|
+
} : {}),
|
|
15701
|
+
...(sort ? {
|
|
15702
|
+
sort: sort
|
|
15703
|
+
} : {}),
|
|
15704
|
+
...(v3_request.cursor ? {
|
|
15705
|
+
cursor: v3_request.cursor
|
|
15706
|
+
} : {}),
|
|
15707
|
+
include: include,
|
|
15708
|
+
...(want !== $bd9b4aebfb84ca47$var$DEFAULT_LIMIT ? {
|
|
15709
|
+
limit: Math.min(want, $bd9b4aebfb84ca47$var$BROWSE_MAX_LIMIT)
|
|
15710
|
+
} : {})
|
|
15711
|
+
});
|
|
15712
|
+
let request = request_with(clauses);
|
|
15713
|
+
let answer = await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_browse_answer, $bd9b4aebfb84ca47$var$_browse_answer2).call(this, merchant, request);
|
|
15714
|
+
// Each retry leaves out at least one more clause, so this ends.
|
|
15715
|
+
while (!answer.body_) {
|
|
15716
|
+
var _answer$error_;
|
|
15717
|
+
const refused = $fdcc2c233c7ae6b6$export$c38de645260a41ed(answer.error_, clauses);
|
|
15718
|
+
if (!refused.length) return undefined;
|
|
15719
|
+
$8tj43$dwarn("[NativeDepictAPI] leaving out filters V4 refused:", refused.map(clause => clause.clause_), (_answer$error_ = answer.error_) === null || _answer$error_ === void 0 ? void 0 : _answer$error_.message);
|
|
15720
|
+
for (const clause of refused) rejected.add(clause.clause_);
|
|
15721
|
+
clauses = clauses.filter(clause => !refused.includes(clause));
|
|
15722
|
+
request = request_with(clauses);
|
|
15723
|
+
answer = await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_browse_answer, $bd9b4aebfb84ca47$var$_browse_answer2).call(this, merchant, request);
|
|
15724
|
+
}
|
|
15725
|
+
let response = answer.body_;
|
|
15726
|
+
// A page over V4's largest is its pages chained by their cursors; later pages ask for products alone.
|
|
15727
|
+
while (want > $bd9b4aebfb84ca47$var$BROWSE_MAX_LIMIT && response.products.length < want && response.cursor !== undefined) {
|
|
15728
|
+
const page = await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_browse_page, $bd9b4aebfb84ca47$var$_browse_page2).call(this, merchant, {
|
|
15729
|
+
...request,
|
|
15730
|
+
cursor: response.cursor,
|
|
15731
|
+
limit: Math.min(want - response.products.length, $bd9b4aebfb84ca47$var$BROWSE_MAX_LIMIT),
|
|
15732
|
+
include: ["attributes"]
|
|
15733
|
+
});
|
|
15734
|
+
if (!page) return undefined;
|
|
15735
|
+
if (!page.products.length) break;
|
|
15736
|
+
response = {
|
|
15737
|
+
...response,
|
|
15738
|
+
products: [...response.products, ...page.products],
|
|
15739
|
+
...(page.cursor !== undefined ? {
|
|
15740
|
+
cursor: page.cursor
|
|
15741
|
+
} : {
|
|
15742
|
+
cursor: undefined
|
|
15743
|
+
})
|
|
15744
|
+
};
|
|
15745
|
+
}
|
|
15746
|
+
if (response.cursor === undefined) delete response.cursor;
|
|
15747
|
+
index.learn_(response.facets);
|
|
15748
|
+
if (response.cursor !== undefined) $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_cursor_offsets).set(response.cursor, offset + response.products.length);
|
|
15749
|
+
return $efe3f499b0d72444$export$efb7dd882d411dd4(response, door, offset);
|
|
15750
|
+
}
|
|
15751
|
+
async function $bd9b4aebfb84ca47$var$_listing2(call) {
|
|
15752
|
+
const {
|
|
15753
|
+
merchant: merchant,
|
|
15754
|
+
market: market
|
|
15755
|
+
} = call.request_;
|
|
15756
|
+
const locale = $efe3f499b0d72444$export$eb90c08da400512d(call.request_.locale);
|
|
15757
|
+
const by_external_id = call.id_type_ === $397620a4d7958ed1$export$5aae649db1b959fc;
|
|
15758
|
+
const path = by_external_id ? "/listings" : "/listings/" + encodeURIComponent(call.id_to_query_for_);
|
|
15759
|
+
const response = await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_get_json, $bd9b4aebfb84ca47$var$_get_json2).call(this, $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_merchant_url, $bd9b4aebfb84ca47$var$_merchant_url2).call(this, merchant, path) + "?" + $efe3f499b0d72444$export$fec3e4b5adfcea2c([["market", market], ["locale", locale], ["external_id", by_external_id ? call.id_to_query_for_ : undefined]]));
|
|
15760
|
+
return response && $efe3f499b0d72444$export$996f2b1e66d9b5af(response.listing);
|
|
15761
|
+
}
|
|
15762
|
+
async function $bd9b4aebfb84ca47$var$_suggest2(v3_request) {
|
|
15763
|
+
var _v3_request$query;
|
|
15764
|
+
const {
|
|
15765
|
+
merchant: merchant,
|
|
15766
|
+
market: market
|
|
15767
|
+
} = v3_request;
|
|
15768
|
+
const locale = $efe3f499b0d72444$export$eb90c08da400512d(v3_request.locale);
|
|
15769
|
+
const response = await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_get_json, $bd9b4aebfb84ca47$var$_get_json2).call(this, $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_merchant_url, $bd9b4aebfb84ca47$var$_merchant_url2).call(this, merchant, "/suggest") + "?" + $efe3f499b0d72444$export$fec3e4b5adfcea2c([["market", market], ["locale", locale], ["query", (_v3_request$query = v3_request.query) !== null && _v3_request$query !== void 0 ? _v3_request$query : ""]]));
|
|
15770
|
+
if (!response) return undefined;
|
|
15771
|
+
const needs_ancestors = response.suggestions.some(suggestion => suggestion.type === "listing" && suggestion.path.length > 0);
|
|
15772
|
+
return $efe3f499b0d72444$export$2860125b419015f8(response, needs_ancestors ? await $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_ancestors, $bd9b4aebfb84ca47$var$_ancestors2).call(this, merchant, market, locale) : undefined);
|
|
15773
|
+
}
|
|
15774
|
+
function $bd9b4aebfb84ca47$var$_ancestors2(merchant, market, locale) {
|
|
15775
|
+
const key = JSON.stringify([merchant, market, locale]);
|
|
15776
|
+
let lookup = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_ancestor_lookups).get(key);
|
|
15777
|
+
if (!lookup) {
|
|
15778
|
+
lookup = $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_get_json, $bd9b4aebfb84ca47$var$_get_json2).call(this, $bd9b4aebfb84ca47$var$_classPrivateMethodGet(this, $bd9b4aebfb84ca47$var$_merchant_url, $bd9b4aebfb84ca47$var$_merchant_url2).call(this, merchant, "/listings") + "?" + $efe3f499b0d72444$export$fec3e4b5adfcea2c([["market", market], ["locale", locale]])).then(tree => tree && $efe3f499b0d72444$export$76d96892da63b395(tree.listings));
|
|
15779
|
+
$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $bd9b4aebfb84ca47$var$_ancestor_lookups).set(key, lookup);
|
|
15780
|
+
}
|
|
15781
|
+
return lookup;
|
|
15782
|
+
}
|
|
15783
|
+
function $bd9b4aebfb84ca47$export$6d972e6af9de09f0(version, options) {
|
|
15784
|
+
return version === "v4" ? new $bd9b4aebfb84ca47$export$721afe49a594bed(options) : new (0, $284849364a6ef73a$export$e015ed2f2950f2e3)(options);
|
|
15785
|
+
}
|
|
14609
15786
|
function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
14610
15787
|
var _globalThis$location$, _globalThis$location;
|
|
14611
15788
|
const router_ = options.router_;
|
|
@@ -14915,8 +16092,9 @@ class $f5f54892fd0c7d9f$export$f34314aa9505732e {
|
|
|
14915
16092
|
quicklinks_signal_: $8tj43$createSignal(),
|
|
14916
16093
|
i18n_: i18n_,
|
|
14917
16094
|
reset_history_state_: reset_history_state_,
|
|
16095
|
+
depict_api_: typeof api === "object" && api ? api :
|
|
14918
16096
|
// @ts-ignore
|
|
14919
|
-
|
|
16097
|
+
$bd9b4aebfb84ca47$export$6d972e6af9de09f0(api, {
|
|
14920
16098
|
display_transformers: display_transformers
|
|
14921
16099
|
}),
|
|
14922
16100
|
router_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f5f54892fd0c7d9f$var$_router),
|
|
@@ -16621,8 +17799,9 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
16621
17799
|
const get_search_query_ = $8tj43$createMemo(previous_value => {
|
|
16622
17800
|
if (get_search_query_updating_blocked()) return previous_value;else return raw_search_query_accessor();
|
|
16623
17801
|
});
|
|
17802
|
+
const depict_api_ = typeof api === "object" && api ? api :
|
|
16624
17803
|
// @ts-ignore
|
|
16625
|
-
|
|
17804
|
+
$bd9b4aebfb84ca47$export$6d972e6af9de09f0(api, {
|
|
16626
17805
|
display_transformers: display_transformers
|
|
16627
17806
|
});
|
|
16628
17807
|
const previous_searches = $07d90b8270ece8de$export$84bba84a7b837187(get_search_query_);
|
|
@@ -17643,4 +18822,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
17643
18822
|
}, "Entire CategoryPage failed");
|
|
17644
18823
|
}
|
|
17645
18824
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
17646
|
-
export { $4b4b262708b516ee$export$1d575f423147a8c as usePLPLayout, $4be619ec2cd7bba3$export$54c6d6ff54e72743 as makeSizeAccessors, $80c7883e020be192$export$f98b8d5ea7207a1 as setExtraDisplayTransformers, $80c7883e020be192$export$b2d94be4f02525b2 as getExtraDisplayTransformers, $98688279b9059f50$export$140423fa4bfb6d63 as ModernResponsiveImage, $ff7feae4dddd6073$export$92aa5d691d588f3f as remap_blocks_to_index, $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
|
|
18825
|
+
export { $4b4b262708b516ee$export$1d575f423147a8c as usePLPLayout, $4be619ec2cd7bba3$export$54c6d6ff54e72743 as makeSizeAccessors, $80c7883e020be192$export$f98b8d5ea7207a1 as setExtraDisplayTransformers, $80c7883e020be192$export$b2d94be4f02525b2 as getExtraDisplayTransformers, $98688279b9059f50$export$140423fa4bfb6d63 as ModernResponsiveImage, $ff7feae4dddd6073$export$92aa5d691d588f3f as remap_blocks_to_index, $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $bd9b4aebfb84ca47$export$721afe49a594bed as NativeDepictAPI, $bd9b4aebfb84ca47$export$6d972e6af9de09f0 as create_depict_api, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
|