@getlupa/client 1.21.1 → 1.22.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.
@@ -18643,13 +18643,13 @@ const unfoldRangeFilter = (key, filter, price = {}) => {
18643
18643
  }
18644
18644
  ];
18645
18645
  }
18646
- return [{ key, value: `${gt} - ${lt}`, type: "range" }];
18646
+ return [{ key, value: `${gt != null ? gt : "*"} - ${lt != null ? lt : "*"}`, type: "range" }];
18647
18647
  };
18648
18648
  const unfoldFilter = (key, filter, price = {}) => {
18649
18649
  if (Array.isArray(filter)) {
18650
18650
  return unfoldTermFilter(key, filter);
18651
18651
  }
18652
- if (filter.gte) {
18652
+ if (filter.gte || filter.lte || filter.gt || filter.lt) {
18653
18653
  return unfoldRangeFilter(key, filter, price);
18654
18654
  }
18655
18655
  if (filter.terms) {
@@ -18702,8 +18702,9 @@ const recursiveFilterItem = (item, query = "") => {
18702
18702
  }) : void 0;
18703
18703
  };
18704
18704
  const rangeFilterToString = (rangeFilter, separator) => {
18705
+ var _a25, _b25, _c;
18705
18706
  separator = separator || FACET_TERM_RANGE_SEPARATOR;
18706
- return rangeFilter && Object.keys(rangeFilter).length ? rangeFilter.gte + separator + (rangeFilter.lte || rangeFilter.lt) : "";
18707
+ return rangeFilter && Object.keys(rangeFilter).length ? ((_a25 = rangeFilter.gte) != null ? _a25 : "") + separator + (((_b25 = rangeFilter.lte) != null ? _b25 : "") || ((_c = rangeFilter.lt) != null ? _c : "")) : "";
18707
18708
  };
18708
18709
  const pick = (obj, keys) => {
18709
18710
  const ret = /* @__PURE__ */ Object.create({});
@@ -18762,14 +18763,15 @@ const parseFacetKey = (key, searchParams) => {
18762
18763
  return (_b25 = (_a25 = searchParams.getAll(key)) == null ? void 0 : _a25.map((v) => decodeURIComponent(v))) != null ? _b25 : [];
18763
18764
  }
18764
18765
  if (key.startsWith(FACET_PARAMS_TYPE.RANGE)) {
18766
+ const isPrice = key == null ? void 0 : key.includes(CURRENCY_KEY_INDICATOR);
18765
18767
  const range2 = searchParams.get(key);
18766
18768
  if (!range2) {
18767
18769
  return {};
18768
18770
  }
18769
18771
  const [min, max] = range2.split(FACET_RANGE_SEPARATOR);
18770
18772
  return {
18771
- gte: min,
18772
- lte: max
18773
+ gte: min || void 0,
18774
+ [isPrice ? "lte" : "lt"]: max || void 0
18773
18775
  };
18774
18776
  }
18775
18777
  if (key.startsWith(FACET_PARAMS_TYPE.HIERARCHY)) {
@@ -18969,16 +18971,27 @@ const toggleHierarchyFilter = (appendParams, facetAction, getQueryParamName, cur
18969
18971
  paramsToRemove: [getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.PAGE) : QUERY_PARAMS$1.PAGE]
18970
18972
  });
18971
18973
  };
18972
- const toggleRangeFilter = (appendParams, facetAction, getQueryParamName, currentFilters) => {
18974
+ const toggleRangeFilter = (appendParams, removeParameters, facetAction, getQueryParamName, currentFilters) => {
18975
+ var _a25, _b25;
18973
18976
  const currentFilter = rangeFilterToString(
18974
18977
  currentFilters == null ? void 0 : currentFilters[facetAction.key],
18975
18978
  FACET_RANGE_SEPARATOR
18976
18979
  );
18977
- let facetValue = facetAction.value.join(FACET_RANGE_SEPARATOR);
18980
+ let facetValue = (_b25 = (_a25 = facetAction == null ? void 0 : facetAction.value) == null ? void 0 : _a25.join(FACET_RANGE_SEPARATOR)) != null ? _b25 : "";
18978
18981
  facetValue = currentFilter === facetValue ? "" : facetValue;
18982
+ const paramsToRemove = getQueryParamName ? [getQueryParamName(QUERY_PARAMS$1.PAGE)] : [QUERY_PARAMS$1.PAGE];
18983
+ if (!facetValue) {
18984
+ removeParameters({
18985
+ paramsToRemove: [
18986
+ getFacetParam(facetAction.key, "", FACET_PARAMS_TYPE.RANGE).name,
18987
+ ...paramsToRemove
18988
+ ]
18989
+ });
18990
+ return;
18991
+ }
18979
18992
  appendParams({
18980
18993
  params: [getFacetParam(facetAction.key, facetValue, FACET_PARAMS_TYPE.RANGE)],
18981
- paramsToRemove: [getQueryParamName ? getQueryParamName(QUERY_PARAMS$1.PAGE) : QUERY_PARAMS$1.PAGE],
18994
+ paramsToRemove,
18982
18995
  encode: false
18983
18996
  });
18984
18997
  };
@@ -19771,7 +19784,7 @@ const _hoisted_1$1l = {
19771
19784
  };
19772
19785
  const _hoisted_2$W = { class: "lupa-dialog-content" };
19773
19786
  const _hoisted_3$E = { class: "lupa-listening-text" };
19774
- const _hoisted_4$u = { class: "lupa-mic-button-wrapper" };
19787
+ const _hoisted_4$v = { class: "lupa-mic-button-wrapper" };
19775
19788
  const _hoisted_5$l = ["aria-label"];
19776
19789
  const _sfc_main$1z = /* @__PURE__ */ defineComponent({
19777
19790
  __name: "VoiceSearchDialog",
@@ -19885,7 +19898,7 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
19885
19898
  }),
19886
19899
  createBaseVNode("div", _hoisted_2$W, [
19887
19900
  createBaseVNode("p", _hoisted_3$E, toDisplayString(description.value), 1),
19888
- createBaseVNode("div", _hoisted_4$u, [
19901
+ createBaseVNode("div", _hoisted_4$v, [
19889
19902
  createBaseVNode("button", {
19890
19903
  class: normalizeClass(["lupa-mic-button", { recording: unref(isRecording) }]),
19891
19904
  onClick: handleRecordingButtonClick,
@@ -19910,7 +19923,7 @@ const _sfc_main$1z = /* @__PURE__ */ defineComponent({
19910
19923
  const _hoisted_1$1k = { id: "lupa-search-box-input-container" };
19911
19924
  const _hoisted_2$V = { class: "lupa-input-clear" };
19912
19925
  const _hoisted_3$D = { id: "lupa-search-box-input" };
19913
- const _hoisted_4$t = ["value"];
19926
+ const _hoisted_4$u = ["value"];
19914
19927
  const _hoisted_5$k = ["aria-label", "placeholder"];
19915
19928
  const _hoisted_6$8 = {
19916
19929
  key: 0,
@@ -20063,7 +20076,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
20063
20076
  "aria-hidden": "true",
20064
20077
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
20065
20078
  disabled: ""
20066
- }, null, 8, _hoisted_4$t),
20079
+ }, null, 8, _hoisted_4$u),
20067
20080
  withDirectives(createBaseVNode("input", mergeProps({
20068
20081
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
20069
20082
  }, inputAttributes.value, {
@@ -20313,7 +20326,7 @@ const _hoisted_3$C = {
20313
20326
  class: "lupa-suggestion-facet",
20314
20327
  "data-cy": "lupa-suggestion-facet"
20315
20328
  };
20316
- const _hoisted_4$s = {
20329
+ const _hoisted_4$t = {
20317
20330
  class: "lupa-suggestion-facet-label",
20318
20331
  "data-cy": "lupa-suggestion-facet-label"
20319
20332
  };
@@ -20360,7 +20373,7 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
20360
20373
  innerHTML: _ctx.suggestion.displayHighlight
20361
20374
  }, null, 8, _hoisted_1$1g)) : (openBlock(), createElementBlock("div", _hoisted_2$T, toDisplayString(_ctx.suggestion.display), 1)),
20362
20375
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$C, [
20363
- createBaseVNode("span", _hoisted_4$s, toDisplayString(facetLabel.value), 1),
20376
+ createBaseVNode("span", _hoisted_4$t, toDisplayString(facetLabel.value), 1),
20364
20377
  createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
20365
20378
  ])) : createCommentVNode("", true)
20366
20379
  ]);
@@ -30100,7 +30113,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
30100
30113
  const _hoisted_1$1a = ["innerHTML"];
30101
30114
  const _hoisted_2$P = { key: 0 };
30102
30115
  const _hoisted_3$B = { key: 1 };
30103
- const _hoisted_4$r = { class: "lupa-search-box-custom-label" };
30116
+ const _hoisted_4$s = { class: "lupa-search-box-custom-label" };
30104
30117
  const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
30105
30118
  const _sfc_main$1k = /* @__PURE__ */ defineComponent({
30106
30119
  __name: "SearchBoxProductCustom",
@@ -30133,7 +30146,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
30133
30146
  class: [className.value, "lupa-search-box-product-custom"]
30134
30147
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
30135
30148
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$P, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$B, [
30136
- createBaseVNode("div", _hoisted_4$r, toDisplayString(label.value), 1),
30149
+ createBaseVNode("div", _hoisted_4$s, toDisplayString(label.value), 1),
30137
30150
  createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
30138
30151
  ]))
30139
30152
  ], 16));
@@ -30484,7 +30497,7 @@ const useSearchResultStore = /* @__PURE__ */ defineStore("searchResult", () => {
30484
30497
  const _hoisted_1$18 = { class: "lupa-search-box-add-to-cart-wrapper" };
30485
30498
  const _hoisted_2$O = { class: "lupa-search-box-product-addtocart" };
30486
30499
  const _hoisted_3$A = ["disabled"];
30487
- const _hoisted_4$q = ["href"];
30500
+ const _hoisted_4$r = ["href"];
30488
30501
  const _hoisted_5$h = ["disabled"];
30489
30502
  const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30490
30503
  __name: "SearchBoxProductAddToCart",
@@ -30506,6 +30519,13 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30506
30519
  const { addToCartAmount } = storeToRefs(searchResultStore);
30507
30520
  const emit2 = __emit;
30508
30521
  const loading = ref(false);
30522
+ const addToCartButtonClass = computed(() => {
30523
+ return {
30524
+ [props.options.className]: Boolean(props.options.className),
30525
+ "lupa-add-to-cart-loading": loading.value,
30526
+ "lupa-add-to-cart": !loading.value
30527
+ };
30528
+ });
30509
30529
  const label = computed(() => {
30510
30530
  return props.options.labels.addToCart;
30511
30531
  });
@@ -30529,15 +30549,15 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
30529
30549
  createBaseVNode("div", _hoisted_2$O, [
30530
30550
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
30531
30551
  key: 0,
30532
- class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
30552
+ class: addToCartButtonClass.value,
30533
30553
  "data-cy": "lupa-add-to-cart",
30534
30554
  disabled: !inStockValue.value || loading.value
30535
30555
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
30536
- createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$q)
30556
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$r)
30537
30557
  ], 16, _hoisted_3$A)) : (openBlock(), createElementBlock("button", mergeProps({
30538
30558
  key: 1,
30539
30559
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
30540
- class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
30560
+ class: addToCartButtonClass.value,
30541
30561
  "data-cy": "lupa-add-to-cart",
30542
30562
  type: "button",
30543
30563
  disabled: !inStockValue.value || loading.value
@@ -30653,7 +30673,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
30653
30673
  const _hoisted_1$16 = { class: "lupa-badge-title" };
30654
30674
  const _hoisted_2$N = ["src"];
30655
30675
  const _hoisted_3$z = { key: 1 };
30656
- const _hoisted_4$p = {
30676
+ const _hoisted_4$q = {
30657
30677
  key: 0,
30658
30678
  class: "lupa-badge-full-text"
30659
30679
  };
@@ -30697,7 +30717,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
30697
30717
  }, null, 8, _hoisted_2$N)) : createCommentVNode("", true),
30698
30718
  hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$z, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
30699
30719
  ]),
30700
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30720
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
30701
30721
  ], 6);
30702
30722
  };
30703
30723
  }
@@ -31438,7 +31458,16 @@ const extractFromHtmlElementAttribute = (options) => {
31438
31458
  if (attr === "value" && (element == null ? void 0 : element.value)) {
31439
31459
  return element.value;
31440
31460
  }
31441
- return element.getAttribute(attr) || options.default;
31461
+ const attributeValue = element.getAttribute(attr);
31462
+ if (attributeValue === null || attributeValue === void 0) {
31463
+ return options.default;
31464
+ }
31465
+ if (options.regex) {
31466
+ const regex = new RegExp(options.regex);
31467
+ const match = attributeValue.match(regex);
31468
+ return match ? match[1] : options.default;
31469
+ }
31470
+ return attributeValue;
31442
31471
  };
31443
31472
  const getValueFromPath = (obj, path) => {
31444
31473
  return path.split(".").reduce((value, key) => value && value[key] || null, obj);
@@ -31656,7 +31685,7 @@ const _hoisted_3$x = {
31656
31685
  key: 0,
31657
31686
  class: "lupa-panel-title lupa-panel-title-top-results"
31658
31687
  };
31659
- const _hoisted_4$o = {
31688
+ const _hoisted_4$p = {
31660
31689
  key: 1,
31661
31690
  class: "lupa-panel-title"
31662
31691
  };
@@ -31852,7 +31881,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
31852
31881
  "data-cy": "lupa-panel-" + panel.type + "-index"
31853
31882
  }, [
31854
31883
  ((_a25 = panel.labels) == null ? void 0 : _a25.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$x, toDisplayString((_b25 = panel.labels) == null ? void 0 : _b25.topResultsTitle), 1)) : createCommentVNode("", true),
31855
- ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
31884
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$p, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
31856
31885
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
31857
31886
  key: 2,
31858
31887
  panel,
@@ -32350,7 +32379,7 @@ const _hoisted_3$w = {
32350
32379
  key: 1,
32351
32380
  "data-cy": "did-you-mean-label"
32352
32381
  };
32353
- const _hoisted_4$n = { key: 1 };
32382
+ const _hoisted_4$o = { key: 1 };
32354
32383
  const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32355
32384
  __name: "SearchResultsDidYouMean",
32356
32385
  props: {
@@ -32401,7 +32430,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
32401
32430
  class: "lupa-did-you-mean lupa-highlighted-search-text",
32402
32431
  "data-cy": "did-you-mean-value",
32403
32432
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
32404
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
32433
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
32405
32434
  ]);
32406
32435
  }), 128))
32407
32436
  ])) : createCommentVNode("", true)
@@ -32451,7 +32480,7 @@ const _hoisted_3$v = {
32451
32480
  key: 1,
32452
32481
  class: "lupa-results-total-count"
32453
32482
  };
32454
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
32483
+ const _hoisted_4$n = { class: "lupa-results-total-count-number" };
32455
32484
  const _hoisted_5$f = ["innerHTML"];
32456
32485
  const _sfc_main$10 = /* @__PURE__ */ defineComponent({
32457
32486
  __name: "SearchResultsTitle",
@@ -32501,7 +32530,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
32501
32530
  queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$G, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
32502
32531
  showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
32503
32532
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
32504
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
32533
+ createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
32505
32534
  _cache[0] || (_cache[0] = createTextVNode(")"))
32506
32535
  ])) : createCommentVNode("", true)
32507
32536
  ])) : createCommentVNode("", true),
@@ -32583,7 +32612,7 @@ const _hoisted_3$u = {
32583
32612
  key: 0,
32584
32613
  class: "filter-values"
32585
32614
  };
32586
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
32615
+ const _hoisted_4$m = { class: "lupa-current-filter-list" };
32587
32616
  const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32588
32617
  __name: "CurrentFilters",
32589
32618
  props: {
@@ -32675,7 +32704,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
32675
32704
  }, null, 2)) : createCommentVNode("", true)
32676
32705
  ]),
32677
32706
  !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
32678
- createBaseVNode("div", _hoisted_4$l, [
32707
+ createBaseVNode("div", _hoisted_4$m, [
32679
32708
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter) => {
32680
32709
  return openBlock(), createBlock(_sfc_main$$, {
32681
32710
  key: filter.key + "_" + filter.value,
@@ -32744,7 +32773,7 @@ const _hoisted_1$R = {
32744
32773
  };
32745
32774
  const _hoisted_2$D = { class: "lupa-category-back" };
32746
32775
  const _hoisted_3$t = ["href"];
32747
- const _hoisted_4$k = ["href"];
32776
+ const _hoisted_4$l = ["href"];
32748
32777
  const _hoisted_5$e = { class: "lupa-child-category-list" };
32749
32778
  const _sfc_main$Y = /* @__PURE__ */ defineComponent({
32750
32779
  __name: "CategoryFilter",
@@ -32851,7 +32880,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
32851
32880
  href: parentUrlLink.value,
32852
32881
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
32853
32882
  onClick: handleNavigationParent
32854
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
32883
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
32855
32884
  ], 2),
32856
32885
  createBaseVNode("div", _hoisted_5$e, [
32857
32886
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
@@ -32872,7 +32901,7 @@ const _hoisted_1$Q = {
32872
32901
  };
32873
32902
  const _hoisted_2$C = ["placeholder"];
32874
32903
  const _hoisted_3$s = { class: "lupa-terms-list" };
32875
- const _hoisted_4$j = ["onClick"];
32904
+ const _hoisted_4$k = ["onClick"];
32876
32905
  const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
32877
32906
  const _hoisted_6$7 = { class: "lupa-term-label" };
32878
32907
  const _hoisted_7$4 = {
@@ -32943,7 +32972,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
32943
32972
  });
32944
32973
  const handleFacetClick = (item) => {
32945
32974
  var _a25;
32946
- const value = isRange.value ? item.title.split(FACET_TERM_RANGE_SEPARATOR) : (_a25 = item.title) == null ? void 0 : _a25.toString();
32975
+ const value = isRange.value ? [item.from, item.to] : (_a25 = item.title) == null ? void 0 : _a25.toString();
32947
32976
  emit2("select", {
32948
32977
  key: facet.value.key,
32949
32978
  value,
@@ -32957,7 +32986,11 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
32957
32986
  var _a25, _b25;
32958
32987
  let selectedItems = (_a25 = currentFiltersValue.value) != null ? _a25 : [];
32959
32988
  selectedItems = isRange.value && selectedItems ? [rangeFilterToString(selectedItems)] : selectedItems;
32960
- return selectedItems == null ? void 0 : selectedItems.includes((_b25 = item.title) == null ? void 0 : _b25.toString());
32989
+ if (isRange.value) {
32990
+ return selectedItems == null ? void 0 : selectedItems.includes(rangeFilterToString({ gte: item.from, lt: item.to }));
32991
+ } else {
32992
+ return selectedItems == null ? void 0 : selectedItems.includes((_b25 = item.title) == null ? void 0 : _b25.toString());
32993
+ }
32961
32994
  };
32962
32995
  const getItemLabel = (item) => {
32963
32996
  var _a25;
@@ -33000,7 +33033,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
33000
33033
  createBaseVNode("span", _hoisted_6$7, toDisplayString(getItemLabel(item)), 1),
33001
33034
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$4, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
33002
33035
  ], 2)
33003
- ], 10, _hoisted_4$j);
33036
+ ], 10, _hoisted_4$k);
33004
33037
  }), 128))
33005
33038
  ]),
33006
33039
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -33917,7 +33950,7 @@ const _hoisted_3$r = {
33917
33950
  key: 1,
33918
33951
  class: "lupa-stats-facet-summary-input"
33919
33952
  };
33920
- const _hoisted_4$i = { class: "lupa-stats-from" };
33953
+ const _hoisted_4$j = { class: "lupa-stats-from" };
33921
33954
  const _hoisted_5$c = {
33922
33955
  key: 0,
33923
33956
  class: "lupa-stats-range-label"
@@ -34155,7 +34188,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
34155
34188
  return (_ctx, _cache) => {
34156
34189
  return openBlock(), createElementBlock("div", _hoisted_1$P, [
34157
34190
  !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$B, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$r, [
34158
- createBaseVNode("div", _hoisted_4$i, [
34191
+ createBaseVNode("div", _hoisted_4$j, [
34159
34192
  rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
34160
34193
  withDirectives(createBaseVNode("input", {
34161
34194
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
@@ -34224,7 +34257,7 @@ const _hoisted_3$q = {
34224
34257
  key: 0,
34225
34258
  class: "lupa-term-count"
34226
34259
  };
34227
- const _hoisted_4$h = {
34260
+ const _hoisted_4$i = {
34228
34261
  key: 0,
34229
34262
  class: "lupa-facet-level"
34230
34263
  };
@@ -34294,7 +34327,7 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
34294
34327
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$q, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
34295
34328
  ], 2)
34296
34329
  ]),
34297
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
34330
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, [
34298
34331
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
34299
34332
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
34300
34333
  key: itemChild.title,
@@ -34431,7 +34464,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
34431
34464
  },
34432
34465
  emits: ["select", "clear"],
34433
34466
  setup(__props, { emit: __emit }) {
34434
- var _a25, _b25;
34467
+ var _a25, _b25, _c;
34435
34468
  const props = __props;
34436
34469
  const facet = computed(() => {
34437
34470
  var _a26;
@@ -34443,10 +34476,19 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
34443
34476
  });
34444
34477
  const searchResultStore = useSearchResultStore();
34445
34478
  const optionsStore = useOptionsStore();
34479
+ const screenStore = useScreenStore();
34446
34480
  const { currentFilterKeys } = storeToRefs(searchResultStore);
34447
34481
  const { searchResultOptions } = storeToRefs(optionsStore);
34482
+ const { isMobileWidth } = storeToRefs(screenStore);
34448
34483
  const emit2 = __emit;
34449
- const isOpen = ref((_b25 = (_a25 = props.options.expand) == null ? void 0 : _a25.includes(props.facet.key)) != null ? _b25 : false);
34484
+ const allExpanded = computed(() => {
34485
+ var _a26, _b26, _c2, _d, _e, _f;
34486
+ if (isMobileWidth.value) {
34487
+ return (_c2 = (_b26 = (_a26 = props.options) == null ? void 0 : _a26.expandAll) == null ? void 0 : _b26.mobile) != null ? _c2 : false;
34488
+ }
34489
+ return (_f = (_e = (_d = props.options) == null ? void 0 : _d.expandAll) == null ? void 0 : _e.desktop) != null ? _f : false;
34490
+ });
34491
+ const isOpen = ref((_c = ((_b25 = (_a25 = props.options) == null ? void 0 : _a25.expand) == null ? void 0 : _b25.includes(props.facet.key)) || allExpanded.value) != null ? _c : false);
34450
34492
  const facetPanel = ref(null);
34451
34493
  const facetType = computed(() => {
34452
34494
  switch (facet.value.type) {
@@ -34709,6 +34751,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
34709
34751
  case "range":
34710
34752
  toggleRangeFilter(
34711
34753
  paramStore.appendParams,
34754
+ paramStore.removeParameters,
34712
34755
  facetAction,
34713
34756
  optionsStore.getQueryParamName,
34714
34757
  filters.value
@@ -34832,7 +34875,7 @@ const _hoisted_1$I = {
34832
34875
  };
34833
34876
  const _hoisted_2$w = { class: "lupa-mobile-sidebar-content" };
34834
34877
  const _hoisted_3$o = { class: "lupa-sidebar-top" };
34835
- const _hoisted_4$g = { class: "lupa-sidebar-title" };
34878
+ const _hoisted_4$h = { class: "lupa-sidebar-title" };
34836
34879
  const _hoisted_5$b = {
34837
34880
  key: 0,
34838
34881
  class: "lupa-sidebar-filter-count"
@@ -34877,7 +34920,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
34877
34920
  }),
34878
34921
  createBaseVNode("div", _hoisted_2$w, [
34879
34922
  createBaseVNode("div", _hoisted_3$o, [
34880
- createBaseVNode("div", _hoisted_4$g, [
34923
+ createBaseVNode("div", _hoisted_4$h, [
34881
34924
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
34882
34925
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
34883
34926
  ]),
@@ -34904,7 +34947,7 @@ const _hoisted_3$n = {
34904
34947
  key: 1,
34905
34948
  class: "lupa-search-results-breadcrumb-text"
34906
34949
  };
34907
- const _hoisted_4$f = { key: 2 };
34950
+ const _hoisted_4$g = { key: 2 };
34908
34951
  const _sfc_main$N = /* @__PURE__ */ defineComponent({
34909
34952
  __name: "SearchResultsBreadcrumbs",
34910
34953
  props: {
@@ -34946,7 +34989,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
34946
34989
  return handleNavigation(e2, (_a26 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a26 : "");
34947
34990
  }
34948
34991
  }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$v)) : (openBlock(), createElementBlock("span", _hoisted_3$n, toDisplayString(getLabel(breadcrumb.label)), 1)),
34949
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
34992
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, toDisplayString((_a25 = breadcrumb.separator) != null ? _a25 : "/"), 1)) : createCommentVNode("", true)
34950
34993
  ]);
34951
34994
  }), 128))
34952
34995
  ]);
@@ -35109,7 +35152,7 @@ const _hoisted_2$u = {
35109
35152
  class: "lupa-page-number-separator"
35110
35153
  };
35111
35154
  const _hoisted_3$m = ["onClick"];
35112
- const _hoisted_4$e = {
35155
+ const _hoisted_4$f = {
35113
35156
  key: 0,
35114
35157
  class: "lupa-page-number-separator"
35115
35158
  };
@@ -35215,7 +35258,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
35215
35258
  }, toDisplayString(page), 11, _hoisted_3$m);
35216
35259
  }), 128)),
35217
35260
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
35218
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
35261
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
35219
35262
  createBaseVNode("div", {
35220
35263
  class: "lupa-page-number lupa-page-number-last",
35221
35264
  onClick: _cache[2] || (_cache[2] = () => {
@@ -35243,7 +35286,7 @@ const _hoisted_3$l = {
35243
35286
  class: "lupa-select-label",
35244
35287
  for: "lupa-page-size-select-dropdown"
35245
35288
  };
35246
- const _hoisted_4$d = ["aria-label"];
35289
+ const _hoisted_4$e = ["aria-label"];
35247
35290
  const _hoisted_5$a = ["value"];
35248
35291
  const _sfc_main$H = /* @__PURE__ */ defineComponent({
35249
35292
  __name: "SearchResultsPageSize",
@@ -35293,7 +35336,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
35293
35336
  value: option
35294
35337
  }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
35295
35338
  }), 128))
35296
- ], 40, _hoisted_4$d)
35339
+ ], 40, _hoisted_4$e)
35297
35340
  ])
35298
35341
  ]);
35299
35342
  };
@@ -35308,7 +35351,7 @@ const _hoisted_3$k = {
35308
35351
  class: "lupa-select-label",
35309
35352
  for: "lupa-sort-select-dropdown"
35310
35353
  };
35311
- const _hoisted_4$c = ["aria-label"];
35354
+ const _hoisted_4$d = ["aria-label"];
35312
35355
  const _hoisted_5$9 = ["value"];
35313
35356
  const _sfc_main$G = /* @__PURE__ */ defineComponent({
35314
35357
  __name: "SearchResultsSort",
@@ -35379,7 +35422,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
35379
35422
  value: option.key
35380
35423
  }, toDisplayString(option.label), 9, _hoisted_5$9);
35381
35424
  }), 128))
35382
- ], 40, _hoisted_4$c), [
35425
+ ], 40, _hoisted_4$d), [
35383
35426
  [vModelSelect, selectedKey.value]
35384
35427
  ])
35385
35428
  ])
@@ -35393,7 +35436,7 @@ const _hoisted_2$r = {
35393
35436
  class: "lupa-toolbar-right-title"
35394
35437
  };
35395
35438
  const _hoisted_3$j = { key: 2 };
35396
- const _hoisted_4$b = { key: 4 };
35439
+ const _hoisted_4$c = { key: 4 };
35397
35440
  const _hoisted_5$8 = { key: 6 };
35398
35441
  const _hoisted_6$4 = { class: "lupa-toolbar-right" };
35399
35442
  const _hoisted_7$2 = {
@@ -35521,7 +35564,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
35521
35564
  label: searchSummaryLabel.value,
35522
35565
  clearable: unref(hasAnyFilter) && showFilterClear.value,
35523
35566
  onClear: handleClearAll
35524
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$b)),
35567
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
35525
35568
  displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$I, {
35526
35569
  key: 5,
35527
35570
  options: paginationOptions.value.pageSelect,
@@ -35574,7 +35617,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
35574
35617
  const _hoisted_1$z = ["title", "innerHTML"];
35575
35618
  const _hoisted_2$q = ["title"];
35576
35619
  const _hoisted_3$i = ["href", "innerHTML"];
35577
- const _hoisted_4$a = ["title"];
35620
+ const _hoisted_4$b = ["title"];
35578
35621
  const _hoisted_5$7 = {
35579
35622
  key: 0,
35580
35623
  class: "lupa-search-results-product-title-text"
@@ -35642,7 +35685,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
35642
35685
  class: "lupa-search-results-product-title-text lupa-title-link",
35643
35686
  onClick: handleNavigation
35644
35687
  }, toDisplayString(title.value), 9, _hoisted_6$3)) : createCommentVNode("", true)
35645
- ], 12, _hoisted_4$a));
35688
+ ], 12, _hoisted_4$b));
35646
35689
  };
35647
35690
  }
35648
35691
  });
@@ -35685,7 +35728,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
35685
35728
  const _hoisted_1$x = { id: "lupa-search-results-rating" };
35686
35729
  const _hoisted_2$p = { class: "lupa-ratings" };
35687
35730
  const _hoisted_3$h = { class: "lupa-ratings-base" };
35688
- const _hoisted_4$9 = ["innerHTML"];
35731
+ const _hoisted_4$a = ["innerHTML"];
35689
35732
  const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
35690
35733
  const _hoisted_6$2 = ["innerHTML"];
35691
35734
  const _hoisted_7$1 = ["href"];
@@ -35735,7 +35778,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
35735
35778
  key: index,
35736
35779
  innerHTML: star,
35737
35780
  class: "lupa-rating lupa-rating-not-highlighted"
35738
- }, null, 8, _hoisted_4$9);
35781
+ }, null, 8, _hoisted_4$a);
35739
35782
  }), 128))
35740
35783
  ]),
35741
35784
  createBaseVNode("div", _hoisted_5$6, [
@@ -35828,7 +35871,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
35828
35871
  const _hoisted_1$v = { class: "lupa-search-results-add-to-cart-wrapper" };
35829
35872
  const _hoisted_2$o = { class: "lupa-search-results-product-addtocart" };
35830
35873
  const _hoisted_3$g = ["disabled"];
35831
- const _hoisted_4$8 = ["href"];
35874
+ const _hoisted_4$9 = ["href"];
35832
35875
  const _hoisted_5$5 = ["id", "disabled"];
35833
35876
  const _sfc_main$y = /* @__PURE__ */ defineComponent({
35834
35877
  __name: "SearchResultsProductAddToCart",
@@ -35866,6 +35909,13 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
35866
35909
  const hasLink = computed(() => {
35867
35910
  return Boolean(props.link && props.options.link);
35868
35911
  });
35912
+ const addToCartButtonClass = computed(() => {
35913
+ return {
35914
+ [props.options.className]: Boolean(props.options.className),
35915
+ "lupa-add-to-cart-loading": loading.value,
35916
+ "lupa-add-to-cart": !loading.value
35917
+ };
35918
+ });
35869
35919
  const handleClick = (e2) => __async2(null, null, function* () {
35870
35920
  if (productCardIsClickable.value && !hasLink.value) {
35871
35921
  e2.preventDefault();
@@ -35886,15 +35936,15 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
35886
35936
  createBaseVNode("div", _hoisted_2$o, [
35887
35937
  hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
35888
35938
  key: 0,
35889
- class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
35939
+ class: addToCartButtonClass.value,
35890
35940
  "data-cy": "lupa-add-to-cart",
35891
35941
  disabled: !inStockValue.value || loading.value
35892
35942
  }, _ctx.dynamicAttributes, { onClick: handleClick }), [
35893
- createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$8)
35943
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
35894
35944
  ], 16, _hoisted_3$g)) : (openBlock(), createElementBlock("button", mergeProps({
35895
35945
  key: 1,
35896
35946
  id: id.value,
35897
- class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
35947
+ class: addToCartButtonClass.value,
35898
35948
  "data-cy": "lupa-add-to-cart",
35899
35949
  disabled: !inStockValue.value || loading.value
35900
35950
  }, _ctx.dynamicAttributes, {
@@ -35908,7 +35958,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
35908
35958
  const _hoisted_1$u = ["innerHTML"];
35909
35959
  const _hoisted_2$n = { key: 0 };
35910
35960
  const _hoisted_3$f = { key: 1 };
35911
- const _hoisted_4$7 = { class: "lupa-search-box-custom-label" };
35961
+ const _hoisted_4$8 = { class: "lupa-search-box-custom-label" };
35912
35962
  const _hoisted_5$4 = { class: "lupa-search-box-custom-text" };
35913
35963
  const _sfc_main$x = /* @__PURE__ */ defineComponent({
35914
35964
  __name: "SearchResultsProductCustom",
@@ -35937,7 +35987,11 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
35937
35987
  var _a25;
35938
35988
  return (_a25 = props.options.isHtml) != null ? _a25 : false;
35939
35989
  });
35940
- const handleClick = () => __async2(null, null, function* () {
35990
+ const handleClick = (e2) => __async2(null, null, function* () {
35991
+ if (e2 && props.options.stopPropagationOnClick) {
35992
+ e2.stopPropagation();
35993
+ e2.preventDefault();
35994
+ }
35941
35995
  if (!props.options.action) {
35942
35996
  return;
35943
35997
  }
@@ -35953,7 +36007,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
35953
36007
  class: className.value
35954
36008
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {})), [
35955
36009
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$n, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$f, [
35956
- createBaseVNode("div", _hoisted_4$7, toDisplayString(label.value), 1),
36010
+ createBaseVNode("div", _hoisted_4$8, toDisplayString(label.value), 1),
35957
36011
  createBaseVNode("div", _hoisted_5$4, toDisplayString(text.value), 1)
35958
36012
  ]))
35959
36013
  ], 16));
@@ -35980,7 +36034,11 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
35980
36034
  const className = computed(() => {
35981
36035
  return props.options.className;
35982
36036
  });
35983
- const handleClick = () => __async2(null, null, function* () {
36037
+ const handleClick = (e2) => __async2(null, null, function* () {
36038
+ if (e2 && props.options.stopPropagationOnClick) {
36039
+ e2.stopPropagation();
36040
+ e2.preventDefault();
36041
+ }
35984
36042
  if (!props.options.action) {
35985
36043
  return;
35986
36044
  }
@@ -36000,7 +36058,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
36000
36058
  const _hoisted_1$s = { id: "lupa-search-results-rating" };
36001
36059
  const _hoisted_2$m = ["innerHTML"];
36002
36060
  const _hoisted_3$e = { class: "lupa-ratings" };
36003
- const _hoisted_4$6 = ["href"];
36061
+ const _hoisted_4$7 = ["href"];
36004
36062
  const _sfc_main$v = /* @__PURE__ */ defineComponent({
36005
36063
  __name: "SearchResultsProductSingleStarRating",
36006
36064
  props: {
@@ -36038,7 +36096,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
36038
36096
  createBaseVNode("a", {
36039
36097
  href: ratingLink.value,
36040
36098
  class: "lupa-total-ratings"
36041
- }, toDisplayString(totalRatings.value), 9, _hoisted_4$6)
36099
+ }, toDisplayString(totalRatings.value), 9, _hoisted_4$7)
36042
36100
  ]);
36043
36101
  };
36044
36102
  }
@@ -36395,7 +36453,7 @@ const _hoisted_3$c = {
36395
36453
  class: "lupa-similar-query-label",
36396
36454
  "data-cy": "lupa-similar-query-label"
36397
36455
  };
36398
- const _hoisted_4$5 = ["onClick"];
36456
+ const _hoisted_4$6 = ["onClick"];
36399
36457
  const _hoisted_5$3 = ["innerHTML"];
36400
36458
  const _hoisted_6$1 = { key: 0 };
36401
36459
  const _hoisted_7 = {
@@ -36456,7 +36514,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
36456
36514
  innerHTML: getSimilarQueryContent(similarQuery.displayQuery)
36457
36515
  }, null, 8, _hoisted_5$3),
36458
36516
  similarQuery.count ? (openBlock(), createElementBlock("span", _hoisted_6$1, " (" + toDisplayString(similarQuery.count) + ")", 1)) : createCommentVNode("", true)
36459
- ], 8, _hoisted_4$5)
36517
+ ], 8, _hoisted_4$6)
36460
36518
  ]),
36461
36519
  createBaseVNode("div", _hoisted_7, [
36462
36520
  (openBlock(true), createElementBlock(Fragment, null, renderList(similarQuery.items, (product, index2) => {
@@ -36788,7 +36846,7 @@ const extractRelatedSource = (source, searchResults2, options, activeFilters) =>
36788
36846
  const _hoisted_1$l = { class: "lupa-related-query-item" };
36789
36847
  const _hoisted_2$g = { class: "lupa-related-query-image" };
36790
36848
  const _hoisted_3$a = { class: "lupa-related-query-label" };
36791
- const _hoisted_4$4 = { class: "lupa-related-query-title" };
36849
+ const _hoisted_4$5 = { class: "lupa-related-query-title" };
36792
36850
  const _hoisted_5$2 = {
36793
36851
  key: 0,
36794
36852
  class: "lupa-related-query-count"
@@ -36900,7 +36958,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
36900
36958
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
36901
36959
  ]),
36902
36960
  createBaseVNode("div", _hoisted_3$a, [
36903
- createBaseVNode("span", _hoisted_4$4, toDisplayString(_ctx.query), 1),
36961
+ createBaseVNode("span", _hoisted_4$5, toDisplayString(_ctx.query), 1),
36904
36962
  ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$2, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
36905
36963
  ])
36906
36964
  ]);
@@ -37127,7 +37185,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
37127
37185
  const _hoisted_1$h = { class: "lupa-related-query-item" };
37128
37186
  const _hoisted_2$d = { class: "lupa-related-query-image" };
37129
37187
  const _hoisted_3$7 = { class: "lupa-related-query-label" };
37130
- const _hoisted_4$3 = { class: "lupa-related-query-title" };
37188
+ const _hoisted_4$4 = { class: "lupa-related-query-title" };
37131
37189
  const _hoisted_5$1 = {
37132
37190
  key: 0,
37133
37191
  class: "lupa-related-query-count"
@@ -37175,7 +37233,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
37175
37233
  }, null, 8, ["item", "options"])) : createCommentVNode("", true)
37176
37234
  ]),
37177
37235
  createBaseVNode("div", _hoisted_3$7, [
37178
- createBaseVNode("span", _hoisted_4$3, toDisplayString(query.value), 1),
37236
+ createBaseVNode("span", _hoisted_4$4, toDisplayString(query.value), 1),
37179
37237
  ((_a25 = _ctx.options) == null ? void 0 : _a25.showCount) ? (openBlock(), createElementBlock("span", _hoisted_5$1, "(" + toDisplayString(totalItemCount.value) + ")", 1)) : createCommentVNode("", true)
37180
37238
  ])
37181
37239
  ]);
@@ -37319,7 +37377,7 @@ const _hoisted_3$5 = {
37319
37377
  class: "lupa-empty-results",
37320
37378
  "data-cy": "lupa-no-results-in-page"
37321
37379
  };
37322
- const _hoisted_4$2 = {
37380
+ const _hoisted_4$3 = {
37323
37381
  key: 5,
37324
37382
  class: "lupa-empty-results",
37325
37383
  "data-cy": "lupa-no-results"
@@ -37540,7 +37598,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
37540
37598
  location: "bottom",
37541
37599
  sdkOptions: _ctx.options.options
37542
37600
  }, null, 8, ["options", "sdkOptions"])
37543
- ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
37601
+ ], 64)) : !unref(loading) && unref(currentQueryText) ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
37544
37602
  createVNode(_sfc_main$h, {
37545
37603
  emptyResultsLabel: (_b25 = _ctx.options.labels) == null ? void 0 : _b25.emptyResults,
37546
37604
  currentQueryText: unref(currentQueryText),
@@ -37576,7 +37634,7 @@ const _hoisted_2$9 = {
37576
37634
  class: "lupa-category-back"
37577
37635
  };
37578
37636
  const _hoisted_3$4 = ["href"];
37579
- const _hoisted_4$1 = {
37637
+ const _hoisted_4$2 = {
37580
37638
  key: 1,
37581
37639
  class: "lupa-child-category-list"
37582
37640
  };
@@ -37636,7 +37694,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
37636
37694
  onClick: handleNavigationBack
37637
37695
  }, toDisplayString(backTitle.value), 9, _hoisted_3$4)
37638
37696
  ])) : createCommentVNode("", true),
37639
- hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
37697
+ hasRelatedCategoryChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
37640
37698
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(relatedCategoryChildren), (child) => {
37641
37699
  return openBlock(), createBlock(_sfc_main$Z, {
37642
37700
  key: getCategoryKey(child),
@@ -39553,12 +39611,13 @@ const _hoisted_1$9 = {
39553
39611
  key: 0,
39554
39612
  class: "lupa-recommendation-section-title"
39555
39613
  };
39556
- const _hoisted_2$6 = {
39614
+ const _hoisted_2$6 = ["href"];
39615
+ const _hoisted_3$3 = {
39557
39616
  key: 1,
39558
39617
  class: "lupa-recommended-products",
39559
39618
  "data-cy": "lupa-recommended-products"
39560
39619
  };
39561
- const _hoisted_3$3 = {
39620
+ const _hoisted_4$1 = {
39562
39621
  key: 1,
39563
39622
  class: "lupa-products",
39564
39623
  "data-cy": "lupa-products"
@@ -39602,6 +39661,10 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
39602
39661
  var _a25, _b25;
39603
39662
  return (_b25 = (_a25 = props.options.recommendationLabels) == null ? void 0 : _a25.title) != null ? _b25 : "";
39604
39663
  });
39664
+ const hasTitleLink = computed(() => {
39665
+ var _a25;
39666
+ return Boolean((_a25 = props.options.recommendationLabels) == null ? void 0 : _a25.titleLink);
39667
+ });
39605
39668
  const hasRecommendations = computed(() => {
39606
39669
  return recommendations2.value.length > 0;
39607
39670
  });
@@ -39691,6 +39754,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
39691
39754
  var _a25, _b25;
39692
39755
  return (_b25 = (_a25 = carouselOptions.value) == null ? void 0 : _a25.wrapAround) != null ? _b25 : true;
39693
39756
  });
39757
+ const recommendationFilters = computed(() => {
39758
+ return __spreadValues2({}, processExtractionObject(props.options.recommendationFilters));
39759
+ });
39694
39760
  const loadLupaRecommendations = () => __async2(null, null, function* () {
39695
39761
  var _a25, _b25;
39696
39762
  recommendationsType.value = "recommendations_lupasearch";
@@ -39699,7 +39765,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
39699
39765
  const result2 = yield LupaSearchSdk.recommend(
39700
39766
  props.options.queryKey,
39701
39767
  itemId.value,
39702
- props.options.recommendationFilters,
39768
+ recommendationFilters.value,
39703
39769
  props.options.options
39704
39770
  );
39705
39771
  if (!result2.success) {
@@ -39717,14 +39783,22 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
39717
39783
  });
39718
39784
  __expose({ fetch: fetch2 });
39719
39785
  return (_ctx, _cache) => {
39786
+ var _a25;
39720
39787
  return openBlock(), createElementBlock("div", {
39721
39788
  class: "lupa-search-product-recommendations-wrapper",
39722
39789
  ref_key: "rootElement",
39723
39790
  ref: rootElement
39724
39791
  }, [
39725
39792
  hasRecommendations.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
39726
- title.value ? (openBlock(), createElementBlock("h2", _hoisted_1$9, toDisplayString(title.value), 1)) : createCommentVNode("", true),
39727
- !loading.value ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
39793
+ title.value ? (openBlock(), createElementBlock("h2", _hoisted_1$9, [
39794
+ !hasTitleLink.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
39795
+ createTextVNode(toDisplayString(title.value), 1)
39796
+ ], 64)) : (openBlock(), createElementBlock("a", {
39797
+ key: 1,
39798
+ href: (_a25 = _ctx.options.recommendationLabels) == null ? void 0 : _a25.titleLink
39799
+ }, toDisplayString(title.value), 9, _hoisted_2$6))
39800
+ ])) : createCommentVNode("", true),
39801
+ !loading.value ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
39728
39802
  layoutType.value === "carousel" ? (openBlock(), createBlock(unref(Carousel), mergeProps({ key: 0 }, carouselOptions.value, { "wrap-around": wrapAround.value }), {
39729
39803
  addons: withCtx(() => [
39730
39804
  createVNode(unref(Navigation))
@@ -39748,7 +39822,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
39748
39822
  }), 128))
39749
39823
  ]),
39750
39824
  _: 1
39751
- }, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_3$3, [
39825
+ }, 16, ["wrap-around"])) : (openBlock(), createElementBlock("div", _hoisted_4$1, [
39752
39826
  (openBlock(true), createElementBlock(Fragment, null, renderList(recommendations2.value, (product, index) => {
39753
39827
  return openBlock(), createBlock(_sfc_main$t, {
39754
39828
  style: normalizeStyle(columnSize.value),
@@ -46487,8 +46561,7 @@ const DEFAULT_OPTIONS_RESULTS = {
46487
46561
  links: {
46488
46562
  details: "/{id}"
46489
46563
  },
46490
- elements: [],
46491
- breadcrumbs: [{ label: "Main Page", link: "/" }, { label: "Search: {1}" }]
46564
+ elements: []
46492
46565
  };
46493
46566
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
46494
46567
  __name: "SearchResultsEntry",