@getlupa/client 1.23.3 → 1.24.0

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.
@@ -10970,11 +10970,11 @@ var parsePath = (string) => {
10970
10970
  return result2;
10971
10971
  };
10972
10972
  init_esm_shims();
10973
- function simpleTransformation(isApplicable, annotation, transform, untransform) {
10973
+ function simpleTransformation(isApplicable, annotation, transform2, untransform) {
10974
10974
  return {
10975
10975
  isApplicable,
10976
10976
  annotation,
10977
- transform,
10977
+ transform: transform2,
10978
10978
  untransform
10979
10979
  };
10980
10980
  }
@@ -11035,11 +11035,11 @@ var simpleRules = [
11035
11035
  }, Number),
11036
11036
  simpleTransformation(isURL, "URL", (v) => v.toString(), (v) => new URL(v))
11037
11037
  ];
11038
- function compositeTransformation(isApplicable, annotation, transform, untransform) {
11038
+ function compositeTransformation(isApplicable, annotation, transform2, untransform) {
11039
11039
  return {
11040
11040
  isApplicable,
11041
11041
  annotation,
11042
- transform,
11042
+ transform: transform2,
11043
11043
  untransform
11044
11044
  };
11045
11045
  }
@@ -11988,33 +11988,6 @@ const addCustomParams = (url, customParams) => {
11988
11988
  const separator = url.includes("?") ? "&" : "?";
11989
11989
  return url + separator + e(customParams);
11990
11990
  };
11991
- var __awaiter = function(thisArg, _arguments, P, generator) {
11992
- function adopt(value) {
11993
- return value instanceof P ? value : new P(function(resolve2) {
11994
- resolve2(value);
11995
- });
11996
- }
11997
- return new (P || (P = Promise))(function(resolve2, reject) {
11998
- function fulfilled(value) {
11999
- try {
12000
- step(generator.next(value));
12001
- } catch (e2) {
12002
- reject(e2);
12003
- }
12004
- }
12005
- function rejected(value) {
12006
- try {
12007
- step(generator["throw"](value));
12008
- } catch (e2) {
12009
- reject(e2);
12010
- }
12011
- }
12012
- function step(result2) {
12013
- result2.done ? resolve2(result2.value) : adopt(result2.value).then(fulfilled, rejected);
12014
- }
12015
- step((generator = generator.apply(thisArg, [])).next());
12016
- });
12017
- };
12018
11991
  const defaultConfig = {
12019
11992
  method: "POST",
12020
11993
  headers: { "Content-Type": "application/json" }
@@ -12025,7 +11998,7 @@ const customRequestConfig = ({ customHeaders }) => {
12025
11998
  headers: Object.assign(Object.assign({}, defaultConfig.headers), customHeaders !== null && customHeaders !== void 0 ? customHeaders : {})
12026
11999
  };
12027
12000
  };
12028
- const searchCustom = (query, options) => __awaiter(void 0, void 0, void 0, function* () {
12001
+ const searchCustom = (query, options) => __async2(null, null, function* () {
12029
12002
  var _a25;
12030
12003
  const res = yield fetch(options.customUrl, Object.assign(Object.assign({}, customRequestConfig({ customHeaders: options.customHeaders })), { body: JSON.stringify(Object.assign({ publicQuery: query }, (_a25 = options.customPayload) !== null && _a25 !== void 0 ? _a25 : {})) }));
12031
12004
  if (res.status < 400) {
@@ -12035,9 +12008,9 @@ const searchCustom = (query, options) => __awaiter(void 0, void 0, void 0, funct
12035
12008
  const errors = yield res.json();
12036
12009
  return { success: false, errors };
12037
12010
  });
12038
- const suggestCustom = (query, options) => __awaiter(void 0, void 0, void 0, function* () {
12039
- var _b25;
12040
- const res = yield fetch(options.customUrl, Object.assign(Object.assign({}, customRequestConfig({ customHeaders: options.customHeaders })), { body: JSON.stringify(Object.assign({ publicQuery: query }, (_b25 = options.customPayload) !== null && _b25 !== void 0 ? _b25 : {})) }));
12011
+ const suggestCustom = (query, options) => __async2(null, null, function* () {
12012
+ var _a25;
12013
+ const res = yield fetch(options.customUrl, Object.assign(Object.assign({}, customRequestConfig({ customHeaders: options.customHeaders })), { body: JSON.stringify(Object.assign({ publicQuery: query }, (_a25 = options.customPayload) !== null && _a25 !== void 0 ? _a25 : {})) }));
12041
12014
  if (res.status < 400) {
12042
12015
  const items = yield res.json();
12043
12016
  return { items, success: true };
@@ -12045,7 +12018,7 @@ const suggestCustom = (query, options) => __awaiter(void 0, void 0, void 0, func
12045
12018
  const errors = yield res.json();
12046
12019
  return { success: false, errors };
12047
12020
  });
12048
- const search = (queryKey, query, environment, customBaseUrl, customParams) => __awaiter(void 0, void 0, void 0, function* () {
12021
+ const search = (queryKey, query, environment, customBaseUrl, customParams) => __async2(null, null, function* () {
12049
12022
  const endpoint = `${getApiUrl$1(environment, customBaseUrl)}query/${queryKey}`;
12050
12023
  const url = addCustomParams(endpoint, customParams);
12051
12024
  const res = yield fetch(url, Object.assign(Object.assign({}, defaultConfig), { body: JSON.stringify(query) }));
@@ -12056,7 +12029,7 @@ const search = (queryKey, query, environment, customBaseUrl, customParams) => __
12056
12029
  const errors = yield res.json();
12057
12030
  return { success: false, errors };
12058
12031
  });
12059
- const facets = (queryKey, query, environment, customBaseUrl, customParams) => __awaiter(void 0, void 0, void 0, function* () {
12032
+ const facets = (queryKey, query, environment, customBaseUrl, customParams) => __async2(null, null, function* () {
12060
12033
  const endpoint = `${getApiUrl$1(environment, customBaseUrl)}query/${queryKey}/facets`;
12061
12034
  const url = addCustomParams(endpoint, customParams);
12062
12035
  const res = yield fetch(url, Object.assign(Object.assign({}, defaultConfig), { body: JSON.stringify(query) }));
@@ -12067,7 +12040,7 @@ const facets = (queryKey, query, environment, customBaseUrl, customParams) => __
12067
12040
  const errors = yield res.json();
12068
12041
  return { success: false, errors };
12069
12042
  });
12070
- const refiners = (queryKey, query, environment, customBaseUrl, customParams) => __awaiter(void 0, void 0, void 0, function* () {
12043
+ const refiners = (queryKey, query, environment, customBaseUrl, customParams) => __async2(null, null, function* () {
12071
12044
  const endpoint = `${getApiUrl$1(environment, customBaseUrl)}query/${queryKey}/refiners`;
12072
12045
  const url = addCustomParams(endpoint, customParams);
12073
12046
  const res = yield fetch(url, Object.assign(Object.assign({}, defaultConfig), { body: JSON.stringify(query) }));
@@ -12078,7 +12051,7 @@ const refiners = (queryKey, query, environment, customBaseUrl, customParams) =>
12078
12051
  const errors = yield res.json();
12079
12052
  return { success: false, errors };
12080
12053
  });
12081
- const relatedQueries = (queryKey, query, environment, customBaseUrl, customParams) => __awaiter(void 0, void 0, void 0, function* () {
12054
+ const relatedQueries = (queryKey, query, environment, customBaseUrl, customParams) => __async2(null, null, function* () {
12082
12055
  const endpoint = `${getApiUrl$1(environment, customBaseUrl)}query/${queryKey}/related`;
12083
12056
  const url = addCustomParams(endpoint, customParams);
12084
12057
  const res = yield fetch(url, Object.assign(Object.assign({}, defaultConfig), { body: JSON.stringify(query) }));
@@ -12089,7 +12062,7 @@ const relatedQueries = (queryKey, query, environment, customBaseUrl, customParam
12089
12062
  const errors = yield res.json();
12090
12063
  return { success: false, errors };
12091
12064
  });
12092
- const queryByIds = (queryKey, ids, environment, customBaseUrl, customParams) => __awaiter(void 0, void 0, void 0, function* () {
12065
+ const queryByIds = (queryKey, ids, environment, customBaseUrl, customParams) => __async2(null, null, function* () {
12093
12066
  const idParam = ids.map((id) => `ids=${id}`).join("&");
12094
12067
  const endpoint = `${getApiUrl$1(environment, customBaseUrl)}query/${queryKey}/ids?${idParam}`;
12095
12068
  const url = addCustomParams(endpoint, customParams);
@@ -12101,7 +12074,7 @@ const queryByIds = (queryKey, ids, environment, customBaseUrl, customParams) =>
12101
12074
  const errors = yield res.json();
12102
12075
  return { success: false, errors };
12103
12076
  });
12104
- const recommendForSingleId = (queryKey, recommendForId, filters, environment, customBaseUrl, customParams) => __awaiter(void 0, void 0, void 0, function* () {
12077
+ const recommendForSingleId = (queryKey, recommendForId, filters, environment, customBaseUrl, customParams) => __async2(null, null, function* () {
12105
12078
  let endpoint = `${getApiUrl$1(environment, customBaseUrl)}recommendations/document/${recommendForId}?recommendationQueryKey=${queryKey}`;
12106
12079
  if (filters) {
12107
12080
  endpoint += `&${e({ filters })}`;
@@ -12115,7 +12088,7 @@ const recommendForSingleId = (queryKey, recommendForId, filters, environment, cu
12115
12088
  const errors = yield res.json();
12116
12089
  return { success: false, errors };
12117
12090
  });
12118
- const recommendForMultipleIds = (queryKey, recommendForIds, filters, environment, customBaseUrl, customParams) => __awaiter(void 0, void 0, void 0, function* () {
12091
+ const recommendForMultipleIds = (queryKey, recommendForIds, filters, environment, customBaseUrl, customParams) => __async2(null, null, function* () {
12119
12092
  const limitedRecommendForIds = recommendForIds.slice(0, 20);
12120
12093
  let endpoint = `${getApiUrl$1(environment, customBaseUrl)}recommendations/documentsByMultipleIds?recommendationQueryKey=${queryKey}&itemId[]=${limitedRecommendForIds.join("&itemId[]=")}`;
12121
12094
  if (filters) {
@@ -12130,10 +12103,10 @@ const recommendForMultipleIds = (queryKey, recommendForIds, filters, environment
12130
12103
  const errors = yield res.json();
12131
12104
  return { success: false, errors };
12132
12105
  });
12133
- const recommend = (queryKey, recommendForId, filters, environment, customBaseUrl, customParams) => __awaiter(void 0, void 0, void 0, function* () {
12106
+ const recommend = (queryKey, recommendForId, filters, environment, customBaseUrl, customParams) => __async2(null, null, function* () {
12134
12107
  return Array.isArray(recommendForId) ? yield recommendForMultipleIds(queryKey, recommendForId, filters, environment, customBaseUrl, customParams) : yield recommendForSingleId(queryKey, recommendForId, filters, environment, customBaseUrl, customParams);
12135
12108
  });
12136
- const suggest = (queryKey, query, environment, customBaseUrl, customParams) => __awaiter(void 0, void 0, void 0, function* () {
12109
+ const suggest = (queryKey, query, environment, customBaseUrl, customParams) => __async2(null, null, function* () {
12137
12110
  const endpoint = `${getApiUrl$1(environment, customBaseUrl)}query/${queryKey}`;
12138
12111
  const url = addCustomParams(endpoint, customParams);
12139
12112
  const res = yield fetch(url, Object.assign(Object.assign({}, defaultConfig), { body: JSON.stringify(query) }));
@@ -12144,18 +12117,18 @@ const suggest = (queryKey, query, environment, customBaseUrl, customParams) => _
12144
12117
  const errors = yield res.json();
12145
12118
  return { success: false, errors };
12146
12119
  });
12147
- const track$1 = (queryKey, event, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
12120
+ const track$1 = (queryKey, event, environment, customBaseUrl) => __async2(null, null, function* () {
12148
12121
  try {
12149
12122
  const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}events`, Object.assign(Object.assign({}, defaultConfig), { body: JSON.stringify(Object.assign({ queryKey }, event)) }));
12150
12123
  if (res.status < 400) {
12151
12124
  return { success: false };
12152
12125
  }
12153
12126
  return res.json();
12154
- } catch (e2) {
12127
+ } catch (_a25) {
12155
12128
  return { success: false };
12156
12129
  }
12157
12130
  });
12158
- const loadRedirectionRules = (queryKey, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
12131
+ const loadRedirectionRules = (queryKey, environment, customBaseUrl) => __async2(null, null, function* () {
12159
12132
  const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}redirections/${queryKey}`, Object.assign(Object.assign({}, defaultConfig), { method: "GET" }));
12160
12133
  if (res.status < 400) {
12161
12134
  return res.json();
@@ -12163,27 +12136,164 @@ const loadRedirectionRules = (queryKey, environment, customBaseUrl) => __awaiter
12163
12136
  const errors = yield res.json();
12164
12137
  return { success: false, errors };
12165
12138
  });
12139
+ const FORBIDDEN_KEYS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
12140
+ const isSafeKey = (key) => !FORBIDDEN_KEYS.has(key);
12141
+ const toPath = (key) => key.split(".").filter(Boolean);
12142
+ const isObjectLike = (v) => typeof v === "object" && v !== null;
12143
+ const hasByPath = (obj, path) => {
12144
+ let cur = obj;
12145
+ for (let i = 0; i < path.length; i++) {
12146
+ const k = path[i];
12147
+ if (!isSafeKey(k) || !isObjectLike(cur)) {
12148
+ return false;
12149
+ }
12150
+ if (!Object.prototype.hasOwnProperty.call(cur, k)) {
12151
+ return false;
12152
+ }
12153
+ cur = cur[k];
12154
+ }
12155
+ return true;
12156
+ };
12157
+ const getByPath = (obj, path) => {
12158
+ let cur = obj;
12159
+ for (const k of path) {
12160
+ if (!isSafeKey(k) || !isObjectLike(cur)) {
12161
+ return void 0;
12162
+ }
12163
+ cur = cur[k];
12164
+ }
12165
+ return cur;
12166
+ };
12167
+ const setByPath = (obj, path, value) => {
12168
+ if (!path.length) {
12169
+ return;
12170
+ }
12171
+ let cur = obj;
12172
+ for (let i = 0; i < path.length - 1; i++) {
12173
+ const k = path[i];
12174
+ if (!isSafeKey(k) || !isObjectLike(cur)) {
12175
+ return;
12176
+ }
12177
+ const next = cur[k];
12178
+ if (!isObjectLike(next))
12179
+ cur[k] = {};
12180
+ cur = cur[k];
12181
+ }
12182
+ const lastKey = path[path.length - 1];
12183
+ if (!isSafeKey(lastKey) || !isObjectLike(cur)) {
12184
+ return;
12185
+ }
12186
+ cur[lastKey] = value;
12187
+ };
12188
+ const unsetByPath = (obj, path) => {
12189
+ if (!path.length) {
12190
+ return;
12191
+ }
12192
+ let cur = obj;
12193
+ for (let i = 0; i < path.length - 1; i++) {
12194
+ const k = path[i];
12195
+ if (!isSafeKey(k) || !isObjectLike(cur)) {
12196
+ return;
12197
+ }
12198
+ if (!Object.prototype.hasOwnProperty.call(cur, k)) {
12199
+ return;
12200
+ }
12201
+ cur = cur[k];
12202
+ }
12203
+ const lastKey = path[path.length - 1];
12204
+ if (!isSafeKey(lastKey) || !isObjectLike(cur)) {
12205
+ return;
12206
+ }
12207
+ delete cur[lastKey];
12208
+ };
12209
+ const transformItems = (items, transformOptions) => {
12210
+ var _a25;
12211
+ const mapping = (_a25 = transformOptions === null || transformOptions === void 0 ? void 0 : transformOptions.transform) === null || _a25 === void 0 ? void 0 : _a25.fieldNames;
12212
+ if (!(items === null || items === void 0 ? void 0 : items.length) || !mapping) {
12213
+ return items;
12214
+ }
12215
+ return items.map((item) => {
12216
+ for (const [originalField, newField] of Object.entries(mapping)) {
12217
+ const fromPath = toPath(originalField);
12218
+ const toPathArr = toPath(newField);
12219
+ if (!fromPath.length || !toPathArr.length) {
12220
+ continue;
12221
+ }
12222
+ if (!hasByPath(item, fromPath)) {
12223
+ continue;
12224
+ }
12225
+ const value = getByPath(item, fromPath);
12226
+ setByPath(item, toPathArr, value);
12227
+ unsetByPath(item, fromPath);
12228
+ }
12229
+ return item;
12230
+ });
12231
+ };
12232
+ const transform = (result2, transformOptions) => {
12233
+ var _a25, _b25, _c, _d, _e, _f, _g;
12234
+ let transformedResult = result2;
12235
+ if (!result2 || !(transformOptions === null || transformOptions === void 0 ? void 0 : transformOptions.transform)) {
12236
+ return result2;
12237
+ }
12238
+ if ((_a25 = result2 === null || result2 === void 0 ? void 0 : result2.items) === null || _a25 === void 0 ? void 0 : _a25.length) {
12239
+ transformedResult = Object.assign(Object.assign({}, transformedResult), { items: transformItems(transformedResult.items, transformOptions) });
12240
+ }
12241
+ if ((_b25 = result2 === null || result2 === void 0 ? void 0 : result2.similarQueries) === null || _b25 === void 0 ? void 0 : _b25.length) {
12242
+ transformedResult = Object.assign(Object.assign({}, transformedResult), { similarQueries: (_c = transformedResult.similarQueries) === null || _c === void 0 ? void 0 : _c.map((similarQuery) => Object.assign(Object.assign({}, similarQuery), { items: transformItems(similarQuery.items, transformOptions) })) });
12243
+ }
12244
+ if ((_e = (_d = result2 === null || result2 === void 0 ? void 0 : result2.similarResults) === null || _d === void 0 ? void 0 : _d.items) === null || _e === void 0 ? void 0 : _e.length) {
12245
+ transformedResult = Object.assign(Object.assign({}, transformedResult), { similarResults: Object.assign(Object.assign({}, transformedResult.similarResults), { items: transformItems(transformedResult.similarResults.items, transformOptions) }) });
12246
+ }
12247
+ if ((_f = result2.relatedQueries) === null || _f === void 0 ? void 0 : _f.length) {
12248
+ transformedResult = Object.assign(Object.assign({}, transformedResult), { relatedQueries: (_g = transformedResult.relatedQueries) === null || _g === void 0 ? void 0 : _g.map((relatedQuery) => Object.assign(Object.assign({}, relatedQuery), { topItems: transformItems(relatedQuery.topItems, transformOptions) })) });
12249
+ }
12250
+ return transformedResult;
12251
+ };
12252
+ const transformSearchQueryResult = (result2, transformOptions) => {
12253
+ if (result2.success === false) {
12254
+ return result2;
12255
+ }
12256
+ return transform(result2, transformOptions);
12257
+ };
12258
+ const transformSearchQueryRefinersResult = (result2, transformOptions) => {
12259
+ if (result2.success === false) {
12260
+ return result2;
12261
+ }
12262
+ return transform(result2, transformOptions);
12263
+ };
12264
+ const transformRelatedQueries = (result2, transformOptions) => {
12265
+ if (result2.success === false) {
12266
+ return result2;
12267
+ }
12268
+ return transform(result2, transformOptions);
12269
+ };
12166
12270
  const LupaSearchSdk = {
12167
- query: (queryKey, publicQuery, options = null) => {
12271
+ query: (queryKey, publicQuery, options = null) => __async2(null, null, function* () {
12168
12272
  if (options === null || options === void 0 ? void 0 : options.customUrl) {
12169
- return searchCustom(publicQuery, options);
12273
+ const result3 = yield searchCustom(publicQuery, options);
12274
+ return transformSearchQueryResult(result3, options);
12170
12275
  }
12171
- return search(queryKey, publicQuery, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl, options === null || options === void 0 ? void 0 : options.customParams);
12172
- },
12276
+ const result2 = yield search(queryKey, publicQuery, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl, options === null || options === void 0 ? void 0 : options.customParams);
12277
+ return transformSearchQueryResult(result2, options);
12278
+ }),
12173
12279
  queryFacets: (queryKey, publicQuery, options = null) => {
12174
12280
  return facets(queryKey, publicQuery, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl, options === null || options === void 0 ? void 0 : options.customParams);
12175
12281
  },
12176
- queryRefiners: (queryKey, publicQuery, options = null) => {
12177
- return refiners(queryKey, publicQuery, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl, options === null || options === void 0 ? void 0 : options.customParams);
12178
- },
12179
- queryRelated: (queryKey, publicQuery, options = null) => {
12180
- return relatedQueries(queryKey, publicQuery, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl, options === null || options === void 0 ? void 0 : options.customParams);
12181
- },
12282
+ queryRefiners: (queryKey, publicQuery, options = null) => __async2(null, null, function* () {
12283
+ const result2 = yield refiners(queryKey, publicQuery, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl, options === null || options === void 0 ? void 0 : options.customParams);
12284
+ return transformSearchQueryRefinersResult(result2, options);
12285
+ }),
12286
+ queryRelated: (queryKey, publicQuery, options = null) => __async2(null, null, function* () {
12287
+ const result2 = yield relatedQueries(queryKey, publicQuery, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl, options === null || options === void 0 ? void 0 : options.customParams);
12288
+ return transformRelatedQueries(result2, options);
12289
+ }),
12182
12290
  suggestions: (queryKey, suggestionQuery, options = null) => {
12183
12291
  if (options === null || options === void 0 ? void 0 : options.customUrl) {
12184
- return suggestCustom(suggestionQuery, options);
12292
+ const result3 = suggestCustom(suggestionQuery, options);
12293
+ return result3;
12185
12294
  }
12186
- return suggest(queryKey, suggestionQuery, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl, options === null || options === void 0 ? void 0 : options.customParams);
12295
+ const result2 = suggest(queryKey, suggestionQuery, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl, options === null || options === void 0 ? void 0 : options.customParams);
12296
+ return result2;
12187
12297
  },
12188
12298
  track: (queryKey, eventData, options = null) => {
12189
12299
  return track$1(queryKey, eventData, (options === null || options === void 0 ? void 0 : options.environment) || "production", options === null || options === void 0 ? void 0 : options.customBaseUrl);
@@ -12858,9 +12968,9 @@ function requireLodash$1() {
12858
12968
  });
12859
12969
  return result2;
12860
12970
  }
12861
- function overArg(func, transform) {
12971
+ function overArg(func, transform2) {
12862
12972
  return function(arg) {
12863
- return func(transform(arg));
12973
+ return func(transform2(arg));
12864
12974
  };
12865
12975
  }
12866
12976
  function replaceHolders(array, placeholder) {
@@ -12967,7 +13077,7 @@ function requireLodash$1() {
12967
13077
  var dataViewCtorString = toSource(DataView2), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
12968
13078
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
12969
13079
  function lodash2(value) {
12970
- if (isObjectLike(value) && !isArray3(value) && !(value instanceof LazyWrapper)) {
13080
+ if (isObjectLike2(value) && !isArray3(value) && !(value instanceof LazyWrapper)) {
12971
13081
  if (value instanceof LodashWrapper) {
12972
13082
  return value;
12973
13083
  }
@@ -13648,19 +13758,19 @@ function requireLodash$1() {
13648
13758
  return func == null ? undefined$1 : apply2(func, object, args);
13649
13759
  }
13650
13760
  function baseIsArguments(value) {
13651
- return isObjectLike(value) && baseGetTag(value) == argsTag;
13761
+ return isObjectLike2(value) && baseGetTag(value) == argsTag;
13652
13762
  }
13653
13763
  function baseIsArrayBuffer(value) {
13654
- return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
13764
+ return isObjectLike2(value) && baseGetTag(value) == arrayBufferTag;
13655
13765
  }
13656
13766
  function baseIsDate(value) {
13657
- return isObjectLike(value) && baseGetTag(value) == dateTag;
13767
+ return isObjectLike2(value) && baseGetTag(value) == dateTag;
13658
13768
  }
13659
13769
  function baseIsEqual(value, other, bitmask, customizer, stack2) {
13660
13770
  if (value === other) {
13661
13771
  return true;
13662
13772
  }
13663
- if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
13773
+ if (value == null || other == null || !isObjectLike2(value) && !isObjectLike2(other)) {
13664
13774
  return value !== value && other !== other;
13665
13775
  }
13666
13776
  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack2);
@@ -13696,7 +13806,7 @@ function requireLodash$1() {
13696
13806
  return equalObjects(object, other, bitmask, customizer, equalFunc, stack2);
13697
13807
  }
13698
13808
  function baseIsMap(value) {
13699
- return isObjectLike(value) && getTag(value) == mapTag;
13809
+ return isObjectLike2(value) && getTag(value) == mapTag;
13700
13810
  }
13701
13811
  function baseIsMatch(object, source, matchData, customizer) {
13702
13812
  var index = matchData.length, length = index, noCustomizer = !customizer;
@@ -13737,13 +13847,13 @@ function requireLodash$1() {
13737
13847
  return pattern.test(toSource(value));
13738
13848
  }
13739
13849
  function baseIsRegExp(value) {
13740
- return isObjectLike(value) && baseGetTag(value) == regexpTag;
13850
+ return isObjectLike2(value) && baseGetTag(value) == regexpTag;
13741
13851
  }
13742
13852
  function baseIsSet(value) {
13743
- return isObjectLike(value) && getTag(value) == setTag;
13853
+ return isObjectLike2(value) && getTag(value) == setTag;
13744
13854
  }
13745
13855
  function baseIsTypedArray(value) {
13746
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
13856
+ return isObjectLike2(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
13747
13857
  }
13748
13858
  function baseIteratee(value) {
13749
13859
  if (typeof value == "function") {
@@ -15253,7 +15363,7 @@ function requireLodash$1() {
15253
15363
  function objectToString2(value) {
15254
15364
  return nativeObjectToString.call(value);
15255
15365
  }
15256
- function overRest(func, start, transform2) {
15366
+ function overRest(func, start, transform3) {
15257
15367
  start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0);
15258
15368
  return function() {
15259
15369
  var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
@@ -15265,7 +15375,7 @@ function requireLodash$1() {
15265
15375
  while (++index < start) {
15266
15376
  otherArgs[index] = args[index];
15267
15377
  }
15268
- otherArgs[start] = transform2(array);
15378
+ otherArgs[start] = transform3(array);
15269
15379
  return apply2(func, this, otherArgs);
15270
15380
  };
15271
15381
  }
@@ -16287,7 +16397,7 @@ function requireLodash$1() {
16287
16397
  var isArguments = baseIsArguments(/* @__PURE__ */ function() {
16288
16398
  return arguments;
16289
16399
  }()) ? baseIsArguments : function(value) {
16290
- return isObjectLike(value) && hasOwnProperty2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
16400
+ return isObjectLike2(value) && hasOwnProperty2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
16291
16401
  };
16292
16402
  var isArray3 = Array2.isArray;
16293
16403
  var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
@@ -16295,15 +16405,15 @@ function requireLodash$1() {
16295
16405
  return value != null && isLength(value.length) && !isFunction2(value);
16296
16406
  }
16297
16407
  function isArrayLikeObject(value) {
16298
- return isObjectLike(value) && isArrayLike(value);
16408
+ return isObjectLike2(value) && isArrayLike(value);
16299
16409
  }
16300
16410
  function isBoolean2(value) {
16301
- return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
16411
+ return value === true || value === false || isObjectLike2(value) && baseGetTag(value) == boolTag;
16302
16412
  }
16303
16413
  var isBuffer = nativeIsBuffer || stubFalse;
16304
16414
  var isDate2 = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
16305
16415
  function isElement(value) {
16306
- return isObjectLike(value) && value.nodeType === 1 && !isPlainObject4(value);
16416
+ return isObjectLike2(value) && value.nodeType === 1 && !isPlainObject4(value);
16307
16417
  }
16308
16418
  function isEmpty(value) {
16309
16419
  if (value == null) {
@@ -16335,7 +16445,7 @@ function requireLodash$1() {
16335
16445
  return result3 === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result3;
16336
16446
  }
16337
16447
  function isError2(value) {
16338
- if (!isObjectLike(value)) {
16448
+ if (!isObjectLike2(value)) {
16339
16449
  return false;
16340
16450
  }
16341
16451
  var tag = baseGetTag(value);
@@ -16361,7 +16471,7 @@ function requireLodash$1() {
16361
16471
  var type = typeof value;
16362
16472
  return value != null && (type == "object" || type == "function");
16363
16473
  }
16364
- function isObjectLike(value) {
16474
+ function isObjectLike2(value) {
16365
16475
  return value != null && typeof value == "object";
16366
16476
  }
16367
16477
  var isMap2 = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
@@ -16388,10 +16498,10 @@ function requireLodash$1() {
16388
16498
  return value == null;
16389
16499
  }
16390
16500
  function isNumber2(value) {
16391
- return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
16501
+ return typeof value == "number" || isObjectLike2(value) && baseGetTag(value) == numberTag;
16392
16502
  }
16393
16503
  function isPlainObject4(value) {
16394
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
16504
+ if (!isObjectLike2(value) || baseGetTag(value) != objectTag) {
16395
16505
  return false;
16396
16506
  }
16397
16507
  var proto = getPrototype(value);
@@ -16407,20 +16517,20 @@ function requireLodash$1() {
16407
16517
  }
16408
16518
  var isSet2 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
16409
16519
  function isString2(value) {
16410
- return typeof value == "string" || !isArray3(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
16520
+ return typeof value == "string" || !isArray3(value) && isObjectLike2(value) && baseGetTag(value) == stringTag;
16411
16521
  }
16412
16522
  function isSymbol2(value) {
16413
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
16523
+ return typeof value == "symbol" || isObjectLike2(value) && baseGetTag(value) == symbolTag;
16414
16524
  }
16415
16525
  var isTypedArray2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
16416
16526
  function isUndefined2(value) {
16417
16527
  return value === undefined$1;
16418
16528
  }
16419
16529
  function isWeakMap(value) {
16420
- return isObjectLike(value) && getTag(value) == weakMapTag;
16530
+ return isObjectLike2(value) && getTag(value) == weakMapTag;
16421
16531
  }
16422
16532
  function isWeakSet(value) {
16423
- return isObjectLike(value) && baseGetTag(value) == weakSetTag;
16533
+ return isObjectLike2(value) && baseGetTag(value) == weakSetTag;
16424
16534
  }
16425
16535
  var lt = createRelationalOperation(baseLt);
16426
16536
  var lte = createRelationalOperation(function(value, other) {
@@ -16680,7 +16790,7 @@ function requireLodash$1() {
16680
16790
  }
16681
16791
  var toPairs = createToPairs(keys);
16682
16792
  var toPairsIn = createToPairs(keysIn);
16683
- function transform(object, iteratee2, accumulator) {
16793
+ function transform2(object, iteratee2, accumulator) {
16684
16794
  var isArr = isArray3(object), isArrLike = isArr || isBuffer(object) || isTypedArray2(object);
16685
16795
  iteratee2 = getIteratee(iteratee2, 4);
16686
16796
  if (accumulator == null) {
@@ -17183,7 +17293,7 @@ function requireLodash$1() {
17183
17293
  }
17184
17294
  return result3;
17185
17295
  }
17186
- function toPath(value) {
17296
+ function toPath2(value) {
17187
17297
  if (isArray3(value)) {
17188
17298
  return arrayMap(value, toKey);
17189
17299
  }
@@ -17354,9 +17464,9 @@ function requireLodash$1() {
17354
17464
  lodash2.toArray = toArray;
17355
17465
  lodash2.toPairs = toPairs;
17356
17466
  lodash2.toPairsIn = toPairsIn;
17357
- lodash2.toPath = toPath;
17467
+ lodash2.toPath = toPath2;
17358
17468
  lodash2.toPlainObject = toPlainObject;
17359
- lodash2.transform = transform;
17469
+ lodash2.transform = transform2;
17360
17470
  lodash2.unary = unary;
17361
17471
  lodash2.union = union;
17362
17472
  lodash2.unionBy = unionBy;
@@ -17455,7 +17565,7 @@ function requireLodash$1() {
17455
17565
  lodash2.isNull = isNull2;
17456
17566
  lodash2.isNumber = isNumber2;
17457
17567
  lodash2.isObject = isObject2;
17458
- lodash2.isObjectLike = isObjectLike;
17568
+ lodash2.isObjectLike = isObjectLike2;
17459
17569
  lodash2.isPlainObject = isPlainObject4;
17460
17570
  lodash2.isRegExp = isRegExp2;
17461
17571
  lodash2.isSafeInteger = isSafeInteger;
@@ -19150,6 +19260,10 @@ const useParamsStore = /* @__PURE__ */ defineStore("params", () => {
19150
19260
  const page2 = Number(params.value[QUERY_PARAMS_PARSED.PAGE]) || 1;
19151
19261
  return page2 <= 0 ? 1 : page2;
19152
19262
  });
19263
+ const disableNavigationToSearchResults = computed(() => {
19264
+ var _a25;
19265
+ return ((_a25 = optionsStore.searchBoxOptions) == null ? void 0 : _a25.disableNavigationToSearchResults) || false;
19266
+ });
19153
19267
  const limit = computed(() => {
19154
19268
  return Number(params.value[QUERY_PARAMS_PARSED.LIMIT]) || optionsStore.defaultSearchResultPageSize || defaultLimit.value;
19155
19269
  });
@@ -19243,6 +19357,9 @@ const useParamsStore = /* @__PURE__ */ defineStore("params", () => {
19243
19357
  if (redirectionApplied) {
19244
19358
  return;
19245
19359
  }
19360
+ if (disableNavigationToSearchResults.value) {
19361
+ return;
19362
+ }
19246
19363
  const forceFullReload = (_a25 = optionsStore.searchBoxOptions.forceFullReloadOnParams) == null ? void 0 : _a25.some(
19247
19364
  (p2) => getQueryParam$1(p2)
19248
19365
  );
@@ -19807,10 +19924,10 @@ const _hoisted_1$1o = {
19807
19924
  key: 0,
19808
19925
  class: "lupa-dialog-overlay"
19809
19926
  };
19810
- const _hoisted_2$Y = { class: "lupa-dialog-content" };
19927
+ const _hoisted_2$Z = { class: "lupa-dialog-content" };
19811
19928
  const _hoisted_3$G = { class: "lupa-listening-text" };
19812
- const _hoisted_4$w = { class: "lupa-mic-button-wrapper" };
19813
- const _hoisted_5$m = ["aria-label"];
19929
+ const _hoisted_4$v = { class: "lupa-mic-button-wrapper" };
19930
+ const _hoisted_5$l = ["aria-label"];
19814
19931
  const _sfc_main$1F = /* @__PURE__ */ defineComponent({
19815
19932
  __name: "VoiceSearchDialog",
19816
19933
  props: {
@@ -19921,15 +20038,15 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
19921
20038
  class: "lupa-dialog-box-close-button",
19922
20039
  onClick: _cache[0] || (_cache[0] = () => emit2("close"))
19923
20040
  }),
19924
- createBaseVNode("div", _hoisted_2$Y, [
20041
+ createBaseVNode("div", _hoisted_2$Z, [
19925
20042
  createBaseVNode("p", _hoisted_3$G, toDisplayString(description.value), 1),
19926
- createBaseVNode("div", _hoisted_4$w, [
20043
+ createBaseVNode("div", _hoisted_4$v, [
19927
20044
  createBaseVNode("button", {
19928
20045
  class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
19929
20046
  onClick: handleRecordingButtonClick,
19930
20047
  "aria-controls": "voice-search-microphone",
19931
20048
  "aria-label": ((_b25 = (_a25 = labels.value) == null ? void 0 : _a25.aria) == null ? void 0 : _b25.microphone) || "Toggle microphone"
19932
- }, null, 10, _hoisted_5$m),
20049
+ }, null, 10, _hoisted_5$l),
19933
20050
  createVNode(_sfc_main$1G, {
19934
20051
  ref_key: "voiceSearchProgressBar",
19935
20052
  ref: voiceSearchProgressBar,
@@ -19946,10 +20063,10 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
19946
20063
  }
19947
20064
  });
19948
20065
  const _hoisted_1$1n = { id: "lupa-search-box-input-container" };
19949
- const _hoisted_2$X = { class: "lupa-input-clear" };
20066
+ const _hoisted_2$Y = { class: "lupa-input-clear" };
19950
20067
  const _hoisted_3$F = { id: "lupa-search-box-input" };
19951
- const _hoisted_4$v = ["value"];
19952
- const _hoisted_5$l = ["aria-label", "placeholder"];
20068
+ const _hoisted_4$u = ["value"];
20069
+ const _hoisted_5$k = ["aria-label", "placeholder"];
19953
20070
  const _hoisted_6$7 = {
19954
20071
  key: 0,
19955
20072
  class: "lupa-close-label"
@@ -20089,7 +20206,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
20089
20206
  __expose({ focus });
20090
20207
  return (_ctx, _cache) => {
20091
20208
  return openBlock(), createElementBlock("div", _hoisted_1$1n, [
20092
- createBaseVNode("div", _hoisted_2$X, [
20209
+ createBaseVNode("div", _hoisted_2$Y, [
20093
20210
  createBaseVNode("div", {
20094
20211
  class: normalizeClass(["lupa-input-clear-content", { "lupa-input-clear-filled": inputValue.value }]),
20095
20212
  onClick: clear
@@ -20101,7 +20218,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
20101
20218
  "aria-hidden": "true",
20102
20219
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
20103
20220
  disabled: ""
20104
- }, null, 8, _hoisted_4$v),
20221
+ }, null, 8, _hoisted_4$u),
20105
20222
  withDirectives(createBaseVNode("input", mergeProps({
20106
20223
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
20107
20224
  }, inputAttributes.value, {
@@ -20115,7 +20232,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
20115
20232
  placeholder: labels.value.placeholder,
20116
20233
  onInput: handleInput,
20117
20234
  onFocus: handleFocus
20118
- }), null, 16, _hoisted_5$l), [
20235
+ }), null, 16, _hoisted_5$k), [
20119
20236
  [vModelText, inputValue.value]
20120
20237
  ]),
20121
20238
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -20194,7 +20311,7 @@ const _sfc_main$1D = /* @__PURE__ */ defineComponent({
20194
20311
  }
20195
20312
  });
20196
20313
  const _hoisted_1$1m = { class: "lupa-search-box-history-item" };
20197
- const _hoisted_2$W = { class: "lupa-search-box-history-item-content" };
20314
+ const _hoisted_2$X = { class: "lupa-search-box-history-item-content" };
20198
20315
  const _sfc_main$1C = /* @__PURE__ */ defineComponent({
20199
20316
  __name: "SearchBoxHistoryItem",
20200
20317
  props: {
@@ -20213,7 +20330,7 @@ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
20213
20330
  };
20214
20331
  return (_ctx, _cache) => {
20215
20332
  return openBlock(), createElementBlock("div", _hoisted_1$1m, [
20216
- createBaseVNode("div", _hoisted_2$W, [
20333
+ createBaseVNode("div", _hoisted_2$X, [
20217
20334
  createBaseVNode("div", {
20218
20335
  class: normalizeClass(["lupa-search-box-history-item-text", { "lupa-search-box-history-item-highlighted": _ctx.highlighted }]),
20219
20336
  onClick: click2
@@ -20300,15 +20417,31 @@ const _sfc_main$1B = /* @__PURE__ */ defineComponent({
20300
20417
  };
20301
20418
  }
20302
20419
  });
20303
- const _hoisted_1$1k = { class: "lupa-search-box-no-results" };
20420
+ const _hoisted_1$1k = ["innerHTML"];
20421
+ const _hoisted_2$W = {
20422
+ key: 1,
20423
+ class: "lupa-search-box-no-results"
20424
+ };
20304
20425
  const _sfc_main$1A = /* @__PURE__ */ defineComponent({
20305
20426
  __name: "SearchBoxNoResults",
20306
20427
  props: {
20307
- labels: {}
20428
+ options: {}
20308
20429
  },
20309
20430
  setup(__props) {
20431
+ const props = __props;
20432
+ const customHtml = computed(() => {
20433
+ return props.options.noResultsCustomHtml;
20434
+ });
20435
+ const labels = computed(() => {
20436
+ return props.options.labels;
20437
+ });
20310
20438
  return (_ctx, _cache) => {
20311
- return openBlock(), createElementBlock("p", _hoisted_1$1k, toDisplayString(_ctx.labels.noResults), 1);
20439
+ var _a25;
20440
+ return customHtml.value ? (openBlock(), createElementBlock("div", {
20441
+ key: 0,
20442
+ class: "lupa-search-box-no-results",
20443
+ innerHTML: customHtml.value
20444
+ }, null, 8, _hoisted_1$1k)) : (openBlock(), createElementBlock("p", _hoisted_2$W, toDisplayString((_a25 = labels.value) == null ? void 0 : _a25.noResults), 1));
20312
20445
  };
20313
20446
  }
20314
20447
  });
@@ -20351,11 +20484,11 @@ const _hoisted_3$E = {
20351
20484
  class: "lupa-suggestion-facet",
20352
20485
  "data-cy": "lupa-suggestion-facet"
20353
20486
  };
20354
- const _hoisted_4$u = {
20487
+ const _hoisted_4$t = {
20355
20488
  class: "lupa-suggestion-facet-label",
20356
20489
  "data-cy": "lupa-suggestion-facet-label"
20357
20490
  };
20358
- const _hoisted_5$k = {
20491
+ const _hoisted_5$j = {
20359
20492
  class: "lupa-suggestion-facet-value",
20360
20493
  "data-cy": "lupa-suggestion-facet-value"
20361
20494
  };
@@ -20398,8 +20531,8 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
20398
20531
  innerHTML: _ctx.suggestion.displayHighlight
20399
20532
  }, null, 8, _hoisted_1$1j)) : (openBlock(), createElementBlock("div", _hoisted_2$V, toDisplayString(_ctx.suggestion.display), 1)),
20400
20533
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$E, [
20401
- createBaseVNode("span", _hoisted_4$u, toDisplayString(facetLabel.value), 1),
20402
- createBaseVNode("span", _hoisted_5$k, toDisplayString(_ctx.suggestion.facet.title), 1)
20534
+ createBaseVNode("span", _hoisted_4$t, toDisplayString(facetLabel.value), 1),
20535
+ createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
20403
20536
  ])) : createCommentVNode("", true)
20404
20537
  ]);
20405
20538
  };
@@ -28465,12 +28598,12 @@ and ensure you are accounting for this risk.
28465
28598
  });
28466
28599
  const transformTagsMap = {};
28467
28600
  let transformTagsAll;
28468
- each(options.transformTags, function(transform, tag) {
28601
+ each(options.transformTags, function(transform2, tag) {
28469
28602
  let transFun;
28470
- if (typeof transform === "function") {
28471
- transFun = transform;
28472
- } else if (typeof transform === "string") {
28473
- transFun = sanitizeHtml2.simpleTransform(transform);
28603
+ if (typeof transform2 === "function") {
28604
+ transFun = transform2;
28605
+ } else if (typeof transform2 === "string") {
28606
+ transFun = sanitizeHtml2.simpleTransform(transform2);
28474
28607
  }
28475
28608
  if (tag === "*") {
28476
28609
  transformTagsAll = transFun;
@@ -30138,8 +30271,8 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
30138
30271
  const _hoisted_1$1d = ["innerHTML"];
30139
30272
  const _hoisted_2$R = { key: 0 };
30140
30273
  const _hoisted_3$D = { key: 1 };
30141
- const _hoisted_4$t = { class: "lupa-search-box-custom-label" };
30142
- const _hoisted_5$j = { class: "lupa-search-box-custom-text" };
30274
+ const _hoisted_4$s = { class: "lupa-search-box-custom-label" };
30275
+ const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
30143
30276
  const _sfc_main$1q = /* @__PURE__ */ defineComponent({
30144
30277
  __name: "SearchBoxProductCustom",
30145
30278
  props: {
@@ -30171,8 +30304,8 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
30171
30304
  class: [className.value, "lupa-search-box-product-custom"]
30172
30305
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
30173
30306
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$D, [
30174
- createBaseVNode("div", _hoisted_4$t, toDisplayString(label.value), 1),
30175
- createBaseVNode("div", _hoisted_5$j, toDisplayString(text.value), 1)
30307
+ createBaseVNode("div", _hoisted_4$s, toDisplayString(label.value), 1),
30308
+ createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
30176
30309
  ]))
30177
30310
  ], 16));
30178
30311
  };
@@ -30562,8 +30695,8 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
30562
30695
  const _hoisted_1$1b = { class: "lupa-search-box-add-to-cart-wrapper" };
30563
30696
  const _hoisted_2$Q = { class: "lupa-search-box-product-addtocart" };
30564
30697
  const _hoisted_3$C = ["disabled"];
30565
- const _hoisted_4$s = ["href"];
30566
- const _hoisted_5$i = ["disabled"];
30698
+ const _hoisted_4$r = ["href"];
30699
+ const _hoisted_5$h = ["disabled"];
30567
30700
  const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30568
30701
  __name: "SearchBoxProductAddToCart",
30569
30702
  props: {
@@ -30618,7 +30751,7 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30618
30751
  "data-cy": "lupa-add-to-cart",
30619
30752
  disabled: !inStockValue.value || loading.value
30620
30753
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
30621
- createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$s)
30754
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$r)
30622
30755
  ], 16, _hoisted_3$C)) : (openBlock(), createElementBlock("button", mergeProps({
30623
30756
  key: 1,
30624
30757
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
@@ -30626,7 +30759,7 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
30626
30759
  "data-cy": "lupa-add-to-cart",
30627
30760
  type: "button",
30628
30761
  disabled: !inStockValue.value || loading.value
30629
- }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$i))
30762
+ }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$h))
30630
30763
  ])
30631
30764
  ]);
30632
30765
  };
@@ -30738,7 +30871,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
30738
30871
  const _hoisted_1$19 = { class: "lupa-badge-title" };
30739
30872
  const _hoisted_2$P = ["src"];
30740
30873
  const _hoisted_3$B = { key: 1 };
30741
- const _hoisted_4$r = {
30874
+ const _hoisted_4$q = {
30742
30875
  key: 0,
30743
30876
  class: "lupa-badge-full-text"
30744
30877
  };
@@ -30782,7 +30915,7 @@ const _sfc_main$1m = /* @__PURE__ */ defineComponent({
30782
30915
  }, null, 8, _hoisted_2$P)) : createCommentVNode("", true),
30783
30916
  hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$B, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
30784
30917
  ]),
30785
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$r, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30918
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30786
30919
  ], 6);
30787
30920
  };
30788
30921
  }
@@ -31315,7 +31448,7 @@ const useTrackingStore = /* @__PURE__ */ defineStore("tracking", () => {
31315
31448
  };
31316
31449
  return { trackSearch, trackResults, trackEvent, trackDelayedEvent };
31317
31450
  });
31318
- const _hoisted_1$12 = { id: "lupa-search-box-products" };
31451
+ const _hoisted_1$12 = ["innerHTML"];
31319
31452
  const _sfc_main$1e = /* @__PURE__ */ defineComponent({
31320
31453
  __name: "SearchBoxProducts",
31321
31454
  props: {
@@ -31341,6 +31474,29 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
31341
31474
  }
31342
31475
  return (_c = (_b25 = highlightedItem.value) == null ? void 0 : _b25.index) != null ? _c : -1;
31343
31476
  });
31477
+ const showAll = ref(false);
31478
+ const hasResults = computed(() => {
31479
+ return props.items && props.items.length > 0;
31480
+ });
31481
+ const hasUncollapsedDocumentCountLimit = computed(() => {
31482
+ var _a25;
31483
+ return Boolean((_a25 = props.panelOptions) == null ? void 0 : _a25.uncollapsedDocumentCount);
31484
+ });
31485
+ const showAllItemsToggleButton = computed(() => {
31486
+ var _a25, _b25, _c;
31487
+ if (!hasUncollapsedDocumentCountLimit.value) {
31488
+ return false;
31489
+ }
31490
+ return ((_a25 = props.items) == null ? void 0 : _a25.length) > ((_c = (_b25 = props.panelOptions) == null ? void 0 : _b25.uncollapsedDocumentCount) != null ? _c : 0);
31491
+ });
31492
+ const displayItems = computed(() => {
31493
+ var _a25, _b25;
31494
+ if (showAll.value) {
31495
+ return props.items;
31496
+ }
31497
+ const count = (_b25 = (_a25 = props.panelOptions.uncollapsedDocumentCount) != null ? _a25 : props.panelOptions.limit) != null ? _b25 : props.items.length;
31498
+ return props.items.slice(0, count);
31499
+ });
31344
31500
  const handleProductClick = ({
31345
31501
  item,
31346
31502
  eventType,
@@ -31388,8 +31544,12 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
31388
31544
  }
31389
31545
  };
31390
31546
  return (_ctx, _cache) => {
31391
- return openBlock(), createElementBlock("div", _hoisted_1$12, [
31392
- _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.items, (item, index) => {
31547
+ var _a25, _b25, _c;
31548
+ return openBlock(), createElementBlock("div", {
31549
+ id: "lupa-search-box-products",
31550
+ class: normalizeClass({ "lupa-search-box-products-expanded": showAll.value })
31551
+ }, [
31552
+ _ctx.$slots.productCard ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(displayItems.value, (item, index) => {
31393
31553
  return renderSlot(_ctx.$slots, "productCard", {
31394
31554
  key: index,
31395
31555
  item,
@@ -31399,7 +31559,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
31399
31559
  inputValue: _ctx.inputValue,
31400
31560
  itemClicked: handleProductClick
31401
31561
  });
31402
- }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.items, (item, index) => {
31562
+ }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(displayItems.value, (item, index) => {
31403
31563
  return openBlock(), createBlock(_sfc_main$1f, {
31404
31564
  key: index,
31405
31565
  item,
@@ -31410,8 +31570,17 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
31410
31570
  onProductClick: handleProductClick
31411
31571
  }, null, 8, ["item", "panelOptions", "labels", "highlighted", "inputValue"]);
31412
31572
  }), 128)),
31573
+ hasResults.value && ((_a25 = _ctx.panelOptions) == null ? void 0 : _a25.appendCustomHtml) && (showAll.value || !showAllItemsToggleButton.value) ? (openBlock(), createElementBlock("div", {
31574
+ key: 2,
31575
+ innerHTML: _ctx.panelOptions.appendCustomHtml
31576
+ }, null, 8, _hoisted_1$12)) : createCommentVNode("", true),
31577
+ showAllItemsToggleButton.value ? (openBlock(), createElementBlock("a", {
31578
+ key: 3,
31579
+ class: "lupa-search-box-expand",
31580
+ onClick: _cache[0] || (_cache[0] = ($event) => showAll.value = !showAll.value)
31581
+ }, toDisplayString(showAll.value ? (_b25 = _ctx.labels) == null ? void 0 : _b25.showLess : (_c = _ctx.labels) == null ? void 0 : _c.showMore), 1)) : createCommentVNode("", true),
31413
31582
  renderSlot(_ctx.$slots, "default")
31414
- ]);
31583
+ ], 2);
31415
31584
  };
31416
31585
  }
31417
31586
  });
@@ -31599,6 +31768,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
31599
31768
  searchText: props.inputValue,
31600
31769
  limit: props.panel.limit,
31601
31770
  filters: extractedInitialFilters.value,
31771
+ selectFields: props.panel.selectFields,
31602
31772
  modifiers: {
31603
31773
  facets: false,
31604
31774
  refiners: false
@@ -31741,23 +31911,15 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
31741
31911
  };
31742
31912
  }
31743
31913
  });
31744
- const _hoisted_1$10 = {
31745
- key: 0,
31746
- id: "lupa-search-box-panel"
31747
- };
31748
- const _hoisted_2$L = ["data-cy"];
31749
- const _hoisted_3$z = {
31914
+ const _hoisted_1$10 = ["data-cy"];
31915
+ const _hoisted_2$L = {
31750
31916
  key: 0,
31751
31917
  class: "lupa-panel-title lupa-panel-title-top-results"
31752
31918
  };
31753
- const _hoisted_4$q = {
31919
+ const _hoisted_3$z = {
31754
31920
  key: 1,
31755
31921
  class: "lupa-panel-title"
31756
31922
  };
31757
- const _hoisted_5$h = {
31758
- key: 1,
31759
- id: "lupa-search-box-panel"
31760
- };
31761
31923
  const __default__$2 = {
31762
31924
  components: {
31763
31925
  SearchBoxSuggestionsWrapper: _sfc_main$1x,
@@ -31930,7 +32092,11 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31930
32092
  ref_key: "panelContainer",
31931
32093
  ref: panelContainer
31932
32094
  }, [
31933
- displayResults.value ? (openBlock(), createElementBlock("div", _hoisted_1$10, [
32095
+ displayResults.value ? (openBlock(), createElementBlock("div", {
32096
+ key: 0,
32097
+ id: "lupa-search-box-panel",
32098
+ class: normalizeClass({ "lupa-search-text-empty": isSearchEmpty.value })
32099
+ }, [
31934
32100
  labels.value.closePanel ? (openBlock(), createElementBlock("a", {
31935
32101
  key: 0,
31936
32102
  class: "lupa-search-box-close-panel",
@@ -31952,8 +32118,8 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31952
32118
  style: normalizeStyle(panel.gridArea ? { gridArea: `${panel.gridArea}${index}` } : {}),
31953
32119
  "data-cy": "lupa-panel-" + panel.type + "-index"
31954
32120
  }, [
31955
- ((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$z, toDisplayString((_b25 = panel.labels) == null ? void 0 : _b25.topResultsTitle), 1)) : createCommentVNode("", true),
31956
- ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$q, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
32121
+ ((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_2$L, toDisplayString((_b25 = panel.labels) == null ? void 0 : _b25.topResultsTitle), 1)) : createCommentVNode("", true),
32122
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_3$z, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
31957
32123
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
31958
32124
  key: 2,
31959
32125
  panel,
@@ -31975,20 +32141,24 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31975
32141
  key: "0"
31976
32142
  } : void 0
31977
32143
  ]), 1064, ["panel", "search-box-options", "options", "debounce", "inputValue", "labels"])) : createCommentVNode("", true)
31978
- ], 14, _hoisted_2$L);
32144
+ ], 14, _hoisted_1$10);
31979
32145
  }), 128))
31980
32146
  ], 4),
31981
32147
  !unref(hasAnyResults) && _ctx.options.showNoResultsPanel ? (openBlock(), createBlock(_sfc_main$1A, {
31982
32148
  key: 1,
31983
- labels: labels.value
31984
- }, null, 8, ["labels"])) : createCommentVNode("", true),
32149
+ options: _ctx.options
32150
+ }, null, 8, ["options"])) : createCommentVNode("", true),
31985
32151
  displayShowMoreResultsButton.value ? (openBlock(), createBlock(_sfc_main$1D, {
31986
32152
  key: 2,
31987
32153
  labels: labels.value,
31988
32154
  options: _ctx.options,
31989
32155
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
31990
32156
  }, null, 8, ["labels", "options"])) : createCommentVNode("", true)
31991
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
32157
+ ], 2)) : displayHistory.value ? (openBlock(), createElementBlock("div", {
32158
+ key: 1,
32159
+ id: "lupa-search-box-panel",
32160
+ class: normalizeClass({ "lupa-search-text-empty": isSearchEmpty.value })
32161
+ }, [
31992
32162
  createVNode(_sfc_main$1B, {
31993
32163
  options: _ctx.options.history,
31994
32164
  history: history.value,
@@ -31996,7 +32166,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31996
32166
  onRemove: remove2,
31997
32167
  onRemoveAll: removeAll
31998
32168
  }, null, 8, ["options", "history"])
31999
- ])) : createCommentVNode("", true)
32169
+ ], 2)) : createCommentVNode("", true)
32000
32170
  ], 512);
32001
32171
  };
32002
32172
  }
@@ -32069,7 +32239,8 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
32069
32239
  "hideMoreResultsButtonOnEmptyQuery",
32070
32240
  "showNoResultsPanel",
32071
32241
  "expandOnSinglePanel",
32072
- "showMoreResultsButton"
32242
+ "showMoreResultsButton",
32243
+ "noResultsCustomHtml"
32073
32244
  ])
32074
32245
  );
32075
32246
  const searchTriggers = computed(() => {
@@ -32135,22 +32306,31 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
32135
32306
  (_b25 = props.options.callbacks) == null ? void 0 : _b25.onClosed();
32136
32307
  }
32137
32308
  };
32138
- const handleKeyDown = (e2) => {
32309
+ const fillInputWithSuggestion = () => {
32139
32310
  var _a26, _b25;
32311
+ if ((_b25 = (_a26 = suggestedValue == null ? void 0 : suggestedValue.value) == null ? void 0 : _a26.item) == null ? void 0 : _b25.suggestion) {
32312
+ selectSuggestion(__spreadProps2(__spreadValues2({}, suggestedValue.value), { override: true }));
32313
+ }
32314
+ };
32315
+ const goToResults = () => {
32316
+ handleSearch();
32317
+ resetValues();
32318
+ };
32319
+ const handleKeyDown = (e2) => {
32140
32320
  if (!focused.value) {
32141
32321
  return;
32142
32322
  }
32143
32323
  switch (e2.key) {
32144
32324
  case "Tab":
32145
- if ((_b25 = (_a26 = suggestedValue == null ? void 0 : suggestedValue.value) == null ? void 0 : _a26.item) == null ? void 0 : _b25.suggestion) {
32146
- e2.preventDefault();
32147
- selectSuggestion(__spreadProps2(__spreadValues2({}, suggestedValue.value), { override: true }));
32148
- }
32325
+ fillInputWithSuggestion();
32149
32326
  break;
32150
32327
  case "Enter":
32151
32328
  e2.preventDefault();
32152
- handleSearch();
32153
- resetValues();
32329
+ if (props.options.disableNavigationToSearchResults) {
32330
+ fillInputWithSuggestion();
32331
+ } else {
32332
+ goToResults();
32333
+ }
32154
32334
  break;
32155
32335
  case "Escape":
32156
32336
  opened.value = false;
@@ -32211,7 +32391,11 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
32211
32391
  inputValue.value = inputSuggestion.override ? inputSuggestion.item.suggestion : inputValue.value;
32212
32392
  }
32213
32393
  if (shouldSearch) {
32214
- handleSearch();
32394
+ if (props.options.disableNavigationToSearchResults) {
32395
+ fillInputWithSuggestion();
32396
+ } else {
32397
+ handleSearch();
32398
+ }
32215
32399
  }
32216
32400
  };
32217
32401
  const handleNavigateDocument = ({ link }) => {
@@ -32377,7 +32561,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
32377
32561
  };
32378
32562
  }
32379
32563
  });
32380
- const createPublicQuery = (queryParams, sortOptions, defaultPageSize) => {
32564
+ const createPublicQuery = (queryParams, sortOptions, defaultPageSize, selectFields) => {
32381
32565
  var _a25;
32382
32566
  const publicQuery = {};
32383
32567
  for (const param in queryParams) {
@@ -32411,6 +32595,9 @@ const createPublicQuery = (queryParams, sortOptions, defaultPageSize) => {
32411
32595
  }
32412
32596
  publicQuery.sort = publicQuery.sort || getDefaultSort(sortOptions);
32413
32597
  publicQuery.filters = queryParams.filters;
32598
+ if (selectFields) {
32599
+ publicQuery.selectFields = selectFields;
32600
+ }
32414
32601
  return publicQuery;
32415
32602
  };
32416
32603
  const getDefaultSort = (sortOptions) => {
@@ -34142,7 +34329,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
34142
34329
  }
34143
34330
  );
34144
34331
  const facetMin = computed(() => Math.floor(facetValue.value.min * currencyMultiplier.value));
34145
- const facetMax = computed(() => Math.ceil(facetValue.value.max * currencyMultiplier.value));
34332
+ const facetMax = computed(() => Number((facetValue.value.max * currencyMultiplier.value).toFixed(2)));
34146
34333
  const currentGte = computed(
34147
34334
  () => getAdjustedNumber(currentFilters.value.gte, currencyMultiplier.value)
34148
34335
  );
@@ -35612,7 +35799,7 @@ const _hoisted_3$n = {
35612
35799
  class: "lupa-select-label",
35613
35800
  for: "lupa-page-size-select-dropdown"
35614
35801
  };
35615
- const _hoisted_4$g = ["aria-label"];
35802
+ const _hoisted_4$g = ["value", "aria-label"];
35616
35803
  const _hoisted_5$b = ["value"];
35617
35804
  const _sfc_main$K = /* @__PURE__ */ defineComponent({
35618
35805
  __name: "SearchResultsPageSize",
@@ -35625,6 +35812,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
35625
35812
  const paramsStore = useParamsStore();
35626
35813
  const optionsStore = useOptionsStore();
35627
35814
  const { ariaLabels } = storeToRefs(optionsStore);
35815
+ const { limit } = storeToRefs(paramsStore);
35628
35816
  const select = ref(null);
35629
35817
  const prefixLabel = computed(() => {
35630
35818
  var _a25, _b25;
@@ -35648,6 +35836,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
35648
35836
  createBaseVNode("div", _hoisted_2$v, [
35649
35837
  createBaseVNode("label", _hoisted_3$n, toDisplayString(label.value), 1),
35650
35838
  createBaseVNode("select", {
35839
+ value: unref(limit),
35651
35840
  id: "lupa-page-size-select-dropdown",
35652
35841
  class: "lupa-select-dropdown",
35653
35842
  "aria-label": (_c = (_b25 = (_a25 = unref(ariaLabels)) == null ? void 0 : _a25.pageSizeSelect) != null ? _b25 : label.value) != null ? _c : "Select page size",
@@ -35706,6 +35895,7 @@ const useSorting = () => {
35706
35895
  previousKey.value = selectedKey.value;
35707
35896
  };
35708
35897
  watch(sort, () => setSortValue());
35898
+ watch(sortOptions, () => setSortValue());
35709
35899
  const handleSelect = () => {
35710
35900
  var _a25, _b25, _c;
35711
35901
  const value = (_a25 = sortItems.value.find((x) => x.key === selectedKey.value)) == null ? void 0 : _a25.key;
@@ -35721,12 +35911,15 @@ const useSorting = () => {
35721
35911
  previousKey.value = selectedKey.value;
35722
35912
  };
35723
35913
  return {
35914
+ sort,
35724
35915
  sotyByTitleLabel,
35725
35916
  sortItems,
35726
35917
  selectedKey,
35918
+ previousKey,
35727
35919
  ariaLabels,
35728
35920
  sortOptions,
35729
35921
  sortStyle,
35922
+ defaultSortValue,
35730
35923
  handleSelect,
35731
35924
  setSortValue
35732
35925
  };
@@ -37279,7 +37472,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
37279
37472
  } : {};
37280
37473
  });
37281
37474
  const searchForRelatedQuery = () => __async2(null, null, function* () {
37282
- var _a25, _b25, _c, _d, _e, _f, _g, _h;
37475
+ var _a25, _b25, _c, _d, _e, _f, _g, _h, _i;
37283
37476
  if (!props.query) {
37284
37477
  return;
37285
37478
  }
@@ -37288,6 +37481,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
37288
37481
  limit: 3,
37289
37482
  filters: relatedQueryFilters.value,
37290
37483
  trackTerm: false,
37484
+ selectFields: (_a25 = searchResultOptions.value) == null ? void 0 : _a25.selectFields,
37291
37485
  modifiers: {
37292
37486
  facets: false,
37293
37487
  refiners: false
@@ -37298,18 +37492,18 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
37298
37492
  const result2 = yield LupaSearchSdk.query(
37299
37493
  queryKey.value,
37300
37494
  lupaQuery,
37301
- (_a25 = searchResultOptions.value) == null ? void 0 : _a25.options
37495
+ (_b25 = searchResultOptions.value) == null ? void 0 : _b25.options
37302
37496
  );
37303
37497
  if (result2.success) {
37304
37498
  relatedQueryResult.value = result2;
37305
37499
  }
37306
- const firstItem = (_c = (_b25 = relatedQueryResult.value) == null ? void 0 : _b25.items) == null ? void 0 : _c[0];
37307
- itemToDisplay.value = (_f = (_e = (_d = relatedQueryResult == null ? void 0 : relatedQueryResult.value) == null ? void 0 : _d.items) == null ? void 0 : _e.find(
37500
+ const firstItem = (_d = (_c = relatedQueryResult.value) == null ? void 0 : _c.items) == null ? void 0 : _d[0];
37501
+ itemToDisplay.value = (_g = (_f = (_e = relatedQueryResult == null ? void 0 : relatedQueryResult.value) == null ? void 0 : _e.items) == null ? void 0 : _f.find(
37308
37502
  (i) => !props.existingItemsFromOtherQueries[`${i.id}`]
37309
- )) != null ? _f : firstItem;
37503
+ )) != null ? _g : firstItem;
37310
37504
  emit2("loaded", itemToDisplay.value);
37311
37505
  } catch (error) {
37312
- (_h = (_g = searchResultOptions.value) == null ? void 0 : _g.options) == null ? void 0 : _h.onError(error);
37506
+ (_i = (_h = searchResultOptions.value) == null ? void 0 : _h.options) == null ? void 0 : _i.onError(error);
37313
37507
  } finally {
37314
37508
  loading.value = false;
37315
37509
  }
@@ -38440,7 +38634,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
38440
38634
  const publicQuery = createPublicQuery(
38441
38635
  parseParams(optionStore.getQueryParamName, searchParams),
38442
38636
  props.options.sort,
38443
- defaultSearchResultPageSize.value
38637
+ defaultSearchResultPageSize.value,
38638
+ props.options.selectFields
38444
38639
  );
38445
38640
  searchResultStore.setLoading(true);
38446
38641
  const finalPublicQuery = getPublicQuery(publicQuery, initialFilters.value, props.isProductList);
@@ -38915,8 +39110,8 @@ function getNumberInRange({ val, max, min }) {
38915
39110
  return Math.min(Math.max(val, isNaN(min) ? val : min), isNaN(max) ? val : max);
38916
39111
  }
38917
39112
  function getTransformValues(el) {
38918
- const { transform } = window.getComputedStyle(el);
38919
- return transform.split(/[(,)]/).slice(1, -1).map((v) => parseFloat(v));
39113
+ const { transform: transform2 } = window.getComputedStyle(el);
39114
+ return transform2.split(/[(,)]/).slice(1, -1).map((v) => parseFloat(v));
38920
39115
  }
38921
39116
  function getScaleMultipliers(transformElements) {
38922
39117
  let widthMultiplier = 1;
@@ -42032,9 +42227,9 @@ function requireLodash() {
42032
42227
  });
42033
42228
  return result2;
42034
42229
  }
42035
- function overArg(func, transform) {
42230
+ function overArg(func, transform2) {
42036
42231
  return function(arg) {
42037
- return func(transform(arg));
42232
+ return func(transform2(arg));
42038
42233
  };
42039
42234
  }
42040
42235
  function replaceHolders(array, placeholder) {
@@ -42141,7 +42336,7 @@ function requireLodash() {
42141
42336
  var dataViewCtorString = toSource(DataView2), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
42142
42337
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
42143
42338
  function lodash2(value) {
42144
- if (isObjectLike(value) && !isArray3(value) && !(value instanceof LazyWrapper)) {
42339
+ if (isObjectLike2(value) && !isArray3(value) && !(value instanceof LazyWrapper)) {
42145
42340
  if (value instanceof LodashWrapper) {
42146
42341
  return value;
42147
42342
  }
@@ -42822,19 +43017,19 @@ function requireLodash() {
42822
43017
  return func == null ? undefined$1 : apply2(func, object, args);
42823
43018
  }
42824
43019
  function baseIsArguments(value) {
42825
- return isObjectLike(value) && baseGetTag(value) == argsTag;
43020
+ return isObjectLike2(value) && baseGetTag(value) == argsTag;
42826
43021
  }
42827
43022
  function baseIsArrayBuffer(value) {
42828
- return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
43023
+ return isObjectLike2(value) && baseGetTag(value) == arrayBufferTag;
42829
43024
  }
42830
43025
  function baseIsDate(value) {
42831
- return isObjectLike(value) && baseGetTag(value) == dateTag;
43026
+ return isObjectLike2(value) && baseGetTag(value) == dateTag;
42832
43027
  }
42833
43028
  function baseIsEqual(value, other, bitmask, customizer, stack2) {
42834
43029
  if (value === other) {
42835
43030
  return true;
42836
43031
  }
42837
- if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
43032
+ if (value == null || other == null || !isObjectLike2(value) && !isObjectLike2(other)) {
42838
43033
  return value !== value && other !== other;
42839
43034
  }
42840
43035
  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack2);
@@ -42870,7 +43065,7 @@ function requireLodash() {
42870
43065
  return equalObjects(object, other, bitmask, customizer, equalFunc, stack2);
42871
43066
  }
42872
43067
  function baseIsMap(value) {
42873
- return isObjectLike(value) && getTag(value) == mapTag;
43068
+ return isObjectLike2(value) && getTag(value) == mapTag;
42874
43069
  }
42875
43070
  function baseIsMatch(object, source, matchData, customizer) {
42876
43071
  var index = matchData.length, length = index, noCustomizer = !customizer;
@@ -42911,13 +43106,13 @@ function requireLodash() {
42911
43106
  return pattern.test(toSource(value));
42912
43107
  }
42913
43108
  function baseIsRegExp(value) {
42914
- return isObjectLike(value) && baseGetTag(value) == regexpTag;
43109
+ return isObjectLike2(value) && baseGetTag(value) == regexpTag;
42915
43110
  }
42916
43111
  function baseIsSet(value) {
42917
- return isObjectLike(value) && getTag(value) == setTag;
43112
+ return isObjectLike2(value) && getTag(value) == setTag;
42918
43113
  }
42919
43114
  function baseIsTypedArray(value) {
42920
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
43115
+ return isObjectLike2(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
42921
43116
  }
42922
43117
  function baseIteratee(value) {
42923
43118
  if (typeof value == "function") {
@@ -44427,7 +44622,7 @@ function requireLodash() {
44427
44622
  function objectToString2(value) {
44428
44623
  return nativeObjectToString.call(value);
44429
44624
  }
44430
- function overRest(func, start, transform2) {
44625
+ function overRest(func, start, transform3) {
44431
44626
  start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0);
44432
44627
  return function() {
44433
44628
  var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
@@ -44439,7 +44634,7 @@ function requireLodash() {
44439
44634
  while (++index < start) {
44440
44635
  otherArgs[index] = args[index];
44441
44636
  }
44442
- otherArgs[start] = transform2(array);
44637
+ otherArgs[start] = transform3(array);
44443
44638
  return apply2(func, this, otherArgs);
44444
44639
  };
44445
44640
  }
@@ -45461,7 +45656,7 @@ function requireLodash() {
45461
45656
  var isArguments = baseIsArguments(/* @__PURE__ */ function() {
45462
45657
  return arguments;
45463
45658
  }()) ? baseIsArguments : function(value) {
45464
- return isObjectLike(value) && hasOwnProperty2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
45659
+ return isObjectLike2(value) && hasOwnProperty2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
45465
45660
  };
45466
45661
  var isArray3 = Array2.isArray;
45467
45662
  var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
@@ -45469,15 +45664,15 @@ function requireLodash() {
45469
45664
  return value != null && isLength(value.length) && !isFunction2(value);
45470
45665
  }
45471
45666
  function isArrayLikeObject(value) {
45472
- return isObjectLike(value) && isArrayLike(value);
45667
+ return isObjectLike2(value) && isArrayLike(value);
45473
45668
  }
45474
45669
  function isBoolean2(value) {
45475
- return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
45670
+ return value === true || value === false || isObjectLike2(value) && baseGetTag(value) == boolTag;
45476
45671
  }
45477
45672
  var isBuffer = nativeIsBuffer || stubFalse;
45478
45673
  var isDate2 = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
45479
45674
  function isElement(value) {
45480
- return isObjectLike(value) && value.nodeType === 1 && !isPlainObject4(value);
45675
+ return isObjectLike2(value) && value.nodeType === 1 && !isPlainObject4(value);
45481
45676
  }
45482
45677
  function isEmpty(value) {
45483
45678
  if (value == null) {
@@ -45509,7 +45704,7 @@ function requireLodash() {
45509
45704
  return result3 === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result3;
45510
45705
  }
45511
45706
  function isError2(value) {
45512
- if (!isObjectLike(value)) {
45707
+ if (!isObjectLike2(value)) {
45513
45708
  return false;
45514
45709
  }
45515
45710
  var tag = baseGetTag(value);
@@ -45535,7 +45730,7 @@ function requireLodash() {
45535
45730
  var type = typeof value;
45536
45731
  return value != null && (type == "object" || type == "function");
45537
45732
  }
45538
- function isObjectLike(value) {
45733
+ function isObjectLike2(value) {
45539
45734
  return value != null && typeof value == "object";
45540
45735
  }
45541
45736
  var isMap2 = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
@@ -45562,10 +45757,10 @@ function requireLodash() {
45562
45757
  return value == null;
45563
45758
  }
45564
45759
  function isNumber2(value) {
45565
- return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
45760
+ return typeof value == "number" || isObjectLike2(value) && baseGetTag(value) == numberTag;
45566
45761
  }
45567
45762
  function isPlainObject4(value) {
45568
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
45763
+ if (!isObjectLike2(value) || baseGetTag(value) != objectTag) {
45569
45764
  return false;
45570
45765
  }
45571
45766
  var proto = getPrototype(value);
@@ -45581,20 +45776,20 @@ function requireLodash() {
45581
45776
  }
45582
45777
  var isSet2 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
45583
45778
  function isString2(value) {
45584
- return typeof value == "string" || !isArray3(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
45779
+ return typeof value == "string" || !isArray3(value) && isObjectLike2(value) && baseGetTag(value) == stringTag;
45585
45780
  }
45586
45781
  function isSymbol2(value) {
45587
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
45782
+ return typeof value == "symbol" || isObjectLike2(value) && baseGetTag(value) == symbolTag;
45588
45783
  }
45589
45784
  var isTypedArray2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
45590
45785
  function isUndefined2(value) {
45591
45786
  return value === undefined$1;
45592
45787
  }
45593
45788
  function isWeakMap(value) {
45594
- return isObjectLike(value) && getTag(value) == weakMapTag;
45789
+ return isObjectLike2(value) && getTag(value) == weakMapTag;
45595
45790
  }
45596
45791
  function isWeakSet(value) {
45597
- return isObjectLike(value) && baseGetTag(value) == weakSetTag;
45792
+ return isObjectLike2(value) && baseGetTag(value) == weakSetTag;
45598
45793
  }
45599
45794
  var lt = createRelationalOperation(baseLt);
45600
45795
  var lte = createRelationalOperation(function(value, other) {
@@ -45854,7 +46049,7 @@ function requireLodash() {
45854
46049
  }
45855
46050
  var toPairs = createToPairs(keys);
45856
46051
  var toPairsIn = createToPairs(keysIn);
45857
- function transform(object, iteratee2, accumulator) {
46052
+ function transform2(object, iteratee2, accumulator) {
45858
46053
  var isArr = isArray3(object), isArrLike = isArr || isBuffer(object) || isTypedArray2(object);
45859
46054
  iteratee2 = getIteratee(iteratee2, 4);
45860
46055
  if (accumulator == null) {
@@ -46357,7 +46552,7 @@ function requireLodash() {
46357
46552
  }
46358
46553
  return result3;
46359
46554
  }
46360
- function toPath(value) {
46555
+ function toPath2(value) {
46361
46556
  if (isArray3(value)) {
46362
46557
  return arrayMap(value, toKey);
46363
46558
  }
@@ -46528,9 +46723,9 @@ function requireLodash() {
46528
46723
  lodash2.toArray = toArray;
46529
46724
  lodash2.toPairs = toPairs;
46530
46725
  lodash2.toPairsIn = toPairsIn;
46531
- lodash2.toPath = toPath;
46726
+ lodash2.toPath = toPath2;
46532
46727
  lodash2.toPlainObject = toPlainObject;
46533
- lodash2.transform = transform;
46728
+ lodash2.transform = transform2;
46534
46729
  lodash2.unary = unary;
46535
46730
  lodash2.union = union;
46536
46731
  lodash2.unionBy = unionBy;
@@ -46629,7 +46824,7 @@ function requireLodash() {
46629
46824
  lodash2.isNull = isNull2;
46630
46825
  lodash2.isNumber = isNumber2;
46631
46826
  lodash2.isObject = isObject2;
46632
- lodash2.isObjectLike = isObjectLike;
46827
+ lodash2.isObjectLike = isObjectLike2;
46633
46828
  lodash2.isPlainObject = isPlainObject4;
46634
46829
  lodash2.isRegExp = isRegExp2;
46635
46830
  lodash2.isSafeInteger = isSafeInteger;